From 5aa932d04508807957b44e10dcb081199cfb58fb Mon Sep 17 00:00:00 2001 From: James Barnsley Date: Mon, 18 Mar 2019 16:26:16 +1300 Subject: [PATCH] POC for playlist queueing --- mopidy_iris/static/app/app.js | 10545 ++++++++++++------------ mopidy_iris/static/app/app.js.map | 2 +- mopidy_iris/static/index.html | 2 +- src/js/components/ContextMenu.js | 21 +- src/js/services/core/actions.js | 42 - src/js/services/core/middleware.js | 30 +- src/js/services/mopidy/actions.js | 70 +- src/js/services/mopidy/middleware.js | 82 +- src/js/services/spotify/actions.js | 62 +- src/js/services/spotify/middleware.js | 8 +- 10 files changed, 5492 insertions(+), 5372 deletions(-) diff --git a/mopidy_iris/static/app/app.js b/mopidy_iris/static/app/app.js index f7e5f7ca..6e68bdc0 100644 --- a/mopidy_iris/static/app/app.js +++ b/mopidy_iris/static/app/app.js @@ -60,7 +60,7 @@ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 115); +/******/ return __webpack_require__(__webpack_require__.s = 108); /******/ }) /************************************************************************/ /******/ ([ @@ -71,9 +71,9 @@ /* WEBPACK VAR INJECTION */(function(process) { if (process.env.NODE_ENV === 'production') { - module.exports = __webpack_require__(116); + module.exports = __webpack_require__(109); } else { - module.exports = __webpack_require__(117); + module.exports = __webpack_require__(110); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) @@ -2024,7 +2024,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applyMiddleware", function() { return applyMiddleware; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return compose; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__DO_NOT_USE__ActionTypes", function() { return ActionTypes; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_symbol_observable__ = __webpack_require__(142); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_symbol_observable__ = __webpack_require__(135); /** @@ -3021,10 +3021,10 @@ function processFinished(key) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_Provider__ = __webpack_require__(129); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_connectAdvanced__ = __webpack_require__(86); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_Context__ = __webpack_require__(60); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__connect_connect__ = __webpack_require__(139); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_Provider__ = __webpack_require__(122); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_connectAdvanced__ = __webpack_require__(83); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_Context__ = __webpack_require__(59); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__connect_connect__ = __webpack_require__(132); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Provider", function() { return __WEBPACK_IMPORTED_MODULE_0__components_Provider__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "connectAdvanced", function() { return __WEBPACK_IMPORTED_MODULE_1__components_connectAdvanced__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ReactReduxContext", function() { return __WEBPACK_IMPORTED_MODULE_2__components_Context__["a"]; }); @@ -3052,7 +3052,7 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactFontawesome = __webpack_require__(240); +var _reactFontawesome = __webpack_require__(217); var _reactFontawesome2 = _interopRequireDefault(_reactFontawesome); @@ -3374,9 +3374,12 @@ exports.clearCurrentTrack = clearCurrentTrack; exports.getQueue = getQueue; exports.changeTrack = changeTrack; exports.playURIs = playURIs; -exports.enqueueURIs = enqueueURIs; -exports.enqueueURIsBatchDone = enqueueURIsBatchDone; exports.playAlbum = playAlbum; +exports.playPlaylist = playPlaylist; +exports.enqueueURIs = enqueueURIs; +exports.enqueueAlbum = enqueueAlbum; +exports.enqueuePlaylist = enqueuePlaylist; +exports.enqueueURIsBatchDone = enqueueURIsBatchDone; exports.removeTracks = removeTracks; exports.reorderTracklist = reorderTracklist; exports.clearTracklist = clearTracklist; @@ -3664,7 +3667,12 @@ function changeTrack(tlid) { }; } -function playURIs(uris) { +/** + * Playing assets + **/ + +function playURIs() { + var uris = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var from_uri = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; var shuffle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; @@ -3675,34 +3683,70 @@ function playURIs(uris) { }; } -function enqueueURIs(uris) { +function playAlbum(uri) { + return { + type: 'MOPIDY_PLAY_ALBUM', + uri: uri + }; +} + +function playPlaylist(uri) { + return { + type: 'MOPIDY_PLAY_PLAYLIST', + uri: uri + }; +} + +function enqueueURIs() { + var uris = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var from_uri = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; - var next = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var play_next = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; var at_position = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; var offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0; return { type: 'MOPIDY_ENQUEUE_URIS', uris: uris, - at_position: at_position, - next: next, from_uri: from_uri, + at_position: at_position, + play_next: play_next, offset: offset }; } +function enqueueAlbum(uri) { + var next = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var at_position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + + return { + type: 'MOPIDY_ENQUEUE_ALBUM', + uri: uri, + next: next, + at_position: at_position + }; +} + +function enqueuePlaylist(uri) { + var play_next = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var at_position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + + return { + type: 'MOPIDY_ENQUEUE_PLAYLIST', + uri: uri, + play_next: play_next, + at_position: at_position + }; +} + function enqueueURIsBatchDone() { return { type: 'MOPIDY_ENQUEUE_URIS_BATCH_DONE' }; } -function playAlbum(uri) { - return { - type: 'MOPIDY_PLAY_ALBUM', - uri: uri - }; -} +/** + * Playlist maniopulation + **/ function removeTracks(tlids) { return { @@ -3914,9 +3958,9 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactRouter = __webpack_require__(38); +var _reactRouter = __webpack_require__(37); -var _reactRouterDom = __webpack_require__(32); +var _reactRouterDom = __webpack_require__(31); var _helpers = __webpack_require__(1); @@ -4083,8 +4127,8 @@ exports.savePlaylist = savePlaylist; exports.getPlaylist = getPlaylist; exports.getLibraryTracksAndPlay = getLibraryTracksAndPlay; exports.getLibraryTracksAndPlayProcessor = getLibraryTracksAndPlayProcessor; -exports.getPlaylistTracksAndPlay = getPlaylistTracksAndPlay; -exports.getPlaylistTracksAndPlayProcessor = getPlaylistTracksAndPlayProcessor; +exports.getAllPlaylistTracks = getAllPlaylistTracks; +exports.getAllPlaylistTracksProcessor = getAllPlaylistTracksProcessor; exports.toggleFollowingPlaylist = toggleFollowingPlaylist; exports.addTracksToPlaylist = addTracksToPlaylist; exports.deleteTracksFromPlaylist = deleteTracksFromPlaylist; @@ -5458,26 +5502,36 @@ function getLibraryTracksAndPlayProcessor(data) { * Recursively get .next until we have all tracks **/ -function getPlaylistTracksAndPlay(uri, shuffle) { +function getAllPlaylistTracks(uri) { + var shuffle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var callback_action = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + var play_next = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + var at_position = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null; + var offset = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0; + return function (dispatch, getState) { - dispatch(uiActions.startProcess('SPOTIFY_GET_PLAYLIST_TRACKS_AND_PLAY_PROCESSOR', 'Loading playlist tracks', { + dispatch(uiActions.startProcess('SPOTIFY_GET_ALL_PLAYLIST_TRACKS_PROCESSOR', 'Loading playlist tracks', { uri: uri, next: 'playlists/' + helpers.getFromUri('playlistid', uri) + '/tracks?market=' + getState().spotify.country, - shuffle: shuffle + shuffle: shuffle, + play_next: play_next, + at_position: at_position, + offset: offset, + callback_action: callback_action })); }; } -function getPlaylistTracksAndPlayProcessor(data) { +function getAllPlaylistTracksProcessor(data) { return function (dispatch, getState) { request(dispatch, getState, data.next).then(function (response) { // Check to see if we've been cancelled - if (getState().ui.processes['SPOTIFY_GET_PLAYLIST_TRACKS_AND_PLAY_PROCESSOR'] !== undefined) { - var processor = getState().ui.processes['SPOTIFY_GET_PLAYLIST_TRACKS_AND_PLAY_PROCESSOR']; + if (getState().ui.processes['SPOTIFY_GET_ALL_PLAYLIST_TRACKS_PROCESSOR'] !== undefined) { + var processor = getState().ui.processes['SPOTIFY_GET_ALL_PLAYLIST_TRACKS_PROCESSOR']; if (processor.status == 'cancelling') { - dispatch(uiActions.processCancelled('SPOTIFY_GET_PLAYLIST_TRACKS_AND_PLAY_PROCESSOR')); + dispatch(uiActions.processCancelled('SPOTIFY_GET_ALL_PLAYLIST_TRACKS_PROCESSOR')); return false; } } @@ -5496,25 +5550,27 @@ function getPlaylistTracksAndPlayProcessor(data) { // We got a next link, so we've got more work to be done if (response.next) { - dispatch(uiActions.updateProcess('SPOTIFY_GET_PLAYLIST_TRACKS_AND_PLAY_PROCESSOR', 'Loading ' + (response.total - uris.length) + ' playlist tracks', { + dispatch(uiActions.updateProcess('SPOTIFY_GET_ALL_PLAYLIST_TRACKS_PROCESSOR', 'Loading ' + (response.total - uris.length) + ' playlist tracks', Object.assign({}, data, { next: response.next, total: response.total, - remaining: response.total - uris.length, - shuffle: data.shuffle - })); - dispatch(uiActions.runProcess('SPOTIFY_GET_PLAYLIST_TRACKS_AND_PLAY_PROCESSOR', { + remaining: response.total - uris.length + }))); + dispatch(uiActions.runProcess('SPOTIFY_GET_ALL_PLAYLIST_TRACKS_PROCESSOR', Object.assign({}, data, { next: response.next, - uris: uris, - shuffle: data.shuffle - })); + uris: uris + }))); } else { if (data.shuffle) { uris = helpers.shuffle(uris); } - dispatch(mopidyActions.playURIs(uris, data.uri)); - dispatch(uiActions.processFinishing('SPOTIFY_GET_PLAYLIST_TRACKS_AND_PLAY_PROCESSOR')); + if (data.callback_action == 'enqueue') { + dispatch(mopidyActions.enqueueURIs(uris, data.uri, data.play_next, data.at_position, data.offset)); + } else { + dispatch(mopidyActions.playURIs(uris, data.uri)); + } + dispatch(uiActions.processFinishing('SPOTIFY_GET_ALL_PLAYLIST_TRACKS_PROCESSOR')); } }, function (error) { dispatch(coreActions.handleException('Could not load tracks to play playlist', error)); @@ -5771,7 +5827,7 @@ function getLibraryAlbumsProcessor(data) { }); }; } -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(15))) /***/ }), /* 10 */ @@ -5809,8 +5865,6 @@ exports.usersLoaded = usersLoaded; exports.userPlaylistsLoaded = userPlaylistsLoaded; exports.loadedMore = loadedMore; exports.removeFromIndex = removeFromIndex; -exports.playURIs = playURIs; -exports.enqueueURIs = enqueueURIs; exports.reorderPlaylistTracks = reorderPlaylistTracks; exports.savePlaylist = savePlaylist; exports.createPlaylist = createPlaylist; @@ -6067,56 +6121,6 @@ function removeFromIndex(index_name, key) { }; } -/** - * Playing of assetse - **/ - -/** - * Play one or many URIs - * - * @param uri = String (when playing just one URI, eg playlist) - * @param uris = Array (when playing several URIs, eg tracks) - * @param origin = String (URI from which these URIs came) - * @param shuffle = Boolean (shuffle the order of URIs) - **/ -function playURIs() { - var uri = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - var uris = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; - var origin = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; - var shuffle = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; - - return { - type: 'PLAY_URIS', - uri: uri, - uris: uris, - origin: origin, - shuffle: shuffle - }; -} - -/** - * Enqueue one or many URIs - * - * @param uris = Array - * @param position = Int (position in track_list in which to insert these URIs) - * @param origin = String (URI from which these URIs came) - * @param shuffle = Boolean (shuffle the order of URIs) - **/ -function enqueueURIs() { - var uris = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; - var position = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; - var origin = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; - var shuffle = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; - - return { - type: 'ENQUEUE_URIS', - position: position, - uris: uris, - origin: origin, - shuffle: shuffle - }; -} - /** * Playlist manipulation **/ @@ -6267,7 +6271,7 @@ function getLibraryArtists() { type: 'GET_LIBRARY_ARTISTS' }; } -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(15))) /***/ }), /* 11 */ @@ -6412,6 +6416,128 @@ exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)( "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__(0); + +var _react2 = _interopRequireDefault(_react); + +var _Icon = __webpack_require__(5); + +var _Icon2 = _interopRequireDefault(_Icon); + +var _ContextMenuTrigger = __webpack_require__(22); + +var _ContextMenuTrigger2 = _interopRequireDefault(_ContextMenuTrigger); + +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 Header = function (_React$Component) { + _inherits(Header, _React$Component); + + function Header(props) { + _classCallCheck(this, Header); + + var _this = _possibleConstructorReturn(this, (Header.__proto__ || Object.getPrototypeOf(Header)).call(this, props)); + + _this.state = { + expanded: false + }; + return _this; + } + + _createClass(Header, [{ + key: 'handleContextMenuTrigger', + value: function handleContextMenuTrigger(e, options) { + + // We have an override trigger (eg Album, Playlist) + if (this.props.handleContextMenuTrigger) { + return this.props.handleContextMenuTrigger(e); + } else { + e.preventDefault(); + var data = { + e: e, + context: 'custom', + title: this.props.title, + options: options + }; + this.props.uiActions.showContextMenu(data); + } + } + }, { + key: 'renderContextMenuTrigger', + value: function renderContextMenuTrigger() { + var _this2 = this; + + // No custom trigger, nor any options + if (!this.props.handleContextMenuTrigger && !this.props.options) { + return null; + } + + return _react2.default.createElement(_ContextMenuTrigger2.default, { onTrigger: function onTrigger(e) { + return _this2.handleContextMenuTrigger(e, _this2.props.options); + } }); + } + }, { + key: 'renderOptions', + value: function renderOptions() { + if (!this.props.options && !this.props.handleContextMenuTrigger) { + return null; + } + + return _react2.default.createElement( + 'div', + { className: 'options' }, + this.renderContextMenuTrigger(), + _react2.default.createElement( + 'span', + { className: 'items' }, + _react2.default.createElement( + 'span', + { className: 'liner' }, + this.props.options ? this.props.options : null + ) + ) + ); + } + }, { + key: 'render', + value: function render() { + return _react2.default.createElement( + 'header', + { className: this.props.className ? this.props.className : null }, + _react2.default.createElement( + 'h1', + null, + this.props.children ? this.props.children : null + ), + this.renderOptions() + ); + } + }]); + + return Header; +}(_react2.default.Component); + +exports.default = Header; + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + Object.defineProperty(exports, "__esModule", { value: true }); @@ -6700,128 +6826,6 @@ function commandsUpdated(commands) { }; } -/***/ }), -/* 13 */ -/***/ (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__(0); - -var _react2 = _interopRequireDefault(_react); - -var _Icon = __webpack_require__(5); - -var _Icon2 = _interopRequireDefault(_Icon); - -var _ContextMenuTrigger = __webpack_require__(23); - -var _ContextMenuTrigger2 = _interopRequireDefault(_ContextMenuTrigger); - -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 Header = function (_React$Component) { - _inherits(Header, _React$Component); - - function Header(props) { - _classCallCheck(this, Header); - - var _this = _possibleConstructorReturn(this, (Header.__proto__ || Object.getPrototypeOf(Header)).call(this, props)); - - _this.state = { - expanded: false - }; - return _this; - } - - _createClass(Header, [{ - key: 'handleContextMenuTrigger', - value: function handleContextMenuTrigger(e, options) { - - // We have an override trigger (eg Album, Playlist) - if (this.props.handleContextMenuTrigger) { - return this.props.handleContextMenuTrigger(e); - } else { - e.preventDefault(); - var data = { - e: e, - context: 'custom', - title: this.props.title, - options: options - }; - this.props.uiActions.showContextMenu(data); - } - } - }, { - key: 'renderContextMenuTrigger', - value: function renderContextMenuTrigger() { - var _this2 = this; - - // No custom trigger, nor any options - if (!this.props.handleContextMenuTrigger && !this.props.options) { - return null; - } - - return _react2.default.createElement(_ContextMenuTrigger2.default, { onTrigger: function onTrigger(e) { - return _this2.handleContextMenuTrigger(e, _this2.props.options); - } }); - } - }, { - key: 'renderOptions', - value: function renderOptions() { - if (!this.props.options && !this.props.handleContextMenuTrigger) { - return null; - } - - return _react2.default.createElement( - 'div', - { className: 'options' }, - this.renderContextMenuTrigger(), - _react2.default.createElement( - 'span', - { className: 'items' }, - _react2.default.createElement( - 'span', - { className: 'liner' }, - this.props.options ? this.props.options : null - ) - ) - ); - } - }, { - key: 'render', - value: function render() { - return _react2.default.createElement( - 'header', - { className: this.props.className ? this.props.className : null }, - _react2.default.createElement( - 'h1', - null, - this.props.children ? this.props.children : null - ), - this.renderOptions() - ); - } - }]); - - return Header; -}(_react2.default.Component); - -exports.default = Header; - /***/ }), /* 14 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -6841,14 +6845,14 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (immutable) */ __webpack_exports__["outboundLink"] = outboundLink; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OutboundLink", function() { return OutboundLink; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "testModeAPI", function() { return testModeAPI; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_format__ = __webpack_require__(187); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_removeLeadingSlash__ = __webpack_require__(190); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_trim__ = __webpack_require__(98); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_loadGA__ = __webpack_require__(191); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_console_warn__ = __webpack_require__(68); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_console_log__ = __webpack_require__(192); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_testModeAPI__ = __webpack_require__(193); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__components_OutboundLink__ = __webpack_require__(194); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_format__ = __webpack_require__(180); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_removeLeadingSlash__ = __webpack_require__(183); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_trim__ = __webpack_require__(95); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_loadGA__ = __webpack_require__(184); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_console_warn__ = __webpack_require__(67); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_console_log__ = __webpack_require__(185); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_testModeAPI__ = __webpack_require__(186); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__components_OutboundLink__ = __webpack_require__(187); function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } @@ -7464,440 +7468,6 @@ var testModeAPI = __WEBPACK_IMPORTED_MODULE_6__utils_testModeAPI__["a" /* defaul /***/ }), /* 15 */ -/***/ (function(module, exports) { - -module.exports = function() { - throw new Error("define cannot be used indirect"); -}; - - -/***/ }), -/* 16 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function($) { - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.set = set; -exports.authorizationGranted = authorizationGranted; -exports.revokeAuthorization = revokeAuthorization; -exports.importAuthorization = importAuthorization; -exports.getMe = getMe; -exports.getTrack = getTrack; -exports.getArtist = getArtist; -exports.getAlbum = getAlbum; -exports.getImages = getImages; -exports.loveTrack = loveTrack; -exports.unloveTrack = unloveTrack; -exports.scrobble = scrobble; - -var coreActions = __webpack_require__(10); -var uiActions = __webpack_require__(3); -var helpers = __webpack_require__(1); - -function set(data) { - return { - type: 'LASTFM_SET', - data: data - }; -} - -/** - * Send an ajax request to the LastFM API - * - * @param dispatch = obj - * @param getState = obj - * @param params = string, the url params to send - * @params signed = boolean, whether we've got a signed request with baked-in api_key - **/ -var sendRequest = function sendRequest(dispatch, getState, params) { - var signed = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; - - return new Promise(function (resolve, reject) { - - var loader_key = helpers.generateGuid(); - var method = params.substring(params.indexOf("method=") + 7, params.length); - method = method.substring(0, method.indexOf("&")); - - dispatch(uiActions.startLoading(loader_key, 'lastfm_' + method)); - - var config = { - method: 'GET', - cache: true, - timeout: 30000, - url: 'https://ws.audioscrobbler.com/2.0/?format=json&' + params - - // Signed requests don't need our api_key as the proxy has it's own - };if (!signed) { - config.url += '&api_key=4320a3ef51c9b3d69de552ac083c55e3'; - } else { - config.method = 'POST'; - } - - $.ajax(config).then(function (response) { - dispatch(uiActions.stopLoading(loader_key)); - if (response.error) { - reject({ - config: config, - error: response - }); - } else { - resolve(response); - } - }, function (xhr, status, error) { - dispatch(uiActions.stopLoading(loader_key)); - - // Snatch a more meaningful error - var description = null; - if (xhr && xhr.responseJSON && xhr.responseJSON.message) { - description = xhr.responseJSON.message; - } - - reject({ - config: config, - error: error, - description: description, - status: status, - xhr: xhr - }); - }); - }); -}; - -/** - * Send a SIGNED ajax request to the LastFM API - * - * @param dispatch = obj - * @param getState = obj - * @param params = string, the url params to send - * @param signed = boolean - **/ -var sendSignedRequest = function sendSignedRequest(dispatch, getState, params) { - return new Promise(function (resolve, reject) { - - // Not authorized - if (!getState().lastfm.authorization) { - reject({ - params: params, - error: "No active LastFM authorization (session)" - }); - } - - var loader_key = helpers.generateGuid(); - var method = params.substring(params.indexOf("method=") + 7, params.length); - method = method.substring(0, method.indexOf("&")); - - dispatch(uiActions.startLoading(loader_key, 'lastfm_' + method)); - - params += "&sk=" + getState().lastfm.authorization.key; - - var config = { - method: 'GET', - cache: false, - timeout: 30000, - url: getState().lastfm.authorization_url + "?action=sign_request&" + params - - // Get our server proxy to sign our request - };$.ajax(config).then(function (response) { - dispatch(uiActions.stopLoading(loader_key)); - - // Now we have signed params, we can make the actual request - sendRequest(dispatch, getState, response.params, true).then(function (response) { - resolve(response); - }, function (error) { - reject(error); - }); - }, function (xhr, status, error) { - dispatch(uiActions.stopLoading(loader_key)); - reject(error); - }); - }); -}; - -/** - * Handle authorization process - **/ - -function authorizationGranted(data) { - data.session.expiry = new Date().getTime() + 3600; - return { - type: 'LASTFM_AUTHORIZATION_GRANTED', - data: data - }; -} - -function revokeAuthorization() { - return { - type: 'LASTFM_AUTHORIZATION_REVOKED' - }; -} - -function importAuthorization(authorization) { - return { - type: 'LASTFM_IMPORT_AUTHORIZATION', - authorization: authorization - }; -} - -/** - * Non-signed requests - **/ - -function getMe() { - return function (dispatch, getState) { - var params = 'method=user.getInfo&user=' + getState().lastfm.authorization.name; - sendRequest(dispatch, getState, params).then(function (response) { - if (response.user) { - dispatch({ - type: 'LASTFM_ME_LOADED', - me: response.user - }); - } - }); - }; -} - -function getTrack(uri) { - return function (dispatch, getState) { - if (getState().core.tracks[uri] !== undefined) { - var track = getState().core.tracks[uri]; - if (!track.artists) { - dispatch(coreActions.handleException("Could not get LastFM track", {}, "Track has no artists")); - return; - } - } else { - dispatch(coreActions.handleException("Could not get LastFM track", {}, "Could not find track in index")); - return; - } - - var track_name = track.name; - var artist_name = encodeURIComponent(track.artists[0].name); - var params = 'method=track.getInfo&track=' + track_name + '&artist=' + artist_name; - if (getState().lastfm.authorization) { - params += '&username=' + getState().lastfm.authorization.name; - } - sendRequest(dispatch, getState, params).then(function (response) { - if (response.track) { - var merged_track = Object.assign({}, { - uri: track.uri - }, response.track, track); - dispatch(coreActions.trackLoaded(merged_track)); - } - }); - }; -} - -function getArtist(uri, artist) { - var mbid = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - - - return function (dispatch, getState) { - if (mbid) { - var params = 'method=artist.getInfo&mbid=' + mbid; - } else { - artist = artist.replace("&", "and"); - artist = encodeURIComponent(artist); - var params = 'method=artist.getInfo&artist=' + artist; - } - sendRequest(dispatch, getState, params).then(function (response) { - if (response.artist) { - var artist = { - uri: uri, - images: response.artist.image, - mbid: response.artist.mbid, - biography: response.artist.bio.content, - biography_publish_date: response.artist.bio.published, - biography_link: response.artist.bio.links.link.href, - listeners: parseInt(response.artist.stats.listeners) - }; - - dispatch(coreActions.artistLoaded(artist)); - } - }); - }; -} - -function getAlbum(uri, artist, album) { - var mbid = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; - - return function (dispatch, getState) { - if (mbid) { - var params = 'method=album.getInfo&mbid=' + mbid; - } else { - artist = encodeURIComponent(artist); - album = encodeURIComponent(album); - var params = 'method=album.getInfo&album=' + album + '&artist=' + artist; - } - sendRequest(dispatch, getState, params).then(function (response) { - if (response.album) { - - var existing_album = getState().core.albums[uri]; - - var album = { - uri: uri, - images: response.album.image, - listeners: parseInt(response.album.listeners), - play_count: parseInt(response.album.playcount), - mbid: response.album.mbid, - wiki: response.album.wiki ? response.album.wiki.content : null, - wiki_publish_date: response.album.wiki ? response.album.wiki.published : null - }; - - // If we've already got some of this album and it has images aready, don't use our ones. - // In *most* cases this existing image will be perfectly suffice. This prevents an ugly - // flicker when the existing image is replaced by the LastFM one - if (existing_album && existing_album.images) { - delete album.images; - } - - dispatch(coreActions.albumLoaded(album)); - } - }); - }; -} - -function getImages(context, uri) { - return function (dispatch, getState) { - - var record = getState().core[context][uri]; - if (record) { - switch (context) { - - case "tracks": - - if (record.mbid) { - var params = 'method=album.getInfo&mbid=' + record.mbid; - } else if (record.artists && record.artists.length > 0 && record.album) { - var artist = encodeURIComponent(record.artists[0].name); - var album = encodeURIComponent(record.album.name); - var params = 'method=album.getInfo&album=' + album + '&artist=' + artist; - } - - if (params) { - sendRequest(dispatch, getState, params).then(function (response) { - if (response.album) { - record = Object.assign({}, record, { images: response.album.image }); - dispatch(coreActions.trackLoaded(record)); - dispatch(coreActions.albumLoaded(response.album)); - } - }); - } - break; - - case "albums": - - if (record.mbid) { - var params = 'method=album.getInfo&mbid=' + record.mbid; - } else if (record.artists && record.artists.length > 0) { - var artist = encodeURIComponent(record.artists[0].name); - var album = encodeURIComponent(record.name); - var params = 'method=album.getInfo&album=' + album + '&artist=' + artist; - } - - if (params) { - sendRequest(dispatch, getState, params).then(function (response) { - if (response.album) { - record = Object.assign({}, record, { images: response.album.image }); - dispatch(coreActions.albumLoaded(record)); - } - }); - } - break; - } - } - }; -} - -/** - * Signed requests - **/ - -function loveTrack(uri) { - return function (dispatch, getState) { - if (getState().core.tracks[uri] !== undefined) { - var track = getState().core.tracks[uri]; - if (!track.artists) { - dispatch(coreActions.handleException("Could not love LastFM track", track, "Track has no artists")); - return; - } - } else { - dispatch(coreActions.handleException("Could not love LastFM track", track, "Could not find track in index")); - return; - } - - var artist = encodeURIComponent(track.artists[0].name); - var params = 'method=track.love&track=' + track.name + '&artist=' + artist; - sendSignedRequest(dispatch, getState, params).then(function (response) { - track = Object.assign({}, track, { - userloved: true - }); - dispatch({ - type: 'TRACKS_LOADED', - tracks: [track] - }); - }); - }; -} - -function unloveTrack(uri) { - return function (dispatch, getState) { - if (getState().core.tracks[uri] !== undefined) { - var track = getState().core.tracks[uri]; - if (!track.artists) { - dispatch(coreActions.handleException("Could not unlove LastFM track", track, "Track has no artists")); - return; - } - } else { - dispatch(coreActions.handleException("Could not unlove LastFM track", track, "Could not find track in index")); - return; - } - - var artist = encodeURIComponent(track.artists[0].name); - var params = 'method=track.unlove&track=' + track.name + '&artist=' + artist; - sendSignedRequest(dispatch, getState, params).then(function (response) { - track = Object.assign({}, track, { - userloved: false - }); - dispatch({ - type: 'TRACKS_LOADED', - tracks: [track] - }); - }); - }; -} - -/** - * TODO: Currently scrobbling client-side would result in duplicated scrobbles - * if the user was authorized across multiple connections. Ideally this would - * be handled server-side. Mopidy-Scrobbler currently achieves this. - **/ -function scrobble(track) { - return function (dispatch, getState) { - var track_name = track.name; - var artist_name = "Unknown"; - if (track.artists) { - artist_name = track.artists[0].name; - } - var artist_name = encodeURIComponent(artist_name); - - var params = 'method=track.scrobble'; - params += '&track=' + track_name + '&artist=' + artist_name; - params += '×tamp=' + Math.floor(Date.now() / 1000); - - sendSignedRequest(dispatch, getState, params).then(function (response) { - console.log("Scrobbled", response); - }, function (error) { - dispatch(coreActions.handleException('Could not scrobble LastFM track', error, error.description ? error.description : null)); - }); - }; -} -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17))) - -/***/ }), -/* 17 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! @@ -18268,7 +17838,432 @@ return jQuery; /***/ }), -/* 18 */ +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function($) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.set = set; +exports.authorizationGranted = authorizationGranted; +exports.revokeAuthorization = revokeAuthorization; +exports.importAuthorization = importAuthorization; +exports.getMe = getMe; +exports.getTrack = getTrack; +exports.getArtist = getArtist; +exports.getAlbum = getAlbum; +exports.getImages = getImages; +exports.loveTrack = loveTrack; +exports.unloveTrack = unloveTrack; +exports.scrobble = scrobble; + +var coreActions = __webpack_require__(10); +var uiActions = __webpack_require__(3); +var helpers = __webpack_require__(1); + +function set(data) { + return { + type: 'LASTFM_SET', + data: data + }; +} + +/** + * Send an ajax request to the LastFM API + * + * @param dispatch = obj + * @param getState = obj + * @param params = string, the url params to send + * @params signed = boolean, whether we've got a signed request with baked-in api_key + **/ +var sendRequest = function sendRequest(dispatch, getState, params) { + var signed = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + + return new Promise(function (resolve, reject) { + + var loader_key = helpers.generateGuid(); + var method = params.substring(params.indexOf("method=") + 7, params.length); + method = method.substring(0, method.indexOf("&")); + + dispatch(uiActions.startLoading(loader_key, 'lastfm_' + method)); + + var config = { + method: 'GET', + cache: true, + timeout: 30000, + url: 'https://ws.audioscrobbler.com/2.0/?format=json&' + params + + // Signed requests don't need our api_key as the proxy has it's own + };if (!signed) { + config.url += '&api_key=4320a3ef51c9b3d69de552ac083c55e3'; + } else { + config.method = 'POST'; + } + + $.ajax(config).then(function (response) { + dispatch(uiActions.stopLoading(loader_key)); + if (response.error) { + reject({ + config: config, + error: response + }); + } else { + resolve(response); + } + }, function (xhr, status, error) { + dispatch(uiActions.stopLoading(loader_key)); + + // Snatch a more meaningful error + var description = null; + if (xhr && xhr.responseJSON && xhr.responseJSON.message) { + description = xhr.responseJSON.message; + } + + reject({ + config: config, + error: error, + description: description, + status: status, + xhr: xhr + }); + }); + }); +}; + +/** + * Send a SIGNED ajax request to the LastFM API + * + * @param dispatch = obj + * @param getState = obj + * @param params = string, the url params to send + * @param signed = boolean + **/ +var sendSignedRequest = function sendSignedRequest(dispatch, getState, params) { + return new Promise(function (resolve, reject) { + + // Not authorized + if (!getState().lastfm.authorization) { + reject({ + params: params, + error: "No active LastFM authorization (session)" + }); + } + + var loader_key = helpers.generateGuid(); + var method = params.substring(params.indexOf("method=") + 7, params.length); + method = method.substring(0, method.indexOf("&")); + + dispatch(uiActions.startLoading(loader_key, 'lastfm_' + method)); + + params += "&sk=" + getState().lastfm.authorization.key; + + var config = { + method: 'GET', + cache: false, + timeout: 30000, + url: getState().lastfm.authorization_url + "?action=sign_request&" + params + + // Get our server proxy to sign our request + };$.ajax(config).then(function (response) { + dispatch(uiActions.stopLoading(loader_key)); + + // Now we have signed params, we can make the actual request + sendRequest(dispatch, getState, response.params, true).then(function (response) { + resolve(response); + }, function (error) { + reject(error); + }); + }, function (xhr, status, error) { + dispatch(uiActions.stopLoading(loader_key)); + reject(error); + }); + }); +}; + +/** + * Handle authorization process + **/ + +function authorizationGranted(data) { + data.session.expiry = new Date().getTime() + 3600; + return { + type: 'LASTFM_AUTHORIZATION_GRANTED', + data: data + }; +} + +function revokeAuthorization() { + return { + type: 'LASTFM_AUTHORIZATION_REVOKED' + }; +} + +function importAuthorization(authorization) { + return { + type: 'LASTFM_IMPORT_AUTHORIZATION', + authorization: authorization + }; +} + +/** + * Non-signed requests + **/ + +function getMe() { + return function (dispatch, getState) { + var params = 'method=user.getInfo&user=' + getState().lastfm.authorization.name; + sendRequest(dispatch, getState, params).then(function (response) { + if (response.user) { + dispatch({ + type: 'LASTFM_ME_LOADED', + me: response.user + }); + } + }); + }; +} + +function getTrack(uri) { + return function (dispatch, getState) { + if (getState().core.tracks[uri] !== undefined) { + var track = getState().core.tracks[uri]; + if (!track.artists) { + dispatch(coreActions.handleException("Could not get LastFM track", {}, "Track has no artists")); + return; + } + } else { + dispatch(coreActions.handleException("Could not get LastFM track", {}, "Could not find track in index")); + return; + } + + var track_name = track.name; + var artist_name = encodeURIComponent(track.artists[0].name); + var params = 'method=track.getInfo&track=' + track_name + '&artist=' + artist_name; + if (getState().lastfm.authorization) { + params += '&username=' + getState().lastfm.authorization.name; + } + sendRequest(dispatch, getState, params).then(function (response) { + if (response.track) { + var merged_track = Object.assign({}, { + uri: track.uri + }, response.track, track); + dispatch(coreActions.trackLoaded(merged_track)); + } + }); + }; +} + +function getArtist(uri, artist) { + var mbid = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + + return function (dispatch, getState) { + if (mbid) { + var params = 'method=artist.getInfo&mbid=' + mbid; + } else { + artist = artist.replace("&", "and"); + artist = encodeURIComponent(artist); + var params = 'method=artist.getInfo&artist=' + artist; + } + sendRequest(dispatch, getState, params).then(function (response) { + if (response.artist) { + var artist = { + uri: uri, + images: response.artist.image, + mbid: response.artist.mbid, + biography: response.artist.bio.content, + biography_publish_date: response.artist.bio.published, + biography_link: response.artist.bio.links.link.href, + listeners: parseInt(response.artist.stats.listeners) + }; + + dispatch(coreActions.artistLoaded(artist)); + } + }); + }; +} + +function getAlbum(uri, artist, album) { + var mbid = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + + return function (dispatch, getState) { + if (mbid) { + var params = 'method=album.getInfo&mbid=' + mbid; + } else { + artist = encodeURIComponent(artist); + album = encodeURIComponent(album); + var params = 'method=album.getInfo&album=' + album + '&artist=' + artist; + } + sendRequest(dispatch, getState, params).then(function (response) { + if (response.album) { + + var existing_album = getState().core.albums[uri]; + + var album = { + uri: uri, + images: response.album.image, + listeners: parseInt(response.album.listeners), + play_count: parseInt(response.album.playcount), + mbid: response.album.mbid, + wiki: response.album.wiki ? response.album.wiki.content : null, + wiki_publish_date: response.album.wiki ? response.album.wiki.published : null + }; + + // If we've already got some of this album and it has images aready, don't use our ones. + // In *most* cases this existing image will be perfectly suffice. This prevents an ugly + // flicker when the existing image is replaced by the LastFM one + if (existing_album && existing_album.images) { + delete album.images; + } + + dispatch(coreActions.albumLoaded(album)); + } + }); + }; +} + +function getImages(context, uri) { + return function (dispatch, getState) { + + var record = getState().core[context][uri]; + if (record) { + switch (context) { + + case "tracks": + + if (record.mbid) { + var params = 'method=album.getInfo&mbid=' + record.mbid; + } else if (record.artists && record.artists.length > 0 && record.album) { + var artist = encodeURIComponent(record.artists[0].name); + var album = encodeURIComponent(record.album.name); + var params = 'method=album.getInfo&album=' + album + '&artist=' + artist; + } + + if (params) { + sendRequest(dispatch, getState, params).then(function (response) { + if (response.album) { + record = Object.assign({}, record, { images: response.album.image }); + dispatch(coreActions.trackLoaded(record)); + dispatch(coreActions.albumLoaded(response.album)); + } + }); + } + break; + + case "albums": + + if (record.mbid) { + var params = 'method=album.getInfo&mbid=' + record.mbid; + } else if (record.artists && record.artists.length > 0) { + var artist = encodeURIComponent(record.artists[0].name); + var album = encodeURIComponent(record.name); + var params = 'method=album.getInfo&album=' + album + '&artist=' + artist; + } + + if (params) { + sendRequest(dispatch, getState, params).then(function (response) { + if (response.album) { + record = Object.assign({}, record, { images: response.album.image }); + dispatch(coreActions.albumLoaded(record)); + } + }); + } + break; + } + } + }; +} + +/** + * Signed requests + **/ + +function loveTrack(uri) { + return function (dispatch, getState) { + if (getState().core.tracks[uri] !== undefined) { + var track = getState().core.tracks[uri]; + if (!track.artists) { + dispatch(coreActions.handleException("Could not love LastFM track", track, "Track has no artists")); + return; + } + } else { + dispatch(coreActions.handleException("Could not love LastFM track", track, "Could not find track in index")); + return; + } + + var artist = encodeURIComponent(track.artists[0].name); + var params = 'method=track.love&track=' + track.name + '&artist=' + artist; + sendSignedRequest(dispatch, getState, params).then(function (response) { + track = Object.assign({}, track, { + userloved: true + }); + dispatch({ + type: 'TRACKS_LOADED', + tracks: [track] + }); + }); + }; +} + +function unloveTrack(uri) { + return function (dispatch, getState) { + if (getState().core.tracks[uri] !== undefined) { + var track = getState().core.tracks[uri]; + if (!track.artists) { + dispatch(coreActions.handleException("Could not unlove LastFM track", track, "Track has no artists")); + return; + } + } else { + dispatch(coreActions.handleException("Could not unlove LastFM track", track, "Could not find track in index")); + return; + } + + var artist = encodeURIComponent(track.artists[0].name); + var params = 'method=track.unlove&track=' + track.name + '&artist=' + artist; + sendSignedRequest(dispatch, getState, params).then(function (response) { + track = Object.assign({}, track, { + userloved: false + }); + dispatch({ + type: 'TRACKS_LOADED', + tracks: [track] + }); + }); + }; +} + +/** + * TODO: Currently scrobbling client-side would result in duplicated scrobbles + * if the user was authorized across multiple connections. Ideally this would + * be handled server-side. Mopidy-Scrobbler currently achieves this. + **/ +function scrobble(track) { + return function (dispatch, getState) { + var track_name = track.name; + var artist_name = "Unknown"; + if (track.artists) { + artist_name = track.artists[0].name; + } + var artist_name = encodeURIComponent(artist_name); + + var params = 'method=track.scrobble'; + params += '&track=' + track_name + '&artist=' + artist_name; + params += '×tamp=' + Math.floor(Date.now() / 1000); + + sendSignedRequest(dispatch, getState, params).then(function (response) { + console.log("Scrobbled", response); + }, function (error) { + dispatch(coreActions.handleException('Could not scrobble LastFM track', error, error.description ? error.description : null)); + }); + }; +} +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(15))) + +/***/ }), +/* 17 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -18388,7 +18383,7 @@ var URILink = function (_React$Component) { exports.default = URILink; /***/ }), -/* 19 */ +/* 18 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -18408,11 +18403,11 @@ var _reactRedux = __webpack_require__(4); var _redux = __webpack_require__(2); -var _Track = __webpack_require__(248); +var _Track = __webpack_require__(225); var _Track2 = _interopRequireDefault(_Track); -var _ContextMenuTrigger = __webpack_require__(23); +var _ContextMenuTrigger = __webpack_require__(22); var _ContextMenuTrigger2 = _interopRequireDefault(_ContextMenuTrigger); @@ -18944,10 +18939,10 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { }; exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(TrackList); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(15))) /***/ }), -/* 20 */ +/* 19 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -18972,17 +18967,17 @@ if (process.env.NODE_ENV !== 'production') { // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; - module.exports = __webpack_require__(151)(isValidElement, throwOnDirectAccess); + module.exports = __webpack_require__(144)(isValidElement, throwOnDirectAccess); } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod - module.exports = __webpack_require__(153)(); + module.exports = __webpack_require__(146)(); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 21 */ +/* 20 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -18998,7 +18993,7 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _URILink = __webpack_require__(18); +var _URILink = __webpack_require__(17); var _URILink2 = _interopRequireDefault(_URILink); @@ -19089,7 +19084,7 @@ var ArtistSentence = function (_React$Component) { exports.default = ArtistSentence; /***/ }), -/* 22 */ +/* 21 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -19194,7 +19189,7 @@ var LazyLoadListener = function (_React$Component) { exports.default = LazyLoadListener; /***/ }), -/* 23 */ +/* 22 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -19263,7 +19258,7 @@ var ContextMenuTrigger = function (_React$Component) { exports.default = ContextMenuTrigger; /***/ }), -/* 24 */ +/* 23 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -19379,10 +19374,10 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { }; exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Modal); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(15))) /***/ }), -/* 25 */ +/* 24 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -19439,7 +19434,7 @@ module.exports = invariant; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 26 */ +/* 25 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -19612,7 +19607,7 @@ var Dater = function (_React$Component) { exports.default = Dater; /***/ }), -/* 27 */ +/* 26 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -19824,10 +19819,10 @@ var DropdownField = function (_React$Component) { }(_react2.default.Component); exports.default = DropdownField; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(15))) /***/ }), -/* 28 */ +/* 27 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -19897,7 +19892,7 @@ module.exports = warning; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 29 */ +/* 28 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -19922,17 +19917,17 @@ if (process.env.NODE_ENV !== 'production') { // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; - module.exports = __webpack_require__(228)(isValidElement, throwOnDirectAccess); + module.exports = __webpack_require__(205)(isValidElement, throwOnDirectAccess); } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod - module.exports = __webpack_require__(230)(); + module.exports = __webpack_require__(207)(); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 30 */ +/* 29 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -20060,7 +20055,7 @@ var Parallax = function (_React$Component) { exports.default = Parallax; /***/ }), -/* 31 */ +/* 30 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -20157,38 +20152,38 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) { /***/ }), -/* 32 */ +/* 31 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BrowserRouter__ = __webpack_require__(150); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BrowserRouter__ = __webpack_require__(143); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "BrowserRouter", function() { return __WEBPACK_IMPORTED_MODULE_0__BrowserRouter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__HashRouter__ = __webpack_require__(157); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__HashRouter__ = __webpack_require__(150); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "HashRouter", function() { return __WEBPACK_IMPORTED_MODULE_1__HashRouter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link__ = __webpack_require__(94); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link__ = __webpack_require__(91); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Link", function() { return __WEBPACK_IMPORTED_MODULE_2__Link__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__MemoryRouter__ = __webpack_require__(158); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__MemoryRouter__ = __webpack_require__(151); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MemoryRouter", function() { return __WEBPACK_IMPORTED_MODULE_3__MemoryRouter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__NavLink__ = __webpack_require__(160); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__NavLink__ = __webpack_require__(153); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "NavLink", function() { return __WEBPACK_IMPORTED_MODULE_4__NavLink__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Prompt__ = __webpack_require__(162); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Prompt__ = __webpack_require__(155); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Prompt", function() { return __WEBPACK_IMPORTED_MODULE_5__Prompt__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(164); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(157); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Redirect", function() { return __WEBPACK_IMPORTED_MODULE_6__Redirect__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(95); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(92); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Route", function() { return __WEBPACK_IMPORTED_MODULE_7__Route__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Router__ = __webpack_require__(65); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Router__ = __webpack_require__(64); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Router", function() { return __WEBPACK_IMPORTED_MODULE_8__Router__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__StaticRouter__ = __webpack_require__(166); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__StaticRouter__ = __webpack_require__(159); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "StaticRouter", function() { return __WEBPACK_IMPORTED_MODULE_9__StaticRouter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Switch__ = __webpack_require__(168); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Switch__ = __webpack_require__(161); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Switch", function() { return __WEBPACK_IMPORTED_MODULE_10__Switch__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__generatePath__ = __webpack_require__(170); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__generatePath__ = __webpack_require__(163); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "generatePath", function() { return __WEBPACK_IMPORTED_MODULE_11__generatePath__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__matchPath__ = __webpack_require__(171); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__matchPath__ = __webpack_require__(164); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "matchPath", function() { return __WEBPACK_IMPORTED_MODULE_12__matchPath__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__withRouter__ = __webpack_require__(172); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__withRouter__ = __webpack_require__(165); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "withRouter", function() { return __WEBPACK_IMPORTED_MODULE_13__withRouter__["a"]; }); @@ -20220,7 +20215,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /***/ }), -/* 33 */ +/* 32 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -20247,17 +20242,17 @@ if (process.env.NODE_ENV !== 'production') { // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; - module.exports = __webpack_require__(195)(isValidElement, throwOnDirectAccess); + module.exports = __webpack_require__(188)(isValidElement, throwOnDirectAccess); } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod - module.exports = __webpack_require__(197)(); + module.exports = __webpack_require__(190)(); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 34 */ +/* 33 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -20321,20 +20316,20 @@ var ErrorMessage = function (_React$Component) { exports.default = ErrorMessage; /***/ }), -/* 35 */ +/* 34 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createBrowserHistory__ = __webpack_require__(154); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createBrowserHistory__ = __webpack_require__(147); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__createBrowserHistory__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createHashHistory__ = __webpack_require__(155); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createHashHistory__ = __webpack_require__(148); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__createHashHistory__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(156); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(149); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__LocationUtils__ = __webpack_require__(52); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__LocationUtils__ = __webpack_require__(51); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_3__LocationUtils__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_3__LocationUtils__["b"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PathUtils__ = __webpack_require__(43); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PathUtils__ = __webpack_require__(42); /* unused harmony reexport parsePath */ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_4__PathUtils__["b"]; }); @@ -20348,7 +20343,7 @@ exports.default = ErrorMessage; /***/ }), -/* 36 */ +/* 35 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -20578,10 +20573,10 @@ function findTrackLyrics(track) { }); }; } -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(15))) /***/ }), -/* 37 */ +/* 36 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -20749,30 +20744,30 @@ function streamsLoaded(streams) { } /***/ }), -/* 38 */ +/* 37 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MemoryRouter__ = __webpack_require__(227); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MemoryRouter__ = __webpack_require__(204); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MemoryRouter", function() { return __WEBPACK_IMPORTED_MODULE_0__MemoryRouter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Prompt__ = __webpack_require__(234); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Prompt__ = __webpack_require__(211); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Prompt", function() { return __WEBPACK_IMPORTED_MODULE_1__Prompt__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Redirect__ = __webpack_require__(235); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Redirect__ = __webpack_require__(212); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Redirect", function() { return __WEBPACK_IMPORTED_MODULE_2__Redirect__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Route__ = __webpack_require__(108); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Route__ = __webpack_require__(100); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Route", function() { return __WEBPACK_IMPORTED_MODULE_3__Route__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(77); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(74); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Router", function() { return __WEBPACK_IMPORTED_MODULE_4__Router__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__StaticRouter__ = __webpack_require__(236); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__StaticRouter__ = __webpack_require__(213); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "StaticRouter", function() { return __WEBPACK_IMPORTED_MODULE_5__StaticRouter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Switch__ = __webpack_require__(237); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Switch__ = __webpack_require__(214); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Switch", function() { return __WEBPACK_IMPORTED_MODULE_6__Switch__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__generatePath__ = __webpack_require__(107); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__generatePath__ = __webpack_require__(99); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "generatePath", function() { return __WEBPACK_IMPORTED_MODULE_7__generatePath__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__matchPath__ = __webpack_require__(78); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__matchPath__ = __webpack_require__(75); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "matchPath", function() { return __WEBPACK_IMPORTED_MODULE_8__matchPath__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__withRouter__ = __webpack_require__(238); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__withRouter__ = __webpack_require__(215); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "withRouter", function() { return __WEBPACK_IMPORTED_MODULE_9__withRouter__["a"]; }); @@ -20796,7 +20791,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /***/ }), -/* 39 */ +/* 38 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -20866,7 +20861,7 @@ module.exports = warning; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 40 */ +/* 39 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -20923,7 +20918,7 @@ module.exports = invariant; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 41 */ +/* 40 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -20947,7 +20942,7 @@ var _Thumbnail = __webpack_require__(11); var _Thumbnail2 = _interopRequireDefault(_Thumbnail); -var _GridItem = __webpack_require__(42); +var _GridItem = __webpack_require__(41); var _GridItem2 = _interopRequireDefault(_GridItem); @@ -21049,7 +21044,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(ArtistGrid); /***/ }), -/* 42 */ +/* 41 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -21065,7 +21060,7 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(49); +var _reactDom = __webpack_require__(48); var _reactDom2 = _interopRequireDefault(_reactDom); @@ -21085,7 +21080,7 @@ var _Thumbnail = __webpack_require__(11); var _Thumbnail2 = _interopRequireDefault(_Thumbnail); -var _ArtistSentence = __webpack_require__(21); +var _ArtistSentence = __webpack_require__(20); var _ArtistSentence2 = _interopRequireDefault(_ArtistSentence); @@ -21259,6 +21254,77 @@ var GridItem = function (_React$Component) { exports.default = GridItem; +/***/ }), +/* 42 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addLeadingSlash; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return stripLeadingSlash; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return hasBasename; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return stripBasename; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return stripTrailingSlash; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return parsePath; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return createPath; }); +var addLeadingSlash = function addLeadingSlash(path) { + return path.charAt(0) === '/' ? path : '/' + path; +}; + +var stripLeadingSlash = function stripLeadingSlash(path) { + return path.charAt(0) === '/' ? path.substr(1) : path; +}; + +var hasBasename = function hasBasename(path, prefix) { + return new RegExp('^' + prefix + '(\\/|\\?|#|$)', 'i').test(path); +}; + +var stripBasename = function stripBasename(path, prefix) { + return hasBasename(path, prefix) ? path.substr(prefix.length) : path; +}; + +var stripTrailingSlash = function stripTrailingSlash(path) { + return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path; +}; + +var parsePath = function parsePath(path) { + var pathname = path || '/'; + var search = ''; + var hash = ''; + + var hashIndex = pathname.indexOf('#'); + if (hashIndex !== -1) { + hash = pathname.substr(hashIndex); + pathname = pathname.substr(0, hashIndex); + } + + var searchIndex = pathname.indexOf('?'); + if (searchIndex !== -1) { + search = pathname.substr(searchIndex); + pathname = pathname.substr(0, searchIndex); + } + + return { + pathname: pathname, + search: search === '?' ? '' : search, + hash: hash === '#' ? '' : hash + }; +}; + +var createPath = function createPath(location) { + var pathname = location.pathname, + search = location.search, + hash = location.hash; + + + var path = pathname || '/'; + + if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search; + + if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash; + + return path; +}; + /***/ }), /* 43 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -21332,77 +21398,6 @@ var createPath = function createPath(location) { /***/ }), /* 44 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addLeadingSlash; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return stripLeadingSlash; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return hasBasename; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return stripBasename; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return stripTrailingSlash; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return parsePath; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return createPath; }); -var addLeadingSlash = function addLeadingSlash(path) { - return path.charAt(0) === '/' ? path : '/' + path; -}; - -var stripLeadingSlash = function stripLeadingSlash(path) { - return path.charAt(0) === '/' ? path.substr(1) : path; -}; - -var hasBasename = function hasBasename(path, prefix) { - return new RegExp('^' + prefix + '(\\/|\\?|#|$)', 'i').test(path); -}; - -var stripBasename = function stripBasename(path, prefix) { - return hasBasename(path, prefix) ? path.substr(prefix.length) : path; -}; - -var stripTrailingSlash = function stripTrailingSlash(path) { - return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path; -}; - -var parsePath = function parsePath(path) { - var pathname = path || '/'; - var search = ''; - var hash = ''; - - var hashIndex = pathname.indexOf('#'); - if (hashIndex !== -1) { - hash = pathname.substr(hashIndex); - pathname = pathname.substr(0, hashIndex); - } - - var searchIndex = pathname.indexOf('?'); - if (searchIndex !== -1) { - search = pathname.substr(searchIndex); - pathname = pathname.substr(0, searchIndex); - } - - return { - pathname: pathname, - search: search === '?' ? '' : search, - hash: hash === '#' ? '' : hash - }; -}; - -var createPath = function createPath(location) { - var pathname = location.pathname, - search = location.search, - hash = location.hash; - - - var path = pathname || '/'; - - if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search; - - if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash; - - return path; -}; - -/***/ }), -/* 45 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -21529,7 +21524,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(FollowButton); /***/ }), -/* 46 */ +/* 45 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -21561,7 +21556,7 @@ var _actions2 = __webpack_require__(16); var lastfmActions = _interopRequireWildcard(_actions2); -var _GridItem = __webpack_require__(42); +var _GridItem = __webpack_require__(41); var _GridItem2 = _interopRequireDefault(_GridItem); @@ -21649,7 +21644,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(AlbumGrid); /***/ }), -/* 47 */ +/* 46 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -21677,7 +21672,7 @@ var _actions = __webpack_require__(3); var uiActions = _interopRequireWildcard(_actions); -var _GridItem = __webpack_require__(42); +var _GridItem = __webpack_require__(41); var _GridItem2 = _interopRequireDefault(_GridItem); @@ -21762,7 +21757,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(PlaylistGrid); /***/ }), -/* 48 */ +/* 47 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -21782,9 +21777,9 @@ var _reactRedux = __webpack_require__(4); var _redux = __webpack_require__(2); -var _reactRouter = __webpack_require__(38); +var _reactRouter = __webpack_require__(37); -var _ListItem = __webpack_require__(298); +var _ListItem = __webpack_require__(275); var _ListItem2 = _interopRequireDefault(_ListItem); @@ -21877,7 +21872,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRouter.withRouter)((0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(List)); /***/ }), -/* 49 */ +/* 48 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -21915,15 +21910,15 @@ if (process.env.NODE_ENV === 'production') { // DCE check should happen before ReactDOM bundle executes so that // DevTools can report bad minification during injection. checkDCE(); - module.exports = __webpack_require__(120); + module.exports = __webpack_require__(113); } else { - module.exports = __webpack_require__(123); + module.exports = __webpack_require__(116); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 50 */ +/* 49 */ /***/ (function(module, exports) { var g; @@ -21950,7 +21945,7 @@ module.exports = g; /***/ }), -/* 51 */ +/* 50 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -22018,15 +22013,15 @@ module.exports = warning; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 52 */ +/* 51 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createLocation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return locationsAreEqual; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_resolve_pathname__ = __webpack_require__(91); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_value_equal__ = __webpack_require__(92); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PathUtils__ = __webpack_require__(43); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_resolve_pathname__ = __webpack_require__(88); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_value_equal__ = __webpack_require__(89); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PathUtils__ = __webpack_require__(42); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; @@ -22094,10 +22089,10 @@ var locationsAreEqual = function locationsAreEqual(a, b) { }; /***/ }), -/* 53 */ +/* 52 */ /***/ (function(module, exports, __webpack_require__) { -var isarray = __webpack_require__(161) +var isarray = __webpack_require__(154) /** * Expose `pathToRegexp`. @@ -22526,7 +22521,7 @@ function pathToRegexp (path, keys, options) { /***/ }), -/* 54 */ +/* 53 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -22594,15 +22589,15 @@ module.exports = warning; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 55 */ +/* 54 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createLocation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return locationsAreEqual; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_resolve_pathname__ = __webpack_require__(91); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_value_equal__ = __webpack_require__(92); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PathUtils__ = __webpack_require__(44); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_resolve_pathname__ = __webpack_require__(88); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_value_equal__ = __webpack_require__(89); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PathUtils__ = __webpack_require__(43); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; @@ -22670,7 +22665,7 @@ var locationsAreEqual = function locationsAreEqual(a, b) { }; /***/ }), -/* 56 */ +/* 55 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -22686,7 +22681,7 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _ErrorMessage = __webpack_require__(34); +var _ErrorMessage = __webpack_require__(33); var _ErrorMessage2 = _interopRequireDefault(_ErrorMessage); @@ -22748,7 +22743,7 @@ var ErrorBoundary = function (_React$Component) { exports.default = ErrorBoundary; /***/ }), -/* 57 */ +/* 56 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -22820,7 +22815,7 @@ var NiceNumber = function (_React$Component) { exports.default = NiceNumber; /***/ }), -/* 58 */ +/* 57 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -22830,7 +22825,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _captialize = __webpack_require__(278); +var _captialize = __webpack_require__(255); Object.defineProperty(exports, 'captialize', { enumerable: true, @@ -22839,7 +22834,7 @@ Object.defineProperty(exports, 'captialize', { } }); -var _clamp = __webpack_require__(279); +var _clamp = __webpack_require__(256); Object.defineProperty(exports, 'clamp', { enumerable: true, @@ -22848,7 +22843,7 @@ Object.defineProperty(exports, 'clamp', { } }); -var _distanceTo = __webpack_require__(280); +var _distanceTo = __webpack_require__(257); Object.defineProperty(exports, 'distanceTo', { enumerable: true, @@ -22857,7 +22852,7 @@ Object.defineProperty(exports, 'distanceTo', { } }); -var _isDefined = __webpack_require__(281); +var _isDefined = __webpack_require__(258); Object.defineProperty(exports, 'isDefined', { enumerable: true, @@ -22866,7 +22861,7 @@ Object.defineProperty(exports, 'isDefined', { } }); -var _isNumber = __webpack_require__(282); +var _isNumber = __webpack_require__(259); Object.defineProperty(exports, 'isNumber', { enumerable: true, @@ -22875,7 +22870,7 @@ Object.defineProperty(exports, 'isNumber', { } }); -var _isObject = __webpack_require__(283); +var _isObject = __webpack_require__(260); Object.defineProperty(exports, 'isObject', { enumerable: true, @@ -22884,7 +22879,7 @@ Object.defineProperty(exports, 'isObject', { } }); -var _length = __webpack_require__(284); +var _length = __webpack_require__(261); Object.defineProperty(exports, 'length', { enumerable: true, @@ -22897,7 +22892,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de //# sourceMappingURL=index.js.map /***/ }), -/* 59 */ +/* 58 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -22916,7 +22911,7 @@ module.exports = ReactPropTypesSecret; /***/ }), -/* 60 */ +/* 59 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -22928,7 +22923,7 @@ var ReactReduxContext = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createCont /* unused harmony default export */ var _unused_webpack_default_export = (ReactReduxContext); /***/ }), -/* 61 */ +/* 60 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -22952,7 +22947,7 @@ function _extends() { } /***/ }), -/* 62 */ +/* 61 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -22973,7 +22968,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { } /***/ }), -/* 63 */ +/* 62 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -22992,11 +22987,11 @@ module.exports = ReactPropTypesSecret; /***/ }), -/* 64 */ +/* 63 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(51); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(50); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__); @@ -23077,28 +23072,28 @@ var createTransitionManager = function createTransitionManager() { /* harmony default export */ __webpack_exports__["a"] = (createTransitionManager); /***/ }), -/* 65 */ +/* 64 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Router__ = __webpack_require__(66); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Router__ = __webpack_require__(65); // Written in this round about way for babel-transform-imports /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Router__["a" /* default */]); /***/ }), -/* 66 */ +/* 65 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(28); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(27); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(25); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(24); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(20); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(19); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; @@ -23207,11 +23202,11 @@ Router.childContextTypes = { /* harmony default export */ __webpack_exports__["a"] = (Router); /***/ }), -/* 67 */ +/* 66 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(53); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(52); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path_to_regexp__); @@ -23287,7 +23282,7 @@ var matchPath = function matchPath(pathname) { /* harmony default export */ __webpack_exports__["a"] = (matchPath); /***/ }), -/* 68 */ +/* 67 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -23297,7 +23292,7 @@ function warn(s) { } /***/ }), -/* 69 */ +/* 68 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -23341,7 +23336,7 @@ emptyFunction.thatReturnsArgument = function (arg) { module.exports = emptyFunction; /***/ }), -/* 70 */ +/* 69 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -23403,7 +23398,7 @@ module.exports = invariant; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 71 */ +/* 70 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -23424,134 +23419,7 @@ module.exports = ReactPropTypesSecret; /***/ }), -/* 72 */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(process) {var __WEBPACK_AMD_DEFINE_RESULT__;var require;/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -/*global process,document,setTimeout,clearTimeout,MutationObserver,WebKitMutationObserver*/ -(function(define) { 'use strict'; -!(__WEBPACK_AMD_DEFINE_RESULT__ = (function(require) { - /*jshint maxcomplexity:6*/ - - // Sniff "best" async scheduling option - // Prefer process.nextTick or MutationObserver, then check for - // setTimeout, and finally vertx, since its the only env that doesn't - // have setTimeout - - var MutationObs; - var capturedSetTimeout = typeof setTimeout !== 'undefined' && setTimeout; - - // Default env - var setTimer = function(f, ms) { return setTimeout(f, ms); }; - var clearTimer = function(t) { return clearTimeout(t); }; - var asap = function (f) { return capturedSetTimeout(f, 0); }; - - // Detect specific env - if (isNode()) { // Node - asap = function (f) { return process.nextTick(f); }; - - } else if (MutationObs = hasMutationObserver()) { // Modern browser - asap = initMutationObserver(MutationObs); - - } else if (!capturedSetTimeout) { // vert.x - var vertxRequire = require; - var vertx = __webpack_require__(206); - setTimer = function (f, ms) { return vertx.setTimer(ms, f); }; - clearTimer = vertx.cancelTimer; - asap = vertx.runOnLoop || vertx.runOnContext; - } - - return { - setTimer: setTimer, - clearTimer: clearTimer, - asap: asap - }; - - function isNode () { - return typeof process !== 'undefined' && - Object.prototype.toString.call(process) === '[object process]'; - } - - function hasMutationObserver () { - return (typeof MutationObserver !== 'undefined' && MutationObserver) || - (typeof WebKitMutationObserver !== 'undefined' && WebKitMutationObserver); - } - - function initMutationObserver(MutationObserver) { - var scheduled; - var node = document.createTextNode(''); - var o = new MutationObserver(run); - o.observe(node, { characterData: true }); - - function run() { - var f = scheduled; - scheduled = void 0; - f(); - } - - var i = 0; - return function (f) { - scheduled = f; - node.data = (i ^= 1); - }; - } -}).call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); -}(__webpack_require__(15))); - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) - -/***/ }), -/* 73 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.set = set; -exports.getLibraryArtists = getLibraryArtists; -exports.clearLibraryArtists = clearLibraryArtists; -exports.getLibraryAlbums = getLibraryAlbums; -exports.clearLibraryAlbums = clearLibraryAlbums; -function set(data) { - return { - type: 'GOOGLE_SET', - data: data - }; -} - -function getLibraryArtists() { - return { - type: 'GOOGLE_GET_LIBRARY_ARTISTS' - }; -} - -function clearLibraryArtists() { - return { - type: 'GOOGLE_CLEAR_LIBRARY_ARTISTS' - }; -} - -function getLibraryAlbums() { - return { - 'type': 'GOOGLE_GET_LIBRARY_ALBUMS' - }; -} - -function clearLibraryAlbums() { - return { - type: 'GOOGLE_CLEAR_LIBRARY_ALBUMS' - }; -} - -/***/ }), -/* 74 */ +/* 71 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -23570,20 +23438,20 @@ module.exports = ReactPropTypesSecret; /***/ }), -/* 75 */ +/* 72 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createBrowserHistory__ = __webpack_require__(231); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createBrowserHistory__ = __webpack_require__(208); /* unused harmony reexport createBrowserHistory */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createHashHistory__ = __webpack_require__(232); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createHashHistory__ = __webpack_require__(209); /* unused harmony reexport createHashHistory */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(233); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(210); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__LocationUtils__ = __webpack_require__(55); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__LocationUtils__ = __webpack_require__(54); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_3__LocationUtils__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_3__LocationUtils__["b"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PathUtils__ = __webpack_require__(44); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PathUtils__ = __webpack_require__(43); /* unused harmony reexport parsePath */ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_4__PathUtils__["b"]; }); @@ -23597,11 +23465,11 @@ module.exports = ReactPropTypesSecret; /***/ }), -/* 76 */ +/* 73 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(54); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(53); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__); @@ -23682,17 +23550,17 @@ var createTransitionManager = function createTransitionManager() { /* harmony default export */ __webpack_exports__["a"] = (createTransitionManager); /***/ }), -/* 77 */ +/* 74 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(39); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(38); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(40); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(39); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(29); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(28); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; @@ -23801,11 +23669,11 @@ Router.childContextTypes = { /* harmony default export */ __webpack_exports__["a"] = (Router); /***/ }), -/* 78 */ +/* 75 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(53); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(52); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path_to_regexp__); @@ -23881,7 +23749,7 @@ var matchPath = function matchPath(pathname) { /* harmony default export */ __webpack_exports__["a"] = (matchPath); /***/ }), -/* 79 */ +/* 76 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -23969,7 +23837,7 @@ var VolumeControl = function (_React$Component) { exports.default = VolumeControl; /***/ }), -/* 80 */ +/* 77 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -24053,7 +23921,7 @@ var MuteControl = function (_React$Component) { exports.default = MuteControl; /***/ }), -/* 81 */ +/* 78 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -24131,7 +23999,7 @@ var Popularity = function (_React$Component) { exports.default = Popularity; /***/ }), -/* 82 */ +/* 79 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -24241,7 +24109,7 @@ module.exports = exports['default']; /***/ }), -/* 83 */ +/* 80 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -24375,22 +24243,22 @@ var FilterField = function (_React$Component) { exports.default = FilterField; /***/ }), -/* 84 */ +/* 81 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { if (process.env.NODE_ENV === 'production') { - module.exports = __webpack_require__(121); + module.exports = __webpack_require__(114); } else { - module.exports = __webpack_require__(122); + module.exports = __webpack_require__(115); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 85 */ +/* 82 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -24402,24 +24270,24 @@ function _inheritsLoose(subClass, superClass) { } /***/ }), -/* 86 */ +/* 83 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (immutable) */ __webpack_exports__["a"] = connectAdvanced; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__ = __webpack_require__(85); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_assertThisInitialized__ = __webpack_require__(134); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_extends__ = __webpack_require__(61); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(62); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics__ = __webpack_require__(135); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__ = __webpack_require__(82); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_assertThisInitialized__ = __webpack_require__(127); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_extends__ = __webpack_require__(60); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(61); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics__ = __webpack_require__(128); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_invariant__ = __webpack_require__(138); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_invariant__ = __webpack_require__(131); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_invariant__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_is__ = __webpack_require__(87); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_is__ = __webpack_require__(84); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_is___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_is__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Context__ = __webpack_require__(60); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Context__ = __webpack_require__(59); @@ -24610,29 +24478,29 @@ _ref) { /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(6))) /***/ }), -/* 87 */ +/* 84 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { if (process.env.NODE_ENV === 'production') { - module.exports = __webpack_require__(136); + module.exports = __webpack_require__(129); } else { - module.exports = __webpack_require__(137); + module.exports = __webpack_require__(130); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 88 */ +/* 85 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (immutable) */ __webpack_exports__["a"] = wrapMapToPropsConstant; /* unused harmony export getDependsOnOwnProps */ /* harmony export (immutable) */ __webpack_exports__["b"] = wrapMapToPropsFunc; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__ = __webpack_require__(89); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__ = __webpack_require__(86); function wrapMapToPropsConstant(getConstant) { return function initConstantSelector(dispatch, options) { @@ -24700,13 +24568,13 @@ function wrapMapToPropsFunc(mapToProps, methodName) { /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(6))) /***/ }), -/* 89 */ +/* 86 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = verifyPlainObject; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPlainObject__ = __webpack_require__(145); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__warning__ = __webpack_require__(90); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPlainObject__ = __webpack_require__(138); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__warning__ = __webpack_require__(87); function verifyPlainObject(value, displayName, methodName) { @@ -24716,7 +24584,7 @@ function verifyPlainObject(value, displayName, methodName) { } /***/ }), -/* 90 */ +/* 87 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -24747,7 +24615,7 @@ function warning(message) { } /***/ }), -/* 91 */ +/* 88 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -24823,7 +24691,7 @@ function resolvePathname(to) { /* harmony default export */ __webpack_exports__["a"] = (resolvePathname); /***/ }), -/* 92 */ +/* 89 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -24867,7 +24735,7 @@ function valueEqual(a, b) { /* harmony default export */ __webpack_exports__["a"] = (valueEqual); /***/ }), -/* 93 */ +/* 90 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -24933,17 +24801,17 @@ var isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) { }; /***/ }), -/* 94 */ +/* 91 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(20); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(19); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(25); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(24); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(35); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(34); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } @@ -25050,30 +24918,30 @@ Link.contextTypes = { /* harmony default export */ __webpack_exports__["a"] = (Link); /***/ }), -/* 95 */ +/* 92 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Route__ = __webpack_require__(96); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Route__ = __webpack_require__(93); // Written in this round about way for babel-transform-imports /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Route__["a" /* default */]); /***/ }), -/* 96 */ +/* 93 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(28); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(27); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(25); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(24); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(20); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(19); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(67); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(66); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -25215,11 +25083,11 @@ Route.childContextTypes = { /* harmony default export */ __webpack_exports__["a"] = (Route); /***/ }), -/* 97 */ +/* 94 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(53); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(52); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path_to_regexp__); @@ -25260,7 +25128,7 @@ var generatePath = function generatePath() { /* harmony default export */ __webpack_exports__["a"] = (generatePath); /***/ }), -/* 98 */ +/* 95 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -25272,7 +25140,7 @@ function trim(s) { } /***/ }), -/* 99 */ +/* 96 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -25288,7 +25156,7 @@ function trim(s) { -var emptyFunction = __webpack_require__(69); +var emptyFunction = __webpack_require__(68); /** * Similar to invariant but only logs a warning if the condition is not met. @@ -25343,679 +25211,7 @@ module.exports = warning; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 100 */ -/***/ (function(module, exports) { - -/* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */ -module.exports = __webpack_amd_options__; - -/* WEBPACK VAR INJECTION */}.call(exports, {})) - -/***/ }), -/* 101 */ -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { - - /** - * Custom error type for promises rejected by promise.timeout - * @param {string} message - * @constructor - */ - function TimeoutError (message) { - Error.call(this); - this.message = message; - this.name = TimeoutError.name; - if (typeof Error.captureStackTrace === 'function') { - Error.captureStackTrace(this, TimeoutError); - } - } - - TimeoutError.prototype = Object.create(Error.prototype); - TimeoutError.prototype.constructor = TimeoutError; - - return TimeoutError; -}).call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); -}(__webpack_require__(15))); - -/***/ }), -/* 102 */ -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { - - return { - pending: toPendingState, - fulfilled: toFulfilledState, - rejected: toRejectedState, - inspect: inspect - }; - - function toPendingState() { - return { state: 'pending' }; - } - - function toRejectedState(e) { - return { state: 'rejected', reason: e }; - } - - function toFulfilledState(x) { - return { state: 'fulfilled', value: x }; - } - - function inspect(handler) { - var state = handler.state(); - return state === 0 ? toPendingState() - : state > 0 ? toFulfilledState(handler.value) - : toRejectedState(handler.value); - } - -}).call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); -}(__webpack_require__(15))); - - -/***/ }), -/* 103 */ -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { - - makeApply.tryCatchResolve = tryCatchResolve; - - return makeApply; - - function makeApply(Promise, call) { - if(arguments.length < 2) { - call = tryCatchResolve; - } - - return apply; - - function apply(f, thisArg, args) { - var p = Promise._defer(); - var l = args.length; - var params = new Array(l); - callAndResolve({ f:f, thisArg:thisArg, args:args, params:params, i:l-1, call:call }, p._handler); - - return p; - } - - function callAndResolve(c, h) { - if(c.i < 0) { - return call(c.f, c.thisArg, c.params, h); - } - - var handler = Promise._handler(c.args[c.i]); - handler.fold(callAndResolveNext, c, void 0, h); - } - - function callAndResolveNext(c, x, h) { - c.params[c.i] = x; - c.i -= 1; - callAndResolve(c, h); - } - } - - function tryCatchResolve(f, thisArg, args, resolver) { - try { - resolver.resolve(f.apply(thisArg, args)); - } catch(e) { - resolver.reject(e); - } - } - -}).call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); -}(__webpack_require__(15))); - - - - -/***/ }), -/* 104 */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(process, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/** - * [js-sha256]{@link https://github.com/emn178/js-sha256} - * - * @version 0.9.0 - * @author Chen, Yi-Cyuan [emn178@gmail.com] - * @copyright Chen, Yi-Cyuan 2014-2017 - * @license MIT - */ -/*jslint bitwise: true */ -(function () { - 'use strict'; - - var ERROR = 'input is invalid type'; - var WINDOW = typeof window === 'object'; - var root = WINDOW ? window : {}; - if (root.JS_SHA256_NO_WINDOW) { - WINDOW = false; - } - var WEB_WORKER = !WINDOW && typeof self === 'object'; - var NODE_JS = !root.JS_SHA256_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node; - if (NODE_JS) { - root = global; - } else if (WEB_WORKER) { - root = self; - } - var COMMON_JS = !root.JS_SHA256_NO_COMMON_JS && typeof module === 'object' && module.exports; - var AMD = "function" === 'function' && __webpack_require__(100); - var ARRAY_BUFFER = !root.JS_SHA256_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined'; - var HEX_CHARS = '0123456789abcdef'.split(''); - var EXTRA = [-2147483648, 8388608, 32768, 128]; - var SHIFT = [24, 16, 8, 0]; - var K = [ - 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, - 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, - 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, - 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, - 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, - 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, - 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, - 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 - ]; - var OUTPUT_TYPES = ['hex', 'array', 'digest', 'arrayBuffer']; - - var blocks = []; - - if (root.JS_SHA256_NO_NODE_JS || !Array.isArray) { - Array.isArray = function (obj) { - return Object.prototype.toString.call(obj) === '[object Array]'; - }; - } - - if (ARRAY_BUFFER && (root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) { - ArrayBuffer.isView = function (obj) { - return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer; - }; - } - - var createOutputMethod = function (outputType, is224) { - return function (message) { - return new Sha256(is224, true).update(message)[outputType](); - }; - }; - - var createMethod = function (is224) { - var method = createOutputMethod('hex', is224); - if (NODE_JS) { - method = nodeWrap(method, is224); - } - method.create = function () { - return new Sha256(is224); - }; - method.update = function (message) { - return method.create().update(message); - }; - for (var i = 0; i < OUTPUT_TYPES.length; ++i) { - var type = OUTPUT_TYPES[i]; - method[type] = createOutputMethod(type, is224); - } - return method; - }; - - var nodeWrap = function (method, is224) { - var crypto = eval("require('crypto')"); - var Buffer = eval("require('buffer').Buffer"); - var algorithm = is224 ? 'sha224' : 'sha256'; - var nodeMethod = function (message) { - if (typeof message === 'string') { - return crypto.createHash(algorithm).update(message, 'utf8').digest('hex'); - } else { - if (message === null || message === undefined) { - throw new Error(ERROR); - } else if (message.constructor === ArrayBuffer) { - message = new Uint8Array(message); - } - } - if (Array.isArray(message) || ArrayBuffer.isView(message) || - message.constructor === Buffer) { - return crypto.createHash(algorithm).update(new Buffer(message)).digest('hex'); - } else { - return method(message); - } - }; - return nodeMethod; - }; - - var createHmacOutputMethod = function (outputType, is224) { - return function (key, message) { - return new HmacSha256(key, is224, true).update(message)[outputType](); - }; - }; - - var createHmacMethod = function (is224) { - var method = createHmacOutputMethod('hex', is224); - method.create = function (key) { - return new HmacSha256(key, is224); - }; - method.update = function (key, message) { - return method.create(key).update(message); - }; - for (var i = 0; i < OUTPUT_TYPES.length; ++i) { - var type = OUTPUT_TYPES[i]; - method[type] = createHmacOutputMethod(type, is224); - } - return method; - }; - - function Sha256(is224, sharedMemory) { - if (sharedMemory) { - blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] = - blocks[4] = blocks[5] = blocks[6] = blocks[7] = - blocks[8] = blocks[9] = blocks[10] = blocks[11] = - blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0; - this.blocks = blocks; - } else { - this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - } - - if (is224) { - this.h0 = 0xc1059ed8; - this.h1 = 0x367cd507; - this.h2 = 0x3070dd17; - this.h3 = 0xf70e5939; - this.h4 = 0xffc00b31; - this.h5 = 0x68581511; - this.h6 = 0x64f98fa7; - this.h7 = 0xbefa4fa4; - } else { // 256 - this.h0 = 0x6a09e667; - this.h1 = 0xbb67ae85; - this.h2 = 0x3c6ef372; - this.h3 = 0xa54ff53a; - this.h4 = 0x510e527f; - this.h5 = 0x9b05688c; - this.h6 = 0x1f83d9ab; - this.h7 = 0x5be0cd19; - } - - this.block = this.start = this.bytes = this.hBytes = 0; - this.finalized = this.hashed = false; - this.first = true; - this.is224 = is224; - } - - Sha256.prototype.update = function (message) { - if (this.finalized) { - return; - } - var notString, type = typeof message; - if (type !== 'string') { - if (type === 'object') { - if (message === null) { - throw new Error(ERROR); - } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) { - message = new Uint8Array(message); - } else if (!Array.isArray(message)) { - if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) { - throw new Error(ERROR); - } - } - } else { - throw new Error(ERROR); - } - notString = true; - } - var code, index = 0, i, length = message.length, blocks = this.blocks; - - while (index < length) { - if (this.hashed) { - this.hashed = false; - blocks[0] = this.block; - blocks[16] = blocks[1] = blocks[2] = blocks[3] = - blocks[4] = blocks[5] = blocks[6] = blocks[7] = - blocks[8] = blocks[9] = blocks[10] = blocks[11] = - blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0; - } - - if (notString) { - for (i = this.start; index < length && i < 64; ++index) { - blocks[i >> 2] |= message[index] << SHIFT[i++ & 3]; - } - } else { - for (i = this.start; index < length && i < 64; ++index) { - code = message.charCodeAt(index); - if (code < 0x80) { - blocks[i >> 2] |= code << SHIFT[i++ & 3]; - } else if (code < 0x800) { - blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3]; - blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; - } else if (code < 0xd800 || code >= 0xe000) { - blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3]; - blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; - blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; - } else { - code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff)); - blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3]; - blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3]; - blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; - blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; - } - } - } - - this.lastByteIndex = i; - this.bytes += i - this.start; - if (i >= 64) { - this.block = blocks[16]; - this.start = i - 64; - this.hash(); - this.hashed = true; - } else { - this.start = i; - } - } - if (this.bytes > 4294967295) { - this.hBytes += this.bytes / 4294967296 << 0; - this.bytes = this.bytes % 4294967296; - } - return this; - }; - - Sha256.prototype.finalize = function () { - if (this.finalized) { - return; - } - this.finalized = true; - var blocks = this.blocks, i = this.lastByteIndex; - blocks[16] = this.block; - blocks[i >> 2] |= EXTRA[i & 3]; - this.block = blocks[16]; - if (i >= 56) { - if (!this.hashed) { - this.hash(); - } - blocks[0] = this.block; - blocks[16] = blocks[1] = blocks[2] = blocks[3] = - blocks[4] = blocks[5] = blocks[6] = blocks[7] = - blocks[8] = blocks[9] = blocks[10] = blocks[11] = - blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0; - } - blocks[14] = this.hBytes << 3 | this.bytes >>> 29; - blocks[15] = this.bytes << 3; - this.hash(); - }; - - Sha256.prototype.hash = function () { - var a = this.h0, b = this.h1, c = this.h2, d = this.h3, e = this.h4, f = this.h5, g = this.h6, - h = this.h7, blocks = this.blocks, j, s0, s1, maj, t1, t2, ch, ab, da, cd, bc; - - for (j = 16; j < 64; ++j) { - // rightrotate - t1 = blocks[j - 15]; - s0 = ((t1 >>> 7) | (t1 << 25)) ^ ((t1 >>> 18) | (t1 << 14)) ^ (t1 >>> 3); - t1 = blocks[j - 2]; - s1 = ((t1 >>> 17) | (t1 << 15)) ^ ((t1 >>> 19) | (t1 << 13)) ^ (t1 >>> 10); - blocks[j] = blocks[j - 16] + s0 + blocks[j - 7] + s1 << 0; - } - - bc = b & c; - for (j = 0; j < 64; j += 4) { - if (this.first) { - if (this.is224) { - ab = 300032; - t1 = blocks[0] - 1413257819; - h = t1 - 150054599 << 0; - d = t1 + 24177077 << 0; - } else { - ab = 704751109; - t1 = blocks[0] - 210244248; - h = t1 - 1521486534 << 0; - d = t1 + 143694565 << 0; - } - this.first = false; - } else { - s0 = ((a >>> 2) | (a << 30)) ^ ((a >>> 13) | (a << 19)) ^ ((a >>> 22) | (a << 10)); - s1 = ((e >>> 6) | (e << 26)) ^ ((e >>> 11) | (e << 21)) ^ ((e >>> 25) | (e << 7)); - ab = a & b; - maj = ab ^ (a & c) ^ bc; - ch = (e & f) ^ (~e & g); - t1 = h + s1 + ch + K[j] + blocks[j]; - t2 = s0 + maj; - h = d + t1 << 0; - d = t1 + t2 << 0; - } - s0 = ((d >>> 2) | (d << 30)) ^ ((d >>> 13) | (d << 19)) ^ ((d >>> 22) | (d << 10)); - s1 = ((h >>> 6) | (h << 26)) ^ ((h >>> 11) | (h << 21)) ^ ((h >>> 25) | (h << 7)); - da = d & a; - maj = da ^ (d & b) ^ ab; - ch = (h & e) ^ (~h & f); - t1 = g + s1 + ch + K[j + 1] + blocks[j + 1]; - t2 = s0 + maj; - g = c + t1 << 0; - c = t1 + t2 << 0; - s0 = ((c >>> 2) | (c << 30)) ^ ((c >>> 13) | (c << 19)) ^ ((c >>> 22) | (c << 10)); - s1 = ((g >>> 6) | (g << 26)) ^ ((g >>> 11) | (g << 21)) ^ ((g >>> 25) | (g << 7)); - cd = c & d; - maj = cd ^ (c & a) ^ da; - ch = (g & h) ^ (~g & e); - t1 = f + s1 + ch + K[j + 2] + blocks[j + 2]; - t2 = s0 + maj; - f = b + t1 << 0; - b = t1 + t2 << 0; - s0 = ((b >>> 2) | (b << 30)) ^ ((b >>> 13) | (b << 19)) ^ ((b >>> 22) | (b << 10)); - s1 = ((f >>> 6) | (f << 26)) ^ ((f >>> 11) | (f << 21)) ^ ((f >>> 25) | (f << 7)); - bc = b & c; - maj = bc ^ (b & d) ^ cd; - ch = (f & g) ^ (~f & h); - t1 = e + s1 + ch + K[j + 3] + blocks[j + 3]; - t2 = s0 + maj; - e = a + t1 << 0; - a = t1 + t2 << 0; - } - - this.h0 = this.h0 + a << 0; - this.h1 = this.h1 + b << 0; - this.h2 = this.h2 + c << 0; - this.h3 = this.h3 + d << 0; - this.h4 = this.h4 + e << 0; - this.h5 = this.h5 + f << 0; - this.h6 = this.h6 + g << 0; - this.h7 = this.h7 + h << 0; - }; - - Sha256.prototype.hex = function () { - this.finalize(); - - var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5, - h6 = this.h6, h7 = this.h7; - - var hex = HEX_CHARS[(h0 >> 28) & 0x0F] + HEX_CHARS[(h0 >> 24) & 0x0F] + - HEX_CHARS[(h0 >> 20) & 0x0F] + HEX_CHARS[(h0 >> 16) & 0x0F] + - HEX_CHARS[(h0 >> 12) & 0x0F] + HEX_CHARS[(h0 >> 8) & 0x0F] + - HEX_CHARS[(h0 >> 4) & 0x0F] + HEX_CHARS[h0 & 0x0F] + - HEX_CHARS[(h1 >> 28) & 0x0F] + HEX_CHARS[(h1 >> 24) & 0x0F] + - HEX_CHARS[(h1 >> 20) & 0x0F] + HEX_CHARS[(h1 >> 16) & 0x0F] + - HEX_CHARS[(h1 >> 12) & 0x0F] + HEX_CHARS[(h1 >> 8) & 0x0F] + - HEX_CHARS[(h1 >> 4) & 0x0F] + HEX_CHARS[h1 & 0x0F] + - HEX_CHARS[(h2 >> 28) & 0x0F] + HEX_CHARS[(h2 >> 24) & 0x0F] + - HEX_CHARS[(h2 >> 20) & 0x0F] + HEX_CHARS[(h2 >> 16) & 0x0F] + - HEX_CHARS[(h2 >> 12) & 0x0F] + HEX_CHARS[(h2 >> 8) & 0x0F] + - HEX_CHARS[(h2 >> 4) & 0x0F] + HEX_CHARS[h2 & 0x0F] + - HEX_CHARS[(h3 >> 28) & 0x0F] + HEX_CHARS[(h3 >> 24) & 0x0F] + - HEX_CHARS[(h3 >> 20) & 0x0F] + HEX_CHARS[(h3 >> 16) & 0x0F] + - HEX_CHARS[(h3 >> 12) & 0x0F] + HEX_CHARS[(h3 >> 8) & 0x0F] + - HEX_CHARS[(h3 >> 4) & 0x0F] + HEX_CHARS[h3 & 0x0F] + - HEX_CHARS[(h4 >> 28) & 0x0F] + HEX_CHARS[(h4 >> 24) & 0x0F] + - HEX_CHARS[(h4 >> 20) & 0x0F] + HEX_CHARS[(h4 >> 16) & 0x0F] + - HEX_CHARS[(h4 >> 12) & 0x0F] + HEX_CHARS[(h4 >> 8) & 0x0F] + - HEX_CHARS[(h4 >> 4) & 0x0F] + HEX_CHARS[h4 & 0x0F] + - HEX_CHARS[(h5 >> 28) & 0x0F] + HEX_CHARS[(h5 >> 24) & 0x0F] + - HEX_CHARS[(h5 >> 20) & 0x0F] + HEX_CHARS[(h5 >> 16) & 0x0F] + - HEX_CHARS[(h5 >> 12) & 0x0F] + HEX_CHARS[(h5 >> 8) & 0x0F] + - HEX_CHARS[(h5 >> 4) & 0x0F] + HEX_CHARS[h5 & 0x0F] + - HEX_CHARS[(h6 >> 28) & 0x0F] + HEX_CHARS[(h6 >> 24) & 0x0F] + - HEX_CHARS[(h6 >> 20) & 0x0F] + HEX_CHARS[(h6 >> 16) & 0x0F] + - HEX_CHARS[(h6 >> 12) & 0x0F] + HEX_CHARS[(h6 >> 8) & 0x0F] + - HEX_CHARS[(h6 >> 4) & 0x0F] + HEX_CHARS[h6 & 0x0F]; - if (!this.is224) { - hex += HEX_CHARS[(h7 >> 28) & 0x0F] + HEX_CHARS[(h7 >> 24) & 0x0F] + - HEX_CHARS[(h7 >> 20) & 0x0F] + HEX_CHARS[(h7 >> 16) & 0x0F] + - HEX_CHARS[(h7 >> 12) & 0x0F] + HEX_CHARS[(h7 >> 8) & 0x0F] + - HEX_CHARS[(h7 >> 4) & 0x0F] + HEX_CHARS[h7 & 0x0F]; - } - return hex; - }; - - Sha256.prototype.toString = Sha256.prototype.hex; - - Sha256.prototype.digest = function () { - this.finalize(); - - var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5, - h6 = this.h6, h7 = this.h7; - - var arr = [ - (h0 >> 24) & 0xFF, (h0 >> 16) & 0xFF, (h0 >> 8) & 0xFF, h0 & 0xFF, - (h1 >> 24) & 0xFF, (h1 >> 16) & 0xFF, (h1 >> 8) & 0xFF, h1 & 0xFF, - (h2 >> 24) & 0xFF, (h2 >> 16) & 0xFF, (h2 >> 8) & 0xFF, h2 & 0xFF, - (h3 >> 24) & 0xFF, (h3 >> 16) & 0xFF, (h3 >> 8) & 0xFF, h3 & 0xFF, - (h4 >> 24) & 0xFF, (h4 >> 16) & 0xFF, (h4 >> 8) & 0xFF, h4 & 0xFF, - (h5 >> 24) & 0xFF, (h5 >> 16) & 0xFF, (h5 >> 8) & 0xFF, h5 & 0xFF, - (h6 >> 24) & 0xFF, (h6 >> 16) & 0xFF, (h6 >> 8) & 0xFF, h6 & 0xFF - ]; - if (!this.is224) { - arr.push((h7 >> 24) & 0xFF, (h7 >> 16) & 0xFF, (h7 >> 8) & 0xFF, h7 & 0xFF); - } - return arr; - }; - - Sha256.prototype.array = Sha256.prototype.digest; - - Sha256.prototype.arrayBuffer = function () { - this.finalize(); - - var buffer = new ArrayBuffer(this.is224 ? 28 : 32); - var dataView = new DataView(buffer); - dataView.setUint32(0, this.h0); - dataView.setUint32(4, this.h1); - dataView.setUint32(8, this.h2); - dataView.setUint32(12, this.h3); - dataView.setUint32(16, this.h4); - dataView.setUint32(20, this.h5); - dataView.setUint32(24, this.h6); - if (!this.is224) { - dataView.setUint32(28, this.h7); - } - return buffer; - }; - - function HmacSha256(key, is224, sharedMemory) { - var i, type = typeof key; - if (type === 'string') { - var bytes = [], length = key.length, index = 0, code; - for (i = 0; i < length; ++i) { - code = key.charCodeAt(i); - if (code < 0x80) { - bytes[index++] = code; - } else if (code < 0x800) { - bytes[index++] = (0xc0 | (code >> 6)); - bytes[index++] = (0x80 | (code & 0x3f)); - } else if (code < 0xd800 || code >= 0xe000) { - bytes[index++] = (0xe0 | (code >> 12)); - bytes[index++] = (0x80 | ((code >> 6) & 0x3f)); - bytes[index++] = (0x80 | (code & 0x3f)); - } else { - code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff)); - bytes[index++] = (0xf0 | (code >> 18)); - bytes[index++] = (0x80 | ((code >> 12) & 0x3f)); - bytes[index++] = (0x80 | ((code >> 6) & 0x3f)); - bytes[index++] = (0x80 | (code & 0x3f)); - } - } - key = bytes; - } else { - if (type === 'object') { - if (key === null) { - throw new Error(ERROR); - } else if (ARRAY_BUFFER && key.constructor === ArrayBuffer) { - key = new Uint8Array(key); - } else if (!Array.isArray(key)) { - if (!ARRAY_BUFFER || !ArrayBuffer.isView(key)) { - throw new Error(ERROR); - } - } - } else { - throw new Error(ERROR); - } - } - - if (key.length > 64) { - key = (new Sha256(is224, true)).update(key).array(); - } - - var oKeyPad = [], iKeyPad = []; - for (i = 0; i < 64; ++i) { - var b = key[i] || 0; - oKeyPad[i] = 0x5c ^ b; - iKeyPad[i] = 0x36 ^ b; - } - - Sha256.call(this, is224, sharedMemory); - - this.update(iKeyPad); - this.oKeyPad = oKeyPad; - this.inner = true; - this.sharedMemory = sharedMemory; - } - HmacSha256.prototype = new Sha256(); - - HmacSha256.prototype.finalize = function () { - Sha256.prototype.finalize.call(this); - if (this.inner) { - this.inner = false; - var innerHash = this.array(); - Sha256.call(this, this.is224, this.sharedMemory); - this.update(this.oKeyPad); - this.update(innerHash); - Sha256.prototype.finalize.call(this); - } - }; - - var exports = createMethod(); - exports.sha256 = exports; - exports.sha224 = createMethod(true); - exports.sha256.hmac = createHmacMethod(); - exports.sha224.hmac = createHmacMethod(true); - - if (COMMON_JS) { - module.exports = exports; - } else { - root.sha256 = exports.sha256; - root.sha224 = exports.sha224; - if (AMD) { - !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { - return exports; - }).call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } - } -})(); - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6), __webpack_require__(50))) - -/***/ }), -/* 105 */ +/* 97 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -26074,7 +25270,7 @@ module.exports = invariant; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 106 */ +/* 98 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -26140,11 +25336,11 @@ var isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) { }; /***/ }), -/* 107 */ +/* 99 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(53); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(52); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path_to_regexp__); @@ -26185,19 +25381,19 @@ var generatePath = function generatePath() { /* harmony default export */ __webpack_exports__["a"] = (generatePath); /***/ }), -/* 108 */ +/* 100 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(39); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(38); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(40); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(39); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(29); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(28); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(78); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(75); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -26339,7 +25535,7 @@ Route.childContextTypes = { /* harmony default export */ __webpack_exports__["a"] = (Route); /***/ }), -/* 109 */ +/* 101 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -26457,7 +25653,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(ProgressSlider); /***/ }), -/* 110 */ +/* 102 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -26477,7 +25673,7 @@ var _Thumbnail = __webpack_require__(11); var _Thumbnail2 = _interopRequireDefault(_Thumbnail); -var _URILink = __webpack_require__(18); +var _URILink = __webpack_require__(17); var _URILink2 = _interopRequireDefault(_URILink); @@ -26547,7 +25743,7 @@ var RelatedArtists = function (_React$Component) { exports.default = RelatedArtists; /***/ }), -/* 111 */ +/* 103 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -26671,7 +25867,7 @@ var ConfirmationButton = function (_React$Component) { exports.default = ConfirmationButton; /***/ }), -/* 112 */ +/* 104 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -26859,7 +26055,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SpotifyAuthenticationFrame); /***/ }), -/* 113 */ +/* 105 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27046,7 +26242,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(LastfmAuthenticationFrame); /***/ }), -/* 114 */ +/* 106 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27061,7 +26257,7 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _propTypes = __webpack_require__(33); +var _propTypes = __webpack_require__(32); var _propTypes2 = _interopRequireDefault(_propTypes); @@ -27105,7 +26301,53 @@ module.exports = exports['default']; //# sourceMappingURL=label.js.map /***/ }), -/* 115 */ +/* 107 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.set = set; +exports.getLibraryArtists = getLibraryArtists; +exports.clearLibraryArtists = clearLibraryArtists; +exports.getLibraryAlbums = getLibraryAlbums; +exports.clearLibraryAlbums = clearLibraryAlbums; +function set(data) { + return { + type: 'GOOGLE_SET', + data: data + }; +} + +function getLibraryArtists() { + return { + type: 'GOOGLE_GET_LIBRARY_ARTISTS' + }; +} + +function clearLibraryArtists() { + return { + type: 'GOOGLE_CLEAR_LIBRARY_ARTISTS' + }; +} + +function getLibraryAlbums() { + return { + 'type': 'GOOGLE_GET_LIBRARY_ALBUMS' + }; +} + +function clearLibraryAlbums() { + return { + type: 'GOOGLE_CLEAR_LIBRARY_ALBUMS' + }; +} + +/***/ }), +/* 108 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27115,7 +26357,7 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(49); +var _reactDom = __webpack_require__(48); var _reactDom2 = _interopRequireDefault(_reactDom); @@ -27123,13 +26365,13 @@ var _reactRedux = __webpack_require__(4); var _redux = __webpack_require__(2); -var _reactRouterDom = __webpack_require__(32); +var _reactRouterDom = __webpack_require__(31); -var _bootstrap = __webpack_require__(175); +var _bootstrap = __webpack_require__(168); var _bootstrap2 = _interopRequireDefault(_bootstrap); -var _App = __webpack_require__(225); +var _App = __webpack_require__(202); var _App2 = _interopRequireDefault(_App); @@ -27138,7 +26380,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de ; ; -__webpack_require__(316); +__webpack_require__(293); _reactDom2.default.render(_react2.default.createElement( _reactRedux.Provider, @@ -27151,7 +26393,7 @@ _reactDom2.default.render(_react2.default.createElement( ), document.getElementById('app')); /***/ }), -/* 116 */ +/* 109 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27164,7 +26406,7 @@ _reactDom2.default.render(_react2.default.createElement( * LICENSE file in the root directory of this source tree. */ -var k=__webpack_require__(31),n="function"===typeof Symbol&&Symbol.for,p=n?Symbol.for("react.element"):60103,q=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,t=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,v=n?Symbol.for("react.provider"):60109,w=n?Symbol.for("react.context"):60110,x=n?Symbol.for("react.concurrent_mode"):60111,y=n?Symbol.for("react.forward_ref"):60112,z=n?Symbol.for("react.suspense"):60113,A=n?Symbol.for("react.memo"): +var k=__webpack_require__(30),n="function"===typeof Symbol&&Symbol.for,p=n?Symbol.for("react.element"):60103,q=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,t=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,v=n?Symbol.for("react.provider"):60109,w=n?Symbol.for("react.context"):60110,x=n?Symbol.for("react.concurrent_mode"):60111,y=n?Symbol.for("react.forward_ref"):60112,z=n?Symbol.for("react.suspense"):60113,A=n?Symbol.for("react.memo"): 60115,B=n?Symbol.for("react.lazy"):60116,C="function"===typeof Symbol&&Symbol.iterator;function aa(a,b,e,c,d,g,h,f){if(!a){a=void 0;if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[e,c,d,g,h,f],m=0;a=Error(b.replace(/%s/g,function(){return l[m++]}));a.name="Invariant Violation"}a.framesToPop=1;throw a;}} function D(a){for(var b=arguments.length-1,e="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=0;c= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } @@ -54870,30 +54112,30 @@ StaticRouter.childContextTypes = { /* harmony default export */ __webpack_exports__["a"] = (StaticRouter); /***/ }), -/* 168 */ +/* 161 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Switch__ = __webpack_require__(169); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Switch__ = __webpack_require__(162); // Written in this round about way for babel-transform-imports /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Switch__["a" /* default */]); /***/ }), -/* 169 */ +/* 162 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(20); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(19); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(28); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(27); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_warning__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(25); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(24); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(67); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(66); 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; } @@ -54973,50 +54215,50 @@ Switch.propTypes = { /* harmony default export */ __webpack_exports__["a"] = (Switch); /***/ }), -/* 170 */ +/* 163 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_generatePath__ = __webpack_require__(97); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_generatePath__ = __webpack_require__(94); // Written in this round about way for babel-transform-imports /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_generatePath__["a" /* default */]); /***/ }), -/* 171 */ +/* 164 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_matchPath__ = __webpack_require__(67); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_matchPath__ = __webpack_require__(66); // Written in this round about way for babel-transform-imports /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_matchPath__["a" /* default */]); /***/ }), -/* 172 */ +/* 165 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_withRouter__ = __webpack_require__(173); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_withRouter__ = __webpack_require__(166); // Written in this round about way for babel-transform-imports /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_withRouter__["a" /* default */]); /***/ }), -/* 173 */ +/* 166 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(20); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(19); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__ = __webpack_require__(174); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__ = __webpack_require__(167); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Route__ = __webpack_require__(96); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Route__ = __webpack_require__(93); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } @@ -55055,7 +54297,7 @@ var withRouter = function withRouter(Component) { /* harmony default export */ __webpack_exports__["a"] = (withRouter); /***/ }), -/* 174 */ +/* 167 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -55130,7 +54372,7 @@ module.exports = hoistNonReactStatics; /***/ }), -/* 175 */ +/* 168 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -55146,83 +54388,83 @@ var _helpers = __webpack_require__(1); var helpers = _interopRequireWildcard(_helpers); -var _reducer = __webpack_require__(176); +var _reducer = __webpack_require__(169); var _reducer2 = _interopRequireDefault(_reducer); -var _reducer3 = __webpack_require__(177); +var _reducer3 = __webpack_require__(170); var _reducer4 = _interopRequireDefault(_reducer3); -var _reducer5 = __webpack_require__(178); +var _reducer5 = __webpack_require__(171); var _reducer6 = _interopRequireDefault(_reducer5); -var _reducer7 = __webpack_require__(179); +var _reducer7 = __webpack_require__(172); var _reducer8 = _interopRequireDefault(_reducer7); -var _reducer9 = __webpack_require__(180); +var _reducer9 = __webpack_require__(173); var _reducer10 = _interopRequireDefault(_reducer9); -var _reducer11 = __webpack_require__(181); +var _reducer11 = __webpack_require__(174); var _reducer12 = _interopRequireDefault(_reducer11); -var _reducer13 = __webpack_require__(182); +var _reducer13 = __webpack_require__(175); var _reducer14 = _interopRequireDefault(_reducer13); -var _reducer15 = __webpack_require__(183); +var _reducer15 = __webpack_require__(176); var _reducer16 = _interopRequireDefault(_reducer15); -var _reducer17 = __webpack_require__(184); +var _reducer17 = __webpack_require__(177); var _reducer18 = _interopRequireDefault(_reducer17); -var _reduxThunk = __webpack_require__(185); +var _reduxThunk = __webpack_require__(178); var _reduxThunk2 = _interopRequireDefault(_reduxThunk); -var _middleware = __webpack_require__(186); +var _middleware = __webpack_require__(179); var _middleware2 = _interopRequireDefault(_middleware); -var _middleware3 = __webpack_require__(198); +var _middleware3 = __webpack_require__(191); var _middleware4 = _interopRequireDefault(_middleware3); -var _middleware5 = __webpack_require__(199); +var _middleware5 = __webpack_require__(192); var _middleware6 = _interopRequireDefault(_middleware5); -var _middleware7 = __webpack_require__(200); +var _middleware7 = __webpack_require__(193); var _middleware8 = _interopRequireDefault(_middleware7); -var _middleware9 = __webpack_require__(219); +var _middleware9 = __webpack_require__(194); var _middleware10 = _interopRequireDefault(_middleware9); -var _middleware11 = __webpack_require__(220); +var _middleware11 = __webpack_require__(195); var _middleware12 = _interopRequireDefault(_middleware11); -var _middleware13 = __webpack_require__(221); +var _middleware13 = __webpack_require__(196); var _middleware14 = _interopRequireDefault(_middleware13); -var _middleware15 = __webpack_require__(222); +var _middleware15 = __webpack_require__(199); var _middleware16 = _interopRequireDefault(_middleware15); -var _middleware17 = __webpack_require__(223); +var _middleware17 = __webpack_require__(200); var _middleware18 = _interopRequireDefault(_middleware17); -var _middleware19 = __webpack_require__(224); +var _middleware19 = __webpack_require__(201); var _middleware20 = _interopRequireDefault(_middleware19); @@ -55331,7 +54573,7 @@ var reducers = (0, _redux.combineReducers)({ exports.default = (0, _redux.createStore)(reducers, initialState, (0, _redux.applyMiddleware)(_reduxThunk2.default, _middleware20.default, _middleware2.default, _middleware4.default, _middleware8.default, _middleware6.default, _middleware14.default, _middleware10.default, _middleware12.default, _middleware16.default, _middleware18.default)); /***/ }), -/* 176 */ +/* 169 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -55727,7 +54969,7 @@ function reducer() { } /***/ }), -/* 177 */ +/* 170 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -55952,7 +55194,7 @@ function reducer() { } /***/ }), -/* 178 */ +/* 171 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -56029,7 +55271,7 @@ function reducer() { } /***/ }), -/* 179 */ +/* 172 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -56254,7 +55496,7 @@ function reducer() { } /***/ }), -/* 180 */ +/* 173 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -56311,7 +55553,7 @@ function reducer() { } /***/ }), -/* 181 */ +/* 174 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -56666,7 +55908,7 @@ function reducer() { } /***/ }), -/* 182 */ +/* 175 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -56794,7 +56036,7 @@ function reducer() { } /***/ }), -/* 183 */ +/* 176 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -56850,7 +56092,7 @@ function reducer() { } /***/ }), -/* 184 */ +/* 177 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -56906,7 +56148,7 @@ function reducer() { } /***/ }), -/* 185 */ +/* 178 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56933,7 +56175,7 @@ thunk.withExtraArgument = createThunkMiddleware; /* harmony default export */ __webpack_exports__["default"] = (thunk); /***/ }), -/* 186 */ +/* 179 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -56953,7 +56195,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr var coreActions = __webpack_require__(10); var uiActions = __webpack_require__(3); -var pusherActions = __webpack_require__(12); +var pusherActions = __webpack_require__(13); var mopidyActions = __webpack_require__(7); var spotifyActions = __webpack_require__(9); var lastfmActions = __webpack_require__(16); @@ -57123,21 +56365,6 @@ var CoreMiddleware = function () { break; - case 'PLAYLIST_TRACKS_ADDED': - store.dispatch(uiActions.createNotification({ type: 'info', content: 'Added ' + action.tracks_uris.length + ' tracks to playlist' })); - switch (helpers.uriSource(action.key)) { - - case 'spotify': - store.dispatch(spotifyActions.getPlaylist(action.key)); - break; - - case 'm3u': - if (store.getState().mopidy.connected) store.dispatch(mopidyActions.getPlaylist(action.key)); - break; - } - next(action); - break; - // Get assets from all of our providers case 'GET_LIBRARY_PLAYLISTS': if (store.getState().spotify.connected) { @@ -57191,6 +56418,21 @@ var CoreMiddleware = function () { next(action); break; + case 'PLAYLIST_TRACKS_ADDED': + store.dispatch(uiActions.createNotification({ type: 'info', content: 'Added ' + action.tracks_uris.length + ' tracks to playlist' })); + switch (helpers.uriSource(action.key)) { + + case 'spotify': + store.dispatch(spotifyActions.getPlaylist(action.key)); + break; + + case 'm3u': + if (store.getState().mopidy.connected) store.dispatch(mopidyActions.getPlaylist(action.key)); + break; + } + next(action); + break; + case 'PLAYLIST_TRACKS_REORDERED': var playlists = Object.assign({}, core.playlists); var playlist = Object.assign({}, playlists[action.key]); @@ -57915,14 +57157,14 @@ var CoreMiddleware = function () { exports.default = CoreMiddleware; /***/ }), -/* 187 */ +/* 180 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = format; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mightBeEmail__ = __webpack_require__(188); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toTitleCase__ = __webpack_require__(189); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__console_warn__ = __webpack_require__(68); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mightBeEmail__ = __webpack_require__(181); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toTitleCase__ = __webpack_require__(182); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__console_warn__ = __webpack_require__(67); @@ -57941,7 +57183,7 @@ function format(s, titleCase) { } /***/ }), -/* 188 */ +/* 181 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57954,12 +57196,12 @@ function mightBeEmail(s) { } /***/ }), -/* 189 */ +/* 182 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = toTitleCase; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__trim__ = __webpack_require__(98); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__trim__ = __webpack_require__(95); /** * To Title Case 2.1 - http://individed.com/code/to-title-case/ * Copyright 2008-2013 David Gouch. Licensed under the MIT License. @@ -57982,7 +57224,7 @@ function toTitleCase(string) { } /***/ }), -/* 190 */ +/* 183 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57996,7 +57238,7 @@ function removeLeadingSlash(string) { } /***/ }), -/* 191 */ +/* 184 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58027,7 +57269,7 @@ function removeLeadingSlash(string) { }); /***/ }), -/* 192 */ +/* 185 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58037,7 +57279,7 @@ function log(s) { } /***/ }), -/* 193 */ +/* 186 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58055,16 +57297,16 @@ var gaCalls = []; }); /***/ }), -/* 194 */ +/* 187 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return OutboundLink; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(33); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(32); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_console_warn__ = __webpack_require__(68); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_console_warn__ = __webpack_require__(67); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } @@ -58188,7 +57430,7 @@ _defineProperty(OutboundLink, "defaultProps", { /***/ }), -/* 195 */ +/* 188 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -58203,12 +57445,12 @@ _defineProperty(OutboundLink, "defaultProps", { -var emptyFunction = __webpack_require__(69); -var invariant = __webpack_require__(70); -var warning = __webpack_require__(99); +var emptyFunction = __webpack_require__(68); +var invariant = __webpack_require__(69); +var warning = __webpack_require__(96); -var ReactPropTypesSecret = __webpack_require__(71); -var checkPropTypes = __webpack_require__(196); +var ReactPropTypesSecret = __webpack_require__(70); +var checkPropTypes = __webpack_require__(189); module.exports = function(isValidElement, throwOnDirectAccess) { /* global Symbol */ @@ -58708,7 +57950,7 @@ module.exports = function(isValidElement, throwOnDirectAccess) { /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 196 */ +/* 189 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -58724,9 +57966,9 @@ module.exports = function(isValidElement, throwOnDirectAccess) { if (process.env.NODE_ENV !== 'production') { - var invariant = __webpack_require__(70); - var warning = __webpack_require__(99); - var ReactPropTypesSecret = __webpack_require__(71); + var invariant = __webpack_require__(69); + var warning = __webpack_require__(96); + var ReactPropTypesSecret = __webpack_require__(70); var loggedTypeFailures = {}; } @@ -58777,7 +58019,7 @@ module.exports = checkPropTypes; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 197 */ +/* 190 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -58792,9 +58034,9 @@ module.exports = checkPropTypes; -var emptyFunction = __webpack_require__(69); -var invariant = __webpack_require__(70); -var ReactPropTypesSecret = __webpack_require__(71); +var emptyFunction = __webpack_require__(68); +var invariant = __webpack_require__(69); +var ReactPropTypesSecret = __webpack_require__(70); module.exports = function() { function shim(props, propName, componentName, location, propFullName, secret) { @@ -58843,7 +58085,7 @@ module.exports = function() { /***/ }), -/* 198 */ +/* 191 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59100,10 +58342,10 @@ var UIMiddleware = function () { }(); exports.default = UIMiddleware; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(15))) /***/ }), -/* 199 */ +/* 192 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59123,11 +58365,11 @@ var helpers = __webpack_require__(1); var coreActions = __webpack_require__(10); var uiActions = __webpack_require__(3); var mopidyActions = __webpack_require__(7); -var pusherActions = __webpack_require__(12); +var pusherActions = __webpack_require__(13); var lastfmActions = __webpack_require__(16); -var geniusActions = __webpack_require__(36); +var geniusActions = __webpack_require__(35); var spotifyActions = __webpack_require__(9); -var snapcastActions = __webpack_require__(37); +var snapcastActions = __webpack_require__(36); var PusherMiddleware = function () { var _this = this; @@ -59785,10 +59027,10 @@ var PusherMiddleware = function () { }(); exports.default = PusherMiddleware; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(15))) /***/ }), -/* 200 */ +/* 193 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59802,11 +59044,11 @@ var _reactGa = __webpack_require__(14); var _reactGa2 = _interopRequireDefault(_reactGa); -var _mopidy = __webpack_require__(201); +var _mopidy = __webpack_require__(318); var _mopidy2 = _interopRequireDefault(_mopidy); -var _jsSha = __webpack_require__(104); +var _jsSha = __webpack_require__(197); var _helpers = __webpack_require__(1); @@ -59822,8 +59064,8 @@ var mopidyActions = __webpack_require__(7); var coreActions = __webpack_require__(10); var uiActions = __webpack_require__(3); var spotifyActions = __webpack_require__(9); -var pusherActions = __webpack_require__(12); -var googleActions = __webpack_require__(73); +var pusherActions = __webpack_require__(13); +var googleActions = __webpack_require__(107); var lastfmActions = __webpack_require__(16); var MopidyMiddleware = function () { @@ -60334,31 +59576,26 @@ var MopidyMiddleware = function () { case 'MOPIDY_PLAY_PLAYLIST': - // Clear tracklist (if set) - if (store.getState().ui.clear_tracklist_on_play) { - store.dispatch(mopidyActions.clearTracklist()); - } + var playlist = store.getState().core.playlists[action.uri]; - // playlist already in index - if (store.getState().core.playlists.hasOwnProperty(action.uri)) { + // We have the playlist loaded already, and we've got at least 1 track to start playing + if (playlist && playlist.tracks_uris && playlist.tracks_uris.length > 0) { // Spotify-provied playlists need to be handled by the Spotify service - if (store.getState().core.playlists[action.uri].provider == 'spotify') { - store.dispatch(spotifyActions.getPlaylistTracksAndPlay(action.uri, action.shuffle)); + // We only need to load them if we haven't already got all the tracks + if (playlist.provider == 'spotify' && playlist.tracks_total == playlist.tracks_uris.length) { + store.dispatch(spotifyActions.getAllPlaylistTracks(action.uri, action.shuffle, 'play')); break; } - // it's a spotify playlist that we haven't loaded - // we need to fetch via HTTP API to avoid timeout + // It's a Spotify playlist that we haven't loaded yet, so Spotify HTTP API needs to go get it } else if (helpers.uriSource(action.uri) == 'spotify' && store.getState().spotify.enabled) { - store.dispatch(spotifyActions.getPlaylistTracksAndPlay(action.uri, action.shuffle)); + store.dispatch(spotifyActions.getAllPlaylistTracks(action.uri, action.shuffle, 'play')); break; - - // Not in index, and Spotify HTTP not enabled, so just play it as-is } - // fetch the playlist tracks via backend - // add each track by URI + // Not in index, and Spotify HTTP not enabled, so just play it as-is + // Fetch the playlist tracks via backend and add each track by URI request(socket, store, 'playlists.lookup', { uri: action.uri }).then(function (response) { if (response.tracks === undefined) { store.dispatch(uiActions.createNotification({ content: 'Failed to load playlist tracks', type: 'bad' })); @@ -60374,6 +59611,44 @@ var MopidyMiddleware = function () { }); break; + case 'MOPIDY_ENQUEUE_PLAYLIST': + console.log(action); + + var playlist = store.getState().core.playlists[action.uri]; + + // We have the playlist loaded already, and we've got at least 1 track to start playing + if (playlist && playlist.tracks_uris && playlist.tracks_uris.length > 0) { + + // Spotify-provied playlists need to be handled by the Spotify service + // We only need to load them if we haven't already got all the tracks + if (playlist.provider == 'spotify' && playlist.tracks_total == playlist.tracks_uris.length) { + store.dispatch(spotifyActions.getAllPlaylistTracks(action.uri, action.shuffle, 'enqueue')); + break; + } + + // It's a Spotify playlist that we haven't loaded yet, so Spotify HTTP API needs to go get it + } else if (helpers.uriSource(action.uri) == 'spotify' && store.getState().spotify.enabled) { + store.dispatch(spotifyActions.getAllPlaylistTracks(action.uri, action.shuffle, 'enqueue')); + break; + } + + // Not in index, and Spotify HTTP not enabled, so just play it as-is + // Fetch the playlist tracks via backend and add each track by URI + request(socket, store, 'playlists.lookup', { uri: action.uri }).then(function (response) { + if (response.tracks === undefined) { + store.dispatch(uiActions.createNotification({ content: 'Failed to load playlist tracks', type: 'bad' })); + } else { + var tracks_uris = helpers.arrayOf('uri', response.tracks); + if (action.shuffle) { + tracks_uris = helpers.shuffle(tracks_uris); + } + store.dispatch(mopidyActions.enqueueURIs(tracks_uris, action.uri, action.play_next, action.at_position, action.offset)); + } + }, function (error) { + store.dispatch(coreActions.handleException("Mopidy: " + (error.message ? error.message : "Lookup failed"), error)); + }); + break; + case 'MOPIDY_ENQUEUE_URIS': if (!action.uris || action.uris.length <= 0) { @@ -60396,7 +59671,7 @@ var MopidyMiddleware = function () { batches.push({ uris: uris.splice(0, batch_size), at_position: action.at_position, - next: action.next, + play_next: action.play_next, offset: action.offset + batch_size * batches.length, from_uri: action.from_uri }); @@ -60459,7 +59734,7 @@ var MopidyMiddleware = function () { var params = { uris: batch.uris // Play this batch next - };if (batch.next) { + };if (batch.play_next) { // Make sure we're playing something first if (current_track_index > -1) { @@ -61951,2777 +61226,7 @@ var MopidyMiddleware = function () { exports.default = MopidyMiddleware; /***/ }), -/* 201 */ -/***/ (function(module, exports, __webpack_require__) { - -/*global module:true, require:false*/ - -var bane = __webpack_require__(202); -var websocket = __webpack_require__(203); -var when = __webpack_require__(204); - -function Mopidy(settings) { - if (!(this instanceof Mopidy)) { - return new Mopidy(settings); - } - - this._console = this._getConsole(settings || {}); - this._settings = this._configure(settings || {}); - - this._backoffDelay = this._settings.backoffDelayMin; - this._pendingRequests = {}; - this._webSocket = null; - - bane.createEventEmitter(this); - this._delegateEvents(); - - if (this._settings.autoConnect) { - this.connect(); - } -} - -Mopidy.ConnectionError = function (message) { - this.name = "ConnectionError"; - this.message = message; -}; -Mopidy.ConnectionError.prototype = Object.create(Error.prototype); -Mopidy.ConnectionError.prototype.constructor = Mopidy.ConnectionError; - -Mopidy.ServerError = function (message) { - this.name = "ServerError"; - this.message = message; -}; -Mopidy.ServerError.prototype = Object.create(Error.prototype); -Mopidy.ServerError.prototype.constructor = Mopidy.ServerError; - -Mopidy.WebSocket = websocket.Client; - -Mopidy.when = when; - -Mopidy.prototype._getConsole = function (settings) { - if (typeof settings.console !== "undefined") { - return settings.console; - } - - var con = typeof console !== "undefined" && console || {}; - - con.log = con.log || function () {}; - con.warn = con.warn || function () {}; - con.error = con.error || function () {}; - - return con; -}; - -Mopidy.prototype._configure = function (settings) { - var protocol = (typeof document !== "undefined" && - document.location.protocol === "https:") ? "wss://" : "ws://"; - var currentHost = (typeof document !== "undefined" && - document.location.host) || "localhost"; - settings.webSocketUrl = settings.webSocketUrl || - protocol + currentHost + "/mopidy/ws"; - - if (settings.autoConnect !== false) { - settings.autoConnect = true; - } - - settings.backoffDelayMin = settings.backoffDelayMin || 1000; - settings.backoffDelayMax = settings.backoffDelayMax || 64000; - - if (typeof settings.callingConvention === "undefined") { - this._console.warn( - "Mopidy.js is using the default calling convention. The " + - "default will change in the future. You should explicitly " + - "specify which calling convention you use."); - } - settings.callingConvention = ( - settings.callingConvention || "by-position-only"); - - return settings; -}; - -Mopidy.prototype._delegateEvents = function () { - // Remove existing event handlers - this.off("websocket:close"); - this.off("websocket:error"); - this.off("websocket:incomingMessage"); - this.off("websocket:open"); - this.off("state:offline"); - - // Register basic set of event handlers - this.on("websocket:close", this._cleanup); - this.on("websocket:error", this._handleWebSocketError); - this.on("websocket:incomingMessage", this._handleMessage); - this.on("websocket:open", this._resetBackoffDelay); - this.on("websocket:open", this._getApiSpec); - this.on("state:offline", this._reconnect); -}; - -Mopidy.prototype.connect = function () { - if (this._webSocket) { - if (this._webSocket.readyState === Mopidy.WebSocket.OPEN) { - return; - } else { - this._webSocket.close(); - } - } - - this._webSocket = this._settings.webSocket || - new Mopidy.WebSocket(this._settings.webSocketUrl); - - this._webSocket.onclose = function (close) { - this.emit("websocket:close", close); - }.bind(this); - - this._webSocket.onerror = function (error) { - this.emit("websocket:error", error); - }.bind(this); - - this._webSocket.onopen = function () { - this.emit("websocket:open"); - }.bind(this); - - this._webSocket.onmessage = function (message) { - this.emit("websocket:incomingMessage", message); - }.bind(this); -}; - -Mopidy.prototype._cleanup = function (closeEvent) { - Object.keys(this._pendingRequests).forEach(function (requestId) { - var resolver = this._pendingRequests[requestId]; - delete this._pendingRequests[requestId]; - var error = new Mopidy.ConnectionError("WebSocket closed"); - error.closeEvent = closeEvent; - resolver.reject(error); - }.bind(this)); - - this.emit("state:offline"); -}; - -Mopidy.prototype._reconnect = function () { - this.emit("reconnectionPending", { - timeToAttempt: this._backoffDelay - }); - - setTimeout(function () { - this.emit("reconnecting"); - this.connect(); - }.bind(this), this._backoffDelay); - - this._backoffDelay = this._backoffDelay * 2; - if (this._backoffDelay > this._settings.backoffDelayMax) { - this._backoffDelay = this._settings.backoffDelayMax; - } -}; - -Mopidy.prototype._resetBackoffDelay = function () { - this._backoffDelay = this._settings.backoffDelayMin; -}; - -Mopidy.prototype.close = function () { - this.off("state:offline", this._reconnect); - this._webSocket.close(); -}; - -Mopidy.prototype._handleWebSocketError = function (error) { - this._console.warn("WebSocket error:", error.stack || error); -}; - -Mopidy.prototype._send = function (message) { - switch (this._webSocket.readyState) { - case Mopidy.WebSocket.CONNECTING: - return when.reject( - new Mopidy.ConnectionError("WebSocket is still connecting")); - case Mopidy.WebSocket.CLOSING: - return when.reject( - new Mopidy.ConnectionError("WebSocket is closing")); - case Mopidy.WebSocket.CLOSED: - return when.reject( - new Mopidy.ConnectionError("WebSocket is closed")); - default: - var deferred = when.defer(); - message.jsonrpc = "2.0"; - message.id = this._nextRequestId(); - this._pendingRequests[message.id] = deferred.resolver; - this._webSocket.send(JSON.stringify(message)); - this.emit("websocket:outgoingMessage", message); - return deferred.promise; - } -}; - -Mopidy.prototype._nextRequestId = (function () { - var lastUsed = -1; - return function () { - lastUsed += 1; - return lastUsed; - }; -}()); - -Mopidy.prototype._handleMessage = function (message) { - try { - var data = JSON.parse(message.data); - if (data.hasOwnProperty("id")) { - this._handleResponse(data); - } else if (data.hasOwnProperty("event")) { - this._handleEvent(data); - } else { - this._console.warn( - "Unknown message type received. Message was: " + - message.data); - } - } catch (error) { - if (error instanceof SyntaxError) { - this._console.warn( - "WebSocket message parsing failed. Message was: " + - message.data); - } else { - throw error; - } - } -}; - -Mopidy.prototype._handleResponse = function (responseMessage) { - if (!this._pendingRequests.hasOwnProperty(responseMessage.id)) { - this._console.warn( - "Unexpected response received. Message was:", responseMessage); - return; - } - - var error; - var resolver = this._pendingRequests[responseMessage.id]; - delete this._pendingRequests[responseMessage.id]; - - if (responseMessage.hasOwnProperty("result")) { - resolver.resolve(responseMessage.result); - } else if (responseMessage.hasOwnProperty("error")) { - error = new Mopidy.ServerError(responseMessage.error.message); - error.code = responseMessage.error.code; - error.data = responseMessage.error.data; - resolver.reject(error); - this._console.warn("Server returned error:", responseMessage.error); - } else { - error = new Error("Response without 'result' or 'error' received"); - error.data = {response: responseMessage}; - resolver.reject(error); - this._console.warn( - "Response without 'result' or 'error' received. Message was:", - responseMessage); - } -}; - -Mopidy.prototype._handleEvent = function (eventMessage) { - var type = eventMessage.event; - var data = eventMessage; - delete data.event; - - this.emit("event:" + this._snakeToCamel(type), data); -}; - -Mopidy.prototype._getApiSpec = function () { - return this._send({method: "core.describe"}) - .then(this._createApi.bind(this)) - .catch(this._handleWebSocketError); -}; - -Mopidy.prototype._createApi = function (methods) { - var byPositionOrByName = ( - this._settings.callingConvention === "by-position-or-by-name"); - - var caller = function (method) { - return function () { - var message = {method: method}; - if (arguments.length === 0) { - return this._send(message); - } - if (!byPositionOrByName) { - message.params = Array.prototype.slice.call(arguments); - return this._send(message); - } - if (arguments.length > 1) { - return when.reject(new Error( - "Expected zero arguments, a single array, " + - "or a single object.")); - } - if (!Array.isArray(arguments[0]) && - arguments[0] !== Object(arguments[0])) { - return when.reject(new TypeError( - "Expected an array or an object.")); - } - message.params = arguments[0]; - return this._send(message); - }.bind(this); - }.bind(this); - - var getPath = function (fullName) { - var path = fullName.split("."); - if (path.length >= 1 && path[0] === "core") { - path = path.slice(1); - } - return path; - }; - - var createObjects = function (objPath) { - var parentObj = this; - objPath.forEach(function (objName) { - objName = this._snakeToCamel(objName); - parentObj[objName] = parentObj[objName] || {}; - parentObj = parentObj[objName]; - }.bind(this)); - return parentObj; - }.bind(this); - - var createMethod = function (fullMethodName) { - var methodPath = getPath(fullMethodName); - var methodName = this._snakeToCamel(methodPath.slice(-1)[0]); - var object = createObjects(methodPath.slice(0, -1)); - object[methodName] = caller(fullMethodName); - object[methodName].description = methods[fullMethodName].description; - object[methodName].params = methods[fullMethodName].params; - }.bind(this); - - Object.keys(methods).forEach(createMethod); - this.emit("state:online"); -}; - -Mopidy.prototype._snakeToCamel = function (name) { - return name.replace(/(_[a-z])/g, function (match) { - return match.toUpperCase().replace("_", ""); - }); -}; - -module.exports = Mopidy; - - -/***/ }), -/* 202 */ -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;(("function" === "function" && __webpack_require__(100) && function (m) { !(__WEBPACK_AMD_DEFINE_FACTORY__ = (m), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : - __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); }) || - (typeof module === "object" && function (m) { module.exports = m(); }) || - function (m) { this.bane = m(); } -)(function () { - "use strict"; - var slice = Array.prototype.slice; - - function handleError(event, error, errbacks) { - var i, l = errbacks.length; - if (l > 0) { - for (i = 0; i < l; ++i) { errbacks[i](event, error); } - return; - } - setTimeout(function () { - error.message = event + " listener threw error: " + error.message; - throw error; - }, 0); - } - - function assertFunction(fn) { - if (typeof fn !== "function") { - throw new TypeError("Listener is not function"); - } - return fn; - } - - function supervisors(object) { - if (!object.supervisors) { object.supervisors = []; } - return object.supervisors; - } - - function listeners(object, event) { - if (!object.listeners) { object.listeners = {}; } - if (event && !object.listeners[event]) { object.listeners[event] = []; } - return event ? object.listeners[event] : object.listeners; - } - - function errbacks(object) { - if (!object.errbacks) { object.errbacks = []; } - return object.errbacks; - } - - /** - * @signature var emitter = bane.createEmitter([object]); - * - * Create a new event emitter. If an object is passed, it will be modified - * by adding the event emitter methods (see below). - */ - function createEventEmitter(object) { - object = object || {}; - - function notifyListener(event, listener, args) { - try { - listener.listener.apply(listener.thisp || object, args); - } catch (e) { - handleError(event, e, errbacks(object)); - } - } - - object.on = function (event, listener, thisp) { - if (typeof event === "function") { - return supervisors(this).push({ - listener: event, - thisp: listener - }); - } - listeners(this, event).push({ - listener: assertFunction(listener), - thisp: thisp - }); - }; - - object.off = function (event, listener) { - var fns, events, i, l; - if (!event) { - fns = supervisors(this); - fns.splice(0, fns.length); - - events = listeners(this); - for (i in events) { - if (events.hasOwnProperty(i)) { - fns = listeners(this, i); - fns.splice(0, fns.length); - } - } - - fns = errbacks(this); - fns.splice(0, fns.length); - - return; - } - if (typeof event === "function") { - fns = supervisors(this); - listener = event; - } else { - fns = listeners(this, event); - } - if (!listener) { - fns.splice(0, fns.length); - return; - } - for (i = 0, l = fns.length; i < l; ++i) { - if (fns[i].listener === listener) { - fns.splice(i, 1); - return; - } - } - }; - - object.once = function (event, listener, thisp) { - var wrapper = function () { - object.off(event, wrapper); - listener.apply(this, arguments); - }; - - object.on(event, wrapper, thisp); - }; - - object.bind = function (object, events) { - var prop, i, l; - if (!events) { - for (prop in object) { - if (typeof object[prop] === "function") { - this.on(prop, object[prop], object); - } - } - } else { - for (i = 0, l = events.length; i < l; ++i) { - if (typeof object[events[i]] === "function") { - this.on(events[i], object[events[i]], object); - } else { - throw new Error("No such method " + events[i]); - } - } - } - return object; - }; - - object.emit = function (event) { - var toNotify = supervisors(this); - var args = slice.call(arguments), i, l; - - for (i = 0, l = toNotify.length; i < l; ++i) { - notifyListener(event, toNotify[i], args); - } - - toNotify = listeners(this, event).slice(); - args = slice.call(arguments, 1); - for (i = 0, l = toNotify.length; i < l; ++i) { - notifyListener(event, toNotify[i], args); - } - }; - - object.errback = function (listener) { - if (!this.errbacks) { this.errbacks = []; } - this.errbacks.push(assertFunction(listener)); - }; - - return object; - } - - return { - createEventEmitter: createEventEmitter, - aggregate: function (emitters) { - var aggregate = createEventEmitter(); - emitters.forEach(function (emitter) { - emitter.on(function (event, data) { - aggregate.emit(event, data); - }); - }); - return aggregate; - } - }; -}); - - -/***/ }), -/* 203 */ -/***/ (function(module, exports) { - -module.exports = { Client: window.WebSocket }; - - -/***/ }), -/* 204 */ -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ - -/** - * Promises/A+ and when() implementation - * when is part of the cujoJS family of libraries (http://cujojs.com/) - * @author Brian Cavalier - * @author John Hann - */ -(function(define) { 'use strict'; -!(__WEBPACK_AMD_DEFINE_RESULT__ = (function (require) { - - var timed = __webpack_require__(205); - var array = __webpack_require__(207); - var flow = __webpack_require__(208); - var fold = __webpack_require__(209); - var inspect = __webpack_require__(210); - var generate = __webpack_require__(211); - var progress = __webpack_require__(212); - var withThis = __webpack_require__(213); - var unhandledRejection = __webpack_require__(214); - var TimeoutError = __webpack_require__(101); - - var Promise = [array, flow, fold, generate, progress, - inspect, withThis, timed, unhandledRejection] - .reduce(function(Promise, feature) { - return feature(Promise); - }, __webpack_require__(216)); - - var apply = __webpack_require__(103)(Promise); - - // Public API - - when.promise = promise; // Create a pending promise - when.resolve = Promise.resolve; // Create a resolved promise - when.reject = Promise.reject; // Create a rejected promise - - when.lift = lift; // lift a function to return promises - when['try'] = attempt; // call a function and return a promise - when.attempt = attempt; // alias for when.try - - when.iterate = Promise.iterate; // DEPRECATED (use cujojs/most streams) Generate a stream of promises - when.unfold = Promise.unfold; // DEPRECATED (use cujojs/most streams) Generate a stream of promises - - when.join = join; // Join 2 or more promises - - when.all = all; // Resolve a list of promises - when.settle = settle; // Settle a list of promises - - when.any = lift(Promise.any); // One-winner race - when.some = lift(Promise.some); // Multi-winner race - when.race = lift(Promise.race); // First-to-settle race - - when.map = map; // Array.map() for promises - when.filter = filter; // Array.filter() for promises - when.reduce = lift(Promise.reduce); // Array.reduce() for promises - when.reduceRight = lift(Promise.reduceRight); // Array.reduceRight() for promises - - when.isPromiseLike = isPromiseLike; // Is something promise-like, aka thenable - - when.Promise = Promise; // Promise constructor - when.defer = defer; // Create a {promise, resolve, reject} tuple - - // Error types - - when.TimeoutError = TimeoutError; - - /** - * Get a trusted promise for x, or by transforming x with onFulfilled - * - * @param {*} x - * @param {function?} onFulfilled callback to be called when x is - * successfully fulfilled. If promiseOrValue is an immediate value, callback - * will be invoked immediately. - * @param {function?} onRejected callback to be called when x is - * rejected. - * @param {function?} onProgress callback to be called when progress updates - * are issued for x. @deprecated - * @returns {Promise} a new promise that will fulfill with the return - * value of callback or errback or the completion value of promiseOrValue if - * callback and/or errback is not supplied. - */ - function when(x, onFulfilled, onRejected, onProgress) { - var p = Promise.resolve(x); - if (arguments.length < 2) { - return p; - } - - return p.then(onFulfilled, onRejected, onProgress); - } - - /** - * Creates a new promise whose fate is determined by resolver. - * @param {function} resolver function(resolve, reject, notify) - * @returns {Promise} promise whose fate is determine by resolver - */ - function promise(resolver) { - return new Promise(resolver); - } - - /** - * Lift the supplied function, creating a version of f that returns - * promises, and accepts promises as arguments. - * @param {function} f - * @returns {Function} version of f that returns promises - */ - function lift(f) { - return function() { - for(var i=0, l=arguments.length, a=new Array(l); i>>0; - - var pending = l; - var errors = []; - - for (var h, x, i = 0; i < l; ++i) { - x = promises[i]; - if(x === void 0 && !(i in promises)) { - --pending; - continue; - } - - h = Promise._handler(x); - if(h.state() > 0) { - resolver.become(h); - Promise._visitRemaining(promises, i, h); - break; - } else { - h.visit(resolver, handleFulfill, handleReject); - } - } - - if(pending === 0) { - resolver.reject(new RangeError('any(): array must not be empty')); - } - - return p; - - function handleFulfill(x) { - /*jshint validthis:true*/ - errors = null; - this.resolve(x); // this === resolver - } - - function handleReject(e) { - /*jshint validthis:true*/ - if(this.resolved) { // this === resolver - return; - } - - errors.push(e); - if(--pending === 0) { - this.reject(errors); - } - } - } - - /** - * N-winner competitive race - * Return a promise that will fulfill when n input promises have - * fulfilled, or will reject when it becomes impossible for n - * input promises to fulfill (ie when promises.length - n + 1 - * have rejected) - * @param {array} promises - * @param {number} n - * @returns {Promise} promise for the earliest n fulfillment values - * - * @deprecated - */ - function some(promises, n) { - /*jshint maxcomplexity:7*/ - var p = Promise._defer(); - var resolver = p._handler; - - var results = []; - var errors = []; - - var l = promises.length>>>0; - var nFulfill = 0; - var nReject; - var x, i; // reused in both for() loops - - // First pass: count actual array items - for(i=0; i nFulfill) { - resolver.reject(new RangeError('some(): array must contain at least ' - + n + ' item(s), but had ' + nFulfill)); - } else if(nFulfill === 0) { - resolver.resolve(results); - } - - // Second pass: observe each array item, make progress toward goals - for(i=0; i 2 ? ar.call(promises, liftCombine(f), arguments[2]) - : ar.call(promises, liftCombine(f)); - } - - /** - * Traditional reduce function, similar to `Array.prototype.reduceRight()`, but - * input may contain promises and/or values, and reduceFunc - * may return either a value or a promise, *and* initialValue may - * be a promise for the starting value. - * @param {Array|Promise} promises array or promise for an array of anything, - * may contain a mix of promises and values. - * @param {function(accumulated:*, x:*, index:Number):*} f reduce function - * @returns {Promise} that will resolve to the final reduced value - */ - function reduceRight(promises, f /*, initialValue */) { - return arguments.length > 2 ? arr.call(promises, liftCombine(f), arguments[2]) - : arr.call(promises, liftCombine(f)); - } - - function liftCombine(f) { - return function(z, x, i) { - return applyFold(f, void 0, [z,x,i]); - }; - } - }; - -}).call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); -}(__webpack_require__(15))); - - -/***/ }), -/* 208 */ -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { - - return function flow(Promise) { - - var resolve = Promise.resolve; - var reject = Promise.reject; - var origCatch = Promise.prototype['catch']; - - /** - * Handle the ultimate fulfillment value or rejection reason, and assume - * responsibility for all errors. If an error propagates out of result - * or handleFatalError, it will be rethrown to the host, resulting in a - * loud stack track on most platforms and a crash on some. - * @param {function?} onResult - * @param {function?} onError - * @returns {undefined} - */ - Promise.prototype.done = function(onResult, onError) { - this._handler.visit(this._handler.receiver, onResult, onError); - }; - - /** - * Add Error-type and predicate matching to catch. Examples: - * promise.catch(TypeError, handleTypeError) - * .catch(predicate, handleMatchedErrors) - * .catch(handleRemainingErrors) - * @param onRejected - * @returns {*} - */ - Promise.prototype['catch'] = Promise.prototype.otherwise = function(onRejected) { - if (arguments.length < 2) { - return origCatch.call(this, onRejected); - } - - if(typeof onRejected !== 'function') { - return this.ensure(rejectInvalidPredicate); - } - - return origCatch.call(this, createCatchFilter(arguments[1], onRejected)); - }; - - /** - * Wraps the provided catch handler, so that it will only be called - * if the predicate evaluates truthy - * @param {?function} handler - * @param {function} predicate - * @returns {function} conditional catch handler - */ - function createCatchFilter(handler, predicate) { - return function(e) { - return evaluatePredicate(e, predicate) - ? handler.call(this, e) - : reject(e); - }; - } - - /** - * Ensures that onFulfilledOrRejected will be called regardless of whether - * this promise is fulfilled or rejected. onFulfilledOrRejected WILL NOT - * receive the promises' value or reason. Any returned value will be disregarded. - * onFulfilledOrRejected may throw or return a rejected promise to signal - * an additional error. - * @param {function} handler handler to be called regardless of - * fulfillment or rejection - * @returns {Promise} - */ - Promise.prototype['finally'] = Promise.prototype.ensure = function(handler) { - if(typeof handler !== 'function') { - return this; - } - - return this.then(function(x) { - return runSideEffect(handler, this, identity, x); - }, function(e) { - return runSideEffect(handler, this, reject, e); - }); - }; - - function runSideEffect (handler, thisArg, propagate, value) { - var result = handler.call(thisArg); - return maybeThenable(result) - ? propagateValue(result, propagate, value) - : propagate(value); - } - - function propagateValue (result, propagate, x) { - return resolve(result).then(function () { - return propagate(x); - }); - } - - /** - * Recover from a failure by returning a defaultValue. If defaultValue - * is a promise, it's fulfillment value will be used. If defaultValue is - * a promise that rejects, the returned promise will reject with the - * same reason. - * @param {*} defaultValue - * @returns {Promise} new promise - */ - Promise.prototype['else'] = Promise.prototype.orElse = function(defaultValue) { - return this.then(void 0, function() { - return defaultValue; - }); - }; - - /** - * Shortcut for .then(function() { return value; }) - * @param {*} value - * @return {Promise} a promise that: - * - is fulfilled if value is not a promise, or - * - if value is a promise, will fulfill with its value, or reject - * with its reason. - */ - Promise.prototype['yield'] = function(value) { - return this.then(function() { - return value; - }); - }; - - /** - * Runs a side effect when this promise fulfills, without changing the - * fulfillment value. - * @param {function} onFulfilledSideEffect - * @returns {Promise} - */ - Promise.prototype.tap = function(onFulfilledSideEffect) { - return this.then(onFulfilledSideEffect)['yield'](this); - }; - - return Promise; - }; - - function rejectInvalidPredicate() { - throw new TypeError('catch predicate must be a function'); - } - - function evaluatePredicate(e, predicate) { - return isError(predicate) ? e instanceof predicate : predicate(e); - } - - function isError(predicate) { - return predicate === Error - || (predicate != null && predicate.prototype instanceof Error); - } - - function maybeThenable(x) { - return (typeof x === 'object' || typeof x === 'function') && x !== null; - } - - function identity(x) { - return x; - } - -}).call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); -}(__webpack_require__(15))); - - -/***/ }), -/* 209 */ -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ -/** @author Jeff Escalante */ - -(function(define) { 'use strict'; -!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { - - return function fold(Promise) { - - Promise.prototype.fold = function(f, z) { - var promise = this._beget(); - - this._handler.fold(function(z, x, to) { - Promise._handler(z).fold(function(x, z, to) { - to.resolve(f.call(this, z, x)); - }, x, this, to); - }, z, promise._handler.receiver, promise._handler); - - return promise; - }; - - return Promise; - }; - -}).call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); -}(__webpack_require__(15))); - - -/***/ }), -/* 210 */ -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -!(__WEBPACK_AMD_DEFINE_RESULT__ = (function(require) { - - var inspect = __webpack_require__(102).inspect; - - return function inspection(Promise) { - - Promise.prototype.inspect = function() { - return inspect(Promise._handler(this)); - }; - - return Promise; - }; - -}).call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); -}(__webpack_require__(15))); - - -/***/ }), -/* 211 */ -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { - - return function generate(Promise) { - - var resolve = Promise.resolve; - - Promise.iterate = iterate; - Promise.unfold = unfold; - - return Promise; - - /** - * @deprecated Use github.com/cujojs/most streams and most.iterate - * Generate a (potentially infinite) stream of promised values: - * x, f(x), f(f(x)), etc. until condition(x) returns true - * @param {function} f function to generate a new x from the previous x - * @param {function} condition function that, given the current x, returns - * truthy when the iterate should stop - * @param {function} handler function to handle the value produced by f - * @param {*|Promise} x starting value, may be a promise - * @return {Promise} the result of the last call to f before - * condition returns true - */ - function iterate(f, condition, handler, x) { - return unfold(function(x) { - return [x, f(x)]; - }, condition, handler, x); - } - - /** - * @deprecated Use github.com/cujojs/most streams and most.unfold - * Generate a (potentially infinite) stream of promised values - * by applying handler(generator(seed)) iteratively until - * condition(seed) returns true. - * @param {function} unspool function that generates a [value, newSeed] - * given a seed. - * @param {function} condition function that, given the current seed, returns - * truthy when the unfold should stop - * @param {function} handler function to handle the value produced by unspool - * @param x {*|Promise} starting value, may be a promise - * @return {Promise} the result of the last value produced by unspool before - * condition returns true - */ - function unfold(unspool, condition, handler, x) { - return resolve(x).then(function(seed) { - return resolve(condition(seed)).then(function(done) { - return done ? seed : resolve(unspool(seed)).spread(next); - }); - }); - - function next(item, newSeed) { - return resolve(handler(item)).then(function() { - return unfold(unspool, condition, handler, newSeed); - }); - } - } - }; - -}).call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); -}(__webpack_require__(15))); - - -/***/ }), -/* 212 */ -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { - - return function progress(Promise) { - - /** - * @deprecated - * Register a progress handler for this promise - * @param {function} onProgress - * @returns {Promise} - */ - Promise.prototype.progress = function(onProgress) { - return this.then(void 0, void 0, onProgress); - }; - - return Promise; - }; - -}).call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); -}(__webpack_require__(15))); - - -/***/ }), -/* 213 */ -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { - - return function addWith(Promise) { - /** - * Returns a promise whose handlers will be called with `this` set to - * the supplied receiver. Subsequent promises derived from the - * returned promise will also have their handlers called with receiver - * as `this`. Calling `with` with undefined or no arguments will return - * a promise whose handlers will again be called in the usual Promises/A+ - * way (no `this`) thus safely undoing any previous `with` in the - * promise chain. - * - * WARNING: Promises returned from `with`/`withThis` are NOT Promises/A+ - * compliant, specifically violating 2.2.5 (http://promisesaplus.com/#point-41) - * - * @param {object} receiver `this` value for all handlers attached to - * the returned promise. - * @returns {Promise} - */ - Promise.prototype['with'] = Promise.prototype.withThis = function(receiver) { - var p = this._beget(); - var child = p._handler; - child.receiver = receiver; - this._handler.chain(child, receiver); - return p; - }; - - return Promise; - }; - -}).call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); -}(__webpack_require__(15))); - - - -/***/ }), -/* 214 */ -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -!(__WEBPACK_AMD_DEFINE_RESULT__ = (function(require) { - - var setTimer = __webpack_require__(72).setTimer; - var format = __webpack_require__(215); - - return function unhandledRejection(Promise) { - - var logError = noop; - var logInfo = noop; - var localConsole; - - if(typeof console !== 'undefined') { - // Alias console to prevent things like uglify's drop_console option from - // removing console.log/error. Unhandled rejections fall into the same - // category as uncaught exceptions, and build tools shouldn't silence them. - localConsole = console; - logError = typeof localConsole.error !== 'undefined' - ? function (e) { localConsole.error(e); } - : function (e) { localConsole.log(e); }; - - logInfo = typeof localConsole.info !== 'undefined' - ? function (e) { localConsole.info(e); } - : function (e) { localConsole.log(e); }; - } - - Promise.onPotentiallyUnhandledRejection = function(rejection) { - enqueue(report, rejection); - }; - - Promise.onPotentiallyUnhandledRejectionHandled = function(rejection) { - enqueue(unreport, rejection); - }; - - Promise.onFatalRejection = function(rejection) { - enqueue(throwit, rejection.value); - }; - - var tasks = []; - var reported = []; - var running = null; - - function report(r) { - if(!r.handled) { - reported.push(r); - logError('Potentially unhandled rejection [' + r.id + '] ' + format.formatError(r.value)); - } - } - - function unreport(r) { - var i = reported.indexOf(r); - if(i >= 0) { - reported.splice(i, 1); - logInfo('Handled previous rejection [' + r.id + '] ' + format.formatObject(r.value)); - } - } - - function enqueue(f, x) { - tasks.push(f, x); - if(running === null) { - running = setTimer(flush, 0); - } - } - - function flush() { - running = null; - while(tasks.length > 0) { - tasks.shift()(tasks.shift()); - } - } - - return Promise; - }; - - function throwit(e) { - throw e; - } - - function noop() {} - -}).call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); -}(__webpack_require__(15))); - - -/***/ }), -/* 215 */ -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { - - return { - formatError: formatError, - formatObject: formatObject, - tryStringify: tryStringify - }; - - /** - * Format an error into a string. If e is an Error and has a stack property, - * it's returned. Otherwise, e is formatted using formatObject, with a - * warning added about e not being a proper Error. - * @param {*} e - * @returns {String} formatted string, suitable for output to developers - */ - function formatError(e) { - var s = typeof e === 'object' && e !== null && (e.stack || e.message) ? e.stack || e.message : formatObject(e); - return e instanceof Error ? s : s + ' (WARNING: non-Error used)'; - } - - /** - * Format an object, detecting "plain" objects and running them through - * JSON.stringify if possible. - * @param {Object} o - * @returns {string} - */ - function formatObject(o) { - var s = String(o); - if(s === '[object Object]' && typeof JSON !== 'undefined') { - s = tryStringify(o, s); - } - return s; - } - - /** - * Try to return the result of JSON.stringify(x). If that fails, return - * defaultValue - * @param {*} x - * @param {*} defaultValue - * @returns {String|*} JSON.stringify(x) or defaultValue - */ - function tryStringify(x, defaultValue) { - try { - return JSON.stringify(x); - } catch(e) { - return defaultValue; - } - } - -}).call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); -}(__webpack_require__(15))); - - -/***/ }), -/* 216 */ -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -!(__WEBPACK_AMD_DEFINE_RESULT__ = (function (require) { - - var makePromise = __webpack_require__(217); - var Scheduler = __webpack_require__(218); - var async = __webpack_require__(72).asap; - - return makePromise({ - scheduler: new Scheduler(async) - }); - -}).call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); -})(__webpack_require__(15)); - - -/***/ }), -/* 217 */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(process) {var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { - - return function makePromise(environment) { - - var tasks = environment.scheduler; - var emitRejection = initEmitRejection(); - - var objectCreate = Object.create || - function(proto) { - function Child() {} - Child.prototype = proto; - return new Child(); - }; - - /** - * Create a promise whose fate is determined by resolver - * @constructor - * @returns {Promise} promise - * @name Promise - */ - function Promise(resolver, handler) { - this._handler = resolver === Handler ? handler : init(resolver); - } - - /** - * Run the supplied resolver - * @param resolver - * @returns {Pending} - */ - function init(resolver) { - var handler = new Pending(); - - try { - resolver(promiseResolve, promiseReject, promiseNotify); - } catch (e) { - promiseReject(e); - } - - return handler; - - /** - * Transition from pre-resolution state to post-resolution state, notifying - * all listeners of the ultimate fulfillment or rejection - * @param {*} x resolution value - */ - function promiseResolve (x) { - handler.resolve(x); - } - /** - * Reject this promise with reason, which will be used verbatim - * @param {Error|*} reason rejection reason, strongly suggested - * to be an Error type - */ - function promiseReject (reason) { - handler.reject(reason); - } - - /** - * @deprecated - * Issue a progress event, notifying all progress listeners - * @param {*} x progress event payload to pass to all listeners - */ - function promiseNotify (x) { - handler.notify(x); - } - } - - // Creation - - Promise.resolve = resolve; - Promise.reject = reject; - Promise.never = never; - - Promise._defer = defer; - Promise._handler = getHandler; - - /** - * Returns a trusted promise. If x is already a trusted promise, it is - * returned, otherwise returns a new trusted Promise which follows x. - * @param {*} x - * @return {Promise} promise - */ - function resolve(x) { - return isPromise(x) ? x - : new Promise(Handler, new Async(getHandler(x))); - } - - /** - * Return a reject promise with x as its reason (x is used verbatim) - * @param {*} x - * @returns {Promise} rejected promise - */ - function reject(x) { - return new Promise(Handler, new Async(new Rejected(x))); - } - - /** - * Return a promise that remains pending forever - * @returns {Promise} forever-pending promise. - */ - function never() { - return foreverPendingPromise; // Should be frozen - } - - /** - * Creates an internal {promise, resolver} pair - * @private - * @returns {Promise} - */ - function defer() { - return new Promise(Handler, new Pending()); - } - - // Transformation and flow control - - /** - * Transform this promise's fulfillment value, returning a new Promise - * for the transformed result. If the promise cannot be fulfilled, onRejected - * is called with the reason. onProgress *may* be called with updates toward - * this promise's fulfillment. - * @param {function=} onFulfilled fulfillment handler - * @param {function=} onRejected rejection handler - * @param {function=} onProgress @deprecated progress handler - * @return {Promise} new promise - */ - Promise.prototype.then = function(onFulfilled, onRejected, onProgress) { - var parent = this._handler; - var state = parent.join().state(); - - if ((typeof onFulfilled !== 'function' && state > 0) || - (typeof onRejected !== 'function' && state < 0)) { - // Short circuit: value will not change, simply share handler - return new this.constructor(Handler, parent); - } - - var p = this._beget(); - var child = p._handler; - - parent.chain(child, parent.receiver, onFulfilled, onRejected, onProgress); - - return p; - }; - - /** - * If this promise cannot be fulfilled due to an error, call onRejected to - * handle the error. Shortcut for .then(undefined, onRejected) - * @param {function?} onRejected - * @return {Promise} - */ - Promise.prototype['catch'] = function(onRejected) { - return this.then(void 0, onRejected); - }; - - /** - * Creates a new, pending promise of the same type as this promise - * @private - * @returns {Promise} - */ - Promise.prototype._beget = function() { - return begetFrom(this._handler, this.constructor); - }; - - function begetFrom(parent, Promise) { - var child = new Pending(parent.receiver, parent.join().context); - return new Promise(Handler, child); - } - - // Array combinators - - Promise.all = all; - Promise.race = race; - Promise._traverse = traverse; - - /** - * Return a promise that will fulfill when all promises in the - * input array have fulfilled, or will reject when one of the - * promises rejects. - * @param {array} promises array of promises - * @returns {Promise} promise for array of fulfillment values - */ - function all(promises) { - return traverseWith(snd, null, promises); - } - - /** - * Array> -> Promise> - * @private - * @param {function} f function to apply to each promise's value - * @param {Array} promises array of promises - * @returns {Promise} promise for transformed values - */ - function traverse(f, promises) { - return traverseWith(tryCatch2, f, promises); - } - - function traverseWith(tryMap, f, promises) { - var handler = typeof f === 'function' ? mapAt : settleAt; - - var resolver = new Pending(); - var pending = promises.length >>> 0; - var results = new Array(pending); - - for (var i = 0, x; i < promises.length && !resolver.resolved; ++i) { - x = promises[i]; - - if (x === void 0 && !(i in promises)) { - --pending; - continue; - } - - traverseAt(promises, handler, i, x, resolver); - } - - if(pending === 0) { - resolver.become(new Fulfilled(results)); - } - - return new Promise(Handler, resolver); - - function mapAt(i, x, resolver) { - if(!resolver.resolved) { - traverseAt(promises, settleAt, i, tryMap(f, x, i), resolver); - } - } - - function settleAt(i, x, resolver) { - results[i] = x; - if(--pending === 0) { - resolver.become(new Fulfilled(results)); - } - } - } - - function traverseAt(promises, handler, i, x, resolver) { - if (maybeThenable(x)) { - var h = getHandlerMaybeThenable(x); - var s = h.state(); - - if (s === 0) { - h.fold(handler, i, void 0, resolver); - } else if (s > 0) { - handler(i, h.value, resolver); - } else { - resolver.become(h); - visitRemaining(promises, i+1, h); - } - } else { - handler(i, x, resolver); - } - } - - Promise._visitRemaining = visitRemaining; - function visitRemaining(promises, start, handler) { - for(var i=start; i> 2] |= message[index] << SHIFT[i++ & 3]; + } + } else { + for (i = this.start; index < length && i < 64; ++index) { + code = message.charCodeAt(index); + if (code < 0x80) { + blocks[i >> 2] |= code << SHIFT[i++ & 3]; + } else if (code < 0x800) { + blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; + } else if (code < 0xd800 || code >= 0xe000) { + blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; + } else { + code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff)); + blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; + } + } + } + + this.lastByteIndex = i; + this.bytes += i - this.start; + if (i >= 64) { + this.block = blocks[16]; + this.start = i - 64; + this.hash(); + this.hashed = true; + } else { + this.start = i; + } + } + if (this.bytes > 4294967295) { + this.hBytes += this.bytes / 4294967296 << 0; + this.bytes = this.bytes % 4294967296; + } + return this; + }; + + Sha256.prototype.finalize = function () { + if (this.finalized) { + return; + } + this.finalized = true; + var blocks = this.blocks, i = this.lastByteIndex; + blocks[16] = this.block; + blocks[i >> 2] |= EXTRA[i & 3]; + this.block = blocks[16]; + if (i >= 56) { + if (!this.hashed) { + this.hash(); + } + blocks[0] = this.block; + blocks[16] = blocks[1] = blocks[2] = blocks[3] = + blocks[4] = blocks[5] = blocks[6] = blocks[7] = + blocks[8] = blocks[9] = blocks[10] = blocks[11] = + blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0; + } + blocks[14] = this.hBytes << 3 | this.bytes >>> 29; + blocks[15] = this.bytes << 3; + this.hash(); + }; + + Sha256.prototype.hash = function () { + var a = this.h0, b = this.h1, c = this.h2, d = this.h3, e = this.h4, f = this.h5, g = this.h6, + h = this.h7, blocks = this.blocks, j, s0, s1, maj, t1, t2, ch, ab, da, cd, bc; + + for (j = 16; j < 64; ++j) { + // rightrotate + t1 = blocks[j - 15]; + s0 = ((t1 >>> 7) | (t1 << 25)) ^ ((t1 >>> 18) | (t1 << 14)) ^ (t1 >>> 3); + t1 = blocks[j - 2]; + s1 = ((t1 >>> 17) | (t1 << 15)) ^ ((t1 >>> 19) | (t1 << 13)) ^ (t1 >>> 10); + blocks[j] = blocks[j - 16] + s0 + blocks[j - 7] + s1 << 0; + } + + bc = b & c; + for (j = 0; j < 64; j += 4) { + if (this.first) { + if (this.is224) { + ab = 300032; + t1 = blocks[0] - 1413257819; + h = t1 - 150054599 << 0; + d = t1 + 24177077 << 0; + } else { + ab = 704751109; + t1 = blocks[0] - 210244248; + h = t1 - 1521486534 << 0; + d = t1 + 143694565 << 0; + } + this.first = false; + } else { + s0 = ((a >>> 2) | (a << 30)) ^ ((a >>> 13) | (a << 19)) ^ ((a >>> 22) | (a << 10)); + s1 = ((e >>> 6) | (e << 26)) ^ ((e >>> 11) | (e << 21)) ^ ((e >>> 25) | (e << 7)); + ab = a & b; + maj = ab ^ (a & c) ^ bc; + ch = (e & f) ^ (~e & g); + t1 = h + s1 + ch + K[j] + blocks[j]; + t2 = s0 + maj; + h = d + t1 << 0; + d = t1 + t2 << 0; + } + s0 = ((d >>> 2) | (d << 30)) ^ ((d >>> 13) | (d << 19)) ^ ((d >>> 22) | (d << 10)); + s1 = ((h >>> 6) | (h << 26)) ^ ((h >>> 11) | (h << 21)) ^ ((h >>> 25) | (h << 7)); + da = d & a; + maj = da ^ (d & b) ^ ab; + ch = (h & e) ^ (~h & f); + t1 = g + s1 + ch + K[j + 1] + blocks[j + 1]; + t2 = s0 + maj; + g = c + t1 << 0; + c = t1 + t2 << 0; + s0 = ((c >>> 2) | (c << 30)) ^ ((c >>> 13) | (c << 19)) ^ ((c >>> 22) | (c << 10)); + s1 = ((g >>> 6) | (g << 26)) ^ ((g >>> 11) | (g << 21)) ^ ((g >>> 25) | (g << 7)); + cd = c & d; + maj = cd ^ (c & a) ^ da; + ch = (g & h) ^ (~g & e); + t1 = f + s1 + ch + K[j + 2] + blocks[j + 2]; + t2 = s0 + maj; + f = b + t1 << 0; + b = t1 + t2 << 0; + s0 = ((b >>> 2) | (b << 30)) ^ ((b >>> 13) | (b << 19)) ^ ((b >>> 22) | (b << 10)); + s1 = ((f >>> 6) | (f << 26)) ^ ((f >>> 11) | (f << 21)) ^ ((f >>> 25) | (f << 7)); + bc = b & c; + maj = bc ^ (b & d) ^ cd; + ch = (f & g) ^ (~f & h); + t1 = e + s1 + ch + K[j + 3] + blocks[j + 3]; + t2 = s0 + maj; + e = a + t1 << 0; + a = t1 + t2 << 0; + } + + this.h0 = this.h0 + a << 0; + this.h1 = this.h1 + b << 0; + this.h2 = this.h2 + c << 0; + this.h3 = this.h3 + d << 0; + this.h4 = this.h4 + e << 0; + this.h5 = this.h5 + f << 0; + this.h6 = this.h6 + g << 0; + this.h7 = this.h7 + h << 0; + }; + + Sha256.prototype.hex = function () { + this.finalize(); + + var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5, + h6 = this.h6, h7 = this.h7; + + var hex = HEX_CHARS[(h0 >> 28) & 0x0F] + HEX_CHARS[(h0 >> 24) & 0x0F] + + HEX_CHARS[(h0 >> 20) & 0x0F] + HEX_CHARS[(h0 >> 16) & 0x0F] + + HEX_CHARS[(h0 >> 12) & 0x0F] + HEX_CHARS[(h0 >> 8) & 0x0F] + + HEX_CHARS[(h0 >> 4) & 0x0F] + HEX_CHARS[h0 & 0x0F] + + HEX_CHARS[(h1 >> 28) & 0x0F] + HEX_CHARS[(h1 >> 24) & 0x0F] + + HEX_CHARS[(h1 >> 20) & 0x0F] + HEX_CHARS[(h1 >> 16) & 0x0F] + + HEX_CHARS[(h1 >> 12) & 0x0F] + HEX_CHARS[(h1 >> 8) & 0x0F] + + HEX_CHARS[(h1 >> 4) & 0x0F] + HEX_CHARS[h1 & 0x0F] + + HEX_CHARS[(h2 >> 28) & 0x0F] + HEX_CHARS[(h2 >> 24) & 0x0F] + + HEX_CHARS[(h2 >> 20) & 0x0F] + HEX_CHARS[(h2 >> 16) & 0x0F] + + HEX_CHARS[(h2 >> 12) & 0x0F] + HEX_CHARS[(h2 >> 8) & 0x0F] + + HEX_CHARS[(h2 >> 4) & 0x0F] + HEX_CHARS[h2 & 0x0F] + + HEX_CHARS[(h3 >> 28) & 0x0F] + HEX_CHARS[(h3 >> 24) & 0x0F] + + HEX_CHARS[(h3 >> 20) & 0x0F] + HEX_CHARS[(h3 >> 16) & 0x0F] + + HEX_CHARS[(h3 >> 12) & 0x0F] + HEX_CHARS[(h3 >> 8) & 0x0F] + + HEX_CHARS[(h3 >> 4) & 0x0F] + HEX_CHARS[h3 & 0x0F] + + HEX_CHARS[(h4 >> 28) & 0x0F] + HEX_CHARS[(h4 >> 24) & 0x0F] + + HEX_CHARS[(h4 >> 20) & 0x0F] + HEX_CHARS[(h4 >> 16) & 0x0F] + + HEX_CHARS[(h4 >> 12) & 0x0F] + HEX_CHARS[(h4 >> 8) & 0x0F] + + HEX_CHARS[(h4 >> 4) & 0x0F] + HEX_CHARS[h4 & 0x0F] + + HEX_CHARS[(h5 >> 28) & 0x0F] + HEX_CHARS[(h5 >> 24) & 0x0F] + + HEX_CHARS[(h5 >> 20) & 0x0F] + HEX_CHARS[(h5 >> 16) & 0x0F] + + HEX_CHARS[(h5 >> 12) & 0x0F] + HEX_CHARS[(h5 >> 8) & 0x0F] + + HEX_CHARS[(h5 >> 4) & 0x0F] + HEX_CHARS[h5 & 0x0F] + + HEX_CHARS[(h6 >> 28) & 0x0F] + HEX_CHARS[(h6 >> 24) & 0x0F] + + HEX_CHARS[(h6 >> 20) & 0x0F] + HEX_CHARS[(h6 >> 16) & 0x0F] + + HEX_CHARS[(h6 >> 12) & 0x0F] + HEX_CHARS[(h6 >> 8) & 0x0F] + + HEX_CHARS[(h6 >> 4) & 0x0F] + HEX_CHARS[h6 & 0x0F]; + if (!this.is224) { + hex += HEX_CHARS[(h7 >> 28) & 0x0F] + HEX_CHARS[(h7 >> 24) & 0x0F] + + HEX_CHARS[(h7 >> 20) & 0x0F] + HEX_CHARS[(h7 >> 16) & 0x0F] + + HEX_CHARS[(h7 >> 12) & 0x0F] + HEX_CHARS[(h7 >> 8) & 0x0F] + + HEX_CHARS[(h7 >> 4) & 0x0F] + HEX_CHARS[h7 & 0x0F]; + } + return hex; + }; + + Sha256.prototype.toString = Sha256.prototype.hex; + + Sha256.prototype.digest = function () { + this.finalize(); + + var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5, + h6 = this.h6, h7 = this.h7; + + var arr = [ + (h0 >> 24) & 0xFF, (h0 >> 16) & 0xFF, (h0 >> 8) & 0xFF, h0 & 0xFF, + (h1 >> 24) & 0xFF, (h1 >> 16) & 0xFF, (h1 >> 8) & 0xFF, h1 & 0xFF, + (h2 >> 24) & 0xFF, (h2 >> 16) & 0xFF, (h2 >> 8) & 0xFF, h2 & 0xFF, + (h3 >> 24) & 0xFF, (h3 >> 16) & 0xFF, (h3 >> 8) & 0xFF, h3 & 0xFF, + (h4 >> 24) & 0xFF, (h4 >> 16) & 0xFF, (h4 >> 8) & 0xFF, h4 & 0xFF, + (h5 >> 24) & 0xFF, (h5 >> 16) & 0xFF, (h5 >> 8) & 0xFF, h5 & 0xFF, + (h6 >> 24) & 0xFF, (h6 >> 16) & 0xFF, (h6 >> 8) & 0xFF, h6 & 0xFF + ]; + if (!this.is224) { + arr.push((h7 >> 24) & 0xFF, (h7 >> 16) & 0xFF, (h7 >> 8) & 0xFF, h7 & 0xFF); + } + return arr; + }; + + Sha256.prototype.array = Sha256.prototype.digest; + + Sha256.prototype.arrayBuffer = function () { + this.finalize(); + + var buffer = new ArrayBuffer(this.is224 ? 28 : 32); + var dataView = new DataView(buffer); + dataView.setUint32(0, this.h0); + dataView.setUint32(4, this.h1); + dataView.setUint32(8, this.h2); + dataView.setUint32(12, this.h3); + dataView.setUint32(16, this.h4); + dataView.setUint32(20, this.h5); + dataView.setUint32(24, this.h6); + if (!this.is224) { + dataView.setUint32(28, this.h7); + } + return buffer; + }; + + function HmacSha256(key, is224, sharedMemory) { + var i, type = typeof key; + if (type === 'string') { + var bytes = [], length = key.length, index = 0, code; + for (i = 0; i < length; ++i) { + code = key.charCodeAt(i); + if (code < 0x80) { + bytes[index++] = code; + } else if (code < 0x800) { + bytes[index++] = (0xc0 | (code >> 6)); + bytes[index++] = (0x80 | (code & 0x3f)); + } else if (code < 0xd800 || code >= 0xe000) { + bytes[index++] = (0xe0 | (code >> 12)); + bytes[index++] = (0x80 | ((code >> 6) & 0x3f)); + bytes[index++] = (0x80 | (code & 0x3f)); + } else { + code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff)); + bytes[index++] = (0xf0 | (code >> 18)); + bytes[index++] = (0x80 | ((code >> 12) & 0x3f)); + bytes[index++] = (0x80 | ((code >> 6) & 0x3f)); + bytes[index++] = (0x80 | (code & 0x3f)); + } + } + key = bytes; + } else { + if (type === 'object') { + if (key === null) { + throw new Error(ERROR); + } else if (ARRAY_BUFFER && key.constructor === ArrayBuffer) { + key = new Uint8Array(key); + } else if (!Array.isArray(key)) { + if (!ARRAY_BUFFER || !ArrayBuffer.isView(key)) { + throw new Error(ERROR); + } + } + } else { + throw new Error(ERROR); + } + } + + if (key.length > 64) { + key = (new Sha256(is224, true)).update(key).array(); + } + + var oKeyPad = [], iKeyPad = []; + for (i = 0; i < 64; ++i) { + var b = key[i] || 0; + oKeyPad[i] = 0x5c ^ b; + iKeyPad[i] = 0x36 ^ b; + } + + Sha256.call(this, is224, sharedMemory); + + this.update(iKeyPad); + this.oKeyPad = oKeyPad; + this.inner = true; + this.sharedMemory = sharedMemory; + } + HmacSha256.prototype = new Sha256(); + + HmacSha256.prototype.finalize = function () { + Sha256.prototype.finalize.call(this); + if (this.inner) { + this.inner = false; + var innerHash = this.array(); + Sha256.call(this, this.is224, this.sharedMemory); + this.update(this.oKeyPad); + this.update(innerHash); + Sha256.prototype.finalize.call(this); + } + }; + + var exports = createMethod(); + exports.sha256 = exports; + exports.sha224 = createMethod(true); + exports.sha256.hmac = createHmacMethod(); + exports.sha224.hmac = createHmacMethod(true); + + if (COMMON_JS) { + module.exports = exports; + } else { + root.sha256 = exports.sha256; + root.sha224 = exports.sha224; + if (AMD) { + !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { + return exports; + }).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } + } +})(); + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6), __webpack_require__(49))) + +/***/ }), +/* 198 */ +/***/ (function(module, exports) { + +/* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */ +module.exports = __webpack_amd_options__; + +/* WEBPACK VAR INJECTION */}.call(exports, {})) + +/***/ }), +/* 199 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65504,7 +62544,7 @@ var GoogleMiddleware = function () { exports.default = GoogleMiddleware; /***/ }), -/* 223 */ +/* 200 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65525,8 +62565,8 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr var helpers = __webpack_require__(1); var coreActions = __webpack_require__(10); var uiActions = __webpack_require__(3); -var pusherActions = __webpack_require__(12); -var snapcastActions = __webpack_require__(37); +var pusherActions = __webpack_require__(13); +var snapcastActions = __webpack_require__(36); var SnapcastMiddleware = function () { @@ -65984,7 +63024,7 @@ var SnapcastMiddleware = function () { exports.default = SnapcastMiddleware; /***/ }), -/* 224 */ +/* 201 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -66226,7 +63266,7 @@ var localstorageMiddleware = function () { exports.default = localstorageMiddleware; /***/ }), -/* 225 */ +/* 202 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -66242,13 +63282,13 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(49); +var _reactDom = __webpack_require__(48); var _reactDom2 = _interopRequireDefault(_reactDom); var _redux = __webpack_require__(2); -var _reactRouterDom = __webpack_require__(32); +var _reactRouterDom = __webpack_require__(31); var _reactRedux = __webpack_require__(4); @@ -66256,159 +63296,159 @@ var _reactGa = __webpack_require__(14); var _reactGa2 = _interopRequireDefault(_reactGa); -var _Sidebar = __webpack_require__(226); +var _Sidebar = __webpack_require__(203); var _Sidebar2 = _interopRequireDefault(_Sidebar); -var _PlaybackControls = __webpack_require__(244); +var _PlaybackControls = __webpack_require__(221); var _PlaybackControls2 = _interopRequireDefault(_PlaybackControls); -var _ContextMenu = __webpack_require__(247); +var _ContextMenu = __webpack_require__(224); var _ContextMenu2 = _interopRequireDefault(_ContextMenu); -var _Dragger = __webpack_require__(249); +var _Dragger = __webpack_require__(226); var _Dragger2 = _interopRequireDefault(_Dragger); -var _Notifications = __webpack_require__(250); +var _Notifications = __webpack_require__(227); var _Notifications2 = _interopRequireDefault(_Notifications); -var _DebugInfo = __webpack_require__(251); +var _DebugInfo = __webpack_require__(228); var _DebugInfo2 = _interopRequireDefault(_DebugInfo); -var _ErrorBoundary = __webpack_require__(56); +var _ErrorBoundary = __webpack_require__(55); var _ErrorBoundary2 = _interopRequireDefault(_ErrorBoundary); -var _ErrorMessage = __webpack_require__(34); +var _ErrorMessage = __webpack_require__(33); var _ErrorMessage2 = _interopRequireDefault(_ErrorMessage); -var _Album = __webpack_require__(252); +var _Album = __webpack_require__(229); var _Album2 = _interopRequireDefault(_Album); -var _Artist = __webpack_require__(253); +var _Artist = __webpack_require__(230); var _Artist2 = _interopRequireDefault(_Artist); -var _Playlist = __webpack_require__(254); +var _Playlist = __webpack_require__(231); var _Playlist2 = _interopRequireDefault(_Playlist); -var _User = __webpack_require__(255); +var _User = __webpack_require__(232); var _User2 = _interopRequireDefault(_User); -var _Track = __webpack_require__(256); +var _Track = __webpack_require__(233); var _Track2 = _interopRequireDefault(_Track); -var _Queue = __webpack_require__(258); +var _Queue = __webpack_require__(235); var _Queue2 = _interopRequireDefault(_Queue); -var _QueueHistory = __webpack_require__(259); +var _QueueHistory = __webpack_require__(236); var _QueueHistory2 = _interopRequireDefault(_QueueHistory); -var _Debug = __webpack_require__(260); +var _Debug = __webpack_require__(237); var _Debug2 = _interopRequireDefault(_Debug); -var _Search = __webpack_require__(261); +var _Search = __webpack_require__(238); var _Search2 = _interopRequireDefault(_Search); -var _Settings = __webpack_require__(263); +var _Settings = __webpack_require__(240); var _Settings2 = _interopRequireDefault(_Settings); -var _DiscoverRecommendations = __webpack_require__(274); +var _DiscoverRecommendations = __webpack_require__(251); var _DiscoverRecommendations2 = _interopRequireDefault(_DiscoverRecommendations); -var _DiscoverFeatured = __webpack_require__(292); +var _DiscoverFeatured = __webpack_require__(269); var _DiscoverFeatured2 = _interopRequireDefault(_DiscoverFeatured); -var _DiscoverCategories = __webpack_require__(293); +var _DiscoverCategories = __webpack_require__(270); var _DiscoverCategories2 = _interopRequireDefault(_DiscoverCategories); -var _DiscoverCategory = __webpack_require__(295); +var _DiscoverCategory = __webpack_require__(272); var _DiscoverCategory2 = _interopRequireDefault(_DiscoverCategory); -var _DiscoverNewReleases = __webpack_require__(296); +var _DiscoverNewReleases = __webpack_require__(273); var _DiscoverNewReleases2 = _interopRequireDefault(_DiscoverNewReleases); -var _LibraryArtists = __webpack_require__(297); +var _LibraryArtists = __webpack_require__(274); var _LibraryArtists2 = _interopRequireDefault(_LibraryArtists); -var _LibraryAlbums = __webpack_require__(299); +var _LibraryAlbums = __webpack_require__(276); var _LibraryAlbums2 = _interopRequireDefault(_LibraryAlbums); -var _LibraryTracks = __webpack_require__(300); +var _LibraryTracks = __webpack_require__(277); var _LibraryTracks2 = _interopRequireDefault(_LibraryTracks); -var _LibraryPlaylists = __webpack_require__(301); +var _LibraryPlaylists = __webpack_require__(278); var _LibraryPlaylists2 = _interopRequireDefault(_LibraryPlaylists); -var _LibraryBrowse = __webpack_require__(302); +var _LibraryBrowse = __webpack_require__(279); var _LibraryBrowse2 = _interopRequireDefault(_LibraryBrowse); -var _LibraryBrowseDirectory = __webpack_require__(303); +var _LibraryBrowseDirectory = __webpack_require__(280); var _LibraryBrowseDirectory2 = _interopRequireDefault(_LibraryBrowseDirectory); -var _EditPlaylist = __webpack_require__(304); +var _EditPlaylist = __webpack_require__(281); var _EditPlaylist2 = _interopRequireDefault(_EditPlaylist); -var _CreatePlaylist = __webpack_require__(305); +var _CreatePlaylist = __webpack_require__(282); var _CreatePlaylist2 = _interopRequireDefault(_CreatePlaylist); -var _EditRadio = __webpack_require__(306); +var _EditRadio = __webpack_require__(283); var _EditRadio2 = _interopRequireDefault(_EditRadio); -var _AddToQueue = __webpack_require__(307); +var _AddToQueue = __webpack_require__(284); var _AddToQueue2 = _interopRequireDefault(_AddToQueue); -var _InitialSetup = __webpack_require__(308); +var _InitialSetup = __webpack_require__(285); var _InitialSetup2 = _interopRequireDefault(_InitialSetup); -var _KioskMode = __webpack_require__(309); +var _KioskMode = __webpack_require__(286); var _KioskMode2 = _interopRequireDefault(_KioskMode); -var _ShareConfiguration = __webpack_require__(310); +var _ShareConfiguration = __webpack_require__(287); var _ShareConfiguration2 = _interopRequireDefault(_ShareConfiguration); -var _AddToPlaylist = __webpack_require__(311); +var _AddToPlaylist = __webpack_require__(288); var _AddToPlaylist2 = _interopRequireDefault(_AddToPlaylist); -var _ImageZoom = __webpack_require__(312); +var _ImageZoom = __webpack_require__(289); var _ImageZoom2 = _interopRequireDefault(_ImageZoom); -var _EditCommand = __webpack_require__(313); +var _EditCommand = __webpack_require__(290); var _EditCommand2 = _interopRequireDefault(_EditCommand); @@ -66424,7 +63464,7 @@ var _actions2 = __webpack_require__(3); var uiActions = _interopRequireWildcard(_actions2); -var _actions3 = __webpack_require__(12); +var _actions3 = __webpack_require__(13); var pusherActions = _interopRequireWildcard(_actions3); @@ -66440,11 +63480,11 @@ var _actions6 = __webpack_require__(16); var lastfmActions = _interopRequireWildcard(_actions6); -var _actions7 = __webpack_require__(36); +var _actions7 = __webpack_require__(35); var geniusActions = _interopRequireWildcard(_actions7); -var _actions8 = __webpack_require__(37); +var _actions8 = __webpack_require__(36); var snapcastActions = _interopRequireWildcard(_actions8); @@ -66928,7 +63968,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(App); /***/ }), -/* 226 */ +/* 203 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -66948,7 +63988,7 @@ var _reactRedux = __webpack_require__(4); var _redux = __webpack_require__(2); -var _reactRouter = __webpack_require__(38); +var _reactRouter = __webpack_require__(37); var _Link = __webpack_require__(8); @@ -66958,7 +63998,7 @@ var _Icon = __webpack_require__(5); var _Icon2 = _interopRequireDefault(_Icon); -var _Dropzones = __webpack_require__(242); +var _Dropzones = __webpack_require__(219); var _Dropzones2 = _interopRequireDefault(_Dropzones); @@ -67181,18 +64221,18 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)((0, _reactRouter.withRouter)(Sidebar)); /***/ }), -/* 227 */ +/* 204 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(39); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(38); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(29); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(28); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(75); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(77); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(72); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(74); 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; } @@ -67247,7 +64287,7 @@ MemoryRouter.propTypes = { /* harmony default export */ __webpack_exports__["a"] = (MemoryRouter); /***/ }), -/* 228 */ +/* 205 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -67260,10 +64300,10 @@ MemoryRouter.propTypes = { -var assign = __webpack_require__(31); +var assign = __webpack_require__(30); -var ReactPropTypesSecret = __webpack_require__(74); -var checkPropTypes = __webpack_require__(229); +var ReactPropTypesSecret = __webpack_require__(71); +var checkPropTypes = __webpack_require__(206); var printWarning = function() {}; @@ -67810,7 +64850,7 @@ module.exports = function(isValidElement, throwOnDirectAccess) { /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 229 */ +/* 206 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -67826,7 +64866,7 @@ module.exports = function(isValidElement, throwOnDirectAccess) { var printWarning = function() {}; if (process.env.NODE_ENV !== 'production') { - var ReactPropTypesSecret = __webpack_require__(74); + var ReactPropTypesSecret = __webpack_require__(71); var loggedTypeFailures = {}; printWarning = function(text) { @@ -67909,7 +64949,7 @@ module.exports = checkPropTypes; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 230 */ +/* 207 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -67922,7 +64962,7 @@ module.exports = checkPropTypes; -var ReactPropTypesSecret = __webpack_require__(74); +var ReactPropTypesSecret = __webpack_require__(71); function emptyFunction() {} @@ -67975,18 +65015,18 @@ module.exports = function() { /***/ }), -/* 231 */ +/* 208 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(54); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(53); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(105); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(97); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__LocationUtils__ = __webpack_require__(55); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PathUtils__ = __webpack_require__(44); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createTransitionManager__ = __webpack_require__(76); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__DOMUtils__ = __webpack_require__(106); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__LocationUtils__ = __webpack_require__(54); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PathUtils__ = __webpack_require__(43); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createTransitionManager__ = __webpack_require__(73); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__DOMUtils__ = __webpack_require__(98); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; @@ -68279,18 +65319,18 @@ var createBrowserHistory = function createBrowserHistory() { /* unused harmony default export */ var _unused_webpack_default_export = (createBrowserHistory); /***/ }), -/* 232 */ +/* 209 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(54); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(53); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(105); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(97); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__LocationUtils__ = __webpack_require__(55); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PathUtils__ = __webpack_require__(44); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createTransitionManager__ = __webpack_require__(76); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__DOMUtils__ = __webpack_require__(106); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__LocationUtils__ = __webpack_require__(54); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PathUtils__ = __webpack_require__(43); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createTransitionManager__ = __webpack_require__(73); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__DOMUtils__ = __webpack_require__(98); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; @@ -68600,15 +65640,15 @@ var createHashHistory = function createHashHistory() { /* unused harmony default export */ var _unused_webpack_default_export = (createHashHistory); /***/ }), -/* 233 */ +/* 210 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(54); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(53); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PathUtils__ = __webpack_require__(44); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__LocationUtils__ = __webpack_require__(55); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__ = __webpack_require__(76); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PathUtils__ = __webpack_require__(43); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__LocationUtils__ = __webpack_require__(54); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__ = __webpack_require__(73); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; @@ -68768,15 +65808,15 @@ var createMemoryHistory = function createMemoryHistory() { /* harmony default export */ __webpack_exports__["a"] = (createMemoryHistory); /***/ }), -/* 234 */ +/* 211 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(29); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(28); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(40); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(39); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -68859,20 +65899,20 @@ Prompt.contextTypes = { /* harmony default export */ __webpack_exports__["a"] = (Prompt); /***/ }), -/* 235 */ +/* 212 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(29); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(28); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(39); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(38); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_warning__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(40); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(39); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_history__ = __webpack_require__(75); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__generatePath__ = __webpack_require__(107); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_history__ = __webpack_require__(72); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__generatePath__ = __webpack_require__(99); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -68988,20 +66028,20 @@ Redirect.contextTypes = { /* harmony default export */ __webpack_exports__["a"] = (Redirect); /***/ }), -/* 236 */ +/* 213 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(39); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(38); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(40); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(39); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(29); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(28); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_history__ = __webpack_require__(75); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Router__ = __webpack_require__(77); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_history__ = __webpack_require__(72); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Router__ = __webpack_require__(74); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } @@ -69154,19 +66194,19 @@ StaticRouter.childContextTypes = { /* harmony default export */ __webpack_exports__["a"] = (StaticRouter); /***/ }), -/* 237 */ +/* 214 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(29); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(28); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(39); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(38); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_warning__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(40); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(39); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(78); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(75); 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; } @@ -69246,17 +66286,17 @@ Switch.propTypes = { /* harmony default export */ __webpack_exports__["a"] = (Switch); /***/ }), -/* 238 */ +/* 215 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(29); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(28); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__ = __webpack_require__(239); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__ = __webpack_require__(216); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Route__ = __webpack_require__(108); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Route__ = __webpack_require__(100); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } @@ -69295,7 +66335,7 @@ var withRouter = function withRouter(Component) { /* harmony default export */ __webpack_exports__["a"] = (withRouter); /***/ }), -/* 239 */ +/* 216 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69370,7 +66410,7 @@ module.exports = hoistNonReactStatics; /***/ }), -/* 240 */ +/* 217 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69388,11 +66428,11 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _propTypes = __webpack_require__(33); +var _propTypes = __webpack_require__(32); var _propTypes2 = _interopRequireDefault(_propTypes); -var _screenReaderStyles = __webpack_require__(241); +var _screenReaderStyles = __webpack_require__(218); var _screenReaderStyles2 = _interopRequireDefault(_screenReaderStyles); @@ -69517,7 +66557,7 @@ exports.default = FontAwesome; module.exports = exports['default']; /***/ }), -/* 241 */ +/* 218 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69539,7 +66579,7 @@ exports.default = { module.exports = exports['default']; /***/ }), -/* 242 */ +/* 219 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69559,9 +66599,9 @@ var _reactRedux = __webpack_require__(4); var _redux = __webpack_require__(2); -var _reactRouter = __webpack_require__(38); +var _reactRouter = __webpack_require__(37); -var _Dropzone = __webpack_require__(243); +var _Dropzone = __webpack_require__(220); var _Dropzone2 = _interopRequireDefault(_Dropzone); @@ -69682,7 +66722,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRouter.withRouter)((0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Dropzones)); /***/ }), -/* 243 */ +/* 220 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69781,7 +66821,7 @@ var Dropzone = function (_React$Component) { exports.default = Dropzone; /***/ }), -/* 244 */ +/* 221 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69805,27 +66845,27 @@ var _Link = __webpack_require__(8); var _Link2 = _interopRequireDefault(_Link); -var _ProgressSlider = __webpack_require__(109); +var _ProgressSlider = __webpack_require__(101); var _ProgressSlider2 = _interopRequireDefault(_ProgressSlider); -var _VolumeControl = __webpack_require__(79); +var _VolumeControl = __webpack_require__(76); var _VolumeControl2 = _interopRequireDefault(_VolumeControl); -var _MuteControl = __webpack_require__(80); +var _MuteControl = __webpack_require__(77); var _MuteControl2 = _interopRequireDefault(_MuteControl); -var _OutputControl = __webpack_require__(245); +var _OutputControl = __webpack_require__(222); var _OutputControl2 = _interopRequireDefault(_OutputControl); -var _Dater = __webpack_require__(26); +var _Dater = __webpack_require__(25); var _Dater2 = _interopRequireDefault(_Dater); -var _ArtistSentence = __webpack_require__(21); +var _ArtistSentence = __webpack_require__(20); var _ArtistSentence2 = _interopRequireDefault(_ArtistSentence); @@ -70354,10 +67394,10 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { }; exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(PlaybackControls); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(15))) /***/ }), -/* 245 */ +/* 222 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70377,15 +67417,15 @@ var _reactRedux = __webpack_require__(4); var _redux = __webpack_require__(2); -var _VolumeControl = __webpack_require__(79); +var _VolumeControl = __webpack_require__(76); var _VolumeControl2 = _interopRequireDefault(_VolumeControl); -var _MuteControl = __webpack_require__(80); +var _MuteControl = __webpack_require__(77); var _MuteControl2 = _interopRequireDefault(_MuteControl); -var _SnapcastPowerButton = __webpack_require__(246); +var _SnapcastPowerButton = __webpack_require__(223); var _SnapcastPowerButton2 = _interopRequireDefault(_SnapcastPowerButton); @@ -70401,11 +67441,11 @@ var _actions = __webpack_require__(10); var coreActions = _interopRequireWildcard(_actions); -var _actions2 = __webpack_require__(12); +var _actions2 = __webpack_require__(13); var pusherActions = _interopRequireWildcard(_actions2); -var _actions3 = __webpack_require__(37); +var _actions3 = __webpack_require__(36); var snapcastActions = _interopRequireWildcard(_actions3); @@ -70694,10 +67734,10 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { }; exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(OutputControl); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(15))) /***/ }), -/* 246 */ +/* 223 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70725,7 +67765,7 @@ var _helpers = __webpack_require__(1); var helpers = _interopRequireWildcard(_helpers); -var _actions = __webpack_require__(37); +var _actions = __webpack_require__(36); var snapcastActions = _interopRequireWildcard(_actions); @@ -70781,7 +67821,7 @@ var SnapcastPowerButton = function (_React$Component) { exports.default = SnapcastPowerButton; /***/ }), -/* 247 */ +/* 224 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70801,13 +67841,13 @@ var _reactRedux = __webpack_require__(4); var _redux = __webpack_require__(2); -var _reactRouter = __webpack_require__(38); +var _reactRouter = __webpack_require__(37); var _Link = __webpack_require__(8); var _Link2 = _interopRequireDefault(_Link); -var _TrackList = __webpack_require__(19); +var _TrackList = __webpack_require__(18); var _TrackList2 = _interopRequireDefault(_TrackList); @@ -70819,7 +67859,7 @@ var _Thumbnail = __webpack_require__(11); var _Thumbnail2 = _interopRequireDefault(_Thumbnail); -var _URILink = __webpack_require__(18); +var _URILink = __webpack_require__(17); var _URILink2 = _interopRequireDefault(_URILink); @@ -70835,7 +67875,7 @@ var _actions2 = __webpack_require__(3); var uiActions = _interopRequireWildcard(_actions2); -var _actions3 = __webpack_require__(12); +var _actions3 = __webpack_require__(13); var pusherActions = _interopRequireWildcard(_actions3); @@ -71090,17 +68130,13 @@ var ContextMenu = function (_React$Component) { key: 'playPlaylist', value: function playPlaylist(e) { this.props.uiActions.hideContextMenu(); - - // THis is the ideal setup: one action to play whatever type - // then the action detects playlist vs album vs artist vs track etc and - // loads as is required... then enqueue works the same - this.props.mopidyActions.playURIs(this.props.menu.uris[0], this.props.menu.uris[0]); + this.props.mopidyActions.playPlaylist(this.props.menu.uris[0]); } }, { key: 'enqueuePlaylist', value: function enqueuePlaylist(e) { this.props.uiActions.hideContextMenu(); - this.props.mopidyActions.playPlaylist(this.props.menu.uris[0]); + this.props.mopidyActions.enqueuePlaylist(this.props.menu.uris[0]); } }, { key: 'shufflePlayPlaylist', @@ -71117,10 +68153,10 @@ var ContextMenu = function (_React$Component) { }, { key: 'addToQueue', value: function addToQueue(e) { - var next = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var play_next = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; this.props.uiActions.hideContextMenu(); - this.props.mopidyActions.enqueueURIs(this.props.menu.uris, this.props.menu.tracklist_uri, next); + this.props.mopidyActions.enqueueURIs(this.props.menu.uris, this.props.menu.tracklist_uri, play_next); } }, { key: 'addTracksToPlaylist', @@ -71533,6 +68569,22 @@ var ContextMenu = function (_React$Component) { ) ); + var add_playlist_to_queue = _react2.default.createElement( + 'div', + { className: 'context-menu__item' }, + _react2.default.createElement( + 'a', + { className: 'context-menu__item__link', onClick: function onClick(e) { + return _this4.enqueuePlaylist(e); + } }, + _react2.default.createElement( + 'span', + { className: 'context-menu__item__label' }, + 'Add to queue' + ) + ) + ); + var add_to_playlist = _react2.default.createElement( 'div', { className: 'context-menu__item context-menu__item--has-submenu' }, @@ -71831,6 +68883,7 @@ var ContextMenu = function (_React$Component) { null, play_playlist, shuffle_play_playlist, + add_playlist_to_queue, this.canBeInLibrary() ? _react2.default.createElement('div', { className: 'context-menu__divider' }) : null, this.canBeInLibrary() ? toggle_in_library : null, _react2.default.createElement('div', { className: 'context-menu__divider' }), @@ -71995,10 +69048,10 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { }; exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)((0, _reactRouter.withRouter)(ContextMenu)); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(15))) /***/ }), -/* 248 */ +/* 225 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -72022,27 +69075,27 @@ var _Icon = __webpack_require__(5); var _Icon2 = _interopRequireDefault(_Icon); -var _ArtistSentence = __webpack_require__(21); +var _ArtistSentence = __webpack_require__(20); var _ArtistSentence2 = _interopRequireDefault(_ArtistSentence); -var _Dater = __webpack_require__(26); +var _Dater = __webpack_require__(25); var _Dater2 = _interopRequireDefault(_Dater); -var _URILink = __webpack_require__(18); +var _URILink = __webpack_require__(17); var _URILink2 = _interopRequireDefault(_URILink); -var _ContextMenuTrigger = __webpack_require__(23); +var _ContextMenuTrigger = __webpack_require__(22); var _ContextMenuTrigger2 = _interopRequireDefault(_ContextMenuTrigger); -var _Popularity = __webpack_require__(81); +var _Popularity = __webpack_require__(78); var _Popularity2 = _interopRequireDefault(_Popularity); -var _ErrorBoundary = __webpack_require__(56); +var _ErrorBoundary = __webpack_require__(55); var _ErrorBoundary2 = _interopRequireDefault(_ErrorBoundary); @@ -72466,10 +69519,10 @@ var Track = function (_React$Component) { }(_react2.default.Component); exports.default = Track; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(15))) /***/ }), -/* 249 */ +/* 226 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -72614,7 +69667,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Dragger); /***/ }), -/* 250 */ +/* 227 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -72924,7 +69977,7 @@ var Notifications = function (_React$Component) { exports.default = Notifications; /***/ }), -/* 251 */ +/* 228 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -73199,7 +70252,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(DebugInfo); /***/ }), -/* 252 */ +/* 229 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -73219,15 +70272,15 @@ var _reactRedux = __webpack_require__(4); var _redux = __webpack_require__(2); -var _ErrorMessage = __webpack_require__(34); +var _ErrorMessage = __webpack_require__(33); var _ErrorMessage2 = _interopRequireDefault(_ErrorMessage); -var _Header = __webpack_require__(13); +var _Header = __webpack_require__(12); var _Header2 = _interopRequireDefault(_Header); -var _TrackList = __webpack_require__(19); +var _TrackList = __webpack_require__(18); var _TrackList2 = _interopRequireDefault(_TrackList); @@ -73235,35 +70288,35 @@ var _Thumbnail = __webpack_require__(11); var _Thumbnail2 = _interopRequireDefault(_Thumbnail); -var _Parallax = __webpack_require__(30); +var _Parallax = __webpack_require__(29); var _Parallax2 = _interopRequireDefault(_Parallax); -var _ArtistSentence = __webpack_require__(21); +var _ArtistSentence = __webpack_require__(20); var _ArtistSentence2 = _interopRequireDefault(_ArtistSentence); -var _ArtistGrid = __webpack_require__(41); +var _ArtistGrid = __webpack_require__(40); var _ArtistGrid2 = _interopRequireDefault(_ArtistGrid); -var _FollowButton = __webpack_require__(45); +var _FollowButton = __webpack_require__(44); var _FollowButton2 = _interopRequireDefault(_FollowButton); -var _NiceNumber = __webpack_require__(57); +var _NiceNumber = __webpack_require__(56); var _NiceNumber2 = _interopRequireDefault(_NiceNumber); -var _Dater = __webpack_require__(26); +var _Dater = __webpack_require__(25); var _Dater2 = _interopRequireDefault(_Dater); -var _LazyLoadListener = __webpack_require__(22); +var _LazyLoadListener = __webpack_require__(21); var _LazyLoadListener2 = _interopRequireDefault(_LazyLoadListener); -var _ContextMenuTrigger = __webpack_require__(23); +var _ContextMenuTrigger = __webpack_require__(22); var _ContextMenuTrigger2 = _interopRequireDefault(_ContextMenuTrigger); @@ -73598,7 +70651,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Album); /***/ }), -/* 253 */ +/* 230 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -73618,11 +70671,11 @@ var _reactRedux = __webpack_require__(4); var _redux = __webpack_require__(2); -var _reactRouter = __webpack_require__(38); +var _reactRouter = __webpack_require__(37); -var _reactRouterDom = __webpack_require__(32); +var _reactRouterDom = __webpack_require__(31); -var _ErrorMessage = __webpack_require__(34); +var _ErrorMessage = __webpack_require__(33); var _ErrorMessage2 = _interopRequireDefault(_ErrorMessage); @@ -73630,23 +70683,23 @@ var _Link = __webpack_require__(8); var _Link2 = _interopRequireDefault(_Link); -var _LazyLoadListener = __webpack_require__(22); +var _LazyLoadListener = __webpack_require__(21); var _LazyLoadListener2 = _interopRequireDefault(_LazyLoadListener); -var _Header = __webpack_require__(13); +var _Header = __webpack_require__(12); var _Header2 = _interopRequireDefault(_Header); -var _NiceNumber = __webpack_require__(57); +var _NiceNumber = __webpack_require__(56); var _NiceNumber2 = _interopRequireDefault(_NiceNumber); -var _TrackList = __webpack_require__(19); +var _TrackList = __webpack_require__(18); var _TrackList2 = _interopRequireDefault(_TrackList); -var _AlbumGrid = __webpack_require__(46); +var _AlbumGrid = __webpack_require__(45); var _AlbumGrid2 = _interopRequireDefault(_AlbumGrid); @@ -73654,27 +70707,27 @@ var _Thumbnail = __webpack_require__(11); var _Thumbnail2 = _interopRequireDefault(_Thumbnail); -var _Parallax = __webpack_require__(30); +var _Parallax = __webpack_require__(29); var _Parallax2 = _interopRequireDefault(_Parallax); -var _ArtistGrid = __webpack_require__(41); +var _ArtistGrid = __webpack_require__(40); var _ArtistGrid2 = _interopRequireDefault(_ArtistGrid); -var _RelatedArtists = __webpack_require__(110); +var _RelatedArtists = __webpack_require__(102); var _RelatedArtists2 = _interopRequireDefault(_RelatedArtists); -var _FollowButton = __webpack_require__(45); +var _FollowButton = __webpack_require__(44); var _FollowButton2 = _interopRequireDefault(_FollowButton); -var _ContextMenuTrigger = __webpack_require__(23); +var _ContextMenuTrigger = __webpack_require__(22); var _ContextMenuTrigger2 = _interopRequireDefault(_ContextMenuTrigger); -var _DropdownField = __webpack_require__(27); +var _DropdownField = __webpack_require__(26); var _DropdownField2 = _interopRequireDefault(_DropdownField); @@ -73698,7 +70751,7 @@ var _actions3 = __webpack_require__(7); var mopidyActions = _interopRequireWildcard(_actions3); -var _actions4 = __webpack_require__(12); +var _actions4 = __webpack_require__(13); var pusherActions = _interopRequireWildcard(_actions4); @@ -74325,7 +71378,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Artist); /***/ }), -/* 254 */ +/* 231 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74349,7 +71402,7 @@ var _reactGa = __webpack_require__(14); var _reactGa2 = _interopRequireDefault(_reactGa); -var _ErrorMessage = __webpack_require__(34); +var _ErrorMessage = __webpack_require__(33); var _ErrorMessage2 = _interopRequireDefault(_ErrorMessage); @@ -74357,7 +71410,7 @@ var _Link = __webpack_require__(8); var _Link2 = _interopRequireDefault(_Link); -var _TrackList = __webpack_require__(19); +var _TrackList = __webpack_require__(18); var _TrackList2 = _interopRequireDefault(_TrackList); @@ -74365,39 +71418,39 @@ var _Thumbnail = __webpack_require__(11); var _Thumbnail2 = _interopRequireDefault(_Thumbnail); -var _Parallax = __webpack_require__(30); +var _Parallax = __webpack_require__(29); var _Parallax2 = _interopRequireDefault(_Parallax); -var _NiceNumber = __webpack_require__(57); +var _NiceNumber = __webpack_require__(56); var _NiceNumber2 = _interopRequireDefault(_NiceNumber); -var _Dater = __webpack_require__(26); +var _Dater = __webpack_require__(25); var _Dater2 = _interopRequireDefault(_Dater); -var _ConfirmationButton = __webpack_require__(111); +var _ConfirmationButton = __webpack_require__(103); var _ConfirmationButton2 = _interopRequireDefault(_ConfirmationButton); -var _LazyLoadListener = __webpack_require__(22); +var _LazyLoadListener = __webpack_require__(21); var _LazyLoadListener2 = _interopRequireDefault(_LazyLoadListener); -var _FollowButton = __webpack_require__(45); +var _FollowButton = __webpack_require__(44); var _FollowButton2 = _interopRequireDefault(_FollowButton); -var _Header = __webpack_require__(13); +var _Header = __webpack_require__(12); var _Header2 = _interopRequireDefault(_Header); -var _ContextMenuTrigger = __webpack_require__(23); +var _ContextMenuTrigger = __webpack_require__(22); var _ContextMenuTrigger2 = _interopRequireDefault(_ContextMenuTrigger); -var _URILink = __webpack_require__(18); +var _URILink = __webpack_require__(17); var _URILink2 = _interopRequireDefault(_URILink); @@ -74818,7 +71871,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Playlist); /***/ }), -/* 255 */ +/* 232 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74838,7 +71891,7 @@ var _reactRedux = __webpack_require__(4); var _redux = __webpack_require__(2); -var _ErrorMessage = __webpack_require__(34); +var _ErrorMessage = __webpack_require__(33); var _ErrorMessage2 = _interopRequireDefault(_ErrorMessage); @@ -74846,27 +71899,27 @@ var _Thumbnail = __webpack_require__(11); var _Thumbnail2 = _interopRequireDefault(_Thumbnail); -var _PlaylistGrid = __webpack_require__(47); +var _PlaylistGrid = __webpack_require__(46); var _PlaylistGrid2 = _interopRequireDefault(_PlaylistGrid); -var _FollowButton = __webpack_require__(45); +var _FollowButton = __webpack_require__(44); var _FollowButton2 = _interopRequireDefault(_FollowButton); -var _LazyLoadListener = __webpack_require__(22); +var _LazyLoadListener = __webpack_require__(21); var _LazyLoadListener2 = _interopRequireDefault(_LazyLoadListener); -var _Parallax = __webpack_require__(30); +var _Parallax = __webpack_require__(29); var _Parallax2 = _interopRequireDefault(_Parallax); -var _NiceNumber = __webpack_require__(57); +var _NiceNumber = __webpack_require__(56); var _NiceNumber2 = _interopRequireDefault(_NiceNumber); -var _ContextMenuTrigger = __webpack_require__(23); +var _ContextMenuTrigger = __webpack_require__(22); var _ContextMenuTrigger2 = _interopRequireDefault(_ContextMenuTrigger); @@ -75102,7 +72155,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(User); /***/ }), -/* 256 */ +/* 233 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -75126,15 +72179,15 @@ var _Link = __webpack_require__(8); var _Link2 = _interopRequireDefault(_Link); -var _ErrorMessage = __webpack_require__(34); +var _ErrorMessage = __webpack_require__(33); var _ErrorMessage2 = _interopRequireDefault(_ErrorMessage); -var _Header = __webpack_require__(13); +var _Header = __webpack_require__(12); var _Header2 = _interopRequireDefault(_Header); -var _TrackList = __webpack_require__(19); +var _TrackList = __webpack_require__(18); var _TrackList2 = _interopRequireDefault(_TrackList); @@ -75142,35 +72195,35 @@ var _Thumbnail = __webpack_require__(11); var _Thumbnail2 = _interopRequireDefault(_Thumbnail); -var _ArtistSentence = __webpack_require__(21); +var _ArtistSentence = __webpack_require__(20); var _ArtistSentence2 = _interopRequireDefault(_ArtistSentence); -var _ArtistGrid = __webpack_require__(41); +var _ArtistGrid = __webpack_require__(40); var _ArtistGrid2 = _interopRequireDefault(_ArtistGrid); -var _FollowButton = __webpack_require__(45); +var _FollowButton = __webpack_require__(44); var _FollowButton2 = _interopRequireDefault(_FollowButton); -var _LastfmLoveButton = __webpack_require__(257); +var _LastfmLoveButton = __webpack_require__(234); var _LastfmLoveButton2 = _interopRequireDefault(_LastfmLoveButton); -var _Dater = __webpack_require__(26); +var _Dater = __webpack_require__(25); var _Dater2 = _interopRequireDefault(_Dater); -var _LazyLoadListener = __webpack_require__(22); +var _LazyLoadListener = __webpack_require__(21); var _LazyLoadListener2 = _interopRequireDefault(_LazyLoadListener); -var _ContextMenuTrigger = __webpack_require__(23); +var _ContextMenuTrigger = __webpack_require__(22); var _ContextMenuTrigger2 = _interopRequireDefault(_ContextMenuTrigger); -var _URILink = __webpack_require__(18); +var _URILink = __webpack_require__(17); var _URILink2 = _interopRequireDefault(_URILink); @@ -75178,7 +72231,7 @@ var _Icon = __webpack_require__(5); var _Icon2 = _interopRequireDefault(_Icon); -var _Popularity = __webpack_require__(81); +var _Popularity = __webpack_require__(78); var _Popularity2 = _interopRequireDefault(_Popularity); @@ -75206,7 +72259,7 @@ var _actions5 = __webpack_require__(16); var lastfmActions = _interopRequireWildcard(_actions5); -var _actions6 = __webpack_require__(36); +var _actions6 = __webpack_require__(35); var geniusActions = _interopRequireWildcard(_actions6); @@ -75641,7 +72694,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Track); /***/ }), -/* 257 */ +/* 234 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -75770,7 +72823,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(FollowButton); /***/ }), -/* 258 */ +/* 235 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -75798,19 +72851,19 @@ var _Icon = __webpack_require__(5); var _Icon2 = _interopRequireDefault(_Icon); -var _Parallax = __webpack_require__(30); +var _Parallax = __webpack_require__(29); var _Parallax2 = _interopRequireDefault(_Parallax); -var _TrackList = __webpack_require__(19); +var _TrackList = __webpack_require__(18); var _TrackList2 = _interopRequireDefault(_TrackList); -var _Dater = __webpack_require__(26); +var _Dater = __webpack_require__(25); var _Dater2 = _interopRequireDefault(_Dater); -var _ArtistSentence = __webpack_require__(21); +var _ArtistSentence = __webpack_require__(20); var _ArtistSentence2 = _interopRequireDefault(_ArtistSentence); @@ -75818,11 +72871,11 @@ var _Thumbnail = __webpack_require__(11); var _Thumbnail2 = _interopRequireDefault(_Thumbnail); -var _Header = __webpack_require__(13); +var _Header = __webpack_require__(12); var _Header2 = _interopRequireDefault(_Header); -var _URILink = __webpack_require__(18); +var _URILink = __webpack_require__(17); var _URILink2 = _interopRequireDefault(_URILink); @@ -75834,7 +72887,7 @@ var _actions = __webpack_require__(3); var uiActions = _interopRequireWildcard(_actions); -var _actions2 = __webpack_require__(12); +var _actions2 = __webpack_require__(13); var pusherActions = _interopRequireWildcard(_actions2); @@ -76118,7 +73171,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Queue); /***/ }), -/* 259 */ +/* 236 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76138,11 +73191,11 @@ var _reactRedux = __webpack_require__(4); var _redux = __webpack_require__(2); -var _TrackList = __webpack_require__(19); +var _TrackList = __webpack_require__(18); var _TrackList2 = _interopRequireDefault(_TrackList); -var _Header = __webpack_require__(13); +var _Header = __webpack_require__(12); var _Header2 = _interopRequireDefault(_Header); @@ -76154,7 +73207,7 @@ var _actions = __webpack_require__(3); var uiActions = _interopRequireWildcard(_actions); -var _actions2 = __webpack_require__(12); +var _actions2 = __webpack_require__(13); var pusherActions = _interopRequireWildcard(_actions2); @@ -76285,7 +73338,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(QueueHistory); /***/ }), -/* 260 */ +/* 237 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76305,7 +73358,7 @@ var _reactRedux = __webpack_require__(4); var _redux = __webpack_require__(2); -var _Header = __webpack_require__(13); +var _Header = __webpack_require__(12); var _Header2 = _interopRequireDefault(_Header); @@ -76325,7 +73378,7 @@ var _actions = __webpack_require__(3); var uiActions = _interopRequireWildcard(_actions); -var _actions2 = __webpack_require__(12); +var _actions2 = __webpack_require__(13); var pusherActions = _interopRequireWildcard(_actions2); @@ -76815,7 +73868,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Debug); /***/ }), -/* 261 */ +/* 238 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76835,13 +73888,13 @@ var _reactRedux = __webpack_require__(4); var _redux = __webpack_require__(2); -var _reactRouterDom = __webpack_require__(32); +var _reactRouterDom = __webpack_require__(31); var _Link = __webpack_require__(8); var _Link2 = _interopRequireDefault(_Link); -var _Header = __webpack_require__(13); +var _Header = __webpack_require__(12); var _Header2 = _interopRequireDefault(_Header); @@ -76849,35 +73902,35 @@ var _Icon = __webpack_require__(5); var _Icon2 = _interopRequireDefault(_Icon); -var _DropdownField = __webpack_require__(27); +var _DropdownField = __webpack_require__(26); var _DropdownField2 = _interopRequireDefault(_DropdownField); -var _TrackList = __webpack_require__(19); +var _TrackList = __webpack_require__(18); var _TrackList2 = _interopRequireDefault(_TrackList); -var _ArtistGrid = __webpack_require__(41); +var _ArtistGrid = __webpack_require__(40); var _ArtistGrid2 = _interopRequireDefault(_ArtistGrid); -var _AlbumGrid = __webpack_require__(46); +var _AlbumGrid = __webpack_require__(45); var _AlbumGrid2 = _interopRequireDefault(_AlbumGrid); -var _PlaylistGrid = __webpack_require__(47); +var _PlaylistGrid = __webpack_require__(46); var _PlaylistGrid2 = _interopRequireDefault(_PlaylistGrid); -var _LazyLoadListener = __webpack_require__(22); +var _LazyLoadListener = __webpack_require__(21); var _LazyLoadListener2 = _interopRequireDefault(_LazyLoadListener); -var _SearchForm = __webpack_require__(262); +var _SearchForm = __webpack_require__(239); var _SearchForm2 = _interopRequireDefault(_SearchForm); -var _URILink = __webpack_require__(18); +var _URILink = __webpack_require__(17); var _URILink2 = _interopRequireDefault(_URILink); @@ -77460,10 +74513,10 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { }; exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Search); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(15))) /***/ }), -/* 262 */ +/* 239 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77587,7 +74640,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapDispatchToProps)(SearchForm); /***/ }), -/* 263 */ +/* 240 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77607,21 +74660,21 @@ var _reactRedux = __webpack_require__(4); var _redux = __webpack_require__(2); -var _reactRouterDom = __webpack_require__(32); +var _reactRouterDom = __webpack_require__(31); -var _ConfirmationButton = __webpack_require__(111); +var _ConfirmationButton = __webpack_require__(103); var _ConfirmationButton2 = _interopRequireDefault(_ConfirmationButton); -var _PusherConnectionList = __webpack_require__(264); +var _PusherConnectionList = __webpack_require__(241); var _PusherConnectionList2 = _interopRequireDefault(_PusherConnectionList); -var _SourcesPriority = __webpack_require__(265); +var _SourcesPriority = __webpack_require__(242); var _SourcesPriority2 = _interopRequireDefault(_SourcesPriority); -var _Header = __webpack_require__(13); +var _Header = __webpack_require__(12); var _Header2 = _interopRequireDefault(_Header); @@ -77633,11 +74686,11 @@ var _Thumbnail = __webpack_require__(11); var _Thumbnail2 = _interopRequireDefault(_Thumbnail); -var _URILink = __webpack_require__(18); +var _URILink = __webpack_require__(17); var _URILink2 = _interopRequireDefault(_URILink); -var _Services = __webpack_require__(269); +var _Services = __webpack_require__(246); var _Services2 = _interopRequireDefault(_Services); @@ -77653,7 +74706,7 @@ var _actions2 = __webpack_require__(3); var uiActions = _interopRequireWildcard(_actions2); -var _actions3 = __webpack_require__(12); +var _actions3 = __webpack_require__(13); var pusherActions = _interopRequireWildcard(_actions3); @@ -78464,7 +75517,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Settings); /***/ }), -/* 264 */ +/* 241 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78484,7 +75537,7 @@ var _reactRedux = __webpack_require__(4); var _redux = __webpack_require__(2); -var _actions = __webpack_require__(12); +var _actions = __webpack_require__(13); var pusherActions = _interopRequireWildcard(_actions); @@ -78610,7 +75663,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(PusherConnectionList); /***/ }), -/* 265 */ +/* 242 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78626,7 +75679,7 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactSortablejs = __webpack_require__(266); +var _reactSortablejs = __webpack_require__(243); var _reactSortablejs2 = _interopRequireDefault(_reactSortablejs); @@ -78712,13 +75765,13 @@ var SourcesPriority = function (_React$Component) { exports.default = SourcesPriority; /***/ }), -/* 266 */ +/* 243 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _Sortable = __webpack_require__(267); +var _Sortable = __webpack_require__(244); var _Sortable2 = _interopRequireDefault(_Sortable); @@ -78727,7 +75780,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de module.exports = _Sortable2.default; /***/ }), -/* 267 */ +/* 244 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78746,7 +75799,7 @@ var _createClass = function () { function defineProperties(target, props) { for var _class, _temp2; /* eslint consistent-return: 0 */ -var _propTypes = __webpack_require__(33); +var _propTypes = __webpack_require__(32); var _propTypes2 = _interopRequireDefault(_propTypes); @@ -78754,11 +75807,11 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(49); +var _reactDom = __webpack_require__(48); var _reactDom2 = _interopRequireDefault(_reactDom); -var _sortablejs = __webpack_require__(268); +var _sortablejs = __webpack_require__(245); var _sortablejs2 = _interopRequireDefault(_sortablejs); @@ -78888,7 +75941,7 @@ var Sortable = (_temp2 = _class = function (_Component) { exports.default = Sortable; /***/ }), -/* 268 */ +/* 245 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(__webpack_provided_window_dot_jQuery) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**! @@ -81233,10 +78286,10 @@ exports.default = Sortable; return Sortable; }); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(15))) /***/ }), -/* 269 */ +/* 246 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -81268,23 +78321,23 @@ var _Icon = __webpack_require__(5); var _Icon2 = _interopRequireDefault(_Icon); -var _URILink = __webpack_require__(18); +var _URILink = __webpack_require__(17); var _URILink2 = _interopRequireDefault(_URILink); -var _SpotifyAuthenticationFrame = __webpack_require__(112); +var _SpotifyAuthenticationFrame = __webpack_require__(104); var _SpotifyAuthenticationFrame2 = _interopRequireDefault(_SpotifyAuthenticationFrame); -var _LastfmAuthenticationFrame = __webpack_require__(113); +var _LastfmAuthenticationFrame = __webpack_require__(105); var _LastfmAuthenticationFrame2 = _interopRequireDefault(_LastfmAuthenticationFrame); -var _GeniusAuthenticationFrame = __webpack_require__(270); +var _GeniusAuthenticationFrame = __webpack_require__(247); var _GeniusAuthenticationFrame2 = _interopRequireDefault(_GeniusAuthenticationFrame); -var _Snapcast = __webpack_require__(271); +var _Snapcast = __webpack_require__(248); var _Snapcast2 = _interopRequireDefault(_Snapcast); @@ -81300,7 +78353,7 @@ var _actions3 = __webpack_require__(7); var mopidyActions = _interopRequireWildcard(_actions3); -var _actions4 = __webpack_require__(12); +var _actions4 = __webpack_require__(13); var pusherActions = _interopRequireWildcard(_actions4); @@ -81312,7 +78365,7 @@ var _actions6 = __webpack_require__(16); var lastfmActions = _interopRequireWildcard(_actions6); -var _actions7 = __webpack_require__(36); +var _actions7 = __webpack_require__(35); var geniusActions = _interopRequireWildcard(_actions7); @@ -81982,7 +79035,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Services); /***/ }), -/* 270 */ +/* 247 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82014,7 +79067,7 @@ var _actions = __webpack_require__(3); var uiActions = _interopRequireWildcard(_actions); -var _actions2 = __webpack_require__(36); +var _actions2 = __webpack_require__(35); var geniusActions = _interopRequireWildcard(_actions2); @@ -82169,7 +79222,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(GeniusAuthenticationFrame); /***/ }), -/* 271 */ +/* 248 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82193,23 +79246,23 @@ var _Link = __webpack_require__(8); var _Link2 = _interopRequireDefault(_Link); -var _VolumeControl = __webpack_require__(79); +var _VolumeControl = __webpack_require__(76); var _VolumeControl2 = _interopRequireDefault(_VolumeControl); -var _MuteControl = __webpack_require__(80); +var _MuteControl = __webpack_require__(77); var _MuteControl2 = _interopRequireDefault(_MuteControl); -var _LatencyControl = __webpack_require__(272); +var _LatencyControl = __webpack_require__(249); var _LatencyControl2 = _interopRequireDefault(_LatencyControl); -var _TextField = __webpack_require__(273); +var _TextField = __webpack_require__(250); var _TextField2 = _interopRequireDefault(_TextField); -var _DropdownField = __webpack_require__(27); +var _DropdownField = __webpack_require__(26); var _DropdownField2 = _interopRequireDefault(_DropdownField); @@ -82229,11 +79282,11 @@ var _actions2 = __webpack_require__(3); var uiActions = _interopRequireWildcard(_actions2); -var _actions3 = __webpack_require__(12); +var _actions3 = __webpack_require__(13); var pusherActions = _interopRequireWildcard(_actions3); -var _actions4 = __webpack_require__(37); +var _actions4 = __webpack_require__(36); var snapcastActions = _interopRequireWildcard(_actions4); @@ -82697,7 +79750,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Snapcast); /***/ }), -/* 272 */ +/* 249 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82815,7 +79868,7 @@ var LatencyControl = function (_React$Component) { exports.default = LatencyControl; /***/ }), -/* 273 */ +/* 250 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82908,7 +79961,7 @@ var TextField = function (_React$Component) { exports.default = TextField; /***/ }), -/* 274 */ +/* 251 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82928,27 +79981,27 @@ var _reactRedux = __webpack_require__(4); var _redux = __webpack_require__(2); -var _reactInputRange = __webpack_require__(275); +var _reactInputRange = __webpack_require__(252); var _reactInputRange2 = _interopRequireDefault(_reactInputRange); -var _Header = __webpack_require__(13); +var _Header = __webpack_require__(12); var _Header2 = _interopRequireDefault(_Header); -var _ArtistSentence = __webpack_require__(21); +var _ArtistSentence = __webpack_require__(20); var _ArtistSentence2 = _interopRequireDefault(_ArtistSentence); -var _ArtistGrid = __webpack_require__(41); +var _ArtistGrid = __webpack_require__(40); var _ArtistGrid2 = _interopRequireDefault(_ArtistGrid); -var _AlbumGrid = __webpack_require__(46); +var _AlbumGrid = __webpack_require__(45); var _AlbumGrid2 = _interopRequireDefault(_AlbumGrid); -var _TrackList = __webpack_require__(19); +var _TrackList = __webpack_require__(18); var _TrackList2 = _interopRequireDefault(_TrackList); @@ -82956,27 +80009,27 @@ var _Thumbnail = __webpack_require__(11); var _Thumbnail2 = _interopRequireDefault(_Thumbnail); -var _Parallax = __webpack_require__(30); +var _Parallax = __webpack_require__(29); var _Parallax2 = _interopRequireDefault(_Parallax); -var _DropdownField = __webpack_require__(27); +var _DropdownField = __webpack_require__(26); var _DropdownField2 = _interopRequireDefault(_DropdownField); -var _AddSeedField = __webpack_require__(291); +var _AddSeedField = __webpack_require__(268); var _AddSeedField2 = _interopRequireDefault(_AddSeedField); -var _URILink = __webpack_require__(18); +var _URILink = __webpack_require__(17); var _URILink2 = _interopRequireDefault(_URILink); -var _ContextMenuTrigger = __webpack_require__(23); +var _ContextMenuTrigger = __webpack_require__(22); var _ContextMenuTrigger2 = _interopRequireDefault(_ContextMenuTrigger); -var _RelatedArtists = __webpack_require__(110); +var _RelatedArtists = __webpack_require__(102); var _RelatedArtists2 = _interopRequireDefault(_RelatedArtists); @@ -83652,7 +80705,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Discover); /***/ }), -/* 275 */ +/* 252 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83662,7 +80715,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _inputRange = __webpack_require__(276); +var _inputRange = __webpack_require__(253); var _inputRange2 = _interopRequireDefault(_inputRange); @@ -83716,7 +80769,7 @@ module.exports = exports['default']; //# sourceMappingURL=index.js.map /***/ }), -/* 276 */ +/* 253 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83735,45 +80788,45 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _propTypes = __webpack_require__(33); +var _propTypes = __webpack_require__(32); var _propTypes2 = _interopRequireDefault(_propTypes); -var _autobindDecorator = __webpack_require__(82); +var _autobindDecorator = __webpack_require__(79); var _autobindDecorator2 = _interopRequireDefault(_autobindDecorator); -var _valueTransformer = __webpack_require__(277); +var _valueTransformer = __webpack_require__(254); var valueTransformer = _interopRequireWildcard(_valueTransformer); -var _defaultClassNames = __webpack_require__(285); +var _defaultClassNames = __webpack_require__(262); var _defaultClassNames2 = _interopRequireDefault(_defaultClassNames); -var _label = __webpack_require__(114); +var _label = __webpack_require__(106); var _label2 = _interopRequireDefault(_label); -var _rangePropType = __webpack_require__(286); +var _rangePropType = __webpack_require__(263); var _rangePropType2 = _interopRequireDefault(_rangePropType); -var _valuePropType = __webpack_require__(287); +var _valuePropType = __webpack_require__(264); var _valuePropType2 = _interopRequireDefault(_valuePropType); -var _slider = __webpack_require__(288); +var _slider = __webpack_require__(265); var _slider2 = _interopRequireDefault(_slider); -var _track = __webpack_require__(289); +var _track = __webpack_require__(266); var _track2 = _interopRequireDefault(_track); -var _utils = __webpack_require__(58); +var _utils = __webpack_require__(57); -var _keyCodes = __webpack_require__(290); +var _keyCodes = __webpack_require__(267); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -84622,7 +81675,7 @@ module.exports = exports['default']; //# sourceMappingURL=input-range.js.map /***/ }), -/* 277 */ +/* 254 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84644,7 +81697,7 @@ exports.getPositionsFromValues = getPositionsFromValues; exports.getPositionFromEvent = getPositionFromEvent; exports.getStepValueFromValue = getStepValueFromValue; -var _utils = __webpack_require__(58); +var _utils = __webpack_require__(57); /** * Convert a point into a percentage value @@ -84793,7 +81846,7 @@ function getStepValueFromValue(value, valuePerStep) { //# sourceMappingURL=value-transformer.js.map /***/ }), -/* 278 */ +/* 255 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84816,7 +81869,7 @@ module.exports = exports["default"]; //# sourceMappingURL=captialize.js.map /***/ }), -/* 279 */ +/* 256 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84841,7 +81894,7 @@ module.exports = exports["default"]; //# sourceMappingURL=clamp.js.map /***/ }), -/* 280 */ +/* 257 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84868,7 +81921,7 @@ module.exports = exports["default"]; //# sourceMappingURL=distance-to.js.map /***/ }), -/* 281 */ +/* 258 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84891,7 +81944,7 @@ module.exports = exports["default"]; //# sourceMappingURL=is-defined.js.map /***/ }), -/* 282 */ +/* 259 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84914,7 +81967,7 @@ module.exports = exports['default']; //# sourceMappingURL=is-number.js.map /***/ }), -/* 283 */ +/* 260 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84940,7 +81993,7 @@ module.exports = exports['default']; //# sourceMappingURL=is-object.js.map /***/ }), -/* 284 */ +/* 261 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84964,7 +82017,7 @@ module.exports = exports["default"]; //# sourceMappingURL=length.js.map /***/ }), -/* 285 */ +/* 262 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84996,7 +82049,7 @@ module.exports = exports['default']; //# sourceMappingURL=default-class-names.js.map /***/ }), -/* 286 */ +/* 263 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85007,7 +82060,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = rangePropType; -var _utils = __webpack_require__(58); +var _utils = __webpack_require__(57); /** * @ignore @@ -85031,7 +82084,7 @@ module.exports = exports['default']; //# sourceMappingURL=range-prop-type.js.map /***/ }), -/* 287 */ +/* 264 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85042,7 +82095,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = valuePropType; -var _utils = __webpack_require__(58); +var _utils = __webpack_require__(57); /** * @ignore @@ -85071,7 +82124,7 @@ module.exports = exports['default']; //# sourceMappingURL=value-prop-type.js.map /***/ }), -/* 288 */ +/* 265 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85090,15 +82143,15 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _propTypes = __webpack_require__(33); +var _propTypes = __webpack_require__(32); var _propTypes2 = _interopRequireDefault(_propTypes); -var _autobindDecorator = __webpack_require__(82); +var _autobindDecorator = __webpack_require__(79); var _autobindDecorator2 = _interopRequireDefault(_autobindDecorator); -var _label = __webpack_require__(114); +var _label = __webpack_require__(106); var _label2 = _interopRequireDefault(_label); @@ -85475,7 +82528,7 @@ module.exports = exports['default']; //# sourceMappingURL=slider.js.map /***/ }), -/* 289 */ +/* 266 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85494,11 +82547,11 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _propTypes = __webpack_require__(33); +var _propTypes = __webpack_require__(32); var _propTypes2 = _interopRequireDefault(_propTypes); -var _autobindDecorator = __webpack_require__(82); +var _autobindDecorator = __webpack_require__(79); var _autobindDecorator2 = _interopRequireDefault(_autobindDecorator); @@ -85777,7 +82830,7 @@ module.exports = exports['default']; //# sourceMappingURL=track.js.map /***/ }), -/* 290 */ +/* 267 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85800,7 +82853,7 @@ var UP_ARROW = exports.UP_ARROW = 38; //# sourceMappingURL=key-codes.js.map /***/ }), -/* 291 */ +/* 268 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85824,7 +82877,7 @@ var _Link = __webpack_require__(8); var _Link2 = _interopRequireDefault(_Link); -var _ArtistSentence = __webpack_require__(21); +var _ArtistSentence = __webpack_require__(20); var _ArtistSentence2 = _interopRequireDefault(_ArtistSentence); @@ -86015,10 +83068,10 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { }; exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(AddSeedField); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(15))) /***/ }), -/* 292 */ +/* 269 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86042,11 +83095,11 @@ var _Link = __webpack_require__(8); var _Link2 = _interopRequireDefault(_Link); -var _PlaylistGrid = __webpack_require__(47); +var _PlaylistGrid = __webpack_require__(46); var _PlaylistGrid2 = _interopRequireDefault(_PlaylistGrid); -var _Header = __webpack_require__(13); +var _Header = __webpack_require__(12); var _Header2 = _interopRequireDefault(_Header); @@ -86054,7 +83107,7 @@ var _Icon = __webpack_require__(5); var _Icon2 = _interopRequireDefault(_Icon); -var _Parallax = __webpack_require__(30); +var _Parallax = __webpack_require__(29); var _Parallax2 = _interopRequireDefault(_Parallax); @@ -86062,11 +83115,11 @@ var _Thumbnail = __webpack_require__(11); var _Thumbnail2 = _interopRequireDefault(_Thumbnail); -var _URILink = __webpack_require__(18); +var _URILink = __webpack_require__(17); var _URILink2 = _interopRequireDefault(_URILink); -var _Dater = __webpack_require__(26); +var _Dater = __webpack_require__(25); var _Dater2 = _interopRequireDefault(_Dater); @@ -86236,7 +83289,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(DiscoverFeatured); /***/ }), -/* 293 */ +/* 270 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86256,7 +83309,7 @@ var _reactRedux = __webpack_require__(4); var _redux = __webpack_require__(2); -var _Header = __webpack_require__(13); +var _Header = __webpack_require__(12); var _Header2 = _interopRequireDefault(_Header); @@ -86264,7 +83317,7 @@ var _Icon = __webpack_require__(5); var _Icon2 = _interopRequireDefault(_Icon); -var _CategoryGrid = __webpack_require__(294); +var _CategoryGrid = __webpack_require__(271); var _CategoryGrid2 = _interopRequireDefault(_CategoryGrid); @@ -86381,7 +83434,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(DiscoverCategories); /***/ }), -/* 294 */ +/* 271 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86397,7 +83450,7 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _GridItem = __webpack_require__(42); +var _GridItem = __webpack_require__(41); var _GridItem2 = _interopRequireDefault(_GridItem); @@ -86448,7 +83501,7 @@ var CategoryGrid = function (_React$Component) { exports.default = CategoryGrid; /***/ }), -/* 295 */ +/* 272 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86468,7 +83521,7 @@ var _reactRedux = __webpack_require__(4); var _redux = __webpack_require__(2); -var _Header = __webpack_require__(13); +var _Header = __webpack_require__(12); var _Header2 = _interopRequireDefault(_Header); @@ -86476,11 +83529,11 @@ var _Icon = __webpack_require__(5); var _Icon2 = _interopRequireDefault(_Icon); -var _PlaylistGrid = __webpack_require__(47); +var _PlaylistGrid = __webpack_require__(46); var _PlaylistGrid2 = _interopRequireDefault(_PlaylistGrid); -var _LazyLoadListener = __webpack_require__(22); +var _LazyLoadListener = __webpack_require__(21); var _LazyLoadListener2 = _interopRequireDefault(_LazyLoadListener); @@ -86641,7 +83694,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(DiscoverCategory); /***/ }), -/* 296 */ +/* 273 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86665,7 +83718,7 @@ var _Link = __webpack_require__(8); var _Link2 = _interopRequireDefault(_Link); -var _Header = __webpack_require__(13); +var _Header = __webpack_require__(12); var _Header2 = _interopRequireDefault(_Header); @@ -86673,11 +83726,11 @@ var _Icon = __webpack_require__(5); var _Icon2 = _interopRequireDefault(_Icon); -var _AlbumGrid = __webpack_require__(46); +var _AlbumGrid = __webpack_require__(45); var _AlbumGrid2 = _interopRequireDefault(_AlbumGrid); -var _Parallax = __webpack_require__(30); +var _Parallax = __webpack_require__(29); var _Parallax2 = _interopRequireDefault(_Parallax); @@ -86685,11 +83738,11 @@ var _Thumbnail = __webpack_require__(11); var _Thumbnail2 = _interopRequireDefault(_Thumbnail); -var _ArtistSentence = __webpack_require__(21); +var _ArtistSentence = __webpack_require__(20); var _ArtistSentence2 = _interopRequireDefault(_ArtistSentence); -var _LazyLoadListener = __webpack_require__(22); +var _LazyLoadListener = __webpack_require__(21); var _LazyLoadListener2 = _interopRequireDefault(_LazyLoadListener); @@ -86906,7 +83959,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(DiscoverNewReleases); /***/ }), -/* 297 */ +/* 274 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86930,27 +83983,27 @@ var _Link = __webpack_require__(8); var _Link2 = _interopRequireDefault(_Link); -var _Header = __webpack_require__(13); +var _Header = __webpack_require__(12); var _Header2 = _interopRequireDefault(_Header); -var _ArtistGrid = __webpack_require__(41); +var _ArtistGrid = __webpack_require__(40); var _ArtistGrid2 = _interopRequireDefault(_ArtistGrid); -var _List = __webpack_require__(48); +var _List = __webpack_require__(47); var _List2 = _interopRequireDefault(_List); -var _DropdownField = __webpack_require__(27); +var _DropdownField = __webpack_require__(26); var _DropdownField2 = _interopRequireDefault(_DropdownField); -var _FilterField = __webpack_require__(83); +var _FilterField = __webpack_require__(80); var _FilterField2 = _interopRequireDefault(_FilterField); -var _LazyLoadListener = __webpack_require__(22); +var _LazyLoadListener = __webpack_require__(21); var _LazyLoadListener2 = _interopRequireDefault(_LazyLoadListener); @@ -86974,7 +84027,7 @@ var _actions3 = __webpack_require__(9); var spotifyActions = _interopRequireWildcard(_actions3); -var _actions4 = __webpack_require__(73); +var _actions4 = __webpack_require__(107); var googleActions = _interopRequireWildcard(_actions4); @@ -87398,7 +84451,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(LibraryArtists); /***/ }), -/* 298 */ +/* 275 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -87414,19 +84467,19 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _ArtistSentence = __webpack_require__(21); +var _ArtistSentence = __webpack_require__(20); var _ArtistSentence2 = _interopRequireDefault(_ArtistSentence); -var _Dater = __webpack_require__(26); +var _Dater = __webpack_require__(25); var _Dater2 = _interopRequireDefault(_Dater); -var _URILink = __webpack_require__(18); +var _URILink = __webpack_require__(17); var _URILink2 = _interopRequireDefault(_URILink); -var _ContextMenuTrigger = __webpack_require__(23); +var _ContextMenuTrigger = __webpack_require__(22); var _ContextMenuTrigger2 = _interopRequireDefault(_ContextMenuTrigger); @@ -87438,7 +84491,7 @@ var _Thumbnail = __webpack_require__(11); var _Thumbnail2 = _interopRequireDefault(_Thumbnail); -var _Popularity = __webpack_require__(81); +var _Popularity = __webpack_require__(78); var _Popularity2 = _interopRequireDefault(_Popularity); @@ -87678,7 +84731,7 @@ var ListItem = function (_React$Component) { exports.default = ListItem; /***/ }), -/* 299 */ +/* 276 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -87702,15 +84755,15 @@ var _Link = __webpack_require__(8); var _Link2 = _interopRequireDefault(_Link); -var _AlbumGrid = __webpack_require__(46); +var _AlbumGrid = __webpack_require__(45); var _AlbumGrid2 = _interopRequireDefault(_AlbumGrid); -var _List = __webpack_require__(48); +var _List = __webpack_require__(47); var _List2 = _interopRequireDefault(_List); -var _Header = __webpack_require__(13); +var _Header = __webpack_require__(12); var _Header2 = _interopRequireDefault(_Header); @@ -87718,23 +84771,23 @@ var _Thumbnail = __webpack_require__(11); var _Thumbnail2 = _interopRequireDefault(_Thumbnail); -var _TrackList = __webpack_require__(19); +var _TrackList = __webpack_require__(18); var _TrackList2 = _interopRequireDefault(_TrackList); -var _ArtistSentence = __webpack_require__(21); +var _ArtistSentence = __webpack_require__(20); var _ArtistSentence2 = _interopRequireDefault(_ArtistSentence); -var _DropdownField = __webpack_require__(27); +var _DropdownField = __webpack_require__(26); var _DropdownField2 = _interopRequireDefault(_DropdownField); -var _FilterField = __webpack_require__(83); +var _FilterField = __webpack_require__(80); var _FilterField2 = _interopRequireDefault(_FilterField); -var _LazyLoadListener = __webpack_require__(22); +var _LazyLoadListener = __webpack_require__(21); var _LazyLoadListener2 = _interopRequireDefault(_LazyLoadListener); @@ -87758,7 +84811,7 @@ var _actions3 = __webpack_require__(7); var mopidyActions = _interopRequireWildcard(_actions3); -var _actions4 = __webpack_require__(73); +var _actions4 = __webpack_require__(107); var googleActions = _interopRequireWildcard(_actions4); @@ -88232,7 +85285,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(LibraryAlbums); /***/ }), -/* 300 */ +/* 277 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -88256,15 +85309,15 @@ var _Link = __webpack_require__(8); var _Link2 = _interopRequireDefault(_Link); -var _TrackList = __webpack_require__(19); +var _TrackList = __webpack_require__(18); var _TrackList2 = _interopRequireDefault(_TrackList); -var _Header = __webpack_require__(13); +var _Header = __webpack_require__(12); var _Header2 = _interopRequireDefault(_Header); -var _LazyLoadListener = __webpack_require__(22); +var _LazyLoadListener = __webpack_require__(21); var _LazyLoadListener2 = _interopRequireDefault(_LazyLoadListener); @@ -88426,7 +85479,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(LibraryTracks); /***/ }), -/* 301 */ +/* 278 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -88450,27 +85503,27 @@ var _Link = __webpack_require__(8); var _Link2 = _interopRequireDefault(_Link); -var _PlaylistGrid = __webpack_require__(47); +var _PlaylistGrid = __webpack_require__(46); var _PlaylistGrid2 = _interopRequireDefault(_PlaylistGrid); -var _List = __webpack_require__(48); +var _List = __webpack_require__(47); var _List2 = _interopRequireDefault(_List); -var _DropdownField = __webpack_require__(27); +var _DropdownField = __webpack_require__(26); var _DropdownField2 = _interopRequireDefault(_DropdownField); -var _Header = __webpack_require__(13); +var _Header = __webpack_require__(12); var _Header2 = _interopRequireDefault(_Header); -var _FilterField = __webpack_require__(83); +var _FilterField = __webpack_require__(80); var _FilterField2 = _interopRequireDefault(_FilterField); -var _LazyLoadListener = __webpack_require__(22); +var _LazyLoadListener = __webpack_require__(21); var _LazyLoadListener2 = _interopRequireDefault(_LazyLoadListener); @@ -88832,7 +85885,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(LibraryPlaylists); /***/ }), -/* 302 */ +/* 279 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -88852,29 +85905,29 @@ var _reactRedux = __webpack_require__(4); var _redux = __webpack_require__(2); -var _reactRouterDom = __webpack_require__(32); +var _reactRouterDom = __webpack_require__(31); var _Link = __webpack_require__(8); var _Link2 = _interopRequireDefault(_Link); -var _Header = __webpack_require__(13); +var _Header = __webpack_require__(12); var _Header2 = _interopRequireDefault(_Header); -var _List = __webpack_require__(48); +var _List = __webpack_require__(47); var _List2 = _interopRequireDefault(_List); -var _TrackList = __webpack_require__(19); +var _TrackList = __webpack_require__(18); var _TrackList2 = _interopRequireDefault(_TrackList); -var _GridItem = __webpack_require__(42); +var _GridItem = __webpack_require__(41); var _GridItem2 = _interopRequireDefault(_GridItem); -var _DropdownField = __webpack_require__(27); +var _DropdownField = __webpack_require__(26); var _DropdownField2 = _interopRequireDefault(_DropdownField); @@ -88882,11 +85935,11 @@ var _Icon = __webpack_require__(5); var _Icon2 = _interopRequireDefault(_Icon); -var _URILink = __webpack_require__(18); +var _URILink = __webpack_require__(17); var _URILink2 = _interopRequireDefault(_URILink); -var _ErrorBoundary = __webpack_require__(56); +var _ErrorBoundary = __webpack_require__(55); var _ErrorBoundary2 = _interopRequireDefault(_ErrorBoundary); @@ -89079,7 +86132,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(LibraryBrowse); /***/ }), -/* 303 */ +/* 280 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89103,23 +86156,23 @@ var _Link = __webpack_require__(8); var _Link2 = _interopRequireDefault(_Link); -var _Header = __webpack_require__(13); +var _Header = __webpack_require__(12); var _Header2 = _interopRequireDefault(_Header); -var _List = __webpack_require__(48); +var _List = __webpack_require__(47); var _List2 = _interopRequireDefault(_List); -var _TrackList = __webpack_require__(19); +var _TrackList = __webpack_require__(18); var _TrackList2 = _interopRequireDefault(_TrackList); -var _GridItem = __webpack_require__(42); +var _GridItem = __webpack_require__(41); var _GridItem2 = _interopRequireDefault(_GridItem); -var _DropdownField = __webpack_require__(27); +var _DropdownField = __webpack_require__(26); var _DropdownField2 = _interopRequireDefault(_DropdownField); @@ -89127,11 +86180,11 @@ var _Icon = __webpack_require__(5); var _Icon2 = _interopRequireDefault(_Icon); -var _URILink = __webpack_require__(18); +var _URILink = __webpack_require__(17); var _URILink2 = _interopRequireDefault(_URILink); -var _ErrorBoundary = __webpack_require__(56); +var _ErrorBoundary = __webpack_require__(55); var _ErrorBoundary2 = _interopRequireDefault(_ErrorBoundary); @@ -89410,7 +86463,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(LibraryBrowseDirectory); /***/ }), -/* 304 */ +/* 281 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89438,7 +86491,7 @@ var _reactGa = __webpack_require__(14); var _reactGa2 = _interopRequireDefault(_reactGa); -var _Modal = __webpack_require__(24); +var _Modal = __webpack_require__(23); var _Modal2 = _interopRequireDefault(_Modal); @@ -89785,7 +86838,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(EditPlaylist); /***/ }), -/* 305 */ +/* 282 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89813,7 +86866,7 @@ var _reactGa = __webpack_require__(14); var _reactGa2 = _interopRequireDefault(_reactGa); -var _Modal = __webpack_require__(24); +var _Modal = __webpack_require__(23); var _Modal2 = _interopRequireDefault(_Modal); @@ -90101,7 +87154,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(CreatePlaylist); /***/ }), -/* 306 */ +/* 283 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90129,7 +87182,7 @@ var _reactGa = __webpack_require__(14); var _reactGa2 = _interopRequireDefault(_reactGa); -var _Modal = __webpack_require__(24); +var _Modal = __webpack_require__(23); var _Modal2 = _interopRequireDefault(_Modal); @@ -90153,7 +87206,7 @@ var _actions4 = __webpack_require__(9); var spotifyActions = _interopRequireWildcard(_actions4); -var _actions5 = __webpack_require__(12); +var _actions5 = __webpack_require__(13); var pusherActions = _interopRequireWildcard(_actions5); @@ -90515,7 +87568,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(EditRadio); /***/ }), -/* 307 */ +/* 284 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90543,7 +87596,7 @@ var _reactGa = __webpack_require__(14); var _reactGa2 = _interopRequireDefault(_reactGa); -var _Modal = __webpack_require__(24); +var _Modal = __webpack_require__(23); var _Modal2 = _interopRequireDefault(_Modal); @@ -90733,7 +87786,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(AddToQueue); /***/ }), -/* 308 */ +/* 285 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90761,7 +87814,7 @@ var _reactGa = __webpack_require__(14); var _reactGa2 = _interopRequireDefault(_reactGa); -var _Modal = __webpack_require__(24); +var _Modal = __webpack_require__(23); var _Modal2 = _interopRequireDefault(_Modal); @@ -90769,11 +87822,11 @@ var _Icon = __webpack_require__(5); var _Icon2 = _interopRequireDefault(_Icon); -var _SpotifyAuthenticationFrame = __webpack_require__(112); +var _SpotifyAuthenticationFrame = __webpack_require__(104); var _SpotifyAuthenticationFrame2 = _interopRequireDefault(_SpotifyAuthenticationFrame); -var _LastfmAuthenticationFrame = __webpack_require__(113); +var _LastfmAuthenticationFrame = __webpack_require__(105); var _LastfmAuthenticationFrame2 = _interopRequireDefault(_LastfmAuthenticationFrame); @@ -90785,7 +87838,7 @@ var _actions2 = __webpack_require__(3); var uiActions = _interopRequireWildcard(_actions2); -var _actions3 = __webpack_require__(12); +var _actions3 = __webpack_require__(13); var pusherActions = _interopRequireWildcard(_actions3); @@ -91025,7 +88078,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(InitialSetup); /***/ }), -/* 309 */ +/* 286 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -91049,7 +88102,7 @@ var _Link2 = _interopRequireDefault(_Link); var _redux = __webpack_require__(2); -var _Modal = __webpack_require__(24); +var _Modal = __webpack_require__(23); var _Modal2 = _interopRequireDefault(_Modal); @@ -91057,11 +88110,11 @@ var _Thumbnail = __webpack_require__(11); var _Thumbnail2 = _interopRequireDefault(_Thumbnail); -var _ArtistSentence = __webpack_require__(21); +var _ArtistSentence = __webpack_require__(20); var _ArtistSentence2 = _interopRequireDefault(_ArtistSentence); -var _Dater = __webpack_require__(26); +var _Dater = __webpack_require__(25); var _Dater2 = _interopRequireDefault(_Dater); @@ -91069,7 +88122,7 @@ var _Icon = __webpack_require__(5); var _Icon2 = _interopRequireDefault(_Icon); -var _ProgressSlider = __webpack_require__(109); +var _ProgressSlider = __webpack_require__(101); var _ProgressSlider2 = _interopRequireDefault(_ProgressSlider); @@ -91213,7 +88266,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(KioskMode); /***/ }), -/* 310 */ +/* 287 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -91237,7 +88290,7 @@ var _Link2 = _interopRequireDefault(_Link); var _redux = __webpack_require__(2); -var _Modal = __webpack_require__(24); +var _Modal = __webpack_require__(23); var _Modal2 = _interopRequireDefault(_Modal); @@ -91249,7 +88302,7 @@ var _actions = __webpack_require__(3); var uiActions = _interopRequireWildcard(_actions); -var _actions2 = __webpack_require__(12); +var _actions2 = __webpack_require__(13); var pusherActions = _interopRequireWildcard(_actions2); @@ -91605,7 +88658,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(ShareConfiguration); /***/ }), -/* 311 */ +/* 288 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -91633,7 +88686,7 @@ var _reactGa = __webpack_require__(14); var _reactGa2 = _interopRequireDefault(_reactGa); -var _Modal = __webpack_require__(24); +var _Modal = __webpack_require__(23); var _Modal2 = _interopRequireDefault(_Modal); @@ -91820,7 +88873,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(AddToPlaylist); /***/ }), -/* 312 */ +/* 289 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -91840,7 +88893,7 @@ var _reactRedux = __webpack_require__(4); var _redux = __webpack_require__(2); -var _Modal = __webpack_require__(24); +var _Modal = __webpack_require__(23); var _Modal2 = _interopRequireDefault(_Modal); @@ -91907,7 +88960,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(ImageZoom); /***/ }), -/* 313 */ +/* 290 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -91931,7 +88984,7 @@ var _reactGa = __webpack_require__(14); var _reactGa2 = _interopRequireDefault(_reactGa); -var _Modal = __webpack_require__(24); +var _Modal = __webpack_require__(23); var _Modal2 = _interopRequireDefault(_Modal); @@ -91943,15 +88996,15 @@ var _Icon = __webpack_require__(5); var _Icon2 = _interopRequireDefault(_Icon); -var _ColourField = __webpack_require__(314); +var _ColourField = __webpack_require__(291); var _ColourField2 = _interopRequireDefault(_ColourField); -var _IconField = __webpack_require__(315); +var _IconField = __webpack_require__(292); var _IconField2 = _interopRequireDefault(_IconField); -var _actions = __webpack_require__(12); +var _actions = __webpack_require__(13); var pusherActions = _interopRequireWildcard(_actions); @@ -92171,7 +89224,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(EditCommand); /***/ }), -/* 314 */ +/* 291 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -92250,7 +89303,7 @@ var ColourField = function (_React$Component) { exports.default = ColourField; /***/ }), -/* 315 */ +/* 292 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -92326,11 +89379,3027 @@ var ColourField = function (_React$Component) { exports.default = ColourField; /***/ }), -/* 316 */ +/* 293 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin +/***/ }), +/* 294 */, +/* 295 */, +/* 296 */, +/* 297 */, +/* 298 */, +/* 299 */, +/* 300 */, +/* 301 */, +/* 302 */, +/* 303 */, +/* 304 */, +/* 305 */, +/* 306 */, +/* 307 */, +/* 308 */, +/* 309 */, +/* 310 */, +/* 311 */, +/* 312 */, +/* 313 */ +/***/ (function(module, exports) { + +module.exports = function() { + throw new Error("define cannot be used indirect"); +}; + + +/***/ }), +/* 314 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(process) {var __WEBPACK_AMD_DEFINE_RESULT__;var require;/** @license MIT License (c) copyright 2010-2014 original author or authors */ +/** @author Brian Cavalier */ +/** @author John Hann */ + +/*global process,document,setTimeout,clearTimeout,MutationObserver,WebKitMutationObserver*/ +(function(define) { 'use strict'; +!(__WEBPACK_AMD_DEFINE_RESULT__ = (function(require) { + /*jshint maxcomplexity:6*/ + + // Sniff "best" async scheduling option + // Prefer process.nextTick or MutationObserver, then check for + // setTimeout, and finally vertx, since its the only env that doesn't + // have setTimeout + + var MutationObs; + var capturedSetTimeout = typeof setTimeout !== 'undefined' && setTimeout; + + // Default env + var setTimer = function(f, ms) { return setTimeout(f, ms); }; + var clearTimer = function(t) { return clearTimeout(t); }; + var asap = function (f) { return capturedSetTimeout(f, 0); }; + + // Detect specific env + if (isNode()) { // Node + asap = function (f) { return process.nextTick(f); }; + + } else if (MutationObs = hasMutationObserver()) { // Modern browser + asap = initMutationObserver(MutationObs); + + } else if (!capturedSetTimeout) { // vert.x + var vertxRequire = require; + var vertx = __webpack_require__(323); + setTimer = function (f, ms) { return vertx.setTimer(ms, f); }; + clearTimer = vertx.cancelTimer; + asap = vertx.runOnLoop || vertx.runOnContext; + } + + return { + setTimer: setTimer, + clearTimer: clearTimer, + asap: asap + }; + + function isNode () { + return typeof process !== 'undefined' && + Object.prototype.toString.call(process) === '[object process]'; + } + + function hasMutationObserver () { + return (typeof MutationObserver !== 'undefined' && MutationObserver) || + (typeof WebKitMutationObserver !== 'undefined' && WebKitMutationObserver); + } + + function initMutationObserver(MutationObserver) { + var scheduled; + var node = document.createTextNode(''); + var o = new MutationObserver(run); + o.observe(node, { characterData: true }); + + function run() { + var f = scheduled; + scheduled = void 0; + f(); + } + + var i = 0; + return function (f) { + scheduled = f; + node.data = (i ^= 1); + }; + } +}).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +}(__webpack_require__(313))); + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) + +/***/ }), +/* 315 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ +/** @author Brian Cavalier */ +/** @author John Hann */ + +(function(define) { 'use strict'; +!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { + + /** + * Custom error type for promises rejected by promise.timeout + * @param {string} message + * @constructor + */ + function TimeoutError (message) { + Error.call(this); + this.message = message; + this.name = TimeoutError.name; + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, TimeoutError); + } + } + + TimeoutError.prototype = Object.create(Error.prototype); + TimeoutError.prototype.constructor = TimeoutError; + + return TimeoutError; +}).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +}(__webpack_require__(313))); + +/***/ }), +/* 316 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ +/** @author Brian Cavalier */ +/** @author John Hann */ + +(function(define) { 'use strict'; +!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { + + return { + pending: toPendingState, + fulfilled: toFulfilledState, + rejected: toRejectedState, + inspect: inspect + }; + + function toPendingState() { + return { state: 'pending' }; + } + + function toRejectedState(e) { + return { state: 'rejected', reason: e }; + } + + function toFulfilledState(x) { + return { state: 'fulfilled', value: x }; + } + + function inspect(handler) { + var state = handler.state(); + return state === 0 ? toPendingState() + : state > 0 ? toFulfilledState(handler.value) + : toRejectedState(handler.value); + } + +}).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +}(__webpack_require__(313))); + + +/***/ }), +/* 317 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ +/** @author Brian Cavalier */ +/** @author John Hann */ + +(function(define) { 'use strict'; +!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { + + makeApply.tryCatchResolve = tryCatchResolve; + + return makeApply; + + function makeApply(Promise, call) { + if(arguments.length < 2) { + call = tryCatchResolve; + } + + return apply; + + function apply(f, thisArg, args) { + var p = Promise._defer(); + var l = args.length; + var params = new Array(l); + callAndResolve({ f:f, thisArg:thisArg, args:args, params:params, i:l-1, call:call }, p._handler); + + return p; + } + + function callAndResolve(c, h) { + if(c.i < 0) { + return call(c.f, c.thisArg, c.params, h); + } + + var handler = Promise._handler(c.args[c.i]); + handler.fold(callAndResolveNext, c, void 0, h); + } + + function callAndResolveNext(c, x, h) { + c.params[c.i] = x; + c.i -= 1; + callAndResolve(c, h); + } + } + + function tryCatchResolve(f, thisArg, args, resolver) { + try { + resolver.resolve(f.apply(thisArg, args)); + } catch(e) { + resolver.reject(e); + } + } + +}).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +}(__webpack_require__(313))); + + + + +/***/ }), +/* 318 */ +/***/ (function(module, exports, __webpack_require__) { + +/*global module:true, require:false*/ + +var bane = __webpack_require__(319); +var websocket = __webpack_require__(320); +var when = __webpack_require__(321); + +function Mopidy(settings) { + if (!(this instanceof Mopidy)) { + return new Mopidy(settings); + } + + this._console = this._getConsole(settings || {}); + this._settings = this._configure(settings || {}); + + this._backoffDelay = this._settings.backoffDelayMin; + this._pendingRequests = {}; + this._webSocket = null; + + bane.createEventEmitter(this); + this._delegateEvents(); + + if (this._settings.autoConnect) { + this.connect(); + } +} + +Mopidy.ConnectionError = function (message) { + this.name = "ConnectionError"; + this.message = message; +}; +Mopidy.ConnectionError.prototype = Object.create(Error.prototype); +Mopidy.ConnectionError.prototype.constructor = Mopidy.ConnectionError; + +Mopidy.ServerError = function (message) { + this.name = "ServerError"; + this.message = message; +}; +Mopidy.ServerError.prototype = Object.create(Error.prototype); +Mopidy.ServerError.prototype.constructor = Mopidy.ServerError; + +Mopidy.WebSocket = websocket.Client; + +Mopidy.when = when; + +Mopidy.prototype._getConsole = function (settings) { + if (typeof settings.console !== "undefined") { + return settings.console; + } + + var con = typeof console !== "undefined" && console || {}; + + con.log = con.log || function () {}; + con.warn = con.warn || function () {}; + con.error = con.error || function () {}; + + return con; +}; + +Mopidy.prototype._configure = function (settings) { + var protocol = (typeof document !== "undefined" && + document.location.protocol === "https:") ? "wss://" : "ws://"; + var currentHost = (typeof document !== "undefined" && + document.location.host) || "localhost"; + settings.webSocketUrl = settings.webSocketUrl || + protocol + currentHost + "/mopidy/ws"; + + if (settings.autoConnect !== false) { + settings.autoConnect = true; + } + + settings.backoffDelayMin = settings.backoffDelayMin || 1000; + settings.backoffDelayMax = settings.backoffDelayMax || 64000; + + if (typeof settings.callingConvention === "undefined") { + this._console.warn( + "Mopidy.js is using the default calling convention. The " + + "default will change in the future. You should explicitly " + + "specify which calling convention you use."); + } + settings.callingConvention = ( + settings.callingConvention || "by-position-only"); + + return settings; +}; + +Mopidy.prototype._delegateEvents = function () { + // Remove existing event handlers + this.off("websocket:close"); + this.off("websocket:error"); + this.off("websocket:incomingMessage"); + this.off("websocket:open"); + this.off("state:offline"); + + // Register basic set of event handlers + this.on("websocket:close", this._cleanup); + this.on("websocket:error", this._handleWebSocketError); + this.on("websocket:incomingMessage", this._handleMessage); + this.on("websocket:open", this._resetBackoffDelay); + this.on("websocket:open", this._getApiSpec); + this.on("state:offline", this._reconnect); +}; + +Mopidy.prototype.connect = function () { + if (this._webSocket) { + if (this._webSocket.readyState === Mopidy.WebSocket.OPEN) { + return; + } else { + this._webSocket.close(); + } + } + + this._webSocket = this._settings.webSocket || + new Mopidy.WebSocket(this._settings.webSocketUrl); + + this._webSocket.onclose = function (close) { + this.emit("websocket:close", close); + }.bind(this); + + this._webSocket.onerror = function (error) { + this.emit("websocket:error", error); + }.bind(this); + + this._webSocket.onopen = function () { + this.emit("websocket:open"); + }.bind(this); + + this._webSocket.onmessage = function (message) { + this.emit("websocket:incomingMessage", message); + }.bind(this); +}; + +Mopidy.prototype._cleanup = function (closeEvent) { + Object.keys(this._pendingRequests).forEach(function (requestId) { + var resolver = this._pendingRequests[requestId]; + delete this._pendingRequests[requestId]; + var error = new Mopidy.ConnectionError("WebSocket closed"); + error.closeEvent = closeEvent; + resolver.reject(error); + }.bind(this)); + + this.emit("state:offline"); +}; + +Mopidy.prototype._reconnect = function () { + this.emit("reconnectionPending", { + timeToAttempt: this._backoffDelay + }); + + setTimeout(function () { + this.emit("reconnecting"); + this.connect(); + }.bind(this), this._backoffDelay); + + this._backoffDelay = this._backoffDelay * 2; + if (this._backoffDelay > this._settings.backoffDelayMax) { + this._backoffDelay = this._settings.backoffDelayMax; + } +}; + +Mopidy.prototype._resetBackoffDelay = function () { + this._backoffDelay = this._settings.backoffDelayMin; +}; + +Mopidy.prototype.close = function () { + this.off("state:offline", this._reconnect); + this._webSocket.close(); +}; + +Mopidy.prototype._handleWebSocketError = function (error) { + this._console.warn("WebSocket error:", error.stack || error); +}; + +Mopidy.prototype._send = function (message) { + switch (this._webSocket.readyState) { + case Mopidy.WebSocket.CONNECTING: + return when.reject( + new Mopidy.ConnectionError("WebSocket is still connecting")); + case Mopidy.WebSocket.CLOSING: + return when.reject( + new Mopidy.ConnectionError("WebSocket is closing")); + case Mopidy.WebSocket.CLOSED: + return when.reject( + new Mopidy.ConnectionError("WebSocket is closed")); + default: + var deferred = when.defer(); + message.jsonrpc = "2.0"; + message.id = this._nextRequestId(); + this._pendingRequests[message.id] = deferred.resolver; + this._webSocket.send(JSON.stringify(message)); + this.emit("websocket:outgoingMessage", message); + return deferred.promise; + } +}; + +Mopidy.prototype._nextRequestId = (function () { + var lastUsed = -1; + return function () { + lastUsed += 1; + return lastUsed; + }; +}()); + +Mopidy.prototype._handleMessage = function (message) { + try { + var data = JSON.parse(message.data); + if (data.hasOwnProperty("id")) { + this._handleResponse(data); + } else if (data.hasOwnProperty("event")) { + this._handleEvent(data); + } else { + this._console.warn( + "Unknown message type received. Message was: " + + message.data); + } + } catch (error) { + if (error instanceof SyntaxError) { + this._console.warn( + "WebSocket message parsing failed. Message was: " + + message.data); + } else { + throw error; + } + } +}; + +Mopidy.prototype._handleResponse = function (responseMessage) { + if (!this._pendingRequests.hasOwnProperty(responseMessage.id)) { + this._console.warn( + "Unexpected response received. Message was:", responseMessage); + return; + } + + var error; + var resolver = this._pendingRequests[responseMessage.id]; + delete this._pendingRequests[responseMessage.id]; + + if (responseMessage.hasOwnProperty("result")) { + resolver.resolve(responseMessage.result); + } else if (responseMessage.hasOwnProperty("error")) { + error = new Mopidy.ServerError(responseMessage.error.message); + error.code = responseMessage.error.code; + error.data = responseMessage.error.data; + resolver.reject(error); + this._console.warn("Server returned error:", responseMessage.error); + } else { + error = new Error("Response without 'result' or 'error' received"); + error.data = {response: responseMessage}; + resolver.reject(error); + this._console.warn( + "Response without 'result' or 'error' received. Message was:", + responseMessage); + } +}; + +Mopidy.prototype._handleEvent = function (eventMessage) { + var type = eventMessage.event; + var data = eventMessage; + delete data.event; + + this.emit("event:" + this._snakeToCamel(type), data); +}; + +Mopidy.prototype._getApiSpec = function () { + return this._send({method: "core.describe"}) + .then(this._createApi.bind(this)) + .catch(this._handleWebSocketError); +}; + +Mopidy.prototype._createApi = function (methods) { + var byPositionOrByName = ( + this._settings.callingConvention === "by-position-or-by-name"); + + var caller = function (method) { + return function () { + var message = {method: method}; + if (arguments.length === 0) { + return this._send(message); + } + if (!byPositionOrByName) { + message.params = Array.prototype.slice.call(arguments); + return this._send(message); + } + if (arguments.length > 1) { + return when.reject(new Error( + "Expected zero arguments, a single array, " + + "or a single object.")); + } + if (!Array.isArray(arguments[0]) && + arguments[0] !== Object(arguments[0])) { + return when.reject(new TypeError( + "Expected an array or an object.")); + } + message.params = arguments[0]; + return this._send(message); + }.bind(this); + }.bind(this); + + var getPath = function (fullName) { + var path = fullName.split("."); + if (path.length >= 1 && path[0] === "core") { + path = path.slice(1); + } + return path; + }; + + var createObjects = function (objPath) { + var parentObj = this; + objPath.forEach(function (objName) { + objName = this._snakeToCamel(objName); + parentObj[objName] = parentObj[objName] || {}; + parentObj = parentObj[objName]; + }.bind(this)); + return parentObj; + }.bind(this); + + var createMethod = function (fullMethodName) { + var methodPath = getPath(fullMethodName); + var methodName = this._snakeToCamel(methodPath.slice(-1)[0]); + var object = createObjects(methodPath.slice(0, -1)); + object[methodName] = caller(fullMethodName); + object[methodName].description = methods[fullMethodName].description; + object[methodName].params = methods[fullMethodName].params; + }.bind(this); + + Object.keys(methods).forEach(createMethod); + this.emit("state:online"); +}; + +Mopidy.prototype._snakeToCamel = function (name) { + return name.replace(/(_[a-z])/g, function (match) { + return match.toUpperCase().replace("_", ""); + }); +}; + +module.exports = Mopidy; + + +/***/ }), +/* 319 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;(("function" === "function" && __webpack_require__(198) && function (m) { !(__WEBPACK_AMD_DEFINE_FACTORY__ = (m), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : + __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); }) || + (typeof module === "object" && function (m) { module.exports = m(); }) || + function (m) { this.bane = m(); } +)(function () { + "use strict"; + var slice = Array.prototype.slice; + + function handleError(event, error, errbacks) { + var i, l = errbacks.length; + if (l > 0) { + for (i = 0; i < l; ++i) { errbacks[i](event, error); } + return; + } + setTimeout(function () { + error.message = event + " listener threw error: " + error.message; + throw error; + }, 0); + } + + function assertFunction(fn) { + if (typeof fn !== "function") { + throw new TypeError("Listener is not function"); + } + return fn; + } + + function supervisors(object) { + if (!object.supervisors) { object.supervisors = []; } + return object.supervisors; + } + + function listeners(object, event) { + if (!object.listeners) { object.listeners = {}; } + if (event && !object.listeners[event]) { object.listeners[event] = []; } + return event ? object.listeners[event] : object.listeners; + } + + function errbacks(object) { + if (!object.errbacks) { object.errbacks = []; } + return object.errbacks; + } + + /** + * @signature var emitter = bane.createEmitter([object]); + * + * Create a new event emitter. If an object is passed, it will be modified + * by adding the event emitter methods (see below). + */ + function createEventEmitter(object) { + object = object || {}; + + function notifyListener(event, listener, args) { + try { + listener.listener.apply(listener.thisp || object, args); + } catch (e) { + handleError(event, e, errbacks(object)); + } + } + + object.on = function (event, listener, thisp) { + if (typeof event === "function") { + return supervisors(this).push({ + listener: event, + thisp: listener + }); + } + listeners(this, event).push({ + listener: assertFunction(listener), + thisp: thisp + }); + }; + + object.off = function (event, listener) { + var fns, events, i, l; + if (!event) { + fns = supervisors(this); + fns.splice(0, fns.length); + + events = listeners(this); + for (i in events) { + if (events.hasOwnProperty(i)) { + fns = listeners(this, i); + fns.splice(0, fns.length); + } + } + + fns = errbacks(this); + fns.splice(0, fns.length); + + return; + } + if (typeof event === "function") { + fns = supervisors(this); + listener = event; + } else { + fns = listeners(this, event); + } + if (!listener) { + fns.splice(0, fns.length); + return; + } + for (i = 0, l = fns.length; i < l; ++i) { + if (fns[i].listener === listener) { + fns.splice(i, 1); + return; + } + } + }; + + object.once = function (event, listener, thisp) { + var wrapper = function () { + object.off(event, wrapper); + listener.apply(this, arguments); + }; + + object.on(event, wrapper, thisp); + }; + + object.bind = function (object, events) { + var prop, i, l; + if (!events) { + for (prop in object) { + if (typeof object[prop] === "function") { + this.on(prop, object[prop], object); + } + } + } else { + for (i = 0, l = events.length; i < l; ++i) { + if (typeof object[events[i]] === "function") { + this.on(events[i], object[events[i]], object); + } else { + throw new Error("No such method " + events[i]); + } + } + } + return object; + }; + + object.emit = function (event) { + var toNotify = supervisors(this); + var args = slice.call(arguments), i, l; + + for (i = 0, l = toNotify.length; i < l; ++i) { + notifyListener(event, toNotify[i], args); + } + + toNotify = listeners(this, event).slice(); + args = slice.call(arguments, 1); + for (i = 0, l = toNotify.length; i < l; ++i) { + notifyListener(event, toNotify[i], args); + } + }; + + object.errback = function (listener) { + if (!this.errbacks) { this.errbacks = []; } + this.errbacks.push(assertFunction(listener)); + }; + + return object; + } + + return { + createEventEmitter: createEventEmitter, + aggregate: function (emitters) { + var aggregate = createEventEmitter(); + emitters.forEach(function (emitter) { + emitter.on(function (event, data) { + aggregate.emit(event, data); + }); + }); + return aggregate; + } + }; +}); + + +/***/ }), +/* 320 */ +/***/ (function(module, exports) { + +module.exports = { Client: window.WebSocket }; + + +/***/ }), +/* 321 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ + +/** + * Promises/A+ and when() implementation + * when is part of the cujoJS family of libraries (http://cujojs.com/) + * @author Brian Cavalier + * @author John Hann + */ +(function(define) { 'use strict'; +!(__WEBPACK_AMD_DEFINE_RESULT__ = (function (require) { + + var timed = __webpack_require__(322); + var array = __webpack_require__(324); + var flow = __webpack_require__(325); + var fold = __webpack_require__(326); + var inspect = __webpack_require__(327); + var generate = __webpack_require__(328); + var progress = __webpack_require__(329); + var withThis = __webpack_require__(330); + var unhandledRejection = __webpack_require__(331); + var TimeoutError = __webpack_require__(315); + + var Promise = [array, flow, fold, generate, progress, + inspect, withThis, timed, unhandledRejection] + .reduce(function(Promise, feature) { + return feature(Promise); + }, __webpack_require__(333)); + + var apply = __webpack_require__(317)(Promise); + + // Public API + + when.promise = promise; // Create a pending promise + when.resolve = Promise.resolve; // Create a resolved promise + when.reject = Promise.reject; // Create a rejected promise + + when.lift = lift; // lift a function to return promises + when['try'] = attempt; // call a function and return a promise + when.attempt = attempt; // alias for when.try + + when.iterate = Promise.iterate; // DEPRECATED (use cujojs/most streams) Generate a stream of promises + when.unfold = Promise.unfold; // DEPRECATED (use cujojs/most streams) Generate a stream of promises + + when.join = join; // Join 2 or more promises + + when.all = all; // Resolve a list of promises + when.settle = settle; // Settle a list of promises + + when.any = lift(Promise.any); // One-winner race + when.some = lift(Promise.some); // Multi-winner race + when.race = lift(Promise.race); // First-to-settle race + + when.map = map; // Array.map() for promises + when.filter = filter; // Array.filter() for promises + when.reduce = lift(Promise.reduce); // Array.reduce() for promises + when.reduceRight = lift(Promise.reduceRight); // Array.reduceRight() for promises + + when.isPromiseLike = isPromiseLike; // Is something promise-like, aka thenable + + when.Promise = Promise; // Promise constructor + when.defer = defer; // Create a {promise, resolve, reject} tuple + + // Error types + + when.TimeoutError = TimeoutError; + + /** + * Get a trusted promise for x, or by transforming x with onFulfilled + * + * @param {*} x + * @param {function?} onFulfilled callback to be called when x is + * successfully fulfilled. If promiseOrValue is an immediate value, callback + * will be invoked immediately. + * @param {function?} onRejected callback to be called when x is + * rejected. + * @param {function?} onProgress callback to be called when progress updates + * are issued for x. @deprecated + * @returns {Promise} a new promise that will fulfill with the return + * value of callback or errback or the completion value of promiseOrValue if + * callback and/or errback is not supplied. + */ + function when(x, onFulfilled, onRejected, onProgress) { + var p = Promise.resolve(x); + if (arguments.length < 2) { + return p; + } + + return p.then(onFulfilled, onRejected, onProgress); + } + + /** + * Creates a new promise whose fate is determined by resolver. + * @param {function} resolver function(resolve, reject, notify) + * @returns {Promise} promise whose fate is determine by resolver + */ + function promise(resolver) { + return new Promise(resolver); + } + + /** + * Lift the supplied function, creating a version of f that returns + * promises, and accepts promises as arguments. + * @param {function} f + * @returns {Function} version of f that returns promises + */ + function lift(f) { + return function() { + for(var i=0, l=arguments.length, a=new Array(l); i>>0; + + var pending = l; + var errors = []; + + for (var h, x, i = 0; i < l; ++i) { + x = promises[i]; + if(x === void 0 && !(i in promises)) { + --pending; + continue; + } + + h = Promise._handler(x); + if(h.state() > 0) { + resolver.become(h); + Promise._visitRemaining(promises, i, h); + break; + } else { + h.visit(resolver, handleFulfill, handleReject); + } + } + + if(pending === 0) { + resolver.reject(new RangeError('any(): array must not be empty')); + } + + return p; + + function handleFulfill(x) { + /*jshint validthis:true*/ + errors = null; + this.resolve(x); // this === resolver + } + + function handleReject(e) { + /*jshint validthis:true*/ + if(this.resolved) { // this === resolver + return; + } + + errors.push(e); + if(--pending === 0) { + this.reject(errors); + } + } + } + + /** + * N-winner competitive race + * Return a promise that will fulfill when n input promises have + * fulfilled, or will reject when it becomes impossible for n + * input promises to fulfill (ie when promises.length - n + 1 + * have rejected) + * @param {array} promises + * @param {number} n + * @returns {Promise} promise for the earliest n fulfillment values + * + * @deprecated + */ + function some(promises, n) { + /*jshint maxcomplexity:7*/ + var p = Promise._defer(); + var resolver = p._handler; + + var results = []; + var errors = []; + + var l = promises.length>>>0; + var nFulfill = 0; + var nReject; + var x, i; // reused in both for() loops + + // First pass: count actual array items + for(i=0; i nFulfill) { + resolver.reject(new RangeError('some(): array must contain at least ' + + n + ' item(s), but had ' + nFulfill)); + } else if(nFulfill === 0) { + resolver.resolve(results); + } + + // Second pass: observe each array item, make progress toward goals + for(i=0; i 2 ? ar.call(promises, liftCombine(f), arguments[2]) + : ar.call(promises, liftCombine(f)); + } + + /** + * Traditional reduce function, similar to `Array.prototype.reduceRight()`, but + * input may contain promises and/or values, and reduceFunc + * may return either a value or a promise, *and* initialValue may + * be a promise for the starting value. + * @param {Array|Promise} promises array or promise for an array of anything, + * may contain a mix of promises and values. + * @param {function(accumulated:*, x:*, index:Number):*} f reduce function + * @returns {Promise} that will resolve to the final reduced value + */ + function reduceRight(promises, f /*, initialValue */) { + return arguments.length > 2 ? arr.call(promises, liftCombine(f), arguments[2]) + : arr.call(promises, liftCombine(f)); + } + + function liftCombine(f) { + return function(z, x, i) { + return applyFold(f, void 0, [z,x,i]); + }; + } + }; + +}).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +}(__webpack_require__(313))); + + +/***/ }), +/* 325 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ +/** @author Brian Cavalier */ +/** @author John Hann */ + +(function(define) { 'use strict'; +!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { + + return function flow(Promise) { + + var resolve = Promise.resolve; + var reject = Promise.reject; + var origCatch = Promise.prototype['catch']; + + /** + * Handle the ultimate fulfillment value or rejection reason, and assume + * responsibility for all errors. If an error propagates out of result + * or handleFatalError, it will be rethrown to the host, resulting in a + * loud stack track on most platforms and a crash on some. + * @param {function?} onResult + * @param {function?} onError + * @returns {undefined} + */ + Promise.prototype.done = function(onResult, onError) { + this._handler.visit(this._handler.receiver, onResult, onError); + }; + + /** + * Add Error-type and predicate matching to catch. Examples: + * promise.catch(TypeError, handleTypeError) + * .catch(predicate, handleMatchedErrors) + * .catch(handleRemainingErrors) + * @param onRejected + * @returns {*} + */ + Promise.prototype['catch'] = Promise.prototype.otherwise = function(onRejected) { + if (arguments.length < 2) { + return origCatch.call(this, onRejected); + } + + if(typeof onRejected !== 'function') { + return this.ensure(rejectInvalidPredicate); + } + + return origCatch.call(this, createCatchFilter(arguments[1], onRejected)); + }; + + /** + * Wraps the provided catch handler, so that it will only be called + * if the predicate evaluates truthy + * @param {?function} handler + * @param {function} predicate + * @returns {function} conditional catch handler + */ + function createCatchFilter(handler, predicate) { + return function(e) { + return evaluatePredicate(e, predicate) + ? handler.call(this, e) + : reject(e); + }; + } + + /** + * Ensures that onFulfilledOrRejected will be called regardless of whether + * this promise is fulfilled or rejected. onFulfilledOrRejected WILL NOT + * receive the promises' value or reason. Any returned value will be disregarded. + * onFulfilledOrRejected may throw or return a rejected promise to signal + * an additional error. + * @param {function} handler handler to be called regardless of + * fulfillment or rejection + * @returns {Promise} + */ + Promise.prototype['finally'] = Promise.prototype.ensure = function(handler) { + if(typeof handler !== 'function') { + return this; + } + + return this.then(function(x) { + return runSideEffect(handler, this, identity, x); + }, function(e) { + return runSideEffect(handler, this, reject, e); + }); + }; + + function runSideEffect (handler, thisArg, propagate, value) { + var result = handler.call(thisArg); + return maybeThenable(result) + ? propagateValue(result, propagate, value) + : propagate(value); + } + + function propagateValue (result, propagate, x) { + return resolve(result).then(function () { + return propagate(x); + }); + } + + /** + * Recover from a failure by returning a defaultValue. If defaultValue + * is a promise, it's fulfillment value will be used. If defaultValue is + * a promise that rejects, the returned promise will reject with the + * same reason. + * @param {*} defaultValue + * @returns {Promise} new promise + */ + Promise.prototype['else'] = Promise.prototype.orElse = function(defaultValue) { + return this.then(void 0, function() { + return defaultValue; + }); + }; + + /** + * Shortcut for .then(function() { return value; }) + * @param {*} value + * @return {Promise} a promise that: + * - is fulfilled if value is not a promise, or + * - if value is a promise, will fulfill with its value, or reject + * with its reason. + */ + Promise.prototype['yield'] = function(value) { + return this.then(function() { + return value; + }); + }; + + /** + * Runs a side effect when this promise fulfills, without changing the + * fulfillment value. + * @param {function} onFulfilledSideEffect + * @returns {Promise} + */ + Promise.prototype.tap = function(onFulfilledSideEffect) { + return this.then(onFulfilledSideEffect)['yield'](this); + }; + + return Promise; + }; + + function rejectInvalidPredicate() { + throw new TypeError('catch predicate must be a function'); + } + + function evaluatePredicate(e, predicate) { + return isError(predicate) ? e instanceof predicate : predicate(e); + } + + function isError(predicate) { + return predicate === Error + || (predicate != null && predicate.prototype instanceof Error); + } + + function maybeThenable(x) { + return (typeof x === 'object' || typeof x === 'function') && x !== null; + } + + function identity(x) { + return x; + } + +}).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +}(__webpack_require__(313))); + + +/***/ }), +/* 326 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ +/** @author Brian Cavalier */ +/** @author John Hann */ +/** @author Jeff Escalante */ + +(function(define) { 'use strict'; +!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { + + return function fold(Promise) { + + Promise.prototype.fold = function(f, z) { + var promise = this._beget(); + + this._handler.fold(function(z, x, to) { + Promise._handler(z).fold(function(x, z, to) { + to.resolve(f.call(this, z, x)); + }, x, this, to); + }, z, promise._handler.receiver, promise._handler); + + return promise; + }; + + return Promise; + }; + +}).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +}(__webpack_require__(313))); + + +/***/ }), +/* 327 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ +/** @author Brian Cavalier */ +/** @author John Hann */ + +(function(define) { 'use strict'; +!(__WEBPACK_AMD_DEFINE_RESULT__ = (function(require) { + + var inspect = __webpack_require__(316).inspect; + + return function inspection(Promise) { + + Promise.prototype.inspect = function() { + return inspect(Promise._handler(this)); + }; + + return Promise; + }; + +}).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +}(__webpack_require__(313))); + + +/***/ }), +/* 328 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ +/** @author Brian Cavalier */ +/** @author John Hann */ + +(function(define) { 'use strict'; +!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { + + return function generate(Promise) { + + var resolve = Promise.resolve; + + Promise.iterate = iterate; + Promise.unfold = unfold; + + return Promise; + + /** + * @deprecated Use github.com/cujojs/most streams and most.iterate + * Generate a (potentially infinite) stream of promised values: + * x, f(x), f(f(x)), etc. until condition(x) returns true + * @param {function} f function to generate a new x from the previous x + * @param {function} condition function that, given the current x, returns + * truthy when the iterate should stop + * @param {function} handler function to handle the value produced by f + * @param {*|Promise} x starting value, may be a promise + * @return {Promise} the result of the last call to f before + * condition returns true + */ + function iterate(f, condition, handler, x) { + return unfold(function(x) { + return [x, f(x)]; + }, condition, handler, x); + } + + /** + * @deprecated Use github.com/cujojs/most streams and most.unfold + * Generate a (potentially infinite) stream of promised values + * by applying handler(generator(seed)) iteratively until + * condition(seed) returns true. + * @param {function} unspool function that generates a [value, newSeed] + * given a seed. + * @param {function} condition function that, given the current seed, returns + * truthy when the unfold should stop + * @param {function} handler function to handle the value produced by unspool + * @param x {*|Promise} starting value, may be a promise + * @return {Promise} the result of the last value produced by unspool before + * condition returns true + */ + function unfold(unspool, condition, handler, x) { + return resolve(x).then(function(seed) { + return resolve(condition(seed)).then(function(done) { + return done ? seed : resolve(unspool(seed)).spread(next); + }); + }); + + function next(item, newSeed) { + return resolve(handler(item)).then(function() { + return unfold(unspool, condition, handler, newSeed); + }); + } + } + }; + +}).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +}(__webpack_require__(313))); + + +/***/ }), +/* 329 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ +/** @author Brian Cavalier */ +/** @author John Hann */ + +(function(define) { 'use strict'; +!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { + + return function progress(Promise) { + + /** + * @deprecated + * Register a progress handler for this promise + * @param {function} onProgress + * @returns {Promise} + */ + Promise.prototype.progress = function(onProgress) { + return this.then(void 0, void 0, onProgress); + }; + + return Promise; + }; + +}).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +}(__webpack_require__(313))); + + +/***/ }), +/* 330 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ +/** @author Brian Cavalier */ +/** @author John Hann */ + +(function(define) { 'use strict'; +!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { + + return function addWith(Promise) { + /** + * Returns a promise whose handlers will be called with `this` set to + * the supplied receiver. Subsequent promises derived from the + * returned promise will also have their handlers called with receiver + * as `this`. Calling `with` with undefined or no arguments will return + * a promise whose handlers will again be called in the usual Promises/A+ + * way (no `this`) thus safely undoing any previous `with` in the + * promise chain. + * + * WARNING: Promises returned from `with`/`withThis` are NOT Promises/A+ + * compliant, specifically violating 2.2.5 (http://promisesaplus.com/#point-41) + * + * @param {object} receiver `this` value for all handlers attached to + * the returned promise. + * @returns {Promise} + */ + Promise.prototype['with'] = Promise.prototype.withThis = function(receiver) { + var p = this._beget(); + var child = p._handler; + child.receiver = receiver; + this._handler.chain(child, receiver); + return p; + }; + + return Promise; + }; + +}).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +}(__webpack_require__(313))); + + + +/***/ }), +/* 331 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ +/** @author Brian Cavalier */ +/** @author John Hann */ + +(function(define) { 'use strict'; +!(__WEBPACK_AMD_DEFINE_RESULT__ = (function(require) { + + var setTimer = __webpack_require__(314).setTimer; + var format = __webpack_require__(332); + + return function unhandledRejection(Promise) { + + var logError = noop; + var logInfo = noop; + var localConsole; + + if(typeof console !== 'undefined') { + // Alias console to prevent things like uglify's drop_console option from + // removing console.log/error. Unhandled rejections fall into the same + // category as uncaught exceptions, and build tools shouldn't silence them. + localConsole = console; + logError = typeof localConsole.error !== 'undefined' + ? function (e) { localConsole.error(e); } + : function (e) { localConsole.log(e); }; + + logInfo = typeof localConsole.info !== 'undefined' + ? function (e) { localConsole.info(e); } + : function (e) { localConsole.log(e); }; + } + + Promise.onPotentiallyUnhandledRejection = function(rejection) { + enqueue(report, rejection); + }; + + Promise.onPotentiallyUnhandledRejectionHandled = function(rejection) { + enqueue(unreport, rejection); + }; + + Promise.onFatalRejection = function(rejection) { + enqueue(throwit, rejection.value); + }; + + var tasks = []; + var reported = []; + var running = null; + + function report(r) { + if(!r.handled) { + reported.push(r); + logError('Potentially unhandled rejection [' + r.id + '] ' + format.formatError(r.value)); + } + } + + function unreport(r) { + var i = reported.indexOf(r); + if(i >= 0) { + reported.splice(i, 1); + logInfo('Handled previous rejection [' + r.id + '] ' + format.formatObject(r.value)); + } + } + + function enqueue(f, x) { + tasks.push(f, x); + if(running === null) { + running = setTimer(flush, 0); + } + } + + function flush() { + running = null; + while(tasks.length > 0) { + tasks.shift()(tasks.shift()); + } + } + + return Promise; + }; + + function throwit(e) { + throw e; + } + + function noop() {} + +}).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +}(__webpack_require__(313))); + + +/***/ }), +/* 332 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ +/** @author Brian Cavalier */ +/** @author John Hann */ + +(function(define) { 'use strict'; +!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { + + return { + formatError: formatError, + formatObject: formatObject, + tryStringify: tryStringify + }; + + /** + * Format an error into a string. If e is an Error and has a stack property, + * it's returned. Otherwise, e is formatted using formatObject, with a + * warning added about e not being a proper Error. + * @param {*} e + * @returns {String} formatted string, suitable for output to developers + */ + function formatError(e) { + var s = typeof e === 'object' && e !== null && (e.stack || e.message) ? e.stack || e.message : formatObject(e); + return e instanceof Error ? s : s + ' (WARNING: non-Error used)'; + } + + /** + * Format an object, detecting "plain" objects and running them through + * JSON.stringify if possible. + * @param {Object} o + * @returns {string} + */ + function formatObject(o) { + var s = String(o); + if(s === '[object Object]' && typeof JSON !== 'undefined') { + s = tryStringify(o, s); + } + return s; + } + + /** + * Try to return the result of JSON.stringify(x). If that fails, return + * defaultValue + * @param {*} x + * @param {*} defaultValue + * @returns {String|*} JSON.stringify(x) or defaultValue + */ + function tryStringify(x, defaultValue) { + try { + return JSON.stringify(x); + } catch(e) { + return defaultValue; + } + } + +}).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +}(__webpack_require__(313))); + + +/***/ }), +/* 333 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ +/** @author Brian Cavalier */ +/** @author John Hann */ + +(function(define) { 'use strict'; +!(__WEBPACK_AMD_DEFINE_RESULT__ = (function (require) { + + var makePromise = __webpack_require__(334); + var Scheduler = __webpack_require__(335); + var async = __webpack_require__(314).asap; + + return makePromise({ + scheduler: new Scheduler(async) + }); + +}).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +})(__webpack_require__(313)); + + +/***/ }), +/* 334 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(process) {var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ +/** @author Brian Cavalier */ +/** @author John Hann */ + +(function(define) { 'use strict'; +!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { + + return function makePromise(environment) { + + var tasks = environment.scheduler; + var emitRejection = initEmitRejection(); + + var objectCreate = Object.create || + function(proto) { + function Child() {} + Child.prototype = proto; + return new Child(); + }; + + /** + * Create a promise whose fate is determined by resolver + * @constructor + * @returns {Promise} promise + * @name Promise + */ + function Promise(resolver, handler) { + this._handler = resolver === Handler ? handler : init(resolver); + } + + /** + * Run the supplied resolver + * @param resolver + * @returns {Pending} + */ + function init(resolver) { + var handler = new Pending(); + + try { + resolver(promiseResolve, promiseReject, promiseNotify); + } catch (e) { + promiseReject(e); + } + + return handler; + + /** + * Transition from pre-resolution state to post-resolution state, notifying + * all listeners of the ultimate fulfillment or rejection + * @param {*} x resolution value + */ + function promiseResolve (x) { + handler.resolve(x); + } + /** + * Reject this promise with reason, which will be used verbatim + * @param {Error|*} reason rejection reason, strongly suggested + * to be an Error type + */ + function promiseReject (reason) { + handler.reject(reason); + } + + /** + * @deprecated + * Issue a progress event, notifying all progress listeners + * @param {*} x progress event payload to pass to all listeners + */ + function promiseNotify (x) { + handler.notify(x); + } + } + + // Creation + + Promise.resolve = resolve; + Promise.reject = reject; + Promise.never = never; + + Promise._defer = defer; + Promise._handler = getHandler; + + /** + * Returns a trusted promise. If x is already a trusted promise, it is + * returned, otherwise returns a new trusted Promise which follows x. + * @param {*} x + * @return {Promise} promise + */ + function resolve(x) { + return isPromise(x) ? x + : new Promise(Handler, new Async(getHandler(x))); + } + + /** + * Return a reject promise with x as its reason (x is used verbatim) + * @param {*} x + * @returns {Promise} rejected promise + */ + function reject(x) { + return new Promise(Handler, new Async(new Rejected(x))); + } + + /** + * Return a promise that remains pending forever + * @returns {Promise} forever-pending promise. + */ + function never() { + return foreverPendingPromise; // Should be frozen + } + + /** + * Creates an internal {promise, resolver} pair + * @private + * @returns {Promise} + */ + function defer() { + return new Promise(Handler, new Pending()); + } + + // Transformation and flow control + + /** + * Transform this promise's fulfillment value, returning a new Promise + * for the transformed result. If the promise cannot be fulfilled, onRejected + * is called with the reason. onProgress *may* be called with updates toward + * this promise's fulfillment. + * @param {function=} onFulfilled fulfillment handler + * @param {function=} onRejected rejection handler + * @param {function=} onProgress @deprecated progress handler + * @return {Promise} new promise + */ + Promise.prototype.then = function(onFulfilled, onRejected, onProgress) { + var parent = this._handler; + var state = parent.join().state(); + + if ((typeof onFulfilled !== 'function' && state > 0) || + (typeof onRejected !== 'function' && state < 0)) { + // Short circuit: value will not change, simply share handler + return new this.constructor(Handler, parent); + } + + var p = this._beget(); + var child = p._handler; + + parent.chain(child, parent.receiver, onFulfilled, onRejected, onProgress); + + return p; + }; + + /** + * If this promise cannot be fulfilled due to an error, call onRejected to + * handle the error. Shortcut for .then(undefined, onRejected) + * @param {function?} onRejected + * @return {Promise} + */ + Promise.prototype['catch'] = function(onRejected) { + return this.then(void 0, onRejected); + }; + + /** + * Creates a new, pending promise of the same type as this promise + * @private + * @returns {Promise} + */ + Promise.prototype._beget = function() { + return begetFrom(this._handler, this.constructor); + }; + + function begetFrom(parent, Promise) { + var child = new Pending(parent.receiver, parent.join().context); + return new Promise(Handler, child); + } + + // Array combinators + + Promise.all = all; + Promise.race = race; + Promise._traverse = traverse; + + /** + * Return a promise that will fulfill when all promises in the + * input array have fulfilled, or will reject when one of the + * promises rejects. + * @param {array} promises array of promises + * @returns {Promise} promise for array of fulfillment values + */ + function all(promises) { + return traverseWith(snd, null, promises); + } + + /** + * Array> -> Promise> + * @private + * @param {function} f function to apply to each promise's value + * @param {Array} promises array of promises + * @returns {Promise} promise for transformed values + */ + function traverse(f, promises) { + return traverseWith(tryCatch2, f, promises); + } + + function traverseWith(tryMap, f, promises) { + var handler = typeof f === 'function' ? mapAt : settleAt; + + var resolver = new Pending(); + var pending = promises.length >>> 0; + var results = new Array(pending); + + for (var i = 0, x; i < promises.length && !resolver.resolved; ++i) { + x = promises[i]; + + if (x === void 0 && !(i in promises)) { + --pending; + continue; + } + + traverseAt(promises, handler, i, x, resolver); + } + + if(pending === 0) { + resolver.become(new Fulfilled(results)); + } + + return new Promise(Handler, resolver); + + function mapAt(i, x, resolver) { + if(!resolver.resolved) { + traverseAt(promises, settleAt, i, tryMap(f, x, i), resolver); + } + } + + function settleAt(i, x, resolver) { + results[i] = x; + if(--pending === 0) { + resolver.become(new Fulfilled(results)); + } + } + } + + function traverseAt(promises, handler, i, x, resolver) { + if (maybeThenable(x)) { + var h = getHandlerMaybeThenable(x); + var s = h.state(); + + if (s === 0) { + h.fold(handler, i, void 0, resolver); + } else if (s > 0) { + handler(i, h.value, resolver); + } else { + resolver.become(h); + visitRemaining(promises, i+1, h); + } + } else { + handler(i, x, resolver); + } + } + + Promise._visitRemaining = visitRemaining; + function visitRemaining(promises, start, handler) { + for(var i=start; i 0){\r\n\t\tartist.images = [formatImages(data.images)];\r\n\t}\r\n\r\n\tif (data.followers && data.followers.total !== undefined){\r\n\t\tartist.followers = data.followers.total;\r\n\t}\r\n\r\n\tif (data.bio){\r\n\t\tif (data.bio.content && !artist.biography){\r\n\t\t\tartist.biography = data.bio.content;\r\n\t\t}\r\n\t\tif (data.bio.links && data.bio.links.link && data.bio.links.link.href && !artist.biography_link){\r\n\t\t\tartist.biography_link = data.bio.links.link.href;\r\n\t\t}\r\n\t\tif (data.bio.published && !artist.biography_publish_date){\r\n\t\t\tartist.biography_publish_date = data.bio.published;\r\n\t\t}\r\n\t}\r\n \r\n\tif (artist.provider === undefined && artist.uri !== undefined){\r\n\t\tartist.provider = uriSource(artist.uri);\r\n\t}\r\n\r\n\treturn artist;\r\n}\r\n\r\n\r\n/**\r\n * Format our playlist objects into a universal format\r\n *\r\n * @param data obj\r\n * @return obj\r\n **/\r\nexport let formatPlaylist = function(data){\r\n\tvar playlist = {}\r\n\tvar fields = [\r\n\t\t'uri',\r\n\t\t'snapshot_id',\r\n\t\t'provider',\r\n\t\t'type',\r\n\t\t'collaborative',\r\n\t\t'public',\r\n\t\t'name',\r\n\t\t'description',\r\n\t\t'images',\r\n\t\t'popularity',\r\n\t\t'followers',\r\n\t\t'added_at',\r\n\t\t'last_modified_date',\r\n\t\t'can_edit',\r\n\t\t'owner',\r\n\t\t'user_uri',\r\n\t\t'tracks_uris',\r\n\t\t'tracks_total',\r\n\t\t'tracks_more'\r\n\t];\r\n\r\n\t// Loop fields and import from data\r\n\tfor (var field of fields){\r\n\t\tif (data.hasOwnProperty(field)){\r\n\t\t\tplaylist[field] = data[field];\r\n\t\t}\r\n\t}\r\n\r\n\tif (playlist.images && !playlist.images.formatted){\r\n\t\tplaylist.images = formatImages(playlist.images);\r\n\t}\r\n\r\n\tif (data.followers && data.followers.total !== undefined){\r\n\t\tplaylist.followers = data.followers.total;\r\n\t}\r\n\r\n\tif (data.tracks && data.tracks.total !== undefined){\r\n\t\tplaylist.tracks_total = data.tracks.total;\r\n\t}\r\n\r\n\tif (data.owner){\r\n\t\tplaylist.owner = {\r\n\t\t\tid: data.owner.id,\r\n\t\t\turi: data.owner.uri,\r\n\t\t\tname: (data.owner.display_name ? data.owner.display_name : null)\r\n\t\t}\r\n\t\tplaylist.user_uri = data.owner.uri;\r\n\t}\r\n\r\n\t// Spotify upgraded their playlists URI to remove user component (Sept 2018)\r\n\tplaylist.uri = upgradeSpotifyPlaylistUri(playlist.uri);\r\n\r\n\tif (playlist.provider === undefined && playlist.uri !== undefined){\r\n\t\tplaylist.provider = uriSource(playlist.uri);\r\n\t}\r\n\r\n\treturn playlist;\r\n}\r\n\r\n\r\n/**\r\n * Format a user objects into a universal format\r\n *\r\n * @param data obj\r\n * @return obj\r\n **/\r\nexport let formatUser = function(data){\r\n\tvar user = {}\r\n\tvar fields = [\r\n\t\t'id',\r\n\t\t'uri',\r\n\t\t'provider',\r\n\t\t'name',\r\n\t\t'images',\r\n\t\t'followers',\r\n\t\t'playlists_uris',\r\n\t\t'playlists_total',\r\n\t\t'playlists_more'\r\n\t];\r\n\r\n\t// Loop fields and import from data\r\n\tfor (var field of fields){\r\n\t\tif (data.hasOwnProperty(field)){\r\n\t\t\tuser[field] = data[field];\r\n\t\t}\r\n\t}\r\n\r\n\tif (!user.images && data.image){\r\n\t\tuser.images = formatImages(data.image);\r\n\t} else if (!user.images && data.avatar){\r\n\t\tuser.images = formatImages(data.avatar);\r\n\t} else if (user.images && !user.images.formatted){\r\n\t\tuser.images = formatImages(user.images);\r\n\t}\r\n\r\n\tif (data.followers && data.followers.total !== undefined){\r\n\t\tuser.followers = data.followers.total;\r\n\t}\r\n\tif (data.realname){\r\n\t\tuser.name = data.realname;\r\n\t}\r\n\tif (data.display_name && !user.name){\r\n\t\tuser.name = data.display_name;\r\n\t}\r\n\tif (data.id && !user.name){\r\n\t\tuser.name = data.id;\r\n\t}\r\n\tif (user.provider === undefined && user.uri !== undefined){\r\n\t\tuser.provider = uriSource(user.uri);\r\n\t}\r\n\r\n\treturn user;\r\n}\r\n\r\n\r\n/**\r\n * Format tracks into our universal format\r\n *\r\n * @param data obj\r\n * @return obj\r\n **/\r\nexport let formatTrack = function(data){\r\n\tvar track = {}\r\n\tvar fields = [\r\n\t\t'uri',\r\n\t\t'tlid',\r\n\t\t'provider',\r\n\t\t'name',\r\n\t\t'images',\r\n\t\t'release_date',\r\n\t\t'disc_number',\r\n\t\t'track_number',\r\n\t\t'duration',\r\n\t\t'followers',\r\n\t\t'popularity',\r\n\t\t'userloved',\r\n\t\t'is_explicit',\r\n\t\t'is_local',\r\n\t\t'lyrics',\r\n\t\t'lyrics_path',\r\n\t\t'lyrics_results',\r\n\t\t'artists',\t// Array of simple records\r\n\t\t'album'\t\t// Array of simple records\r\n\t];\r\n\r\n\t// Nested track object (eg in spotify playlist)\r\n\tif (data && data.track && isObject(data.track)){\r\n\r\n\t\t// Copy wrapper's details (if applicable)\r\n\t\tif (data.added_by){\r\n\t\t\tdata.track.added_by = data.added_by;\r\n\t\t}\r\n\t\tif (data.added_at){\r\n\t\t\tdata.track.added_at = data.added_at;\r\n\t\t}\r\n\t\tif (data.tlid){\r\n\t\t\tdata.track.tlid = data.tlid;\r\n\t\t}\r\n\r\n\t\t// And now flatten\r\n\t\tdata = data.track;\r\n\t}\r\n\r\n\t// Loop fields and import from data\r\n\tfor (var field of fields){\r\n\t\tif (data.hasOwnProperty(field)){\r\n\t\t\ttrack[field] = data[field];\r\n\t\t}\r\n\t}\r\n\r\n\tif (data.followers && data.followers.total){\r\n\t\ttrack.followers = data.followers.total;\r\n\t}\r\n\r\n\tif (track.duration === undefined && data.duration_ms !== undefined){\r\n\t\ttrack.duration = data.duration_ms;\r\n\t} else if (track.duration === undefined && data.length !== undefined){\r\n\t\ttrack.duration = data.length;\r\n\t}\r\n\r\n if (track.track_number === undefined && data.track_no !== undefined){\r\n \ttrack.track_number = data.track_no;\r\n }\r\n\r\n if (track.disc_number === undefined && data.disc_no !== undefined){\r\n \ttrack.disc_number = data.disc_no;\r\n }\r\n\r\n if (track.release_date === undefined && data.date !== undefined){\r\n \ttrack.release_date = data.date;\r\n }\r\n\r\n if (track.explicit === undefined && data.explicit !== undefined){\r\n \ttrack.is_explicit = data.explicit;\r\n }\r\n\r\n // Copy images from albums (if applicable)\r\n // TOOD: Identify if we stil need this...\r\n if (data.album && data.album.images){\r\n \tif (track.images === undefined || !track.images.formatted){\r\n \t\ttrack.images = formatImages(data.album.images);\r\n \t}\r\n }\r\n\r\n\tif (track.provider === undefined && track.uri !== undefined){\r\n\t\ttrack.provider = uriSource(track.uri);\r\n\t}\r\n\r\n\treturn track;\r\n}\r\n\r\n/**\r\n * Format a snapcast client object into a universal format\r\n *\r\n * @param data obj\r\n * @return obj\r\n **/\r\nexport let formatClient = function(data){\r\n\tvar client = {}\r\n\tvar fields = [\r\n\t\t'id',\r\n\t\t'connected',\r\n\t\t'name',\r\n\t\t'host_name',\r\n\t\t'volume',\r\n\t\t'mute',\r\n\t\t'latency',\r\n\t\t'power_on_command',\r\n\t\t'power_off_command'\r\n\t];\r\n\r\n\tfor (var field of fields){\r\n\t\tif (data.hasOwnProperty(field)){\r\n\t\t\tclient[field] = data[field];\r\n\t\t}\r\n\t}\r\n\r\n\tif (data.config){\r\n\t\tif (client.latency === undefined && data.config.latency !== undefined){\r\n\t\t\tclient.latency = data.config.latency;\r\n\t\t}\r\n\r\n\t\tif (!client.name && data.config.name){\r\n\t\t\tclient.name = data.config.name;\r\n\t\t}\r\n\r\n\t\tif (data.config.volume){\r\n\t\t\tif (data.config.volume.percent){\r\n\t\t\t\tclient.volume = data.config.volume.percent;\r\n\t\t\t}\r\n\t\t\tif (data.config.volume.muted){\r\n\t\t\t\tclient.mute = data.config.volume.muted;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif (client.name === undefined && data.host && data.host.name){\r\n\t\tclient.name = data.host.name;\r\n\t}\r\n\r\n\treturn client;\r\n}\r\n\r\n/**\r\n * Format a snapcast client object into a universal format\r\n *\r\n * @param data obj\r\n * @return obj\r\n **/\r\nexport let formatGroup = function(data){\r\n\tvar group = {}\r\n\tvar fields = [\r\n\t\t'id',\r\n\t\t'name',\r\n\t\t'mute',\r\n\t\t'stream_id',\r\n\t\t'clients_ids'\r\n\t];\r\n\r\n\tfor (var field of fields){\r\n\t\tif (data.hasOwnProperty(field)){\r\n\t\t\tgroup[field] = data[field];\r\n\t\t}\r\n\t}\r\n\r\n\tif (group.name === undefined || group.name === \"\"){\r\n\t\tgroup.name = 'Group '+data.id.substring(0,3);\r\n\t}\r\n\r\n\tif (group.mute === undefined && data.mute !== undefined){\r\n\t\tgroup.mute = data.mute;\r\n\t}\r\n\r\n\treturn group;\r\n}\r\n\r\n\r\n/**\r\n * Collate an object with external references into a fully self-contained object\r\n * We merge *_uris references (ie tracks_uris) into the main object\r\n *\r\n * @param object Obj\r\n * @param indexes Obj (the relevant core indexes)\r\n * @return object Obj\r\n **/\r\nexport let collate = function(obj, indexes = {}){\r\n\r\n\t// First, let's reset this object\r\n\t// This is important because by changing this object, we inadvertently\r\n\t// change the source object (ie the indexed record), which undoes the\r\n\t// efficiencies of a lean index object\r\n\tobj = Object.assign({}, obj);\r\n\r\n\t// Setup empty arrays for the appropriate reference objects\r\n\t// This helps create a consistent object structure\r\n\tif (obj.artists_uris !== undefined) \t\tobj.artists = [];\r\n\tif (obj.albums_uris !== undefined) \t\t\tobj.albums = [];\r\n\tif (obj.tracks_uris !== undefined) \t\t\tobj.tracks = [];\r\n\tif (obj.users_uris !== undefined) \t\t\tobj.users = [];\r\n\tif (obj.playlists_uris !== undefined) \t\tobj.playlists = [];\r\n\tif (obj.related_artists_uris !== undefined) obj.related_artists = [];\r\n\tif (obj.clients_ids !== undefined) \t\t\tobj.clients = [];\r\n\r\n\tif (indexes.artists){\r\n\t\tif (obj.artists_uris){\r\n\t\t\tfor (var uri of obj.artists_uris){\r\n\t\t\t\tif (indexes.artists[uri]){\r\n\t\t\t\t\tobj.artists.push(indexes.artists[uri]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (obj.related_artists_uris){\r\n\t\t\tfor (var uri of obj.related_artists_uris){\r\n\t\t\t\tif (indexes.artists[uri]){\r\n\t\t\t\t\tobj.related_artists.push(indexes.artists[uri]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (obj.artist_uri){\r\n\t\t\tif (indexes.artists[obj.artist_uri]){\r\n\t\t\t\tobj.artist = indexes.artists[obj.artist_uri];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif (indexes.albums){\r\n\t\tif (obj.albums_uris){\r\n\t\t\tfor (var uri of obj.albums_uris){\r\n\t\t\t\tif (indexes.albums[uri]){\r\n\t\t\t\t\tobj.albums.push(indexes.albums[uri]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (obj.album_uri){\r\n\t\t\tif (indexes.albums[obj.album_uri]){\r\n\t\t\t\tobj.album = indexes.albums[obj.album_uri];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif (indexes.tracks){\r\n\t\tif (obj.tracks_uris){\r\n\t\t\tfor (var uri of obj.tracks_uris){\r\n\t\t\t\tif (indexes.tracks[uri]){\r\n\t\t\t\t\tobj.tracks.push(indexes.tracks[uri]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (obj.track_uri){\r\n\t\t\tif (indexes.tracks[obj.track_uri]){\r\n\t\t\t\tobj.track = indexes.tracks[obj.track_uri];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif (indexes.users){\r\n\t\tif (obj.users_uris){\r\n\t\t\tfor (var uri of obj.users_uris){\r\n\t\t\t\tif (indexes.users[uri]){\r\n\t\t\t\t\tobj.users.push(indexes.users[uri]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (obj.user_uri){\r\n\t\t\tif (indexes.users[obj.user_uri]){\r\n\t\t\t\tobj.user = indexes.users[obj.user_uri];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif (indexes.playlists){\r\n\t\tif (obj.playlists_uris){\r\n\t\t\tfor (var uri of obj.playlists_uris){\r\n\t\t\t\tif (indexes.playlists[uri]){\r\n\t\t\t\t\tobj.playlists.push(indexes.playlists[uri]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (obj.playlist_uri){\r\n\t\t\tif (indexes.playlists[obj.playlist_uri]){\r\n\t\t\t\tobj.playlist = indexes.playlists[obj.playlist_uri];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif (indexes.clients){\r\n\t\tif (obj.clients_ids){\r\n\t\t\tfor (var id of obj.clients_ids){\r\n\t\t\t\tif (indexes.clients[id]){\r\n\t\t\t\t\tobj.clients.push(indexes.clients[id]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn obj;\r\n}\r\n\r\n\r\n\r\n\r\n/**\r\n * Figure out a URI's source namespace\r\n * @param uri = string\r\n **/\r\nexport let uriSource = function(uri){\r\n\tif (!uri){\r\n\t\treturn false;\r\n\t}\r\n var exploded = uri.split(':');\r\n return exploded[0]\r\n}\r\n\r\nexport let sourceIcon = function(uri,source = null){\r\n\tif (uri) source = uriSource(uri)\r\n\tswitch(source){\r\n\r\n\t\tcase 'local':\r\n\t\tcase 'm3u':\r\n\t\t\treturn 'folder'\r\n\r\n\t\tcase 'gmusic':\r\n\t\t\treturn 'google'\r\n\r\n\t\tcase 'podcast':\r\n\t\tcase 'podcast+file':\r\n\t\tcase 'podcast+http':\r\n\t\tcase 'podcast+https':\r\n\t\tcase 'podcast+itunes':\r\n\t\t\treturn 'podcast'\r\n\r\n\t\tcase 'tunein':\r\n\t\tcase 'somafm':\r\n\t\tcase 'dirble':\r\n\t\t\treturn 'microphone'\r\n\r\n\t\tdefault:\r\n\t\t\treturn source\r\n\t}\r\n}\r\n\r\n\r\n\r\n/**\r\n * Get an element from a URI\r\n * @param element = string, the element we wish to extract\r\n * @param uri = string\r\n **/\r\nexport let getFromUri = function(element, uri = \"\"){\r\n var exploded = uri.split(':');\r\n var namespace = exploded[0]\r\n\r\n switch (element){\r\n \tcase 'mbid':\r\n\t var index = exploded.indexOf('mbid')\r\n\t if (index > -1 ) return exploded[index+1]\r\n\t break\r\n\r\n \tcase 'artistid':\r\n \t\tif (exploded[1] == 'artist'){\r\n \t\t\treturn exploded[2]\r\n \t\t}\r\n \t\tbreak\r\n\r\n \tcase 'albumid':\r\n \t\tif (exploded[1] == 'album'){\r\n \t\t\treturn exploded[2]\r\n \t\t}\r\n \t\tbreak\r\n\r\n \tcase 'playlistid':\r\n \t\tif (exploded[1] == 'playlist'){\r\n \t\t\treturn exploded[2]\r\n \t\t} else if (exploded[1] == 'user' && exploded[3] == 'playlist'){\r\n \t\t\treturn exploded[4]\r\n \t\t}\r\n \t\tbreak\r\n\r\n \tcase 'playlistowner':\r\n \t\tif (exploded[1] == 'user' && exploded[3] == 'playlist'){\r\n \t\t\treturn exploded[2]\r\n \t\t}\r\n \t\tbreak\r\n\r\n \tcase 'trackid':\r\n \t\tif (exploded[1] == 'track'){\r\n \t\t\treturn exploded[2]\r\n \t\t}\r\n \t\tbreak\r\n\r\n \tcase 'userid':\r\n \t\tif (exploded[1] == 'user'){\r\n \t\t\treturn exploded[2]\r\n \t\t}\r\n \t\tbreak\r\n\r\n \tcase 'genreid':\r\n \t\tif (exploded[1] == 'genre'){\r\n \t\t\treturn exploded[2]\r\n \t\t}\r\n \t\tbreak\r\n\r\n \tcase 'seeds':\r\n \t\tif (exploded[1] == 'discover'){\r\n \t\t\treturn exploded[2]\r\n \t\t}\r\n \t\tbreak\r\n\r\n \tcase 'searchtype':\r\n \t\tif (exploded[0] == \"search\"){\r\n\t\t\t\treturn exploded[1];\r\n \t\t}\r\n \t\tbreak\r\n\r\n \tcase 'searchterm':\r\n \t\tif (exploded[0] == \"search\"){\r\n\t\t\t\treturn exploded[2];\r\n \t\t}\r\n \t\tbreak\r\n }\r\n return null\r\n}\r\n\r\n/**\r\n * Identify what kind of asset a URI is (playlist, album, etc)\r\n *\r\n * @param uri = string\r\n * @return string\r\n **/\r\nexport let uriType = function(uri){\r\n\tif (!uri) return null;\r\n\r\n var exploded = uri.split(':')\r\n\r\n if (exploded[0] == 'm3u'){\r\n \treturn 'playlist'\r\n }\r\n\r\n if (exploded[0] == 'iris'){\r\n \tswitch (exploded[1]){\r\n\t \tcase 'search':\r\n\t \tcase 'discover':\r\n\t \tcase 'browse':\r\n\t \t\treturn exploded[1];\r\n\t \t\tbreak;\r\n\t }\r\n }\r\n\r\n switch (exploded[1]){\r\n \tcase 'track':\r\n \tcase 'artist':\r\n \tcase 'album':\r\n \tcase 'playlist':\r\n \tcase 'genre':\r\n \t\treturn exploded[1]\r\n \t\tbreak\r\n\r\n \tcase 'user':\r\n \t\tif (exploded.length > 3 && exploded[3] == 'playlist'){\r\n \t\t\treturn 'playlist'\r\n \t\t}\r\n \t\treturn exploded[1]\r\n \t\tbreak\r\n }\r\n}\r\n\r\n\r\n/**\r\n * Build a link to an asset. Using the URI type we can ascertain where we need\r\n * to direct the user (eg /track/local:track:1235.mp3)\r\n *\r\n * @param $uri = String\r\n * @return String\r\n **/\r\nexport let buildLink = function (uri){\r\n\r\n\t// Start the link with the URI type\r\n\tvar type = uriType(uri);\r\n\tvar link = \"/\"+type+\"/\";\r\n\r\n\t// Encode the whole URI as though it's a component. This makes it URL friendly for \r\n\t// all Mopidy backends (some use URIs like local:track:http://rss.com/stuff.mp3) which\r\n\t// is never going to work nicely.\r\n\turi = encodeURIComponent(uri);\r\n\tlink += uri;\r\n\r\n\treturn link;\r\n}\r\n\r\n\r\n/**\r\n * Digest an array of objects and pull into simple array of one property\r\n * \r\n * @param property = string\r\n * @param items = Array\r\n * @return Array\r\n **/\r\nexport let arrayOf = function(property, items){\r\n\tlet array = [];\r\n\tfor (var item of items){\r\n\t\tarray.push(item[property]);\r\n\t}\r\n\treturn array;\r\n}\r\n\r\n\r\n/**\r\n * Merge duplicated items in an array\r\n *\r\n * @param list Array the unclean array\r\n * @param key string = the unique key (id, uri, tlid, etc)\r\n **/\r\nexport let mergeDuplicates = function(list, key){\r\n\tvar clean_list = [];\r\n\tvar keyed_list = {};\r\n\r\n\tfor(var i in list){\r\n\t\tvar item = list[i]\r\n\t\tif (item[key] in keyed_list){\r\n\t\t\titem = Object.assign({}, keyed_list[item[key]], item)\r\n\t\t}\r\n\t\tkeyed_list[item[key]] = item;\r\n\t}\r\n\r\n\tfor(i in keyed_list){\r\n\t\tclean_list.push(keyed_list[i]);\r\n\t}\r\n\r\n\treturn clean_list;\r\n}\r\n\r\n\r\n/**\r\n * Remove duplicate items in a simple array\r\n *\r\n * @param list Array the unclean array\r\n **/\r\nexport let removeDuplicates = function(array){\r\n\tvar unique = [];\r\n\r\n\tfor (var i in array){\r\n\t\tif (unique.indexOf(array[i]) <= -1){\r\n\t\t\tunique.push(array[i])\r\n\t\t}\r\n\t}\r\n\r\n\treturn unique;\r\n}\r\n\r\n\r\n/**\r\n * Apply a partial text search on an array of objects\r\n *\r\n * @param field = string (the field we're to search)\r\n * @param value = string (the value to find)\r\n * @param array = array of objects to search\r\n * @param singular = boolean (just return the first result)\r\n * @return array\r\n **/\r\nexport let applyFilter = function(field, value, array, singular = false){\r\n\tvar results = [];\r\n\r\n\tfor (var i = 0; i < array.length; i++){\r\n\t\tif (array[i][field] && String(array[i][field]).toLowerCase().includes(String(value).toLowerCase())){\r\n\t\t\tif (singular){\r\n\t\t\t\treturn array[i];\r\n\t\t\t} else {\r\n\t\t\t\tresults.push(array[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn results;\r\n}\r\n\r\n\r\n/**\r\n * Convert a list of indexes to a useable range\r\n * We ignore stragglers, and only attend to the first 'bunch' of consecutive indexes\r\n * \r\n * @param indexes array of int\r\n **/\r\nexport let createRange = function (indexes){\r\n\r\n\t// sort our indexes smallest to largest\r\n\tfunction sortAsc(a,b){\r\n return a - b\r\n }\r\n indexes.sort(sortAsc);\r\n\r\n // iterate indexes to build the first 'bunch'\r\n var first_bunch = []\r\n var previous_index = false\r\n for(var i = 0; i < indexes.length; i++){\r\n if (!previous_index || previous_index == indexes[i]-1){\r\n first_bunch.push(indexes[i])\r\n previous_index = indexes[i]\r\n }\r\n // TODO: break when we find an integer step for better performance\r\n }\r\n\r\n return {\r\n \tstart: first_bunch[0],\r\n \tlength: first_bunch.length\r\n }\r\n}\r\n\r\n\r\n\r\n/**\r\n * Sort an array of objects\r\n * @param array = array to sort\r\n * @param property = string to sort by\r\n * @param reverse = boolean\r\n * @param sort_map = array of value ordering (rather than alphabetical, numerical, etc)\r\n * @return array\r\n **/\r\nexport let sortItems = function (array, property, reverse = false, sort_map = null){\r\n\r\n\tif (!array || array.length <= 0){\r\n\t\treturn [];\r\n\t}\r\n\r\n\tfunction get_value(value){\r\n\t\tvar split = property.split('.');\r\n\t\tfor (var property_element of split){\r\n\r\n\t\t\t// Apply sort on a property of the first item of an array\r\n\t\t\tif (property_element == 'first' && Array.isArray(value) && value.length > 0){\r\n\t\t\t\tvalue = value[0];\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\t// Just need the length of an array\r\n\t\t\t} else if (property_element == 'length'){\r\n\t\t\t\tif (Array.isArray(value)){\r\n\t\t\t\t\treturn value.length;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t// No value here\r\n\t\t\t} else if (typeof(value[property_element]) === 'undefined'){\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Otherwise continue looping to the end of the split property\r\n\t\t\tvalue = value[property_element];\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n\r\n\tfunction compare(a,b){\r\n\r\n\t\tvar a_value = get_value(a);\r\n\t\tvar b_value = get_value(b);\r\n\r\n\t\t// Sorting by URI as a reference for sorting by uri source (first component of URI)\r\n\t\tif (property == 'uri'){\r\n\t\t\ta_value = uriSource(a_value);\r\n\t\t\tb_value = uriSource(b_value);\r\n\t\t}\r\n\r\n\t\t// Map sorting\r\n\t\t// Use the index of the string as a sorting mechanism\r\n\t\tif (sort_map){\r\n\r\n\t\t\tvar a_index = sort_map.indexOf(a_value+':');\r\n\t\t\tvar b_index = sort_map.indexOf(b_value+':');\r\n\t\t\tif (a_index < b_index) return 1;\r\n\t\t\tif (a_index > b_index) return -1;\r\n\r\n\t\t// Boolean sorting\r\n\t\t} else if (typeof(a_value) === 'boolean'){\r\n\t\t\tif (a_value && !b_value) return -1;\r\n\t\t\tif (!a_value && b_value) return 1;\r\n\t\t\treturn 0\r\n\r\n\t\t// Alphabetic sorting\r\n\t\t} else if (typeof(a_value) === 'string'){\r\n\t\t\tif (!a_value || !b_value ) return 0;\r\n\t\t\tif (a_value.toLowerCase() > b_value.toLowerCase()) return 1;\r\n\t\t\tif (a_value.toLowerCase() < b_value.toLowerCase()) return -1;\r\n\t\t\treturn 0\r\n\r\n\t\t// Numeric sorting\r\n\t\t} else {\r\n\t\t\tif (a_value == null && b_value == null) return 0;\r\n\t\t\tif (a_value == null) return -1;\r\n\t\t\tif (b_value == null) return 1;\r\n\t\t\tif (parseInt(a_value) > parseInt(b_value)) return 1;\r\n\t\t\tif (parseInt(a_value) < parseInt(b_value)) return -1;\r\n\t\t\treturn 0\r\n\t\t}\r\n\t}\r\n\r\n\tvar sorted = Object.assign([], array.sort(compare));\r\n\tif (reverse){\r\n\t\tsorted.reverse();\r\n\t}\r\n\treturn sorted;\r\n}\r\n\r\n/**\r\n * Shuffle items in place\r\n *\r\n * @param Array items\r\n * @return Array\r\n **/\r\nexport let shuffle = function(array){\r\n var j, x, i;\r\n for (i = array.length - 1; i > 0; i--) {\r\n j = Math.floor(Math.random() * (i + 1));\r\n x = array[i];\r\n array[i] = array[j];\r\n array[j] = x;\r\n }\r\n return array;\r\n}\r\n\r\n/**\r\n * Figure out if a value is a number\r\n * @param value = mixed\r\n * @return boolean\r\n **/\r\nexport let isNumeric = function (value){\r\n\treturn !isNaN(parseFloat(value)) && isFinite(value)\r\n}\r\n\r\n\r\n/** \r\n * Figure out if a value is an object\r\n * @param value = mixed\r\n * @return boolean\r\n **/\r\nexport let isObject = function(value){\r\n\treturn value instanceof Object && value.constructor === Object;\r\n}\r\n\r\n\r\n/**\r\n * Detect if an item is in the loading queue. We simply loop all load items to\r\n * see if any items contain our searched key.\r\n *\r\n * TODO: Explore performance of this\r\n * TODO: Allow wildcards\r\n *\r\n * @param load_queue = obj (passed from store)\r\n * @param key = string (the string to lookup)\r\n * @return boolean\r\n **/\r\nexport let isLoading = function(load_queue = [], keys = []){\r\n\r\n\t// Loop all of our load queue items\r\n\tfor (var load_queue_key in load_queue){\r\n\r\n\t\t// Make sure it's not a root object method\r\n\t\tif (load_queue.hasOwnProperty(load_queue_key)){\r\n\r\n\t\t\t// Loop all the keys we're looking for\r\n\t\t\tfor (var i = 0; i < keys.length; i++){\r\n\t\t\t\tif (load_queue[load_queue_key].includes(keys[i])){\r\n\t\t\t\t\treturn true\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn false\r\n}\r\n\r\n\r\n/**\r\n * Is this app running from the hosted instance?\r\n * For example the GitHub-hosted UI\r\n *\r\n * @param Array hosts = valid hosted domain names\r\n * @return Boolean\r\n **/\r\nexport let isHosted = function(hosts = ['jaedb.github.io']){\r\n\tvar hostname = window.location.hostname;\r\n\treturn hosts.includes(hostname);\r\n}\r\n\r\n\r\n\r\n/**\r\n * Get indexed record(s) by URI from our asset index\r\n *\r\n * @param store = obj\r\n * @param uris = mixed (array or string)\r\n * @return array\r\n **/\r\nexport let getIndexedRecords = function(index, uris){\r\n\tvar records = []\r\n\r\n\t// Wrap in array, if we've only got one URI\r\n\tif (!uris instanceof Array){\r\n\t\turis = [uris]\r\n\t}\r\n\r\n\tfor (var i = 0; i < uris.length; i++){\r\n\t\tif (index.hasOwnProperty(uris[i])){\r\n\t\t\trecords.push(index[uris[i]])\r\n\t\t}\r\n\t}\r\n\r\n\treturn records\r\n}\r\n\r\n\r\n/**\r\n * Uppercase-ify the first character of a string\r\n *\r\n * @param string String\r\n * @return String\r\n **/\r\nexport let titleCase = function(string){\r\n return string.charAt(0).toUpperCase() + string.slice(1)\r\n}\r\n\r\n\r\n/**\r\n * Scroll to the top of the page\r\n * Our 'content' is housed in the
DOM element\r\n * We make sure the target supports scrolling before we attempt it\r\n * Safari and IE Edge, well, don't.\r\n *\r\n * @param target String (element ID, optional)\r\n * @param smooth_scroll Boolean (optional)\r\n **/\r\nexport let scrollTo = function(target = null, smooth_scroll = false){\r\n\tvar main = document.getElementById('main');\r\n\r\n\t// Remove our smooth-scroll class\r\n\tif (!smooth_scroll){\r\n\t\tmain.classList.remove(\"smooth-scroll\");\r\n\t}\r\n\r\n\t// Target is a number, so treat as pixel position\r\n\tif (target && Number.isInteger(target)){\r\n\t\tif (typeof main.scrollTo === \"function\"){\r\n\t\t\tmain.scrollTop = target;\r\n\t\t}\r\n\r\n\r\n\t// Target is a string representing a DOM element by class/id\r\n\t} else if (target){\r\n\r\n\t\tvar element = null;\r\n\r\n\t\tif (target.charAt(0) == '#'){\r\n\t\t\telement = document.getElementById(target.substring(1));\r\n\t\t} else if (target.charAt(0) == '.'){\r\n\t\t\telement = document.getElementsByClassName(target.substring(1));\r\n\t\t\tif (element.length > 0){\r\n\t\t\t\telement = element[0];\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tconsole.error(\"Invalid target type '\"+target+\"'. Must start with '#' or '.'.\");\r\n\t\t}\r\n\r\n\t\tif (element && typeof element.scrollIntoView === \"function\"){\r\n\t\t\telement.scrollIntoView();\r\n\t\t}\r\n\t} else {\r\n\t\tmain.scrollTop = 0;\r\n\t}\r\n\r\n\t// Now reinstate smooth scroll\r\n\tif (!smooth_scroll){\r\n\t\tmain.classList.add(\"smooth-scroll\");\r\n\t}\r\n}\r\n\r\n\r\n/**\r\n * Upgrade one or many Spotify Playlist URIs \r\n * This is their new, simplified syntax (September 2018) but they haven't updated it everywhere\r\n * So we need to manually strip user:abc to keep things consistent\r\n *\r\n * @param uris Array|String\r\n * @return Array|String\r\n **/\r\nexport let upgradeSpotifyPlaylistUris = function(uris){\r\n\tvar upgraded = [];\r\n\r\n\tfor (var uri of uris){\r\n\t\tif (uri.includes(\"spotify:user:\")){\r\n\t\t\turi = uri.replace(/spotify:user:([^:]*?):/i, \"spotify:\");\r\n\t\t}\r\n\t\tupgraded.push(uri);\r\n\t}\r\n\r\n\treturn upgraded;\r\n}\r\n\r\n// As above, but for a single URI\r\nexport let upgradeSpotifyPlaylistUri = function(uri){\r\n\treturn upgradeSpotifyPlaylistUris([uri])[0];\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/js/helpers.js","import $$observable from 'symbol-observable';\n\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\nvar randomString = function randomString() {\n return Math.random().toString(36).substring(7).split('').join('.');\n};\n\nvar ActionTypes = {\n INIT: \"@@redux/INIT\" + randomString(),\n REPLACE: \"@@redux/REPLACE\" + randomString(),\n PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {\n return \"@@redux/PROBE_UNKNOWN_ACTION\" + randomString();\n }\n};\n\n/**\n * @param {any} obj The object to inspect.\n * @returns {boolean} True if the argument appears to be a plain object.\n */\nfunction isPlainObject(obj) {\n if (typeof obj !== 'object' || obj === null) return false;\n var proto = obj;\n\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n\n return Object.getPrototypeOf(obj) === proto;\n}\n\n/**\n * Creates a Redux store that holds the state tree.\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\n\nfunction createStore(reducer, preloadedState, enhancer) {\n var _ref2;\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {\n throw new Error('It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function');\n }\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n enhancer = preloadedState;\n preloadedState = undefined;\n }\n\n if (typeof enhancer !== 'undefined') {\n if (typeof enhancer !== 'function') {\n throw new Error('Expected the enhancer to be a function.');\n }\n\n return enhancer(createStore)(reducer, preloadedState);\n }\n\n if (typeof reducer !== 'function') {\n throw new Error('Expected the reducer to be a function.');\n }\n\n var currentReducer = reducer;\n var currentState = preloadedState;\n var currentListeners = [];\n var nextListeners = currentListeners;\n var isDispatching = false;\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n /**\n * Reads the state tree managed by the store.\n *\n * @returns {any} The current state tree of your application.\n */\n\n\n function getState() {\n if (isDispatching) {\n throw new Error('You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');\n }\n\n return currentState;\n }\n /**\n * Adds a change listener. It will be called any time an action is dispatched,\n * and some part of the state tree may potentially have changed. You may then\n * call `getState()` to read the current state tree inside the callback.\n *\n * You may call `dispatch()` from a change listener, with the following\n * caveats:\n *\n * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n * If you subscribe or unsubscribe while the listeners are being invoked, this\n * will not have any effect on the `dispatch()` that is currently in progress.\n * However, the next `dispatch()` call, whether nested or not, will use a more\n * recent snapshot of the subscription list.\n *\n * 2. The listener should not expect to see all state changes, as the state\n * might have been updated multiple times during a nested `dispatch()` before\n * the listener is called. It is, however, guaranteed that all subscribers\n * registered before the `dispatch()` started will be called with the latest\n * state by the time it exits.\n *\n * @param {Function} listener A callback to be invoked on every dispatch.\n * @returns {Function} A function to remove this change listener.\n */\n\n\n function subscribe(listener) {\n if (typeof listener !== 'function') {\n throw new Error('Expected the listener to be a function.');\n }\n\n if (isDispatching) {\n throw new Error('You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');\n }\n\n var isSubscribed = true;\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n if (isDispatching) {\n throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');\n }\n\n isSubscribed = false;\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n };\n }\n /**\n * Dispatches an action. It is the only way to trigger a state change.\n *\n * The `reducer` function, used to create the store, will be called with the\n * current state tree and the given `action`. Its return value will\n * be considered the **next** state of the tree, and the change listeners\n * will be notified.\n *\n * The base implementation only supports plain object actions. If you want to\n * dispatch a Promise, an Observable, a thunk, or something else, you need to\n * wrap your store creating function into the corresponding middleware. For\n * example, see the documentation for the `redux-thunk` package. Even the\n * middleware will eventually dispatch plain object actions using this method.\n *\n * @param {Object} action A plain object representing “what changed”. It is\n * a good idea to keep actions serializable so you can record and replay user\n * sessions, or use the time travelling `redux-devtools`. An action must have\n * a `type` property which may not be `undefined`. It is a good idea to use\n * string constants for action types.\n *\n * @returns {Object} For convenience, the same action object you dispatched.\n *\n * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n * return something else (for example, a Promise you can await).\n */\n\n\n function dispatch(action) {\n if (!isPlainObject(action)) {\n throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');\n }\n\n if (typeof action.type === 'undefined') {\n throw new Error('Actions may not have an undefined \"type\" property. ' + 'Have you misspelled a constant?');\n }\n\n if (isDispatching) {\n throw new Error('Reducers may not dispatch actions.');\n }\n\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n\n var listeners = currentListeners = nextListeners;\n\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n listener();\n }\n\n return action;\n }\n /**\n * Replaces the reducer currently used by the store to calculate the state.\n *\n * You might need this if your app implements code splitting and you want to\n * load some of the reducers dynamically. You might also need this if you\n * implement a hot reloading mechanism for Redux.\n *\n * @param {Function} nextReducer The reducer for the store to use instead.\n * @returns {void}\n */\n\n\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== 'function') {\n throw new Error('Expected the nextReducer to be a function.');\n }\n\n currentReducer = nextReducer;\n dispatch({\n type: ActionTypes.REPLACE\n });\n }\n /**\n * Interoperability point for observable/reactive libraries.\n * @returns {observable} A minimal observable of state changes.\n * For more information, see the observable proposal:\n * https://github.com/tc39/proposal-observable\n */\n\n\n function observable() {\n var _ref;\n\n var outerSubscribe = subscribe;\n return _ref = {\n /**\n * The minimal observable subscription method.\n * @param {Object} observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns {subscription} An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe: function subscribe(observer) {\n if (typeof observer !== 'object' || observer === null) {\n throw new TypeError('Expected the observer to be an object.');\n }\n\n function observeState() {\n if (observer.next) {\n observer.next(getState());\n }\n }\n\n observeState();\n var unsubscribe = outerSubscribe(observeState);\n return {\n unsubscribe: unsubscribe\n };\n }\n }, _ref[$$observable] = function () {\n return this;\n }, _ref;\n } // When a store is created, an \"INIT\" action is dispatched so that every\n // reducer returns their initial state. This effectively populates\n // the initial state tree.\n\n\n dispatch({\n type: ActionTypes.INIT\n });\n return _ref2 = {\n dispatch: dispatch,\n subscribe: subscribe,\n getState: getState,\n replaceReducer: replaceReducer\n }, _ref2[$$observable] = observable, _ref2;\n}\n\n/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nfunction warning(message) {\n /* eslint-disable no-console */\n if (typeof console !== 'undefined' && typeof console.error === 'function') {\n console.error(message);\n }\n /* eslint-enable no-console */\n\n\n try {\n // This error was thrown as a convenience so that if you enable\n // \"break on all exceptions\" in your console,\n // it would pause the execution at this line.\n throw new Error(message);\n } catch (e) {} // eslint-disable-line no-empty\n\n}\n\nfunction getUndefinedStateErrorMessage(key, action) {\n var actionType = action && action.type;\n var actionDescription = actionType && \"action \\\"\" + String(actionType) + \"\\\"\" || 'an action';\n return \"Given \" + actionDescription + \", reducer \\\"\" + key + \"\\\" returned undefined. \" + \"To ignore an action, you must explicitly return the previous state. \" + \"If you want this reducer to hold no value, you can return null instead of undefined.\";\n}\n\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n var reducerKeys = Object.keys(reducers);\n var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';\n\n if (reducerKeys.length === 0) {\n return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';\n }\n\n if (!isPlainObject(inputState)) {\n return \"The \" + argumentName + \" has unexpected type of \\\"\" + {}.toString.call(inputState).match(/\\s([a-z|A-Z]+)/)[1] + \"\\\". Expected argument to be an object with the following \" + (\"keys: \\\"\" + reducerKeys.join('\", \"') + \"\\\"\");\n }\n\n var unexpectedKeys = Object.keys(inputState).filter(function (key) {\n return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\n });\n unexpectedKeys.forEach(function (key) {\n unexpectedKeyCache[key] = true;\n });\n if (action && action.type === ActionTypes.REPLACE) return;\n\n if (unexpectedKeys.length > 0) {\n return \"Unexpected \" + (unexpectedKeys.length > 1 ? 'keys' : 'key') + \" \" + (\"\\\"\" + unexpectedKeys.join('\", \"') + \"\\\" found in \" + argumentName + \". \") + \"Expected to find one of the known reducer keys instead: \" + (\"\\\"\" + reducerKeys.join('\", \"') + \"\\\". Unexpected keys will be ignored.\");\n }\n}\n\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach(function (key) {\n var reducer = reducers[key];\n var initialState = reducer(undefined, {\n type: ActionTypes.INIT\n });\n\n if (typeof initialState === 'undefined') {\n throw new Error(\"Reducer \\\"\" + key + \"\\\" returned undefined during initialization. \" + \"If the state passed to the reducer is undefined, you must \" + \"explicitly return the initial state. The initial state may \" + \"not be undefined. If you don't want to set a value for this reducer, \" + \"you can use null instead of undefined.\");\n }\n\n if (typeof reducer(undefined, {\n type: ActionTypes.PROBE_UNKNOWN_ACTION()\n }) === 'undefined') {\n throw new Error(\"Reducer \\\"\" + key + \"\\\" returned undefined when probed with a random type. \" + (\"Don't try to handle \" + ActionTypes.INIT + \" or other actions in \\\"redux/*\\\" \") + \"namespace. They are considered private. Instead, you must return the \" + \"current state for any unknown actions, unless it is undefined, \" + \"in which case you must return the initial state, regardless of the \" + \"action type. The initial state may not be undefined, but can be null.\");\n }\n });\n}\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\n\n\nfunction combineReducers(reducers) {\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof reducers[key] === 'undefined') {\n warning(\"No reducer provided for key \\\"\" + key + \"\\\"\");\n }\n }\n\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n\n var finalReducerKeys = Object.keys(finalReducers);\n var unexpectedKeyCache;\n\n if (process.env.NODE_ENV !== 'production') {\n unexpectedKeyCache = {};\n }\n\n var shapeAssertionError;\n\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n\n return function combination(state, action) {\n if (state === void 0) {\n state = {};\n }\n\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n\n if (warningMessage) {\n warning(warningMessage);\n }\n }\n\n var hasChanged = false;\n var nextState = {};\n\n for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n var _key = finalReducerKeys[_i];\n var reducer = finalReducers[_key];\n var previousStateForKey = state[_key];\n var nextStateForKey = reducer(previousStateForKey, action);\n\n if (typeof nextStateForKey === 'undefined') {\n var errorMessage = getUndefinedStateErrorMessage(_key, action);\n throw new Error(errorMessage);\n }\n\n nextState[_key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n\n return hasChanged ? nextState : state;\n };\n}\n\nfunction bindActionCreator(actionCreator, dispatch) {\n return function () {\n return dispatch(actionCreator.apply(this, arguments));\n };\n}\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass a single function as the first argument,\n * and get a function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\n\n\nfunction bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === 'function') {\n return bindActionCreator(actionCreators, dispatch);\n }\n\n if (typeof actionCreators !== 'object' || actionCreators === null) {\n throw new Error(\"bindActionCreators expected an object or a function, instead received \" + (actionCreators === null ? 'null' : typeof actionCreators) + \". \" + \"Did you write \\\"import ActionCreators from\\\" instead of \\\"import * as ActionCreators from\\\"?\");\n }\n\n var keys = Object.keys(actionCreators);\n var boundActionCreators = {};\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var actionCreator = actionCreators[key];\n\n if (typeof actionCreator === 'function') {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n\n return boundActionCreators;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n}\n\n/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\nfunction compose() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(void 0, arguments));\n };\n });\n}\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\n\nfunction applyMiddleware() {\n for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n return function (createStore) {\n return function () {\n var store = createStore.apply(void 0, arguments);\n\n var _dispatch = function dispatch() {\n throw new Error(\"Dispatching while constructing your middleware is not allowed. \" + \"Other middleware would not be applied to this dispatch.\");\n };\n\n var middlewareAPI = {\n getState: store.getState,\n dispatch: function dispatch() {\n return _dispatch.apply(void 0, arguments);\n }\n };\n var chain = middlewares.map(function (middleware) {\n return middleware(middlewareAPI);\n });\n _dispatch = compose.apply(void 0, chain)(store.dispatch);\n return _objectSpread({}, store, {\n dispatch: _dispatch\n });\n };\n };\n}\n\n/*\n * This is a dummy function to check if the function name has been altered by minification.\n * If the function has been minified and NODE_ENV !== 'production', warn the user.\n */\n\nfunction isCrushed() {}\n\nif (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {\n warning('You are currently using minified code outside of NODE_ENV === \"production\". ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) ' + 'to ensure you have the correct code for your production build.');\n}\n\nexport { createStore, combineReducers, bindActionCreators, applyMiddleware, compose, ActionTypes as __DO_NOT_USE__ActionTypes };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/redux/es/redux.js\n// module id = 2\n// module chunks = 0","\r\nimport * as helpers from '../../helpers'\r\n\r\nexport function setWindowTitle(title = null, play_state = null){\r\n return {\r\n type: 'SET_WINDOW_TITLE',\r\n title: title,\r\n play_state: play_state\r\n }\r\n}\r\n\r\n/**\r\n * Gives us the ability to load/fade current track when\r\n * we're pending transition to a new/next track\r\n *\r\n * @param transitioning Boolean\r\n **/\r\nexport function setCurrentTrackTransition(current_track_transition){\r\n return {\r\n type: 'SET_CURRENT_TRACK_TRANSITION',\r\n current_track_transition: current_track_transition\r\n }\r\n}\r\n\r\nexport function setSelectedTracks(keys = []){\r\n if (typeof(keys) === 'string'){\r\n keys = [keys]\r\n }\r\n return {\r\n type: 'SET_SELECTED_TRACKS',\r\n keys: keys\r\n }\r\n}\r\n\r\nexport function showContextMenu(data){\r\n\r\n // Touchend\r\n if (data.e.changedTouches){\r\n data.position_x = data.e.changedTouches[0].clientX;\r\n data.position_y = data.e.changedTouches[0].clientY;\r\n\r\n // Touchstart\r\n } else if (data.e.touches){\r\n data.position_x = data.e.touches[0].clientX;\r\n data.position_y = data.e.touches[0].clientY;\r\n\r\n // Click/mousedown/mouseup/etc\r\n } else {\r\n data.position_x = data.e.clientX;\r\n data.position_y = data.e.clientY;\r\n }\r\n\r\n return {\r\n type: 'SHOW_CONTEXT_MENU',\r\n data: data\r\n }\r\n}\r\n\r\nexport function setSlimMode(slim_mode){\r\n return {\r\n type: 'SET_SLIM_MODE',\r\n slim_mode: slim_mode\r\n }\r\n}\r\n\r\nexport function setWindowFocus(window_focus){\r\n return {\r\n type: 'SET_WINDOW_FOCUS',\r\n window_focus: window_focus\r\n }\r\n}\r\n\r\nexport function hideContextMenu(){\r\n return {\r\n type: 'HIDE_CONTEXT_MENU'\r\n }\r\n}\r\n\r\nexport function removeContextMenu(){\r\n return {\r\n type: 'REMOVE_CONTEXT_MENU'\r\n }\r\n}\r\n\r\nexport function showTouchContextMenu(data){\r\n return {\r\n type: 'SHOW_TOUCH_CONTEXT_MENU',\r\n data: data\r\n }\r\n}\r\n\r\nexport function hideTouchContextMenu(){\r\n return {\r\n type: 'HIDE_TOUCH_CONTEXT_MENU'\r\n }\r\n}\r\n\r\nexport function removeTouchContextMenu(){\r\n return {\r\n type: 'REMOVE_TOUCH_CONTEXT_MENU'\r\n }\r\n}\r\n\r\nexport function lazyLoading(start){\r\n return {\r\n type: 'LAZY_LOADING',\r\n start: start\r\n }\r\n}\r\n\r\nexport function toggleSidebar(new_state = 'toggle'){\r\n var action = {\r\n type: 'TOGGLE_SIDEBAR'\r\n }\r\n if (new_state != 'toggle'){\r\n action.new_state = new_state\r\n }\r\n return action\r\n}\r\n\r\nexport function dragStart(e, context, from_uri = null, victims, victims_indexes = null){\r\n return {\r\n type: 'DRAG_START',\r\n context: context,\r\n from_uri: from_uri,\r\n victims: victims,\r\n victims_indexes: victims_indexes,\r\n start_x: e.clientX,\r\n start_y: e.clientY\r\n }\r\n}\r\n\r\nexport function dragActive(){\r\n return { type: 'DRAG_ACTIVE' }\r\n}\r\n\r\nexport function dragEnd(){\r\n return { type: 'DRAG_END' }\r\n}\r\n\r\nexport function set(data){\r\n return {\r\n type: 'UI_SET',\r\n data: data\r\n }\r\n}\r\n\r\nexport function installPrompt(event){\r\n return {\r\n type: 'INSTALL_PROMPT',\r\n event: event\r\n }\r\n}\r\n\r\n\r\n\r\n/**\r\n * Notifications\r\n *\r\n * Subtle info/tooltip messages\r\n **/\r\n\r\nexport function createBrowserNotification(data){\r\n return { \r\n type: 'BROWSER_NOTIFICATION',\r\n data: data\r\n }\r\n}\r\n\r\nexport function createNotification(data){\r\n\r\n\t// Allow 'message' as an alias of our content\r\n\tif (data.message){\r\n\t\tdata.content = data.message;\r\n\t}\r\n\r\n return { \r\n type: 'CREATE_NOTIFICATION',\r\n notification: Object.assign(\r\n {\r\n key: helpers.generateGuid(),\r\n duration: 5,\r\n type: 'default',\r\n title: null,\r\n content: null,\r\n description: null,\r\n sticky: false,\r\n closing: false,\r\n render_content: false\r\n },\r\n data\r\n )\r\n }\r\n}\r\n\r\nexport function closeNotification(key){\r\n return { \r\n type: 'CLOSE_NOTIFICATION',\r\n key: key\r\n }\r\n}\r\n\r\nexport function removeNotification(key, manual = false){\r\n return { \r\n type: 'REMOVE_NOTIFICATION',\r\n key: key,\r\n manual: manual\r\n }\r\n}\r\n\r\n\r\n\r\n/**\r\n * Loaders\r\n **/\r\n\r\nexport function startLoading(key,source){\r\n return {\r\n type: 'START_LOADING',\r\n source: source,\r\n key: key\r\n }\r\n}\r\n\r\nexport function stopLoading(key){\r\n return { \r\n type: 'STOP_LOADING',\r\n key: key\r\n }\r\n}\r\n\r\nexport function startProcess(key,message,data = {}){\r\n return { \r\n type: 'START_PROCESS',\r\n key: key,\r\n message: message,\r\n data: data\r\n }\r\n}\r\n\r\nexport function resumeProcess(key,message,data = {}){\r\n return { \r\n type: 'RESUME_PROCESS',\r\n key: key\r\n }\r\n}\r\n\r\nexport function updateProcess(key,message,data = {}){\r\n return { \r\n type: 'UPDATE_PROCESS',\r\n key: key,\r\n message: message,\r\n data: data\r\n }\r\n}\r\n\r\nexport function runProcess(key,data = {}){\r\n return { \r\n type: key,\r\n data: data\r\n }\r\n}\r\n\r\nexport function cancelProcess(key){\r\n return { \r\n type: 'CANCEL_PROCESS',\r\n key: key\r\n }\r\n}\r\n\r\nexport function processCancelled(key){\r\n return { \r\n type: 'PROCESS_CANCELLED',\r\n key: key\r\n }\r\n}\r\n\r\nexport function processFinishing(key){\r\n return { \r\n type: 'PROCESS_FINISHING',\r\n key: key\r\n }\r\n}\r\n\r\nexport function processFinished(key){\r\n return { \r\n type: 'PROCESS_FINISHED',\r\n key: key\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/services/ui/actions.js","import Provider from './components/Provider';\nimport connectAdvanced from './components/connectAdvanced';\nimport { ReactReduxContext } from './components/Context';\nimport connect from './connect/connect';\nexport { Provider, connectAdvanced, ReactReduxContext, connect };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-redux/es/index.js\n// module id = 4\n// module chunks = 0","\r\nimport React from 'react';\r\nimport FontAwesome from 'react-fontawesome';\r\n\r\nexport default class Icon extends React.Component{\r\n\r\n\tconstructor(props){\r\n\t\tsuper(props);\r\n\t}\r\n\r\n\thandleClick(e){\r\n\t\tif (this.props.onClick){\r\n\t\t\tthis.props.onClick(e);\r\n\t\t}\r\n\t}\r\n\r\n\trender(){\r\n\t\tvar className = \"icon icon--\"+(this.props.type ? this.props.type : 'material');\r\n\t\tif (this.props.className){\r\n\t\t\tclassName += ' '+this.props.className;\r\n\t\t}\r\n\r\n\t\tswitch (this.props.type){\r\n\t\t\tcase 'svg':\t\r\n\t\t\t\treturn this.handleClick(e)} />;\r\n\r\n\t\t\tcase 'gif':\t\r\n\t\t\t\treturn this.handleClick(e)} />;\r\n\r\n\t\t\tcase 'fontawesome':\t\r\n\t\t\t\treturn this.handleClick(e)} />;\r\n\r\n\t\t\tcase 'css':\r\n\t\t\t\tswitch (this.props.name){\r\n\t\t\t\t\tcase 'playing':\r\n\t\t\t\t\t\treturn \r\n\t\t\t\t}\r\n\r\n\t\t\tdefault:\r\n\t\t\t\treturn this.handleClick(e)}>{this.props.name};\r\n\t\t}\r\n\t}\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/js/components/Icon.js","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/process/browser.js\n// module id = 6\n// module chunks = 0","\r\nimport * as helpers from '../../helpers'\r\n\r\nexport function set(data){\r\n return {\r\n type: 'MOPIDY_SET',\r\n data: data\r\n }\r\n}\r\n\r\nexport function request(method, params = {}, response_callback = null, error_callback = null){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_REQUEST',\r\n\t\tmethod: method,\r\n\t\tparams: params,\r\n\t\tresponse_callback: response_callback,\r\n\t\terror_callback: error_callback\r\n\t}\r\n}\r\n\r\nexport function connect(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_CONNECT'\r\n\t}\r\n}\r\n\r\nexport function connecting(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_CONNECTING'\r\n\t}\r\n}\r\n\r\nexport function disconnect(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_DISCONNECT'\r\n\t}\r\n}\r\n\r\nexport function debug(call, value){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_DEBUG',\r\n\t\tcall: call,\r\n\t\tvalue: value\r\n\t}\r\n}\r\n\r\nexport function restartStarted(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_RESTART_STARTED'\r\n\t}\r\n}\r\n\r\nexport function restartFinished(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_RESTART_FINISHED'\r\n\t}\r\n}\r\n\r\nexport function upgradeStarted(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_UPGRADE_STARTED'\r\n\t}\r\n}\r\n\r\nexport function upgradeFinished(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_UPGRADE_FINISHED'\r\n\t}\r\n}\r\n\r\nexport function localScanStarted(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_LOCAL_SCAN_STARTED'\r\n\t}\r\n}\r\n\r\nexport function localScanFinished(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_LOCAL_SCAN_FINISHED'\r\n\t}\r\n}\r\n\r\n/**\r\n * Core play actions\r\n **/\r\n\r\nexport function getPlayState(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_GET_PLAY_STATE'\r\n\t}\r\n}\r\n\r\nexport function play(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_PLAY'\r\n\t}\r\n}\r\n\r\nexport function pause(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_PAUSE'\r\n\t}\r\n}\r\n\r\nexport function stop(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_STOP'\r\n\t}\r\n}\r\n\r\nexport function next(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_NEXT'\r\n\t}\r\n}\r\n\r\nexport function previous(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_PREVIOUS'\r\n\t}\r\n}\r\n\r\nexport function getMute(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_GET_MUTE'\r\n\t}\r\n}\r\n\r\nexport function setMute(mute){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_SET_MUTE',\r\n\t\tmute: mute\r\n\t}\r\n}\r\n\r\nexport function getVolume(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_GET_VOLUME'\r\n\t}\r\n}\r\n\r\nexport function setVolume(volume){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_SET_VOLUME',\r\n\t\tvolume: volume\r\n\t}\r\n}\r\n\r\nexport function getConsume(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_GET_CONSUME'\r\n\t}\r\n}\r\n\r\nexport function setConsume(consume){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_SET_CONSUME',\r\n\t\tconsume: consume\r\n\t}\r\n}\r\n\r\nexport function getRepeat(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_GET_REPEAT'\r\n\t}\r\n}\r\n\r\nexport function setRepeat(repeat){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_SET_REPEAT',\r\n\t\trepeat: repeat\r\n\t}\r\n}\r\n\r\nexport function getRandom(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_GET_RANDOM'\r\n\t}\r\n}\r\n\r\nexport function setRandom(random){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_SET_RANDOM',\r\n\t\trandom: random\r\n\t}\r\n}\r\n\r\nexport function getTimePosition(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_GET_TIME_POSITION'\r\n\t}\r\n}\r\n\r\nexport function setTimePosition(time_position){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_SET_TIME_POSITION',\r\n\t\ttime_position: parseInt(time_position)\r\n\t}\r\n}\r\n\r\nexport function timePosition(time_position){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_TIME_POSITION',\r\n\t\ttime_position: parseInt(time_position)\r\n\t}\r\n}\r\n\r\nexport function getUriSchemes(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_GET_URI_SCHEMES'\r\n\t}\r\n}\r\n\r\n\r\n\r\n/**\r\n * Advanced playback actions\r\n **/\r\n\r\nexport function getCurrentTrack(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_GET_CURRENT_TRACK'\r\n\t}\r\n}\r\n\r\nexport function currentTrackLoaded(tl_track){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_CURRENT_TRACK_LOADED',\r\n\t\ttl_track: tl_track\r\n\t}\r\n}\r\n\r\nexport function getNextTrack(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_GET_NEXT_TRACK'\r\n\t}\r\n}\r\n\r\nexport function clearCurrentTrack(){\r\n\treturn {\r\n\t\ttype: 'CLEAR_CURRENT_TRACK'\r\n\t}\r\n}\r\n\r\nexport function getQueue(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_GET_QUEUE'\r\n\t}\r\n}\r\n\r\nexport function changeTrack(tlid){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_CHANGE_TRACK',\r\n\t\ttlid: tlid\r\n\t}\r\n}\r\n\r\nexport function playURIs(uris, from_uri = null, shuffle = false){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_PLAY_URIS',\r\n\t\turis: uris,\r\n\t\tfrom_uri: from_uri\r\n\t}\r\n}\r\n\r\nexport function enqueueURIs(uris, from_uri = null, next = false, at_position = null, offset = 0){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_ENQUEUE_URIS',\r\n\t\turis: uris,\r\n\t\tat_position: at_position,\r\n\t\tnext: next,\r\n\t\tfrom_uri: from_uri,\r\n\t\toffset: offset\r\n\t}\r\n}\r\n\r\nexport function enqueueURIsBatchDone(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_ENQUEUE_URIS_BATCH_DONE'\r\n\t}\r\n}\r\n\r\nexport function playAlbum(uri){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_PLAY_ALBUM',\r\n\t\turi: uri\r\n\t}\r\n}\r\n\r\nexport function removeTracks(tlids){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_REMOVE_TRACKS',\r\n\t\ttlids: tlids\r\n\t}\r\n}\r\n\r\nexport function reorderTracklist(indexes, insert_before){\r\n\tvar range = helpers.createRange(indexes );\r\n\tif (insert_before > range.start ) insert_before = insert_before - range.length\r\n\treturn { \r\n\t\ttype: 'MOPIDY_REORDER_TRACKLIST',\r\n\t\trange_start: range.start,\r\n\t\trange_length: range.length,\r\n\t\tinsert_before: insert_before\r\n\t}\r\n}\r\n\r\nexport function clearTracklist(){\r\n\treturn { \r\n\t\ttype: 'MOPIDY_CLEAR_TRACKLIST'\r\n\t}\r\n}\r\n\r\n\r\n\r\n/**\r\n * Asset-oriented actions\r\n **/\r\n\r\nexport function getImages(context, uris){\r\n\treturn { \r\n\t\ttype: 'MOPIDY_GET_IMAGES',\r\n\t\tcontext: context,\r\n\t\turis: uris\r\n\t}\r\n}\r\n\r\nexport function createPlaylist(name, scheme){\r\n\treturn { \r\n\t\ttype: 'MOPIDY_CREATE_PLAYLIST',\r\n\t\tname: name,\r\n\t\tscheme: scheme\r\n\t}\r\n}\r\n\r\nexport function deletePlaylist(uri){\r\n\treturn { \r\n\t\ttype: 'MOPIDY_DELETE_PLAYLIST',\r\n\t\turi: uri\r\n\t}\r\n}\r\n\r\nexport function getLibraryPlaylists(){\r\n\treturn { type: 'MOPIDY_GET_LIBRARY_PLAYLISTS' }\r\n}\r\n\r\nexport function getPlaylist(uri){\r\n\treturn { \r\n\t\ttype: 'MOPIDY_GET_PLAYLIST', \r\n\t\tdata: { uri: uri } \r\n\t}\r\n}\r\n\r\nexport function getPlaylists(uris, processor = null){\r\n\treturn { \r\n\t\ttype: 'MOPIDY_GET_PLAYLISTS', \r\n\t\turis: uris,\r\n\t\tprocessor: processor\r\n\t}\r\n}\r\n\r\nexport function getDirectory(uri){\r\n\treturn { \r\n\t\ttype: 'MOPIDY_GET_DIRECTORY', \r\n\t\tdata: { uri: uri } \r\n\t}\r\n}\r\n\r\nexport function getTrack(uri){\r\n\treturn { \r\n\t\ttype: 'MOPIDY_GET_TRACK', \r\n\t\tdata: { uri: uri } \r\n\t}\r\n}\r\n\r\nexport function getLibraryArtists(uri = null){\r\n\treturn { \r\n\t\ttype: 'MOPIDY_GET_LIBRARY_ARTISTS',\r\n\t\turi: uri\r\n\t}\r\n}\r\n\r\nexport function clearLibraryArtists(){\r\n\treturn { \r\n\t\ttype: 'MOPIDY_CLEAR_LIBRARY_ARTISTS' \r\n\t}\r\n}\r\n\r\nexport function getArtist(uri){\r\n\treturn { \r\n\t\ttype: 'MOPIDY_GET_ARTIST', \r\n\t\tdata: { uri: uri } \r\n\t}\r\n}\r\n\r\nexport function getArtists(uris, processor = null){\r\n\treturn { \r\n\t\ttype: 'MOPIDY_GET_ARTISTS', \r\n\t\turis: uris,\r\n\t\tprocessor: processor\r\n\t}\r\n}\r\n\r\nexport function getAlbum(uri){\r\n\treturn { \r\n\t\ttype: 'MOPIDY_GET_ALBUM', \r\n\t\tdata: { uri: uri } \r\n\t}\r\n}\r\n\r\nexport function getAlbums(uris, processor = null){\r\n\treturn { \r\n\t\ttype: 'MOPIDY_GET_ALBUMS', \r\n\t\turis: uris,\r\n\t\tprocessor: processor\r\n\t}\r\n}\r\n\r\nexport function getLibraryAlbums(uri = null){\r\n\treturn { \r\n\t\ttype: 'MOPIDY_GET_LIBRARY_ALBUMS',\r\n\t\turi: uri\r\n\t}\r\n}\r\n\r\nexport function clearLibraryAlbums(){\r\n\treturn { \r\n\t\ttype: 'MOPIDY_CLEAR_LIBRARY_ALBUMS' \r\n\t}\r\n}\r\n\r\nexport function runProcessor(processor){\r\n\treturn {\r\n\t\ttype: processor\r\n\t}\r\n}\r\n\r\nexport function cancelProcessor(processor){\r\n\treturn {\r\n\t\ttype: processor+'_CANCEL'\r\n\t}\r\n}\r\n\r\n\r\n/**\r\n * Searching\r\n **/\r\n\r\nexport function clearSearchResults(){\r\n return {\r\n type: 'MOPIDY_CLEAR_SEARCH_RESULTS'\r\n }\r\n}\r\n\r\nexport function getSearchResults(context, query, limit = 100){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_GET_SEARCH_RESULTS',\r\n\t\tcontext: context,\r\n\t\tquery: query,\r\n\t\tlimit: limit\r\n\t}\r\n}\r\n\r\n\r\n/**\r\n * Other general actions\r\n **/\r\n\r\nexport function getQueueHistory(){\r\n\treturn {\r\n\t\ttype: 'MOPIDY_GET_QUEUE_HISTORY'\r\n\t}\r\n}\r\n \n\n\n// WEBPACK FOOTER //\n// ./src/js/services/mopidy/actions.js","\r\nimport React from 'react';\r\nimport { withRouter } from 'react-router';\r\nimport { Link } from 'react-router-dom';\r\n\r\nimport * as helpers from '../helpers';\r\n\r\n/**\r\n * Extends react-router's Link but provides the ability to hook in to the navigation event\r\n * which lets us scroll to the top of our
for a more traditional navigation experience\r\n **/\r\nclass CustomLink extends React.Component{\r\n\r\n\tconstructor(props){\r\n\t\tsuper(props);\r\n\t}\r\n\r\n\thandleClick(e){\r\n\r\n\t\t// Fetch the current scroll position of our #main element and\r\n\t\t// save to our history's state, so clicking 'back' etc will restore\r\n\t\t// the previous scroll position.\r\n\t\t// Note that this doesn't trigger lazy-load elements (unless scrolling\r\n\t\t// exposes the LazyLoader component).\r\n\t\tvar main = document.getElementById('main');\r\n\t\tvar state = (this.props.location && this.props.location.state ? this.props.location.state : {});\r\n\t\tstate.scroll_position = main.scrollTop;\r\n\r\n\t\tthis.props.history.replace({state: state});\r\n\r\n\t\t// Allow a link to disable auto-scrolling to the top of the page\r\n\t\t// on navigation. Useful for tabs, etc.\r\n\t\tif (!this.props.retainScroll){\r\n\t\t\thelpers.scrollTo(this.props.scrollTo, (this.props.scrollTo));\r\n\t\t}\r\n\t}\r\n\r\n\thandleContextMenu(e){\r\n\t\tif (this.props.onContextMenu){\r\n\t\t\tthis.props.onContextMenu(e);\r\n\t\t}\r\n\t}\r\n\r\n\tisLinkActive(link){\r\n\r\n\t\t// Decode both links\r\n\t\t// This handles issues where one link is encoded and the other isn't,\r\n\t\t// but they're otherwise identical\r\n\t\tlink = decodeURIComponent(link);\r\n\t\tvar current_link = decodeURIComponent(this.props.history.location.pathname);\r\n\r\n\t\tif (this.props.exact){\r\n\t\t\treturn current_link === link;\r\n\t\t} else {\r\n\t\t\treturn current_link.startsWith(link);\r\n\t\t}\r\n\t}\r\n\r\n\trender(){\r\n\t\tvar className = \"\";\r\n\t\tif (this.props.className){\r\n\t\t\tclassName += this.props.className;\r\n\t\t}\r\n\r\n\t\t// We have an active detector method\r\n\t\t// This is used almost solely by the Sidebar navigation\r\n\t\tif (this.props.history !== undefined){\r\n\t\t\tif (this.isLinkActive(this.props.to)){\r\n\t\t\t\tif (this.props.activeClassName){\r\n\t\t\t\t\tclassName += \" \"+this.props.activeClassName;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tclassName += \" active\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn (\r\n\t\t\t this.handleClick(e)}\r\n\t\t\t\tonContextMenu={e => this.handleContextMenu(e)}\r\n\t\t\t\tclassName={className}\r\n\t\t\t\tto={this.props.to}>\r\n\t\t\t\t\t{this.props.children}\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n}\r\n\r\nexport default withRouter(CustomLink);\n\n\n// WEBPACK FOOTER //\n// ./src/js/components/Link.js","\r\nvar coreActions = require('../../services/core/actions')\r\nvar uiActions = require('../../services/ui/actions')\r\nvar mopidyActions = require('../../services/mopidy/actions')\r\nvar lastfmActions = require('../../services/lastfm/actions')\r\nvar helpers = require('../../helpers')\r\n\r\n/**\r\n * Send an ajax request to the Spotify API\r\n *\r\n * @param dispatch obj\r\n * @param getState obj\r\n * @param endpoint string = the url to query (ie /albums/:uri)\r\n * @param method string\r\n * @param data mixed = request payload\r\n * @return Promise\r\n **/\r\nconst request = (dispatch, getState, endpoint, method = 'GET', data = false) => {\r\n\r\n // Add reference to loader queue\r\n // We do this straight away so that even if we're refreshing the token, it still registers as \r\n // loading said endpoint\r\n var loader_key = helpers.generateGuid()\r\n dispatch(uiActions.startLoading(loader_key, 'spotify_'+endpoint));\r\n\r\n return new Promise((resolve, reject) => { \r\n getToken(dispatch, getState)\r\n .then(\r\n response => {\r\n\r\n // prepend the API baseurl, unless the endpoint already has it (ie pagination requests)\r\n var url = 'https://api.spotify.com/v1/'+endpoint\r\n if (endpoint.startsWith('https://api.spotify.com/')){\r\n url = endpoint;\r\n }\r\n\r\n // create our ajax request config\r\n var config = {\r\n method: method,\r\n url: url,\r\n cached: true,\r\n timeout: 30000,\r\n headers: {\r\n Authorization: 'Bearer '+ response,\r\n Accept: 'application/json'\r\n }\r\n }\r\n\r\n // only if we've got data do we add it to the request (this prevents appending of \"&false\" to the URL)\r\n if (data){\r\n if (typeof(data) === 'string'){\r\n config.data = data\r\n } else {\r\n config.data = JSON.stringify(data)\r\n }\r\n }\r\n\r\n $.ajax(config).then(\r\n response => {\r\n dispatch(uiActions.stopLoading(loader_key)) \r\n resolve(response)\r\n },\r\n (xhr, status, error) => {\r\n dispatch(uiActions.stopLoading(loader_key));\r\n\r\n // TODO: Rate limiting\r\n if (xhr.status == 429){\r\n alert(\"You hit the Spotify API rate limiter\");\r\n }\r\n\r\n // TODO: Instead of allowing request to fail before renewing the token, once refreshed\r\n // we should retry the original request(s)\r\n if (xhr.responseJSON && xhr.responseJSON.error && xhr.responseJSON.error.message == 'The access token expired'){\r\n dispatch(refreshToken(dispatch, getState));\r\n }\r\n\r\n reject({\r\n config: config,\r\n xhr: xhr,\r\n status: status,\r\n error: error\r\n });\r\n }\r\n )\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n error.error\r\n ));\r\n\r\n reject(error);\r\n }\r\n );\r\n }\r\n );\r\n}\r\n\r\n\r\n/**\r\n* Check an access token validity\r\n*\r\n* @return Promise\r\n**/\r\nfunction getToken(dispatch, getState){\r\n return new Promise((resolve, reject) => {\r\n\r\n // token is okay for now, so just resolve with the current token\r\n if (getState().spotify.token_expiry && new Date().getTime() < getState().spotify.token_expiry){\r\n resolve(getState().spotify.access_token)\r\n return\r\n }\r\n\r\n // token is expiring/expired, so go get a new one and resolve that\r\n // TODO: Detect whether we already have a pending refresh, in which case we\r\n // need to wait until it's done, and then return that\r\n\r\n // We've already got a refresh in progress\r\n if (getState().ui.load_queue.spotify_refresh_token !== undefined){\r\n\r\n \tconsole.log(\"Already refreshing token, we'll wait 1000ms and try again\");\r\n\r\n \t// Re-check the queue periodically to see if it's finished yet\r\n \t// TODO: Look at properly hooking up with the ajax finish event\r\n \tsetTimeout(\r\n \t\t() => {\r\n \t\t\t// Return myself for a re-check\r\n \t\t\treturn getToken(dispatch, getState);\r\n \t\t},\r\n \t\t1000\r\n \t);\r\n } else {\r\n\t refreshToken(dispatch, getState)\r\n\t .then(\r\n\t response => {\r\n\t resolve(response.access_token)\r\n\t },\r\n\t error => {\r\n\t reject(error)\r\n\t }\r\n\t );\r\n\t }\r\n });\r\n}\r\n\r\nfunction refreshToken(dispatch, getState){\r\n return new Promise((resolve, reject) => {\r\n\r\n // add reference to loader queue\r\n var loader_key = helpers.generateGuid();\r\n dispatch(uiActions.startLoading(loader_key, 'spotify_refresh_token'));\r\n\r\n // Fully-authorized, so we can use the local Spotify credentials\r\n if (getState().spotify.authorization){\r\n\r\n var config = {\r\n method: 'GET',\r\n url: getState().spotify.authorization_url+'?action=refresh&refresh_token='+getState().spotify.refresh_token,\r\n dataType: \"json\",\r\n timeout: 10000\r\n };\r\n\r\n $.ajax(config)\r\n .then(\r\n response => {\r\n dispatch(uiActions.stopLoading(loader_key));\r\n\r\n response.token_expiry = new Date().getTime() + (response.expires_in * 1000 )\r\n response.source = 'spotify'\r\n dispatch({\r\n type: 'SPOTIFY_TOKEN_REFRESHED',\r\n data: response\r\n })\r\n resolve(response);\r\n },\r\n (xhr, status, error) => {\r\n dispatch(uiActions.stopLoading(loader_key));\r\n \r\n reject({\r\n config: config,\r\n xhr: xhr,\r\n status: status,\r\n error: error\r\n });\r\n }\r\n );\r\n \r\n // Server-side authorized (with limited scope) so we need to refresh\r\n // using the Mopidy-Spotify credentials\r\n } else {\r\n\r\n var config = {\r\n method: 'GET',\r\n url: '//'+getState().mopidy.host+':'+getState().mopidy.port+'/iris/http/refresh_spotify_token',\r\n dataType: \"json\",\r\n timeout: 10000\r\n }\r\n\r\n $.ajax(config)\r\n .then(\r\n (response, status, xhr) => {\r\n dispatch(uiActions.stopLoading(loader_key));\r\n\r\n if (response.error){\r\n reject({\r\n config: config,\r\n xhr: xhr,\r\n status: status,\r\n error: response.error\r\n });\r\n\r\n } else {\r\n var token = response.result.spotify_token;\r\n token.token_expiry = new Date().getTime() + (token.expires_in * 1000 );\r\n token.source = 'mopidy';\r\n dispatch({\r\n type: 'SPOTIFY_TOKEN_REFRESHED',\r\n access_token_provider: 'backend',\r\n data: token\r\n });\r\n resolve(token);\r\n }\r\n\r\n },\r\n (xhr, status, error) => {\r\n dispatch(uiActions.stopLoading(loader_key));\r\n\r\n reject({\r\n config: config,\r\n xhr: xhr,\r\n status: status,\r\n error: error\r\n });\r\n }\r\n );\r\n }\r\n\r\n })\r\n}\r\n\r\nexport function set(data){\r\n return {\r\n type: 'SPOTIFY_SET',\r\n data: data\r\n }\r\n}\r\n\r\nexport function connect(){\r\n return (dispatch, getState) => {\r\n dispatch({ type: 'SPOTIFY_CONNECTING' });\r\n dispatch(getMe());\r\n }\r\n}\r\n\r\n\r\n/**\r\n * Handle authorization process\r\n **/\r\n\r\nexport function authorizationGranted(data){\r\n data.token_expiry = new Date().getTime() + data.expires_in;\r\n return { type: 'SPOTIFY_AUTHORIZATION_GRANTED', data: data }\r\n}\r\n\r\nexport function revokeAuthorization(){\r\n return { type: 'SPOTIFY_AUTHORIZATION_REVOKED' }\r\n}\r\n\r\nexport function refreshingToken(){\r\n return (dispatch, getState) => {\r\n dispatch({ type: 'SPOTIFY_TOKEN_REFRESHING' });\r\n refreshToken(dispatch, getState );\r\n }\r\n}\r\n\r\nexport function tokenChanged(spotify_token){\r\n return {\r\n type: 'SPOTIFY_TOKEN_CHANGED',\r\n spotify_token: spotify_token\r\n }\r\n}\r\n\r\nexport function importAuthorization(authorization){\r\n return {\r\n type: 'SPOTIFY_IMPORT_AUTHORIZATION',\r\n authorization: authorization\r\n }\r\n}\r\n\r\n\r\n/**\r\n * Get current user\r\n **/\r\nexport function getMe(){\r\n return (dispatch, getState) => {\r\n request(dispatch, getState, 'me' )\r\n .then(\r\n response => {\r\n dispatch({\r\n type: 'SPOTIFY_ME_LOADED',\r\n me: response\r\n });\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load your profile',\r\n error\r\n ));\r\n }\r\n );\r\n }\r\n}\r\n\r\n\r\n/**\r\n * Get a single track\r\n *\r\n * @param uri string\r\n **/\r\nexport function getTrack(uri){\r\n return (dispatch, getState) => {\r\n request(dispatch, getState, 'tracks/'+ helpers.getFromUri('trackid', uri))\r\n .then(\r\n response => {\r\n dispatch(coreActions.trackLoaded(response));\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load track',\r\n error\r\n ));\r\n }\r\n );\r\n }\r\n}\r\n\r\nexport function getLibraryTracks(){\r\n return (dispatch, getState) => {\r\n request(dispatch, getState, 'me/tracks?limit=50')\r\n .then(\r\n response => {\r\n dispatch({\r\n type: 'SPOTIFY_LIBRARY_TRACKS_LOADED',\r\n data: response\r\n });\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not get library tracks',\r\n error\r\n ));\r\n }\r\n );\r\n }\r\n}\r\n\r\nexport function getFeaturedPlaylists(){\r\n return (dispatch, getState) => {\r\n\r\n dispatch({ type: 'SPOTIFY_FEATURED_PLAYLISTS_LOADED', data: false });\r\n\r\n var date = new Date();\r\n date.setHours(date.getHours());\r\n var year = date.getFullYear();\r\n var month = date.getMonth();\r\n if (month < 10 ) month = '0'+month;\r\n var day = date.getDay();\r\n if (day < 10 ) day = '0'+day;\r\n var hour = date.getHours();\r\n if (hour < 10 ) hour = '0'+hour;\r\n var min = date.getMinutes();\r\n if (min < 10 ) min = '0'+min;\r\n var sec = date.getSeconds();\r\n if (sec < 10 ) sec = '0'+sec;\r\n\r\n var timestamp = year+'-'+month+'-'+day+'T'+hour+':'+min+':'+sec;\r\n\r\n request(dispatch, getState, 'browse/featured-playlists?limit=50&country='+getState().spotify.country+'&locale='+getState().spotify.locale+'timestamp='+timestamp)\r\n .then(\r\n response => {\r\n var playlists = []\r\n for (var i = 0; i < response.playlists.items.length; i++){\r\n playlists.push(Object.assign(\r\n {},\r\n response.playlists.items[i],\r\n {\r\n is_completely_loaded: false,\r\n can_edit: (getState().spotify.me && response.playlists.items[i].owner.id == getState().spotify.me.id),\r\n tracks_total: response.playlists.items[i].tracks.total\r\n }\r\n ))\r\n }\r\n\r\n dispatch({\r\n type: 'PLAYLISTS_LOADED',\r\n playlists: playlists\r\n });\r\n\r\n dispatch({\r\n type: 'SPOTIFY_FEATURED_PLAYLISTS_LOADED',\r\n data: {\r\n message: response.message,\r\n playlists: helpers.upgradeSpotifyPlaylistUris(helpers.arrayOf('uri',response.playlists.items))\r\n }\r\n });\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load featured playlists',\r\n error\r\n ));\r\n }\r\n );\r\n }\r\n}\r\n\r\nexport function getCategories(){\r\n return (dispatch, getState) => {\r\n request(dispatch, getState, 'browse/categories?limit=50&country='+getState().spotify.country+'&locale='+getState().spotify.locale )\r\n .then(\r\n response => {\r\n dispatch({\r\n type: 'SPOTIFY_CATEGORIES_LOADED',\r\n categories: response.categories.items\r\n });\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load categories',\r\n error\r\n ));\r\n }\r\n );\r\n }\r\n}\r\n\r\nexport function getCategory(id){\r\n return (dispatch, getState) => {\r\n request(dispatch, getState, 'browse/categories/'+id+'?country='+getState().spotify.country+'&locale='+getState().spotify.locale )\r\n .then(\r\n response => {\r\n dispatch({\r\n type: 'SPOTIFY_CATEGORY_LOADED',\r\n category: Object.assign(\r\n {\r\n uri: 'category:'+response.id,\r\n playlist_uris: []\r\n }, \r\n response\r\n )\r\n });\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load category',\r\n error\r\n ));\r\n }\r\n )\r\n }\r\n}\r\n\r\nexport function getCategoryPlaylists(id){\r\n return (dispatch, getState) => {\r\n request(dispatch, getState, 'browse/categories/'+id+'/playlists?limit=50&country='+getState().spotify.country+'&locale='+getState().spotify.locale )\r\n .then(\r\n response => {\r\n dispatch({\r\n type: 'SPOTIFY_CATEGORY_PLAYLISTS_LOADED',\r\n uri: 'category:'+id,\r\n playlists: response.playlists\r\n }); \r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load category playlists',\r\n error\r\n ));\r\n }\r\n )\r\n }\r\n}\r\n\r\nexport function getNewReleases(){\r\n return (dispatch, getState) => {\r\n request(dispatch, getState, 'browse/new-releases?country='+getState().spotify.country+'&limit=50' )\r\n .then(\r\n response => {\r\n dispatch({\r\n type: 'SPOTIFY_NEW_RELEASES_LOADED',\r\n data: response\r\n });\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load new releases',\r\n error\r\n ));\r\n }\r\n );\r\n }\r\n}\r\n\r\nexport function getURL(url, action_name, key = false){\r\n return (dispatch, getState) => {\r\n request(dispatch, getState, url )\r\n .then(\r\n response => {\r\n dispatch({\r\n type: action_name,\r\n key: key,\r\n data: response\r\n });\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load URL',\r\n error\r\n ));\r\n }\r\n );\r\n }\r\n}\r\n\r\nexport function getMore(url, core_action = null, custom_action = null){\r\n return (dispatch, getState) => {\r\n request(dispatch, getState, url)\r\n .then(\r\n response => {\r\n if (core_action){\r\n dispatch(coreActions.loadedMore(\r\n core_action.parent_type,\r\n core_action.parent_key,\r\n core_action.records_type,\r\n response\r\n ));\r\n } else if (custom_action){\r\n custom_action.data = response;\r\n dispatch(custom_action);\r\n } else {\r\n dispatch(coreActions.handleException(\r\n 'No callback handler for loading more items'\r\n ));\r\n }\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load more '+callback_action.parent_type+' '+callback_action.records_type+'s',\r\n error\r\n ));\r\n }\r\n );\r\n }\r\n}\r\n\r\nexport function clearSearchResults(){\r\n return {\r\n type: 'SPOTIFY_CLEAR_SEARCH_RESULTS'\r\n }\r\n}\r\n\r\nexport function getSearchResults(type, query, limit = 50, offset = 0){\r\n return (dispatch, getState) => {\r\n\r\n dispatch(uiActions.startProcess('SPOTIFY_GET_SEARCH_RESULTS_PROCESSOR','Searching Spotify'))\r\n\r\n type = type.replace(/s+$/, \"\")\r\n if (type == 'all'){\r\n type = 'album,artist,playlist,track'\r\n }\r\n\r\n var url = 'search?q='+query\r\n url += '&type='+type\r\n url += '&country='+getState().spotify.country\r\n url += '&limit='+limit\r\n url += '&offset='+offset\r\n\r\n request(dispatch, getState, url )\r\n .then(\r\n response => { \r\n if (response.tracks !== undefined){\r\n dispatch({\r\n type: 'SPOTIFY_SEARCH_RESULTS_LOADED',\r\n context: 'tracks',\r\n results: helpers.formatTracks(response.tracks.items),\r\n more: response.tracks.next,\r\n });\r\n }\r\n \r\n if (response.artists !== undefined){\r\n dispatch({\r\n type: 'ARTISTS_LOADED',\r\n artists: response.artists.items\r\n });\r\n dispatch({\r\n type: 'SPOTIFY_SEARCH_RESULTS_LOADED',\r\n context: 'artists',\r\n results: helpers.arrayOf('uri',response.artists.items),\r\n more: response.artists.next,\r\n });\r\n }\r\n \r\n if (response.albums !== undefined){\r\n dispatch({\r\n type: 'ALBUMS_LOADED',\r\n albums: response.albums.items\r\n });\r\n dispatch({\r\n type: 'SPOTIFY_SEARCH_RESULTS_LOADED',\r\n context: 'albums',\r\n results: helpers.arrayOf('uri',response.albums.items),\r\n more: response.albums.next,\r\n });\r\n }\r\n\r\n if (response.playlists !== undefined){\r\n var playlists = [];\r\n for (var playlist of response.playlists.items){\r\n playlists.push(Object.assign(\r\n {},\r\n helpers.formatPlaylist(playlist),\r\n {\r\n can_edit: (getState().spotify.me && playlist.owner.id == getState().spotify.me.id),\r\n tracks_total: playlist.tracks.total\r\n }\r\n ))\r\n }\r\n dispatch({\r\n type: 'PLAYLISTS_LOADED',\r\n playlists: playlists\r\n });\r\n\r\n dispatch({\r\n type: 'SPOTIFY_SEARCH_RESULTS_LOADED',\r\n context: 'playlists',\r\n results: helpers.arrayOf('uri',playlists),\r\n more: response.playlists.next\r\n });\r\n }\r\n\r\n dispatch(uiActions.processFinishing('SPOTIFY_GET_SEARCH_RESULTS_PROCESSOR'))\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load search results',\r\n error\r\n ));\r\n }\r\n );\r\n }\r\n}\r\n\r\nexport function getAutocompleteResults(field_id, query, types = ['album','artist','playlist','track']){\r\n return (dispatch, getState) => {\r\n\r\n dispatch({type: 'SPOTIFY_AUTOCOMPLETE_LOADING', field_id: field_id})\r\n\r\n var genre_included = types.includes('genre')\r\n if (genre_included){\r\n var index = types.indexOf('genre')\r\n types.splice(index,1)\r\n }\r\n\r\n var endpoint = 'search?q='+query\r\n endpoint += '&type='+types.join(',')\r\n endpoint += '&country='+getState().spotify.country\r\n\r\n request(dispatch, getState, endpoint)\r\n .then(\r\n response => {\r\n var genres = []\r\n if (genre_included){\r\n var available_genres = getState().spotify.genres\r\n if (available_genres){\r\n for (var i = 0; i < available_genres.length; i++){\r\n if (available_genres[i].includes(query)){\r\n var genre = available_genres[i]\r\n genres.push({\r\n name: (genre.charAt(0).toUpperCase()+genre.slice(1)).replace('-',' '),\r\n uri: 'spotify:genre:'+genre\r\n })\r\n }\r\n }\r\n }\r\n }\r\n \r\n if (response.artists && response.artists.items){\r\n dispatch(coreActions.artistsLoaded(response.artists.items));\r\n }\r\n\r\n if (response.albums && response.albums.items){\r\n dispatch(coreActions.albumsLoaded(response.albums.items));\r\n }\r\n\r\n if (response.playlists && response.playlists.items){\r\n dispatch(coreActions.playlistsLoaded(response.playlists.items));\r\n }\r\n\r\n if (response.tracks && response.tracks.items){\r\n dispatch(coreActions.tracksLoaded(response.tracks.items));\r\n }\r\n\r\n dispatch({\r\n type: 'SPOTIFY_AUTOCOMPLETE_LOADED',\r\n field_id: field_id,\r\n results: {\r\n artists: (response.artists ? response.artists.items : []),\r\n albums: (response.albums ? response.albums.items : []),\r\n playlists: (response.playlists ? response.playlists.items : []),\r\n tracks: (response.tracks ? response.tracks.items : []),\r\n genres: genres\r\n }\r\n });\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load autocomplete results',\r\n error\r\n ));\r\n }\r\n );\r\n }\r\n}\r\n\r\nexport function clearAutocompleteResults(field_id = null){\r\n return {\r\n type: 'SPOTIFY_AUTOCOMPLETE_CLEAR',\r\n field_id: field_id\r\n }\r\n}\r\n\r\nexport function following(uri, method = 'GET'){\r\n return (dispatch, getState) => {\r\n\r\n if (method == 'PUT' ) var is_following = true\r\n if (method == 'DELETE' ) var is_following = false\r\n\r\n var asset_name = helpers.uriType(uri);\r\n var endpoint, data\r\n switch(asset_name){\r\n case 'track':\r\n if (method == 'GET'){\r\n endpoint = 'me/tracks/contains/?ids='+ helpers.getFromUri('trackid', uri)\r\n } else { \r\n endpoint = 'me/tracks/?ids='+ helpers.getFromUri('trackid', uri) \r\n }\r\n break\r\n case 'album':\r\n if (method == 'GET'){\r\n endpoint = 'me/albums/contains/?ids='+ helpers.getFromUri('albumid', uri)\r\n } else { \r\n endpoint = 'me/albums/?ids='+ helpers.getFromUri('albumid', uri) \r\n }\r\n break\r\n case 'artist':\r\n if (method == 'GET'){\r\n endpoint = 'me/following/contains?type=artist&ids='+ helpers.getFromUri('artistid', uri) \r\n } else {\r\n endpoint = 'me/following?type=artist&ids='+ helpers.getFromUri('artistid', uri)\r\n data = {} \r\n }\r\n break\r\n case 'user':\r\n if (method == 'GET'){\r\n endpoint = 'me/following/contains?type=user&ids='+ helpers.getFromUri('userid', uri) \r\n } else {\r\n endpoint = 'me/following?type=user&ids='+ helpers.getFromUri('userid', uri)\r\n data = {} \r\n }\r\n break\r\n case 'playlist':\r\n if (method == 'GET'){\r\n endpoint = 'playlists/'+ helpers.getFromUri('playlistid',uri) +'/followers/contains?ids='+ getState().spotify.me.id\r\n } else {\r\n endpoint = 'playlists/'+ helpers.getFromUri('playlistid',uri) +'/followers' \r\n }\r\n break;\r\n }\r\n\r\n request(dispatch, getState, endpoint, method, data)\r\n .then(\r\n response => {\r\n if (response ) is_following = response\r\n if (typeof(is_following) === 'object' ) is_following = is_following[0]\r\n\r\n dispatch({\r\n type: 'SPOTIFY_LIBRARY_'+asset_name.toUpperCase()+'_CHECK',\r\n key: uri,\r\n in_library: is_following\r\n })\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not follow/unfollow',\r\n error\r\n ));\r\n }\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * Resolve radio seeds into full objects\r\n *\r\n * @param radio object\r\n **/\r\nexport function resolveRadioSeeds(radio){\r\n return (dispatch, getState) => {\r\n\r\n if (radio.seed_artists.length > 0){\r\n var artist_ids = '';\r\n for (var i = 0; i < radio.seed_artists.length; i++){\r\n if (i > 0) artist_ids += ','\r\n artist_ids += helpers.getFromUri('artistid', radio.seed_artists[i])\r\n }\r\n\r\n request(dispatch, getState, 'artists?ids='+ artist_ids )\r\n .then(\r\n response => {\r\n if (response && response.artists){\r\n dispatch({\r\n type: 'ARTISTS_LOADED',\r\n artists: response.artists\r\n })\r\n } else {\r\n console.error('No Spotify artists returned', artist_ids)\r\n }\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not resolve radio artist seeds',\r\n error\r\n ));\r\n }\r\n )\r\n }\r\n\r\n if (radio.seed_tracks.length > 0){\r\n var track_ids = '';\r\n for (var i = 0; i < radio.seed_tracks.length; i++){\r\n if (i > 0) track_ids += ','\r\n track_ids += helpers.getFromUri('trackid', radio.seed_tracks[i])\r\n }\r\n \r\n request(dispatch, getState, 'tracks?ids='+ track_ids )\r\n .then(\r\n response => {\r\n dispatch({\r\n type: 'TRACKS_LOADED',\r\n tracks: response.tracks\r\n })\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load radio track seeds',\r\n error\r\n ));\r\n }\r\n )\r\n }\r\n }\r\n}\r\n\r\n\r\n/**\r\n * =============================================================== DISCOVER =============\r\n * ======================================================================================\r\n **/\r\n\r\n\r\n/**\r\n * Get my favorites\r\n *\r\n * @param uri string\r\n **/\r\nexport function getFavorites(limit = 50, term = 'long_term'){\r\n return (dispatch, getState) => {\r\n\r\n dispatch({type: 'SPOTIFY_FAVORITES_LOADED', artists: [], tracks: []})\r\n\r\n $.when(\r\n request(dispatch, getState, 'me/top/artists?limit='+limit+'&time_range='+term),\r\n request(dispatch, getState, 'me/top/tracks?limit='+limit+'&time_range='+term)\r\n\r\n ).then(\r\n (artists_response, tracks_response) => {\r\n dispatch({\r\n type: 'SPOTIFY_FAVORITES_LOADED',\r\n artists: artists_response.items,\r\n tracks: tracks_response.items\r\n });\r\n },\r\n (artists_error, tracks_error) => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load favorites',\r\n Object.assign({},artists_error,tracks_error)\r\n ));\r\n }\r\n )\r\n }\r\n}\r\n\r\n\r\n/**\r\n * Get our recommendations\r\n * This is based off our 'favorites' and then we use those as seeds\r\n *\r\n * @param uris = array of artist or track URIs or a genre string\r\n **/\r\nexport function getRecommendations(uris = [], limit = 20, tunabilities = null){\r\n return (dispatch, getState) => {\r\n\r\n dispatch({type: 'CLEAR_SPOTIFY_RECOMMENDATIONS'});\r\n\r\n // build our starting point\r\n var artists_ids = []\r\n var tracks_ids = []\r\n var genres = []\r\n\r\n for (var i = 0; i < uris.length; i++){\r\n var uri = uris[i]\r\n\r\n switch (helpers.uriType(uri)){\r\n \r\n case 'artist':\r\n artists_ids.push(helpers.getFromUri('artistid',uri))\r\n break\r\n\r\n case 'track':\r\n tracks_ids.push(helpers.getFromUri('trackid',uri))\r\n break\r\n\r\n case 'genre':\r\n genres.push(helpers.getFromUri('genreid',uri))\r\n break\r\n\r\n case 'default':\r\n genres.push(uri)\r\n break\r\n }\r\n }\r\n\r\n // construct our endpoint URL with all the appropriate arguments\r\n var endpoint = 'recommendations';\r\n endpoint += '?seed_artists='+artists_ids.join(',');\r\n endpoint += '&seed_tracks='+tracks_ids.join(',');\r\n endpoint += '&seed_genres='+genres.join(',');\r\n endpoint += '&limit='+limit;\r\n\r\n if (tunabilities){\r\n for (var key in tunabilities){\r\n if (tunabilities.hasOwnProperty(key)){\r\n endpoint += '&'+key+'='+tunabilities[key];\r\n }\r\n }\r\n }\r\n\r\n request(dispatch, getState, endpoint)\r\n .then(\r\n response => {\r\n var tracks = Object.assign([], response.tracks);\r\n\r\n // We only get simple artist objects, so we need to\r\n // get the full object. We'll add URIs to our recommendations\r\n // anyway so we can proceed in the meantime\r\n var artists_uris = []\r\n if (tracks.length > artists_ids.length && tracks.length > 10){\r\n while (artists_uris.length < 6){\r\n var random_index = Math.round(Math.random() * (tracks.length - 1))\r\n var artist = tracks[random_index].artists[0]\r\n\r\n // Make sure this artist is not already in our sample, and\r\n // is not one of the seeds\r\n if (!artists_uris.includes(artist.uri) && !artists_ids.includes(artist.id)){\r\n artists_uris.push(artist.uri)\r\n dispatch(getArtist(artist.uri))\r\n }\r\n }\r\n }\r\n\r\n // Copy already loaded albums into array\r\n var albums = []\r\n var albums_uris = []\r\n if (tracks.length > 10){\r\n while (albums.length < 6){\r\n var random_index = Math.round(Math.random() * (tracks.length - 1))\r\n var album = tracks[random_index].album\r\n\r\n // Make sure this album is not already in our sample\r\n if (!albums_uris.includes(album.uri)){\r\n albums_uris.push(album.uri)\r\n albums.push(album)\r\n }\r\n }\r\n }\r\n \r\n if (albums.length > 0){\r\n dispatch(coreActions.albumsLoaded(albums));\r\n }\r\n\r\n if (tracks.length > 0){\r\n dispatch(coreActions.tracksLoaded(tracks));\r\n }\r\n\r\n dispatch({\r\n type: 'SPOTIFY_RECOMMENDATIONS_LOADED',\r\n seeds_uris: uris,\r\n tracks_uris: helpers.arrayOf('uri',tracks),\r\n artists_uris: artists_uris,\r\n albums_uris: helpers.arrayOf('uri',albums)\r\n });\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load recommendations',\r\n error\r\n ));\r\n }\r\n )\r\n }\r\n}\r\n\r\n\r\n/**\r\n * Get all the available genres\r\n *\r\n * @param uri string\r\n **/\r\nexport function getGenres(){\r\n return (dispatch, getState) => {\r\n request(dispatch, getState, 'recommendations/available-genre-seeds')\r\n .then(\r\n response => {\r\n dispatch({\r\n type: 'SPOTIFY_GENRES_LOADED',\r\n genres: response.genres\r\n });\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load genres',\r\n error\r\n ));\r\n }\r\n )\r\n }\r\n}\r\n\r\n\r\n\r\n\r\n/**\r\n * =============================================================== ARTIST(S) ============\r\n * ======================================================================================\r\n **/\r\n\r\n/**\r\n * Get a single artist\r\n *\r\n * @param uri string\r\n * @param full boolean (whether we want a full artist object)\r\n **/\r\nexport function getArtist(uri, full = false){\r\n return (dispatch, getState) => {\r\n\r\n // Start with an empty object\r\n // As each requests completes, they'll add to this object\r\n var artist = {}\r\n\r\n // We need our artist, obviously\r\n var requests = [ \r\n request(dispatch, getState, 'artists/'+ helpers.getFromUri('artistid', uri) )\r\n .then(\r\n response => {\r\n Object.assign(artist, response);\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load artist',\r\n error\r\n ));\r\n }\r\n )\r\n ];\r\n\r\n // Do we want a full artist, with all supporting material?\r\n if (full){\r\n\r\n requests.push(\r\n request(dispatch, getState, 'artists/'+ helpers.getFromUri('artistid', uri) +'/top-tracks?country='+getState().spotify.country )\r\n .then(\r\n response => {\r\n Object.assign(artist, response);\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load artist\\'s top tracks',\r\n error\r\n ));\r\n }\r\n )\r\n );\r\n\r\n requests.push(\r\n request(dispatch, getState, 'artists/'+ helpers.getFromUri('artistid', uri) +'/related-artists' )\r\n .then(\r\n response => {\r\n dispatch(coreActions.artistsLoaded(response.artists));\r\n Object.assign(artist, { related_artists_uris: helpers.arrayOf('uri',response.artists) });\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load artist\\'s related artists',\r\n error\r\n ));\r\n }\r\n )\r\n );\r\n }\r\n\r\n // Run our requests\r\n $.when.apply($, requests).then(() => {\r\n\r\n if (artist.musicbrainz_id){\r\n dispatch(lastfmActions.getArtist(artist.uri, false, artist.musicbrainz_id))\r\n } else {\r\n dispatch(lastfmActions.getArtist(artist.uri, artist.name.replace('&','and')))\r\n }\r\n\r\n dispatch(coreActions.artistLoaded(artist));\r\n\r\n // Now go get our artist albums\r\n if (full){\r\n request(dispatch, getState, 'artists/'+ helpers.getFromUri('artistid', uri) +'/albums?market='+getState().spotify.country )\r\n .then(\r\n response => {\r\n dispatch({\r\n type: 'SPOTIFY_ARTIST_ALBUMS_LOADED',\r\n artist_uri: uri,\r\n data: response\r\n })\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load artist\\'s albums',\r\n error\r\n ));\r\n }\r\n );\r\n }\r\n })\r\n }\r\n}\r\n\r\nexport function getArtists(uris){\r\n return (dispatch, getState) => {\r\n\r\n // now get all the artists for this album (full objects)\r\n var ids = '';\r\n for(var i = 0; i < uris.length; i++){\r\n if (ids != '' ) ids += ','\r\n ids += helpers.getFromUri('artistid', uris[i] );\r\n }\r\n\r\n request(dispatch, getState, 'artists/?ids='+ids )\r\n .then(\r\n response => {\r\n for (var i = i; i < response.length; i++){\r\n var artist = response\r\n for (var i = 0; i < artist.albums.length; i++){\r\n dispatch({\r\n type: 'ALBUM_LOADED',\r\n album: artist.albums[i]\r\n }); \r\n }\r\n artist.albums_uris = helpers.arrayOf('uri',artist.albums)\r\n artist.albums_more = artist.albums.next\r\n dispatch(coreActions.artistLoaded(artist));\r\n }\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load artists',\r\n error\r\n ));\r\n }\r\n );\r\n }\r\n}\r\n\r\n\r\nexport function playArtistTopTracks(uri){\r\n return (dispatch, getState) => {\r\n const artists = getState().core.artists\r\n\r\n // Do we have this artist (and their tracks) in our index already?\r\n if (typeof(artists[uri]) !== 'undefined' && typeof(artists[uri].tracks) !== 'undefined'){\r\n const uris = helpers.arrayOf('uri',artists[uri].tracks)\r\n dispatch(mopidyActions.playURIs(uris, uri))\r\n\r\n // We need to load the artist's top tracks first\r\n } else {\r\n request(dispatch, getState, 'artists/'+ helpers.getFromUri('artistid', uri) +'/top-tracks?country='+getState().spotify.country )\r\n .then(\r\n response => {\r\n const uris = helpers.arrayOf('uri',response.tracks)\r\n dispatch(mopidyActions.playURIs(uris, uri))\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not play artist\\'s top tracks',\r\n error\r\n ));\r\n }\r\n )\r\n }\r\n }\r\n}\r\n\r\n\r\n\r\n/**\r\n * =============================================================== USER(S) ==============\r\n * ======================================================================================\r\n **/\r\n\r\nexport function getUser(uri){\r\n return (dispatch, getState) => {\r\n request(dispatch, getState, 'users/'+ helpers.getFromUri('userid',uri))\r\n .then(\r\n response => {\r\n dispatch(coreActions.userLoaded(helpers.formatUser(response)));\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load user',\r\n error\r\n ));\r\n }\r\n );\r\n }\r\n}\r\n\r\nexport function getUserPlaylists(uri){\r\n return (dispatch, getState) => {\r\n\r\n // get the first page of playlists\r\n request(dispatch, getState, 'users/'+ helpers.getFromUri('userid', uri) +'/playlists?limit=40' )\r\n .then(\r\n response => {\r\n var playlists = [];\r\n for (var raw_playlist of response.items){\r\n\r\n var can_edit = false;\r\n if (getState().spotify.me && raw_playlist.owner.id == getState().spotify.me.id){\r\n can_edit = true;\r\n }\r\n\r\n var playlist = Object.assign(\r\n {},\r\n helpers.formatPlaylist(raw_playlist),\r\n {\r\n can_edit: can_edit,\r\n tracks_total: raw_playlist.tracks.total\r\n }\r\n );\r\n\r\n playlists.push(playlist);\r\n }\r\n\r\n dispatch(coreActions.userPlaylistsLoaded(uri, playlists, response.next, response.total));\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load user\\'s playlists',\r\n error\r\n ));\r\n }\r\n );\r\n }\r\n}\r\n\r\n\r\n\r\n\r\n/**\r\n * =============================================================== ALBUM(S) =============\r\n * ======================================================================================\r\n **/\r\n\r\n/**\r\n * Single album\r\n *\r\n * @oaram uri string\r\n **/\r\nexport function getAlbum(uri){\r\n return (dispatch, getState) => {\r\n\r\n // get the album\r\n request(dispatch, getState, 'albums/'+ helpers.getFromUri('albumid', uri) )\r\n .then(\r\n response => {\r\n\r\n // dispatch our loaded artists (simple objects)\r\n dispatch(coreActions.artistsLoaded(response.artists));\r\n\r\n var tracks = Object.assign([], response.tracks.items);\r\n\r\n var album = Object.assign(\r\n {},\r\n helpers.formatAlbum(response),\r\n {\r\n artists_uris: helpers.arrayOf('uri',response.artists),\r\n tracks_uris: helpers.arrayOf('uri', tracks),\r\n tracks_more: response.tracks.next,\r\n tracks_total: response.tracks.total\r\n }\r\n );\r\n\r\n // add our album to all the tracks\r\n for (var i = 0; i < tracks.length; i++){\r\n tracks[i].album = {\r\n name: album.name,\r\n uri: album.uri\r\n }\r\n }\r\n\r\n dispatch(coreActions.albumLoaded(album));\r\n dispatch(coreActions.tracksLoaded(tracks));\r\n\r\n // now get all the artists for this album (full objects)\r\n // we do this to get the artist artwork\r\n var artist_ids = [];\r\n for(var i = 0; i < response.artists.length; i++){\r\n artist_ids.push(helpers.getFromUri('artistid', response.artists[i].uri ) )\r\n }\r\n\r\n // get all album artists as full objects\r\n request(dispatch, getState, 'artists/?ids='+artist_ids )\r\n .then(\r\n response => {\r\n dispatch(coreActions.artistsLoaded(response.artists));\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load album\\'s artists',\r\n error\r\n ));\r\n }\r\n );\r\n\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load album',\r\n error\r\n ));\r\n }\r\n )\r\n }\r\n}\r\n\r\nexport function toggleAlbumInLibrary(uri, method){\r\n if (method == 'PUT' ) var new_state = 1\r\n if (method == 'DELETE' ) var new_state = 0\r\n\r\n return (dispatch, getState) => {\r\n request(dispatch, getState, 'me/albums?ids='+ helpers.getFromUri('albumid',uri), method )\r\n .then(\r\n response => {\r\n dispatch({\r\n type: 'SPOTIFY_ALBUM_FOLLOWING',\r\n key: uri,\r\n data: new_state\r\n });\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not add/remove library album',\r\n error\r\n ));\r\n }\r\n );\r\n }\r\n}\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * =============================================================== PLAYLIST(S) ==========\r\n * ======================================================================================\r\n **/\r\n\r\nexport function createPlaylist(name, description, is_public, is_collaborative){\r\n return (dispatch, getState) => {\r\n\r\n var data = {\r\n name: name,\r\n description: description, \r\n public: is_public,\r\n collaborative: is_collaborative\r\n }\r\n\r\n request(dispatch, getState, 'users/'+ getState().spotify.me.id +'/playlists/', 'POST', data)\r\n .then(\r\n response => {\r\n dispatch({\r\n type: 'PLAYLIST_LOADED',\r\n key: response.uri,\r\n playlist: Object.assign(\r\n {},\r\n response,\r\n {\r\n can_edit: true,\r\n tracks: [],\r\n tracks_more: null,\r\n tracks_total: 0\r\n })\r\n });\r\n\r\n dispatch({\r\n type: 'LIBRARY_PLAYLISTS_LOADED',\r\n uris: [response.uri]\r\n })\r\n\r\n dispatch(uiActions.createNotification({type: 'info', content: 'Created playlist'}));\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not create playlist',\r\n error\r\n ));\r\n }\r\n )\r\n }\r\n}\r\n\r\nexport function savePlaylist(uri, name, description, is_public, is_collaborative, image){\r\n return (dispatch, getState) => {\r\n\r\n var data = {\r\n name: name,\r\n description: description, \r\n public: is_public,\r\n collaborative: is_collaborative\r\n }\r\n\r\n // Update the playlist fields\r\n request(\r\n dispatch, getState, 'users/'+ getState().spotify.me.id +'/playlists/'+ helpers.getFromUri('playlistid',uri), 'PUT', data)\r\n .then(\r\n response => {\r\n dispatch(uiActions.createNotification({type: 'info', content: 'Playlist saved'}));\r\n\r\n // Save the image\r\n if (image){\r\n request(dispatch, getState, 'users/'+ getState().spotify.me.id +'/playlists/'+ helpers.getFromUri('playlistid',uri)+'/images', 'PUT', image)\r\n .then(\r\n\r\n response => {\r\n dispatch({\r\n type: 'PLAYLIST_UPDATED',\r\n key: uri,\r\n playlist: {\r\n name: name,\r\n public: is_public,\r\n collaborative: is_collaborative,\r\n description: description\r\n }\r\n });\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not save image',\r\n error\r\n ));\r\n }\r\n );\r\n\r\n // No image, so we're done here\r\n } else { \r\n dispatch({\r\n type: 'PLAYLIST_UPDATED',\r\n key: uri,\r\n playlist: {\r\n name: name,\r\n public: is_public,\r\n collaborative: is_collaborative,\r\n description: description\r\n }\r\n });\r\n }\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not save playlist',\r\n error\r\n ));\r\n }\r\n );\r\n }\r\n}\r\n\r\nexport function getPlaylist(uri){\r\n return (dispatch, getState) => {\r\n\r\n // get the main playlist object\r\n request(dispatch, getState, 'playlists/'+ helpers.getFromUri('playlistid',uri) +'?market='+getState().spotify.country )\r\n .then(\r\n response => {\r\n\r\n // convert links in description\r\n var description = null\r\n if (response.description){\r\n description = response.description\r\n description = description.split(' {\r\n dispatch(coreActions.handleException(\r\n 'Could not load playlist',\r\n error\r\n ));\r\n }\r\n )\r\n }\r\n}\r\n\r\n/**\r\n * Get all library tracks\r\n *\r\n * Recursively get .next until we have all tracks\r\n **/\r\n\r\nexport function getLibraryTracksAndPlay(uri){\r\n return (dispatch, getState) => {\r\n dispatch(uiActions.startProcess(\r\n 'SPOTIFY_GET_LIBRARY_TRACKS_AND_PLAY_PROCESSOR',\r\n 'Loading library tracks', \r\n {\r\n uri: uri,\r\n next: 'me/tracks'\r\n }\r\n ))\r\n }\r\n}\r\n\r\nexport function getLibraryTracksAndPlayProcessor(data){\r\n return (dispatch, getState) => {\r\n request(dispatch, getState, data.next)\r\n .then(\r\n response => {\r\n\r\n // Check to see if we've been cancelled\r\n if (getState().ui.processes['SPOTIFY_GET_LIBRARY_TRACKS_AND_PLAY_PROCESSOR'] !== undefined){\r\n var processor = getState().ui.processes['SPOTIFY_GET_LIBRARY_TRACKS_AND_PLAY_PROCESSOR']\r\n\r\n if (processor.status == 'cancelling'){\r\n dispatch(uiActions.processCancelled('SPOTIFY_GET_LIBRARY_TRACKS_AND_PLAY_PROCESSOR'))\r\n return false\r\n }\r\n }\r\n\r\n // Add on our new batch of loaded tracks\r\n var uris = [];\r\n var new_uris = [];\r\n for (var i = 0; i < response.items.length; i++){\r\n new_uris.push(response.items[i].track.uri)\r\n }\r\n if (data.uris){\r\n uris = [...data.uris, ...new_uris];\r\n } else {\r\n uris = new_uris;\r\n }\r\n\r\n // We got a next link, so we've got more work to be done\r\n if (response.next){\r\n dispatch(uiActions.updateProcess(\r\n 'SPOTIFY_GET_LIBRARY_TRACKS_AND_PLAY_PROCESSOR', \r\n 'Loading '+(response.total-uris.length)+' library tracks', \r\n {\r\n next: response.next,\r\n total: response.total,\r\n remaining: response.total - uris.length\r\n }\r\n ))\r\n dispatch(uiActions.runProcess(\r\n 'SPOTIFY_GET_LIBRARY_TRACKS_AND_PLAY_PROCESSOR', \r\n {\r\n next: response.next,\r\n uris: uris\r\n }\r\n ))\r\n } else {\r\n dispatch(mopidyActions.playURIs(uris, data.uri));\r\n dispatch(uiActions.processFinishing('SPOTIFY_GET_LIBRARY_TRACKS_AND_PLAY_PROCESSOR'))\r\n }\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load library tracks',\r\n error\r\n ));\r\n }\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * Get all tracks for a playlist\r\n *\r\n * Recursively get .next until we have all tracks\r\n **/\r\n\r\nexport function getPlaylistTracksAndPlay(uri, shuffle){\r\n return (dispatch, getState) => {\r\n dispatch(uiActions.startProcess(\r\n 'SPOTIFY_GET_PLAYLIST_TRACKS_AND_PLAY_PROCESSOR',\r\n 'Loading playlist tracks', \r\n {\r\n uri: uri,\r\n next: 'playlists/'+ helpers.getFromUri('playlistid',uri) +'/tracks?market='+getState().spotify.country,\r\n shuffle: shuffle\r\n }\r\n ))\r\n }\r\n}\r\n\r\nexport function getPlaylistTracksAndPlayProcessor(data){\r\n return (dispatch, getState) => {\r\n request(dispatch, getState, data.next)\r\n .then(\r\n response => {\r\n\r\n // Check to see if we've been cancelled\r\n if (getState().ui.processes['SPOTIFY_GET_PLAYLIST_TRACKS_AND_PLAY_PROCESSOR'] !== undefined){\r\n var processor = getState().ui.processes['SPOTIFY_GET_PLAYLIST_TRACKS_AND_PLAY_PROCESSOR']\r\n\r\n if (processor.status == 'cancelling'){\r\n dispatch(uiActions.processCancelled('SPOTIFY_GET_PLAYLIST_TRACKS_AND_PLAY_PROCESSOR'))\r\n return false\r\n }\r\n }\r\n\r\n // Add on our new batch of loaded tracks\r\n var uris = []\r\n var new_uris = []\r\n for (var i = 0; i < response.items.length; i++){\r\n new_uris.push(response.items[i].track.uri)\r\n }\r\n if (data.uris){\r\n uris = [...data.uris, ...new_uris];\r\n } else {\r\n uris = new_uris;\r\n }\r\n\r\n // We got a next link, so we've got more work to be done\r\n if (response.next){\r\n dispatch(uiActions.updateProcess(\r\n 'SPOTIFY_GET_PLAYLIST_TRACKS_AND_PLAY_PROCESSOR', \r\n 'Loading '+(response.total-uris.length)+' playlist tracks', \r\n {\r\n next: response.next,\r\n total: response.total,\r\n remaining: response.total - uris.length,\r\n shuffle: data.shuffle\r\n }\r\n ))\r\n dispatch(uiActions.runProcess(\r\n 'SPOTIFY_GET_PLAYLIST_TRACKS_AND_PLAY_PROCESSOR', \r\n {\r\n next: response.next,\r\n uris: uris,\r\n shuffle: data.shuffle\r\n }\r\n ))\r\n } else {\r\n\r\n \tif (data.shuffle){\r\n \t\turis = helpers.shuffle(uris);\r\n \t}\r\n\r\n dispatch(mopidyActions.playURIs(uris, data.uri))\r\n dispatch(uiActions.processFinishing('SPOTIFY_GET_PLAYLIST_TRACKS_AND_PLAY_PROCESSOR'))\r\n }\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load tracks to play playlist',\r\n error\r\n ));\r\n }\r\n );\r\n }\r\n}\r\n\r\nexport function toggleFollowingPlaylist(uri, method){\r\n if (method == 'PUT' ) var new_state = 1\r\n if (method == 'DELETE' ) var new_state = 0\r\n\r\n return (dispatch, getState) => {\r\n request(dispatch, getState, 'playlists/'+ helpers.getFromUri('playlistid',uri) + '/followers', method )\r\n .then(\r\n response => {\r\n dispatch({\r\n type: 'SPOTIFY_PLAYLIST_FOLLOWING_LOADED',\r\n key: uri,\r\n is_following: new_state\r\n });\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not add/remove library playlist',\r\n error\r\n ));\r\n }\r\n );\r\n }\r\n}\r\n\r\nexport function addTracksToPlaylist(uri, tracks_uris){\r\n return (dispatch, getState) => {\r\n request(dispatch, getState, 'playlists/'+ helpers.getFromUri('playlistid',uri) + '/tracks', 'POST', { uris: tracks_uris } )\r\n .then(\r\n response => {\r\n dispatch({\r\n type: 'PLAYLIST_TRACKS_ADDED',\r\n key: uri,\r\n tracks_uris: tracks_uris,\r\n snapshot_id: response.snapshot_id\r\n });\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not add tracks to playlist',\r\n error\r\n ));\r\n }\r\n );\r\n }\r\n}\r\n\r\nexport function deleteTracksFromPlaylist(uri, snapshot_id, tracks_indexes){\r\n return (dispatch, getState) => {\r\n request(dispatch, getState, 'playlists/'+ helpers.getFromUri('playlistid',uri) + '/tracks', 'DELETE', { snapshot_id: snapshot_id, positions: tracks_indexes } )\r\n .then(\r\n response => {\r\n dispatch({\r\n type: 'PLAYLIST_TRACKS_REMOVED',\r\n key: uri,\r\n tracks_indexes: tracks_indexes,\r\n snapshot_id: response.snapshot_id\r\n });\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not remove tracks from playlist',\r\n error\r\n ));\r\n }\r\n );\r\n }\r\n}\r\n\r\nexport function reorderPlaylistTracks(uri, range_start, range_length, insert_before, snapshot_id){\r\n return (dispatch, getState) => {\r\n request(dispatch, getState, 'playlists/'+ helpers.getFromUri('playlistid',uri) + '/tracks', 'PUT', { uri: uri, range_start: range_start, range_length: range_length, insert_before: insert_before, snapshot_id: snapshot_id } )\r\n .then(\r\n response => {\r\n dispatch({\r\n type: 'PLAYLIST_TRACKS_REORDERED',\r\n key: uri,\r\n range_start: range_start,\r\n range_length: range_length,\r\n insert_before: insert_before,\r\n snapshot_id: response.snapshot_id\r\n });\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not reorder playlist tracks',\r\n error\r\n ));\r\n }\r\n );\r\n }\r\n}\r\n\r\n\r\n\r\n/**\r\n * =============================================================== LIBRARY ==============\r\n * ======================================================================================\r\n **/\r\n\r\nexport function flushLibrary(){\r\n return {\r\n type: \"SPOTIFY_FLUSH_LIBRARY\"\r\n }\r\n}\r\n \r\n\r\n/**\r\n * Playlists\r\n **/\r\n\r\nexport function getLibraryPlaylists(){\r\n return (dispatch, getState) => {\r\n var last_run = getState().ui.processes.SPOTIFY_GET_LIBRARY_PLAYLISTS_PROCESSOR\r\n\r\n if (!last_run){\r\n dispatch(uiActions.startProcess('SPOTIFY_GET_LIBRARY_PLAYLISTS_PROCESSOR','Loading Spotify playlists', {next: 'me/playlists?limit=50'})) \r\n } else if (last_run.status == 'cancelled'){\r\n dispatch(uiActions.resumeProcess('SPOTIFY_GET_LIBRARY_PLAYLISTS_PROCESSOR'))\r\n\r\n // We've already finished, but the status has been flushed \r\n } else if (last_run.status == 'finished' && !getState().spotify.library_playlists_loaded_all){\r\n dispatch(uiActions.startProcess('SPOTIFY_GET_LIBRARY_PLAYLISTS_PROCESSOR','Loading Spotify playlists', {next: 'me/playlists?limit=50'})) \r\n }\r\n }\r\n}\r\n\r\nexport function getLibraryPlaylistsProcessor(data){\r\n return (dispatch, getState) => {\r\n request(dispatch, getState, data.next)\r\n .then(\r\n response => {\r\n dispatch({\r\n type: 'SPOTIFY_LIBRARY_PLAYLISTS_LOADED',\r\n playlists: response.items\r\n })\r\n\r\n // Check to see if we've been cancelled\r\n if (getState().ui.processes['SPOTIFY_GET_LIBRARY_PLAYLISTS_PROCESSOR'] !== undefined){\r\n var processor = getState().ui.processes['SPOTIFY_GET_LIBRARY_PLAYLISTS_PROCESSOR']\r\n\r\n if (processor.status == 'cancelling'){\r\n dispatch(uiActions.processCancelled('SPOTIFY_GET_LIBRARY_PLAYLISTS_PROCESSOR'))\r\n return false\r\n }\r\n }\r\n\r\n // We got a next link, so we've got more work to be done\r\n if (response.next){\r\n var total = response.total\r\n var loaded = getState().spotify.library_playlists.length\r\n var remaining = total - loaded\r\n dispatch(uiActions.updateProcess(\r\n 'SPOTIFY_GET_LIBRARY_PLAYLISTS_PROCESSOR', \r\n 'Loading '+remaining+' Spotify playlists', \r\n {\r\n next: response.next,\r\n total: response.total,\r\n remaining: remaining\r\n }\r\n ))\r\n dispatch(uiActions.runProcess('SPOTIFY_GET_LIBRARY_PLAYLISTS_PROCESSOR', {next: response.next}))\r\n } else {\r\n dispatch(uiActions.processFinishing('SPOTIFY_GET_LIBRARY_PLAYLISTS_PROCESSOR'))\r\n dispatch({type: 'SPOTIFY_LIBRARY_PLAYLISTS_LOADED_ALL'})\r\n }\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load library playlists',\r\n error\r\n ));\r\n }\r\n );\r\n }\r\n}\r\n \r\n\r\n/**\r\n * Artists\r\n **/\r\n\r\nexport function getLibraryArtists(){\r\n return (dispatch, getState) => {\r\n var last_run = getState().ui.processes.SPOTIFY_GET_LIBRARY_ARTISTS_PROCESSOR\r\n\r\n if (!last_run){\r\n dispatch(uiActions.startProcess('SPOTIFY_GET_LIBRARY_ARTISTS_PROCESSOR','Loading Spotify artists', {next: 'me/following?type=artist&limit=50'}))\r\n } else if (last_run.status == 'cancelled'){\r\n dispatch(uiActions.resumeProcess('SPOTIFY_GET_LIBRARY_ARTISTS_PROCESSOR')) \r\n\r\n // We've already finished, but the status has been flushed \r\n } else if (last_run.status == 'finished' && !getState().spotify.library_artists_loaded_all){\r\n dispatch(uiActions.startProcess('SPOTIFY_GET_LIBRARY_ARTISTS_PROCESSOR','Loading Spotify artists', {next: 'me/following?type=artist&limit=50'}))\r\n }\r\n }\r\n}\r\n\r\nexport function getLibraryArtistsProcessor(data){\r\n return (dispatch, getState) => {\r\n request(dispatch, getState, data.next)\r\n .then(\r\n response => {\r\n dispatch({\r\n type: 'SPOTIFY_LIBRARY_ARTISTS_LOADED',\r\n artists: response.artists.items\r\n })\r\n\r\n // Check to see if we've been cancelled\r\n if (getState().ui.processes['SPOTIFY_GET_LIBRARY_ARTISTS_PROCESSOR'] !== undefined){\r\n var processor = getState().ui.processes['SPOTIFY_GET_LIBRARY_ARTISTS_PROCESSOR']\r\n\r\n if (processor.status == 'cancelling'){\r\n dispatch(uiActions.processCancelled('SPOTIFY_GET_LIBRARY_ARTISTS_PROCESSOR'))\r\n return false\r\n }\r\n }\r\n\r\n // We got a next link, so we've got more work to be done\r\n if (response.artists.next){\r\n var total = response.artists.total\r\n var loaded = getState().spotify.library_artists.length\r\n var remaining = total - loaded\r\n dispatch(uiActions.updateProcess(\r\n 'SPOTIFY_GET_LIBRARY_ARTISTS_PROCESSOR', \r\n 'Loading '+remaining+' Spotify artists', \r\n {\r\n next: response.artists.next, \r\n total: response.artists.total,\r\n remaining: remaining\r\n }\r\n ))\r\n dispatch(uiActions.runProcess('SPOTIFY_GET_LIBRARY_ARTISTS_PROCESSOR', {next: response.artists.next}))\r\n } else {\r\n dispatch(uiActions.processFinishing('SPOTIFY_GET_LIBRARY_ARTISTS_PROCESSOR'))\r\n }\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load library artists',\r\n error\r\n ));\r\n }\r\n );\r\n }\r\n}\r\n \r\n\r\n/**\r\n * ALbums\r\n **/\r\n\r\nexport function getLibraryAlbums(){\r\n return (dispatch, getState) => {\r\n var last_run = getState().ui.processes.SPOTIFY_GET_LIBRARY_ALBUMS_PROCESSOR\r\n\r\n if (!last_run){\r\n dispatch(uiActions.startProcess('SPOTIFY_GET_LIBRARY_ALBUMS_PROCESSOR','Loading Spotify albums', {next: 'me/albums?limit=50'})) \r\n } else if (last_run.status == 'cancelled'){\r\n dispatch(uiActions.updateProcess('SPOTIFY_GET_LIBRARY_ALBUMS_PROCESSOR','Loading Spotify albums', {next: 'me/albums?limit=50'})) \r\n\r\n // We've already finished, but the status has been flushed \r\n } else if (last_run.status == 'finished' && !getState().spotify.library_albums_loaded_all){\r\n dispatch(uiActions.startProcess('SPOTIFY_GET_LIBRARY_ALBUMS_PROCESSOR','Loading Spotify albums', {next: 'me/albums?limit=50'})) \r\n }\r\n }\r\n}\r\n\r\nexport function getLibraryAlbumsProcessor(data){\r\n return (dispatch, getState) => {\r\n request(dispatch, getState, data.next)\r\n .then(\r\n response => {\r\n dispatch({\r\n type: 'SPOTIFY_LIBRARY_ALBUMS_LOADED',\r\n albums: response.items\r\n })\r\n\r\n // Check to see if we've been cancelled\r\n if (getState().ui.processes['SPOTIFY_GET_LIBRARY_ALBUMS_PROCESSOR'] !== undefined){\r\n var processor = getState().ui.processes['SPOTIFY_GET_LIBRARY_ALBUMS_PROCESSOR']\r\n\r\n if (processor.status == 'cancelling'){\r\n dispatch(uiActions.processCancelled('SPOTIFY_GET_LIBRARY_ALBUMS_PROCESSOR'))\r\n return false\r\n }\r\n }\r\n\r\n // We got a next link, so we've got more work to be done\r\n if (response.next){\r\n var total = response.total\r\n var loaded = getState().spotify.library_albums.length\r\n var remaining = total - loaded\r\n dispatch(uiActions.updateProcess(\r\n 'SPOTIFY_GET_LIBRARY_ALBUMS_PROCESSOR', \r\n 'Loading '+remaining+' Spotify albums', \r\n {\r\n next: response.next, \r\n total: response.total,\r\n remaining: remaining\r\n }\r\n ))\r\n dispatch(uiActions.runProcess('SPOTIFY_GET_LIBRARY_ALBUMS_PROCESSOR', {next: response.next}))\r\n } else {\r\n dispatch(uiActions.processFinishing('SPOTIFY_GET_LIBRARY_ALBUMS_PROCESSOR'))\r\n }\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not load library albums',\r\n error\r\n ));\r\n }\r\n );\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/js/services/spotify/actions.js","\r\nimport * as helpers from '../../helpers'\r\nvar spotifyActions = require('../../services/spotify/actions')\r\nvar mopidyActions = require('../../services/mopidy/actions')\r\n\r\nexport function getBroadcasts(){\r\n return (dispatch, getState) => {\r\n var config = {\r\n method: 'GET',\r\n timeout: 15000\r\n }\r\n\r\n // Fetch the \"iris_broadcasts.json\" file from Gist (or \"_test\" for test mode)\r\n if (getState().ui.test_mode){\r\n \tconfig.url = 'https://gist.githubusercontent.com/jaedb/cb3a5ee6909632abb2e0fe66d4c8c311/raw'\r\n } else {\r\n \tconfig.url = 'https://gist.githubusercontent.com/jaedb/b677dccf80daf3ccb2ef12e96e495677/raw'\r\n }\r\n\r\n $.ajax(config).then(\r\n response => {\r\n dispatch({\r\n type: 'BROADCASTS_LOADED',\r\n broadcasts: JSON.parse(response)\r\n })\r\n },\r\n (xhr, status, error) => {\r\n dispatch(\r\n handleException(\r\n 'Could not fetch broadcasts from GitHub',\r\n {\r\n config: config,\r\n xhr: xhr,\r\n status: status,\r\n error: error\r\n },\r\n null,\r\n false\r\n )\r\n );\r\n }\r\n )\r\n }\r\n}\r\n\r\nexport function startSearch(search_type, query, only_mopidy = false){\r\n\treturn {\r\n\t\ttype: 'SEARCH_STARTED',\r\n search_type: search_type,\r\n query: query,\r\n only_mopidy: only_mopidy\r\n\t}\r\n}\r\n\r\nexport function handleException(message, data = {}, description = null, show_notification = true){\r\n return {\r\n type: 'HANDLE_EXCEPTION',\r\n message: message,\r\n description: description,\r\n data: data,\r\n show_notification: show_notification\r\n }\r\n}\r\n\r\nexport function debugResponse(response){\r\n return {\r\n type: 'DEBUG',\r\n response: response\r\n }\r\n}\r\n\r\nexport function set(data){\r\n return {\r\n type: 'CORE_SET',\r\n data: data\r\n }\r\n}\r\n\r\nexport function clearCurrentTrack(){\r\n return {\r\n type: 'CLEAR_CURRENT_TRACK'\r\n }\r\n}\r\n\r\nexport function cachebustHttpStream(){\r\n return {\r\n type: 'CACHEBUST_HTTP_STREAM'\r\n }\r\n}\r\n\r\n/**\r\n * Record getters\r\n *\r\n * Calling this through the common core enables us to detect whether we've already\r\n * got the record in the state or persistent storage. Failing that, we pass off to the\r\n * relevant service to load the record - all from one neat package.\r\n **/\r\n\r\nexport function loadTrack(uri, force_reload = false){\r\n return {\r\n type: 'LOAD_TRACK',\r\n uri: uri,\r\n force_reload: force_reload\r\n }\r\n}\r\n\r\nexport function loadAlbum(uri, force_reload = false){\r\n return {\r\n type: 'LOAD_ALBUM',\r\n uri: uri,\r\n force_reload: force_reload\r\n }\r\n}\r\n\r\nexport function loadArtist(uri, force_reload = false){\r\n return {\r\n type: 'LOAD_ARTIST',\r\n uri: uri,\r\n force_reload: force_reload\r\n }\r\n}\r\n\r\nexport function loadPlaylist(uri, force_reload = false){\r\n return {\r\n type: 'LOAD_PLAYLIST',\r\n uri: uri,\r\n force_reload: force_reload\r\n }\r\n}\r\n\r\nexport function loadUser(uri, force_reload = false){\r\n return {\r\n type: 'LOAD_USER',\r\n uri: uri,\r\n force_reload: force_reload\r\n }\r\n}\r\n\r\nexport function loadUserPlaylists(uri, force_reload = false){\r\n return {\r\n type: 'LOAD_USER_PLAYLISTS',\r\n uri: uri,\r\n force_reload: force_reload\r\n }\r\n}\r\n\r\n\r\n/**\r\n * Record loaders\r\n *\r\n * We've got a loaded record, now we just need to plug it in to our state and stores.\r\n **/\r\n\r\nexport function trackLoaded(track){\r\n return tracksLoaded([track]);\r\n}\r\nexport function tracksLoaded(tracks){\r\n return {\r\n type: 'TRACKS_LOADED',\r\n tracks: tracks\r\n }\r\n}\r\n\r\nexport function artistLoaded(artist){\r\n return artistsLoaded([artist]);\r\n}\r\nexport function artistsLoaded(artists){\r\n return {\r\n type: 'ARTISTS_LOADED',\r\n artists: artists\r\n }\r\n}\r\n\r\nexport function albumLoaded(album){\r\n return albumsLoaded([album]);\r\n}\r\nexport function albumsLoaded(albums){\r\n return {\r\n type: 'ALBUMS_LOADED',\r\n albums: albums\r\n }\r\n}\r\n\r\nexport function playlistLoaded(playlist){\r\n return playlistsLoaded([playlist]);\r\n}\r\nexport function playlistsLoaded(playlists){\r\n return {\r\n type: 'PLAYLISTS_LOADED',\r\n playlists: playlists\r\n }\r\n}\r\n\r\nexport function userLoaded(user){\r\n return usersLoaded([user]);\r\n}\r\nexport function usersLoaded(users){\r\n return {\r\n type: 'USERS_LOADED',\r\n users: users\r\n }\r\n}\r\nexport function userPlaylistsLoaded(uri, playlists, more = null, total = null){\r\n return {\r\n type: 'USER_PLAYLISTS_LOADED',\r\n uri: uri,\r\n playlists: playlists,\r\n more: more,\r\n total: total\r\n }\r\n}\r\n\r\nexport function loadedMore(parent_type, parent_key, records_type, records_data){\r\n return {\r\n type: 'LOADED_MORE',\r\n parent_type: parent_type,\r\n parent_key: parent_key,\r\n records_type: records_type,\r\n records_data: records_data\r\n }\r\n}\r\n\r\nexport function removeFromIndex(index_name, key, new_key = null){\r\n return { \r\n type: 'REMOVE_FROM_INDEX',\r\n index_name: index_name,\r\n key: key,\r\n new_key: new_key\r\n }\r\n}\r\n\r\n\r\n\r\n/**\r\n * Playing of assetse\r\n **/\r\n\r\n/**\r\n * Play one or many URIs\r\n *\r\n * @param uri = String (when playing just one URI, eg playlist)\r\n * @param uris = Array (when playing several URIs, eg tracks)\r\n * @param origin = String (URI from which these URIs came)\r\n * @param shuffle = Boolean (shuffle the order of URIs)\r\n **/\r\nexport function playURIs(uri = null, uris = [], origin = null, shuffle = false){\r\n return {\r\n type: 'PLAY_URIS',\r\n uri: uri,\r\n uris: uris,\r\n origin: origin,\r\n shuffle: shuffle\r\n }\r\n}\r\n\r\n/**\r\n * Enqueue one or many URIs\r\n *\r\n * @param uris = Array\r\n * @param position = Int (position in track_list in which to insert these URIs)\r\n * @param origin = String (URI from which these URIs came)\r\n * @param shuffle = Boolean (shuffle the order of URIs)\r\n **/\r\nexport function enqueueURIs(uris = [], position = null, origin = null, shuffle = false){\r\n return {\r\n type: 'ENQUEUE_URIS',\r\n position: position,\r\n uris: uris,\r\n origin: origin,\r\n shuffle: shuffle\r\n }\r\n}\r\n\r\n\r\n\r\n/**\r\n * Playlist manipulation\r\n **/\r\n\r\nexport function reorderPlaylistTracks(uri, indexes, insert_before, snapshot_id = false){\r\n var range = helpers.createRange(indexes);\r\n switch(helpers.uriSource(uri)){\r\n\r\n case 'spotify':\r\n return { \r\n type: 'SPOTIFY_REORDER_PLAYLIST_TRACKS',\r\n key: uri,\r\n range_start: range.start,\r\n range_length: range.length,\r\n insert_before: insert_before,\r\n snapshot_id: snapshot_id\r\n }\r\n\r\n case 'm3u':\r\n return { \r\n type: 'MOPIDY_REORDER_PLAYLIST_TRACKS',\r\n key: uri,\r\n range_start: range.start,\r\n range_length: range.length,\r\n insert_before: insert_before\r\n }\r\n }\r\n}\r\n\r\nexport function savePlaylist(uri, name, description = '', is_public = false, is_collaborative = false, image = null){\r\n switch (helpers.uriSource(uri)){\r\n\r\n case 'spotify':\r\n return { \r\n type: 'SPOTIFY_SAVE_PLAYLIST',\r\n key: uri,\r\n name: name,\r\n description: (description == '' ? null : description),\r\n image: image,\r\n is_public: is_public,\r\n is_collaborative: is_collaborative\r\n }\r\n\r\n case 'm3u':\r\n return { \r\n type: 'MOPIDY_SAVE_PLAYLIST',\r\n key: uri,\r\n name: name\r\n }\r\n }\r\n return false\r\n}\r\n\r\nexport function createPlaylist(scheme, name, description = '', is_public = false, is_collaborative = false){\r\n switch (scheme){\r\n\r\n case 'spotify':\r\n if (description == ''){\r\n description = null\r\n }\r\n return spotifyActions.createPlaylist(name, description, is_public, is_collaborative )\r\n\r\n default:\r\n return mopidyActions.createPlaylist(name, scheme)\r\n }\r\n return false\r\n}\r\n\r\nexport function deletePlaylist(uri){\r\n switch (helpers.uriSource(uri)){\r\n\r\n case 'spotify':\r\n return spotifyActions.following(uri, 'DELETE')\r\n\r\n default:\r\n return mopidyActions.deletePlaylist(uri)\r\n }\r\n return false\r\n}\r\n\r\nexport function removeTracksFromPlaylist(uri, tracks_indexes){\r\n switch(helpers.uriSource(uri )){\r\n\r\n case 'spotify':\r\n return { \r\n type: 'SPOTIFY_REMOVE_PLAYLIST_TRACKS',\r\n key: uri,\r\n tracks_indexes: tracks_indexes\r\n }\r\n\r\n case 'm3u':\r\n return { \r\n type: 'MOPIDY_REMOVE_PLAYLIST_TRACKS',\r\n key: uri,\r\n tracks_indexes: tracks_indexes\r\n }\r\n }\r\n}\r\n\r\nexport function addTracksToPlaylist(uri, tracks_uris){\r\n switch(helpers.uriSource(uri )){\r\n\r\n case 'spotify':\r\n return { \r\n type: 'SPOTIFY_ADD_PLAYLIST_TRACKS',\r\n key: uri,\r\n tracks_uris: tracks_uris\r\n }\r\n\r\n case 'm3u':\r\n return { \r\n type: 'MOPIDY_ADD_PLAYLIST_TRACKS',\r\n key: uri,\r\n tracks_uris: tracks_uris\r\n }\r\n }\r\n}\r\n\r\n\r\n/**\r\n * Asset libraries\r\n **/\r\n\r\nexport function getLibraryPlaylists(){\r\n return {\r\n type: 'GET_LIBRARY_PLAYLISTS'\r\n }\r\n}\r\n\r\nexport function getLibraryAlbums(){\r\n return {\r\n type: 'GET_LIBRARY_ALBUMS'\r\n }\r\n}\r\n\r\nexport function getLibraryArtists(){\r\n return {\r\n type: 'GET_LIBRARY_ARTISTS'\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/services/core/actions.js","\r\nimport React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { createStore, bindActionCreators } from 'redux';\r\nimport Link from './Link';\r\n\r\nimport Icon from './Icon'\r\n\r\nimport * as helpers from '../helpers'\r\nimport * as uiActions from '../services/ui/actions'\r\n\r\nclass Thumbnail extends React.Component{\r\n\r\n\tconstructor(props){\r\n\t\tsuper(props);\r\n\t}\r\n\r\n\tmapImageSizes(){\r\n\r\n\t\t// Single image\r\n\t\tif (this.props.image){\r\n\t\t\treturn this.props.image;\r\n\r\n\t\t// Multiple images\r\n\t\t} else if (this.props.images){\r\n\t\t\tvar images = this.props.images;\r\n\r\n\t\t\t// An array of image objects (eg Artists), so just pick the first one\r\n\t\t\tif (Array.isArray(images) && images.length > 0){\r\n\t\t\t\timages = images[0];\r\n\t\t\t}\r\n\r\n\t\t\t// Default to medium-sized image, but accept size property as override\r\n\t\t\tvar size = 'medium';\r\n\t\t\tif (this.props.size){\r\n\t\t\t\tsize = this.props.size;\r\n\t\t\t}\r\n\r\n\t\t\t// Return the requested size\r\n\t\t\tif (images[size]){\r\n\t\t\t\treturn images[size];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// No images\r\n\t\treturn null;\r\n\t}\r\n\r\n\trender(){\r\n\t\tvar image = this.mapImageSizes();\r\n\t\tvar class_name = 'thumbnail thumbnail--loaded';\r\n\t\tif (this.props.size){\r\n\t\t\tclass_name += ' thumbnail--'+this.props.size;\r\n\t\t}\r\n\t\tif (this.props.circle){\r\n\t\t\tclass_name += ' thumbnail--circle';\r\n\t\t}\r\n\t\tif (this.props.className){\r\n\t\t\tclass_name += ' '+this.props.className;\r\n\t\t}\r\n\t\t\r\n\t\tvar zoom_icon = null;\r\n\t\tif (this.props.canZoom && image){\r\n\t\t\tzoom_icon = ;\r\n\t\t}\r\n\r\n\t\treturn (\r\n\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t{zoom_icon}\r\n\t\t\t
\r\n\t\t);\r\n\t}\r\n}\r\n\r\nconst mapStateToProps = (state, ownProps) => {\r\n\treturn {}\r\n}\r\n\r\nconst mapDispatchToProps = (dispatch) => {\r\n\treturn {\r\n\t\tuiActions: bindActionCreators(uiActions, dispatch)\r\n\t}\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(Thumbnail)\n\n\n// WEBPACK FOOTER //\n// ./src/js/components/Thumbnail.js","\r\n/**\r\n * Actions and Action Creators\r\n **/\r\n\r\nexport function setPort(port){\r\n\treturn {\r\n\t\ttype: 'PUSHER_SET_PORT',\r\n\t\tport: port\r\n\t}\r\n}\r\n\r\nexport function setUsername(username, force = false){\r\n\treturn {\r\n\t\ttype: 'PUSHER_SET_USERNAME',\r\n\t\tusername: username.replace(/[\\W_]+/g,''),\r\n\t\tforce: force\r\n\t}\r\n}\r\n\r\nexport function connect(){\r\n\treturn {\r\n\t\ttype: 'PUSHER_CONNECT'\r\n\t}\r\n}\r\n\r\nexport function disconnect(){\r\n\treturn {\r\n\t\ttype: 'PUSHER_DISCONNECT'\r\n\t}\r\n}\r\n\r\nexport function upgrade(){\r\n\treturn {\r\n\t\ttype: 'PUSHER_UPGRADE'\r\n\t}\r\n}\r\n\r\nexport function reload(){\r\n\treturn {\r\n\t\ttype: 'PUSHER_RELOAD'\r\n\t}\r\n}\r\n\r\nexport function restart(){\r\n\treturn {\r\n\t\ttype: 'PUSHER_RESTART'\r\n\t}\r\n}\r\n\r\nexport function localScan(){\r\n\treturn {\r\n\t\ttype: 'PUSHER_LOCAL_SCAN'\r\n\t}\r\n}\r\n\r\nexport function getConnections(){\r\n\treturn {\r\n\t\ttype: 'PUSHER_GET_CONNECTIONS'\r\n\t}\r\n}\r\n\r\nexport function connectionAdded(connection){\r\n\treturn {\r\n\t\ttype: 'PUSHER_CONNECTION_ADDED',\r\n\t\tconnection: connection\r\n\t}\r\n}\r\n\r\nexport function connectionChanged(connection){\r\n\treturn {\r\n\t\ttype: 'PUSHER_CONNECTION_CHANGED',\r\n\t\tconnection: connection\r\n\t}\r\n}\r\n\r\nexport function connectionRemoved(connection){\r\n\treturn {\r\n\t\ttype: 'PUSHER_CONNECTION_REMOVED',\r\n\t\tconnection: connection\r\n\t}\r\n}\r\n\r\nexport function request(method, params = null, response_callback = null, error_callback = null){\r\n\treturn {\r\n\t\ttype: 'PUSHER_REQUEST',\r\n\t\tmethod: method,\r\n\t\tparams: params,\r\n\t\tresponse_callback: response_callback,\r\n\t\terror_callback: error_callback\r\n\t}\r\n}\r\n\r\nexport function getConfig(){\r\n\treturn {\r\n\t\ttype: 'PUSHER_GET_CONFIG'\r\n\t}\r\n}\r\n\r\nexport function getVersion(){\r\n\treturn {\r\n\t\ttype: 'PUSHER_GET_VERSION'\r\n\t}\r\n}\r\n\r\nexport function deliverBroadcast(method, params){\r\n\treturn {\r\n\t\ttype: 'PUSHER_DELIVER_BROADCAST',\r\n\t\tdata: {\r\n\t\t\tmethod: method,\r\n\t\t\tparams: params\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport function deliverMessage(recipient, method, params){\r\n\treturn {\r\n\t\ttype: 'PUSHER_DELIVER_MESSAGE',\r\n\t\tdata: {\r\n\t\t\trecipient: recipient,\r\n\t\t\tmethod: method,\r\n\t\t\tparams: params\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport function getRadio(){\r\n\treturn {\r\n\t\ttype: 'PUSHER_GET_RADIO'\r\n\t}\r\n}\r\n\r\nexport function startRadio(uris){\r\n\treturn {\r\n\t\ttype: 'PUSHER_START_RADIO',\r\n\t\turis: uris\r\n\t}\r\n}\r\n\r\nexport function updateRadio(uris){\r\n\treturn {\r\n\t\ttype: 'PUSHER_UPDATE_RADIO',\r\n\t\turis: uris\r\n\t}\r\n}\r\n\r\nexport function stopRadio(){\r\n\treturn {\r\n\t\ttype: 'PUSHER_STOP_RADIO'\r\n\t}\r\n}\r\n\r\nexport function radioStarted(radio){\r\n\treturn {\r\n\t\ttype: 'PUSHER_RADIO_STARTED',\r\n\t\tradio: radio\r\n\t}\r\n}\r\n\r\nexport function radioChanged(radio){\r\n\treturn {\r\n\t\ttype: 'PUSHER_RADIO_CHANGED',\r\n\t\tradio: radio\r\n\t}\r\n}\r\n\r\nexport function radioStopped(){\r\n\treturn {\r\n\t\ttype: 'PUSHER_RADIO_STOPPED'\r\n\t}\r\n}\r\n\r\nexport function debug(message = null){\r\n\treturn {\r\n\t\ttype: 'PUSHER_DEBUG',\r\n\t\tmessage: message\r\n\t}\r\n}\r\n\r\nexport function getQueueMetadata(){\r\n\treturn {\r\n\t\ttype: 'PUSHER_GET_QUEUE_METADATA'\r\n\t}\r\n}\r\n\r\nexport function queueMetadataChanged(queue_metadata){\r\n\treturn {\r\n\t\ttype: 'PUSHER_QUEUE_METADATA_CHANGED',\r\n\t\tqueue_metadata: queue_metadata\r\n\t}\r\n}\r\n\r\nexport function addQueueMetadata(tlids = [], from_uri = null){\r\n\treturn {\r\n\t\ttype: 'PUSHER_ADD_QUEUE_METADATA',\r\n\t\ttlids: tlids,\r\n\t\tfrom_uri: from_uri\r\n\t}\r\n}\r\n\r\n\r\n/**\r\n * Commands (buttons)\r\n **/\r\n\r\nexport function getCommands(){\r\n return {\r\n type: 'PUSHER_GET_COMMANDS'\r\n }\r\n}\r\n\r\nexport function setCommand(command){\r\n return {\r\n type: 'PUSHER_SET_COMMAND',\r\n command: command\r\n }\r\n}\r\n\r\nexport function removeCommand(id){\r\n return {\r\n type: 'PUSHER_REMOVE_COMMAND',\r\n id: id\r\n }\r\n}\r\n\r\nexport function sendCommand(id, notify = false){\r\n return {\r\n type: 'PUSHER_SEND_COMMAND',\r\n id: id,\r\n notify: notify\r\n }\r\n}\r\n\r\nexport function commandsUpdated(commands){\r\n return {\r\n type: 'PUSHER_COMMANDS_UPDATED',\r\n commands: commands\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/js/services/pusher/actions.js","\r\nimport React from 'react'\r\n\r\nimport Icon from './Icon';\r\nimport ContextMenuTrigger from './ContextMenuTrigger';\r\n\r\nexport default class Header extends React.Component{\r\n\r\n\tconstructor(props){\r\n\t\tsuper(props);\r\n\r\n\t\tthis.state = {\r\n\t\t\texpanded: false\r\n\t\t}\r\n\t}\r\n\r\n\thandleContextMenuTrigger(e,options){\r\n\r\n\t\t// We have an override trigger (eg Album, Playlist)\r\n\t\tif (this.props.handleContextMenuTrigger){\r\n\t\t\treturn this.props.handleContextMenuTrigger(e)\r\n\t\t} else {\r\n\t\t\te.preventDefault()\r\n\t\t\tvar data = {\r\n\t\t\t\te: e,\r\n\t\t\t\tcontext: 'custom',\r\n\t\t\t\ttitle: this.props.title,\r\n\t\t\t\toptions: options\r\n\t\t\t}\r\n\t\t\tthis.props.uiActions.showContextMenu(data)\r\n\t\t}\r\n\t}\r\n\r\n\trenderContextMenuTrigger(){\r\n\r\n\t\t// No custom trigger, nor any options\r\n\t\tif (!this.props.handleContextMenuTrigger && !this.props.options){\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\treturn this.handleContextMenuTrigger(e,this.props.options)} />\r\n\t}\r\n\r\n\trenderOptions(){\r\n\t\tif (!this.props.options && !this.props.handleContextMenuTrigger){\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\treturn (\r\n\t\t\t
\r\n\t\t\t\t{this.renderContextMenuTrigger()}\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t{this.props.options ? this.props.options : null}\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t
\r\n\t\t)\r\n\t}\r\n\r\n\trender(){\r\n\t\treturn (\r\n\t\t\t
\r\n\t\t\t\t

\r\n\t\t\t\t\t{this.props.children ? this.props.children : null}\r\n\t\t\t\t

\r\n\t\t\t\t{this.renderOptions()}\r\n\t\t\t
\r\n\t\t)\r\n\t}\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/js/components/Header.js","function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _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; }\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\n/**\n * React Google Analytics Module\n *\n * @package react-ga\n * @author Adam Lofting \n * Atul Varma \n */\n\n/**\n * Utilities\n */\nimport format from './utils/format';\nimport removeLeadingSlash from './utils/removeLeadingSlash';\nimport trim from './utils/trim';\nimport loadGA from './utils/loadGA';\nimport warn from './utils/console/warn';\nimport log from './utils/console/log';\nimport TestModeAPI from './utils/testModeAPI';\nimport UnboundOutboundLink from './components/OutboundLink';\nvar _debug = false;\nvar _titleCase = true;\nvar _testMode = false;\nvar _alwaysSendToDefaultTracker = true;\n\nvar internalGa = function internalGa() {\n var _window;\n\n if (_testMode) return TestModeAPI.ga.apply(TestModeAPI, arguments);\n if (typeof window === 'undefined') return false;\n if (!window.ga) return warn('ReactGA.initialize must be called first or GoogleAnalytics should be loaded manually');\n return (_window = window).ga.apply(_window, arguments);\n};\n\nfunction _format(s) {\n return format(s, _titleCase);\n}\n\nfunction _gaCommand(trackerNames) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var command = args[0];\n\n if (typeof internalGa === 'function') {\n if (typeof command !== 'string') {\n warn('ga command must be a string');\n return;\n }\n\n if (_alwaysSendToDefaultTracker || !Array.isArray(trackerNames)) internalGa.apply(void 0, args);\n\n if (Array.isArray(trackerNames)) {\n trackerNames.forEach(function (name) {\n internalGa.apply(void 0, _toConsumableArray([\"\".concat(name, \".\").concat(command)].concat(args.slice(1))));\n });\n }\n }\n}\n\nfunction _initialize(gaTrackingID, options) {\n if (!gaTrackingID) {\n warn('gaTrackingID is required in initialize()');\n return;\n }\n\n if (options) {\n if (options.debug && options.debug === true) {\n _debug = true;\n }\n\n if (options.titleCase === false) {\n _titleCase = false;\n }\n }\n\n if (options && options.gaOptions) {\n internalGa('create', gaTrackingID, options.gaOptions);\n } else {\n internalGa('create', gaTrackingID, 'auto');\n }\n}\n\nexport function initialize(configsOrTrackingId, options) {\n if (options && options.testMode === true) {\n _testMode = true;\n } else {\n if (typeof window === 'undefined') {\n return false;\n }\n\n loadGA(options);\n }\n\n _alwaysSendToDefaultTracker = options && typeof options.alwaysSendToDefaultTracker === 'boolean' ? options.alwaysSendToDefaultTracker : true;\n\n if (Array.isArray(configsOrTrackingId)) {\n configsOrTrackingId.forEach(function (config) {\n if (_typeof(config) !== 'object') {\n warn('All configs must be an object');\n return;\n }\n\n _initialize(config.trackingId, config);\n });\n } else {\n _initialize(configsOrTrackingId, options);\n }\n\n return true;\n}\n/**\n * ga:\n * Returns the original GA object.\n */\n\nexport function ga() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n if (args.length > 0) {\n internalGa.apply(void 0, args);\n\n if (_debug) {\n log('called ga(\\'arguments\\');');\n log(\"with arguments: \".concat(JSON.stringify(args)));\n }\n }\n\n return window.ga;\n}\n/**\n * set:\n * GA tracker set method\n * @param {Object} fieldsObject - a field/value pair or a group of field/value pairs on the tracker\n * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on\n */\n\nexport function set(fieldsObject, trackerNames) {\n if (!fieldsObject) {\n warn('`fieldsObject` is required in .set()');\n return;\n }\n\n if (_typeof(fieldsObject) !== 'object') {\n warn('Expected `fieldsObject` arg to be an Object');\n return;\n }\n\n if (Object.keys(fieldsObject).length === 0) {\n warn('empty `fieldsObject` given to .set()');\n }\n\n _gaCommand(trackerNames, 'set', fieldsObject);\n\n if (_debug) {\n log('called ga(\\'set\\', fieldsObject);');\n log(\"with fieldsObject: \".concat(JSON.stringify(fieldsObject)));\n }\n}\n/**\n * send:\n * Clone of the low level `ga.send` method\n * WARNING: No validations will be applied to this\n * @param {Object} fieldObject - field object for tracking different analytics\n * @param {Array} trackerNames - trackers to send the command to\n * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on\n */\n\nexport function send(fieldObject, trackerNames) {\n _gaCommand(trackerNames, 'send', fieldObject);\n\n if (_debug) {\n log('called ga(\\'send\\', fieldObject);');\n log(\"with fieldObject: \".concat(JSON.stringify(fieldObject)));\n log(\"with trackers: \".concat(JSON.stringify(trackerNames)));\n }\n}\n/**\n * pageview:\n * Basic GA pageview tracking\n * @param {String} path - the current page page e.g. '/about'\n * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on\n * @param {String} title - (optional) the page title e. g. 'My Website'\n */\n\nexport function pageview(rawPath, trackerNames, title) {\n if (!rawPath) {\n warn('path is required in .pageview()');\n return;\n }\n\n var path = trim(rawPath);\n\n if (path === '') {\n warn('path cannot be an empty string in .pageview()');\n return;\n }\n\n var extraFields = {};\n\n if (title) {\n extraFields.title = title;\n }\n\n if (typeof ga === 'function') {\n _gaCommand(trackerNames, 'send', _objectSpread({\n hitType: 'pageview',\n page: path\n }, extraFields));\n\n if (_debug) {\n log('called ga(\\'send\\', \\'pageview\\', path);');\n var extraLog = '';\n\n if (title) {\n extraLog = \" and title: \".concat(title);\n }\n\n log(\"with path: \".concat(path).concat(extraLog));\n }\n }\n}\n/**\n * modalview:\n * a proxy to basic GA pageview tracking to consistently track\n * modal views that are an equivalent UX to a traditional pageview\n * @param {String} modalName e.g. 'add-or-edit-club'\n * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on\n */\n\nexport function modalview(rawModalName, trackerNames) {\n if (!rawModalName) {\n warn('modalName is required in .modalview(modalName)');\n return;\n }\n\n var modalName = removeLeadingSlash(trim(rawModalName));\n\n if (modalName === '') {\n warn('modalName cannot be an empty string or a single / in .modalview()');\n return;\n }\n\n if (typeof ga === 'function') {\n var path = \"/modal/\".concat(modalName);\n\n _gaCommand(trackerNames, 'send', 'pageview', path);\n\n if (_debug) {\n log('called ga(\\'send\\', \\'pageview\\', path);');\n log(\"with path: \".concat(path));\n }\n }\n}\n/**\n * timing:\n * GA timing\n * @param args.category {String} required\n * @param args.variable {String} required\n * @param args.value {Int} required\n * @param args.label {String} required\n * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on\n */\n\nexport function timing() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n category = _ref.category,\n variable = _ref.variable,\n value = _ref.value,\n label = _ref.label;\n\n var trackerNames = arguments.length > 1 ? arguments[1] : undefined;\n\n if (typeof ga === 'function') {\n if (!category || !variable || !value || typeof value !== 'number') {\n warn('args.category, args.variable ' + 'AND args.value are required in timing() ' + 'AND args.value has to be a number');\n return;\n } // Required Fields\n\n\n var fieldObject = {\n hitType: 'timing',\n timingCategory: _format(category),\n timingVar: _format(variable),\n timingValue: value\n };\n\n if (label) {\n fieldObject.timingLabel = _format(label);\n }\n\n send(fieldObject, trackerNames);\n }\n}\n/**\n * event:\n * GA event tracking\n * @param args.category {String} required\n * @param args.action {String} required\n * @param args.label {String} optional\n * @param args.value {Int} optional\n * @param args.nonInteraction {boolean} optional\n * @param args.transport {string} optional\n * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on\n */\n\nexport function event() {\n var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n category = _ref2.category,\n action = _ref2.action,\n label = _ref2.label,\n value = _ref2.value,\n nonInteraction = _ref2.nonInteraction,\n transport = _ref2.transport,\n args = _objectWithoutProperties(_ref2, [\"category\", \"action\", \"label\", \"value\", \"nonInteraction\", \"transport\"]);\n\n var trackerNames = arguments.length > 1 ? arguments[1] : undefined;\n\n if (typeof ga === 'function') {\n // Simple Validation\n if (!category || !action) {\n warn('args.category AND args.action are required in event()');\n return;\n } // Required Fields\n\n\n var fieldObject = {\n hitType: 'event',\n eventCategory: _format(category),\n eventAction: _format(action)\n }; // Optional Fields\n\n if (label) {\n fieldObject.eventLabel = _format(label);\n }\n\n if (typeof value !== 'undefined') {\n if (typeof value !== 'number') {\n warn('Expected `args.value` arg to be a Number.');\n } else {\n fieldObject.eventValue = value;\n }\n }\n\n if (typeof nonInteraction !== 'undefined') {\n if (typeof nonInteraction !== 'boolean') {\n warn('`args.nonInteraction` must be a boolean.');\n } else {\n fieldObject.nonInteraction = nonInteraction;\n }\n }\n\n if (typeof transport !== 'undefined') {\n if (typeof transport !== 'string') {\n warn('`args.transport` must be a string.');\n } else {\n if (['beacon', 'xhr', 'image'].indexOf(transport) === -1) {\n warn('`args.transport` must be either one of these values: `beacon`, `xhr` or `image`');\n }\n\n fieldObject.transport = transport;\n }\n }\n\n Object.keys(args).filter(function (key) {\n return key.substr(0, 'dimension'.length) === 'dimension';\n }).forEach(function (key) {\n fieldObject[key] = args[key];\n });\n Object.keys(args).filter(function (key) {\n return key.substr(0, 'metric'.length) === 'metric';\n }).forEach(function (key) {\n fieldObject[key] = args[key];\n }); // Send to GA\n\n send(fieldObject, trackerNames);\n }\n}\n/**\n * exception:\n * GA exception tracking\n * @param args.description {String} optional\n * @param args.fatal {boolean} optional\n * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on\n */\n\nexport function exception(_ref3, trackerNames) {\n var description = _ref3.description,\n fatal = _ref3.fatal;\n\n if (typeof ga === 'function') {\n // Required Fields\n var fieldObject = {\n hitType: 'exception'\n }; // Optional Fields\n\n if (description) {\n fieldObject.exDescription = _format(description);\n }\n\n if (typeof fatal !== 'undefined') {\n if (typeof fatal !== 'boolean') {\n warn('`args.fatal` must be a boolean.');\n } else {\n fieldObject.exFatal = fatal;\n }\n } // Send to GA\n\n\n send(fieldObject, trackerNames);\n }\n}\nexport var plugin = {\n /**\n * require:\n * GA requires a plugin\n * @param name {String} e.g. 'ecommerce' or 'myplugin'\n * @param options {Object} optional e.g {path: '/log', debug: true}\n */\n require: function require(rawName, options) {\n if (typeof ga === 'function') {\n // Required Fields\n if (!rawName) {\n warn('`name` is required in .require()');\n return;\n }\n\n var name = trim(rawName);\n\n if (name === '') {\n warn('`name` cannot be an empty string in .require()');\n return;\n } // Optional Fields\n\n\n if (options) {\n if (_typeof(options) !== 'object') {\n warn('Expected `options` arg to be an Object');\n return;\n }\n\n if (Object.keys(options).length === 0) {\n warn('Empty `options` given to .require()');\n }\n\n ga('require', name, options);\n\n if (_debug) {\n log(\"called ga('require', '\".concat(name, \"', \").concat(JSON.stringify(options)));\n }\n } else {\n ga('require', name);\n\n if (_debug) {\n log(\"called ga('require', '\".concat(name, \"');\"));\n }\n }\n }\n },\n\n /**\n * execute:\n * GA execute action for plugin\n * Takes variable number of arguments\n * @param pluginName {String} e.g. 'ecommerce' or 'myplugin'\n * @param action {String} e.g. 'addItem' or 'myCustomAction'\n * @param actionType {String} optional e.g. 'detail'\n * @param payload {Object} optional e.g { id: '1x5e', name : 'My product to track' }\n */\n execute: function execute(pluginName, action) {\n var payload;\n var actionType;\n\n if ((arguments.length <= 2 ? 0 : arguments.length - 2) === 1) {\n payload = arguments.length <= 2 ? undefined : arguments[2];\n } else {\n actionType = arguments.length <= 2 ? undefined : arguments[2];\n payload = arguments.length <= 3 ? undefined : arguments[3];\n }\n\n if (typeof ga === 'function') {\n if (typeof pluginName !== 'string') {\n warn('Expected `pluginName` arg to be a String.');\n } else if (typeof action !== 'string') {\n warn('Expected `action` arg to be a String.');\n } else {\n var command = \"\".concat(pluginName, \":\").concat(action);\n payload = payload || null;\n\n if (actionType && payload) {\n ga(command, actionType, payload);\n\n if (_debug) {\n log(\"called ga('\".concat(command, \"');\"));\n log(\"actionType: \\\"\".concat(actionType, \"\\\" with payload: \").concat(JSON.stringify(payload)));\n }\n } else if (payload) {\n ga(command, payload);\n\n if (_debug) {\n log(\"called ga('\".concat(command, \"');\"));\n log(\"with payload: \".concat(JSON.stringify(payload)));\n }\n } else {\n ga(command);\n\n if (_debug) {\n log(\"called ga('\".concat(command, \"');\"));\n }\n }\n }\n }\n }\n};\n/**\n * outboundLink:\n * GA outboundLink tracking\n * @param args.label {String} e.g. url, or 'Create an Account'\n * @param {function} hitCallback - Called after processing a hit.\n */\n\nexport function outboundLink(args, hitCallback, trackerNames) {\n if (typeof hitCallback !== 'function') {\n warn('hitCallback function is required');\n return;\n }\n\n if (typeof ga === 'function') {\n // Simple Validation\n if (!args || !args.label) {\n warn('args.label is required in outboundLink()');\n return;\n } // Required Fields\n\n\n var fieldObject = {\n hitType: 'event',\n eventCategory: 'Outbound',\n eventAction: 'Click',\n eventLabel: _format(args.label)\n };\n var safetyCallbackCalled = false;\n\n var safetyCallback = function safetyCallback() {\n // This prevents a delayed response from GA\n // causing hitCallback from being fired twice\n safetyCallbackCalled = true;\n hitCallback();\n }; // Using a timeout to ensure the execution of critical application code\n // in the case when the GA server might be down\n // or an ad blocker prevents sending the data\n // register safety net timeout:\n\n\n var t = setTimeout(safetyCallback, 250);\n\n var clearableCallbackForGA = function clearableCallbackForGA() {\n clearTimeout(t);\n\n if (!safetyCallbackCalled) {\n hitCallback();\n }\n };\n\n fieldObject.hitCallback = clearableCallbackForGA; // Send to GA\n\n send(fieldObject, trackerNames);\n } else {\n // if ga is not defined, return the callback so the application\n // continues to work as expected\n setTimeout(hitCallback, 0);\n }\n}\nUnboundOutboundLink.origTrackLink = UnboundOutboundLink.trackLink;\nUnboundOutboundLink.trackLink = outboundLink;\nexport var OutboundLink = UnboundOutboundLink;\nexport var testModeAPI = TestModeAPI;\nexport default {\n initialize: initialize,\n ga: ga,\n set: set,\n send: send,\n pageview: pageview,\n modalview: modalview,\n timing: timing,\n event: event,\n exception: exception,\n plugin: plugin,\n outboundLink: outboundLink,\n OutboundLink: OutboundLink,\n testModeAPI: TestModeAPI\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-ga/dist/esm/index.js\n// module id = 14\n// module chunks = 0","module.exports = function() {\r\n\tthrow new Error(\"define cannot be used indirect\");\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/amd-define.js\n// module id = 15\n// module chunks = 0","\r\nvar coreActions = require('../core/actions');\r\nvar uiActions = require('../ui/actions');\r\nvar helpers = require('../../helpers');\r\n\r\n\r\nexport function set(data){\r\n return {\r\n type: 'LASTFM_SET',\r\n data: data\r\n }\r\n}\r\n\r\n/**\r\n * Send an ajax request to the LastFM API\r\n *\r\n * @param dispatch = obj\r\n * @param getState = obj\r\n * @param params = string, the url params to send\r\n * @params signed = boolean, whether we've got a signed request with baked-in api_key\r\n **/\r\nvar sendRequest = (dispatch, getState, params, signed = false) => {\r\n return new Promise((resolve, reject) => {\r\n\r\n var loader_key = helpers.generateGuid();\r\n var method = params.substring(params.indexOf(\"method=\")+7, params.length);\r\n method = method.substring(0, method.indexOf(\"&\"));\r\n\r\n dispatch(uiActions.startLoading(loader_key, 'lastfm_'+method));\r\n\r\n var config = {\r\n method: 'GET',\r\n cache: true,\r\n timeout: 30000,\r\n url: 'https://ws.audioscrobbler.com/2.0/?format=json&'+params\r\n }\r\n\r\n // Signed requests don't need our api_key as the proxy has it's own\r\n if (!signed){\r\n config.url += '&api_key=4320a3ef51c9b3d69de552ac083c55e3';\r\n } else {\r\n config.method = 'POST';\r\n }\r\n\r\n $.ajax(config).then(\r\n response => {\r\n dispatch(uiActions.stopLoading(loader_key));\r\n if (response.error){\r\n reject({\r\n config: config,\r\n error: response\r\n });\r\n } else {\r\n resolve(response);\r\n }\r\n },\r\n (xhr, status, error) => {\r\n dispatch(uiActions.stopLoading(loader_key));\r\n\r\n // Snatch a more meaningful error\r\n var description = null;\r\n if (xhr && xhr.responseJSON && xhr.responseJSON.message){\r\n description = xhr.responseJSON.message;\r\n }\r\n\r\n reject({\r\n config: config,\r\n error: error,\r\n description: description,\r\n status: status,\r\n xhr: xhr\r\n });\r\n }\r\n )\r\n })\r\n}\r\n\r\n/**\r\n * Send a SIGNED ajax request to the LastFM API\r\n *\r\n * @param dispatch = obj\r\n * @param getState = obj\r\n * @param params = string, the url params to send\r\n * @param signed = boolean\r\n **/\r\nconst sendSignedRequest = (dispatch, getState, params) => {\r\n return new Promise((resolve, reject) => {\r\n\r\n // Not authorized\r\n if (!getState().lastfm.authorization){\r\n reject({\r\n params: params,\r\n error: \"No active LastFM authorization (session)\"\r\n });\r\n }\r\n\r\n var loader_key = helpers.generateGuid();\r\n var method = params.substring(params.indexOf(\"method=\")+7, params.length);\r\n method = method.substring(0, method.indexOf(\"&\"));\r\n\r\n dispatch(uiActions.startLoading(loader_key, 'lastfm_'+method));\r\n\r\n params += \"&sk=\"+getState().lastfm.authorization.key;\r\n\r\n var config = {\r\n method: 'GET',\r\n cache: false,\r\n timeout: 30000,\r\n url: getState().lastfm.authorization_url+\"?action=sign_request&\"+params\r\n }\r\n\r\n // Get our server proxy to sign our request\r\n $.ajax(config).then(\r\n response => {\r\n dispatch(uiActions.stopLoading(loader_key));\r\n\r\n // Now we have signed params, we can make the actual request\r\n sendRequest(dispatch, getState, response.params, true)\r\n .then(\r\n response => {\r\n resolve(response);\r\n },\r\n error => {\r\n reject(error);\r\n }\r\n );\r\n },\r\n (xhr, status, error) => {\r\n dispatch(uiActions.stopLoading(loader_key));\r\n reject(error)\r\n }\r\n );\r\n })\r\n}\r\n\r\n\r\n/**\r\n * Handle authorization process\r\n **/\r\n\r\nexport function authorizationGranted(data){\r\n data.session.expiry = new Date().getTime() + 3600;\r\n return {\r\n type: 'LASTFM_AUTHORIZATION_GRANTED',\r\n data: data\r\n }\r\n}\r\n\r\nexport function revokeAuthorization(){\r\n return {\r\n \ttype: 'LASTFM_AUTHORIZATION_REVOKED'\r\n }\r\n}\r\n\r\nexport function importAuthorization(authorization){\r\n return {\r\n type: 'LASTFM_IMPORT_AUTHORIZATION',\r\n authorization: authorization\r\n }\r\n}\r\n\r\n\r\n\r\n/**\r\n * Non-signed requests\r\n **/\r\n\r\nexport function getMe(){\r\n return (dispatch, getState) => {\r\n var params = 'method=user.getInfo&user='+getState().lastfm.authorization.name\r\n sendRequest(dispatch, getState, params)\r\n .then(\r\n response => {\r\n if (response.user){\r\n dispatch({\r\n type: 'LASTFM_ME_LOADED',\r\n me: response.user\r\n });\r\n }\r\n }\r\n )\r\n }\r\n}\r\n\r\nexport function getTrack(uri){\r\n return (dispatch, getState) => {\r\n if (getState().core.tracks[uri] !== undefined){\r\n var track = getState().core.tracks[uri];\r\n if (!track.artists){\r\n dispatch(coreActions.handleException(\r\n \"Could not get LastFM track\",\r\n {},\r\n \"Track has no artists\"\r\n ));\r\n return;\r\n }\r\n } else {\r\n dispatch(coreActions.handleException(\r\n \"Could not get LastFM track\",\r\n {},\r\n \"Could not find track in index\"\r\n ));\r\n return;\r\n }\r\n\r\n var track_name = track.name;\r\n var artist_name = encodeURIComponent(track.artists[0].name);\r\n var params = 'method=track.getInfo&track='+track_name+'&artist='+artist_name;\r\n if (getState().lastfm.authorization){\r\n params += '&username='+getState().lastfm.authorization.name;\r\n }\r\n sendRequest(dispatch, getState, params)\r\n .then(\r\n response => {\r\n if (response.track){\r\n var merged_track = Object.assign(\r\n {},\r\n {\r\n uri: track.uri\r\n },\r\n response.track,\r\n track\r\n );\r\n dispatch(coreActions.trackLoaded(merged_track));\r\n }\r\n }\r\n )\r\n }\r\n}\r\n\r\nexport function getArtist(uri, artist, mbid = false){\r\n\r\n return (dispatch, getState) => {\r\n if (mbid){\r\n var params = 'method=artist.getInfo&mbid='+mbid\r\n } else {\r\n artist = artist.replace(\"&\",\"and\");\r\n artist = encodeURIComponent(artist);\r\n var params = 'method=artist.getInfo&artist='+artist\r\n }\r\n sendRequest(dispatch, getState, params)\r\n .then(\r\n response => {\r\n if (response.artist){\r\n \tvar artist = {\r\n uri: uri,\r\n images: response.artist.image,\r\n mbid: response.artist.mbid,\r\n biography: response.artist.bio.content,\r\n biography_publish_date: response.artist.bio.published,\r\n biography_link: response.artist.bio.links.link.href,\r\n listeners: parseInt(response.artist.stats.listeners)\r\n };\r\n\r\n dispatch(coreActions.artistLoaded(artist));\r\n }\r\n }\r\n )\r\n }\r\n}\r\n\r\nexport function getAlbum(uri, artist, album, mbid = false){\r\n return (dispatch, getState) => {\r\n if (mbid){\r\n var params = 'method=album.getInfo&mbid='+mbid;\r\n } else {\r\n artist = encodeURIComponent(artist);\r\n album = encodeURIComponent(album);\r\n var params = 'method=album.getInfo&album='+album+'&artist='+artist;\r\n }\r\n sendRequest(dispatch, getState, params)\r\n .then(\r\n response => {\r\n if (response.album){\r\n\r\n var existing_album = getState().core.albums[uri];\r\n\r\n \tvar album = {\r\n uri: uri,\r\n images: response.album.image,\r\n listeners: parseInt(response.album.listeners),\r\n play_count: parseInt(response.album.playcount),\r\n mbid: response.album.mbid,\r\n wiki: (response.album.wiki ? response.album.wiki.content : null),\r\n wiki_publish_date: (response.album.wiki ? response.album.wiki.published : null),\r\n };\r\n\r\n // If we've already got some of this album and it has images aready, don't use our ones. \r\n // In *most* cases this existing image will be perfectly suffice. This prevents an ugly \r\n // flicker when the existing image is replaced by the LastFM one\r\n if (existing_album && existing_album.images){\r\n delete album.images;\r\n }\r\n\r\n dispatch(coreActions.albumLoaded(album));\r\n }\r\n }\r\n );\r\n }\r\n}\r\n\r\n\r\nexport function getImages(context, uri){\r\n return (dispatch, getState) => {\r\n\r\n var record = getState().core[context][uri];\r\n if (record){\r\n switch (context){\r\n\r\n case \"tracks\":\r\n\r\n if (record.mbid){\r\n var params = 'method=album.getInfo&mbid='+record.mbid;\r\n } else if (record.artists && record.artists.length > 0 && record.album){\r\n var artist = encodeURIComponent(record.artists[0].name);\r\n var album = encodeURIComponent(record.album.name);\r\n var params = 'method=album.getInfo&album='+album+'&artist='+artist;\r\n }\r\n\r\n if (params){\r\n sendRequest(dispatch, getState, params)\r\n .then(\r\n response => {\r\n if (response.album){\r\n record = Object.assign({}, record, {images: response.album.image});\r\n dispatch(coreActions.trackLoaded(record));\r\n dispatch(coreActions.albumLoaded(response.album));\r\n }\r\n }\r\n );\r\n }\r\n break;\r\n\r\n case \"albums\":\r\n\r\n if (record.mbid){\r\n var params = 'method=album.getInfo&mbid='+record.mbid;\r\n } else if (record.artists && record.artists.length > 0){\r\n var artist = encodeURIComponent(record.artists[0].name);\r\n var album = encodeURIComponent(record.name);\r\n var params = 'method=album.getInfo&album='+album+'&artist='+artist;\r\n }\r\n\r\n if (params){\r\n sendRequest(dispatch, getState, params)\r\n .then(\r\n response => {\r\n if (response.album){\r\n record = Object.assign({}, record, {images: response.album.image});\r\n dispatch(coreActions.albumLoaded(record));\r\n }\r\n }\r\n );\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * Signed requests\r\n **/\r\n\r\nexport function loveTrack(uri){\r\n return (dispatch, getState) => {\r\n if (getState().core.tracks[uri] !== undefined){\r\n var track = getState().core.tracks[uri];\r\n if (!track.artists){\r\n dispatch(coreActions.handleException(\r\n \"Could not love LastFM track\",\r\n track,\r\n \"Track has no artists\"\r\n ));\r\n return;\r\n }\r\n } else {\r\n dispatch(coreActions.handleException(\r\n \"Could not love LastFM track\",\r\n track,\r\n \"Could not find track in index\"\r\n ));\r\n return;\r\n }\r\n\r\n var artist = encodeURIComponent(track.artists[0].name);\r\n var params = 'method=track.love&track='+track.name+'&artist='+artist;\r\n sendSignedRequest(dispatch, getState, params)\r\n .then(\r\n response => {\r\n track = Object.assign(\r\n {},\r\n track,\r\n {\r\n userloved: true\r\n }\r\n );\r\n dispatch({\r\n type: 'TRACKS_LOADED',\r\n tracks: [track]\r\n });\r\n }\r\n );\r\n }\r\n}\r\n\r\nexport function unloveTrack(uri){\r\n return (dispatch, getState) => {\r\n if (getState().core.tracks[uri] !== undefined){\r\n var track = getState().core.tracks[uri];\r\n if (!track.artists){\r\n dispatch(coreActions.handleException(\r\n \"Could not unlove LastFM track\",\r\n track,\r\n \"Track has no artists\"\r\n ));\r\n return;\r\n }\r\n } else {\r\n dispatch(coreActions.handleException(\r\n \"Could not unlove LastFM track\",\r\n track,\r\n \"Could not find track in index\"\r\n ));\r\n return;\r\n }\r\n\r\n var artist = encodeURIComponent(track.artists[0].name);\r\n var params = 'method=track.unlove&track='+track.name+'&artist='+artist;\r\n sendSignedRequest(dispatch, getState, params)\r\n .then(\r\n response => {\r\n track = Object.assign(\r\n {},\r\n track,\r\n {\r\n userloved: false\r\n }\r\n );\r\n dispatch({\r\n type: 'TRACKS_LOADED',\r\n tracks: [track]\r\n });\r\n }\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * TODO: Currently scrobbling client-side would result in duplicated scrobbles\r\n * if the user was authorized across multiple connections. Ideally this would\r\n * be handled server-side. Mopidy-Scrobbler currently achieves this.\r\n **/\r\nexport function scrobble(track){\r\n return (dispatch, getState) => {\r\n var track_name = track.name;\r\n var artist_name = \"Unknown\";\r\n if (track.artists){\r\n artist_name = track.artists[0].name;\r\n }\r\n var artist_name = encodeURIComponent(artist_name);\r\n\r\n var params = 'method=track.scrobble';\r\n params += '&track='+track_name+'&artist='+artist_name;\r\n params += '×tamp='+Math.floor(Date.now() / 1000);\r\n\r\n sendSignedRequest(dispatch, getState, params)\r\n .then(\r\n response => {\r\n console.log(\"Scrobbled\", response);\r\n },\r\n error => {\r\n dispatch(coreActions.handleException(\r\n 'Could not scrobble LastFM track',\r\n error,\r\n (error.description ? error.description : null)\r\n ));\r\n }\r\n )\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/services/lastfm/actions.js","/*!\n * jQuery JavaScript Library v3.3.1\n * https://jquery.com/\n *\n * Includes Sizzle.js\n * https://sizzlejs.com/\n *\n * Copyright JS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2018-01-20T17:24Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket #14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar document = window.document;\n\nvar getProto = Object.getPrototypeOf;\n\nvar slice = arr.slice;\n\nvar concat = arr.concat;\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\nvar isFunction = function isFunction( obj ) {\n\n // Support: Chrome <=57, Firefox <=52\n // In some browsers, typeof returns \"function\" for HTML elements\n // (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\n // We don't want to classify *any* DOM node as a function.\n return typeof obj === \"function\" && typeof obj.nodeType !== \"number\";\n };\n\n\nvar isWindow = function isWindow( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t};\n\n\n\n\n\tvar preservedScriptAttributes = {\n\t\ttype: true,\n\t\tsrc: true,\n\t\tnoModule: true\n\t};\n\n\tfunction DOMEval( code, doc, node ) {\n\t\tdoc = doc || document;\n\n\t\tvar i,\n\t\t\tscript = doc.createElement( \"script\" );\n\n\t\tscript.text = code;\n\t\tif ( node ) {\n\t\t\tfor ( i in preservedScriptAttributes ) {\n\t\t\t\tif ( node[ i ] ) {\n\t\t\t\t\tscript[ i ] = node[ i ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\n\t}\n\n\nfunction toType( obj ) {\n\tif ( obj == null ) {\n\t\treturn obj + \"\";\n\t}\n\n\t// Support: Android <=2.3 only (functionish RegExp)\n\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\ttypeof obj;\n}\n/* global Symbol */\n// Defining this global in .eslintrc.json would create a danger of using the global\n// unguarded in another place, it seems safer to define global only for this module\n\n\n\nvar\n\tversion = \"3.3.1\",\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t},\n\n\t// Support: Android <=4.0 only\n\t// Make sure we trim BOM and NBSP\n\trtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g;\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\n\t\t// Return all the elements in a clean array\n\t\tif ( num == null ) {\n\t\t\treturn slice.call( this );\n\t\t}\n\n\t\t// Return just the one element from the set\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tsrc = target[ name ];\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = Array.isArray( copy ) ) ) ) {\n\n\t\t\t\t\tif ( copyIsArray ) {\n\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\tclone = src && Array.isArray( src ) ? src : [];\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src && jQuery.isPlainObject( src ) ? src : {};\n\t\t\t\t\t}\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\n\t\t/* eslint-disable no-unused-vars */\n\t\t// See https://github.com/eslint/eslint/issues/6125\n\t\tvar name;\n\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\t// Evaluates a script in a global context\n\tglobalEval: function( code ) {\n\t\tDOMEval( code );\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// Support: Android <=4.0 only\n\ttrim: function( text ) {\n\t\treturn text == null ?\n\t\t\t\"\" :\n\t\t\t( text + \"\" ).replace( rtrim, \"\" );\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t// push.apply(_, arraylike) throws on ancient WebKit\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn concat.apply( [], ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\nfunction( i, name ) {\n\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: real iOS 8.2 only (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = toType( obj );\n\n\tif ( isFunction( obj ) || isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.3.3\n * https://sizzlejs.com/\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2016-08-08\n */\n(function( window ) {\n\nvar i,\n\tsupport,\n\tExpr,\n\tgetText,\n\tisXML,\n\ttokenize,\n\tcompile,\n\tselect,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + 1 * new Date(),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// Instance methods\n\thasOwn = ({}).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpush_native = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\t// Use a stripped-down indexOf as it's faster than native\n\t// https://jsperf.com/thor-indexof-vs-for/5\n\tindexOf = function( list, elem ) {\n\t\tvar i = 0,\n\t\t\tlen = list.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( list[i] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\n\t// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n\tidentifier = \"(?:\\\\\\\\.|[\\\\w-]|[^\\0-\\\\xa0])+\",\n\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" + whitespace +\n\t\t\"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace + \"*\" ),\n\n\trattributeQuotes = new RegExp( \"=\" + whitespace + \"*([^\\\\]'\\\"]*?)\" + whitespace + \"*\\\\]\", \"g\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + identifier + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" + whitespace +\n\t\t\t\"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" + whitespace +\n\t\t\t\"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace + \"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" +\n\t\t\twhitespace + \"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\n\t// CSS escapes\n\t// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\([\\\\da-f]{1,6}\" + whitespace + \"?|(\" + whitespace + \")|.)\", \"ig\" ),\n\tfunescape = function( _, escaped, escapedWhitespace ) {\n\t\tvar high = \"0x\" + escaped - 0x10000;\n\t\t// NaN means non-codepoint\n\t\t// Support: Firefox<24\n\t\t// Workaround erroneous numeric interpretation of +\"0x\"\n\t\treturn high !== high || escapedWhitespace ?\n\t\t\tescaped :\n\t\t\thigh < 0 ?\n\t\t\t\t// BMP codepoint\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\t// Supplemental Plane codepoint (surrogate pair)\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// CSS string/identifier serialization\n\t// https://drafts.csswg.org/cssom/#common-serializing-idioms\n\trcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,\n\tfcssescape = function( ch, asCodePoint ) {\n\t\tif ( asCodePoint ) {\n\n\t\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\t\tif ( ch === \"\\0\" ) {\n\t\t\t\treturn \"\\uFFFD\";\n\t\t\t}\n\n\t\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\t\treturn ch.slice( 0, -1 ) + \"\\\\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t\t}\n\n\t\t// Other potentially-special ASCII characters get backslash-escaped\n\t\treturn \"\\\\\" + ch;\n\t},\n\n\t// Used for iframes\n\t// See setDocument()\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t},\n\n\tdisabledAncestor = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true && (\"form\" in elem || \"label\" in elem);\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\n\t);\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t(arr = slice.call( preferredDoc.childNodes )),\n\t\tpreferredDoc.childNodes\n\t);\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpush_native.apply( target, slice.call(els) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( (target[j++] = els[i++]) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar m, i, elem, nid, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\n\t\tif ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {\n\t\t\tsetDocument( context );\n\t\t}\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( (m = match[1]) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( (elem = context.getElementById( m )) ) {\n\n\t\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && (elem = newContext.getElementById( m )) &&\n\t\t\t\t\t\t\tcontains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[2] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( (m = match[3]) && support.getElementsByClassName &&\n\t\t\t\t\tcontext.getElementsByClassName ) {\n\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( support.qsa &&\n\t\t\t\t!compilerCache[ selector + \" \" ] &&\n\t\t\t\t(!rbuggyQSA || !rbuggyQSA.test( selector )) ) {\n\n\t\t\t\tif ( nodeType !== 1 ) {\n\t\t\t\t\tnewContext = context;\n\t\t\t\t\tnewSelector = selector;\n\n\t\t\t\t// qSA looks outside Element context, which is not what we want\n\t\t\t\t// Thanks to Andrew Dupont for this workaround technique\n\t\t\t\t// Support: IE <=8\n\t\t\t\t// Exclude object elements\n\t\t\t\t} else if ( context.nodeName.toLowerCase() !== \"object\" ) {\n\n\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\tif ( (nid = context.getAttribute( \"id\" )) ) {\n\t\t\t\t\t\tnid = nid.replace( rcssescape, fcssescape );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontext.setAttribute( \"id\", (nid = expando) );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[i] = \"#\" + nid + \" \" + toSelector( groups[i] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\t\t\t\t}\n\n\t\t\t\tif ( newSelector ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn (cache[ key + \" \" ] = value);\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\nfunction assert( fn ) {\n\tvar el = document.createElement(\"fieldset\");\n\n\ttry {\n\t\treturn !!fn( el );\n\t} catch (e) {\n\t\treturn false;\n\t} finally {\n\t\t// Remove from its parent by default\n\t\tif ( el.parentNode ) {\n\t\t\tel.parentNode.removeChild( el );\n\t\t}\n\t\t// release memory in IE\n\t\tel = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split(\"|\"),\n\t\ti = arr.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[i] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\ta.sourceIndex - b.sourceIndex;\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( (cur = cur.nextSibling) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn (name === \"input\" || name === \"button\") && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\nfunction createDisabledPseudo( disabled ) {\n\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Only certain elements can match :enabled or :disabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n\t\tif ( \"form\" in elem ) {\n\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\n\t\t\t// * listed form-associated elements in a disabled fieldset\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#category-listed\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n\t\t\t// * option elements in a disabled optgroup\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n\t\t\t// All such elements have a \"form\" property.\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\n\n\t\t\t\t// Option elements defer to a parent optgroup if present\n\t\t\t\tif ( \"label\" in elem ) {\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn elem.disabled === disabled;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Support: IE 6 - 11\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\t\t\t\treturn elem.isDisabled === disabled ||\n\n\t\t\t\t\t// Where there is no isDisabled, check manually\n\t\t\t\t\t/* jshint -W018 */\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\t\tdisabledAncestor( elem ) === disabled;\n\t\t\t}\n\n\t\t\treturn elem.disabled === disabled;\n\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n\t\t// even exist on them, let alone have a boolean value.\n\t\t} else if ( \"label\" in elem ) {\n\t\t\treturn elem.disabled === disabled;\n\t\t}\n\n\t\t// Remaining elements are neither :enabled nor :disabled\n\t\treturn false;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction(function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction(function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ (j = matchIndexes[i]) ] ) {\n\t\t\t\t\tseed[j] = !(matches[j] = seed[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\nisXML = Sizzle.isXML = function( elem ) {\n\t// documentElement is verified for cases where it doesn't yet exist\n\t// (such as loading iframes in IE - #4833)\n\tvar documentElement = elem && (elem.ownerDocument || elem).documentElement;\n\treturn documentElement ? documentElement.nodeName !== \"HTML\" : false;\n};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar hasCompare, subWindow,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\tif ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocElem = document.documentElement;\n\tdocumentIsHTML = !isXML( document );\n\n\t// Support: IE 9-11, Edge\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\n\tif ( preferredDoc !== document &&\n\t\t(subWindow = document.defaultView) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 11, Edge\n\t\tif ( subWindow.addEventListener ) {\n\t\t\tsubWindow.addEventListener( \"unload\", unloadHandler, false );\n\n\t\t// Support: IE 9 - 10 only\n\t\t} else if ( subWindow.attachEvent ) {\n\t\t\tsubWindow.attachEvent( \"onunload\", unloadHandler );\n\t\t}\n\t}\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties\n\t// (excepting IE8 booleans)\n\tsupport.attributes = assert(function( el ) {\n\t\tel.className = \"i\";\n\t\treturn !el.getAttribute(\"className\");\n\t});\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert(function( el ) {\n\t\tel.appendChild( document.createComment(\"\") );\n\t\treturn !el.getElementsByTagName(\"*\").length;\n\t});\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programmatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert(function( el ) {\n\t\tdocElem.appendChild( el ).id = expando;\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\n\t});\n\n\t// ID filter and find\n\tif ( support.getById ) {\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute(\"id\") === attrId;\n\t\t\t};\n\t\t};\n\t\tExpr.find[\"ID\"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar elem = context.getElementById( id );\n\t\t\t\treturn elem ? [ elem ] : [];\n\t\t\t}\n\t\t};\n\t} else {\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode(\"id\");\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\n\t\t// Support: IE 6 - 7 only\n\t\t// getElementById is not reliable as a find shortcut\n\t\tExpr.find[\"ID\"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar node, i, elems,\n\t\t\t\t\telem = context.getElementById( id );\n\n\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t// Verify the id attribute\n\t\t\t\t\tnode = elem.getAttributeNode(\"id\");\n\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fall back on getElementsByName\n\t\t\t\t\telems = context.getElementsByName( id );\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile ( (elem = elems[i++]) ) {\n\t\t\t\t\t\tnode = elem.getAttributeNode(\"id\");\n\t\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[\"TAG\"] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t\t// DocumentFragment nodes don't have gEBTN\n\t\t\t} else if ( support.qsa ) {\n\t\t\t\treturn context.querySelectorAll( tag );\n\t\t\t}\n\t\t} :\n\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( (elem = results[i++]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[\"CLASS\"] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See https://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( (support.qsa = rnative.test( document.querySelectorAll )) ) {\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert(function( el ) {\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// https://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( el ).innerHTML = \"\" +\n\t\t\t\t\"\";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\n\t\t\t// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( el.querySelectorAll(\"[msallowcapture^='']\").length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !el.querySelectorAll(\"[selected]\").length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n\t\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\t\trbuggyQSA.push(\"~=\");\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !el.querySelectorAll(\":checked\").length ) {\n\t\t\t\trbuggyQSA.push(\":checked\");\n\t\t\t}\n\n\t\t\t// Support: Safari 8+, iOS 8+\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t\t// In-page `selector#id sibling-combinator selector` fails\n\t\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\t\trbuggyQSA.push(\".#.+[+~]\");\n\t\t\t}\n\t\t});\n\n\t\tassert(function( el ) {\n\t\t\tel.innerHTML = \"\" +\n\t\t\t\t\"\";\n\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = document.createElement(\"input\");\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( el.querySelectorAll(\"[name=d]\").length ) {\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( el.querySelectorAll(\":enabled\").length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: IE9-11+\n\t\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t\tdocElem.appendChild( el ).disabled = true;\n\t\t\tif ( el.querySelectorAll(\":disabled\").length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tel.querySelectorAll(\"*,:x\");\n\t\t\trbuggyQSA.push(\",.*:\");\n\t\t});\n\t}\n\n\tif ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector) )) ) {\n\n\t\tassert(function( el ) {\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( el, \"*\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( el, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t});\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join(\"|\") );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join(\"|\") );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully self-exclusive\n\t// As in, an element does not contain itself\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\n\t\tfunction( a, b ) {\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t));\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( (b = b.parentNode) ) {\n\t\t\t\t\tif ( b === a ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = hasCompare ?\n\tfunction( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\tcompare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\tif ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tif ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\tif ( !aup || !bup ) {\n\t\t\treturn a === document ? -1 :\n\t\t\t\tb === document ? 1 :\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tap.unshift( cur );\n\t\t}\n\t\tcur = b;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tbp.unshift( cur );\n\t\t}\n\n\t\t// Walk down the tree looking for a discrepancy\n\t\twhile ( ap[i] === bp[i] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i ?\n\t\t\t// Do a sibling check if the nodes have a common ancestor\n\t\t\tsiblingCheck( ap[i], bp[i] ) :\n\n\t\t\t// Otherwise nodes in our document sort first\n\t\t\tap[i] === preferredDoc ? -1 :\n\t\t\tbp[i] === preferredDoc ? 1 :\n\t\t\t0;\n\t};\n\n\treturn document;\n};\n\nSizzle.matches = function( expr, elements ) {\n\treturn Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\t// Make sure that attribute selectors are quoted\n\texpr = expr.replace( rattributeQuotes, \"='$1']\" );\n\n\tif ( support.matchesSelector && documentIsHTML &&\n\t\t!compilerCache[ expr + \" \" ] &&\n\t\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\n\t\t( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch (e) {}\n\t}\n\n\treturn Sizzle( expr, document, null, [ elem ] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n\t// Set document vars if needed\n\tif ( ( context.ownerDocument || context ) !== document ) {\n\t\tsetDocument( context );\n\t}\n\treturn contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\t\t// Don't get fooled by Object.prototype properties (jQuery #13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\treturn val !== undefined ?\n\t\tval :\n\t\tsupport.attributes || !documentIsHTML ?\n\t\t\telem.getAttribute( name ) :\n\t\t\t(val = elem.getAttributeNode(name)) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\tnull;\n};\n\nSizzle.escape = function( sel ) {\n\treturn (sel + \"\").replace( rcssescape, fcssescape );\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\nSizzle.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\thasDuplicate = !support.detectDuplicates;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( (elem = results[i++]) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tresults.splice( duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = \"\",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\t\t// If no nodeType, this is expected to be an array\n\t\twhile ( (node = elem[i++]) ) {\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (jQuery #11153)\n\t\tif ( typeof elem.textContent === \"string\" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\t\"ATTR\": function( match ) {\n\t\t\tmatch[1] = match[1].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[3] = ( match[3] || match[4] || match[5] || \"\" ).replace( runescape, funescape );\n\n\t\t\tif ( match[2] === \"~=\" ) {\n\t\t\t\tmatch[3] = \" \" + match[3] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\t\"CHILD\": function( match ) {\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[1] = match[1].toLowerCase();\n\n\t\t\tif ( match[1].slice( 0, 3 ) === \"nth\" ) {\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[3] ) {\n\t\t\t\t\tSizzle.error( match[0] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === \"even\" || match[3] === \"odd\" ) );\n\t\t\t\tmatch[5] = +( ( match[7] + match[8] ) || match[3] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[3] ) {\n\t\t\t\tSizzle.error( match[0] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t\"PSEUDO\": function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[6] && match[2];\n\n\t\t\tif ( matchExpr[\"CHILD\"].test( match[0] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[3] ) {\n\t\t\t\tmatch[2] = match[4] || match[5] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t(excess = tokenize( unquoted, true )) &&\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t(excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[0] = match[0].slice( 0, excess );\n\t\t\t\tmatch[2] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\t\"TAG\": function( nodeNameSelector ) {\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() { return true; } :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t\t};\n\t\t},\n\n\t\t\"CLASS\": function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t(pattern = new RegExp( \"(^|\" + whitespace + \")\" + className + \"(\" + whitespace + \"|$)\" )) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test( typeof elem.className === \"string\" && elem.className || typeof elem.getAttribute !== \"undefined\" && elem.getAttribute(\"class\") || \"\" );\n\t\t\t\t});\n\t\t},\n\n\t\t\"ATTR\": function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = Sizzle.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\treturn operator === \"=\" ? result === check :\n\t\t\t\t\toperator === \"!=\" ? result !== check :\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" ).indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\n\t\t\t\t\tfalse;\n\t\t\t};\n\t\t},\n\n\t\t\"CHILD\": function( type, what, argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tvar cache, uniqueCache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( (node = node[ dir ]) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\n\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\tnode = parent;\n\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\t\"PSEUDO\": function( pseudo, argument ) {\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as Sizzle does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction(function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf( seed, matched[i] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[i] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\t\t// Potentially complex pseudos\n\t\t\"not\": markFunction(function( selector ) {\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction(function( seed, matches, context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = unmatched[i]) ) {\n\t\t\t\t\t\t\tseed[i] = !(matches[i] = elem);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}) :\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tinput[0] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\t\t\t\t\t// Don't keep the element (issue #299)\n\t\t\t\t\tinput[0] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t}),\n\n\t\t\"has\": markFunction(function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t}),\n\n\t\t\"contains\": markFunction(function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t}),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t\"lang\": markFunction( function( lang ) {\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test(lang || \"\") ) {\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( (elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute(\"xml:lang\") || elem.getAttribute(\"lang\")) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( (elem = elem.parentNode) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t}),\n\n\t\t// Miscellaneous\n\t\t\"target\": function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\t\"root\": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t\"focus\": function( elem ) {\n\t\t\treturn elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\n\t\t},\n\n\t\t// Boolean properties\n\t\t\"enabled\": createDisabledPseudo( false ),\n\t\t\"disabled\": createDisabledPseudo( true ),\n\n\t\t\"checked\": function( elem ) {\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn (nodeName === \"input\" && !!elem.checked) || (nodeName === \"option\" && !!elem.selected);\n\t\t},\n\n\t\t\"selected\": function( elem ) {\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\t\"empty\": function( elem ) {\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t// but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t\"parent\": function( elem ) {\n\t\t\treturn !Expr.pseudos[\"empty\"]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t\"header\": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t\"input\": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t\"button\": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\n\t\t},\n\n\t\t\"text\": function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\n\t\t\t\telem.type === \"text\" &&\n\n\t\t\t\t// Support: IE<8\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear with elem.type === \"text\"\n\t\t\t\t( (attr = elem.getAttribute(\"type\")) == null || attr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\t\"first\": createPositionalPseudo(function() {\n\t\t\treturn [ 0 ];\n\t\t}),\n\n\t\t\"last\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t}),\n\n\t\t\"eq\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t}),\n\n\t\t\"even\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"odd\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"lt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"gt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t})\n\t}\n};\n\nExpr.pseudos[\"nth\"] = Expr.pseudos[\"eq\"];\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\ntokenize = Sizzle.tokenize = function( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || (match = rcomma.exec( soFar )) ) {\n\t\t\tif ( match ) {\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[0].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( (tokens = []) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( (match = rcombinators.exec( soFar )) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push({\n\t\t\t\tvalue: matched,\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[0].replace( rtrim, \" \" )\n\t\t\t});\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\n\t\t\t\t(match = preFilters[ type ]( match ))) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push({\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t});\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\t\t\t// Cache the tokens\n\t\t\ttokenCache( selector, groups ).slice( 0 );\n};\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[i].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tskip = combinator.next,\n\t\tkey = skip || dir,\n\t\tcheckNonElements = base && key === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, uniqueCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || (elem[ expando ] = {});\n\n\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\tuniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});\n\n\t\t\t\t\t\tif ( skip && skip === elem.nodeName.toLowerCase() ) {\n\t\t\t\t\t\t\telem = elem[ dir ] || elem;\n\t\t\t\t\t\t} else if ( (oldCache = uniqueCache[ key ]) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn (newCache[ 2 ] = oldCache[ 2 ]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\tuniqueCache[ key ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[i]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[0];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tSizzle( selector, contexts[i], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (elem = unmatched[i]) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction(function( seed, results, context, xml ) {\n\t\tvar temp, i, elem,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed || multipleContexts( selector || \"*\", context.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems,\n\n\t\t\tmatcherOut = matcher ?\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( (elem = temp[i]) ) {\n\t\t\t\t\tmatcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = matcherOut[i]) ) {\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( (matcherIn[i] = elem) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, (matcherOut = []), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( (elem = matcherOut[i]) &&\n\t\t\t\t\t\t(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {\n\n\t\t\t\t\t\tseed[temp] = !(results[temp] = elem);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[0].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[\" \"],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\t\t\tvar ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\n\t\t\t\t(checkContext = context).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\t\t\t// Avoid hanging onto element (issue #299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (matcher = Expr.relative[ tokens[i].type ]) ) {\n\t\t\tmatchers = [ addCombinator(elementMatcher( matchers ), matcher) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[j].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\t\ttokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" })\n\t\t\t\t\t).replace( rtrim, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( (tokens = tokens.slice( j )) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find[\"TAG\"]( \"*\", outermost ),\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\t\t\t\toutermostContext = context === document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: IE<9, Safari\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: ) matching elements by id\n\t\t\tfor ( ; i !== len && (elem = elems[i]) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\tif ( !context && elem.ownerDocument !== document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( (matcher = elementMatchers[j++]) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml) ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( (elem = !matcher && elem) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( (matcher = setMatchers[j++]) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !(unmatched[i] || setMatched[i]) ) {\n\t\t\t\t\t\t\t\tsetMatched[i] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tSizzle.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\ncompile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[i] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n};\n\n/**\n * A low-level selection function that works with Sizzle's compiled\n * selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n * selector function built with Sizzle.compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nselect = Sizzle.select = function( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( (selector = compiled.selector || selector) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[0] = match[0].slice( 0 );\n\t\tif ( tokens.length > 2 && (token = tokens[0]).type === \"ID\" &&\n\t\t\t\tcontext.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) {\n\n\t\t\tcontext = ( Expr.find[\"ID\"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr[\"needsContext\"].test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[i];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ (type = token.type) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( (find = Expr.find[ type ]) ) {\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( (seed = find(\n\t\t\t\t\ttoken.matches[0].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context\n\t\t\t\t)) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n};\n\n// One-time assignments\n\n// Sort stability\nsupport.sortStable = expando.split(\"\").sort( sortOrder ).join(\"\") === expando;\n\n// Support: Chrome 14-35+\n// Always assume duplicates if they aren't passed to the comparison function\nsupport.detectDuplicates = !!hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert(function( el ) {\n\t// Should return 1, but returns 4 (following)\n\treturn el.compareDocumentPosition( document.createElement(\"fieldset\") ) & 1;\n});\n\n// Support: IE<8\n// Prevent attribute/property \"interpolation\"\n// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert(function( el ) {\n\tel.innerHTML = \"\";\n\treturn el.firstChild.getAttribute(\"href\") === \"#\" ;\n}) ) {\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\n\t\tif ( !isXML ) {\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute(\"value\")\nif ( !support.attributes || !assert(function( el ) {\n\tel.innerHTML = \"\";\n\tel.firstChild.setAttribute( \"value\", \"\" );\n\treturn el.firstChild.getAttribute( \"value\" ) === \"\";\n}) ) {\n\taddHandle( \"value\", function( elem, name, isXML ) {\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\n\t\t\treturn elem.defaultValue;\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert(function( el ) {\n\treturn el.getAttribute(\"disabled\") == null;\n}) ) {\n\taddHandle( booleans, function( elem, name, isXML ) {\n\t\tvar val;\n\t\tif ( !isXML ) {\n\t\t\treturn elem[ name ] === true ? name.toLowerCase() :\n\t\t\t\t\t(val = elem.getAttributeNode( name )) && val.specified ?\n\t\t\t\t\tval.value :\n\t\t\t\tnull;\n\t\t}\n\t});\n}\n\nreturn Sizzle;\n\n})( window );\n\n\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\n\n// Deprecated\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\njQuery.escapeSelector = Sizzle.escape;\n\n\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\n\n\nfunction nodeName( elem, name ) {\n\n return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\n};\nvar rsingleTag = ( /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i );\n\n\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\t}\n\n\t// Single element\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\t}\n\n\t// Arraylike of elements (jQuery, arguments, Array)\n\tif ( typeof qualifier !== \"string\" ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t\t} );\n\t}\n\n\t// Filtered directly for both simple and complex selectors\n\treturn jQuery.filter( qualifier, elements, not );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\tif ( elems.length === 1 && elem.nodeType === 1 ) {\n\t\treturn jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];\n\t}\n\n\treturn jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\treturn elem.nodeType === 1;\n\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i, ret,\n\t\t\tlen = this.length,\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tret = this.pushStack( [] );\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\treturn len > 1 ? jQuery.uniqueSort( ret ) : ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over to avoid XSS via location.hash (#9521)\n\t// Strict HTML recognition (#11290: must start with <)\n\t// Shortcut simple #id case for speed\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Method init() accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector[ 0 ] === \"<\" &&\n\t\t\t\tselector[ selector.length - 1 ] === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( isFunction( selector ) ) {\n\t\t\treturn root.ready !== undefined ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\ttargets = typeof selectors !== \"string\" && jQuery( selectors );\n\n\t\t// Positional selectors never match, since there's no _selection_ context\n\t\tif ( !rneedsContext.test( selectors ) ) {\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t\t// Always skip document fragments\n\t\t\t\t\tif ( cur.nodeType < 11 && ( targets ?\n\t\t\t\t\t\ttargets.index( cur ) > -1 :\n\n\t\t\t\t\t\t// Don't pass non-elements to Sizzle\n\t\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n if ( nodeName( elem, \"iframe\" ) ) {\n return elem.contentDocument;\n }\n\n // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only\n // Treat the template element as a regular one in browsers that\n // don't support it.\n if ( nodeName( elem, \"template\" ) ) {\n elem = elem.content || elem;\n }\n\n return jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.uniqueSort( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n} );\nvar rnothtmlwhite = ( /[^\\x20\\t\\r\\n\\f]+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = locked || options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && toType( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tif ( !memory && !firing ) {\n\t\t\t\t\tlist = memory = \"\";\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\nfunction Identity( v ) {\n\treturn v;\n}\nfunction Thrower( ex ) {\n\tthrow ex;\n}\n\nfunction adoptValue( value, resolve, reject, noValue ) {\n\tvar method;\n\n\ttry {\n\n\t\t// Check for promise aspect first to privilege synchronous behavior\n\t\tif ( value && isFunction( ( method = value.promise ) ) ) {\n\t\t\tmethod.call( value ).done( resolve ).fail( reject );\n\n\t\t// Other thenables\n\t\t} else if ( value && isFunction( ( method = value.then ) ) ) {\n\t\t\tmethod.call( value, resolve, reject );\n\n\t\t// Other non-thenables\n\t\t} else {\n\n\t\t\t// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:\n\t\t\t// * false: [ value ].slice( 0 ) => resolve( value )\n\t\t\t// * true: [ value ].slice( 1 ) => resolve()\n\t\t\tresolve.apply( undefined, [ value ].slice( noValue ) );\n\t\t}\n\n\t// For Promises/A+, convert exceptions into rejections\n\t// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\n\t// Deferred#then to conditionally suppress rejection.\n\t} catch ( value ) {\n\n\t\t// Support: Android 4.0 only\n\t\t// Strict mode functions invoked without .call/.apply get global-object context\n\t\treject.apply( undefined, [ value ] );\n\t}\n}\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, callbacks,\n\t\t\t\t// ... .then handlers, argument index, [final state]\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"memory\" ), 2 ],\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 0, \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 1, \"rejected\" ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\t\"catch\": function( fn ) {\n\t\t\t\t\treturn promise.then( null, fn );\n\t\t\t\t},\n\n\t\t\t\t// Keep pipe for back-compat\n\t\t\t\tpipe: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( i, tuple ) {\n\n\t\t\t\t\t\t\t// Map tuples (progress, done, fail) to arguments (done, fail, progress)\n\t\t\t\t\t\t\tvar fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];\n\n\t\t\t\t\t\t\t// deferred.progress(function() { bind to newDefer or newDefer.notify })\n\t\t\t\t\t\t\t// deferred.done(function() { bind to newDefer or newDefer.resolve })\n\t\t\t\t\t\t\t// deferred.fail(function() { bind to newDefer or newDefer.reject })\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\t\t\t\tthen: function( onFulfilled, onRejected, onProgress ) {\n\t\t\t\t\tvar maxDepth = 0;\n\t\t\t\t\tfunction resolve( depth, deferred, handler, special ) {\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\tvar that = this,\n\t\t\t\t\t\t\t\targs = arguments,\n\t\t\t\t\t\t\t\tmightThrow = function() {\n\t\t\t\t\t\t\t\t\tvar returned, then;\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.3\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-59\n\t\t\t\t\t\t\t\t\t// Ignore double-resolution attempts\n\t\t\t\t\t\t\t\t\tif ( depth < maxDepth ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturned = handler.apply( that, args );\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.1\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-48\n\t\t\t\t\t\t\t\t\tif ( returned === deferred.promise() ) {\n\t\t\t\t\t\t\t\t\t\tthrow new TypeError( \"Thenable self-resolution\" );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ sections 2.3.3.1, 3.5\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-54\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-75\n\t\t\t\t\t\t\t\t\t// Retrieve `then` only once\n\t\t\t\t\t\t\t\t\tthen = returned &&\n\n\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.4\n\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-64\n\t\t\t\t\t\t\t\t\t\t// Only check objects and functions for thenability\n\t\t\t\t\t\t\t\t\t\t( typeof returned === \"object\" ||\n\t\t\t\t\t\t\t\t\t\t\ttypeof returned === \"function\" ) &&\n\t\t\t\t\t\t\t\t\t\treturned.then;\n\n\t\t\t\t\t\t\t\t\t// Handle a returned thenable\n\t\t\t\t\t\t\t\t\tif ( isFunction( then ) ) {\n\n\t\t\t\t\t\t\t\t\t\t// Special processors (notify) just wait for resolution\n\t\t\t\t\t\t\t\t\t\tif ( special ) {\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special )\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t// Normal processors (resolve) also hook into progress\n\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t// ...and disregard older resolution values\n\t\t\t\t\t\t\t\t\t\t\tmaxDepth++;\n\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeferred.notifyWith )\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Handle all other returned values\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\tif ( handler !== Identity ) {\n\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\targs = [ returned ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Process the value(s)\n\t\t\t\t\t\t\t\t\t\t// Default process is resolve\n\t\t\t\t\t\t\t\t\t\t( special || deferred.resolveWith )( that, args );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t// Only normal processors (resolve) catch and reject exceptions\n\t\t\t\t\t\t\t\tprocess = special ?\n\t\t\t\t\t\t\t\t\tmightThrow :\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tmightThrow();\n\t\t\t\t\t\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t\t\t\t\t\tif ( jQuery.Deferred.exceptionHook ) {\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery.Deferred.exceptionHook( e,\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocess.stackTrace );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.4.1\n\t\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-61\n\t\t\t\t\t\t\t\t\t\t\t// Ignore post-resolution exceptions\n\t\t\t\t\t\t\t\t\t\t\tif ( depth + 1 >= maxDepth ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\t\t\tif ( handler !== Thrower ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\t\t\targs = [ e ];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tdeferred.rejectWith( that, args );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.1\n\t\t\t\t\t\t\t// https://promisesaplus.com/#point-57\n\t\t\t\t\t\t\t// Re-resolve promises immediately to dodge false rejection from\n\t\t\t\t\t\t\t// subsequent errors\n\t\t\t\t\t\t\tif ( depth ) {\n\t\t\t\t\t\t\t\tprocess();\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// Call an optional hook to record the stack, in case of exception\n\t\t\t\t\t\t\t\t// since it's otherwise lost when execution goes async\n\t\t\t\t\t\t\t\tif ( jQuery.Deferred.getStackHook ) {\n\t\t\t\t\t\t\t\t\tprocess.stackTrace = jQuery.Deferred.getStackHook();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twindow.setTimeout( process );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\n\t\t\t\t\t\t// progress_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 0 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onProgress ) ?\n\t\t\t\t\t\t\t\t\tonProgress :\n\t\t\t\t\t\t\t\t\tIdentity,\n\t\t\t\t\t\t\t\tnewDefer.notifyWith\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// fulfilled_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 1 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onFulfilled ) ?\n\t\t\t\t\t\t\t\t\tonFulfilled :\n\t\t\t\t\t\t\t\t\tIdentity\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// rejected_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 2 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onRejected ) ?\n\t\t\t\t\t\t\t\t\tonRejected :\n\t\t\t\t\t\t\t\t\tThrower\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 5 ];\n\n\t\t\t// promise.progress = list.add\n\t\t\t// promise.done = list.add\n\t\t\t// promise.fail = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add(\n\t\t\t\t\tfunction() {\n\n\t\t\t\t\t\t// state = \"resolved\" (i.e., fulfilled)\n\t\t\t\t\t\t// state = \"rejected\"\n\t\t\t\t\t\tstate = stateString;\n\t\t\t\t\t},\n\n\t\t\t\t\t// rejected_callbacks.disable\n\t\t\t\t\t// fulfilled_callbacks.disable\n\t\t\t\t\ttuples[ 3 - i ][ 2 ].disable,\n\n\t\t\t\t\t// rejected_handlers.disable\n\t\t\t\t\t// fulfilled_handlers.disable\n\t\t\t\t\ttuples[ 3 - i ][ 3 ].disable,\n\n\t\t\t\t\t// progress_callbacks.lock\n\t\t\t\t\ttuples[ 0 ][ 2 ].lock,\n\n\t\t\t\t\t// progress_handlers.lock\n\t\t\t\t\ttuples[ 0 ][ 3 ].lock\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// progress_handlers.fire\n\t\t\t// fulfilled_handlers.fire\n\t\t\t// rejected_handlers.fire\n\t\t\tlist.add( tuple[ 3 ].fire );\n\n\t\t\t// deferred.notify = function() { deferred.notifyWith(...) }\n\t\t\t// deferred.resolve = function() { deferred.resolveWith(...) }\n\t\t\t// deferred.reject = function() { deferred.rejectWith(...) }\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? undefined : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\t// deferred.notifyWith = list.fireWith\n\t\t\t// deferred.resolveWith = list.fireWith\n\t\t\t// deferred.rejectWith = list.fireWith\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( singleValue ) {\n\t\tvar\n\n\t\t\t// count of uncompleted subordinates\n\t\t\tremaining = arguments.length,\n\n\t\t\t// count of unprocessed arguments\n\t\t\ti = remaining,\n\n\t\t\t// subordinate fulfillment data\n\t\t\tresolveContexts = Array( i ),\n\t\t\tresolveValues = slice.call( arguments ),\n\n\t\t\t// the master Deferred\n\t\t\tmaster = jQuery.Deferred(),\n\n\t\t\t// subordinate callback factory\n\t\t\tupdateFunc = function( i ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tresolveContexts[ i ] = this;\n\t\t\t\t\tresolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( !( --remaining ) ) {\n\t\t\t\t\t\tmaster.resolveWith( resolveContexts, resolveValues );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\n\t\t// Single- and empty arguments are adopted like Promise.resolve\n\t\tif ( remaining <= 1 ) {\n\t\t\tadoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject,\n\t\t\t\t!remaining );\n\n\t\t\t// Use .then() to unwrap secondary thenables (cf. gh-3000)\n\t\t\tif ( master.state() === \"pending\" ||\n\t\t\t\tisFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {\n\n\t\t\t\treturn master.then();\n\t\t\t}\n\t\t}\n\n\t\t// Multiple arguments are aggregated like Promise.all array elements\n\t\twhile ( i-- ) {\n\t\t\tadoptValue( resolveValues[ i ], updateFunc( i ), master.reject );\n\t\t}\n\n\t\treturn master.promise();\n\t}\n} );\n\n\n// These usually indicate a programmer mistake during development,\n// warn about them ASAP rather than swallowing them by default.\nvar rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\n\njQuery.Deferred.exceptionHook = function( error, stack ) {\n\n\t// Support: IE 8 - 9 only\n\t// Console exists when dev tools are open, which can happen at any time\n\tif ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {\n\t\twindow.console.warn( \"jQuery.Deferred exception: \" + error.message, error.stack, stack );\n\t}\n};\n\n\n\n\njQuery.readyException = function( error ) {\n\twindow.setTimeout( function() {\n\t\tthrow error;\n\t} );\n};\n\n\n\n\n// The deferred used on DOM ready\nvar readyList = jQuery.Deferred();\n\njQuery.fn.ready = function( fn ) {\n\n\treadyList\n\t\t.then( fn )\n\n\t\t// Wrap jQuery.readyException in a function so that the lookup\n\t\t// happens at the time of error handling instead of callback\n\t\t// registration.\n\t\t.catch( function( error ) {\n\t\t\tjQuery.readyException( error );\n\t\t} );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See #6781\n\treadyWait: 1,\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\t}\n} );\n\njQuery.ready.then = readyList.then;\n\n// The ready event handler and self cleanup method\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\twindow.removeEventListener( \"load\", completed );\n\tjQuery.ready();\n}\n\n// Catch cases where $(document).ready() is called\n// after the browser event has already occurred.\n// Support: IE <=9 - 10 only\n// Older IE sometimes signals \"interactive\" too soon\nif ( document.readyState === \"complete\" ||\n\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\twindow.setTimeout( jQuery.ready );\n\n} else {\n\n\t// Use the handy event callback\n\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t// A fallback to window.onload, that will always work\n\twindow.addEventListener( \"load\", completed );\n}\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( toType( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ], key, raw ?\n\t\t\t\t\tvalue :\n\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( chainable ) {\n\t\treturn elems;\n\t}\n\n\t// Gets\n\tif ( bulk ) {\n\t\treturn fn.call( elems );\n\t}\n\n\treturn len ? fn( elems[ 0 ], key ) : emptyGet;\n};\n\n\n// Matches dashed string for camelizing\nvar rmsPrefix = /^-ms-/,\n\trdashAlpha = /-([a-z])/g;\n\n// Used by camelCase as callback to replace()\nfunction fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}\n\n// Convert dashed to camelCase; used by the css and data modules\n// Support: IE <=9 - 11, Edge 12 - 15\n// Microsoft forgot to hump their vendor prefix (#9572)\nfunction camelCase( string ) {\n\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n}\nvar acceptData = function( owner ) {\n\n\t// Accepts only:\n\t// - Node\n\t// - Node.ELEMENT_NODE\n\t// - Node.DOCUMENT_NODE\n\t// - Object\n\t// - Any\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\n\n\nfunction Data() {\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\n\nData.prototype = {\n\n\tcache: function( owner ) {\n\n\t\t// Check if the owner object already has a cache\n\t\tvar value = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !value ) {\n\t\t\tvalue = {};\n\n\t\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t\t// but we should not, see #8335.\n\t\t\t// Always return an empty object.\n\t\t\tif ( acceptData( owner ) ) {\n\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t\t\t// use plain assignment\n\t\t\t\tif ( owner.nodeType ) {\n\t\t\t\t\towner[ this.expando ] = value;\n\n\t\t\t\t// Otherwise secure it in a non-enumerable property\n\t\t\t\t// configurable must be true to allow the property to be\n\t\t\t\t// deleted when data is removed\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\tcache = this.cache( owner );\n\n\t\t// Handle: [ owner, key, value ] args\n\t\t// Always use camelCase key (gh-2257)\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ camelCase( data ) ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\n\t\t\t// Copy the properties one-by-one to the cache object\n\t\t\tfor ( prop in data ) {\n\t\t\t\tcache[ camelCase( prop ) ] = data[ prop ];\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\treturn key === undefined ?\n\t\t\tthis.cache( owner ) :\n\n\t\t\t// Always use camelCase key (gh-2257)\n\t\t\towner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];\n\t},\n\taccess: function( owner, key, value ) {\n\n\t\t// In cases where either:\n\t\t//\n\t\t// 1. No key was specified\n\t\t// 2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the \"read\" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t// 1. The entire cache object\n\t\t// 2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\n\n\t\t\treturn this.get( owner, key );\n\t\t}\n\n\t\t// When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t// 1. An object of properties\n\t\t// 2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the \"set\" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i,\n\t\t\tcache = owner[ this.expando ];\n\n\t\tif ( cache === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key !== undefined ) {\n\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( Array.isArray( key ) ) {\n\n\t\t\t\t// If key is an array of keys...\n\t\t\t\t// We always set camelCase keys, so remove that.\n\t\t\t\tkey = key.map( camelCase );\n\t\t\t} else {\n\t\t\t\tkey = camelCase( key );\n\n\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\tkey = key in cache ?\n\t\t\t\t\t[ key ] :\n\t\t\t\t\t( key.match( rnothtmlwhite ) || [] );\n\t\t\t}\n\n\t\t\ti = key.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ key[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if there's no more data\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\n\n\t\t\t// Support: Chrome <=35 - 45\n\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\n\t\t\tif ( owner.nodeType ) {\n\t\t\t\towner[ this.expando ] = undefined;\n\t\t\t} else {\n\t\t\t\tdelete owner[ this.expando ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\tvar cache = owner[ this.expando ];\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\n\t}\n};\nvar dataPriv = new Data();\n\nvar dataUser = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module's maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /[A-Z]/g;\n\nfunction getData( data ) {\n\tif ( data === \"true\" ) {\n\t\treturn true;\n\t}\n\n\tif ( data === \"false\" ) {\n\t\treturn false;\n\t}\n\n\tif ( data === \"null\" ) {\n\t\treturn null;\n\t}\n\n\t// Only convert to a number if it doesn't change the string\n\tif ( data === +data + \"\" ) {\n\t\treturn +data;\n\t}\n\n\tif ( rbrace.test( data ) ) {\n\t\treturn JSON.parse( data );\n\t}\n\n\treturn data;\n}\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = getData( data );\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tdataUser.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend( {\n\thasData: function( elem ) {\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn dataUser.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdataUser.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to dataPriv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn dataPriv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdataPriv.remove( elem, name );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = dataUser.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE 11 only\n\t\t\t\t\t\t// The attrs elements can be null (#14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdataPriv.set( elem, \"hasDataAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tdataUser.set( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data;\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// The key will always be camelCased in Data\n\t\t\t\tdata = dataUser.get( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to \"discover\" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn't exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tthis.each( function() {\n\n\t\t\t\t// We always store the camelCased key\n\t\t\t\tdataUser.set( this, key, value );\n\t\t\t} );\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tdataUser.remove( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = dataPriv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || Array.isArray( data ) ) {\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", key ] );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = dataPriv.get( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar isHiddenWithinTree = function( elem, el ) {\n\n\t\t// isHiddenWithinTree might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\n\t\t// Inline style trumps all\n\t\treturn elem.style.display === \"none\" ||\n\t\t\telem.style.display === \"\" &&\n\n\t\t\t// Otherwise, check computed style\n\t\t\t// Support: Firefox <=43 - 45\n\t\t\t// Disconnected elements can have computed display: none, so first confirm that elem is\n\t\t\t// in the document.\n\t\t\tjQuery.contains( elem.ownerDocument, elem ) &&\n\n\t\t\tjQuery.css( elem, \"display\" ) === \"none\";\n\t};\n\nvar swap = function( elem, options, callback, args ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.apply( elem, args || [] );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted, scale,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() {\n\t\t\t\treturn tween.cur();\n\t\t\t} :\n\t\t\tfunction() {\n\t\t\t\treturn jQuery.css( elem, prop, \"\" );\n\t\t\t},\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = ( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Support: Firefox <=54\n\t\t// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)\n\t\tinitial = initial / 2;\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\twhile ( maxIterations-- ) {\n\n\t\t\t// Evaluate and update our best guess (doubling guesses that zero out).\n\t\t\t// Finish if the scale equals or crosses 1 (making the old*new product non-positive).\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\t\t\tif ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {\n\t\t\t\tmaxIterations = 0;\n\t\t\t}\n\t\t\tinitialInUnit = initialInUnit / scale;\n\n\t\t}\n\n\t\tinitialInUnit = initialInUnit * 2;\n\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\nvar defaultDisplayMap = {};\n\nfunction getDefaultDisplay( elem ) {\n\tvar temp,\n\t\tdoc = elem.ownerDocument,\n\t\tnodeName = elem.nodeName,\n\t\tdisplay = defaultDisplayMap[ nodeName ];\n\n\tif ( display ) {\n\t\treturn display;\n\t}\n\n\ttemp = doc.body.appendChild( doc.createElement( nodeName ) );\n\tdisplay = jQuery.css( temp, \"display\" );\n\n\ttemp.parentNode.removeChild( temp );\n\n\tif ( display === \"none\" ) {\n\t\tdisplay = \"block\";\n\t}\n\tdefaultDisplayMap[ nodeName ] = display;\n\n\treturn display;\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\t// Determine new display value for elements that need to change\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Since we force visibility upon cascade-hidden elements, an immediate (and slow)\n\t\t\t// check is required in this first loop unless we have a nonempty display value (either\n\t\t\t// inline or about-to-be-restored)\n\t\t\tif ( display === \"none\" ) {\n\t\t\t\tvalues[ index ] = dataPriv.get( elem, \"display\" ) || null;\n\t\t\t\tif ( !values[ index ] ) {\n\t\t\t\t\telem.style.display = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( elem.style.display === \"\" && isHiddenWithinTree( elem ) ) {\n\t\t\t\tvalues[ index ] = getDefaultDisplay( elem );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( display !== \"none\" ) {\n\t\t\t\tvalues[ index ] = \"none\";\n\n\t\t\t\t// Remember what we're overwriting\n\t\t\t\tdataPriv.set( elem, \"display\", display );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of the elements in a second loop to avoid constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\tif ( values[ index ] != null ) {\n\t\t\telements[ index ].style.display = values[ index ];\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.fn.extend( {\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHiddenWithinTree( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]+)/i );\n\nvar rscriptType = ( /^$|^module$|\\/(?:java|ecma)script/i );\n\n\n\n// We have to close these tags to support XHTML (#13200)\nvar wrapMap = {\n\n\t// Support: IE <=9 only\n\toption: [ 1, \"\" ],\n\n\t// XHTML parsers do not magically insert elements in the\n\t// same way that tag soup parsers do. So we cannot shorten\n\t// this by omitting or other required elements.\n\tthead: [ 1, \"\", \"
\" ],\n\tcol: [ 2, \"\", \"
\" ],\n\ttr: [ 2, \"\", \"
\" ],\n\ttd: [ 3, \"\", \"
\" ],\n\n\t_default: [ 0, \"\", \"\" ]\n};\n\n// Support: IE <=9 only\nwrapMap.optgroup = wrapMap.option;\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n\nfunction getAll( context, tag ) {\n\n\t// Support: IE <=9 - 11 only\n\t// Use typeof to avoid zero-argument method invocation on host objects (#15151)\n\tvar ret;\n\n\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\tret = context.getElementsByTagName( tag || \"*\" );\n\n\t} else if ( typeof context.querySelectorAll !== \"undefined\" ) {\n\t\tret = context.querySelectorAll( tag || \"*\" );\n\n\t} else {\n\t\tret = [];\n\t}\n\n\tif ( tag === undefined || tag && nodeName( context, tag ) ) {\n\t\treturn jQuery.merge( [ context ], ret );\n\t}\n\n\treturn ret;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdataPriv.set(\n\t\t\telems[ i ],\n\t\t\t\"globalEval\",\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/;\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar elem, tmp, tag, wrap, contains, j,\n\t\tfragment = context.createDocumentFragment(),\n\t\tnodes = [],\n\t\ti = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( toType( elem ) === \"object\" ) {\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Remember the top-level container\n\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t// Ensure the created nodes are orphaned (#12392)\n\t\t\t\ttmp.textContent = \"\";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove wrapper from fragment\n\tfragment.textContent = \"\";\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tcontains = jQuery.contains( elem.ownerDocument, elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( contains ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fragment;\n}\n\n\n( function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Support: Android 4.0 - 4.3 only\n\t// Check state lost if the name is set (#11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (#14901)\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Android <=4.1 only\n\t// Older WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE <=11 only\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = \"\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n} )();\nvar documentElement = document.documentElement;\n\n\n\nvar\n\trkeyEvent = /^key/,\n\trmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,\n\trtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\n// Support: IE <=9 only\n// See #13393 for more info\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.get( elem );\n\n\t\t// Don't attach events to noData or text/comment nodes (but allow plain objects)\n\t\tif ( !elemData ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Ensure that invalid selectors throw exceptions at attach time\n\t\t// Evaluate against documentElement in case elem is a non-element node (e.g., document)\n\t\tif ( selector ) {\n\t\t\tjQuery.find.matchesSelector( documentElement, selector );\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = {};\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove data and the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdataPriv.remove( elem, \"handle events\" );\n\t\t}\n\t},\n\n\tdispatch: function( nativeEvent ) {\n\n\t\t// Make a writable jQuery.Event from the native event object\n\t\tvar event = jQuery.event.fix( nativeEvent );\n\n\t\tvar i, j, ret, matched, handleObj, handlerQueue,\n\t\t\targs = new Array( arguments.length ),\n\t\t\thandlers = ( dataPriv.get( this, \"events\" ) || {} )[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\n\t\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// Triggered event must either 1) have no namespace, or 2) have namespace(s)\n\t\t\t\t// a subset or equal to those in the bound event (both can have no namespace).\n\t\t\t\tif ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, handleObj, sel, matchedHandlers, matchedSelectors,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Find delegate handlers\n\t\tif ( delegateCount &&\n\n\t\t\t// Support: IE <=9\n\t\t\t// Black-hole SVG instance trees (trac-13180)\n\t\t\tcur.nodeType &&\n\n\t\t\t// Support: Firefox <=42\n\t\t\t// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\n\t\t\t// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\n\t\t\t// Support: IE 11 only\n\t\t\t// ...but not arrow key \"clicks\" of radio inputs, which can have `button` -1 (gh-2343)\n\t\t\t!( event.type === \"click\" && event.button >= 1 ) ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don't check non-elements (#13208)\n\t\t\t\t// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)\n\t\t\t\tif ( cur.nodeType === 1 && !( event.type === \"click\" && cur.disabled === true ) ) {\n\t\t\t\t\tmatchedHandlers = [];\n\t\t\t\t\tmatchedSelectors = {};\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (#13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatchedSelectors[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] ) {\n\t\t\t\t\t\t\tmatchedHandlers.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matchedHandlers.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matchedHandlers } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tcur = this;\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\taddProp: function( name, hook ) {\n\t\tObject.defineProperty( jQuery.Event.prototype, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\n\t\t\tget: isFunction( hook ) ?\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\t\treturn hook( this.originalEvent );\n\t\t\t\t\t}\n\t\t\t\t} :\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\t\treturn this.originalEvent[ name ];\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\tset: function( value ) {\n\t\t\t\tObject.defineProperty( this, name, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: value\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\tfix: function( originalEvent ) {\n\t\treturn originalEvent[ jQuery.expando ] ?\n\t\t\toriginalEvent :\n\t\t\tnew jQuery.Event( originalEvent );\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tfocus: {\n\n\t\t\t// Fire native event if possible so blur/focus sequence is correct\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this !== safeActiveElement() && this.focus ) {\n\t\t\t\t\tthis.focus();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: \"focusin\"\n\t\t},\n\t\tblur: {\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this === safeActiveElement() && this.blur ) {\n\t\t\t\t\tthis.blur();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: \"focusout\"\n\t\t},\n\t\tclick: {\n\n\t\t\t// For checkbox, fire native event so checked state will be right\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this.type === \"checkbox\" && this.click && nodeName( this, \"input\" ) ) {\n\t\t\t\t\tthis.click();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, don't fire native .click() on links\n\t\t\t_default: function( event ) {\n\t\t\t\treturn nodeName( event.target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\njQuery.removeEvent = function( elem, type, handle ) {\n\n\t// This \"if\" is needed for plain objects\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: Android <=2.3 only\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t\t// Create target properties\n\t\t// Support: Safari <=6 - 7 only\n\t\t// Target should not be a text node (#504, #13143)\n\t\tthis.target = ( src.target && src.target.nodeType === 3 ) ?\n\t\t\tsrc.target.parentNode :\n\t\t\tsrc.target;\n\n\t\tthis.currentTarget = src.currentTarget;\n\t\tthis.relatedTarget = src.relatedTarget;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || Date.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\tisSimulated: false,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Includes all common event props including KeyEvent and MouseEvent specific props\njQuery.each( {\n\taltKey: true,\n\tbubbles: true,\n\tcancelable: true,\n\tchangedTouches: true,\n\tctrlKey: true,\n\tdetail: true,\n\teventPhase: true,\n\tmetaKey: true,\n\tpageX: true,\n\tpageY: true,\n\tshiftKey: true,\n\tview: true,\n\t\"char\": true,\n\tcharCode: true,\n\tkey: true,\n\tkeyCode: true,\n\tbutton: true,\n\tbuttons: true,\n\tclientX: true,\n\tclientY: true,\n\toffsetX: true,\n\toffsetY: true,\n\tpointerId: true,\n\tpointerType: true,\n\tscreenX: true,\n\tscreenY: true,\n\ttargetTouches: true,\n\ttoElement: true,\n\ttouches: true,\n\n\twhich: function( event ) {\n\t\tvar button = event.button;\n\n\t\t// Add which for key events\n\t\tif ( event.which == null && rkeyEvent.test( event.type ) ) {\n\t\t\treturn event.charCode != null ? event.charCode : event.keyCode;\n\t\t}\n\n\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\n\t\tif ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {\n\t\t\tif ( button & 1 ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\tif ( button & 2 ) {\n\t\t\t\treturn 3;\n\t\t\t}\n\n\t\t\tif ( button & 4 ) {\n\t\t\t\treturn 2;\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn event.which;\n\t}\n}, jQuery.event.addProp );\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://bugs.chromium.org/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event ) dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t}\n} );\n\n\nvar\n\n\t/* eslint-disable max-len */\n\n\t// See https://github.com/eslint/eslint/issues/3229\n\trxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)[^>]*)\\/>/gi,\n\n\t/* eslint-enable */\n\n\t// Support: IE <=10 - 11, Edge 12 - 13 only\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /\\s*$/g;\n\n// Prefer a tbody over its parent table for containing new rows\nfunction manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tif ( ( elem.type || \"\" ).slice( 0, 5 ) === \"true/\" ) {\n\t\telem.type = elem.type.slice( 5 );\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tvar i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;\n\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// 1. Copy private data: events, handlers, etc.\n\tif ( dataPriv.hasData( src ) ) {\n\t\tpdataOld = dataPriv.access( src );\n\t\tpdataCur = dataPriv.set( dest, pdataOld );\n\t\tevents = pdataOld.events;\n\n\t\tif ( events ) {\n\t\t\tdelete pdataCur.handle;\n\t\t\tpdataCur.events = {};\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Copy user data\n\tif ( dataUser.hasData( src ) ) {\n\t\tudataOld = dataUser.access( src );\n\t\tudataCur = jQuery.extend( {}, udataOld );\n\n\t\tdataUser.set( dest, udataCur );\n\t}\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\t\tdest.checked = src.checked;\n\n\t// Fails to return the selected option to the default selected state when cloning options\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = concat.apply( [], args );\n\n\tvar fragment, first, scripts, hasScripts, node, doc,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tvalueIsFunction = isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( valueIsFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (#8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Reenable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!dataPriv.access( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src && ( node.type || \"\" ).toLowerCase() !== \"module\" ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tDOMEval( node.textContent.replace( rcleanScript, \"\" ), doc, node );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && jQuery.contains( node.ownerDocument, node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html.replace( rxhtmlTag, \"<$1>\" );\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar i, l, srcElements, destElements,\n\t\t\tclone = elem.cloneNode( true ),\n\t\t\tinPage = jQuery.contains( elem.ownerDocument, elem );\n\n\t\t// Fix IE cloning issues\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, elem, type,\n\t\t\tspecial = jQuery.event.special,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\n\t\t\tif ( acceptData( elem ) ) {\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\n\t\t\t\t}\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().each( function() {\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\t\t\tthis.textContent = value;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\n\t\t\t\t// Prevent memory leaks\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\n\t\t\t\t// Remove any remaining nodes\n\t\t\t\telem.textContent = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\n\t\t\t\treturn elem.innerHTML;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\t\telem = this[ i ] || {};\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1,\n\t\t\ti = 0;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t// .get() because push.apply(_, arraylike) throws on ancient WebKit\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar getStyles = function( elem ) {\n\n\t\t// Support: IE <=11 only, Firefox <=30 (#15098, #14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\nvar rboxStyle = new RegExp( cssExpand.join( \"|\" ), \"i\" );\n\n\n\n( function() {\n\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\n\t// so they're executed at the same time to save the second computation.\n\tfunction computeStyleTests() {\n\n\t\t// This is a singleton, we need to execute it only once\n\t\tif ( !div ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\tdiv.style.cssText =\n\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"width:60%;top:1%\";\n\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.right = \"60%\";\n\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t// Support: IE 9 - 11 only\n\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t// Support: IE 9 only\n\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\tdiv.style.position = \"absolute\";\n\t\tscrollboxSizeVal = div.offsetWidth === 36 || \"absolute\";\n\n\t\tdocumentElement.removeChild( container );\n\n\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t// it will also be a sign that checks already performed\n\t\tdiv = null;\n\t}\n\n\tfunction roundPixelMeasures( measure ) {\n\t\treturn Math.round( parseFloat( measure ) );\n\t}\n\n\tvar pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,\n\t\treliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\t// Support: IE <=9 - 11 only\n\t// Style of cloned element affects source element cloned (#8908)\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tjQuery.extend( support, {\n\t\tboxSizingReliable: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\t\tpixelBoxStyles: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelBoxStylesVal;\n\t\t},\n\t\tpixelPosition: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelPositionVal;\n\t\t},\n\t\treliableMarginLeft: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn reliableMarginLeftVal;\n\t\t},\n\t\tscrollboxSize: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn scrollboxSizeVal;\n\t\t}\n\t} );\n} )();\n\n\nfunction curCSS( elem, name, computed ) {\n\tvar width, minWidth, maxWidth, ret,\n\n\t\t// Support: Firefox 51+\n\t\t// Retrieving style before computed somehow\n\t\t// fixes an issue with getting wrong values\n\t\t// on detached elements\n\t\tstyle = elem.style;\n\n\tcomputed = computed || getStyles( elem );\n\n\t// getPropertyValue is needed for:\n\t// .css('filter') (IE 9 only, #12537)\n\t// .css('--customProperty) (#3144)\n\tif ( computed ) {\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\n\n\t\tif ( ret === \"\" && !jQuery.contains( elem.ownerDocument, elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t// Android Browser returns percentage for some values,\n\t\t// but width seems to be reliably pixels.\n\t\t// This is against the CSSOM draft spec:\n\t\t// https://drafts.csswg.org/cssom/#resolved-values\n\t\tif ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\twidth = style.width;\n\t\t\tminWidth = style.minWidth;\n\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\tret = computed.width;\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.width = width;\n\t\t\tstyle.minWidth = minWidth;\n\t\t\tstyle.maxWidth = maxWidth;\n\t\t}\n\t}\n\n\treturn ret !== undefined ?\n\n\t\t// Support: IE <=9 - 11 only\n\t\t// IE returns zIndex value as an integer.\n\t\tret + \"\" :\n\t\tret;\n}\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar\n\n\t// Swappable if display is none or starts with table\n\t// except \"table\", \"table-cell\", or \"table-caption\"\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\trcustomProp = /^--/,\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t},\n\n\tcssPrefixes = [ \"Webkit\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style;\n\n// Return a css property mapped to a potentially vendor prefixed property\nfunction vendorPropName( name ) {\n\n\t// Shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\n// Return a property mapped along what jQuery.cssProps suggests or to\n// a vendor prefixed property.\nfunction finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}\n\nfunction setPositiveNumber( elem, value, subtract ) {\n\n\t// Any relative (+/-) values have already been\n\t// normalized at this point\n\tvar matches = rcssNum.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {\n\tvar i = dimension === \"width\" ? 1 : 0,\n\t\textra = 0,\n\t\tdelta = 0;\n\n\t// Adjustment may not be necessary\n\tif ( box === ( isBorderBox ? \"border\" : \"content\" ) ) {\n\t\treturn 0;\n\t}\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// Both box models exclude margin\n\t\tif ( box === \"margin\" ) {\n\t\t\tdelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\t// If we get here with a content-box, we're seeking \"padding\" or \"border\" or \"margin\"\n\t\tif ( !isBorderBox ) {\n\n\t\t\t// Add padding\n\t\t\tdelta += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// For \"border\" or \"margin\", add border\n\t\t\tif ( box !== \"padding\" ) {\n\t\t\t\tdelta += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\n\t\t\t// But still keep track of it otherwise\n\t\t\t} else {\n\t\t\t\textra += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\n\t\t// If we get here with a border-box (content + padding + border), we're seeking \"content\" or\n\t\t// \"padding\" or \"margin\"\n\t\t} else {\n\n\t\t\t// For \"content\", subtract padding\n\t\t\tif ( box === \"content\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// For \"content\" or \"padding\", subtract border\n\t\t\tif ( box !== \"margin\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Account for positive content-box scroll gutter when requested by providing computedVal\n\tif ( !isBorderBox && computedVal >= 0 ) {\n\n\t\t// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border\n\t\t// Assuming integer scroll gutter, subtract the rest and round down\n\t\tdelta += Math.max( 0, Math.ceil(\n\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\tcomputedVal -\n\t\t\tdelta -\n\t\t\textra -\n\t\t\t0.5\n\t\t) );\n\t}\n\n\treturn delta;\n}\n\nfunction getWidthOrHeight( elem, dimension, extra ) {\n\n\t// Start with computed style\n\tvar styles = getStyles( elem ),\n\t\tval = curCSS( elem, dimension, styles ),\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\tvalueIsBorderBox = isBorderBox;\n\n\t// Support: Firefox <=54\n\t// Return a confounding non-pixel value or feign ignorance, as appropriate.\n\tif ( rnumnonpx.test( val ) ) {\n\t\tif ( !extra ) {\n\t\t\treturn val;\n\t\t}\n\t\tval = \"auto\";\n\t}\n\n\t// Check for style in case a browser which returns unreliable values\n\t// for getComputedStyle silently falls back to the reliable elem.style\n\tvalueIsBorderBox = valueIsBorderBox &&\n\t\t( support.boxSizingReliable() || val === elem.style[ dimension ] );\n\n\t// Fall back to offsetWidth/offsetHeight when value is \"auto\"\n\t// This happens for inline elements with no explicit setting (gh-3571)\n\t// Support: Android <=4.1 - 4.3 only\n\t// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)\n\tif ( val === \"auto\" ||\n\t\t!parseFloat( val ) && jQuery.css( elem, \"display\", false, styles ) === \"inline\" ) {\n\n\t\tval = elem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ];\n\n\t\t// offsetWidth/offsetHeight provide border-box values\n\t\tvalueIsBorderBox = true;\n\t}\n\n\t// Normalize \"\" and auto\n\tval = parseFloat( val ) || 0;\n\n\t// Adjust for the element's box model\n\treturn ( val +\n\t\tboxModelAdjustment(\n\t\t\telem,\n\t\t\tdimension,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles,\n\n\t\t\t// Provide the current computed size to request scroll gutter calculation (gh-3589)\n\t\t\tval\n\t\t)\n\t) + \"px\";\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\t\"animationIterationCount\": true,\n\t\t\"columnCount\": true,\n\t\t\"fillOpacity\": true,\n\t\t\"flexGrow\": true,\n\t\t\"flexShrink\": true,\n\t\t\"fontWeight\": true,\n\t\t\"lineHeight\": true,\n\t\t\"opacity\": true,\n\t\t\"order\": true,\n\t\t\"orphans\": true,\n\t\t\"widows\": true,\n\t\t\"zIndex\": true,\n\t\t\"zoom\": true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name ),\n\t\t\tstyle = elem.style;\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to query the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Gets hook for the prefixed version, then unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (#7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug #9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set (#7116)\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\tif ( type === \"number\" ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// background-* props affect original clone's values\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\tif ( isCustomProp ) {\n\t\t\t\t\tstyle.setProperty( name, value );\n\t\t\t\t} else {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar val, num, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name );\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to modify the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Try prefixed name followed by the unprefixed name\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t// Convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( i, dimension ) {\n\tjQuery.cssHooks[ dimension ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\n\t\t\t\t// but it must have a current display style that would benefit\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\n\t\t\t\t\t// Support: Safari 8+\n\t\t\t\t\t// Table columns in Safari have non-zero offsetWidth & zero\n\t\t\t\t\t// getBoundingClientRect().width unless display is changed.\n\t\t\t\t\t// Support: IE <=11 only\n\t\t\t\t\t// Running getBoundingClientRect on a disconnected node\n\t\t\t\t\t// in IE throws an error.\n\t\t\t\t\t( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?\n\t\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\t\treturn getWidthOrHeight( elem, dimension, extra );\n\t\t\t\t\t\t} ) :\n\t\t\t\t\t\tgetWidthOrHeight( elem, dimension, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar matches,\n\t\t\t\tstyles = getStyles( elem ),\n\t\t\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\tsubtract = extra && boxModelAdjustment(\n\t\t\t\t\telem,\n\t\t\t\t\tdimension,\n\t\t\t\t\textra,\n\t\t\t\t\tisBorderBox,\n\t\t\t\t\tstyles\n\t\t\t\t);\n\n\t\t\t// Account for unreliable border-box dimensions by comparing offset* to computed and\n\t\t\t// faking a content-box to get border and padding (gh-3699)\n\t\t\tif ( isBorderBox && support.scrollboxSize() === styles.position ) {\n\t\t\t\tsubtract -= Math.ceil(\n\t\t\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\t\t\tparseFloat( styles[ dimension ] ) -\n\t\t\t\t\tboxModelAdjustment( elem, dimension, \"border\", false, styles ) -\n\t\t\t\t\t0.5\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Convert to pixels if value adjustment is needed\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\n\t\t\t\t( matches[ 3 ] || \"px\" ) !== \"px\" ) {\n\n\t\t\t\telem.style[ dimension ] = value;\n\t\t\t\tvalue = jQuery.css( elem, dimension );\n\t\t\t}\n\n\t\t\treturn setPositiveNumber( elem, value, subtract );\n\t\t}\n\t};\n} );\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn ( parseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t} )\n\t\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// Assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( prefix !== \"margin\" ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( Array.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\n\t\t\t// Simple values such as \"10px\" are parsed to Float;\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as-is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// Use step hook for back compat.\n\t\t\t// Use cssHook if its there.\n\t\t\t// Use .style if available and use plain properties where available.\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 &&\n\t\t\t\t( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||\n\t\t\t\t\tjQuery.cssHooks[ tween.prop ] ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9 only\n// Panic based approach to setting things on disconnected nodes\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, inProgress,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\nfunction schedule() {\n\tif ( inProgress ) {\n\t\tif ( document.hidden === false && window.requestAnimationFrame ) {\n\t\t\twindow.requestAnimationFrame( schedule );\n\t\t} else {\n\t\t\twindow.setTimeout( schedule, jQuery.fx.interval );\n\t\t}\n\n\t\tjQuery.fx.tick();\n\t}\n}\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\ti = 0,\n\t\tattrs = { height: type };\n\n\t// If we include width, step value is 1 to do all cssExpand values,\n\t// otherwise step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// We're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\tvar prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,\n\t\tisBox = \"width\" in props || \"height\" in props,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHiddenWithinTree( elem ),\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\n\n\t// Queue-skipping animations hijack the fx hooks\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// Ensure the complete handler is called before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Detect show/hide animations\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.test( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// Pretend to be hidden if this is a \"show\" and\n\t\t\t\t// there is still data from a stopped show/hide\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\n\t\t\t\t// Ignore all other no-op show/hide data\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\t\t}\n\t}\n\n\t// Bail out if this is a no-op like .hide().hide()\n\tpropTween = !jQuery.isEmptyObject( props );\n\tif ( !propTween && jQuery.isEmptyObject( orig ) ) {\n\t\treturn;\n\t}\n\n\t// Restrict \"overflow\" and \"display\" styles during box animations\n\tif ( isBox && elem.nodeType === 1 ) {\n\n\t\t// Support: IE <=9 - 11, Edge 12 - 15\n\t\t// Record all 3 overflow attributes because IE does not infer the shorthand\n\t\t// from identically-valued overflowX and overflowY and Edge just mirrors\n\t\t// the overflowX value there.\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Identify a display type, preferring old show/hide data over the CSS cascade\n\t\trestoreDisplay = dataShow && dataShow.display;\n\t\tif ( restoreDisplay == null ) {\n\t\t\trestoreDisplay = dataPriv.get( elem, \"display\" );\n\t\t}\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\tif ( display === \"none\" ) {\n\t\t\tif ( restoreDisplay ) {\n\t\t\t\tdisplay = restoreDisplay;\n\t\t\t} else {\n\n\t\t\t\t// Get nonempty value(s) by temporarily forcing visibility\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t\trestoreDisplay = elem.style.display || restoreDisplay;\n\t\t\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\t\t\tshowHide( [ elem ] );\n\t\t\t}\n\t\t}\n\n\t\t// Animate inline elements as inline-block\n\t\tif ( display === \"inline\" || display === \"inline-block\" && restoreDisplay != null ) {\n\t\t\tif ( jQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t\t// Restore the original display value at the end of pure show/hide animations\n\t\t\t\tif ( !propTween ) {\n\t\t\t\t\tanim.done( function() {\n\t\t\t\t\t\tstyle.display = restoreDisplay;\n\t\t\t\t\t} );\n\t\t\t\t\tif ( restoreDisplay == null ) {\n\t\t\t\t\t\tdisplay = style.display;\n\t\t\t\t\t\trestoreDisplay = display === \"none\" ? \"\" : display;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstyle.display = \"inline-block\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tanim.always( function() {\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t} );\n\t}\n\n\t// Implement show/hide animations\n\tpropTween = false;\n\tfor ( prop in orig ) {\n\n\t\t// General show/hide setup for this element animation\n\t\tif ( !propTween ) {\n\t\t\tif ( dataShow ) {\n\t\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\t\thidden = dataShow.hidden;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", { display: restoreDisplay } );\n\t\t\t}\n\n\t\t\t// Store hidden/visible for toggle so `.stop().toggle()` \"reverses\"\n\t\t\tif ( toggle ) {\n\t\t\t\tdataShow.hidden = !hidden;\n\t\t\t}\n\n\t\t\t// Show elements before animating them\n\t\t\tif ( hidden ) {\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t}\n\n\t\t\t/* eslint-disable no-loop-func */\n\n\t\t\tanim.done( function() {\n\n\t\t\t/* eslint-enable no-loop-func */\n\n\t\t\t\t// The final step of a \"hide\" animation is actually hiding the element\n\t\t\t\tif ( !hidden ) {\n\t\t\t\t\tshowHide( [ elem ] );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( elem, \"fxshow\" );\n\t\t\t\tfor ( prop in orig ) {\n\t\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Per-property setup\n\t\tpropTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\t\tif ( !( prop in dataShow ) ) {\n\t\t\tdataShow[ prop ] = propTween.start;\n\t\t\tif ( hidden ) {\n\t\t\t\tpropTween.end = propTween.start;\n\t\t\t\tpropTween.start = 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( Array.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// Not quite $.extend, this won't overwrite existing keys.\n\t\t\t// Reusing 'index' because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// Don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3 only\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\t// If there's more to do, yield\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t}\n\n\t\t\t// If this was an empty animation, synthesize a final progress notification\n\t\t\tif ( !length ) {\n\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t}\n\n\t\t\t// Resolve the animation and report its conclusion\n\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\treturn false;\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tresult.stop.bind( result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\t// Attach callbacks from options\n\tanimation\n\t\t.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\treturn animation;\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnothtmlwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tisFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !isFunction( easing ) && easing\n\t};\n\n\t// Go to the end state if fx are off\n\tif ( jQuery.fx.off ) {\n\t\topt.duration = 0;\n\n\t} else {\n\t\tif ( typeof opt.duration !== \"number\" ) {\n\t\t\tif ( opt.duration in jQuery.fx.speeds ) {\n\t\t\t\topt.duration = jQuery.fx.speeds[ opt.duration ];\n\n\t\t\t} else {\n\t\t\t\topt.duration = jQuery.fx.speeds._default;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// Show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHiddenWithinTree ).css( \"opacity\", 0 ).show()\n\n\t\t\t// Animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || dataPriv.get( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\t\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue && type !== false ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = dataPriv.get( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start the next in the queue if the last step wasn't forced.\n\t\t\t// Timers currently will call their complete callbacks, which\n\t\t\t// will dequeue but only if they were gotoEnd.\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = dataPriv.get( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// Enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// Empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// Look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ti = 0,\n\t\ttimers = jQuery.timers;\n\n\tfxNow = Date.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Run the timer and safely remove it when done (allowing for external removal)\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tjQuery.fx.start();\n};\n\njQuery.fx.interval = 13;\njQuery.fx.start = function() {\n\tif ( inProgress ) {\n\t\treturn;\n\t}\n\n\tinProgress = true;\n\tschedule();\n};\n\njQuery.fx.stop = function() {\n\tinProgress = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\n// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar input = document.createElement( \"input\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\tinput.type = \"checkbox\";\n\n\t// Support: Android <=4.3 only\n\t// Default value for a checkbox should be \"on\"\n\tsupport.checkOn = input.value !== \"\";\n\n\t// Support: IE <=11 only\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: IE <=11 only\n\t// An input loses its value after becoming a radio\n\tinput = document.createElement( \"input\" );\n\tinput.value = \"t\";\n\tinput.type = \"radio\";\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar boolHook,\n\tattrHandle = jQuery.expr.attrHandle;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// Attribute hooks are determined by the lowercase version\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\thooks = jQuery.attrHooks[ name.toLowerCase() ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tnodeName( elem, \"input\" ) ) {\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name,\n\t\t\ti = 0,\n\n\t\t\t// Attribute names can contain non-HTML whitespace characters\n\t\t\t// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n\t\t\tattrNames = value && value.match( rnothtmlwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\telem.removeAttribute( name );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\telem.setAttribute( name, name );\n\t\t}\n\t\treturn name;\n\t}\n};\n\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\tvar ret, handle,\n\t\t\tlowercaseName = name.toLowerCase();\n\n\t\tif ( !isXML ) {\n\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\thandle = attrHandle[ lowercaseName ];\n\t\t\tattrHandle[ lowercaseName ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tlowercaseName :\n\t\t\t\tnull;\n\t\t\tattrHandle[ lowercaseName ] = handle;\n\t\t}\n\t\treturn ret;\n\t};\n} );\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// Support: IE <=9 - 11 only\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/\n\t\t\t\t// Use proper attribute retrieval(#12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\tif ( tabindex ) {\n\t\t\t\t\treturn parseInt( tabindex, 10 );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\trclickable.test( elem.nodeName ) &&\n\t\t\t\t\telem.href\n\t\t\t\t) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\n// Support: IE <=11 only\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\n// eslint rule \"no-unused-expressions\" is disabled for this code\n// since it considers such accessions noop\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent && parent.parentNode ) {\n\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n\n\n\n\t// Strip and collapse whitespace according to HTML spec\n\t// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace\n\tfunction stripAndCollapse( value ) {\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\treturn tokens.join( \" \" );\n\t}\n\n\nfunction getClass( elem ) {\n\treturn elem.getAttribute && elem.getAttribute( \"class\" ) || \"\";\n}\n\nfunction classesToArray( value ) {\n\tif ( Array.isArray( value ) ) {\n\t\treturn value;\n\t}\n\tif ( typeof value === \"string\" ) {\n\t\treturn value.match( rnothtmlwhite ) || [];\n\t}\n\treturn [];\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tclasses = classesToArray( value );\n\n\t\tif ( classes.length ) {\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\t\t\t\tcur = elem.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + clazz + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += clazz + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\telem.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tclasses = classesToArray( value );\n\n\t\tif ( classes.length ) {\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = elem.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + clazz + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + clazz + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\telem.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar type = typeof value,\n\t\t\tisValidValue = type === \"string\" || Array.isArray( value );\n\n\t\tif ( typeof stateVal === \"boolean\" && isValidValue ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar className, i, self, classNames;\n\n\t\t\tif ( isValidValue ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\ti = 0;\n\t\t\t\tself = jQuery( this );\n\t\t\t\tclassNames = classesToArray( value );\n\n\t\t\t\twhile ( ( className = classNames[ i++ ] ) ) {\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// Store className if set\n\t\t\t\t\tdataPriv.set( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed `false`,\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tif ( this.setAttribute ) {\n\t\t\t\t\tthis.setAttribute( \"class\",\n\t\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\t\"\" :\n\t\t\t\t\t\tdataPriv.get( this, \"__className__\" ) || \"\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + stripAndCollapse( getClass( elem ) ) + \" \" ).indexOf( className ) > -1 ) {\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\nvar rreturn = /\\r/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, valueIsFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\t// Handle most common string cases\n\t\t\t\tif ( typeof ret === \"string\" ) {\n\t\t\t\t\treturn ret.replace( rreturn, \"\" );\n\t\t\t\t}\n\n\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\treturn ret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tvalueIsFunction = isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\n\t\t\t} else if ( Array.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE <=10 - 11 only\n\t\t\t\t\t// option.text throws exceptions (#14686, #14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tstripAndCollapse( jQuery.text( elem ) );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option, i,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\",\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length;\n\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\ti = max;\n\n\t\t\t\t} else {\n\t\t\t\t\ti = one ? index : 0;\n\t\t\t\t}\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t// IE8-9 doesn't update selected after form reset (#2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t!option.disabled &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t/* eslint-disable no-cond-assign */\n\n\t\t\t\t\tif ( option.selected =\n\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\n\t\t\t\t\t) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* eslint-enable no-cond-assign */\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\n\n\nsupport.focusin = \"onfocusin\" in window;\n\n\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\tstopPropagationCallback = function( e ) {\n\t\te.stopPropagation();\n\t};\n\njQuery.extend( jQuery.event, {\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special, lastElement,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = lastElement = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (#9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tlastElement = cur;\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( dataPriv.get( cur, \"events\" ) || {} )[ event.type ] &&\n\t\t\t\tdataPriv.get( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( ( !special._default ||\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\n\t\t\t\tacceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name as the event.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (#6170)\n\t\t\t\tif ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.addEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\telem[ type ]();\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.removeEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\t// Used only for `focus(in | out)` events\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\t}\n\n} );\n\njQuery.fn.extend( {\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\n// Support: Firefox <=44\n// Firefox doesn't have focus(in | out) events\n// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n//\n// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1\n// focus(in | out) events fire after focus & blur events,\n// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857\nif ( !support.focusin ) {\n\tjQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\n\t\t// Attach a single capturing handler on the document while someone wants focusin/focusout\n\t\tvar handler = function( event ) {\n\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );\n\t\t};\n\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\t\t\t\tvar doc = this.ownerDocument || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix );\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.addEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t\tdataPriv.access( doc, fix, ( attaches || 0 ) + 1 );\n\t\t\t},\n\t\t\tteardown: function() {\n\t\t\t\tvar doc = this.ownerDocument || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix ) - 1;\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.removeEventListener( orig, handler, true );\n\t\t\t\t\tdataPriv.remove( doc, fix );\n\n\t\t\t\t} else {\n\t\t\t\t\tdataPriv.access( doc, fix, attaches );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t} );\n}\nvar location = window.location;\n\nvar nonce = Date.now();\n\nvar rquery = ( /\\?/ );\n\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\n\t// Support: IE 9 - 11 only\n\t// IE throws on parseFromString with invalid input.\n\ttry {\n\t\txml = ( new window.DOMParser() ).parseFromString( data, \"text/xml\" );\n\t} catch ( e ) {\n\t\txml = undefined;\n\t}\n\n\tif ( !xml || xml.getElementsByTagName( \"parsererror\" ).length ) {\n\t\tjQuery.error( \"Invalid XML: \" + data );\n\t}\n\treturn xml;\n};\n\n\nvar\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( Array.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && toType( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, valueOrFunction ) {\n\n\t\t\t// If value is a function, invoke it and use its return value\n\t\t\tvar value = isFunction( valueOrFunction ) ?\n\t\t\t\tvalueOrFunction() :\n\t\t\t\tvalueOrFunction;\n\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" +\n\t\t\t\tencodeURIComponent( value == null ? \"\" : value );\n\t\t};\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} )\n\t\t.filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is( \":disabled\" ) so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} )\n\t\t.map( function( i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\tif ( val == null ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( Array.isArray( val ) ) {\n\t\t\t\treturn jQuery.map( val, function( val ) {\n\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\nvar\n\tr20 = /%20/g,\n\trhash = /#.*$/,\n\trantiCache = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n\n\t// #7653, #8125, #8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t * - BEFORE asking for a transport\n\t * - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Anchor tag for parsing the document origin\n\toriginAnchor = document.createElement( \"a\" );\n\toriginAnchor.href = location.href;\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];\n\n\t\tif ( isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[ 0 ] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes #9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s.throws ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": JSON.parse,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar transport,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// Url cleanup var\n\t\t\turlAnchor,\n\n\t\t\t// Request state (becomes false upon send and true upon completion)\n\t\t\tcompleted,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// uncached part of the url\n\t\t\tuncached,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( completed ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match;\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn completed ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\tname = requestHeadersNames[ name.toLowerCase() ] =\n\t\t\t\t\t\t\trequestHeadersNames[ name.toLowerCase() ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( completed ) {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Lazy-add the new callbacks in a way that preserves old ones\n\t\t\t\t\t\t\tfor ( code in map ) {\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR );\n\n\t\t// Add protocol if not provided (prefilters might expect it)\n\t\t// Handle falsy url in the settings object (#10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || location.href ) + \"\" )\n\t\t\t.replace( rprotocol, location.protocol + \"//\" );\n\n\t\t// Alias method option to type as per ticket #12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = ( s.dataType || \"*\" ).toLowerCase().match( rnothtmlwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when the origin doesn't match the current origin.\n\t\tif ( s.crossDomain == null ) {\n\t\t\turlAnchor = document.createElement( \"a\" );\n\n\t\t\t// Support: IE <=8 - 11, Edge 12 - 15\n\t\t\t// IE throws exception on accessing the href property if url is malformed,\n\t\t\t// e.g. http://example.com:80x/\n\t\t\ttry {\n\t\t\t\turlAnchor.href = s.url;\n\n\t\t\t\t// Support: IE <=8 - 11 only\n\t\t\t\t// Anchor's host property isn't correctly set when s.url is relative\n\t\t\t\turlAnchor.href = urlAnchor.href;\n\t\t\t\ts.crossDomain = originAnchor.protocol + \"//\" + originAnchor.host !==\n\t\t\t\t\turlAnchor.protocol + \"//\" + urlAnchor.host;\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\n\t\t\t\t// it can be rejected by the transport if it is invalid\n\t\t\t\ts.crossDomain = true;\n\t\t\t}\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( completed ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\t// Remove hash to simplify url manipulation\n\t\tcacheURL = s.url.replace( rhash, \"\" );\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// Remember the hash so we can put it back\n\t\t\tuncached = s.url.slice( cacheURL.length );\n\n\t\t\t// If data is available and should be processed, append data to url\n\t\t\tif ( s.data && ( s.processData || typeof s.data === \"string\" ) ) {\n\t\t\t\tcacheURL += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data;\n\n\t\t\t\t// #9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add or update anti-cache param if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\tcacheURL = cacheURL.replace( rantiCache, \"$1\" );\n\t\t\t\tuncached = ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ( nonce++ ) + uncached;\n\t\t\t}\n\n\t\t\t// Put hash and anti-cache on the URL that will be requested (gh-1732)\n\t\t\ts.url = cacheURL + uncached;\n\n\t\t// Change '%20' to '+' if this is encoded form body content (gh-2658)\n\t\t} else if ( s.data && s.processData &&\n\t\t\t( s.contentType || \"\" ).indexOf( \"application/x-www-form-urlencoded\" ) === 0 ) {\n\t\t\ts.data = s.data.replace( r20, \"+\" );\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// Aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tcompleteDeferred.add( s.complete );\n\t\tjqXHR.done( s.success );\n\t\tjqXHR.fail( s.error );\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( completed ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tcompleted = false;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Rethrow post-completion exceptions\n\t\t\t\tif ( completed ) {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\n\t\t\t\t// Propagate others as results\n\t\t\t\tdone( -1, e );\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Ignore repeat invocations\n\t\t\tif ( completed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcompleted = true;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// Shift arguments if data argument was omitted\n\t\tif ( isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\n\njQuery._evalUrl = function( url ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (#11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tcache: true,\n\t\tasync: false,\n\t\tglobal: false,\n\t\t\"throws\": true\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tvar wrap;\n\n\t\tif ( this[ 0 ] ) {\n\t\t\tif ( isFunction( html ) ) {\n\t\t\t\thtml = html.call( this[ 0 ] );\n\t\t\t}\n\n\t\t\t// The elements to wrap the target around\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstElementChild ) {\n\t\t\t\t\telem = elem.firstElementChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar htmlIsFunction = isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function( selector ) {\n\t\tthis.parent( selector ).not( \"body\" ).each( function() {\n\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t} );\n\t\treturn this;\n\t}\n} );\n\n\njQuery.expr.pseudos.hidden = function( elem ) {\n\treturn !jQuery.expr.pseudos.visible( elem );\n};\njQuery.expr.pseudos.visible = function( elem ) {\n\treturn !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\n};\n\n\n\n\njQuery.ajaxSettings.xhr = function() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n};\n\nvar xhrSuccessStatus = {\n\n\t\t// File protocol always yields status code 0, assume 200\n\t\t0: 200,\n\n\t\t// Support: IE <=9 only\n\t\t// #1450: sometimes IE returns 1223 when it should be 204\n\t\t1223: 204\n\t},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nsupport.ajax = xhrSupported = !!xhrSupported;\n\njQuery.ajaxTransport( function( options ) {\n\tvar callback, errorCallback;\n\n\t// Cross domain only allowed if supported through XMLHttpRequest\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\n\t\treturn {\n\t\t\tsend: function( headers, complete ) {\n\t\t\t\tvar i,\n\t\t\t\t\txhr = options.xhr();\n\n\t\t\t\txhr.open(\n\t\t\t\t\toptions.type,\n\t\t\t\t\toptions.url,\n\t\t\t\t\toptions.async,\n\t\t\t\t\toptions.username,\n\t\t\t\t\toptions.password\n\t\t\t\t);\n\n\t\t\t\t// Apply custom fields if provided\n\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Override mime type if needed\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t}\n\n\t\t\t\t// X-Requested-With header\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t}\n\n\t\t\t\t// Set headers\n\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t}\n\n\t\t\t\t// Callback\n\t\t\t\tcallback = function( type ) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.ontimeout =\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = null;\n\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\n\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\n\n\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t// On a manual native abort, IE9 throws\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== \"number\" ) {\n\t\t\t\t\t\t\t\t\tcomplete( 0, \"error\" );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcomplete(\n\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see #8605, #14207\n\t\t\t\t\t\t\t\t\t\txhr.status,\n\t\t\t\t\t\t\t\t\t\txhr.statusText\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText,\n\n\t\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\n\t\t\t\t\t\t\t\t\t( xhr.responseType || \"text\" ) !== \"text\" ||\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== \"string\" ?\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// Listen to events\n\t\t\t\txhr.onload = callback();\n\t\t\t\terrorCallback = xhr.onerror = xhr.ontimeout = callback( \"error\" );\n\n\t\t\t\t// Support: IE 9 only\n\t\t\t\t// Use onreadystatechange to replace onabort\n\t\t\t\t// to handle uncaught aborts\n\t\t\t\tif ( xhr.onabort !== undefined ) {\n\t\t\t\t\txhr.onabort = errorCallback;\n\t\t\t\t} else {\n\t\t\t\t\txhr.onreadystatechange = function() {\n\n\t\t\t\t\t\t// Check readyState before timeout as it changes\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t\t// Allow onerror to be called first,\n\t\t\t\t\t\t\t// but that will not handle a native abort\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\n\t\t\t\t\t\t\twindow.setTimeout( function() {\n\t\t\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\t\t\terrorCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Create the abort callback\n\t\t\t\tcallback = callback( \"abort\" );\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Do send the request (this may raise an exception)\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// #14683: Only rethrow if this hasn't been notified as an error yet\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\n// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\njQuery.ajaxPrefilter( function( s ) {\n\tif ( s.crossDomain ) {\n\t\ts.contents.script = false;\n\t}\n} );\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and crossDomain\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain requests\n\tif ( s.crossDomain ) {\n\t\tvar script, callback;\n\t\treturn {\n\t\t\tsend: function( _, complete ) {\n\t\t\t\tscript = jQuery( \"