(function(t){function s(s){for(var a,l,n=s[0],r=s[1],c=s[2],u=0,p=[];u-1:t.rescan_metadata},on:{change:function(s){var e=t.rescan_metadata,a=s.target,i=!!a.checked;if(Array.isArray(e)){var o=null,l=t._i(e,o);a.checked?l<0&&(t.rescan_metadata=e.concat([o])):l>-1&&(t.rescan_metadata=e.slice(0,l).concat(e.slice(l+1)))}else t.rescan_metadata=i}}}),t._v(" Rescan metadata for unmodified files ")])])])])],2),e("div",{directives:[{name:"show",rawName:"v-show",value:t.show_settings_menu,expression:"show_settings_menu"}],staticClass:"is-overlay",staticStyle:{"z-index":"10",width:"100vw",height:"100vh"},on:{click:function(s){t.show_settings_menu=!1}}})],1)}),n=[function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("a",{staticClass:"navbar-link is-arrowless"},[e("span",{staticClass:"icon is-hidden-touch"},[e("i",{staticClass:"mdi mdi-24px mdi-menu"})]),e("span",{staticClass:"is-hidden-desktop has-text-weight-bold"},[t._v("OwnTone")])])}],r=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("a",{staticClass:"navbar-item",class:{"is-active":t.is_active},attrs:{href:t.full_path()},on:{click:function(s){return s.stopPropagation(),s.preventDefault(),t.open_link()}}},[t._t("default")],2)},c=[];const d="UPDATE_CONFIG",u="UPDATE_SETTINGS",p="UPDATE_SETTINGS_OPTION",m="UPDATE_LIBRARY_STATS",_="UPDATE_LIBRARY_AUDIOBOOKS_COUNT",h="UPDATE_LIBRARY_PODCASTS_COUNT",f="UPDATE_OUTPUTS",y="UPDATE_PLAYER_STATUS",v="UPDATE_QUEUE",b="UPDATE_LASTFM",g="UPDATE_SPOTIFY",k="UPDATE_PAIRING",C="SPOTIFY_NEW_RELEASES",w="SPOTIFY_FEATURED_PLAYLISTS",x="ADD_NOTIFICATION",$="DELETE_NOTIFICATION",q="ADD_RECENT_SEARCH",A="HIDE_SINGLES",S="HIDE_SPOTIFY",j="ARTISTS_SORT",P="ARTIST_ALBUMS_SORT",T="ALBUMS_SORT",L="SHOW_ONLY_NEXT_ITEMS",O="SHOW_BURGER_MENU",E="SHOW_PLAYER_MENU";var I={name:"NavbarItemLink",props:{to:String,exact:Boolean},computed:{is_active(){return this.exact?this.$route.path===this.to:this.$route.path.startsWith(this.to)},show_player_menu:{get(){return this.$store.state.show_player_menu},set(t){this.$store.commit(E,t)}},show_burger_menu:{get(){return this.$store.state.show_burger_menu},set(t){this.$store.commit(O,t)}}},methods:{open_link:function(){this.show_burger_menu&&this.$store.commit(O,!1),this.show_player_menu&&this.$store.commit(E,!1),this.$router.push({path:this.to})},full_path:function(){const t=this.$router.resolve(this.to);return t.href}}},z=I,D=e("2877"),N=Object(D["a"])(z,r,c,!1,null,null,null),R=N.exports,M=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("transition",{attrs:{name:"fade"}},[t.show?e("div",{staticClass:"modal is-active"},[e("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),e("div",{staticClass:"modal-content fd-modal-card"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-content"},[t.title?e("p",{staticClass:"title is-4"},[t._v(" "+t._s(t.title)+" ")]):t._e(),t._t("modal-content")],2),e("footer",{staticClass:"card-footer"},[e("a",{staticClass:"card-footer-item has-text-dark",on:{click:function(s){return t.$emit("close")}}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-cancel"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v(t._s(t.close_action?t.close_action:"Cancel"))])]),t.delete_action?e("a",{staticClass:"card-footer-item has-background-danger has-text-white has-text-weight-bold",on:{click:function(s){return t.$emit("delete")}}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-delete"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v(t._s(t.delete_action))])]):t._e(),t.ok_action?e("a",{staticClass:"card-footer-item has-background-info has-text-white has-text-weight-bold",on:{click:function(s){return t.$emit("ok")}}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-check"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v(t._s(t.ok_action))])]):t._e()])])]),e("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},U=[],H={name:"ModalDialog",props:["show","title","ok_action","delete_action","close_action"]},F=H,W=Object(D["a"])(F,M,U,!1,null,null,null),B=W.exports,G=e("bc3a"),Y=e.n(G),Q=e("2f62");a["a"].use(Q["a"]);var V=new Q["a"].Store({state:{config:{websocket_port:0,version:"",buildoptions:[]},settings:{categories:[]},library:{artists:0,albums:0,songs:0,db_playtime:0,updating:!1},audiobooks_count:{},podcasts_count:{},outputs:[],player:{state:"stop",repeat:"off",consume:!1,shuffle:!1,volume:0,item_id:0,item_length_ms:0,item_progress_ms:0},queue:{version:0,count:0,items:[]},lastfm:{},spotify:{},pairing:{},spotify_new_releases:[],spotify_featured_playlists:[],notifications:{next_id:1,list:[]},recent_searches:[],hide_singles:!1,hide_spotify:!1,artists_sort:"Name",artist_albums_sort:"Name",albums_sort:"Name",show_only_next_items:!1,show_burger_menu:!1,show_player_menu:!1},getters:{now_playing:t=>{const s=t.queue.items.find((function(s){return s.id===t.player.item_id}));return void 0===s?{}:s},settings_webinterface:t=>t.settings?t.settings.categories.find(t=>"webinterface"===t.name):null,settings_option_recently_added_limit:(t,s)=>{if(s.settings_webinterface){const t=s.settings_webinterface.options.find(t=>"recently_added_limit"===t.name);if(t)return t.value}return 100},settings_option_show_composer_now_playing:(t,s)=>{if(s.settings_webinterface){const t=s.settings_webinterface.options.find(t=>"show_composer_now_playing"===t.name);if(t)return t.value}return!1},settings_option_show_composer_for_genre:(t,s)=>{if(s.settings_webinterface){const t=s.settings_webinterface.options.find(t=>"show_composer_for_genre"===t.name);if(t)return t.value}return null},settings_category:t=>s=>t.settings.categories.find(t=>t.name===s),settings_option:t=>(s,e)=>{const a=t.settings.categories.find(t=>t.name===s);return a?a.options.find(t=>t.name===e):{}}},mutations:{[d](t,s){t.config=s},[u](t,s){t.settings=s},[p](t,s){const e=t.settings.categories.find(t=>t.name===s.category),a=e.options.find(t=>t.name===s.name);a.value=s.value},[m](t,s){t.library=s},[_](t,s){t.audiobooks_count=s},[h](t,s){t.podcasts_count=s},[f](t,s){t.outputs=s},[y](t,s){t.player=s},[v](t,s){t.queue=s},[b](t,s){t.lastfm=s},[g](t,s){t.spotify=s},[k](t,s){t.pairing=s},[C](t,s){t.spotify_new_releases=s},[w](t,s){t.spotify_featured_playlists=s},[x](t,s){if(s.topic){const e=t.notifications.list.findIndex(t=>t.topic===s.topic);if(e>=0)return void t.notifications.list.splice(e,1,s)}t.notifications.list.push(s)},[$](t,s){const e=t.notifications.list.indexOf(s);-1!==e&&t.notifications.list.splice(e,1)},[q](t,s){const e=t.recent_searches.findIndex(t=>t===s);e>=0&&t.recent_searches.splice(e,1),t.recent_searches.splice(0,0,s),t.recent_searches.length>5&&t.recent_searches.pop()},[A](t,s){t.hide_singles=s},[S](t,s){t.hide_spotify=s},[j](t,s){t.artists_sort=s},[P](t,s){t.artist_albums_sort=s},[T](t,s){t.albums_sort=s},[L](t,s){t.show_only_next_items=s},[O](t,s){t.show_burger_menu=s},[E](t,s){t.show_player_menu=s}},actions:{add_notification({commit:t,state:s},e){const a={id:s.notifications.next_id++,type:e.type,text:e.text,topic:e.topic,timeout:e.timeout};t(x,a),e.timeout>0&&setTimeout(()=>{t($,a)},e.timeout)}}});Y.a.interceptors.response.use((function(t){return t}),(function(t){return t.request.status&&t.request.responseURL&&V.dispatch("add_notification",{text:"Request failed (status: "+t.request.status+" "+t.request.statusText+", url: "+t.request.responseURL+")",type:"danger"}),Promise.reject(t)}));var J={config(){return Y.a.get("./api/config")},settings(){return Y.a.get("./api/settings")},settings_update(t,s){return Y.a.put("./api/settings/"+t+"/"+s.name,s)},library_stats(){return Y.a.get("./api/library")},library_update(){return Y.a.put("./api/update")},library_rescan(){return Y.a.put("./api/rescan")},library_count(t){return Y.a.get("./api/library/count?expression="+t)},queue(){return Y.a.get("./api/queue")},queue_clear(){return Y.a.put("./api/queue/clear")},queue_remove(t){return Y.a.delete("./api/queue/items/"+t)},queue_move(t,s){return Y.a.put("./api/queue/items/"+t+"?new_position="+s)},queue_add(t){return Y.a.post("./api/queue/items/add?uris="+t).then(t=>(V.dispatch("add_notification",{text:t.data.count+" tracks appended to queue",type:"info",timeout:2e3}),Promise.resolve(t)))},queue_add_next(t){let s=0;return V.getters.now_playing&&V.getters.now_playing.id&&(s=V.getters.now_playing.position+1),Y.a.post("./api/queue/items/add?uris="+t+"&position="+s).then(t=>(V.dispatch("add_notification",{text:t.data.count+" tracks appended to queue",type:"info",timeout:2e3}),Promise.resolve(t)))},queue_expression_add(t){const s={};return s.expression=t,Y.a.post("./api/queue/items/add",void 0,{params:s}).then(t=>(V.dispatch("add_notification",{text:t.data.count+" tracks appended to queue",type:"info",timeout:2e3}),Promise.resolve(t)))},queue_expression_add_next(t){const s={};return s.expression=t,s.position=0,V.getters.now_playing&&V.getters.now_playing.id&&(s.position=V.getters.now_playing.position+1),Y.a.post("./api/queue/items/add",void 0,{params:s}).then(t=>(V.dispatch("add_notification",{text:t.data.count+" tracks appended to queue",type:"info",timeout:2e3}),Promise.resolve(t)))},queue_save_playlist(t){return Y.a.post("./api/queue/save",void 0,{params:{name:t}}).then(s=>(V.dispatch("add_notification",{text:'Queue saved to playlist "'+t+'"',type:"info",timeout:2e3}),Promise.resolve(s)))},player_status(){return Y.a.get("./api/player")},player_play_uri(t,s,e){const a={};return a.uris=t,a.shuffle=s?"true":"false",a.clear="true",a.playback="start",a.playback_from_position=e,Y.a.post("./api/queue/items/add",void 0,{params:a})},player_play_expression(t,s,e){const a={};return a.expression=t,a.shuffle=s?"true":"false",a.clear="true",a.playback="start",a.playback_from_position=e,Y.a.post("./api/queue/items/add",void 0,{params:a})},player_play(t={}){return Y.a.put("./api/player/play",void 0,{params:t})},player_playpos(t){return Y.a.put("./api/player/play?position="+t)},player_playid(t){return Y.a.put("./api/player/play?item_id="+t)},player_pause(){return Y.a.put("./api/player/pause")},player_stop(){return Y.a.put("./api/player/stop")},player_next(){return Y.a.put("./api/player/next")},player_previous(){return Y.a.put("./api/player/previous")},player_shuffle(t){const s=t?"true":"false";return Y.a.put("./api/player/shuffle?state="+s)},player_consume(t){const s=t?"true":"false";return Y.a.put("./api/player/consume?state="+s)},player_repeat(t){return Y.a.put("./api/player/repeat?state="+t)},player_volume(t){return Y.a.put("./api/player/volume?volume="+t)},player_output_volume(t,s){return Y.a.put("./api/player/volume?volume="+s+"&output_id="+t)},player_seek_to_pos(t){return Y.a.put("./api/player/seek?position_ms="+t)},player_seek(t){return Y.a.put("./api/player/seek?seek_ms="+t)},outputs(){return Y.a.get("./api/outputs")},output_update(t,s){return Y.a.put("./api/outputs/"+t,s)},output_toggle(t){return Y.a.put("./api/outputs/"+t+"/toggle")},library_artists(t){return Y.a.get("./api/library/artists",{params:{media_kind:t}})},library_artist(t){return Y.a.get("./api/library/artists/"+t)},library_artist_albums(t){return Y.a.get("./api/library/artists/"+t+"/albums")},library_albums(t){return Y.a.get("./api/library/albums",{params:{media_kind:t}})},library_album(t){return Y.a.get("./api/library/albums/"+t)},library_album_tracks(t,s={limit:-1,offset:0}){return Y.a.get("./api/library/albums/"+t+"/tracks",{params:s})},library_album_track_update(t,s){return Y.a.put("./api/library/albums/"+t+"/tracks",void 0,{params:s})},library_genres(){return Y.a.get("./api/library/genres")},library_genre(t){const s={type:"albums",media_kind:"music",expression:'genre is "'+t+'"'};return Y.a.get("./api/search",{params:s})},library_genre_tracks(t){const s={type:"tracks",media_kind:"music",expression:'genre is "'+t+'"'};return Y.a.get("./api/search",{params:s})},library_radio_streams(){const t={type:"tracks",media_kind:"music",expression:"data_kind is url and song_length = 0"};return Y.a.get("./api/search",{params:t})},library_composers(){return Y.a.get("./api/library/composers")},library_composer(t){const s={type:"albums",media_kind:"music",expression:'composer is "'+t+'"'};return Y.a.get("./api/search",{params:s})},library_composer_tracks(t){const s={type:"tracks",media_kind:"music",expression:'composer is "'+t+'"'};return Y.a.get("./api/search",{params:s})},library_artist_tracks(t){if(t){const s={type:"tracks",expression:'songartistid is "'+t+'"'};return Y.a.get("./api/search",{params:s})}},library_podcasts_new_episodes(){const t={type:"tracks",expression:"media_kind is podcast and play_count = 0 ORDER BY time_added DESC"};return Y.a.get("./api/search",{params:t})},library_podcast_episodes(t){const s={type:"tracks",expression:'media_kind is podcast and songalbumid is "'+t+'" ORDER BY date_released DESC'};return Y.a.get("./api/search",{params:s})},library_add(t){return Y.a.post("./api/library/add",void 0,{params:{url:t}})},library_playlist_delete(t){return Y.a.delete("./api/library/playlists/"+t,void 0)},library_playlists(){return Y.a.get("./api/library/playlists")},library_playlist_folder(t=0){return Y.a.get("./api/library/playlists/"+t+"/playlists")},library_playlist(t){return Y.a.get("./api/library/playlists/"+t)},library_playlist_tracks(t){return Y.a.get("./api/library/playlists/"+t+"/tracks")},library_track(t){return Y.a.get("./api/library/tracks/"+t)},library_track_playlists(t){return Y.a.get("./api/library/tracks/"+t+"/playlists")},library_track_update(t,s={}){return Y.a.put("./api/library/tracks/"+t,void 0,{params:s})},library_files(t){const s={directory:t};return Y.a.get("./api/library/files",{params:s})},search(t){return Y.a.get("./api/search",{params:t})},spotify(){return Y.a.get("./api/spotify")},spotify_login(t){return Y.a.post("./api/spotify-login",t)},spotify_logout(){return Y.a.get("./api/spotify-logout")},lastfm(){return Y.a.get("./api/lastfm")},lastfm_login(t){return Y.a.post("./api/lastfm-login",t)},lastfm_logout(t){return Y.a.get("./api/lastfm-logout")},pairing(){return Y.a.get("./api/pairing")},pairing_kickoff(t){return Y.a.post("./api/pairing",t)},artwork_url_append_size_params(t,s=600,e=600){return t&&t.startsWith("/")?t.includes("?")?t+"&maxwidth="+s+"&maxheight="+e:t+"?maxwidth="+s+"&maxheight="+e:t}},K={name:"NavbarTop",components:{NavbarItemLink:R,ModalDialog:B},data(){return{show_settings_menu:!1,show_update_library:!1,rescan_metadata:!1}},computed:{is_visible_playlists(){return this.$store.getters.settings_option("webinterface","show_menu_item_playlists").value},is_visible_music(){return this.$store.getters.settings_option("webinterface","show_menu_item_music").value},is_visible_podcasts(){return this.$store.getters.settings_option("webinterface","show_menu_item_podcasts").value},is_visible_audiobooks(){return this.$store.getters.settings_option("webinterface","show_menu_item_audiobooks").value},is_visible_radio(){return this.$store.getters.settings_option("webinterface","show_menu_item_radio").value},is_visible_files(){return this.$store.getters.settings_option("webinterface","show_menu_item_files").value},is_visible_search(){return this.$store.getters.settings_option("webinterface","show_menu_item_search").value},player(){return this.$store.state.player},config(){return this.$store.state.config},library(){return this.$store.state.library},audiobooks(){return this.$store.state.audiobooks_count},podcasts(){return this.$store.state.podcasts_count},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},show_burger_menu:{get(){return this.$store.state.show_burger_menu},set(t){this.$store.commit(O,t)}},show_player_menu(){return this.$store.state.show_player_menu},zindex(){return this.show_player_menu?"z-index: 20":""}},methods:{on_click_outside_settings(){this.show_settings_menu=!this.show_settings_menu},update_library(){this.rescan_metadata?J.library_rescan():J.library_update()}},watch:{$route(t,s){this.show_settings_menu=!1}}},X=K,Z=Object(D["a"])(X,l,n,!1,null,null,null),tt=Z.exports,st=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("nav",{staticClass:"fd-bottom-navbar navbar is-white is-fixed-bottom",class:{"is-transparent":t.is_now_playing_page,"is-dark":!t.is_now_playing_page},style:t.zindex,attrs:{role:"navigation","aria-label":"player controls"}},[e("div",{staticClass:"navbar-brand fd-expanded"},[e("navbar-item-link",{attrs:{to:"/",exact:""}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-24px mdi-playlist-play"})])]),t.is_now_playing_page?t._e():e("router-link",{staticClass:"navbar-item is-expanded is-clipped",attrs:{to:"/now-playing","active-class":"is-active",exact:""}},[e("div",{staticClass:"is-clipped"},[e("p",{staticClass:"is-size-7 fd-is-text-clipped"},[e("strong",[t._v(t._s(t.now_playing.title))]),e("br"),t._v(" "+t._s(t.now_playing.artist)),"url"===t.now_playing.data_kind?e("span",[t._v(" - "+t._s(t.now_playing.album))]):t._e()])])]),t.is_now_playing_page?e("player-button-previous",{staticClass:"navbar-item fd-margin-left-auto",attrs:{icon_style:"mdi-24px"}}):t._e(),t.is_now_playing_page?e("player-button-seek-back",{staticClass:"navbar-item",attrs:{seek_ms:"10000",icon_style:"mdi-24px"}}):t._e(),e("player-button-play-pause",{staticClass:"navbar-item",attrs:{icon_style:"mdi-36px",show_disabled_message:""}}),t.is_now_playing_page?e("player-button-seek-forward",{staticClass:"navbar-item",attrs:{seek_ms:"30000",icon_style:"mdi-24px"}}):t._e(),t.is_now_playing_page?e("player-button-next",{staticClass:"navbar-item",attrs:{icon_style:"mdi-24px"}}):t._e(),e("a",{staticClass:"navbar-item fd-margin-left-auto is-hidden-desktop",on:{click:function(s){t.show_player_menu=!t.show_player_menu}}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-18px",class:{"mdi-chevron-up":!t.show_player_menu,"mdi-chevron-down":t.show_player_menu}})])]),e("div",{staticClass:"navbar-item has-dropdown has-dropdown-up fd-margin-left-auto is-hidden-touch",class:{"is-active":t.show_player_menu}},[e("a",{staticClass:"navbar-link is-arrowless",on:{click:function(s){t.show_player_menu=!t.show_player_menu}}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-18px",class:{"mdi-chevron-up":!t.show_player_menu,"mdi-chevron-down":t.show_player_menu}})])]),e("div",{staticClass:"navbar-dropdown is-right is-boxed",staticStyle:{"margin-right":"6px","margin-bottom":"6px","border-radius":"6px"}},[e("div",{staticClass:"navbar-item"},[e("div",{staticClass:"level is-mobile"},[e("div",{staticClass:"level-left fd-expanded"},[e("div",{staticClass:"level-item",staticStyle:{"flex-grow":"0"}},[e("a",{staticClass:"button is-white is-small",on:{click:t.toggle_mute_volume}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-18px",class:{"mdi-volume-off":t.player.volume<=0,"mdi-volume-high":t.player.volume>0}})])])]),e("div",{staticClass:"level-item fd-expanded"},[e("div",{staticClass:"fd-expanded"},[e("p",{staticClass:"heading"},[t._v("Volume")]),e("range-slider",{staticClass:"slider fd-has-action",attrs:{min:"0",max:"100",step:"1",value:t.player.volume},on:{change:t.set_volume}})],1)])])])]),e("hr",{staticClass:"fd-navbar-divider"}),t._l(t.outputs,(function(t){return e("navbar-item-output",{key:t.id,attrs:{output:t}})})),e("hr",{staticClass:"fd-navbar-divider"}),e("div",{staticClass:"navbar-item"},[e("div",{staticClass:"level is-mobile"},[e("div",{staticClass:"level-left fd-expanded"},[e("div",{staticClass:"level-item",staticStyle:{"flex-grow":"0"}},[e("a",{staticClass:"button is-white is-small",class:{"is-loading":t.loading}},[e("span",{staticClass:"icon fd-has-action",class:{"has-text-grey-light":!t.playing&&!t.loading,"is-loading":t.loading},on:{click:t.togglePlay}},[e("i",{staticClass:"mdi mdi-18px mdi-radio-tower"})])])]),e("div",{staticClass:"level-item fd-expanded"},[e("div",{staticClass:"fd-expanded"},[e("p",{staticClass:"heading",class:{"has-text-grey-light":!t.playing}},[t._v("HTTP stream "),t._m(0)]),e("range-slider",{staticClass:"slider fd-has-action",attrs:{min:"0",max:"100",step:"1",disabled:!t.playing,value:t.stream_volume},on:{change:t.set_stream_volume}})],1)])])])]),e("hr",{staticClass:"fd-navbar-divider"}),e("div",{staticClass:"navbar-item"},[e("div",{staticClass:"level is-mobile fd-expanded"},[e("div",{staticClass:"level-item"},[e("div",{staticClass:"buttons has-addons"},[e("player-button-repeat",{staticClass:"button"}),e("player-button-shuffle",{staticClass:"button"}),e("player-button-consume",{staticClass:"button"})],1)])])])],2)])],1),e("div",{staticClass:"navbar-menu is-hidden-desktop",class:{"is-active":t.show_player_menu}},[e("div",{staticClass:"navbar-start"}),e("div",{staticClass:"navbar-end"},[e("div",{staticClass:"navbar-item"},[e("div",{staticClass:"buttons is-centered"},[e("player-button-repeat",{staticClass:"button",attrs:{icon_style:"mdi-18px"}}),e("player-button-shuffle",{staticClass:"button",attrs:{icon_style:"mdi-18px"}}),e("player-button-consume",{staticClass:"button",attrs:{icon_style:"mdi-18px"}})],1)]),e("hr",{staticClass:"fd-navbar-divider"}),e("div",{staticClass:"navbar-item"},[e("div",{staticClass:"level is-mobile"},[e("div",{staticClass:"level-left fd-expanded"},[e("div",{staticClass:"level-item",staticStyle:{"flex-grow":"0"}},[e("a",{staticClass:"button is-white is-small",on:{click:t.toggle_mute_volume}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-18px",class:{"mdi-volume-off":t.player.volume<=0,"mdi-volume-high":t.player.volume>0}})])])]),e("div",{staticClass:"level-item fd-expanded"},[e("div",{staticClass:"fd-expanded"},[e("p",{staticClass:"heading"},[t._v("Volume")]),e("range-slider",{staticClass:"slider fd-has-action",attrs:{min:"0",max:"100",step:"1",value:t.player.volume},on:{change:t.set_volume}})],1)])])])]),t._l(t.outputs,(function(t){return e("navbar-item-output",{key:t.id,attrs:{output:t}})})),e("hr",{staticClass:"fd-navbar-divider"}),e("div",{staticClass:"navbar-item fd-has-margin-bottom"},[e("div",{staticClass:"level is-mobile"},[e("div",{staticClass:"level-left fd-expanded"},[e("div",{staticClass:"level-item",staticStyle:{"flex-grow":"0"}},[e("a",{staticClass:"button is-white is-small",class:{"is-loading":t.loading}},[e("span",{staticClass:"icon fd-has-action",class:{"has-text-grey-light":!t.playing&&!t.loading,"is-loading":t.loading},on:{click:t.togglePlay}},[e("i",{staticClass:"mdi mdi-18px mdi-radio-tower"})])])]),e("div",{staticClass:"level-item fd-expanded"},[e("div",{staticClass:"fd-expanded"},[e("p",{staticClass:"heading",class:{"has-text-grey-light":!t.playing}},[t._v("HTTP stream "),t._m(1)]),e("range-slider",{staticClass:"slider fd-has-action",attrs:{min:"0",max:"100",step:"1",disabled:!t.playing,value:t.stream_volume},on:{change:t.set_stream_volume}})],1)])])])])],2)])])},et=[function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("a",{attrs:{href:"stream.mp3"}},[e("span",{staticClass:"is-lowercase"},[t._v("(stream.mp3)")])])},function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("a",{attrs:{href:"stream.mp3"}},[e("span",{staticClass:"is-lowercase"},[t._v("(stream.mp3)")])])}],at={_audio:new Audio,_context:null,_source:null,_gain:null,setupAudio(){const t=window.AudioContext||window.webkitAudioContext;return this._context=new t,this._source=this._context.createMediaElementSource(this._audio),this._gain=this._context.createGain(),this._source.connect(this._gain),this._gain.connect(this._context.destination),this._audio.addEventListener("canplaythrough",t=>{this._audio.play()}),this._audio.addEventListener("canplay",t=>{this._audio.play()}),this._audio},setVolume(t){this._gain&&(t=parseFloat(t)||0,t=t<0?0:t,t=t>1?1:t,this._gain.gain.value=t)},playSource(t){this.stopAudio(),this._context.resume().then(()=>{this._audio.src=String(t||"")+"?x="+Date.now(),this._audio.crossOrigin="anonymous",this._audio.load()})},stopAudio(){try{this._audio.pause()}catch(t){}try{this._audio.stop()}catch(t){}try{this._audio.close()}catch(t){}}},it=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"navbar-item"},[e("div",{staticClass:"level is-mobile"},[e("div",{staticClass:"level-left fd-expanded"},[e("div",{staticClass:"level-item",staticStyle:{"flex-grow":"0"}},[e("a",{staticClass:"button is-white is-small"},[e("span",{staticClass:"icon fd-has-action",class:{"has-text-grey-light":!t.output.selected},on:{click:t.set_enabled}},[e("i",{staticClass:"mdi mdi-18px",class:t.type_class,attrs:{title:t.output.type}})])])]),e("div",{staticClass:"level-item fd-expanded"},[e("div",{staticClass:"fd-expanded"},[e("p",{staticClass:"heading",class:{"has-text-grey-light":!t.output.selected}},[t._v(t._s(t.output.name))]),e("range-slider",{staticClass:"slider fd-has-action",attrs:{min:"0",max:"100",step:"1",disabled:!t.output.selected,value:t.volume},on:{change:t.set_volume}})],1)])])])])},ot=[],lt=e("c7e3"),nt=e.n(lt),rt={name:"NavbarItemOutput",components:{RangeSlider:nt.a},props:["output"],computed:{type_class(){return this.output.type.startsWith("AirPlay")?"mdi-airplay":"Chromecast"===this.output.type?"mdi-cast":"fifo"===this.output.type?"mdi-pipe":"mdi-server"},volume(){return this.output.selected?this.output.volume:0}},methods:{play_next:function(){J.player_next()},set_volume:function(t){J.player_output_volume(this.output.id,t)},set_enabled:function(){const t={selected:!this.output.selected};J.output_update(this.output.id,t)}}},ct=rt,dt=Object(D["a"])(ct,it,ot,!1,null,null,null),ut=dt.exports,pt=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("a",{attrs:{disabled:t.disabled},on:{click:t.toggle_play_pause}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi",class:[t.icon_style,{"mdi-play":!t.is_playing,"mdi-pause":t.is_playing&&t.is_pause_allowed,"mdi-stop":t.is_playing&&!t.is_pause_allowed}]})])])},mt=[],_t={name:"PlayerButtonPlayPause",props:{icon_style:String,show_disabled_message:Boolean},computed:{is_playing(){return"play"===this.$store.state.player.state},is_pause_allowed(){return this.$store.getters.now_playing&&"pipe"!==this.$store.getters.now_playing.data_kind},disabled(){return!this.$store.state.queue||this.$store.state.queue.count<=0}},methods:{toggle_play_pause:function(){this.disabled?this.show_disabled_message&&this.$store.dispatch("add_notification",{text:"Queue is empty",type:"info",topic:"connection",timeout:2e3}):this.is_playing&&this.is_pause_allowed?J.player_pause():this.is_playing&&!this.is_pause_allowed?J.player_stop():J.player_play()}}},ht=_t,ft=Object(D["a"])(ht,pt,mt,!1,null,null,null),yt=ft.exports,vt=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("a",{attrs:{disabled:t.disabled},on:{click:t.play_next}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-skip-forward",class:t.icon_style})])])},bt=[],gt={name:"PlayerButtonNext",props:{icon_style:String},computed:{disabled(){return!this.$store.state.queue||this.$store.state.queue.count<=0}},methods:{play_next:function(){this.disabled||J.player_next()}}},kt=gt,Ct=Object(D["a"])(kt,vt,bt,!1,null,null,null),wt=Ct.exports,xt=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("a",{attrs:{disabled:t.disabled},on:{click:t.play_previous}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-skip-backward",class:t.icon_style})])])},$t=[],qt={name:"PlayerButtonPrevious",props:{icon_style:String},computed:{disabled(){return!this.$store.state.queue||this.$store.state.queue.count<=0}},methods:{play_previous:function(){this.disabled||J.player_previous()}}},At=qt,St=Object(D["a"])(At,xt,$t,!1,null,null,null),jt=St.exports,Pt=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("a",{class:{"is-warning":t.is_shuffle},on:{click:t.toggle_shuffle_mode}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi",class:[t.icon_style,{"mdi-shuffle":t.is_shuffle,"mdi-shuffle-disabled":!t.is_shuffle}]})])])},Tt=[],Lt={name:"PlayerButtonShuffle",props:{icon_style:String},computed:{is_shuffle(){return this.$store.state.player.shuffle}},methods:{toggle_shuffle_mode:function(){J.player_shuffle(!this.is_shuffle)}}},Ot=Lt,Et=Object(D["a"])(Ot,Pt,Tt,!1,null,null,null),It=Et.exports,zt=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("a",{class:{"is-warning":t.is_consume},on:{click:t.toggle_consume_mode}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-fire",class:t.icon_style})])])},Dt=[],Nt={name:"PlayerButtonConsume",props:{icon_style:String},computed:{is_consume(){return this.$store.state.player.consume}},methods:{toggle_consume_mode:function(){J.player_consume(!this.is_consume)}}},Rt=Nt,Mt=Object(D["a"])(Rt,zt,Dt,!1,null,null,null),Ut=Mt.exports,Ht=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("a",{class:{"is-warning":!t.is_repeat_off},on:{click:t.toggle_repeat_mode}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi",class:[t.icon_style,{"mdi-repeat":t.is_repeat_all,"mdi-repeat-once":t.is_repeat_single,"mdi-repeat-off":t.is_repeat_off}]})])])},Ft=[],Wt={name:"PlayerButtonRepeat",props:{icon_style:String},computed:{is_repeat_all(){return"all"===this.$store.state.player.repeat},is_repeat_single(){return"single"===this.$store.state.player.repeat},is_repeat_off(){return!this.is_repeat_all&&!this.is_repeat_single}},methods:{toggle_repeat_mode:function(){this.is_repeat_all?J.player_repeat("single"):this.is_repeat_single?J.player_repeat("off"):J.player_repeat("all")}}},Bt=Wt,Gt=Object(D["a"])(Bt,Ht,Ft,!1,null,null,null),Yt=Gt.exports,Qt=function(){var t=this,s=t.$createElement,e=t._self._c||s;return t.visible?e("a",{attrs:{disabled:t.disabled},on:{click:t.seek}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-rewind",class:t.icon_style})])]):t._e()},Vt=[],Jt={name:"PlayerButtonSeekBack",props:["seek_ms","icon_style"],computed:{now_playing(){return this.$store.getters.now_playing},is_stopped(){return"stop"===this.$store.state.player.state},disabled(){return!this.$store.state.queue||this.$store.state.queue.count<=0||this.is_stopped||"pipe"===this.now_playing.data_kind},visible(){return["podcast","audiobook"].includes(this.now_playing.media_kind)}},methods:{seek:function(){this.disabled||J.player_seek(-1*this.seek_ms)}}},Kt=Jt,Xt=Object(D["a"])(Kt,Qt,Vt,!1,null,null,null),Zt=Xt.exports,ts=function(){var t=this,s=t.$createElement,e=t._self._c||s;return t.visible?e("a",{attrs:{disabled:t.disabled},on:{click:t.seek}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-fast-forward",class:t.icon_style})])]):t._e()},ss=[],es={name:"PlayerButtonSeekForward",props:["seek_ms","icon_style"],computed:{now_playing(){return this.$store.getters.now_playing},is_stopped(){return"stop"===this.$store.state.player.state},disabled(){return!this.$store.state.queue||this.$store.state.queue.count<=0||this.is_stopped||"pipe"===this.now_playing.data_kind},visible(){return["podcast","audiobook"].includes(this.now_playing.media_kind)}},methods:{seek:function(){this.disabled||J.player_seek(this.seek_ms)}}},as=es,is=Object(D["a"])(as,ts,ss,!1,null,null,null),os=is.exports,ls={name:"NavbarBottom",components:{NavbarItemLink:R,NavbarItemOutput:ut,RangeSlider:nt.a,PlayerButtonPlayPause:yt,PlayerButtonNext:wt,PlayerButtonPrevious:jt,PlayerButtonShuffle:It,PlayerButtonConsume:Ut,PlayerButtonRepeat:Yt,PlayerButtonSeekForward:os,PlayerButtonSeekBack:Zt},data(){return{old_volume:0,playing:!1,loading:!1,stream_volume:10,show_outputs_menu:!1,show_desktop_outputs_menu:!1}},computed:{show_player_menu:{get(){return this.$store.state.show_player_menu},set(t){this.$store.commit(E,t)}},show_burger_menu(){return this.$store.state.show_burger_menu},zindex(){return this.show_burger_menu?"z-index: 20":""},state(){return this.$store.state.player},now_playing(){return this.$store.getters.now_playing},is_now_playing_page(){return"/now-playing"===this.$route.path},outputs(){return this.$store.state.outputs},player(){return this.$store.state.player},config(){return this.$store.state.config}},methods:{on_click_outside_outputs(){this.show_outputs_menu=!1},set_volume:function(t){J.player_volume(t)},toggle_mute_volume:function(){this.player.volume>0?this.set_volume(0):this.set_volume(this.old_volume)},setupAudio:function(){const t=at.setupAudio();t.addEventListener("waiting",t=>{this.playing=!1,this.loading=!0}),t.addEventListener("playing",t=>{this.playing=!0,this.loading=!1}),t.addEventListener("ended",t=>{this.playing=!1,this.loading=!1}),t.addEventListener("error",t=>{this.closeAudio(),this.$store.dispatch("add_notification",{text:"HTTP stream error: failed to load stream or stopped loading due to network problem",type:"danger"}),this.playing=!1,this.loading=!1})},closeAudio:function(){at.stopAudio(),this.playing=!1},playChannel:function(){if(this.playing)return;const t="/stream.mp3";this.loading=!0,at.playSource(t),at.setVolume(this.stream_volume/100)},togglePlay:function(){if(!this.loading)return this.playing?this.closeAudio():this.playChannel()},set_stream_volume:function(t){this.stream_volume=t,at.setVolume(this.stream_volume/100)}},watch:{"$store.state.player.volume"(){this.player.volume>0&&(this.old_volume=this.player.volume)}},mounted(){this.setupAudio()},destroyed(){this.closeAudio()}},ns=ls,rs=Object(D["a"])(ns,st,et,!1,null,null,null),cs=rs.exports,ds=function(){var t=this,s=t.$createElement,e=t._self._c||s;return t.notifications.length>0?e("section",{staticClass:"fd-notifications"},[e("div",{staticClass:"columns is-centered"},[e("div",{staticClass:"column is-half"},t._l(t.notifications,(function(s){return e("div",{key:s.id,staticClass:"notification has-shadow ",class:["notification",s.type?"is-"+s.type:""]},[e("button",{staticClass:"delete",on:{click:function(e){return t.remove(s)}}}),t._v(" "+t._s(s.text)+" ")])})),0)])]):t._e()},us=[],ps={name:"Notifications",components:{},data(){return{showNav:!1}},computed:{notifications(){return this.$store.state.notifications.list}},methods:{remove:function(t){this.$store.commit($,t)}}},ms=ps,_s=(e("cf45"),Object(D["a"])(ms,ds,us,!1,null,null,null)),hs=_s.exports,fs=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("transition",{attrs:{name:"fade"}},[t.show?e("div",{staticClass:"modal is-active"},[e("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),e("div",{staticClass:"modal-content fd-modal-card"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-content"},[e("p",{staticClass:"title is-4"},[t._v(" Remote pairing request ")]),e("form",{on:{submit:function(s){return s.preventDefault(),t.kickoff_pairing.apply(null,arguments)}}},[e("label",{staticClass:"label"},[t._v(" "+t._s(t.pairing.remote)+" ")]),e("div",{staticClass:"field"},[e("div",{staticClass:"control"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.pairing_req.pin,expression:"pairing_req.pin"}],ref:"pin_field",staticClass:"input",attrs:{type:"text",placeholder:"Enter pairing code"},domProps:{value:t.pairing_req.pin},on:{input:function(s){s.target.composing||t.$set(t.pairing_req,"pin",s.target.value)}}})])])])]),e("footer",{staticClass:"card-footer"},[e("a",{staticClass:"card-footer-item has-text-danger",on:{click:function(s){return t.$emit("close")}}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-cancel"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Cancel")])]),e("a",{staticClass:"card-footer-item has-background-info has-text-white has-text-weight-bold",on:{click:t.kickoff_pairing}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-cellphone-iphone"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Pair Remote")])])])])]),e("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},ys=[],vs={name:"ModalDialogRemotePairing",props:["show"],data(){return{pairing_req:{pin:""}}},computed:{pairing(){return this.$store.state.pairing}},methods:{kickoff_pairing(){J.pairing_kickoff(this.pairing_req).then(()=>{this.pairing_req.pin=""})}},watch:{show(){this.show&&(this.loading=!1,setTimeout(()=>{this.$refs.pin_field.focus()},10))}}},bs=vs,gs=Object(D["a"])(bs,fs,ys,!1,null,null,null),ks=gs.exports,Cs=e("d04d"),ws=e.n(Cs),xs=e("c1df"),$s=e.n(xs),qs={name:"App",components:{NavbarTop:tt,NavbarBottom:cs,Notifications:hs,ModalDialogRemotePairing:ks},template:"",data(){return{token_timer_id:0,reconnect_attempts:0,pairing_active:!1}},computed:{show_burger_menu:{get(){return this.$store.state.show_burger_menu},set(t){this.$store.commit(O,t)}},show_player_menu:{get(){return this.$store.state.show_player_menu},set(t){this.$store.commit(E,t)}}},created:function(){$s.a.locale(navigator.language),this.connect(),this.$Progress.start(),this.$router.beforeEach((t,s,e)=>{if(t.meta.show_progress){if(void 0!==t.meta.progress){const s=t.meta.progress;this.$Progress.parseMeta(s)}this.$Progress.start()}e()}),this.$router.afterEach((t,s)=>{t.meta.show_progress&&this.$Progress.finish()})},methods:{connect:function(){this.$store.dispatch("add_notification",{text:"Connecting to OwnTone server",type:"info",topic:"connection",timeout:2e3}),J.config().then(({data:t})=>{this.$store.commit(d,t),this.$store.commit(A,t.hide_singles),document.title=t.library_name,this.open_ws(),this.$Progress.finish()}).catch(()=>{this.$store.dispatch("add_notification",{text:"Failed to connect to OwnTone server",type:"danger",topic:"connection"})})},open_ws:function(){if(this.$store.state.config.websocket_port<=0)return void this.$store.dispatch("add_notification",{text:"Missing websocket port",type:"danger"});const t=this;let s="ws://";"https:"===window.location.protocol&&(s="wss://");let e=s+window.location.hostname+":"+t.$store.state.config.websocket_port;const a=new ws.a(e,"notify",{reconnectInterval:3e3});a.onopen=function(){t.$store.dispatch("add_notification",{text:"Connection to server established",type:"primary",topic:"connection",timeout:2e3}),t.reconnect_attempts=0,a.send(JSON.stringify({notify:["update","database","player","options","outputs","volume","queue","spotify","lastfm","pairing"]})),t.update_outputs(),t.update_player_status(),t.update_library_stats(),t.update_settings(),t.update_queue(),t.update_spotify(),t.update_lastfm(),t.update_pairing()},a.onclose=function(){},a.onerror=function(){t.reconnect_attempts++,t.$store.dispatch("add_notification",{text:"Connection lost. Reconnecting ... ("+t.reconnect_attempts+")",type:"danger",topic:"connection"})},a.onmessage=function(s){const e=JSON.parse(s.data);(e.notify.includes("update")||e.notify.includes("database"))&&t.update_library_stats(),(e.notify.includes("player")||e.notify.includes("options")||e.notify.includes("volume"))&&t.update_player_status(),(e.notify.includes("outputs")||e.notify.includes("volume"))&&t.update_outputs(),e.notify.includes("queue")&&t.update_queue(),e.notify.includes("spotify")&&t.update_spotify(),e.notify.includes("lastfm")&&t.update_lastfm(),e.notify.includes("pairing")&&t.update_pairing()}},update_library_stats:function(){J.library_stats().then(({data:t})=>{this.$store.commit(m,t)}),J.library_count("media_kind is audiobook").then(({data:t})=>{this.$store.commit(_,t)}),J.library_count("media_kind is podcast").then(({data:t})=>{this.$store.commit(h,t)})},update_outputs:function(){J.outputs().then(({data:t})=>{this.$store.commit(f,t.outputs)})},update_player_status:function(){J.player_status().then(({data:t})=>{this.$store.commit(y,t)})},update_queue:function(){J.queue().then(({data:t})=>{this.$store.commit(v,t)})},update_settings:function(){J.settings().then(({data:t})=>{this.$store.commit(u,t)})},update_lastfm:function(){J.lastfm().then(({data:t})=>{this.$store.commit(b,t)})},update_spotify:function(){J.spotify().then(({data:t})=>{this.$store.commit(g,t),this.token_timer_id>0&&(window.clearTimeout(this.token_timer_id),this.token_timer_id=0),t.webapi_token_expires_in>0&&t.webapi_token&&(this.token_timer_id=window.setTimeout(this.update_spotify,1e3*t.webapi_token_expires_in))})},update_pairing:function(){J.pairing().then(({data:t})=>{this.$store.commit(k,t),this.pairing_active=t.active})},update_is_clipped:function(){this.show_burger_menu||this.show_player_menu?document.querySelector("html").classList.add("is-clipped"):document.querySelector("html").classList.remove("is-clipped")}},watch:{show_burger_menu(){this.update_is_clipped()},show_player_menu(){this.update_is_clipped()}}},As=qs,Ss=Object(D["a"])(As,i,o,!1,null,null,null),js=Ss.exports,Ps=e("8c4f"),Ts=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"heading"},[t._v(t._s(t.queue.count)+" tracks")]),e("p",{staticClass:"title is-4"},[t._v("Queue")])]),e("template",{slot:"heading-right"},[e("div",{staticClass:"buttons is-centered"},[e("a",{staticClass:"button is-small",class:{"is-info":t.show_only_next_items},on:{click:t.update_show_next_items}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-arrow-collapse-down"})]),e("span",[t._v("Hide previous")])]),e("a",{staticClass:"button is-small",on:{click:t.open_add_stream_dialog}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-web"})]),e("span",[t._v("Add Stream")])]),e("a",{staticClass:"button is-small",class:{"is-info":t.edit_mode},on:{click:function(s){t.edit_mode=!t.edit_mode}}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-pencil"})]),e("span",[t._v("Edit")])]),e("a",{staticClass:"button is-small",on:{click:t.queue_clear}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-delete-empty"})]),e("span",[t._v("Clear")])]),t.is_queue_save_allowed?e("a",{staticClass:"button is-small",attrs:{disabled:0===t.queue_items.length},on:{click:t.save_dialog}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-content-save"})]),e("span",[t._v("Save")])]):t._e()])]),e("template",{slot:"content"},[e("draggable",{attrs:{handle:".handle"},on:{end:t.move_item},model:{value:t.queue_items,callback:function(s){t.queue_items=s},expression:"queue_items"}},t._l(t.queue_items,(function(s,a){return e("list-item-queue-item",{key:s.id,attrs:{item:s,position:a,current_position:t.current_position,show_only_next_items:t.show_only_next_items,edit_mode:t.edit_mode}},[e("template",{slot:"actions"},[t.edit_mode?t._e():e("a",{on:{click:function(e){return t.open_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])]),s.id!==t.state.item_id&&t.edit_mode?e("a",{on:{click:function(e){return t.remove(s)}}},[e("span",{staticClass:"icon has-text-grey"},[e("i",{staticClass:"mdi mdi-delete mdi-18px"})])]):t._e()])],2)})),1),e("modal-dialog-queue-item",{attrs:{show:t.show_details_modal,item:t.selected_item},on:{close:function(s){t.show_details_modal=!1}}}),e("modal-dialog-add-url-stream",{attrs:{show:t.show_url_modal},on:{close:function(s){t.show_url_modal=!1}}}),t.is_queue_save_allowed?e("modal-dialog-playlist-save",{attrs:{show:t.show_pls_save_modal},on:{close:function(s){t.show_pls_save_modal=!1}}}):t._e()],1)],2)},Ls=[],Os=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("section",{staticClass:"section fd-content"},[e("div",{staticClass:"container"},[e("div",{staticClass:"columns is-centered"},[e("div",{staticClass:"column is-four-fifths"},[t.$slots["options"]?e("section",[e("div",{directives:[{name:"observe-visibility",rawName:"v-observe-visibility",value:t.observer_options,expression:"observer_options"}],staticStyle:{height:"2px"}}),t._t("options"),e("nav",{staticClass:"buttons is-centered",staticStyle:{"margin-bottom":"6px","margin-top":"16px"}},[t.options_visible?e("a",{staticClass:"button is-small is-white",on:{click:t.scroll_to_content}},[t._m(1)]):e("a",{staticClass:"button is-small is-white",on:{click:t.scroll_to_top}},[t._m(0)])])],2):t._e(),e("div",{class:{"fd-content-with-option":t.$slots["options"]}},[e("nav",{staticClass:"level",attrs:{id:"top"}},[e("div",{staticClass:"level-left"},[e("div",{staticClass:"level-item has-text-centered-mobile"},[e("div",[t._t("heading-left")],2)])]),e("div",{staticClass:"level-right has-text-centered-mobile"},[t._t("heading-right")],2)]),t._t("content"),e("div",{staticStyle:{"margin-top":"16px"}},[t._t("footer")],2)],2)])])])])},Es=[function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("span",{staticClass:"icon is-small"},[e("i",{staticClass:"mdi mdi-chevron-up"})])},function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("span",{staticClass:"icon is-small"},[e("i",{staticClass:"mdi mdi-chevron-down"})])}],Is={name:"ContentWithHeading",data(){return{options_visible:!1,observer_options:{callback:this.visibilityChanged,intersection:{rootMargin:"-100px",threshold:.3}}}},methods:{scroll_to_top:function(){window.scrollTo({top:0,behavior:"smooth"})},scroll_to_content:function(){this.$route.meta.has_tabs?this.$scrollTo("#top",{offset:-140}):this.$scrollTo("#top",{offset:-100})},visibilityChanged:function(t){this.options_visible=t}}},zs=Is,Ds=Object(D["a"])(zs,Os,Es,!1,null,null,null),Ns=Ds.exports,Rs=function(){var t=this,s=t.$createElement,e=t._self._c||s;return t.is_next||!t.show_only_next_items?e("div",{staticClass:"media"},[t.edit_mode?e("div",{staticClass:"media-left"},[t._m(0)]):t._e(),e("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:t.play}},[e("h1",{staticClass:"title is-6",class:{"has-text-primary":t.item.id===t.state.item_id,"has-text-grey-light":!t.is_next}},[t._v(t._s(t.item.title))]),e("h2",{staticClass:"subtitle is-7",class:{"has-text-primary":t.item.id===t.state.item_id,"has-text-grey-light":!t.is_next,"has-text-grey":t.is_next&&t.item.id!==t.state.item_id}},[e("b",[t._v(t._s(t.item.artist))])]),e("h2",{staticClass:"subtitle is-7",class:{"has-text-primary":t.item.id===t.state.item_id,"has-text-grey-light":!t.is_next,"has-text-grey":t.is_next&&t.item.id!==t.state.item_id}},[t._v(t._s(t.item.album))])]),e("div",{staticClass:"media-right"},[t._t("actions")],2)]):t._e()},Ms=[function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("span",{staticClass:"icon has-text-grey fd-is-movable handle"},[e("i",{staticClass:"mdi mdi-drag-horizontal mdi-18px"})])}],Us={name:"ListItemQueueItem",props:["item","position","current_position","show_only_next_items","edit_mode"],computed:{state(){return this.$store.state.player},is_next(){return this.current_position<0||this.position>=this.current_position}},methods:{play:function(){J.player_play({item_id:this.item.id})}}},Hs=Us,Fs=Object(D["a"])(Hs,Rs,Ms,!1,null,null,null),Ws=Fs.exports,Bs=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("transition",{attrs:{name:"fade"}},[t.show?e("div",{staticClass:"modal is-active"},[e("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),e("div",{staticClass:"modal-content fd-modal-card"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-content"},[e("p",{staticClass:"title is-4"},[t._v(" "+t._s(t.item.title)+" ")]),e("p",{staticClass:"subtitle"},[t._v(" "+t._s(t.item.artist)+" ")]),e("div",{staticClass:"content is-small"},[e("p",[e("span",{staticClass:"heading"},[t._v("Album")]),t.item.album_id?e("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_album}},[t._v(t._s(t.item.album))]):e("span",{staticClass:"title is-6"},[t._v(t._s(t.item.album))])]),t.item.album_artist?e("p",[e("span",{staticClass:"heading"},[t._v("Album artist")]),t.item.album_artist_id?e("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_album_artist}},[t._v(t._s(t.item.album_artist))]):e("span",{staticClass:"title is-6"},[t._v(t._s(t.item.album_artist))])]):t._e(),t.item.composer?e("p",[e("span",{staticClass:"heading"},[t._v("Composer")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t.item.composer))])]):t._e(),t.item.year>0?e("p",[e("span",{staticClass:"heading"},[t._v("Year")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t.item.year))])]):t._e(),t.item.genre?e("p",[e("span",{staticClass:"heading"},[t._v("Genre")]),e("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_genre}},[t._v(t._s(t.item.genre))])]):t._e(),e("p",[e("span",{staticClass:"heading"},[t._v("Track / Disc")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t.item.track_number)+" / "+t._s(t.item.disc_number))])]),e("p",[e("span",{staticClass:"heading"},[t._v("Length")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t._f("duration")(t.item.length_ms)))])]),e("p",[e("span",{staticClass:"heading"},[t._v("Path")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t.item.path))])]),e("p",[e("span",{staticClass:"heading"},[t._v("Type")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t.item.media_kind)+" - "+t._s(t.item.data_kind)+" "),"spotify"===t.item.data_kind?e("span",{staticClass:"has-text-weight-normal"},[t._v("("),e("a",{on:{click:t.open_spotify_artist}},[t._v("artist")]),t._v(", "),e("a",{on:{click:t.open_spotify_album}},[t._v("album")]),t._v(")")]):t._e()])]),e("p",[e("span",{staticClass:"heading"},[t._v("Quality")]),e("span",{staticClass:"title is-6"},[t._v(" "+t._s(t.item.type)+" "),t.item.samplerate?e("span",[t._v(" | "+t._s(t.item.samplerate)+" Hz")]):t._e(),t.item.channels?e("span",[t._v(" | "+t._s(t._f("channels")(t.item.channels)))]):t._e(),t.item.bitrate?e("span",[t._v(" | "+t._s(t.item.bitrate)+" Kb/s")]):t._e()])])])]),e("footer",{staticClass:"card-footer"},[e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.remove}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-delete"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Remove")])]),e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-play"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),e("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},Gs=[],Ys=e("be8d"),Qs=e.n(Ys),Vs={name:"ModalDialogQueueItem",props:["show","item"],data(){return{spotify_track:{}}},methods:{remove:function(){this.$emit("close"),J.queue_remove(this.item.id)},play:function(){this.$emit("close"),J.player_play({item_id:this.item.id})},open_album:function(){"podcast"===this.media_kind?this.$router.push({path:"/podcasts/"+this.item.album_id}):"audiobook"===this.media_kind?this.$router.push({path:"/audiobooks/"+this.item.album_id}):this.$router.push({path:"/music/albums/"+this.item.album_id})},open_album_artist:function(){this.$router.push({path:"/music/artists/"+this.item.album_artist_id})},open_genre:function(){this.$router.push({name:"Genre",params:{genre:this.item.genre}})},open_spotify_artist:function(){this.$emit("close"),this.$router.push({path:"/music/spotify/artists/"+this.spotify_track.artists[0].id})},open_spotify_album:function(){this.$emit("close"),this.$router.push({path:"/music/spotify/albums/"+this.spotify_track.album.id})}},watch:{item(){if(this.item&&"spotify"===this.item.data_kind){const t=new Qs.a;t.setAccessToken(this.$store.state.spotify.webapi_token),t.getTrack(this.item.path.slice(this.item.path.lastIndexOf(":")+1)).then(t=>{this.spotify_track=t})}else this.spotify_track={}}}},Js=Vs,Ks=Object(D["a"])(Js,Bs,Gs,!1,null,null,null),Xs=Ks.exports,Zs=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("transition",{attrs:{name:"fade"}},[t.show?e("div",{staticClass:"modal is-active"},[e("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),e("div",{staticClass:"modal-content fd-modal-card"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-content"},[e("p",{staticClass:"title is-4"},[t._v(" Add stream URL ")]),e("form",{staticClass:"fd-has-margin-bottom",on:{submit:function(s){return s.preventDefault(),t.play.apply(null,arguments)}}},[e("div",{staticClass:"field"},[e("p",{staticClass:"control is-expanded has-icons-left"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.url,expression:"url"}],ref:"url_field",staticClass:"input is-shadowless",attrs:{type:"text",placeholder:"http://url-to-stream",disabled:t.loading},domProps:{value:t.url},on:{input:function(s){s.target.composing||(t.url=s.target.value)}}}),e("span",{staticClass:"icon is-left"},[e("i",{staticClass:"mdi mdi-web"})])])])])]),t.loading?e("footer",{staticClass:"card-footer"},[e("a",{staticClass:"card-footer-item has-text-dark"},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-web"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Loading ...")])])]):e("footer",{staticClass:"card-footer"},[e("a",{staticClass:"card-footer-item has-text-danger",on:{click:function(s){return t.$emit("close")}}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-cancel"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Cancel")])]),e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.add_stream}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-playlist-plus"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Add")])]),e("a",{staticClass:"card-footer-item has-background-info has-text-white has-text-weight-bold",on:{click:t.play}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-play"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),e("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},te=[],se={name:"ModalDialogAddUrlStream",props:["show"],data(){return{url:"",loading:!1}},methods:{add_stream:function(){this.loading=!0,J.queue_add(this.url).then(()=>{this.$emit("close"),this.url=""}).catch(()=>{this.loading=!1})},play:function(){this.loading=!0,J.player_play_uri(this.url,!1).then(()=>{this.$emit("close"),this.url=""}).catch(()=>{this.loading=!1})}},watch:{show(){this.show&&(this.loading=!1,setTimeout(()=>{this.$refs.url_field.focus()},10))}}},ee=se,ae=Object(D["a"])(ee,Zs,te,!1,null,null,null),ie=ae.exports,oe=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("transition",{attrs:{name:"fade"}},[t.show?e("div",{staticClass:"modal is-active"},[e("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),e("div",{staticClass:"modal-content fd-modal-card"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-content"},[e("p",{staticClass:"title is-4"},[t._v(" Save queue to playlist ")]),e("form",{staticClass:"fd-has-margin-bottom",on:{submit:function(s){return s.preventDefault(),t.save.apply(null,arguments)}}},[e("div",{staticClass:"field"},[e("p",{staticClass:"control is-expanded has-icons-left"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.playlist_name,expression:"playlist_name"}],ref:"playlist_name_field",staticClass:"input is-shadowless",attrs:{type:"text",placeholder:"Playlist name",disabled:t.loading},domProps:{value:t.playlist_name},on:{input:function(s){s.target.composing||(t.playlist_name=s.target.value)}}}),e("span",{staticClass:"icon is-left"},[e("i",{staticClass:"mdi mdi-file-music"})])])])])]),t.loading?e("footer",{staticClass:"card-footer"},[e("a",{staticClass:"card-footer-item has-text-dark"},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-web"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Saving ...")])])]):e("footer",{staticClass:"card-footer"},[e("a",{staticClass:"card-footer-item has-text-danger",on:{click:function(s){return t.$emit("close")}}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-cancel"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Cancel")])]),e("a",{staticClass:"card-footer-item has-background-info has-text-white has-text-weight-bold",on:{click:t.save}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-content-save"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Save")])])])])]),e("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},le=[],ne={name:"ModalDialogPlaylistSave",props:["show"],data(){return{playlist_name:"",loading:!1}},methods:{save:function(){this.playlist_name.length<1||(this.loading=!0,J.queue_save_playlist(this.playlist_name).then(()=>{this.$emit("close"),this.playlist_name=""}).catch(()=>{this.loading=!1}))}},watch:{show(){this.show&&(this.loading=!1,setTimeout(()=>{this.$refs.playlist_name_field.focus()},10))}}},re=ne,ce=Object(D["a"])(re,oe,le,!1,null,null,null),de=ce.exports,ue=e("b76a"),pe=e.n(ue),me={name:"PageQueue",components:{ContentWithHeading:Ns,ListItemQueueItem:Ws,draggable:pe.a,ModalDialogQueueItem:Xs,ModalDialogAddUrlStream:ie,ModalDialogPlaylistSave:de},data(){return{edit_mode:!1,show_details_modal:!1,show_url_modal:!1,show_pls_save_modal:!1,selected_item:{}}},computed:{state(){return this.$store.state.player},is_queue_save_allowed(){return this.$store.state.config.allow_modifying_stored_playlists&&this.$store.state.config.default_playlist_directory},queue(){return this.$store.state.queue},queue_items:{get(){return this.$store.state.queue.items},set(t){}},current_position(){const t=this.$store.getters.now_playing;return void 0===t||void 0===t.position?-1:this.$store.getters.now_playing.position},show_only_next_items(){return this.$store.state.show_only_next_items}},methods:{queue_clear:function(){J.queue_clear()},update_show_next_items:function(t){this.$store.commit(L,!this.show_only_next_items)},remove:function(t){J.queue_remove(t.id)},move_item:function(t){const s=this.show_only_next_items?t.oldIndex+this.current_position:t.oldIndex,e=this.queue_items[s],a=e.position+(t.newIndex-t.oldIndex);a!==s&&J.queue_move(e.id,a)},open_dialog:function(t){this.selected_item=t,this.show_details_modal=!0},open_add_stream_dialog:function(t){this.show_url_modal=!0},save_dialog:function(t){this.queue_items.length>0&&(this.show_pls_save_modal=!0)}}},_e=me,he=Object(D["a"])(_e,Ts,Ls,!1,null,null,null),fe=he.exports,ye=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("section",[t.now_playing.id>0?e("div",{staticClass:"fd-is-fullheight"},[e("div",{staticClass:"fd-is-expanded"},[e("cover-artwork",{staticClass:"fd-cover-image fd-has-action",attrs:{artwork_url:t.now_playing.artwork_url,artist:t.now_playing.artist,album:t.now_playing.album},on:{click:function(s){return t.open_dialog(t.now_playing)}}})],1),e("div",{staticClass:"fd-has-padding-left-right"},[e("div",{staticClass:"container has-text-centered"},[e("p",{staticClass:"control has-text-centered fd-progress-now-playing"},[e("range-slider",{staticClass:"seek-slider fd-has-action",attrs:{min:"0",max:t.state.item_length_ms,value:t.item_progress_ms,disabled:"stop"===t.state.state,step:"1000"},on:{change:t.seek}})],1),e("p",{staticClass:"content"},[e("span",[t._v(t._s(t._f("duration")(t.item_progress_ms))+" / "+t._s(t._f("duration")(t.now_playing.length_ms)))])])])]),e("div",{staticClass:"fd-has-padding-left-right"},[e("div",{staticClass:"container has-text-centered fd-has-margin-top"},[e("h1",{staticClass:"title is-5"},[t._v(" "+t._s(t.now_playing.title)+" ")]),e("h2",{staticClass:"title is-6"},[t._v(" "+t._s(t.now_playing.artist)+" ")]),t.composer?e("h2",{staticClass:"subtitle is-6 has-text-grey has-text-weight-bold"},[t._v(" "+t._s(t.composer)+" ")]):t._e(),e("h3",{staticClass:"subtitle is-6"},[t._v(" "+t._s(t.now_playing.album)+" ")])])])]):e("div",{staticClass:"fd-is-fullheight"},[t._m(0)]),e("modal-dialog-queue-item",{attrs:{show:t.show_details_modal,item:t.selected_item},on:{close:function(s){t.show_details_modal=!1}}})],1)},ve=[function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"fd-is-expanded fd-has-padding-left-right",staticStyle:{"flex-direction":"column"}},[e("div",{staticClass:"content has-text-centered"},[e("h1",{staticClass:"title is-5"},[t._v(" Your play queue is empty ")]),e("p",[t._v(" Add some tracks by browsing your library ")])])])}],be=(e("ac1f"),function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("figure",[e("img",{directives:[{name:"lazyload",rawName:"v-lazyload"}],key:t.artwork_url_with_size,attrs:{"data-src":t.artwork_url_with_size,"data-err":t.dataURI},on:{click:function(s){return t.$emit("click")}}})])}),ge=[];e("5319"),e("13d5");class ke{render(t){const s=' '+t.caption+" ";return"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(s)}}var Ce=ke,we=e("5d8a"),xe=e.n(we),$e={name:"CoverArtwork",props:["artist","album","artwork_url","maxwidth","maxheight"],data(){return{svg:new Ce,width:600,height:600,font_family:"sans-serif",font_size:200,font_weight:600}},computed:{artwork_url_with_size:function(){return this.maxwidth>0&&this.maxheight>0?J.artwork_url_append_size_params(this.artwork_url,this.maxwidth,this.maxheight):J.artwork_url_append_size_params(this.artwork_url)},alt_text(){return this.artist+" - "+this.album},caption(){return this.album?this.album.substring(0,2):this.artist?this.artist.substring(0,2):""},background_color(){return xe()(this.alt_text)},is_background_light(){const t=this.background_color.replace(/#/,""),s=parseInt(t.substr(0,2),16),e=parseInt(t.substr(2,2),16),a=parseInt(t.substr(4,2),16),i=[.299*s,.587*e,.114*a].reduce((t,s)=>t+s)/255;return i>.5},text_color(){return this.is_background_light?"#000000":"#ffffff"},rendererParams(){return{width:this.width,height:this.height,textColor:this.text_color,backgroundColor:this.background_color,caption:this.caption,fontFamily:this.font_family,fontSize:this.font_size,fontWeight:this.font_weight}},dataURI(){return this.svg.render(this.rendererParams)}}},qe=$e,Ae=Object(D["a"])(qe,be,ge,!1,null,null,null),Se=Ae.exports,je={name:"PageNowPlaying",components:{ModalDialogQueueItem:Xs,RangeSlider:nt.a,CoverArtwork:Se},data(){return{item_progress_ms:0,interval_id:0,show_details_modal:!1,selected_item:{}}},created(){this.item_progress_ms=this.state.item_progress_ms,J.player_status().then(({data:t})=>{this.$store.commit(y,t),"play"===this.state.state&&(this.interval_id=window.setInterval(this.tick,1e3))})},destroyed(){this.interval_id>0&&(window.clearTimeout(this.interval_id),this.interval_id=0)},computed:{state(){return this.$store.state.player},now_playing(){return this.$store.getters.now_playing},settings_option_show_composer_now_playing(){return this.$store.getters.settings_option_show_composer_now_playing},settings_option_show_composer_for_genre(){return this.$store.getters.settings_option_show_composer_for_genre},composer(){return this.settings_option_show_composer_now_playing&&(!this.settings_option_show_composer_for_genre||this.now_playing.genre&&this.settings_option_show_composer_for_genre.toLowerCase().split(",").findIndex(t=>this.now_playing.genre.toLowerCase().indexOf(t.trim())>=0)>=0)?this.now_playing.composer:null}},methods:{tick:function(){this.item_progress_ms+=1e3},seek:function(t){J.player_seek_to_pos(t).catch(()=>{this.item_progress_ms=this.state.item_progress_ms})},open_dialog:function(t){this.selected_item=t,this.show_details_modal=!0}},watch:{state(){this.interval_id>0&&(window.clearTimeout(this.interval_id),this.interval_id=0),this.item_progress_ms=this.state.item_progress_ms,"play"===this.state.state&&(this.interval_id=window.setInterval(this.tick,1e3))}}},Pe=je,Te=Object(D["a"])(Pe,ye,ve,!1,null,null,null),Le=Te.exports,Oe=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("tabs-music"),e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("Recently added")]),e("p",{staticClass:"heading"},[t._v("albums")])]),e("template",{slot:"content"},[e("list-albums",{attrs:{albums:t.recently_added.items}})],1),e("template",{slot:"footer"},[e("nav",{staticClass:"level"},[e("p",{staticClass:"level-item"},[e("a",{staticClass:"button is-light is-small is-rounded",on:{click:function(s){return t.open_browse("recently_added")}}},[t._v("Show more")])])])])],2),e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("Recently played")]),e("p",{staticClass:"heading"},[t._v("tracks")])]),e("template",{slot:"content"},[e("list-tracks",{attrs:{tracks:t.recently_played.items}})],1),e("template",{slot:"footer"},[e("nav",{staticClass:"level"},[e("p",{staticClass:"level-item"},[e("a",{staticClass:"button is-light is-small is-rounded",on:{click:function(s){return t.open_browse("recently_played")}}},[t._v("Show more")])])])])],2)],1)},Ee=[];e("ddb0");const Ie=function(t){return{beforeRouteEnter(s,e,a){t.load(s).then(s=>{a(e=>t.set(e,s))})},beforeRouteUpdate(s,e,a){const i=this;t.load(s).then(s=>{t.set(i,s),a()})}}};var ze=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("section",{staticClass:"section fd-tabs-section"},[e("div",{staticClass:"container"},[e("div",{staticClass:"columns is-centered"},[e("div",{staticClass:"column is-four-fifths"},[e("div",{staticClass:"tabs is-centered is-small"},[e("ul",[e("router-link",{attrs:{tag:"li",to:"/music/browse","active-class":"is-active"}},[e("a",[e("span",{staticClass:"icon is-small"},[e("i",{staticClass:"mdi mdi-web"})]),e("span",{},[t._v("Browse")])])]),e("router-link",{attrs:{tag:"li",to:"/music/artists","active-class":"is-active"}},[e("a",[e("span",{staticClass:"icon is-small"},[e("i",{staticClass:"mdi mdi-artist"})]),e("span",{},[t._v("Artists")])])]),e("router-link",{attrs:{tag:"li",to:"/music/albums","active-class":"is-active"}},[e("a",[e("span",{staticClass:"icon is-small"},[e("i",{staticClass:"mdi mdi-album"})]),e("span",{},[t._v("Albums")])])]),e("router-link",{attrs:{tag:"li",to:"/music/genres","active-class":"is-active"}},[e("a",[e("span",{staticClass:"icon is-small"},[e("i",{staticClass:"mdi mdi-speaker"})]),e("span",{},[t._v("Genres")])])]),e("router-link",{attrs:{tag:"li",to:"/music/composers","active-class":"is-active"}},[e("a",[e("span",{staticClass:"icon is-small"},[e("i",{staticClass:"mdi mdi-book-open-page-variant"})]),e("span",{},[t._v("Composers")])])]),t.spotify_enabled?e("router-link",{attrs:{tag:"li",to:"/music/spotify","active-class":"is-active"}},[e("a",[e("span",{staticClass:"icon is-small"},[e("i",{staticClass:"mdi mdi-spotify"})]),e("span",{},[t._v("Spotify")])])]):t._e()],1)])])])])])},De=[],Ne={name:"TabsMusic",computed:{spotify_enabled(){return this.$store.state.spotify.webapi_token_valid}}},Re=Ne,Me=Object(D["a"])(Re,ze,De,!1,null,null,null),Ue=Me.exports,He=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[t.is_grouped?e("div",t._l(t.albums.indexList,(function(s){return e("div",{key:s,staticClass:"mb-6"},[e("span",{staticClass:"tag is-info is-light is-small has-text-weight-bold",attrs:{id:"index_"+s}},[t._v(t._s(s))]),t._l(t.albums.grouped[s],(function(s){return e("list-item-album",{key:s.id,attrs:{album:s},on:{click:function(e){return t.open_album(s)}}},[t.is_visible_artwork?e("template",{slot:"artwork"},[e("p",{staticClass:"image is-64x64 fd-has-shadow fd-has-action"},[e("cover-artwork",{attrs:{artwork_url:s.artwork_url,artist:s.artist,album:s.name,maxwidth:64,maxheight:64}})],1)]):t._e(),e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}))],2)})),0):e("div",t._l(t.albums_list,(function(s){return e("list-item-album",{key:s.id,attrs:{album:s},on:{click:function(e){return t.open_album(s)}}},[t.is_visible_artwork?e("template",{slot:"artwork"},[e("p",{staticClass:"image is-64x64 fd-has-shadow fd-has-action"},[e("cover-artwork",{attrs:{artwork_url:s.artwork_url,artist:s.artist,album:s.name,maxwidth:64,maxheight:64}})],1)]):t._e(),e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),1),e("modal-dialog-album",{attrs:{show:t.show_details_modal,album:t.selected_album,media_kind:t.media_kind},on:{"remove-podcast":function(s){return t.open_remove_podcast_dialog()},"play-count-changed":function(s){return t.play_count_changed()},close:function(s){t.show_details_modal=!1}}}),e("modal-dialog",{attrs:{show:t.show_remove_podcast_modal,title:"Remove podcast",delete_action:"Remove"},on:{close:function(s){t.show_remove_podcast_modal=!1},delete:t.remove_podcast}},[e("template",{slot:"modal-content"},[e("p",[t._v("Permanently remove this podcast from your library?")]),e("p",{staticClass:"is-size-7"},[t._v("(This will also remove the RSS playlist "),e("b",[t._v(t._s(t.rss_playlist_to_remove.name))]),t._v(".)")])])],2)],1)},Fe=[],We=function(t,s){var e=s._c;return e("div",{staticClass:"media",attrs:{id:"index_"+s.props.album.name_sort.charAt(0).toUpperCase()}},[s.$slots["artwork"]?e("div",{staticClass:"media-left fd-has-action",on:{click:s.listeners.click}},[s._t("artwork")],2):s._e(),e("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:s.listeners.click}},[e("div",{staticStyle:{"margin-top":"0.7rem"}},[e("h1",{staticClass:"title is-6"},[s._v(s._s(s.props.album.name))]),e("h2",{staticClass:"subtitle is-7 has-text-grey"},[e("b",[s._v(s._s(s.props.album.artist))])]),s.props.album.date_released&&"music"===s.props.album.media_kind?e("h2",{staticClass:"subtitle is-7 has-text-grey has-text-weight-normal"},[s._v(" "+s._s(s._f("time")(s.props.album.date_released,"L"))+" ")]):s._e()])]),e("div",{staticClass:"media-right",staticStyle:{"padding-top":"0.7rem"}},[s._t("actions")],2)])},Be=[],Ge={name:"ListItemAlbum",props:["album","media_kind"]},Ye=Ge,Qe=Object(D["a"])(Ye,We,Be,!0,null,null,null),Ve=Qe.exports,Je=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("transition",{attrs:{name:"fade"}},[t.show?e("div",{staticClass:"modal is-active"},[e("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),e("div",{staticClass:"modal-content fd-modal-card"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-content"},[e("cover-artwork",{staticClass:"image is-square fd-has-margin-bottom fd-has-shadow",attrs:{artwork_url:t.album.artwork_url,artist:t.album.artist,album:t.album.name}}),e("p",{staticClass:"title is-4"},[e("a",{staticClass:"has-text-link",on:{click:t.open_album}},[t._v(t._s(t.album.name))])]),"podcast"===t.media_kind_resolved?e("div",{staticClass:"buttons"},[e("a",{staticClass:"button is-small",on:{click:t.mark_played}},[t._v("Mark as played")]),e("a",{staticClass:"button is-small",on:{click:function(s){return t.$emit("remove-podcast")}}},[t._v("Remove podcast")])]):t._e(),e("div",{staticClass:"content is-small"},[t.album.artist?e("p",[e("span",{staticClass:"heading"},[t._v("Album artist")]),e("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_artist}},[t._v(t._s(t.album.artist))])]):t._e(),t.album.date_released?e("p",[e("span",{staticClass:"heading"},[t._v("Release date")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t._f("time")(t.album.date_released,"L")))])]):t.album.year>0?e("p",[e("span",{staticClass:"heading"},[t._v("Year")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t.album.year))])]):t._e(),e("p",[e("span",{staticClass:"heading"},[t._v("Tracks")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t.album.track_count))])]),e("p",[e("span",{staticClass:"heading"},[t._v("Length")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t._f("duration")(t.album.length_ms)))])]),e("p",[e("span",{staticClass:"heading"},[t._v("Type")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t.album.media_kind)+" - "+t._s(t.album.data_kind))])]),e("p",[e("span",{staticClass:"heading"},[t._v("Added at")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t._f("time")(t.album.time_added,"L LT")))])])])],1),e("footer",{staticClass:"card-footer"},[e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-playlist-plus"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Add")])]),e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-playlist-play"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-play"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),e("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},Ke=[],Xe={name:"ModalDialogAlbum",components:{CoverArtwork:Se},props:["show","album","media_kind","new_tracks"],data(){return{artwork_visible:!1}},computed:{artwork_url:function(){return J.artwork_url_append_size_params(this.album.artwork_url)},media_kind_resolved:function(){return this.media_kind?this.media_kind:this.album.media_kind}},methods:{play:function(){this.$emit("close"),J.player_play_uri(this.album.uri,!1)},queue_add:function(){this.$emit("close"),J.queue_add(this.album.uri)},queue_add_next:function(){this.$emit("close"),J.queue_add_next(this.album.uri)},open_album:function(){"podcast"===this.media_kind_resolved?this.$router.push({path:"/podcasts/"+this.album.id}):"audiobook"===this.media_kind_resolved?this.$router.push({path:"/audiobooks/"+this.album.id}):this.$router.push({path:"/music/albums/"+this.album.id})},open_artist:function(){"podcast"===this.media_kind_resolved||("audiobook"===this.media_kind_resolved?this.$router.push({path:"/audiobooks/artists/"+this.album.artist_id}):this.$router.push({path:"/music/artists/"+this.album.artist_id}))},mark_played:function(){J.library_album_track_update(this.album.id,{play_count:"played"}).then(({data:t})=>{this.$emit("play-count-changed"),this.$emit("close")})},artwork_loaded:function(){this.artwork_visible=!0},artwork_error:function(){this.artwork_visible=!1}}},Ze=Xe,ta=Object(D["a"])(Ze,Je,Ke,!1,null,null,null),sa=ta.exports;e("4e82");class ea{constructor(t,s={hideSingles:!1,hideSpotify:!1,sort:"Name",group:!1}){this.items=t,this.options=s,this.grouped={},this.sortedAndFiltered=[],this.indexList=[],this.init()}init(){this.createSortedAndFilteredList(),this.createGroupedList(),this.createIndexList()}getAlbumIndex(t){return"Recently added"===this.options.sort?t.time_added.substring(0,4):"Recently added (browse)"===this.options.sort?this.getRecentlyAddedBrowseIndex(t.time_added):"Recently released"===this.options.sort||"Release date"===this.options.sort?t.date_released?t.date_released.substring(0,4):"0000":t.name_sort.charAt(0).toUpperCase()}getRecentlyAddedBrowseIndex(t){if(!t)return"0000";const s=(new Date).getTime()-new Date(t).getTime();return s<864e5?"Today":s<6048e5?"Last week":s<2592e6?"Last month":t.substring(0,4)}isAlbumVisible(t){return!(this.options.hideSingles&&t.track_count<=2)&&(!this.options.hideSpotify||"spotify"!==t.data_kind)}createIndexList(){this.indexList=[...new Set(this.sortedAndFiltered.map(t=>this.getAlbumIndex(t)))]}createSortedAndFilteredList(){let t=this.items;(this.options.hideSingles||this.options.hideSpotify||this.options.hideOther)&&(t=t.filter(t=>this.isAlbumVisible(t))),"Recently added"===this.options.sort||"Recently added (browse)"===this.options.sort?t=[...t].sort((t,s)=>s.time_added.localeCompare(t.time_added)):"Recently released"===this.options.sort?t=[...t].sort((t,s)=>t.date_released?s.date_released?s.date_released.localeCompare(t.date_released):-1:1):"Release date"===this.options.sort&&(t=[...t].sort((t,s)=>t.date_released?s.date_released?t.date_released.localeCompare(s.date_released):1:-1)),this.sortedAndFiltered=t}createGroupedList(){this.options.group||(this.grouped={}),this.grouped=this.sortedAndFiltered.reduce((t,s)=>{const e=this.getAlbumIndex(s);return t[e]=[...t[e]||[],s],t},{})}}var aa={name:"ListAlbums",components:{ListItemAlbum:Ve,ModalDialogAlbum:sa,ModalDialog:B,CoverArtwork:Se},props:["albums","media_kind"],data(){return{show_details_modal:!1,selected_album:{},show_remove_podcast_modal:!1,rss_playlist_to_remove:{}}},computed:{is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value},media_kind_resolved:function(){return this.media_kind?this.media_kind:this.selected_album.media_kind},albums_list:function(){return Array.isArray(this.albums)?this.albums:this.albums.sortedAndFiltered},is_grouped:function(){return this.albums instanceof ea&&this.albums.options.group}},methods:{open_album:function(t){this.selected_album=t,"podcast"===this.media_kind_resolved?this.$router.push({path:"/podcasts/"+t.id}):"audiobook"===this.media_kind_resolved?this.$router.push({path:"/audiobooks/"+t.id}):this.$router.push({path:"/music/albums/"+t.id})},open_dialog:function(t){this.selected_album=t,this.show_details_modal=!0},open_remove_podcast_dialog:function(){J.library_album_tracks(this.selected_album.id,{limit:1}).then(({data:t})=>{J.library_track_playlists(t.items[0].id).then(({data:t})=>{const s=t.items.filter(t=>"rss"===t.type);1===s.length?(this.rss_playlist_to_remove=s[0],this.show_remove_podcast_modal=!0,this.show_details_modal=!1):this.$store.dispatch("add_notification",{text:"Podcast cannot be removed. Probably it was not added as an RSS playlist.",type:"danger"})})})},play_count_changed:function(){this.$emit("play-count-changed")},remove_podcast:function(){this.show_remove_podcast_modal=!1,J.library_playlist_delete(this.rss_playlist_to_remove.id).then(()=>{this.$emit("podcast-deleted")})}}},ia=aa,oa=Object(D["a"])(ia,He,Fe,!1,null,null,null),la=oa.exports,na=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[t._l(t.tracks,(function(s,a){return e("list-item-track",{key:s.id,attrs:{track:s},on:{click:function(e){return t.play_track(a,s)}}},[e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),e("modal-dialog-track",{attrs:{show:t.show_details_modal,track:t.selected_track},on:{close:function(s){t.show_details_modal=!1}}})],2)},ra=[],ca=function(t,s){var e=s._c;return e("div",{staticClass:"media",class:{"with-progress":s.slots().progress},attrs:{id:"index_"+s.props.track.title_sort.charAt(0).toUpperCase()}},[s.slots().icon?e("figure",{staticClass:"media-left fd-has-action",on:{click:s.listeners.click}},[s._t("icon")],2):s._e(),e("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:s.listeners.click}},[e("h1",{staticClass:"title is-6",class:{"has-text-grey":"podcast"===s.props.track.media_kind&&s.props.track.play_count>0}},[s._v(s._s(s.props.track.title))]),e("h2",{staticClass:"subtitle is-7 has-text-grey"},[e("b",[s._v(s._s(s.props.track.artist))])]),e("h2",{staticClass:"subtitle is-7 has-text-grey"},[s._v(s._s(s.props.track.album))]),s._t("progress")],2),e("div",{staticClass:"media-right"},[s._t("actions")],2)])},da=[],ua={name:"ListItemTrack",props:["track"]},pa=ua,ma=Object(D["a"])(pa,ca,da,!0,null,null,null),_a=ma.exports,ha=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("transition",{attrs:{name:"fade"}},[t.show?e("div",{staticClass:"modal is-active"},[e("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),e("div",{staticClass:"modal-content fd-modal-card"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-content"},[e("p",{staticClass:"title is-4"},[t._v(" "+t._s(t.track.title)+" ")]),e("p",{staticClass:"subtitle"},[t._v(" "+t._s(t.track.artist)+" ")]),"podcast"===t.track.media_kind?e("div",{staticClass:"buttons"},[t.track.play_count>0?e("a",{staticClass:"button is-small",on:{click:t.mark_new}},[t._v("Mark as new")]):t._e(),0===t.track.play_count?e("a",{staticClass:"button is-small",on:{click:t.mark_played}},[t._v("Mark as played")]):t._e()]):t._e(),e("div",{staticClass:"content is-small"},[e("p",[e("span",{staticClass:"heading"},[t._v("Album")]),e("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_album}},[t._v(t._s(t.track.album))])]),t.track.album_artist&&"audiobook"!==t.track.media_kind?e("p",[e("span",{staticClass:"heading"},[t._v("Album artist")]),e("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_artist}},[t._v(t._s(t.track.album_artist))])]):t._e(),t.track.composer?e("p",[e("span",{staticClass:"heading"},[t._v("Composer")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t.track.composer))])]):t._e(),t.track.date_released?e("p",[e("span",{staticClass:"heading"},[t._v("Release date")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t._f("time")(t.track.date_released,"L")))])]):t.track.year>0?e("p",[e("span",{staticClass:"heading"},[t._v("Year")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t.track.year))])]):t._e(),t.track.genre?e("p",[e("span",{staticClass:"heading"},[t._v("Genre")]),e("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_genre}},[t._v(t._s(t.track.genre))])]):t._e(),e("p",[e("span",{staticClass:"heading"},[t._v("Track / Disc")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t.track.track_number)+" / "+t._s(t.track.disc_number))])]),e("p",[e("span",{staticClass:"heading"},[t._v("Length")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t._f("duration")(t.track.length_ms)))])]),e("p",[e("span",{staticClass:"heading"},[t._v("Path")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t.track.path))])]),e("p",[e("span",{staticClass:"heading"},[t._v("Type")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t.track.media_kind)+" - "+t._s(t.track.data_kind)+" "),"spotify"===t.track.data_kind?e("span",{staticClass:"has-text-weight-normal"},[t._v("("),e("a",{on:{click:t.open_spotify_artist}},[t._v("artist")]),t._v(", "),e("a",{on:{click:t.open_spotify_album}},[t._v("album")]),t._v(")")]):t._e()])]),e("p",[e("span",{staticClass:"heading"},[t._v("Quality")]),e("span",{staticClass:"title is-6"},[t._v(" "+t._s(t.track.type)+" "),t.track.samplerate?e("span",[t._v(" | "+t._s(t.track.samplerate)+" Hz")]):t._e(),t.track.channels?e("span",[t._v(" | "+t._s(t._f("channels")(t.track.channels)))]):t._e(),t.track.bitrate?e("span",[t._v(" | "+t._s(t.track.bitrate)+" Kb/s")]):t._e()])]),e("p",[e("span",{staticClass:"heading"},[t._v("Added at")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t._f("time")(t.track.time_added,"L LT")))])]),e("p",[e("span",{staticClass:"heading"},[t._v("Rating")]),e("span",{staticClass:"title is-6"},[t._v(t._s(Math.floor(t.track.rating/10))+" / 10")])]),t.track.comment?e("p",[e("span",{staticClass:"heading"},[t._v("Comment")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t.track.comment))])]):t._e()])]),e("footer",{staticClass:"card-footer"},[e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-playlist-plus"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Add")])]),e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-playlist-play"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play_track}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-play"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),e("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},fa=[],ya={name:"ModalDialogTrack",props:["show","track"],data(){return{spotify_track:{}}},methods:{play_track:function(){this.$emit("close"),J.player_play_uri(this.track.uri,!1)},queue_add:function(){this.$emit("close"),J.queue_add(this.track.uri)},queue_add_next:function(){this.$emit("close"),J.queue_add_next(this.track.uri)},open_album:function(){this.$emit("close"),"podcast"===this.track.media_kind?this.$router.push({path:"/podcasts/"+this.track.album_id}):"audiobook"===this.track.media_kind?this.$router.push({path:"/audiobooks/"+this.track.album_id}):this.$router.push({path:"/music/albums/"+this.track.album_id})},open_artist:function(){this.$emit("close"),this.$router.push({path:"/music/artists/"+this.track.album_artist_id})},open_genre:function(){this.$router.push({name:"Genre",params:{genre:this.track.genre}})},open_spotify_artist:function(){this.$emit("close"),this.$router.push({path:"/music/spotify/artists/"+this.spotify_track.artists[0].id})},open_spotify_album:function(){this.$emit("close"),this.$router.push({path:"/music/spotify/albums/"+this.spotify_track.album.id})},mark_new:function(){J.library_track_update(this.track.id,{play_count:"reset"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},mark_played:function(){J.library_track_update(this.track.id,{play_count:"increment"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})}},watch:{track(){if(this.track&&"spotify"===this.track.data_kind){const t=new Qs.a;t.setAccessToken(this.$store.state.spotify.webapi_token),t.getTrack(this.track.path.slice(this.track.path.lastIndexOf(":")+1)).then(t=>{this.spotify_track=t})}else this.spotify_track={}}}},va=ya,ba=Object(D["a"])(va,ha,fa,!1,null,null,null),ga=ba.exports,ka={name:"ListTracks",components:{ListItemTrack:_a,ModalDialogTrack:ga},props:["tracks","uris","expression"],data(){return{show_details_modal:!1,selected_track:{}}},methods:{play_track:function(t,s){this.uris?J.player_play_uri(this.uris,!1,t):this.expression?J.player_play_expression(this.expression,!1,t):J.player_play_uri(s.uri,!1)},open_dialog:function(t){this.selected_track=t,this.show_details_modal=!0}}},Ca=ka,wa=Object(D["a"])(Ca,na,ra,!1,null,null,null),xa=wa.exports;const $a={load:function(t){return Promise.all([J.search({type:"album",expression:"time_added after 8 weeks ago and media_kind is music having track_count > 3 order by time_added desc",limit:3}),J.search({type:"track",expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:3})])},set:function(t,s){t.recently_added=s[0].data.albums,t.recently_played=s[1].data.tracks}};var qa={name:"PageBrowse",mixins:[Ie($a)],components:{ContentWithHeading:Ns,TabsMusic:Ue,ListAlbums:la,ListTracks:xa},data(){return{recently_added:{items:[]},recently_played:{items:[]},show_track_details_modal:!1,selected_track:{}}},methods:{open_browse:function(t){this.$router.push({path:"/music/browse/"+t})}}},Aa=qa,Sa=Object(D["a"])(Aa,Oe,Ee,!1,null,null,null),ja=Sa.exports,Pa=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("tabs-music"),e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("Recently added")]),e("p",{staticClass:"heading"},[t._v("albums")])]),e("template",{slot:"content"},[e("list-albums",{attrs:{albums:t.albums_list}})],1)],2)],1)},Ta=[];const La={load:function(t){const s=V.getters.settings_option_recently_added_limit;return J.search({type:"album",expression:"media_kind is music having track_count > 3 order by time_added desc",limit:s})},set:function(t,s){t.recently_added=s.data.albums}};var Oa={name:"PageBrowseType",mixins:[Ie(La)],components:{ContentWithHeading:Ns,TabsMusic:Ue,ListAlbums:la},data(){return{recently_added:{items:[]}}},computed:{albums_list(){return new ea(this.recently_added.items,{hideSingles:!1,hideSpotify:!1,sort:"Recently added (browse)",group:!0})}}},Ea=Oa,Ia=Object(D["a"])(Ea,Pa,Ta,!1,null,null,null),za=Ia.exports,Da=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("tabs-music"),e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("Recently played")]),e("p",{staticClass:"heading"},[t._v("tracks")])]),e("template",{slot:"content"},[e("list-tracks",{attrs:{tracks:t.recently_played.items}})],1)],2)],1)},Na=[];const Ra={load:function(t){return J.search({type:"track",expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:50})},set:function(t,s){t.recently_played=s.data.tracks}};var Ma={name:"PageBrowseType",mixins:[Ie(Ra)],components:{ContentWithHeading:Ns,TabsMusic:Ue,ListTracks:xa},data(){return{recently_played:{}}}},Ua=Ma,Ha=Object(D["a"])(Ua,Da,Na,!1,null,null,null),Fa=Ha.exports,Wa=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("tabs-music"),e("content-with-heading",[e("template",{slot:"options"},[e("index-button-list",{attrs:{index:t.artists_list.indexList}}),e("div",{staticClass:"columns"},[e("div",{staticClass:"column"},[e("p",{staticClass:"heading",staticStyle:{"margin-bottom":"24px"}},[t._v("Filter")]),e("div",{staticClass:"field"},[e("div",{staticClass:"control"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.hide_singles,expression:"hide_singles"}],staticClass:"switch",attrs:{id:"switchHideSingles",type:"checkbox",name:"switchHideSingles"},domProps:{checked:Array.isArray(t.hide_singles)?t._i(t.hide_singles,null)>-1:t.hide_singles},on:{change:function(s){var e=t.hide_singles,a=s.target,i=!!a.checked;if(Array.isArray(e)){var o=null,l=t._i(e,o);a.checked?l<0&&(t.hide_singles=e.concat([o])):l>-1&&(t.hide_singles=e.slice(0,l).concat(e.slice(l+1)))}else t.hide_singles=i}}}),e("label",{attrs:{for:"switchHideSingles"}},[t._v("Hide singles")])]),e("p",{staticClass:"help"},[t._v("If active, hides artists that only appear on singles or playlists.")])]),t.spotify_enabled?e("div",{staticClass:"field"},[e("div",{staticClass:"control"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.hide_spotify,expression:"hide_spotify"}],staticClass:"switch",attrs:{id:"switchHideSpotify",type:"checkbox",name:"switchHideSpotify"},domProps:{checked:Array.isArray(t.hide_spotify)?t._i(t.hide_spotify,null)>-1:t.hide_spotify},on:{change:function(s){var e=t.hide_spotify,a=s.target,i=!!a.checked;if(Array.isArray(e)){var o=null,l=t._i(e,o);a.checked?l<0&&(t.hide_spotify=e.concat([o])):l>-1&&(t.hide_spotify=e.slice(0,l).concat(e.slice(l+1)))}else t.hide_spotify=i}}}),e("label",{attrs:{for:"switchHideSpotify"}},[t._v("Hide artists from Spotify")])]),e("p",{staticClass:"help"},[t._v("If active, hides artists that only appear in your Spotify library.")])]):t._e()]),e("div",{staticClass:"column"},[e("p",{staticClass:"heading",staticStyle:{"margin-bottom":"24px"}},[t._v("Sort by")]),e("dropdown-menu",{attrs:{options:t.sort_options},model:{value:t.sort,callback:function(s){t.sort=s},expression:"sort"}})],1)])],1),e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("Artists")]),e("p",{staticClass:"heading"},[t._v(t._s(t.artists_list.sortedAndFiltered.length)+" Artists")])]),e("template",{slot:"heading-right"}),e("template",{slot:"content"},[e("list-artists",{attrs:{artists:t.artists_list}})],1)],2)],1)},Ba=[],Ga=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("section",[e("nav",{staticClass:"buttons is-centered fd-is-square",staticStyle:{"margin-bottom":"16px"}},t._l(t.filtered_index,(function(s){return e("a",{key:s,staticClass:"button is-small",on:{click:function(e){return t.nav(s)}}},[t._v(t._s(s))])})),0)])},Ya=[],Qa={name:"IndexButtonList",props:["index"],computed:{filtered_index(){const t="!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~";return this.index.filter(s=>!t.includes(s))}},methods:{nav:function(t){this.$router.push({path:this.$router.currentRoute.path+"#index_"+t})},scroll_to_top:function(){window.scrollTo({top:0,behavior:"smooth"})}}},Va=Qa,Ja=Object(D["a"])(Va,Ga,Ya,!1,null,null,null),Ka=Ja.exports,Xa=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[t.is_grouped?e("div",t._l(t.artists.indexList,(function(s){return e("div",{key:s,staticClass:"mb-6"},[e("span",{staticClass:"tag is-info is-light is-small has-text-weight-bold",attrs:{id:"index_"+s}},[t._v(t._s(s))]),t._l(t.artists.grouped[s],(function(s){return e("list-item-artist",{key:s.id,attrs:{artist:s},on:{click:function(e){return t.open_artist(s)}}},[e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}))],2)})),0):e("div",t._l(t.artists_list,(function(s){return e("list-item-artist",{key:s.id,attrs:{artist:s},on:{click:function(e){return t.open_artist(s)}}},[e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),1),e("modal-dialog-artist",{attrs:{show:t.show_details_modal,artist:t.selected_artist,media_kind:t.media_kind},on:{close:function(s){t.show_details_modal=!1}}})],1)},Za=[],ti=function(t,s){var e=s._c;return e("div",{staticClass:"media"},[e("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:s.listeners.click}},[e("h1",{staticClass:"title is-6"},[s._v(s._s(s.props.artist.name))])]),e("div",{staticClass:"media-right"},[s._t("actions")],2)])},si=[],ei={name:"ListItemArtist",props:["artist"]},ai=ei,ii=Object(D["a"])(ai,ti,si,!0,null,null,null),oi=ii.exports,li=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("transition",{attrs:{name:"fade"}},[t.show?e("div",{staticClass:"modal is-active"},[e("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),e("div",{staticClass:"modal-content fd-modal-card"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-content"},[e("p",{staticClass:"title is-4"},[e("a",{staticClass:"has-text-link",on:{click:t.open_artist}},[t._v(t._s(t.artist.name))])]),e("div",{staticClass:"content is-small"},[e("p",[e("span",{staticClass:"heading"},[t._v("Albums")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t.artist.album_count))])]),e("p",[e("span",{staticClass:"heading"},[t._v("Tracks")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t.artist.track_count))])]),e("p",[e("span",{staticClass:"heading"},[t._v("Type")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t.artist.data_kind))])]),e("p",[e("span",{staticClass:"heading"},[t._v("Added at")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t._f("time")(t.artist.time_added,"L LT")))])])])]),e("footer",{staticClass:"card-footer"},[e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-playlist-plus"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Add")])]),e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-playlist-play"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-play"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),e("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},ni=[],ri={name:"ModalDialogArtist",props:["show","artist"],methods:{play:function(){this.$emit("close"),J.player_play_uri(this.artist.uri,!1)},queue_add:function(){this.$emit("close"),J.queue_add(this.artist.uri)},queue_add_next:function(){this.$emit("close"),J.queue_add_next(this.artist.uri)},open_artist:function(){this.$emit("close"),this.$router.push({path:"/music/artists/"+this.artist.id})}}},ci=ri,di=Object(D["a"])(ci,li,ni,!1,null,null,null),ui=di.exports;class pi{constructor(t,s={hideSingles:!1,hideSpotify:!1,sort:"Name",group:!1}){this.items=t,this.options=s,this.grouped={},this.sortedAndFiltered=[],this.indexList=[],this.init()}init(){this.createSortedAndFilteredList(),this.createGroupedList(),this.createIndexList()}getArtistIndex(t){return"Name"===this.options.sort?t.name_sort.charAt(0).toUpperCase():t.time_added.substring(0,4)}isArtistVisible(t){return!(this.options.hideSingles&&t.track_count<=2*t.album_count)&&(!this.options.hideSpotify||"spotify"!==t.data_kind)}createIndexList(){this.indexList=[...new Set(this.sortedAndFiltered.map(t=>this.getArtistIndex(t)))]}createSortedAndFilteredList(){let t=this.items;(this.options.hideSingles||this.options.hideSpotify||this.options.hideOther)&&(t=t.filter(t=>this.isArtistVisible(t))),"Recently added"===this.options.sort&&(t=[...t].sort((t,s)=>s.time_added.localeCompare(t.time_added))),this.sortedAndFiltered=t}createGroupedList(){this.options.group||(this.grouped={}),this.grouped=this.sortedAndFiltered.reduce((t,s)=>{const e=this.getArtistIndex(s);return t[e]=[...t[e]||[],s],t},{})}}var mi={name:"ListArtists",components:{ListItemArtist:oi,ModalDialogArtist:ui},props:["artists","media_kind"],data(){return{show_details_modal:!1,selected_artist:{}}},computed:{media_kind_resolved:function(){return this.media_kind?this.media_kind:this.selected_artist.media_kind},artists_list:function(){return Array.isArray(this.artists)?this.artists:this.artists.sortedAndFiltered},is_grouped:function(){return this.artists instanceof pi&&this.artists.options.group}},methods:{open_artist:function(t){this.selected_artist=t,"podcast"===this.media_kind_resolved||("audiobook"===this.media_kind_resolved?this.$router.push({path:"/audiobooks/artists/"+t.id}):this.$router.push({path:"/music/artists/"+t.id}))},open_dialog:function(t){this.selected_artist=t,this.show_details_modal=!0}}},_i=mi,hi=Object(D["a"])(_i,Xa,Za,!1,null,null,null),fi=hi.exports,yi=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.onClickOutside,expression:"onClickOutside"}],staticClass:"dropdown",class:{"is-active":t.is_active}},[e("div",{staticClass:"dropdown-trigger"},[e("button",{staticClass:"button",attrs:{"aria-haspopup":"true","aria-controls":"dropdown-menu"},on:{click:function(s){t.is_active=!t.is_active}}},[e("span",[t._v(t._s(t.value))]),t._m(0)])]),e("div",{staticClass:"dropdown-menu",attrs:{id:"dropdown-menu",role:"menu"}},[e("div",{staticClass:"dropdown-content"},t._l(t.options,(function(s){return e("a",{key:s,staticClass:"dropdown-item",class:{"is-active":t.value===s},on:{click:function(e){return t.select(s)}}},[t._v(" "+t._s(s)+" ")])})),0)])])},vi=[function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("span",{staticClass:"icon is-small"},[e("i",{staticClass:"mdi mdi-chevron-down",attrs:{"aria-hidden":"true"}})])}],bi={name:"DropdownMenu",props:["value","options"],data(){return{is_active:!1}},methods:{onClickOutside(t){this.is_active=!1},select(t){this.is_active=!1,this.$emit("input",t)}}},gi=bi,ki=Object(D["a"])(gi,yi,vi,!1,null,null,null),Ci=ki.exports;const wi={load:function(t){return J.library_artists("music")},set:function(t,s){t.artists=s.data}};var xi={name:"PageArtists",mixins:[Ie(wi)],components:{ContentWithHeading:Ns,TabsMusic:Ue,IndexButtonList:Ka,ListArtists:fi,DropdownMenu:Ci},data(){return{artists:{items:[]},sort_options:["Name","Recently added"]}},computed:{artists_list(){return new pi(this.artists.items,{hideSingles:this.hide_singles,hideSpotify:this.hide_spotify,sort:this.sort,group:!0})},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},hide_singles:{get(){return this.$store.state.hide_singles},set(t){this.$store.commit(A,t)}},hide_spotify:{get(){return this.$store.state.hide_spotify},set(t){this.$store.commit(S,t)}},sort:{get(){return this.$store.state.artists_sort},set(t){this.$store.commit(j,t)}}},methods:{scrollToTop:function(){window.scrollTo({top:0,behavior:"smooth"})}}},$i=xi,qi=Object(D["a"])($i,Wa,Ba,!1,null,null,null),Ai=qi.exports,Si=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("content-with-heading",[e("template",{slot:"options"},[e("div",{staticClass:"columns"},[e("div",{staticClass:"column"},[e("p",{staticClass:"heading",staticStyle:{"margin-bottom":"24px"}},[t._v("Sort by")]),e("dropdown-menu",{attrs:{options:t.sort_options},model:{value:t.sort,callback:function(s){t.sort=s},expression:"sort"}})],1)])]),e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v(t._s(t.artist.name))])]),e("template",{slot:"heading-right"},[e("div",{staticClass:"buttons is-centered"},[e("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_artist_details_modal=!0}}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),e("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-shuffle"})]),t._v(" "),e("span",[t._v("Shuffle")])])])]),e("template",{slot:"content"},[e("p",{staticClass:"heading has-text-centered-mobile"},[t._v(t._s(t.artist.album_count)+" albums | "),e("a",{staticClass:"has-text-link",on:{click:t.open_tracks}},[t._v(t._s(t.artist.track_count)+" tracks")])]),e("list-albums",{attrs:{albums:t.albums_list}}),e("modal-dialog-artist",{attrs:{show:t.show_artist_details_modal,artist:t.artist},on:{close:function(s){t.show_artist_details_modal=!1}}})],1)],2)},ji=[];const Pi={load:function(t){return Promise.all([J.library_artist(t.params.artist_id),J.library_artist_albums(t.params.artist_id)])},set:function(t,s){t.artist=s[0].data,t.albums=s[1].data}};var Ti={name:"PageArtist",mixins:[Ie(Pi)],components:{ContentWithHeading:Ns,ListAlbums:la,ModalDialogArtist:ui,DropdownMenu:Ci},data(){return{artist:{},albums:{items:[]},sort_options:["Name","Release date"],show_artist_details_modal:!1}},computed:{albums_list(){return new ea(this.albums.items,{sort:this.sort,group:!1})},sort:{get(){return this.$store.state.artist_albums_sort},set(t){this.$store.commit(P,t)}}},methods:{open_tracks:function(){this.$router.push({path:"/music/artists/"+this.artist.id+"/tracks"})},play:function(){J.player_play_uri(this.albums.items.map(t=>t.uri).join(","),!0)}}},Li=Ti,Oi=Object(D["a"])(Li,Si,ji,!1,null,null,null),Ei=Oi.exports,Ii=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("tabs-music"),e("content-with-heading",[e("template",{slot:"options"},[e("index-button-list",{attrs:{index:t.albums_list.indexList}}),e("div",{staticClass:"columns"},[e("div",{staticClass:"column"},[e("p",{staticClass:"heading",staticStyle:{"margin-bottom":"24px"}},[t._v("Filter")]),e("div",{staticClass:"field"},[e("div",{staticClass:"control"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.hide_singles,expression:"hide_singles"}],staticClass:"switch",attrs:{id:"switchHideSingles",type:"checkbox",name:"switchHideSingles"},domProps:{checked:Array.isArray(t.hide_singles)?t._i(t.hide_singles,null)>-1:t.hide_singles},on:{change:function(s){var e=t.hide_singles,a=s.target,i=!!a.checked;if(Array.isArray(e)){var o=null,l=t._i(e,o);a.checked?l<0&&(t.hide_singles=e.concat([o])):l>-1&&(t.hide_singles=e.slice(0,l).concat(e.slice(l+1)))}else t.hide_singles=i}}}),e("label",{attrs:{for:"switchHideSingles"}},[t._v("Hide singles")])]),e("p",{staticClass:"help"},[t._v("If active, hides singles and albums with tracks that only appear in playlists.")])]),t.spotify_enabled?e("div",{staticClass:"field"},[e("div",{staticClass:"control"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.hide_spotify,expression:"hide_spotify"}],staticClass:"switch",attrs:{id:"switchHideSpotify",type:"checkbox",name:"switchHideSpotify"},domProps:{checked:Array.isArray(t.hide_spotify)?t._i(t.hide_spotify,null)>-1:t.hide_spotify},on:{change:function(s){var e=t.hide_spotify,a=s.target,i=!!a.checked;if(Array.isArray(e)){var o=null,l=t._i(e,o);a.checked?l<0&&(t.hide_spotify=e.concat([o])):l>-1&&(t.hide_spotify=e.slice(0,l).concat(e.slice(l+1)))}else t.hide_spotify=i}}}),e("label",{attrs:{for:"switchHideSpotify"}},[t._v("Hide albums from Spotify")])]),e("p",{staticClass:"help"},[t._v("If active, hides albums that only appear in your Spotify library.")])]):t._e()]),e("div",{staticClass:"column"},[e("p",{staticClass:"heading",staticStyle:{"margin-bottom":"24px"}},[t._v("Sort by")]),e("dropdown-menu",{attrs:{options:t.sort_options},model:{value:t.sort,callback:function(s){t.sort=s},expression:"sort"}})],1)])],1),e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("Albums")]),e("p",{staticClass:"heading"},[t._v(t._s(t.albums_list.sortedAndFiltered.length)+" Albums")])]),e("template",{slot:"heading-right"}),e("template",{slot:"content"},[e("list-albums",{attrs:{albums:t.albums_list}})],1)],2)],1)},zi=[];const Di={load:function(t){return J.library_albums("music")},set:function(t,s){t.albums=s.data,t.index_list=[...new Set(t.albums.items.filter(s=>!t.$store.state.hide_singles||s.track_count>2).map(t=>t.name_sort.charAt(0).toUpperCase()))]}};var Ni={name:"PageAlbums",mixins:[Ie(Di)],components:{ContentWithHeading:Ns,TabsMusic:Ue,IndexButtonList:Ka,ListAlbums:la,DropdownMenu:Ci},data(){return{albums:{items:[]},sort_options:["Name","Recently added","Recently released"]}},computed:{albums_list(){return new ea(this.albums.items,{hideSingles:this.hide_singles,hideSpotify:this.hide_spotify,sort:this.sort,group:!0})},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},hide_singles:{get(){return this.$store.state.hide_singles},set(t){this.$store.commit(A,t)}},hide_spotify:{get(){return this.$store.state.hide_spotify},set(t){this.$store.commit(S,t)}},sort:{get(){return this.$store.state.albums_sort},set(t){this.$store.commit(T,t)}}},methods:{scrollToTop:function(){window.scrollTo({top:0,behavior:"smooth"})}}},Ri=Ni,Mi=Object(D["a"])(Ri,Ii,zi,!1,null,null,null),Ui=Mi.exports,Hi=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("content-with-hero",[e("template",{slot:"heading-left"},[e("h1",{staticClass:"title is-5"},[t._v(t._s(t.album.name))]),e("h2",{staticClass:"subtitle is-6 has-text-link has-text-weight-normal"},[e("a",{staticClass:"has-text-link",on:{click:t.open_artist}},[t._v(t._s(t.album.artist))])]),e("div",{staticClass:"buttons fd-is-centered-mobile fd-has-margin-top"},[e("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-shuffle"})]),t._v(" "),e("span",[t._v("Shuffle")])]),e("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_album_details_modal=!0}}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])])])]),e("template",{slot:"heading-right"},[e("p",{staticClass:"image is-square fd-has-shadow fd-has-action"},[e("cover-artwork",{attrs:{artwork_url:t.album.artwork_url,artist:t.album.artist,album:t.album.name},on:{click:function(s){t.show_album_details_modal=!0}}})],1)]),e("template",{slot:"content"},[e("p",{staticClass:"heading is-7 has-text-centered-mobile fd-has-margin-top"},[t._v(t._s(t.album.track_count)+" tracks")]),e("list-tracks",{attrs:{tracks:t.tracks,uris:t.album.uri}}),e("modal-dialog-album",{attrs:{show:t.show_album_details_modal,album:t.album},on:{close:function(s){t.show_album_details_modal=!1}}})],1)],2)},Fi=[],Wi=e("fd4d");const Bi={load:function(t){return Promise.all([J.library_album(t.params.album_id),J.library_album_tracks(t.params.album_id)])},set:function(t,s){t.album=s[0].data,t.tracks=s[1].data.items}};var Gi={name:"PageAlbum",mixins:[Ie(Bi)],components:{ContentWithHero:Wi["default"],ListTracks:xa,ModalDialogAlbum:sa,CoverArtwork:Se},data(){return{album:{},tracks:[],show_album_details_modal:!1}},methods:{open_artist:function(){this.show_details_modal=!1,this.$router.push({path:"/music/artists/"+this.album.artist_id})},play:function(){J.player_play_uri(this.album.uri,!0)}}},Yi=Gi,Qi=Object(D["a"])(Yi,Hi,Fi,!1,null,null,null),Vi=Qi.exports,Ji=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("tabs-music"),e("content-with-heading",[e("template",{slot:"options"},[e("index-button-list",{attrs:{index:t.index_list}})],1),e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("Genres")]),e("p",{staticClass:"heading"},[t._v(t._s(t.genres.total)+" genres")])]),e("template",{slot:"content"},[t._l(t.genres.items,(function(s){return e("list-item-genre",{key:s.name,attrs:{genre:s},on:{click:function(e){return t.open_genre(s)}}},[e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),e("modal-dialog-genre",{attrs:{show:t.show_details_modal,genre:t.selected_genre},on:{close:function(s){t.show_details_modal=!1}}})],2)],2)],1)},Ki=[],Xi=function(t,s){var e=s._c;return e("div",{staticClass:"media",attrs:{id:"index_"+s.props.genre.name.charAt(0).toUpperCase()}},[e("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:s.listeners.click}},[e("h1",{staticClass:"title is-6"},[s._v(s._s(s.props.genre.name))])]),e("div",{staticClass:"media-right"},[s._t("actions")],2)])},Zi=[],to={name:"ListItemGenre",props:["genre"]},so=to,eo=Object(D["a"])(so,Xi,Zi,!0,null,null,null),ao=eo.exports,io=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("transition",{attrs:{name:"fade"}},[t.show?e("div",{staticClass:"modal is-active"},[e("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),e("div",{staticClass:"modal-content fd-modal-card"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-content"},[e("p",{staticClass:"title is-4"},[e("a",{staticClass:"has-text-link",on:{click:t.open_genre}},[t._v(t._s(t.genre.name))])])]),e("footer",{staticClass:"card-footer"},[e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-playlist-plus"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Add")])]),e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-playlist-play"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-play"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),e("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},oo=[],lo={name:"ModalDialogGenre",props:["show","genre"],methods:{play:function(){this.$emit("close"),J.player_play_expression('genre is "'+this.genre.name+'" and media_kind is music',!1)},queue_add:function(){this.$emit("close"),J.queue_expression_add('genre is "'+this.genre.name+'" and media_kind is music')},queue_add_next:function(){this.$emit("close"),J.queue_expression_add_next('genre is "'+this.genre.name+'" and media_kind is music')},open_genre:function(){this.$emit("close"),this.$router.push({name:"Genre",params:{genre:this.genre.name}})}}},no=lo,ro=Object(D["a"])(no,io,oo,!1,null,null,null),co=ro.exports;const uo={load:function(t){return J.library_genres()},set:function(t,s){t.genres=s.data}};var po={name:"PageGenres",mixins:[Ie(uo)],components:{ContentWithHeading:Ns,TabsMusic:Ue,IndexButtonList:Ka,ListItemGenre:ao,ModalDialogGenre:co},data(){return{genres:{items:[]},show_details_modal:!1,selected_genre:{}}},computed:{index_list(){return[...new Set(this.genres.items.map(t=>t.name.charAt(0).toUpperCase()))]}},methods:{open_genre:function(t){this.$router.push({name:"Genre",params:{genre:t.name}})},open_dialog:function(t){this.selected_genre=t,this.show_details_modal=!0}}},mo=po,_o=Object(D["a"])(mo,Ji,Ki,!1,null,null,null),ho=_o.exports,fo=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("content-with-heading",[e("template",{slot:"options"},[e("index-button-list",{attrs:{index:t.index_list}})],1),e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v(t._s(t.name))])]),e("template",{slot:"heading-right"},[e("div",{staticClass:"buttons is-centered"},[e("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_genre_details_modal=!0}}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),e("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-shuffle"})]),t._v(" "),e("span",[t._v("Shuffle")])])])]),e("template",{slot:"content"},[e("p",{staticClass:"heading has-text-centered-mobile"},[t._v(t._s(t.genre_albums.total)+" albums | "),e("a",{staticClass:"has-text-link",on:{click:t.open_tracks}},[t._v("tracks")])]),e("list-albums",{attrs:{albums:t.genre_albums.items}}),e("modal-dialog-genre",{attrs:{show:t.show_genre_details_modal,genre:{name:t.name}},on:{close:function(s){t.show_genre_details_modal=!1}}})],1)],2)],1)},yo=[];const vo={load:function(t){return J.library_genre(t.params.genre)},set:function(t,s){t.name=t.$route.params.genre,t.genre_albums=s.data.albums}};var bo={name:"PageGenre",mixins:[Ie(vo)],components:{ContentWithHeading:Ns,IndexButtonList:Ka,ListAlbums:la,ModalDialogGenre:co},data(){return{name:"",genre_albums:{items:[]},show_genre_details_modal:!1}},computed:{index_list(){return[...new Set(this.genre_albums.items.map(t=>t.name.charAt(0).toUpperCase()))]}},methods:{open_tracks:function(){this.show_details_modal=!1,this.$router.push({name:"GenreTracks",params:{genre:this.name}})},play:function(){J.player_play_expression('genre is "'+this.name+'" and media_kind is music',!0)},open_dialog:function(t){this.selected_album=t,this.show_details_modal=!0}}},go=bo,ko=Object(D["a"])(go,fo,yo,!1,null,null,null),Co=ko.exports,wo=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("content-with-heading",[e("template",{slot:"options"},[e("index-button-list",{attrs:{index:t.index_list}})],1),e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v(t._s(t.genre))])]),e("template",{slot:"heading-right"},[e("div",{staticClass:"buttons is-centered"},[e("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_genre_details_modal=!0}}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),e("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-shuffle"})]),t._v(" "),e("span",[t._v("Shuffle")])])])]),e("template",{slot:"content"},[e("p",{staticClass:"heading has-text-centered-mobile"},[e("a",{staticClass:"has-text-link",on:{click:t.open_genre}},[t._v("albums")]),t._v(" | "+t._s(t.tracks.total)+" tracks")]),e("list-tracks",{attrs:{tracks:t.tracks.items,expression:t.expression}}),e("modal-dialog-genre",{attrs:{show:t.show_genre_details_modal,genre:{name:t.genre}},on:{close:function(s){t.show_genre_details_modal=!1}}})],1)],2)],1)},xo=[];const $o={load:function(t){return J.library_genre_tracks(t.params.genre)},set:function(t,s){t.genre=t.$route.params.genre,t.tracks=s.data.tracks}};var qo={name:"PageGenreTracks",mixins:[Ie($o)],components:{ContentWithHeading:Ns,ListTracks:xa,IndexButtonList:Ka,ModalDialogGenre:co},data(){return{tracks:{items:[]},genre:"",show_genre_details_modal:!1}},computed:{index_list(){return[...new Set(this.tracks.items.map(t=>t.title_sort.charAt(0).toUpperCase()))]},expression(){return'genre is "'+this.genre+'" and media_kind is music'}},methods:{open_genre:function(){this.show_details_modal=!1,this.$router.push({name:"Genre",params:{genre:this.genre}})},play:function(){J.player_play_expression(this.expression,!0)}}},Ao=qo,So=Object(D["a"])(Ao,wo,xo,!1,null,null,null),jo=So.exports,Po=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("content-with-heading",[e("template",{slot:"options"},[e("index-button-list",{attrs:{index:t.index_list}})],1),e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v(t._s(t.artist.name))])]),e("template",{slot:"heading-right"},[e("div",{staticClass:"buttons is-centered"},[e("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_artist_details_modal=!0}}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),e("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-shuffle"})]),t._v(" "),e("span",[t._v("Shuffle")])])])]),e("template",{slot:"content"},[e("p",{staticClass:"heading has-text-centered-mobile"},[e("a",{staticClass:"has-text-link",on:{click:t.open_artist}},[t._v(t._s(t.artist.album_count)+" albums")]),t._v(" | "+t._s(t.artist.track_count)+" tracks")]),e("list-tracks",{attrs:{tracks:t.tracks.items,uris:t.track_uris}}),e("modal-dialog-artist",{attrs:{show:t.show_artist_details_modal,artist:t.artist},on:{close:function(s){t.show_artist_details_modal=!1}}})],1)],2)],1)},To=[];const Lo={load:function(t){return Promise.all([J.library_artist(t.params.artist_id),J.library_artist_tracks(t.params.artist_id)])},set:function(t,s){t.artist=s[0].data,t.tracks=s[1].data.tracks}};var Oo={name:"PageArtistTracks",mixins:[Ie(Lo)],components:{ContentWithHeading:Ns,ListTracks:xa,IndexButtonList:Ka,ModalDialogArtist:ui},data(){return{artist:{},tracks:{items:[]},show_artist_details_modal:!1}},computed:{index_list(){return[...new Set(this.tracks.items.map(t=>t.title_sort.charAt(0).toUpperCase()))]},track_uris(){return this.tracks.items.map(t=>t.uri).join(",")}},methods:{open_artist:function(){this.show_details_modal=!1,this.$router.push({path:"/music/artists/"+this.artist.id})},play:function(){J.player_play_uri(this.tracks.items.map(t=>t.uri).join(","),!0)}}},Eo=Oo,Io=Object(D["a"])(Eo,Po,To,!1,null,null,null),zo=Io.exports,Do=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("tabs-music"),e("content-with-heading",[e("template",{slot:"options"},[e("index-button-list",{attrs:{index:t.composers_list.indexList}})],1),e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v(t._s(t.heading))]),e("p",{staticClass:"heading"},[t._v(t._s(t.composers.total)+" composers")])]),e("template",{slot:"content"},[e("list-composers",{attrs:{composers:t.composers_list}})],1)],2)],1)},No=[],Ro=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[t.is_grouped?e("div",t._l(t.composers.indexList,(function(s){return e("div",{key:s,staticClass:"mb-6"},[e("span",{staticClass:"tag is-info is-light is-small has-text-weight-bold",attrs:{id:"index_"+s}},[t._v(t._s(s))]),t._l(t.composers.grouped[s],(function(s){return e("list-item-composer",{key:s.id,attrs:{composer:s},on:{click:function(e){return t.open_composer(s)}}},[e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}))],2)})),0):e("div",t._l(t.composers_list,(function(s){return e("list-item-composer",{key:s.id,attrs:{composer:s},on:{click:function(e){return t.open_composer(s)}}},[e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),1),e("modal-dialog-composer",{attrs:{show:t.show_details_modal,composer:t.selected_composer,media_kind:t.media_kind},on:{close:function(s){t.show_details_modal=!1}}})],1)},Mo=[],Uo=function(t,s){var e=s._c;return e("div",{staticClass:"media",attrs:{id:"index_"+s.props.composer.name.charAt(0).toUpperCase()}},[e("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:s.listeners.click}},[e("h1",{staticClass:"title is-6"},[s._v(s._s(s.props.composer.name))])]),e("div",{staticClass:"media-right"},[s._t("actions")],2)])},Ho=[],Fo={name:"ListItemComposer",props:["composer"]},Wo=Fo,Bo=Object(D["a"])(Wo,Uo,Ho,!0,null,null,null),Go=Bo.exports,Yo=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("transition",{attrs:{name:"fade"}},[t.show?e("div",{staticClass:"modal is-active"},[e("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),e("div",{staticClass:"modal-content fd-modal-card"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-content"},[e("p",{staticClass:"title is-4"},[e("a",{staticClass:"has-text-link",on:{click:t.open_albums}},[t._v(t._s(t.composer.name))])]),e("p",[e("span",{staticClass:"heading"},[t._v("Albums")]),e("a",{staticClass:"has-text-link is-6",on:{click:t.open_albums}},[t._v(t._s(t.composer.album_count))])]),e("p",[e("span",{staticClass:"heading"},[t._v("Tracks")]),e("a",{staticClass:"has-text-link is-6",on:{click:t.open_tracks}},[t._v(t._s(t.composer.track_count))])])]),e("footer",{staticClass:"card-footer"},[e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-playlist-plus"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Add")])]),e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-playlist-play"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-play"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),e("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},Qo=[],Vo={name:"ModalDialogComposer",props:["show","composer"],methods:{play:function(){this.$emit("close"),J.player_play_expression('composer is "'+this.composer.name+'" and media_kind is music',!1)},queue_add:function(){this.$emit("close"),J.queue_expression_add('composer is "'+this.composer.name+'" and media_kind is music')},queue_add_next:function(){this.$emit("close"),J.queue_expression_add_next('composer is "'+this.composer.name+'" and media_kind is music')},open_albums:function(){this.$emit("close"),this.$router.push({name:"ComposerAlbums",params:{composer:this.composer.name}})},open_tracks:function(){this.show_details_modal=!1,this.$router.push({name:"ComposerTracks",params:{composer:this.composer.name}})}}},Jo=Vo,Ko=Object(D["a"])(Jo,Yo,Qo,!1,null,null,null),Xo=Ko.exports;class Zo{constructor(t,s={hideSingles:!1,hideSpotify:!1,sort:"Name",group:!1}){this.items=t,this.options=s,this.grouped={},this.sortedAndFiltered=[],this.indexList=[],this.init()}init(){this.createSortedAndFilteredList(),this.createGroupedList(),this.createIndexList()}getComposerIndex(t){return"Name"===this.options.sort?t.name_sort.charAt(0).toUpperCase():t.time_added.substring(0,4)}isComposerVisible(t){return!(this.options.hideSingles&&t.track_count<=2*t.album_count)&&(!this.options.hideSpotify||"spotify"!==t.data_kind)}createIndexList(){this.indexList=[...new Set(this.sortedAndFiltered.map(t=>this.getComposerIndex(t)))]}createSortedAndFilteredList(){let t=this.items;(this.options.hideSingles||this.options.hideSpotify||this.options.hideOther)&&(t=t.filter(t=>this.isComposerVisible(t))),"Recently added"===this.options.sort&&(t=[...t].sort((t,s)=>s.time_added.localeCompare(t.time_added))),this.sortedAndFiltered=t}createGroupedList(){this.options.group||(this.grouped={}),this.grouped=this.sortedAndFiltered.reduce((t,s)=>{const e=this.getComposerIndex(s);return t[e]=[...t[e]||[],s],t},{})}}var tl={name:"ListComposers",components:{ListItemComposer:Go,ModalDialogComposer:Xo},props:["composers","media_kind"],data(){return{show_details_modal:!1,selected_composer:{}}},computed:{media_kind_resolved:function(){return this.media_kind?this.media_kind:this.selected_composer.media_kind},composers_list:function(){return Array.isArray(this.composers)?this.composers:this.composers.sortedAndFiltered},is_grouped:function(){return this.composers instanceof Zo&&this.composers.options.group}},methods:{open_composer:function(t){this.selected_composer=t,this.$router.push({name:"ComposerTracks",params:{composer:t.name}})},open_dialog:function(t){this.selected_composer=t,this.show_details_modal=!0}}},sl=tl,el=Object(D["a"])(sl,Ro,Mo,!1,null,null,null),al=el.exports;const il={load:function(t){return J.library_composers()},set:function(t,s){s.data.composers?(t.composers=s.data.composers,t.heading=t.$route.params.genre):(t.composers=s.data,t.heading="Composers")}};var ol={name:"PageComposers",mixins:[Ie(il)],components:{ContentWithHeading:Ns,TabsMusic:Ue,IndexButtonList:Ka,ListComposers:al},data(){return{composers:{items:[]},heading:"",show_details_modal:!1,selected_composer:{}}},computed:{index_list(){return[...new Set(this.composers.items.map(t=>t.name.charAt(0).toUpperCase()))]},composers_list(){return new Zo(this.composers.items,{sort:"Name",group:!0})}},methods:{open_composer:function(t){this.$router.push({name:"ComposerAlbums",params:{composer:t.name}})},open_dialog:function(t){this.selected_composer=t,this.show_details_modal=!0}}},ll=ol,nl=Object(D["a"])(ll,Do,No,!1,null,null,null),rl=nl.exports,cl=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v(t._s(t.name))])]),e("template",{slot:"heading-right"},[e("div",{staticClass:"buttons is-centered"},[e("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_composer_details_modal=!0}}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),e("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-shuffle"})]),t._v(" "),e("span",[t._v("Shuffle")])])])]),e("template",{slot:"content"},[e("p",{staticClass:"heading has-text-centered-mobile"},[t._v(t._s(t.composer_albums.total)+" albums | "),e("a",{staticClass:"has-text-link",on:{click:t.open_tracks}},[t._v("tracks")])]),t._l(t.composer_albums.items,(function(s){return e("list-item-albums",{key:s.id,attrs:{album:s},on:{click:function(e){return t.open_album(s)}}},[e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),e("modal-dialog-album",{attrs:{show:t.show_details_modal,album:t.selected_album},on:{close:function(s){t.show_details_modal=!1}}}),e("modal-dialog-composer",{attrs:{show:t.show_composer_details_modal,composer:{name:t.name}},on:{close:function(s){t.show_composer_details_modal=!1}}})],2)],2)],1)},dl=[];const ul={load:function(t){return J.library_composer(t.params.composer)},set:function(t,s){t.name=t.$route.params.composer,t.composer_albums=s.data.albums}};var pl={name:"PageComposer",mixins:[Ie(ul)],components:{ContentWithHeading:Ns,ListItemAlbums:Ve,ModalDialogAlbum:sa,ModalDialogComposer:Xo},data(){return{name:"",composer_albums:{items:[]},show_details_modal:!1,selected_album:{},show_composer_details_modal:!1}},computed:{index_list(){return[...new Set(this.composer_albums.items.map(t=>t.name_sort.charAt(0).toUpperCase()))]}},methods:{open_tracks:function(){this.show_details_modal=!1,this.$router.push({name:"ComposerTracks",params:{composer:this.name}})},play:function(){J.player_play_expression('composer is "'+this.name+'" and media_kind is music',!0)},open_album:function(t){this.$router.push({path:"/music/albums/"+t.id})},open_dialog:function(t){this.selected_album=t,this.show_details_modal=!0}}},ml=pl,_l=Object(D["a"])(ml,cl,dl,!1,null,null,null),hl=_l.exports,fl=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v(t._s(t.composer))])]),e("template",{slot:"heading-right"},[e("div",{staticClass:"buttons is-centered"},[e("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_composer_details_modal=!0}}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),e("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-shuffle"})]),t._v(" "),e("span",[t._v("Shuffle")])])])]),e("template",{slot:"content"},[e("p",{staticClass:"heading has-text-centered-mobile"},[e("a",{staticClass:"has-text-link",on:{click:t.open_albums}},[t._v("albums")]),t._v(" | "+t._s(t.tracks.total)+" tracks")]),t._l(t.rated_tracks,(function(s,a){return e("list-item-track",{key:s.id,attrs:{track:s},on:{click:function(s){return t.play_track(a)}}},[e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),e("modal-dialog-track",{attrs:{show:t.show_details_modal,track:t.selected_track},on:{close:function(s){t.show_details_modal=!1}}}),e("modal-dialog-composer",{attrs:{show:t.show_composer_details_modal,composer:{name:t.composer}},on:{close:function(s){t.show_composer_details_modal=!1}}})],2)],2)],1)},yl=[];const vl={load:function(t){return J.library_composer_tracks(t.params.composer)},set:function(t,s){t.composer=t.$route.params.composer,t.tracks=s.data.tracks}};var bl={name:"PageComposerTracks",mixins:[Ie(vl)],components:{ContentWithHeading:Ns,ListItemTrack:_a,ModalDialogTrack:ga,ModalDialogComposer:Xo},data(){return{tracks:{items:[]},composer:"",min_rating:0,show_details_modal:!1,selected_track:{},show_composer_details_modal:!1}},computed:{index_list(){return[...new Set(this.tracks.items.map(t=>t.title_sort.charAt(0).toUpperCase()))]},rated_tracks(){return this.tracks.items.filter(t=>t.rating>=this.min_rating)}},methods:{open_albums:function(){this.show_details_modal=!1,this.$router.push({name:"ComposerAlbums",params:{composer:this.composer}})},play:function(){J.player_play_expression('composer is "'+this.composer+'" and media_kind is music',!0)},play_track:function(t){J.player_play_expression('composer is "'+this.composer+'" and media_kind is music',!1,t)},show_rating:function(t){.5===t&&(t=0),this.min_rating=20*Math.ceil(t)},open_dialog:function(t){this.selected_track=t,this.show_details_modal=!0}}},gl=bl,kl=Object(D["a"])(gl,fl,yl,!1,null,null,null),Cl=kl.exports,wl=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[t.new_episodes.items.length>0?e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("New episodes")])]),e("template",{slot:"heading-right"},[e("div",{staticClass:"buttons is-centered"},[e("a",{staticClass:"button is-small",on:{click:t.mark_all_played}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-pencil"})]),e("span",[t._v("Mark All Played")])])])]),e("template",{slot:"content"},[t._l(t.new_episodes.items,(function(s){return e("list-item-track",{key:s.id,attrs:{track:s},on:{click:function(e){return t.play_track(s)}}},[e("template",{slot:"progress"},[e("range-slider",{staticClass:"track-progress",attrs:{min:"0",max:s.length_ms,step:"1",disabled:!0,value:s.seek_ms}})],1),e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_track_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),e("modal-dialog-track",{attrs:{show:t.show_track_details_modal,track:t.selected_track},on:{close:function(s){t.show_track_details_modal=!1},"play-count-changed":t.reload_new_episodes}})],2)],2):t._e(),e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("Podcasts")]),e("p",{staticClass:"heading"},[t._v(t._s(t.albums.total)+" podcasts")])]),e("template",{slot:"heading-right"},[e("div",{staticClass:"buttons is-centered"},[e("a",{staticClass:"button is-small",on:{click:t.open_add_podcast_dialog}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-rss"})]),e("span",[t._v("Add Podcast")])])])]),e("template",{slot:"content"},[e("list-albums",{attrs:{albums:t.albums.items},on:{"play-count-changed":function(s){return t.reload_new_episodes()},"podcast-deleted":function(s){return t.reload_podcasts()}}}),e("modal-dialog-add-rss",{attrs:{show:t.show_url_modal},on:{close:function(s){t.show_url_modal=!1},"podcast-added":function(s){return t.reload_podcasts()}}})],1)],2)],1)},xl=[],$l=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("transition",{attrs:{name:"fade"}},[t.show?e("div",{staticClass:"modal is-active"},[e("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),e("div",{staticClass:"modal-content fd-modal-card"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-content"},[e("p",{staticClass:"title is-4"},[t._v("Add Podcast RSS feed URL")]),e("form",{on:{submit:function(s){return s.preventDefault(),t.add_stream.apply(null,arguments)}}},[e("div",{staticClass:"field"},[e("p",{staticClass:"control is-expanded has-icons-left"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.url,expression:"url"}],ref:"url_field",staticClass:"input is-shadowless",attrs:{type:"text",placeholder:"http://url-to-rss",disabled:t.loading},domProps:{value:t.url},on:{input:function(s){s.target.composing||(t.url=s.target.value)}}}),e("span",{staticClass:"icon is-left"},[e("i",{staticClass:"mdi mdi-rss"})])]),e("p",{staticClass:"help"},[t._v("Adding a podcast includes creating an RSS playlist, that will allow OwnTone to manage the podcast subscription. ")])])])]),t.loading?e("footer",{staticClass:"card-footer"},[e("a",{staticClass:"card-footer-item button is-loading"},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-web"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Processing ...")])])]):e("footer",{staticClass:"card-footer"},[e("a",{staticClass:"card-footer-item has-text-danger",on:{click:function(s){return t.$emit("close")}}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-cancel"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Cancel")])]),e("a",{staticClass:"card-footer-item has-background-info has-text-white has-text-weight-bold",on:{click:t.add_stream}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-playlist-plus"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Add")])])])])]),e("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},ql=[],Al={name:"ModalDialogAddRss",props:["show"],data(){return{url:"",loading:!1}},methods:{add_stream:function(){this.loading=!0,J.library_add(this.url).then(()=>{this.$emit("close"),this.$emit("podcast-added"),this.url=""}).catch(()=>{this.loading=!1})}},watch:{show(){this.show&&(this.loading=!1,setTimeout(()=>{this.$refs.url_field.focus()},10))}}},Sl=Al,jl=Object(D["a"])(Sl,$l,ql,!1,null,null,null),Pl=jl.exports;const Tl={load:function(t){return Promise.all([J.library_albums("podcast"),J.library_podcasts_new_episodes()])},set:function(t,s){t.albums=s[0].data,t.new_episodes=s[1].data.tracks}};var Ll={name:"PagePodcasts",mixins:[Ie(Tl)],components:{ContentWithHeading:Ns,ListItemTrack:_a,ListAlbums:la,ModalDialogTrack:ga,ModalDialogAddRss:Pl,RangeSlider:nt.a},data(){return{albums:{items:[]},new_episodes:{items:[]},show_url_modal:!1,show_track_details_modal:!1,selected_track:{}}},methods:{play_track:function(t){J.player_play_uri(t.uri,!1)},open_track_dialog:function(t){this.selected_track=t,this.show_track_details_modal=!0},mark_all_played:function(){this.new_episodes.items.forEach(t=>{J.library_track_update(t.id,{play_count:"increment"})}),this.new_episodes.items={}},open_add_podcast_dialog:function(t){this.show_url_modal=!0},reload_new_episodes:function(){J.library_podcasts_new_episodes().then(({data:t})=>{this.new_episodes=t.tracks})},reload_podcasts:function(){J.library_albums("podcast").then(({data:t})=>{this.albums=t,this.reload_new_episodes()})}}},Ol=Ll,El=Object(D["a"])(Ol,wl,xl,!1,null,null,null),Il=El.exports,zl=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("content-with-heading",[e("template",{slot:"heading-left"},[e("div",{staticClass:"title is-4"},[t._v(t._s(t.album.name)+" ")])]),e("template",{slot:"heading-right"},[e("div",{staticClass:"buttons is-centered"},[e("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_album_details_modal=!0}}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),e("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-play"})]),e("span",[t._v("Play")])])])]),e("template",{slot:"content"},[e("p",{staticClass:"heading has-text-centered-mobile"},[t._v(t._s(t.album.track_count)+" tracks")]),t._l(t.tracks,(function(s){return e("list-item-track",{key:s.id,attrs:{track:s},on:{click:function(e){return t.play_track(s)}}},[e("template",{slot:"progress"},[e("range-slider",{staticClass:"track-progress",attrs:{min:"0",max:s.length_ms,step:"1",disabled:!0,value:s.seek_ms}})],1),e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),e("modal-dialog-track",{attrs:{show:t.show_details_modal,track:t.selected_track},on:{close:function(s){t.show_details_modal=!1},"play-count-changed":t.reload_tracks}}),e("modal-dialog-album",{attrs:{show:t.show_album_details_modal,album:t.album,media_kind:"podcast",new_tracks:t.new_tracks},on:{close:function(s){t.show_album_details_modal=!1},"play-count-changed":t.reload_tracks,"remove-podcast":t.open_remove_podcast_dialog}}),e("modal-dialog",{attrs:{show:t.show_remove_podcast_modal,title:"Remove podcast",delete_action:"Remove"},on:{close:function(s){t.show_remove_podcast_modal=!1},delete:t.remove_podcast}},[e("template",{slot:"modal-content"},[e("p",[t._v("Permanently remove this podcast from your library?")]),e("p",{staticClass:"is-size-7"},[t._v("(This will also remove the RSS playlist "),e("b",[t._v(t._s(t.rss_playlist_to_remove.name))]),t._v(".)")])])],2)],2)],2)},Dl=[];const Nl={load:function(t){return Promise.all([J.library_album(t.params.album_id),J.library_podcast_episodes(t.params.album_id)])},set:function(t,s){t.album=s[0].data,t.tracks=s[1].data.tracks.items}};var Rl={name:"PagePodcast",mixins:[Ie(Nl)],components:{ContentWithHeading:Ns,ListItemTrack:_a,ModalDialogTrack:ga,RangeSlider:nt.a,ModalDialogAlbum:sa,ModalDialog:B},data(){return{album:{},tracks:[],show_details_modal:!1,selected_track:{},show_album_details_modal:!1,show_remove_podcast_modal:!1,rss_playlist_to_remove:{}}},computed:{new_tracks(){return this.tracks.filter(t=>0===t.play_count).length}},methods:{play:function(){J.player_play_uri(this.album.uri,!1)},play_track:function(t){J.player_play_uri(t.uri,!1)},open_dialog:function(t){this.selected_track=t,this.show_details_modal=!0},open_remove_podcast_dialog:function(){this.show_album_details_modal=!1,J.library_track_playlists(this.tracks[0].id).then(({data:t})=>{const s=t.items.filter(t=>"rss"===t.type);1===s.length?(this.rss_playlist_to_remove=s[0],this.show_remove_podcast_modal=!0):this.$store.dispatch("add_notification",{text:"Podcast cannot be removed. Probably it was not added as an RSS playlist.",type:"danger"})})},remove_podcast:function(){this.show_remove_podcast_modal=!1,J.library_playlist_delete(this.rss_playlist_to_remove.id).then(()=>{this.$router.replace({path:"/podcasts"})})},reload_tracks:function(){J.library_podcast_episodes(this.album.id).then(({data:t})=>{this.tracks=t.tracks.items})}}},Ml=Rl,Ul=Object(D["a"])(Ml,zl,Dl,!1,null,null,null),Hl=Ul.exports,Fl=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("tabs-audiobooks"),e("content-with-heading",[e("template",{slot:"options"},[e("index-button-list",{attrs:{index:t.albums_list.indexList}})],1),e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("Audiobooks")]),e("p",{staticClass:"heading"},[t._v(t._s(t.albums_list.sortedAndFiltered.length)+" Audiobooks")])]),e("template",{slot:"content"},[e("list-albums",{attrs:{albums:t.albums_list}})],1)],2)],1)},Wl=[],Bl=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("section",{staticClass:"section fd-tabs-section"},[e("div",{staticClass:"container"},[e("div",{staticClass:"columns is-centered"},[e("div",{staticClass:"column is-four-fifths"},[e("div",{staticClass:"tabs is-centered is-small"},[e("ul",[e("router-link",{attrs:{tag:"li",to:"/audiobooks/artists","active-class":"is-active"}},[e("a",[e("span",{staticClass:"icon is-small"},[e("i",{staticClass:"mdi mdi-artist"})]),e("span",{},[t._v("Authors")])])]),e("router-link",{attrs:{tag:"li",to:"/audiobooks/albums","active-class":"is-active"}},[e("a",[e("span",{staticClass:"icon is-small"},[e("i",{staticClass:"mdi mdi-album"})]),e("span",{},[t._v("Audiobooks")])])])],1)])])])])])},Gl=[],Yl={name:"TabsAudiobooks"},Ql=Yl,Vl=Object(D["a"])(Ql,Bl,Gl,!1,null,null,null),Jl=Vl.exports;const Kl={load:function(t){return J.library_albums("audiobook")},set:function(t,s){t.albums=s.data}};var Xl={name:"PageAudiobooksAlbums",mixins:[Ie(Kl)],components:{TabsAudiobooks:Jl,ContentWithHeading:Ns,IndexButtonList:Ka,ListAlbums:la},data(){return{albums:{items:[]}}},computed:{albums_list(){return new ea(this.albums.items,{sort:"Name",group:!0})}},methods:{}},Zl=Xl,tn=Object(D["a"])(Zl,Fl,Wl,!1,null,null,null),sn=tn.exports,en=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("tabs-audiobooks"),e("content-with-heading",[e("template",{slot:"options"},[e("index-button-list",{attrs:{index:t.artists_list.indexList}})],1),e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("Authors")]),e("p",{staticClass:"heading"},[t._v(t._s(t.artists_list.sortedAndFiltered.length)+" Authors")])]),e("template",{slot:"heading-right"}),e("template",{slot:"content"},[e("list-artists",{attrs:{artists:t.artists_list}})],1)],2)],1)},an=[];const on={load:function(t){return J.library_artists("audiobook")},set:function(t,s){t.artists=s.data}};var ln={name:"PageAudiobooksArtists",mixins:[Ie(on)],components:{ContentWithHeading:Ns,TabsAudiobooks:Jl,IndexButtonList:Ka,ListArtists:fi},data(){return{artists:{items:[]}}},computed:{artists_list(){return new pi(this.artists.items,{sort:"Name",group:!0})}},methods:{}},nn=ln,rn=Object(D["a"])(nn,en,an,!1,null,null,null),cn=rn.exports,dn=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v(t._s(t.artist.name))])]),e("template",{slot:"heading-right"},[e("div",{staticClass:"buttons is-centered"},[e("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_artist_details_modal=!0}}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),e("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-play"})]),t._v(" "),e("span",[t._v("Shuffle")])])])]),e("template",{slot:"content"},[e("p",{staticClass:"heading has-text-centered-mobile"},[t._v(t._s(t.artist.album_count)+" albums")]),e("list-albums",{attrs:{albums:t.albums.items}}),e("modal-dialog-artist",{attrs:{show:t.show_artist_details_modal,artist:t.artist},on:{close:function(s){t.show_artist_details_modal=!1}}})],1)],2)},un=[];const pn={load:function(t){return Promise.all([J.library_artist(t.params.artist_id),J.library_artist_albums(t.params.artist_id)])},set:function(t,s){t.artist=s[0].data,t.albums=s[1].data}};var mn={name:"PageAudiobooksArtist",mixins:[Ie(pn)],components:{ContentWithHeading:Ns,ListAlbums:la,ModalDialogArtist:ui},data(){return{artist:{},albums:{},show_artist_details_modal:!1}},methods:{play:function(){J.player_play_uri(this.albums.items.map(t=>t.uri).join(","),!1)}}},_n=mn,hn=Object(D["a"])(_n,dn,un,!1,null,null,null),fn=hn.exports,yn=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("content-with-hero",[e("template",{slot:"heading-left"},[e("h1",{staticClass:"title is-5"},[t._v(t._s(t.album.name))]),e("h2",{staticClass:"subtitle is-6 has-text-link has-text-weight-normal"},[e("a",{staticClass:"has-text-link",on:{click:t.open_artist}},[t._v(t._s(t.album.artist))])]),e("div",{staticClass:"buttons fd-is-centered-mobile fd-has-margin-top"},[e("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-play"})]),t._v(" "),e("span",[t._v("Play")])]),e("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_album_details_modal=!0}}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])])])]),e("template",{slot:"heading-right"},[e("p",{staticClass:"image is-square fd-has-shadow fd-has-action"},[e("cover-artwork",{attrs:{artwork_url:t.album.artwork_url,artist:t.album.artist,album:t.album.name},on:{click:function(s){t.show_album_details_modal=!0}}})],1)]),e("template",{slot:"content"},[e("p",{staticClass:"heading is-7 has-text-centered-mobile fd-has-margin-top"},[t._v(t._s(t.album.track_count)+" tracks")]),e("list-tracks",{attrs:{tracks:t.tracks,uris:t.album.uri}}),e("modal-dialog-album",{attrs:{show:t.show_album_details_modal,album:t.album,media_kind:"audiobook"},on:{close:function(s){t.show_album_details_modal=!1}}})],1)],2)},vn=[];const bn={load:function(t){return Promise.all([J.library_album(t.params.album_id),J.library_album_tracks(t.params.album_id)])},set:function(t,s){t.album=s[0].data,t.tracks=s[1].data.items}};var gn={name:"PageAudiobooksAlbum",mixins:[Ie(bn)],components:{ContentWithHero:Wi["default"],ListTracks:xa,ModalDialogAlbum:sa,CoverArtwork:Se},data(){return{album:{},tracks:[],show_album_details_modal:!1}},methods:{open_artist:function(){this.show_details_modal=!1,this.$router.push({path:"/audiobooks/artists/"+this.album.artist_id})},play:function(){J.player_play_uri(this.album.uri,!1)},play_track:function(t){J.player_play_uri(this.album.uri,!1,t)},open_dialog:function(t){this.selected_track=t,this.show_details_modal=!0}}},kn=gn,Cn=Object(D["a"])(kn,yn,vn,!1,null,null,null),wn=Cn.exports,xn=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v(t._s(t.playlist.name))]),e("p",{staticClass:"heading"},[t._v(t._s(t.playlists.total)+" playlists")])]),e("template",{slot:"content"},[e("list-playlists",{attrs:{playlists:t.playlists.items}})],1)],2)},$n=[],qn=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[t._l(t.playlists,(function(s){return e("list-item-playlist",{key:s.id,attrs:{playlist:s},on:{click:function(e){return t.open_playlist(s)}}},[e("template",{slot:"icon"},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi",class:{"mdi-library-music":"folder"!==s.type,"mdi-rss":"rss"===s.type,"mdi-folder":"folder"===s.type}})])]),e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),e("modal-dialog-playlist",{attrs:{show:t.show_details_modal,playlist:t.selected_playlist},on:{close:function(s){t.show_details_modal=!1}}})],2)},An=[],Sn=function(t,s){var e=s._c;return e("div",{staticClass:"media"},[s.slots().icon?e("figure",{staticClass:"media-left fd-has-action",on:{click:s.listeners.click}},[s._t("icon")],2):s._e(),e("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:s.listeners.click}},[e("h1",{staticClass:"title is-6"},[s._v(s._s(s.props.playlist.name))])]),e("div",{staticClass:"media-right"},[s._t("actions")],2)])},jn=[],Pn={name:"ListItemPlaylist",props:["playlist"]},Tn=Pn,Ln=Object(D["a"])(Tn,Sn,jn,!0,null,null,null),On=Ln.exports,En=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("transition",{attrs:{name:"fade"}},[t.show?e("div",{staticClass:"modal is-active"},[e("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),e("div",{staticClass:"modal-content fd-modal-card"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-content"},[e("p",{staticClass:"title is-4"},[e("a",{staticClass:"has-text-link",on:{click:t.open_playlist}},[t._v(t._s(t.playlist.name))])]),e("div",{staticClass:"content is-small"},[e("p",[e("span",{staticClass:"heading"},[t._v("Path")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t.playlist.path))])]),e("p",[e("span",{staticClass:"heading"},[t._v("Type")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t.playlist.type))])])])]),t.playlist.folder?t._e():e("footer",{staticClass:"card-footer"},[e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-playlist-plus"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Add")])]),e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-playlist-play"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-play"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),e("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},In=[],zn={name:"ModalDialogPlaylist",props:["show","playlist","uris"],methods:{play:function(){this.$emit("close"),J.player_play_uri(this.uris?this.uris:this.playlist.uri,!1)},queue_add:function(){this.$emit("close"),J.queue_add(this.uris?this.uris:this.playlist.uri)},queue_add_next:function(){this.$emit("close"),J.queue_add_next(this.uris?this.uris:this.playlist.uri)},open_playlist:function(){this.$emit("close"),this.$router.push({path:"/playlists/"+this.playlist.id+"/tracks"})}}},Dn=zn,Nn=Object(D["a"])(Dn,En,In,!1,null,null,null),Rn=Nn.exports,Mn={name:"ListPlaylists",components:{ListItemPlaylist:On,ModalDialogPlaylist:Rn},props:["playlists"],data(){return{show_details_modal:!1,selected_playlist:{}}},methods:{open_playlist:function(t){"folder"!==t.type?this.$router.push({path:"/playlists/"+t.id+"/tracks"}):this.$router.push({path:"/playlists/"+t.id})},open_dialog:function(t){this.selected_playlist=t,this.show_details_modal=!0}}},Un=Mn,Hn=Object(D["a"])(Un,qn,An,!1,null,null,null),Fn=Hn.exports;const Wn={load:function(t){return Promise.all([J.library_playlist(t.params.playlist_id),J.library_playlist_folder(t.params.playlist_id)])},set:function(t,s){t.playlist=s[0].data,t.playlists=s[1].data}};var Bn={name:"PagePlaylists",mixins:[Ie(Wn)],components:{ContentWithHeading:Ns,ListPlaylists:Fn},data(){return{playlist:{},playlists:{}}}},Gn=Bn,Yn=Object(D["a"])(Gn,xn,$n,!1,null,null,null),Qn=Yn.exports,Vn=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("content-with-heading",[e("template",{slot:"heading-left"},[e("div",{staticClass:"title is-4"},[t._v(t._s(t.playlist.name))])]),e("template",{slot:"heading-right"},[e("div",{staticClass:"buttons is-centered"},[e("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_playlist_details_modal=!0}}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),e("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-shuffle"})]),t._v(" "),e("span",[t._v("Shuffle")])])])]),e("template",{slot:"content"},[e("p",{staticClass:"heading has-text-centered-mobile"},[t._v(t._s(t.tracks.length)+" tracks")]),e("list-tracks",{attrs:{tracks:t.tracks,uris:t.uris}}),e("modal-dialog-playlist",{attrs:{show:t.show_playlist_details_modal,playlist:t.playlist,uris:t.uris},on:{close:function(s){t.show_playlist_details_modal=!1}}})],1)],2)},Jn=[];const Kn={load:function(t){return Promise.all([J.library_playlist(t.params.playlist_id),J.library_playlist_tracks(t.params.playlist_id)])},set:function(t,s){t.playlist=s[0].data,t.tracks=s[1].data.items}};var Xn={name:"PagePlaylist",mixins:[Ie(Kn)],components:{ContentWithHeading:Ns,ListTracks:xa,ModalDialogPlaylist:Rn},data(){return{playlist:{},tracks:[],show_playlist_details_modal:!1}},computed:{uris(){return this.playlist.random?this.tracks.map(t=>t.uri).join(","):this.playlist.uri}},methods:{play:function(){J.player_play_uri(this.uris,!0)}}},Zn=Xn,tr=Object(D["a"])(Zn,Vn,Jn,!1,null,null,null),sr=tr.exports,er=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("Files")]),e("p",{staticClass:"title is-7 has-text-grey"},[t._v(t._s(t.current_directory))])]),e("template",{slot:"heading-right"},[e("div",{staticClass:"buttons is-centered"},[e("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){return t.open_directory_dialog({path:t.current_directory})}}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),e("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-play"})]),t._v(" "),e("span",[t._v("Play")])])])]),e("template",{slot:"content"},[t.$route.query.directory?e("div",{staticClass:"media",on:{click:function(s){return t.open_parent_directory()}}},[e("figure",{staticClass:"media-left fd-has-action"},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-subdirectory-arrow-left"})])]),e("div",{staticClass:"media-content fd-has-action is-clipped"},[e("h1",{staticClass:"title is-6"},[t._v("..")])]),e("div",{staticClass:"media-right"},[t._t("actions")],2)]):t._e(),t._l(t.files.directories,(function(s){return e("list-item-directory",{key:s.path,attrs:{directory:s},on:{click:function(e){return t.open_directory(s)}}},[e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_directory_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),t._l(t.files.playlists.items,(function(s){return e("list-item-playlist",{key:s.id,attrs:{playlist:s},on:{click:function(e){return t.open_playlist(s)}}},[e("template",{slot:"icon"},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-library-music"})])]),e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_playlist_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),t._l(t.files.tracks.items,(function(s,a){return e("list-item-track",{key:s.id,attrs:{track:s},on:{click:function(s){return t.play_track(a)}}},[e("template",{slot:"icon"},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-file-outline"})])]),e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_track_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),e("modal-dialog-directory",{attrs:{show:t.show_directory_details_modal,directory:t.selected_directory},on:{close:function(s){t.show_directory_details_modal=!1}}}),e("modal-dialog-playlist",{attrs:{show:t.show_playlist_details_modal,playlist:t.selected_playlist},on:{close:function(s){t.show_playlist_details_modal=!1}}}),e("modal-dialog-track",{attrs:{show:t.show_track_details_modal,track:t.selected_track},on:{close:function(s){t.show_track_details_modal=!1}}})],2)],2)],1)},ar=[],ir=function(t,s){var e=s._c;return e("div",{staticClass:"media"},[e("figure",{staticClass:"media-left fd-has-action",on:{click:s.listeners.click}},[s._m(0)]),e("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:s.listeners.click}},[e("h1",{staticClass:"title is-6"},[s._v(s._s(s.props.directory.path.substring(s.props.directory.path.lastIndexOf("/")+1)))]),e("h2",{staticClass:"subtitle is-7 has-text-grey-light"},[s._v(s._s(s.props.directory.path))])]),e("div",{staticClass:"media-right"},[s._t("actions")],2)])},or=[function(t,s){var e=s._c;return e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-folder"})])}],lr={name:"ListItemDirectory",props:["directory"]},nr=lr,rr=Object(D["a"])(nr,ir,or,!0,null,null,null),cr=rr.exports,dr=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("transition",{attrs:{name:"fade"}},[t.show?e("div",{staticClass:"modal is-active"},[e("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),e("div",{staticClass:"modal-content fd-modal-card"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-content"},[e("p",{staticClass:"title is-4"},[t._v(" "+t._s(t.directory.path)+" ")])]),e("footer",{staticClass:"card-footer"},[e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-playlist-plus"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Add")])]),e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-playlist-play"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-play"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),e("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},ur=[],pr={name:"ModalDialogDirectory",props:["show","directory"],methods:{play:function(){this.$emit("close"),J.player_play_expression('path starts with "'+this.directory.path+'" order by path asc',!1)},queue_add:function(){this.$emit("close"),J.queue_expression_add('path starts with "'+this.directory.path+'" order by path asc')},queue_add_next:function(){this.$emit("close"),J.queue_expression_add_next('path starts with "'+this.directory.path+'" order by path asc')}}},mr=pr,_r=Object(D["a"])(mr,dr,ur,!1,null,null,null),hr=_r.exports;const fr={load:function(t){return t.query.directory?J.library_files(t.query.directory):Promise.resolve()},set:function(t,s){t.files=s?s.data:{directories:t.$store.state.config.directories.map(t=>({path:t})),tracks:{items:[]},playlists:{items:[]}}}};var yr={name:"PageFiles",mixins:[Ie(fr)],components:{ContentWithHeading:Ns,ListItemDirectory:cr,ListItemPlaylist:On,ListItemTrack:_a,ModalDialogDirectory:hr,ModalDialogPlaylist:Rn,ModalDialogTrack:ga},data(){return{files:{directories:[],tracks:{items:[]},playlists:{items:[]}},show_directory_details_modal:!1,selected_directory:{},show_playlist_details_modal:!1,selected_playlist:{},show_track_details_modal:!1,selected_track:{}}},computed:{current_directory(){return this.$route.query&&this.$route.query.directory?this.$route.query.directory:"/"}},methods:{open_parent_directory:function(){const t=this.current_directory.slice(0,this.current_directory.lastIndexOf("/"));""===t||this.$store.state.config.directories.includes(this.current_directory)?this.$router.push({path:"/files"}):this.$router.push({path:"/files",query:{directory:this.current_directory.slice(0,this.current_directory.lastIndexOf("/"))}})},open_directory:function(t){this.$router.push({path:"/files",query:{directory:t.path}})},open_directory_dialog:function(t){this.selected_directory=t,this.show_directory_details_modal=!0},play:function(){J.player_play_expression('path starts with "'+this.current_directory+'" order by path asc',!1)},play_track:function(t){J.player_play_uri(this.files.tracks.items.map(t=>t.uri).join(","),!1,t)},open_track_dialog:function(t){this.selected_track=t,this.show_track_details_modal=!0},open_playlist:function(t){this.$router.push({path:"/playlists/"+t.id+"/tracks"})},open_playlist_dialog:function(t){this.selected_playlist=t,this.show_playlist_details_modal=!0}}},vr=yr,br=Object(D["a"])(vr,er,ar,!1,null,null,null),gr=br.exports,kr=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("Radio")])]),e("template",{slot:"content"},[e("p",{staticClass:"heading has-text-centered-mobile"},[t._v(t._s(t.tracks.total)+" tracks")]),e("list-tracks",{attrs:{tracks:t.tracks.items}})],1)],2)],1)},Cr=[];const wr={load:function(t){return J.library_radio_streams()},set:function(t,s){t.tracks=s.data.tracks}};var xr={name:"PageRadioStreams",mixins:[Ie(wr)],components:{ContentWithHeading:Ns,ListTracks:xa},data(){return{tracks:{items:[]}}}},$r=xr,qr=Object(D["a"])($r,kr,Cr,!1,null,null,null),Ar=qr.exports,Sr=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("section",{staticClass:"section fd-remove-padding-bottom"},[e("div",{staticClass:"container"},[e("div",{staticClass:"columns is-centered"},[e("div",{staticClass:"column is-four-fifths"},[e("form",{on:{submit:function(s){return s.preventDefault(),t.new_search.apply(null,arguments)}}},[e("div",{staticClass:"field"},[e("p",{staticClass:"control is-expanded has-icons-left"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.search_query,expression:"search_query"}],ref:"search_field",staticClass:"input is-rounded is-shadowless",attrs:{type:"text",placeholder:"Search",autocomplete:"off"},domProps:{value:t.search_query},on:{input:function(s){s.target.composing||(t.search_query=s.target.value)}}}),t._m(0)]),t._m(1)])]),e("div",{staticClass:"tags",staticStyle:{"margin-top":"16px"}},t._l(t.recent_searches,(function(s){return e("a",{key:s,staticClass:"tag",on:{click:function(e){return t.open_recent_search(s)}}},[t._v(t._s(s))])})),0)])])])]),e("tabs-search",{attrs:{query:t.search_query}}),t.show_tracks&&t.tracks.total?e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("Tracks")])]),e("template",{slot:"content"},[e("list-tracks",{attrs:{tracks:t.tracks.items}})],1),e("template",{slot:"footer"},[t.show_all_tracks_button?e("nav",{staticClass:"level"},[e("p",{staticClass:"level-item"},[e("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_tracks}},[t._v("Show all "+t._s(t.tracks.total.toLocaleString())+" tracks")])])]):t._e()])],2):t._e(),t.show_tracks&&!t.tracks.total?e("content-text",{staticClass:"mt-6"},[e("template",{slot:"content"},[e("p",[e("i",[t._v("No tracks found")])])])],2):t._e(),t.show_artists&&t.artists.total?e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("Artists")])]),e("template",{slot:"content"},[e("list-artists",{attrs:{artists:t.artists.items}})],1),e("template",{slot:"footer"},[t.show_all_artists_button?e("nav",{staticClass:"level"},[e("p",{staticClass:"level-item"},[e("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_artists}},[t._v("Show all "+t._s(t.artists.total.toLocaleString())+" artists")])])]):t._e()])],2):t._e(),t.show_artists&&!t.artists.total?e("content-text",[e("template",{slot:"content"},[e("p",[e("i",[t._v("No artists found")])])])],2):t._e(),t.show_albums&&t.albums.total?e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("Albums")])]),e("template",{slot:"content"},[e("list-albums",{attrs:{albums:t.albums.items}})],1),e("template",{slot:"footer"},[t.show_all_albums_button?e("nav",{staticClass:"level"},[e("p",{staticClass:"level-item"},[e("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_albums}},[t._v("Show all "+t._s(t.albums.total.toLocaleString())+" albums")])])]):t._e()])],2):t._e(),t.show_albums&&!t.albums.total?e("content-text",[e("template",{slot:"content"},[e("p",[e("i",[t._v("No albums found")])])])],2):t._e(),t.show_composers&&t.composers.total?e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("Composers")])]),e("template",{slot:"content"},[e("list-composers",{attrs:{composers:t.composers.items}})],1),e("template",{slot:"footer"},[t.show_all_composers_button?e("nav",{staticClass:"level"},[e("p",{staticClass:"level-item"},[e("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_composers}},[t._v("Show all "+t._s(t.composers.total)+" composers")])])]):t._e()])],2):t._e(),t.show_composers&&!t.composers.total?e("content-text",[e("template",{slot:"content"},[e("p",[e("i",[t._v("No composers found")])])])],2):t._e(),t.show_playlists&&t.playlists.total?e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("Playlists")])]),e("template",{slot:"content"},[e("list-playlists",{attrs:{playlists:t.playlists.items}})],1),e("template",{slot:"footer"},[t.show_all_playlists_button?e("nav",{staticClass:"level"},[e("p",{staticClass:"level-item"},[e("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_playlists}},[t._v("Show all "+t._s(t.playlists.total.toLocaleString())+" playlists")])])]):t._e()])],2):t._e(),t.show_playlists&&!t.playlists.total?e("content-text",[e("template",{slot:"content"},[e("p",[e("i",[t._v("No playlists found")])])])],2):t._e(),t.show_podcasts&&t.podcasts.total?e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("Podcasts")])]),e("template",{slot:"content"},[e("list-albums",{attrs:{albums:t.podcasts.items}})],1),e("template",{slot:"footer"},[t.show_all_podcasts_button?e("nav",{staticClass:"level"},[e("p",{staticClass:"level-item"},[e("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_podcasts}},[t._v("Show all "+t._s(t.podcasts.total.toLocaleString())+" podcasts")])])]):t._e()])],2):t._e(),t.show_podcasts&&!t.podcasts.total?e("content-text",[e("template",{slot:"content"},[e("p",[e("i",[t._v("No podcasts found")])])])],2):t._e(),t.show_audiobooks&&t.audiobooks.total?e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("Audiobooks")])]),e("template",{slot:"content"},[e("list-albums",{attrs:{albums:t.audiobooks.items}})],1),e("template",{slot:"footer"},[t.show_all_audiobooks_button?e("nav",{staticClass:"level"},[e("p",{staticClass:"level-item"},[e("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_audiobooks}},[t._v("Show all "+t._s(t.audiobooks.total.toLocaleString())+" audiobooks")])])]):t._e()])],2):t._e(),t.show_audiobooks&&!t.audiobooks.total?e("content-text",[e("template",{slot:"content"},[e("p",[e("i",[t._v("No audiobooks found")])])])],2):t._e()],1)},jr=[function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("span",{staticClass:"icon is-left"},[e("i",{staticClass:"mdi mdi-magnify"})])},function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("p",{staticClass:"help has-text-centered"},[t._v("Tip: you can search by a smart playlist query language "),e("a",{attrs:{href:"https://github.com/owntone/owntone-server/blob/master/README_SMARTPL.md",target:"_blank"}},[t._v("expression")]),t._v(" if you prefix it with "),e("code",[t._v("query:")]),t._v(". ")])}],Pr=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("section",{staticClass:"section fd-content py-3"},[e("div",{staticClass:"container"},[e("div",{staticClass:"columns is-centered"},[e("div",{staticClass:"column is-four-fifths"},[t._t("content")],2)])])])},Tr=[],Lr={name:"ContentText"},Or=Lr,Er=Object(D["a"])(Or,Pr,Tr,!1,null,null,null),Ir=Er.exports,zr=function(){var t=this,s=t.$createElement,e=t._self._c||s;return t.spotify_enabled?e("section",{staticClass:"section fd-remove-padding-bottom"},[e("div",{staticClass:"container"},[e("div",{staticClass:"columns is-centered"},[e("div",{staticClass:"column is-four-fifths"},[e("div",{staticClass:"tabs is-centered is-small is-toggle is-toggle-rounded"},[e("ul",[e("li",{class:{"is-active":"/search/library"===t.$route.path}},[e("a",{on:{click:t.search_library}},[t._m(0),e("span",{},[t._v("Library")])])]),e("li",{class:{"is-active":"/search/spotify"===t.$route.path}},[e("a",{on:{click:t.search_spotify}},[t._m(1),e("span",{},[t._v("Spotify")])])])])])])])])]):t._e()},Dr=[function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("span",{staticClass:"icon is-small"},[e("i",{staticClass:"mdi mdi-library-books"})])},function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("span",{staticClass:"icon is-small"},[e("i",{staticClass:"mdi mdi-spotify"})])}],Nr={name:"TabsSearch",props:["query"],computed:{spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},route_query:function(){return this.query?{type:"track,artist,album,playlist,audiobook,podcast",query:this.query,limit:3,offset:0}:null}},methods:{search_library:function(){this.$router.push({path:"/search/library",query:this.route_query})},search_spotify:function(){this.$router.push({path:"/search/spotify",query:this.route_query})}}},Rr=Nr,Mr=Object(D["a"])(Rr,zr,Dr,!1,null,null,null),Ur=Mr.exports,Hr={name:"PageSearch",components:{ContentWithHeading:Ns,ContentText:Ir,TabsSearch:Ur,ListTracks:xa,ListArtists:fi,ListAlbums:la,ListPlaylists:Fn,ListComposers:al},data(){return{search_query:"",tracks:{items:[],total:0},artists:{items:[],total:0},albums:{items:[],total:0},composers:{items:[],total:0},playlists:{items:[],total:0},audiobooks:{items:[],total:0},podcasts:{items:[],total:0}}},computed:{recent_searches(){return this.$store.state.recent_searches},show_tracks(){return this.$route.query.type&&this.$route.query.type.includes("track")},show_all_tracks_button(){return this.tracks.total>this.tracks.items.length},show_artists(){return this.$route.query.type&&this.$route.query.type.includes("artist")},show_all_artists_button(){return this.artists.total>this.artists.items.length},show_albums(){return this.$route.query.type&&this.$route.query.type.includes("album")},show_all_albums_button(){return this.albums.total>this.albums.items.length},show_composers(){return this.$route.query.type&&this.$route.query.type.includes("composer")},show_all_composers_button(){return this.composers.total>this.composers.items.length},show_playlists(){return this.$route.query.type&&this.$route.query.type.includes("playlist")},show_all_playlists_button(){return this.playlists.total>this.playlists.items.length},show_audiobooks(){return this.$route.query.type&&this.$route.query.type.includes("audiobook")},show_all_audiobooks_button(){return this.audiobooks.total>this.audiobooks.items.length},show_podcasts(){return this.$route.query.type&&this.$route.query.type.includes("podcast")},show_all_podcasts_button(){return this.podcasts.total>this.podcasts.items.length},is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{search:function(t){if(!t.query.query||""===t.query.query)return this.search_query="",void this.$refs.search_field.focus();this.search_query=t.query.query,this.searchMusic(t.query),this.searchAudiobooks(t.query),this.searchPodcasts(t.query),this.$store.commit(q,t.query.query)},searchMusic:function(t){if(t.type.indexOf("track")<0&&t.type.indexOf("artist")<0&&t.type.indexOf("album")<0&&t.type.indexOf("playlist")<0)return;const s={type:t.type,media_kind:"music"};t.query.startsWith("query:")?s.expression=t.query.replace(/^query:/,"").trim():s.query=t.query,t.limit&&(s.limit=t.limit,s.offset=t.offset),J.search(s).then(({data:t})=>{this.tracks=t.tracks?t.tracks:{items:[],total:0},this.artists=t.artists?t.artists:{items:[],total:0},this.albums=t.albums?t.albums:{items:[],total:0},this.composers=t.composers?t.composers:{items:[],total:0},this.playlists=t.playlists?t.playlists:{items:[],total:0}})},searchAudiobooks:function(t){if(t.type.indexOf("audiobook")<0)return;const s={type:"album",media_kind:"audiobook"};t.query.startsWith("query:")?s.expression=t.query.replace(/^query:/,"").trim():s.expression='((album includes "'+t.query+'" or artist includes "'+t.query+'") and media_kind is audiobook)',t.limit&&(s.limit=t.limit,s.offset=t.offset),J.search(s).then(({data:t})=>{this.audiobooks=t.albums?t.albums:{items:[],total:0}})},searchPodcasts:function(t){if(t.type.indexOf("podcast")<0)return;const s={type:"album",media_kind:"podcast"};t.query.startsWith("query:")?s.expression=t.query.replace(/^query:/,"").trim():s.expression='((album includes "'+t.query+'" or artist includes "'+t.query+'") and media_kind is podcast)',t.limit&&(s.limit=t.limit,s.offset=t.offset),J.search(s).then(({data:t})=>{this.podcasts=t.albums?t.albums:{items:[],total:0}})},new_search:function(){this.search_query&&(this.$router.push({path:"/search/library",query:{type:"track,artist,album,playlist,audiobook,podcast,composer",query:this.search_query,limit:3,offset:0}}),this.$refs.search_field.blur())},open_search_tracks:function(){this.$router.push({path:"/search/library",query:{type:"track",query:this.$route.query.query}})},open_search_artists:function(){this.$router.push({path:"/search/library",query:{type:"artist",query:this.$route.query.query}})},open_search_albums:function(){this.$router.push({path:"/search/library",query:{type:"album",query:this.$route.query.query}})},open_search_composers:function(){this.$router.push({path:"/search/library",query:{type:"tracks",query:this.$route.query.query}})},open_search_playlists:function(){this.$router.push({path:"/search/library",query:{type:"playlist",query:this.$route.query.query}})},open_search_audiobooks:function(){this.$router.push({path:"/search/library",query:{type:"audiobook",query:this.$route.query.query}})},open_search_podcasts:function(){this.$router.push({path:"/search/library",query:{type:"podcast",query:this.$route.query.query}})},open_composer:function(t){this.$router.push({name:"ComposerAlbums",params:{composer:t.name}})},open_playlist:function(t){this.$router.push({path:"/playlists/"+t.id+"/tracks"})},open_recent_search:function(t){this.search_query=t,this.new_search()},open_track_dialog:function(t){this.selected_track=t,this.show_track_details_modal=!0},open_album_dialog:function(t){this.selected_album=t,this.show_album_details_modal=!0},open_artist_dialog:function(t){this.selected_artist=t,this.show_artist_details_modal=!0},open_composer_dialog:function(t){this.selected_composer=t,this.show_composer_details_modal=!0},open_playlist_dialog:function(t){this.selected_playlist=t,this.show_playlist_details_modal=!0}},mounted:function(){this.search(this.$route)},watch:{$route(t,s){this.search(t)}}},Fr=Hr,Wr=Object(D["a"])(Fr,Sr,jr,!1,null,null,null),Br=Wr.exports,Gr=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("section",{staticClass:"section"},[e("div",{staticClass:"container"},[e("div",{staticClass:"columns is-centered"},[e("div",{staticClass:"column is-four-fifths has-text-centered-mobile"},[e("p",{staticClass:"heading"},[e("b",[t._v("OwnTone")]),t._v(" - version "+t._s(t.config.version))]),e("h1",{staticClass:"title is-4"},[t._v(t._s(t.config.library_name))])])])])]),e("section",{staticClass:"section"},[e("div",{staticClass:"container"},[e("div",{staticClass:"columns is-centered"},[e("div",{staticClass:"column is-four-fifths"},[e("div",{staticClass:"content"},[e("nav",{staticClass:"level is-mobile"},[t._m(0),e("div",{staticClass:"level-right"},[t.library.updating?e("div",[e("a",{staticClass:"button is-small is-loading"},[t._v("Update")])]):e("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.onClickOutside,expression:"onClickOutside"}],staticClass:"dropdown is-right",class:{"is-active":t.show_update_dropdown}},[e("div",{staticClass:"dropdown-trigger"},[e("div",{staticClass:"buttons has-addons"},[e("a",{staticClass:"button is-small",on:{click:t.update}},[t._v("Update")]),e("a",{staticClass:"button is-small",on:{click:function(s){t.show_update_dropdown=!t.show_update_dropdown}}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi",class:{"mdi-chevron-down":!t.show_update_dropdown,"mdi-chevron-up":t.show_update_dropdown}})])])])]),e("div",{staticClass:"dropdown-menu",attrs:{id:"dropdown-menu",role:"menu"}},[e("div",{staticClass:"dropdown-content"},[e("div",{staticClass:"dropdown-item"},[e("a",{staticClass:"has-text-dark",on:{click:t.update}},[e("strong",[t._v("Update")]),e("br"),e("span",{staticClass:"is-size-7"},[t._v("Adds new, removes deleted and updates modified files.")])])]),e("hr",{staticClass:"dropdown-divider"}),e("div",{staticClass:"dropdown-item"},[e("a",{staticClass:"has-text-dark",on:{click:t.update_meta}},[e("strong",[t._v("Rescan metadata")]),e("br"),e("span",{staticClass:"is-size-7"},[t._v("Same as update, but also rescans unmodified files.")])])])])])])])]),e("table",{staticClass:"table"},[e("tbody",[e("tr",[e("th",[t._v("Artists")]),e("td",{staticClass:"has-text-right"},[t._v(t._s(t._f("number")(t.library.artists)))])]),e("tr",[e("th",[t._v("Albums")]),e("td",{staticClass:"has-text-right"},[t._v(t._s(t._f("number")(t.library.albums)))])]),e("tr",[e("th",[t._v("Tracks")]),e("td",{staticClass:"has-text-right"},[t._v(t._s(t._f("number")(t.library.songs)))])]),e("tr",[e("th",[t._v("Total playtime")]),e("td",{staticClass:"has-text-right"},[t._v(t._s(t._f("duration")(1e3*t.library.db_playtime,"y [years], d [days], h [hours], m [minutes]")))])]),e("tr",[e("th",[t._v("Library updated")]),e("td",{staticClass:"has-text-right"},[t._v(t._s(t._f("timeFromNow")(t.library.updated_at))+" "),e("span",{staticClass:"has-text-grey"},[t._v("("+t._s(t._f("time")(t.library.updated_at,"lll"))+")")])])]),e("tr",[e("th",[t._v("Uptime")]),e("td",{staticClass:"has-text-right"},[t._v(t._s(t._f("timeFromNow")(t.library.started_at,!0))+" "),e("span",{staticClass:"has-text-grey"},[t._v("("+t._s(t._f("time")(t.library.started_at,"ll"))+")")])])])])])])])])])]),e("section",{staticClass:"section"},[e("div",{staticClass:"container"},[e("div",{staticClass:"columns is-centered"},[e("div",{staticClass:"column is-four-fifths"},[e("div",{staticClass:"content has-text-centered-mobile"},[e("p",{staticClass:"is-size-7"},[t._v("Compiled with support for "+t._s(t._f("join")(t.config.buildoptions))+".")]),t._m(1)])])])])])])},Yr=[function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"level-left"},[e("div",{staticClass:"level-item"},[e("h2",{staticClass:"title is-5"},[t._v("Library")])])])},function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("p",{staticClass:"is-size-7"},[t._v("Web interface built with "),e("a",{attrs:{href:"http://bulma.io"}},[t._v("Bulma")]),t._v(", "),e("a",{attrs:{href:"https://materialdesignicons.com/"}},[t._v("Material Design Icons")]),t._v(", "),e("a",{attrs:{href:"https://vuejs.org/"}},[t._v("Vue.js")]),t._v(", "),e("a",{attrs:{href:"https://github.com/mzabriskie/axios"}},[t._v("axios")]),t._v(" and "),e("a",{attrs:{href:"https://github.com/owntone/owntone-server/network/dependencies"}},[t._v("more")]),t._v(".")])}],Qr={name:"PageAbout",data(){return{show_update_dropdown:!1}},computed:{config(){return this.$store.state.config},library(){return this.$store.state.library}},methods:{onClickOutside(t){this.show_update_dropdown=!1},update:function(){this.show_update_dropdown=!1,J.library_update()},update_meta:function(){this.show_update_dropdown=!1,J.library_rescan()}},filters:{join:function(t){return t.join(", ")}}},Vr=Qr,Jr=Object(D["a"])(Vr,Gr,Yr,!1,null,null,null),Kr=Jr.exports,Xr=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("tabs-music"),e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("New Releases")])]),e("template",{slot:"content"},[t._l(t.new_releases,(function(s){return e("spotify-list-item-album",{key:s.id,attrs:{album:s},on:{click:function(e){return t.open_album(s)}}},[t.is_visible_artwork?e("template",{slot:"artwork"},[e("p",{staticClass:"image is-64x64 fd-has-shadow fd-has-action"},[e("cover-artwork",{attrs:{artwork_url:t.artwork_url(s),artist:s.artist,album:s.name,maxwidth:64,maxheight:64}})],1)]):t._e(),e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_album_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),e("spotify-modal-dialog-album",{attrs:{show:t.show_album_details_modal,album:t.selected_album},on:{close:function(s){t.show_album_details_modal=!1}}})],2),e("template",{slot:"footer"},[e("nav",{staticClass:"level"},[e("p",{staticClass:"level-item"},[e("router-link",{staticClass:"button is-light is-small is-rounded",attrs:{to:"/music/spotify/new-releases"}},[t._v(" Show more ")])],1)])])],2),e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("Featured Playlists")])]),e("template",{slot:"content"},[t._l(t.featured_playlists,(function(s){return e("spotify-list-item-playlist",{key:s.id,attrs:{playlist:s}},[e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_playlist_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),e("spotify-modal-dialog-playlist",{attrs:{show:t.show_playlist_details_modal,playlist:t.selected_playlist},on:{close:function(s){t.show_playlist_details_modal=!1}}})],2),e("template",{slot:"footer"},[e("nav",{staticClass:"level"},[e("p",{staticClass:"level-item"},[e("router-link",{staticClass:"button is-light is-small is-rounded",attrs:{to:"/music/spotify/featured-playlists"}},[t._v(" Show more ")])],1)])])],2)],1)},Zr=[],tc=function(t,s){var e=s._c;return e("div",{staticClass:"media"},[s.$slots["artwork"]?e("div",{staticClass:"media-left fd-has-action",on:{click:s.listeners.click}},[s._t("artwork")],2):s._e(),e("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:s.listeners.click}},[e("h1",{staticClass:"title is-6"},[s._v(s._s(s.props.album.name))]),e("h2",{staticClass:"subtitle is-7 has-text-grey"},[e("b",[s._v(s._s(s.props.album.artists[0].name))])]),e("h2",{staticClass:"subtitle is-7 has-text-grey has-text-weight-normal"},[s._v("("+s._s(s.props.album.album_type)+", "+s._s(s._f("time")(s.props.album.release_date,"L"))+")")])]),e("div",{staticClass:"media-right"},[s._t("actions")],2)])},sc=[],ec={name:"SpotifyListItemAlbum",props:["album"]},ac=ec,ic=Object(D["a"])(ac,tc,sc,!0,null,null,null),oc=ic.exports,lc=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"media"},[e("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:t.open_playlist}},[e("h1",{staticClass:"title is-6"},[t._v(t._s(t.playlist.name))]),e("h2",{staticClass:"subtitle is-7"},[t._v(t._s(t.playlist.owner.display_name))])]),e("div",{staticClass:"media-right"},[t._t("actions")],2)])},nc=[],rc={name:"SpotifyListItemPlaylist",props:["playlist"],methods:{open_playlist:function(){this.$router.push({path:"/music/spotify/playlists/"+this.playlist.id})}}},cc=rc,dc=Object(D["a"])(cc,lc,nc,!1,null,null,null),uc=dc.exports,pc=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("transition",{attrs:{name:"fade"}},[t.show?e("div",{staticClass:"modal is-active"},[e("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),e("div",{staticClass:"modal-content fd-modal-card"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-content"},[e("figure",{directives:[{name:"show",rawName:"v-show",value:t.artwork_visible,expression:"artwork_visible"}],staticClass:"image is-square fd-has-margin-bottom"},[e("img",{staticClass:"fd-has-shadow",attrs:{src:t.artwork_url},on:{load:t.artwork_loaded,error:t.artwork_error}})]),e("p",{staticClass:"title is-4"},[e("a",{staticClass:"has-text-link",on:{click:t.open_album}},[t._v(t._s(t.album.name))])]),e("div",{staticClass:"content is-small"},[e("p",[e("span",{staticClass:"heading"},[t._v("Album artist")]),e("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_artist}},[t._v(t._s(t.album.artists[0].name))])]),e("p",[e("span",{staticClass:"heading"},[t._v("Release date")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t._f("time")(t.album.release_date,"L")))])]),e("p",[e("span",{staticClass:"heading"},[t._v("Type")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t.album.album_type))])])])]),e("footer",{staticClass:"card-footer"},[e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-playlist-plus"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Add")])]),e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-playlist-play"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-play"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),e("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},mc=[],_c={name:"SpotifyModalDialogAlbum",props:["show","album"],data(){return{artwork_visible:!1}},computed:{artwork_url:function(){return this.album.images&&this.album.images.length>0?this.album.images[0].url:""}},methods:{play:function(){this.$emit("close"),J.player_play_uri(this.album.uri,!1)},queue_add:function(){this.$emit("close"),J.queue_add(this.album.uri)},queue_add_next:function(){this.$emit("close"),J.queue_add_next(this.album.uri)},open_album:function(){this.$router.push({path:"/music/spotify/albums/"+this.album.id})},open_artist:function(){this.$router.push({path:"/music/spotify/artists/"+this.album.artists[0].id})},artwork_loaded:function(){this.artwork_visible=!0},artwork_error:function(){this.artwork_visible=!1}}},hc=_c,fc=Object(D["a"])(hc,pc,mc,!1,null,null,null),yc=fc.exports,vc=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("transition",{attrs:{name:"fade"}},[t.show?e("div",{staticClass:"modal is-active"},[e("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),e("div",{staticClass:"modal-content fd-modal-card"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-content"},[e("p",{staticClass:"title is-4"},[e("a",{staticClass:"has-text-link",on:{click:t.open_playlist}},[t._v(t._s(t.playlist.name))])]),e("div",{staticClass:"content is-small"},[e("p",[e("span",{staticClass:"heading"},[t._v("Owner")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t.playlist.owner.display_name))])]),e("p",[e("span",{staticClass:"heading"},[t._v("Tracks")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t.playlist.tracks.total))])]),e("p",[e("span",{staticClass:"heading"},[t._v("Path")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t.playlist.uri))])])])]),e("footer",{staticClass:"card-footer"},[e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-playlist-plus"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Add")])]),e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-playlist-play"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-play"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),e("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},bc=[],gc={name:"SpotifyModalDialogPlaylist",props:["show","playlist"],methods:{play:function(){this.$emit("close"),J.player_play_uri(this.playlist.uri,!1)},queue_add:function(){this.$emit("close"),J.queue_add(this.playlist.uri)},queue_add_next:function(){this.$emit("close"),J.queue_add_next(this.playlist.uri)},open_playlist:function(){this.$router.push({path:"/music/spotify/playlists/"+this.playlist.id})}}},kc=gc,Cc=Object(D["a"])(kc,vc,bc,!1,null,null,null),wc=Cc.exports;const xc={load:function(t){if(V.state.spotify_new_releases.length>0&&V.state.spotify_featured_playlists.length>0)return Promise.resolve();const s=new Qs.a;return s.setAccessToken(V.state.spotify.webapi_token),Promise.all([s.getNewReleases({country:V.state.spotify.webapi_country,limit:50}),s.getFeaturedPlaylists({country:V.state.spotify.webapi_country,limit:50})])},set:function(t,s){s&&(V.commit(C,s[0].albums.items),V.commit(w,s[1].playlists.items))}};var $c={name:"SpotifyPageBrowse",mixins:[Ie(xc)],components:{ContentWithHeading:Ns,TabsMusic:Ue,SpotifyListItemAlbum:oc,SpotifyListItemPlaylist:uc,SpotifyModalDialogAlbum:yc,SpotifyModalDialogPlaylist:wc,CoverArtwork:Se},data(){return{show_album_details_modal:!1,selected_album:{},show_playlist_details_modal:!1,selected_playlist:{}}},computed:{new_releases(){return this.$store.state.spotify_new_releases.slice(0,3)},featured_playlists(){return this.$store.state.spotify_featured_playlists.slice(0,3)},is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{open_album:function(t){this.$router.push({path:"/music/spotify/albums/"+t.id})},open_album_dialog:function(t){this.selected_album=t,this.show_album_details_modal=!0},open_playlist_dialog:function(t){this.selected_playlist=t,this.show_playlist_details_modal=!0},artwork_url:function(t){return t.images&&t.images.length>0?t.images[0].url:""}}},qc=$c,Ac=Object(D["a"])(qc,Xr,Zr,!1,null,null,null),Sc=Ac.exports,jc=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("tabs-music"),e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("New Releases")])]),e("template",{slot:"content"},[t._l(t.new_releases,(function(s){return e("spotify-list-item-album",{key:s.id,attrs:{album:s},on:{click:function(e){return t.open_album(s)}}},[t.is_visible_artwork?e("template",{slot:"artwork"},[e("p",{staticClass:"image is-64x64 fd-has-shadow fd-has-action"},[e("cover-artwork",{attrs:{artwork_url:t.artwork_url(s),artist:s.artist,album:s.name,maxwidth:64,maxheight:64}})],1)]):t._e(),e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_album_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),e("spotify-modal-dialog-album",{attrs:{show:t.show_album_details_modal,album:t.selected_album},on:{close:function(s){t.show_album_details_modal=!1}}})],2)],2)],1)},Pc=[];const Tc={load:function(t){if(V.state.spotify_new_releases.length>0)return Promise.resolve();const s=new Qs.a;return s.setAccessToken(V.state.spotify.webapi_token),s.getNewReleases({country:V.state.spotify.webapi_country,limit:50})},set:function(t,s){s&&V.commit(C,s.albums.items)}};var Lc={name:"SpotifyPageBrowseNewReleases",mixins:[Ie(Tc)],components:{ContentWithHeading:Ns,TabsMusic:Ue,SpotifyListItemAlbum:oc,SpotifyModalDialogAlbum:yc,CoverArtwork:Se},data(){return{show_album_details_modal:!1,selected_album:{}}},computed:{new_releases(){return this.$store.state.spotify_new_releases},is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{open_album:function(t){this.$router.push({path:"/music/spotify/albums/"+t.id})},open_album_dialog:function(t){this.selected_album=t,this.show_album_details_modal=!0},artwork_url:function(t){return t.images&&t.images.length>0?t.images[0].url:""}}},Oc=Lc,Ec=Object(D["a"])(Oc,jc,Pc,!1,null,null,null),Ic=Ec.exports,zc=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("tabs-music"),e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("Featured Playlists")])]),e("template",{slot:"content"},[t._l(t.featured_playlists,(function(s){return e("spotify-list-item-playlist",{key:s.id,attrs:{playlist:s}},[e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_playlist_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),e("spotify-modal-dialog-playlist",{attrs:{show:t.show_playlist_details_modal,playlist:t.selected_playlist},on:{close:function(s){t.show_playlist_details_modal=!1}}})],2)],2)],1)},Dc=[];const Nc={load:function(t){if(V.state.spotify_featured_playlists.length>0)return Promise.resolve();const s=new Qs.a;s.setAccessToken(V.state.spotify.webapi_token),s.getFeaturedPlaylists({country:V.state.spotify.webapi_country,limit:50})},set:function(t,s){s&&V.commit(w,s.playlists.items)}};var Rc={name:"SpotifyPageBrowseFeaturedPlaylists",mixins:[Ie(Nc)],components:{ContentWithHeading:Ns,TabsMusic:Ue,SpotifyListItemPlaylist:uc,SpotifyModalDialogPlaylist:wc},data(){return{show_playlist_details_modal:!1,selected_playlist:{}}},computed:{featured_playlists(){return this.$store.state.spotify_featured_playlists}},methods:{open_playlist_dialog:function(t){this.selected_playlist=t,this.show_playlist_details_modal=!0}}},Mc=Rc,Uc=Object(D["a"])(Mc,zc,Dc,!1,null,null,null),Hc=Uc.exports,Fc=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v(t._s(t.artist.name))])]),e("template",{slot:"heading-right"},[e("div",{staticClass:"buttons is-centered"},[e("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_artist_details_modal=!0}}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),e("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-shuffle"})]),t._v(" "),e("span",[t._v("Shuffle")])])])]),e("template",{slot:"content"},[e("p",{staticClass:"heading has-text-centered-mobile"},[t._v(t._s(t.total)+" albums")]),t._l(t.albums,(function(s){return e("spotify-list-item-album",{key:s.id,attrs:{album:s},on:{click:function(e){return t.open_album(s)}}},[t.is_visible_artwork?e("template",{slot:"artwork"},[e("p",{staticClass:"image is-64x64 fd-has-shadow fd-has-action"},[e("cover-artwork",{attrs:{artwork_url:t.artwork_url(s),artist:s.artist,album:s.name,maxwidth:64,maxheight:64}})],1)]):t._e(),e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),t.offset{this.append_albums(s,t)})},append_albums:function(t,s){this.albums=this.albums.concat(t.items),this.total=t.total,this.offset+=t.limit,s&&(s.loaded(),this.offset>=this.total&&s.complete())},play:function(){this.show_details_modal=!1,J.player_play_uri(this.artist.uri,!0)},open_album:function(t){this.$router.push({path:"/music/spotify/albums/"+t.id})},open_dialog:function(t){this.selected_album=t,this.show_details_modal=!0},artwork_url:function(t){return t.images&&t.images.length>0?t.images[0].url:""}}},sd=td,ed=Object(D["a"])(sd,Fc,Wc,!1,null,null,null),ad=ed.exports,id=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("content-with-hero",[e("template",{slot:"heading-left"},[e("h1",{staticClass:"title is-5"},[t._v(t._s(t.album.name))]),e("h2",{staticClass:"subtitle is-6 has-text-link has-text-weight-normal"},[e("a",{staticClass:"has-text-link",on:{click:t.open_artist}},[t._v(t._s(t.album.artists[0].name))])]),e("div",{staticClass:"buttons fd-is-centered-mobile fd-has-margin-top"},[e("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-shuffle"})]),t._v(" "),e("span",[t._v("Shuffle")])]),e("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_album_details_modal=!0}}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])])])]),e("template",{slot:"heading-right"},[e("p",{staticClass:"image is-square fd-has-shadow fd-has-action"},[e("cover-artwork",{attrs:{artwork_url:t.artwork_url,artist:t.album.artist,album:t.album.name},on:{click:function(s){t.show_album_details_modal=!0}}})],1)]),e("template",{slot:"content"},[e("p",{staticClass:"heading is-7 has-text-centered-mobile fd-has-margin-top"},[t._v(t._s(t.album.tracks.total)+" tracks")]),t._l(t.album.tracks.items,(function(s,a){return e("spotify-list-item-track",{key:s.id,attrs:{track:s,position:a,album:t.album,context_uri:t.album.uri}},[e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_track_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),e("spotify-modal-dialog-track",{attrs:{show:t.show_track_details_modal,track:t.selected_track,album:t.album},on:{close:function(s){t.show_track_details_modal=!1}}}),e("spotify-modal-dialog-album",{attrs:{show:t.show_album_details_modal,album:t.album},on:{close:function(s){t.show_album_details_modal=!1}}})],2)],2)},od=[],ld=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"media"},[e("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:t.play}},[e("h1",{staticClass:"title is-6",class:{"has-text-grey-light":!1===t.track.is_playable}},[t._v(t._s(t.track.name))]),e("h2",{staticClass:"subtitle is-7",class:{"has-text-grey":t.track.is_playable,"has-text-grey-light":!1===t.track.is_playable}},[e("b",[t._v(t._s(t.track.artists[0].name))])]),!1===t.track.is_playable?e("h2",{staticClass:"subtitle is-7"},[t._v(" (Track is not playable"),t.track.restrictions&&t.track.restrictions.reason?e("span",[t._v(", restriction reason: "+t._s(t.track.restrictions.reason))]):t._e(),t._v(") ")]):t._e()]),e("div",{staticClass:"media-right"},[t._t("actions")],2)])},nd=[],rd={name:"SpotifyListItemTrack",props:["track","position","album","context_uri"],methods:{play:function(){J.player_play_uri(this.context_uri,!1,this.position)}}},cd=rd,dd=Object(D["a"])(cd,ld,nd,!1,null,null,null),ud=dd.exports,pd=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("transition",{attrs:{name:"fade"}},[t.show?e("div",{staticClass:"modal is-active"},[e("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),e("div",{staticClass:"modal-content fd-modal-card"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-content"},[e("p",{staticClass:"title is-4"},[t._v(" "+t._s(t.track.name)+" ")]),e("p",{staticClass:"subtitle"},[t._v(" "+t._s(t.track.artists[0].name)+" ")]),e("div",{staticClass:"content is-small"},[e("p",[e("span",{staticClass:"heading"},[t._v("Album")]),e("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_album}},[t._v(t._s(t.album.name))])]),e("p",[e("span",{staticClass:"heading"},[t._v("Album artist")]),e("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_artist}},[t._v(t._s(t.album.artists[0].name))])]),e("p",[e("span",{staticClass:"heading"},[t._v("Release date")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t._f("time")(t.album.release_date,"L")))])]),e("p",[e("span",{staticClass:"heading"},[t._v("Track / Disc")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t.track.track_number)+" / "+t._s(t.track.disc_number))])]),e("p",[e("span",{staticClass:"heading"},[t._v("Length")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t._f("duration")(t.track.duration_ms)))])]),e("p",[e("span",{staticClass:"heading"},[t._v("Path")]),e("span",{staticClass:"title is-6"},[t._v(t._s(t.track.uri))])])])]),e("footer",{staticClass:"card-footer"},[e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-playlist-plus"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Add")])]),e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-playlist-play"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),e("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-play"})]),t._v(" "),e("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),e("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},md=[],_d={name:"SpotifyModalDialogTrack",props:["show","track","album"],methods:{play:function(){this.$emit("close"),J.player_play_uri(this.track.uri,!1)},queue_add:function(){this.$emit("close"),J.queue_add(this.track.uri)},queue_add_next:function(){this.$emit("close"),J.queue_add_next(this.track.uri)},open_album:function(){this.$router.push({path:"/music/spotify/albums/"+this.album.id})},open_artist:function(){this.$router.push({path:"/music/spotify/artists/"+this.album.artists[0].id})}}},hd=_d,fd=Object(D["a"])(hd,pd,md,!1,null,null,null),yd=fd.exports;const vd={load:function(t){const s=new Qs.a;return s.setAccessToken(V.state.spotify.webapi_token),s.getAlbum(t.params.album_id,{market:V.state.spotify.webapi_country})},set:function(t,s){t.album=s}};var bd={name:"PageAlbum",mixins:[Ie(vd)],components:{ContentWithHero:Wi["default"],SpotifyListItemTrack:ud,SpotifyModalDialogTrack:yd,SpotifyModalDialogAlbum:yc,CoverArtwork:Se},data(){return{album:{artists:[{}],tracks:{}},show_track_details_modal:!1,selected_track:{},show_album_details_modal:!1}},computed:{artwork_url:function(){return this.album.images&&this.album.images.length>0?this.album.images[0].url:""}},methods:{open_artist:function(){this.$router.push({path:"/music/spotify/artists/"+this.album.artists[0].id})},play:function(){this.show_details_modal=!1,J.player_play_uri(this.album.uri,!0)},open_track_dialog:function(t){this.selected_track=t,this.show_track_details_modal=!0}}},gd=bd,kd=Object(D["a"])(gd,id,od,!1,null,null,null),Cd=kd.exports,wd=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("content-with-heading",[e("template",{slot:"heading-left"},[e("div",{staticClass:"title is-4"},[t._v(t._s(t.playlist.name))])]),e("template",{slot:"heading-right"},[e("div",{staticClass:"buttons is-centered"},[e("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_playlist_details_modal=!0}}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),e("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[e("span",{staticClass:"icon"},[e("i",{staticClass:"mdi mdi-shuffle"})]),t._v(" "),e("span",[t._v("Shuffle")])])])]),e("template",{slot:"content"},[e("p",{staticClass:"heading has-text-centered-mobile"},[t._v(t._s(t.playlist.tracks.total)+" tracks")]),t._l(t.tracks,(function(s,a){return e("spotify-list-item-track",{key:s.track.id,attrs:{track:s.track,album:s.track.album,position:a,context_uri:t.playlist.uri}},[e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_track_dialog(s.track)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),t.offset{this.append_tracks(s,t)})},append_tracks:function(t,s){this.tracks=this.tracks.concat(t.items),this.total=t.total,this.offset+=t.limit,s&&(s.loaded(),this.offset>=this.total&&s.complete())},play:function(){this.show_details_modal=!1,J.player_play_uri(this.playlist.uri,!0)},open_track_dialog:function(t){this.selected_track=t,this.show_track_details_modal=!0}}},Ad=qd,Sd=Object(D["a"])(Ad,wd,xd,!1,null,null,null),jd=Sd.exports,Pd=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("section",{staticClass:"section fd-remove-padding-bottom"},[e("div",{staticClass:"container"},[e("div",{staticClass:"columns is-centered"},[e("div",{staticClass:"column is-four-fifths"},[e("form",{on:{submit:function(s){return s.preventDefault(),t.new_search.apply(null,arguments)}}},[e("div",{staticClass:"field"},[e("p",{staticClass:"control is-expanded has-icons-left"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.search_query,expression:"search_query"}],ref:"search_field",staticClass:"input is-rounded is-shadowless",attrs:{type:"text",placeholder:"Search",autocomplete:"off"},domProps:{value:t.search_query},on:{input:function(s){s.target.composing||(t.search_query=s.target.value)}}}),t._m(0)])])]),e("div",{staticClass:"tags",staticStyle:{"margin-top":"16px"}},t._l(t.recent_searches,(function(s){return e("a",{key:s,staticClass:"tag",on:{click:function(e){return t.open_recent_search(s)}}},[t._v(t._s(s))])})),0)])])])]),e("tabs-search",{attrs:{query:t.search_query}}),t.show_tracks&&t.tracks.total?e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("Tracks")])]),e("template",{slot:"content"},[t._l(t.tracks.items,(function(s){return e("spotify-list-item-track",{key:s.id,attrs:{track:s,album:s.album,position:0,context_uri:s.uri}},[e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_track_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),"track"===t.query.type?e("infinite-loading",{on:{infinite:t.search_tracks_next}},[e("span",{attrs:{slot:"no-more"},slot:"no-more"},[t._v(".")])]):t._e(),e("spotify-modal-dialog-track",{attrs:{show:t.show_track_details_modal,track:t.selected_track,album:t.selected_track.album},on:{close:function(s){t.show_track_details_modal=!1}}})],2),e("template",{slot:"footer"},[t.show_all_tracks_button?e("nav",{staticClass:"level"},[e("p",{staticClass:"level-item"},[e("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_tracks}},[t._v("Show all "+t._s(t.tracks.total.toLocaleString())+" tracks")])])]):t._e()])],2):t._e(),t.show_tracks&&!t.tracks.total?e("content-text",{staticClass:"mt-6"},[e("template",{slot:"content"},[e("p",[e("i",[t._v("No tracks found")])])])],2):t._e(),t.show_artists&&t.artists.total?e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("Artists")])]),e("template",{slot:"content"},[t._l(t.artists.items,(function(s){return e("spotify-list-item-artist",{key:s.id,attrs:{artist:s}},[e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_artist_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),"artist"===t.query.type?e("infinite-loading",{on:{infinite:t.search_artists_next}},[e("span",{attrs:{slot:"no-more"},slot:"no-more"},[t._v(".")])]):t._e(),e("spotify-modal-dialog-artist",{attrs:{show:t.show_artist_details_modal,artist:t.selected_artist},on:{close:function(s){t.show_artist_details_modal=!1}}})],2),e("template",{slot:"footer"},[t.show_all_artists_button?e("nav",{staticClass:"level"},[e("p",{staticClass:"level-item"},[e("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_artists}},[t._v("Show all "+t._s(t.artists.total.toLocaleString())+" artists")])])]):t._e()])],2):t._e(),t.show_artists&&!t.artists.total?e("content-text",[e("template",{slot:"content"},[e("p",[e("i",[t._v("No artists found")])])])],2):t._e(),t.show_albums&&t.albums.total?e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("Albums")])]),e("template",{slot:"content"},[t._l(t.albums.items,(function(s){return e("spotify-list-item-album",{key:s.id,attrs:{album:s},on:{click:function(e){return t.open_album(s)}}},[t.is_visible_artwork?e("template",{slot:"artwork"},[e("p",{staticClass:"image is-64x64 fd-has-shadow fd-has-action"},[e("cover-artwork",{attrs:{artwork_url:t.artwork_url(s),artist:s.artist,album:s.name,maxwidth:64,maxheight:64}})],1)]):t._e(),e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_album_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),"album"===t.query.type?e("infinite-loading",{on:{infinite:t.search_albums_next}},[e("span",{attrs:{slot:"no-more"},slot:"no-more"},[t._v(".")])]):t._e(),e("spotify-modal-dialog-album",{attrs:{show:t.show_album_details_modal,album:t.selected_album},on:{close:function(s){t.show_album_details_modal=!1}}})],2),e("template",{slot:"footer"},[t.show_all_albums_button?e("nav",{staticClass:"level"},[e("p",{staticClass:"level-item"},[e("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_albums}},[t._v("Show all "+t._s(t.albums.total.toLocaleString())+" albums")])])]):t._e()])],2):t._e(),t.show_albums&&!t.albums.total?e("content-text",[e("template",{slot:"content"},[e("p",[e("i",[t._v("No albums found")])])])],2):t._e(),t.show_playlists&&t.playlists.total?e("content-with-heading",[e("template",{slot:"heading-left"},[e("p",{staticClass:"title is-4"},[t._v("Playlists")])]),e("template",{slot:"content"},[t._l(t.playlists.items,(function(s){return e("spotify-list-item-playlist",{key:s.id,attrs:{playlist:s}},[e("template",{slot:"actions"},[e("a",{on:{click:function(e){return t.open_playlist_dialog(s)}}},[e("span",{staticClass:"icon has-text-dark"},[e("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),"playlist"===t.query.type?e("infinite-loading",{on:{infinite:t.search_playlists_next}},[e("span",{attrs:{slot:"no-more"},slot:"no-more"},[t._v(".")])]):t._e(),e("spotify-modal-dialog-playlist",{attrs:{show:t.show_playlist_details_modal,playlist:t.selected_playlist},on:{close:function(s){t.show_playlist_details_modal=!1}}})],2),e("template",{slot:"footer"},[t.show_all_playlists_button?e("nav",{staticClass:"level"},[e("p",{staticClass:"level-item"},[e("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_playlists}},[t._v("Show all "+t._s(t.playlists.total.toLocaleString())+" playlists")])])]):t._e()])],2):t._e(),t.show_playlists&&!t.playlists.total?e("content-text",[e("template",{slot:"content"},[e("p",[e("i",[t._v("No playlists found")])])])],2):t._e()],1)},Td=[function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("span",{staticClass:"icon is-left"},[e("i",{staticClass:"mdi mdi-magnify"})])}],Ld=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"media"},[e("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:t.open_artist}},[e("h1",{staticClass:"title is-6"},[t._v(t._s(t.artist.name))])]),e("div",{staticClass:"media-right"},[t._t("actions")],2)])},Od=[],Ed={name:"SpotifyListItemArtist",props:["artist"],methods:{open_artist:function(){this.$router.push({path:"/music/spotify/artists/"+this.artist.id})}}},Id=Ed,zd=Object(D["a"])(Id,Ld,Od,!1,null,null,null),Dd=zd.exports,Nd={name:"SpotifyPageSearch",components:{ContentWithHeading:Ns,ContentText:Ir,TabsSearch:Ur,SpotifyListItemTrack:ud,SpotifyListItemArtist:Dd,SpotifyListItemAlbum:oc,SpotifyListItemPlaylist:uc,SpotifyModalDialogTrack:yd,SpotifyModalDialogArtist:Jc,SpotifyModalDialogAlbum:yc,SpotifyModalDialogPlaylist:wc,InfiniteLoading:Xc.a,CoverArtwork:Se},data(){return{search_query:"",tracks:{items:[],total:0},artists:{items:[],total:0},albums:{items:[],total:0},playlists:{items:[],total:0},query:{},search_param:{},show_track_details_modal:!1,selected_track:{},show_album_details_modal:!1,selected_album:{},show_artist_details_modal:!1,selected_artist:{},show_playlist_details_modal:!1,selected_playlist:{},validSearchTypes:["track","artist","album","playlist"]}},computed:{recent_searches(){return this.$store.state.recent_searches.filter(t=>!t.startsWith("query:"))},show_tracks(){return this.$route.query.type&&this.$route.query.type.includes("track")},show_all_tracks_button(){return this.tracks.total>this.tracks.items.length},show_artists(){return this.$route.query.type&&this.$route.query.type.includes("artist")},show_all_artists_button(){return this.artists.total>this.artists.items.length},show_albums(){return this.$route.query.type&&this.$route.query.type.includes("album")},show_all_albums_button(){return this.albums.total>this.albums.items.length},show_playlists(){return this.$route.query.type&&this.$route.query.type.includes("playlist")},show_all_playlists_button(){return this.playlists.total>this.playlists.items.length},is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{reset:function(){this.tracks={items:[],total:0},this.artists={items:[],total:0},this.albums={items:[],total:0},this.playlists={items:[],total:0}},search:function(){if(this.reset(),!this.query.query||""===this.query.query||this.query.query.startsWith("query:"))return this.search_query="",void this.$refs.search_field.focus();this.search_query=this.query.query,this.search_param.limit=this.query.limit?this.query.limit:50,this.search_param.offset=this.query.offset?this.query.offset:0,this.$store.commit(q,this.query.query),this.search_all()},spotify_search:function(){return J.spotify().then(({data:t})=>{this.search_param.market=t.webapi_country;const s=new Qs.a;s.setAccessToken(t.webapi_token);const e=this.query.type.split(",").filter(t=>this.validSearchTypes.includes(t));return s.search(this.query.query,e,this.search_param)})},search_all:function(){this.spotify_search().then(t=>{this.tracks=t.tracks?t.tracks:{items:[],total:0},this.artists=t.artists?t.artists:{items:[],total:0},this.albums=t.albums?t.albums:{items:[],total:0},this.playlists=t.playlists?t.playlists:{items:[],total:0}})},search_tracks_next:function(t){this.spotify_search().then(s=>{this.tracks.items=this.tracks.items.concat(s.tracks.items),this.tracks.total=s.tracks.total,this.search_param.offset+=s.tracks.limit,t.loaded(),this.search_param.offset>=this.tracks.total&&t.complete()})},search_artists_next:function(t){this.spotify_search().then(s=>{this.artists.items=this.artists.items.concat(s.artists.items),this.artists.total=s.artists.total,this.search_param.offset+=s.artists.limit,t.loaded(),this.search_param.offset>=this.artists.total&&t.complete()})},search_albums_next:function(t){this.spotify_search().then(s=>{this.albums.items=this.albums.items.concat(s.albums.items),this.albums.total=s.albums.total,this.search_param.offset+=s.albums.limit,t.loaded(),this.search_param.offset>=this.albums.total&&t.complete()})},search_playlists_next:function(t){this.spotify_search().then(s=>{this.playlists.items=this.playlists.items.concat(s.playlists.items),this.playlists.total=s.playlists.total,this.search_param.offset+=s.playlists.limit,t.loaded(),this.search_param.offset>=this.playlists.total&&t.complete()})},new_search:function(){this.search_query&&(this.$router.push({path:"/search/spotify",query:{type:"track,artist,album,playlist,audiobook,podcast",query:this.search_query,limit:3,offset:0}}),this.$refs.search_field.blur())},open_search_tracks:function(){this.$router.push({path:"/search/spotify",query:{type:"track",query:this.$route.query.query}})},open_search_artists:function(){this.$router.push({path:"/search/spotify",query:{type:"artist",query:this.$route.query.query}})},open_search_albums:function(){this.$router.push({path:"/search/spotify",query:{type:"album",query:this.$route.query.query}})},open_search_playlists:function(){this.$router.push({path:"/search/spotify",query:{type:"playlist",query:this.$route.query.query}})},open_recent_search:function(t){this.search_query=t,this.new_search()},open_track_dialog:function(t){this.selected_track=t,this.show_track_details_modal=!0},open_album_dialog:function(t){this.selected_album=t,this.show_album_details_modal=!0},open_artist_dialog:function(t){this.selected_artist=t,this.show_artist_details_modal=!0},open_playlist_dialog:function(t){this.selected_playlist=t,this.show_playlist_details_modal=!0},open_album:function(t){this.$router.push({path:"/music/spotify/albums/"+t.id})},artwork_url:function(t){return t.images&&t.images.length>0?t.images[0].url:""}},mounted:function(){this.query=this.$route.query,this.search()},watch:{$route(t,s){this.query=t.query,this.search()}}},Rd=Nd,Md=Object(D["a"])(Rd,Pd,Td,!1,null,null,null),Ud=Md.exports,Hd=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("tabs-settings"),e("content-with-heading",[e("template",{slot:"heading-left"},[e("div",{staticClass:"title is-4"},[t._v("Navbar items")])]),e("template",{slot:"content"},[e("p",{staticClass:"content"},[t._v(" Select the top navigation bar menu items ")]),e("div",{staticClass:"notification is-size-7"},[t._v(" If you select more items than can be shown on your screen then the burger menu will disappear. ")]),e("settings-checkbox",{attrs:{category_name:"webinterface",option_name:"show_menu_item_playlists"}},[e("template",{slot:"label"},[t._v(" Playlists")])],2),e("settings-checkbox",{attrs:{category_name:"webinterface",option_name:"show_menu_item_music"}},[e("template",{slot:"label"},[t._v(" Music")])],2),e("settings-checkbox",{attrs:{category_name:"webinterface",option_name:"show_menu_item_podcasts"}},[e("template",{slot:"label"},[t._v(" Podcasts")])],2),e("settings-checkbox",{attrs:{category_name:"webinterface",option_name:"show_menu_item_audiobooks"}},[e("template",{slot:"label"},[t._v(" Audiobooks")])],2),e("settings-checkbox",{attrs:{category_name:"webinterface",option_name:"show_menu_item_radio"}},[e("template",{slot:"label"},[t._v(" Radio")])],2),e("settings-checkbox",{attrs:{category_name:"webinterface",option_name:"show_menu_item_files"}},[e("template",{slot:"label"},[t._v(" Files")])],2),e("settings-checkbox",{attrs:{category_name:"webinterface",option_name:"show_menu_item_search"}},[e("template",{slot:"label"},[t._v(" Search")])],2)],1)],2),e("content-with-heading",[e("template",{slot:"heading-left"},[e("div",{staticClass:"title is-4"},[t._v("Album lists")])]),e("template",{slot:"content"},[e("settings-checkbox",{attrs:{category_name:"webinterface",option_name:"show_cover_artwork_in_album_lists"}},[e("template",{slot:"label"},[t._v(" Show cover artwork in album list")])],2)],1)],2),e("content-with-heading",[e("template",{slot:"heading-left"},[e("div",{staticClass:"title is-4"},[t._v("Now playing page")])]),e("template",{slot:"content"},[e("settings-checkbox",{attrs:{category_name:"webinterface",option_name:"show_composer_now_playing"}},[e("template",{slot:"label"},[t._v(" Show composer")]),e("template",{slot:"info"},[t._v('If enabled the composer of the current playing track is shown on the "now playing page"')])],2),e("settings-textfield",{attrs:{category_name:"webinterface",option_name:"show_composer_for_genre",disabled:!t.settings_option_show_composer_now_playing,placeholder:"Genres"}},[e("template",{slot:"label"},[t._v("Show composer only for listed genres")]),e("template",{slot:"info"},[e("p",{staticClass:"help"},[t._v(' Comma separated list of genres the composer should be displayed on the "now playing page". ')]),e("p",{staticClass:"help"},[t._v(" Leave empty to always show the composer. ")]),e("p",{staticClass:"help"},[t._v(" The genre tag of the current track is matched by checking, if one of the defined genres are included. For example setting to "),e("code",[t._v("classical, soundtrack")]),t._v(' will show the composer for tracks with a genre tag of "Contemporary Classical".'),e("br")])])],2)],1)],2),e("content-with-heading",[e("template",{slot:"heading-left"},[e("div",{staticClass:"title is-4"},[t._v("Recently added page")])]),e("template",{slot:"content"},[e("settings-intfield",{attrs:{category_name:"webinterface",option_name:"recently_added_limit"}},[e("template",{slot:"label"},[t._v('Limit the number of albums shown on the "Recently Added" page')])],2)],1)],2)],1)},Fd=[],Wd=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("section",{staticClass:"section fd-tabs-section"},[e("div",{staticClass:"container"},[e("div",{staticClass:"columns is-centered"},[e("div",{staticClass:"column is-four-fifths"},[e("div",{staticClass:"tabs is-centered is-small"},[e("ul",[e("router-link",{attrs:{tag:"li",to:"/settings/webinterface","active-class":"is-active"}},[e("a",[e("span",{},[t._v("Webinterface")])])]),e("router-link",{attrs:{tag:"li",to:"/settings/remotes-outputs","active-class":"is-active"}},[e("a",[e("span",{},[t._v("Remotes & Outputs")])])]),e("router-link",{attrs:{tag:"li",to:"/settings/artwork","active-class":"is-active"}},[e("a",[e("span",{},[t._v("Artwork")])])]),e("router-link",{attrs:{tag:"li",to:"/settings/online-services","active-class":"is-active"}},[e("a",[e("span",{},[t._v("Online Services")])])])],1)])])])])])},Bd=[],Gd={name:"TabsSettings",computed:{}},Yd=Gd,Qd=Object(D["a"])(Yd,Wd,Bd,!1,null,null,null),Vd=Qd.exports,Jd=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"field"},[e("label",{staticClass:"checkbox"},[e("input",{ref:"settings_checkbox",attrs:{type:"checkbox"},domProps:{checked:t.value},on:{change:t.set_update_timer}}),t._t("label"),e("i",{staticClass:"is-size-7",class:{"has-text-info":"success"===t.statusUpdate,"has-text-danger":"error"===t.statusUpdate}},[t._v(" "+t._s(t.info))])],2),t.$slots["info"]?e("p",{staticClass:"help"},[t._t("info")],2):t._e()])},Kd=[],Xd={name:"SettingsCheckbox",props:["category_name","option_name"],data(){return{timerDelay:2e3,timerId:-1,statusUpdate:""}},computed:{category(){return this.$store.state.settings.categories.find(t=>t.name===this.category_name)},option(){return this.category?this.category.options.find(t=>t.name===this.option_name):{}},value(){return this.option.value},info(){return"success"===this.statusUpdate?"(setting saved)":"error"===this.statusUpdate?"(error saving setting)":""}},methods:{set_update_timer(){this.timerId>0&&(window.clearTimeout(this.timerId),this.timerId=-1),this.statusUpdate="";const t=this.$refs.settings_checkbox.checked;t!==this.value&&(this.timerId=window.setTimeout(this.update_setting,this.timerDelay))},update_setting(){this.timerId=-1;const t=this.$refs.settings_checkbox.checked;if(t===this.value)return void(this.statusUpdate="");const s={category:this.category.name,name:this.option_name,value:t};J.settings_update(this.category.name,s).then(()=>{this.$store.commit(p,s),this.statusUpdate="success"}).catch(()=>{this.statusUpdate="error",this.$refs.settings_checkbox.checked=this.value}).finally(()=>{this.timerId=window.setTimeout(this.clear_status,this.timerDelay)})},clear_status:function(){this.statusUpdate=""}}},Zd=Xd,tu=Object(D["a"])(Zd,Jd,Kd,!1,null,null,null),su=tu.exports,eu=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("fieldset",{attrs:{disabled:t.disabled}},[e("div",{staticClass:"field"},[e("label",{staticClass:"label has-text-weight-normal"},[t._t("label"),e("i",{staticClass:"is-size-7",class:{"has-text-info":"success"===t.statusUpdate,"has-text-danger":"error"===t.statusUpdate}},[t._v(" "+t._s(t.info))])],2),e("div",{staticClass:"control"},[e("input",{ref:"settings_text",staticClass:"input",attrs:{type:"text",placeholder:t.placeholder},domProps:{value:t.value},on:{input:t.set_update_timer}})]),t.$slots["info"]?e("p",{staticClass:"help"},[t._t("info")],2):t._e()])])},au=[],iu={name:"SettingsTextfield",props:["category_name","option_name","placeholder","disabled"],data(){return{timerDelay:2e3,timerId:-1,statusUpdate:""}},computed:{category(){return this.$store.state.settings.categories.find(t=>t.name===this.category_name)},option(){return this.category?this.category.options.find(t=>t.name===this.option_name):{}},value(){return this.option.value},info(){return"success"===this.statusUpdate?"(setting saved)":"error"===this.statusUpdate?"(error saving setting)":""}},methods:{set_update_timer(){this.timerId>0&&(window.clearTimeout(this.timerId),this.timerId=-1),this.statusUpdate="";const t=this.$refs.settings_text.value;t!==this.value&&(this.timerId=window.setTimeout(this.update_setting,this.timerDelay))},update_setting(){this.timerId=-1;const t=this.$refs.settings_text.value;if(t===this.value)return void(this.statusUpdate="");const s={category:this.category.name,name:this.option_name,value:t};J.settings_update(this.category.name,s).then(()=>{this.$store.commit(p,s),this.statusUpdate="success"}).catch(()=>{this.statusUpdate="error",this.$refs.settings_text.value=this.value}).finally(()=>{this.timerId=window.setTimeout(this.clear_status,this.timerDelay)})},clear_status:function(){this.statusUpdate=""}}},ou=iu,lu=Object(D["a"])(ou,eu,au,!1,null,null,null),nu=lu.exports,ru=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("fieldset",{attrs:{disabled:t.disabled}},[e("div",{staticClass:"field"},[e("label",{staticClass:"label has-text-weight-normal"},[t._t("label"),e("i",{staticClass:"is-size-7",class:{"has-text-info":"success"===t.statusUpdate,"has-text-danger":"error"===t.statusUpdate}},[t._v(" "+t._s(t.info))])],2),e("div",{staticClass:"control"},[e("input",{ref:"settings_number",staticClass:"input",staticStyle:{width:"10em"},attrs:{type:"number",min:"0",placeholder:t.placeholder},domProps:{value:t.value},on:{input:t.set_update_timer}})]),t.$slots["info"]?e("p",{staticClass:"help"},[t._t("info")],2):t._e()])])},cu=[],du={name:"SettingsIntfield",props:["category_name","option_name","placeholder","disabled"],data(){return{timerDelay:2e3,timerId:-1,statusUpdate:""}},computed:{category(){return this.$store.state.settings.categories.find(t=>t.name===this.category_name)},option(){return this.category?this.category.options.find(t=>t.name===this.option_name):{}},value(){return this.option.value},info(){return"success"===this.statusUpdate?"(setting saved)":"error"===this.statusUpdate?"(error saving setting)":""}},methods:{set_update_timer(){this.timerId>0&&(window.clearTimeout(this.timerId),this.timerId=-1),this.statusUpdate="";const t=this.$refs.settings_number.value;t!==this.value&&(this.timerId=window.setTimeout(this.update_setting,this.timerDelay))},update_setting(){this.timerId=-1;const t=this.$refs.settings_number.value;if(t===this.value)return void(this.statusUpdate="");const s={category:this.category.name,name:this.option_name,value:parseInt(t,10)};J.settings_update(this.category.name,s).then(()=>{this.$store.commit(p,s),this.statusUpdate="success"}).catch(()=>{this.statusUpdate="error",this.$refs.settings_number.value=this.value}).finally(()=>{this.timerId=window.setTimeout(this.clear_status,this.timerDelay)})},clear_status:function(){this.statusUpdate=""}}},uu=du,pu=Object(D["a"])(uu,ru,cu,!1,null,null,null),mu=pu.exports,_u={name:"SettingsPageWebinterface",components:{ContentWithHeading:Ns,TabsSettings:Vd,SettingsCheckbox:su,SettingsTextfield:nu,SettingsIntfield:mu},computed:{settings_option_show_composer_now_playing(){return this.$store.getters.settings_option_show_composer_now_playing}}},hu=_u,fu=Object(D["a"])(hu,Hd,Fd,!1,null,null,null),yu=fu.exports,vu=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("tabs-settings"),e("content-with-heading",[e("template",{slot:"heading-left"},[e("div",{staticClass:"title is-4"},[t._v("Artwork")])]),e("template",{slot:"content"},[e("div",{staticClass:"content"},[e("p",[t._v(" OwnTone supports PNG and JPEG artwork which is either placed as separate image files in the library, embedded in the media files or made available online by radio stations. ")]),e("p",[t._v("In addition to that, you can enable fetching artwork from the following artwork providers:")])]),t.spotify.libspotify_logged_in?e("settings-checkbox",{attrs:{category_name:"artwork",option_name:"use_artwork_source_spotify"}},[e("template",{slot:"label"},[t._v(" Spotify")])],2):t._e(),e("settings-checkbox",{attrs:{category_name:"artwork",option_name:"use_artwork_source_discogs"}},[e("template",{slot:"label"},[t._v(" Discogs ("),e("a",{attrs:{href:"https://www.discogs.com/"}},[t._v("https://www.discogs.com/")]),t._v(")")])],2),e("settings-checkbox",{attrs:{category_name:"artwork",option_name:"use_artwork_source_coverartarchive"}},[e("template",{slot:"label"},[t._v(" Cover Art Archive ("),e("a",{attrs:{href:"https://coverartarchive.org/"}},[t._v("https://coverartarchive.org/")]),t._v(")")])],2)],1)],2)],1)},bu=[],gu={name:"SettingsPageArtwork",components:{ContentWithHeading:Ns,TabsSettings:Vd,SettingsCheckbox:su},computed:{spotify(){return this.$store.state.spotify}}},ku=gu,Cu=Object(D["a"])(ku,vu,bu,!1,null,null,null),wu=Cu.exports,xu=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("tabs-settings"),e("content-with-heading",[e("template",{slot:"heading-left"},[e("div",{staticClass:"title is-4"},[t._v("Spotify")])]),e("template",{slot:"content"},[t.spotify.spotify_installed?t._e():e("div",{staticClass:"notification is-size-7"},[e("p",[t._v("OwnTone was either built without support for Spotify or libspotify is not installed.")])]),t.spotify.spotify_installed?e("div",[e("div",{staticClass:"notification is-size-7"},[e("b",[t._v("You must have a Spotify premium account")]),t._v(". "),t.use_libspotity?e("span",[t._v("If you normally log into Spotify with your Facebook account you must first go to Spotify's web site where you can get the Spotify username and password that matches your account.")]):t._e()]),t.use_libspotity?e("div",[e("p",{staticClass:"content"},[e("b",[t._v("libspotify")]),t._v(" - Login with your Spotify username and password ")]),t.spotify.libspotify_logged_in?e("p",{staticClass:"fd-has-margin-bottom"},[t._v(" Logged in as "),e("b",[e("code",[t._v(t._s(t.spotify.libspotify_user))])])]):t._e(),t.spotify.spotify_installed&&!t.spotify.libspotify_logged_in?e("form",{on:{submit:function(s){return s.preventDefault(),t.login_libspotify.apply(null,arguments)}}},[e("div",{staticClass:"field is-grouped"},[e("div",{staticClass:"control is-expanded"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.libspotify.user,expression:"libspotify.user"}],staticClass:"input",attrs:{type:"text",placeholder:"Username"},domProps:{value:t.libspotify.user},on:{input:function(s){s.target.composing||t.$set(t.libspotify,"user",s.target.value)}}}),e("p",{staticClass:"help is-danger"},[t._v(t._s(t.libspotify.errors.user))])]),e("div",{staticClass:"control is-expanded"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.libspotify.password,expression:"libspotify.password"}],staticClass:"input",attrs:{type:"password",placeholder:"Password"},domProps:{value:t.libspotify.password},on:{input:function(s){s.target.composing||t.$set(t.libspotify,"password",s.target.value)}}}),e("p",{staticClass:"help is-danger"},[t._v(t._s(t.libspotify.errors.password))])]),e("div",{staticClass:"control"},[e("button",{staticClass:"button is-info"},[t._v("Login")])])])]):t._e(),e("p",{staticClass:"help is-danger"},[t._v(t._s(t.libspotify.errors.error))]),e("p",{staticClass:"help"},[t._v(" libspotify enables OwnTone to play Spotify tracks. ")]),e("p",{staticClass:"help"},[t._v(" OwnTone will not store your password, but will still be able to log you in automatically afterwards, because libspotify saves a login token. ")])]):t._e(),e("div",{staticClass:"fd-has-margin-top"},[e("p",{staticClass:"content"},[e("b",[t._v("Spotify Web API")]),t._v(" - Grant access to the Spotify Web API ")]),t.spotify.webapi_token_valid?e("p",[t._v(" Access granted for "),e("b",[e("code",[t._v(t._s(t.spotify.webapi_user))])])]):t._e(),t.spotify_missing_scope.length>0?e("p",{staticClass:"help is-danger"},[t._v(" Please reauthorize Web API access to grant OwnTone the following additional access rights: "),e("b",[e("code",[t._v(t._s(t._f("join")(t.spotify_missing_scope)))])])]):t._e(),e("div",{staticClass:"field fd-has-margin-top "},[e("div",{staticClass:"control"},[e("a",{staticClass:"button",class:{"is-info":!t.spotify.webapi_token_valid||t.spotify_missing_scope.length>0},attrs:{href:t.spotify.oauth_uri}},[t._v("Authorize Web API access")])])]),e("p",{staticClass:"help"},[t._v(" Access to the Spotify Web API enables scanning of your Spotify library. Required scopes are "),e("code",[t._v(t._s(t._f("join")(t.spotify_required_scope)))]),t._v(". ")]),t.spotify.webapi_token_valid?e("div",{staticClass:"field fd-has-margin-top "},[e("div",{staticClass:"control"},[e("a",{staticClass:"button is-danger",on:{click:t.logout_spotify}},[t._v("Logout")])])]):t._e()])]):t._e()])],2),e("content-with-heading",[e("template",{slot:"heading-left"},[e("div",{staticClass:"title is-4"},[t._v("Last.fm")])]),e("template",{slot:"content"},[t.lastfm.enabled?t._e():e("div",{staticClass:"notification is-size-7"},[e("p",[t._v("OwnTone was built without support for Last.fm.")])]),t.lastfm.enabled?e("div",[e("p",{staticClass:"content"},[e("b",[t._v("Last.fm")]),t._v(" - Login with your Last.fm username and password to enable scrobbling ")]),t.lastfm.scrobbling_enabled?e("div",[e("a",{staticClass:"button",on:{click:t.logoutLastfm}},[t._v("Stop scrobbling")])]):t._e(),t.lastfm.scrobbling_enabled?t._e():e("div",[e("form",{on:{submit:function(s){return s.preventDefault(),t.login_lastfm.apply(null,arguments)}}},[e("div",{staticClass:"field is-grouped"},[e("div",{staticClass:"control is-expanded"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.lastfm_login.user,expression:"lastfm_login.user"}],staticClass:"input",attrs:{type:"text",placeholder:"Username"},domProps:{value:t.lastfm_login.user},on:{input:function(s){s.target.composing||t.$set(t.lastfm_login,"user",s.target.value)}}}),e("p",{staticClass:"help is-danger"},[t._v(t._s(t.lastfm_login.errors.user))])]),e("div",{staticClass:"control is-expanded"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.lastfm_login.password,expression:"lastfm_login.password"}],staticClass:"input",attrs:{type:"password",placeholder:"Password"},domProps:{value:t.lastfm_login.password},on:{input:function(s){s.target.composing||t.$set(t.lastfm_login,"password",s.target.value)}}}),e("p",{staticClass:"help is-danger"},[t._v(t._s(t.lastfm_login.errors.password))])]),e("div",{staticClass:"control"},[e("button",{staticClass:"button is-info",attrs:{type:"submit"}},[t._v("Login")])])]),e("p",{staticClass:"help is-danger"},[t._v(t._s(t.lastfm_login.errors.error))]),e("p",{staticClass:"help"},[t._v(" OwnTone will not store your Last.fm username/password, only the session key. The session key does not expire. ")])])])]):t._e()])],2)],1)},$u=[],qu={name:"SettingsPageOnlineServices",components:{ContentWithHeading:Ns,TabsSettings:Vd},data(){return{libspotify:{user:"",password:"",errors:{user:"",password:"",error:""}},lastfm_login:{user:"",password:"",errors:{user:"",password:"",error:""}}}},computed:{lastfm(){return this.$store.state.lastfm},spotify(){return this.$store.state.spotify},spotify_required_scope(){return this.spotify.webapi_required_scope?this.spotify.webapi_required_scope.split(" "):[]},spotify_missing_scope(){return this.spotify.webapi_token_valid&&this.spotify.webapi_granted_scope&&this.spotify.webapi_required_scope?this.spotify.webapi_required_scope.split(" ").filter(t=>this.spotify.webapi_granted_scope.indexOf(t)<0):[]},use_libspotify(){return this.$store.state.config.use_libspotify}},methods:{login_libspotify(){J.spotify_login(this.libspotify).then(t=>{this.libspotify.user="",this.libspotify.password="",this.libspotify.errors.user="",this.libspotify.errors.password="",this.libspotify.errors.error="",t.data.success||(this.libspotify.errors.user=t.data.errors.user,this.libspotify.errors.password=t.data.errors.password,this.libspotify.errors.error=t.data.errors.error)})},logout_spotify(){J.spotify_logout()},login_lastfm(){J.lastfm_login(this.lastfm_login).then(t=>{this.lastfm_login.user="",this.lastfm_login.password="",this.lastfm_login.errors.user="",this.lastfm_login.errors.password="",this.lastfm_login.errors.error="",t.data.success||(this.lastfm_login.errors.user=t.data.errors.user,this.lastfm_login.errors.password=t.data.errors.password,this.lastfm_login.errors.error=t.data.errors.error)})},logoutLastfm(){J.lastfm_logout()}},filters:{join(t){return t.join(", ")}}},Au=qu,Su=Object(D["a"])(Au,xu,$u,!1,null,null,null),ju=Su.exports,Pu=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("tabs-settings"),e("content-with-heading",[e("template",{slot:"heading-left"},[e("div",{staticClass:"title is-4"},[t._v("Remote Pairing")])]),e("template",{slot:"content"},[t.pairing.active?e("div",{staticClass:"notification"},[e("form",{on:{submit:function(s){return s.preventDefault(),t.kickoff_pairing.apply(null,arguments)}}},[e("label",{staticClass:"label has-text-weight-normal"},[t._v(" Remote pairing request from "),e("b",[t._v(t._s(t.pairing.remote))])]),e("div",{staticClass:"field is-grouped"},[e("div",{staticClass:"control"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.pairing_req.pin,expression:"pairing_req.pin"}],staticClass:"input",attrs:{type:"text",placeholder:"Enter pairing code"},domProps:{value:t.pairing_req.pin},on:{input:function(s){s.target.composing||t.$set(t.pairing_req,"pin",s.target.value)}}})]),e("div",{staticClass:"control"},[e("button",{staticClass:"button is-info",attrs:{type:"submit"}},[t._v("Send")])])])])]):t._e(),t.pairing.active?t._e():e("div",{staticClass:"content"},[e("p",[t._v("No active pairing request.")])])])],2),e("content-with-heading",[e("template",{slot:"heading-left"},[e("div",{staticClass:"title is-4"},[t._v("Speaker pairing and device verification")])]),e("template",{slot:"content"},[e("p",{staticClass:"content"},[t._v(" If your speaker requires pairing then activate it below and enter the PIN that it displays. ")]),t._l(t.outputs,(function(s){return e("div",{key:s.id},[e("div",{staticClass:"field"},[e("div",{staticClass:"control"},[e("label",{staticClass:"checkbox"},[e("input",{directives:[{name:"model",rawName:"v-model",value:s.selected,expression:"output.selected"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(s.selected)?t._i(s.selected,null)>-1:s.selected},on:{change:[function(e){var a=s.selected,i=e.target,o=!!i.checked;if(Array.isArray(a)){var l=null,n=t._i(a,l);i.checked?n<0&&t.$set(s,"selected",a.concat([l])):n>-1&&t.$set(s,"selected",a.slice(0,n).concat(a.slice(n+1)))}else t.$set(s,"selected",o)},function(e){return t.output_toggle(s.id)}]}}),t._v(" "+t._s(s.name)+" ")])])]),s.needs_auth_key?e("form",{staticClass:"fd-has-margin-bottom",on:{submit:function(e){return e.preventDefault(),t.kickoff_verification(s.id)}}},[e("div",{staticClass:"field is-grouped"},[e("div",{staticClass:"control"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.verification_req.pin,expression:"verification_req.pin"}],staticClass:"input",attrs:{type:"text",placeholder:"Enter verification code"},domProps:{value:t.verification_req.pin},on:{input:function(s){s.target.composing||t.$set(t.verification_req,"pin",s.target.value)}}})]),e("div",{staticClass:"control"},[e("button",{staticClass:"button is-info",attrs:{type:"submit"}},[t._v("Verify")])])])]):t._e()])}))],2)],2)],1)},Tu=[],Lu={name:"SettingsPageRemotesOutputs",components:{ContentWithHeading:Ns,TabsSettings:Vd},data(){return{pairing_req:{pin:""},verification_req:{pin:""}}},computed:{pairing(){return this.$store.state.pairing},outputs(){return this.$store.state.outputs}},methods:{kickoff_pairing(){J.pairing_kickoff(this.pairing_req)},output_toggle(t){J.output_toggle(t)},kickoff_verification(t){J.output_update(t,this.verification_req)}},filters:{}},Ou=Lu,Eu=Object(D["a"])(Ou,Pu,Tu,!1,null,null,null),Iu=Eu.exports;a["a"].use(Ps["a"]);const zu=new Ps["a"]({routes:[{path:"/",name:"PageQueue",component:fe},{path:"/about",name:"About",component:Kr},{path:"/now-playing",name:"Now playing",component:Le},{path:"/music",redirect:"/music/browse"},{path:"/music/browse",name:"Browse",component:ja,meta:{show_progress:!0,has_tabs:!0}},{path:"/music/browse/recently_added",name:"Browse Recently Added",component:za,meta:{show_progress:!0,has_tabs:!0}},{path:"/music/browse/recently_played",name:"Browse Recently Played",component:Fa,meta:{show_progress:!0,has_tabs:!0}},{path:"/music/artists",name:"Artists",component:Ai,meta:{show_progress:!0,has_tabs:!0,has_index:!0}},{path:"/music/artists/:artist_id",name:"Artist",component:Ei,meta:{show_progress:!0,has_index:!0}},{path:"/music/artists/:artist_id/tracks",name:"Tracks",component:zo,meta:{show_progress:!0,has_index:!0}},{path:"/music/albums",name:"Albums",component:Ui,meta:{show_progress:!0,has_tabs:!0,has_index:!0}},{path:"/music/albums/:album_id",name:"Album",component:Vi,meta:{show_progress:!0}},{path:"/music/genres",name:"Genres",component:ho,meta:{show_progress:!0,has_tabs:!0,has_index:!0}},{path:"/music/genres/:genre",name:"Genre",component:Co,meta:{show_progress:!0,has_index:!0}},{path:"/music/genres/:genre/tracks",name:"GenreTracks",component:jo,meta:{show_progress:!0,has_index:!0}},{path:"/music/composers",name:"Composers",component:rl,meta:{show_progress:!0,has_tabs:!0,has_index:!0}},{path:"/music/composers/:composer/albums",name:"ComposerAlbums",component:hl,meta:{show_progress:!0,has_tabs:!0,has_index:!0}},{path:"/music/composers/:composer/tracks",name:"ComposerTracks",component:Cl,meta:{show_progress:!0,has_tabs:!0,has_index:!0}},{path:"/podcasts",name:"Podcasts",component:Il,meta:{show_progress:!0}},{path:"/podcasts/:album_id",name:"Podcast",component:Hl,meta:{show_progress:!0}},{path:"/audiobooks",redirect:"/audiobooks/artists"},{path:"/audiobooks/artists",name:"AudiobooksArtists",component:cn,meta:{show_progress:!0,has_tabs:!0,has_index:!0}},{path:"/audiobooks/artists/:artist_id",name:"AudiobooksArtist",component:fn,meta:{show_progress:!0}},{path:"/audiobooks/albums",name:"AudiobooksAlbums",component:sn,meta:{show_progress:!0,has_tabs:!0,has_index:!0}},{path:"/audiobooks/:album_id",name:"Audiobook",component:wn,meta:{show_progress:!0}},{path:"/radio",name:"Radio",component:Ar,meta:{show_progress:!0}},{path:"/files",name:"Files",component:gr,meta:{show_progress:!0}},{path:"/playlists",redirect:"/playlists/0"},{path:"/playlists/:playlist_id",name:"Playlists",component:Qn,meta:{show_progress:!0}},{path:"/playlists/:playlist_id/tracks",name:"Playlist",component:sr,meta:{show_progress:!0}},{path:"/search",redirect:"/search/library"},{path:"/search/library",name:"Search Library",component:Br},{path:"/music/spotify",name:"Spotify",component:Sc,meta:{show_progress:!0,has_tabs:!0}},{path:"/music/spotify/new-releases",name:"Spotify Browse New Releases",component:Ic,meta:{show_progress:!0,has_tabs:!0}},{path:"/music/spotify/featured-playlists",name:"Spotify Browse Featured Playlists",component:Hc,meta:{show_progress:!0,has_tabs:!0}},{path:"/music/spotify/artists/:artist_id",name:"Spotify Artist",component:ad,meta:{show_progress:!0}},{path:"/music/spotify/albums/:album_id",name:"Spotify Album",component:Cd,meta:{show_progress:!0}},{path:"/music/spotify/playlists/:playlist_id",name:"Spotify Playlist",component:jd,meta:{show_progress:!0}},{path:"/search/spotify",name:"Spotify Search",component:Ud},{path:"/settings/webinterface",name:"Settings Webinterface",component:yu},{path:"/settings/artwork",name:"Settings Artwork",component:wu},{path:"/settings/online-services",name:"Settings Online Services",component:ju},{path:"/settings/remotes-outputs",name:"Settings Remotes Outputs",component:Iu}],scrollBehavior(t,s,e){return e?new Promise((t,s)=>{setTimeout(()=>{t(e)},10)}):t.path===s.path&&t.hash?{selector:t.hash,offset:{x:0,y:120}}:t.hash?new Promise((s,e)=>{setTimeout(()=>{s({selector:t.hash,offset:{x:0,y:120}})},10)}):t.meta.has_index?new Promise((s,e)=>{setTimeout(()=>{t.meta.has_tabs?s({selector:"#top",offset:{x:0,y:140}}):s({selector:"#top",offset:{x:0,y:100}})},10)}):{x:0,y:0}}});zu.beforeEach((t,s,e)=>V.state.show_burger_menu?(V.commit(O,!1),void e(!1)):V.state.show_player_menu?(V.commit(E,!1),void e(!1)):void e(!0));var Du=e("4623"),Nu=e.n(Du);Nu()($s.a),a["a"].filter("duration",(function(t,s){return s?$s.a.duration(t).format(s):$s.a.duration(t).format("hh:*mm:ss")})),a["a"].filter("time",(function(t,s){return s?$s()(t).format(s):$s()(t).format()})),a["a"].filter("timeFromNow",(function(t,s){return $s()(t).fromNow(s)})),a["a"].filter("number",(function(t){return t.toLocaleString()})),a["a"].filter("channels",(function(t){return 1===t?"mono":2===t?"stereo":t?t+" channels":""}));var Ru=e("26b9"),Mu=e.n(Ru);a["a"].use(Mu.a,{color:"hsl(204, 86%, 53%)",failedColor:"red",height:"1px"});var Uu=e("c28b"),Hu=e.n(Uu),Fu=e("3659"),Wu=e.n(Fu),Bu=e("85fe"),Gu=e("f13c"),Yu=e.n(Gu);e("de2f"),e("2760"),e("a848");a["a"].config.productionTip=!1,a["a"].use(Hu.a),a["a"].use(Wu.a),a["a"].use(Bu["a"]),a["a"].use(Yu.a),new a["a"]({el:"#app",router:zu,store:V,components:{App:js},template:""})},a848:function(t,s,e){},cf45:function(t,s,e){"use strict";e("53c4")},e6a4:function(t,s){},fd4d:function(t,s,e){"use strict";var a=e("2c75"),i=e("4178"),o=e("2877"),l=Object(o["a"])(i["default"],a["a"],a["b"],!1,null,null,null);s["default"]=l.exports}}); //# sourceMappingURL=app.js.map