!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}([function(e,t,n){"use strict";e.exports=n(91)},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return o})),n.d(t,"e",(function(){return i})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return l})); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function a(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function s(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}function l(){for(var e=[],t=0;t0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:"SET_WINDOW_TITLE",title:e,play_state:t}},t.setCurrentTrackTransition=function(e){return{type:"SET_CURRENT_TRACK_TRANSITION",current_track_transition:e}},t.setSelectedTracks=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];"string"==typeof e&&(e=[e]);return{type:"SET_SELECTED_TRACKS",keys:e}},t.showContextMenu=function(e){e.e.changedTouches?(e.position_x=e.e.changedTouches[0].clientX,e.position_y=e.e.changedTouches[0].clientY):e.e.touches?(e.position_x=e.e.touches[0].clientX,e.position_y=e.e.touches[0].clientY):(e.position_x=e.e.clientX,e.position_y=e.e.clientY);return{type:"SHOW_CONTEXT_MENU",data:e}},t.setSlimMode=function(e){return{type:"SET_SLIM_MODE",slim_mode:e}},t.setWindowFocus=function(e){return{type:"SET_WINDOW_FOCUS",window_focus:e}},t.hideContextMenu=function(){return{type:"HIDE_CONTEXT_MENU"}},t.removeContextMenu=function(){return{type:"REMOVE_CONTEXT_MENU"}},t.showTouchContextMenu=function(e){return{type:"SHOW_TOUCH_CONTEXT_MENU",data:e}},t.hideTouchContextMenu=function(){return{type:"HIDE_TOUCH_CONTEXT_MENU"}},t.removeTouchContextMenu=function(){return{type:"REMOVE_TOUCH_CONTEXT_MENU"}},t.lazyLoading=function(e){return{type:"LAZY_LOADING",start:e}},t.toggleSidebar=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"toggle",t={type:"TOGGLE_SIDEBAR"};"toggle"!=e&&(t.new_state=e);return t},t.dragStart=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;return{type:"DRAG_START",context:t,from_uri:n,victims:r,victims_indexes:a,start_x:e.clientX,start_y:e.clientY}},t.dragActive=function(){return{type:"DRAG_ACTIVE"}},t.dragEnd=function(){return{type:"DRAG_END"}},t.set=function(e){return{type:"UI_SET",data:e}},t.installPrompt=function(e){return{type:"INSTALL_PROMPT",event:e}},t.createBrowserNotification=function(e){return{type:"BROWSER_NOTIFICATION",data:e}},t.createNotification=function(e){e.message&&(e.content=e.message);"shortcut"==e.type&&(e.duration=.4);return{type:"CREATE_NOTIFICATION",notification:r({key:(0,a.generateGuid)(),duration:5,type:"default",title:null,content:null,description:null,sticky:!1,closing:!1,render_content:!1},e)}},t.closeNotification=function(e){return{type:"CLOSE_NOTIFICATION",key:e}},t.removeNotification=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:"REMOVE_NOTIFICATION",key:e,manual:t}},t.startLoading=function(e,t){return{type:"START_LOADING",source:t,key:e}},t.stopLoading=function(e){return{type:"STOP_LOADING",key:e}},t.startProcess=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return{type:"START_PROCESS",key:e,data:n,content:t,description:r}},t.resumeProcess=function(e){return{type:"RESUME_PROCESS",key:e}},t.updateProcess=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"info";return{type:"UPDATE_PROCESS",key:e,content:t,data:n,description:r,level:a}},t.runProcess=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:e,data:t}},t.cancelProcess=function(e){return{type:"CANCEL_PROCESS",key:e}},t.processCancelled=function(e){return{type:"PROCESS_CANCELLED",key:e}},t.processFinished=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:"PROCESS_FINISHED",key:e,completionMessage:t}},t.closeProcess=function(e){return{type:"CLOSE_PROCESS",key:e}},t.removeProcess=function(e){return{type:"REMOVE_PROCESS",key:e}};var a=n(5)},function(e,t,n){"use strict";n.r(t),n.d(t,"__DO_NOT_USE__ActionTypes",(function(){return o})),n.d(t,"applyMiddleware",(function(){return _})),n.d(t,"bindActionCreators",(function(){return d})),n.d(t,"combineReducers",(function(){return u})),n.d(t,"compose",(function(){return h})),n.d(t,"createStore",(function(){return s}));var r=n(72),a=function(){return Math.random().toString(36).substring(7).split("").join(".")},o={INIT:"@@redux/INIT"+a(),REPLACE:"@@redux/REPLACE"+a(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+a()}};function i(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function s(e,t,n){var a;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])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.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(s)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var l=e,u=t,c=[],d=c,f=!1;function p(){d===c&&(d=c.slice())}function m(){if(f)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.");return u}function h(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(f)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#subscribelistener for more details.");var t=!0;return p(),d.push(e),function(){if(t){if(f)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");t=!1,p();var n=d.indexOf(e);d.splice(n,1),c=null}}}function _(e){if(!i(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(f)throw new Error("Reducers may not dispatch actions.");try{f=!0,u=l(u,e)}finally{f=!1}for(var t=c=d,n=0;n=0||(a[n]=e[n]);return a}var p=n(53),m=n.n(p),h=n(86),_="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect,y=[],v=[null,null];function g(e,t){var n=e[1];return[t.payload,n+1]}function b(e,t,n){_((function(){return e.apply(void 0,t)}),n)}function E(e,t,n,r,a,o,i){e.current=r,t.current=a,n.current=!1,o.current&&(o.current=null,i())}function k(e,t,n,r,a,o,i,s,l,u){if(e){var c=!1,d=null,f=function(){if(!c){var e,n,f=t.getState();try{e=r(f,a.current)}catch(e){n=e,d=e}n||(d=null),e===o.current?i.current||l():(o.current=e,s.current=e,i.current=!0,u({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=f,n.trySubscribe(),f();return function(){if(c=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}}var w=function(){return[null,0]};function S(e,t){void 0===t&&(t={});var n=t,i=n.getDisplayName,s=void 0===i?function(e){return"ConnectAdvanced("+e+")"}:i,l=n.methodName,c=void 0===l?"connectAdvanced":l,p=n.renderCountProp,_=void 0===p?void 0:p,S=n.shouldHandleStateChanges,O=void 0===S||S,T=n.storeKey,A=void 0===T?"store":T,C=(n.withRef,n.forwardRef),x=void 0!==C&&C,P=n.context,N=void 0===P?o:P,R=f(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),D=N;return function(t){var n=t.displayName||t.name||"Component",o=s(n),i=d({},R,{getDisplayName:s,methodName:c,renderCountProp:_,shouldHandleStateChanges:O,storeKey:A,displayName:o,wrappedComponentName:n,WrappedComponent:t}),l=R.pure;var p=l?r.useMemo:function(e){return e()};function S(n){var o=Object(r.useMemo)((function(){var e=n.forwardedRef,t=f(n,["forwardedRef"]);return[n.context,e,t]}),[n]),s=o[0],l=o[1],c=o[2],m=Object(r.useMemo)((function(){return s&&s.Consumer&&Object(h.isContextConsumer)(a.a.createElement(s.Consumer,null))?s:D}),[s,D]),_=Object(r.useContext)(m),S=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(_)&&Boolean(_.store);var T=S?n.store:_.store,A=Object(r.useMemo)((function(){return function(t){return e(t.dispatch,i)}(T)}),[T]),C=Object(r.useMemo)((function(){if(!O)return v;var e=new u(T,S?null:_.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[T,S,_]),x=C[0],P=C[1],N=Object(r.useMemo)((function(){return S?_:d({},_,{subscription:x})}),[S,_,x]),R=Object(r.useReducer)(g,y,w),M=R[0][0],L=R[1];if(M&&M.error)throw M.error;var I=Object(r.useRef)(),j=Object(r.useRef)(c),U=Object(r.useRef)(),Y=Object(r.useRef)(!1),F=p((function(){return U.current&&c===j.current?U.current:A(T.getState(),c)}),[T,M,c]);b(E,[j,I,Y,c,F,U,P]),b(k,[O,T,x,A,j,I,Y,U,P,L],[T,x,A]);var H=Object(r.useMemo)((function(){return a.a.createElement(t,d({},F,{ref:l}))}),[l,t,F]);return Object(r.useMemo)((function(){return O?a.a.createElement(m.Provider,{value:N},H):H}),[m,H,N])}var T=l?a.a.memo(S):S;if(T.WrappedComponent=t,T.displayName=o,x){var C=a.a.forwardRef((function(e,t){return a.a.createElement(T,d({},e,{forwardedRef:t}))}));return C.displayName=o,C.WrappedComponent=t,m()(C,t)}return m()(T,t)}}function O(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function T(e,t){if(O(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var a=0;a=0;r--){var a=t[r](e);if(a)return a}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function Y(e,t){return e===t}function F(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?S:n,a=t.mapStateToPropsFactories,o=void 0===a?R:a,i=t.mapDispatchToPropsFactories,s=void 0===i?N:i,l=t.mergePropsFactories,u=void 0===l?M:l,c=t.selectorFactory,p=void 0===c?j:c;return function(e,t,n,a){void 0===a&&(a={});var i=a,l=i.pure,c=void 0===l||l,m=i.areStatesEqual,h=void 0===m?Y:m,_=i.areOwnPropsEqual,y=void 0===_?T:_,v=i.areStatePropsEqual,g=void 0===v?T:v,b=i.areMergedPropsEqual,E=void 0===b?T:b,k=f(i,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),w=U(e,o,"mapStateToProps"),S=U(t,s,"mapDispatchToProps"),O=U(n,u,"mergeProps");return r(p,d({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:w,initMapDispatchToProps:S,initMergeProps:O,pure:c,areStatesEqual:h,areOwnPropsEqual:y,areStatePropsEqual:g,areMergedPropsEqual:E},k))}}var H=F();function z(){return Object(r.useContext)(o)}function B(e){void 0===e&&(e=o);var t=e===o?z:function(){return Object(r.useContext)(e)};return function(){return t().store}}var q=B();function G(e){void 0===e&&(e=o);var t=e===o?q:B(e);return function(){return t().dispatch}}var V=G(),W=function(e,t){return e===t};function K(e){void 0===e&&(e=o);var t=e===o?z:function(){return Object(r.useContext)(e)};return function(e,n){void 0===n&&(n=W);var a=t();return function(e,t,n,a){var o,i=Object(r.useReducer)((function(e){return e+1}),0)[1],s=Object(r.useMemo)((function(){return new u(n,a)}),[n,a]),l=Object(r.useRef)(),c=Object(r.useRef)(),d=Object(r.useRef)();try{o=e!==c.current||l.current?e(n.getState()):d.current}catch(e){throw l.current&&(e.message+="\nThe error may be correlated with this previous error:\n"+l.current.stack+"\n\n"),e}return _((function(){c.current=e,d.current=o,l.current=void 0})),_((function(){function e(){try{var e=c.current(n.getState());if(t(e,d.current))return;d.current=e}catch(e){l.current=e}i({})}return s.onStateChange=e,s.trySubscribe(),e(),function(){return s.tryUnsubscribe()}}),[n,s]),o}(e,n,a.store,a.subscription)}}var X,$=K(),Q=n(62);X=Q.unstable_batchedUpdates,i=X},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t2&&void 0!==arguments[2])||arguments[2],a=t.replace("?","").split("&"),o=a.reduce((function(t,n){var a=n.split("="),o=[];return a[0]===e&&(o=a[1].split(",").map((function(e){return decodeURIComponent(e.replace(/\+/g,"%20"))}))),[].concat(r(t),r(o))}),[]);return n&&1===o.length?o[0]:n&&0===o.length?null:o},l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"numeric",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12;if("numeric"==e){var n=(new Date).valueOf().toString(),r=Math.floor(100*Math.random()).toString();return parseInt(n+r)}var a="x".repeat(t);return a.replace(/[xy]/g,(function(e){var n=16*Math.random()|0;return("x"==e?n:3&n|8).toString(t)}))},u=function(e,t){var n=newProps.pusher.connections.find((function(e){return e.connectionid==newProps.pusher.connectionid}));return n||!1},c=function(e){return!!e&&e.split(":")[0]},d=function(e){if(!e)return null;var t=e.split(":");if("m3u"===t[0])return"playlist";if("iris"===t[0])return t[1];switch(t[1]){case"track":case"artist":case"album":case"playlist":case"genre":return t[1];case"user":return t.length>3&&"playlist"==t[3]?"playlist":t[1];default:return null}},f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;switch(e&&(t=c(e)),t){case"local":case"m3u":return"folder";case"gmusic":return"google";case"podcast":case"podcast+file":case"podcast+http":case"podcast+https":case"podcast+itunes":return"podcast";case"tunein":case"somafm":case"dirble":return"microphone";default:return t}},p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t.split(":");n[0];switch(e){case"mbid":var r=n.indexOf("mbid");if(r>-1)return n[r+1];break;case"artistid":if("artist"==n[1])return n[2];break;case"albumid":if("album"==n[1])return n[2];break;case"playlistid":if("playlist"==n[1])return n[2];if("user"==n[1]&&"playlist"==n[3])return n[4];break;case"playlistowner":if("user"==n[1]&&"playlist"==n[3])return n[2];break;case"trackid":if("track"==n[1])return n[2];break;case"userid":if("user"==n[1])return n[2];break;case"genreid":if("genre"==n[1])return n[2];break;case"seeds":if("discover"==n[1])return n[2];if("radio"===n[1]){var a=n[2].split(",");return a.map((function(e){return e.replace(/_/gi,":")}))}break;case"searchtype":if("search"==n[1])return n[2];break;case"searchterm":if("search"==n[1])return n[3];break;default:return null}},m=function(e){var t="/"+d(e)+"/";return t+=e=encodeURIComponent(e)},h=function(){return"ontouchstart"in document.documentElement},_=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},y=function(e){return e instanceof Object&&e.constructor===Object},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];for(var n in e)if(e.hasOwnProperty(n))for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:["jaedb.github.io"],t=window.location.hostname;return e.includes(t)},b=function(e,t){var n=[];t instanceof Array||(t=[t]);for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=document.getElementById("main");if(t||n.classList.remove("smooth-scroll"),e&&Number.isInteger(e))"function"==typeof n.scrollTo&&(n.scrollTop=e);else if(e){var r=null;"#"==e.charAt(0)?r=document.getElementById(e.substring(1)):"."==e.charAt(0)?(r=document.getElementsByClassName(e.substring(1))).length>0&&(r=r[0]):console.error("Invalid target type '"+e+"'. Must start with '#' or '.'."),r&&"function"==typeof r.scrollIntoView&&r.scrollIntoView()}else n.scrollTop=0;t||n.classList.add("smooth-scroll")},S=function(e){var t=[],n=!0,r=!1,a=void 0;try{for(var o,i=e[Symbol.iterator]();!(n=(o=i.next()).done);n=!0){var s=o.value;s.includes("spotify:user:")&&(s=s.replace(/spotify:user:([^:]*?):/i,"spotify:")),t.push(s)}}catch(e){r=!0,a=e}finally{try{!n&&i.return&&i.return()}finally{if(r)throw a}}return t},O=function(e){return S([e])[0]},T=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=t?decodeURIComponent(e):e;return n=(n=(n=(n=(n=(n=n.replace(/\s/g,"%20")).replace(/\[/g,"%5B")).replace(/\]/g,"%5D")).replace(/\(/g,"%28")).replace(/\)/g,"%29")).replace(/\#/g,"%23")},A=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=t?encodeURIComponent(e):e;return n=(n=(n=(n=(n=(n=n.replace(/\%20/g," ")).replace(/\%5B/g,"[")).replace(/\%5D/g,"]")).replace(/\%28/g,"(")).replace(/\%29/g,")")).replace(/\%23/g,"#")};t.debounce=a,t.throttle=o,t.setFavicon=i,t.queryString=s,t.generateGuid=l,t.getCurrentPusherConnection=u,t.uriSource=c,t.uriType=d,t.sourceIcon=f,t.getFromUri=p,t.buildLink=m,t.isTouchDevice=h,t.isNumeric=_,t.isObject=y,t.isLoading=v,t.isHosted=g,t.getIndexedRecords=b,t.titleCase=E,t.scrollTo=w,t.upgradeSpotifyPlaylistUris=S,t.upgradeSpotifyPlaylistUri=O,t.iconFromKeyword=k,t.decodeMopidyUri=T,t.encodeMopidyUri=A,t.default={debounce:a,throttle:o,setFavicon:i,queryString:s,generateGuid:l,getCurrentPusherConnection:u,uriSource:c,uriType:d,sourceIcon:f,getFromUri:p,buildLink:m,isTouchDevice:h,isNumeric:_,isObject:y,isLoading:v,isHosted:g,getIndexedRecords:b,titleCase:E,scrollTo:w,upgradeSpotifyPlaylistUris:S,upgradeSpotifyPlaylistUri:O,iconFromKeyword:k,decodeMopidyUri:T,encodeMopidyUri:A}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),a=i(r),o=i(n(143));function i(e){return e&&e.__esModule?e:{default:e}}t.default=(0,r.memo)((function(e){var t=e.name,n=e.type,r=e.className,i=e.onClick;if(!t||""===t)return null;var s="icon icon--"+(n||"material")+" "+r;switch(n){case"svg":return a.default.createElement("img",{className:s,src:"/iris/assets/icons/"+t+".svg",onClick:i});case"gif":return a.default.createElement("img",{className:s,src:"/iris/assets/icons/"+t+".gif",onClick:i});case"fontawesome":return a.default.createElement(o.default,{className:s,type:"fontawesome",name:t,onClick:i});case"css":if("playing"===t)return a.default.createElement("i",{className:s+" icon--playing"},a.default.createElement("span",null),a.default.createElement("span",null),a.default.createElement("span",null));break;default:return a.default.createElement("i",{className:s,onClick:i},t)}}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.set=function(e){return{type:"MOPIDY_SET",data:e}},t.updateServer=function(e){return{type:"MOPIDY_UPDATE_SERVER",server:e}},t.updateServers=function(e){return{type:"MOPIDY_UPDATE_SERVERS",servers:e}},t.addServer=function(){return{type:"MOPIDY_UPDATE_SERVER",server:{id:(0,a.generateGuid)(),name:"New server",host:window.location.hostname,port:window.location.port?window.location.port:"https:"===window.location.protocol?"443":"80",ssl:"https:"===window.location.protocol}}},t.setCurrentServer=function(e){return{type:"MOPIDY_SET_CURRENT_SERVER",server:e}},t.removeServer=function(e){return{type:"MOPIDY_REMOVE_SERVER",id:e}},t.setConnection=function(e){return{type:"MOPIDY_SET_CONNECTION",data:e}},t.request=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return{type:"MOPIDY_REQUEST",method:e,params:t,response_callback:n,error_callback:r}},t.connect=function(){return{type:"MOPIDY_CONNECT"}},t.connecting=function(){return{type:"MOPIDY_CONNECTING"}},t.disconnect=function(){return{type:"MOPIDY_DISCONNECT"}},t.debug=function(e,t){return{type:"MOPIDY_DEBUG",call:e,value:t}},t.restartStarted=function(){return{type:"MOPIDY_RESTART_STARTED"}},t.restartFinished=function(){return{type:"MOPIDY_RESTART_FINISHED"}},t.upgradeStarted=function(){return{type:"MOPIDY_UPGRADE_STARTED"}},t.upgradeFinished=function(){return{type:"MOPIDY_UPGRADE_FINISHED"}},t.localScanStarted=function(){return{type:"MOPIDY_LOCAL_SCAN_STARTED"}},t.localScanFinished=function(){return{type:"MOPIDY_LOCAL_SCAN_FINISHED"}},t.getPlayState=function(){return{type:"MOPIDY_GET_PLAY_STATE"}},t.play=function(){return{type:"MOPIDY_PLAY"}},t.pause=function(){return{type:"MOPIDY_PAUSE"}},t.stop=function(){return{type:"MOPIDY_STOP"}},t.next=function(){return{type:"MOPIDY_NEXT"}},t.previous=function(){return{type:"MOPIDY_PREVIOUS"}},t.getMute=function(){return{type:"MOPIDY_GET_MUTE"}},t.setMute=function(e){return{type:"MOPIDY_SET_MUTE",mute:e}},t.getVolume=function(){return{type:"MOPIDY_GET_VOLUME"}},t.setVolume=function(e){return{type:"MOPIDY_SET_VOLUME",volume:e}},t.getConsume=function(){return{type:"MOPIDY_GET_CONSUME"}},t.setConsume=function(e){return{type:"MOPIDY_SET_CONSUME",consume:e}},t.getRepeat=function(){return{type:"MOPIDY_GET_REPEAT"}},t.setRepeat=function(e){return{type:"MOPIDY_SET_REPEAT",repeat:e}},t.getRandom=function(){return{type:"MOPIDY_GET_RANDOM"}},t.setRandom=function(e){return{type:"MOPIDY_SET_RANDOM",random:e}},t.getTimePosition=function(){return{type:"MOPIDY_GET_TIME_POSITION"}},t.setTimePosition=function(e){return{type:"MOPIDY_SET_TIME_POSITION",time_position:parseInt(e)}},t.timePosition=function(e){return{type:"MOPIDY_TIME_POSITION",time_position:parseInt(e)}},t.getUriSchemes=function(){return{type:"MOPIDY_GET_URI_SCHEMES"}},t.getCurrentTrack=function(){return{type:"MOPIDY_GET_CURRENT_TRACK"}},t.currentTrackLoaded=function(e){return{type:"MOPIDY_CURRENT_TRACK_LOADED",tl_track:e}},t.getNextTrack=function(){return{type:"MOPIDY_GET_NEXT_TRACK"}},t.clearCurrentTrack=function(){return{type:"CLEAR_CURRENT_TRACK"}},t.getQueue=function(){return{type:"MOPIDY_GET_QUEUE"}},t.changeTrack=function(e){return{type:"MOPIDY_CHANGE_TRACK",tlid:e}},t.playURIs=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"MOPIDY_PLAY_URIS",uris:e,from_uri:t,shuffle:n}},t.playAlbum=function(e){return{type:"MOPIDY_PLAY_ALBUM",uri:e}},t.playPlaylist=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:"MOPIDY_PLAY_PLAYLIST",uri:e,shuffle:t}},t.enqueueURIs=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return{type:"MOPIDY_ENQUEUE_URIS",uris:e,from_uri:t,at_position:r,play_next:n,offset:a}},t.enqueueAlbum=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:"MOPIDY_ENQUEUE_ALBUM",uri:e,next:t,at_position:n}},t.enqueuePlaylist=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:"MOPIDY_ENQUEUE_PLAYLIST",uri:e,play_next:t,at_position:n}},t.enqueueURIsBatchDone=function(){return{type:"MOPIDY_ENQUEUE_URIS_BATCH_DONE"}},t.removeTracks=function(e){return{type:"MOPIDY_REMOVE_TRACKS",tlids:e}},t.reorderTracklist=function(e,t){var n=(0,r.createRange)(e);t>n.start&&(t-=n.length);return{type:"MOPIDY_REORDER_TRACKLIST",range_start:n.start,range_length:n.length,insert_before:t}},t.clearTracklist=function(){return{type:"MOPIDY_CLEAR_TRACKLIST"}},t.shuffleTracklist=function(){return{type:"MOPIDY_SHUFFLE_TRACKLIST"}},t.getImages=function(e,t){return{type:"MOPIDY_GET_IMAGES",context:e,uris:t}},t.createPlaylist=function(e,t){return{type:"MOPIDY_CREATE_PLAYLIST",name:e,scheme:t}},t.deletePlaylist=function(e){return{type:"MOPIDY_DELETE_PLAYLIST",uri:e}},t.getLibraryPlaylists=function(){return{type:"MOPIDY_GET_LIBRARY_PLAYLISTS"}},t.getPlaylist=function(e){return{type:"MOPIDY_GET_PLAYLIST",data:{uri:e}}},t.getPlaylists=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:"MOPIDY_GET_PLAYLISTS",uris:e,processor:t}},t.getDirectory=function(e){return{type:"MOPIDY_GET_DIRECTORY",uri:e}},t.getTrack=function(e){return{type:"MOPIDY_GET_TRACK",uri:e}},t.getLibraryArtists=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return{type:"MOPIDY_GET_LIBRARY_ARTISTS",uri:e}},t.clearLibraryArtists=function(){return{type:"MOPIDY_CLEAR_LIBRARY_ARTISTS"}},t.getArtist=function(e){return{type:"MOPIDY_GET_ARTIST",uri:e}},t.getArtists=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:"MOPIDY_GET_ARTISTS",uris:e,processor:t}},t.getAlbum=function(e){return{type:"MOPIDY_GET_ALBUM",uri:e}},t.getAlbums=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:"MOPIDY_GET_ALBUMS",uris:e,processor:t}},t.getLibraryAlbums=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return{type:"MOPIDY_GET_LIBRARY_ALBUMS",uri:e}},t.clearLibraryAlbums=function(){return{type:"MOPIDY_CLEAR_LIBRARY_ALBUMS"}},t.runProcessor=function(e){return{type:e}},t.cancelProcessor=function(e){return{type:e+"_CANCEL"}},t.clearSearchResults=function(){return{type:"MOPIDY_CLEAR_SEARCH_RESULTS"}},t.getSearchResults=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;return{type:"MOPIDY_GET_SEARCH_RESULTS",context:e,query:t,limit:n}},t.getQueueHistory=function(){return{type:"MOPIDY_GET_QUEUE_HISTORY"}};var r=n(10),a=n(5)},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t2&&void 0!==arguments[2]&&arguments[2];return function(r,a){h(r,a,e).then((function(e){r({type:t,key:n,data:e})}),(function(e){r(d.handleException("Could not load URL",e))}))}},t.getMore=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return function(a,o){h(a,o,e).then((function(e){t?a(d.loadedMore(t.parent_type,t.parent_key,t.records_type,e,r)):n?(n.data=e,a(n)):a(d.handleException("No callback handler for loading more items"))}),(function(e){a(d.handleException("Could not load more "+callback_action.parent_type+" "+callback_action.records_type+"s",e))}))}},t.clearSearchResults=function(){return{type:"SPOTIFY_CLEAR_SEARCH_RESULTS"}},t.getSearchResults=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return function(i,l){i(f.startProcess("SPOTIFY_GET_SEARCH_RESULTS_PROCESSOR","Searching Spotify")),"all"==(e=e.replace(/s+$/,""))&&(e="album,artist,playlist,track");var u="search?q="+t;u+="&type="+e,u+="&country="+l().spotify.country,u+="&limit="+n,h(i,l,u+="&offset="+a).then((function(e){if(void 0!==e.tracks&&i({type:"SPOTIFY_SEARCH_RESULTS_LOADED",context:"tracks",query:t,results:(0,s.formatTracks)(e.tracks.items),more:e.tracks.next}),void 0!==e.artists&&(i({type:"ARTISTS_LOADED",artists:e.artists.items}),i({type:"SPOTIFY_SEARCH_RESULTS_LOADED",context:"artists",query:t,results:(0,o.arrayOf)("uri",e.artists.items),more:e.artists.next})),void 0!==e.albums&&(i({type:"ALBUMS_LOADED",albums:e.albums.items}),i({type:"SPOTIFY_SEARCH_RESULTS_LOADED",context:"albums",query:t,results:(0,o.arrayOf)("uri",e.albums.items),more:e.albums.next})),void 0!==e.playlists){var n=[],a=!0,u=!1,c=void 0;try{for(var d,p=e.playlists.items[Symbol.iterator]();!(a=(d=p.next()).done);a=!0){var m=d.value;n.push(r({},(0,s.formatPlaylist)(m),{can_edit:l().spotify.me&&m.owner.id==l().spotify.me.id,tracks_total:m.tracks.total}))}}catch(e){u=!0,c=e}finally{try{!a&&p.return&&p.return()}finally{if(u)throw c}}i({type:"PLAYLISTS_LOADED",playlists:n}),i({type:"SPOTIFY_SEARCH_RESULTS_LOADED",context:"playlists",query:t,results:(0,o.arrayOf)("uri",n),more:e.playlists.next})}i(f.processFinished("SPOTIFY_GET_SEARCH_RESULTS_PROCESSOR"))}),(function(e){i(d.handleException("Could not load search results",e))}))}},t.getAutocompleteResults=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["album","artist","playlist","track"];return function(r,a){r({type:"SPOTIFY_AUTOCOMPLETE_LOADING",field_id:e});var o=n.includes("genre");if(o){var i=n.indexOf("genre");n.splice(i,1)}var s="search?q="+t;s+="&type="+n.join(","),s+="&country="+a().spotify.country,h(r,a,s).then((function(n){var i=[];if(o){var s=a().spotify.genres;if(s)for(var l=0;l0&&void 0!==arguments[0]?arguments[0]:null;return{type:"SPOTIFY_AUTOCOMPLETE_CLEAR",field_id:e}},t.following=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET";return function(n,r){var o=(0,i.uriType)(e),s=void 0,u=void 0,c=null,p=r().core[o+"s"]&&r().core[o+"s"][e];switch("PUT"==t?c=!0:"DELETE"==t&&(c=!1),o){case"track":s="GET"==t?"me/tracks/contains?ids="+(0,i.getFromUri)("trackid",e):"me/tracks?ids="+(0,i.getFromUri)("trackid",e);break;case"album":s="GET"==t?"me/albums/contains?ids="+(0,i.getFromUri)("albumid",e):"me/albums?ids="+(0,i.getFromUri)("albumid",e);break;case"artist":"GET"==t?s="me/following/contains?type=artist&ids="+(0,i.getFromUri)("artistid",e):(s="me/following?type=artist&ids="+(0,i.getFromUri)("artistid",e),u={});break;case"user":"GET"==t?s="me/following/contains?type=user&ids="+(0,i.getFromUri)("userid",e):(s="me/following?type=user&ids="+(0,i.getFromUri)("userid",e),u={});break;case"playlist":s="GET"==t?"playlists/"+(0,i.getFromUri)("playlistid",e)+"/followers/contains?ids="+r().spotify.me.id:"playlists/"+(0,i.getFromUri)("playlistid",e)+"/followers?"}h(n,r,s,t,u).then((function(r){c=Array.isArray(r)&&r.length>0?r[0]:c,n({type:"SPOTIFY_LIBRARY_"+o.toUpperCase()+"_CHECK",key:e,in_library:c}),"DELETE"===t?n(f.createNotification({content:a.default.createElement("span",null,"Removed ",a.default.createElement(l.default,{uri:e},p?p.name:o)," from library")})):"PUT"!==t&&"POST"!==t||n(f.createNotification({content:a.default.createElement("span",null,"Added ",a.default.createElement(l.default,{uri:e},p?p.name:o)," to library")}))}),(function(e){n(d.handleException("Could not follow/unfollow",e))}))}},t.resolveRadioSeeds=function(e){return function(t,n){if(e.seed_artists.length>0){for(var r="",a=0;a0&&(r+=","),r+=(0,i.getFromUri)("artistid",e.seed_artists[a]);h(t,n,"artists?ids="+r).then((function(e){e&&e.artists?t({type:"ARTISTS_LOADED",artists:e.artists}):console.error("No Spotify artists returned",r)}),(function(e){t(d.handleException("Could not resolve radio artist seeds",e))}))}if(e.seed_tracks.length>0){var o="";for(a=0;a0&&(o+=","),o+=(0,i.getFromUri)("trackid",e.seed_tracks[a]);h(t,n,"tracks?ids="+o).then((function(e){t({type:"TRACKS_LOADED",tracks:e.tracks})}),(function(e){t(d.handleException("Could not load radio track seeds",e))}))}}},t.getFavorites=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"long_term";return function(a,o){a({type:"SPOTIFY_FAVORITES_LOADED",artists:[],tracks:[]}),e.when(h(a,o,"me/top/artists?limit="+t+"&time_range="+n),h(a,o,"me/top/tracks?limit="+t+"&time_range="+n)).then((function(e,t){a({type:"SPOTIFY_FAVORITES_LOADED",artists:e.items,tracks:t.items})}),(function(e,t){a(d.handleException("Could not load favorites",r({},e,t)))}))}},t.getRecommendations=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return function(r,a){r({type:"CLEAR_SPOTIFY_RECOMMENDATIONS"});for(var s=[],l=[],u=[],c=0;c0){var r={uri:e.uri,images:n.artists.items[0].images};t(d.artistLoaded(r))}}),(function(e){t(d.handleException("Could not load artists",e))}))}},t.playArtistTopTracks=function(e){return function(t,n){var r=n().core.artists;if(void 0!==r[e]&&void 0!==r[e].tracks){var a=(0,o.arrayOf)("uri",r[e].tracks);t(p.playURIs(a,e))}else h(t,n,"artists/"+(0,i.getFromUri)("artistid",e)+"/top-tracks?country="+n().spotify.country).then((function(n){var r=(0,o.arrayOf)("uri",n.tracks);t(p.playURIs(r,e))}),(function(e){t(d.handleException("Could not play artist's top tracks",e))}))}},t.getUser=function(e){return function(t,n){h(t,n,"users/"+(0,i.getFromUri)("userid",e)).then((function(e){t(d.userLoaded((0,s.formatUser)(e)))}),(function(e){t(d.handleException("Could not load user",e))}))}},t.getUserPlaylists=function(e){return function(t,n){h(t,n,"users/"+(0,i.getFromUri)("userid",e)+"/playlists?limit=40").then((function(a){var o=[],i=!0,l=!1,u=void 0;try{for(var c,f=a.items[Symbol.iterator]();!(i=(c=f.next()).done);i=!0){var p=c.value,m=!1;n().spotify.me&&p.owner.id==n().spotify.me.id&&(m=!0);var h=r({},(0,s.formatPlaylist)(p),{can_edit:m,tracks_total:p.tracks.total});o.push(h)}}catch(e){l=!0,u=e}finally{try{!i&&f.return&&f.return()}finally{if(l)throw u}}t(d.userPlaylistsLoaded(e,o,a.next,a.total))}),(function(e){t(d.handleException("Could not load user's playlists",e))}))}},t.getAlbum=function(e){return function(t,n){h(t,n,"albums/"+(0,i.getFromUri)("albumid",e)).then((function(e){t(d.artistsLoaded(e.artists));for(var a=Object.assign([],e.tracks.items),l=r({},(0,s.formatAlbum)(e),{artists_uris:(0,o.arrayOf)("uri",e.artists),tracks_uris:(0,o.arrayOf)("uri",a),tracks_more:e.tracks.next,tracks_total:e.tracks.total}),u=0;u1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;return function(s,l){s(f.startProcess("SPOTIFY_GET_ALL_PLAYLIST_TRACKS_PROCESSOR","Loading playlist tracks",{uri:e,next:"playlists/"+(0,i.getFromUri)("playlistid",e)+"/tracks?market="+l().spotify.country,shuffle:t,play_next:r,at_position:a,offset:o,callback_action:n}))}},t.getAllPlaylistTracksProcessor=function(e){return function(t,n){h(t,n,e.next).then((function(a){if(void 0!==n().ui.processes.SPOTIFY_GET_ALL_PLAYLIST_TRACKS_PROCESSOR&&"cancelling"==n().ui.processes.SPOTIFY_GET_ALL_PLAYLIST_TRACKS_PROCESSOR.status)return t(f.processCancelled("SPOTIFY_GET_ALL_PLAYLIST_TRACKS_PROCESSOR")),!1;var i=[],s=[],l=!0,u=!1,d=void 0;try{for(var m,h=a.items[Symbol.iterator]();!(l=(m=h.next()).done);l=!0){var _=m.value;_.track&&s.push(_.track.uri)}}catch(e){u=!0,d=e}finally{try{!l&&h.return&&h.return()}finally{if(u)throw d}}i=e.uris?[].concat(c(e.uris),s):s,a.next?(t(f.updateProcess("SPOTIFY_GET_ALL_PLAYLIST_TRACKS_PROCESSOR","Loading "+(a.total-i.length)+" playlist tracks",r({},e,{next:a.next,total:a.total,remaining:a.total-i.length}))),t(f.runProcess("SPOTIFY_GET_ALL_PLAYLIST_TRACKS_PROCESSOR",r({},e,{next:a.next,uris:i})))):(e.shuffle&&(i=(0,o.shuffle)(i)),t(f.removeProcess("SPOTIFY_GET_ALL_PLAYLIST_TRACKS_PROCESSOR")),"enqueue"==e.callback_action?t(p.enqueueURIs(i,e.uri,e.play_next,e.at_position,e.offset)):t(p.playURIs(i,e.uri)))}),(function(e){t(d.handleException("Could not load tracks to play playlist",e))}))}},t.addTracksToPlaylist=function(e,t){return function(n,r){h(n,r,"playlists/"+(0,i.getFromUri)("playlistid",e)+"/tracks","POST",{uris:t}).then((function(r){n({type:"PLAYLIST_TRACKS_ADDED",key:e,tracks_uris:t,snapshot_id:r.snapshot_id})}),(function(e){n(d.handleException("Could not add tracks to playlist",e))}))}},t.deleteTracksFromPlaylist=function(e,t,n){return function(r,a){h(r,a,"playlists/"+(0,i.getFromUri)("playlistid",e)+"/tracks","DELETE",{snapshot_id:t,positions:n}).then((function(t){r({type:"PLAYLIST_TRACKS_REMOVED",key:e,tracks_indexes:n,snapshot_id:t.snapshot_id})}),(function(e){r(d.handleException("Could not remove tracks from playlist",e))}))}},t.reorderPlaylistTracks=function(e,t,n,r,a){return function(o,s){h(o,s,"playlists/"+(0,i.getFromUri)("playlistid",e)+"/tracks","PUT",{uri:e,range_start:t,range_length:n,insert_before:r,snapshot_id:a}).then((function(a){o({type:"PLAYLIST_TRACKS_REORDERED",key:e,range_start:t,range_length:n,insert_before:r,snapshot_id:a.snapshot_id})}),(function(e){o(d.handleException("Could not reorder playlist tracks",e))}))}},t.flushLibrary=function(){return{type:"SPOTIFY_FLUSH_LIBRARY"}},t.getLibraryPlaylists=function(){return function(e,t){var n=t().ui.processes.SPOTIFY_GET_LIBRARY_PLAYLISTS_PROCESSOR;n?"cancelled"==n.status?e(f.resumeProcess("SPOTIFY_GET_LIBRARY_PLAYLISTS_PROCESSOR")):"finished"!=n.status||t().spotify.library_playlists_loaded_all||e(f.startProcess("SPOTIFY_GET_LIBRARY_PLAYLISTS_PROCESSOR","Loading Spotify playlists",{next:"me/playlists?limit=50"})):e(f.startProcess("SPOTIFY_GET_LIBRARY_PLAYLISTS_PROCESSOR","Loading Spotify playlists",{next:"me/playlists?limit=50"}))}},t.getLibraryPlaylistsProcessor=function(e){return function(t,n){h(t,n,e.next).then((function(e){if((t({type:"SPOTIFY_LIBRARY_PLAYLISTS_LOADED",playlists:e.items}),void 0!==n().ui.processes.SPOTIFY_GET_LIBRARY_PLAYLISTS_PROCESSOR)&&"cancelling"==n().ui.processes.SPOTIFY_GET_LIBRARY_PLAYLISTS_PROCESSOR.status)return t(f.processCancelled("SPOTIFY_GET_LIBRARY_PLAYLISTS_PROCESSOR")),!1;if(e.next){var r=e.total-n().spotify.library_playlists.length;t(f.updateProcess("SPOTIFY_GET_LIBRARY_PLAYLISTS_PROCESSOR","Loading "+r+" Spotify playlists",{next:e.next,total:e.total,remaining:r})),t(f.runProcess("SPOTIFY_GET_LIBRARY_PLAYLISTS_PROCESSOR",{next:e.next}))}else t(f.processFinished("SPOTIFY_GET_LIBRARY_PLAYLISTS_PROCESSOR")),t({type:"SPOTIFY_LIBRARY_PLAYLISTS_LOADED_ALL"})}),(function(e){t(d.handleException("Could not load library playlists",e))}))}},t.getLibraryArtists=function(){return function(e,t){var n=t().ui.processes.SPOTIFY_GET_LIBRARY_ARTISTS_PROCESSOR;n?"cancelled"==n.status?e(f.resumeProcess("SPOTIFY_GET_LIBRARY_ARTISTS_PROCESSOR")):"finished"!=n.status||t().spotify.library_artists_loaded_all||e(f.startProcess("SPOTIFY_GET_LIBRARY_ARTISTS_PROCESSOR","Loading Spotify artists",{next:"me/following?type=artist&limit=50"})):e(f.startProcess("SPOTIFY_GET_LIBRARY_ARTISTS_PROCESSOR","Loading Spotify artists",{next:"me/following?type=artist&limit=50"}))}},t.getLibraryArtistsProcessor=function(e){return function(t,n){h(t,n,e.next).then((function(e){if((t({type:"SPOTIFY_LIBRARY_ARTISTS_LOADED",artists:e.artists.items}),void 0!==n().ui.processes.SPOTIFY_GET_LIBRARY_ARTISTS_PROCESSOR)&&"cancelling"==n().ui.processes.SPOTIFY_GET_LIBRARY_ARTISTS_PROCESSOR.status)return t(f.processCancelled("SPOTIFY_GET_LIBRARY_ARTISTS_PROCESSOR")),!1;if(e.artists.next){var r=e.artists.total-n().spotify.library_artists.length;t(f.updateProcess("SPOTIFY_GET_LIBRARY_ARTISTS_PROCESSOR","Loading "+r+" Spotify artists",{next:e.artists.next,total:e.artists.total,remaining:r})),t(f.runProcess("SPOTIFY_GET_LIBRARY_ARTISTS_PROCESSOR",{next:e.artists.next}))}else t(f.processFinished("SPOTIFY_GET_LIBRARY_ARTISTS_PROCESSOR"))}),(function(e){t(d.handleException("Could not load library artists",e))}))}},t.getLibraryAlbums=function(){return function(e,t){var n=t().ui.processes.SPOTIFY_GET_LIBRARY_ALBUMS_PROCESSOR;n?"cancelled"==n.status?e(f.updateProcess("SPOTIFY_GET_LIBRARY_ALBUMS_PROCESSOR","Loading Spotify albums",{next:"me/albums?limit=50"})):"finished"!=n.status||t().spotify.library_albums_loaded_all||e(f.startProcess("SPOTIFY_GET_LIBRARY_ALBUMS_PROCESSOR","Loading Spotify albums",{next:"me/albums?limit=50"})):e(f.startProcess("SPOTIFY_GET_LIBRARY_ALBUMS_PROCESSOR","Loading Spotify albums",{next:"me/albums?limit=50"}))}},t.getLibraryAlbumsProcessor=function(e){return function(t,n){h(t,n,e.next).then((function(e){if((t({type:"SPOTIFY_LIBRARY_ALBUMS_LOADED",albums:e.items}),void 0!==n().ui.processes.SPOTIFY_GET_LIBRARY_ALBUMS_PROCESSOR)&&"cancelling"==n().ui.processes.SPOTIFY_GET_LIBRARY_ALBUMS_PROCESSOR.status)return t(f.processCancelled("SPOTIFY_GET_LIBRARY_ALBUMS_PROCESSOR")),!1;if(e.next){var r=e.total-n().spotify.library_albums.length;t(f.updateProcess("SPOTIFY_GET_LIBRARY_ALBUMS_PROCESSOR","Loading "+r+" Spotify albums",{next:e.next,total:e.total,remaining:r})),t(f.runProcess("SPOTIFY_GET_LIBRARY_ALBUMS_PROCESSOR",{next:e.next}))}else t(f.processFinished("SPOTIFY_GET_LIBRARY_ALBUMS_PROCESSOR"))}),(function(e){t(d.handleException("Could not load library albums",e))}))}};var a=u(n(0)),o=n(10),i=n(5),s=n(11),l=u(n(23));function u(e){return e&&e.__esModule?e:{default:e}}function c(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t3&&void 0!==arguments[3]?arguments[3]:"GET",a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=(arguments.length>5&&void 0!==arguments[5]&&arguments[5],(0,i.generateGuid)());return e(f.startLoading(o,"spotify_"+n)),new Promise((function(i,s){_(e,t).then((function(l){var u="https://api.spotify.com/v1/"+n;n.startsWith("https://api.spotify.com/")&&(u=n);var c={method:r,timeout:3e4,headers:{Authorization:"Bearer "+l,Accept:"application/json"}};a&&(c.body="string"==typeof a?a:JSON.stringify(a)),fetch(u,c).then((function(t){return e(f.stopLoading(o)),429===t.status&&console.error("You hit the Spotify API rate limiter"),t.text().then((function(e){return e?JSON.parse(e):{}}))})).then((function(n){n&&n.error&&"The access token expired"===n.error.message&&e(y(e,t)),i(n)})).catch((function(e){s(e)}))}),(function(t){e(d.handleException(t.error)),s(t)}))}))};function _(e,t){return new Promise((function(n,r){t().spotify.token_expiry&&(new Date).getTime()1&&void 0!==arguments[1]&&arguments[1];return function(r,a){var s={},l=[h(r,a,"artists/"+(0,i.getFromUri)("artistid",t),"GET",!1,!0).then((function(e){Object.assign(s,e)}),(function(e){r(d.handleException("Could not load artist",e))}))];n&&(l.push(h(r,a,"artists/"+(0,i.getFromUri)("artistid",t)+"/top-tracks?country="+a().spotify.country).then((function(e){Object.assign(s,e)}),(function(e){r(d.handleException("Could not load artist's top tracks",e))}))),l.push(h(r,a,"artists/"+(0,i.getFromUri)("artistid",t)+"/related-artists").then((function(e){r(d.artistsLoaded(e.artists)),Object.assign(s,{related_artists_uris:(0,o.arrayOf)("uri",e.artists)})}),(function(e){r(d.handleException("Could not load artist's related artists",e))})))),e.when.apply(e,l).then((function(){s.musicbrainz_id?r(m.getArtist(s.uri,!1,s.musicbrainz_id)):r(m.getArtist(s.uri,s.name.replace("&","and"))),r(d.artistLoaded(s)),n&&h(r,a,"artists/"+(0,i.getFromUri)("artistid",t)+"/albums?market="+a().spotify.country).then((function(e){r({type:"SPOTIFY_ARTIST_ALBUMS_LOADED",artist_uri:t,data:e})}),(function(e){r(d.handleException("Could not load artist's albums",e))}))}))}}}).call(this,n(25))},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.getBroadcasts=function(){return function(t,n){var r={method:"GET",timeout:15e3};n().ui.test_mode?r.url="https://gist.githubusercontent.com/jaedb/cb3a5ee6909632abb2e0fe66d4c8c311/raw":r.url="https://gist.githubusercontent.com/jaedb/b677dccf80daf3ccb2ef12e96e495677/raw",e.ajax(r).then((function(e){t({type:"BROADCASTS_LOADED",broadcasts:JSON.parse(e)})}),(function(e,n,a){t(s("Could not fetch broadcasts from GitHub",{config:r,xhr:e,status:n,error:a},null,!1))}))}},t.startSearch=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"SEARCH_STARTED",search_type:e,query:t,only_mopidy:n}},t.handleException=s,t.debugResponse=function(e){return{type:"DEBUG",response:e}},t.set=function(e){return{type:"CORE_SET",data:e}},t.clearCurrentTrack=function(){return{type:"CLEAR_CURRENT_TRACK"}},t.cachebustHttpStream=function(){return{type:"CACHEBUST_HTTP_STREAM"}},t.loadTrack=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:"LOAD_TRACK",uri:e,force_reload:t}},t.loadAlbum=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:"LOAD_ALBUM",uri:e,force_reload:t}},t.loadArtist=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:"LOAD_ARTIST",uri:e,force_reload:t}},t.loadPlaylist=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:"LOAD_PLAYLIST",uri:e,force_reload:t}},t.loadUser=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:"LOAD_USER",uri:e,force_reload:t}},t.loadUserPlaylists=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:"LOAD_USER_PLAYLISTS",uri:e,force_reload:t}},t.trackLoaded=function(e){return l([e])},t.tracksLoaded=l,t.artistLoaded=function(e){return u([e])},t.artistsLoaded=u,t.albumLoaded=function(e){return c([e])},t.albumsLoaded=c,t.playlistLoaded=function(e){return d([e])},t.playlistsLoaded=d,t.userLoaded=function(e){return f([e])},t.usersLoaded=f,t.userPlaylistsLoaded=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return{type:"USER_PLAYLISTS_LOADED",uri:e,playlists:t,more:n,total:r}},t.loadedMore=function(e,t,n,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return{type:"LOADED_MORE",parent_type:e,parent_key:t,records_type:n,records_data:r,extra_data:a}},t.removeFromIndex=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:"REMOVE_FROM_INDEX",index_name:e,key:t,new_key:n}},t.reorderPlaylistTracks=function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=(0,r.createRange)(t);switch((0,a.uriSource)(e)){case"spotify":return{type:"SPOTIFY_REORDER_PLAYLIST_TRACKS",key:e,range_start:i.start,range_length:i.length,insert_before:n,snapshot_id:o};case"m3u":return{type:"MOPIDY_REORDER_PLAYLIST_TRACKS",key:e,range_start:i.start,range_length:i.length,insert_before:n}}},t.savePlaylist=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;switch((0,a.uriSource)(e)){case"spotify":return{type:"SPOTIFY_SAVE_PLAYLIST",key:e,name:t,description:""==n?null:n,image:i,is_public:r,is_collaborative:o};case"m3u":return{type:"MOPIDY_SAVE_PLAYLIST",key:e,name:t}}return!1},t.createPlaylist=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];switch(e){case"spotify":return""==n&&(n=null),o.createPlaylist(t,n,r,a);default:return i.createPlaylist(t,e)}return!1},t.deletePlaylist=function(e){switch((0,a.uriSource)(e)){case"spotify":return o.following(e,"DELETE");default:return i.deletePlaylist(e)}return!1},t.removeTracksFromPlaylist=function(e,t){switch((0,a.uriSource)(e)){case"spotify":return{type:"SPOTIFY_REMOVE_PLAYLIST_TRACKS",key:e,tracks_indexes:t};case"m3u":return{type:"MOPIDY_REMOVE_PLAYLIST_TRACKS",key:e,tracks_indexes:t}}},t.addTracksToPlaylist=function(e,t){switch((0,a.uriSource)(e)){case"spotify":return{type:"SPOTIFY_ADD_PLAYLIST_TRACKS",key:e,tracks_uris:t};case"m3u":return{type:"MOPIDY_ADD_PLAYLIST_TRACKS",key:e,tracks_uris:t}}},t.getLibraryPlaylists=function(){return{type:"GET_LIBRARY_PLAYLISTS"}},t.getLibraryAlbums=function(){return{type:"GET_LIBRARY_ALBUMS"}},t.getLibraryArtists=function(){return{type:"GET_LIBRARY_ARTISTS"}};var r=n(10),a=n(5),o=n(8),i=n(7);function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return!e&&t.message?e=t.message:!e&&t.error.message&&(e=t.error.message),!n&&t.description?n=t.description:!n&&t.error&&t.error.description&&(n=t.error.description),{type:"HANDLE_EXCEPTION",message:e,description:n,data:t,show_notification:r}}function l(e){return{type:"TRACKS_LOADED",tracks:e}}function u(e){return{type:"ARTISTS_LOADED",artists:e}}function c(e){return{type:"ALBUMS_LOADED",albums:e}}function d(e){return{type:"PLAYLISTS_LOADED",playlists:e}}function f(e){return{type:"USERS_LOADED",users:e}}}).call(this,n(25))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.indexToArray=t.shuffle=t.sortItems=t.createRange=t.applyFilter=t.removeDuplicates=t.mergeDuplicates=t.arrayOf=void 0;var r=Object.assign||function(e){for(var t=1;t3&&void 0!==arguments[3]&&arguments[3],a=[],o=0;o2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(!e||e.length<=0)return[];function o(e){var n=t.split("."),r=!0,a=!1,o=void 0;try{for(var i,s=n[Symbol.iterator]();!(r=(i=s.next()).done);r=!0){var l=i.value;if("first"==l){if(Array.isArray(e)&&e.length>0){e=e[0];continue}return null}if("length"==l)return Array.isArray(e)?e.length:0;if(void 0===e[l])return null;e=e[l]}}catch(e){a=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(a)throw o}}return e}function i(e,n){var i=o(e),s=o(n);if("uri"==t&&(i=(0,a.uriSource)(i),s=(0,a.uriSource)(s)),!r)return"boolean"==typeof i&&"boolean"==typeof s?i&&!s?-1:!i&&s?1:0:"number"==typeof i&&"number"==typeof s?null==i&&null==s?0:null==i?-1:null==s||parseInt(i)>parseInt(s)?1:parseInt(i)s.toLowerCase()?1:i.toLowerCase()u?-1:void 0}var s=Object.assign([],e.sort(i));return n&&s.reverse(),s},f=function(e){var t=void 0,n=void 0,r=void 0;for(r=e.length-1;r>0;r--)t=Math.floor(Math.random()*(r+1)),n=e[r],e[r]=e[t],e[t]=n;return e};t.arrayOf=i,t.mergeDuplicates=s,t.removeDuplicates=l,t.applyFilter=u,t.createRange=c,t.sortItems=d,t.shuffle=f,t.indexToArray=o,t.default={arrayOf:i,mergeDuplicates:s,removeDuplicates:l,applyFilter:u,createRange:c,sortItems:d,shuffle:f,indexToArray:o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.collate=t.formatGroup=t.formatClient=t.formatTracks=t.formatTrack=t.formatUsers=t.formatUser=t.formatPlaylists=t.formatPlaylist=t.formatArtists=t.formatArtist=t.formatAlbums=t.formatAlbum=t.formatSimpleObject=t.formatImages=t.digestMopidyImages=t.getTrackIcon=t.toJSON=void 0;var r=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t)return!1;if(!e)return!1;if(void 0===e.uri)return!1;if(void 0===t.tracks[e.uri])return!1;var n=t.tracks[e.uri];return!!n.images&&u(n.images).small},l=function(e,t){for(var n=[],r=0;r0&&void 0!==arguments[0]?arguments[0]:[],t=[],n=!0,r=!1,a=void 0;try{for(var o,i=e[Symbol.iterator]();!(n=(o=i.next()).done);n=!0){var s=o.value;t.push(b(s))}}catch(e){r=!0,a=e}finally{try{!n&&i.return&&i.return()}finally{if(r)throw a}}return t},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],n=!0,r=!1,a=void 0;try{for(var o,i=e[Symbol.iterator]();!(n=(o=i.next()).done);n=!0){var s=o.value;t.push(_(s))}}catch(e){r=!0,a=e}finally{try{!n&&i.return&&i.return()}finally{if(r)throw a}}return t},p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],n=!0,r=!1,a=void 0;try{for(var o,i=e[Symbol.iterator]();!(n=(o=i.next()).done);n=!0){var s=o.value;t.push(y(s))}}catch(e){r=!0,a=e}finally{try{!n&&i.return&&i.return()}finally{if(r)throw a}}return t},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],n=!0,r=!1,a=void 0;try{for(var o,i=e[Symbol.iterator]();!(n=(o=i.next()).done);n=!0){var s=o.value;t.push(b(s))}}catch(e){r=!0,a=e}finally{try{!n&&i.return&&i.return()}finally{if(r)throw a}}return t},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],n=!0,r=!1,a=void 0;try{for(var o,i=e[Symbol.iterator]();!(n=(o=i.next()).done);n=!0){var s=o.value;t.push(g(s))}}catch(e){r=!0,a=e}finally{try{!n&&i.return&&i.return()}finally{if(r)throw a}}return t},_=function(e){var t={},n=!0,r=!1,a=void 0;try{for(var i,s=["uri","provider","name","type","last_modified","added_at","release_date","listeners","play_count","wiki","wiki_publish_date","popularity","images","artists_uris","tracks_uris","tracks_total","tracks_more","artists"][Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var l=i.value;e.hasOwnProperty(l)&&(t[l]=e[l])}}catch(e){r=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(r)throw a}}return t.images&&!t.images.formatted&&(t.images=u(t.images)),e.last_modified&&void 0===t.added_at?t.added_at=e.last_modified:e.added_at&&void 0===t.last_modified&&(t.last_modified=e.added_at),e.date&&!t.date&&(t.release_date=e.date),e.album_type&&(t.type=e.album_type),void 0===t.provider&&void 0!==t.uri&&(t.provider=(0,o.uriSource)(t.uri)),t},y=function(e){var t={},n=!0,r=!1,a=void 0;try{for(var i,s=["uri","provider","mbid","name","type","popularity","followers","listeners","added_at","biography","biography_link","biography_publish_date","related_artists_uris","albums_uris","albums_total","albums_more","tracks_uris","tracks_total","tracks_more"][Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var l=i.value;e.hasOwnProperty(l)&&(t[l]=e[l])}}catch(e){r=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(r)throw a}}return e.images&&e.images.length>0&&(t.images=[u(e.images)]),e.followers&&void 0!==e.followers.total&&(t.followers=e.followers.total),e.bio&&(e.bio.content&&!t.biography&&(t.biography=e.bio.content),e.bio.links&&e.bio.links.link&&e.bio.links.link.href&&!t.biography_link&&(t.biography_link=e.bio.links.link.href),e.bio.published&&!t.biography_publish_date&&(t.biography_publish_date=e.bio.published)),void 0===t.provider&&void 0!==t.uri&&(t.provider=(0,o.uriSource)(t.uri)),t},v=function(e){var t={},n=!0,r=!1,a=void 0;try{for(var i,s=["uri","snapshot_id","provider","type","collaborative","public","name","description","images","popularity","followers","last_modified","can_edit","owner","user_uri","tracks_uris","tracks_total","tracks_more"][Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var l=i.value;e.hasOwnProperty(l)&&(t[l]=e[l])}}catch(e){r=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(r)throw a}}return t.images&&!t.images.formatted&&(t.images=u(t.images)),e.last_modified_date&&void 0===t.last_modified&&(t.last_modified=e.last_modified_date),e.followers&&void 0!==e.followers.total&&(t.followers=e.followers.total),e.tracks&&void 0!==e.tracks.total&&(t.tracks_total=e.tracks.total),t.last_modified&&void 0===t.added_at?t.added_at=e.last_modified:t.added_at&&void 0===t.last_modified&&(t.last_modified=e.added_at),e.owner&&(t.owner={id:e.owner.id,uri:e.owner.uri,name:e.owner.display_name?e.owner.display_name:null},t.user_uri=e.owner.uri),t.uri=(0,o.upgradeSpotifyPlaylistUri)(t.uri),void 0===t.provider&&void 0!==t.uri&&(t.provider=(0,o.uriSource)(t.uri)),t},g=function(e){var t={},n=!0,r=!1,a=void 0;try{for(var i,s=["id","uri","provider","name","images","followers","playlists_uris","playlists_total","playlists_more"][Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var l=i.value;e.hasOwnProperty(l)&&(t[l]=e[l])}}catch(e){r=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(r)throw a}}return!t.images&&e.image?t.images=u(e.image):!t.images&&e.avatar?t.images=u(e.avatar):t.images&&!t.images.formatted&&(t.images=u(t.images)),e.followers&&void 0!==e.followers.total&&(t.followers=e.followers.total),e.realname&&(t.name=e.realname),e.display_name&&!t.name&&(t.name=e.display_name),e.id&&!t.name&&(t.name=e.id),void 0===t.provider&&void 0!==t.uri&&(t.provider=(0,o.uriSource)(t.uri)),t},b=function(e){var t={};e&&e.track&&(0,o.isObject)(e.track)&&(e.added_by&&(e.track.added_by=e.added_by),e.added_at&&(e.track.added_at=e.added_at),e.tlid&&(e.track.tlid=e.tlid),e=e.track);var n=!0,r=!1,a=void 0;try{for(var i,s=["uri","tlid","provider","name","images","release_date","disc_number","track_number","duration","followers","popularity","userloved","last_modified","added_at","is_explicit","is_local","lyrics","lyrics_path","lyrics_results","artists","album"][Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var l=i.value;e.hasOwnProperty(l)&&(t[l]=e[l])}}catch(e){r=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(r)throw a}}return e.followers&&e.followers.total&&(t.followers=e.followers.total),t.last_modified&&void 0===t.added_at?t.added_at=t.last_modified:t.added_at&&void 0===t.last_modified&&(t.last_modified=t.added_at),void 0===t.duration&&void 0!==e.duration_ms?t.duration=e.duration_ms:void 0===t.duration&&void 0!==e.length&&(t.duration=e.length),void 0===t.track_number&&void 0!==e.track_no&&(t.track_number=e.track_no),void 0===t.disc_number&&void 0!==e.disc_no&&(t.disc_number=e.disc_no),void 0===t.release_date&&void 0!==e.date&&(t.release_date=e.date),void 0===t.explicit&&void 0!==e.explicit&&(t.is_explicit=e.explicit),e.album&&e.album.images&&(void 0!==t.images&&t.images.formatted||(t.images=u(e.album.images))),void 0===t.provider&&void 0!==t.uri&&(t.provider=(0,o.uriSource)(t.uri)),t},E=function(e){var t={},n=!0,r=!1,o=void 0;try{for(var i,s=["id","connected","name","host_name","volume","mute","latency","power_on_command","power_off_command"][Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var l=i.value;e.hasOwnProperty(l)&&(t[l]=e[l])}}catch(e){r=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(r)throw o}}return e.config?(void 0===t.latency&&void 0!==e.config.latency&&(t.latency=e.config.latency),!t.name&&e.config.name&&(t.name=e.config.name),void 0!==e.config.volume&&(void 0!==e.config.volume.percent&&(t.volume=e.config.volume.percent),e.config.volume.muted&&(t.mute=e.config.volume.muted))):(void 0===t.latency&&void 0!==e.latency&&(t.latency=e.latency),"object"===a(e.volume)&&(e.volume.percent&&(t.volume=e.volume.percent),e.volume.muted&&(t.mute=e.volume.muted))),void 0===t.name&&e.host&&e.host.name&&(t.name=e.host.name),t},k=function(e){var t={},n=!0,r=!1,a=void 0;try{for(var o,i=["id","name","mute","volume","stream_id","clients_ids"][Symbol.iterator]();!(n=(o=i.next()).done);n=!0){var s=o.value;e.hasOwnProperty(s)&&(t[s]=e[s])}}catch(e){r=!0,a=e}finally{try{!n&&i.return&&i.return()}finally{if(r)throw a}}return void 0===t.mute&&void 0!==e.muted&&(t.mute=e.muted),t},w=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(void 0!==(e=r({},e)).artists_uris&&(e.artists=[]),void 0!==e.albums_uris&&(e.albums=[]),void 0!==e.tracks_uris&&(e.tracks=[]),void 0!==e.users_uris&&(e.users=[]),void 0!==e.playlists_uris&&(e.playlists=[]),void 0!==e.related_artists_uris&&(e.related_artists=[]),void 0!==e.clients_ids&&(e.clients=[]),t.artists){if(e.artists_uris){var n=!0,a=!1,o=void 0;try{for(var i,s=e.artists_uris[Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var l=i.value;t.artists[l]&&e.artists.push(t.artists[l])}}catch(e){a=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(a)throw o}}}if(e.related_artists_uris){var u=!0,c=!1,d=void 0;try{for(var f,p=e.related_artists_uris[Symbol.iterator]();!(u=(f=p.next()).done);u=!0){l=f.value;t.artists[l]&&e.related_artists.push(t.artists[l])}}catch(e){c=!0,d=e}finally{try{!u&&p.return&&p.return()}finally{if(c)throw d}}}e.artist_uri&&t.artists[e.artist_uri]&&(e.artist=t.artists[e.artist_uri])}if(t.albums){if(e.albums_uris){var m=!0,h=!1,_=void 0;try{for(var y,v=e.albums_uris[Symbol.iterator]();!(m=(y=v.next()).done);m=!0){l=y.value;t.albums[l]&&e.albums.push(t.albums[l])}}catch(e){h=!0,_=e}finally{try{!m&&v.return&&v.return()}finally{if(h)throw _}}}e.album_uri&&t.albums[e.album_uri]&&(e.album=t.albums[e.album_uri])}if(t.tracks){if(e.tracks_uris){var g=!0,b=!1,E=void 0;try{for(var k,w=e.tracks_uris[Symbol.iterator]();!(g=(k=w.next()).done);g=!0){l=k.value;t.tracks[l]&&e.tracks.push(t.tracks[l])}}catch(e){b=!0,E=e}finally{try{!g&&w.return&&w.return()}finally{if(b)throw E}}}e.track_uri&&t.tracks[e.track_uri]&&(e.track=t.tracks[e.track_uri])}if(t.users){if(e.users_uris){var S=!0,O=!1,T=void 0;try{for(var A,C=e.users_uris[Symbol.iterator]();!(S=(A=C.next()).done);S=!0){l=A.value;t.users[l]&&e.users.push(t.users[l])}}catch(e){O=!0,T=e}finally{try{!S&&C.return&&C.return()}finally{if(O)throw T}}}e.user_uri&&t.users[e.user_uri]&&(e.user=t.users[e.user_uri])}if(t.playlists){if(e.playlists_uris){var x=!0,P=!1,N=void 0;try{for(var R,D=e.playlists_uris[Symbol.iterator]();!(x=(R=D.next()).done);x=!0){l=R.value;t.playlists[l]&&e.playlists.push(t.playlists[l])}}catch(e){P=!0,N=e}finally{try{!x&&D.return&&D.return()}finally{if(P)throw N}}}e.playlist_uri&&t.playlists[e.playlist_uri]&&(e.playlist=t.playlists[e.playlist_uri])}if(t.clients&&e.clients_ids){var M=!0,L=!1,I=void 0;try{for(var j,U=e.clients_ids[Symbol.iterator]();!(M=(j=U.next()).done);M=!0){var Y=j.value;t.clients[Y]&&e.clients.push(t.clients[Y])}}catch(e){L=!0,I=e}finally{try{!M&&U.return&&U.return()}finally{if(L)throw I}}}return e};t.toJSON=i,t.getTrackIcon=s,t.digestMopidyImages=l,t.formatImages=u,t.formatSimpleObject=c,t.formatAlbum=_,t.formatAlbums=f,t.formatArtist=y,t.formatArtists=p,t.formatPlaylist=v,t.formatPlaylists=m,t.formatUser=g,t.formatUsers=h,t.formatTrack=b,t.formatTracks=d,t.formatClient=E,t.formatGroup=k,t.collate=w,t.default={toJSON:i,getTrackIcon:s,digestMopidyImages:l,formatImages:u,formatSimpleObject:c,formatAlbum:_,formatAlbums:f,formatArtist:y,formatArtists:p,formatPlaylist:v,formatPlaylists:m,formatUser:g,formatUsers:h,formatTrack:b,formatTracks:d,formatClient:E,formatGroup:k,collate:w}},,function(e,t,n){"use strict";function r(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return h(e,Error)}}function a(e){return"[object ErrorEvent]"===Object.prototype.toString.call(e)}function o(e){return"[object DOMError]"===Object.prototype.toString.call(e)}function i(e){return"[object DOMException]"===Object.prototype.toString.call(e)}function s(e){return"[object String]"===Object.prototype.toString.call(e)}function l(e){return null===e||"object"!=typeof e&&"function"!=typeof e}function u(e){return"[object Object]"===Object.prototype.toString.call(e)}function c(e){return"undefined"!=typeof Event&&h(e,Event)}function d(e){return"undefined"!=typeof Element&&h(e,Element)}function f(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function p(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function m(e){return u(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function h(e,t){try{return e instanceof t}catch(e){return!1}}n.d(t,"d",(function(){return r})),n.d(t,"e",(function(){return a})),n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i})),n.d(t,"k",(function(){return s})),n.d(t,"i",(function(){return l})),n.d(t,"h",(function(){return u})),n.d(t,"f",(function(){return c})),n.d(t,"c",(function(){return d})),n.d(t,"j",(function(){return f})),n.d(t,"m",(function(){return p})),n.d(t,"l",(function(){return m})),n.d(t,"g",(function(){return h}))},function(e,t,n){e.exports=n(95)()},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1];return{type:"PUSHER_SET_USERNAME",username:e.replace(/[\W_]+/g,""),force:t}},t.connect=function(){return{type:"PUSHER_CONNECT"}},t.disconnect=function(){return{type:"PUSHER_DISCONNECT"}},t.upgrade=function(){return{type:"PUSHER_UPGRADE"}},t.reload=function(){return{type:"PUSHER_RELOAD"}},t.restart=function(){return{type:"PUSHER_RESTART"}},t.localScan=function(){return{type:"PUSHER_LOCAL_SCAN"}},t.getConnections=function(){return{type:"PUSHER_GET_CONNECTIONS"}},t.connectionAdded=function(e){return{type:"PUSHER_CONNECTION_ADDED",connection:e}},t.updateConnection=function(e){return{type:"PUSHER_UPDATE_CONNECTION",connection:e}},t.connectionChanged=function(e){return{type:"PUSHER_CONNECTION_CHANGED",connection:e}},t.connectionRemoved=function(e){return{type:"PUSHER_CONNECTION_REMOVED",connection:e}},t.request=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return{type:"PUSHER_REQUEST",method:e,params:t,response_callback:n,error_callback:r}},t.getConfig=function(){return{type:"PUSHER_GET_CONFIG"}},t.getVersion=function(){return{type:"PUSHER_GET_VERSION"}},t.deliverBroadcast=function(e,t){return{type:"PUSHER_DELIVER_BROADCAST",data:{method:e,params:t}}},t.deliverMessage=function(e,t,n){return{type:"PUSHER_DELIVER_MESSAGE",data:{recipient:e,method:t,params:n}}},t.getRadio=function(){return{type:"PUSHER_GET_RADIO"}},t.startRadio=function(e){return{type:"PUSHER_START_RADIO",uris:e}},t.updateRadio=function(e){return{type:"PUSHER_UPDATE_RADIO",uris:e}},t.stopRadio=function(){return{type:"PUSHER_STOP_RADIO"}},t.radioStarted=function(e){return{type:"PUSHER_RADIO_STARTED",radio:e}},t.radioChanged=function(e){return{type:"PUSHER_RADIO_CHANGED",radio:e}},t.radioStopped=function(){return{type:"PUSHER_RADIO_STOPPED"}},t.debug=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return{type:"PUSHER_DEBUG",message:e}},t.getQueueMetadata=function(){return{type:"PUSHER_GET_QUEUE_METADATA"}},t.queueMetadataChanged=function(e){return{type:"PUSHER_QUEUE_METADATA_CHANGED",queue_metadata:e}},t.addQueueMetadata=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:"PUSHER_ADD_QUEUE_METADATA",tlids:e,from_uri:t}},t.getCommands=function(){return{type:"PUSHER_GET_COMMANDS"}},t.setCommand=function(e){return{type:"PUSHER_SET_COMMAND",command:e}},t.setCommands=function(e){return{type:"PUSHER_SET_COMMANDS",commands:e}},t.removeCommand=function(e){return{type:"PUSHER_REMOVE_COMMAND",id:e}},t.runCommand=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:"PUSHER_RUN_COMMAND",id:e,notify:t}},t.commandsUpdated=function(e){return{type:"PUSHER_COMMANDS_UPDATED",commands:e}}},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a=Object.assign||function(e){for(var t=1;t2&&void 0!==arguments[2]&&arguments[2];return function(r,a){if(n)var o="method=artist.getInfo&mbid="+n;else{t=t.replace("&","and");o="method=artist.getInfo&artist="+(t=encodeURIComponent(t))}l(r,a,o).then((function(t){if(t.artist){var n={uri:e,mbid:t.artist.mbid,biography:t.artist.bio.content,biography_publish_date:t.artist.bio.published,biography_link:t.artist.bio.links.link.href,listeners:parseInt(t.artist.stats.listeners)};r(i.artistLoaded(n))}}),(function(e){}))}},t.getAlbum=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return function(a,o){if(r)var s="method=album.getInfo&mbid="+r;else{t=encodeURIComponent(t);s="method=album.getInfo&album="+(n=encodeURIComponent(n))+"&artist="+t}l(a,o,s).then((function(t){if(t.album){var n=o().core.albums[e],r={uri:e,images:t.album.image,listeners:parseInt(t.album.listeners),play_count:parseInt(t.album.playcount),mbid:t.album.mbid,wiki:t.album.wiki?t.album.wiki.content:null,wiki_publish_date:t.album.wiki?t.album.wiki.published:null};n&&n.images&&delete r.images,a(i.albumLoaded(r))}}),(function(e){}))}},t.getImages=function(e,t){return function(n,r){var o=r().core[e][t];if(o)switch(e){case"tracks":if(o.mbid)var s="method=album.getInfo&mbid="+o.mbid;else if((o=(0,a.collate)(o,{artists:r().core.artists})).artists&&o.artists.length>0&&o.album){var u=encodeURIComponent(o.artists[0].name);s="method=album.getInfo&album="+encodeURIComponent(o.album.name)+"&artist="+u}s&&l(n,r,s).then((function(e){if(e.album){var r=(0,a.formatImages)(e.album.image);n(i.trackLoaded({uri:t,images:r}))}}));break;case"albums":if(o.mbid)s="method=album.getInfo&mbid="+o.mbid;else if((o=(0,a.collate)(o,{artists:r().core.artists})).artists&&o.artists.length>0)u=encodeURIComponent(o.artists[0].name),s="method=album.getInfo&album="+encodeURIComponent(o.name)+"&artist="+u;s&&l(n,r,s).then((function(e){e.album&&n(i.albumLoaded({uri:t,images:e.album.image}))}))}}},t.loveTrack=function(e){return function(t,n){if(void 0!==n().core.tracks[e]){var a=n().core.tracks[e];if(a.artists){var o=encodeURIComponent(a.artists[0].name),s="method=track.love&track="+a.name+"&artist="+o;u(t,n,s).then((function(e){a=r({},a,{userloved:!0}),t({type:"TRACKS_LOADED",tracks:[a]})}))}else t(i.handleException("Could not love LastFM track",a,"Track has no artists"))}else t(i.handleException("Could not love LastFM track",a,"Could not find track in index"))}},t.unloveTrack=function(e){return function(t,n){if(void 0!==n().core.tracks[e]){var a=n().core.tracks[e];if(a.artists){var o=encodeURIComponent(a.artists[0].name),s="method=track.unlove&track="+a.name+"&artist="+o;u(t,n,s).then((function(e){a=r({},a,{userloved:!1}),t({type:"TRACKS_LOADED",tracks:[a]})}))}else t(i.handleException("Could not unlove LastFM track",a,"Track has no artists"))}else t(i.handleException("Could not unlove LastFM track",a,"Could not find track in index"))}},t.scrobble=function(e){return function(t,n){var r=e.name,a="Unknown";e.artists&&(a=e.artists[0].name);var o="method=track.scrobble";o+="&track="+r+"&artist="+(a=encodeURIComponent(a)),o+="×tamp="+Math.floor(Date.now()/1e3),u(t,n,o).then((function(e){}),(function(e){t(i.handleException("Could not scrobble LastFM track",e,e.description?e.description:null))}))}};var a=n(11),o=n(5),i=n(9),s=n(2);var l=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return new Promise((function(t,a){var i="https://ws.audioscrobbler.com/2.0/?format=json&"+n,l="GET",u=n.substring(n.indexOf("method=")+7,n.length);u=u.substring(0,u.indexOf("&")),r?l="POST":i+="&api_key=4320a3ef51c9b3d69de552ac083c55e3";var c={method:l,timeout:3e4},d=(0,o.generateGuid)();e(s.startLoading(d,"lastfm_"+u)),fetch(i,c).then((function(t){return e(s.stopLoading(d)),t.status>=200&&t.status<300?Promise.resolve(t):Promise.reject(new Error(t.statusText))})).then((function(e){return e.json()})).then((function(e){t(e)})).catch((function(e){a(e)}))}))},u=function(e,t,n){return new Promise((function(r,a){t().lastfm.authorization||a({params:n,error:"No active LastFM authorization (session)"});var i=(0,o.generateGuid)(),u=n.substring(n.indexOf("method=")+7,n.length);u=u.substring(0,u.indexOf("&")),e(s.startLoading(i,"lastfm_"+u)),n+="&sk="+t().lastfm.authorization.key;var c=t().lastfm.authorization_url+"?action=sign_request&"+n;fetch(c,{method:"GET",timeout:3e4}).then((function(t){return e(s.stopLoading(i)),t.status>=200&&t.status<300?Promise.resolve(t):Promise.reject(new Error(t.statusText))})).then((function(e){return e.json()})).then((function(n){l(e,t,n.params,!0).then((function(e){return r(e)}),(function(e){return a(e)}))})).catch((function(e){a(e)}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(0)),a=o(n(38));function o(e){return e&&e.__esModule?e:{default:e}}var i=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleContextMenuTrigger=function(e,t){var r=n.props,a=r.title,o=r.handleContextMenuTrigger,i=r.uiActions.showContextMenu;if(o)return o(e);e.preventDefault(),i({e:e,context:"custom",title:a,options:t})},n.renderContextMenuTrigger=function(){var e=n.props,t=e.handleContextMenuTrigger,o=e.options;return t||o?r.default.createElement(a.default,{onTrigger:function(e){return n.handleContextMenuTrigger(e,o)}}):null},n.renderOptions=function(){var e=n.props,t=e.handleContextMenuTrigger,a=e.options;return a||t?r.default.createElement("div",{className:"header__options"},n.renderContextMenuTrigger(),r.default.createElement("div",{className:"header__options__wrapper"},a||null)):null},n.render=function(){var e=n.props,t=e.className,a=e.children;return r.default.createElement("header",{className:t},r.default.createElement("h1",null,a),n.renderOptions())},n.state={expanded:!1},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(r.default.Component);t.default=i},function(e,t,n){"use strict";(function(e,r,a){n.d(t,"i",(function(){return i})),n.d(t,"f",(function(){return l})),n.d(t,"m",(function(){return u})),n.d(t,"k",(function(){return c})),n.d(t,"d",(function(){return d})),n.d(t,"c",(function(){return f})),n.d(t,"b",(function(){return p})),n.d(t,"a",(function(){return m})),n.d(t,"g",(function(){return h})),n.d(t,"h",(function(){return _})),n.d(t,"l",(function(){return k})),n.d(t,"j",(function(){return w})),n.d(t,"e",(function(){return S}));var o=n(13);n(45);function i(){return"[object process]"===Object.prototype.toString.call(void 0!==e?e:0)}var s={};function l(){return i()?r:"undefined"!=typeof window?window:"undefined"!=typeof self?self:s}function u(){var e=l(),t=e.crypto||e.msCrypto;if(void 0!==t&&t.getRandomValues){var n=new Uint16Array(8);t.getRandomValues(n),n[3]=4095&n[3]|16384,n[4]=16383&n[4]|32768;var r=function(e){for(var t=e.toString(16);t.length<4;)t="0"+t;return t};return r(n[0])+r(n[1])+r(n[2])+r(n[3])+r(n[4])+r(n[5])+r(n[6])+r(n[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function c(e){if(!e)return{};var t=e.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};var n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}}function d(e){if(e.message)return e.message;if(e.exception&&e.exception.values&&e.exception.values[0]){var t=e.exception.values[0];return t.type&&t.value?t.type+": "+t.value:t.type||t.value||e.event_id||""}return e.event_id||""}function f(e){var t=l();if(!("console"in t))return e();var n=t.console,r={};["debug","info","warn","error","log","assert"].forEach((function(e){e in t.console&&n[e].__sentry_original__&&(r[e]=n[e],n[e]=n[e].__sentry_original__)}));var a=e();return Object.keys(r).forEach((function(e){n[e]=r[e]})),a}function p(e,t,n){e.exception=e.exception||{},e.exception.values=e.exception.values||[],e.exception.values[0]=e.exception.values[0]||{},e.exception.values[0].value=e.exception.values[0].value||t||"",e.exception.values[0].type=e.exception.values[0].type||n||"Error"}function m(e,t){void 0===t&&(t={});try{e.exception.values[0].mechanism=e.exception.values[0].mechanism||{},Object.keys(t).forEach((function(n){e.exception.values[0].mechanism[n]=t[n]}))}catch(e){}}function h(){try{return document.location.href}catch(e){return""}}function _(e){try{for(var t=e,n=[],r=0,a=0,o=" > ".length,i=void 0;t&&r++<5&&!("html"===(i=y(t))||r>1&&a+n.length*o+i.length>=80);)n.push(i),a+=i.length,t=t.parentNode;return n.reverse().join(" > ")}catch(e){return""}}function y(e){var t,n,r,a,i,s=e,l=[];if(!s||!s.tagName)return"";if(l.push(s.tagName.toLowerCase()),s.id&&l.push("#"+s.id),(t=s.className)&&Object(o.k)(t))for(n=t.split(/\s+/),i=0;i"}catch(e){return""}}}).call(this,n(55),n(49),n(77)(e))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),a=i(r),o=i(n(6));function i(e){return e&&e.__esModule?e:{default:e}}var s=function(e){var t=e.radius,n=e.stroke,r=e.progress,o=t-2*n,i=2*o*Math.PI,s=i-r*i;return a.default.createElement("svg",{className:"loader__spinner__progress",height:2*t,width:2*t},a.default.createElement("circle",{className:"loader__spinner__progress__circle",stroke:"white",fill:"transparent",strokeWidth:n,strokeDasharray:i+" "+i,strokeDashoffset:s,r:o,cx:t,cy:t}))};t.default=(0,r.memo)((function(e){var t=e.body,n=e.loading,r=e.finished,i=void 0!==r&&r,l=e.mini,u=e.lazy,c=e.white,d=e.className,f=void 0===d?"":d,p=e.progress,m=void 0===p?null:p;if(!n&&!i)return null;var h="loader";return f&&(h+=" "+f),l&&(h+=" loader--mini"),t&&(h+=" loader--body"),u&&(h+=" loader--lazy"),c&&(h+=" loader--white"),navigator.onLine?i?(h+=" loader--finished",a.default.createElement("div",{className:h},a.default.createElement("div",{className:"loader__spinner"},a.default.createElement(o.default,{name:"check"}),a.default.createElement("div",{className:"loader__spinner__background"}),a.default.createElement("div",{className:"loader__spinner__foreground"})))):m?(h+=" loader--progress",a.default.createElement("div",{className:h},a.default.createElement("div",{className:"loader__spinner"},a.default.createElement(s,{stroke:"2",radius:l?"13":"60",progress:m}),a.default.createElement("div",{className:"loader__spinner__foreground"})))):a.default.createElement("div",{className:h},a.default.createElement("div",{className:"loader__spinner"},a.default.createElement("div",{className:"loader__spinner__background"}),a.default.createElement("div",{className:"loader__spinner__foreground"}))):a.default.createElement("div",{className:h},a.default.createElement("div",{className:"loader__offline"},a.default.createElement(o.default,{name:"wifi_off"}),a.default.createElement("p",null," You need to be online load this resource ")))}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),a=s(r),o=s(n(18)),i=n(5);function s(e){return e&&e.__esModule?e:{default:e}}t.default=(0,r.memo)((function(e){var t=null,n=e.uri,r=e.type||(0,i.uriType)(n);switch(e.unencoded||(n=encodeURIComponent(n)),r){case"playlist":t="/playlist/"+n;break;case"artist":t="/artist/"+n;break;case"album":t="/album/"+n;break;case"track":t="/track/"+n;break;case"user":t="/user/"+n;break;case"browse":t="/library/browse/"+n;break;case"recommendations":t="/discover/recommendations/"+n;break;case"search":var s=n.split("%3A");t="/search/"+s[2]+"/"+s[3];break;default:t=null}return n?a.default.createElement(o.default,{className:e.className?e.className:null,to:t,onContextMenu:function(t){return e.handleContextMenu?e.handleContextMenu(t):null}},e.children):a.default.createElement("span",{className:e.className?e.className:null},e.children)}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),a=s(r),o=s(n(18)),i=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}t.default=(0,r.memo)((function(e){var t=e.placeholder,n=void 0===t||t,r=function(){if(e.image)return e.image;if(e.images){var t=e.images;Array.isArray(t)&&t.length>0&&(t=t[0]);var n="medium";if(e.size&&(n=e.size),t[n])return t[n]}return null}(),s="thumbnail thumbnail--loaded";e.size&&(s+=" thumbnail--"+e.size),e.circle&&(s+=" thumbnail--circle"),e.className&&(s+=" "+e.className);return a.default.createElement("div",{className:s},n&&a.default.createElement(i.default,{className:"thumbnail__placeholder",name:function(){switch(e.type){case"directory":return"folder";case"artist":return"perm_identity";case"playlist":return"queue_music";case"album":return"album";case"track":return"audiotrack";default:return"image"}}()}),e.useImageTag&&r?a.default.createElement("img",{alt:"Artwork thumbnail",className:"thumbnail__image thumbnail__image--use-image-tag",src:r}):a.default.createElement("div",{className:"thumbnail__image",style:{backgroundImage:'url("'+r+'")'}}),e.glow&&r&&a.default.createElement("div",{className:"thumbnail__image thumbnail__image--glow",style:{backgroundImage:'url("'+r+'")'}}),a.default.createElement("div",{className:"thumbnail__actions"},e.canZoom&&r&&a.default.createElement(o.default,{className:"thumbnail__actions__item thumbnail__actions__item--zoom",to:"/image-zoom?url="+r},a.default.createElement(i.default,{name:"search"})),e.children))}))},function(e,t,n){var r; /*! * jQuery JavaScript Library v3.5.0 * https://jquery.com/ * * Includes Sizzle.js * https://sizzlejs.com/ * * Copyright JS Foundation and other contributors * Released under the MIT license * https://jquery.org/license * * Date: 2020-04-10T15:07Z */!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(n,a){"use strict";var o=[],i=Object.getPrototypeOf,s=o.slice,l=o.flat?function(e){return o.flat.call(e)}:function(e){return o.concat.apply([],e)},u=o.push,c=o.indexOf,d={},f=d.toString,p=d.hasOwnProperty,m=p.toString,h=m.call(Object),_={},y=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},v=function(e){return null!=e&&e===e.window},g=n.document,b={type:!0,src:!0,nonce:!0,noModule:!0};function E(e,t,n){var r,a,o=(n=n||g).createElement("script");if(o.text=e,t)for(r in b)(a=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,a);n.head.appendChild(o).parentNode.removeChild(o)}function k(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[f.call(e)]||"object":typeof e}var w=function(e,t){return new w.fn.init(e,t)};function S(e){var t=!!e&&"length"in e&&e.length,n=k(e);return!y(e)&&!v(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}w.fn=w.prototype={jquery:"3.5.0",constructor:w,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(w.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(w.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+j+")"+j+"*"),G=new RegExp(j+"|>"),V=new RegExp(F),W=new RegExp("^"+U+"$"),K={ID:new RegExp("^#("+U+")"),CLASS:new RegExp("^\\.("+U+")"),TAG:new RegExp("^("+U+"|[*])"),ATTR:new RegExp("^"+Y),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+j+"*(even|odd|(([+-]|)(\\d*)n|)"+j+"*(?:([+-]|)"+j+"*(\\d+)|))"+j+"*\\)|)","i"),bool:new RegExp("^(?:"+I+")$","i"),needsContext:new RegExp("^"+j+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+j+"*((?:-\\d)?\\d*)"+j+"*\\)|)(?=[^-]|$)","i")},X=/HTML$/i,$=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,J=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+j+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ae=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){f()},ie=be((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{D.apply(P=M.call(E.childNodes),E.childNodes),P[E.childNodes.length].nodeType}catch(e){D={apply:P.length?function(e,t){R.apply(e,M.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,a){var o,s,u,c,d,m,y,v=t&&t.ownerDocument,E=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==E&&9!==E&&11!==E)return r;if(!a&&(f(t),t=t||p,h)){if(11!==E&&(d=Z.exec(e)))if(o=d[1]){if(9===E){if(!(u=t.getElementById(o)))return r;if(u.id===o)return r.push(u),r}else if(v&&(u=v.getElementById(o))&&g(t,u)&&u.id===o)return r.push(u),r}else{if(d[2])return D.apply(r,t.getElementsByTagName(e)),r;if((o=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return D.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!A[e+" "]&&(!_||!_.test(e))&&(1!==E||"object"!==t.nodeName.toLowerCase())){if(y=e,v=t,1===E&&(G.test(e)||q.test(e))){for((v=ee.test(e)&&ye(t.parentNode)||t)===t&&n.scope||((c=t.getAttribute("id"))?c=c.replace(re,ae):t.setAttribute("id",c=b)),s=(m=i(e)).length;s--;)m[s]=(c?"#"+c:":scope")+" "+ge(m[s]);y=m.join(",")}try{return D.apply(r,v.querySelectorAll(y)),r}catch(t){A(e,!0)}finally{c===b&&t.removeAttribute("id")}}}return l(e.replace(z,"$1"),t,r,a)}function le(){var e=[];return function t(n,a){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=a}}function ue(e){return e[b]=!0,e}function ce(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),a=n.length;a--;)r.attrHandle[n[a]]=t}function fe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function me(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function he(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function _e(e){return ue((function(t){return t=+t,ue((function(n,r){for(var a,o=e([],n.length,t),i=o.length;i--;)n[a=o[i]]&&(n[a]=!(r[a]=n[a]))}))}))}function ye(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},o=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!X.test(t||n&&n.nodeName||"HTML")},f=se.setDocument=function(e){var t,a,i=e?e.ownerDocument||e:E;return i!=p&&9===i.nodeType&&i.documentElement?(m=(p=i).documentElement,h=!o(p),E!=p&&(a=p.defaultView)&&a.top!==a&&(a.addEventListener?a.addEventListener("unload",oe,!1):a.attachEvent&&a.attachEvent("onunload",oe)),n.scope=ce((function(e){return m.appendChild(e).appendChild(p.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=ce((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ce((function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=J.test(p.getElementsByClassName),n.getById=ce((function(e){return m.appendChild(e).id=b,!p.getElementsByName||!p.getElementsByName(b).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&h){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&h){var n,r,a,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(a=t.getElementsByName(e),r=0;o=a[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],a=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[a++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&h)return t.getElementsByClassName(e)},y=[],_=[],(n.qsa=J.test(p.querySelectorAll))&&(ce((function(e){var t;m.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&_.push("[*^$]="+j+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||_.push("\\["+j+"*(?:value|"+I+")"),e.querySelectorAll("[id~="+b+"-]").length||_.push("~="),(t=p.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||_.push("\\["+j+"*name"+j+"*="+j+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||_.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||_.push(".#.+[+~]"),e.querySelectorAll("\\\f"),_.push("[\\r\\n\\f]")})),ce((function(e){e.innerHTML="";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&_.push("name"+j+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&_.push(":enabled",":disabled"),m.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&_.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),_.push(",.*:")}))),(n.matchesSelector=J.test(v=m.matches||m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&ce((function(e){n.disconnectedMatch=v.call(e,"*"),v.call(e,"[s!='']:x"),y.push("!=",F)})),_=_.length&&new RegExp(_.join("|")),y=y.length&&new RegExp(y.join("|")),t=J.test(m.compareDocumentPosition),g=t||J.test(m.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},C=t?function(e,t){if(e===t)return d=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==p||e.ownerDocument==E&&g(E,e)?-1:t==p||t.ownerDocument==E&&g(E,t)?1:c?L(c,e)-L(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,r=0,a=e.parentNode,o=t.parentNode,i=[e],s=[t];if(!a||!o)return e==p?-1:t==p?1:a?-1:o?1:c?L(c,e)-L(c,t):0;if(a===o)return fe(e,t);for(n=e;n=n.parentNode;)i.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;i[r]===s[r];)r++;return r?fe(i[r],s[r]):i[r]==E?-1:s[r]==E?1:0},p):p},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(f(e),n.matchesSelector&&h&&!A[t+" "]&&(!y||!y.test(t))&&(!_||!_.test(t)))try{var r=v.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){A(t,!0)}return se(t,p,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!=p&&f(e),g(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=p&&f(e);var a=r.attrHandle[t.toLowerCase()],o=a&&x.call(r.attrHandle,t.toLowerCase())?a(e,t,!h):void 0;return void 0!==o?o:n.attributes||!h?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},se.escape=function(e){return(e+"").replace(re,ae)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],a=0,o=0;if(d=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(C),d){for(;t=e[o++];)t===e[o]&&(a=r.push(o));for(;a--;)e.splice(r[a],1)}return c=null,e},a=se.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=a(t);return n},(r=se.selectors={cacheLength:50,createPseudo:ue,match:K,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return K.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&V.test(n)&&(t=i(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=S[e+" "];return t||(t=new RegExp("(^|"+j+")"+e+"("+j+"|$)"))&&S(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var a=se.attr(r,e);return null==a?"!="===t:!t||(a+="","="===t?a===n:"!="===t?a!==n:"^="===t?n&&0===a.indexOf(n):"*="===t?n&&a.indexOf(n)>-1:"$="===t?n&&a.slice(-n.length)===n:"~="===t?(" "+a.replace(H," ")+" ").indexOf(n)>-1:"|="===t&&(a===n||a.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,a){var o="nth"!==e.slice(0,3),i="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===a?function(e){return!!e.parentNode}:function(t,n,l){var u,c,d,f,p,m,h=o!==i?"nextSibling":"previousSibling",_=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s,g=!1;if(_){if(o){for(;h;){for(f=t;f=f[h];)if(s?f.nodeName.toLowerCase()===y:1===f.nodeType)return!1;m=h="only"===e&&!m&&"nextSibling"}return!0}if(m=[i?_.firstChild:_.lastChild],i&&v){for(g=(p=(u=(c=(d=(f=_)[b]||(f[b]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]||[])[0]===k&&u[1])&&u[2],f=p&&_.childNodes[p];f=++p&&f&&f[h]||(g=p=0)||m.pop();)if(1===f.nodeType&&++g&&f===t){c[e]=[k,p,g];break}}else if(v&&(g=p=(u=(c=(d=(f=t)[b]||(f[b]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]||[])[0]===k&&u[1]),!1===g)for(;(f=++p&&f&&f[h]||(g=p=0)||m.pop())&&((s?f.nodeName.toLowerCase()!==y:1!==f.nodeType)||!++g||(v&&((c=(d=f[b]||(f[b]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]=[k,g]),f!==t)););return(g-=a)===r||g%r==0&&g/r>=0}}},PSEUDO:function(e,t){var n,a=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[b]?a(t):a.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ue((function(e,n){for(var r,o=a(e,t),i=o.length;i--;)e[r=L(e,o[i])]=!(n[r]=o[i])})):function(e){return a(e,0,n)}):a}},pseudos:{not:ue((function(e){var t=[],n=[],r=s(e.replace(z,"$1"));return r[b]?ue((function(e,t,n,a){for(var o,i=r(e,null,a,[]),s=e.length;s--;)(o=i[s])&&(e[s]=!(t[s]=o))})):function(e,a,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),has:ue((function(e){return function(t){return se(e,t).length>0}})),contains:ue((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||a(t)).indexOf(e)>-1}})),lang:ue((function(e){return W.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===m},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:he(!1),disabled:he(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return $.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:_e((function(){return[0]})),last:_e((function(e,t){return[t-1]})),eq:_e((function(e,t,n){return[n<0?n+t:n]})),even:_e((function(e,t){for(var n=0;nt?t:n;--r>=0;)e.push(r);return e})),gt:_e((function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){for(var a=e.length;a--;)if(!e[a](t,n,r))return!1;return!0}:e[0]}function ke(e,t,n,r,a){for(var o,i=[],s=0,l=e.length,u=null!=t;s-1&&(o[u]=!(i[u]=d))}}else y=ke(y===i?y.splice(m,y.length):y),a?a(null,i,y,l):D.apply(i,y)}))}function Se(e){for(var t,n,a,o=e.length,i=r.relative[e[0].type],s=i||r.relative[" "],l=i?1:0,c=be((function(e){return e===t}),s,!0),d=be((function(e){return L(t,e)>-1}),s,!0),f=[function(e,n,r){var a=!i&&(r||n!==u)||((t=n).nodeType?c(e,n,r):d(e,n,r));return t=null,a}];l1&&Ee(f),l>1&&ge(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,l0,a=e.length>0,o=function(o,i,s,l,c){var d,m,_,y=0,v="0",g=o&&[],b=[],E=u,w=o||a&&r.find.TAG("*",c),S=k+=null==E?1:Math.random()||.1,O=w.length;for(c&&(u=i==p||i||c);v!==O&&null!=(d=w[v]);v++){if(a&&d){for(m=0,i||d.ownerDocument==p||(f(d),s=!h);_=e[m++];)if(_(d,i||p,s)){l.push(d);break}c&&(k=S)}n&&((d=!_&&d)&&y--,o&&g.push(d))}if(y+=v,n&&v!==y){for(m=0;_=t[m++];)_(g,b,i,s);if(o){if(y>0)for(;v--;)g[v]||b[v]||(b[v]=N.call(l));b=ke(b)}D.apply(l,b),c&&!o&&b.length>0&&y+t.length>1&&se.uniqueSort(l)}return c&&(k=S,u=E),g};return n?ue(o):o}(o,a))).selector=e}return s},l=se.select=function(e,t,n,a){var o,l,u,c,d,f="function"==typeof e&&e,p=!a&&i(e=f.selector||e);if(n=n||[],1===p.length){if((l=p[0]=p[0].slice(0)).length>2&&"ID"===(u=l[0]).type&&9===t.nodeType&&h&&r.relative[l[1].type]){if(!(t=(r.find.ID(u.matches[0].replace(te,ne),t)||[])[0]))return n;f&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(o=K.needsContext.test(e)?0:l.length;o--&&(u=l[o],!r.relative[c=u.type]);)if((d=r.find[c])&&(a=d(u.matches[0].replace(te,ne),ee.test(l[0].type)&&ye(t.parentNode)||t))){if(l.splice(o,1),!(e=a.length&&ge(l)))return D.apply(n,a),n;break}}return(f||s(e,p))(a,t,!h,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},n.sortStable=b.split("").sort(C).join("")===b,n.detectDuplicates=!!d,f(),n.sortDetached=ce((function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))})),ce((function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")}))||de("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&ce((function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||de("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ce((function(e){return null==e.getAttribute("disabled")}))||de(I,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),se}(n);w.find=O,w.expr=O.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=O.uniqueSort,w.text=O.getText,w.isXMLDoc=O.isXML,w.contains=O.contains,w.escapeSelector=O.escape;var T=function(e,t,n){for(var r=[],a=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(a&&w(e).is(n))break;r.push(e)}return r},A=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},C=w.expr.match.needsContext;function x(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var P=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function N(e,t,n){return y(t)?w.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?w.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?w.grep(e,(function(e){return c.call(t,e)>-1!==n})):w.filter(t,e,n)}w.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,(function(e){return 1===e.nodeType})))},w.fn.extend({find:function(e){var t,n,r=this.length,a=this;if("string"!=typeof e)return this.pushStack(w(e).filter((function(){for(t=0;t1?w.uniqueSort(n):n},filter:function(e){return this.pushStack(N(this,e||[],!1))},not:function(e){return this.pushStack(N(this,e||[],!0))},is:function(e){return!!N(this,"string"==typeof e&&C.test(e)?w(e):e||[],!1).length}});var R,D=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var r,a;if(!e)return this;if(n=n||R,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:D.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:g,!0)),P.test(r[1])&&w.isPlainObject(t))for(r in t)y(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(a=g.getElementById(r[2]))&&(this[0]=a,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):y(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,R=w(g);var M=/^(?:parents|prev(?:Until|All))/,L={children:!0,contents:!0,next:!0,prev:!0};function I(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter((function(){for(var e=0;e-1:1===n.nodeType&&w.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?w.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?c.call(w(e),this[0]):c.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return T(e,"parentNode")},parentsUntil:function(e,t,n){return T(e,"parentNode",n)},next:function(e){return I(e,"nextSibling")},prev:function(e){return I(e,"previousSibling")},nextAll:function(e){return T(e,"nextSibling")},prevAll:function(e){return T(e,"previousSibling")},nextUntil:function(e,t,n){return T(e,"nextSibling",n)},prevUntil:function(e,t,n){return T(e,"previousSibling",n)},siblings:function(e){return A((e.parentNode||{}).firstChild,e)},children:function(e){return A(e.firstChild)},contents:function(e){return null!=e.contentDocument&&i(e.contentDocument)?e.contentDocument:(x(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},(function(e,t){w.fn[e]=function(n,r){var a=w.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(a=w.filter(r,a)),this.length>1&&(L[e]||w.uniqueSort(a),M.test(e)&&a.reverse()),this.pushStack(a)}}));var j=/[^\x20\t\r\n\f]+/g;function U(e){return e}function Y(e){throw e}function F(e,t,n,r){var a;try{e&&y(a=e.promise)?a.call(e).done(t).fail(n):e&&y(a=e.then)?a.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}w.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return w.each(e.match(j)||[],(function(e,n){t[n]=!0})),t}(e):w.extend({},e);var t,n,r,a,o=[],i=[],s=-1,l=function(){for(a=a||e.once,r=t=!0;i.length;s=-1)for(n=i.shift();++s-1;)o.splice(n,1),n<=s&&s--})),this},has:function(e){return e?w.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return a=i=[],o=n="",this},disabled:function(){return!o},lock:function(){return a=i=[],n||t||(o=n=""),this},locked:function(){return!!a},fireWith:function(e,n){return a||(n=[e,(n=n||[]).slice?n.slice():n],i.push(n),t||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},w.extend({Deferred:function(e){var t=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],r="pending",a={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return a.then(null,e)},pipe:function(){var e=arguments;return w.Deferred((function(n){w.each(t,(function(t,r){var a=y(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=a&&a.apply(this,arguments);e&&y(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,a?[e]:arguments)}))})),e=null})).promise()},then:function(e,r,a){var o=0;function i(e,t,r,a){return function(){var s=this,l=arguments,u=function(){var n,u;if(!(e=o&&(r!==Y&&(s=void 0,l=[n]),t.rejectWith(s,l))}};e?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),n.setTimeout(c))}}return w.Deferred((function(n){t[0][3].add(i(0,n,y(a)?a:U,n.notifyWith)),t[1][3].add(i(0,n,y(e)?e:U)),t[2][3].add(i(0,n,y(r)?r:Y))})).promise()},promise:function(e){return null!=e?w.extend(e,a):a}},o={};return w.each(t,(function(e,n){var i=n[2],s=n[5];a[n[1]]=i.add,s&&i.add((function(){r=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),i.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=i.fireWith})),a.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),a=s.call(arguments),o=w.Deferred(),i=function(e){return function(n){r[e]=this,a[e]=arguments.length>1?s.call(arguments):n,--t||o.resolveWith(r,a)}};if(t<=1&&(F(e,o.done(i(n)).resolve,o.reject,!t),"pending"===o.state()||y(a[n]&&a[n].then)))return o.then();for(;n--;)F(a[n],i(n),o.reject);return o.promise()}});var H=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&H.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},w.readyException=function(e){n.setTimeout((function(){throw e}))};var z=w.Deferred();function B(){g.removeEventListener("DOMContentLoaded",B),n.removeEventListener("load",B),w.ready()}w.fn.ready=function(e){return z.then(e).catch((function(e){w.readyException(e)})),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==e&&--w.readyWait>0||z.resolveWith(g,[w]))}}),w.ready.then=z.then,"complete"===g.readyState||"loading"!==g.readyState&&!g.documentElement.doScroll?n.setTimeout(w.ready):(g.addEventListener("DOMContentLoaded",B),n.addEventListener("load",B));var q=function(e,t,n,r,a,o,i){var s=0,l=e.length,u=null==n;if("object"===k(n))for(s in a=!0,n)q(e,t,s,n[s],!0,o,i);else if(void 0!==r&&(a=!0,y(r)||(i=!0),u&&(i?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(w(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each((function(){J.remove(this,e)}))}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Q.get(e,t),n&&(!r||Array.isArray(n)?r=Q.access(e,t,w.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,a=n.shift(),o=w._queueHooks(e,t);"inprogress"===a&&(a=n.shift(),r--),a&&("fx"===t&&n.unshift("inprogress"),delete o.stop,a.call(e,(function(){w.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Q.get(e,n)||Q.access(e,n,{empty:w.Callbacks("once memory").add((function(){Q.remove(e,[t+"queue",n])}))})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,ye=/^$|^module$|\/(?:java|ecma)script/i;pe=g.createDocumentFragment().appendChild(g.createElement("div")),(me=g.createElement("input")).setAttribute("type","radio"),me.setAttribute("checked","checked"),me.setAttribute("name","t"),pe.appendChild(me),_.checkClone=pe.cloneNode(!0).cloneNode(!0).lastChild.checked,pe.innerHTML="",_.noCloneChecked=!!pe.cloneNode(!0).lastChild.defaultValue,pe.innerHTML="",_.option=!!pe.lastChild;var ve={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ge(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&x(e,t)?w.merge([e],n):n}function be(e,t){for(var n=0,r=e.length;n",""]);var Ee=/<|&#?\w+;/;function ke(e,t,n,r,a){for(var o,i,s,l,u,c,d=t.createDocumentFragment(),f=[],p=0,m=e.length;p-1)a&&a.push(o);else if(u=ie(o),i=ge(d.appendChild(o),"script"),u&&be(i),n)for(c=0;o=i[c++];)ye.test(o.type||"")&&n.push(o);return d}var we=/^key/,Se=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Oe=/^([^.]*)(?:\.(.+)|)/;function Te(){return!0}function Ae(){return!1}function Ce(e,t){return e===function(){try{return g.activeElement}catch(e){}}()==("focus"===t)}function xe(e,t,n,r,a,o){var i,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)xe(e,s,n,r,t[s],o);return e}if(null==r&&null==a?(a=n,r=n=void 0):null==a&&("string"==typeof n?(a=r,r=void 0):(a=r,r=n,n=void 0)),!1===a)a=Ae;else if(!a)return e;return 1===o&&(i=a,(a=function(e){return w().off(e),i.apply(this,arguments)}).guid=i.guid||(i.guid=w.guid++)),e.each((function(){w.event.add(this,t,a,r,n)}))}function Pe(e,t,n){n?(Q.set(e,t,!1),w.event.add(e,t,{namespace:!1,handler:function(e){var r,a,o=Q.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(w.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=s.call(arguments),Q.set(this,t,o),r=n(this,t),this[t](),o!==(a=Q.get(this,t))||r?Q.set(this,t,!1):a={},o!==a)return e.stopImmediatePropagation(),e.preventDefault(),a.value}else o.length&&(Q.set(this,t,{value:w.event.trigger(w.extend(o[0],w.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,t)&&w.event.add(e,t,Te)}w.event={global:{},add:function(e,t,n,r,a){var o,i,s,l,u,c,d,f,p,m,h,_=Q.get(e);if(X(e))for(n.handler&&(n=(o=n).handler,a=o.selector),a&&w.find.matchesSelector(oe,a),n.guid||(n.guid=w.guid++),(l=_.events)||(l=_.events=Object.create(null)),(i=_.handle)||(i=_.handle=function(t){return void 0!==w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(j)||[""]).length;u--;)p=h=(s=Oe.exec(t[u])||[])[1],m=(s[2]||"").split(".").sort(),p&&(d=w.event.special[p]||{},p=(a?d.delegateType:d.bindType)||p,d=w.event.special[p]||{},c=w.extend({type:p,origType:h,data:r,handler:n,guid:n.guid,selector:a,needsContext:a&&w.expr.match.needsContext.test(a),namespace:m.join(".")},o),(f=l[p])||((f=l[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,r,m,i)||e.addEventListener&&e.addEventListener(p,i)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),a?f.splice(f.delegateCount++,0,c):f.push(c),w.event.global[p]=!0)},remove:function(e,t,n,r,a){var o,i,s,l,u,c,d,f,p,m,h,_=Q.hasData(e)&&Q.get(e);if(_&&(l=_.events)){for(u=(t=(t||"").match(j)||[""]).length;u--;)if(p=h=(s=Oe.exec(t[u])||[])[1],m=(s[2]||"").split(".").sort(),p){for(d=w.event.special[p]||{},f=l[p=(r?d.delegateType:d.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=o=f.length;o--;)c=f[o],!a&&h!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(f.splice(o,1),c.selector&&f.delegateCount--,d.remove&&d.remove.call(e,c));i&&!f.length&&(d.teardown&&!1!==d.teardown.call(e,m,_.handle)||w.removeEvent(e,p,_.handle),delete l[p])}else for(p in l)w.event.remove(e,p+t[u],n,r,!0);w.isEmptyObject(l)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,a,o,i,s=new Array(arguments.length),l=w.event.fix(e),u=(Q.get(this,"events")||Object.create(null))[l.type]||[],c=w.event.special[l.type]||{};for(s[0]=l,t=1;t=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||!0!==u.disabled)){for(o=[],i={},n=0;n-1:w.find(a,this,null,[u]).length),i[a]&&o.push(r);o.length&&s.push({elem:u,handlers:o})}return u=this,l\s*$/g;function Me(e,t){return x(e,"table")&&x(11!==t.nodeType?t:t.firstChild,"tr")&&w(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ie(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function je(e,t){var n,r,a,o,i,s;if(1===t.nodeType){if(Q.hasData(e)&&(s=Q.get(e).events))for(a in Q.remove(t,"handle events"),s)for(n=0,r=s[a].length;n1&&"string"==typeof m&&!_.checkClone&&Re.test(m))return e.each((function(a){var o=e.eq(a);h&&(t[0]=m.call(this,a,o.html())),Ye(o,t,n,r)}));if(f&&(o=(a=ke(t,e[0].ownerDocument,!1,e,r)).firstChild,1===a.childNodes.length&&(a=o),o||r)){for(s=(i=w.map(ge(a,"script"),Le)).length;d0&&be(i,!l&&ge(e,"script")),s},cleanData:function(e){for(var t,n,r,a=w.event.special,o=0;void 0!==(n=e[o]);o++)if(X(n)){if(t=n[Q.expando]){if(t.events)for(r in t.events)a[r]?w.event.remove(n,r):w.removeEvent(n,r,t.handle);n[Q.expando]=void 0}n[J.expando]&&(n[J.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Fe(this,e,!0)},remove:function(e){return Fe(this,e)},text:function(e){return q(this,(function(e){return void 0===e?w.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Ye(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Me(this,e).appendChild(e)}))},prepend:function(){return Ye(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Me(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Ye(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Ye(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(w.cleanData(ge(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return w.clone(this,e,t)}))},html:function(e){return q(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ne.test(e)&&!ve[(_e.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n3,oe.removeChild(e)),s}}))}();var We=["Webkit","Moz","ms"],Ke=g.createElement("div").style,Xe={};function $e(e){var t=w.cssProps[e]||Xe[e];return t||(e in Ke?e:Xe[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=We.length;n--;)if((e=We[n]+t)in Ke)return e}(e)||e)}var Qe=/^(none|table(?!-c[ea]).+)/,Je=/^--/,Ze={position:"absolute",visibility:"hidden",display:"block"},et={letterSpacing:"0",fontWeight:"400"};function tt(e,t,n){var r=re.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function nt(e,t,n,r,a,o){var i="width"===t?1:0,s=0,l=0;if(n===(r?"border":"content"))return 0;for(;i<4;i+=2)"margin"===n&&(l+=w.css(e,n+ae[i],!0,a)),r?("content"===n&&(l-=w.css(e,"padding"+ae[i],!0,a)),"margin"!==n&&(l-=w.css(e,"border"+ae[i]+"Width",!0,a))):(l+=w.css(e,"padding"+ae[i],!0,a),"padding"!==n?l+=w.css(e,"border"+ae[i]+"Width",!0,a):s+=w.css(e,"border"+ae[i]+"Width",!0,a));return!r&&o>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-s-.5))||0),l}function rt(e,t,n){var r=ze(e),a=(!_.boxSizingReliable()||n)&&"border-box"===w.css(e,"boxSizing",!1,r),o=a,i=Ge(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(He.test(i)){if(!n)return i;i="auto"}return(!_.boxSizingReliable()&&a||!_.reliableTrDimensions()&&x(e,"tr")||"auto"===i||!parseFloat(i)&&"inline"===w.css(e,"display",!1,r))&&e.getClientRects().length&&(a="border-box"===w.css(e,"boxSizing",!1,r),(o=s in e)&&(i=e[s])),(i=parseFloat(i)||0)+nt(e,t,n||(a?"border":"content"),o,r,i)+"px"}function at(e,t,n,r,a){return new at.prototype.init(e,t,n,r,a)}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ge(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var a,o,i,s=K(t),l=Je.test(t),u=e.style;if(l||(t=$e(s)),i=w.cssHooks[t]||w.cssHooks[s],void 0===n)return i&&"get"in i&&void 0!==(a=i.get(e,!1,r))?a:u[t];"string"===(o=typeof n)&&(a=re.exec(n))&&a[1]&&(n=ue(e,t,a),o="number"),null!=n&&n==n&&("number"!==o||l||(n+=a&&a[3]||(w.cssNumber[s]?"":"px")),_.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),i&&"set"in i&&void 0===(n=i.set(e,n,r))||(l?u.setProperty(t,n):u[t]=n))}},css:function(e,t,n,r){var a,o,i,s=K(t);return Je.test(t)||(t=$e(s)),(i=w.cssHooks[t]||w.cssHooks[s])&&"get"in i&&(a=i.get(e,!0,n)),void 0===a&&(a=Ge(e,t,r)),"normal"===a&&t in et&&(a=et[t]),""===n||n?(o=parseFloat(a),!0===n||isFinite(o)?o||0:a):a}}),w.each(["height","width"],(function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n)return!Qe.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?rt(e,t,r):Be(e,Ze,(function(){return rt(e,t,r)}))},set:function(e,n,r){var a,o=ze(e),i=!_.scrollboxSize()&&"absolute"===o.position,s=(i||r)&&"border-box"===w.css(e,"boxSizing",!1,o),l=r?nt(e,t,r,s,o):0;return s&&i&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-nt(e,t,"border",!1,o)-.5)),l&&(a=re.exec(n))&&"px"!==(a[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),tt(0,n,l)}}})),w.cssHooks.marginLeft=Ve(_.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Ge(e,"marginLeft"))||e.getBoundingClientRect().left-Be(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),w.each({margin:"",padding:"",border:"Width"},(function(e,t){w.cssHooks[e+t]={expand:function(n){for(var r=0,a={},o="string"==typeof n?n.split(" "):[n];r<4;r++)a[e+ae[r]+t]=o[r]||o[r-2]||o[0];return a}},"margin"!==e&&(w.cssHooks[e+t].set=tt)})),w.fn.extend({css:function(e,t){return q(this,(function(e,t,n){var r,a,o={},i=0;if(Array.isArray(t)){for(r=ze(e),a=t.length;i1)}}),w.Tween=at,at.prototype={constructor:at,init:function(e,t,n,r,a,o){this.elem=e,this.prop=n,this.easing=a||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(w.cssNumber[n]?"":"px")},cur:function(){var e=at.propHooks[this.prop];return e&&e.get?e.get(this):at.propHooks._default.get(this)},run:function(e){var t,n=at.propHooks[this.prop];return this.options.duration?this.pos=t=w.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):at.propHooks._default.set(this),this}},at.prototype.init.prototype=at.prototype,at.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=w.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||!w.cssHooks[e.prop]&&null==e.elem.style[$e(e.prop)]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}},at.propHooks.scrollTop=at.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},w.fx=at.prototype.init,w.fx.step={};var ot,it,st=/^(?:toggle|show|hide)$/,lt=/queueHooks$/;function ut(){it&&(!1===g.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(ut):n.setTimeout(ut,w.fx.interval),w.fx.tick())}function ct(){return n.setTimeout((function(){ot=void 0})),ot=Date.now()}function dt(e,t){var n,r=0,a={height:e};for(t=t?1:0;r<4;r+=2-t)a["margin"+(n=ae[r])]=a["padding"+n]=e;return t&&(a.opacity=a.width=e),a}function ft(e,t,n){for(var r,a=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),o=0,i=a.length;o1)},removeAttr:function(e){return this.each((function(){w.removeAttr(this,e)}))}}),w.extend({attr:function(e,t,n){var r,a,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?w.prop(e,t,n):(1===o&&w.isXMLDoc(e)||(a=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?mt:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):a&&"set"in a&&void 0!==(r=a.set(e,n,t))?r:(e.setAttribute(t,n+""),n):a&&"get"in a&&null!==(r=a.get(e,t))?r:null==(r=w.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!_.radioValue&&"radio"===t&&x(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,a=t&&t.match(j);if(a&&1===e.nodeType)for(;n=a[r++];)e.removeAttribute(n)}}),mt={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=ht[t]||w.find.attr;ht[t]=function(e,t,r){var a,o,i=t.toLowerCase();return r||(o=ht[i],ht[i]=a,a=null!=n(e,t,r)?i:null,ht[i]=o),a}}));var _t=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;function vt(e){return(e.match(j)||[]).join(" ")}function gt(e){return e.getAttribute&&e.getAttribute("class")||""}function bt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(j)||[]}w.fn.extend({prop:function(e,t){return q(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[w.propFix[e]||e]}))}}),w.extend({prop:function(e,t,n){var r,a,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&w.isXMLDoc(e)||(t=w.propFix[t]||t,a=w.propHooks[t]),void 0!==n?a&&"set"in a&&void 0!==(r=a.set(e,n,t))?r:e[t]=n:a&&"get"in a&&null!==(r=a.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):_t.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),_.optSelected||(w.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){w.propFix[this.toLowerCase()]=this})),w.fn.extend({addClass:function(e){var t,n,r,a,o,i,s,l=0;if(y(e))return this.each((function(t){w(this).addClass(e.call(this,t,gt(this)))}));if((t=bt(e)).length)for(;n=this[l++];)if(a=gt(n),r=1===n.nodeType&&" "+vt(a)+" "){for(i=0;o=t[i++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");a!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,a,o,i,s,l=0;if(y(e))return this.each((function(t){w(this).removeClass(e.call(this,t,gt(this)))}));if(!arguments.length)return this.attr("class","");if((t=bt(e)).length)for(;n=this[l++];)if(a=gt(n),r=1===n.nodeType&&" "+vt(a)+" "){for(i=0;o=t[i++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");a!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):y(e)?this.each((function(n){w(this).toggleClass(e.call(this,n,gt(this),t),t)})):this.each((function(){var t,a,o,i;if(r)for(a=0,o=w(this),i=bt(e);t=i[a++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=gt(this))&&Q.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Q.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+vt(gt(n))+" ").indexOf(t)>-1)return!0;return!1}});var Et=/\r/g;w.fn.extend({val:function(e){var t,n,r,a=this[0];return arguments.length?(r=y(e),this.each((function(n){var a;1===this.nodeType&&(null==(a=r?e.call(this,n,w(this).val()):e)?a="":"number"==typeof a?a+="":Array.isArray(a)&&(a=w.map(a,(function(e){return null==e?"":e+""}))),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,a,"value")||(this.value=a))}))):a?(t=w.valHooks[a.type]||w.valHooks[a.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(a,"value"))?n:"string"==typeof(n=a.value)?n.replace(Et,""):null==n?"":n:void 0}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:vt(w.text(e))}},select:{get:function(e){var t,n,r,a=e.options,o=e.selectedIndex,i="select-one"===e.type,s=i?null:[],l=i?o+1:a.length;for(r=o<0?l:i?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),w.each(["radio","checkbox"],(function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=w.inArray(w(e).val(),t)>-1}},_.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),_.focusin="onfocusin"in n;var kt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(e,t,r,a){var o,i,s,l,u,c,d,f,m=[r||g],h=p.call(e,"type")?e.type:e,_=p.call(e,"namespace")?e.namespace.split("."):[];if(i=f=s=r=r||g,3!==r.nodeType&&8!==r.nodeType&&!kt.test(h+w.event.triggered)&&(h.indexOf(".")>-1&&(_=h.split("."),h=_.shift(),_.sort()),u=h.indexOf(":")<0&&"on"+h,(e=e[w.expando]?e:new w.Event(h,"object"==typeof e&&e)).isTrigger=a?2:3,e.namespace=_.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+_.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:w.makeArray(t,[e]),d=w.event.special[h]||{},a||!d.trigger||!1!==d.trigger.apply(r,t))){if(!a&&!d.noBubble&&!v(r)){for(l=d.delegateType||h,kt.test(l+h)||(i=i.parentNode);i;i=i.parentNode)m.push(i),s=i;s===(r.ownerDocument||g)&&m.push(s.defaultView||s.parentWindow||n)}for(o=0;(i=m[o++])&&!e.isPropagationStopped();)f=i,e.type=o>1?l:d.bindType||h,(c=(Q.get(i,"events")||Object.create(null))[e.type]&&Q.get(i,"handle"))&&c.apply(i,t),(c=u&&i[u])&&c.apply&&X(i)&&(e.result=c.apply(i,t),!1===e.result&&e.preventDefault());return e.type=h,a||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(m.pop(),t)||!X(r)||u&&y(r[h])&&!v(r)&&((s=r[u])&&(r[u]=null),w.event.triggered=h,e.isPropagationStopped()&&f.addEventListener(h,wt),r[h](),e.isPropagationStopped()&&f.removeEventListener(h,wt),w.event.triggered=void 0,s&&(r[u]=s)),e.result}},simulate:function(e,t,n){var r=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(r,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each((function(){w.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}}),_.focusin||w.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,a=Q.access(r,t);a||r.addEventListener(e,n,!0),Q.access(r,t,(a||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,a=Q.access(r,t)-1;a?Q.access(r,t,a):(r.removeEventListener(e,n,!0),Q.remove(r,t))}}}));var St=n.location,Ot={guid:Date.now()},Tt=/\?/;w.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||w.error("Invalid XML: "+e),t};var At=/\[\]$/,Ct=/\r?\n/g,xt=/^(?:submit|button|image|reset|file)$/i,Pt=/^(?:input|select|textarea|keygen)/i;function Nt(e,t,n,r){var a;if(Array.isArray(t))w.each(t,(function(t,a){n||At.test(e)?r(e,a):Nt(e+"["+("object"==typeof a&&null!=a?t:"")+"]",a,n,r)}));else if(n||"object"!==k(t))r(e,t);else for(a in t)Nt(e+"["+a+"]",t[a],n,r)}w.param=function(e,t){var n,r=[],a=function(e,t){var n=y(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,(function(){a(this.name,this.value)}));else for(n in e)Nt(n,e[n],t,a);return r.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&Pt.test(this.nodeName)&&!xt.test(e)&&(this.checked||!he.test(e))})).map((function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,(function(e){return{name:t.name,value:e.replace(Ct,"\r\n")}})):{name:t.name,value:n.replace(Ct,"\r\n")}})).get()}});var Rt=/%20/g,Dt=/#.*$/,Mt=/([?&])_=[^&]*/,Lt=/^(.*?):[ \t]*([^\r\n]*)$/gm,It=/^(?:GET|HEAD)$/,jt=/^\/\//,Ut={},Yt={},Ft="*/".concat("*"),Ht=g.createElement("a");function zt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,a=0,o=t.toLowerCase().match(j)||[];if(y(n))for(;r=o[a++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Bt(e,t,n,r){var a={},o=e===Yt;function i(s){var l;return a[s]=!0,w.each(e[s]||[],(function(e,s){var u=s(t,n,r);return"string"!=typeof u||o||a[u]?o?!(l=u):void 0:(t.dataTypes.unshift(u),i(u),!1)})),l}return i(t.dataTypes[0])||!a["*"]&&i("*")}function qt(e,t){var n,r,a=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((a[n]?e:r||(r={}))[n]=t[n]);return r&&w.extend(!0,e,r),e}Ht.href=St.href,w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:St.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(St.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ft,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?qt(qt(e,w.ajaxSettings),t):qt(w.ajaxSettings,e)},ajaxPrefilter:zt(Ut),ajaxTransport:zt(Yt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,a,o,i,s,l,u,c,d,f,p=w.ajaxSetup({},t),m=p.context||p,h=p.context&&(m.nodeType||m.jquery)?w(m):w.event,_=w.Deferred(),y=w.Callbacks("once memory"),v=p.statusCode||{},b={},E={},k="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(u){if(!i)for(i={};t=Lt.exec(o);)i[t[1].toLowerCase()+" "]=(i[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=i[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return u?o:null},setRequestHeader:function(e,t){return null==u&&(e=E[e.toLowerCase()]=E[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==u&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)S.always(e[S.status]);else for(t in e)v[t]=[v[t],e[t]];return this},abort:function(e){var t=e||k;return r&&r.abort(t),O(0,t),this}};if(_.promise(S),p.url=((e||p.url||St.href)+"").replace(jt,St.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(j)||[""],null==p.crossDomain){l=g.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=Ht.protocol+"//"+Ht.host!=l.protocol+"//"+l.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=w.param(p.data,p.traditional)),Bt(Ut,p,t,S),u)return S;for(d in(c=w.event&&p.global)&&0==w.active++&&w.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!It.test(p.type),a=p.url.replace(Dt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Rt,"+")):(f=p.url.slice(a.length),p.data&&(p.processData||"string"==typeof p.data)&&(a+=(Tt.test(a)?"&":"?")+p.data,delete p.data),!1===p.cache&&(a=a.replace(Mt,"$1"),f=(Tt.test(a)?"&":"?")+"_="+Ot.guid+++f),p.url=a+f),p.ifModified&&(w.lastModified[a]&&S.setRequestHeader("If-Modified-Since",w.lastModified[a]),w.etag[a]&&S.setRequestHeader("If-None-Match",w.etag[a])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&S.setRequestHeader("Content-Type",p.contentType),S.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Ft+"; q=0.01":""):p.accepts["*"]),p.headers)S.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(!1===p.beforeSend.call(m,S,p)||u))return S.abort();if(k="abort",y.add(p.complete),S.done(p.success),S.fail(p.error),r=Bt(Yt,p,t,S)){if(S.readyState=1,c&&h.trigger("ajaxSend",[S,p]),u)return S;p.async&&p.timeout>0&&(s=n.setTimeout((function(){S.abort("timeout")}),p.timeout));try{u=!1,r.send(b,O)}catch(e){if(u)throw e;O(-1,e)}}else O(-1,"No Transport");function O(e,t,i,l){var d,f,g,b,E,k=t;u||(u=!0,s&&n.clearTimeout(s),r=void 0,o=l||"",S.readyState=e>0?4:0,d=e>=200&&e<300||304===e,i&&(b=function(e,t,n){for(var r,a,o,i,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(a in s)if(s[a]&&s[a].test(r)){l.unshift(a);break}if(l[0]in n)o=l[0];else{for(a in n){if(!l[0]||e.converters[a+" "+l[0]]){o=a;break}i||(i=a)}o=o||i}if(o)return o!==l[0]&&l.unshift(o),n[o]}(p,S,i)),!d&&w.inArray("script",p.dataTypes)>-1&&(p.converters["text script"]=function(){}),b=function(e,t,n,r){var a,o,i,s,l,u={},c=e.dataTypes.slice();if(c[1])for(i in e.converters)u[i.toLowerCase()]=e.converters[i];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(i=u[l+" "+o]||u["* "+o]))for(a in u)if((s=a.split(" "))[1]===o&&(i=u[l+" "+s[0]]||u["* "+s[0]])){!0===i?i=u[a]:!0!==u[a]&&(o=s[0],c.unshift(s[1]));break}if(!0!==i)if(i&&e.throws)t=i(t);else try{t=i(t)}catch(e){return{state:"parsererror",error:i?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(p,b,S,d),d?(p.ifModified&&((E=S.getResponseHeader("Last-Modified"))&&(w.lastModified[a]=E),(E=S.getResponseHeader("etag"))&&(w.etag[a]=E)),204===e||"HEAD"===p.type?k="nocontent":304===e?k="notmodified":(k=b.state,f=b.data,d=!(g=b.error))):(g=k,!e&&k||(k="error",e<0&&(e=0))),S.status=e,S.statusText=(t||k)+"",d?_.resolveWith(m,[f,k,S]):_.rejectWith(m,[S,k,g]),S.statusCode(v),v=void 0,c&&h.trigger(d?"ajaxSuccess":"ajaxError",[S,p,d?f:g]),y.fireWith(m,[S,k]),c&&(h.trigger("ajaxComplete",[S,p]),--w.active||w.event.trigger("ajaxStop")))}return S},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,t){return w.get(e,void 0,t,"script")}}),w.each(["get","post"],(function(e,t){w[t]=function(e,n,r,a){return y(n)&&(a=a||r,r=n,n=void 0),w.ajax(w.extend({url:e,type:t,dataType:a,data:n,success:r},w.isPlainObject(e)&&e))}})),w.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),w._evalUrl=function(e,t,n){return w.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){w.globalEval(e,t,n)}})},w.fn.extend({wrapAll:function(e){var t;return this[0]&&(y(e)&&(e=e.call(this[0])),t=w(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return y(e)?this.each((function(t){w(this).wrapInner(e.call(this,t))})):this.each((function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=y(e);return this.each((function(n){w(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){w(this).replaceWith(this.childNodes)})),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Gt={0:200,1223:204},Vt=w.ajaxSettings.xhr();_.cors=!!Vt&&"withCredentials"in Vt,_.ajax=Vt=!!Vt,w.ajaxTransport((function(e){var t,r;if(_.cors||Vt&&!e.crossDomain)return{send:function(a,o){var i,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)s[i]=e.xhrFields[i];for(i in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||a["X-Requested-With"]||(a["X-Requested-With"]="XMLHttpRequest"),a)s.setRequestHeader(i,a[i]);t=function(e){return function(){t&&(t=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Gt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),r=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout((function(){t&&r()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),w.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return w.globalEval(e),e}}}),w.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),w.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,a){t=w("