mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-26 23:25:56 -05:00
2 lines
172 KiB
JavaScript
2 lines
172 KiB
JavaScript
(function(t){function s(s){for(var i,n,o=s[0],r=s[1],c=s[2],u=0,m=[];u<o.length;u++)n=o[u],e[n]&&m.push(e[n][0]),e[n]=0;for(i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i]);d&&d(s);while(m.length)m.shift()();return l.push.apply(l,c||[]),a()}function a(){for(var t,s=0;s<l.length;s++){for(var a=l[s],i=!0,o=1;o<a.length;o++){var r=a[o];0!==e[r]&&(i=!1)}i&&(l.splice(s--,1),t=n(n.s=a[0]))}return t}var i={},e={app:0},l=[];function n(s){if(i[s])return i[s].exports;var a=i[s]={i:s,l:!1,exports:{}};return t[s].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=t,n.c=i,n.d=function(t,s,a){n.o(t,s)||Object.defineProperty(t,s,{enumerable:!0,get:a})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,s){if(1&s&&(t=n(t)),8&s)return t;if(4&s&&"object"===typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&s&&"string"!=typeof t)for(var i in t)n.d(a,i,function(s){return t[s]}.bind(null,i));return a},n.n=function(t){var s=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(s,"a",s),s},n.o=function(t,s){return Object.prototype.hasOwnProperty.call(t,s)},n.p="/";var o=window["webpackJsonp"]=window["webpackJsonp"]||[],r=o.push.bind(o);o.push=s,o=o.slice();for(var c=0;c<o.length;c++)s(o[c]);var d=r;l.push([0,"chunk-vendors"]),a()})({0:function(t,s,a){t.exports=a("56d7")},"39bf":function(t,s){},4061:function(t,s,a){"use strict";var i=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("section",{staticClass:"section fd-content"},[a("div",{staticClass:"container"},[a("div",{staticClass:"columns is-centered"},[a("div",{staticClass:"column is-four-fifths"},[t._t("options"),a("nav",{staticClass:"level",attrs:{id:"top"}},[a("div",{staticClass:"level-left"},[a("div",{staticClass:"level-item has-text-centered-mobile"},[a("div",[t._t("heading-left")],2)])]),a("div",{staticClass:"level-right has-text-centered-mobile"},[t._t("heading-right")],2)]),t._t("content"),a("div",{staticStyle:{"margin-top":"16px"}},[t._t("footer")],2)],2)])])])},e=[];a.d(s,"a",function(){return i}),a.d(s,"b",function(){return e})},4678:function(t,s,a){var i={"./af":"2bfb","./af.js":"2bfb","./ar":"8e73","./ar-dz":"a356","./ar-dz.js":"a356","./ar-kw":"423e","./ar-kw.js":"423e","./ar-ly":"1cfd","./ar-ly.js":"1cfd","./ar-ma":"0a84","./ar-ma.js":"0a84","./ar-sa":"8230","./ar-sa.js":"8230","./ar-tn":"6d83","./ar-tn.js":"6d83","./ar.js":"8e73","./az":"485c","./az.js":"485c","./be":"1fc1","./be.js":"1fc1","./bg":"84aa","./bg.js":"84aa","./bm":"a7fa","./bm.js":"a7fa","./bn":"9043","./bn.js":"9043","./bo":"d26a","./bo.js":"d26a","./br":"6887","./br.js":"6887","./bs":"2554","./bs.js":"2554","./ca":"d716","./ca.js":"d716","./cs":"3c0d","./cs.js":"3c0d","./cv":"03ec","./cv.js":"03ec","./cy":"9797","./cy.js":"9797","./da":"0f14","./da.js":"0f14","./de":"b469","./de-at":"b3eb","./de-at.js":"b3eb","./de-ch":"bb71","./de-ch.js":"bb71","./de.js":"b469","./dv":"598a","./dv.js":"598a","./el":"8d47","./el.js":"8d47","./en-SG":"cdab","./en-SG.js":"cdab","./en-au":"0e6b","./en-au.js":"0e6b","./en-ca":"3886","./en-ca.js":"3886","./en-gb":"39a6","./en-gb.js":"39a6","./en-ie":"e1d3","./en-ie.js":"e1d3","./en-il":"7333","./en-il.js":"7333","./en-nz":"6f50","./en-nz.js":"6f50","./eo":"65db","./eo.js":"65db","./es":"898b","./es-do":"0a3c","./es-do.js":"0a3c","./es-us":"55c9","./es-us.js":"55c9","./es.js":"898b","./et":"ec18","./et.js":"ec18","./eu":"0ff2","./eu.js":"0ff2","./fa":"8df4","./fa.js":"8df4","./fi":"81e9","./fi.js":"81e9","./fo":"0721","./fo.js":"0721","./fr":"9f26","./fr-ca":"d9f8","./fr-ca.js":"d9f8","./fr-ch":"0e49","./fr-ch.js":"0e49","./fr.js":"9f26","./fy":"7118","./fy.js":"7118","./ga":"5120","./ga.js":"5120","./gd":"f6b4","./gd.js":"f6b4","./gl":"8840","./gl.js":"8840","./gom-latn":"0caa","./gom-latn.js":"0caa","./gu":"e0c5","./gu.js":"e0c5","./he":"c7aa","./he.js":"c7aa","./hi":"dc4d","./hi.js":"dc4d","./hr":"4ba9","./hr.js":"4ba9","./hu":"5b14","./hu.js":"5b14","./hy-am":"d6b6","./hy-am.js":"d6b6","./id":"5038","./id.js":"5038","./is":"0558","./is.js":"0558","./it":"6e98","./it-ch":"6f12","./it-ch.js":"6f12","./it.js":"6e98","./ja":"079e","./ja.js":"079e","./jv":"b540","./jv.js":"b540","./ka":"201b","./ka.js":"201b","./kk":"6d79","./kk.js":"6d79","./km":"e81d","./km.js":"e81d","./kn":"3e92","./kn.js":"3e92","./ko":"22f8","./ko.js":"22f8","./ku":"2421","./ku.js":"2421","./ky":"9609","./ky.js":"9609","./lb":"440c","./lb.js":"440c","./lo":"b29d","./lo.js":"b29d","./lt":"26f9","./lt.js":"26f9","./lv":"b97c","./lv.js":"b97c","./me":"293c","./me.js":"293c","./mi":"688b","./mi.js":"688b","./mk":"6909","./mk.js":"6909","./ml":"02fb","./ml.js":"02fb","./mn":"958b","./mn.js":"958b","./mr":"39bd","./mr.js":"39bd","./ms":"ebe4","./ms-my":"6403","./ms-my.js":"6403","./ms.js":"ebe4","./mt":"1b45","./mt.js":"1b45","./my":"8689","./my.js":"8689","./nb":"6ce3","./nb.js":"6ce3","./ne":"3a39","./ne.js":"3a39","./nl":"facd","./nl-be":"db29","./nl-be.js":"db29","./nl.js":"facd","./nn":"b84c","./nn.js":"b84c","./pa-in":"f3ff","./pa-in.js":"f3ff","./pl":"8d57","./pl.js":"8d57","./pt":"f260","./pt-br":"d2d4","./pt-br.js":"d2d4","./pt.js":"f260","./ro":"972c","./ro.js":"972c","./ru":"957c","./ru.js":"957c","./sd":"6784","./sd.js":"6784","./se":"ffff","./se.js":"ffff","./si":"eda5","./si.js":"eda5","./sk":"7be6","./sk.js":"7be6","./sl":"8155","./sl.js":"8155","./sq":"c8f3","./sq.js":"c8f3","./sr":"cf1e","./sr-cyrl":"13e9","./sr-cyrl.js":"13e9","./sr.js":"cf1e","./ss":"52bd","./ss.js":"52bd","./sv":"5fbd","./sv.js":"5fbd","./sw":"74dc","./sw.js":"74dc","./ta":"3de5","./ta.js":"3de5","./te":"5cbb","./te.js":"5cbb","./tet":"576c","./tet.js":"576c","./tg":"3b1b","./tg.js":"3b1b","./th":"10e8","./th.js":"10e8","./tl-ph":"0f38","./tl-ph.js":"0f38","./tlh":"cf75","./tlh.js":"cf75","./tr":"0e81","./tr.js":"0e81","./tzl":"cf51","./tzl.js":"cf51","./tzm":"c109","./tzm-latn":"b53d","./tzm-latn.js":"b53d","./tzm.js":"c109","./ug-cn":"6117","./ug-cn.js":"6117","./uk":"ada2","./uk.js":"ada2","./ur":"5294","./ur.js":"5294","./uz":"2e8c","./uz-latn":"010e","./uz-latn.js":"010e","./uz.js":"2e8c","./vi":"2921","./vi.js":"2921","./x-pseudo":"fd7e","./x-pseudo.js":"fd7e","./yo":"7f33","./yo.js":"7f33","./zh-cn":"5c3a","./zh-cn.js":"5c3a","./zh-hk":"49ab","./zh-hk.js":"49ab","./zh-tw":"90ea","./zh-tw.js":"90ea"};function e(t){var s=l(t);return a(s)}function l(t){var s=i[t];if(!(s+1)){var a=new Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}return s}e.keys=function(){return Object.keys(i)},e.resolve=l,t.exports=e,e.id="4678"},4798:function(t,s,a){},"56d7":function(t,s,a){"use strict";a.r(s);a("cadf"),a("551c"),a("f751"),a("097d");var i,e=a("a026"),l=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{attrs:{id:"app"}},[a("navbar-top"),a("vue-progress-bar",{staticClass:"fd-progress-bar"}),a("transition",{attrs:{name:"fade"}},[a("router-view",{directives:[{name:"show",rawName:"v-show",value:!0,expression:"true"}]})],1),a("notifications",{directives:[{name:"show",rawName:"v-show",value:!t.show_burger_menu,expression:"!show_burger_menu"}]}),a("navbar-bottom",{directives:[{name:"show",rawName:"v-show",value:!t.show_burger_menu,expression:"!show_burger_menu"}]})],1)},n=[],o=(a("6762"),a("2fdb"),function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("nav",{staticClass:"navbar is-light is-fixed-top",attrs:{role:"navigation","aria-label":"main navigation"}},[a("div",{staticClass:"navbar-brand"},[a("navbar-item-link",{attrs:{to:"/playlists"}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-library-music"})])]),a("navbar-item-link",{attrs:{to:"/music"}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-music"})])]),t.podcasts.tracks>0?a("navbar-item-link",{attrs:{to:"/podcasts"}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-microphone"})])]):t._e(),t.audiobooks.tracks>0?a("navbar-item-link",{attrs:{to:"/audiobooks"}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-book-open-variant"})])]):t._e(),a("navbar-item-link",{attrs:{to:"/files"}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-folder-open"})])]),a("navbar-item-link",{attrs:{to:"/search"}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-magnify"})])]),a("div",{staticClass:"navbar-burger",class:{"is-active":t.show_burger_menu},on:{click:t.update_show_burger_menu}},[a("span"),a("span"),a("span")])],1),a("div",{staticClass:"navbar-menu",class:{"is-active":t.show_burger_menu}},[a("div",{staticClass:"navbar-start"}),a("div",{staticClass:"navbar-end"},[a("div",{staticClass:"navbar-item has-dropdown is-hoverable"},[t._m(0),a("div",{staticClass:"navbar-dropdown is-right"},[a("div",{staticClass:"navbar-item"},[a("div",{staticClass:"level is-mobile"},[a("div",{staticClass:"level-left fd-expanded"},[a("div",{staticClass:"level-item",staticStyle:{"flex-grow":"0"}},[a("a",{staticClass:"button is-white is-small",on:{click:t.toggle_mute_volume}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-18px",class:{"mdi-volume-off":t.player.volume<=0,"mdi-volume-high":t.player.volume>0}})])])]),a("div",{staticClass:"level-item fd-expanded"},[a("div",{staticClass:"fd-expanded"},[a("p",{staticClass:"heading"},[t._v("Volume")]),a("range-slider",{staticClass:"slider fd-has-action",attrs:{min:"0",max:"100",step:"1",value:t.player.volume},on:{change:t.set_volume}})],1)])])])]),a("hr",{staticClass:"navbar-divider"}),t._l(t.outputs,function(t){return a("navbar-item-output",{key:t.id,attrs:{output:t}})}),a("hr",{staticClass:"navbar-divider"}),a("div",{staticClass:"navbar-item"},[a("div",{staticClass:"level is-mobile"},[a("div",{staticClass:"level-left fd-expanded"},[a("div",{staticClass:"level-item",staticStyle:{"flex-grow":"0"}},[a("a",{staticClass:"button is-white is-small",class:{"is-loading":t.loading}},[a("span",{staticClass:"icon fd-has-action",class:{"has-text-grey-light":!t.playing&&!t.loading,"is-loading":t.loading},on:{click:t.togglePlay}},[a("i",{staticClass:"mdi mdi-18px mdi-radio-tower"})])])]),a("div",{staticClass:"level-item fd-expanded"},[a("div",{staticClass:"fd-expanded"},[a("p",{staticClass:"heading",class:{"has-text-grey-light":!t.playing}},[t._v("HTTP stream "),t._m(1)]),a("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)])])])]),a("hr",{staticClass:"navbar-divider"}),a("div",{staticClass:"navbar-item"},[a("div",{staticClass:"level is-mobile"},[a("div",{staticClass:"level-left"},[a("div",{staticClass:"level-item"},[a("div",{staticClass:"buttons has-addons"},[a("player-button-previous",{staticClass:"button"}),a("player-button-play-pause",{staticClass:"button"}),a("player-button-next",{staticClass:"button"})],1)]),a("div",{staticClass:"level-item"},[a("div",{staticClass:"buttons has-addons"},[a("player-button-repeat",{staticClass:"button is-light"}),a("player-button-shuffle",{staticClass:"button is-light"}),a("player-button-consume",{staticClass:"button is-light"})],1)])])])])],2)]),a("div",{staticClass:"navbar-item has-dropdown is-hoverable"},[t._m(2),a("div",{staticClass:"navbar-dropdown is-right"},[a("a",{staticClass:"navbar-item",attrs:{href:"/admin.html"}},[t._v("Admin")]),a("hr",{staticClass:"navbar-divider"}),a("navbar-item-link",{attrs:{to:"/about"}},[a("div",[a("p",{staticClass:"title is-7"},[t._v("forked-daapd")]),a("p",{staticClass:"subtitle is-7"},[t._v(t._s(t.config.version))])])])],1)])])])])}),r=[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("a",{staticClass:"navbar-link is-arrowless"},[a("span",{staticClass:"icon is-hidden-mobile is-hidden-tablet-only"},[a("i",{staticClass:"mdi mdi-volume-high"})]),a("span",{staticClass:"is-hidden-desktop has-text-weight-bold"},[t._v("Volume")])])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("a",{attrs:{href:"/stream.mp3"}},[a("span",{staticClass:"is-lowercase"},[t._v("(stream.mp3)")])])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("a",{staticClass:"navbar-link is-arrowless"},[a("span",{staticClass:"icon is-hidden-mobile is-hidden-tablet-only"},[a("i",{staticClass:"mdi mdi-settings"})]),a("span",{staticClass:"is-hidden-desktop has-text-weight-bold"},[t._v("Settings")])])}],c=(a("f559"),a("bc3a")),d=a.n(c),u=a("bd86"),m=(a("20d6"),a("7514"),a("2f62")),_="UPDATE_CONFIG",p="UPDATE_LIBRARY_STATS",h="UPDATE_LIBRARY_AUDIOBOOKS_COUNT",f="UPDATE_LIBRARY_PODCASTS_COUNT",y="UPDATE_OUTPUTS",b="UPDATE_PLAYER_STATUS",v="UPDATE_QUEUE",g="UPDATE_SPOTIFY",k="SPOTIFY_NEW_RELEASES",C="SPOTIFY_FEATURED_PLAYLISTS",w="ADD_NOTIFICATION",x="DELETE_NOTIFICATION",$="ADD_RECENT_SEARCH",q="HIDE_SINGLES",j="SHOW_ONLY_NEXT_ITEMS",P="SHOW_BURGER_MENU";e["a"].use(m["a"]);var A=new m["a"].Store({state:{config:{websocket_port:0,version:"",buildoptions:[]},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:[]},spotify:{},spotify_new_releases:[],spotify_featured_playlists:[],notifications:{next_id:1,list:[]},recent_searches:[],hide_singles:!1,show_only_next_items:!1,show_burger_menu:!1},getters:{now_playing:function(t){var s=t.queue.items.find(function(s){return s.id===t.player.item_id});return void 0===s?{}:s}},mutations:(i={},Object(u["a"])(i,_,function(t,s){t.config=s}),Object(u["a"])(i,p,function(t,s){t.library=s}),Object(u["a"])(i,h,function(t,s){t.audiobooks_count=s}),Object(u["a"])(i,f,function(t,s){t.podcasts_count=s}),Object(u["a"])(i,y,function(t,s){t.outputs=s}),Object(u["a"])(i,b,function(t,s){t.player=s}),Object(u["a"])(i,v,function(t,s){t.queue=s}),Object(u["a"])(i,g,function(t,s){t.spotify=s}),Object(u["a"])(i,k,function(t,s){t.spotify_new_releases=s}),Object(u["a"])(i,C,function(t,s){t.spotify_featured_playlists=s}),Object(u["a"])(i,w,function(t,s){if(s.topic){var a=t.notifications.list.findIndex(function(t){return t.topic===s.topic});if(a>=0)return void t.notifications.list.splice(a,1,s)}t.notifications.list.push(s)}),Object(u["a"])(i,x,function(t,s){var a=t.notifications.list.indexOf(s);-1!==a&&t.notifications.list.splice(a,1)}),Object(u["a"])(i,$,function(t,s){var a=t.recent_searches.findIndex(function(t){return t===s});a>=0&&t.recent_searches.splice(a,1),t.recent_searches.splice(0,0,s),t.recent_searches.length>5&&t.recent_searches.pop()}),Object(u["a"])(i,q,function(t,s){t.hide_singles=s}),Object(u["a"])(i,j,function(t,s){t.show_only_next_items=s}),Object(u["a"])(i,P,function(t,s){t.show_burger_menu=s}),i),actions:{add_notification:function(t,s){var a=t.commit,i=t.state,e={id:i.notifications.next_id++,type:s.type,text:s.text,topic:s.topic,timeout:s.timeout};a(w,e),s.timeout>0&&setTimeout(function(){a(x,e)},s.timeout)}}});d.a.interceptors.response.use(function(t){return t},function(t){return A.dispatch("add_notification",{text:"Request failed (status: "+t.request.status+" "+t.request.statusText+", url: "+t.request.responseURL+")",type:"danger"}),Promise.reject(t)});var S={config:function(){return d.a.get("/api/config")},library_stats:function(){return d.a.get("/api/library")},library_update:function(){return d.a.put("/api/update")},library_rescan:function(){return d.a.put("/api/rescan")},library_count:function(t){return d.a.get("/api/library/count?expression="+t)},queue:function(){return d.a.get("/api/queue")},queue_clear:function(){return d.a.put("/api/queue/clear")},queue_remove:function(t){return d.a.delete("/api/queue/items/"+t)},queue_move:function(t,s){return d.a.put("/api/queue/items/"+t+"?new_position="+s)},queue_add:function(t){return d.a.post("/api/queue/items/add?uris="+t).then(function(t){return A.dispatch("add_notification",{text:t.data.count+" tracks appended to queue",type:"info",timeout:2e3}),Promise.resolve(t)})},queue_add_next:function(t){var s=0;return A.getters.now_playing&&A.getters.now_playing.id&&(s=A.getters.now_playing.position+1),d.a.post("/api/queue/items/add?uris="+t+"&position="+s).then(function(t){return A.dispatch("add_notification",{text:t.data.count+" tracks appended to queue",type:"info",timeout:2e3}),Promise.resolve(t)})},queue_expression_add:function(t){var s={};return s.expression=t,d.a.post("/api/queue/items/add",void 0,{params:s}).then(function(t){return A.dispatch("add_notification",{text:t.data.count+" tracks appended to queue",type:"info",timeout:2e3}),Promise.resolve(t)})},queue_expression_add_next:function(t){var s={};return s.expression=t,s.position=0,A.getters.now_playing&&A.getters.now_playing.id&&(s.position=A.getters.now_playing.position+1),d.a.post("/api/queue/items/add",void 0,{params:s}).then(function(t){return A.dispatch("add_notification",{text:t.data.count+" tracks appended to queue",type:"info",timeout:2e3}),Promise.resolve(t)})},queue_save_playlist:function(t){return d.a.post("/api/queue/save",void 0,{params:{name:t}}).then(function(s){return A.dispatch("add_notification",{text:'Queue saved to playlist "'+t+'"',type:"info",timeout:2e3}),Promise.resolve(s)})},player_status:function(){return d.a.get("/api/player")},player_play_uri:function(t,s){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i={};return i.uris=t,i.shuffle=s?"true":"false",i.clear="true",i.playback="start",i.playback_from_position=a,d.a.post("/api/queue/items/add",void 0,{params:i})},player_play_expression:function(t,s){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i={};return i.expression=t,i.shuffle=s?"true":"false",i.clear="true",i.playback="start",i.playback_from_position=a,d.a.post("/api/queue/items/add",void 0,{params:i})},player_play:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return d.a.put("/api/player/play",void 0,{params:t})},player_playpos:function(t){return d.a.put("/api/player/play?position="+t)},player_playid:function(t){return d.a.put("/api/player/play?item_id="+t)},player_pause:function(){return d.a.put("/api/player/pause")},player_stop:function(){return d.a.put("/api/player/stop")},player_next:function(){return d.a.put("/api/player/next")},player_previous:function(){return d.a.put("/api/player/previous")},player_shuffle:function(t){var s=t?"true":"false";return d.a.put("/api/player/shuffle?state="+s)},player_consume:function(t){var s=t?"true":"false";return d.a.put("/api/player/consume?state="+s)},player_repeat:function(t){return d.a.put("/api/player/repeat?state="+t)},player_volume:function(t){return d.a.put("/api/player/volume?volume="+t)},player_output_volume:function(t,s){return d.a.put("/api/player/volume?volume="+s+"&output_id="+t)},player_seek:function(t){return d.a.put("/api/player/seek?position_ms="+t)},outputs:function(){return d.a.get("/api/outputs")},output_update:function(t,s){return d.a.put("/api/outputs/"+t,s)},library_artists:function(){return d.a.get("/api/library/artists?media_kind=music")},library_artist:function(t){return d.a.get("/api/library/artists/"+t)},library_albums:function(t){return t?d.a.get("/api/library/artists/"+t+"/albums"):d.a.get("/api/library/albums?media_kind=music")},library_album:function(t){return d.a.get("/api/library/albums/"+t)},library_album_tracks:function(t){return d.a.get("/api/library/albums/"+t+"/tracks")},library_genres:function(){return d.a.get("/api/library/genres")},library_genre:function(t){var s={type:"albums",media_kind:"music",expression:'genre is "'+t+'"'};return d.a.get("/api/search",{params:s})},library_genre_tracks:function(t){var s={type:"tracks",media_kind:"music",expression:'genre is "'+t+'"'};return d.a.get("/api/search",{params:s})},library_artist_tracks:function(t){if(t){var s={type:"tracks",expression:'songartistid is "'+t+'"'};return d.a.get("/api/search",{params:s})}},library_podcasts:function(){return d.a.get("/api/library/albums?media_kind=podcast")},library_podcasts_new_episodes:function(){var t={type:"tracks",expression:"media_kind is podcast and play_count = 0 ORDER BY time_added DESC"};return d.a.get("/api/search",{params:t})},library_podcast_episodes:function(t){var s={type:"tracks",expression:'media_kind is podcast and songalbumid is "'+t+'" ORDER BY time_added DESC'};return d.a.get("/api/search",{params:s})},library_audiobooks:function(){return d.a.get("/api/library/albums?media_kind=audiobook")},library_playlists:function(){return d.a.get("/api/library/playlists")},library_playlist:function(t){return d.a.get("/api/library/playlists/"+t)},library_playlist_tracks:function(t){return d.a.get("/api/library/playlists/"+t+"/tracks")},library_track:function(t){return d.a.get("/api/library/tracks/"+t)},library_track_update:function(t){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return d.a.put("/api/library/tracks/"+t,void 0,{params:s})},library_files:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,s={directory:t};return d.a.get("/api/library/files",{params:s})},search:function(t){return d.a.get("/api/search",{params:t})},spotify:function(){return d.a.get("/api/spotify")},artwork_url_append_size_params:function(t){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:600,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:600;return t&&t.startsWith("/")?t.includes("?")?t+"&maxwidth="+s+"&maxheight="+a:t+"?maxwidth="+s+"&maxheight="+a:t}},O={_audio:new Audio,_context:null,_source:null,_gain:null,setupAudio:function(){var t=this,s=window.AudioContext||window.webkitAudioContext;return this._context=new s,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",function(s){t._audio.play()}),this._audio.addEventListener("canplay",function(s){t._audio.play()}),this._audio},setVolume:function(t){this._gain&&(t=parseFloat(t)||0,t=t<0?0:t,t=t>1?1:t,this._gain.gain.value=t)},playSource:function(t){var s=this;this.stopAudio(),this._context.resume().then(function(){s._audio.src=String(t||"")+"?x="+Date.now(),s._audio.crossOrigin="anonymous",s._audio.load()})},stopAudio:function(){try{this._audio.pause()}catch(t){}try{this._audio.stop()}catch(t){}try{this._audio.close()}catch(t){}}},T=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("a",{staticClass:"navbar-item",class:{"is-active":t.is_active},attrs:{href:t.full_path()},on:{click:function(s){return t.open_link()}}},[t._t("default")],2)},E=[],D={name:"NavbarItemLink",props:["to"],computed:{is_active:function(){return this.$route.path.startsWith(this.to)}},methods:{open_link:function(){this.$store.commit(P,!1),this.$router.push({path:this.to})},full_path:function(){var t=this.$router.resolve(this.to);return t.href}}},I=D,M=a("2877"),L=Object(M["a"])(I,T,E,!1,null,null,null),z=L.exports,N=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"navbar-item"},[a("div",{staticClass:"level is-mobile"},[a("div",{staticClass:"level-left fd-expanded"},[a("div",{staticClass:"level-item",staticStyle:{"flex-grow":"0"}},[a("a",{staticClass:"button is-white is-small"},[a("span",{staticClass:"icon fd-has-action",class:{"has-text-grey-light":!t.output.selected},on:{click:t.set_enabled}},[a("i",{staticClass:"mdi mdi-18px",class:t.type_class})])])]),a("div",{staticClass:"level-item fd-expanded"},[a("div",{staticClass:"fd-expanded"},[a("p",{staticClass:"heading",class:{"has-text-grey-light":!t.output.selected}},[t._v(t._s(t.output.name))]),a("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)])])])])},R=[],B=a("c7e3"),U=a.n(B),H={name:"NavbarItemOutput",components:{RangeSlider:U.a},props:["output"],computed:{type_class:function(){return"AirPlay"===this.output.type?"mdi-airplay":"fifo"===this.output.type?"mdi-pipe":"mdi-server"},volume:function(){return this.output.selected?this.output.volume:0}},methods:{play_next:function(){S.player_next()},set_volume:function(t){S.player_output_volume(this.output.id,t)},set_enabled:function(){var t={selected:!this.output.selected};S.output_update(this.output.id,t)}}},W=H,G=Object(M["a"])(W,N,R,!1,null,null,null),F=G.exports,Y=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("a",{on:{click:t.toggle_play_pause}},[a("span",{staticClass:"icon"},[a("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}]})])])},Q=[],V={name:"PlayerButtonPlayPause",props:["icon_style"],computed:{is_playing:function(){return"play"===this.$store.state.player.state},is_pause_allowed:function(){return this.$store.getters.now_playing&&"pipe"!==this.$store.getters.now_playing.data_kind}},methods:{toggle_play_pause:function(){this.is_playing&&this.is_pause_allowed?S.player_pause():this.is_playing&&!this.is_pause_allowed?S.player_stop():S.player_play()}}},J=V,K=Object(M["a"])(J,Y,Q,!1,null,null,null),X=K.exports,Z=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("a",{on:{click:t.play_next}},[t._m(0)])},tt=[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-skip-forward"})])}],st={name:"PlayerButtonNext",methods:{play_next:function(){S.player_next()}}},at=st,it=Object(M["a"])(at,Z,tt,!1,null,null,null),et=it.exports,lt=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("a",{on:{click:t.play_previous}},[t._m(0)])},nt=[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-skip-backward"})])}],ot={name:"PlayerButtonPrevious",methods:{play_previous:function(){S.player_previous()}}},rt=ot,ct=Object(M["a"])(rt,lt,nt,!1,null,null,null),dt=ct.exports,ut=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("a",{class:{"is-warning":t.is_shuffle},on:{click:t.toggle_shuffle_mode}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi",class:{"mdi-shuffle":t.is_shuffle,"mdi-shuffle-disabled":!t.is_shuffle}})])])},mt=[],_t={name:"PlayerButtonShuffle",computed:{is_shuffle:function(){return this.$store.state.player.shuffle}},methods:{toggle_shuffle_mode:function(){S.player_shuffle(!this.is_shuffle)}}},pt=_t,ht=Object(M["a"])(pt,ut,mt,!1,null,null,null),ft=ht.exports,yt=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("a",{class:{"is-warning":t.is_consume},on:{click:t.toggle_consume_mode}},[t._m(0)])},bt=[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-fire"})])}],vt={name:"PlayerButtonConsume",computed:{is_consume:function(){return this.$store.state.player.consume}},methods:{toggle_consume_mode:function(){S.player_consume(!this.is_consume)}}},gt=vt,kt=Object(M["a"])(gt,yt,bt,!1,null,null,null),Ct=kt.exports,wt=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("a",{class:{"is-warning":!t.is_repeat_off},on:{click:t.toggle_repeat_mode}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi",class:{"mdi-repeat":t.is_repeat_all,"mdi-repeat-once":t.is_repeat_single,"mdi-repeat-off":t.is_repeat_off}})])])},xt=[],$t=(a("14b9"),{name:"PlayerButtonRepeat",data:function(){return{}},computed:{is_repeat_all:function(){return"all"===this.$store.state.player.repeat},is_repeat_single:function(){return"single"===this.$store.state.player.repeat},is_repeat_off:function(){return!this.is_repeat_all&&!this.is_repeat_single}},methods:{toggle_repeat_mode:function(){this.is_repeat_all?S.player_repeat("single"):this.is_repeat_single?S.player_repeat("off"):S.player_repeat("all")}}}),qt=$t,jt=Object(M["a"])(qt,wt,xt,!1,null,null,null),Pt=jt.exports,At={name:"NavbarTop",components:{NavbarItemLink:z,NavbarItemOutput:F,PlayerButtonPlayPause:X,PlayerButtonNext:et,PlayerButtonPrevious:dt,PlayerButtonShuffle:ft,PlayerButtonConsume:Ct,PlayerButtonRepeat:Pt,RangeSlider:U.a},data:function(){return{old_volume:0,playing:!1,loading:!1,stream_volume:10}},computed:{outputs:function(){return this.$store.state.outputs},player:function(){return this.$store.state.player},config:function(){return this.$store.state.config},library:function(){return this.$store.state.library},audiobooks:function(){return this.$store.state.audiobooks_count},podcasts:function(){return this.$store.state.podcasts_count},show_burger_menu:function(){return this.$store.state.show_burger_menu}},methods:{update_show_burger_menu:function(){this.$store.commit(P,!this.show_burger_menu)},set_volume:function(t){S.player_volume(t)},toggle_mute_volume:function(){this.player.volume>0?this.set_volume(0):this.set_volume(this.old_volume)},setupAudio:function(){var t=this,s=O.setupAudio();s.addEventListener("waiting",function(s){t.playing=!1,t.loading=!0}),s.addEventListener("playing",function(s){t.playing=!0,t.loading=!1}),s.addEventListener("ended",function(s){t.playing=!1,t.loading=!1}),s.addEventListener("error",function(s){t.closeAudio(),t.$store.dispatch("add_notification",{text:"HTTP stream error: failed to load stream or stopped loading due to network problem",type:"danger"}),t.playing=!1,t.loading=!1})},closeAudio:function(){O.stopAudio(),this.playing=!1},playChannel:function(){if(!this.playing){var t="/stream.mp3";this.loading=!0,O.playSource(t),O.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,O.setVolume(this.stream_volume/100)}},watch:{"$store.state.player.volume":function(){this.player.volume>0&&(this.old_volume=this.player.volume)}},mounted:function(){this.setupAudio()},destroyed:function(){this.closeAudio()}},St=At,Ot=Object(M["a"])(St,o,r,!1,null,null,null),Tt=Ot.exports,Et=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("nav",{staticClass:"navbar is-dark is-fixed-bottom",attrs:{role:"navigation","aria-label":"player controls"}},[a("div",{staticClass:"navbar-brand fd-expanded"},[a("router-link",{staticClass:"navbar-item",attrs:{to:"/","active-class":"is-active",exact:""}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-24px mdi-playlist-play"})])]),a("router-link",{staticClass:"navbar-item is-expanded is-clipped",attrs:{to:"/now-playing","active-class":"is-active",exact:""}},[a("div",[a("p",{staticClass:"is-size-7 fd-is-text-clipped"},[a("strong",[t._v(t._s(t.now_playing.title))]),a("br"),t._v("\n "+t._s(t.now_playing.artist)),"url"===t.now_playing.data_kind?a("span",[t._v(" - "+t._s(t.now_playing.album))]):t._e()])])]),a("player-button-play-pause",{staticClass:"navbar-item fd-margin-left-auto",attrs:{icon_style:"mdi-36px"}})],1)])},Dt=[],It={name:"NavbarBottom",components:{PlayerButtonPlayPause:X},data:function(){return{}},computed:{state:function(){return this.$store.state.player},now_playing:function(){return this.$store.getters.now_playing}}},Mt=It,Lt=Object(M["a"])(Mt,Et,Dt,!1,null,null,null),zt=Lt.exports,Nt=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("section",{staticClass:"fd-notifications"},[a("div",{staticClass:"columns is-centered"},[a("div",{staticClass:"column is-half"},t._l(t.notifications,function(s){return a("div",{key:s.id,staticClass:"notification has-shadow ",class:["notification",s.type?"is-"+s.type:""]},[a("button",{staticClass:"delete",on:{click:function(a){return t.remove(s)}}}),t._v("\n "+t._s(s.text)+"\n ")])}),0)])])},Rt=[],Bt={name:"Notifications",components:{},data:function(){return{showNav:!1}},computed:{notifications:function(){return this.$store.state.notifications.list}},methods:{remove:function(t){this.$store.commit(x,t)}}},Ut=Bt,Ht=(a("cf45"),Object(M["a"])(Ut,Nt,Rt,!1,null,null,null)),Wt=Ht.exports,Gt=a("d04d"),Ft=a.n(Gt),Yt={name:"App",components:{NavbarTop:Tt,NavbarBottom:zt,Notifications:Wt},template:"<App/>",data:function(){return{token_timer_id:0,reconnect_attempts:0}},computed:{show_burger_menu:function(){return this.$store.state.show_burger_menu}},created:function(){var t=this;this.connect(),this.$Progress.start(),this.$router.beforeEach(function(s,a,i){if(s.meta.show_progress){if(void 0!==s.meta.progress){var e=s.meta.progress;t.$Progress.parseMeta(e)}t.$Progress.start()}i()}),this.$router.afterEach(function(s,a){s.meta.show_progress&&t.$Progress.finish()})},methods:{connect:function(){var t=this;this.$store.dispatch("add_notification",{text:"Connecting to forked-daapd",type:"info",topic:"connection",timeout:2e3}),S.config().then(function(s){var a=s.data;t.$store.commit(_,a),t.$store.commit(q,a.hide_singles),document.title=a.library_name,t.open_ws(),t.$Progress.finish()}).catch(function(){t.$store.dispatch("add_notification",{text:"Failed to connect to forked-daapd",type:"danger",topic:"connection"})})},open_ws:function(){if(this.$store.state.config.websocket_port<=0)this.$store.dispatch("add_notification",{text:"Missing websocket port",type:"danger"});else{var t=this,s="ws://";"https:"===window.location.protocol&&(s="wss://");var a=new Ft.a(s+window.location.hostname+":"+t.$store.state.config.websocket_port,"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","spotify"]})),t.update_outputs(),t.update_player_status(),t.update_library_stats(),t.update_queue(),t.update_spotify()},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){var a=JSON.parse(s.data);(a.notify.includes("update")||a.notify.includes("database"))&&t.update_library_stats(),(a.notify.includes("player")||a.notify.includes("options")||a.notify.includes("volume"))&&t.update_player_status(),(a.notify.includes("outputs")||a.notify.includes("volume"))&&t.update_outputs(),a.notify.includes("queue")&&t.update_queue(),a.notify.includes("spotify")&&t.update_spotify()}}},update_library_stats:function(){var t=this;S.library_stats().then(function(s){var a=s.data;t.$store.commit(p,a)}),S.library_count("media_kind is audiobook").then(function(s){var a=s.data;t.$store.commit(h,a)}),S.library_count("media_kind is podcast").then(function(s){var a=s.data;t.$store.commit(f,a)})},update_outputs:function(){var t=this;S.outputs().then(function(s){var a=s.data;t.$store.commit(y,a.outputs)})},update_player_status:function(){var t=this;S.player_status().then(function(s){var a=s.data;t.$store.commit(b,a)})},update_queue:function(){var t=this;S.queue().then(function(s){var a=s.data;t.$store.commit(v,a)})},update_spotify:function(){var t=this;S.spotify().then(function(s){var a=s.data;t.$store.commit(g,a),t.token_timer_id>0&&(window.clearTimeout(t.token_timer_id),t.token_timer_id=0),a.webapi_token_expires_in>0&&a.webapi_token&&(t.token_timer_id=window.setTimeout(t.update_spotify,1e3*a.webapi_token_expires_in))})}},watch:{show_burger_menu:function(){this.show_burger_menu?document.querySelector("html").classList.add("is-clipped"):document.querySelector("html").classList.remove("is-clipped")}}},Qt=Yt,Vt=Object(M["a"])(Qt,l,n,!1,null,null,null),Jt=Vt.exports,Kt=a("8c4f"),Xt=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"heading"},[t._v(t._s(t.queue.count)+" tracks")]),a("p",{staticClass:"title is-4"},[t._v("Queue")])]),a("template",{slot:"heading-right"},[a("div",{staticClass:"buttons is-centered"},[a("a",{staticClass:"button is-small",class:{"is-info":t.show_only_next_items},on:{click:t.update_show_next_items}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-arrow-collapse-down"})]),a("span",[t._v("Hide previous")])]),a("a",{staticClass:"button is-small",on:{click:t.open_add_stream_dialog}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-web"})]),a("span",[t._v("Add Stream")])]),a("a",{staticClass:"button is-small",class:{"is-info":t.edit_mode},on:{click:function(s){t.edit_mode=!t.edit_mode}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-pencil"})]),a("span",[t._v("Edit")])]),a("a",{staticClass:"button is-small",on:{click:t.queue_clear}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-delete-empty"})]),a("span",[t._v("Clear")])]),t.is_queue_save_allowed?a("a",{staticClass:"button is-small",attrs:{disabled:0===t.queue_items.length},on:{click:t.save_dialog}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-content-save"})]),a("span",[t._v("Save")])]):t._e()])]),a("template",{slot:"content"},[a("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,i){return a("list-item-queue-item",{key:s.id,attrs:{item:s,position:i,current_position:t.current_position,show_only_next_items:t.show_only_next_items,edit_mode:t.edit_mode}},[a("template",{slot:"actions"},[t.edit_mode?t._e():a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])]),s.id!==t.state.item_id&&t.edit_mode?a("a",{on:{click:function(a){return t.remove(s)}}},[a("span",{staticClass:"icon has-text-grey"},[a("i",{staticClass:"mdi mdi-delete mdi-18px"})])]):t._e()])],2)}),1),a("modal-dialog-queue-item",{attrs:{show:t.show_details_modal,item:t.selected_item},on:{close:function(s){t.show_details_modal=!1}}}),a("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?a("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)},Zt=[],ts=a("7412"),ss=function(){var t=this,s=t.$createElement,a=t._self._c||s;return t.is_next||!t.show_only_next_items?a("div",{staticClass:"media"},[t.edit_mode?a("div",{staticClass:"media-left"},[t._m(0)]):t._e(),a("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:t.play}},[a("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))]),a("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}},[a("b",[t._v(t._s(t.item.artist))])]),a("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))])]),a("div",{staticClass:"media-right"},[t._t("actions")],2)]):t._e()},as=[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("span",{staticClass:"icon has-text-grey fd-is-movable handle"},[a("i",{staticClass:"mdi mdi-drag-horizontal mdi-18px"})])}],is={name:"ListItemQueueItem",props:["item","position","current_position","show_only_next_items","edit_mode"],computed:{state:function(){return this.$store.state.player},is_next:function(){return this.current_position<0||this.position>=this.current_position}},methods:{play:function(){S.player_play({item_id:this.item.id})}}},es=is,ls=Object(M["a"])(es,ss,as,!1,null,null,null),ns=ls.exports,os=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("p",{staticClass:"title is-4"},[t._v("\n "+t._s(t.item.title)+"\n ")]),a("p",{staticClass:"subtitle"},[t._v("\n "+t._s(t.item.artist)+"\n ")]),a("div",{staticClass:"content is-small"},[a("p",[a("span",{staticClass:"heading"},[t._v("Album")]),t.item.album_id?a("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_album}},[t._v(t._s(t.item.album))]):a("span",{staticClass:"title is-6"},[t._v(t._s(t.item.album))])]),t.item.album_artist?a("p",[a("span",{staticClass:"heading"},[t._v("Album artist")]),t.item.album_artist_id?a("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_album_artist}},[t._v(t._s(t.item.album_artist))]):a("span",{staticClass:"title is-6"},[t._v(t._s(t.item.album_artist))])]):t._e(),t.item.composer?a("p",[a("span",{staticClass:"heading"},[t._v("Composer")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.item.composer))])]):t._e(),t.item.year>0?a("p",[a("span",{staticClass:"heading"},[t._v("Year")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.item.year))])]):t._e(),t.item.genre?a("p",[a("span",{staticClass:"heading"},[t._v("Genre")]),a("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_genre}},[t._v(t._s(t.item.genre))])]):t._e(),a("p",[a("span",{staticClass:"heading"},[t._v("Track / Disc")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.item.track_number)+" / "+t._s(t.item.disc_number))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Length")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t._f("duration")(t.item.length_ms)))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Path")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.item.path))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Type")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.item.media_kind)+" - "+t._s(t.item.data_kind)+" "),"spotify"===t.item.data_kind?a("span",{staticClass:"has-text-weight-normal"},[t._v("("),a("a",{on:{click:t.open_spotify_artist}},[t._v("artist")]),t._v(", "),a("a",{on:{click:t.open_spotify_album}},[t._v("album")]),t._v(")")]):t._e()])]),a("p",[a("span",{staticClass:"heading"},[t._v("Quality")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.item.type)+" | "+t._s(t.item.samplerate)+" Hz | "+t._s(t.item.channels)+" | "+t._s(t.item.bitrate)+" Kb/s")])])])]),a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.remove}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-delete"})]),a("span",{staticClass:"is-size-7"},[t._v("Remove")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),a("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},rs=[],cs=a("be8d"),ds=a.n(cs),us={name:"ModalDialogQueueItem",props:["show","item"],data:function(){return{spotify_track:{}}},methods:{remove:function(){this.$emit("close"),S.queue_remove(this.item.id)},play:function(){this.$emit("close"),S.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:function(){var t=this;if(this.item&&"spotify"===this.item.data_kind){var s=new ds.a;s.setAccessToken(this.$store.state.spotify.webapi_token),s.getTrack(this.item.path.slice(this.item.path.lastIndexOf(":")+1)).then(function(s){t.spotify_track=s})}else this.spotify_track={}}}},ms=us,_s=Object(M["a"])(ms,os,rs,!1,null,null,null),ps=_s.exports,hs=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("p",{staticClass:"title is-4"},[t._v("\n Add stream URL\n ")]),a("form",{staticClass:"fd-has-margin-bottom",on:{submit:function(s){return s.preventDefault(),t.play(s)}}},[a("div",{staticClass:"field"},[a("p",{staticClass:"control is-expanded has-icons-left"},[a("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)}}}),a("span",{staticClass:"icon is-left"},[a("i",{staticClass:"mdi mdi-web"})])])])])]),t.loading?a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark"},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-web"})]),a("span",{staticClass:"is-size-7"},[t._v("Loading ...")])])]):a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-danger",on:{click:function(s){return t.$emit("close")}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-cancel"})]),a("span",{staticClass:"is-size-7"},[t._v("Cancel")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.add_stream}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-plus"})]),a("span",{staticClass:"is-size-7"},[t._v("Add")])]),a("a",{staticClass:"card-footer-item has-background-info has-text-white has-text-weight-bold",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),a("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},fs=[],ys={name:"ModalDialogAddUrlStream",props:["show"],data:function(){return{url:"",loading:!1}},methods:{add_stream:function(){var t=this;this.loading=!0,S.queue_add(this.url).then(function(){t.$emit("close"),t.url=""}).catch(function(){t.loading=!1})},play:function(){var t=this;this.loading=!0,S.player_play_uri(this.url,!1).then(function(){t.$emit("close"),t.url=""}).catch(function(){t.loading=!1})}},watch:{show:function(){var t=this;this.show&&(this.loading=!1,setTimeout(function(){t.$refs.url_field.focus()},10))}}},bs=ys,vs=Object(M["a"])(bs,hs,fs,!1,null,null,null),gs=vs.exports,ks=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("p",{staticClass:"title is-4"},[t._v("\n Save queue to playlist\n ")]),a("form",{staticClass:"fd-has-margin-bottom",on:{submit:function(s){return s.preventDefault(),t.save(s)}}},[a("div",{staticClass:"field"},[a("p",{staticClass:"control is-expanded has-icons-left"},[a("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)}}}),a("span",{staticClass:"icon is-left"},[a("i",{staticClass:"mdi mdi-file-music"})])])])])]),t.loading?a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark"},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-web"})]),a("span",{staticClass:"is-size-7"},[t._v("Saving ...")])])]):a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-danger",on:{click:function(s){return t.$emit("close")}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-cancel"})]),a("span",{staticClass:"is-size-7"},[t._v("Cancel")])]),a("a",{staticClass:"card-footer-item has-background-info has-text-white has-text-weight-bold",on:{click:t.save}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-content-save"})]),a("span",{staticClass:"is-size-7"},[t._v("Save")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},Cs=[],ws={name:"ModalDialogPlaylistSave",props:["show"],data:function(){return{playlist_name:"",loading:!1}},methods:{save:function(){var t=this;this.playlist_name.length<1||(this.loading=!0,S.queue_save_playlist(this.playlist_name).then(function(){t.$emit("close"),t.playlist_name=""}).catch(function(){t.loading=!1}))}},watch:{show:function(){var t=this;this.show&&(this.loading=!1,setTimeout(function(){t.$refs.playlist_name_field.focus()},10))}}},xs=ws,$s=Object(M["a"])(xs,ks,Cs,!1,null,null,null),qs=$s.exports,js=a("310e"),Ps=a.n(js),As={name:"PageQueue",components:{ContentWithHeading:ts["default"],ListItemQueueItem:ns,draggable:Ps.a,ModalDialogQueueItem:ps,ModalDialogAddUrlStream:gs,ModalDialogPlaylistSave:qs},data:function(){return{edit_mode:!1,show_details_modal:!1,show_url_modal:!1,show_pls_save_modal:!1,selected_item:{}}},computed:{state:function(){return this.$store.state.player},is_queue_save_allowed:function(){return this.$store.state.config.allow_modifying_stored_playlists&&this.$store.state.config.default_playlist_directory},queue:function(){return this.$store.state.queue},queue_items:{get:function(){return this.$store.state.queue.items},set:function(t){}},current_position:function(){var 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:function(){return this.$store.state.show_only_next_items}},methods:{queue_clear:function(){S.queue_clear()},update_show_next_items:function(t){this.$store.commit(j,!this.show_only_next_items)},remove:function(t){S.queue_remove(t.id)},move_item:function(t){var s=this.show_only_next_items?t.oldIndex+this.current_position:t.oldIndex,a=this.queue_items[s],i=a.position+(t.newIndex-t.oldIndex);i!==s&&S.queue_move(a.id,i)},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.show_pls_save_modal=!0}}},Ss=As,Os=Object(M["a"])(Ss,Xt,Zt,!1,null,null,null),Ts=Os.exports,Es=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("section",{staticClass:"hero fd-is-fullheight"},[a("div",{staticClass:"hero-head fd-has-padding-left-right"},[a("div",{staticClass:"container has-text-centered fd-has-margin-top"},[a("h1",{staticClass:"title is-4"},[t._v("\n "+t._s(t.now_playing.title)+"\n ")]),a("h2",{staticClass:"title is-6"},[t._v("\n "+t._s(t.now_playing.artist)+"\n ")]),a("h3",{staticClass:"subtitle is-6"},[t._v("\n "+t._s(t.now_playing.album)+"\n ")])])]),a("div",{directives:[{name:"show",rawName:"v-show",value:t.artwork_visible,expression:"artwork_visible"}],staticClass:"hero-body fd-is-fullheight-body has-text-centered"},[a("img",{staticClass:"fd-has-shadow fd-image-fullheight fd-has-action",attrs:{src:t.artwork_url},on:{load:t.artwork_loaded,error:t.artwork_error,click:function(s){return t.open_dialog(t.now_playing)}}})]),a("div",{directives:[{name:"show",rawName:"v-show",value:!t.artwork_visible,expression:"!artwork_visible"}],staticClass:"hero-body fd-is-fullheight-body has-text-centered"},[a("a",{staticClass:"button is-white is-medium",on:{click:function(s){return t.open_dialog(t.now_playing)}}},[t._m(0)])]),a("div",{staticClass:"hero-foot fd-has-padding-left-right"},[a("div",{staticClass:"container has-text-centered fd-has-margin-bottom"},[a("p",{staticClass:"control has-text-centered fd-progress-now-playing"},[a("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),a("p",{staticClass:"content"},[a("span",[t._v(t._s(t._f("duration")(t.item_progress_ms))+" / "+t._s(t._f("duration")(t.now_playing.length_ms)))])]),a("div",{staticClass:"buttons has-addons is-centered"},[a("player-button-previous",{staticClass:"button is-medium"}),a("player-button-play-pause",{staticClass:"button is-medium",attrs:{icon_style:"mdi-36px"}}),a("player-button-next",{staticClass:"button is-medium"}),a("player-button-repeat",{staticClass:"button is-medium is-light"}),a("player-button-shuffle",{staticClass:"button is-medium is-light"}),a("player-button-consume",{staticClass:"button is-medium is-light"})],1)]),a("modal-dialog-queue-item",{attrs:{show:t.show_details_modal,item:t.selected_item},on:{close:function(s){t.show_details_modal=!1}}})],1)])},Ds=[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("span",{staticClass:"icon has-text-grey-light"},[a("i",{staticClass:"mdi mdi-information-outline"})])}],Is={name:"PageNowPlaying",components:{ModalDialogQueueItem:ps,PlayerButtonPlayPause:X,PlayerButtonNext:et,PlayerButtonPrevious:dt,PlayerButtonShuffle:ft,PlayerButtonConsume:Ct,PlayerButtonRepeat:Pt,RangeSlider:U.a},data:function(){return{item_progress_ms:0,interval_id:0,artwork_visible:!1,show_details_modal:!1,selected_item:{}}},created:function(){var t=this;this.item_progress_ms=this.state.item_progress_ms,S.player_status().then(function(s){var a=s.data;t.$store.commit(b,a),"play"===t.state.state&&(t.interval_id=window.setInterval(t.tick,1e3))})},destroyed:function(){this.interval_id>0&&(window.clearTimeout(this.interval_id),this.interval_id=0)},computed:{state:function(){return this.$store.state.player},now_playing:function(){return this.$store.getters.now_playing},artwork_url:function(){return S.artwork_url_append_size_params(this.now_playing.artwork_url)}},methods:{tick:function(){this.item_progress_ms+=1e3},seek:function(t){var s=this;S.player_seek(t).catch(function(){s.item_progress_ms=s.state.item_progress_ms})},artwork_loaded:function(){this.artwork_visible=!0},artwork_error:function(){this.artwork_visible=!1},open_dialog:function(t){this.selected_item=t,this.show_details_modal=!0}},watch:{state:function(){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))}}},Ms=Is,Ls=Object(M["a"])(Ms,Es,Ds,!1,null,null,null),zs=Ls.exports,Ns=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("tabs-music"),a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Recently added")]),a("p",{staticClass:"heading"},[t._v("albums")])]),a("template",{slot:"content"},[t._l(t.recently_added.items,function(s){return a("list-item-album",{key:s.id,attrs:{album:s},on:{click:function(a){return t.open_album(s)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_album_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("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),a("template",{slot:"footer"},[a("nav",{staticClass:"level"},[a("p",{staticClass:"level-item"},[a("a",{staticClass:"button is-light is-small is-rounded",on:{click:function(s){return t.open_browse("recently_added")}}},[t._v("Show more")])])])])],2),a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Recently played")]),a("p",{staticClass:"heading"},[t._v("tracks")])]),a("template",{slot:"content"},[t._l(t.recently_played.items,function(s){return a("list-item-track",{key:s.id,attrs:{track:s},on:{click:function(a){return t.play_track(s)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_track_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("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),a("template",{slot:"footer"},[a("nav",{staticClass:"level"},[a("p",{staticClass:"level-item"},[a("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)},Rs=[],Bs=(a("386d"),a("ac6a"),a("5df3"),function(t){return{beforeRouteEnter:function(s,a,i){t.load(s).then(function(s){i(function(a){return t.set(a,s)})})},beforeRouteUpdate:function(s,a,i){var e=this;t.load(s).then(function(s){t.set(e,s),i()})}}}),Us=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("section",{staticClass:"section fd-tabs-section"},[a("div",{staticClass:"container"},[a("div",{staticClass:"columns is-centered"},[a("div",{staticClass:"column is-four-fifths"},[a("div",{staticClass:"tabs is-centered is-small"},[a("ul",[a("router-link",{attrs:{tag:"li",to:"/music/browse","active-class":"is-active"}},[a("a",[a("span",{staticClass:"icon is-small"},[a("i",{staticClass:"mdi mdi-web"})]),a("span",{},[t._v("Browse")])])]),a("router-link",{attrs:{tag:"li",to:"/music/artists","active-class":"is-active"}},[a("a",[a("span",{staticClass:"icon is-small"},[a("i",{staticClass:"mdi mdi-artist"})]),a("span",{},[t._v("Artists")])])]),a("router-link",{attrs:{tag:"li",to:"/music/albums","active-class":"is-active"}},[a("a",[a("span",{staticClass:"icon is-small"},[a("i",{staticClass:"mdi mdi-album"})]),a("span",{},[t._v("Albums")])])]),a("router-link",{attrs:{tag:"li",to:"/music/genres","active-class":"is-active"}},[a("a",[a("span",{staticClass:"icon is-small"},[a("i",{staticClass:"mdi mdi-speaker"})]),a("span",{},[t._v("Genres")])])]),t.spotify_enabled?a("router-link",{attrs:{tag:"li",to:"/music/spotify","active-class":"is-active"}},[a("a",[a("span",{staticClass:"icon is-small"},[a("i",{staticClass:"mdi mdi-spotify"})]),a("span",{},[t._v("Spotify")])])]):t._e()],1)])])])])])},Hs=[],Ws={name:"TabsMusic",computed:{spotify_enabled:function(){return this.$store.state.spotify.webapi_token_valid}}},Gs=Ws,Fs=Object(M["a"])(Gs,Us,Hs,!1,null,null,null),Ys=Fs.exports,Qs=function(t,s){var a=s._c;return a("div",{staticClass:"media",attrs:{id:"index_"+s.props.album.name_sort.charAt(0).toUpperCase()}},[a("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:s.listeners.click}},[a("h1",{staticClass:"title is-6"},[s._v(s._s(s.props.album.name))]),a("h2",{staticClass:"subtitle is-7 has-text-grey"},[a("b",[s._v(s._s(s.props.album.artist))])])]),a("div",{staticClass:"media-right"},[s._t("actions")],2)])},Vs=[],Js={name:"ListItemAlbum",props:["album","media_kind"]},Ks=Js,Xs=Object(M["a"])(Ks,Qs,Vs,!0,null,null,null),Zs=Xs.exports,ta=function(t,s){var a=s._c;return a("div",{staticClass:"media",class:{"with-progress":s.slots().progress},attrs:{id:"index_"+s.props.track.title_sort.charAt(0).toUpperCase()}},[s.slots().icon?a("figure",{staticClass:"media-left fd-has-action",on:{click:s.listeners.click}},[s._t("icon")],2):s._e(),a("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:s.listeners.click}},[a("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))]),a("h2",{staticClass:"subtitle is-7 has-text-grey"},[a("b",[s._v(s._s(s.props.track.artist))])]),a("h2",{staticClass:"subtitle is-7 has-text-grey"},[s._v(s._s(s.props.track.album))]),s._t("progress")],2),a("div",{staticClass:"media-right"},[s._t("actions")],2)])},sa=[],aa={name:"ListItemTrack",props:["track"]},ia=aa,ea=Object(M["a"])(ia,ta,sa,!0,null,null,null),la=ea.exports,na=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("p",{staticClass:"title is-4"},[t._v("\n "+t._s(t.track.title)+"\n ")]),a("p",{staticClass:"subtitle"},[t._v("\n "+t._s(t.track.artist)+"\n ")]),"podcast"===t.track.media_kind?a("div",{staticClass:"buttons"},[t.track.play_count>0?a("a",{staticClass:"button is-small",on:{click:t.mark_new}},[t._v("Mark as new")]):t._e(),0===t.track.play_count?a("a",{staticClass:"button is-small",on:{click:t.mark_played}},[t._v("Mark as played")]):t._e()]):t._e(),a("div",{staticClass:"content is-small"},[a("p",[a("span",{staticClass:"heading"},[t._v("Album")]),a("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?a("p",[a("span",{staticClass:"heading"},[t._v("Album artist")]),a("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?a("p",[a("span",{staticClass:"heading"},[t._v("Composer")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.track.composer))])]):t._e(),t.track.date_released?a("p",[a("span",{staticClass:"heading"},[t._v("Release date")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t._f("time")(t.track.date_released,"L")))])]):t.track.year>0?a("p",[a("span",{staticClass:"heading"},[t._v("Year")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.track.year))])]):t._e(),t.track.genre?a("p",[a("span",{staticClass:"heading"},[t._v("Genre")]),a("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_genre}},[t._v(t._s(t.track.genre))])]):t._e(),a("p",[a("span",{staticClass:"heading"},[t._v("Track / Disc")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.track.track_number)+" / "+t._s(t.track.disc_number))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Length")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t._f("duration")(t.track.length_ms)))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Path")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.track.path))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Type")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.track.media_kind)+" - "+t._s(t.track.data_kind)+" "),"spotify"===t.track.data_kind?a("span",{staticClass:"has-text-weight-normal"},[t._v("("),a("a",{on:{click:t.open_spotify_artist}},[t._v("artist")]),t._v(", "),a("a",{on:{click:t.open_spotify_album}},[t._v("album")]),t._v(")")]):t._e()])]),a("p",[a("span",{staticClass:"heading"},[t._v("Quality")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.track.type)+" | "+t._s(t.track.samplerate)+" Hz | "+t._s(t.track.channels)+" channels | "+t._s(t.track.bitrate)+" Kb/s")])]),a("p",[a("span",{staticClass:"heading"},[t._v("Added at")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t._f("time")(t.track.time_added,"L LT")))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Rating")]),a("span",{staticClass:"title is-6"},[t._v(t._s(Math.floor(t.track.rating/10))+" / 10")])])])]),a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-plus"})]),a("span",{staticClass:"is-size-7"},[t._v("Add")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-play"})]),a("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play_track}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),a("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},oa=[],ra={name:"ModalDialogTrack",props:["show","track"],data:function(){return{spotify_track:{}}},methods:{play_track:function(){this.$emit("close"),S.player_play_uri(this.track.uri,!1)},queue_add:function(){this.$emit("close"),S.queue_add(this.track.uri)},queue_add_next:function(){this.$emit("close"),S.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(){var t=this;S.library_track_update(this.track.id,{play_count:"reset"}).then(function(){t.$emit("play_count_changed"),t.$emit("close")})},mark_played:function(){var t=this;S.library_track_update(this.track.id,{play_count:"increment"}).then(function(){t.$emit("play_count_changed"),t.$emit("close")})}},watch:{track:function(){var t=this;if(this.track&&"spotify"===this.track.data_kind){var s=new ds.a;s.setAccessToken(this.$store.state.spotify.webapi_token),s.getTrack(this.track.path.slice(this.track.path.lastIndexOf(":")+1)).then(function(s){t.spotify_track=s})}else this.spotify_track={}}}},ca=ra,da=Object(M["a"])(ca,na,oa,!1,null,null,null),ua=da.exports,ma=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("figure",{directives:[{name:"show",rawName:"v-show",value:t.artwork_visible,expression:"artwork_visible"}],staticClass:"image is-square fd-has-margin-bottom"},[a("img",{staticClass:"fd-has-shadow",attrs:{src:t.artwork_url},on:{load:t.artwork_loaded,error:t.artwork_error}})]),a("p",{staticClass:"title is-4"},[a("a",{staticClass:"has-text-link",on:{click:t.open_album}},[t._v(t._s(t.album.name))])]),a("div",{staticClass:"content is-small"},[t.album.artist&&"audiobook"!==t.media_kind?a("p",[a("span",{staticClass:"heading"},[t._v("Album artist")]),a("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_artist}},[t._v(t._s(t.album.artist))])]):t._e(),t.album.artist&&"audiobook"===t.media_kind?a("p",[a("span",{staticClass:"heading"},[t._v("Album artist")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.album.artist))])]):t._e(),a("p",[a("span",{staticClass:"heading"},[t._v("Tracks")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.album.track_count))])])])]),a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-plus"})]),a("span",{staticClass:"is-size-7"},[t._v("Add")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-play"})]),a("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),a("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},_a=[],pa={name:"ModalDialogAlbum",props:["show","album","media_kind"],data:function(){return{artwork_visible:!1}},computed:{artwork_url:function(){return S.artwork_url_append_size_params(this.album.artwork_url)}},methods:{play:function(){this.$emit("close"),S.player_play_uri(this.album.uri,!1)},queue_add:function(){this.$emit("close"),S.queue_add(this.album.uri)},queue_add_next:function(){this.$emit("close"),S.queue_add_next(this.album.uri)},open_album:function(){"podcast"===this.media_kind?this.$router.push({path:"/podcasts/"+this.album.id}):"audiobook"===this.media_kind?this.$router.push({path:"/audiobooks/"+this.album.id}):this.$router.push({path:"/music/albums/"+this.album.id})},open_artist:function(){this.$router.push({path:"/music/artists/"+this.album.artist_id})},artwork_loaded:function(){this.artwork_visible=!0},artwork_error:function(){this.artwork_visible=!1}}},ha=pa,fa=Object(M["a"])(ha,ma,_a,!1,null,null,null),ya=fa.exports,ba={load:function(t){return Promise.all([S.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}),S.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}},va={name:"PageBrowse",mixins:[Bs(ba)],components:{ContentWithHeading:ts["default"],TabsMusic:Ys,ListItemAlbum:Zs,ListItemTrack:la,ModalDialogTrack:ua,ModalDialogAlbum:ya},data:function(){return{recently_added:{},recently_played:{},show_track_details_modal:!1,selected_track:{},show_album_details_modal:!1,selected_album:{}}},methods:{open_browse:function(t){this.$router.push({path:"/music/browse/"+t})},open_track_dialog:function(t){this.selected_track=t,this.show_track_details_modal=!0},open_album:function(t){this.$router.push({path:"/music/albums/"+t.id})},open_album_dialog:function(t){this.selected_album=t,this.show_album_details_modal=!0},play_track:function(t){S.player_play_uri(t.uri,!1)}}},ga=va,ka=Object(M["a"])(ga,Ns,Rs,!1,null,null,null),Ca=ka.exports,wa=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("tabs-music"),a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Recently added")]),a("p",{staticClass:"heading"},[t._v("albums")])]),a("template",{slot:"content"},[t._l(t.recently_added.items,function(s){return a("list-item-album",{key:s.id,attrs:{album:s},on:{click:function(a){return t.open_album(s)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("modal-dialog-album",{attrs:{show:t.show_details_modal,album:t.selected_album},on:{close:function(s){t.show_details_modal=!1}}})],2)],2)],1)},xa=[],$a={load:function(t){return S.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:50})},set:function(t,s){t.recently_added=s.data.albums}},qa={name:"PageBrowseType",mixins:[Bs($a)],components:{ContentWithHeading:ts["default"],TabsMusic:Ys,ListItemAlbum:Zs,ModalDialogAlbum:ya},data:function(){return{recently_added:{},show_details_modal:!1,selected_album:{}}},methods:{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}}},ja=qa,Pa=Object(M["a"])(ja,wa,xa,!1,null,null,null),Aa=Pa.exports,Sa=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("tabs-music"),a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Recently played")]),a("p",{staticClass:"heading"},[t._v("tracks")])]),a("template",{slot:"content"},[t._l(t.recently_played.items,function(s){return a("list-item-track",{key:s.id,attrs:{track:s},on:{click:function(a){return t.play_track(s)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("modal-dialog-track",{attrs:{show:t.show_details_modal,track:t.selected_track},on:{close:function(s){t.show_details_modal=!1}}})],2)],2)],1)},Oa=[],Ta={load:function(t){return S.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}},Ea={name:"PageBrowseType",mixins:[Bs(Ta)],components:{ContentWithHeading:ts["default"],TabsMusic:Ys,ListItemTrack:la,ModalDialogTrack:ua},data:function(){return{recently_played:{},show_details_modal:!1,selected_track:{}}},methods:{open_dialog:function(t){this.selected_track=t,this.show_details_modal=!0},play_track:function(t){S.player_play_uri(t.uri,!1)}}},Da=Ea,Ia=Object(M["a"])(Da,Sa,Oa,!1,null,null,null),Ma=Ia.exports,La=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("tabs-music"),a("content-with-heading",[a("template",{slot:"options"},[a("index-button-list",{attrs:{index:t.index_list}})],1),a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Artists")]),a("p",{staticClass:"heading"},[t._v(t._s(t.artists.total)+" artists")])]),a("template",{slot:"heading-right"},[a("a",{staticClass:"button is-small",class:{"is-info":t.hide_singles},on:{click:t.update_hide_singles}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-numeric-1-box-multiple-outline"})]),a("span",[t._v("Hide singles")])])]),a("template",{slot:"content"},[t._l(t.artists.items,function(s){return!t.hide_singles||s.track_count>2*s.album_count?a("list-item-artist",{key:s.id,attrs:{artist:s},on:{click:function(a){return t.open_artist(s)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2):t._e()}),a("modal-dialog-artist",{attrs:{show:t.show_details_modal,artist:t.selected_artist},on:{close:function(s){t.show_details_modal=!1}}})],2)],2)],1)},za=[],Na=(a("4f7f"),a("75fc")),Ra=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("section",[t.filtered_index.length>1?a("nav",{staticClass:"buttons is-centered fd-is-square",staticStyle:{"margin-bottom":"48px"}},t._l(t.filtered_index,function(s){return a("a",{key:s,staticClass:"button is-small",on:{click:function(a){return t.nav(s)}}},[t._v(t._s(s))])}),0):t._e(),t.filtered_index.length>1?a("nav",{staticClass:"buttons is-centered",staticStyle:{"margin-bottom":"6px"}},[a("a",{staticClass:"button is-small is-white",on:{click:t.scroll_to_top}},[t._m(0)])]):t._e()])},Ba=[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("span",{staticClass:"icon is-small"},[a("i",{staticClass:"mdi mdi-chevron-up"})])}],Ua={name:"IndexButtonList",props:["index"],computed:{filtered_index:function(){var t="!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~";return this.index.filter(function(s){return!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"})}}},Ha=Ua,Wa=Object(M["a"])(Ha,Ra,Ba,!1,null,null,null),Ga=Wa.exports,Fa=function(t,s){var a=s._c;return a("div",{staticClass:"media",attrs:{id:"index_"+s.props.artist.name_sort.charAt(0).toUpperCase()}},[a("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:s.listeners.click}},[a("h1",{staticClass:"title is-6"},[s._v(s._s(s.props.artist.name))])]),a("div",{staticClass:"media-right"},[s._t("actions")],2)])},Ya=[],Qa={name:"ListItemArtist",props:["artist"]},Va=Qa,Ja=Object(M["a"])(Va,Fa,Ya,!0,null,null,null),Ka=Ja.exports,Xa=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("p",{staticClass:"title is-4"},[a("a",{staticClass:"has-text-link",on:{click:t.open_artist}},[t._v(t._s(t.artist.name))])]),a("div",{staticClass:"content is-small"},[a("p",[a("span",{staticClass:"heading"},[t._v("Albums")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.artist.album_count))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Tracks")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.artist.track_count))])])])]),a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-plus"})]),a("span",{staticClass:"is-size-7"},[t._v("Add")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-play"})]),a("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),a("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},Za=[],ti={name:"ModalDialogArtist",props:["show","artist"],methods:{play:function(){this.$emit("close"),S.player_play_uri(this.artist.uri,!1)},queue_add:function(){this.$emit("close"),S.queue_add(this.artist.uri)},queue_add_next:function(){this.$emit("close"),S.queue_add_next(this.artist.uri)},open_artist:function(){this.$emit("close"),this.$router.push({path:"/music/artists/"+this.artist.id})}}},si=ti,ai=Object(M["a"])(si,Xa,Za,!1,null,null,null),ii=ai.exports,ei={load:function(t){return S.library_artists()},set:function(t,s){t.artists=s.data}},li={name:"PageArtists",mixins:[Bs(ei)],components:{ContentWithHeading:ts["default"],TabsMusic:Ys,IndexButtonList:Ga,ListItemArtist:Ka,ModalDialogArtist:ii},data:function(){return{artists:{items:[]},show_details_modal:!1,selected_artist:{}}},computed:{hide_singles:function(){return this.$store.state.hide_singles},index_list:function(){var t=this;return Object(Na["a"])(new Set(this.artists.items.filter(function(s){return!t.$store.state.hide_singles||s.track_count>2*s.album_count}).map(function(t){return t.name_sort.charAt(0).toUpperCase()})))}},methods:{update_hide_singles:function(t){this.$store.commit(q,!this.hide_singles)},open_artist:function(t){this.$router.push({path:"/music/artists/"+t.id})},open_dialog:function(t){this.selected_artist=t,this.show_details_modal=!0}}},ni=li,oi=Object(M["a"])(ni,La,za,!1,null,null,null),ri=oi.exports,ci=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v(t._s(t.artist.name))])]),a("template",{slot:"heading-right"},[a("div",{staticClass:"buttons is-centered"},[a("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_artist_details_modal=!0}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),a("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-shuffle"})]),a("span",[t._v("Shuffle")])])])]),a("template",{slot:"content"},[a("p",{staticClass:"heading has-text-centered-mobile"},[t._v(t._s(t.artist.album_count)+" albums | "),a("a",{staticClass:"has-text-link",on:{click:t.open_tracks}},[t._v(t._s(t.artist.track_count)+" tracks")])]),t._l(t.albums.items,function(s){return a("list-item-album",{key:s.id,attrs:{album:s},on:{click:function(a){return t.open_album(s)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("modal-dialog-album",{attrs:{show:t.show_details_modal,album:t.selected_album},on:{close:function(s){t.show_details_modal=!1}}}),a("modal-dialog-artist",{attrs:{show:t.show_artist_details_modal,artist:t.artist},on:{close:function(s){t.show_artist_details_modal=!1}}})],2)],2)},di=[],ui={load:function(t){return Promise.all([S.library_artist(t.params.artist_id),S.library_albums(t.params.artist_id)])},set:function(t,s){t.artist=s[0].data,t.albums=s[1].data}},mi={name:"PageArtist",mixins:[Bs(ui)],components:{ContentWithHeading:ts["default"],ListItemAlbum:Zs,ModalDialogAlbum:ya,ModalDialogArtist:ii},data:function(){return{artist:{},albums:{},show_details_modal:!1,selected_album:{},show_artist_details_modal:!1}},methods:{open_tracks:function(){this.$router.push({path:"/music/artists/"+this.artist.id+"/tracks"})},play:function(){S.player_play_uri(this.albums.items.map(function(t){return t.uri}).join(","),!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}}},_i=mi,pi=Object(M["a"])(_i,ci,di,!1,null,null,null),hi=pi.exports,fi=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("tabs-music"),a("content-with-heading",[a("template",{slot:"options"},[a("index-button-list",{attrs:{index:t.index_list}})],1),a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Albums")]),a("p",{staticClass:"heading"},[t._v(t._s(t.albums.total)+" albums")])]),a("template",{slot:"heading-right"},[a("a",{staticClass:"button is-small",class:{"is-info":t.hide_singles},on:{click:t.update_hide_singles}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-numeric-1-box-multiple-outline"})]),a("span",[t._v("Hide singles")])])]),a("template",{slot:"content"},[t._l(t.albums.items,function(s){return!t.hide_singles||s.track_count>2?a("list-item-album",{key:s.id,attrs:{album:s},on:{click:function(a){return t.open_album(s)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2):t._e()}),a("modal-dialog-album",{attrs:{show:t.show_details_modal,album:t.selected_album},on:{close:function(s){t.show_details_modal=!1}}})],2)],2)],1)},yi=[],bi={load:function(t){return S.library_albums()},set:function(t,s){t.albums=s.data,t.index_list=Object(Na["a"])(new Set(t.albums.items.filter(function(s){return!t.$store.state.hide_singles||s.track_count>2}).map(function(t){return t.name_sort.charAt(0).toUpperCase()})))}},vi={name:"PageAlbums",mixins:[Bs(bi)],components:{ContentWithHeading:ts["default"],TabsMusic:Ys,IndexButtonList:Ga,ListItemAlbum:Zs,ModalDialogAlbum:ya},data:function(){return{albums:{items:[]},index_list:[],show_details_modal:!1,selected_album:{}}},computed:{hide_singles:function(){return this.$store.state.hide_singles}},methods:{update_hide_singles:function(t){this.$store.commit(q,!this.hide_singles)},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}},watch:{hide_singles:function(){var t=this;this.index_list=Object(Na["a"])(new Set(this.albums.items.filter(function(s){return!t.$store.state.hide_singles||s.track_count>2}).map(function(t){return t.name_sort.charAt(0).toUpperCase()})))}}},gi=vi,ki=Object(M["a"])(gi,fi,yi,!1,null,null,null),Ci=ki.exports,wi=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("content-with-heading",[a("template",{slot:"heading-left"},[a("div",{staticClass:"title is-4"},[t._v(t._s(t.album.name))]),a("a",{staticClass:"title is-4 has-text-link has-text-weight-normal",on:{click:t.open_artist}},[t._v(t._s(t.album.artist))])]),a("template",{slot:"heading-right"},[a("div",{staticClass:"buttons is-centered"},[a("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_album_details_modal=!0}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),a("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-shuffle"})]),a("span",[t._v("Shuffle")])])])]),a("template",{slot:"content"},[a("p",{staticClass:"heading has-text-centered-mobile"},[t._v(t._s(t.album.track_count)+" tracks")]),t._l(t.tracks,function(s,i){return a("list-item-track",{key:s.id,attrs:{track:s},on:{click:function(s){return t.play_track(i)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("modal-dialog-track",{attrs:{show:t.show_details_modal,track:t.selected_track},on:{close:function(s){t.show_details_modal=!1}}}),a("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)},xi=[],$i={load:function(t){return Promise.all([S.library_album(t.params.album_id),S.library_album_tracks(t.params.album_id)])},set:function(t,s){t.album=s[0].data,t.tracks=s[1].data.items}},qi={name:"PageAlbum",mixins:[Bs($i)],components:{ContentWithHeading:ts["default"],ListItemTrack:la,ModalDialogTrack:ua,ModalDialogAlbum:ya},data:function(){return{album:{},tracks:[],show_details_modal:!1,selected_track:{},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(){S.player_play_uri(this.album.uri,!0)},play_track:function(t){S.player_play_uri(this.album.uri,!1,t)},open_dialog:function(t){this.selected_track=t,this.show_details_modal=!0}}},ji=qi,Pi=Object(M["a"])(ji,wi,xi,!1,null,null,null),Ai=Pi.exports,Si=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("tabs-music"),a("content-with-heading",[a("template",{slot:"options"},[a("index-button-list",{attrs:{index:t.index_list}})],1),a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Genres")]),a("p",{staticClass:"heading"},[t._v(t._s(t.genres.total)+" genres")])]),a("template",{slot:"content"},[t._l(t.genres.items,function(s){return a("list-item-genre",{key:s.name,attrs:{genre:s},on:{click:function(a){return t.open_genre(s)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("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)},Oi=[],Ti=(a("7f7f"),function(t,s){var a=s._c;return a("div",{staticClass:"media",attrs:{id:"index_"+s.props.genre.name.charAt(0).toUpperCase()}},[a("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:s.listeners.click}},[a("h1",{staticClass:"title is-6"},[s._v(s._s(s.props.genre.name))])]),a("div",{staticClass:"media-right"},[s._t("actions")],2)])}),Ei=[],Di={name:"ListItemGenre",props:["genre"]},Ii=Di,Mi=Object(M["a"])(Ii,Ti,Ei,!0,null,null,null),Li=Mi.exports,zi=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("p",{staticClass:"title is-4"},[a("a",{staticClass:"has-text-link",on:{click:t.open_genre}},[t._v(t._s(t.genre.name))])])]),a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-plus"})]),a("span",{staticClass:"is-size-7"},[t._v("Add")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-play"})]),a("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),a("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},Ni=[],Ri={name:"ModalDialogGenre",props:["show","genre"],methods:{play:function(){this.$emit("close"),S.player_play_expression('genre is "'+this.genre.name+'" and media_kind is music',!1)},queue_add:function(){this.$emit("close"),S.queue_expression_add('genre is "'+this.genre.name+'" and media_kind is music')},queue_add_next:function(){this.$emit("close"),S.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}})}}},Bi=Ri,Ui=Object(M["a"])(Bi,zi,Ni,!1,null,null,null),Hi=Ui.exports,Wi={load:function(t){return S.library_genres()},set:function(t,s){t.genres=s.data}},Gi={name:"PageGenres",mixins:[Bs(Wi)],components:{ContentWithHeading:ts["default"],TabsMusic:Ys,IndexButtonList:Ga,ListItemGenre:Li,ModalDialogGenre:Hi},data:function(){return{genres:{items:[]},show_details_modal:!1,selected_genre:{}}},computed:{index_list:function(){return Object(Na["a"])(new Set(this.genres.items.map(function(t){return 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}}},Fi=Gi,Yi=Object(M["a"])(Fi,Si,Oi,!1,null,null,null),Qi=Yi.exports,Vi=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("content-with-heading",[a("template",{slot:"options"},[a("index-button-list",{attrs:{index:t.index_list}})],1),a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v(t._s(t.name))])]),a("template",{slot:"heading-right"},[a("div",{staticClass:"buttons is-centered"},[a("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_genre_details_modal=!0}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),a("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-shuffle"})]),a("span",[t._v("Shuffle")])])])]),a("template",{slot:"content"},[a("p",{staticClass:"heading has-text-centered-mobile"},[t._v(t._s(t.genre_albums.total)+" albums | "),a("a",{staticClass:"has-text-link",on:{click:t.open_tracks}},[t._v("tracks")])]),t._l(t.genre_albums.items,function(s){return a("list-item-albums",{key:s.id,attrs:{album:s},on:{click:function(a){return t.open_album(s)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("modal-dialog-album",{attrs:{show:t.show_details_modal,album:t.selected_album},on:{close:function(s){t.show_details_modal=!1}}}),a("modal-dialog-genre",{attrs:{show:t.show_genre_details_modal,genre:{name:t.name}},on:{close:function(s){t.show_genre_details_modal=!1}}})],2)],2)],1)},Ji=[],Ki={load:function(t){return S.library_genre(t.params.genre)},set:function(t,s){t.name=t.$route.params.genre,t.genre_albums=s.data.albums}},Xi={name:"PageGenre",mixins:[Bs(Ki)],components:{ContentWithHeading:ts["default"],TabsMusic:Ys,IndexButtonList:Ga,ListItemAlbums:Zs,ModalDialogAlbum:ya,ModalDialogGenre:Hi},data:function(){return{name:"",genre_albums:{items:[]},show_details_modal:!1,selected_album:{},show_genre_details_modal:!1}},computed:{index_list:function(){return Object(Na["a"])(new Set(this.genre_albums.items.map(function(t){return 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(){S.player_play_expression('genre 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}}},Zi=Xi,te=Object(M["a"])(Zi,Vi,Ji,!1,null,null,null),se=te.exports,ae=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("content-with-heading",[a("template",{slot:"options"},[a("index-button-list",{attrs:{index:t.index_list}})],1),a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v(t._s(t.genre))])]),a("template",{slot:"heading-right"},[a("div",{staticClass:"buttons is-centered"},[a("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_genre_details_modal=!0}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),a("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-shuffle"})]),a("span",[t._v("Shuffle")])])])]),a("template",{slot:"content"},[a("p",{staticClass:"heading has-text-centered-mobile"},[a("a",{staticClass:"has-text-link",on:{click:t.open_genre}},[t._v("albums")]),t._v(" | "+t._s(t.tracks.total)+" tracks")]),t._l(t.tracks.items,function(s,i){return a("list-item-track",{key:s.id,attrs:{track:s},on:{click:function(s){return t.play_track(i)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("modal-dialog-track",{attrs:{show:t.show_details_modal,track:t.selected_track},on:{close:function(s){t.show_details_modal=!1}}}),a("modal-dialog-genre",{attrs:{show:t.show_genre_details_modal,genre:{name:t.genre}},on:{close:function(s){t.show_genre_details_modal=!1}}})],2)],2)],1)},ie=[],ee={load:function(t){return S.library_genre_tracks(t.params.genre)},set:function(t,s){t.genre=t.$route.params.genre,t.tracks=s.data.tracks}},le={name:"PageGenreTracks",mixins:[Bs(ee)],components:{ContentWithHeading:ts["default"],ListItemTrack:la,IndexButtonList:Ga,ModalDialogTrack:ua,ModalDialogGenre:Hi},data:function(){return{tracks:{items:[]},genre:"",show_details_modal:!1,selected_track:{},show_genre_details_modal:!1}},computed:{index_list:function(){return Object(Na["a"])(new Set(this.tracks.items.map(function(t){return t.title_sort.charAt(0).toUpperCase()})))}},methods:{open_genre:function(){this.show_details_modal=!1,this.$router.push({name:"Genre",params:{genre:this.genre}})},play:function(){S.player_play_expression('genre is "'+this.genre+'" and media_kind is music',!0)},play_track:function(t){S.player_play_expression('genre is "'+this.genre+'" and media_kind is music',!1,t)},open_dialog:function(t){this.selected_track=t,this.show_details_modal=!0}}},ne=le,oe=Object(M["a"])(ne,ae,ie,!1,null,null,null),re=oe.exports,ce=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("content-with-heading",[a("template",{slot:"options"},[a("index-button-list",{attrs:{index:t.index_list}})],1),a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v(t._s(t.artist.name))])]),a("template",{slot:"heading-right"},[a("div",{staticClass:"buttons is-centered"},[a("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_artist_details_modal=!0}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),a("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-shuffle"})]),a("span",[t._v("Shuffle")])])])]),a("template",{slot:"content"},[a("p",{staticClass:"heading has-text-centered-mobile"},[a("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")]),t._l(t.tracks.items,function(s,i){return a("list-item-track",{key:s.id,attrs:{track:s},on:{click:function(s){return t.play_track(i)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("modal-dialog-track",{attrs:{show:t.show_details_modal,track:t.selected_track},on:{close:function(s){t.show_details_modal=!1}}}),a("modal-dialog-artist",{attrs:{show:t.show_artist_details_modal,artist:t.artist},on:{close:function(s){t.show_artist_details_modal=!1}}})],2)],2)],1)},de=[],ue={load:function(t){return Promise.all([S.library_artist(t.params.artist_id),S.library_artist_tracks(t.params.artist_id)])},set:function(t,s){t.artist=s[0].data,t.tracks=s[1].data.tracks}},me={name:"PageArtistTracks",mixins:[Bs(ue)],components:{ContentWithHeading:ts["default"],ListItemTrack:la,IndexButtonList:Ga,ModalDialogTrack:ua,ModalDialogArtist:ii},data:function(){return{artist:{},tracks:{items:[]},show_details_modal:!1,selected_track:{},show_artist_details_modal:!1}},computed:{index_list:function(){return Object(Na["a"])(new Set(this.tracks.items.map(function(t){return t.title_sort.charAt(0).toUpperCase()})))}},methods:{open_artist:function(){this.show_details_modal=!1,this.$router.push({path:"/music/artists/"+this.artist.id})},play:function(){S.player_play_uri(this.tracks.items.map(function(t){return t.uri}).join(","),!0)},play_track:function(t){S.player_play_uri(this.tracks.items.map(function(t){return t.uri}).join(","),!1,t)},open_dialog:function(t){this.selected_track=t,this.show_details_modal=!0}}},_e=me,pe=Object(M["a"])(_e,ce,de,!1,null,null,null),he=pe.exports,fe=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[t.new_episodes.items.length>0?a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("New episodes")])]),a("template",{slot:"content"},[t._l(t.new_episodes.items,function(s){return a("list-item-track",{key:s.id,attrs:{track:s},on:{click:function(a){return t.play_track(s)}}},[a("template",{slot:"progress"},[a("range-slider",{staticClass:"track-progress",attrs:{min:"0",max:s.length_ms,step:"1",disabled:!0,value:s.seek_ms}})],1),a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_track_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("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(),a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Podcasts")]),a("p",{staticClass:"heading"},[t._v(t._s(t.albums.total)+" podcasts")])]),a("template",{slot:"content"},[t._l(t.albums.items,function(s){return a("list-item-album",{key:s.id,attrs:{album:s,media_kind:"podcast"},on:{click:function(a){return t.open_album(s)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_album_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("modal-dialog-album",{attrs:{show:t.show_album_details_modal,album:t.selected_album,media_kind:"podcast"},on:{close:function(s){t.show_album_details_modal=!1}}})],2)],2)],1)},ye=[],be={load:function(t){return Promise.all([S.library_podcasts(),S.library_podcasts_new_episodes()])},set:function(t,s){t.albums=s[0].data,t.new_episodes=s[1].data.tracks}},ve={name:"PagePodcasts",mixins:[Bs(be)],components:{ContentWithHeading:ts["default"],ListItemTrack:la,ListItemAlbum:Zs,ModalDialogTrack:ua,ModalDialogAlbum:ya,RangeSlider:U.a},data:function(){return{albums:{},new_episodes:{items:[]},show_album_details_modal:!1,selected_album:{},show_track_details_modal:!1,selected_track:{}}},methods:{open_album:function(t){this.$router.push({path:"/podcasts/"+t.id})},play_track:function(t){S.player_play_uri(t.uri,!1)},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},reload_new_episodes:function(){var t=this;S.library_podcasts_new_episodes().then(function(s){var a=s.data;t.new_episodes=a.tracks})}}},ge=ve,ke=Object(M["a"])(ge,fe,ye,!1,null,null,null),Ce=ke.exports,we=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("content-with-heading",[a("template",{slot:"heading-left"},[a("div",{staticClass:"title is-4"},[t._v(t._s(t.album.name))])]),a("template",{slot:"heading-right"},[a("div",{staticClass:"buttons is-centered"},[a("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_album_details_modal=!0}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),a("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),a("span",[t._v("Play")])])])]),a("template",{slot:"content"},[a("p",{staticClass:"heading has-text-centered-mobile"},[t._v(t._s(t.album.track_count)+" tracks")]),t._l(t.tracks,function(s){return a("list-item-track",{key:s.id,attrs:{track:s},on:{click:function(a){return t.play_track(s)}}},[a("template",{slot:"progress"},[a("range-slider",{staticClass:"track-progress",attrs:{min:"0",max:s.length_ms,step:"1",disabled:!0,value:s.seek_ms}})],1),a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("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}}),a("modal-dialog-album",{attrs:{show:t.show_album_details_modal,album:t.album,media_kind:"podcast"},on:{close:function(s){t.show_album_details_modal=!1}}})],2)],2)},xe=[],$e={load:function(t){return Promise.all([S.library_album(t.params.album_id),S.library_podcast_episodes(t.params.album_id)])},set:function(t,s){t.album=s[0].data,t.tracks=s[1].data.tracks.items}},qe={name:"PagePodcast",mixins:[Bs($e)],components:{ContentWithHeading:ts["default"],ListItemTrack:la,ModalDialogTrack:ua,RangeSlider:U.a,ModalDialogAlbum:ya},data:function(){return{album:{},tracks:[],show_details_modal:!1,selected_track:{},show_album_details_modal:!1}},methods:{play:function(){S.player_play_uri(this.album.uri,!1)},play_track:function(t){S.player_play_uri(t.uri,!1)},open_dialog:function(t){this.selected_track=t,this.show_details_modal=!0},reload_tracks:function(){var t=this;S.library_podcast_episodes(this.album.id).then(function(s){var a=s.data;t.tracks=a.tracks.items})}}},je=qe,Pe=Object(M["a"])(je,we,xe,!1,null,null,null),Ae=Pe.exports,Se=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Audiobooks")]),a("p",{staticClass:"heading"},[t._v(t._s(t.albums.total)+" audiobooks")])]),a("template",{slot:"content"},[t._l(t.albums.items,function(s){return a("list-item-album",{key:s.id,attrs:{album:s,media_kind:"audiobook"},on:{click:function(a){return t.open_album(s)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("modal-dialog-album",{attrs:{show:t.show_details_modal,album:t.selected_album,media_kind:"audiobook"},on:{close:function(s){t.show_details_modal=!1}}})],2)],2)],1)},Oe=[],Te={load:function(t){return S.library_audiobooks()},set:function(t,s){t.albums=s.data}},Ee={name:"PageAudiobooks",mixins:[Bs(Te)],components:{ContentWithHeading:ts["default"],ListItemAlbum:Zs,ModalDialogAlbum:ya},data:function(){return{albums:{},show_details_modal:!1,selected_album:{}}},methods:{open_album:function(t){this.$router.push({path:"/audiobooks/"+t.id})},open_dialog:function(t){this.selected_album=t,this.show_details_modal=!0}}},De=Ee,Ie=Object(M["a"])(De,Se,Oe,!1,null,null,null),Me=Ie.exports,Le=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("content-with-heading",[a("template",{slot:"heading-left"},[a("div",{staticClass:"title is-4"},[t._v(t._s(t.album.name))]),a("div",{staticClass:"title is-4 has-text-grey has-text-weight-normal"},[t._v(t._s(t.album.artist))])]),a("template",{slot:"heading-right"},[a("div",{staticClass:"buttons is-centered"},[a("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_album_details_modal=!0}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),a("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),a("span",[t._v("Play")])])])]),a("template",{slot:"content"},[a("p",{staticClass:"heading has-text-centered-mobile"},[t._v(t._s(t.album.track_count)+" tracks")]),t._l(t.tracks,function(s,i){return a("list-item-track",{key:s.id,attrs:{track:s},on:{click:function(s){return t.play_track(i)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("modal-dialog-track",{attrs:{show:t.show_details_modal,track:t.selected_track},on:{close:function(s){t.show_details_modal=!1}}}),a("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}}})],2)],2)},ze=[],Ne={load:function(t){return Promise.all([S.library_album(t.params.album_id),S.library_album_tracks(t.params.album_id)])},set:function(t,s){t.album=s[0].data,t.tracks=s[1].data.items}},Re={name:"PageAudiobook",mixins:[Bs(Ne)],components:{ContentWithHeading:ts["default"],ListItemTrack:la,ModalDialogTrack:ua,ModalDialogAlbum:ya},data:function(){return{album:{},tracks:[],show_details_modal:!1,selected_track:{},show_album_details_modal:!1}},methods:{play:function(){S.player_play_uri(this.album.uri,!1)},play_track:function(t){S.player_play_uri(this.album.uri,!1,t)},open_dialog:function(t){this.selected_track=t,this.show_details_modal=!0}}},Be=Re,Ue=Object(M["a"])(Be,Le,ze,!1,null,null,null),He=Ue.exports,We=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Playlists")]),a("p",{staticClass:"heading"},[t._v(t._s(t.playlists.total)+" playlists")])]),a("template",{slot:"content"},[t._l(t.playlists.items,function(s){return a("list-item-playlist",{key:s.id,attrs:{playlist:s},on:{click:function(a){return t.open_playlist(s)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("modal-dialog-playlist",{attrs:{show:t.show_details_modal,playlist:t.selected_playlist},on:{close:function(s){t.show_details_modal=!1}}})],2)],2)},Ge=[],Fe=function(t,s){var a=s._c;return a("div",{staticClass:"media"},[s.slots().icon?a("figure",{staticClass:"media-left fd-has-action",on:{click:s.listeners.click}},[s._t("icon")],2):s._e(),a("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:s.listeners.click}},[a("h1",{staticClass:"title is-6"},[s._v(s._s(s.props.playlist.name))])]),a("div",{staticClass:"media-right"},[s._t("actions")],2)])},Ye=[],Qe={name:"ListItemPlaylist",props:["playlist"]},Ve=Qe,Je=Object(M["a"])(Ve,Fe,Ye,!0,null,null,null),Ke=Je.exports,Xe=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("p",{staticClass:"title is-4"},[a("a",{staticClass:"has-text-link",on:{click:t.open_playlist}},[t._v(t._s(t.playlist.name))])]),a("div",{staticClass:"content is-small"},[a("p",[a("span",{staticClass:"heading"},[t._v("Path")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.playlist.path))])])])]),a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-plus"})]),a("span",{staticClass:"is-size-7"},[t._v("Add")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-play"})]),a("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),a("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},Ze=[],tl={name:"ModalDialogPlaylist",props:["show","playlist"],methods:{play:function(){this.$emit("close"),S.player_play_uri(this.playlist.uri,!1)},queue_add:function(){this.$emit("close"),S.queue_add(this.playlist.uri)},queue_add_next:function(){this.$emit("close"),S.queue_add_next(this.playlist.uri)},open_playlist:function(){this.$emit("close"),this.$router.push({path:"/playlists/"+this.playlist.id})}}},sl=tl,al=Object(M["a"])(sl,Xe,Ze,!1,null,null,null),il=al.exports,el={load:function(t){return S.library_playlists()},set:function(t,s){t.playlists=s.data}},ll={name:"PagePlaylists",mixins:[Bs(el)],components:{ContentWithHeading:ts["default"],TabsMusic:Ys,ListItemPlaylist:Ke,ModalDialogPlaylist:il},data:function(){return{playlists:{},show_details_modal:!1,selected_playlist:{}}},methods:{open_playlist:function(t){this.$router.push({path:"/playlists/"+t.id})},open_dialog:function(t){this.selected_playlist=t,this.show_details_modal=!0}}},nl=ll,ol=Object(M["a"])(nl,We,Ge,!1,null,null,null),rl=ol.exports,cl=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("content-with-heading",[a("template",{slot:"heading-left"},[a("div",{staticClass:"title is-4"},[t._v(t._s(t.playlist.name))])]),a("template",{slot:"heading-right"},[a("div",{staticClass:"buttons is-centered"},[a("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_playlist_details_modal=!0}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),a("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-shuffle"})]),a("span",[t._v("Shuffle")])])])]),a("template",{slot:"content"},[a("p",{staticClass:"heading has-text-centered-mobile"},[t._v(t._s(t.tracks.length)+" tracks")]),t._l(t.tracks,function(s,i){return a("list-item-track",{key:s.id,attrs:{track:s},on:{click:function(s){return t.play_track(i)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("modal-dialog-track",{attrs:{show:t.show_details_modal,track:t.selected_track},on:{close:function(s){t.show_details_modal=!1}}}),a("modal-dialog-playlist",{attrs:{show:t.show_playlist_details_modal,playlist:t.playlist},on:{close:function(s){t.show_playlist_details_modal=!1}}})],2)],2)},dl=[],ul={load:function(t){return Promise.all([S.library_playlist(t.params.playlist_id),S.library_playlist_tracks(t.params.playlist_id)])},set:function(t,s){t.playlist=s[0].data,t.tracks=s[1].data.items}},ml={name:"PagePlaylist",mixins:[Bs(ul)],components:{ContentWithHeading:ts["default"],ListItemTrack:la,ModalDialogTrack:ua,ModalDialogPlaylist:il},data:function(){return{playlist:{},tracks:[],show_details_modal:!1,selected_track:{},show_playlist_details_modal:!1}},methods:{play:function(){S.player_play_uri(this.playlist.uri,!0)},play_track:function(t){S.player_play_uri(this.playlist.uri,!1,t)},open_dialog:function(t){this.selected_track=t,this.show_details_modal=!0}}},_l=ml,pl=Object(M["a"])(_l,cl,dl,!1,null,null,null),hl=pl.exports,fl=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Files")]),a("p",{staticClass:"title is-7 has-text-grey"},[t._v(t._s(t.current_directory))])]),a("template",{slot:"heading-right"},[a("div",{staticClass:"buttons is-centered"},[a("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){return t.open_directory_dialog({path:t.current_directory})}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),a("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),a("span",[t._v("Play")])])])]),a("template",{slot:"content"},[t.$route.query.directory?a("div",{staticClass:"media",on:{click:function(s){return t.open_parent_directory()}}},[a("figure",{staticClass:"media-left fd-has-action"},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-subdirectory-arrow-left"})])]),a("div",{staticClass:"media-content fd-has-action is-clipped"},[a("h1",{staticClass:"title is-6"},[t._v("..")])]),a("div",{staticClass:"media-right"},[t._t("actions")],2)]):t._e(),t._l(t.files.directories,function(s){return a("list-item-directory",{key:s.path,attrs:{directory:s},on:{click:function(a){return t.open_directory(s)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_directory_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),t._l(t.files.playlists.items,function(s){return a("list-item-playlist",{key:s.id,attrs:{playlist:s},on:{click:function(a){return t.open_playlist(s)}}},[a("template",{slot:"icon"},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-library-music"})])]),a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_playlist_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),t._l(t.files.tracks.items,function(s,i){return a("list-item-track",{key:s.id,attrs:{track:s},on:{click:function(s){return t.play_track(i)}}},[a("template",{slot:"icon"},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-file-outline"})])]),a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_track_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("modal-dialog-directory",{attrs:{show:t.show_directory_details_modal,directory:t.selected_directory},on:{close:function(s){t.show_directory_details_modal=!1}}}),a("modal-dialog-playlist",{attrs:{show:t.show_playlist_details_modal,playlist:t.selected_playlist},on:{close:function(s){t.show_playlist_details_modal=!1}}}),a("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)},yl=[],bl=function(t,s){var a=s._c;return a("div",{staticClass:"media"},[a("figure",{staticClass:"media-left fd-has-action",on:{click:s.listeners.click}},[s._m(0)]),a("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:s.listeners.click}},[a("h1",{staticClass:"title is-6"},[s._v(s._s(s.props.directory.path.substring(s.props.directory.path.lastIndexOf("/")+1)))]),a("h2",{staticClass:"subtitle is-7 has-text-grey-light"},[s._v(s._s(s.props.directory.path))])]),a("div",{staticClass:"media-right"},[s._t("actions")],2)])},vl=[function(t,s){var a=s._c;return a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-folder"})])}],gl={name:"ListItemDirectory",props:["directory"]},kl=gl,Cl=Object(M["a"])(kl,bl,vl,!0,null,null,null),wl=Cl.exports,xl=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("p",{staticClass:"title is-4"},[t._v("\n "+t._s(t.directory.path)+"\n ")])]),a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-plus"})]),a("span",{staticClass:"is-size-7"},[t._v("Add")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-play"})]),a("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),a("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},$l=[],ql={name:"ModalDialogDirectory",props:["show","directory"],methods:{play:function(){this.$emit("close"),S.player_play_expression('path starts with "'+this.directory.path+'" order by path asc',!1)},queue_add:function(){this.$emit("close"),S.queue_expression_add('path starts with "'+this.directory.path+'" order by path asc')},queue_add_next:function(){this.$emit("close"),S.queue_expression_add_next('path starts with "'+this.directory.path+'" order by path asc')}}},jl=ql,Pl=Object(M["a"])(jl,xl,$l,!1,null,null,null),Al=Pl.exports,Sl={load:function(t){return t.query.directory?S.library_files(t.query.directory):Promise.resolve()},set:function(t,s){t.files=s?s.data:{directories:t.$store.state.config.directories.map(function(t){return{path:t}}),tracks:{items:[]},playlists:{items:[]}}}},Ol={name:"PageFiles",mixins:[Bs(Sl)],components:{ContentWithHeading:ts["default"],ListItemDirectory:wl,ListItemPlaylist:Ke,ListItemTrack:la,ModalDialogDirectory:Al,ModalDialogPlaylist:il,ModalDialogTrack:ua},data:function(){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:function(){return this.$route.query&&this.$route.query.directory?this.$route.query.directory:"/"}},methods:{open_parent_directory:function(){var 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(){S.player_play_expression('path starts with "'+this.current_directory+'" order by path asc',!1)},play_track:function(t){S.player_play_uri(this.files.tracks.items.map(function(t){return 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})},open_playlist_dialog:function(t){this.selected_playlist=t,this.show_playlist_details_modal=!0}}},Tl=Ol,El=Object(M["a"])(Tl,fl,yl,!1,null,null,null),Dl=El.exports,Il=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("section",{staticClass:"section fd-remove-padding-bottom"},[a("div",{staticClass:"container"},[a("div",{staticClass:"columns is-centered"},[a("div",{staticClass:"column is-four-fifths"},[a("form",{on:{submit:function(s){return s.preventDefault(),t.new_search(s)}}},[a("div",{staticClass:"field"},[a("p",{staticClass:"control is-expanded has-icons-left"},[a("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"},domProps:{value:t.search_query},on:{input:function(s){s.target.composing||(t.search_query=s.target.value)}}}),t._m(0)])])]),a("div",{staticClass:"tags",staticStyle:{"margin-top":"16px"}},t._l(t.recent_searches,function(s){return a("a",{key:s,staticClass:"tag",on:{click:function(a){return t.open_recent_search(s)}}},[t._v(t._s(s))])}),0)])])])]),a("tabs-search"),t.show_tracks?a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Tracks")])]),a("template",{slot:"content"},[t._l(t.tracks.items,function(s){return a("list-item-track",{key:s.id,attrs:{track:s},on:{click:function(a){return t.play_track(s)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_track_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("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),a("template",{slot:"footer"},[t.show_all_tracks_button?a("nav",{staticClass:"level"},[a("p",{staticClass:"level-item"},[a("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_tracks}},[t._v("Show all "+t._s(t.tracks.total)+" tracks")])])]):t._e(),t.tracks.total?t._e():a("p",[t._v("No results")])])],2):t._e(),t.show_artists?a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Artists")])]),a("template",{slot:"content"},[t._l(t.artists.items,function(s){return a("list-item-artist",{key:s.id,attrs:{artist:s},on:{click:function(a){return t.open_artist(s)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_artist_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("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),a("template",{slot:"footer"},[t.show_all_artists_button?a("nav",{staticClass:"level"},[a("p",{staticClass:"level-item"},[a("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_artists}},[t._v("Show all "+t._s(t.artists.total)+" artists")])])]):t._e(),t.artists.total?t._e():a("p",[t._v("No results")])])],2):t._e(),t.show_albums?a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Albums")])]),a("template",{slot:"content"},[t._l(t.albums.items,function(s){return a("list-item-album",{key:s.id,attrs:{album:s},on:{click:function(a){return t.open_album(s)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_album_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("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),a("template",{slot:"footer"},[t.show_all_albums_button?a("nav",{staticClass:"level"},[a("p",{staticClass:"level-item"},[a("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_albums}},[t._v("Show all "+t._s(t.albums.total)+" albums")])])]):t._e(),t.albums.total?t._e():a("p",[t._v("No results")])])],2):t._e(),t.show_playlists?a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Playlists")])]),a("template",{slot:"content"},[t._l(t.playlists.items,function(s){return a("list-item-playlist",{key:s.id,attrs:{playlist:s},on:{click:function(a){return t.open_playlist(s)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_playlist_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("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),a("template",{slot:"footer"},[t.show_all_playlists_button?a("nav",{staticClass:"level"},[a("p",{staticClass:"level-item"},[a("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_playlists}},[t._v("Show all "+t._s(t.playlists.total)+" playlists")])])]):t._e(),t.playlists.total?t._e():a("p",[t._v("No results")])])],2):t._e()],1)},Ml=[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("span",{staticClass:"icon is-left"},[a("i",{staticClass:"mdi mdi-magnify"})])}],Ll=function(){var t=this,s=t.$createElement,a=t._self._c||s;return t.spotify_enabled?a("section",{staticClass:"section fd-remove-padding-bottom"},[a("div",{staticClass:"container"},[a("div",{staticClass:"columns is-centered"},[a("div",{staticClass:"column is-four-fifths"},[a("div",{staticClass:"tabs is-centered is-small is-toggle is-toggle-rounded"},[a("ul",[a("router-link",{attrs:{tag:"li",to:{path:"/search/library",query:t.$route.query},"active-class":"is-active"}},[a("a",[a("span",{staticClass:"icon is-small"},[a("i",{staticClass:"mdi mdi-library-books"})]),a("span",{},[t._v("Library")])])]),a("router-link",{attrs:{tag:"li",to:{path:"/search/spotify",query:t.$route.query},"active-class":"is-active"}},[a("a",[a("span",{staticClass:"icon is-small"},[a("i",{staticClass:"mdi mdi-spotify"})]),a("span",{},[t._v("Spotify")])])])],1)])])])])]):t._e()},zl=[],Nl={name:"TabsSearch",computed:{spotify_enabled:function(){return this.$store.state.spotify.webapi_token_valid}}},Rl=Nl,Bl=Object(M["a"])(Rl,Ll,zl,!1,null,null,null),Ul=Bl.exports,Hl={name:"PageSearch",components:{ContentWithHeading:ts["default"],TabsSearch:Ul,ListItemTrack:la,ListItemArtist:Ka,ListItemAlbum:Zs,ListItemPlaylist:Ke,ModalDialogTrack:ua,ModalDialogAlbum:ya,ModalDialogArtist:ii,ModalDialogPlaylist:il},data:function(){return{search_query:"",tracks:{items:[],total:0},artists:{items:[],total:0},albums:{items:[],total:0},playlists:{items:[],total:0},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:{}}},computed:{recent_searches:function(){return this.$store.state.recent_searches},show_tracks:function(){return this.$route.query.type&&this.$route.query.type.includes("track")},show_all_tracks_button:function(){return this.tracks.total>this.tracks.items.length},show_artists:function(){return this.$route.query.type&&this.$route.query.type.includes("artist")},show_all_artists_button:function(){return this.artists.total>this.artists.items.length},show_albums:function(){return this.$route.query.type&&this.$route.query.type.includes("album")},show_all_albums_button:function(){return this.albums.total>this.albums.items.length},show_playlists:function(){return this.$route.query.type&&this.$route.query.type.includes("playlist")},show_all_playlists_button:function(){return this.playlists.total>this.playlists.items.length}},methods:{search:function(t){var s=this;if(!t.query.query||""===t.query.query)return this.search_query="",void this.$refs.search_field.focus();var a={type:t.query.type,query:t.query.query,media_kind:"music"};t.query.limit&&(a.limit=t.query.limit,a.offset=t.query.offset),S.search(a).then(function(t){var i=t.data;s.tracks=i.tracks?i.tracks:{items:[],total:0},s.artists=i.artists?i.artists:{items:[],total:0},s.albums=i.albums?i.albums:{items:[],total:0},s.playlists=i.playlists?i.playlists:{items:[],total:0},s.$store.commit($,a.query)})},new_search:function(){this.search_query&&(this.$router.push({path:"/search/library",query:{type:"track,artist,album,playlist",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_playlists:function(){this.$router.push({path:"/search/library",query:{type:"playlist",query:this.$route.query.query}})},play_track:function(t){S.player_play_uri(t.uri,!1)},open_artist:function(t){this.$router.push({path:"/music/artists/"+t.id})},open_album:function(t){this.$router.push({path:"/music/albums/"+t.id})},open_playlist:function(t){this.$router.push({path:"/playlists/"+t.id})},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}},mounted:function(){this.search(this.$route)},watch:{$route:function(t,s){this.search(t)}}},Wl=Hl,Gl=Object(M["a"])(Wl,Il,Ml,!1,null,null,null),Fl=Gl.exports,Yl=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("section",{staticClass:"section"},[a("div",{staticClass:"container"},[a("div",{staticClass:"columns is-centered"},[a("div",{staticClass:"column is-four-fifths has-text-centered-mobile"},[a("p",{staticClass:"heading"},[a("b",[t._v("forked-daapd")]),t._v(" - version "+t._s(t.config.version))]),a("h1",{staticClass:"title is-4"},[t._v(t._s(t.config.library_name))])])])])]),a("section",{staticClass:"section"},[a("div",{staticClass:"container"},[a("div",{staticClass:"columns is-centered"},[a("div",{staticClass:"column is-four-fifths"},[a("div",{staticClass:"content"},[a("nav",{staticClass:"level is-mobile"},[t._m(0),a("div",{staticClass:"level-right buttons"},[a("a",{staticClass:"button is-small is-outlined is-link",class:{"is-loading":t.library.updating},on:{click:t.update}},[t._v("Update")]),a("a",{staticClass:"button is-small is-outlined is-link",class:{"is-loading":t.library.updating},on:{click:t.update_meta}},[t._v("Force Meta Rescan")])])]),a("table",{staticClass:"table"},[a("tbody",[a("tr",[a("th",[t._v("Artists")]),a("td",{staticClass:"has-text-right"},[t._v(t._s(t._f("number")(t.library.artists)))])]),a("tr",[a("th",[t._v("Albums")]),a("td",{staticClass:"has-text-right"},[t._v(t._s(t._f("number")(t.library.albums)))])]),a("tr",[a("th",[t._v("Tracks")]),a("td",{staticClass:"has-text-right"},[t._v(t._s(t._f("number")(t.library.songs)))])]),a("tr",[a("th",[t._v("Total playtime")]),a("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]")))])]),a("tr",[a("th",[t._v("Library updated")]),a("td",{staticClass:"has-text-right"},[t._v(t._s(t._f("timeFromNow")(t.library.updated_at))+" "),a("span",{staticClass:"has-text-grey"},[t._v("("+t._s(t._f("time")(t.library.updated_at,"MMM Do, h:mm"))+")")])])]),a("tr",[a("th",[t._v("Uptime")]),a("td",{staticClass:"has-text-right"},[t._v(t._s(t._f("timeFromNow")(t.library.started_at,!0))+" "),a("span",{staticClass:"has-text-grey"},[t._v("("+t._s(t._f("time")(t.library.started_at,"MMM Do, h:mm"))+")")])])])])])])])])])]),a("section",{staticClass:"section"},[a("div",{staticClass:"container"},[a("div",{staticClass:"columns is-centered"},[a("div",{staticClass:"column is-four-fifths"},[a("div",{staticClass:"content has-text-centered-mobile"},[a("p",{staticClass:"is-size-7"},[t._v("Compiled with support for "+t._s(t._f("join")(t.config.buildoptions))+".")]),t._m(1)])])])])])])},Ql=[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"level-left"},[a("div",{staticClass:"level-item"},[a("h2",{staticClass:"title is-5"},[t._v("Library")])])])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("p",{staticClass:"is-size-7"},[t._v("Web interface built with "),a("a",{attrs:{href:"http://bulma.io"}},[t._v("Bulma")]),t._v(", "),a("a",{attrs:{href:"https://materialdesignicons.com/"}},[t._v("Material Design Icons")]),t._v(", "),a("a",{attrs:{href:"https://vuejs.org/"}},[t._v("Vue.js")]),t._v(", "),a("a",{attrs:{href:"https://github.com/mzabriskie/axios"}},[t._v("axios")]),t._v(" and "),a("a",{attrs:{href:"https://github.com/ejurgensen/forked-daapd/network/dependencies"}},[t._v("more")]),t._v(".")])}],Vl={name:"PageAbout",computed:{config:function(){return this.$store.state.config},library:function(){return this.$store.state.library}},methods:{update:function(){S.library_update()},update_meta:function(){S.library_rescan()}},filters:{join:function(t){return t.join(", ")}}},Jl=Vl,Kl=Object(M["a"])(Jl,Yl,Ql,!1,null,null,null),Xl=Kl.exports,Zl=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("tabs-music"),a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("New Releases")])]),a("template",{slot:"content"},[t._l(t.new_releases,function(s){return a("spotify-list-item-album",{key:s.id,attrs:{album:s}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_album_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("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),a("template",{slot:"footer"},[a("nav",{staticClass:"level"},[a("p",{staticClass:"level-item"},[a("router-link",{staticClass:"button is-light is-small is-rounded",attrs:{to:"/music/spotify/new-releases"}},[t._v("\n Show more\n ")])],1)])])],2),a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Featured Playlists")])]),a("template",{slot:"content"},[t._l(t.featured_playlists,function(s){return a("spotify-list-item-playlist",{key:s.id,attrs:{playlist:s}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_playlist_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("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),a("template",{slot:"footer"},[a("nav",{staticClass:"level"},[a("p",{staticClass:"level-item"},[a("router-link",{staticClass:"button is-light is-small is-rounded",attrs:{to:"/music/spotify/featured-playlists"}},[t._v("\n Show more\n ")])],1)])])],2)],1)},tn=[],sn=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"media"},[a("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:t.open_album}},[a("h1",{staticClass:"title is-6"},[t._v(t._s(t.album.name))]),a("h2",{staticClass:"subtitle is-7 has-text-grey"},[a("b",[t._v(t._s(t.album.artists[0].name))])])]),a("div",{staticClass:"media-right"},[t._t("actions")],2)])},an=[],en={name:"SpotifyListItemAlbum",props:["album"],methods:{open_album:function(){this.$router.push({path:"/music/spotify/albums/"+this.album.id})}}},ln=en,nn=Object(M["a"])(ln,sn,an,!1,null,null,null),on=nn.exports,rn=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"media"},[a("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:t.open_playlist}},[a("h1",{staticClass:"title is-6"},[t._v(t._s(t.playlist.name))]),a("h2",{staticClass:"subtitle is-7"},[t._v(t._s(t.playlist.owner.display_name))])]),a("div",{staticClass:"media-right"},[t._t("actions")],2)])},cn=[],dn={name:"SpotifyListItemPlaylist",props:["playlist"],methods:{open_playlist:function(){this.$router.push({path:"/music/spotify/playlists/"+this.playlist.id})}}},un=dn,mn=Object(M["a"])(un,rn,cn,!1,null,null,null),_n=mn.exports,pn=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("figure",{directives:[{name:"show",rawName:"v-show",value:t.artwork_visible,expression:"artwork_visible"}],staticClass:"image is-square fd-has-margin-bottom"},[a("img",{staticClass:"fd-has-shadow",attrs:{src:t.artwork_url},on:{load:t.artwork_loaded,error:t.artwork_error}})]),a("p",{staticClass:"title is-4"},[a("a",{staticClass:"has-text-link",on:{click:t.open_album}},[t._v(t._s(t.album.name))])]),a("div",{staticClass:"content is-small"},[a("p",[a("span",{staticClass:"heading"},[t._v("Album artist")]),a("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_artist}},[t._v(t._s(t.album.artists[0].name))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Release date")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.album.release_date))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Type")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.album.album_type))])])])]),a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-plus"})]),a("span",{staticClass:"is-size-7"},[t._v("Add")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-play"})]),a("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),a("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},hn=[],fn={name:"SpotifyModalDialogAlbum",props:["show","album"],data:function(){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"),S.player_play_uri(this.album.uri,!1)},queue_add:function(){this.$emit("close"),S.queue_add(this.album.uri)},queue_add_next:function(){this.$emit("close"),S.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}}},yn=fn,bn=Object(M["a"])(yn,pn,hn,!1,null,null,null),vn=bn.exports,gn=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("p",{staticClass:"title is-4"},[a("a",{staticClass:"has-text-link",on:{click:t.open_playlist}},[t._v(t._s(t.playlist.name))])]),a("div",{staticClass:"content is-small"},[a("p",[a("span",{staticClass:"heading"},[t._v("Owner")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.playlist.owner.display_name))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Tracks")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.playlist.tracks.total))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Path")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.playlist.uri))])])])]),a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-plus"})]),a("span",{staticClass:"is-size-7"},[t._v("Add")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-play"})]),a("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),a("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},kn=[],Cn={name:"SpotifyModalDialogPlaylist",props:["show","playlist"],methods:{play:function(){this.$emit("close"),S.player_play_uri(this.playlist.uri,!1)},queue_add:function(){this.$emit("close"),S.queue_add(this.playlist.uri)},queue_add_next:function(){this.$emit("close"),S.queue_add_next(this.playlist.uri)},open_playlist:function(){this.$router.push({path:"/music/spotify/playlists/"+this.playlist.id})}}},wn=Cn,xn=Object(M["a"])(wn,gn,kn,!1,null,null,null),$n=xn.exports,qn={load:function(t){if(A.state.spotify_new_releases.length>0&&A.state.spotify_featured_playlists.length>0)return Promise.resolve();var s=new ds.a;return s.setAccessToken(A.state.spotify.webapi_token),Promise.all([s.getNewReleases({country:A.state.spotify.webapi_country,limit:50}),s.getFeaturedPlaylists({country:A.state.spotify.webapi_country,limit:50})])},set:function(t,s){s&&(A.commit(k,s[0].albums.items),A.commit(C,s[1].playlists.items))}},jn={name:"SpotifyPageBrowse",mixins:[Bs(qn)],components:{ContentWithHeading:ts["default"],TabsMusic:Ys,SpotifyListItemAlbum:on,SpotifyListItemPlaylist:_n,SpotifyModalDialogAlbum:vn,SpotifyModalDialogPlaylist:$n},data:function(){return{show_album_details_modal:!1,selected_album:{},show_playlist_details_modal:!1,selected_playlist:{}}},computed:{new_releases:function(){return this.$store.state.spotify_new_releases.slice(0,3)},featured_playlists:function(){return this.$store.state.spotify_featured_playlists.slice(0,3)}},methods:{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}}},Pn=jn,An=Object(M["a"])(Pn,Zl,tn,!1,null,null,null),Sn=An.exports,On=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("tabs-music"),a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("New Releases")])]),a("template",{slot:"content"},[t._l(t.new_releases,function(s){return a("spotify-list-item-album",{key:s.id,attrs:{album:s}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_album(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("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)},Tn=[],En={load:function(t){if(A.state.spotify_new_releases.length>0)return Promise.resolve();var s=new ds.a;return s.setAccessToken(A.state.spotify.webapi_token),s.getNewReleases({country:A.state.spotify.webapi_country,limit:50})},set:function(t,s){s&&A.commit(k,s.albums.items)}},Dn={name:"SpotifyPageBrowseNewReleases",mixins:[Bs(En)],components:{ContentWithHeading:ts["default"],TabsMusic:Ys,SpotifyListItemAlbum:on,SpotifyModalDialogAlbum:vn},data:function(){return{show_album_details_modal:!1,selected_album:{}}},computed:{new_releases:function(){return this.$store.state.spotify_new_releases}},methods:{open_album:function(t){this.selected_album=t,this.show_album_details_modal=!0}}},In=Dn,Mn=Object(M["a"])(In,On,Tn,!1,null,null,null),Ln=Mn.exports,zn=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("tabs-music"),a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Featured Playlists")])]),a("template",{slot:"content"},[t._l(t.featured_playlists,function(s){return a("spotify-list-item-playlist",{key:s.id,attrs:{playlist:s}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_playlist_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("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)},Nn=[],Rn={load:function(t){if(A.state.spotify_featured_playlists.length>0)return Promise.resolve();var s=new ds.a;s.setAccessToken(A.state.spotify.webapi_token),s.getFeaturedPlaylists({country:A.state.spotify.webapi_country,limit:50})},set:function(t,s){s&&A.commit(C,s.playlists.items)}},Bn={name:"SpotifyPageBrowseFeaturedPlaylists",mixins:[Bs(Rn)],components:{ContentWithHeading:ts["default"],TabsMusic:Ys,SpotifyListItemPlaylist:_n,SpotifyModalDialogPlaylist:$n},data:function(){return{show_playlist_details_modal:!1,selected_playlist:{}}},computed:{featured_playlists:function(){return this.$store.state.spotify_featured_playlists}},methods:{open_playlist_dialog:function(t){this.selected_playlist=t,this.show_playlist_details_modal=!0}}},Un=Bn,Hn=Object(M["a"])(Un,zn,Nn,!1,null,null,null),Wn=Hn.exports,Gn=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v(t._s(t.artist.name))])]),a("template",{slot:"heading-right"},[a("div",{staticClass:"buttons is-centered"},[a("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_artist_details_modal=!0}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),a("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-shuffle"})]),a("span",[t._v("Shuffle")])])])]),a("template",{slot:"content"},[a("p",{staticClass:"heading has-text-centered-mobile"},[t._v(t._s(t.total)+" albums")]),t._l(t.albums,function(s){return a("spotify-list-item-album",{key:s.id,attrs:{album:s}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),t.offset<t.total?a("infinite-loading",{on:{infinite:t.load_next}},[a("span",{attrs:{slot:"no-more"},slot:"no-more"},[t._v(".")])]):t._e(),a("spotify-modal-dialog-album",{attrs:{show:t.show_details_modal,album:t.selected_album},on:{close:function(s){t.show_details_modal=!1}}}),a("spotify-modal-dialog-artist",{attrs:{show:t.show_artist_details_modal,artist:t.artist},on:{close:function(s){t.show_artist_details_modal=!1}}})],2)],2)},Fn=[],Yn=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("p",{staticClass:"title is-4"},[a("a",{staticClass:"has-text-link",on:{click:t.open_artist}},[t._v(t._s(t.artist.name))])]),a("div",{staticClass:"content is-small"},[a("p",[a("span",{staticClass:"heading"},[t._v("Popularity / Followers")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.artist.popularity)+" / "+t._s(t.artist.followers.total))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Genres")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.artist.genres.join(", ")))])])])]),a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-plus"})]),a("span",{staticClass:"is-size-7"},[t._v("Add")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-play"})]),a("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),a("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},Qn=[],Vn={name:"SpotifyModalDialogArtist",props:["show","artist"],methods:{play:function(){this.$emit("close"),S.player_play_uri(this.artist.uri,!1)},queue_add:function(){this.$emit("close"),S.queue_add(this.artist.uri)},queue_add_next:function(){this.$emit("close"),S.queue_add_next(this.artist.uri)},open_artist:function(){this.$router.push({path:"/music/spotify/artists/"+this.artist.id})}}},Jn=Vn,Kn=Object(M["a"])(Jn,Yn,Qn,!1,null,null,null),Xn=Kn.exports,Zn=a("e166"),to=a.n(Zn),so={load:function(t){var s=new ds.a;return s.setAccessToken(A.state.spotify.webapi_token),Promise.all([s.getArtist(t.params.artist_id),s.getArtistAlbums(t.params.artist_id,{limit:50,offset:0,include_groups:"album,single"})])},set:function(t,s){t.artist=s[0],t.albums=[],t.total=0,t.offset=0,t.append_albums(s[1])}},ao={name:"SpotifyPageArtist",mixins:[Bs(so)],components:{ContentWithHeading:ts["default"],SpotifyListItemAlbum:on,SpotifyModalDialogAlbum:vn,SpotifyModalDialogArtist:Xn,InfiniteLoading:to.a},data:function(){return{artist:{},albums:[],total:0,offset:0,show_details_modal:!1,selected_album:{},show_artist_details_modal:!1}},methods:{load_next:function(t){var s=this,a=new ds.a;a.setAccessToken(this.$store.state.spotify.webapi_token),a.getArtistAlbums(this.artist.id,{limit:50,offset:this.offset,include_groups:"album,single"}).then(function(a){s.append_albums(a,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,S.player_play_uri(this.artist.uri,!0)},open_dialog:function(t){this.selected_album=t,this.show_details_modal=!0}}},io=ao,eo=Object(M["a"])(io,Gn,Fn,!1,null,null,null),lo=eo.exports,no=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("content-with-heading",[a("template",{slot:"heading-left"},[a("div",{staticClass:"title is-4"},[t._v(t._s(t.album.name))]),a("a",{staticClass:"title is-4 has-text-link has-text-weight-normal",on:{click:t.open_artist}},[t._v(t._s(t.album.artists[0].name))])]),a("template",{slot:"heading-right"},[a("div",{staticClass:"buttons is-centered"},[a("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_album_details_modal=!0}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),a("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-shuffle"})]),a("span",[t._v("Shuffle")])])])]),a("template",{slot:"content"},[a("p",{staticClass:"heading has-text-centered-mobile"},[t._v(t._s(t.album.tracks.total)+" tracks")]),t._l(t.album.tracks.items,function(s,i){return a("spotify-list-item-track",{key:s.id,attrs:{track:s,position:i,album:t.album,context_uri:t.album.uri}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_track_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),a("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}}}),a("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)},oo=[],ro=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"media"},[a("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:t.play}},[a("h1",{staticClass:"title is-6"},[t._v(t._s(t.track.name))]),a("h2",{staticClass:"subtitle is-7 has-text-grey"},[a("b",[t._v(t._s(t.track.artists[0].name))])])]),a("div",{staticClass:"media-right"},[t._t("actions")],2)])},co=[],uo={name:"SpotifyListItemTrack",props:["track","position","album","context_uri"],methods:{play:function(){S.player_play_uri(this.context_uri,!1,this.position)}}},mo=uo,_o=Object(M["a"])(mo,ro,co,!1,null,null,null),po=_o.exports,ho=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("p",{staticClass:"title is-4"},[t._v("\n "+t._s(t.track.name)+"\n ")]),a("p",{staticClass:"subtitle"},[t._v("\n "+t._s(t.track.artists[0].name)+"\n ")]),a("div",{staticClass:"content is-small"},[a("p",[a("span",{staticClass:"heading"},[t._v("Album")]),a("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_album}},[t._v(t._s(t.album.name))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Album artist")]),a("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_artist}},[t._v(t._s(t.album.artists[0].name))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Release date")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.album.release_date))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Track / Disc")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.track.track_number)+" / "+t._s(t.track.disc_number))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Length")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t._f("duration")(t.track.duration_ms)))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Path")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.track.uri))])])])]),a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-plus"})]),a("span",{staticClass:"is-size-7"},[t._v("Add")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-play"})]),a("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),a("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},fo=[],yo={name:"SpotifyModalDialogTrack",props:["show","track","album"],methods:{play:function(){this.$emit("close"),S.player_play_uri(this.track.uri,!1)},queue_add:function(){this.$emit("close"),S.queue_add(this.track.uri)},queue_add_next:function(){this.$emit("close"),S.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})}}},bo=yo,vo=Object(M["a"])(bo,ho,fo,!1,null,null,null),go=vo.exports,ko={load:function(t){var s=new ds.a;return s.setAccessToken(A.state.spotify.webapi_token),s.getAlbum(t.params.album_id)},set:function(t,s){t.album=s}},Co={name:"PageAlbum",mixins:[Bs(ko)],components:{ContentWithHeading:ts["default"],SpotifyListItemTrack:po,SpotifyModalDialogTrack:go,SpotifyModalDialogAlbum:vn},data:function(){return{album:{artists:[{}],tracks:{}},show_track_details_modal:!1,selected_track:{},show_album_details_modal:!1}},methods:{open_artist:function(){this.$router.push({path:"/music/spotify/artists/"+this.album.artists[0].id})},play:function(){this.show_details_modal=!1,S.player_play_uri(this.album.uri,!0)},open_track_dialog:function(t){this.selected_track=t,this.show_track_details_modal=!0}}},wo=Co,xo=Object(M["a"])(wo,no,oo,!1,null,null,null),$o=xo.exports,qo=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("content-with-heading",[a("template",{slot:"heading-left"},[a("div",{staticClass:"title is-4"},[t._v(t._s(t.playlist.name))])]),a("template",{slot:"heading-right"},[a("div",{staticClass:"buttons is-centered"},[a("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_playlist_details_modal=!0}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),a("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-shuffle"})]),a("span",[t._v("Shuffle")])])])]),a("template",{slot:"content"},[a("p",{staticClass:"heading has-text-centered-mobile"},[t._v(t._s(t.playlist.tracks.total)+" tracks")]),t._l(t.tracks,function(s,i){return a("spotify-list-item-track",{key:s.track.id,attrs:{track:s.track,album:s.track.album,position:i,context_uri:t.playlist.uri}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_track_dialog(s.track)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),t.offset<t.total?a("infinite-loading",{on:{infinite:t.load_next}},[a("span",{attrs:{slot:"no-more"},slot:"no-more"},[t._v(".")])]):t._e(),a("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}}}),a("spotify-modal-dialog-playlist",{attrs:{show:t.show_playlist_details_modal,playlist:t.playlist},on:{close:function(s){t.show_playlist_details_modal=!1}}})],2)],2)},jo=[],Po={load:function(t){var s=new ds.a;return s.setAccessToken(A.state.spotify.webapi_token),Promise.all([s.getPlaylist(t.params.playlist_id),s.getPlaylistTracks(t.params.playlist_id,{limit:50,offset:0})])},set:function(t,s){t.playlist=s[0],t.tracks=[],t.total=0,t.offset=0,t.append_tracks(s[1])}},Ao={name:"SpotifyPagePlaylist",mixins:[Bs(Po)],components:{ContentWithHeading:ts["default"],SpotifyListItemTrack:po,SpotifyModalDialogTrack:go,SpotifyModalDialogPlaylist:$n,InfiniteLoading:to.a},data:function(){return{playlist:{tracks:{}},tracks:[],total:0,offset:0,show_track_details_modal:!1,selected_track:{},show_playlist_details_modal:!1}},methods:{load_next:function(t){var s=this,a=new ds.a;a.setAccessToken(this.$store.state.spotify.webapi_token),a.getPlaylistTracks(this.playlist.id,{limit:50,offset:this.offset}).then(function(a){s.append_tracks(a,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,S.player_play_uri(this.playlist.uri,!0)},open_track_dialog:function(t){this.selected_track=t,this.show_track_details_modal=!0}}},So=Ao,Oo=Object(M["a"])(So,qo,jo,!1,null,null,null),To=Oo.exports,Eo=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("section",{staticClass:"section fd-remove-padding-bottom"},[a("div",{staticClass:"container"},[a("div",{staticClass:"columns is-centered"},[a("div",{staticClass:"column is-four-fifths"},[a("form",{on:{submit:function(s){return s.preventDefault(),t.new_search(s)}}},[a("div",{staticClass:"field"},[a("p",{staticClass:"control is-expanded has-icons-left"},[a("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"},domProps:{value:t.search_query},on:{input:function(s){s.target.composing||(t.search_query=s.target.value)}}}),t._m(0)])])]),a("div",{staticClass:"tags",staticStyle:{"margin-top":"16px"}},t._l(t.recent_searches,function(s){return a("a",{key:s,staticClass:"tag",on:{click:function(a){return t.open_recent_search(s)}}},[t._v(t._s(s))])}),0)])])])]),a("tabs-search"),t.show_tracks?a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Tracks")])]),a("template",{slot:"content"},[t._l(t.tracks.items,function(s){return a("spotify-list-item-track",{key:s.id,attrs:{track:s,album:s.album,position:0,context_uri:s.uri}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_track_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),"track"===t.query.type?a("infinite-loading",{on:{infinite:t.search_tracks_next}},[a("span",{attrs:{slot:"no-more"},slot:"no-more"},[t._v(".")])]):t._e(),a("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),a("template",{slot:"footer"},[t.show_all_tracks_button?a("nav",{staticClass:"level"},[a("p",{staticClass:"level-item"},[a("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_tracks}},[t._v("Show all "+t._s(t.tracks.total)+" tracks")])])]):t._e(),t.tracks.total?t._e():a("p",[t._v("No results")])])],2):t._e(),t.show_artists?a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Artists")])]),a("template",{slot:"content"},[t._l(t.artists.items,function(s){return a("spotify-list-item-artist",{key:s.id,attrs:{artist:s}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_artist_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),"artist"===t.query.type?a("infinite-loading",{on:{infinite:t.search_artists_next}},[a("span",{attrs:{slot:"no-more"},slot:"no-more"},[t._v(".")])]):t._e(),a("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),a("template",{slot:"footer"},[t.show_all_artists_button?a("nav",{staticClass:"level"},[a("p",{staticClass:"level-item"},[a("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_artists}},[t._v("Show all "+t._s(t.artists.total)+" artists")])])]):t._e(),t.artists.total?t._e():a("p",[t._v("No results")])])],2):t._e(),t.show_albums?a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Albums")])]),a("template",{slot:"content"},[t._l(t.albums.items,function(s){return a("spotify-list-item-album",{key:s.id,attrs:{album:s}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_album_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),"album"===t.query.type?a("infinite-loading",{on:{infinite:t.search_albums_next}},[a("span",{attrs:{slot:"no-more"},slot:"no-more"},[t._v(".")])]):t._e(),a("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),a("template",{slot:"footer"},[t.show_all_albums_button?a("nav",{staticClass:"level"},[a("p",{staticClass:"level-item"},[a("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_albums}},[t._v("Show all "+t._s(t.albums.total)+" albums")])])]):t._e(),t.albums.total?t._e():a("p",[t._v("No results")])])],2):t._e(),t.show_playlists?a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Playlists")])]),a("template",{slot:"content"},[t._l(t.playlists.items,function(s){return a("spotify-list-item-playlist",{key:s.id,attrs:{playlist:s}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_playlist_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}),"playlist"===t.query.type?a("infinite-loading",{on:{infinite:t.search_playlists_next}},[a("span",{attrs:{slot:"no-more"},slot:"no-more"},[t._v(".")])]):t._e(),a("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),a("template",{slot:"footer"},[t.show_all_playlists_button?a("nav",{staticClass:"level"},[a("p",{staticClass:"level-item"},[a("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_playlists}},[t._v("Show all "+t._s(t.playlists.total)+" playlists")])])]):t._e(),t.playlists.total?t._e():a("p",[t._v("No results")])])],2):t._e()],1)},Do=[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("span",{staticClass:"icon is-left"},[a("i",{staticClass:"mdi mdi-magnify"})])}],Io=(a("28a5"),function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"media"},[a("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:t.open_artist}},[a("h1",{staticClass:"title is-6"},[t._v(t._s(t.artist.name))])]),a("div",{staticClass:"media-right"},[t._t("actions")],2)])}),Mo=[],Lo={name:"SpotifyListItemArtist",props:["artist"],methods:{open_artist:function(){this.$router.push({path:"/music/spotify/artists/"+this.artist.id})}}},zo=Lo,No=Object(M["a"])(zo,Io,Mo,!1,null,null,null),Ro=No.exports,Bo={name:"SpotifyPageSearch",components:{ContentWithHeading:ts["default"],TabsSearch:Ul,SpotifyListItemTrack:po,SpotifyListItemArtist:Ro,SpotifyListItemAlbum:on,SpotifyListItemPlaylist:_n,SpotifyModalDialogTrack:go,SpotifyModalDialogArtist:Xn,SpotifyModalDialogAlbum:vn,SpotifyModalDialogPlaylist:$n,InfiniteLoading:to.a},data:function(){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:{}}},computed:{recent_searches:function(){return this.$store.state.recent_searches},show_tracks:function(){return this.$route.query.type&&this.$route.query.type.includes("track")},show_all_tracks_button:function(){return this.tracks.total>this.tracks.items.length},show_artists:function(){return this.$route.query.type&&this.$route.query.type.includes("artist")},show_all_artists_button:function(){return this.artists.total>this.artists.items.length},show_albums:function(){return this.$route.query.type&&this.$route.query.type.includes("album")},show_all_albums_button:function(){return this.albums.total>this.albums.items.length},show_playlists:function(){return this.$route.query.type&&this.$route.query.type.includes("playlist")},show_all_playlists_button:function(){return this.playlists.total>this.playlists.items.length}},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)return this.search_query="",void this.$refs.search_field.focus();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($,this.query.query),this.query.type.includes(",")&&this.search_all()},spotify_search:function(){var t=this;return S.spotify().then(function(s){var a=s.data;t.search_param.market=a.webapi_country;var i=new ds.a;return i.setAccessToken(a.webapi_token),i.search(t.query.query,t.query.type.split(","),t.search_param)})},search_all:function(){var t=this;this.spotify_search().then(function(s){t.tracks=s.tracks?s.tracks:{items:[],total:0},t.artists=s.artists?s.artists:{items:[],total:0},t.albums=s.albums?s.albums:{items:[],total:0},t.playlists=s.playlists?s.playlists:{items:[],total:0}})},search_tracks_next:function(t){var s=this;this.spotify_search().then(function(a){s.tracks.items=s.tracks.items.concat(a.tracks.items),s.tracks.total=a.tracks.total,s.search_param.offset+=a.tracks.limit,t.loaded(),s.search_param.offset>=s.tracks.total&&t.complete()})},search_artists_next:function(t){var s=this;this.spotify_search().then(function(a){s.artists.items=s.artists.items.concat(a.artists.items),s.artists.total=a.artists.total,s.search_param.offset+=a.artists.limit,t.loaded(),s.search_param.offset>=s.artists.total&&t.complete()})},search_albums_next:function(t){var s=this;this.spotify_search().then(function(a){s.albums.items=s.albums.items.concat(a.albums.items),s.albums.total=a.albums.total,s.search_param.offset+=a.albums.limit,t.loaded(),s.search_param.offset>=s.albums.total&&t.complete()})},search_playlists_next:function(t){var s=this;this.spotify_search().then(function(a){s.playlists.items=s.playlists.items.concat(a.playlists.items),s.playlists.total=a.playlists.total,s.search_param.offset+=a.playlists.limit,t.loaded(),s.search_param.offset>=s.playlists.total&&t.complete()})},new_search:function(){this.search_query&&(this.$router.push({path:"/search/spotify",query:{type:"track,artist,album,playlist",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}},mounted:function(){this.query=this.$route.query,this.search()},watch:{$route:function(t,s){this.query=t.query,this.search()}}},Uo=Bo,Ho=Object(M["a"])(Uo,Eo,Do,!1,null,null,null),Wo=Ho.exports;e["a"].use(Kt["a"]);var Go=new Kt["a"]({routes:[{path:"/",name:"PageQueue",component:Ts},{path:"/about",name:"About",component:Xl},{path:"/now-playing",name:"Now playing",component:zs},{path:"/music",redirect:"/music/browse"},{path:"/music/browse",name:"Browse",component:Ca,meta:{show_progress:!0,has_tabs:!0}},{path:"/music/browse/recently_added",name:"Browse Recently Added",component:Aa,meta:{show_progress:!0,has_tabs:!0}},{path:"/music/browse/recently_played",name:"Browse Recently Played",component:Ma,meta:{show_progress:!0,has_tabs:!0}},{path:"/music/artists",name:"Artists",component:ri,meta:{show_progress:!0,has_tabs:!0,has_index:!0}},{path:"/music/artists/:artist_id",name:"Artist",component:hi,meta:{show_progress:!0}},{path:"/music/artists/:artist_id/tracks",name:"Tracks",component:he,meta:{show_progress:!0,has_index:!0}},{path:"/music/albums",name:"Albums",component:Ci,meta:{show_progress:!0,has_tabs:!0,has_index:!0}},{path:"/music/albums/:album_id",name:"Album",component:Ai,meta:{show_progress:!0}},{path:"/music/genres",name:"Genres",component:Qi,meta:{show_progress:!0,has_tabs:!0,has_index:!0}},{path:"/music/genres/:genre",name:"Genre",component:se,meta:{show_progress:!0,has_index:!0}},{path:"/music/genres/:genre/tracks",name:"GenreTracks",component:re,meta:{show_progress:!0,has_index:!0}},{path:"/podcasts",name:"Podcasts",component:Ce,meta:{show_progress:!0}},{path:"/podcasts/:album_id",name:"Podcast",component:Ae,meta:{show_progress:!0}},{path:"/audiobooks",name:"Audiobooks",component:Me,meta:{show_progress:!0}},{path:"/audiobooks/:album_id",name:"Audiobook",component:He,meta:{show_progress:!0}},{path:"/files",name:"Files",component:Dl,meta:{show_progress:!0}},{path:"/playlists",name:"Playlists",component:rl,meta:{show_progress:!0}},{path:"/playlists/:playlist_id",name:"Playlist",component:hl,meta:{show_progress:!0}},{path:"/search",redirect:"/search/library"},{path:"/search/library",name:"Search Library",component:Fl},{path:"/music/spotify",name:"Spotify",component:Sn,meta:{show_progress:!0,has_tabs:!0}},{path:"/music/spotify/new-releases",name:"Spotify Browse New Releases",component:Ln,meta:{show_progress:!0,has_tabs:!0}},{path:"/music/spotify/featured-playlists",name:"Spotify Browse Featured Playlists",component:Wn,meta:{show_progress:!0,has_tabs:!0}},{path:"/music/spotify/artists/:artist_id",name:"Spotify Artist",component:lo,meta:{show_progress:!0}},{path:"/music/spotify/albums/:album_id",name:"Spotify Album",component:$o,meta:{show_progress:!0}},{path:"/music/spotify/playlists/:playlist_id",name:"Spotify Playlist",component:To,meta:{show_progress:!0}},{path:"/search/spotify",name:"Spotify Search",component:Wo}],scrollBehavior:function(t,s,a){return a?new Promise(function(t,s){setTimeout(function(){t(a)},10)}):t.path===s.path&&t.hash?{selector:t.hash,offset:{x:0,y:90}}:t.hash?new Promise(function(s,a){setTimeout(function(){s({selector:t.hash,offset:{x:0,y:90}})},10)}):t.meta.has_index?new Promise(function(s,a){setTimeout(function(){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}}});Go.beforeEach(function(t,s,a){var i=A.state.show_burger_menu;i&&A.commit(P,!1),a(!i)});var Fo=a("c1df"),Yo=a.n(Fo),Qo=a("4623"),Vo=a.n(Qo);Vo()(Yo.a),e["a"].filter("duration",function(t,s){return s?Yo.a.duration(t).format(s):Yo.a.duration(t).format("hh:*mm:ss")}),e["a"].filter("time",function(t,s){return s?Yo()(t).format(s):Yo()(t).format()}),e["a"].filter("timeFromNow",function(t,s){return Yo()(t).fromNow(s)}),e["a"].filter("number",function(t){return t.toLocaleString()});var Jo=a("26b9"),Ko=a.n(Jo);e["a"].use(Ko.a,{color:"hsl(204, 86%, 53%)",failedColor:"red",height:"1px"});a("92c6"),a("de2f"),a("2760"),a("e1b4");e["a"].config.productionTip=!1,new e["a"]({el:"#app",router:Go,store:A,components:{App:Jt},template:"<App/>"})},7412:function(t,s,a){"use strict";var i=a("4061"),e=a("91ed"),l=a("2877"),n=Object(l["a"])(e["default"],i["a"],i["b"],!1,null,null,null);s["default"]=n.exports},"91ed":function(t,s,a){"use strict";var i=a("39bf"),e=a.n(i);s["default"]=e.a},cf45:function(t,s,a){"use strict";var i=a("4798"),e=a.n(i);e.a},e1b4:function(t,s,a){}});
|
|
//# sourceMappingURL=app.js.map
|