diff --git a/htdocs/assets/index.js b/htdocs/assets/index.js index 45eb9b12..5036e85c 100644 --- a/htdocs/assets/index.js +++ b/htdocs/assets/index.js @@ -56,7 +56,7 @@ font-size="${e.size/3}" fill="${U8(t)>.5?"#000000":"#FFFFFF"}"> ${e.caption} - `;return`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(n)}`},B8={name:"CoverArtwork",props:{album:{default:"",type:String},artist:{default:"",type:String},artwork_url:{default:"",type:String}},emits:["click"],data(){return{font:{family:"sans-serif",weight:"bold"},lifecycle:{error:e=>{e.src=this.dataURI()}},size:600}},computed:{alt_text(){return`${this.artist} - ${this.album}`},caption(){return this.album?this.album.substring(0,2):this.artist?this.artist.substring(0,2):""}},methods:{dataURI(){return j8({alternate:this.alt_text,caption:this.caption,font:this.font,size:this.size})}}};function W8(e,t,n,r,o,s){const i=Cd("lazy");return k(),A("figure",null,[yt(c("img",{onClick:t[0]||(t[0]=a=>e.$emit("click"))},null,512),[[i,{src:n.artwork_url,lifecycle:o.lifecycle}]])])}const Dn=te(B8,[["render",W8]]);var C1={exports:{}};(function(e){var t=function(){var n="https://api.spotify.com/v1",r=null,o=null,s=function(f,p){return f.abort=p,f},i=function(f,p){var h;if(o!==null){var _=o.defer();f(function(b){_.resolve(b)},function(b){_.reject(b)}),h=_.promise}else window.Promise&&(h=new window.Promise(f));return h?new s(h,p):null},a=function(){var f=Array.prototype.slice.call(arguments),p=f[0],h=f.slice(1);return p=p||{},h.forEach(function(_){for(var b in _)_.hasOwnProperty(b)&&(p[b]=_[b])}),p},l=function(f,p){var h="";for(var _ in p)if(p.hasOwnProperty(_)){var b=p[_];h+=encodeURIComponent(_)+"="+encodeURIComponent(b)+"&"}return h.length>0&&(h=h.substring(0,h.length-1),f=f+"?"+h),f},u=function(f,p){var h=new XMLHttpRequest,_=function(b,w){function C(x){b&&b(x),p&&p(null,x)}function v(){w&&w(h),p&&p(h,null)}var z=f.type||"GET";if(h.open(z,l(f.url,f.params)),r&&h.setRequestHeader("Authorization","Bearer "+r),h.onreadystatechange=function(){if(h.readyState===4){var x=null;try{x=h.responseText?JSON.parse(h.responseText):""}catch(M){console.error(M)}h.status>=200&&h.status<300?C(x):v()}},z==="GET")h.send(null);else{var E=null;f.postData&&(f.contentType==="image/jpeg"?(E=f.postData,h.setRequestHeader("Content-Type",f.contentType)):(E=JSON.stringify(f.postData),h.setRequestHeader("Content-Type","application/json"))),h.send(E)}};return p?(_(),null):i(_,function(){h.abort()})},m=function(f,p,h,_){var b={},w=null;typeof p=="object"?(b=p,w=h):typeof p=="function"&&(w=p);var C=f.type||"GET";return C!=="GET"&&f.postData&&!_?f.postData=a(f.postData,b):f.params=a(f.params,b),u(f,w)},d=function(){};return d.prototype={constructor:t},d.prototype.getGeneric=function(f,p){var h={url:f};return m(h,p)},d.prototype.getMe=function(f,p){var h={url:n+"/me"};return m(h,f,p)},d.prototype.getMySavedTracks=function(f,p){var h={url:n+"/me/tracks"};return m(h,f,p)},d.prototype.addToMySavedTracks=function(f,p,h){var _={url:n+"/me/tracks",type:"PUT",postData:f};return m(_,p,h)},d.prototype.removeFromMySavedTracks=function(f,p,h){var _={url:n+"/me/tracks",type:"DELETE",postData:f};return m(_,p,h)},d.prototype.containsMySavedTracks=function(f,p,h){var _={url:n+"/me/tracks/contains",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getMySavedAlbums=function(f,p){var h={url:n+"/me/albums"};return m(h,f,p)},d.prototype.addToMySavedAlbums=function(f,p,h){var _={url:n+"/me/albums",type:"PUT",postData:f};return m(_,p,h)},d.prototype.removeFromMySavedAlbums=function(f,p,h){var _={url:n+"/me/albums",type:"DELETE",postData:f};return m(_,p,h)},d.prototype.containsMySavedAlbums=function(f,p,h){var _={url:n+"/me/albums/contains",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getMyTopArtists=function(f,p){var h={url:n+"/me/top/artists"};return m(h,f,p)},d.prototype.getMyTopTracks=function(f,p){var h={url:n+"/me/top/tracks"};return m(h,f,p)},d.prototype.getMyRecentlyPlayedTracks=function(f,p){var h={url:n+"/me/player/recently-played"};return m(h,f,p)},d.prototype.followUsers=function(f,p){var h={url:n+"/me/following/",type:"PUT",params:{ids:f.join(","),type:"user"}};return m(h,p)},d.prototype.followArtists=function(f,p){var h={url:n+"/me/following/",type:"PUT",params:{ids:f.join(","),type:"artist"}};return m(h,p)},d.prototype.followPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f+"/followers",type:"PUT",postData:{}};return m(_,p,h)},d.prototype.unfollowUsers=function(f,p){var h={url:n+"/me/following/",type:"DELETE",params:{ids:f.join(","),type:"user"}};return m(h,p)},d.prototype.unfollowArtists=function(f,p){var h={url:n+"/me/following/",type:"DELETE",params:{ids:f.join(","),type:"artist"}};return m(h,p)},d.prototype.unfollowPlaylist=function(f,p){var h={url:n+"/playlists/"+f+"/followers",type:"DELETE"};return m(h,p)},d.prototype.isFollowingUsers=function(f,p){var h={url:n+"/me/following/contains",type:"GET",params:{ids:f.join(","),type:"user"}};return m(h,p)},d.prototype.isFollowingArtists=function(f,p){var h={url:n+"/me/following/contains",type:"GET",params:{ids:f.join(","),type:"artist"}};return m(h,p)},d.prototype.areFollowingPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f+"/followers/contains",type:"GET",params:{ids:p.join(",")}};return m(_,h)},d.prototype.getFollowedArtists=function(f,p){var h={url:n+"/me/following",type:"GET",params:{type:"artist"}};return m(h,f,p)},d.prototype.getUser=function(f,p,h){var _={url:n+"/users/"+encodeURIComponent(f)};return m(_,p,h)},d.prototype.getUserPlaylists=function(f,p,h){var _;return typeof f=="string"?_={url:n+"/users/"+encodeURIComponent(f)+"/playlists"}:(_={url:n+"/me/playlists"},h=p,p=f),m(_,p,h)},d.prototype.getPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f};return m(_,p,h)},d.prototype.getPlaylistTracks=function(f,p,h){var _={url:n+"/playlists/"+f+"/tracks"};return m(_,p,h)},d.prototype.getPlaylistCoverImage=function(f,p){var h={url:n+"/playlists/"+f+"/images"};return m(h,p)},d.prototype.createPlaylist=function(f,p,h){var _={url:n+"/users/"+encodeURIComponent(f)+"/playlists",type:"POST",postData:p};return m(_,p,h)},d.prototype.changePlaylistDetails=function(f,p,h){var _={url:n+"/playlists/"+f,type:"PUT",postData:p};return m(_,p,h)},d.prototype.addTracksToPlaylist=function(f,p,h,_){var b={url:n+"/playlists/"+f+"/tracks",type:"POST",postData:{uris:p}};return m(b,h,_,!0)},d.prototype.replaceTracksInPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f+"/tracks",type:"PUT",postData:{uris:p}};return m(_,{},h)},d.prototype.reorderTracksInPlaylist=function(f,p,h,_,b){var w={url:n+"/playlists/"+f+"/tracks",type:"PUT",postData:{range_start:p,insert_before:h}};return m(w,_,b)},d.prototype.removeTracksFromPlaylist=function(f,p,h){var _=p.map(function(w){return typeof w=="string"?{uri:w}:w}),b={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{tracks:_}};return m(b,{},h)},d.prototype.removeTracksFromPlaylistWithSnapshotId=function(f,p,h,_){var b=p.map(function(C){return typeof C=="string"?{uri:C}:C}),w={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{tracks:b,snapshot_id:h}};return m(w,{},_)},d.prototype.removeTracksFromPlaylistInPositions=function(f,p,h,_){var b={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{positions:p,snapshot_id:h}};return m(b,{},_)},d.prototype.uploadCustomPlaylistCoverImage=function(f,p,h){var _={url:n+"/playlists/"+f+"/images",type:"PUT",postData:p.replace(/^data:image\/jpeg;base64,/,""),contentType:"image/jpeg"};return m(_,{},h)},d.prototype.getAlbum=function(f,p,h){var _={url:n+"/albums/"+f};return m(_,p,h)},d.prototype.getAlbumTracks=function(f,p,h){var _={url:n+"/albums/"+f+"/tracks"};return m(_,p,h)},d.prototype.getAlbums=function(f,p,h){var _={url:n+"/albums/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getTrack=function(f,p,h){var _={};return _.url=n+"/tracks/"+f,m(_,p,h)},d.prototype.getTracks=function(f,p,h){var _={url:n+"/tracks/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getArtist=function(f,p,h){var _={url:n+"/artists/"+f};return m(_,p,h)},d.prototype.getArtists=function(f,p,h){var _={url:n+"/artists/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getArtistAlbums=function(f,p,h){var _={url:n+"/artists/"+f+"/albums"};return m(_,p,h)},d.prototype.getArtistTopTracks=function(f,p,h,_){var b={url:n+"/artists/"+f+"/top-tracks",params:{country:p}};return m(b,h,_)},d.prototype.getArtistRelatedArtists=function(f,p,h){var _={url:n+"/artists/"+f+"/related-artists"};return m(_,p,h)},d.prototype.getFeaturedPlaylists=function(f,p){var h={url:n+"/browse/featured-playlists"};return m(h,f,p)},d.prototype.getNewReleases=function(f,p){var h={url:n+"/browse/new-releases"};return m(h,f,p)},d.prototype.getCategories=function(f,p){var h={url:n+"/browse/categories"};return m(h,f,p)},d.prototype.getCategory=function(f,p,h){var _={url:n+"/browse/categories/"+f};return m(_,p,h)},d.prototype.getCategoryPlaylists=function(f,p,h){var _={url:n+"/browse/categories/"+f+"/playlists"};return m(_,p,h)},d.prototype.search=function(f,p,h,_){var b={url:n+"/search/",params:{q:f,type:p.join(",")}};return m(b,h,_)},d.prototype.searchAlbums=function(f,p,h){return this.search(f,["album"],p,h)},d.prototype.searchArtists=function(f,p,h){return this.search(f,["artist"],p,h)},d.prototype.searchTracks=function(f,p,h){return this.search(f,["track"],p,h)},d.prototype.searchPlaylists=function(f,p,h){return this.search(f,["playlist"],p,h)},d.prototype.searchShows=function(f,p,h){return this.search(f,["show"],p,h)},d.prototype.searchEpisodes=function(f,p,h){return this.search(f,["episode"],p,h)},d.prototype.getAudioFeaturesForTrack=function(f,p){var h={};return h.url=n+"/audio-features/"+f,m(h,{},p)},d.prototype.getAudioFeaturesForTracks=function(f,p){var h={url:n+"/audio-features",params:{ids:f}};return m(h,{},p)},d.prototype.getAudioAnalysisForTrack=function(f,p){var h={};return h.url=n+"/audio-analysis/"+f,m(h,{},p)},d.prototype.getRecommendations=function(f,p){var h={url:n+"/recommendations"};return m(h,f,p)},d.prototype.getAvailableGenreSeeds=function(f){var p={url:n+"/recommendations/available-genre-seeds"};return m(p,{},f)},d.prototype.getMyDevices=function(f){var p={url:n+"/me/player/devices"};return m(p,{},f)},d.prototype.getMyCurrentPlaybackState=function(f,p){var h={url:n+"/me/player"};return m(h,f,p)},d.prototype.getMyCurrentPlayingTrack=function(f,p){var h={url:n+"/me/player/currently-playing"};return m(h,f,p)},d.prototype.transferMyPlayback=function(f,p,h){var _=p||{};_.device_ids=f;var b={type:"PUT",url:n+"/me/player",postData:_};return m(b,p,h)},d.prototype.play=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={};["context_uri","uris","offset","position_ms"].forEach(function(C){C in f&&(_[C]=f[C])});var b={type:"PUT",url:n+"/me/player/play",params:h,postData:_},w=typeof f=="function"?f:{};return m(b,w,p)},d.prototype.queue=function(f,p,h){p=p||{};var _="device_id"in p?{uri:f,device_id:p.device_id}:{uri:f},b={type:"POST",url:n+"/me/player/queue",params:_};return m(b,p,h)},d.prototype.pause=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={type:"PUT",url:n+"/me/player/pause",params:h};return m(_,f,p)},d.prototype.skipToNext=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={type:"POST",url:n+"/me/player/next",params:h};return m(_,f,p)},d.prototype.skipToPrevious=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={type:"POST",url:n+"/me/player/previous",params:h};return m(_,f,p)},d.prototype.seek=function(f,p,h){p=p||{};var _={position_ms:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/seek",params:_};return m(b,p,h)},d.prototype.setRepeat=function(f,p,h){p=p||{};var _={state:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/repeat",params:_};return m(b,p,h)},d.prototype.setVolume=function(f,p,h){p=p||{};var _={volume_percent:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/volume",params:_};return m(b,p,h)},d.prototype.setShuffle=function(f,p,h){p=p||{};var _={state:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/shuffle",params:_};return m(b,p,h)},d.prototype.getShow=function(f,p,h){var _={};return _.url=n+"/shows/"+f,m(_,p,h)},d.prototype.getShows=function(f,p,h){var _={url:n+"/shows/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getMySavedShows=function(f,p){var h={url:n+"/me/shows"};return m(h,f,p)},d.prototype.addToMySavedShows=function(f,p,h){var _={url:n+"/me/shows",type:"PUT",postData:f};return m(_,p,h)},d.prototype.removeFromMySavedShows=function(f,p,h){var _={url:n+"/me/shows",type:"DELETE",postData:f};return m(_,p,h)},d.prototype.containsMySavedShows=function(f,p,h){var _={url:n+"/me/shows/contains",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getShowEpisodes=function(f,p,h){var _={url:n+"/shows/"+f+"/episodes"};return m(_,p,h)},d.prototype.getEpisode=function(f,p,h){var _={};return _.url=n+"/episodes/"+f,m(_,p,h)},d.prototype.getEpisodes=function(f,p,h){var _={url:n+"/episodes/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getAccessToken=function(){return r},d.prototype.setAccessToken=function(f){r=f},d.prototype.setPromiseImplementation=function(f){var p=!1;try{var h=new f(function(_){_()});typeof h.then=="function"&&typeof h.catch=="function"&&(p=!0)}catch(_){console.error(_)}if(p)o=f;else throw new Error("Unsupported implementation of Promises/A+")},d}();e.exports=t})(C1);var q8=C1.exports;const Kn=Ql(q8),G8={name:"ModalDialogTrack",props:{show:Boolean,track:{required:!0,type:Object}},emits:["close","play-count-changed"],data(){return{spotify_track:{}}},watch:{track(){if(this.track&&this.track.data_kind==="spotify"&&this.track.media_kind!=="podcast"){const e=new Kn;e.setAccessToken(this.$store.state.spotify.webapi_token),e.getTrack(this.track.path.slice(this.track.path.lastIndexOf(":")+1)).then(t=>{this.spotify_track=t})}else this.spotify_track={}}},methods:{mark_new(){V.library_track_update(this.track.id,{play_count:"reset"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},mark_played(){V.library_track_update(this.track.id,{play_count:"increment"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},open_album(){this.track.data_kind==="spotify"&&this.track.media_kind!=="podcast"?this.$router.push({name:"music-spotify-album",params:{id:this.spotify_track.album.id}}):this.track.media_kind==="podcast"?this.$router.push({name:"podcast",params:{id:this.track.album_id}}):this.track.media_kind==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:this.track.album_id}}):this.track.media_kind==="music"&&this.$router.push({name:"music-album",params:{id:this.track.album_id}})},open_album_artist(){this.track.data_kind==="spotify"?this.$router.push({name:"music-spotify-artist",params:{id:this.spotify_track.artists[0].id}}):this.track.media_kind==="music"||this.track.media_kind==="podcast"?this.$router.push({name:"music-artist",params:{id:this.track.album_artist_id}}):this.track.media_kind==="audiobook"&&this.$router.push({name:"audiobooks-artist",params:{id:this.track.album_artist_id}})},open_genre(){this.$router.push({name:"genre-albums",params:{name:this.track.genre},query:{media_kind:this.track.media_kind}})},play(){this.$emit("close"),V.player_play_uri(this.track.uri,!1)},queue_add(){this.$emit("close"),V.queue_add(this.track.uri)},queue_add_next(){this.$emit("close"),V.queue_add_next(this.track.uri)}}},K8={key:0,class:"modal is-active"},Z8={class:"modal-content"},Y8={class:"card"},J8={class:"card-content"},X8=["textContent"],Q8=["textContent"],eP={key:0,class:"buttons"},tP=["textContent"],nP=["textContent"],rP={class:"content is-small"},oP={key:0},sP=["textContent"],iP=["textContent"],aP={key:1},lP=["textContent"],cP=["textContent"],uP={key:2},dP=["textContent"],mP=["textContent"],fP={key:3},pP=["textContent"],hP=["textContent"],_P={key:4},gP=["textContent"],yP=["textContent"],vP={key:5},bP=["textContent"],zP=["textContent"],wP={key:6},CP=["textContent"],kP=["textContent"],xP={key:7},SP=["textContent"],EP=["textContent"],$P=["textContent"],TP=["textContent"],AP=["textContent"],OP={class:"title is-6"},PP=["textContent"],IP={key:8},DP=["textContent"],RP={class:"title is-6"},NP=["textContent"],LP=["textContent"],MP=["textContent"],FP=["textContent"],VP=["textContent"],HP=["textContent"],UP=["textContent"],jP=["textContent"],BP={key:9},WP=["textContent"],qP=["textContent"],GP={class:"card-footer"},KP=["textContent"],ZP=["textContent"],YP=["textContent"];function JP(e,t,n,r,o,s){const i=$("mdicon");return k(),ce(Dt,{name:"fade"},{default:S(()=>[n.show?(k(),A("div",K8,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",Z8,[c("div",Y8,[c("div",J8,[c("p",{class:"title is-4",textContent:g(n.track.title)},null,8,X8),c("p",{class:"subtitle",textContent:g(n.track.artist)},null,8,Q8),n.track.media_kind==="podcast"?(k(),A("div",eP,[n.track.play_count>0?(k(),A("a",{key:0,class:"button is-small",onClick:t[1]||(t[1]=(...a)=>s.mark_new&&s.mark_new(...a)),textContent:g(e.$t("dialog.track.mark-as-new"))},null,8,tP)):F("",!0),n.track.play_count===0?(k(),A("a",{key:1,class:"button is-small",onClick:t[2]||(t[2]=(...a)=>s.mark_played&&s.mark_played(...a)),textContent:g(e.$t("dialog.track.mark-as-played"))},null,8,nP)):F("",!0)])):F("",!0),c("div",rP,[n.track.album?(k(),A("p",oP,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.album"))},null,8,sP),c("a",{class:"title is-6 has-text-link",onClick:t[3]||(t[3]=(...a)=>s.open_album&&s.open_album(...a)),textContent:g(n.track.album)},null,8,iP)])):F("",!0),n.track.album_artist&&n.track.media_kind!=="audiobook"?(k(),A("p",aP,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.album-artist"))},null,8,lP),c("a",{class:"title is-6 has-text-link",onClick:t[4]||(t[4]=(...a)=>s.open_album_artist&&s.open_album_artist(...a)),textContent:g(n.track.album_artist)},null,8,cP)])):F("",!0),n.track.composer?(k(),A("p",uP,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.composer"))},null,8,dP),c("span",{class:"title is-6",textContent:g(n.track.composer)},null,8,mP)])):F("",!0),n.track.date_released?(k(),A("p",fP,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.release-date"))},null,8,pP),c("span",{class:"title is-6",textContent:g(e.$filters.date(n.track.date_released))},null,8,hP)])):n.track.year?(k(),A("p",_P,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.year"))},null,8,gP),c("span",{class:"title is-6",textContent:g(n.track.year)},null,8,yP)])):F("",!0),n.track.genre?(k(),A("p",vP,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.genre"))},null,8,bP),c("a",{class:"title is-6 has-text-link",onClick:t[5]||(t[5]=(...a)=>s.open_genre&&s.open_genre(...a)),textContent:g(n.track.genre)},null,8,zP)])):F("",!0),n.track.disc_number?(k(),A("p",wP,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.position"))},null,8,CP),c("span",{class:"title is-6",textContent:g([n.track.disc_number,n.track.track_number].join(" / "))},null,8,kP)])):F("",!0),n.track.length_ms?(k(),A("p",xP,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.duration"))},null,8,SP),c("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.track.length_ms))},null,8,EP)])):F("",!0),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.path"))},null,8,$P),c("span",{class:"title is-6",textContent:g(n.track.path)},null,8,TP)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.type"))},null,8,AP),c("span",OP,[c("span",{textContent:g([e.$t("media.kind."+n.track.media_kind),e.$t("data.kind."+n.track.data_kind)].join(" - "))},null,8,PP)])]),n.track.samplerate?(k(),A("p",IP,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.quality"))},null,8,DP),c("span",RP,[c("span",{textContent:g(n.track.type)},null,8,NP),n.track.samplerate?(k(),A("span",{key:0,textContent:g(e.$t("dialog.track.samplerate",{rate:n.track.samplerate}))},null,8,LP)):F("",!0),n.track.channels?(k(),A("span",{key:1,textContent:g(e.$t("dialog.track.channels",{channels:e.$filters.channels(n.track.channels)}))},null,8,MP)):F("",!0),n.track.bitrate?(k(),A("span",{key:2,textContent:g(e.$t("dialog.track.bitrate",{rate:n.track.bitrate}))},null,8,FP)):F("",!0)])])):F("",!0),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.added-on"))},null,8,VP),c("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.track.time_added))},null,8,HP)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.rating"))},null,8,UP),c("span",{class:"title is-6",textContent:g(e.$t("dialog.track.rating-value",{rating:Math.floor(n.track.rating/10)}))},null,8,jP)]),n.track.comment?(k(),A("p",BP,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.comment"))},null,8,WP),c("span",{class:"title is-6",textContent:g(n.track.comment)},null,8,qP)])):F("",!0)])]),c("footer",GP,[c("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...a)=>s.queue_add&&s.queue_add(...a))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.track.add"))},null,8,KP)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[7]||(t[7]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[y(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.track.add-next"))},null,8,ZP)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[8]||(t[8]=(...a)=>s.play&&s.play(...a))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.track.play"))},null,8,YP)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[9]||(t[9]=a=>e.$emit("close"))})])):F("",!0)]),_:1})}const XP=te(G8,[["render",JP]]),QP={name:"ListTracks",components:{ModalDialogTrack:XP},props:{expression:{default:"",type:String},show_icon:Boolean,show_progress:Boolean,tracks:{required:!0,type:Object},uris:{default:"",type:String}},emits:["play-count-changed"],data(){return{show_details_modal:!1,selected_track:{}}},methods:{play_track(e){this.uris?V.player_play_uri(this.uris,!1,this.tracks.items.indexOf(e)):this.expression?V.player_play_expression(this.expression,!1,this.tracks.items.indexOf(e)):V.player_play_uri(e.uri,!1)},open_dialog(e){this.selected_track=e,this.show_details_modal=!0}}},eI={key:0,class:"mt-6 mb-5 py-2"},tI=["id","textContent"],nI=["onClick"],rI={key:0,class:"media-left is-clickable"},oI={class:"media-content is-clickable is-clipped"},sI=["textContent"],iI=["textContent"],aI=["textContent"],lI=["max","value"],cI={class:"media-right"},uI=["onClick"];function dI(e,t,n,r,o,s){const i=$("mdicon"),a=$("modal-dialog-track");return k(),A(Ce,null,[(k(!0),A(Ce,null,ct(n.tracks,l=>(k(),A(Ce,{key:l.itemId},[l.isItem?(k(),A("div",{key:1,class:Ee(["media is-align-items-center",{"with-progress":n.show_progress}]),onClick:u=>s.play_track(l.item)},[n.show_icon?(k(),A("figure",rI,[y(i,{class:"icon",name:"file-outline",size:"16"})])):F("",!0),c("div",oI,[c("h1",{class:Ee(["title is-6",{"has-text-grey":l.item.media_kind==="podcast"&&l.item.play_count>0}]),textContent:g(l.item.title)},null,10,sI),c("h2",{class:"subtitle is-7 has-text-grey has-text-weight-bold",textContent:g(l.item.artist)},null,8,iI),c("h2",{class:"subtitle is-7 has-text-grey",textContent:g(l.item.album)},null,8,aI),n.show_progress&&l.item.seek_ms>0?(k(),A("progress",{key:0,class:"progress is-info",max:l.item.length_ms,value:l.item.seek_ms},null,8,lI)):F("",!0)]),c("div",cI,[c("a",{onClick:rt(u=>s.open_dialog(l.item),["prevent","stop"])},[y(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,uI)])],10,nI)):(k(),A("div",eI,[c("span",{id:"index_"+l.index,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.index)},null,8,tI)]))],64))),128)),(k(),ce(Kr,{to:"#app"},[y(a,{show:o.show_details_modal,track:o.selected_track,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1),onPlayCountChanged:t[1]||(t[1]=l=>e.$emit("play-count-changed"))},null,8,["show","track"])]))],64)}const zn=te(QP,[["render",dI],["__scopeId","data-v-29eaea3d"]]),mI={name:"ModalDialogAlbum",components:{CoverArtwork:Dn},props:{album:{required:!0,type:Object},media_kind:{default:"",type:String},show:Boolean},emits:["close","remove-podcast","play-count-changed"],data(){return{artwork_visible:!1}},computed:{media_kind_resolved(){return this.media_kind?this.media_kind:this.album.media_kind}},methods:{play(){this.$emit("close"),V.player_play_uri(this.album.uri,!1)},queue_add(){this.$emit("close"),V.queue_add(this.album.uri)},queue_add_next(){this.$emit("close"),V.queue_add_next(this.album.uri)},open_album(){this.$emit("close"),this.media_kind_resolved==="podcast"?this.$router.push({name:"podcast",params:{id:this.album.id}}):this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:this.album.id}}):this.$router.push({name:"music-album",params:{id:this.album.id}})},open_artist(){this.$emit("close"),this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-artist",params:{id:this.album.artist_id}}):this.$router.push({name:"music-artist",params:{id:this.album.artist_id}})},mark_played(){V.library_album_track_update(this.album.id,{play_count:"played"}).then(({data:e})=>{this.$emit("play-count-changed"),this.$emit("close")})},artwork_loaded(){this.artwork_visible=!0},artwork_error(){this.artwork_visible=!1}}},fI={key:0,class:"modal is-active"},pI={class:"modal-content"},hI={class:"card"},_I={class:"card-content"},gI={class:"title is-4"},yI=["textContent"],vI={key:0,class:"buttons"},bI=["textContent"],zI=["textContent"],wI={class:"content is-small"},CI={key:0},kI=["textContent"],xI=["textContent"],SI={key:1},EI=["textContent"],$I=["textContent"],TI={key:2},AI=["textContent"],OI=["textContent"],PI=["textContent"],II=["textContent"],DI=["textContent"],RI=["textContent"],NI=["textContent"],LI=["textContent"],MI=["textContent"],FI=["textContent"],VI={class:"card-footer"},HI=["textContent"],UI=["textContent"],jI=["textContent"];function BI(e,t,n,r,o,s){const i=$("cover-artwork"),a=$("mdicon");return k(),ce(Dt,{name:"fade"},{default:S(()=>[n.show?(k(),A("div",fI,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=l=>e.$emit("close"))}),c("div",pI,[c("div",hI,[c("div",_I,[y(i,{artwork_url:n.album.artwork_url,artist:n.album.artist,album:n.album.name,class:"fd-has-shadow fd-cover fd-cover-normal-image mb-5"},null,8,["artwork_url","artist","album"]),c("p",gI,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...l)=>s.open_album&&s.open_album(...l)),textContent:g(n.album.name)},null,8,yI)]),s.media_kind_resolved==="podcast"?(k(),A("div",vI,[c("a",{class:"button is-small",onClick:t[2]||(t[2]=(...l)=>s.mark_played&&s.mark_played(...l)),textContent:g(e.$t("dialog.album.mark-as-played"))},null,8,bI),n.album.data_kind==="url"?(k(),A("a",{key:0,class:"button is-small",onClick:t[3]||(t[3]=l=>e.$emit("remove-podcast")),textContent:g(e.$t("dialog.album.remove-podcast"))},null,8,zI)):F("",!0)])):F("",!0),c("div",wI,[n.album.artist?(k(),A("p",CI,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.artist"))},null,8,kI),c("a",{class:"title is-6 has-text-link",onClick:t[4]||(t[4]=(...l)=>s.open_artist&&s.open_artist(...l)),textContent:g(n.album.artist)},null,8,xI)])):F("",!0),n.album.date_released?(k(),A("p",SI,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.release-date"))},null,8,EI),c("span",{class:"title is-6",textContent:g(e.$filters.date(n.album.date_released))},null,8,$I)])):n.album.year>0?(k(),A("p",TI,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.year"))},null,8,AI),c("span",{class:"title is-6",textContent:g(n.album.year)},null,8,OI)])):F("",!0),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.tracks"))},null,8,PI),c("span",{class:"title is-6",textContent:g(n.album.track_count)},null,8,II)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.duration"))},null,8,DI),c("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.album.length_ms))},null,8,RI)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.type"))},null,8,NI),c("span",{class:"title is-6",textContent:g([e.$t("media.kind."+n.album.media_kind),e.$t("data.kind."+n.album.data_kind)].join(" - "))},null,8,LI)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.added-on"))},null,8,MI),c("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.album.time_added))},null,8,FI)])])]),c("footer",VI,[c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...l)=>s.queue_add&&s.queue_add(...l))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.album.add"))},null,8,HI)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...l)=>s.queue_add_next&&s.queue_add_next(...l))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.album.add-next"))},null,8,UI)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[7]||(t[7]=(...l)=>s.play&&s.play(...l))},[y(a,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.album.play"))},null,8,jI)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[8]||(t[8]=l=>e.$emit("close"))})])):F("",!0)]),_:1})}const ac=te(mI,[["render",BI]]),na={load(e){return Promise.all([V.library_album(e.params.id),V.library_album_tracks(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new ye(t[1].data,{criteria:[{field:"disc_number",type:Number}],index:{field:"disc_number",type:Number}}),e.tracks.indices.length<2&&e.tracks.group({index:{type:void 0}})}},WI={name:"PageAlbum",components:{ContentWithHero:ic,CoverArtwork:Dn,ListTracks:zn,ModalDialogAlbum:ac},beforeRouteEnter(e,t,n){na.load(e).then(r=>{n(o=>na.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;na.load(e).then(o=>{na.set(r,o),n()})},data(){return{album:{},show_details_modal:!1,tracks:new ye}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"music-artist",params:{id:this.album.artist_id}})},play(){V.player_play_uri(this.album.uri,!0)}}},qI=["textContent"],GI={class:"subtitle is-6 has-text-link"},KI=["textContent"],ZI={class:"buttons fd-is-centered-mobile mt-5"},YI=["textContent"],JI=["textContent"];function XI(e,t,n,r,o,s){const i=$("mdicon"),a=$("cover-artwork"),l=$("list-tracks"),u=$("modal-dialog-album"),m=$("content-with-hero");return k(),A("div",null,[y(m,null,{"heading-left":S(()=>[c("h1",{class:"title is-5",textContent:g(o.album.name)},null,8,qI),c("h2",GI,[c("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...d)=>s.open_artist&&s.open_artist(...d)),textContent:g(o.album.artist)},null,8,KI)]),c("div",ZI,[c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>s.play&&s.play(...d))},[y(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.album.shuffle"))},null,8,YI)]),c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=d=>o.show_details_modal=!0)},[y(i,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":S(()=>[y(a,{artwork_url:o.album.artwork_url,artist:o.album.artist,album:o.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=d=>o.show_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:S(()=>[c("p",{class:"heading has-text-centered-mobile mt-5",textContent:g(e.$t("page.album.track-count",{count:o.album.track_count}))},null,8,JI),y(l,{tracks:o.tracks,uris:o.album.uri},null,8,["tracks","uris"]),y(u,{show:o.show_details_modal,album:o.album,onClose:t[4]||(t[4]=d=>o.show_details_modal=!1)},null,8,["show","album"])]),_:1})])}const QI=te(WI,[["render",XI]]),e6={name:"ListItemTrackSpotify",props:{context_uri:{required:!0,type:String},position:{required:!0,type:Number},track:{required:!0,type:Object}},methods:{play(){this.track.is_playable&&V.player_play_uri(this.context_uri,!1,this.position)}}},t6={class:"media is-align-items-center"},n6=["textContent"],r6=["textContent"],o6={key:0,class:"subtitle is-7"},s6=["textContent"],i6=["textContent"],a6={class:"media-right"};function l6(e,t,n,r,o,s){return k(),A("div",t6,[c("div",{class:Ee(["media-content is-clipped",{"is-clickable":n.track.is_playable,"fd-is-not-allowed":!n.track.is_playable}]),onClick:t[0]||(t[0]=(...i)=>s.play&&s.play(...i))},[c("h1",{class:Ee(["title is-6",{"has-text-grey-light":!n.track.is_playable}]),textContent:g(n.track.name)},null,10,n6),c("h2",{class:Ee(["subtitle is-7",{"has-text-grey":n.track.is_playable,"has-text-grey-light":!n.track.is_playable}]),textContent:g(n.track.artists[0].name)},null,10,r6),n.track.is_playable?F("",!0):(k(),A("h2",o6,[gt(" ("),c("span",{textContent:g(e.$t("list.spotify.not-playable-track"))},null,8,s6),n.track.restrictions&&n.track.restrictions.reason?(k(),A("span",{key:0,textContent:g(e.$t("list.spotify.restriction-reason",{reason:n.track.restrictions.reason}))},null,8,i6)):F("",!0),gt(") ")]))],2),c("div",a6,[st(e.$slots,"actions")])])}const am=te(e6,[["render",l6]]),c6={name:"ModalDialogAlbumSpotify",components:{CoverArtwork:Dn},props:{album:{required:!0,type:Object},show:Boolean},emits:["close"],data(){return{artwork_visible:!1}},methods:{artwork_url(e){var t,n;return((n=(t=e.images)==null?void 0:t[0])==null?void 0:n.url)||""},play(){this.$emit("close"),V.player_play_uri(this.album.uri,!1)},queue_add(){this.$emit("close"),V.queue_add(this.album.uri)},queue_add_next(){this.$emit("close"),V.queue_add_next(this.album.uri)},open_album(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.album.id}})},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.album.artists[0].id}})},artwork_loaded(){this.artwork_visible=!0},artwork_error(){this.artwork_visible=!1}}},u6={key:0,class:"modal is-active"},d6={class:"modal-content"},m6={class:"card"},f6={class:"card-content"},p6={class:"title is-4"},h6=["textContent"],_6={class:"content is-small"},g6=["textContent"],y6=["textContent"],v6=["textContent"],b6=["textContent"],z6=["textContent"],w6=["textContent"],C6={class:"card-footer"},k6=["textContent"],x6=["textContent"],S6=["textContent"];function E6(e,t,n,r,o,s){const i=$("cover-artwork"),a=$("mdicon");return k(),ce(Dt,{name:"fade"},{default:S(()=>[n.show?(k(),A("div",u6,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=l=>e.$emit("close"))}),c("div",d6,[c("div",m6,[c("div",f6,[y(i,{artwork_url:s.artwork_url(n.album),artist:n.album.artist,album:n.album.name,class:"fd-has-shadow fd-cover fd-cover-normal-image mb-5",onLoad:s.artwork_loaded,onError:s.artwork_error},null,8,["artwork_url","artist","album","onLoad","onError"]),c("p",p6,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...l)=>s.open_album&&s.open_album(...l)),textContent:g(n.album.name)},null,8,h6)]),c("div",_6,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.album-artist"))},null,8,g6),c("a",{class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...l)=>s.open_artist&&s.open_artist(...l)),textContent:g(n.album.artists[0].name)},null,8,y6)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.release-date"))},null,8,v6),c("span",{class:"title is-6",textContent:g(e.$filters.date(n.album.release_date))},null,8,b6)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.type"))},null,8,z6),c("span",{class:"title is-6",textContent:g(n.album.album_type)},null,8,w6)])])]),c("footer",C6,[c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...l)=>s.queue_add&&s.queue_add(...l))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.album.add"))},null,8,k6)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...l)=>s.queue_add_next&&s.queue_add_next(...l))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.album.add-next"))},null,8,x6)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...l)=>s.play&&s.play(...l))},[y(a,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.album.play"))},null,8,S6)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=l=>e.$emit("close"))})])):F("",!0)]),_:1})}const Oi=te(c6,[["render",E6]]),$6={name:"ModalDialogTrackSpotify",props:{album:{default(){return{}},type:Object},show:Boolean,track:{required:!0,type:Object}},emits:["close"],methods:{play(){this.$emit("close"),V.player_play_uri(this.track.uri,!1)},queue_add(){this.$emit("close"),V.queue_add(this.track.uri)},queue_add_next(){this.$emit("close"),V.queue_add_next(this.track.uri)},open_album(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.album.id}})},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.album.artists[0].id}})}}},T6={key:0,class:"modal is-active"},A6={class:"modal-content"},O6={class:"card"},P6={class:"card-content"},I6=["textContent"],D6=["textContent"],R6={class:"content is-small"},N6=["textContent"],L6=["textContent"],M6=["textContent"],F6=["textContent"],V6=["textContent"],H6=["textContent"],U6=["textContent"],j6=["textContent"],B6=["textContent"],W6=["textContent"],q6=["textContent"],G6=["textContent"],K6={class:"card-footer"},Z6=["textContent"],Y6=["textContent"],J6=["textContent"];function X6(e,t,n,r,o,s){const i=$("mdicon");return k(),ce(Dt,{name:"fade"},{default:S(()=>[n.show?(k(),A("div",T6,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",A6,[c("div",O6,[c("div",P6,[c("p",{class:"title is-4",textContent:g(n.track.name)},null,8,I6),c("p",{class:"subtitle",textContent:g(n.track.artists[0].name)},null,8,D6),c("div",R6,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.album"))},null,8,N6),c("a",{class:"title is-6 has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open_album&&s.open_album(...a)),textContent:g(n.album.name)},null,8,L6)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.album-artist"))},null,8,M6),c("a",{class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...a)=>s.open_artist&&s.open_artist(...a)),textContent:g(n.album.artists[0].name)},null,8,F6)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.release-date"))},null,8,V6),c("span",{class:"title is-6",textContent:g(e.$filters.date(n.album.release_date))},null,8,H6)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.position"))},null,8,U6),c("span",{class:"title is-6",textContent:g([n.track.disc_number,n.track.track_number].join(" / "))},null,8,j6)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.duration"))},null,8,B6),c("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.track.duration_ms))},null,8,W6)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.path"))},null,8,q6),c("span",{class:"title is-6",textContent:g(n.track.uri)},null,8,G6)])])]),c("footer",K6,[c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add&&s.queue_add(...a))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.track.add"))},null,8,Z6)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[y(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.track.add-next"))},null,8,Y6)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...a)=>s.play&&s.play(...a))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.track.play"))},null,8,J6)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=a=>e.$emit("close"))})])):F("",!0)]),_:1})}const lm=te($6,[["render",X6]]),ra={load(e){const t=new Kn;return t.setAccessToken(je.state.spotify.webapi_token),t.getAlbum(e.params.id,{market:je.state.spotify.webapi_country})},set(e,t){e.album=t}},Q6={name:"PageAlbumSpotify",components:{ContentWithHero:ic,CoverArtwork:Dn,ListItemTrackSpotify:am,ModalDialogAlbumSpotify:Oi,ModalDialogTrackSpotify:lm},beforeRouteEnter(e,t,n){ra.load(e).then(r=>{n(o=>ra.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;ra.load(e).then(o=>{ra.set(r,o),n()})},data(){return{album:{artists:[{}],tracks:{}},selected_track:{},show_details_modal:!1,show_track_details_modal:!1}},methods:{artwork_url(e){var t,n;return((n=(t=e.images)==null?void 0:t[0])==null?void 0:n.url)||""},open_artist(){this.$router.push({name:"music-spotify-artist",params:{id:this.album.artists[0].id}})},play(){this.show_details_modal=!1,V.player_play_uri(this.album.uri,!0)},open_track_dialog(e){this.selected_track=e,this.show_track_details_modal=!0}}},e5=["textContent"],t5={class:"subtitle is-6 has-text-link"},n5=["textContent"],r5={class:"buttons fd-is-centered-mobile mt-5"},o5=["textContent"],s5=["textContent"],i5=["onClick"];function a5(e,t,n,r,o,s){const i=$("mdicon"),a=$("cover-artwork"),l=$("list-item-track-spotify"),u=$("modal-dialog-album-spotify"),m=$("modal-dialog-track-spotify"),d=$("content-with-hero");return k(),A("div",null,[y(d,null,{"heading-left":S(()=>[c("h1",{class:"title is-5",textContent:g(o.album.name)},null,8,e5),c("h2",t5,[c("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...f)=>s.open_artist&&s.open_artist(...f)),textContent:g(o.album.artists[0].name)},null,8,n5)]),c("div",r5,[c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...f)=>s.play&&s.play(...f))},[y(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.spotify.album.shuffle"))},null,8,o5)]),c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=f=>o.show_details_modal=!0)},[y(i,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":S(()=>[y(a,{artwork_url:s.artwork_url(o.album),artist:o.album.artist,album:o.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=f=>o.show_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:S(()=>[c("p",{class:"heading has-text-centered-mobile mt-5",textContent:g(e.$t("page.spotify.album.track-count",{count:o.album.tracks.total}))},null,8,s5),(k(!0),A(Ce,null,ct(o.album.tracks.items,(f,p)=>(k(),ce(l,{key:f.id,track:f,position:p,context_uri:o.album.uri},{actions:S(()=>[c("a",{onClick:rt(h=>s.open_track_dialog(f),["prevent","stop"])},[y(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,i5)]),_:2},1032,["track","position","context_uri"]))),128)),y(u,{show:o.show_details_modal,album:o.album,onClose:t[4]||(t[4]=f=>o.show_details_modal=!1)},null,8,["show","album"]),y(m,{show:o.show_track_details_modal,track:o.selected_track,album:o.album,onClose:t[5]||(t[5]=f=>o.show_track_details_modal=!1)},null,8,["show","track","album"])]),_:1})])}const l5=te(Q6,[["render",a5]]),c5={name:"ContentWithHeading",data(){return{options_visible:!1}},computed:{icon_name(){return this.options_visible?"chevron-up":"chevron-down"},position(){return{hash:this.options_visible?"#top":"#app",query:this.$route.query}}},mounted(){this.$slots.options&&(this.observer=new IntersectionObserver(this.onElementObserved,{rootMargin:"-82px 0px 0px 0px",threshold:1}),this.observer.observe(this.$refs.options_ref))},methods:{onElementObserved(e){e.forEach(({target:t,isIntersecting:n})=>{this.options_visible=n})},visibilityChanged(e){this.options_visible=e}}},u5={class:"section"},d5={class:"container"},m5={class:"columns is-centered"},f5={class:"column is-four-fifths"},p5={key:0},h5={ref:"options_ref",style:{height:"1px"}},_5={class:"buttons is-centered mt-4 mb-2"},g5={id:"top",class:"level is-clipped"},y5={class:"level-left is-flex-shrink-1"},v5={class:"level-item is-flex-shrink-1 has-text-centered-mobile"},b5={class:"level-right has-text-centered-mobile"},z5={class:"mt-4"};function w5(e,t,n,r,o,s){const i=$("mdicon"),a=$("router-link");return k(),A("section",u5,[c("div",d5,[c("div",m5,[c("div",f5,[e.$slots.options?(k(),A("section",p5,[c("div",h5,null,512),st(e.$slots,"options"),c("nav",_5,[y(a,{class:"button is-small is-white",to:s.position},{default:S(()=>[y(i,{class:"icon is-small",name:s.icon_name,size:"16"},null,8,["name"])]),_:1},8,["to"])])])):F("",!0),c("div",{class:Ee({"is-full-height":e.$slots.options})},[c("nav",g5,[c("div",y5,[c("div",v5,[c("div",null,[st(e.$slots,"heading-left")])])]),c("div",b5,[st(e.$slots,"heading-right")])]),st(e.$slots,"content"),c("div",z5,[st(e.$slots,"footer")])],2)])])])])}const Qe=te(c5,[["render",w5]]),C5={name:"ControlDropdown",props:{options:{required:!0,type:Array},value:{required:!0,type:[String,Number]}},emits:["update:value"],data(){return{is_active:!1}},computed:{option:{get(){return this.options.find(e=>e.id===this.value)}}},methods:{onClickOutside(e){this.is_active=!1},select(e){this.is_active=!1,this.$emit("update:value",e.id)}}},k5={class:"dropdown-trigger"},x5=["textContent"],S5={id:"dropdown",class:"dropdown-menu",role:"menu"},E5={class:"dropdown-content"},$5=["onClick","textContent"];function T5(e,t,n,r,o,s){const i=$("mdicon"),a=Cd("click-away");return yt((k(),A("div",{class:Ee(["dropdown",{"is-active":o.is_active}])},[c("div",k5,[c("button",{class:"button","aria-haspopup":"true","aria-controls":"dropdown",onClick:t[0]||(t[0]=l=>o.is_active=!o.is_active)},[c("span",{textContent:g(s.option.name)},null,8,x5),y(i,{class:"icon",name:"chevron-down",size:"16"})])]),c("div",S5,[c("div",E5,[(k(!0),A(Ce,null,ct(n.options,l=>(k(),A("a",{key:l.id,class:Ee(["dropdown-item",{"is-active":n.value===l.id}]),onClick:u=>s.select(l),textContent:g(l.name)},null,10,$5))),128))])])],2)),[[a,s.onClickOutside]])}const So=te(C5,[["render",T5]]),A5={name:"IndexButtonList",props:{indices:{required:!0,type:Array}}},O5={class:"buttons is-centered mb-4 fd-is-square"};function P5(e,t,n,r,o,s){const i=$("router-link");return k(),A("section",null,[c("nav",O5,[(k(!0),A(Ce,null,ct(n.indices,a=>(k(),ce(i,{key:a,class:"button is-small",to:{hash:`#index_${a}`,query:e.$route.query}},{default:S(()=>[gt(g(a),1)]),_:2},1032,["to"]))),128))])])}const Zn=te(A5,[["render",P5]]),I5={name:"ListAlbums",components:{CoverArtwork:Dn,ModalDialog:Yd,ModalDialogAlbum:ac},props:{albums:{required:!0,type:Object},hide_group_title:Boolean,media_kind:{default:"",type:String}},emits:["play-count-changed","podcast-deleted"],data(){return{show_details_modal:!1,selected_album:{},show_remove_podcast_modal:!1,rss_playlist_to_remove:{}}},computed:{is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value},media_kind_resolved(){return this.media_kind?this.media_kind:this.selected_album.media_kind}},methods:{open_album(e){this.selected_album=e,this.media_kind_resolved==="podcast"?this.$router.push({name:"podcast",params:{id:e.id}}):this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:e.id}}):this.$router.push({name:"music-album",params:{id:e.id}})},open_dialog(e){this.selected_album=e,this.show_details_modal=!0},open_remove_podcast_dialog(){V.library_album_tracks(this.selected_album.id,{limit:1}).then(({data:e})=>{V.library_track_playlists(e.items[0].id).then(({data:t})=>{this.rss_playlist_to_remove=t.items.filter(n=>n.type==="rss")[0],this.show_remove_podcast_modal=!0,this.show_details_modal=!1})})},play_count_changed(){this.$emit("play-count-changed")},remove_podcast(){this.show_remove_podcast_modal=!1,V.library_playlist_delete(this.rss_playlist_to_remove.id).then(()=>{this.$emit("podcast-deleted")})}}},D5={key:0,class:"mt-6 mb-5 py-2"},R5=["id","textContent"],N5=["onClick"],L5={key:0,class:"media-left"},M5={class:"media-content is-clickable is-clipped"},F5=["textContent"],V5=["textContent"],H5=["textContent"],U5={class:"media-right"},j5=["onClick"],B5=["textContent"],W5={class:"is-size-7"},q5=["textContent"],G5=["textContent"];function K5(e,t,n,r,o,s){const i=$("cover-artwork"),a=$("mdicon"),l=$("modal-dialog-album"),u=$("modal-dialog");return k(),A(Ce,null,[(k(!0),A(Ce,null,ct(n.albums,m=>(k(),A(Ce,{key:m.itemId},[!m.isItem&&!n.hide_group_title?(k(),A("div",D5,[c("span",{id:"index_"+m.index,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(m.index)},null,8,R5)])):m.isItem?(k(),A("div",{key:1,class:"media is-align-items-center",onClick:d=>s.open_album(m.item)},[s.is_visible_artwork?(k(),A("div",L5,[y(i,{artwork_url:m.item.artwork_url,artist:m.item.artist,album:m.item.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image"},null,8,["artwork_url","artist","album"])])):F("",!0),c("div",M5,[c("div",null,[c("h1",{class:"title is-6",textContent:g(m.item.name)},null,8,F5),c("h2",{class:"subtitle is-7 has-text-grey has-text-weight-bold",textContent:g(m.item.artist)},null,8,V5),m.item.date_released&&m.item.media_kind==="music"?(k(),A("h2",{key:0,class:"subtitle is-7 has-text-grey",textContent:g(e.$filters.date(m.item.date_released))},null,8,H5)):F("",!0)])]),c("div",U5,[c("a",{onClick:rt(d=>s.open_dialog(m.item),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,j5)])],8,N5)):F("",!0)],64))),128)),(k(),ce(Kr,{to:"#app"},[y(l,{show:o.show_details_modal,album:o.selected_album,media_kind:n.media_kind,onRemovePodcast:t[0]||(t[0]=m=>s.open_remove_podcast_dialog()),onPlayCountChanged:t[1]||(t[1]=m=>s.play_count_changed()),onClose:t[2]||(t[2]=m=>o.show_details_modal=!1)},null,8,["show","album","media_kind"]),y(u,{show:o.show_remove_podcast_modal,title:e.$t("page.podcast.remove-podcast"),delete_action:e.$t("page.podcast.remove"),onClose:t[3]||(t[3]=m=>o.show_remove_podcast_modal=!1),onDelete:s.remove_podcast},{"modal-content":S(()=>[c("p",{textContent:g(e.$t("list.albums.info-1"))},null,8,B5),c("p",W5,[gt(" ("),c("span",{textContent:g(e.$t("list.albums.info-2"))},null,8,q5),c("b",{textContent:g(o.rss_playlist_to_remove.name)},null,8,G5),gt(") ")])]),_:1},8,["show","title","delete_action","onDelete"])]))],64)}const ar=te(I5,[["render",K5]]),Z5={name:"TabsMusic",computed:{spotify_enabled(){return this.$store.state.spotify.webapi_token_valid}}},Y5={class:"section fd-tabs-section"},J5={class:"container"},X5={class:"columns is-centered"},Q5={class:"column is-four-fifths"},e4={class:"tabs is-centered is-small"},t4=["onClick","onKeypress"],n4=["textContent"],r4=["onClick","onKeypress"],o4=["textContent"],s4=["onClick","onKeypress"],i4=["textContent"],a4=["onClick","onKeypress"],l4=["textContent"],c4=["onClick","onKeypress"],u4=["textContent"],d4=["onClick","onKeypress"],m4=["textContent"];function f4(e,t,n,r,o,s){const i=$("mdicon"),a=$("router-link");return k(),A("section",Y5,[c("div",J5,[c("div",X5,[c("div",Q5,[c("div",e4,[c("ul",null,[y(a,{to:{name:"music-history"},custom:""},{default:S(({navigate:l,isActive:u})=>[c("li",{class:Ee({"is-active":u})},[c("a",{onClick:l,onKeypress:on(l,["enter"])},[y(i,{class:"icon is-small",name:"history",size:"16"}),c("span",{textContent:g(e.$t("page.music.tabs.history"))},null,8,n4)],40,t4)],2)]),_:1}),y(a,{to:{name:"music-artists"},custom:""},{default:S(({navigate:l,isActive:u})=>[c("li",{class:Ee({"is-active":u})},[c("a",{onClick:l,onKeypress:on(l,["enter"])},[y(i,{class:"icon is-small",name:"account-music",size:"16"}),c("span",{textContent:g(e.$t("page.music.tabs.artists"))},null,8,o4)],40,r4)],2)]),_:1}),y(a,{to:{name:"music-albums"},custom:""},{default:S(({navigate:l,isActive:u})=>[c("li",{class:Ee({"is-active":u})},[c("a",{onClick:l,onKeypress:on(l,["enter"])},[y(i,{class:"icon is-small",name:"album",size:"16"}),c("span",{textContent:g(e.$t("page.music.tabs.albums"))},null,8,i4)],40,s4)],2)]),_:1}),y(a,{to:{name:"music-genres"},custom:""},{default:S(({navigate:l,isActive:u})=>[c("li",{class:Ee({"is-active":u})},[c("a",{onClick:l,onKeypress:on(l,["enter"])},[y(i,{class:"icon is-small",name:"speaker",size:"16"}),c("span",{textContent:g(e.$t("page.music.tabs.genres"))},null,8,l4)],40,a4)],2)]),_:1}),y(a,{to:{name:"music-composers"},custom:""},{default:S(({navigate:l,isActive:u})=>[c("li",{class:Ee({"is-active":u})},[c("a",{onClick:l,onKeypress:on(l,["enter"])},[y(i,{class:"icon is-small",name:"book-open-page-variant",size:"16"}),c("span",{textContent:g(e.$t("page.music.tabs.composers"))},null,8,u4)],40,c4)],2)]),_:1}),s.spotify_enabled?(k(),ce(a,{key:0,to:{name:"music-spotify"},custom:""},{default:S(({navigate:l,isActive:u})=>[c("li",{class:Ee({"is-active":u})},[c("a",{onClick:l,onKeypress:on(l,["enter"])},[y(i,{class:"icon is-small",name:"spotify",size:"16"}),c("span",{textContent:g(e.$t("page.music.tabs.spotify"))},null,8,m4)],40,d4)],2)]),_:1})):F("",!0)])])])])])])}const lr=te(Z5,[["render",f4]]),oa={load(e){return V.library_albums("music")},set(e,t){e.albums_list=new ye(t.data)}},p4={name:"PageAlbums",components:{ContentWithHeading:Qe,ControlDropdown:So,IndexButtonList:Zn,ListAlbums:ar,TabsMusic:lr},beforeRouteEnter(e,t,n){oa.load(e).then(r=>{n(o=>oa.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;oa.load(e).then(o=>{oa.set(r,o),n()})},data(){return{albums_list:new ye,grouping_options:[{id:1,name:this.$t("page.albums.sort.name"),options:{index:{field:"name_sort",type:String}}},{id:2,name:this.$t("page.albums.sort.recently-added"),options:{criteria:[{field:"time_added",type:Date,order:-1}],index:{field:"time_added",type:Date}}},{id:3,name:this.$t("page.albums.sort.recently-released"),options:{criteria:[{field:"date_released",type:Date,order:-1}],index:{field:"date_released",type:Date}}},{id:4,name:this.$t("page.albums.sort.artist-name"),options:{criteria:[{field:"artist",type:String},{field:"name_sort",type:String}],index:{field:"artist",type:String}}},{id:5,name:this.$t("page.albums.sort.artist-date"),options:{criteria:[{field:"artist",type:String},{field:"date_released",type:Date}],index:{field:"artist",type:String}}}]}},computed:{albums(){const e=this.grouping_options.find(t=>t.id===this.selected_grouping_option_id);return e.options.filters=[t=>!this.hide_singles||t.track_count>2,t=>!this.hide_spotify||t.data_kind!=="spotify"],this.albums_list.group(e.options),this.albums_list},selected_grouping_option_id:{get(){return this.$store.state.albums_sort},set(e){this.$store.commit(hh,e)}},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},hide_singles:{get(){return this.$store.state.hide_singles},set(e){this.$store.commit(Sl,e)}},hide_spotify:{get(){return this.$store.state.hide_spotify},set(e){this.$store.commit(_i,e)}}}},h4={class:"fd-page-with-tabs"},_4={class:"columns"},g4={class:"column"},y4=["textContent"],v4={class:"field"},b4={class:"control"},z4=["textContent"],w4=["textContent"],C4={key:0,class:"field"},k4={class:"control"},x4=["textContent"],S4=["textContent"],E4={class:"column"},$4=["textContent"],T4=["textContent"],A4=["textContent"];function O4(e,t,n,r,o,s){const i=$("tabs-music"),a=$("index-button-list"),l=$("control-dropdown"),u=$("list-albums"),m=$("content-with-heading");return k(),A("div",h4,[y(i),y(m,null,{options:S(()=>[y(a,{indices:s.albums.indices},null,8,["indices"]),c("div",_4,[c("div",g4,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.albums.filter"))},null,8,y4),c("div",v4,[c("div",b4,[yt(c("input",{id:"switchHideSingles","onUpdate:modelValue":t[0]||(t[0]=d=>s.hide_singles=d),type:"checkbox",class:"switch is-rounded"},null,512),[[An,s.hide_singles]]),c("label",{for:"switchHideSingles",textContent:g(e.$t("page.albums.hide-singles"))},null,8,z4)]),c("p",{class:"help",textContent:g(e.$t("page.albums.hide-singles-help"))},null,8,w4)]),s.spotify_enabled?(k(),A("div",C4,[c("div",k4,[yt(c("input",{id:"switchHideSpotify","onUpdate:modelValue":t[1]||(t[1]=d=>s.hide_spotify=d),type:"checkbox",class:"switch is-rounded"},null,512),[[An,s.hide_spotify]]),c("label",{for:"switchHideSpotify",textContent:g(e.$t("page.albums.hide-spotify"))},null,8,x4)]),c("p",{class:"help",textContent:g(e.$t("page.albums.hide-spotify-help"))},null,8,S4)])):F("",!0)]),c("div",E4,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.albums.sort.title"))},null,8,$4),y(l,{value:s.selected_grouping_option_id,"onUpdate:value":t[2]||(t[2]=d=>s.selected_grouping_option_id=d),options:o.grouping_options},null,8,["value","options"])])])]),"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.albums.title"))},null,8,T4),c("p",{class:"heading",textContent:g(e.$t("page.albums.count",{count:s.albums.count}))},null,8,A4)]),"heading-right":S(()=>[]),content:S(()=>[y(u,{albums:s.albums},null,8,["albums"])]),_:1})])}const P4=te(p4,[["render",O4]]),I4={name:"ModalDialogArtist",props:{artist:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{play(){this.$emit("close"),V.player_play_uri(this.artist.uri,!1)},queue_add(){this.$emit("close"),V.queue_add(this.artist.uri)},queue_add_next(){this.$emit("close"),V.queue_add_next(this.artist.uri)},open_artist(){this.$emit("close"),this.$router.push({name:"music-artist",params:{id:this.artist.id}})}}},D4={key:0,class:"modal is-active"},R4={class:"modal-content"},N4={class:"card"},L4={class:"card-content"},M4={class:"title is-4"},F4=["textContent"],V4={class:"content is-small"},H4=["textContent"],U4=["textContent"],j4=["textContent"],B4=["textContent"],W4=["textContent"],q4=["textContent"],G4=["textContent"],K4=["textContent"],Z4={class:"card-footer"},Y4=["textContent"],J4=["textContent"],X4=["textContent"];function Q4(e,t,n,r,o,s){const i=$("mdicon");return k(),ce(Dt,{name:"fade"},{default:S(()=>[n.show?(k(),A("div",D4,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",R4,[c("div",N4,[c("div",L4,[c("p",M4,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open_artist&&s.open_artist(...a)),textContent:g(n.artist.name)},null,8,F4)]),c("div",V4,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.artist.albums"))},null,8,H4),c("span",{class:"title is-6",textContent:g(n.artist.album_count)},null,8,U4)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.artist.tracks"))},null,8,j4),c("span",{class:"title is-6",textContent:g(n.artist.track_count)},null,8,B4)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.artist.type"))},null,8,W4),c("span",{class:"title is-6",textContent:g(e.$t("data.kind."+n.artist.data_kind))},null,8,q4)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.artist.added-on"))},null,8,G4),c("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.artist.time_added))},null,8,K4)])])]),c("footer",Z4,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.artist.add"))},null,8,Y4)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[y(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.artist.add-next"))},null,8,J4)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.artist.play"))},null,8,X4)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):F("",!0)]),_:1})}const lc=te(I4,[["render",Q4]]),sa={load(e){return Promise.all([V.library_artist(e.params.id),V.library_artist_albums(e.params.id)])},set(e,t){e.artist=t[0].data,e.albums_list=new ye(t[1].data)}},e3={name:"PageArtist",components:{ContentWithHeading:Qe,ControlDropdown:So,ListAlbums:ar,ModalDialogArtist:lc},beforeRouteEnter(e,t,n){sa.load(e).then(r=>{n(o=>sa.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;sa.load(e).then(o=>{sa.set(r,o),n()})},data(){return{artist:{},albums_list:new ye,grouping_options:[{id:1,name:this.$t("page.artist.sort.name"),options:{index:{field:"name_sort",type:String}}},{id:2,name:this.$t("page.artist.sort.release-date"),options:{criteria:[{field:"date_released",type:Date}],index:{field:"date_released",type:Date}}}],show_details_modal:!1}},computed:{albums(){const e=this.grouping_options.find(t=>t.id===this.selected_grouping_option_id);return e.options.filters=[t=>!this.hide_spotify||t.data_kind!=="spotify"],this.albums_list.group(e.options),this.albums_list},hide_spotify:{get(){return this.$store.state.hide_spotify},set(e){this.$store.commit(_i,e)}},selected_grouping_option_id:{get(){return this.$store.state.artist_albums_sort},set(e){this.$store.commit(fh,e)}},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},track_count(){return[...this.albums].reduce((e,t)=>e+(t.isItem?t.item.track_count:0),0)}},methods:{open_tracks(){this.$router.push({name:"music-artist-tracks",params:{id:this.artist.id}})},play(){V.player_play_uri(this.albums.items.map(e=>e.uri).join(","),!0)}}},t3={class:"columns"},n3={class:"column"},r3=["textContent"],o3={key:0,class:"field"},s3={class:"control"},i3=["textContent"],a3=["textContent"],l3={class:"column"},c3=["textContent"],u3=["textContent"],d3={class:"buttons is-centered"},m3=["textContent"],f3={class:"heading has-text-centered-mobile"},p3=["textContent"],h3=c("span",null," | ",-1),_3=["textContent"];function g3(e,t,n,r,o,s){const i=$("control-dropdown"),a=$("mdicon"),l=$("list-albums"),u=$("modal-dialog-artist"),m=$("content-with-heading");return k(),A("div",null,[y(m,null,{options:S(()=>[c("div",t3,[c("div",n3,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.filter"))},null,8,r3),s.spotify_enabled?(k(),A("div",o3,[c("div",s3,[yt(c("input",{id:"switchHideSpotify","onUpdate:modelValue":t[0]||(t[0]=d=>s.hide_spotify=d),type:"checkbox",class:"switch is-rounded"},null,512),[[An,s.hide_spotify]]),c("label",{for:"switchHideSpotify",textContent:g(e.$t("page.artist.hide-spotify"))},null,8,i3)]),c("p",{class:"help",textContent:g(e.$t("page.artist.hide-spotify-help"))},null,8,a3)])):F("",!0)]),c("div",l3,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort.title"))},null,8,c3),y(i,{value:s.selected_grouping_option_id,"onUpdate:value":t[1]||(t[1]=d=>s.selected_grouping_option_id=d),options:o.grouping_options},null,8,["value","options"])])])]),"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(o.artist.name)},null,8,u3)]),"heading-right":S(()=>[c("div",d3,[c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=d=>o.show_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[3]||(t[3]=(...d)=>s.play&&s.play(...d))},[y(a,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.artist.shuffle"))},null,8,m3)])])]),content:S(()=>[c("p",f3,[c("span",{textContent:g(e.$t("page.artist.album-count",{count:s.albums.count}))},null,8,p3),h3,c("a",{class:"has-text-link",onClick:t[4]||(t[4]=(...d)=>s.open_tracks&&s.open_tracks(...d)),textContent:g(e.$t("page.artist.track-count",{count:s.track_count}))},null,8,_3)]),y(l,{albums:s.albums,hide_group_title:!0},null,8,["albums"]),y(u,{show:o.show_details_modal,artist:o.artist,onClose:t[5]||(t[5]=d=>o.show_details_modal=!1)},null,8,["show","artist"])]),_:1})])}const y3=te(e3,[["render",g3]]),v3={name:"ListItemAlbumSpotify",props:{album:{required:!0,type:Object}}},b3={class:"media is-align-items-center"},z3={key:0,class:"media-left is-clickable"},w3={class:"media-content is-clickable is-clipped"},C3=["textContent"],k3=["textContent"],x3=["textContent"],S3={class:"media-right"};function E3(e,t,n,r,o,s){return k(),A("div",b3,[e.$slots.artwork?(k(),A("div",z3,[st(e.$slots,"artwork")])):F("",!0),c("div",w3,[c("h1",{class:"title is-6",textContent:g(n.album.name)},null,8,C3),c("h2",{class:"subtitle is-7 has-text-grey has-text-weight-bold",textContent:g(n.album.artists[0].name)},null,8,k3),c("h2",{class:"subtitle is-7 has-text-grey",textContent:g([n.album.album_type,e.$filters.date(n.album.release_date)].join(", "))},null,8,x3)]),c("div",S3,[st(e.$slots,"actions")])])}const cc=te(v3,[["render",E3]]),$3={name:"ModalDialogArtistSpotify",props:{artist:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{play(){this.$emit("close"),V.player_play_uri(this.artist.uri,!1)},queue_add(){this.$emit("close"),V.queue_add(this.artist.uri)},queue_add_next(){this.$emit("close"),V.queue_add_next(this.artist.uri)},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.artist.id}})}}},T3={key:0,class:"modal is-active"},A3={class:"modal-content"},O3={class:"card"},P3={class:"card-content"},I3={class:"title is-4"},D3=["textContent"],R3={class:"content is-small"},N3=["textContent"],L3=["textContent"],M3=["textContent"],F3=["textContent"],V3={class:"card-footer"},H3=["textContent"],U3=["textContent"],j3=["textContent"];function B3(e,t,n,r,o,s){const i=$("mdicon");return k(),ce(Dt,{name:"fade"},{default:S(()=>[n.show?(k(),A("div",T3,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",A3,[c("div",O3,[c("div",P3,[c("p",I3,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open_artist&&s.open_artist(...a)),textContent:g(n.artist.name)},null,8,D3)]),c("div",R3,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.artist.popularity"))},null,8,N3),c("span",{class:"title is-6",textContent:g([n.artist.popularity,n.artist.followers.total].join(" / "))},null,8,L3)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.artist.genres"))},null,8,M3),c("span",{class:"title is-6",textContent:g(n.artist.genres.join(", "))},null,8,F3)])])]),c("footer",V3,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.artist.add"))},null,8,H3)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[y(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.artist.add-next"))},null,8,U3)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.artist.play"))},null,8,j3)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):F("",!0)]),_:1})}const k1=te($3,[["render",B3]]);function W3(e){return e.scrollHeight}function q3(e){return e.scrollWidth}function G3(e,t){e.scrollTop=e.scrollHeight-t+e.scrollTop}function K3(e,t){e.scrollLeft=e.scrollWidth-t+e.scrollLeft}const Z3=c("div",{class:"loading"},"Loading...",-1),Y3=c("div",{class:"no-more"},"No more.",-1),J3=c("div",{class:"no-results"},"No results.",-1),X3=c("div",{class:"error"},"Error.",-1),cm=vr({__name:"VueEternalLoading",props:{load:{required:!0,type:Function},isInitial:{required:!1,type:Boolean,default:!0},position:{required:!1,type:String,default:"default"},container:{required:!1,type:Object,default:null},margin:{required:!1,type:String,default:void 0}},emits:["update:isInitial"],setup(e,{emit:t}){const n=e,r=nr();let o=nr("loading"),s=nr(n.isInitial),i=0;function a(){ms(()=>{var v,z;n.position==="top"?G3((v=n.container)!=null?v:document.documentElement,i):n.position==="left"&&K3((z=n.container)!=null?z:document.documentElement,i)})}function l(v,z){return v===0?s.value?(m(),"no-results"):(u(),"no-more"):v!==void 0&&z!==void 0&&v{var z,E;v.isIntersecting&&(n.position==="top"?i=W3((z=n.container)!=null?z:document.documentElement):n.position==="left"&&(i=q3((E=n.container)!=null?E:document.documentElement)),_(),n.load({loaded:l,noMore:u,noResults:m,error:d},{isFirstLoad:s.value}))},{root:n.container,threshold:0,rootMargin:n.margin})}let C;return typeof IntersectionObserver<"u"&&Xh(()=>{C&&_(),C=w(),b()},{flush:"post"}),vn(()=>n.isInitial,v=>{v&&f()}),vn(s,v=>{v||t("update:isInitial",!1)}),(v,z)=>(k(),A("div",{class:"vue-eternal-loading",ref_key:"rootRef",ref:r},[gn(o)==="loading"?st(v.$slots,"loading",Ps(Fo({key:0},{isFirstLoad:gn(s)})),()=>[Z3]):gn(o)==="no-more"?st(v.$slots,"no-more",Ps(Fo({key:1},{retry:p})),()=>[Y3]):gn(o)==="no-results"?st(v.$slots,"no-results",Ps(Fo({key:2},{retry:p})),()=>[J3]):gn(o)==="error"?st(v.$slots,"error",Ps(Fo({key:3},{retry:p})),()=>[X3]):F("",!0)],512))}}),qu=50,ia={load(e){const t=new Kn;return t.setAccessToken(je.state.spotify.webapi_token),Promise.all([t.getArtist(e.params.id),t.getArtistAlbums(e.params.id,{limit:qu,offset:0,include_groups:"album,single",market:je.state.spotify.webapi_country})])},set(e,t){e.artist=t[0],e.albums=[],e.total=0,e.offset=0,e.append_albums(t[1])}},Q3={name:"PageArtistSpotify",components:{ContentWithHeading:Qe,CoverArtwork:Dn,ListItemAlbumSpotify:cc,ModalDialogAlbumSpotify:Oi,ModalDialogArtistSpotify:k1,VueEternalLoading:cm},beforeRouteEnter(e,t,n){ia.load(e).then(r=>{n(o=>ia.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;ia.load(e).then(o=>{ia.set(r,o),n()})},data(){return{albums:[],artist:{},offset:0,selected_album:{},show_album_details_modal:!1,show_details_modal:!1,total:0}},computed:{is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{load_next({loaded:e}){const t=new Kn;t.setAccessToken(this.$store.state.spotify.webapi_token),t.getArtistAlbums(this.artist.id,{limit:qu,offset:this.offset,include_groups:"album,single"}).then(n=>{this.append_albums(n),e(n.items.length,qu)})},append_albums(e){this.albums=this.albums.concat(e.items),this.total=e.total,this.offset+=e.limit},play(){this.show_album_details_modal=!1,V.player_play_uri(this.artist.uri,!0)},open_album(e){this.$router.push({name:"music-spotify-album",params:{id:e.id}})},open_dialog(e){this.selected_album=e,this.show_album_details_modal=!0},artwork_url(e){return e.images&&e.images.length>0?e.images[0].url:""}}},eD=["textContent"],tD={class:"buttons is-centered"},nD=["textContent"],rD=["textContent"],oD=["onClick"],sD={class:"columns is-centered"},iD={class:"column has-text-centered"};function aD(e,t,n,r,o,s){const i=$("mdicon"),a=$("cover-artwork"),l=$("list-item-album-spotify"),u=$("VueEternalLoading"),m=$("modal-dialog-artist-spotify"),d=$("modal-dialog-album-spotify"),f=$("content-with-heading");return k(),A("div",null,[y(f,null,{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(o.artist.name)},null,8,eD)]),"heading-right":S(()=>[c("div",tD,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=p=>o.show_details_modal=!0)},[y(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...p)=>s.play&&s.play(...p))},[y(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.spotify.artist.shuffle"))},null,8,nD)])])]),content:S(()=>[c("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.spotify.artist.album-count",{count:o.total}))},null,8,rD),(k(!0),A(Ce,null,ct(o.albums,p=>(k(),ce(l,{key:p.id,album:p,onClick:h=>s.open_album(p)},Ci({actions:S(()=>[c("a",{onClick:rt(h=>s.open_dialog(p),["prevent","stop"])},[y(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,oD)]),_:2},[s.is_visible_artwork?{name:"artwork",fn:S(()=>[y(a,{artwork_url:s.artwork_url(p),artist:p.artist,album:p.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image"},null,8,["artwork_url","artist","album"])]),key:"0"}:void 0]),1032,["album","onClick"]))),128)),o.offset[c("div",sD,[c("div",iD,[y(i,{class:"icon mdi-spin",name:"loading"})])])]),"no-more":S(()=>[gt(" ")]),_:1},8,["load"])):F("",!0),y(m,{show:o.show_details_modal,artist:o.artist,onClose:t[2]||(t[2]=p=>o.show_details_modal=!1)},null,8,["show","artist"]),y(d,{show:o.show_album_details_modal,album:o.selected_album,onClose:t[3]||(t[3]=p=>o.show_album_details_modal=!1)},null,8,["show","album"])]),_:1})])}const lD=te(Q3,[["render",aD]]),aa={load(e){return Promise.all([V.library_artist(e.params.id),V.library_artist_tracks(e.params.id)])},set(e,t){e.artist=t[0].data,e.tracks_list=new ye(t[1].data.tracks)}},cD={name:"PageArtistTracks",components:{ContentWithHeading:Qe,ControlDropdown:So,IndexButtonList:Zn,ListTracks:zn,ModalDialogArtist:lc},beforeRouteEnter(e,t,n){aa.load(e).then(r=>{n(o=>aa.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;aa.load(e).then(o=>{aa.set(r,o),n()})},data(){return{artist:{},grouping_options:[{id:1,name:this.$t("page.artist.sort.name"),options:{index:{field:"title_sort",type:String}}},{id:2,name:this.$t("page.artist.sort.rating"),options:{criteria:[{field:"rating",type:Number,order:-1}],index:{field:"rating",type:"Digits"}}}],show_details_modal:!1,tracks_list:new ye}},computed:{album_count(){return new Set([...this.tracks].filter(e=>e.isItem).map(e=>e.item.album_id)).size},hide_spotify:{get(){return this.$store.state.hide_spotify},set(e){this.$store.commit(_i,e)}},selected_grouping_option_id:{get(){return this.$store.state.artist_tracks_sort},set(e){this.$store.commit(ph,e)}},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},tracks(){const e=this.grouping_options.find(t=>t.id===this.selected_grouping_option_id);return e.options.filters=[t=>!this.hide_spotify||t.data_kind!=="spotify"],this.tracks_list.group(e.options),this.tracks_list},track_uris(){return this.tracks_list.items.map(e=>e.uri).join(",")}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"music-artist",params:{id:this.artist.id}})},play(){V.player_play_uri(this.tracks_list.items.map(e=>e.uri).join(","),!0)}}},uD={class:"columns"},dD={class:"column"},mD=["textContent"],fD={key:0,class:"field"},pD={class:"control"},hD=["textContent"],_D=["textContent"],gD={class:"column"},yD=["textContent"],vD=["textContent"],bD={class:"buttons is-centered"},zD=["textContent"],wD={class:"heading has-text-centered-mobile"},CD=["textContent"],kD=c("span",null," | ",-1),xD=["textContent"];function SD(e,t,n,r,o,s){const i=$("index-button-list"),a=$("control-dropdown"),l=$("mdicon"),u=$("list-tracks"),m=$("modal-dialog-artist"),d=$("content-with-heading");return k(),A("div",null,[y(d,null,{options:S(()=>[y(i,{indices:s.tracks.indices},null,8,["indices"]),c("div",uD,[c("div",dD,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.filter"))},null,8,mD),s.spotify_enabled?(k(),A("div",fD,[c("div",pD,[yt(c("input",{id:"switchHideSpotify","onUpdate:modelValue":t[0]||(t[0]=f=>s.hide_spotify=f),type:"checkbox",class:"switch is-rounded"},null,512),[[An,s.hide_spotify]]),c("label",{for:"switchHideSpotify",textContent:g(e.$t("page.artist.hide-spotify"))},null,8,hD)]),c("p",{class:"help",textContent:g(e.$t("page.artist.hide-spotify-help"))},null,8,_D)])):F("",!0)]),c("div",gD,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort.title"))},null,8,yD),y(a,{value:s.selected_grouping_option_id,"onUpdate:value":t[1]||(t[1]=f=>s.selected_grouping_option_id=f),options:o.grouping_options},null,8,["value","options"])])])]),"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(o.artist.name)},null,8,vD)]),"heading-right":S(()=>[c("div",bD,[c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=f=>o.show_details_modal=!0)},[y(l,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[3]||(t[3]=(...f)=>s.play&&s.play(...f))},[y(l,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.artist.shuffle"))},null,8,zD)])])]),content:S(()=>[c("p",wD,[c("a",{class:"has-text-link",onClick:t[4]||(t[4]=(...f)=>s.open_artist&&s.open_artist(...f)),textContent:g(e.$t("page.artist.album-count",{count:s.album_count}))},null,8,CD),kD,c("span",{textContent:g(e.$t("page.artist.track-count",{count:s.tracks.count}))},null,8,xD)]),y(u,{tracks:s.tracks,uris:s.track_uris},null,8,["tracks","uris"]),y(m,{show:o.show_details_modal,artist:o.artist,onClose:t[5]||(t[5]=f=>o.show_details_modal=!1)},null,8,["show","artist"])]),_:1})])}const ED=te(cD,[["render",SD]]),$D={name:"ListArtists",components:{ModalDialogArtist:lc},props:{artists:{required:!0,type:Object},hide_group_title:Boolean},data(){return{show_details_modal:!1,selected_artist:{}}},methods:{open_artist(e){this.selected_artist=e;const t=e.media_kind==="audiobook"?"audiobooks-artist":"music-artist";this.$router.push({name:t,params:{id:e.id}})},open_dialog(e){this.selected_artist=e,this.show_details_modal=!0}}},TD={key:0,class:"mt-6 mb-5 py-2"},AD={class:"media-content is-clipped"},OD=["id","textContent"],PD=["onClick"],ID={class:"media-content is-clickable is-clipped"},DD=["textContent"],RD={class:"media-right"},ND=["onClick"];function LD(e,t,n,r,o,s){const i=$("mdicon"),a=$("modal-dialog-artist");return k(),A(Ce,null,[(k(!0),A(Ce,null,ct(n.artists,l=>(k(),A(Ce,{key:l.itemId},[!l.isItem&&!n.hide_group_title?(k(),A("div",TD,[c("div",AD,[c("span",{id:"index_"+l.index,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.index)},null,8,OD)])])):l.isItem?(k(),A("div",{key:1,class:"media is-align-items-center",onClick:u=>s.open_artist(l.item)},[c("div",ID,[c("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,DD)]),c("div",RD,[c("a",{onClick:rt(u=>s.open_dialog(l.item),["prevent","stop"])},[y(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,ND)])],8,PD)):F("",!0)],64))),128)),(k(),ce(Kr,{to:"#app"},[y(a,{artist:o.selected_artist,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["artist","show"])]))],64)}const um=te($D,[["render",LD]]),la={load(e){return V.library_artists("music")},set(e,t){e.artists_list=new ye(t.data)}},MD={name:"PageArtists",components:{ContentWithHeading:Qe,ControlDropdown:So,IndexButtonList:Zn,ListArtists:um,TabsMusic:lr},beforeRouteEnter(e,t,n){la.load(e).then(r=>{n(o=>la.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;la.load(e).then(o=>{la.set(r,o),n()})},data(){return{artists_list:new ye,grouping_options:[{id:1,name:this.$t("page.artists.sort.name"),options:{index:{field:"name_sort",type:String}}},{id:2,name:this.$t("page.artists.sort.recently-added"),options:{criteria:[{field:"time_added",type:Date,order:-1}],index:{field:"time_added",type:Date}}}]}},computed:{artists(){if(!this.artists_list)return[];const e=this.grouping_options.find(t=>t.id===this.selected_grouping_option_id);return e.options.filters=[t=>!this.hide_singles||t.track_count>t.album_count*2,t=>!this.hide_spotify||t.data_kind!=="spotify"],this.artists_list.group(e.options),this.artists_list},selected_grouping_option_id:{get(){return this.$store.state.artists_sort},set(e){this.$store.commit(mh,e)}},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},hide_singles:{get(){return this.$store.state.hide_singles},set(e){this.$store.commit(Sl,e)}},hide_spotify:{get(){return this.$store.state.hide_spotify},set(e){this.$store.commit(_i,e)}}}},FD={class:"fd-page-with-tabs"},VD={class:"columns"},HD={class:"column"},UD=["textContent"],jD={class:"field"},BD={class:"control"},WD=["textContent"],qD=["textContent"],GD={key:0,class:"field"},KD={class:"control"},ZD=["textContent"],YD=["textContent"],JD={class:"column"},XD=["textContent"],QD=["textContent"],eR=["textContent"];function tR(e,t,n,r,o,s){const i=$("tabs-music"),a=$("index-button-list"),l=$("control-dropdown"),u=$("list-artists"),m=$("content-with-heading");return k(),A("div",FD,[y(i),y(m,null,{options:S(()=>[y(a,{indices:s.artists.indices},null,8,["indices"]),c("div",VD,[c("div",HD,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artists.filter"))},null,8,UD),c("div",jD,[c("div",BD,[yt(c("input",{id:"switchHideSingles","onUpdate:modelValue":t[0]||(t[0]=d=>s.hide_singles=d),type:"checkbox",class:"switch is-rounded"},null,512),[[An,s.hide_singles]]),c("label",{for:"switchHideSingles",textContent:g(e.$t("page.artists.hide-singles"))},null,8,WD)]),c("p",{class:"help",textContent:g(e.$t("page.artists.hide-singles-help"))},null,8,qD)]),s.spotify_enabled?(k(),A("div",GD,[c("div",KD,[yt(c("input",{id:"switchHideSpotify","onUpdate:modelValue":t[1]||(t[1]=d=>s.hide_spotify=d),type:"checkbox",class:"switch is-rounded"},null,512),[[An,s.hide_spotify]]),c("label",{for:"switchHideSpotify",textContent:g(e.$t("page.artists.hide-spotify"))},null,8,ZD)]),c("p",{class:"help",textContent:g(e.$t("page.artists.hide-spotify-help"))},null,8,YD)])):F("",!0)]),c("div",JD,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artists.sort.title"))},null,8,XD),y(l,{value:s.selected_grouping_option_id,"onUpdate:value":t[2]||(t[2]=d=>s.selected_grouping_option_id=d),options:o.grouping_options},null,8,["value","options"])])])]),"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.artists.title"))},null,8,QD),c("p",{class:"heading",textContent:g(e.$t("page.artists.count",{count:s.artists.count}))},null,8,eR)]),"heading-right":S(()=>[]),content:S(()=>[y(u,{artists:s.artists},null,8,["artists"])]),_:1})])}const nR=te(MD,[["render",tR]]),ca={load(e){return Promise.all([V.library_album(e.params.id),V.library_album_tracks(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new ye(t[1].data)}},rR={name:"PageAudiobooksAlbum",components:{ContentWithHero:ic,CoverArtwork:Dn,ListTracks:zn,ModalDialogAlbum:ac},beforeRouteEnter(e,t,n){ca.load(e).then(r=>{n(o=>ca.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;ca.load(e).then(o=>{ca.set(r,o),n()})},data(){return{album:{},show_details_modal:!1,tracks:new ye}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"audiobooks-artist",params:{id:this.album.artist_id}})},play(){V.player_play_uri(this.album.uri,!1)}}},oR=["textContent"],sR={class:"subtitle is-6 has-text-link"},iR=["textContent"],aR={class:"buttons fd-is-centered-mobile mt-5"},lR=["textContent"],cR=["textContent"];function uR(e,t,n,r,o,s){const i=$("mdicon"),a=$("cover-artwork"),l=$("list-tracks"),u=$("modal-dialog-album"),m=$("content-with-hero");return k(),A("div",null,[y(m,null,{"heading-left":S(()=>[c("h1",{class:"title is-5",textContent:g(o.album.name)},null,8,oR),c("h2",sR,[c("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...d)=>s.open_artist&&s.open_artist(...d)),textContent:g(o.album.artist)},null,8,iR)]),c("div",aR,[c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>s.play&&s.play(...d))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{textContent:g(e.$t("page.audiobooks.album.play"))},null,8,lR)]),c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=d=>o.show_details_modal=!0)},[y(i,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":S(()=>[y(a,{artwork_url:o.album.artwork_url,artist:o.album.artist,album:o.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=d=>o.show_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:S(()=>[c("p",{class:"heading has-text-centered-mobile mt-5",textContent:g(e.$t("page.audiobooks.album.track-count",{count:o.album.track_count}))},null,8,cR),y(l,{tracks:o.tracks,uris:o.album.uri},null,8,["tracks","uris"]),y(u,{show:o.show_details_modal,album:o.album,media_kind:"audiobook",onClose:t[4]||(t[4]=d=>o.show_details_modal=!1)},null,8,["show","album"])]),_:1})])}const dR=te(rR,[["render",uR]]),mR={name:"TabsAudiobooks"},fR={class:"section fd-tabs-section"},pR={class:"container"},hR={class:"columns is-centered"},_R={class:"column is-four-fifths"},gR={class:"tabs is-centered is-small"},yR=["onClick","onKeypress"],vR=["textContent"],bR=["onClick","onKeypress"],zR=["textContent"],wR=["onClick","onKeypress"],CR=["textContent"];function kR(e,t,n,r,o,s){const i=$("mdicon"),a=$("router-link");return k(),A("section",fR,[c("div",pR,[c("div",hR,[c("div",_R,[c("div",gR,[c("ul",null,[y(a,{to:{name:"audiobooks-artists"},custom:""},{default:S(({navigate:l,isActive:u})=>[c("li",{class:Ee({"is-active":u})},[c("a",{onClick:l,onKeypress:on(l,["enter"])},[y(i,{class:"icon is-small",name:"account-music",size:"16"}),c("span",{textContent:g(e.$t("page.audiobooks.tabs.authors"))},null,8,vR)],40,yR)],2)]),_:1}),y(a,{to:{name:"audiobooks-albums"},custom:""},{default:S(({navigate:l,isActive:u})=>[c("li",{class:Ee({"is-active":u})},[c("a",{onClick:l,onKeypress:on(l,["enter"])},[y(i,{class:"icon is-small",name:"album",size:"16"}),c("span",{textContent:g(e.$t("page.audiobooks.tabs.audiobooks"))},null,8,zR)],40,bR)],2)]),_:1}),y(a,{to:{name:"audiobooks-genres"},custom:""},{default:S(({navigate:l,isActive:u})=>[c("li",{class:Ee({"is-active":u})},[c("a",{onClick:l,onKeypress:on(l,["enter"])},[y(i,{class:"icon is-small",name:"speaker",size:"16"}),c("span",{textContent:g(e.$t("page.audiobooks.tabs.genres"))},null,8,CR)],40,wR)],2)]),_:1})])])])])])])}const dm=te(mR,[["render",kR]]),ua={load(e){return V.library_albums("audiobook")},set(e,t){e.albums=new ye(t.data,{index:{field:"name_sort",type:String}})}},xR={name:"PageAudiobooksAlbums",components:{TabsAudiobooks:dm,ContentWithHeading:Qe,IndexButtonList:Zn,ListAlbums:ar},beforeRouteEnter(e,t,n){ua.load(e).then(r=>{n(o=>ua.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;ua.load(e).then(o=>{ua.set(r,o),n()})},data(){return{albums:new ye}}},SR={class:"fd-page-with-tabs"},ER=["textContent"],$R=["textContent"];function TR(e,t,n,r,o,s){const i=$("tabs-audiobooks"),a=$("index-button-list"),l=$("list-albums"),u=$("content-with-heading");return k(),A("div",SR,[y(i),y(u,null,{options:S(()=>[y(a,{indices:o.albums.indices},null,8,["indices"])]),"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.audiobooks.albums.title"))},null,8,ER),c("p",{class:"heading",textContent:g(e.$t("page.audiobooks.albums.count",{count:o.albums.count}))},null,8,$R)]),content:S(()=>[y(l,{albums:o.albums},null,8,["albums"])]),_:1})])}const AR=te(xR,[["render",TR]]),da={load(e){return Promise.all([V.library_artist(e.params.id),V.library_artist_albums(e.params.id)])},set(e,t){e.artist=t[0].data,e.albums=new ye(t[1].data)}},OR={name:"PageAudiobooksArtist",components:{ContentWithHeading:Qe,ListAlbums:ar,ModalDialogArtist:lc},beforeRouteEnter(e,t,n){da.load(e).then(r=>{n(o=>da.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;da.load(e).then(o=>{da.set(r,o),n()})},data(){return{albums:new ye,artist:{},show_details_modal:!1}},methods:{play(){V.player_play_uri(this.albums.items.map(e=>e.uri).join(","),!1)}}},PR=["textContent"],IR={class:"buttons is-centered"},DR=["textContent"],RR=["textContent"];function NR(e,t,n,r,o,s){const i=$("mdicon"),a=$("list-albums"),l=$("modal-dialog-artist"),u=$("content-with-heading");return k(),A("div",null,[y(u,null,{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(o.artist.name)},null,8,PR)]),"heading-right":S(()=>[c("div",IR,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>o.show_details_modal=!0)},[y(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>s.play&&s.play(...m))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{textContent:g(e.$t("page.audiobooks.artist.play"))},null,8,DR)])])]),content:S(()=>[c("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.audiobooks.artist.album-count",{count:o.artist.album_count}))},null,8,RR),y(a,{albums:o.albums},null,8,["albums"]),y(l,{show:o.show_details_modal,artist:o.artist,onClose:t[2]||(t[2]=m=>o.show_details_modal=!1)},null,8,["show","artist"])]),_:1})])}const LR=te(OR,[["render",NR]]),ma={load(e){return V.library_artists("audiobook")},set(e,t){e.artists=new ye(t.data,{index:{field:"name_sort",type:String}})}},MR={name:"PageAudiobooksArtists",components:{ContentWithHeading:Qe,TabsAudiobooks:dm,IndexButtonList:Zn,ListArtists:um},beforeRouteEnter(e,t,n){ma.load(e).then(r=>{n(o=>ma.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;ma.load(e).then(o=>{ma.set(r,o),n()})},data(){return{artists:new ye}}},FR={class:"fd-page-with-tabs"},VR=["textContent"],HR=["textContent"];function UR(e,t,n,r,o,s){const i=$("tabs-audiobooks"),a=$("index-button-list"),l=$("list-artists"),u=$("content-with-heading");return k(),A("div",FR,[y(i),y(u,null,{options:S(()=>[y(a,{indices:o.artists.indices},null,8,["indices"])]),"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.audiobooks.artists.title"))},null,8,VR),c("p",{class:"heading",textContent:g(e.$t("page.audiobooks.artists.count",{count:o.artists.count}))},null,8,HR)]),"heading-right":S(()=>[]),content:S(()=>[y(l,{artists:o.artists},null,8,["artists"])]),_:1})])}const jR=te(MR,[["render",UR]]),BR={name:"ModalDialogGenre",props:{genre:{required:!0,type:Object},media_kind:{required:!0,type:String},show:Boolean},emits:["close"],computed:{expression(){return`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`}},methods:{play(){this.$emit("close"),V.player_play_expression(this.expression,!1)},queue_add(){this.$emit("close"),V.queue_expression_add(this.expression)},queue_add_next(){this.$emit("close"),V.queue_expression_add_next(this.expression)},open_genre(){this.$emit("close"),this.$router.push({name:"genre-albums",params:{name:this.genre.name},query:{media_kind:this.media_kind}})}}},WR={key:0,class:"modal is-active"},qR={class:"modal-content"},GR={class:"card"},KR={class:"card-content"},ZR={class:"title is-4"},YR=["textContent"],JR={class:"content is-small"},XR=["textContent"],QR=["textContent"],eN=["textContent"],tN=["textContent"],nN=["textContent"],rN=["textContent"],oN={class:"card-footer"},sN=["textContent"],iN=["textContent"],aN=["textContent"];function lN(e,t,n,r,o,s){const i=$("mdicon");return k(),ce(Dt,{name:"fade"},{default:S(()=>[n.show?(k(),A("div",WR,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",qR,[c("div",GR,[c("div",KR,[c("p",ZR,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open_genre&&s.open_genre(...a)),textContent:g(n.genre.name)},null,8,YR)]),c("div",JR,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.genre.albums"))},null,8,XR),c("span",{class:"title is-6",textContent:g(n.genre.album_count)},null,8,QR)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.genre.tracks"))},null,8,eN),c("span",{class:"title is-6",textContent:g(n.genre.track_count)},null,8,tN)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.genre.duration"))},null,8,nN),c("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.genre.length_ms))},null,8,rN)])])]),c("footer",oN,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.genre.add"))},null,8,sN)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[y(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.genre.add-next"))},null,8,iN)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.genre.play"))},null,8,aN)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):F("",!0)]),_:1})}const mm=te(BR,[["render",lN]]),cN={name:"ListGenres",components:{ModalDialogGenre:mm},props:{genres:{required:!0,type:Object},hide_group_title:Boolean,media_kind:{required:!0,type:String}},data(){return{show_details_modal:!1,selected_genre:{}}},methods:{open_genre(e){this.$router.push({name:"genre-albums",params:{name:e.name},query:{media_kind:this.media_kind}})},open_dialog(e){this.selected_genre=e,this.show_details_modal=!0}}},uN={key:0,class:"mt-6 mb-5 py-2"},dN={class:"media-content is-clipped"},mN=["id","textContent"],fN=["onClick"],pN={class:"media-content is-clickable is-clipped"},hN=["textContent"],_N={class:"media-right"},gN=["onClick"];function yN(e,t,n,r,o,s){const i=$("mdicon"),a=$("modal-dialog-genre");return k(),A(Ce,null,[(k(!0),A(Ce,null,ct(n.genres,l=>(k(),A(Ce,{key:l.itemId},[!l.isItem&&!n.hide_group_title?(k(),A("div",uN,[c("div",dN,[c("span",{id:"index_"+l.index,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.index)},null,8,mN)])])):l.isItem?(k(),A("div",{key:1,class:"media is-align-items-center",onClick:u=>s.open_genre(l.item)},[c("div",pN,[c("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,hN)]),c("div",_N,[c("a",{onClick:rt(u=>s.open_dialog(l.item),["prevent","stop"])},[y(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,gN)])],8,fN)):F("",!0)],64))),128)),(k(),ce(Kr,{to:"#app"},[y(a,{show:o.show_details_modal,genre:o.selected_genre,media_kind:n.media_kind,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["show","genre","media_kind"])]))],64)}const x1=te(cN,[["render",yN]]),fa={load(e){return V.library_genres("audiobook")},set(e,t){e.genres=new ye(t.data,{index:{field:"name_sort",type:String}})}},vN={name:"PageAudiobooksGenres",components:{ContentWithHeading:Qe,IndexButtonList:Zn,ListGenres:x1,TabsAudiobooks:dm},beforeRouteEnter(e,t,n){fa.load(e).then(r=>{n(o=>fa.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;fa.load(e).then(o=>{fa.set(r,o),n()})},data(){return{genres:new ye}}},bN={class:"fd-page-with-tabs"},zN=["textContent"],wN=["textContent"];function CN(e,t,n,r,o,s){const i=$("tabs-audiobooks"),a=$("index-button-list"),l=$("list-genres"),u=$("content-with-heading");return k(),A("div",bN,[y(i),y(u,null,{options:S(()=>[y(a,{indices:o.genres.indices},null,8,["indices"])]),"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.genres.title"))},null,8,zN),c("p",{class:"heading",textContent:g(e.$t("page.genres.count",{count:o.genres.total}))},null,8,wN)]),content:S(()=>[y(l,{genres:o.genres,media_kind:"audiobook"},null,8,["genres"])]),_:1})])}const kN=te(vN,[["render",CN]]),xN={name:"ModalDialogComposer",props:{composer:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{play(){this.$emit("close"),V.player_play_expression(`composer is "${this.composer.name}" and media_kind is music`,!1)},queue_add(){this.$emit("close"),V.queue_expression_add(`composer is "${this.composer.name}" and media_kind is music`)},queue_add_next(){this.$emit("close"),V.queue_expression_add_next(`composer is "${this.composer.name}" and media_kind is music`)},open_albums(){this.$emit("close"),this.$router.push({name:"music-composer-albums",params:{name:this.composer.name}})},open_tracks(){this.$router.push({name:"music-composer-tracks",params:{name:this.composer.name}})}}},SN={key:0,class:"modal is-active"},EN={class:"modal-content"},$N={class:"card"},TN={class:"card-content"},AN={class:"title is-4"},ON=["textContent"],PN=["textContent"],IN=["textContent"],DN=["textContent"],RN=["textContent"],NN=["textContent"],LN=["textContent"],MN={class:"card-footer"},FN=["textContent"],VN=["textContent"],HN=["textContent"];function UN(e,t,n,r,o,s){const i=$("mdicon");return k(),ce(Dt,{name:"fade"},{default:S(()=>[n.show?(k(),A("div",SN,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",EN,[c("div",$N,[c("div",TN,[c("p",AN,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open_albums&&s.open_albums(...a)),textContent:g(n.composer.name)},null,8,ON)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.composer.albums"))},null,8,PN),c("a",{class:"has-text-link is-6",onClick:t[2]||(t[2]=(...a)=>s.open_albums&&s.open_albums(...a)),textContent:g(n.composer.album_count)},null,8,IN)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.composer.tracks"))},null,8,DN),c("a",{class:"has-text-link is-6",onClick:t[3]||(t[3]=(...a)=>s.open_tracks&&s.open_tracks(...a)),textContent:g(n.composer.track_count)},null,8,RN)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.composer.duration"))},null,8,NN),c("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.composer.length_ms))},null,8,LN)])]),c("footer",MN,[c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.queue_add&&s.queue_add(...a))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.composer.add"))},null,8,FN)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[y(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.composer.add-next"))},null,8,VN)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...a)=>s.play&&s.play(...a))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.composer.play"))},null,8,HN)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[7]||(t[7]=a=>e.$emit("close"))})])):F("",!0)]),_:1})}const fm=te(xN,[["render",UN]]),pa={load(e){return Promise.all([V.library_composer(e.params.name),V.library_composer_albums(e.params.name)])},set(e,t){e.composer=t[0].data,e.albums=new ye(t[1].data.albums)}},jN={name:"PageComposerAlbums",components:{ContentWithHeading:Qe,ListAlbums:ar,ModalDialogComposer:fm},beforeRouteEnter(e,t,n){pa.load(e).then(r=>{n(o=>pa.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;pa.load(e).then(o=>{pa.set(r,o),n()})},data(){return{albums:new ye,composer:{},show_details_modal:!1}},methods:{open_tracks(){this.$router.push({name:"music-composer-tracks",params:{name:this.composer.name}})},play(){V.player_play_expression(`composer is "${this.composer.name}" and media_kind is music`,!0)}}},BN=["textContent"],WN={class:"buttons is-centered"},qN=["textContent"],GN={class:"heading has-text-centered-mobile"},KN=["textContent"],ZN=c("span",null," | ",-1),YN=["textContent"];function JN(e,t,n,r,o,s){const i=$("mdicon"),a=$("list-albums"),l=$("modal-dialog-composer"),u=$("content-with-heading");return k(),A("div",null,[y(u,null,{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(o.composer.name)},null,8,BN)]),"heading-right":S(()=>[c("div",WN,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>o.show_details_modal=!0)},[y(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>s.play&&s.play(...m))},[y(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.composer.shuffle"))},null,8,qN)])])]),content:S(()=>[c("p",GN,[c("span",{textContent:g(e.$t("page.composer.album-count",{count:o.composer.album_count}))},null,8,KN),ZN,c("a",{class:"has-text-link",onClick:t[2]||(t[2]=(...m)=>s.open_tracks&&s.open_tracks(...m)),textContent:g(e.$t("page.composer.track-count",{count:o.composer.track_count}))},null,8,YN)]),y(a,{albums:o.albums,hide_group_title:!0},null,8,["albums"]),y(l,{show:o.show_details_modal,composer:o.composer,onClose:t[3]||(t[3]=m=>o.show_details_modal=!1)},null,8,["show","composer"])]),_:1})])}const XN=te(jN,[["render",JN]]),ha={load(e){return Promise.all([V.library_composer(e.params.name),V.library_composer_tracks(e.params.name)])},set(e,t){e.composer=t[0].data,e.tracks_list=new ye(t[1].data.tracks)}},QN={name:"PageComposerTracks",components:{ContentWithHeading:Qe,ControlDropdown:So,IndexButtonList:Zn,ListTracks:zn,ModalDialogComposer:fm},beforeRouteEnter(e,t,n){ha.load(e).then(r=>{n(o=>ha.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;ha.load(e).then(o=>{ha.set(r,o),n()})},data(){return{composer:{},grouping_options:[{id:1,name:this.$t("page.composer.sort.name"),options:{index:{field:"title_sort",type:String}}},{id:2,name:this.$t("page.composer.sort.rating"),options:{criteria:[{field:"rating",type:Number,order:-1}],index:{field:"rating",type:"Digits"}}}],show_details_modal:!1,tracks_list:new ye}},computed:{expression(){return`composer is "${this.composer.name}" and media_kind is music`},selected_grouping_option_id:{get(){return this.$store.state.composer_tracks_sort},set(e){this.$store.commit(uh,e)}},tracks(){const e=this.grouping_options.find(t=>t.id===this.selected_grouping_option_id);return this.tracks_list.group(e.options),this.tracks_list}},methods:{open_albums(){this.show_details_modal=!1,this.$router.push({name:"music-composer-albums",params:{name:this.composer.name}})},play(){V.player_play_expression(this.expression,!0)}}},eL={class:"columns"},tL={class:"column"},nL=["textContent"],rL=["textContent"],oL={class:"buttons is-centered"},sL=["textContent"],iL={class:"heading has-text-centered-mobile"},aL=["textContent"],lL=c("span",null," | ",-1),cL=["textContent"];function uL(e,t,n,r,o,s){const i=$("index-button-list"),a=$("control-dropdown"),l=$("mdicon"),u=$("list-tracks"),m=$("modal-dialog-composer"),d=$("content-with-heading");return k(),A("div",null,[y(d,null,{options:S(()=>[y(i,{indices:s.tracks.indices},null,8,["indices"]),c("div",eL,[c("div",tL,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort.title"))},null,8,nL),y(a,{value:s.selected_grouping_option_id,"onUpdate:value":t[0]||(t[0]=f=>s.selected_grouping_option_id=f),options:o.grouping_options},null,8,["value","options"])])])]),"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(o.composer.name)},null,8,rL)]),"heading-right":S(()=>[c("div",oL,[c("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>o.show_details_modal=!0)},[y(l,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...f)=>s.play&&s.play(...f))},[y(l,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.composer.shuffle"))},null,8,sL)])])]),content:S(()=>[c("p",iL,[c("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...f)=>s.open_albums&&s.open_albums(...f)),textContent:g(e.$t("page.composer.album-count",{count:o.composer.album_count}))},null,8,aL),lL,c("span",{textContent:g(e.$t("page.composer.track-count",{count:o.composer.track_count}))},null,8,cL)]),y(u,{tracks:s.tracks,expression:s.expression},null,8,["tracks","expression"]),y(m,{show:o.show_details_modal,composer:o.composer,onClose:t[4]||(t[4]=f=>o.show_details_modal=!1)},null,8,["show","composer"])]),_:1})])}const dL=te(QN,[["render",uL]]),mL={name:"ListComposers",components:{ModalDialogComposer:fm},props:{composers:{required:!0,type:Object},hide_group_title:Boolean,media_kind:{default:"",type:String}},data(){return{show_details_modal:!1,selected_composer:{}}},methods:{open_composer(e){this.selected_composer=e,this.$router.push({name:"music-composer-albums",params:{name:e.name}})},open_dialog(e){this.selected_composer=e,this.show_details_modal=!0}}},fL={key:0,class:"mt-6 mb-5 py-2"},pL={class:"media-content is-clipped"},hL=["id","textContent"],_L=["onClick"],gL={class:"media-content is-clickable is-clipped"},yL=["textContent"],vL={class:"media-right"},bL=["onClick"];function zL(e,t,n,r,o,s){const i=$("mdicon"),a=$("modal-dialog-composer");return k(),A(Ce,null,[(k(!0),A(Ce,null,ct(n.composers,l=>(k(),A(Ce,{key:l.itemId},[!l.isItem&&!n.hide_group_title?(k(),A("div",fL,[c("div",pL,[c("span",{id:"index_"+l.index,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.index)},null,8,hL)])])):l.isItem?(k(),A("div",{key:1,class:"media is-align-items-center",onClick:u=>s.open_composer(l.item)},[c("div",gL,[c("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,yL)]),c("div",vL,[c("a",{onClick:rt(u=>s.open_dialog(l.item),["prevent","stop"])},[y(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,bL)])],8,_L)):F("",!0)],64))),128)),(k(),ce(Kr,{to:"#app"},[y(a,{show:o.show_details_modal,composer:o.selected_composer,media_kind:n.media_kind,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["show","composer","media_kind"])]))],64)}const S1=te(mL,[["render",zL]]),_a={load(e){return V.library_composers("music")},set(e,t){e.composers=new ye(t.data,{index:{field:"name_sort",type:String}})}},wL={name:"PageComposers",components:{ContentWithHeading:Qe,IndexButtonList:Zn,ListComposers:S1,TabsMusic:lr},beforeRouteEnter(e,t,n){_a.load(e).then(r=>{n(o=>_a.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;_a.load(e).then(o=>{_a.set(r,o),n()})},data(){return{composers:new ye}}},CL={class:"fd-page-with-tabs"},kL=["textContent"],xL=["textContent"];function SL(e,t,n,r,o,s){const i=$("tabs-music"),a=$("index-button-list"),l=$("list-composers"),u=$("content-with-heading");return k(),A("div",CL,[y(i),y(u,null,{options:S(()=>[y(a,{indices:o.composers.indices},null,8,["indices"])]),"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.composers.title"))},null,8,kL),c("p",{class:"heading",textContent:g(e.$t("page.composers.count",{count:o.composers.total}))},null,8,xL)]),content:S(()=>[y(l,{composers:o.composers},null,8,["composers"])]),_:1})])}const EL=te(wL,[["render",SL]]),$L={name:"ModalDialogDirectory",props:{directory:{required:!0,type:String},show:Boolean},emits:["close"],methods:{play(){this.$emit("close"),V.player_play_expression(`path starts with "${this.directory}" order by path asc`,!1)},queue_add(){this.$emit("close"),V.queue_expression_add(`path starts with "${this.directory}" order by path asc`)},queue_add_next(){this.$emit("close"),V.queue_expression_add_next(`path starts with "${this.directory}" order by path asc`)}}},TL={key:0,class:"modal is-active"},AL={class:"modal-content"},OL={class:"card"},PL={class:"card-content"},IL=["textContent"],DL={class:"card-footer"},RL=["textContent"],NL=["textContent"],LL=["textContent"];function ML(e,t,n,r,o,s){const i=$("mdicon");return k(),ce(Dt,{name:"fade"},{default:S(()=>[n.show?(k(),A("div",TL,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",AL,[c("div",OL,[c("div",PL,[c("p",{class:"title is-4",textContent:g(n.directory)},null,8,IL)]),c("footer",DL,[c("a",{class:"card-footer-item has-text-dark",onClick:t[1]||(t[1]=(...a)=>s.queue_add&&s.queue_add(...a))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.directory.add"))},null,8,RL)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[y(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.directory.add-next"))},null,8,NL)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.play&&s.play(...a))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.directory.play"))},null,8,LL)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[4]||(t[4]=a=>e.$emit("close"))})])):F("",!0)]),_:1})}const E1=te($L,[["render",ML]]),FL={name:"ListDirectories",components:{ModalDialogDirectory:E1},props:{directories:{required:!0,type:Array}},data(){return{show_details_modal:!1,selected_directory:""}},computed:{current_directory(){return this.$route.query&&this.$route.query.directory?this.$route.query.directory:"/"}},methods:{open_parent_directory(){this.current_directory.slice(0,this.current_directory.lastIndexOf("/"))===""||this.$store.state.config.directories.includes(this.current_directory)?this.$router.push({name:"files"}):this.$router.push({name:"files",query:{directory:this.current_directory.slice(0,this.current_directory.lastIndexOf("/"))}})},open_directory(e){this.$router.push({name:"files",query:{directory:e.path}})},open_dialog(e){this.selected_directory=e.path,this.show_details_modal=!0}}},VL={class:"media-left is-clickable"},HL=c("div",{class:"media-content is-clickable is-clipped"},[c("h1",{class:"title is-6"},"..")],-1),UL={class:"media-right"},jL=["onClick"],BL={class:"media-left is-clickable"},WL={class:"media-content is-clickable is-clipped"},qL=["textContent"],GL=["textContent"],KL={class:"media-right"},ZL=["onClick"];function YL(e,t,n,r,o,s){const i=$("mdicon"),a=$("modal-dialog-directory");return k(),A(Ce,null,[e.$route.query.directory?(k(),A("div",{key:0,class:"media is-align-items-center",onClick:t[0]||(t[0]=l=>s.open_parent_directory())},[c("figure",VL,[y(i,{class:"icon",name:"subdirectory-arrow-left",size:"16"})]),HL,c("div",UL,[st(e.$slots,"actions")])])):F("",!0),(k(!0),A(Ce,null,ct(n.directories,l=>(k(),A("div",{key:l.path,class:"media is-align-items-center",onClick:u=>s.open_directory(l)},[c("figure",BL,[y(i,{class:"icon",name:"folder",size:"16"})]),c("div",WL,[c("h1",{class:"title is-6",textContent:g(l.path.substring(l.path.lastIndexOf("/")+1))},null,8,qL),c("h2",{class:"subtitle is-7 has-text-grey",textContent:g(l.path)},null,8,GL)]),c("div",KL,[c("a",{onClick:rt(u=>s.open_dialog(l),["prevent","stop"])},[y(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,ZL)])],8,jL))),128)),(k(),ce(Kr,{to:"#app"},[y(a,{show:o.show_details_modal,directory:o.selected_directory,onClose:t[1]||(t[1]=l=>o.show_details_modal=!1)},null,8,["show","directory"])]))],64)}const JL=te(FL,[["render",YL]]),XL={name:"ModalDialogPlaylist",props:{playlist:{required:!0,type:Object},show:Boolean,uris:{default:"",type:String}},emits:["close"],methods:{play(){this.$emit("close"),V.player_play_uri(this.uris?this.uris:this.playlist.uri,!1)},queue_add(){this.$emit("close"),V.queue_add(this.uris?this.uris:this.playlist.uri)},queue_add_next(){this.$emit("close"),V.queue_add_next(this.uris?this.uris:this.playlist.uri)},open_playlist(){this.$emit("close"),this.$router.push({name:"playlist",params:{id:this.playlist.id}})}}},QL={key:0,class:"modal is-active"},eM={class:"modal-content"},tM={class:"card"},nM={class:"card-content"},rM={class:"title is-4"},oM=["textContent"],sM={class:"content is-small"},iM=["textContent"],aM=["textContent"],lM=["textContent"],cM=["textContent"],uM={key:0},dM=["textContent"],mM=["textContent"],fM={key:0,class:"card-footer"},pM=["textContent"],hM=["textContent"],_M=["textContent"];function gM(e,t,n,r,o,s){const i=$("mdicon");return k(),ce(Dt,{name:"fade"},{default:S(()=>[n.show?(k(),A("div",QL,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",eM,[c("div",tM,[c("div",nM,[c("p",rM,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open_playlist&&s.open_playlist(...a)),textContent:g(n.playlist.name)},null,8,oM)]),c("div",sM,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.playlist.path"))},null,8,iM),c("span",{class:"title is-6",textContent:g(n.playlist.path)},null,8,aM)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.playlist.type"))},null,8,lM),c("span",{class:"title is-6",textContent:g(e.$t("playlist.type."+n.playlist.type))},null,8,cM)]),n.playlist.folder?F("",!0):(k(),A("p",uM,[c("span",{class:"heading",textContent:g(e.$t("dialog.playlist.track-count"))},null,8,dM),c("span",{class:"title is-6",textContent:g(n.playlist.item_count)},null,8,mM)]))])]),n.playlist.folder?F("",!0):(k(),A("footer",fM,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.add"))},null,8,pM)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[y(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.add-next"))},null,8,hM)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.play"))},null,8,_M)])]))])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):F("",!0)]),_:1})}const $1=te(XL,[["render",gM]]),yM={name:"ListPlaylists",components:{ModalDialogPlaylist:$1},props:{playlists:{required:!0,type:Object}},data(){return{show_details_modal:!1,selected_playlist:{}}},methods:{open_playlist(e){e.type==="folder"?this.$router.push({name:"playlist-folder",params:{id:e.id}}):this.$router.push({name:"playlist",params:{id:e.id}})},open_dialog(e){this.selected_playlist=e,this.show_details_modal=!0},icon_name(e){return e.type==="folder"?"folder":e.type==="rss"?"rss":"music-box-multiple"}}},vM=["onClick"],bM={class:"media-left is-clickable"},zM={class:"media-content is-clickable is-clipped"},wM=["textContent"],CM={class:"media-right"},kM=["onClick"];function xM(e,t,n,r,o,s){const i=$("mdicon"),a=$("modal-dialog-playlist");return k(),A(Ce,null,[(k(!0),A(Ce,null,ct(n.playlists,l=>(k(),A("div",{key:l.itemId,class:"media is-align-items-center",onClick:u=>s.open_playlist(l.item)},[c("figure",bM,[y(i,{class:"icon",name:s.icon_name(l.item),size:"16"},null,8,["name"])]),c("div",zM,[c("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,wM)]),c("div",CM,[c("a",{onClick:rt(u=>s.open_dialog(l.item),["prevent","stop"])},[y(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,kM)])],8,vM))),128)),(k(),ce(Kr,{to:"#app"},[y(a,{show:o.show_details_modal,playlist:o.selected_playlist,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["show","playlist"])]))],64)}const pm=te(yM,[["render",xM]]),ga={load(e){return e.query.directory?V.library_files(e.query.directory):Promise.resolve()},set(e,t){t?(e.dirs=t.data.directories,e.playlists=new ye(t.data.playlists),e.tracks=new ye(t.data.tracks)):(e.dirs=e.$store.state.config.directories.map(n=>({path:n})),e.playlists=new ye,e.tracks=new ye)}},SM={name:"PageFiles",components:{ContentWithHeading:Qe,ListDirectories:JL,ListPlaylists:pm,ListTracks:zn,ModalDialogDirectory:E1},beforeRouteEnter(e,t,n){ga.load(e).then(r=>{n(o=>ga.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;ga.load(e).then(o=>{ga.set(r,o),n()})},data(){return{dirs:[],playlists:new ye,tracks:new ye,show_details_modal:!1}},computed:{current_directory(){return this.$route.query&&this.$route.query.directory?this.$route.query.directory:"/"},play_expression(){return`path starts with "${this.current_directory}" order by path asc`}},methods:{play(){V.player_play_expression(this.play_expression,!1)}}},EM=["textContent"],$M=["textContent"],TM={class:"buttons is-centered"},AM=["textContent"];function OM(e,t,n,r,o,s){const i=$("mdicon"),a=$("list-directories"),l=$("list-playlists"),u=$("list-tracks"),m=$("modal-dialog-directory"),d=$("content-with-heading");return k(),A("div",null,[y(d,null,{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.files.title"))},null,8,EM),c("p",{class:"title is-7 has-text-grey",textContent:g(s.current_directory)},null,8,$M)]),"heading-right":S(()=>[c("div",TM,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=f=>o.show_details_modal=!0)},[y(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...f)=>s.play&&s.play(...f))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{textContent:g(e.$t("page.files.play"))},null,8,AM)])])]),content:S(()=>[y(a,{directories:o.dirs},null,8,["directories"]),y(l,{playlists:o.playlists},null,8,["playlists"]),y(u,{tracks:o.tracks,expression:s.play_expression,show_icon:!0},null,8,["tracks","expression"]),y(m,{show:o.show_details_modal,directory:s.current_directory,onClose:t[2]||(t[2]=f=>o.show_details_modal=!1)},null,8,["show","directory"])]),_:1})])}const PM=te(SM,[["render",OM]]),ya={load(e){return Promise.all([V.library_genre(e.params.name,e.query.media_kind),V.library_genre_albums(e.params.name,e.query.media_kind)])},set(e,t){e.genre=t[0].data,e.albums=new ye(t[1].data.albums,{index:{field:"name_sort",type:String}})}},IM={name:"PageGenreAlbums",components:{ContentWithHeading:Qe,IndexButtonList:Zn,ListAlbums:ar,ModalDialogGenre:mm},beforeRouteEnter(e,t,n){ya.load(e).then(r=>{n(o=>ya.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;ya.load(e).then(o=>{ya.set(r,o),n()})},data(){return{albums:new ye,genre:{},media_kind:this.$route.query.media_kind,show_details_modal:!1}},methods:{open_tracks(){this.show_details_modal=!1,this.$router.push({name:"genre-tracks",params:{name:this.genre.name},query:{media_kind:this.media_kind}})},play(){V.player_play_expression(`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`,!0)}}},DM=["textContent"],RM={class:"buttons is-centered"},NM=["textContent"],LM={class:"heading has-text-centered-mobile"},MM=["textContent"],FM=c("span",null," | ",-1),VM=["textContent"];function HM(e,t,n,r,o,s){const i=$("index-button-list"),a=$("mdicon"),l=$("list-albums"),u=$("modal-dialog-genre"),m=$("content-with-heading");return k(),A("div",null,[y(m,null,{options:S(()=>[y(i,{indices:o.albums.indices},null,8,["indices"])]),"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(o.genre.name)},null,8,DM)]),"heading-right":S(()=>[c("div",RM,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=d=>o.show_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>s.play&&s.play(...d))},[y(a,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.genre.shuffle"))},null,8,NM)])])]),content:S(()=>[c("p",LM,[c("span",{textContent:g(e.$t("page.genre.album-count",{count:o.genre.album_count}))},null,8,MM),FM,c("a",{class:"has-text-link",onClick:t[2]||(t[2]=(...d)=>s.open_tracks&&s.open_tracks(...d)),textContent:g(e.$t("page.genre.track-count",{count:o.genre.track_count}))},null,8,VM)]),y(l,{albums:o.albums},null,8,["albums"]),y(u,{genre:o.genre,media_kind:o.media_kind,show:o.show_details_modal,onClose:t[3]||(t[3]=d=>o.show_details_modal=!1)},null,8,["genre","media_kind","show"])]),_:1})])}const UM=te(IM,[["render",HM]]),va={load(e){return Promise.all([V.library_genre(e.params.name,e.query.media_kind),V.library_genre_tracks(e.params.name,e.query.media_kind)])},set(e,t){e.genre=t[0].data,e.tracks_list=new ye(t[1].data.tracks)}},jM={name:"PageGenreTracks",components:{ContentWithHeading:Qe,ControlDropdown:So,IndexButtonList:Zn,ListTracks:zn,ModalDialogGenre:mm},beforeRouteEnter(e,t,n){va.load(e).then(r=>{n(o=>va.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;va.load(e).then(o=>{va.set(r,o),n()})},data(){return{genre:{},grouping_options:[{id:1,name:this.$t("page.genre.sort.name"),options:{index:{field:"title_sort",type:String}}},{id:2,name:this.$t("page.genre.sort.rating"),options:{criteria:[{field:"rating",type:Number,order:-1}],index:{field:"rating",type:"Digits"}}}],media_kind:this.$route.query.media_kind,show_details_modal:!1,tracks_list:new ye}},computed:{expression(){return`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`},selected_grouping_option_id:{get(){return this.$store.state.genre_tracks_sort},set(e){this.$store.commit(dh,e)}},tracks(){const e=this.grouping_options.find(t=>t.id===this.selected_grouping_option_id);return this.tracks_list.group(e.options),this.tracks_list}},methods:{open_genre(){this.show_details_modal=!1,this.$router.push({name:"genre-albums",params:{name:this.genre.name},query:{media_kind:this.media_kind}})},play(){V.player_play_expression(this.expression,!0)}}},BM={class:"columns"},WM={class:"column"},qM=["textContent"],GM=["textContent"],KM={class:"buttons is-centered"},ZM=["textContent"],YM={class:"heading has-text-centered-mobile"},JM=["textContent"],XM=c("span",null," | ",-1),QM=["textContent"];function e7(e,t,n,r,o,s){const i=$("index-button-list"),a=$("control-dropdown"),l=$("mdicon"),u=$("list-tracks"),m=$("modal-dialog-genre"),d=$("content-with-heading");return k(),A("div",null,[y(d,null,{options:S(()=>[y(i,{indices:s.tracks.indices},null,8,["indices"]),c("div",BM,[c("div",WM,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.genre.sort.title"))},null,8,qM),y(a,{value:s.selected_grouping_option_id,"onUpdate:value":t[0]||(t[0]=f=>s.selected_grouping_option_id=f),options:o.grouping_options},null,8,["value","options"])])])]),"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(o.genre.name)},null,8,GM)]),"heading-right":S(()=>[c("div",KM,[c("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>o.show_details_modal=!0)},[y(l,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...f)=>s.play&&s.play(...f))},[y(l,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.genre.shuffle"))},null,8,ZM)])])]),content:S(()=>[c("p",YM,[c("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...f)=>s.open_genre&&s.open_genre(...f)),textContent:g(e.$t("page.genre.album-count",{count:o.genre.album_count}))},null,8,JM),XM,c("span",{textContent:g(e.$t("page.genre.track-count",{count:o.genre.track_count}))},null,8,QM)]),y(u,{tracks:s.tracks,expression:s.expression},null,8,["tracks","expression"]),y(m,{show:o.show_details_modal,genre:o.genre,media_kind:o.media_kind,onClose:t[4]||(t[4]=f=>o.show_details_modal=!1)},null,8,["show","genre","media_kind"])]),_:1})])}const t7=te(jM,[["render",e7]]),ba={load(e){return V.library_genres("music")},set(e,t){e.genres=new ye(t.data,{index:{field:"name_sort",type:String}})}},n7={name:"PageGenres",components:{ContentWithHeading:Qe,IndexButtonList:Zn,ListGenres:x1,TabsMusic:lr},beforeRouteEnter(e,t,n){ba.load(e).then(r=>{n(o=>ba.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;ba.load(e).then(o=>{ba.set(r,o),n()})},data(){return{genres:new ye}}},r7={class:"fd-page-with-tabs"},o7=["textContent"],s7=["textContent"];function i7(e,t,n,r,o,s){const i=$("tabs-music"),a=$("index-button-list"),l=$("list-genres"),u=$("content-with-heading");return k(),A("div",r7,[y(i),y(u,null,{options:S(()=>[y(a,{indices:o.genres.indices},null,8,["indices"])]),"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.genres.title"))},null,8,o7),c("p",{class:"heading",textContent:g(e.$t("page.genres.count",{count:o.genres.total}))},null,8,s7)]),content:S(()=>[y(l,{genres:o.genres,media_kind:"music"},null,8,["genres"])]),_:1})])}const a7=te(n7,[["render",i7]]),za={load(e){return Promise.all([V.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}),V.search({type:"track",expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:3})])},set(e,t){e.recently_added=new ye(t[0].data.albums),e.recently_played=new ye(t[1].data.tracks)}},l7={name:"PageMusic",components:{ContentWithHeading:Qe,ListAlbums:ar,ListTracks:zn,TabsMusic:lr},beforeRouteEnter(e,t,n){za.load(e).then(r=>{n(o=>za.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;za.load(e).then(o=>{za.set(r,o),n()})},data(){return{recently_added:[],recently_played:{items:[]},selected_track:{}}}},c7={class:"fd-page-with-tabs"},u7=["textContent"],d7={class:"level"},m7={class:"level-item"},f7=["textContent"],p7={class:"level"},h7={class:"level-item"};function _7(e,t,n,r,o,s){const i=$("tabs-music"),a=$("list-albums"),l=$("router-link"),u=$("content-with-heading"),m=$("list-tracks");return k(),A("div",c7,[y(i),y(u,null,{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-added.title"))},null,8,u7)]),content:S(()=>[y(a,{albums:o.recently_added},null,8,["albums"])]),footer:S(()=>[c("nav",d7,[c("p",m7,[y(l,{class:"button is-light is-small is-rounded",to:{name:"music-recently-added"}},{default:S(()=>[gt(g(e.$t("page.music.show-more")),1)]),_:1})])])]),_:1}),y(u,null,{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-played.title"))},null,8,f7)]),content:S(()=>[y(m,{tracks:o.recently_played},null,8,["tracks"])]),footer:S(()=>[c("nav",p7,[c("p",h7,[y(l,{class:"button is-light is-small is-rounded",to:{name:"music-recently-played"}},{default:S(()=>[gt(g(e.$t("page.music.show-more")),1)]),_:1})])])]),_:1})])}const g7=te(l7,[["render",_7]]),wa={load(e){const t=je.getters.settings_option_recently_added_limit;return V.search({type:"album",expression:"media_kind is music having track_count > 3 order by time_added desc",limit:t})},set(e,t){e.recently_added=new ye(t.data.albums,{criteria:[{field:"time_added",type:Date,order:-1}],index:{field:"time_added",type:Date}})}},y7={name:"PageMusicRecentlyAdded",components:{ContentWithHeading:Qe,ListAlbums:ar,TabsMusic:lr},beforeRouteEnter(e,t,n){wa.load(e).then(r=>{n(o=>wa.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;wa.load(e).then(o=>{wa.set(r,o),n()})},data(){return{recently_added:new ye}}},v7={class:"fd-page-with-tabs"},b7=["textContent"];function z7(e,t,n,r,o,s){const i=$("tabs-music"),a=$("list-albums"),l=$("content-with-heading");return k(),A("div",v7,[y(i),y(l,null,{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-added.title"))},null,8,b7)]),content:S(()=>[y(a,{albums:o.recently_added},null,8,["albums"])]),_:1})])}const w7=te(y7,[["render",z7]]),Ca={load(e){return V.search({type:"track",expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:50})},set(e,t){e.recently_played=new ye(t.data.tracks)}},C7={name:"PageMusicRecentlyPlayed",components:{ContentWithHeading:Qe,ListTracks:zn,TabsMusic:lr},beforeRouteEnter(e,t,n){Ca.load(e).then(r=>{n(o=>Ca.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;Ca.load(e).then(o=>{Ca.set(r,o),n()})},data(){return{recently_played:{}}}},k7={class:"fd-page-with-tabs"},x7=["textContent"];function S7(e,t,n,r,o,s){const i=$("tabs-music"),a=$("list-tracks"),l=$("content-with-heading");return k(),A("div",k7,[y(i),y(l,null,{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-played.title"))},null,8,x7)]),content:S(()=>[y(a,{tracks:o.recently_played},null,8,["tracks"])]),_:1})])}const E7=te(C7,[["render",S7]]),$7={name:"ListItemPlaylistSpotify",props:{playlist:{required:!0,type:Object}},methods:{open_playlist(){this.$router.push({name:"playlist-spotify",params:{id:this.playlist.id}})}}},T7={class:"media is-align-items-center"},A7=["textContent"],O7=["textContent"],P7={class:"media-right"};function I7(e,t,n,r,o,s){return k(),A("div",T7,[c("div",{class:"media-content is-clickable is-clipped",onClick:t[0]||(t[0]=(...i)=>s.open_playlist&&s.open_playlist(...i))},[c("h1",{class:"title is-6",textContent:g(n.playlist.name)},null,8,A7),c("h2",{class:"subtitle is-7",textContent:g(n.playlist.owner.display_name)},null,8,O7)]),c("div",P7,[st(e.$slots,"actions")])])}const hm=te($7,[["render",I7]]),D7={name:"ModalDialogPlaylistSpotify",props:{playlist:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{play(){this.$emit("close"),V.player_play_uri(this.playlist.uri,!1)},queue_add(){this.$emit("close"),V.queue_add(this.playlist.uri)},queue_add_next(){this.$emit("close"),V.queue_add_next(this.playlist.uri)},open_playlist(){this.$emit("close"),this.$router.push({name:"playlist-spotify",params:{id:this.playlist.id}})}}},R7={key:0,class:"modal is-active"},N7={class:"modal-content"},L7={class:"card"},M7={class:"card-content"},F7={class:"title is-4"},V7=["textContent"],H7={class:"content is-small"},U7=["textContent"],j7=["textContent"],B7=["textContent"],W7=["textContent"],q7=["textContent"],G7=["textContent"],K7={class:"card-footer"},Z7=["textContent"],Y7=["textContent"],J7=["textContent"];function X7(e,t,n,r,o,s){const i=$("mdicon");return k(),ce(Dt,{name:"fade"},{default:S(()=>[n.show?(k(),A("div",R7,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",N7,[c("div",L7,[c("div",M7,[c("p",F7,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open_playlist&&s.open_playlist(...a)),textContent:g(n.playlist.name)},null,8,V7)]),c("div",H7,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.owner"))},null,8,U7),c("span",{class:"title is-6",textContent:g(n.playlist.owner.display_name)},null,8,j7)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.tracks"))},null,8,B7),c("span",{class:"title is-6",textContent:g(n.playlist.tracks.total)},null,8,W7)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.path"))},null,8,q7),c("span",{class:"title is-6",textContent:g(n.playlist.uri)},null,8,G7)])])]),c("footer",K7,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.playlist.add"))},null,8,Z7)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[y(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.playlist.add-next"))},null,8,Y7)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.playlist.play"))},null,8,J7)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):F("",!0)]),_:1})}const uc=te(D7,[["render",X7]]),ka={load(e){if(je.state.spotify_new_releases.length>0&&je.state.spotify_featured_playlists.length>0)return Promise.resolve();const t=new Kn;return t.setAccessToken(je.state.spotify.webapi_token),Promise.all([t.getNewReleases({country:je.state.spotify.webapi_country,limit:50}),t.getFeaturedPlaylists({country:je.state.spotify.webapi_country,limit:50})])},set(e,t){t&&(je.commit(ed,t[0].albums.items),je.commit(td,t[1].playlists.items))}},Q7={name:"PageMusicSpotify",components:{ContentWithHeading:Qe,CoverArtwork:Dn,ListItemAlbumSpotify:cc,ListItemPlaylistSpotify:hm,ModalDialogAlbumSpotify:Oi,ModalDialogPlaylistSpotify:uc,TabsMusic:lr},beforeRouteEnter(e,t,n){ka.load(e).then(r=>{n(o=>ka.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;ka.load(e).then(o=>{ka.set(r,o),n()})},data(){return{show_album_details_modal:!1,selected_album:{},show_playlist_details_modal:!1,selected_playlist:{}}},computed:{new_releases(){return this.$store.state.spotify_new_releases.slice(0,3)},featured_playlists(){return this.$store.state.spotify_featured_playlists.slice(0,3)},is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{open_album(e){this.$router.push({name:"music-spotify-album",params:{id:e.id}})},open_album_dialog(e){this.selected_album=e,this.show_album_details_modal=!0},open_playlist_dialog(e){this.selected_playlist=e,this.show_playlist_details_modal=!0},artwork_url(e){var t,n;return((n=(t=e.images)==null?void 0:t[0])==null?void 0:n.url)||""}}},eF={class:"fd-page-with-tabs"},tF=["textContent"],nF=["onClick"],rF={class:"level"},oF={class:"level-item"},sF=["textContent"],iF=["onClick"],aF={class:"level"},lF={class:"level-item"};function cF(e,t,n,r,o,s){const i=$("tabs-music"),a=$("cover-artwork"),l=$("mdicon"),u=$("list-item-album-spotify"),m=$("modal-dialog-album-spotify"),d=$("router-link"),f=$("content-with-heading"),p=$("list-item-playlist-spotify"),h=$("modal-dialog-playlist-spotify");return k(),A("div",eF,[y(i),y(f,null,{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.new-releases"))},null,8,tF)]),content:S(()=>[(k(!0),A(Ce,null,ct(s.new_releases,_=>(k(),ce(u,{key:_.id,album:_,onClick:b=>s.open_album(_)},Ci({actions:S(()=>[c("a",{onClick:rt(b=>s.open_album_dialog(_),["prevent","stop"])},[y(l,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,nF)]),_:2},[s.is_visible_artwork?{name:"artwork",fn:S(()=>[y(a,{artwork_url:s.artwork_url(_),artist:_.artist,album:_.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image"},null,8,["artwork_url","artist","album"])]),key:"0"}:void 0]),1032,["album","onClick"]))),128)),y(m,{show:o.show_album_details_modal,album:o.selected_album,onClose:t[0]||(t[0]=_=>o.show_album_details_modal=!1)},null,8,["show","album"])]),footer:S(()=>[c("nav",rF,[c("p",oF,[y(d,{to:{name:"music-spotify-new-releases"},class:"button is-light is-small is-rounded"},{default:S(()=>[gt(g(e.$t("page.spotify.music.show-more")),1)]),_:1})])])]),_:1}),y(f,null,{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.featured-playlists"))},null,8,sF)]),content:S(()=>[(k(!0),A(Ce,null,ct(s.featured_playlists,_=>(k(),ce(p,{key:_.id,playlist:_},{actions:S(()=>[c("a",{onClick:rt(b=>s.open_playlist_dialog(_),["prevent","stop"])},[y(l,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,iF)]),_:2},1032,["playlist"]))),128)),y(h,{show:o.show_playlist_details_modal,playlist:o.selected_playlist,onClose:t[1]||(t[1]=_=>o.show_playlist_details_modal=!1)},null,8,["show","playlist"])]),footer:S(()=>[c("nav",aF,[c("p",lF,[y(d,{to:{name:"music-spotify-featured-playlists"},class:"button is-light is-small is-rounded"},{default:S(()=>[gt(g(e.$t("page.spotify.music.show-more")),1)]),_:1})])])]),_:1})])}const uF=te(Q7,[["render",cF]]),xa={load(e){if(je.state.spotify_featured_playlists.length>0)return Promise.resolve();const t=new Kn;t.setAccessToken(je.state.spotify.webapi_token),t.getFeaturedPlaylists({country:je.state.spotify.webapi_country,limit:50})},set(e,t){t&&je.commit(td,t.playlists.items)}},dF={name:"PageMusicSpotifyFeaturedPlaylists",components:{ContentWithHeading:Qe,ListItemPlaylistSpotify:hm,ModalDialogPlaylistSpotify:uc,TabsMusic:lr},beforeRouteEnter(e,t,n){xa.load(e).then(r=>{n(o=>xa.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;xa.load(e).then(o=>{xa.set(r,o),n()})},data(){return{selected_playlist:{},show_details_modal:!1}},computed:{featured_playlists(){return this.$store.state.spotify_featured_playlists}},methods:{open_playlist_dialog(e){this.selected_playlist=e,this.show_details_modal=!0}}},mF={class:"fd-page-with-tabs"},fF=["textContent"],pF=["onClick"];function hF(e,t,n,r,o,s){const i=$("tabs-music"),a=$("mdicon"),l=$("list-item-playlist-spotify"),u=$("modal-dialog-playlist-spotify"),m=$("content-with-heading");return k(),A("div",mF,[y(i),y(m,null,{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.featured-playlists"))},null,8,fF)]),content:S(()=>[(k(!0),A(Ce,null,ct(s.featured_playlists,d=>(k(),ce(l,{key:d.id,playlist:d},{actions:S(()=>[c("a",{onClick:rt(f=>s.open_playlist_dialog(d),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,pF)]),_:2},1032,["playlist"]))),128)),y(u,{show:o.show_details_modal,playlist:o.selected_playlist,onClose:t[0]||(t[0]=d=>o.show_details_modal=!1)},null,8,["show","playlist"])]),_:1})])}const _F=te(dF,[["render",hF]]),Sa={load(e){if(je.state.spotify_new_releases.length>0)return Promise.resolve();const t=new Kn;return t.setAccessToken(je.state.spotify.webapi_token),t.getNewReleases({country:je.state.spotify.webapi_country,limit:50})},set(e,t){t&&je.commit(ed,t.albums.items)}},gF={name:"PageMusicSpotifyNewReleases",components:{ContentWithHeading:Qe,CoverArtwork:Dn,ListItemAlbumSpotify:cc,ModalDialogAlbumSpotify:Oi,TabsMusic:lr},beforeRouteEnter(e,t,n){Sa.load(e).then(r=>{n(o=>Sa.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;Sa.load(e).then(o=>{Sa.set(r,o),n()})},data(){return{show_details_modal:!1,selected_album:{}}},computed:{new_releases(){return this.$store.state.spotify_new_releases},is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{open_album(e){this.$router.push({name:"music-spotify-album",params:{id:e.id}})},open_album_dialog(e){this.selected_album=e,this.show_details_modal=!0},artwork_url(e){var t,n;return((n=(t=e.images)==null?void 0:t[0])==null?void 0:n.url)||""}}},yF={class:"fd-page-with-tabs"},vF=["textContent"],bF=["onClick"];function zF(e,t,n,r,o,s){const i=$("tabs-music"),a=$("cover-artwork"),l=$("mdicon"),u=$("list-item-album-spotify"),m=$("modal-dialog-album-spotify"),d=$("content-with-heading");return k(),A("div",yF,[y(i),y(d,null,{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.new-releases"))},null,8,vF)]),content:S(()=>[(k(!0),A(Ce,null,ct(s.new_releases,f=>(k(),ce(u,{key:f.id,album:f,onClick:p=>s.open_album(f)},Ci({actions:S(()=>[c("a",{onClick:rt(p=>s.open_album_dialog(f),["prevent","stop"])},[y(l,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,bF)]),_:2},[s.is_visible_artwork?{name:"artwork",fn:S(()=>[y(a,{artwork_url:s.artwork_url(f),artist:f.artist,album:f.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image"},null,8,["artwork_url","artist","album"])]),key:"0"}:void 0]),1032,["album","onClick"]))),128)),y(m,{show:o.show_details_modal,album:o.selected_album,onClose:t[0]||(t[0]=f=>o.show_details_modal=!1)},null,8,["show","album"])]),_:1})])}const wF=te(gF,[["render",zF]]),CF={name:"LyricsPane",data(){return this.lastIndex=-1,this.scrollingTimer=null,this.lastItemId=-1,{autoScrolling:!0}},computed:{is_playing(){return this.player.state==="play"},verse_index(){if(this.lyrics.length&&this.lyrics[0].time){const e=this.player.item_progress_ms/1e3,t=this.lyrics,n=this.player.item_id!==this.lastItemId,r=this.lastIndex>=0&&this.lastIndexe;if((n||r)&&this.reset_scrolling(),this.lastIndexe||this.lastIndex===t.length-1)return this.lastIndex;if(this.lastIndexe)return this.lastIndex+1;let o=0,s=t.length-1,i;for(;o<=s;){i=o+s>>1;const a=t[i],l=t[i+1];if(a.time<=e&&((l==null?void 0:l.time)>e||!l))return i;a.time`;return`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(n)}`},B8={name:"CoverArtwork",props:{album:{default:"",type:String},artist:{default:"",type:String},artwork_url:{default:"",type:String}},emits:["click"],data(){return{font:{family:"sans-serif",weight:"bold"},lifecycle:{error:e=>{e.src=this.dataURI()}},size:600}},computed:{alt_text(){return`${this.artist} - ${this.album}`},caption(){return this.album?this.album.substring(0,2):this.artist?this.artist.substring(0,2):""}},methods:{dataURI(){return j8({alternate:this.alt_text,caption:this.caption,font:this.font,size:this.size})}}};function W8(e,t,n,r,o,s){const i=Cd("lazy");return k(),A("figure",null,[yt(c("img",{onClick:t[0]||(t[0]=a=>e.$emit("click"))},null,512),[[i,{src:n.artwork_url,lifecycle:o.lifecycle}]])])}const Dn=te(B8,[["render",W8]]);var C1={exports:{}};(function(e){var t=function(){var n="https://api.spotify.com/v1",r=null,o=null,s=function(f,p){return f.abort=p,f},i=function(f,p){var h;if(o!==null){var _=o.defer();f(function(b){_.resolve(b)},function(b){_.reject(b)}),h=_.promise}else window.Promise&&(h=new window.Promise(f));return h?new s(h,p):null},a=function(){var f=Array.prototype.slice.call(arguments),p=f[0],h=f.slice(1);return p=p||{},h.forEach(function(_){for(var b in _)_.hasOwnProperty(b)&&(p[b]=_[b])}),p},l=function(f,p){var h="";for(var _ in p)if(p.hasOwnProperty(_)){var b=p[_];h+=encodeURIComponent(_)+"="+encodeURIComponent(b)+"&"}return h.length>0&&(h=h.substring(0,h.length-1),f=f+"?"+h),f},u=function(f,p){var h=new XMLHttpRequest,_=function(b,w){function C(x){b&&b(x),p&&p(null,x)}function v(){w&&w(h),p&&p(h,null)}var z=f.type||"GET";if(h.open(z,l(f.url,f.params)),r&&h.setRequestHeader("Authorization","Bearer "+r),h.onreadystatechange=function(){if(h.readyState===4){var x=null;try{x=h.responseText?JSON.parse(h.responseText):""}catch(M){console.error(M)}h.status>=200&&h.status<300?C(x):v()}},z==="GET")h.send(null);else{var E=null;f.postData&&(f.contentType==="image/jpeg"?(E=f.postData,h.setRequestHeader("Content-Type",f.contentType)):(E=JSON.stringify(f.postData),h.setRequestHeader("Content-Type","application/json"))),h.send(E)}};return p?(_(),null):i(_,function(){h.abort()})},m=function(f,p,h,_){var b={},w=null;typeof p=="object"?(b=p,w=h):typeof p=="function"&&(w=p);var C=f.type||"GET";return C!=="GET"&&f.postData&&!_?f.postData=a(f.postData,b):f.params=a(f.params,b),u(f,w)},d=function(){};return d.prototype={constructor:t},d.prototype.getGeneric=function(f,p){var h={url:f};return m(h,p)},d.prototype.getMe=function(f,p){var h={url:n+"/me"};return m(h,f,p)},d.prototype.getMySavedTracks=function(f,p){var h={url:n+"/me/tracks"};return m(h,f,p)},d.prototype.addToMySavedTracks=function(f,p,h){var _={url:n+"/me/tracks",type:"PUT",postData:f};return m(_,p,h)},d.prototype.removeFromMySavedTracks=function(f,p,h){var _={url:n+"/me/tracks",type:"DELETE",postData:f};return m(_,p,h)},d.prototype.containsMySavedTracks=function(f,p,h){var _={url:n+"/me/tracks/contains",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getMySavedAlbums=function(f,p){var h={url:n+"/me/albums"};return m(h,f,p)},d.prototype.addToMySavedAlbums=function(f,p,h){var _={url:n+"/me/albums",type:"PUT",postData:f};return m(_,p,h)},d.prototype.removeFromMySavedAlbums=function(f,p,h){var _={url:n+"/me/albums",type:"DELETE",postData:f};return m(_,p,h)},d.prototype.containsMySavedAlbums=function(f,p,h){var _={url:n+"/me/albums/contains",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getMyTopArtists=function(f,p){var h={url:n+"/me/top/artists"};return m(h,f,p)},d.prototype.getMyTopTracks=function(f,p){var h={url:n+"/me/top/tracks"};return m(h,f,p)},d.prototype.getMyRecentlyPlayedTracks=function(f,p){var h={url:n+"/me/player/recently-played"};return m(h,f,p)},d.prototype.followUsers=function(f,p){var h={url:n+"/me/following/",type:"PUT",params:{ids:f.join(","),type:"user"}};return m(h,p)},d.prototype.followArtists=function(f,p){var h={url:n+"/me/following/",type:"PUT",params:{ids:f.join(","),type:"artist"}};return m(h,p)},d.prototype.followPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f+"/followers",type:"PUT",postData:{}};return m(_,p,h)},d.prototype.unfollowUsers=function(f,p){var h={url:n+"/me/following/",type:"DELETE",params:{ids:f.join(","),type:"user"}};return m(h,p)},d.prototype.unfollowArtists=function(f,p){var h={url:n+"/me/following/",type:"DELETE",params:{ids:f.join(","),type:"artist"}};return m(h,p)},d.prototype.unfollowPlaylist=function(f,p){var h={url:n+"/playlists/"+f+"/followers",type:"DELETE"};return m(h,p)},d.prototype.isFollowingUsers=function(f,p){var h={url:n+"/me/following/contains",type:"GET",params:{ids:f.join(","),type:"user"}};return m(h,p)},d.prototype.isFollowingArtists=function(f,p){var h={url:n+"/me/following/contains",type:"GET",params:{ids:f.join(","),type:"artist"}};return m(h,p)},d.prototype.areFollowingPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f+"/followers/contains",type:"GET",params:{ids:p.join(",")}};return m(_,h)},d.prototype.getFollowedArtists=function(f,p){var h={url:n+"/me/following",type:"GET",params:{type:"artist"}};return m(h,f,p)},d.prototype.getUser=function(f,p,h){var _={url:n+"/users/"+encodeURIComponent(f)};return m(_,p,h)},d.prototype.getUserPlaylists=function(f,p,h){var _;return typeof f=="string"?_={url:n+"/users/"+encodeURIComponent(f)+"/playlists"}:(_={url:n+"/me/playlists"},h=p,p=f),m(_,p,h)},d.prototype.getPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f};return m(_,p,h)},d.prototype.getPlaylistTracks=function(f,p,h){var _={url:n+"/playlists/"+f+"/tracks"};return m(_,p,h)},d.prototype.getPlaylistCoverImage=function(f,p){var h={url:n+"/playlists/"+f+"/images"};return m(h,p)},d.prototype.createPlaylist=function(f,p,h){var _={url:n+"/users/"+encodeURIComponent(f)+"/playlists",type:"POST",postData:p};return m(_,p,h)},d.prototype.changePlaylistDetails=function(f,p,h){var _={url:n+"/playlists/"+f,type:"PUT",postData:p};return m(_,p,h)},d.prototype.addTracksToPlaylist=function(f,p,h,_){var b={url:n+"/playlists/"+f+"/tracks",type:"POST",postData:{uris:p}};return m(b,h,_,!0)},d.prototype.replaceTracksInPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f+"/tracks",type:"PUT",postData:{uris:p}};return m(_,{},h)},d.prototype.reorderTracksInPlaylist=function(f,p,h,_,b){var w={url:n+"/playlists/"+f+"/tracks",type:"PUT",postData:{range_start:p,insert_before:h}};return m(w,_,b)},d.prototype.removeTracksFromPlaylist=function(f,p,h){var _=p.map(function(w){return typeof w=="string"?{uri:w}:w}),b={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{tracks:_}};return m(b,{},h)},d.prototype.removeTracksFromPlaylistWithSnapshotId=function(f,p,h,_){var b=p.map(function(C){return typeof C=="string"?{uri:C}:C}),w={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{tracks:b,snapshot_id:h}};return m(w,{},_)},d.prototype.removeTracksFromPlaylistInPositions=function(f,p,h,_){var b={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{positions:p,snapshot_id:h}};return m(b,{},_)},d.prototype.uploadCustomPlaylistCoverImage=function(f,p,h){var _={url:n+"/playlists/"+f+"/images",type:"PUT",postData:p.replace(/^data:image\/jpeg;base64,/,""),contentType:"image/jpeg"};return m(_,{},h)},d.prototype.getAlbum=function(f,p,h){var _={url:n+"/albums/"+f};return m(_,p,h)},d.prototype.getAlbumTracks=function(f,p,h){var _={url:n+"/albums/"+f+"/tracks"};return m(_,p,h)},d.prototype.getAlbums=function(f,p,h){var _={url:n+"/albums/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getTrack=function(f,p,h){var _={};return _.url=n+"/tracks/"+f,m(_,p,h)},d.prototype.getTracks=function(f,p,h){var _={url:n+"/tracks/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getArtist=function(f,p,h){var _={url:n+"/artists/"+f};return m(_,p,h)},d.prototype.getArtists=function(f,p,h){var _={url:n+"/artists/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getArtistAlbums=function(f,p,h){var _={url:n+"/artists/"+f+"/albums"};return m(_,p,h)},d.prototype.getArtistTopTracks=function(f,p,h,_){var b={url:n+"/artists/"+f+"/top-tracks",params:{country:p}};return m(b,h,_)},d.prototype.getArtistRelatedArtists=function(f,p,h){var _={url:n+"/artists/"+f+"/related-artists"};return m(_,p,h)},d.prototype.getFeaturedPlaylists=function(f,p){var h={url:n+"/browse/featured-playlists"};return m(h,f,p)},d.prototype.getNewReleases=function(f,p){var h={url:n+"/browse/new-releases"};return m(h,f,p)},d.prototype.getCategories=function(f,p){var h={url:n+"/browse/categories"};return m(h,f,p)},d.prototype.getCategory=function(f,p,h){var _={url:n+"/browse/categories/"+f};return m(_,p,h)},d.prototype.getCategoryPlaylists=function(f,p,h){var _={url:n+"/browse/categories/"+f+"/playlists"};return m(_,p,h)},d.prototype.search=function(f,p,h,_){var b={url:n+"/search/",params:{q:f,type:p.join(",")}};return m(b,h,_)},d.prototype.searchAlbums=function(f,p,h){return this.search(f,["album"],p,h)},d.prototype.searchArtists=function(f,p,h){return this.search(f,["artist"],p,h)},d.prototype.searchTracks=function(f,p,h){return this.search(f,["track"],p,h)},d.prototype.searchPlaylists=function(f,p,h){return this.search(f,["playlist"],p,h)},d.prototype.searchShows=function(f,p,h){return this.search(f,["show"],p,h)},d.prototype.searchEpisodes=function(f,p,h){return this.search(f,["episode"],p,h)},d.prototype.getAudioFeaturesForTrack=function(f,p){var h={};return h.url=n+"/audio-features/"+f,m(h,{},p)},d.prototype.getAudioFeaturesForTracks=function(f,p){var h={url:n+"/audio-features",params:{ids:f}};return m(h,{},p)},d.prototype.getAudioAnalysisForTrack=function(f,p){var h={};return h.url=n+"/audio-analysis/"+f,m(h,{},p)},d.prototype.getRecommendations=function(f,p){var h={url:n+"/recommendations"};return m(h,f,p)},d.prototype.getAvailableGenreSeeds=function(f){var p={url:n+"/recommendations/available-genre-seeds"};return m(p,{},f)},d.prototype.getMyDevices=function(f){var p={url:n+"/me/player/devices"};return m(p,{},f)},d.prototype.getMyCurrentPlaybackState=function(f,p){var h={url:n+"/me/player"};return m(h,f,p)},d.prototype.getMyCurrentPlayingTrack=function(f,p){var h={url:n+"/me/player/currently-playing"};return m(h,f,p)},d.prototype.transferMyPlayback=function(f,p,h){var _=p||{};_.device_ids=f;var b={type:"PUT",url:n+"/me/player",postData:_};return m(b,p,h)},d.prototype.play=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={};["context_uri","uris","offset","position_ms"].forEach(function(C){C in f&&(_[C]=f[C])});var b={type:"PUT",url:n+"/me/player/play",params:h,postData:_},w=typeof f=="function"?f:{};return m(b,w,p)},d.prototype.queue=function(f,p,h){p=p||{};var _="device_id"in p?{uri:f,device_id:p.device_id}:{uri:f},b={type:"POST",url:n+"/me/player/queue",params:_};return m(b,p,h)},d.prototype.pause=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={type:"PUT",url:n+"/me/player/pause",params:h};return m(_,f,p)},d.prototype.skipToNext=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={type:"POST",url:n+"/me/player/next",params:h};return m(_,f,p)},d.prototype.skipToPrevious=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={type:"POST",url:n+"/me/player/previous",params:h};return m(_,f,p)},d.prototype.seek=function(f,p,h){p=p||{};var _={position_ms:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/seek",params:_};return m(b,p,h)},d.prototype.setRepeat=function(f,p,h){p=p||{};var _={state:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/repeat",params:_};return m(b,p,h)},d.prototype.setVolume=function(f,p,h){p=p||{};var _={volume_percent:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/volume",params:_};return m(b,p,h)},d.prototype.setShuffle=function(f,p,h){p=p||{};var _={state:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/shuffle",params:_};return m(b,p,h)},d.prototype.getShow=function(f,p,h){var _={};return _.url=n+"/shows/"+f,m(_,p,h)},d.prototype.getShows=function(f,p,h){var _={url:n+"/shows/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getMySavedShows=function(f,p){var h={url:n+"/me/shows"};return m(h,f,p)},d.prototype.addToMySavedShows=function(f,p,h){var _={url:n+"/me/shows",type:"PUT",postData:f};return m(_,p,h)},d.prototype.removeFromMySavedShows=function(f,p,h){var _={url:n+"/me/shows",type:"DELETE",postData:f};return m(_,p,h)},d.prototype.containsMySavedShows=function(f,p,h){var _={url:n+"/me/shows/contains",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getShowEpisodes=function(f,p,h){var _={url:n+"/shows/"+f+"/episodes"};return m(_,p,h)},d.prototype.getEpisode=function(f,p,h){var _={};return _.url=n+"/episodes/"+f,m(_,p,h)},d.prototype.getEpisodes=function(f,p,h){var _={url:n+"/episodes/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getAccessToken=function(){return r},d.prototype.setAccessToken=function(f){r=f},d.prototype.setPromiseImplementation=function(f){var p=!1;try{var h=new f(function(_){_()});typeof h.then=="function"&&typeof h.catch=="function"&&(p=!0)}catch(_){console.error(_)}if(p)o=f;else throw new Error("Unsupported implementation of Promises/A+")},d}();e.exports=t})(C1);var q8=C1.exports;const Kn=Ql(q8),G8={name:"ModalDialogTrack",props:{show:Boolean,track:{required:!0,type:Object}},emits:["close","play-count-changed"],data(){return{spotify_track:{}}},watch:{track(){if(this.track&&this.track.data_kind==="spotify"&&this.track.media_kind!=="podcast"){const e=new Kn;e.setAccessToken(this.$store.state.spotify.webapi_token),e.getTrack(this.track.path.slice(this.track.path.lastIndexOf(":")+1)).then(t=>{this.spotify_track=t})}else this.spotify_track={}}},methods:{mark_new(){V.library_track_update(this.track.id,{play_count:"reset"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},mark_played(){V.library_track_update(this.track.id,{play_count:"increment"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},open_album(){this.track.data_kind==="spotify"&&this.track.media_kind!=="podcast"?this.$router.push({name:"music-spotify-album",params:{id:this.spotify_track.album.id}}):this.track.media_kind==="podcast"?this.$router.push({name:"podcast",params:{id:this.track.album_id}}):this.track.media_kind==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:this.track.album_id}}):this.track.media_kind==="music"&&this.$router.push({name:"music-album",params:{id:this.track.album_id}})},open_album_artist(){this.track.data_kind==="spotify"?this.$router.push({name:"music-spotify-artist",params:{id:this.spotify_track.artists[0].id}}):this.track.media_kind==="music"||this.track.media_kind==="podcast"?this.$router.push({name:"music-artist",params:{id:this.track.album_artist_id}}):this.track.media_kind==="audiobook"&&this.$router.push({name:"audiobooks-artist",params:{id:this.track.album_artist_id}})},open_genre(){this.$router.push({name:"genre-albums",params:{name:this.track.genre},query:{media_kind:this.track.media_kind}})},play(){this.$emit("close"),V.player_play_uri(this.track.uri,!1)},queue_add(){this.$emit("close"),V.queue_add(this.track.uri)},queue_add_next(){this.$emit("close"),V.queue_add_next(this.track.uri)}}},K8={key:0,class:"modal is-active"},Z8={class:"modal-content"},Y8={class:"card"},J8={class:"card-content"},X8=["textContent"],Q8=["textContent"],eP={key:0,class:"buttons"},tP=["textContent"],nP=["textContent"],rP={class:"content is-small"},oP={key:0},sP=["textContent"],iP=["textContent"],aP={key:1},lP=["textContent"],cP=["textContent"],uP={key:2},dP=["textContent"],mP=["textContent"],fP={key:3},pP=["textContent"],hP=["textContent"],_P={key:4},gP=["textContent"],yP=["textContent"],vP={key:5},bP=["textContent"],zP=["textContent"],wP={key:6},CP=["textContent"],kP=["textContent"],xP={key:7},SP=["textContent"],EP=["textContent"],$P=["textContent"],TP=["textContent"],AP=["textContent"],OP={class:"title is-6"},PP=["textContent"],IP={key:8},DP=["textContent"],RP={class:"title is-6"},NP=["textContent"],LP=["textContent"],MP=["textContent"],FP=["textContent"],VP=["textContent"],HP=["textContent"],UP=["textContent"],jP=["textContent"],BP={key:9},WP=["textContent"],qP=["textContent"],GP={class:"card-footer"},KP=["textContent"],ZP=["textContent"],YP=["textContent"];function JP(e,t,n,r,o,s){const i=$("mdicon");return k(),ce(Dt,{name:"fade"},{default:S(()=>[n.show?(k(),A("div",K8,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",Z8,[c("div",Y8,[c("div",J8,[c("p",{class:"title is-4",textContent:g(n.track.title)},null,8,X8),c("p",{class:"subtitle",textContent:g(n.track.artist)},null,8,Q8),n.track.media_kind==="podcast"?(k(),A("div",eP,[n.track.play_count>0?(k(),A("a",{key:0,class:"button is-small",onClick:t[1]||(t[1]=(...a)=>s.mark_new&&s.mark_new(...a)),textContent:g(e.$t("dialog.track.mark-as-new"))},null,8,tP)):F("",!0),n.track.play_count===0?(k(),A("a",{key:1,class:"button is-small",onClick:t[2]||(t[2]=(...a)=>s.mark_played&&s.mark_played(...a)),textContent:g(e.$t("dialog.track.mark-as-played"))},null,8,nP)):F("",!0)])):F("",!0),c("div",rP,[n.track.album?(k(),A("p",oP,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.album"))},null,8,sP),c("a",{class:"title is-6 has-text-link",onClick:t[3]||(t[3]=(...a)=>s.open_album&&s.open_album(...a)),textContent:g(n.track.album)},null,8,iP)])):F("",!0),n.track.album_artist&&n.track.media_kind!=="audiobook"?(k(),A("p",aP,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.album-artist"))},null,8,lP),c("a",{class:"title is-6 has-text-link",onClick:t[4]||(t[4]=(...a)=>s.open_album_artist&&s.open_album_artist(...a)),textContent:g(n.track.album_artist)},null,8,cP)])):F("",!0),n.track.composer?(k(),A("p",uP,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.composer"))},null,8,dP),c("span",{class:"title is-6",textContent:g(n.track.composer)},null,8,mP)])):F("",!0),n.track.date_released?(k(),A("p",fP,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.release-date"))},null,8,pP),c("span",{class:"title is-6",textContent:g(e.$filters.date(n.track.date_released))},null,8,hP)])):n.track.year?(k(),A("p",_P,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.year"))},null,8,gP),c("span",{class:"title is-6",textContent:g(n.track.year)},null,8,yP)])):F("",!0),n.track.genre?(k(),A("p",vP,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.genre"))},null,8,bP),c("a",{class:"title is-6 has-text-link",onClick:t[5]||(t[5]=(...a)=>s.open_genre&&s.open_genre(...a)),textContent:g(n.track.genre)},null,8,zP)])):F("",!0),n.track.disc_number?(k(),A("p",wP,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.position"))},null,8,CP),c("span",{class:"title is-6",textContent:g([n.track.disc_number,n.track.track_number].join(" / "))},null,8,kP)])):F("",!0),n.track.length_ms?(k(),A("p",xP,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.duration"))},null,8,SP),c("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.track.length_ms))},null,8,EP)])):F("",!0),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.path"))},null,8,$P),c("span",{class:"title is-6",textContent:g(n.track.path)},null,8,TP)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.type"))},null,8,AP),c("span",OP,[c("span",{textContent:g([e.$t("media.kind."+n.track.media_kind),e.$t("data.kind."+n.track.data_kind)].join(" - "))},null,8,PP)])]),n.track.samplerate?(k(),A("p",IP,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.quality"))},null,8,DP),c("span",RP,[c("span",{textContent:g(n.track.type)},null,8,NP),n.track.samplerate?(k(),A("span",{key:0,textContent:g(e.$t("dialog.track.samplerate",{rate:n.track.samplerate}))},null,8,LP)):F("",!0),n.track.channels?(k(),A("span",{key:1,textContent:g(e.$t("dialog.track.channels",{channels:e.$filters.channels(n.track.channels)}))},null,8,MP)):F("",!0),n.track.bitrate?(k(),A("span",{key:2,textContent:g(e.$t("dialog.track.bitrate",{rate:n.track.bitrate}))},null,8,FP)):F("",!0)])])):F("",!0),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.added-on"))},null,8,VP),c("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.track.time_added))},null,8,HP)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.rating"))},null,8,UP),c("span",{class:"title is-6",textContent:g(e.$t("dialog.track.rating-value",{rating:Math.floor(n.track.rating/10)}))},null,8,jP)]),n.track.comment?(k(),A("p",BP,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.comment"))},null,8,WP),c("span",{class:"title is-6",textContent:g(n.track.comment)},null,8,qP)])):F("",!0)])]),c("footer",GP,[c("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...a)=>s.queue_add&&s.queue_add(...a))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.track.add"))},null,8,KP)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[7]||(t[7]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[y(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.track.add-next"))},null,8,ZP)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[8]||(t[8]=(...a)=>s.play&&s.play(...a))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.track.play"))},null,8,YP)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[9]||(t[9]=a=>e.$emit("close"))})])):F("",!0)]),_:1})}const XP=te(G8,[["render",JP]]),QP={name:"ListTracks",components:{ModalDialogTrack:XP},props:{expression:{default:"",type:String},show_icon:Boolean,show_progress:Boolean,tracks:{required:!0,type:Object},uris:{default:"",type:String}},emits:["play-count-changed"],data(){return{show_details_modal:!1,selected_track:{}}},methods:{play_track(e){this.uris?V.player_play_uri(this.uris,!1,this.tracks.items.indexOf(e)):this.expression?V.player_play_expression(this.expression,!1,this.tracks.items.indexOf(e)):V.player_play_uri(e.uri,!1)},open_dialog(e){this.selected_track=e,this.show_details_modal=!0}}},eI={key:0,class:"mt-6 mb-5 py-2"},tI=["id","textContent"],nI=["onClick"],rI={key:0,class:"media-left is-clickable"},oI={class:"media-content is-clickable is-clipped"},sI=["textContent"],iI=["textContent"],aI=["textContent"],lI=["max","value"],cI={class:"media-right"},uI=["onClick"];function dI(e,t,n,r,o,s){const i=$("mdicon"),a=$("modal-dialog-track");return k(),A(Ce,null,[(k(!0),A(Ce,null,ct(n.tracks,l=>(k(),A(Ce,{key:l.itemId},[l.isItem?(k(),A("div",{key:1,class:Ee(["media is-align-items-center",{"with-progress":n.show_progress}]),onClick:u=>s.play_track(l.item)},[n.show_icon?(k(),A("figure",rI,[y(i,{class:"icon",name:"file-outline",size:"16"})])):F("",!0),c("div",oI,[c("h1",{class:Ee(["title is-6",{"has-text-grey":l.item.media_kind==="podcast"&&l.item.play_count>0}]),textContent:g(l.item.title)},null,10,sI),c("h2",{class:"subtitle is-7 has-text-grey has-text-weight-bold",textContent:g(l.item.artist)},null,8,iI),c("h2",{class:"subtitle is-7 has-text-grey",textContent:g(l.item.album)},null,8,aI),n.show_progress&&l.item.seek_ms>0?(k(),A("progress",{key:0,class:"progress is-info",max:l.item.length_ms,value:l.item.seek_ms},null,8,lI)):F("",!0)]),c("div",cI,[c("a",{onClick:rt(u=>s.open_dialog(l.item),["prevent","stop"])},[y(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,uI)])],10,nI)):(k(),A("div",eI,[c("span",{id:"index_"+l.index,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.index)},null,8,tI)]))],64))),128)),(k(),ce(Kr,{to:"#app"},[y(a,{show:o.show_details_modal,track:o.selected_track,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1),onPlayCountChanged:t[1]||(t[1]=l=>e.$emit("play-count-changed"))},null,8,["show","track"])]))],64)}const zn=te(QP,[["render",dI],["__scopeId","data-v-29eaea3d"]]),mI={name:"ModalDialogAlbum",components:{CoverArtwork:Dn},props:{album:{required:!0,type:Object},media_kind:{default:"",type:String},show:Boolean},emits:["close","remove-podcast","play-count-changed"],data(){return{artwork_visible:!1}},computed:{media_kind_resolved(){return this.media_kind?this.media_kind:this.album.media_kind}},methods:{play(){this.$emit("close"),V.player_play_uri(this.album.uri,!1)},queue_add(){this.$emit("close"),V.queue_add(this.album.uri)},queue_add_next(){this.$emit("close"),V.queue_add_next(this.album.uri)},open_album(){this.$emit("close"),this.media_kind_resolved==="podcast"?this.$router.push({name:"podcast",params:{id:this.album.id}}):this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:this.album.id}}):this.$router.push({name:"music-album",params:{id:this.album.id}})},open_artist(){this.$emit("close"),this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-artist",params:{id:this.album.artist_id}}):this.$router.push({name:"music-artist",params:{id:this.album.artist_id}})},mark_played(){V.library_album_track_update(this.album.id,{play_count:"played"}).then(({data:e})=>{this.$emit("play-count-changed"),this.$emit("close")})},artwork_loaded(){this.artwork_visible=!0},artwork_error(){this.artwork_visible=!1}}},fI={key:0,class:"modal is-active"},pI={class:"modal-content"},hI={class:"card"},_I={class:"card-content"},gI={class:"title is-4"},yI=["textContent"],vI={key:0,class:"buttons"},bI=["textContent"],zI=["textContent"],wI={class:"content is-small"},CI={key:0},kI=["textContent"],xI=["textContent"],SI={key:1},EI=["textContent"],$I=["textContent"],TI={key:2},AI=["textContent"],OI=["textContent"],PI=["textContent"],II=["textContent"],DI=["textContent"],RI=["textContent"],NI=["textContent"],LI=["textContent"],MI=["textContent"],FI=["textContent"],VI={class:"card-footer"},HI=["textContent"],UI=["textContent"],jI=["textContent"];function BI(e,t,n,r,o,s){const i=$("cover-artwork"),a=$("mdicon");return k(),ce(Dt,{name:"fade"},{default:S(()=>[n.show?(k(),A("div",fI,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=l=>e.$emit("close"))}),c("div",pI,[c("div",hI,[c("div",_I,[y(i,{artwork_url:n.album.artwork_url,artist:n.album.artist,album:n.album.name,class:"fd-has-shadow fd-cover fd-cover-normal-image mb-5"},null,8,["artwork_url","artist","album"]),c("p",gI,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...l)=>s.open_album&&s.open_album(...l)),textContent:g(n.album.name)},null,8,yI)]),s.media_kind_resolved==="podcast"?(k(),A("div",vI,[c("a",{class:"button is-small",onClick:t[2]||(t[2]=(...l)=>s.mark_played&&s.mark_played(...l)),textContent:g(e.$t("dialog.album.mark-as-played"))},null,8,bI),n.album.data_kind==="url"?(k(),A("a",{key:0,class:"button is-small",onClick:t[3]||(t[3]=l=>e.$emit("remove-podcast")),textContent:g(e.$t("dialog.album.remove-podcast"))},null,8,zI)):F("",!0)])):F("",!0),c("div",wI,[n.album.artist?(k(),A("p",CI,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.artist"))},null,8,kI),c("a",{class:"title is-6 has-text-link",onClick:t[4]||(t[4]=(...l)=>s.open_artist&&s.open_artist(...l)),textContent:g(n.album.artist)},null,8,xI)])):F("",!0),n.album.date_released?(k(),A("p",SI,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.release-date"))},null,8,EI),c("span",{class:"title is-6",textContent:g(e.$filters.date(n.album.date_released))},null,8,$I)])):n.album.year>0?(k(),A("p",TI,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.year"))},null,8,AI),c("span",{class:"title is-6",textContent:g(n.album.year)},null,8,OI)])):F("",!0),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.tracks"))},null,8,PI),c("span",{class:"title is-6",textContent:g(n.album.track_count)},null,8,II)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.duration"))},null,8,DI),c("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.album.length_ms))},null,8,RI)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.type"))},null,8,NI),c("span",{class:"title is-6",textContent:g([e.$t("media.kind."+n.album.media_kind),e.$t("data.kind."+n.album.data_kind)].join(" - "))},null,8,LI)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.added-on"))},null,8,MI),c("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.album.time_added))},null,8,FI)])])]),c("footer",VI,[c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...l)=>s.queue_add&&s.queue_add(...l))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.album.add"))},null,8,HI)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...l)=>s.queue_add_next&&s.queue_add_next(...l))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.album.add-next"))},null,8,UI)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[7]||(t[7]=(...l)=>s.play&&s.play(...l))},[y(a,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.album.play"))},null,8,jI)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[8]||(t[8]=l=>e.$emit("close"))})])):F("",!0)]),_:1})}const ac=te(mI,[["render",BI]]),na={load(e){return Promise.all([V.library_album(e.params.id),V.library_album_tracks(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new ye(t[1].data,{criteria:[{field:"disc_number",type:Number}],index:{field:"disc_number",type:Number}}),e.tracks.indices.length<2&&e.tracks.group({index:{type:void 0}})}},WI={name:"PageAlbum",components:{ContentWithHero:ic,CoverArtwork:Dn,ListTracks:zn,ModalDialogAlbum:ac},beforeRouteEnter(e,t,n){na.load(e).then(r=>{n(o=>na.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;na.load(e).then(o=>{na.set(r,o),n()})},data(){return{album:{},show_details_modal:!1,tracks:new ye}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"music-artist",params:{id:this.album.artist_id}})},play(){V.player_play_uri(this.album.uri,!0)}}},qI=["textContent"],GI={class:"subtitle is-6 has-text-link"},KI=["textContent"],ZI={class:"buttons fd-is-centered-mobile mt-5"},YI=["textContent"],JI=["textContent"];function XI(e,t,n,r,o,s){const i=$("mdicon"),a=$("cover-artwork"),l=$("list-tracks"),u=$("modal-dialog-album"),m=$("content-with-hero");return k(),A("div",null,[y(m,null,{"heading-left":S(()=>[c("h1",{class:"title is-5",textContent:g(o.album.name)},null,8,qI),c("h2",GI,[c("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...d)=>s.open_artist&&s.open_artist(...d)),textContent:g(o.album.artist)},null,8,KI)]),c("div",ZI,[c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>s.play&&s.play(...d))},[y(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.album.shuffle"))},null,8,YI)]),c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=d=>o.show_details_modal=!0)},[y(i,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":S(()=>[y(a,{artwork_url:o.album.artwork_url,artist:o.album.artist,album:o.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=d=>o.show_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:S(()=>[c("p",{class:"heading has-text-centered-mobile mt-5",textContent:g(e.$t("page.album.track-count",{count:o.album.track_count}))},null,8,JI),y(l,{tracks:o.tracks,uris:o.album.uri},null,8,["tracks","uris"]),y(u,{show:o.show_details_modal,album:o.album,onClose:t[4]||(t[4]=d=>o.show_details_modal=!1)},null,8,["show","album"])]),_:1})])}const QI=te(WI,[["render",XI]]),e6={name:"ListItemTrackSpotify",props:{context_uri:{required:!0,type:String},position:{required:!0,type:Number},track:{required:!0,type:Object}},methods:{play(){this.track.is_playable&&V.player_play_uri(this.context_uri,!1,this.position)}}},t6={class:"media is-align-items-center"},n6=["textContent"],r6=["textContent"],o6={key:0,class:"subtitle is-7"},s6=["textContent"],i6=["textContent"],a6={class:"media-right"};function l6(e,t,n,r,o,s){return k(),A("div",t6,[c("div",{class:Ee(["media-content is-clipped",{"is-clickable":n.track.is_playable,"fd-is-not-allowed":!n.track.is_playable}]),onClick:t[0]||(t[0]=(...i)=>s.play&&s.play(...i))},[c("h1",{class:Ee(["title is-6",{"has-text-grey-light":!n.track.is_playable}]),textContent:g(n.track.name)},null,10,n6),c("h2",{class:Ee(["subtitle is-7",{"has-text-grey":n.track.is_playable,"has-text-grey-light":!n.track.is_playable}]),textContent:g(n.track.artists[0].name)},null,10,r6),n.track.is_playable?F("",!0):(k(),A("h2",o6,[gt(" ("),c("span",{textContent:g(e.$t("list.spotify.not-playable-track"))},null,8,s6),n.track.restrictions&&n.track.restrictions.reason?(k(),A("span",{key:0,textContent:g(e.$t("list.spotify.restriction-reason",{reason:n.track.restrictions.reason}))},null,8,i6)):F("",!0),gt(") ")]))],2),c("div",a6,[st(e.$slots,"actions")])])}const am=te(e6,[["render",l6]]),c6={name:"ModalDialogAlbumSpotify",components:{CoverArtwork:Dn},props:{album:{required:!0,type:Object},show:Boolean},emits:["close"],data(){return{artwork_visible:!1}},methods:{artwork_url(e){var t,n;return((n=(t=e.images)==null?void 0:t[0])==null?void 0:n.url)||""},play(){this.$emit("close"),V.player_play_uri(this.album.uri,!1)},queue_add(){this.$emit("close"),V.queue_add(this.album.uri)},queue_add_next(){this.$emit("close"),V.queue_add_next(this.album.uri)},open_album(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.album.id}})},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.album.artists[0].id}})},artwork_loaded(){this.artwork_visible=!0},artwork_error(){this.artwork_visible=!1}}},u6={key:0,class:"modal is-active"},d6={class:"modal-content"},m6={class:"card"},f6={class:"card-content"},p6={class:"title is-4"},h6=["textContent"],_6={class:"content is-small"},g6=["textContent"],y6=["textContent"],v6=["textContent"],b6=["textContent"],z6=["textContent"],w6=["textContent"],C6={class:"card-footer"},k6=["textContent"],x6=["textContent"],S6=["textContent"];function E6(e,t,n,r,o,s){const i=$("cover-artwork"),a=$("mdicon");return k(),ce(Dt,{name:"fade"},{default:S(()=>[n.show?(k(),A("div",u6,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=l=>e.$emit("close"))}),c("div",d6,[c("div",m6,[c("div",f6,[y(i,{artwork_url:s.artwork_url(n.album),artist:n.album.artist,album:n.album.name,class:"fd-has-shadow fd-cover fd-cover-normal-image mb-5",onLoad:s.artwork_loaded,onError:s.artwork_error},null,8,["artwork_url","artist","album","onLoad","onError"]),c("p",p6,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...l)=>s.open_album&&s.open_album(...l)),textContent:g(n.album.name)},null,8,h6)]),c("div",_6,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.album-artist"))},null,8,g6),c("a",{class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...l)=>s.open_artist&&s.open_artist(...l)),textContent:g(n.album.artists[0].name)},null,8,y6)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.release-date"))},null,8,v6),c("span",{class:"title is-6",textContent:g(e.$filters.date(n.album.release_date))},null,8,b6)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.type"))},null,8,z6),c("span",{class:"title is-6",textContent:g(n.album.album_type)},null,8,w6)])])]),c("footer",C6,[c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...l)=>s.queue_add&&s.queue_add(...l))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.album.add"))},null,8,k6)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...l)=>s.queue_add_next&&s.queue_add_next(...l))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.album.add-next"))},null,8,x6)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...l)=>s.play&&s.play(...l))},[y(a,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.album.play"))},null,8,S6)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=l=>e.$emit("close"))})])):F("",!0)]),_:1})}const Oi=te(c6,[["render",E6]]),$6={name:"ModalDialogTrackSpotify",props:{album:{default(){return{}},type:Object},show:Boolean,track:{required:!0,type:Object}},emits:["close"],methods:{play(){this.$emit("close"),V.player_play_uri(this.track.uri,!1)},queue_add(){this.$emit("close"),V.queue_add(this.track.uri)},queue_add_next(){this.$emit("close"),V.queue_add_next(this.track.uri)},open_album(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.album.id}})},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.album.artists[0].id}})}}},T6={key:0,class:"modal is-active"},A6={class:"modal-content"},O6={class:"card"},P6={class:"card-content"},I6=["textContent"],D6=["textContent"],R6={class:"content is-small"},N6=["textContent"],L6=["textContent"],M6=["textContent"],F6=["textContent"],V6=["textContent"],H6=["textContent"],U6=["textContent"],j6=["textContent"],B6=["textContent"],W6=["textContent"],q6=["textContent"],G6=["textContent"],K6={class:"card-footer"},Z6=["textContent"],Y6=["textContent"],J6=["textContent"];function X6(e,t,n,r,o,s){const i=$("mdicon");return k(),ce(Dt,{name:"fade"},{default:S(()=>[n.show?(k(),A("div",T6,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",A6,[c("div",O6,[c("div",P6,[c("p",{class:"title is-4",textContent:g(n.track.name)},null,8,I6),c("p",{class:"subtitle",textContent:g(n.track.artists[0].name)},null,8,D6),c("div",R6,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.album"))},null,8,N6),c("a",{class:"title is-6 has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open_album&&s.open_album(...a)),textContent:g(n.album.name)},null,8,L6)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.album-artist"))},null,8,M6),c("a",{class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...a)=>s.open_artist&&s.open_artist(...a)),textContent:g(n.album.artists[0].name)},null,8,F6)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.release-date"))},null,8,V6),c("span",{class:"title is-6",textContent:g(e.$filters.date(n.album.release_date))},null,8,H6)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.position"))},null,8,U6),c("span",{class:"title is-6",textContent:g([n.track.disc_number,n.track.track_number].join(" / "))},null,8,j6)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.duration"))},null,8,B6),c("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.track.duration_ms))},null,8,W6)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.path"))},null,8,q6),c("span",{class:"title is-6",textContent:g(n.track.uri)},null,8,G6)])])]),c("footer",K6,[c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add&&s.queue_add(...a))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.track.add"))},null,8,Z6)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[y(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.track.add-next"))},null,8,Y6)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...a)=>s.play&&s.play(...a))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.track.play"))},null,8,J6)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=a=>e.$emit("close"))})])):F("",!0)]),_:1})}const lm=te($6,[["render",X6]]),ra={load(e){const t=new Kn;return t.setAccessToken(je.state.spotify.webapi_token),t.getAlbum(e.params.id,{market:je.state.spotify.webapi_country})},set(e,t){e.album=t}},Q6={name:"PageAlbumSpotify",components:{ContentWithHero:ic,CoverArtwork:Dn,ListItemTrackSpotify:am,ModalDialogAlbumSpotify:Oi,ModalDialogTrackSpotify:lm},beforeRouteEnter(e,t,n){ra.load(e).then(r=>{n(o=>ra.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;ra.load(e).then(o=>{ra.set(r,o),n()})},data(){return{album:{artists:[{}],tracks:{}},selected_track:{},show_details_modal:!1,show_track_details_modal:!1}},methods:{artwork_url(e){var t,n;return((n=(t=e.images)==null?void 0:t[0])==null?void 0:n.url)||""},open_artist(){this.$router.push({name:"music-spotify-artist",params:{id:this.album.artists[0].id}})},play(){this.show_details_modal=!1,V.player_play_uri(this.album.uri,!0)},open_track_dialog(e){this.selected_track=e,this.show_track_details_modal=!0}}},e5=["textContent"],t5={class:"subtitle is-6 has-text-link"},n5=["textContent"],r5={class:"buttons fd-is-centered-mobile mt-5"},o5=["textContent"],s5=["textContent"],i5=["onClick"];function a5(e,t,n,r,o,s){const i=$("mdicon"),a=$("cover-artwork"),l=$("list-item-track-spotify"),u=$("modal-dialog-album-spotify"),m=$("modal-dialog-track-spotify"),d=$("content-with-hero");return k(),A("div",null,[y(d,null,{"heading-left":S(()=>[c("h1",{class:"title is-5",textContent:g(o.album.name)},null,8,e5),c("h2",t5,[c("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...f)=>s.open_artist&&s.open_artist(...f)),textContent:g(o.album.artists[0].name)},null,8,n5)]),c("div",r5,[c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...f)=>s.play&&s.play(...f))},[y(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.spotify.album.shuffle"))},null,8,o5)]),c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=f=>o.show_details_modal=!0)},[y(i,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":S(()=>[y(a,{artwork_url:s.artwork_url(o.album),artist:o.album.artist,album:o.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=f=>o.show_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:S(()=>[c("p",{class:"heading has-text-centered-mobile mt-5",textContent:g(e.$t("page.spotify.album.track-count",{count:o.album.tracks.total}))},null,8,s5),(k(!0),A(Ce,null,ct(o.album.tracks.items,(f,p)=>(k(),ce(l,{key:f.id,track:f,position:p,context_uri:o.album.uri},{actions:S(()=>[c("a",{onClick:rt(h=>s.open_track_dialog(f),["prevent","stop"])},[y(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,i5)]),_:2},1032,["track","position","context_uri"]))),128)),y(u,{show:o.show_details_modal,album:o.album,onClose:t[4]||(t[4]=f=>o.show_details_modal=!1)},null,8,["show","album"]),y(m,{show:o.show_track_details_modal,track:o.selected_track,album:o.album,onClose:t[5]||(t[5]=f=>o.show_track_details_modal=!1)},null,8,["show","track","album"])]),_:1})])}const l5=te(Q6,[["render",a5]]),c5={name:"ContentWithHeading",data(){return{options_visible:!1}},computed:{icon_name(){return this.options_visible?"chevron-up":"chevron-down"},position(){return{hash:this.options_visible?"#top":"#app",query:this.$route.query}}},mounted(){this.$slots.options&&(this.observer=new IntersectionObserver(this.onElementObserved,{rootMargin:"-82px 0px 0px 0px",threshold:1}),this.observer.observe(this.$refs.options_ref))},methods:{onElementObserved(e){e.forEach(({target:t,isIntersecting:n})=>{this.options_visible=n})},visibilityChanged(e){this.options_visible=e}}},u5={class:"section"},d5={class:"container"},m5={class:"columns is-centered"},f5={class:"column is-four-fifths"},p5={key:0},h5={ref:"options_ref",style:{height:"1px"}},_5={class:"buttons is-centered mt-4 mb-2"},g5={id:"top",class:"level is-clipped"},y5={class:"level-left is-flex-shrink-1"},v5={class:"level-item is-flex-shrink-1 has-text-centered-mobile"},b5={class:"level-right has-text-centered-mobile"},z5={class:"mt-4"};function w5(e,t,n,r,o,s){const i=$("mdicon"),a=$("router-link");return k(),A("section",u5,[c("div",d5,[c("div",m5,[c("div",f5,[e.$slots.options?(k(),A("section",p5,[c("div",h5,null,512),st(e.$slots,"options"),c("nav",_5,[y(a,{class:"button is-small is-white",to:s.position},{default:S(()=>[y(i,{class:"icon is-small",name:s.icon_name,size:"16"},null,8,["name"])]),_:1},8,["to"])])])):F("",!0),c("div",{class:Ee({"is-full-height":e.$slots.options})},[c("nav",g5,[c("div",y5,[c("div",v5,[c("div",null,[st(e.$slots,"heading-left")])])]),c("div",b5,[st(e.$slots,"heading-right")])]),st(e.$slots,"content"),c("div",z5,[st(e.$slots,"footer")])],2)])])])])}const Qe=te(c5,[["render",w5]]),C5={name:"ControlDropdown",props:{options:{required:!0,type:Array},value:{required:!0,type:[String,Number]}},emits:["update:value"],data(){return{is_active:!1}},computed:{option:{get(){return this.options.find(e=>e.id===this.value)}}},methods:{onClickOutside(e){this.is_active=!1},select(e){this.is_active=!1,this.$emit("update:value",e.id)}}},k5={class:"dropdown-trigger"},x5=["textContent"],S5={id:"dropdown",class:"dropdown-menu",role:"menu"},E5={class:"dropdown-content"},$5=["onClick","textContent"];function T5(e,t,n,r,o,s){const i=$("mdicon"),a=Cd("click-away");return yt((k(),A("div",{class:Ee(["dropdown",{"is-active":o.is_active}])},[c("div",k5,[c("button",{class:"button","aria-haspopup":"true","aria-controls":"dropdown",onClick:t[0]||(t[0]=l=>o.is_active=!o.is_active)},[c("span",{textContent:g(s.option.name)},null,8,x5),y(i,{class:"icon",name:"chevron-down",size:"16"})])]),c("div",S5,[c("div",E5,[(k(!0),A(Ce,null,ct(n.options,l=>(k(),A("a",{key:l.id,class:Ee(["dropdown-item",{"is-active":n.value===l.id}]),onClick:u=>s.select(l),textContent:g(l.name)},null,10,$5))),128))])])],2)),[[a,s.onClickOutside]])}const So=te(C5,[["render",T5]]),A5={name:"IndexButtonList",props:{indices:{required:!0,type:Array}}},O5={class:"buttons is-centered mb-4 fd-is-square"};function P5(e,t,n,r,o,s){const i=$("router-link");return k(),A("section",null,[c("nav",O5,[(k(!0),A(Ce,null,ct(n.indices,a=>(k(),ce(i,{key:a,class:"button is-small",to:{hash:`#index_${a}`,query:e.$route.query}},{default:S(()=>[gt(g(a),1)]),_:2},1032,["to"]))),128))])])}const Zn=te(A5,[["render",P5]]),I5={name:"ListAlbums",components:{CoverArtwork:Dn,ModalDialog:Yd,ModalDialogAlbum:ac},props:{albums:{required:!0,type:Object},media_kind:{default:"",type:String}},emits:["play-count-changed","podcast-deleted"],data(){return{show_details_modal:!1,selected_album:{},show_remove_podcast_modal:!1,rss_playlist_to_remove:{}}},computed:{is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value},media_kind_resolved(){return this.media_kind?this.media_kind:this.selected_album.media_kind}},methods:{open_album(e){this.selected_album=e,this.media_kind_resolved==="podcast"?this.$router.push({name:"podcast",params:{id:e.id}}):this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:e.id}}):this.$router.push({name:"music-album",params:{id:e.id}})},open_dialog(e){this.selected_album=e,this.show_details_modal=!0},open_remove_podcast_dialog(){V.library_album_tracks(this.selected_album.id,{limit:1}).then(({data:e})=>{V.library_track_playlists(e.items[0].id).then(({data:t})=>{this.rss_playlist_to_remove=t.items.filter(n=>n.type==="rss")[0],this.show_remove_podcast_modal=!0,this.show_details_modal=!1})})},play_count_changed(){this.$emit("play-count-changed")},remove_podcast(){this.show_remove_podcast_modal=!1,V.library_playlist_delete(this.rss_playlist_to_remove.id).then(()=>{this.$emit("podcast-deleted")})}}},D5={key:0,class:"mt-6 mb-5 py-2"},R5=["id","textContent"],N5=["onClick"],L5={key:0,class:"media-left"},M5={class:"media-content is-clickable is-clipped"},F5=["textContent"],V5=["textContent"],H5=["textContent"],U5={class:"media-right"},j5=["onClick"],B5=["textContent"],W5={class:"is-size-7"},q5=["textContent"],G5=["textContent"];function K5(e,t,n,r,o,s){const i=$("cover-artwork"),a=$("mdicon"),l=$("modal-dialog-album"),u=$("modal-dialog");return k(),A(Ce,null,[(k(!0),A(Ce,null,ct(n.albums,m=>(k(),A(Ce,{key:m.itemId},[m.isItem?m.isItem?(k(),A("div",{key:1,class:"media is-align-items-center",onClick:d=>s.open_album(m.item)},[s.is_visible_artwork?(k(),A("div",L5,[y(i,{artwork_url:m.item.artwork_url,artist:m.item.artist,album:m.item.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image"},null,8,["artwork_url","artist","album"])])):F("",!0),c("div",M5,[c("div",null,[c("h1",{class:"title is-6",textContent:g(m.item.name)},null,8,F5),c("h2",{class:"subtitle is-7 has-text-grey has-text-weight-bold",textContent:g(m.item.artist)},null,8,V5),m.item.date_released&&m.item.media_kind==="music"?(k(),A("h2",{key:0,class:"subtitle is-7 has-text-grey",textContent:g(e.$filters.date(m.item.date_released))},null,8,H5)):F("",!0)])]),c("div",U5,[c("a",{onClick:rt(d=>s.open_dialog(m.item),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,j5)])],8,N5)):F("",!0):(k(),A("div",D5,[c("span",{id:"index_"+m.index,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(m.index)},null,8,R5)]))],64))),128)),(k(),ce(Kr,{to:"#app"},[y(l,{show:o.show_details_modal,album:o.selected_album,media_kind:n.media_kind,onRemovePodcast:t[0]||(t[0]=m=>s.open_remove_podcast_dialog()),onPlayCountChanged:t[1]||(t[1]=m=>s.play_count_changed()),onClose:t[2]||(t[2]=m=>o.show_details_modal=!1)},null,8,["show","album","media_kind"]),y(u,{show:o.show_remove_podcast_modal,title:e.$t("page.podcast.remove-podcast"),delete_action:e.$t("page.podcast.remove"),onClose:t[3]||(t[3]=m=>o.show_remove_podcast_modal=!1),onDelete:s.remove_podcast},{"modal-content":S(()=>[c("p",{textContent:g(e.$t("list.albums.info-1"))},null,8,B5),c("p",W5,[gt(" ("),c("span",{textContent:g(e.$t("list.albums.info-2"))},null,8,q5),c("b",{textContent:g(o.rss_playlist_to_remove.name)},null,8,G5),gt(") ")])]),_:1},8,["show","title","delete_action","onDelete"])]))],64)}const ar=te(I5,[["render",K5]]),Z5={name:"TabsMusic",computed:{spotify_enabled(){return this.$store.state.spotify.webapi_token_valid}}},Y5={class:"section fd-tabs-section"},J5={class:"container"},X5={class:"columns is-centered"},Q5={class:"column is-four-fifths"},e4={class:"tabs is-centered is-small"},t4=["onClick","onKeypress"],n4=["textContent"],r4=["onClick","onKeypress"],o4=["textContent"],s4=["onClick","onKeypress"],i4=["textContent"],a4=["onClick","onKeypress"],l4=["textContent"],c4=["onClick","onKeypress"],u4=["textContent"],d4=["onClick","onKeypress"],m4=["textContent"];function f4(e,t,n,r,o,s){const i=$("mdicon"),a=$("router-link");return k(),A("section",Y5,[c("div",J5,[c("div",X5,[c("div",Q5,[c("div",e4,[c("ul",null,[y(a,{to:{name:"music-history"},custom:""},{default:S(({navigate:l,isActive:u})=>[c("li",{class:Ee({"is-active":u})},[c("a",{onClick:l,onKeypress:on(l,["enter"])},[y(i,{class:"icon is-small",name:"history",size:"16"}),c("span",{textContent:g(e.$t("page.music.tabs.history"))},null,8,n4)],40,t4)],2)]),_:1}),y(a,{to:{name:"music-artists"},custom:""},{default:S(({navigate:l,isActive:u})=>[c("li",{class:Ee({"is-active":u})},[c("a",{onClick:l,onKeypress:on(l,["enter"])},[y(i,{class:"icon is-small",name:"account-music",size:"16"}),c("span",{textContent:g(e.$t("page.music.tabs.artists"))},null,8,o4)],40,r4)],2)]),_:1}),y(a,{to:{name:"music-albums"},custom:""},{default:S(({navigate:l,isActive:u})=>[c("li",{class:Ee({"is-active":u})},[c("a",{onClick:l,onKeypress:on(l,["enter"])},[y(i,{class:"icon is-small",name:"album",size:"16"}),c("span",{textContent:g(e.$t("page.music.tabs.albums"))},null,8,i4)],40,s4)],2)]),_:1}),y(a,{to:{name:"music-genres"},custom:""},{default:S(({navigate:l,isActive:u})=>[c("li",{class:Ee({"is-active":u})},[c("a",{onClick:l,onKeypress:on(l,["enter"])},[y(i,{class:"icon is-small",name:"speaker",size:"16"}),c("span",{textContent:g(e.$t("page.music.tabs.genres"))},null,8,l4)],40,a4)],2)]),_:1}),y(a,{to:{name:"music-composers"},custom:""},{default:S(({navigate:l,isActive:u})=>[c("li",{class:Ee({"is-active":u})},[c("a",{onClick:l,onKeypress:on(l,["enter"])},[y(i,{class:"icon is-small",name:"book-open-page-variant",size:"16"}),c("span",{textContent:g(e.$t("page.music.tabs.composers"))},null,8,u4)],40,c4)],2)]),_:1}),s.spotify_enabled?(k(),ce(a,{key:0,to:{name:"music-spotify"},custom:""},{default:S(({navigate:l,isActive:u})=>[c("li",{class:Ee({"is-active":u})},[c("a",{onClick:l,onKeypress:on(l,["enter"])},[y(i,{class:"icon is-small",name:"spotify",size:"16"}),c("span",{textContent:g(e.$t("page.music.tabs.spotify"))},null,8,m4)],40,d4)],2)]),_:1})):F("",!0)])])])])])])}const lr=te(Z5,[["render",f4]]),oa={load(e){return V.library_albums("music")},set(e,t){e.albums_list=new ye(t.data)}},p4={name:"PageAlbums",components:{ContentWithHeading:Qe,ControlDropdown:So,IndexButtonList:Zn,ListAlbums:ar,TabsMusic:lr},beforeRouteEnter(e,t,n){oa.load(e).then(r=>{n(o=>oa.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;oa.load(e).then(o=>{oa.set(r,o),n()})},data(){return{albums_list:new ye,grouping_options:[{id:1,name:this.$t("page.albums.sort.name"),options:{index:{field:"name_sort",type:String}}},{id:2,name:this.$t("page.albums.sort.recently-added"),options:{criteria:[{field:"time_added",type:Date,order:-1}],index:{field:"time_added",type:Date}}},{id:3,name:this.$t("page.albums.sort.recently-released"),options:{criteria:[{field:"date_released",type:Date,order:-1}],index:{field:"date_released",type:Date}}},{id:4,name:this.$t("page.albums.sort.artist-name"),options:{criteria:[{field:"artist",type:String},{field:"name_sort",type:String}],index:{field:"artist",type:String}}},{id:5,name:this.$t("page.albums.sort.artist-date"),options:{criteria:[{field:"artist",type:String},{field:"date_released",type:Date}],index:{field:"artist",type:String}}}]}},computed:{albums(){const e=this.grouping_options.find(t=>t.id===this.selected_grouping_option_id);return e.options.filters=[t=>!this.hide_singles||t.track_count>2,t=>!this.hide_spotify||t.data_kind!=="spotify"],this.albums_list.group(e.options),this.albums_list},selected_grouping_option_id:{get(){return this.$store.state.albums_sort},set(e){this.$store.commit(hh,e)}},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},hide_singles:{get(){return this.$store.state.hide_singles},set(e){this.$store.commit(Sl,e)}},hide_spotify:{get(){return this.$store.state.hide_spotify},set(e){this.$store.commit(_i,e)}}}},h4={class:"fd-page-with-tabs"},_4={class:"columns"},g4={class:"column"},y4=["textContent"],v4={class:"field"},b4={class:"control"},z4=["textContent"],w4=["textContent"],C4={key:0,class:"field"},k4={class:"control"},x4=["textContent"],S4=["textContent"],E4={class:"column"},$4=["textContent"],T4=["textContent"],A4=["textContent"];function O4(e,t,n,r,o,s){const i=$("tabs-music"),a=$("index-button-list"),l=$("control-dropdown"),u=$("list-albums"),m=$("content-with-heading");return k(),A("div",h4,[y(i),y(m,null,{options:S(()=>[y(a,{indices:s.albums.indices},null,8,["indices"]),c("div",_4,[c("div",g4,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.albums.filter"))},null,8,y4),c("div",v4,[c("div",b4,[yt(c("input",{id:"switchHideSingles","onUpdate:modelValue":t[0]||(t[0]=d=>s.hide_singles=d),type:"checkbox",class:"switch is-rounded"},null,512),[[An,s.hide_singles]]),c("label",{for:"switchHideSingles",textContent:g(e.$t("page.albums.hide-singles"))},null,8,z4)]),c("p",{class:"help",textContent:g(e.$t("page.albums.hide-singles-help"))},null,8,w4)]),s.spotify_enabled?(k(),A("div",C4,[c("div",k4,[yt(c("input",{id:"switchHideSpotify","onUpdate:modelValue":t[1]||(t[1]=d=>s.hide_spotify=d),type:"checkbox",class:"switch is-rounded"},null,512),[[An,s.hide_spotify]]),c("label",{for:"switchHideSpotify",textContent:g(e.$t("page.albums.hide-spotify"))},null,8,x4)]),c("p",{class:"help",textContent:g(e.$t("page.albums.hide-spotify-help"))},null,8,S4)])):F("",!0)]),c("div",E4,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.albums.sort.title"))},null,8,$4),y(l,{value:s.selected_grouping_option_id,"onUpdate:value":t[2]||(t[2]=d=>s.selected_grouping_option_id=d),options:o.grouping_options},null,8,["value","options"])])])]),"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.albums.title"))},null,8,T4),c("p",{class:"heading",textContent:g(e.$t("page.albums.count",{count:s.albums.count}))},null,8,A4)]),"heading-right":S(()=>[]),content:S(()=>[y(u,{albums:s.albums},null,8,["albums"])]),_:1})])}const P4=te(p4,[["render",O4]]),I4={name:"ModalDialogArtist",props:{artist:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{play(){this.$emit("close"),V.player_play_uri(this.artist.uri,!1)},queue_add(){this.$emit("close"),V.queue_add(this.artist.uri)},queue_add_next(){this.$emit("close"),V.queue_add_next(this.artist.uri)},open_artist(){this.$emit("close"),this.$router.push({name:"music-artist",params:{id:this.artist.id}})}}},D4={key:0,class:"modal is-active"},R4={class:"modal-content"},N4={class:"card"},L4={class:"card-content"},M4={class:"title is-4"},F4=["textContent"],V4={class:"content is-small"},H4=["textContent"],U4=["textContent"],j4=["textContent"],B4=["textContent"],W4=["textContent"],q4=["textContent"],G4=["textContent"],K4=["textContent"],Z4={class:"card-footer"},Y4=["textContent"],J4=["textContent"],X4=["textContent"];function Q4(e,t,n,r,o,s){const i=$("mdicon");return k(),ce(Dt,{name:"fade"},{default:S(()=>[n.show?(k(),A("div",D4,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",R4,[c("div",N4,[c("div",L4,[c("p",M4,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open_artist&&s.open_artist(...a)),textContent:g(n.artist.name)},null,8,F4)]),c("div",V4,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.artist.albums"))},null,8,H4),c("span",{class:"title is-6",textContent:g(n.artist.album_count)},null,8,U4)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.artist.tracks"))},null,8,j4),c("span",{class:"title is-6",textContent:g(n.artist.track_count)},null,8,B4)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.artist.type"))},null,8,W4),c("span",{class:"title is-6",textContent:g(e.$t("data.kind."+n.artist.data_kind))},null,8,q4)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.artist.added-on"))},null,8,G4),c("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.artist.time_added))},null,8,K4)])])]),c("footer",Z4,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.artist.add"))},null,8,Y4)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[y(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.artist.add-next"))},null,8,J4)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.artist.play"))},null,8,X4)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):F("",!0)]),_:1})}const lc=te(I4,[["render",Q4]]),sa={load(e){return Promise.all([V.library_artist(e.params.id),V.library_artist_albums(e.params.id)])},set(e,t){e.artist=t[0].data,e.albums_list=new ye(t[1].data)}},e3={name:"PageArtist",components:{ContentWithHeading:Qe,ControlDropdown:So,ListAlbums:ar,ModalDialogArtist:lc},beforeRouteEnter(e,t,n){sa.load(e).then(r=>{n(o=>sa.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;sa.load(e).then(o=>{sa.set(r,o),n()})},data(){return{artist:{},albums_list:new ye,grouping_options:[{id:1,name:this.$t("page.artist.sort.name"),options:{criteria:[{field:"name_sort",type:String}]}},{id:2,name:this.$t("page.artist.sort.release-date"),options:{criteria:[{field:"date_released",type:Date}]}}],show_details_modal:!1}},computed:{albums(){const e=this.grouping_options.find(t=>t.id===this.selected_grouping_option_id);return e.options.filters=[t=>!this.hide_spotify||t.data_kind!=="spotify"],this.albums_list.group(e.options),this.albums_list},hide_spotify:{get(){return this.$store.state.hide_spotify},set(e){this.$store.commit(_i,e)}},selected_grouping_option_id:{get(){return this.$store.state.artist_albums_sort},set(e){this.$store.commit(fh,e)}},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},track_count(){return[...this.albums].reduce((e,t)=>e+(t.isItem?t.item.track_count:0),0)}},methods:{open_tracks(){this.$router.push({name:"music-artist-tracks",params:{id:this.artist.id}})},play(){V.player_play_uri(this.albums.items.map(e=>e.uri).join(","),!0)}}},t3={class:"columns"},n3={class:"column"},r3=["textContent"],o3={key:0,class:"field"},s3={class:"control"},i3=["textContent"],a3=["textContent"],l3={class:"column"},c3=["textContent"],u3=["textContent"],d3={class:"buttons is-centered"},m3=["textContent"],f3={class:"heading has-text-centered-mobile"},p3=["textContent"],h3=c("span",null," | ",-1),_3=["textContent"];function g3(e,t,n,r,o,s){const i=$("control-dropdown"),a=$("mdicon"),l=$("list-albums"),u=$("modal-dialog-artist"),m=$("content-with-heading");return k(),A("div",null,[y(m,null,{options:S(()=>[c("div",t3,[c("div",n3,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.filter"))},null,8,r3),s.spotify_enabled?(k(),A("div",o3,[c("div",s3,[yt(c("input",{id:"switchHideSpotify","onUpdate:modelValue":t[0]||(t[0]=d=>s.hide_spotify=d),type:"checkbox",class:"switch is-rounded"},null,512),[[An,s.hide_spotify]]),c("label",{for:"switchHideSpotify",textContent:g(e.$t("page.artist.hide-spotify"))},null,8,i3)]),c("p",{class:"help",textContent:g(e.$t("page.artist.hide-spotify-help"))},null,8,a3)])):F("",!0)]),c("div",l3,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort.title"))},null,8,c3),y(i,{value:s.selected_grouping_option_id,"onUpdate:value":t[1]||(t[1]=d=>s.selected_grouping_option_id=d),options:o.grouping_options},null,8,["value","options"])])])]),"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(o.artist.name)},null,8,u3)]),"heading-right":S(()=>[c("div",d3,[c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=d=>o.show_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[3]||(t[3]=(...d)=>s.play&&s.play(...d))},[y(a,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.artist.shuffle"))},null,8,m3)])])]),content:S(()=>[c("p",f3,[c("span",{textContent:g(e.$t("page.artist.album-count",{count:s.albums.count}))},null,8,p3),h3,c("a",{class:"has-text-link",onClick:t[4]||(t[4]=(...d)=>s.open_tracks&&s.open_tracks(...d)),textContent:g(e.$t("page.artist.track-count",{count:s.track_count}))},null,8,_3)]),y(l,{albums:s.albums},null,8,["albums"]),y(u,{show:o.show_details_modal,artist:o.artist,onClose:t[5]||(t[5]=d=>o.show_details_modal=!1)},null,8,["show","artist"])]),_:1})])}const y3=te(e3,[["render",g3]]),v3={name:"ListItemAlbumSpotify",props:{album:{required:!0,type:Object}}},b3={class:"media is-align-items-center"},z3={key:0,class:"media-left is-clickable"},w3={class:"media-content is-clickable is-clipped"},C3=["textContent"],k3=["textContent"],x3=["textContent"],S3={class:"media-right"};function E3(e,t,n,r,o,s){return k(),A("div",b3,[e.$slots.artwork?(k(),A("div",z3,[st(e.$slots,"artwork")])):F("",!0),c("div",w3,[c("h1",{class:"title is-6",textContent:g(n.album.name)},null,8,C3),c("h2",{class:"subtitle is-7 has-text-grey has-text-weight-bold",textContent:g(n.album.artists[0].name)},null,8,k3),c("h2",{class:"subtitle is-7 has-text-grey",textContent:g([n.album.album_type,e.$filters.date(n.album.release_date)].join(", "))},null,8,x3)]),c("div",S3,[st(e.$slots,"actions")])])}const cc=te(v3,[["render",E3]]),$3={name:"ModalDialogArtistSpotify",props:{artist:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{play(){this.$emit("close"),V.player_play_uri(this.artist.uri,!1)},queue_add(){this.$emit("close"),V.queue_add(this.artist.uri)},queue_add_next(){this.$emit("close"),V.queue_add_next(this.artist.uri)},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.artist.id}})}}},T3={key:0,class:"modal is-active"},A3={class:"modal-content"},O3={class:"card"},P3={class:"card-content"},I3={class:"title is-4"},D3=["textContent"],R3={class:"content is-small"},N3=["textContent"],L3=["textContent"],M3=["textContent"],F3=["textContent"],V3={class:"card-footer"},H3=["textContent"],U3=["textContent"],j3=["textContent"];function B3(e,t,n,r,o,s){const i=$("mdicon");return k(),ce(Dt,{name:"fade"},{default:S(()=>[n.show?(k(),A("div",T3,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",A3,[c("div",O3,[c("div",P3,[c("p",I3,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open_artist&&s.open_artist(...a)),textContent:g(n.artist.name)},null,8,D3)]),c("div",R3,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.artist.popularity"))},null,8,N3),c("span",{class:"title is-6",textContent:g([n.artist.popularity,n.artist.followers.total].join(" / "))},null,8,L3)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.artist.genres"))},null,8,M3),c("span",{class:"title is-6",textContent:g(n.artist.genres.join(", "))},null,8,F3)])])]),c("footer",V3,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.artist.add"))},null,8,H3)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[y(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.artist.add-next"))},null,8,U3)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.artist.play"))},null,8,j3)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):F("",!0)]),_:1})}const k1=te($3,[["render",B3]]);function W3(e){return e.scrollHeight}function q3(e){return e.scrollWidth}function G3(e,t){e.scrollTop=e.scrollHeight-t+e.scrollTop}function K3(e,t){e.scrollLeft=e.scrollWidth-t+e.scrollLeft}const Z3=c("div",{class:"loading"},"Loading...",-1),Y3=c("div",{class:"no-more"},"No more.",-1),J3=c("div",{class:"no-results"},"No results.",-1),X3=c("div",{class:"error"},"Error.",-1),cm=vr({__name:"VueEternalLoading",props:{load:{required:!0,type:Function},isInitial:{required:!1,type:Boolean,default:!0},position:{required:!1,type:String,default:"default"},container:{required:!1,type:Object,default:null},margin:{required:!1,type:String,default:void 0}},emits:["update:isInitial"],setup(e,{emit:t}){const n=e,r=nr();let o=nr("loading"),s=nr(n.isInitial),i=0;function a(){ms(()=>{var v,z;n.position==="top"?G3((v=n.container)!=null?v:document.documentElement,i):n.position==="left"&&K3((z=n.container)!=null?z:document.documentElement,i)})}function l(v,z){return v===0?s.value?(m(),"no-results"):(u(),"no-more"):v!==void 0&&z!==void 0&&v{var z,E;v.isIntersecting&&(n.position==="top"?i=W3((z=n.container)!=null?z:document.documentElement):n.position==="left"&&(i=q3((E=n.container)!=null?E:document.documentElement)),_(),n.load({loaded:l,noMore:u,noResults:m,error:d},{isFirstLoad:s.value}))},{root:n.container,threshold:0,rootMargin:n.margin})}let C;return typeof IntersectionObserver<"u"&&Xh(()=>{C&&_(),C=w(),b()},{flush:"post"}),vn(()=>n.isInitial,v=>{v&&f()}),vn(s,v=>{v||t("update:isInitial",!1)}),(v,z)=>(k(),A("div",{class:"vue-eternal-loading",ref_key:"rootRef",ref:r},[gn(o)==="loading"?st(v.$slots,"loading",Ps(Fo({key:0},{isFirstLoad:gn(s)})),()=>[Z3]):gn(o)==="no-more"?st(v.$slots,"no-more",Ps(Fo({key:1},{retry:p})),()=>[Y3]):gn(o)==="no-results"?st(v.$slots,"no-results",Ps(Fo({key:2},{retry:p})),()=>[J3]):gn(o)==="error"?st(v.$slots,"error",Ps(Fo({key:3},{retry:p})),()=>[X3]):F("",!0)],512))}}),qu=50,ia={load(e){const t=new Kn;return t.setAccessToken(je.state.spotify.webapi_token),Promise.all([t.getArtist(e.params.id),t.getArtistAlbums(e.params.id,{limit:qu,offset:0,include_groups:"album,single",market:je.state.spotify.webapi_country})])},set(e,t){e.artist=t[0],e.albums=[],e.total=0,e.offset=0,e.append_albums(t[1])}},Q3={name:"PageArtistSpotify",components:{ContentWithHeading:Qe,CoverArtwork:Dn,ListItemAlbumSpotify:cc,ModalDialogAlbumSpotify:Oi,ModalDialogArtistSpotify:k1,VueEternalLoading:cm},beforeRouteEnter(e,t,n){ia.load(e).then(r=>{n(o=>ia.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;ia.load(e).then(o=>{ia.set(r,o),n()})},data(){return{albums:[],artist:{},offset:0,selected_album:{},show_album_details_modal:!1,show_details_modal:!1,total:0}},computed:{is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{load_next({loaded:e}){const t=new Kn;t.setAccessToken(this.$store.state.spotify.webapi_token),t.getArtistAlbums(this.artist.id,{limit:qu,offset:this.offset,include_groups:"album,single"}).then(n=>{this.append_albums(n),e(n.items.length,qu)})},append_albums(e){this.albums=this.albums.concat(e.items),this.total=e.total,this.offset+=e.limit},play(){this.show_album_details_modal=!1,V.player_play_uri(this.artist.uri,!0)},open_album(e){this.$router.push({name:"music-spotify-album",params:{id:e.id}})},open_dialog(e){this.selected_album=e,this.show_album_details_modal=!0},artwork_url(e){return e.images&&e.images.length>0?e.images[0].url:""}}},eD=["textContent"],tD={class:"buttons is-centered"},nD=["textContent"],rD=["textContent"],oD=["onClick"],sD={class:"columns is-centered"},iD={class:"column has-text-centered"};function aD(e,t,n,r,o,s){const i=$("mdicon"),a=$("cover-artwork"),l=$("list-item-album-spotify"),u=$("VueEternalLoading"),m=$("modal-dialog-artist-spotify"),d=$("modal-dialog-album-spotify"),f=$("content-with-heading");return k(),A("div",null,[y(f,null,{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(o.artist.name)},null,8,eD)]),"heading-right":S(()=>[c("div",tD,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=p=>o.show_details_modal=!0)},[y(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...p)=>s.play&&s.play(...p))},[y(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.spotify.artist.shuffle"))},null,8,nD)])])]),content:S(()=>[c("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.spotify.artist.album-count",{count:o.total}))},null,8,rD),(k(!0),A(Ce,null,ct(o.albums,p=>(k(),ce(l,{key:p.id,album:p,onClick:h=>s.open_album(p)},Ci({actions:S(()=>[c("a",{onClick:rt(h=>s.open_dialog(p),["prevent","stop"])},[y(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,oD)]),_:2},[s.is_visible_artwork?{name:"artwork",fn:S(()=>[y(a,{artwork_url:s.artwork_url(p),artist:p.artist,album:p.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image"},null,8,["artwork_url","artist","album"])]),key:"0"}:void 0]),1032,["album","onClick"]))),128)),o.offset[c("div",sD,[c("div",iD,[y(i,{class:"icon mdi-spin",name:"loading"})])])]),"no-more":S(()=>[gt(" ")]),_:1},8,["load"])):F("",!0),y(m,{show:o.show_details_modal,artist:o.artist,onClose:t[2]||(t[2]=p=>o.show_details_modal=!1)},null,8,["show","artist"]),y(d,{show:o.show_album_details_modal,album:o.selected_album,onClose:t[3]||(t[3]=p=>o.show_album_details_modal=!1)},null,8,["show","album"])]),_:1})])}const lD=te(Q3,[["render",aD]]),aa={load(e){return Promise.all([V.library_artist(e.params.id),V.library_artist_tracks(e.params.id)])},set(e,t){e.artist=t[0].data,e.tracks_list=new ye(t[1].data.tracks)}},cD={name:"PageArtistTracks",components:{ContentWithHeading:Qe,ControlDropdown:So,IndexButtonList:Zn,ListTracks:zn,ModalDialogArtist:lc},beforeRouteEnter(e,t,n){aa.load(e).then(r=>{n(o=>aa.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;aa.load(e).then(o=>{aa.set(r,o),n()})},data(){return{artist:{},grouping_options:[{id:1,name:this.$t("page.artist.sort.name"),options:{index:{field:"title_sort",type:String}}},{id:2,name:this.$t("page.artist.sort.rating"),options:{criteria:[{field:"rating",type:Number,order:-1}],index:{field:"rating",type:"Digits"}}}],show_details_modal:!1,tracks_list:new ye}},computed:{album_count(){return new Set([...this.tracks].filter(e=>e.isItem).map(e=>e.item.album_id)).size},hide_spotify:{get(){return this.$store.state.hide_spotify},set(e){this.$store.commit(_i,e)}},selected_grouping_option_id:{get(){return this.$store.state.artist_tracks_sort},set(e){this.$store.commit(ph,e)}},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},tracks(){const e=this.grouping_options.find(t=>t.id===this.selected_grouping_option_id);return e.options.filters=[t=>!this.hide_spotify||t.data_kind!=="spotify"],this.tracks_list.group(e.options),this.tracks_list},track_uris(){return this.tracks_list.items.map(e=>e.uri).join(",")}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"music-artist",params:{id:this.artist.id}})},play(){V.player_play_uri(this.tracks_list.items.map(e=>e.uri).join(","),!0)}}},uD={class:"columns"},dD={class:"column"},mD=["textContent"],fD={key:0,class:"field"},pD={class:"control"},hD=["textContent"],_D=["textContent"],gD={class:"column"},yD=["textContent"],vD=["textContent"],bD={class:"buttons is-centered"},zD=["textContent"],wD={class:"heading has-text-centered-mobile"},CD=["textContent"],kD=c("span",null," | ",-1),xD=["textContent"];function SD(e,t,n,r,o,s){const i=$("index-button-list"),a=$("control-dropdown"),l=$("mdicon"),u=$("list-tracks"),m=$("modal-dialog-artist"),d=$("content-with-heading");return k(),A("div",null,[y(d,null,{options:S(()=>[y(i,{indices:s.tracks.indices},null,8,["indices"]),c("div",uD,[c("div",dD,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.filter"))},null,8,mD),s.spotify_enabled?(k(),A("div",fD,[c("div",pD,[yt(c("input",{id:"switchHideSpotify","onUpdate:modelValue":t[0]||(t[0]=f=>s.hide_spotify=f),type:"checkbox",class:"switch is-rounded"},null,512),[[An,s.hide_spotify]]),c("label",{for:"switchHideSpotify",textContent:g(e.$t("page.artist.hide-spotify"))},null,8,hD)]),c("p",{class:"help",textContent:g(e.$t("page.artist.hide-spotify-help"))},null,8,_D)])):F("",!0)]),c("div",gD,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort.title"))},null,8,yD),y(a,{value:s.selected_grouping_option_id,"onUpdate:value":t[1]||(t[1]=f=>s.selected_grouping_option_id=f),options:o.grouping_options},null,8,["value","options"])])])]),"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(o.artist.name)},null,8,vD)]),"heading-right":S(()=>[c("div",bD,[c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=f=>o.show_details_modal=!0)},[y(l,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[3]||(t[3]=(...f)=>s.play&&s.play(...f))},[y(l,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.artist.shuffle"))},null,8,zD)])])]),content:S(()=>[c("p",wD,[c("a",{class:"has-text-link",onClick:t[4]||(t[4]=(...f)=>s.open_artist&&s.open_artist(...f)),textContent:g(e.$t("page.artist.album-count",{count:s.album_count}))},null,8,CD),kD,c("span",{textContent:g(e.$t("page.artist.track-count",{count:s.tracks.count}))},null,8,xD)]),y(u,{tracks:s.tracks,uris:s.track_uris},null,8,["tracks","uris"]),y(m,{show:o.show_details_modal,artist:o.artist,onClose:t[5]||(t[5]=f=>o.show_details_modal=!1)},null,8,["show","artist"])]),_:1})])}const ED=te(cD,[["render",SD]]),$D={name:"ListArtists",components:{ModalDialogArtist:lc},props:{artists:{required:!0,type:Object}},data(){return{show_details_modal:!1,selected_artist:{}}},methods:{open_artist(e){this.selected_artist=e;const t=e.media_kind==="audiobook"?"audiobooks-artist":"music-artist";this.$router.push({name:t,params:{id:e.id}})},open_dialog(e){this.selected_artist=e,this.show_details_modal=!0}}},TD={key:0,class:"mt-6 mb-5 py-2"},AD={class:"media-content is-clipped"},OD=["id","textContent"],PD=["onClick"],ID={class:"media-content is-clickable is-clipped"},DD=["textContent"],RD={class:"media-right"},ND=["onClick"];function LD(e,t,n,r,o,s){const i=$("mdicon"),a=$("modal-dialog-artist");return k(),A(Ce,null,[(k(!0),A(Ce,null,ct(n.artists,l=>(k(),A(Ce,{key:l.itemId},[l.isItem?l.isItem?(k(),A("div",{key:1,class:"media is-align-items-center",onClick:u=>s.open_artist(l.item)},[c("div",ID,[c("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,DD)]),c("div",RD,[c("a",{onClick:rt(u=>s.open_dialog(l.item),["prevent","stop"])},[y(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,ND)])],8,PD)):F("",!0):(k(),A("div",TD,[c("div",AD,[c("span",{id:"index_"+l.index,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.index)},null,8,OD)])]))],64))),128)),(k(),ce(Kr,{to:"#app"},[y(a,{artist:o.selected_artist,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["artist","show"])]))],64)}const um=te($D,[["render",LD]]),la={load(e){return V.library_artists("music")},set(e,t){e.artists_list=new ye(t.data)}},MD={name:"PageArtists",components:{ContentWithHeading:Qe,ControlDropdown:So,IndexButtonList:Zn,ListArtists:um,TabsMusic:lr},beforeRouteEnter(e,t,n){la.load(e).then(r=>{n(o=>la.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;la.load(e).then(o=>{la.set(r,o),n()})},data(){return{artists_list:new ye,grouping_options:[{id:1,name:this.$t("page.artists.sort.name"),options:{index:{field:"name_sort",type:String}}},{id:2,name:this.$t("page.artists.sort.recently-added"),options:{criteria:[{field:"time_added",type:Date,order:-1}],index:{field:"time_added",type:Date}}}]}},computed:{artists(){if(!this.artists_list)return[];const e=this.grouping_options.find(t=>t.id===this.selected_grouping_option_id);return e.options.filters=[t=>!this.hide_singles||t.track_count>t.album_count*2,t=>!this.hide_spotify||t.data_kind!=="spotify"],this.artists_list.group(e.options),this.artists_list},selected_grouping_option_id:{get(){return this.$store.state.artists_sort},set(e){this.$store.commit(mh,e)}},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},hide_singles:{get(){return this.$store.state.hide_singles},set(e){this.$store.commit(Sl,e)}},hide_spotify:{get(){return this.$store.state.hide_spotify},set(e){this.$store.commit(_i,e)}}}},FD={class:"fd-page-with-tabs"},VD={class:"columns"},HD={class:"column"},UD=["textContent"],jD={class:"field"},BD={class:"control"},WD=["textContent"],qD=["textContent"],GD={key:0,class:"field"},KD={class:"control"},ZD=["textContent"],YD=["textContent"],JD={class:"column"},XD=["textContent"],QD=["textContent"],eR=["textContent"];function tR(e,t,n,r,o,s){const i=$("tabs-music"),a=$("index-button-list"),l=$("control-dropdown"),u=$("list-artists"),m=$("content-with-heading");return k(),A("div",FD,[y(i),y(m,null,{options:S(()=>[y(a,{indices:s.artists.indices},null,8,["indices"]),c("div",VD,[c("div",HD,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artists.filter"))},null,8,UD),c("div",jD,[c("div",BD,[yt(c("input",{id:"switchHideSingles","onUpdate:modelValue":t[0]||(t[0]=d=>s.hide_singles=d),type:"checkbox",class:"switch is-rounded"},null,512),[[An,s.hide_singles]]),c("label",{for:"switchHideSingles",textContent:g(e.$t("page.artists.hide-singles"))},null,8,WD)]),c("p",{class:"help",textContent:g(e.$t("page.artists.hide-singles-help"))},null,8,qD)]),s.spotify_enabled?(k(),A("div",GD,[c("div",KD,[yt(c("input",{id:"switchHideSpotify","onUpdate:modelValue":t[1]||(t[1]=d=>s.hide_spotify=d),type:"checkbox",class:"switch is-rounded"},null,512),[[An,s.hide_spotify]]),c("label",{for:"switchHideSpotify",textContent:g(e.$t("page.artists.hide-spotify"))},null,8,ZD)]),c("p",{class:"help",textContent:g(e.$t("page.artists.hide-spotify-help"))},null,8,YD)])):F("",!0)]),c("div",JD,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artists.sort.title"))},null,8,XD),y(l,{value:s.selected_grouping_option_id,"onUpdate:value":t[2]||(t[2]=d=>s.selected_grouping_option_id=d),options:o.grouping_options},null,8,["value","options"])])])]),"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.artists.title"))},null,8,QD),c("p",{class:"heading",textContent:g(e.$t("page.artists.count",{count:s.artists.count}))},null,8,eR)]),"heading-right":S(()=>[]),content:S(()=>[y(u,{artists:s.artists},null,8,["artists"])]),_:1})])}const nR=te(MD,[["render",tR]]),ca={load(e){return Promise.all([V.library_album(e.params.id),V.library_album_tracks(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new ye(t[1].data)}},rR={name:"PageAudiobooksAlbum",components:{ContentWithHero:ic,CoverArtwork:Dn,ListTracks:zn,ModalDialogAlbum:ac},beforeRouteEnter(e,t,n){ca.load(e).then(r=>{n(o=>ca.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;ca.load(e).then(o=>{ca.set(r,o),n()})},data(){return{album:{},show_details_modal:!1,tracks:new ye}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"audiobooks-artist",params:{id:this.album.artist_id}})},play(){V.player_play_uri(this.album.uri,!1)}}},oR=["textContent"],sR={class:"subtitle is-6 has-text-link"},iR=["textContent"],aR={class:"buttons fd-is-centered-mobile mt-5"},lR=["textContent"],cR=["textContent"];function uR(e,t,n,r,o,s){const i=$("mdicon"),a=$("cover-artwork"),l=$("list-tracks"),u=$("modal-dialog-album"),m=$("content-with-hero");return k(),A("div",null,[y(m,null,{"heading-left":S(()=>[c("h1",{class:"title is-5",textContent:g(o.album.name)},null,8,oR),c("h2",sR,[c("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...d)=>s.open_artist&&s.open_artist(...d)),textContent:g(o.album.artist)},null,8,iR)]),c("div",aR,[c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>s.play&&s.play(...d))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{textContent:g(e.$t("page.audiobooks.album.play"))},null,8,lR)]),c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=d=>o.show_details_modal=!0)},[y(i,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":S(()=>[y(a,{artwork_url:o.album.artwork_url,artist:o.album.artist,album:o.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=d=>o.show_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:S(()=>[c("p",{class:"heading has-text-centered-mobile mt-5",textContent:g(e.$t("page.audiobooks.album.track-count",{count:o.album.track_count}))},null,8,cR),y(l,{tracks:o.tracks,uris:o.album.uri},null,8,["tracks","uris"]),y(u,{show:o.show_details_modal,album:o.album,media_kind:"audiobook",onClose:t[4]||(t[4]=d=>o.show_details_modal=!1)},null,8,["show","album"])]),_:1})])}const dR=te(rR,[["render",uR]]),mR={name:"TabsAudiobooks"},fR={class:"section fd-tabs-section"},pR={class:"container"},hR={class:"columns is-centered"},_R={class:"column is-four-fifths"},gR={class:"tabs is-centered is-small"},yR=["onClick","onKeypress"],vR=["textContent"],bR=["onClick","onKeypress"],zR=["textContent"],wR=["onClick","onKeypress"],CR=["textContent"];function kR(e,t,n,r,o,s){const i=$("mdicon"),a=$("router-link");return k(),A("section",fR,[c("div",pR,[c("div",hR,[c("div",_R,[c("div",gR,[c("ul",null,[y(a,{to:{name:"audiobooks-artists"},custom:""},{default:S(({navigate:l,isActive:u})=>[c("li",{class:Ee({"is-active":u})},[c("a",{onClick:l,onKeypress:on(l,["enter"])},[y(i,{class:"icon is-small",name:"account-music",size:"16"}),c("span",{textContent:g(e.$t("page.audiobooks.tabs.authors"))},null,8,vR)],40,yR)],2)]),_:1}),y(a,{to:{name:"audiobooks-albums"},custom:""},{default:S(({navigate:l,isActive:u})=>[c("li",{class:Ee({"is-active":u})},[c("a",{onClick:l,onKeypress:on(l,["enter"])},[y(i,{class:"icon is-small",name:"album",size:"16"}),c("span",{textContent:g(e.$t("page.audiobooks.tabs.audiobooks"))},null,8,zR)],40,bR)],2)]),_:1}),y(a,{to:{name:"audiobooks-genres"},custom:""},{default:S(({navigate:l,isActive:u})=>[c("li",{class:Ee({"is-active":u})},[c("a",{onClick:l,onKeypress:on(l,["enter"])},[y(i,{class:"icon is-small",name:"speaker",size:"16"}),c("span",{textContent:g(e.$t("page.audiobooks.tabs.genres"))},null,8,CR)],40,wR)],2)]),_:1})])])])])])])}const dm=te(mR,[["render",kR]]),ua={load(e){return V.library_albums("audiobook")},set(e,t){e.albums=new ye(t.data,{index:{field:"name_sort",type:String}})}},xR={name:"PageAudiobooksAlbums",components:{TabsAudiobooks:dm,ContentWithHeading:Qe,IndexButtonList:Zn,ListAlbums:ar},beforeRouteEnter(e,t,n){ua.load(e).then(r=>{n(o=>ua.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;ua.load(e).then(o=>{ua.set(r,o),n()})},data(){return{albums:new ye}}},SR={class:"fd-page-with-tabs"},ER=["textContent"],$R=["textContent"];function TR(e,t,n,r,o,s){const i=$("tabs-audiobooks"),a=$("index-button-list"),l=$("list-albums"),u=$("content-with-heading");return k(),A("div",SR,[y(i),y(u,null,{options:S(()=>[y(a,{indices:o.albums.indices},null,8,["indices"])]),"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.audiobooks.albums.title"))},null,8,ER),c("p",{class:"heading",textContent:g(e.$t("page.audiobooks.albums.count",{count:o.albums.count}))},null,8,$R)]),content:S(()=>[y(l,{albums:o.albums},null,8,["albums"])]),_:1})])}const AR=te(xR,[["render",TR]]),da={load(e){return Promise.all([V.library_artist(e.params.id),V.library_artist_albums(e.params.id)])},set(e,t){e.artist=t[0].data,e.albums=new ye(t[1].data)}},OR={name:"PageAudiobooksArtist",components:{ContentWithHeading:Qe,ListAlbums:ar,ModalDialogArtist:lc},beforeRouteEnter(e,t,n){da.load(e).then(r=>{n(o=>da.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;da.load(e).then(o=>{da.set(r,o),n()})},data(){return{albums:new ye,artist:{},show_details_modal:!1}},methods:{play(){V.player_play_uri(this.albums.items.map(e=>e.uri).join(","),!1)}}},PR=["textContent"],IR={class:"buttons is-centered"},DR=["textContent"],RR=["textContent"];function NR(e,t,n,r,o,s){const i=$("mdicon"),a=$("list-albums"),l=$("modal-dialog-artist"),u=$("content-with-heading");return k(),A("div",null,[y(u,null,{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(o.artist.name)},null,8,PR)]),"heading-right":S(()=>[c("div",IR,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>o.show_details_modal=!0)},[y(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>s.play&&s.play(...m))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{textContent:g(e.$t("page.audiobooks.artist.play"))},null,8,DR)])])]),content:S(()=>[c("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.audiobooks.artist.album-count",{count:o.artist.album_count}))},null,8,RR),y(a,{albums:o.albums},null,8,["albums"]),y(l,{show:o.show_details_modal,artist:o.artist,onClose:t[2]||(t[2]=m=>o.show_details_modal=!1)},null,8,["show","artist"])]),_:1})])}const LR=te(OR,[["render",NR]]),ma={load(e){return V.library_artists("audiobook")},set(e,t){e.artists=new ye(t.data,{index:{field:"name_sort",type:String}})}},MR={name:"PageAudiobooksArtists",components:{ContentWithHeading:Qe,TabsAudiobooks:dm,IndexButtonList:Zn,ListArtists:um},beforeRouteEnter(e,t,n){ma.load(e).then(r=>{n(o=>ma.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;ma.load(e).then(o=>{ma.set(r,o),n()})},data(){return{artists:new ye}}},FR={class:"fd-page-with-tabs"},VR=["textContent"],HR=["textContent"];function UR(e,t,n,r,o,s){const i=$("tabs-audiobooks"),a=$("index-button-list"),l=$("list-artists"),u=$("content-with-heading");return k(),A("div",FR,[y(i),y(u,null,{options:S(()=>[y(a,{indices:o.artists.indices},null,8,["indices"])]),"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.audiobooks.artists.title"))},null,8,VR),c("p",{class:"heading",textContent:g(e.$t("page.audiobooks.artists.count",{count:o.artists.count}))},null,8,HR)]),"heading-right":S(()=>[]),content:S(()=>[y(l,{artists:o.artists},null,8,["artists"])]),_:1})])}const jR=te(MR,[["render",UR]]),BR={name:"ModalDialogGenre",props:{genre:{required:!0,type:Object},media_kind:{required:!0,type:String},show:Boolean},emits:["close"],computed:{expression(){return`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`}},methods:{play(){this.$emit("close"),V.player_play_expression(this.expression,!1)},queue_add(){this.$emit("close"),V.queue_expression_add(this.expression)},queue_add_next(){this.$emit("close"),V.queue_expression_add_next(this.expression)},open_genre(){this.$emit("close"),this.$router.push({name:"genre-albums",params:{name:this.genre.name},query:{media_kind:this.media_kind}})}}},WR={key:0,class:"modal is-active"},qR={class:"modal-content"},GR={class:"card"},KR={class:"card-content"},ZR={class:"title is-4"},YR=["textContent"],JR={class:"content is-small"},XR=["textContent"],QR=["textContent"],eN=["textContent"],tN=["textContent"],nN=["textContent"],rN=["textContent"],oN={class:"card-footer"},sN=["textContent"],iN=["textContent"],aN=["textContent"];function lN(e,t,n,r,o,s){const i=$("mdicon");return k(),ce(Dt,{name:"fade"},{default:S(()=>[n.show?(k(),A("div",WR,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",qR,[c("div",GR,[c("div",KR,[c("p",ZR,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open_genre&&s.open_genre(...a)),textContent:g(n.genre.name)},null,8,YR)]),c("div",JR,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.genre.albums"))},null,8,XR),c("span",{class:"title is-6",textContent:g(n.genre.album_count)},null,8,QR)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.genre.tracks"))},null,8,eN),c("span",{class:"title is-6",textContent:g(n.genre.track_count)},null,8,tN)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.genre.duration"))},null,8,nN),c("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.genre.length_ms))},null,8,rN)])])]),c("footer",oN,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.genre.add"))},null,8,sN)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[y(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.genre.add-next"))},null,8,iN)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.genre.play"))},null,8,aN)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):F("",!0)]),_:1})}const mm=te(BR,[["render",lN]]),cN={name:"ListGenres",components:{ModalDialogGenre:mm},props:{genres:{required:!0,type:Object},media_kind:{required:!0,type:String}},data(){return{show_details_modal:!1,selected_genre:{}}},methods:{open_genre(e){this.$router.push({name:"genre-albums",params:{name:e.name},query:{media_kind:this.media_kind}})},open_dialog(e){this.selected_genre=e,this.show_details_modal=!0}}},uN={key:0,class:"mt-6 mb-5 py-2"},dN={class:"media-content is-clipped"},mN=["id","textContent"],fN=["onClick"],pN={class:"media-content is-clickable is-clipped"},hN=["textContent"],_N={class:"media-right"},gN=["onClick"];function yN(e,t,n,r,o,s){const i=$("mdicon"),a=$("modal-dialog-genre");return k(),A(Ce,null,[(k(!0),A(Ce,null,ct(n.genres,l=>(k(),A(Ce,{key:l.itemId},[l.isItem?l.isItem?(k(),A("div",{key:1,class:"media is-align-items-center",onClick:u=>s.open_genre(l.item)},[c("div",pN,[c("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,hN)]),c("div",_N,[c("a",{onClick:rt(u=>s.open_dialog(l.item),["prevent","stop"])},[y(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,gN)])],8,fN)):F("",!0):(k(),A("div",uN,[c("div",dN,[c("span",{id:"index_"+l.index,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.index)},null,8,mN)])]))],64))),128)),(k(),ce(Kr,{to:"#app"},[y(a,{show:o.show_details_modal,genre:o.selected_genre,media_kind:n.media_kind,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["show","genre","media_kind"])]))],64)}const x1=te(cN,[["render",yN]]),fa={load(e){return V.library_genres("audiobook")},set(e,t){e.genres=new ye(t.data,{index:{field:"name_sort",type:String}})}},vN={name:"PageAudiobooksGenres",components:{ContentWithHeading:Qe,IndexButtonList:Zn,ListGenres:x1,TabsAudiobooks:dm},beforeRouteEnter(e,t,n){fa.load(e).then(r=>{n(o=>fa.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;fa.load(e).then(o=>{fa.set(r,o),n()})},data(){return{genres:new ye}}},bN={class:"fd-page-with-tabs"},zN=["textContent"],wN=["textContent"];function CN(e,t,n,r,o,s){const i=$("tabs-audiobooks"),a=$("index-button-list"),l=$("list-genres"),u=$("content-with-heading");return k(),A("div",bN,[y(i),y(u,null,{options:S(()=>[y(a,{indices:o.genres.indices},null,8,["indices"])]),"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.genres.title"))},null,8,zN),c("p",{class:"heading",textContent:g(e.$t("page.genres.count",{count:o.genres.total}))},null,8,wN)]),content:S(()=>[y(l,{genres:o.genres,media_kind:"audiobook"},null,8,["genres"])]),_:1})])}const kN=te(vN,[["render",CN]]),xN={name:"ModalDialogComposer",props:{composer:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{play(){this.$emit("close"),V.player_play_expression(`composer is "${this.composer.name}" and media_kind is music`,!1)},queue_add(){this.$emit("close"),V.queue_expression_add(`composer is "${this.composer.name}" and media_kind is music`)},queue_add_next(){this.$emit("close"),V.queue_expression_add_next(`composer is "${this.composer.name}" and media_kind is music`)},open_albums(){this.$emit("close"),this.$router.push({name:"music-composer-albums",params:{name:this.composer.name}})},open_tracks(){this.$router.push({name:"music-composer-tracks",params:{name:this.composer.name}})}}},SN={key:0,class:"modal is-active"},EN={class:"modal-content"},$N={class:"card"},TN={class:"card-content"},AN={class:"title is-4"},ON=["textContent"],PN=["textContent"],IN=["textContent"],DN=["textContent"],RN=["textContent"],NN=["textContent"],LN=["textContent"],MN={class:"card-footer"},FN=["textContent"],VN=["textContent"],HN=["textContent"];function UN(e,t,n,r,o,s){const i=$("mdicon");return k(),ce(Dt,{name:"fade"},{default:S(()=>[n.show?(k(),A("div",SN,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",EN,[c("div",$N,[c("div",TN,[c("p",AN,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open_albums&&s.open_albums(...a)),textContent:g(n.composer.name)},null,8,ON)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.composer.albums"))},null,8,PN),c("a",{class:"has-text-link is-6",onClick:t[2]||(t[2]=(...a)=>s.open_albums&&s.open_albums(...a)),textContent:g(n.composer.album_count)},null,8,IN)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.composer.tracks"))},null,8,DN),c("a",{class:"has-text-link is-6",onClick:t[3]||(t[3]=(...a)=>s.open_tracks&&s.open_tracks(...a)),textContent:g(n.composer.track_count)},null,8,RN)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.composer.duration"))},null,8,NN),c("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.composer.length_ms))},null,8,LN)])]),c("footer",MN,[c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.queue_add&&s.queue_add(...a))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.composer.add"))},null,8,FN)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[y(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.composer.add-next"))},null,8,VN)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...a)=>s.play&&s.play(...a))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.composer.play"))},null,8,HN)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[7]||(t[7]=a=>e.$emit("close"))})])):F("",!0)]),_:1})}const fm=te(xN,[["render",UN]]),pa={load(e){return Promise.all([V.library_composer(e.params.name),V.library_composer_albums(e.params.name)])},set(e,t){e.composer=t[0].data,e.albums=new ye(t[1].data.albums)}},jN={name:"PageComposerAlbums",components:{ContentWithHeading:Qe,ListAlbums:ar,ModalDialogComposer:fm},beforeRouteEnter(e,t,n){pa.load(e).then(r=>{n(o=>pa.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;pa.load(e).then(o=>{pa.set(r,o),n()})},data(){return{albums:new ye,composer:{},show_details_modal:!1}},methods:{open_tracks(){this.$router.push({name:"music-composer-tracks",params:{name:this.composer.name}})},play(){V.player_play_expression(`composer is "${this.composer.name}" and media_kind is music`,!0)}}},BN=["textContent"],WN={class:"buttons is-centered"},qN=["textContent"],GN={class:"heading has-text-centered-mobile"},KN=["textContent"],ZN=c("span",null," | ",-1),YN=["textContent"];function JN(e,t,n,r,o,s){const i=$("mdicon"),a=$("list-albums"),l=$("modal-dialog-composer"),u=$("content-with-heading");return k(),A("div",null,[y(u,null,{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(o.composer.name)},null,8,BN)]),"heading-right":S(()=>[c("div",WN,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>o.show_details_modal=!0)},[y(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>s.play&&s.play(...m))},[y(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.composer.shuffle"))},null,8,qN)])])]),content:S(()=>[c("p",GN,[c("span",{textContent:g(e.$t("page.composer.album-count",{count:o.composer.album_count}))},null,8,KN),ZN,c("a",{class:"has-text-link",onClick:t[2]||(t[2]=(...m)=>s.open_tracks&&s.open_tracks(...m)),textContent:g(e.$t("page.composer.track-count",{count:o.composer.track_count}))},null,8,YN)]),y(a,{albums:o.albums},null,8,["albums"]),y(l,{show:o.show_details_modal,composer:o.composer,onClose:t[3]||(t[3]=m=>o.show_details_modal=!1)},null,8,["show","composer"])]),_:1})])}const XN=te(jN,[["render",JN]]),ha={load(e){return Promise.all([V.library_composer(e.params.name),V.library_composer_tracks(e.params.name)])},set(e,t){e.composer=t[0].data,e.tracks_list=new ye(t[1].data.tracks)}},QN={name:"PageComposerTracks",components:{ContentWithHeading:Qe,ControlDropdown:So,IndexButtonList:Zn,ListTracks:zn,ModalDialogComposer:fm},beforeRouteEnter(e,t,n){ha.load(e).then(r=>{n(o=>ha.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;ha.load(e).then(o=>{ha.set(r,o),n()})},data(){return{composer:{},grouping_options:[{id:1,name:this.$t("page.composer.sort.name"),options:{index:{field:"title_sort",type:String}}},{id:2,name:this.$t("page.composer.sort.rating"),options:{criteria:[{field:"rating",type:Number,order:-1}],index:{field:"rating",type:"Digits"}}}],show_details_modal:!1,tracks_list:new ye}},computed:{expression(){return`composer is "${this.composer.name}" and media_kind is music`},selected_grouping_option_id:{get(){return this.$store.state.composer_tracks_sort},set(e){this.$store.commit(uh,e)}},tracks(){const e=this.grouping_options.find(t=>t.id===this.selected_grouping_option_id);return this.tracks_list.group(e.options),this.tracks_list}},methods:{open_albums(){this.show_details_modal=!1,this.$router.push({name:"music-composer-albums",params:{name:this.composer.name}})},play(){V.player_play_expression(this.expression,!0)}}},eL={class:"columns"},tL={class:"column"},nL=["textContent"],rL=["textContent"],oL={class:"buttons is-centered"},sL=["textContent"],iL={class:"heading has-text-centered-mobile"},aL=["textContent"],lL=c("span",null," | ",-1),cL=["textContent"];function uL(e,t,n,r,o,s){const i=$("index-button-list"),a=$("control-dropdown"),l=$("mdicon"),u=$("list-tracks"),m=$("modal-dialog-composer"),d=$("content-with-heading");return k(),A("div",null,[y(d,null,{options:S(()=>[y(i,{indices:s.tracks.indices},null,8,["indices"]),c("div",eL,[c("div",tL,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort.title"))},null,8,nL),y(a,{value:s.selected_grouping_option_id,"onUpdate:value":t[0]||(t[0]=f=>s.selected_grouping_option_id=f),options:o.grouping_options},null,8,["value","options"])])])]),"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(o.composer.name)},null,8,rL)]),"heading-right":S(()=>[c("div",oL,[c("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>o.show_details_modal=!0)},[y(l,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...f)=>s.play&&s.play(...f))},[y(l,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.composer.shuffle"))},null,8,sL)])])]),content:S(()=>[c("p",iL,[c("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...f)=>s.open_albums&&s.open_albums(...f)),textContent:g(e.$t("page.composer.album-count",{count:o.composer.album_count}))},null,8,aL),lL,c("span",{textContent:g(e.$t("page.composer.track-count",{count:o.composer.track_count}))},null,8,cL)]),y(u,{tracks:s.tracks,expression:s.expression},null,8,["tracks","expression"]),y(m,{show:o.show_details_modal,composer:o.composer,onClose:t[4]||(t[4]=f=>o.show_details_modal=!1)},null,8,["show","composer"])]),_:1})])}const dL=te(QN,[["render",uL]]),mL={name:"ListComposers",components:{ModalDialogComposer:fm},props:{composers:{required:!0,type:Object},media_kind:{default:"",type:String}},data(){return{show_details_modal:!1,selected_composer:{}}},methods:{open_composer(e){this.selected_composer=e,this.$router.push({name:"music-composer-albums",params:{name:e.name}})},open_dialog(e){this.selected_composer=e,this.show_details_modal=!0}}},fL={key:0,class:"mt-6 mb-5 py-2"},pL={class:"media-content is-clipped"},hL=["id","textContent"],_L=["onClick"],gL={class:"media-content is-clickable is-clipped"},yL=["textContent"],vL={class:"media-right"},bL=["onClick"];function zL(e,t,n,r,o,s){const i=$("mdicon"),a=$("modal-dialog-composer");return k(),A(Ce,null,[(k(!0),A(Ce,null,ct(n.composers,l=>(k(),A(Ce,{key:l.itemId},[l.isItem?l.isItem?(k(),A("div",{key:1,class:"media is-align-items-center",onClick:u=>s.open_composer(l.item)},[c("div",gL,[c("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,yL)]),c("div",vL,[c("a",{onClick:rt(u=>s.open_dialog(l.item),["prevent","stop"])},[y(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,bL)])],8,_L)):F("",!0):(k(),A("div",fL,[c("div",pL,[c("span",{id:"index_"+l.index,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.index)},null,8,hL)])]))],64))),128)),(k(),ce(Kr,{to:"#app"},[y(a,{show:o.show_details_modal,composer:o.selected_composer,media_kind:n.media_kind,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["show","composer","media_kind"])]))],64)}const S1=te(mL,[["render",zL]]),_a={load(e){return V.library_composers("music")},set(e,t){e.composers=new ye(t.data,{index:{field:"name_sort",type:String}})}},wL={name:"PageComposers",components:{ContentWithHeading:Qe,IndexButtonList:Zn,ListComposers:S1,TabsMusic:lr},beforeRouteEnter(e,t,n){_a.load(e).then(r=>{n(o=>_a.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;_a.load(e).then(o=>{_a.set(r,o),n()})},data(){return{composers:new ye}}},CL={class:"fd-page-with-tabs"},kL=["textContent"],xL=["textContent"];function SL(e,t,n,r,o,s){const i=$("tabs-music"),a=$("index-button-list"),l=$("list-composers"),u=$("content-with-heading");return k(),A("div",CL,[y(i),y(u,null,{options:S(()=>[y(a,{indices:o.composers.indices},null,8,["indices"])]),"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.composers.title"))},null,8,kL),c("p",{class:"heading",textContent:g(e.$t("page.composers.count",{count:o.composers.total}))},null,8,xL)]),content:S(()=>[y(l,{composers:o.composers},null,8,["composers"])]),_:1})])}const EL=te(wL,[["render",SL]]),$L={name:"ModalDialogDirectory",props:{directory:{required:!0,type:String},show:Boolean},emits:["close"],methods:{play(){this.$emit("close"),V.player_play_expression(`path starts with "${this.directory}" order by path asc`,!1)},queue_add(){this.$emit("close"),V.queue_expression_add(`path starts with "${this.directory}" order by path asc`)},queue_add_next(){this.$emit("close"),V.queue_expression_add_next(`path starts with "${this.directory}" order by path asc`)}}},TL={key:0,class:"modal is-active"},AL={class:"modal-content"},OL={class:"card"},PL={class:"card-content"},IL=["textContent"],DL={class:"card-footer"},RL=["textContent"],NL=["textContent"],LL=["textContent"];function ML(e,t,n,r,o,s){const i=$("mdicon");return k(),ce(Dt,{name:"fade"},{default:S(()=>[n.show?(k(),A("div",TL,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",AL,[c("div",OL,[c("div",PL,[c("p",{class:"title is-4",textContent:g(n.directory)},null,8,IL)]),c("footer",DL,[c("a",{class:"card-footer-item has-text-dark",onClick:t[1]||(t[1]=(...a)=>s.queue_add&&s.queue_add(...a))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.directory.add"))},null,8,RL)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[y(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.directory.add-next"))},null,8,NL)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.play&&s.play(...a))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.directory.play"))},null,8,LL)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[4]||(t[4]=a=>e.$emit("close"))})])):F("",!0)]),_:1})}const E1=te($L,[["render",ML]]),FL={name:"ListDirectories",components:{ModalDialogDirectory:E1},props:{directories:{required:!0,type:Array}},data(){return{show_details_modal:!1,selected_directory:""}},computed:{current_directory(){return this.$route.query&&this.$route.query.directory?this.$route.query.directory:"/"}},methods:{open_parent_directory(){this.current_directory.slice(0,this.current_directory.lastIndexOf("/"))===""||this.$store.state.config.directories.includes(this.current_directory)?this.$router.push({name:"files"}):this.$router.push({name:"files",query:{directory:this.current_directory.slice(0,this.current_directory.lastIndexOf("/"))}})},open_directory(e){this.$router.push({name:"files",query:{directory:e.path}})},open_dialog(e){this.selected_directory=e.path,this.show_details_modal=!0}}},VL={class:"media-left is-clickable"},HL=c("div",{class:"media-content is-clickable is-clipped"},[c("h1",{class:"title is-6"},"..")],-1),UL={class:"media-right"},jL=["onClick"],BL={class:"media-left is-clickable"},WL={class:"media-content is-clickable is-clipped"},qL=["textContent"],GL=["textContent"],KL={class:"media-right"},ZL=["onClick"];function YL(e,t,n,r,o,s){const i=$("mdicon"),a=$("modal-dialog-directory");return k(),A(Ce,null,[e.$route.query.directory?(k(),A("div",{key:0,class:"media is-align-items-center",onClick:t[0]||(t[0]=l=>s.open_parent_directory())},[c("figure",VL,[y(i,{class:"icon",name:"subdirectory-arrow-left",size:"16"})]),HL,c("div",UL,[st(e.$slots,"actions")])])):F("",!0),(k(!0),A(Ce,null,ct(n.directories,l=>(k(),A("div",{key:l.path,class:"media is-align-items-center",onClick:u=>s.open_directory(l)},[c("figure",BL,[y(i,{class:"icon",name:"folder",size:"16"})]),c("div",WL,[c("h1",{class:"title is-6",textContent:g(l.path.substring(l.path.lastIndexOf("/")+1))},null,8,qL),c("h2",{class:"subtitle is-7 has-text-grey",textContent:g(l.path)},null,8,GL)]),c("div",KL,[c("a",{onClick:rt(u=>s.open_dialog(l),["prevent","stop"])},[y(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,ZL)])],8,jL))),128)),(k(),ce(Kr,{to:"#app"},[y(a,{show:o.show_details_modal,directory:o.selected_directory,onClose:t[1]||(t[1]=l=>o.show_details_modal=!1)},null,8,["show","directory"])]))],64)}const JL=te(FL,[["render",YL]]),XL={name:"ModalDialogPlaylist",props:{playlist:{required:!0,type:Object},show:Boolean,uris:{default:"",type:String}},emits:["close"],methods:{play(){this.$emit("close"),V.player_play_uri(this.uris?this.uris:this.playlist.uri,!1)},queue_add(){this.$emit("close"),V.queue_add(this.uris?this.uris:this.playlist.uri)},queue_add_next(){this.$emit("close"),V.queue_add_next(this.uris?this.uris:this.playlist.uri)},open_playlist(){this.$emit("close"),this.$router.push({name:"playlist",params:{id:this.playlist.id}})}}},QL={key:0,class:"modal is-active"},eM={class:"modal-content"},tM={class:"card"},nM={class:"card-content"},rM={class:"title is-4"},oM=["textContent"],sM={class:"content is-small"},iM=["textContent"],aM=["textContent"],lM=["textContent"],cM=["textContent"],uM={key:0},dM=["textContent"],mM=["textContent"],fM={key:0,class:"card-footer"},pM=["textContent"],hM=["textContent"],_M=["textContent"];function gM(e,t,n,r,o,s){const i=$("mdicon");return k(),ce(Dt,{name:"fade"},{default:S(()=>[n.show?(k(),A("div",QL,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",eM,[c("div",tM,[c("div",nM,[c("p",rM,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open_playlist&&s.open_playlist(...a)),textContent:g(n.playlist.name)},null,8,oM)]),c("div",sM,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.playlist.path"))},null,8,iM),c("span",{class:"title is-6",textContent:g(n.playlist.path)},null,8,aM)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.playlist.type"))},null,8,lM),c("span",{class:"title is-6",textContent:g(e.$t("playlist.type."+n.playlist.type))},null,8,cM)]),n.playlist.folder?F("",!0):(k(),A("p",uM,[c("span",{class:"heading",textContent:g(e.$t("dialog.playlist.track-count"))},null,8,dM),c("span",{class:"title is-6",textContent:g(n.playlist.item_count)},null,8,mM)]))])]),n.playlist.folder?F("",!0):(k(),A("footer",fM,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.add"))},null,8,pM)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[y(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.add-next"))},null,8,hM)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.play"))},null,8,_M)])]))])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):F("",!0)]),_:1})}const $1=te(XL,[["render",gM]]),yM={name:"ListPlaylists",components:{ModalDialogPlaylist:$1},props:{playlists:{required:!0,type:Object}},data(){return{show_details_modal:!1,selected_playlist:{}}},methods:{open_playlist(e){e.type==="folder"?this.$router.push({name:"playlist-folder",params:{id:e.id}}):this.$router.push({name:"playlist",params:{id:e.id}})},open_dialog(e){this.selected_playlist=e,this.show_details_modal=!0},icon_name(e){return e.type==="folder"?"folder":e.type==="rss"?"rss":"music-box-multiple"}}},vM=["onClick"],bM={class:"media-left is-clickable"},zM={class:"media-content is-clickable is-clipped"},wM=["textContent"],CM={class:"media-right"},kM=["onClick"];function xM(e,t,n,r,o,s){const i=$("mdicon"),a=$("modal-dialog-playlist");return k(),A(Ce,null,[(k(!0),A(Ce,null,ct(n.playlists,l=>(k(),A("div",{key:l.itemId,class:"media is-align-items-center",onClick:u=>s.open_playlist(l.item)},[c("figure",bM,[y(i,{class:"icon",name:s.icon_name(l.item),size:"16"},null,8,["name"])]),c("div",zM,[c("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,wM)]),c("div",CM,[c("a",{onClick:rt(u=>s.open_dialog(l.item),["prevent","stop"])},[y(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,kM)])],8,vM))),128)),(k(),ce(Kr,{to:"#app"},[y(a,{show:o.show_details_modal,playlist:o.selected_playlist,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["show","playlist"])]))],64)}const pm=te(yM,[["render",xM]]),ga={load(e){return e.query.directory?V.library_files(e.query.directory):Promise.resolve()},set(e,t){t?(e.dirs=t.data.directories,e.playlists=new ye(t.data.playlists),e.tracks=new ye(t.data.tracks)):(e.dirs=e.$store.state.config.directories.map(n=>({path:n})),e.playlists=new ye,e.tracks=new ye)}},SM={name:"PageFiles",components:{ContentWithHeading:Qe,ListDirectories:JL,ListPlaylists:pm,ListTracks:zn,ModalDialogDirectory:E1},beforeRouteEnter(e,t,n){ga.load(e).then(r=>{n(o=>ga.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;ga.load(e).then(o=>{ga.set(r,o),n()})},data(){return{dirs:[],playlists:new ye,tracks:new ye,show_details_modal:!1}},computed:{current_directory(){return this.$route.query&&this.$route.query.directory?this.$route.query.directory:"/"},play_expression(){return`path starts with "${this.current_directory}" order by path asc`}},methods:{play(){V.player_play_expression(this.play_expression,!1)}}},EM=["textContent"],$M=["textContent"],TM={class:"buttons is-centered"},AM=["textContent"];function OM(e,t,n,r,o,s){const i=$("mdicon"),a=$("list-directories"),l=$("list-playlists"),u=$("list-tracks"),m=$("modal-dialog-directory"),d=$("content-with-heading");return k(),A("div",null,[y(d,null,{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.files.title"))},null,8,EM),c("p",{class:"title is-7 has-text-grey",textContent:g(s.current_directory)},null,8,$M)]),"heading-right":S(()=>[c("div",TM,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=f=>o.show_details_modal=!0)},[y(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...f)=>s.play&&s.play(...f))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{textContent:g(e.$t("page.files.play"))},null,8,AM)])])]),content:S(()=>[y(a,{directories:o.dirs},null,8,["directories"]),y(l,{playlists:o.playlists},null,8,["playlists"]),y(u,{tracks:o.tracks,expression:s.play_expression,show_icon:!0},null,8,["tracks","expression"]),y(m,{show:o.show_details_modal,directory:s.current_directory,onClose:t[2]||(t[2]=f=>o.show_details_modal=!1)},null,8,["show","directory"])]),_:1})])}const PM=te(SM,[["render",OM]]),ya={load(e){return Promise.all([V.library_genre(e.params.name,e.query.media_kind),V.library_genre_albums(e.params.name,e.query.media_kind)])},set(e,t){e.genre=t[0].data,e.albums=new ye(t[1].data.albums,{index:{field:"name_sort",type:String}})}},IM={name:"PageGenreAlbums",components:{ContentWithHeading:Qe,IndexButtonList:Zn,ListAlbums:ar,ModalDialogGenre:mm},beforeRouteEnter(e,t,n){ya.load(e).then(r=>{n(o=>ya.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;ya.load(e).then(o=>{ya.set(r,o),n()})},data(){return{albums:new ye,genre:{},media_kind:this.$route.query.media_kind,show_details_modal:!1}},methods:{open_tracks(){this.show_details_modal=!1,this.$router.push({name:"genre-tracks",params:{name:this.genre.name},query:{media_kind:this.media_kind}})},play(){V.player_play_expression(`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`,!0)}}},DM=["textContent"],RM={class:"buttons is-centered"},NM=["textContent"],LM={class:"heading has-text-centered-mobile"},MM=["textContent"],FM=c("span",null," | ",-1),VM=["textContent"];function HM(e,t,n,r,o,s){const i=$("index-button-list"),a=$("mdicon"),l=$("list-albums"),u=$("modal-dialog-genre"),m=$("content-with-heading");return k(),A("div",null,[y(m,null,{options:S(()=>[y(i,{indices:o.albums.indices},null,8,["indices"])]),"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(o.genre.name)},null,8,DM)]),"heading-right":S(()=>[c("div",RM,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=d=>o.show_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>s.play&&s.play(...d))},[y(a,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.genre.shuffle"))},null,8,NM)])])]),content:S(()=>[c("p",LM,[c("span",{textContent:g(e.$t("page.genre.album-count",{count:o.genre.album_count}))},null,8,MM),FM,c("a",{class:"has-text-link",onClick:t[2]||(t[2]=(...d)=>s.open_tracks&&s.open_tracks(...d)),textContent:g(e.$t("page.genre.track-count",{count:o.genre.track_count}))},null,8,VM)]),y(l,{albums:o.albums},null,8,["albums"]),y(u,{genre:o.genre,media_kind:o.media_kind,show:o.show_details_modal,onClose:t[3]||(t[3]=d=>o.show_details_modal=!1)},null,8,["genre","media_kind","show"])]),_:1})])}const UM=te(IM,[["render",HM]]),va={load(e){return Promise.all([V.library_genre(e.params.name,e.query.media_kind),V.library_genre_tracks(e.params.name,e.query.media_kind)])},set(e,t){e.genre=t[0].data,e.tracks_list=new ye(t[1].data.tracks)}},jM={name:"PageGenreTracks",components:{ContentWithHeading:Qe,ControlDropdown:So,IndexButtonList:Zn,ListTracks:zn,ModalDialogGenre:mm},beforeRouteEnter(e,t,n){va.load(e).then(r=>{n(o=>va.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;va.load(e).then(o=>{va.set(r,o),n()})},data(){return{genre:{},grouping_options:[{id:1,name:this.$t("page.genre.sort.name"),options:{index:{field:"title_sort",type:String}}},{id:2,name:this.$t("page.genre.sort.rating"),options:{criteria:[{field:"rating",type:Number,order:-1}],index:{field:"rating",type:"Digits"}}}],media_kind:this.$route.query.media_kind,show_details_modal:!1,tracks_list:new ye}},computed:{expression(){return`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`},selected_grouping_option_id:{get(){return this.$store.state.genre_tracks_sort},set(e){this.$store.commit(dh,e)}},tracks(){const e=this.grouping_options.find(t=>t.id===this.selected_grouping_option_id);return this.tracks_list.group(e.options),this.tracks_list}},methods:{open_genre(){this.show_details_modal=!1,this.$router.push({name:"genre-albums",params:{name:this.genre.name},query:{media_kind:this.media_kind}})},play(){V.player_play_expression(this.expression,!0)}}},BM={class:"columns"},WM={class:"column"},qM=["textContent"],GM=["textContent"],KM={class:"buttons is-centered"},ZM=["textContent"],YM={class:"heading has-text-centered-mobile"},JM=["textContent"],XM=c("span",null," | ",-1),QM=["textContent"];function e7(e,t,n,r,o,s){const i=$("index-button-list"),a=$("control-dropdown"),l=$("mdicon"),u=$("list-tracks"),m=$("modal-dialog-genre"),d=$("content-with-heading");return k(),A("div",null,[y(d,null,{options:S(()=>[y(i,{indices:s.tracks.indices},null,8,["indices"]),c("div",BM,[c("div",WM,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.genre.sort.title"))},null,8,qM),y(a,{value:s.selected_grouping_option_id,"onUpdate:value":t[0]||(t[0]=f=>s.selected_grouping_option_id=f),options:o.grouping_options},null,8,["value","options"])])])]),"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(o.genre.name)},null,8,GM)]),"heading-right":S(()=>[c("div",KM,[c("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>o.show_details_modal=!0)},[y(l,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...f)=>s.play&&s.play(...f))},[y(l,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.genre.shuffle"))},null,8,ZM)])])]),content:S(()=>[c("p",YM,[c("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...f)=>s.open_genre&&s.open_genre(...f)),textContent:g(e.$t("page.genre.album-count",{count:o.genre.album_count}))},null,8,JM),XM,c("span",{textContent:g(e.$t("page.genre.track-count",{count:o.genre.track_count}))},null,8,QM)]),y(u,{tracks:s.tracks,expression:s.expression},null,8,["tracks","expression"]),y(m,{show:o.show_details_modal,genre:o.genre,media_kind:o.media_kind,onClose:t[4]||(t[4]=f=>o.show_details_modal=!1)},null,8,["show","genre","media_kind"])]),_:1})])}const t7=te(jM,[["render",e7]]),ba={load(e){return V.library_genres("music")},set(e,t){e.genres=new ye(t.data,{index:{field:"name_sort",type:String}})}},n7={name:"PageGenres",components:{ContentWithHeading:Qe,IndexButtonList:Zn,ListGenres:x1,TabsMusic:lr},beforeRouteEnter(e,t,n){ba.load(e).then(r=>{n(o=>ba.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;ba.load(e).then(o=>{ba.set(r,o),n()})},data(){return{genres:new ye}}},r7={class:"fd-page-with-tabs"},o7=["textContent"],s7=["textContent"];function i7(e,t,n,r,o,s){const i=$("tabs-music"),a=$("index-button-list"),l=$("list-genres"),u=$("content-with-heading");return k(),A("div",r7,[y(i),y(u,null,{options:S(()=>[y(a,{indices:o.genres.indices},null,8,["indices"])]),"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.genres.title"))},null,8,o7),c("p",{class:"heading",textContent:g(e.$t("page.genres.count",{count:o.genres.total}))},null,8,s7)]),content:S(()=>[y(l,{genres:o.genres,media_kind:"music"},null,8,["genres"])]),_:1})])}const a7=te(n7,[["render",i7]]),za={load(e){return Promise.all([V.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}),V.search({type:"track",expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:3})])},set(e,t){e.recently_added=new ye(t[0].data.albums),e.recently_played=new ye(t[1].data.tracks)}},l7={name:"PageMusic",components:{ContentWithHeading:Qe,ListAlbums:ar,ListTracks:zn,TabsMusic:lr},beforeRouteEnter(e,t,n){za.load(e).then(r=>{n(o=>za.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;za.load(e).then(o=>{za.set(r,o),n()})},data(){return{recently_added:[],recently_played:{items:[]},selected_track:{}}}},c7={class:"fd-page-with-tabs"},u7=["textContent"],d7={class:"level"},m7={class:"level-item"},f7=["textContent"],p7={class:"level"},h7={class:"level-item"};function _7(e,t,n,r,o,s){const i=$("tabs-music"),a=$("list-albums"),l=$("router-link"),u=$("content-with-heading"),m=$("list-tracks");return k(),A("div",c7,[y(i),y(u,null,{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-added.title"))},null,8,u7)]),content:S(()=>[y(a,{albums:o.recently_added},null,8,["albums"])]),footer:S(()=>[c("nav",d7,[c("p",m7,[y(l,{class:"button is-light is-small is-rounded",to:{name:"music-recently-added"}},{default:S(()=>[gt(g(e.$t("page.music.show-more")),1)]),_:1})])])]),_:1}),y(u,null,{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-played.title"))},null,8,f7)]),content:S(()=>[y(m,{tracks:o.recently_played},null,8,["tracks"])]),footer:S(()=>[c("nav",p7,[c("p",h7,[y(l,{class:"button is-light is-small is-rounded",to:{name:"music-recently-played"}},{default:S(()=>[gt(g(e.$t("page.music.show-more")),1)]),_:1})])])]),_:1})])}const g7=te(l7,[["render",_7]]),wa={load(e){const t=je.getters.settings_option_recently_added_limit;return V.search({type:"album",expression:"media_kind is music having track_count > 3 order by time_added desc",limit:t})},set(e,t){e.recently_added=new ye(t.data.albums,{criteria:[{field:"time_added",type:Date,order:-1}],index:{field:"time_added",type:Date}})}},y7={name:"PageMusicRecentlyAdded",components:{ContentWithHeading:Qe,ListAlbums:ar,TabsMusic:lr},beforeRouteEnter(e,t,n){wa.load(e).then(r=>{n(o=>wa.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;wa.load(e).then(o=>{wa.set(r,o),n()})},data(){return{recently_added:new ye}}},v7={class:"fd-page-with-tabs"},b7=["textContent"];function z7(e,t,n,r,o,s){const i=$("tabs-music"),a=$("list-albums"),l=$("content-with-heading");return k(),A("div",v7,[y(i),y(l,null,{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-added.title"))},null,8,b7)]),content:S(()=>[y(a,{albums:o.recently_added},null,8,["albums"])]),_:1})])}const w7=te(y7,[["render",z7]]),Ca={load(e){return V.search({type:"track",expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:50})},set(e,t){e.recently_played=new ye(t.data.tracks)}},C7={name:"PageMusicRecentlyPlayed",components:{ContentWithHeading:Qe,ListTracks:zn,TabsMusic:lr},beforeRouteEnter(e,t,n){Ca.load(e).then(r=>{n(o=>Ca.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;Ca.load(e).then(o=>{Ca.set(r,o),n()})},data(){return{recently_played:{}}}},k7={class:"fd-page-with-tabs"},x7=["textContent"];function S7(e,t,n,r,o,s){const i=$("tabs-music"),a=$("list-tracks"),l=$("content-with-heading");return k(),A("div",k7,[y(i),y(l,null,{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-played.title"))},null,8,x7)]),content:S(()=>[y(a,{tracks:o.recently_played},null,8,["tracks"])]),_:1})])}const E7=te(C7,[["render",S7]]),$7={name:"ListItemPlaylistSpotify",props:{playlist:{required:!0,type:Object}},methods:{open_playlist(){this.$router.push({name:"playlist-spotify",params:{id:this.playlist.id}})}}},T7={class:"media is-align-items-center"},A7=["textContent"],O7=["textContent"],P7={class:"media-right"};function I7(e,t,n,r,o,s){return k(),A("div",T7,[c("div",{class:"media-content is-clickable is-clipped",onClick:t[0]||(t[0]=(...i)=>s.open_playlist&&s.open_playlist(...i))},[c("h1",{class:"title is-6",textContent:g(n.playlist.name)},null,8,A7),c("h2",{class:"subtitle is-7",textContent:g(n.playlist.owner.display_name)},null,8,O7)]),c("div",P7,[st(e.$slots,"actions")])])}const hm=te($7,[["render",I7]]),D7={name:"ModalDialogPlaylistSpotify",props:{playlist:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{play(){this.$emit("close"),V.player_play_uri(this.playlist.uri,!1)},queue_add(){this.$emit("close"),V.queue_add(this.playlist.uri)},queue_add_next(){this.$emit("close"),V.queue_add_next(this.playlist.uri)},open_playlist(){this.$emit("close"),this.$router.push({name:"playlist-spotify",params:{id:this.playlist.id}})}}},R7={key:0,class:"modal is-active"},N7={class:"modal-content"},L7={class:"card"},M7={class:"card-content"},F7={class:"title is-4"},V7=["textContent"],H7={class:"content is-small"},U7=["textContent"],j7=["textContent"],B7=["textContent"],W7=["textContent"],q7=["textContent"],G7=["textContent"],K7={class:"card-footer"},Z7=["textContent"],Y7=["textContent"],J7=["textContent"];function X7(e,t,n,r,o,s){const i=$("mdicon");return k(),ce(Dt,{name:"fade"},{default:S(()=>[n.show?(k(),A("div",R7,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",N7,[c("div",L7,[c("div",M7,[c("p",F7,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open_playlist&&s.open_playlist(...a)),textContent:g(n.playlist.name)},null,8,V7)]),c("div",H7,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.owner"))},null,8,U7),c("span",{class:"title is-6",textContent:g(n.playlist.owner.display_name)},null,8,j7)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.tracks"))},null,8,B7),c("span",{class:"title is-6",textContent:g(n.playlist.tracks.total)},null,8,W7)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.path"))},null,8,q7),c("span",{class:"title is-6",textContent:g(n.playlist.uri)},null,8,G7)])])]),c("footer",K7,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.playlist.add"))},null,8,Z7)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[y(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.playlist.add-next"))},null,8,Y7)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.playlist.play"))},null,8,J7)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):F("",!0)]),_:1})}const uc=te(D7,[["render",X7]]),ka={load(e){if(je.state.spotify_new_releases.length>0&&je.state.spotify_featured_playlists.length>0)return Promise.resolve();const t=new Kn;return t.setAccessToken(je.state.spotify.webapi_token),Promise.all([t.getNewReleases({country:je.state.spotify.webapi_country,limit:50}),t.getFeaturedPlaylists({country:je.state.spotify.webapi_country,limit:50})])},set(e,t){t&&(je.commit(ed,t[0].albums.items),je.commit(td,t[1].playlists.items))}},Q7={name:"PageMusicSpotify",components:{ContentWithHeading:Qe,CoverArtwork:Dn,ListItemAlbumSpotify:cc,ListItemPlaylistSpotify:hm,ModalDialogAlbumSpotify:Oi,ModalDialogPlaylistSpotify:uc,TabsMusic:lr},beforeRouteEnter(e,t,n){ka.load(e).then(r=>{n(o=>ka.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;ka.load(e).then(o=>{ka.set(r,o),n()})},data(){return{show_album_details_modal:!1,selected_album:{},show_playlist_details_modal:!1,selected_playlist:{}}},computed:{new_releases(){return this.$store.state.spotify_new_releases.slice(0,3)},featured_playlists(){return this.$store.state.spotify_featured_playlists.slice(0,3)},is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{open_album(e){this.$router.push({name:"music-spotify-album",params:{id:e.id}})},open_album_dialog(e){this.selected_album=e,this.show_album_details_modal=!0},open_playlist_dialog(e){this.selected_playlist=e,this.show_playlist_details_modal=!0},artwork_url(e){var t,n;return((n=(t=e.images)==null?void 0:t[0])==null?void 0:n.url)||""}}},eF={class:"fd-page-with-tabs"},tF=["textContent"],nF=["onClick"],rF={class:"level"},oF={class:"level-item"},sF=["textContent"],iF=["onClick"],aF={class:"level"},lF={class:"level-item"};function cF(e,t,n,r,o,s){const i=$("tabs-music"),a=$("cover-artwork"),l=$("mdicon"),u=$("list-item-album-spotify"),m=$("modal-dialog-album-spotify"),d=$("router-link"),f=$("content-with-heading"),p=$("list-item-playlist-spotify"),h=$("modal-dialog-playlist-spotify");return k(),A("div",eF,[y(i),y(f,null,{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.new-releases"))},null,8,tF)]),content:S(()=>[(k(!0),A(Ce,null,ct(s.new_releases,_=>(k(),ce(u,{key:_.id,album:_,onClick:b=>s.open_album(_)},Ci({actions:S(()=>[c("a",{onClick:rt(b=>s.open_album_dialog(_),["prevent","stop"])},[y(l,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,nF)]),_:2},[s.is_visible_artwork?{name:"artwork",fn:S(()=>[y(a,{artwork_url:s.artwork_url(_),artist:_.artist,album:_.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image"},null,8,["artwork_url","artist","album"])]),key:"0"}:void 0]),1032,["album","onClick"]))),128)),y(m,{show:o.show_album_details_modal,album:o.selected_album,onClose:t[0]||(t[0]=_=>o.show_album_details_modal=!1)},null,8,["show","album"])]),footer:S(()=>[c("nav",rF,[c("p",oF,[y(d,{to:{name:"music-spotify-new-releases"},class:"button is-light is-small is-rounded"},{default:S(()=>[gt(g(e.$t("page.spotify.music.show-more")),1)]),_:1})])])]),_:1}),y(f,null,{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.featured-playlists"))},null,8,sF)]),content:S(()=>[(k(!0),A(Ce,null,ct(s.featured_playlists,_=>(k(),ce(p,{key:_.id,playlist:_},{actions:S(()=>[c("a",{onClick:rt(b=>s.open_playlist_dialog(_),["prevent","stop"])},[y(l,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,iF)]),_:2},1032,["playlist"]))),128)),y(h,{show:o.show_playlist_details_modal,playlist:o.selected_playlist,onClose:t[1]||(t[1]=_=>o.show_playlist_details_modal=!1)},null,8,["show","playlist"])]),footer:S(()=>[c("nav",aF,[c("p",lF,[y(d,{to:{name:"music-spotify-featured-playlists"},class:"button is-light is-small is-rounded"},{default:S(()=>[gt(g(e.$t("page.spotify.music.show-more")),1)]),_:1})])])]),_:1})])}const uF=te(Q7,[["render",cF]]),xa={load(e){if(je.state.spotify_featured_playlists.length>0)return Promise.resolve();const t=new Kn;t.setAccessToken(je.state.spotify.webapi_token),t.getFeaturedPlaylists({country:je.state.spotify.webapi_country,limit:50})},set(e,t){t&&je.commit(td,t.playlists.items)}},dF={name:"PageMusicSpotifyFeaturedPlaylists",components:{ContentWithHeading:Qe,ListItemPlaylistSpotify:hm,ModalDialogPlaylistSpotify:uc,TabsMusic:lr},beforeRouteEnter(e,t,n){xa.load(e).then(r=>{n(o=>xa.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;xa.load(e).then(o=>{xa.set(r,o),n()})},data(){return{selected_playlist:{},show_details_modal:!1}},computed:{featured_playlists(){return this.$store.state.spotify_featured_playlists}},methods:{open_playlist_dialog(e){this.selected_playlist=e,this.show_details_modal=!0}}},mF={class:"fd-page-with-tabs"},fF=["textContent"],pF=["onClick"];function hF(e,t,n,r,o,s){const i=$("tabs-music"),a=$("mdicon"),l=$("list-item-playlist-spotify"),u=$("modal-dialog-playlist-spotify"),m=$("content-with-heading");return k(),A("div",mF,[y(i),y(m,null,{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.featured-playlists"))},null,8,fF)]),content:S(()=>[(k(!0),A(Ce,null,ct(s.featured_playlists,d=>(k(),ce(l,{key:d.id,playlist:d},{actions:S(()=>[c("a",{onClick:rt(f=>s.open_playlist_dialog(d),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,pF)]),_:2},1032,["playlist"]))),128)),y(u,{show:o.show_details_modal,playlist:o.selected_playlist,onClose:t[0]||(t[0]=d=>o.show_details_modal=!1)},null,8,["show","playlist"])]),_:1})])}const _F=te(dF,[["render",hF]]),Sa={load(e){if(je.state.spotify_new_releases.length>0)return Promise.resolve();const t=new Kn;return t.setAccessToken(je.state.spotify.webapi_token),t.getNewReleases({country:je.state.spotify.webapi_country,limit:50})},set(e,t){t&&je.commit(ed,t.albums.items)}},gF={name:"PageMusicSpotifyNewReleases",components:{ContentWithHeading:Qe,CoverArtwork:Dn,ListItemAlbumSpotify:cc,ModalDialogAlbumSpotify:Oi,TabsMusic:lr},beforeRouteEnter(e,t,n){Sa.load(e).then(r=>{n(o=>Sa.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;Sa.load(e).then(o=>{Sa.set(r,o),n()})},data(){return{show_details_modal:!1,selected_album:{}}},computed:{new_releases(){return this.$store.state.spotify_new_releases},is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{open_album(e){this.$router.push({name:"music-spotify-album",params:{id:e.id}})},open_album_dialog(e){this.selected_album=e,this.show_details_modal=!0},artwork_url(e){var t,n;return((n=(t=e.images)==null?void 0:t[0])==null?void 0:n.url)||""}}},yF={class:"fd-page-with-tabs"},vF=["textContent"],bF=["onClick"];function zF(e,t,n,r,o,s){const i=$("tabs-music"),a=$("cover-artwork"),l=$("mdicon"),u=$("list-item-album-spotify"),m=$("modal-dialog-album-spotify"),d=$("content-with-heading");return k(),A("div",yF,[y(i),y(d,null,{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.new-releases"))},null,8,vF)]),content:S(()=>[(k(!0),A(Ce,null,ct(s.new_releases,f=>(k(),ce(u,{key:f.id,album:f,onClick:p=>s.open_album(f)},Ci({actions:S(()=>[c("a",{onClick:rt(p=>s.open_album_dialog(f),["prevent","stop"])},[y(l,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,bF)]),_:2},[s.is_visible_artwork?{name:"artwork",fn:S(()=>[y(a,{artwork_url:s.artwork_url(f),artist:f.artist,album:f.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image"},null,8,["artwork_url","artist","album"])]),key:"0"}:void 0]),1032,["album","onClick"]))),128)),y(m,{show:o.show_details_modal,album:o.selected_album,onClose:t[0]||(t[0]=f=>o.show_details_modal=!1)},null,8,["show","album"])]),_:1})])}const wF=te(gF,[["render",zF]]),CF={name:"LyricsPane",data(){return this.lastIndex=-1,this.scrollingTimer=null,this.lastItemId=-1,{autoScrolling:!0}},computed:{is_playing(){return this.player.state==="play"},verse_index(){if(this.lyrics.length&&this.lyrics[0].time){const e=this.player.item_progress_ms/1e3,t=this.lyrics,n=this.player.item_id!==this.lastItemId,r=this.lastIndex>=0&&this.lastIndexe;if((n||r)&&this.reset_scrolling(),this.lastIndexe||this.lastIndex===t.length-1)return this.lastIndex;if(this.lastIndexe)return this.lastIndex+1;let o=0,s=t.length-1,i;for(;o<=s;){i=o+s>>1;const a=t[i],l=t[i+1];if(a.time<=e&&((l==null?void 0:l.time)>e||!l))return i;a.time{const s=n.exec(r);if(s&&s[4]){const i={text:s[4],time:s[2]*60+s[3]*1};t.push(i)}}),t.forEach((r,o,s)=>{const a=(o{const m=u.length*a;return l+=m,{duration:m,delay:l,text:u}})})}return t},player(){return this.$store.state.player}},watch:{verse_index(){this.autoScrolling&&this.scroll_to_verse(),this.lastIndex=this.verse_index}},methods:{reset_scrolling(){this.player.item_id!=this.lastItemId&&this.$refs.lyrics&&this.$refs.lyrics.scrollTo(0,0),this.lastItemId=this.player.item_id,this.lastIndex=-1},start_scrolling(e){(e.screenX||e.screenX!=0||e.screenY||e.screenY!=0)&&(this.autoScrolling=!1,this.scrollingTimer&&clearTimeout(this.scrollingTimer),this.scrollingTimer=setTimeout(this.autoScrolling=!0,2e3))},scroll_to_verse(){const e=this.$refs.lyrics;if(this.verse_index===-1){e.scrollTo(0,0);return}const t=e.children[this.verse_index];e.scrollBy({top:t.offsetTop-(e.offsetHeight>>1)+(t.offsetHeight>>1)-e.scrollTop,left:0,behavior:"smooth"})}}},kF=["textContent"],xF={key:1};function SF(e,t,n,r,o,s){return k(),A("div",{ref:"lyrics",class:"lyrics",onTouchstart:t[0]||(t[0]=i=>o.autoScrolling=!1),onTouchend:t[1]||(t[1]=i=>o.autoScrolling=!0),onScrollPassive:t[2]||(t[2]=(...i)=>s.start_scrolling&&s.start_scrolling(...i)),onWheelPassive:t[3]||(t[3]=(...i)=>s.start_scrolling&&s.start_scrolling(...i))},[(k(!0),A(Ce,null,ct(s.lyrics,(i,a)=>(k(),A(Ce,{key:a},[a===s.verse_index?(k(),A("div",{key:0,class:Ee({"is-highlighted":s.is_playing})},[(k(!0),A(Ce,null,ct(i.words,l=>(k(),A("span",{key:l,class:"has-text-weight-bold is-size-5"},[c("span",{style:Gr({"animation-duration":`${l.delay}s`}),textContent:g(l.text)},null,12,kF)]))),128))],2)):(k(),A("div",xF,g(i.text),1))],64))),128))],544)}const EF=te(CF,[["render",SF],["__scopeId","data-v-32f71750"]]),$F={name:"ModalDialogQueueItem",props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],data(){return{spotify_track:{}}},watch:{item(){if(this.item&&this.item.data_kind==="spotify"){const e=new Kn;e.setAccessToken(this.$store.state.spotify.webapi_token),e.getTrack(this.item.path.slice(this.item.path.lastIndexOf(":")+1)).then(t=>{this.spotify_track=t})}else this.spotify_track={}}},methods:{open_album(){this.item.data_kind==="spotify"?this.$router.push({name:"music-spotify-album",params:{id:this.spotify_track.album.id}}):this.item.media_kind==="podcast"?this.$router.push({name:"podcast",params:{id:this.item.album_id}}):this.item.media_kind==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:this.item.album_id}}):this.item.media_kind==="music"&&this.$router.push({name:"music-album",params:{id:this.item.album_id}})},open_album_artist(){this.item.data_kind==="spotify"?this.$router.push({name:"music-spotify-artist",params:{id:this.spotify_track.artists[0].id}}):this.item.media_kind==="music"||this.item.media_kind==="podcast"?this.$router.push({name:"music-artist",params:{id:this.item.album_artist_id}}):this.item.media_kind==="audiobook"&&this.$router.push({name:"audiobooks-artist",params:{id:this.item.album_artist_id}})},open_genre(){this.$router.push({name:"genre-albums",params:{name:this.item.genre},query:{media_kind:this.item.media_kind}})},play(){this.$emit("close"),V.player_play({item_id:this.item.id})},remove(){this.$emit("close"),V.queue_remove(this.item.id)}}},TF={key:0,class:"modal is-active"},AF={class:"modal-content"},OF={class:"card"},PF={class:"card-content"},IF=["textContent"],DF=["textContent"],RF={class:"content is-small"},NF={key:0},LF=["textContent"],MF=["textContent"],FF={key:1},VF=["textContent"],HF=["textContent"],UF={key:2},jF=["textContent"],BF=["textContent"],WF={key:3},qF=["textContent"],GF=["textContent"],KF={key:4},ZF=["textContent"],YF=["textContent"],JF={key:5},XF=["textContent"],QF=["textContent"],eV={key:6},tV=["textContent"],nV=["textContent"],rV=["textContent"],oV=["textContent"],sV=["textContent"],iV={class:"title is-6"},aV=["textContent"],lV={key:7},cV=["textContent"],uV={class:"title is-6"},dV=["textContent"],mV=["textContent"],fV=["textContent"],pV=["textContent"],hV={class:"card-footer"},_V=["textContent"],gV=["textContent"];function yV(e,t,n,r,o,s){const i=$("mdicon");return k(),ce(Dt,{name:"fade"},{default:S(()=>[n.show?(k(),A("div",TF,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",AF,[c("div",OF,[c("div",PF,[c("p",{class:"title is-4",textContent:g(n.item.title)},null,8,IF),c("p",{class:"subtitle",textContent:g(n.item.artist)},null,8,DF),c("div",RF,[n.item.album?(k(),A("p",NF,[c("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.album"))},null,8,LF),c("a",{class:"title is-6 has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open_album&&s.open_album(...a)),textContent:g(n.item.album)},null,8,MF)])):F("",!0),n.item.album_artist?(k(),A("p",FF,[c("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.album-artist"))},null,8,VF),c("a",{class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...a)=>s.open_album_artist&&s.open_album_artist(...a)),textContent:g(n.item.album_artist)},null,8,HF)])):F("",!0),n.item.composer?(k(),A("p",UF,[c("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.composer"))},null,8,jF),c("span",{class:"title is-6",textContent:g(n.item.composer)},null,8,BF)])):F("",!0),n.item.year?(k(),A("p",WF,[c("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.year"))},null,8,qF),c("span",{class:"title is-6",textContent:g(n.item.year)},null,8,GF)])):F("",!0),n.item.genre?(k(),A("p",KF,[c("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.genre"))},null,8,ZF),c("a",{class:"title is-6 has-text-link",onClick:t[3]||(t[3]=(...a)=>s.open_genre&&s.open_genre(...a)),textContent:g(n.item.genre)},null,8,YF)])):F("",!0),n.item.disc_number?(k(),A("p",JF,[c("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.position"))},null,8,XF),c("span",{class:"title is-6",textContent:g([n.item.disc_number,n.item.track_number].join(" / "))},null,8,QF)])):F("",!0),n.item.length_ms?(k(),A("p",eV,[c("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.duration"))},null,8,tV),c("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.item.length_ms))},null,8,nV)])):F("",!0),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.path"))},null,8,rV),c("span",{class:"title is-6",textContent:g(n.item.path)},null,8,oV)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.type"))},null,8,sV),c("span",iV,[c("span",{textContent:g([e.$t("media.kind."+n.item.media_kind),e.$t("data.kind."+n.item.data_kind)].join(" - "))},null,8,aV)])]),n.item.samplerate?(k(),A("p",lV,[c("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.quality"))},null,8,cV),c("span",uV,[c("span",{textContent:g(n.item.type)},null,8,dV),n.item.samplerate?(k(),A("span",{key:0,textContent:g(e.$t("dialog.queue-item.samplerate",{rate:n.item.samplerate}))},null,8,mV)):F("",!0),n.item.channels?(k(),A("span",{key:1,textContent:g(e.$t("dialog.queue-item.channels",{channels:e.$filters.channels(n.item.channels)}))},null,8,fV)):F("",!0),n.item.bitrate?(k(),A("span",{key:2,textContent:g(e.$t("dialog.queue-item.bitrate",{rate:n.item.bitrate}))},null,8,pV)):F("",!0)])])):F("",!0)])]),c("footer",hV,[c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.remove&&s.remove(...a))},[y(i,{class:"icon",name:"delete",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.queue-item.remove"))},null,8,_V)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...a)=>s.play&&s.play(...a))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.queue-item.play"))},null,8,gV)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=a=>e.$emit("close"))})])):F("",!0)]),_:1})}const T1=te($F,[["render",yV]]),Tr=1e3,vV={name:"PageNowPlaying",components:{ControlSlider:Dd,CoverArtwork:Dn,LyricsPane:EF,ModalDialogQueueItem:T1},data(){return{cursor:jl,INTERVAL:Tr,interval_id:0,is_dragged:!1,selected_item:{},show_details_modal:!1}},computed:{is_live(){return this.track.length_ms===0},lyrics_visible(){return this.$store.state.lyrics.pane},player(){return this.$store.state.player},track(){return this.$store.getters.now_playing},track_progress:{get(){return Math.floor(this.player.item_progress_ms/Tr)},set(e){this.player.item_progress_ms=e*Tr}},track_progress_max(){return this.is_live?1:Math.floor(this.track.length_ms/Tr)},track_elapsed_time(){return this.$filters.durationInHours(this.track_progress*Tr)},track_total_time(){return this.is_live?this.$t("page.now-playing.live"):this.$filters.durationInHours(this.track.length_ms)},settings_option_show_composer_now_playing(){return this.$store.getters.settings_option_show_composer_now_playing},settings_option_show_composer_for_genre(){return this.$store.getters.settings_option_show_composer_for_genre},composer(){return this.settings_option_show_composer_now_playing&&(!this.settings_option_show_composer_for_genre||this.track.genre&&this.settings_option_show_composer_for_genre.toLowerCase().split(",").findIndex(e=>this.track.genre.toLowerCase().indexOf(e.trim())>=0)>=0)?this.track.composer:null},settings_option_show_filepath_now_playing(){return this.$store.getters.settings_option_show_filepath_now_playing},filepath(){return this.settings_option_show_filepath_now_playing?this.track.path:null}},watch:{player(){this.interval_id>0&&(window.clearTimeout(this.interval_id),this.interval_id=0),this.player.state==="play"&&(this.interval_id=window.setInterval(this.tick,Tr))}},created(){V.player_status().then(({data:e})=>{this.$store.commit(Qu,e),this.player.state==="play"&&(this.interval_id=window.setInterval(this.tick,Tr))})},unmounted(){this.interval_id>0&&(window.clearTimeout(this.interval_id),this.interval_id=0)},methods:{tick(){this.is_dragged||(this.track_progress+=1)},start_dragging(){this.is_dragged=!0},end_dragging(){this.is_dragged=!1},seek(){this.is_live||V.player_seek_to_pos(this.track_progress*Tr)},open_dialog(e){this.selected_item=e,this.show_details_modal=!0}}},bV={class:"hero is-full-height"},zV={key:0,class:"hero-body is-flex is-align-items-center"},wV={class:"container has-text-centered",style:{"max-width":"500px"}},CV={class:"is-flex is-justify-content-space-between"},kV=["textContent"],xV=["textContent"],SV=["textContent"],EV=["textContent"],$V=["textContent"],TV=["textContent"],AV=["textContent"],OV={key:1,class:"hero-body is-flex is-align-items-center"},PV={class:"container has-text-centered"},IV=["textContent"],DV=["textContent"];function RV(e,t,n,r,o,s){const i=$("cover-artwork"),a=$("lyrics-pane"),l=$("control-slider"),u=$("modal-dialog-queue-item");return k(),A("div",bV,[s.track.id>0?(k(),A("div",zV,[c("div",wV,[y(i,{artwork_url:s.track.artwork_url,artist:s.track.artist,album:s.track.album,class:Ee(["is-clickable fd-has-shadow fd-cover-big-image",{"is-masked":s.lyrics_visible}]),onClick:t[0]||(t[0]=m=>s.open_dialog(s.track))},null,8,["artwork_url","artist","album","class"]),s.lyrics_visible?(k(),ce(a,{key:0})):F("",!0),y(l,{value:s.track_progress,"onUpdate:value":t[1]||(t[1]=m=>s.track_progress=m),class:"mt-5",disabled:s.is_live,max:s.track_progress_max,cursor:o.cursor,onChange:s.seek,onMousedown:s.start_dragging,onMouseup:s.end_dragging},null,8,["value","disabled","max","cursor","onChange","onMousedown","onMouseup"]),c("div",CV,[c("p",{class:"subtitle is-7",textContent:g(s.track_elapsed_time)},null,8,kV),c("p",{class:"subtitle is-7",textContent:g(s.track_total_time)},null,8,xV)]),c("p",{class:"title is-5",textContent:g(s.track.title)},null,8,SV),c("p",{class:"title is-6",textContent:g(s.track.artist)},null,8,EV),s.composer?(k(),A("p",{key:1,class:"subtitle is-6 has-text-grey has-text-weight-bold",textContent:g(s.composer)},null,8,$V)):F("",!0),s.track.album?(k(),A("p",{key:2,class:"subtitle is-6",textContent:g(s.track.album)},null,8,TV)):F("",!0),s.filepath?(k(),A("p",{key:3,class:"subtitle is-6 has-text-grey",textContent:g(s.filepath)},null,8,AV)):F("",!0)])])):(k(),A("div",OV,[c("div",PV,[c("p",{class:"title is-5",textContent:g(e.$t("page.now-playing.title"))},null,8,IV),c("p",{class:"subtitle",textContent:g(e.$t("page.now-playing.info"))},null,8,DV)])])),y(u,{show:o.show_details_modal,item:o.selected_item,onClose:t[2]||(t[2]=m=>o.show_details_modal=!1)},null,8,["show","item"])])}const NV=te(vV,[["render",RV]]),Ea={load(e){return Promise.all([V.library_playlist(e.params.id),V.library_playlist_folder(e.params.id)])},set(e,t){e.playlist=t[0].data,e.playlists_list=new ye(t[1].data)}},LV={name:"PagePlaylistFolder",components:{ContentWithHeading:Qe,ListPlaylists:pm},beforeRouteEnter(e,t,n){Ea.load(e).then(r=>{n(o=>Ea.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;Ea.load(e).then(o=>{Ea.set(r,o),n()})},data(){return{playlist:{},playlists_list:new ye}},computed:{playlists(){return this.playlists_list.group({filters:[e=>e.folder||this.radio_playlists||e.stream_count===0||e.item_count>e.stream_count]}),this.playlists_list},radio_playlists(){return this.$store.state.config.radio_playlists}}},MV=["textContent"],FV=["textContent"];function VV(e,t,n,r,o,s){const i=$("list-playlists"),a=$("content-with-heading");return k(),A("div",null,[y(a,null,{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(o.playlist.id===0?e.$t("page.playlists.title"):o.playlist.name)},null,8,MV),c("p",{class:"heading",textContent:g(e.$t("page.playlists.count",{count:s.playlists.count}))},null,8,FV)]),content:S(()=>[y(i,{playlists:s.playlists},null,8,["playlists"])]),_:1})])}const HV=te(LV,[["render",VV]]),$a={load(e){return Promise.all([V.library_playlist(e.params.id),V.library_playlist_tracks(e.params.id)])},set(e,t){e.playlist=t[0].data,e.tracks=new ye(t[1].data)}},UV={name:"PagePlaylistTracks",components:{ContentWithHeading:Qe,ListTracks:zn,ModalDialogPlaylist:$1},beforeRouteEnter(e,t,n){$a.load(e).then(r=>{n(o=>$a.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;$a.load(e).then(o=>{$a.set(r,o),n()})},data(){return{playlist:{},show_details_modal:!1,tracks:new ye}},computed:{uris(){return this.playlist.random?this.tracks.map(e=>e.uri).join(","):this.playlist.uri}},methods:{play(){V.player_play_uri(this.uris,!0)}}},jV=["textContent"],BV={class:"buttons is-centered"},WV=["textContent"],qV=["textContent"];function GV(e,t,n,r,o,s){const i=$("mdicon"),a=$("list-tracks"),l=$("modal-dialog-playlist"),u=$("content-with-heading");return k(),A("div",null,[y(u,null,{"heading-left":S(()=>[c("div",{class:"title is-4",textContent:g(o.playlist.name)},null,8,jV)]),"heading-right":S(()=>[c("div",BV,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>o.show_details_modal=!0)},[y(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>s.play&&s.play(...m))},[y(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.playlist.shuffle"))},null,8,WV)])])]),content:S(()=>[c("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.playlist.track-count",{count:o.tracks.count}))},null,8,qV),y(a,{tracks:o.tracks,uris:s.uris},null,8,["tracks","uris"]),y(l,{show:o.show_details_modal,playlist:o.playlist,uris:s.uris,onClose:t[2]||(t[2]=m=>o.show_details_modal=!1)},null,8,["show","playlist","uris"])]),_:1})])}const KV=te(UV,[["render",GV]]),Gu=50,Ta={load(e){const t=new Kn;return t.setAccessToken(je.state.spotify.webapi_token),Promise.all([t.getPlaylist(e.params.id),t.getPlaylistTracks(e.params.id,{limit:Gu,offset:0,market:je.state.spotify.webapi_country})])},set(e,t){e.playlist=t[0],e.tracks=[],e.total=0,e.offset=0,e.append_tracks(t[1])}},ZV={name:"PagePlaylistTracksSpotify",components:{ContentWithHeading:Qe,ListItemTrackSpotify:am,ModalDialogPlaylistSpotify:uc,ModalDialogTrackSpotify:lm,VueEternalLoading:cm},beforeRouteEnter(e,t,n){Ta.load(e).then(r=>{n(o=>Ta.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;Ta.load(e).then(o=>{Ta.set(r,o),n()})},data(){return{playlist:{tracks:{}},tracks:[],total:0,offset:0,show_track_details_modal:!1,selected_track:{},show_playlist_details_modal:!1}},methods:{load_next({loaded:e}){const t=new Kn;t.setAccessToken(this.$store.state.spotify.webapi_token),t.getPlaylistTracks(this.playlist.id,{limit:Gu,offset:this.offset,market:je.state.spotify.webapi_country}).then(n=>{this.append_tracks(n),e(n.items.length,Gu)})},append_tracks(e){let t=Math.max(-1,...this.tracks.map(n=>n.position).filter(n=>n));e.items.forEach(n=>{const{track:r}=n;r&&(r.is_playable&&(r.position=++t),this.tracks.push(r))}),this.total=e.total,this.offset+=e.limit},play(){this.show_details_modal=!1,V.player_play_uri(this.playlist.uri,!0)},open_track_dialog(e){this.selected_track=e,this.show_track_details_modal=!0}}},YV=["textContent"],JV={class:"buttons is-centered"},XV=["textContent"],QV=["textContent"],e9=["onClick"],t9={class:"columns is-centered"},n9={class:"column has-text-centered"};function r9(e,t,n,r,o,s){const i=$("mdicon"),a=$("list-item-track-spotify"),l=$("VueEternalLoading"),u=$("modal-dialog-track-spotify"),m=$("modal-dialog-playlist-spotify"),d=$("content-with-heading");return k(),A("div",null,[y(d,null,{"heading-left":S(()=>[c("div",{class:"title is-4",textContent:g(o.playlist.name)},null,8,YV)]),"heading-right":S(()=>[c("div",JV,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=f=>o.show_playlist_details_modal=!0)},[y(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...f)=>s.play&&s.play(...f))},[y(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.spotify.playlist.shuffle"))},null,8,XV)])])]),content:S(()=>[c("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.spotify.playlist.count",{count:o.playlist.tracks.total}))},null,8,QV),(k(!0),A(Ce,null,ct(o.tracks,f=>(k(),ce(a,{key:f.id,track:f,position:f.position,context_uri:o.playlist.uri},{actions:S(()=>[c("a",{onClick:rt(p=>s.open_track_dialog(f),["prevent","stop"])},[y(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,e9)]),_:2},1032,["track","position","context_uri"]))),128)),o.offset[c("div",t9,[c("div",n9,[y(i,{class:"icon mdi-spin",name:"loading"})])])]),"no-more":S(()=>[gt(" ")]),_:1},8,["load"])):F("",!0),y(u,{show:o.show_track_details_modal,track:o.selected_track,album:o.selected_track.album,onClose:t[2]||(t[2]=f=>o.show_track_details_modal=!1)},null,8,["show","track","album"]),y(m,{show:o.show_playlist_details_modal,playlist:o.playlist,onClose:t[3]||(t[3]=f=>o.show_playlist_details_modal=!1)},null,8,["show","playlist"])]),_:1})])}const o9=te(ZV,[["render",r9]]),Aa={load(e){return Promise.all([V.library_album(e.params.id),V.library_podcast_episodes(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new ye(t[1].data.tracks)}},s9={name:"PagePodcast",components:{ContentWithHero:ic,CoverArtwork:Dn,ListTracks:zn,ModalDialog:Yd,ModalDialogAlbum:ac},beforeRouteEnter(e,t,n){Aa.load(e).then(r=>{n(o=>Aa.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;Aa.load(e).then(o=>{Aa.set(r,o),n()})},data(){return{album:{},rss_playlist_to_remove:{},show_details_modal:!1,show_remove_podcast_modal:!1,tracks:new ye}},methods:{open_remove_podcast_dialog(){V.library_track_playlists(this.tracks.items[0].id).then(({data:e})=>{[this.rss_playlist_to_remove]=e.items.filter(t=>t.type==="rss"),this.show_remove_podcast_modal=!0,this.show_details_modal=!1})},play(){V.player_play_uri(this.album.uri,!1)},reload_tracks(){V.library_podcast_episodes(this.album.id).then(({data:e})=>{this.tracks=new ye(e.tracks)})},remove_podcast(){this.show_remove_podcast_modal=!1,V.library_playlist_delete(this.rss_playlist_to_remove.id).then(()=>{this.$router.replace({name:"podcasts"})})}}},i9=["textContent"],a9=c("h2",{class:"subtitle is-6"}," ",-1),l9={class:"buttons fd-is-centered-mobile mt-5"},c9=["textContent"],u9=["textContent"],d9=["textContent"],m9={class:"is-size-7"},f9=["textContent"],p9=["textContent"];function h9(e,t,n,r,o,s){const i=$("mdicon"),a=$("cover-artwork"),l=$("list-tracks"),u=$("modal-dialog-album"),m=$("modal-dialog"),d=$("content-with-hero");return k(),A("div",null,[y(d,null,{"heading-left":S(()=>[c("h1",{class:"title is-5",textContent:g(o.album.name)},null,8,i9),a9,c("div",l9,[c("a",{class:"button is-small is-dark is-rounded",onClick:t[0]||(t[0]=(...f)=>s.play&&s.play(...f))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{textContent:g(e.$t("page.podcast.play"))},null,8,c9)]),c("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>o.show_details_modal=!0)},[y(i,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":S(()=>[y(a,{artwork_url:o.album.artwork_url,artist:o.album.artist,album:o.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[2]||(t[2]=f=>o.show_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:S(()=>[c("p",{class:"heading has-text-centered-mobile mt-5",textContent:g(e.$t("page.podcast.track-count",{count:o.album.track_count}))},null,8,u9),y(l,{tracks:o.tracks,show_progress:!0,onPlayCountChanged:s.reload_tracks},null,8,["tracks","onPlayCountChanged"]),y(u,{show:o.show_details_modal,album:o.album,media_kind:"podcast",onClose:t[3]||(t[3]=f=>o.show_details_modal=!1),onPlayCountChanged:s.reload_tracks,onRemovePodcast:s.open_remove_podcast_dialog},null,8,["show","album","onPlayCountChanged","onRemovePodcast"]),y(m,{show:o.show_remove_podcast_modal,title:e.$t("page.podcast.remove-podcast"),delete_action:e.$t("page.podcast.remove"),onClose:t[4]||(t[4]=f=>o.show_remove_podcast_modal=!1),onDelete:s.remove_podcast},{"modal-content":S(()=>[c("p",{textContent:g(e.$t("page.podcast.remove-info-1"))},null,8,d9),c("p",m9,[gt(" ("),c("span",{textContent:g(e.$t("page.podcast.remove-info-2"))},null,8,f9),c("b",{textContent:g(o.rss_playlist_to_remove.name)},null,8,p9),gt(") ")])]),_:1},8,["show","title","delete_action","onDelete"])]),_:1})])}const _9=te(s9,[["render",h9]]),g9={name:"ModalDialogAddRss",props:{show:Boolean},emits:["close","podcast-added"],data(){return{url:"",loading:!1}},watch:{show(){this.show&&(this.loading=!1,setTimeout(()=>{this.$refs.url_field.focus()},10))}},methods:{add_stream(){this.loading=!0,V.library_add(this.url).then(()=>{this.$emit("close"),this.$emit("podcast-added"),this.url=""}).catch(()=>{this.loading=!1})}}},y9={key:0,class:"modal is-active"},v9={class:"modal-content"},b9={class:"card-content"},z9=["textContent"],w9={class:"field"},C9={class:"control has-icons-left"},k9=["placeholder","disabled"],x9=["textContent"],S9={key:0,class:"card-footer"},E9={class:"card-footer-item has-text-dark"},$9=["textContent"],T9={key:1,class:"card-footer is-clipped"},A9=["textContent"],O9=["textContent"];function P9(e,t,n,r,o,s){const i=$("mdicon");return k(),ce(Dt,{name:"fade"},{default:S(()=>[n.show?(k(),A("div",y9,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",v9,[c("form",{class:"card",onSubmit:t[4]||(t[4]=rt((...a)=>s.add_stream&&s.add_stream(...a),["prevent"]))},[c("div",b9,[c("p",{class:"title is-4",textContent:g(e.$t("dialog.add.rss.title"))},null,8,z9),c("div",w9,[c("p",C9,[yt(c("input",{ref:"url_field","onUpdate:modelValue":t[1]||(t[1]=a=>o.url=a),class:"input is-shadowless",type:"url",pattern:"http[s]?://.*",required:"",placeholder:e.$t("dialog.add.rss.placeholder"),disabled:o.loading},null,8,k9),[[un,o.url]]),y(i,{class:"icon is-left",name:"rss",size:"16"})]),c("p",{class:"help",textContent:g(e.$t("dialog.add.rss.help"))},null,8,x9)])]),o.loading?(k(),A("footer",S9,[c("a",E9,[y(i,{class:"icon",name:"web",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.rss.processing"))},null,8,$9)])])):(k(),A("footer",T9,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=a=>e.$emit("close"))},[y(i,{class:"icon",name:"cancel",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.rss.cancel"))},null,8,A9)]),c("a",{class:"card-footer-item has-background-info has-text-white has-text-weight-bold",onClick:t[3]||(t[3]=(...a)=>s.add_stream&&s.add_stream(...a))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.rss.add"))},null,8,O9)])]))],32)]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):F("",!0)]),_:1})}const I9=te(g9,[["render",P9]]),Oa={load(e){return Promise.all([V.library_albums("podcast"),V.library_podcasts_new_episodes()])},set(e,t){e.albums=new ye(t[0].data),e.new_episodes=new ye(t[1].data.tracks)}},D9={name:"PagePodcasts",components:{ContentWithHeading:Qe,ListTracks:zn,ListAlbums:ar,ModalDialogAddRss:I9},beforeRouteEnter(e,t,n){Oa.load(e).then(r=>{n(o=>Oa.set(o,r))})},beforeRouteUpdate(e,t,n){const r=this;Oa.load(e).then(o=>{Oa.set(r,o),n()})},data(){return{albums:[],new_episodes:{items:[]},show_url_modal:!1}},computed:{rss(){return this.$store.state.rss_count}},methods:{mark_all_played(){this.new_episodes.items.forEach(e=>{V.library_track_update(e.id,{play_count:"increment"})}),this.new_episodes.items={}},open_add_podcast_dialog(e){this.show_url_modal=!0},reload_new_episodes(){V.library_podcasts_new_episodes().then(({data:e})=>{this.new_episodes=new ye(e.tracks)})},reload_podcasts(){V.library_albums("podcast").then(({data:e})=>{this.albums=new ye(e),this.reload_new_episodes()})},update_rss(){this.$store.commit(nd,"rss"),this.$store.commit(gi,!0)}}},R9=["textContent"],N9={class:"buttons is-centered"},L9=["textContent"],M9=["textContent"],F9=["textContent"],V9={class:"buttons is-centered"},H9=["textContent"],U9=["textContent"];function j9(e,t,n,r,o,s){const i=$("mdicon"),a=$("list-tracks"),l=$("content-with-heading"),u=$("list-albums"),m=$("modal-dialog-add-rss");return k(),A("div",null,[o.new_episodes.items.length>0?(k(),ce(l,{key:0},{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.podcasts.new-episodes"))},null,8,R9)]),"heading-right":S(()=>[c("div",N9,[c("a",{class:"button is-small",onClick:t[0]||(t[0]=(...d)=>s.mark_all_played&&s.mark_all_played(...d))},[y(i,{class:"icon",name:"pencil",size:"16"}),c("span",{textContent:g(e.$t("page.podcasts.mark-all-played"))},null,8,L9)])])]),content:S(()=>[y(a,{tracks:o.new_episodes,show_progress:!0,onPlayCountChanged:s.reload_new_episodes},null,8,["tracks","onPlayCountChanged"])]),_:1})):F("",!0),y(l,null,{"heading-left":S(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.podcasts.title"))},null,8,M9),c("p",{class:"heading",textContent:g(e.$t("page.podcasts.count",{count:o.albums.total}))},null,8,F9)]),"heading-right":S(()=>[c("div",V9,[s.rss.tracks>0?(k(),A("a",{key:0,class:"button is-small",onClick:t[1]||(t[1]=(...d)=>s.update_rss&&s.update_rss(...d))},[y(i,{class:"icon",name:"refresh",size:"16"}),c("span",{textContent:g(e.$t("page.podcasts.update"))},null,8,H9)])):F("",!0),c("a",{class:"button is-small",onClick:t[2]||(t[2]=(...d)=>s.open_add_podcast_dialog&&s.open_add_podcast_dialog(...d))},[y(i,{class:"icon",name:"rss",size:"16"}),c("span",{textContent:g(e.$t("page.podcasts.add"))},null,8,U9)])])]),content:S(()=>[y(u,{albums:o.albums,onPlayCountChanged:t[3]||(t[3]=d=>s.reload_new_episodes()),onPodcastDeleted:t[4]||(t[4]=d=>s.reload_podcasts())},null,8,["albums"]),y(m,{show:o.show_url_modal,onClose:t[5]||(t[5]=d=>o.show_url_modal=!1),onPodcastAdded:t[6]||(t[6]=d=>s.reload_podcasts())},null,8,["show"])]),_:1})])}const B9=te(D9,[["render",j9]]),W9={name:"ListItemQueueItem",props:{current_position:{required:!0,type:Number},edit_mode:Boolean,item:{required:!0,type:Object},position:{required:!0,type:Number},show_only_next_items:Boolean},computed:{state(){return this.$store.state.player},is_next(){return this.current_position<0||this.position>=this.current_position}},methods:{play(){V.player_play({item_id:this.item.id})}}},q9={key:0,class:"media is-align-items-center"},G9={key:0,class:"media-left"},K9=["textContent"],Z9=["textContent"],Y9=["textContent"],J9={class:"media-right"};function X9(e,t,n,r,o,s){const i=$("mdicon");return s.is_next||!n.show_only_next_items?(k(),A("div",q9,[n.edit_mode?(k(),A("div",G9,[y(i,{class:"icon has-text-grey fd-is-movable handle",name:"drag-horizontal",size:"16"})])):F("",!0),c("div",{class:"media-content is-clickable is-clipped",onClick:t[0]||(t[0]=(...a)=>s.play&&s.play(...a))},[c("h1",{class:Ee(["title is-6",{"has-text-primary":n.item.id===s.state.item_id,"has-text-grey-light":!s.is_next}]),textContent:g(n.item.title)},null,10,K9),c("h2",{class:Ee(["subtitle is-7 has-text-weight-bold",{"has-text-primary":n.item.id===s.state.item_id,"has-text-grey-light":!s.is_next,"has-text-grey":s.is_next&&n.item.id!==s.state.item_id}]),textContent:g(n.item.artist)},null,10,Z9),c("h2",{class:Ee(["subtitle is-7",{"has-text-primary":n.item.id===s.state.item_id,"has-text-grey-light":!s.is_next,"has-text-grey":s.is_next&&n.item.id!==s.state.item_id}]),textContent:g(n.item.album)},null,10,Y9)]),c("div",J9,[st(e.$slots,"actions")])])):F("",!0)}const Q9=te(W9,[["render",X9]]),eH={name:"ModalDialogAddUrlStream",props:{show:Boolean},emits:["close"],data(){return{url:"",loading:!1}},watch:{show(){this.show&&(this.loading=!1,setTimeout(()=>{this.$refs.url_field.focus()},10))}},methods:{add_stream(){this.loading=!0,V.queue_add(this.url).then(()=>{this.$emit("close"),this.url=""}).catch(()=>{this.loading=!1})},play(){this.loading=!0,V.player_play_uri(this.url,!1).then(()=>{this.$emit("close"),this.url=""}).catch(()=>{this.loading=!1})}}},tH={key:0,class:"modal is-active"},nH={class:"modal-content"},rH={class:"card-content"},oH=["textContent"],sH={class:"field"},iH={class:"control has-icons-left"},aH=["placeholder","disabled"],lH={key:0,class:"card-footer"},cH={class:"card-footer-item has-text-dark"},uH=["textContent"],dH={key:1,class:"card-footer is-clipped"},mH=["textContent"],fH=["textContent"],pH=["textContent"];function hH(e,t,n,r,o,s){const i=$("mdicon");return k(),ce(Dt,{name:"fade"},{default:S(()=>[n.show?(k(),A("div",tH,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",nH,[c("form",{class:"card",onSubmit:t[5]||(t[5]=rt((...a)=>s.play&&s.play(...a),["prevent"]))},[c("div",rH,[c("p",{class:"title is-4",textContent:g(e.$t("dialog.add.stream.title"))},null,8,oH),c("div",sH,[c("p",iH,[yt(c("input",{ref:"url_field","onUpdate:modelValue":t[1]||(t[1]=a=>o.url=a),class:"input is-shadowless",type:"url",pattern:"http[s]?://.*",required:"",placeholder:e.$t("dialog.add.stream.placeholder"),disabled:o.loading},null,8,aH),[[un,o.url]]),y(i,{class:"icon is-left",name:"web",size:"16"})])])]),o.loading?(k(),A("footer",lH,[c("a",cH,[y(i,{class:"icon",name:"web",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.stream.loading"))},null,8,uH)])])):(k(),A("footer",dH,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=a=>e.$emit("close"))},[y(i,{class:"icon",name:"cancel",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.stream.cancel"))},null,8,mH)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.add_stream&&s.add_stream(...a))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.stream.add"))},null,8,fH)]),c("a",{class:"card-footer-item has-background-info has-text-white has-text-weight-bold",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[y(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.stream.play"))},null,8,pH)])]))],32)]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=a=>e.$emit("close"))})])):F("",!0)]),_:1})}const _H=te(eH,[["render",hH]]),gH={name:"ModalDialogPlaylistSave",props:{show:Boolean},emits:["close"],data(){return{playlist_name:"",loading:!1}},watch:{show(){this.show&&(this.loading=!1,setTimeout(()=>{this.$refs.playlist_name_field.focus()},10))}},methods:{save(){this.playlist_name.length<1||(this.loading=!0,V.queue_save_playlist(this.playlist_name).then(()=>{this.$emit("close"),this.playlist_name=""}).catch(()=>{this.loading=!1}))}}},yH={key:0,class:"modal is-active"},vH={class:"modal-content"},bH={class:"card"},zH={class:"card-content"},wH=["textContent"],CH={class:"field"},kH={class:"control has-icons-left"},xH=["placeholder","disabled"],SH={key:0,class:"card-footer"},EH={class:"card-footer-item has-text-dark"},$H=["textContent"],TH={key:1,class:"card-footer is-clipped"},AH=["textContent"],OH=["textContent"];function PH(e,t,n,r,o,s){const i=$("mdicon");return k(),ce(Dt,{name:"fade"},{default:S(()=>[n.show?(k(),A("div",yH,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",vH,[c("div",bH,[c("div",zH,[c("p",{class:"title is-4",textContent:g(e.$t("dialog.playlist.save.title"))},null,8,wH),c("form",{class:"mb-5",onSubmit:t[2]||(t[2]=rt((...a)=>s.save&&s.save(...a),["prevent"]))},[c("div",CH,[c("p",kH,[yt(c("input",{ref:"playlist_name_field","onUpdate:modelValue":t[1]||(t[1]=a=>o.playlist_name=a),class:"input is-shadowless",type:"text",placeholder:e.$t("dialog.playlist.save.playlist-name"),disabled:o.loading},null,8,xH),[[un,o.playlist_name]]),y(i,{class:"icon is-left",name:"file-music",size:"16"})])])],32)]),o.loading?(k(),A("footer",SH,[c("a",EH,[y(i,{class:"icon",name:"web",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.save.saving"))},null,8,$H)])])):(k(),A("footer",TH,[c("a",{class:"card-footer-item has-text-danger",onClick:t[3]||(t[3]=a=>e.$emit("close"))},[y(i,{class:"icon",name:"cancel",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.save.cancel"))},null,8,AH)]),c("a",{class:"card-footer-item has-background-info has-text-white has-text-weight-bold",onClick:t[4]||(t[4]=(...a)=>s.save&&s.save(...a))},[y(i,{class:"icon",name:"content-save",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.save.save"))},null,8,OH)])]))])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):F("",!0)]),_:1})}const IH=te(gH,[["render",PH]]);var A1={exports:{}};/**! * Sortable 1.14.0 * @author RubaXa @@ -66,4 +66,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var UH="1.14.0";function gr(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var zr=gr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Pi=gr(/Edge/i),jp=gr(/firefox/i),Ys=gr(/safari/i)&&!gr(/chrome/i)&&!gr(/android/i),O1=gr(/iP(ad|od|hone)/i),jH=gr(/chrome/i)&&gr(/android/i),P1={capture:!1,passive:!1};function Ge(e,t,n){e.addEventListener(t,n,!zr&&P1)}function We(e,t,n){e.removeEventListener(t,n,!zr&&P1)}function zl(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function BH(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Fn(e,t,n,r){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&zl(e,t):zl(e,t))||r&&e===n)return e;if(e===n)break}while(e=BH(e))}return null}var Bp=/\s+/g;function Ct(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(Bp," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(Bp," ")}}function we(e,t,n){var r=e&&e.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in r)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),r[t]=n+(typeof n=="string"?"":"px")}}function ho(e,t){var n="";if(typeof e=="string")n=e;else do{var r=we(e,"transform");r&&r!=="none"&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function I1(e,t,n){if(e){var r=e.getElementsByTagName(t),o=0,s=r.length;if(n)for(;o=s:i=o<=s,!i)return r;if(r===rr())break;r=Vr(r,!1)}return!1}function cs(e,t,n,r){for(var o=0,s=0,i=e.children;s2&&arguments[2]!==void 0?arguments[2]:{},o=r.evt,s=NH(r,JH);Ii.pluginEvent.bind(Oe)(t,n,sr({dragEl:de,parentEl:kt,ghostEl:Fe,rootEl:vt,nextEl:oo,lastDownEl:Za,cloneEl:xt,cloneHidden:Fr,dragStarted:Ls,putSortable:Ht,activeSortable:Oe.active,originalEvent:o,oldIndex:Ho,oldDraggableIndex:Xs,newIndex:fn,newDraggableIndex:Lr,hideGhostForTarget:F1,unhideGhostForTarget:V1,cloneNowHidden:function(){Fr=!0},cloneNowShown:function(){Fr=!1},dispatchSortableEvent:function(a){Yt({sortable:n,name:a,originalEvent:o})}},s))};function Yt(e){Ns(sr({putSortable:Ht,cloneEl:xt,targetEl:de,rootEl:vt,oldIndex:Ho,oldDraggableIndex:Xs,newIndex:fn,newDraggableIndex:Lr},e))}var de,kt,Fe,vt,oo,Za,xt,Fr,Ho,fn,Xs,Lr,Pa,Ht,Mo=!1,wl=!1,Cl=[],no,Ln,Gc,Kc,Kp,Zp,Ls,Io,Qs,ei=!1,Ia=!1,Ya,jt,Zc=[],Zu=!1,kl=[],dc=typeof document<"u",Da=O1,Yp=Pi||zr?"cssFloat":"float",XH=dc&&!jH&&!O1&&"draggable"in document.createElement("div"),N1=function(){if(dc){if(zr)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),L1=function(t,n){var r=we(t),o=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),s=cs(t,0,n),i=cs(t,1,n),a=s&&we(s),l=i&&we(i),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+bt(s).width,m=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+bt(i).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&a.float&&a.float!=="none"){var d=a.float==="left"?"left":"right";return i&&(l.clear==="both"||l.clear===d)?"vertical":"horizontal"}return s&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||u>=o&&r[Yp]==="none"||i&&r[Yp]==="none"&&u+m>o)?"vertical":"horizontal"},QH=function(t,n,r){var o=r?t.left:t.top,s=r?t.right:t.bottom,i=r?t.width:t.height,a=r?n.left:n.top,l=r?n.right:n.bottom,u=r?n.width:n.height;return o===a||s===l||o+i/2===a+u/2},eU=function(t,n){var r;return Cl.some(function(o){var s=o[qt].options.emptyInsertThreshold;if(!(!s||_m(o))){var i=bt(o),a=t>=i.left-s&&t<=i.right+s,l=n>=i.top-s&&n<=i.bottom+s;if(a&&l)return r=o}}),r},M1=function(t){function n(s,i){return function(a,l,u,m){var d=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(s==null&&(i||d))return!0;if(s==null||s===!1)return!1;if(i&&s==="clone")return s;if(typeof s=="function")return n(s(a,l,u,m),i)(a,l,u,m);var f=(i?a:l).options.group.name;return s===!0||typeof s=="string"&&s===f||s.join&&s.indexOf(f)>-1}}var r={},o=t.group;(!o||Ka(o)!="object")&&(o={name:o}),r.name=o.name,r.checkPull=n(o.pull,!0),r.checkPut=n(o.put),r.revertClone=o.revertClone,t.group=r},F1=function(){!N1&&Fe&&we(Fe,"display","none")},V1=function(){!N1&&Fe&&we(Fe,"display","")};dc&&document.addEventListener("click",function(e){if(wl)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),wl=!1,!1},!0);var ro=function(t){if(de){t=t.touches?t.touches[0]:t;var n=eU(t.clientX,t.clientY);if(n){var r={};for(var o in t)t.hasOwnProperty(o)&&(r[o]=t[o]);r.target=r.rootEl=n,r.preventDefault=void 0,r.stopPropagation=void 0,n[qt]._onDragOver(r)}}},tU=function(t){de&&de.parentNode[qt]._isOutsideThisEl(t.target)};function Oe(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=Pn({},t),e[qt]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return L1(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(i,a){i.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Oe.supportPointer!==!1&&"PointerEvent"in window&&!Ys,emptyInsertThreshold:5};Ii.initializePlugins(this,e,n);for(var r in n)!(r in t)&&(t[r]=n[r]);M1(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:XH,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?Ge(e,"pointerdown",this._onTapStart):(Ge(e,"mousedown",this._onTapStart),Ge(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Ge(e,"dragover",this),Ge(e,"dragenter",this)),Cl.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Pn(this,KH())}Oe.prototype={constructor:Oe,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Io=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,de):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,r=this.el,o=this.options,s=o.preventOnFilter,i=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,m=o.filter;if(cU(r),!de&&!(/mousedown|pointerdown/.test(i)&&t.button!==0||o.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&Ys&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=Fn(l,o.draggable,r,!1),!(l&&l.animated)&&Za!==l)){if(Ho=Et(l),Xs=Et(l,o.draggable),typeof m=="function"){if(m.call(this,t,l,this)){Yt({sortable:n,rootEl:u,name:"filter",targetEl:l,toEl:r,fromEl:r}),tn("filter",n,{evt:t}),s&&t.cancelable&&t.preventDefault();return}}else if(m&&(m=m.split(",").some(function(d){if(d=Fn(u,d.trim(),r,!1),d)return Yt({sortable:n,rootEl:d,name:"filter",targetEl:l,fromEl:r,toEl:r}),tn("filter",n,{evt:t}),!0}),m)){s&&t.cancelable&&t.preventDefault();return}o.handle&&!Fn(u,o.handle,r,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,n,r){var o=this,s=o.el,i=o.options,a=s.ownerDocument,l;if(r&&!de&&r.parentNode===s){var u=bt(r);if(vt=s,de=r,kt=de.parentNode,oo=de.nextSibling,Za=r,Pa=i.group,Oe.dragged=de,no={target:de,clientX:(n||t).clientX,clientY:(n||t).clientY},Kp=no.clientX-u.left,Zp=no.clientY-u.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,de.style["will-change"]="all",l=function(){if(tn("delayEnded",o,{evt:t}),Oe.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!jp&&o.nativeDraggable&&(de.draggable=!0),o._triggerDragStart(t,n),Yt({sortable:o,name:"choose",originalEvent:t}),Ct(de,i.chosenClass,!0)},i.ignore.split(",").forEach(function(m){I1(de,m.trim(),Yc)}),Ge(a,"dragover",ro),Ge(a,"mousemove",ro),Ge(a,"touchmove",ro),Ge(a,"mouseup",o._onDrop),Ge(a,"touchend",o._onDrop),Ge(a,"touchcancel",o._onDrop),jp&&this.nativeDraggable&&(this.options.touchStartThreshold=4,de.draggable=!0),tn("delayStart",this,{evt:t}),i.delay&&(!i.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Pi||zr))){if(Oe.eventCanceled){this._onDrop();return}Ge(a,"mouseup",o._disableDelayedDrag),Ge(a,"touchend",o._disableDelayedDrag),Ge(a,"touchcancel",o._disableDelayedDrag),Ge(a,"mousemove",o._delayedDragTouchMoveHandler),Ge(a,"touchmove",o._delayedDragTouchMoveHandler),i.supportPointer&&Ge(a,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(l,i.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){de&&Yc(de),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;We(t,"mouseup",this._disableDelayedDrag),We(t,"touchend",this._disableDelayedDrag),We(t,"touchcancel",this._disableDelayedDrag),We(t,"mousemove",this._delayedDragTouchMoveHandler),We(t,"touchmove",this._delayedDragTouchMoveHandler),We(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?Ge(document,"pointermove",this._onTouchMove):n?Ge(document,"touchmove",this._onTouchMove):Ge(document,"mousemove",this._onTouchMove):(Ge(de,"dragend",this),Ge(vt,"dragstart",this._onDragStart));try{document.selection?Ja(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(Mo=!1,vt&&de){tn("dragStarted",this,{evt:n}),this.nativeDraggable&&Ge(document,"dragover",tU);var r=this.options;!t&&Ct(de,r.dragClass,!1),Ct(de,r.ghostClass,!0),Oe.active=this,t&&this._appendGhost(),Yt({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(Ln){this._lastX=Ln.clientX,this._lastY=Ln.clientY,F1();for(var t=document.elementFromPoint(Ln.clientX,Ln.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Ln.clientX,Ln.clientY),t!==n);)n=t;if(de.parentNode[qt]._isOutsideThisEl(t),n)do{if(n[qt]){var r=void 0;if(r=n[qt]._onDragOver({clientX:Ln.clientX,clientY:Ln.clientY,target:t,rootEl:n}),r&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);V1()}},_onTouchMove:function(t){if(no){var n=this.options,r=n.fallbackTolerance,o=n.fallbackOffset,s=t.touches?t.touches[0]:t,i=Fe&&ho(Fe,!0),a=Fe&&i&&i.a,l=Fe&&i&&i.d,u=Da&&jt&&qp(jt),m=(s.clientX-no.clientX+o.x)/(a||1)+(u?u[0]-Zc[0]:0)/(a||1),d=(s.clientY-no.clientY+o.y)/(l||1)+(u?u[1]-Zc[1]:0)/(l||1);if(!Oe.active&&!Mo){if(r&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))=0&&(Yt({rootEl:kt,name:"add",toEl:kt,fromEl:vt,originalEvent:t}),Yt({sortable:this,name:"remove",toEl:kt,originalEvent:t}),Yt({rootEl:kt,name:"sort",toEl:kt,fromEl:vt,originalEvent:t}),Yt({sortable:this,name:"sort",toEl:kt,originalEvent:t})),Ht&&Ht.save()):fn!==Ho&&fn>=0&&(Yt({sortable:this,name:"update",toEl:kt,originalEvent:t}),Yt({sortable:this,name:"sort",toEl:kt,originalEvent:t})),Oe.active&&((fn==null||fn===-1)&&(fn=Ho,Lr=Xs),Yt({sortable:this,name:"end",toEl:kt,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){tn("nulling",this),vt=de=kt=Fe=oo=xt=Za=Fr=no=Ln=Ls=fn=Lr=Ho=Xs=Io=Qs=Ht=Pa=Oe.dragged=Oe.ghost=Oe.clone=Oe.active=null,kl.forEach(function(t){t.checked=!0}),kl.length=Gc=Kc=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":de&&(this._onDragOver(t),nU(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,r=this.el.children,o=0,s=r.length,i=this.options;or.right+o||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+o}function iU(e,t,n,r,o,s,i,a){var l=r?e.clientY:e.clientX,u=r?n.height:n.width,m=r?n.top:n.left,d=r?n.bottom:n.right,f=!1;if(!i){if(a&&Yam+u*s/2:ld-Ya)return-Qs}else if(l>m+u*(1-o)/2&&ld-u*s/2)?l>m+u/2?1:-1:0}function aU(e){return Et(de)1&&(Ne.forEach(function(a){s.addAnimationState({target:a,rect:nn?bt(a):i}),Wc(a),a.fromRect=i,r.removeAnimationState(a)}),nn=!1,pU(!this.options.removeCloneOnHide,o))},dragOverCompleted:function(n){var r=n.sortable,o=n.isOwner,s=n.insertion,i=n.activeSortable,a=n.parentEl,l=n.putSortable,u=this.options;if(s){if(o&&i._hideClone(),Ts=!1,u.animation&&Ne.length>1&&(nn||!o&&!i.options.sort&&!l)){var m=bt(_t,!1,!0,!0);Ne.forEach(function(f){f!==_t&&(Gp(f,m),a.appendChild(f))}),nn=!0}if(!o)if(nn||La(),Ne.length>1){var d=Na;i._showClone(r),i.options.animation&&!Na&&d&&mn.forEach(function(f){i.addAnimationState({target:f,rect:As}),f.fromRect=As,f.thisAnimationDuration=null})}else i._showClone(r)}},dragOverAnimationCapture:function(n){var r=n.dragRect,o=n.isOwner,s=n.activeSortable;if(Ne.forEach(function(a){a.thisAnimationDuration=null}),s.options.animation&&!o&&s.multiDrag.isMultiDrag){As=Pn({},r);var i=ho(_t,!0);As.top-=i.f,As.left-=i.e}},dragOverAnimationComplete:function(){nn&&(nn=!1,La())},drop:function(n){var r=n.originalEvent,o=n.rootEl,s=n.parentEl,i=n.sortable,a=n.dispatchSortableEvent,l=n.oldIndex,u=n.putSortable,m=u||this.sortable;if(r){var d=this.options,f=s.children;if(!Do)if(d.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),Ct(_t,d.selectedClass,!~Ne.indexOf(_t)),~Ne.indexOf(_t))Ne.splice(Ne.indexOf(_t),1),$s=null,Ns({sortable:i,rootEl:o,name:"deselect",targetEl:_t,originalEvt:r});else{if(Ne.push(_t),Ns({sortable:i,rootEl:o,name:"select",targetEl:_t,originalEvt:r}),r.shiftKey&&$s&&i.el.contains($s)){var p=Et($s),h=Et(_t);if(~p&&~h&&p!==h){var _,b;for(h>p?(b=p,_=h):(b=h,_=p+1);b<_;b++)~Ne.indexOf(f[b])||(Ct(f[b],d.selectedClass,!0),Ne.push(f[b]),Ns({sortable:i,rootEl:o,name:"select",targetEl:f[b],originalEvt:r}))}}else $s=_t;Mn=m}if(Do&&this.isMultiDrag){if(nn=!1,(s[qt].options.sort||s!==o)&&Ne.length>1){var w=bt(_t),C=Et(_t,":not(."+this.options.selectedClass+")");if(!Ts&&d.animation&&(_t.thisAnimationDuration=null),m.captureAnimationState(),!Ts&&(d.animation&&(_t.fromRect=w,Ne.forEach(function(z){if(z.thisAnimationDuration=null,z!==_t){var E=nn?bt(z):w;z.fromRect=E,m.addAnimationState({target:z,rect:E})}})),La(),Ne.forEach(function(z){f[C]?s.insertBefore(z,f[C]):s.appendChild(z),C++}),l===Et(_t))){var v=!1;Ne.forEach(function(z){if(z.sortableIndex!==Et(z)){v=!0;return}}),v&&a("update")}Ne.forEach(function(z){Wc(z)}),m.animateAll()}Mn=m}(o===s||u&&u.lastPutMode!=="clone")&&mn.forEach(function(z){z.parentNode&&z.parentNode.removeChild(z)})}},nullingGlobal:function(){this.isMultiDrag=Do=!1,mn.length=0},destroyGlobal:function(){this._deselectMultiDrag(),We(document,"pointerup",this._deselectMultiDrag),We(document,"mouseup",this._deselectMultiDrag),We(document,"touchend",this._deselectMultiDrag),We(document,"keydown",this._checkKeyDown),We(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(n){if(!(typeof Do<"u"&&Do)&&Mn===this.sortable&&!(n&&Fn(n.target,this.options.draggable,this.sortable.el,!1))&&!(n&&n.button!==0))for(;Ne.length;){var r=Ne[0];Ct(r,this.options.selectedClass,!1),Ne.shift(),Ns({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:r,originalEvt:n})}},_checkKeyDown:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},Pn(e,{pluginName:"multiDrag",utils:{select:function(n){var r=n.parentNode[qt];!r||!r.options.multiDrag||~Ne.indexOf(n)||(Mn&&Mn!==r&&(Mn.multiDrag._deselectMultiDrag(),Mn=r),Ct(n,r.options.selectedClass,!0),Ne.push(n))},deselect:function(n){var r=n.parentNode[qt],o=Ne.indexOf(n);!r||!r.options.multiDrag||!~o||(Ct(n,r.options.selectedClass,!1),Ne.splice(o,1))}},eventProperties:function(){var n=this,r=[],o=[];return Ne.forEach(function(s){r.push({multiDragElement:s,index:s.sortableIndex});var i;nn&&s!==_t?i=-1:nn?i=Et(s,":not(."+n.options.selectedClass+")"):i=Et(s),o.push({multiDragElement:s,index:i})}),{items:LH(Ne),clones:[].concat(mn),oldIndicies:r,newIndicies:o}},optionListeners:{multiDragKey:function(n){return n=n.toLowerCase(),n==="ctrl"?n="Control":n.length>1&&(n=n.charAt(0).toUpperCase()+n.substr(1)),n}}})}function pU(e,t){Ne.forEach(function(n,r){var o=t.children[n.sortableIndex+(e?Number(r):0)];o?t.insertBefore(n,o):t.appendChild(n)})}function Xp(e,t){mn.forEach(function(n,r){var o=t.children[n.sortableIndex+(e?Number(r):0)];o?t.insertBefore(n,o):t.appendChild(n)})}function La(){Ne.forEach(function(e){e!==_t&&e.parentNode&&e.parentNode.removeChild(e)})}Oe.mount(new uU);Oe.mount(vm,ym);const hU=Object.freeze(Object.defineProperty({__proto__:null,MultiDrag:fU,Sortable:Oe,Swap:dU,default:Oe},Symbol.toStringTag,{value:"Module"})),_U=oy(hU);(function(e,t){(function(r,o){e.exports=o(u1,_U)})(typeof self<"u"?self:ry,function(n,r){return function(o){var s={};function i(a){if(s[a])return s[a].exports;var l=s[a]={i:a,l:!1,exports:{}};return o[a].call(l.exports,l,l.exports,i),l.l=!0,l.exports}return i.m=o,i.c=s,i.d=function(a,l,u){i.o(a,l)||Object.defineProperty(a,l,{enumerable:!0,get:u})},i.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},i.t=function(a,l){if(l&1&&(a=i(a)),l&8||l&4&&typeof a=="object"&&a&&a.__esModule)return a;var u=Object.create(null);if(i.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:a}),l&2&&typeof a!="string")for(var m in a)i.d(u,m,(function(d){return a[d]}).bind(null,m));return u},i.n=function(a){var l=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(l,"a",l),l},i.o=function(a,l){return Object.prototype.hasOwnProperty.call(a,l)},i.p="",i(i.s="fb15")}({"00ee":function(o,s,i){var a=i("b622"),l=a("toStringTag"),u={};u[l]="z",o.exports=String(u)==="[object z]"},"0366":function(o,s,i){var a=i("1c0b");o.exports=function(l,u,m){if(a(l),u===void 0)return l;switch(m){case 0:return function(){return l.call(u)};case 1:return function(d){return l.call(u,d)};case 2:return function(d,f){return l.call(u,d,f)};case 3:return function(d,f,p){return l.call(u,d,f,p)}}return function(){return l.apply(u,arguments)}}},"057f":function(o,s,i){var a=i("fc6a"),l=i("241c").f,u={}.toString,m=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],d=function(f){try{return l(f)}catch{return m.slice()}};o.exports.f=function(p){return m&&u.call(p)=="[object Window]"?d(p):l(a(p))}},"06cf":function(o,s,i){var a=i("83ab"),l=i("d1e7"),u=i("5c6c"),m=i("fc6a"),d=i("c04e"),f=i("5135"),p=i("0cfb"),h=Object.getOwnPropertyDescriptor;s.f=a?h:function(b,w){if(b=m(b),w=d(w,!0),p)try{return h(b,w)}catch{}if(f(b,w))return u(!l.f.call(b,w),b[w])}},"0cfb":function(o,s,i){var a=i("83ab"),l=i("d039"),u=i("cc12");o.exports=!a&&!l(function(){return Object.defineProperty(u("div"),"a",{get:function(){return 7}}).a!=7})},"13d5":function(o,s,i){var a=i("23e7"),l=i("d58f").left,u=i("a640"),m=i("ae40"),d=u("reduce"),f=m("reduce",{1:0});a({target:"Array",proto:!0,forced:!d||!f},{reduce:function(h){return l(this,h,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"14c3":function(o,s,i){var a=i("c6b6"),l=i("9263");o.exports=function(u,m){var d=u.exec;if(typeof d=="function"){var f=d.call(u,m);if(typeof f!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return f}if(a(u)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return l.call(u,m)}},"159b":function(o,s,i){var a=i("da84"),l=i("fdbc"),u=i("17c2"),m=i("9112");for(var d in l){var f=a[d],p=f&&f.prototype;if(p&&p.forEach!==u)try{m(p,"forEach",u)}catch{p.forEach=u}}},"17c2":function(o,s,i){var a=i("b727").forEach,l=i("a640"),u=i("ae40"),m=l("forEach"),d=u("forEach");o.exports=!m||!d?function(p){return a(this,p,arguments.length>1?arguments[1]:void 0)}:[].forEach},"1be4":function(o,s,i){var a=i("d066");o.exports=a("document","documentElement")},"1c0b":function(o,s){o.exports=function(i){if(typeof i!="function")throw TypeError(String(i)+" is not a function");return i}},"1c7e":function(o,s,i){var a=i("b622"),l=a("iterator"),u=!1;try{var m=0,d={next:function(){return{done:!!m++}},return:function(){u=!0}};d[l]=function(){return this},Array.from(d,function(){throw 2})}catch{}o.exports=function(f,p){if(!p&&!u)return!1;var h=!1;try{var _={};_[l]=function(){return{next:function(){return{done:h=!0}}}},f(_)}catch{}return h}},"1d80":function(o,s){o.exports=function(i){if(i==null)throw TypeError("Can't call method on "+i);return i}},"1dde":function(o,s,i){var a=i("d039"),l=i("b622"),u=i("2d00"),m=l("species");o.exports=function(d){return u>=51||!a(function(){var f=[],p=f.constructor={};return p[m]=function(){return{foo:1}},f[d](Boolean).foo!==1})}},"23cb":function(o,s,i){var a=i("a691"),l=Math.max,u=Math.min;o.exports=function(m,d){var f=a(m);return f<0?l(f+d,0):u(f,d)}},"23e7":function(o,s,i){var a=i("da84"),l=i("06cf").f,u=i("9112"),m=i("6eeb"),d=i("ce4e"),f=i("e893"),p=i("94ca");o.exports=function(h,_){var b=h.target,w=h.global,C=h.stat,v,z,E,x,M,R;if(w?z=a:C?z=a[b]||d(b,{}):z=(a[b]||{}).prototype,z)for(E in _){if(M=_[E],h.noTargetGet?(R=l(z,E),x=R&&R.value):x=z[E],v=p(w?E:b+(C?".":"#")+E,h.forced),!v&&x!==void 0){if(typeof M==typeof x)continue;f(M,x)}(h.sham||x&&x.sham)&&u(M,"sham",!0),m(z,E,M,h)}}},"241c":function(o,s,i){var a=i("ca84"),l=i("7839"),u=l.concat("length","prototype");s.f=Object.getOwnPropertyNames||function(d){return a(d,u)}},"25f0":function(o,s,i){var a=i("6eeb"),l=i("825a"),u=i("d039"),m=i("ad6d"),d="toString",f=RegExp.prototype,p=f[d],h=u(function(){return p.call({source:"a",flags:"b"})!="/a/b"}),_=p.name!=d;(h||_)&&a(RegExp.prototype,d,function(){var w=l(this),C=String(w.source),v=w.flags,z=String(v===void 0&&w instanceof RegExp&&!("flags"in f)?m.call(w):v);return"/"+C+"/"+z},{unsafe:!0})},"2ca0":function(o,s,i){var a=i("23e7"),l=i("06cf").f,u=i("50c4"),m=i("5a34"),d=i("1d80"),f=i("ab13"),p=i("c430"),h="".startsWith,_=Math.min,b=f("startsWith"),w=!p&&!b&&!!function(){var C=l(String.prototype,"startsWith");return C&&!C.writable}();a({target:"String",proto:!0,forced:!w&&!b},{startsWith:function(v){var z=String(d(this));m(v);var E=u(_(arguments.length>1?arguments[1]:void 0,z.length)),x=String(v);return h?h.call(z,x,E):z.slice(E,E+x.length)===x}})},"2d00":function(o,s,i){var a=i("da84"),l=i("342f"),u=a.process,m=u&&u.versions,d=m&&m.v8,f,p;d?(f=d.split("."),p=f[0]+f[1]):l&&(f=l.match(/Edge\/(\d+)/),(!f||f[1]>=74)&&(f=l.match(/Chrome\/(\d+)/),f&&(p=f[1]))),o.exports=p&&+p},"342f":function(o,s,i){var a=i("d066");o.exports=a("navigator","userAgent")||""},"35a1":function(o,s,i){var a=i("f5df"),l=i("3f8c"),u=i("b622"),m=u("iterator");o.exports=function(d){if(d!=null)return d[m]||d["@@iterator"]||l[a(d)]}},"37e8":function(o,s,i){var a=i("83ab"),l=i("9bf2"),u=i("825a"),m=i("df75");o.exports=a?Object.defineProperties:function(f,p){u(f);for(var h=m(p),_=h.length,b=0,w;_>b;)l.f(f,w=h[b++],p[w]);return f}},"3bbe":function(o,s,i){var a=i("861d");o.exports=function(l){if(!a(l)&&l!==null)throw TypeError("Can't set "+String(l)+" as a prototype");return l}},"3ca3":function(o,s,i){var a=i("6547").charAt,l=i("69f3"),u=i("7dd0"),m="String Iterator",d=l.set,f=l.getterFor(m);u(String,"String",function(p){d(this,{type:m,string:String(p),index:0})},function(){var h=f(this),_=h.string,b=h.index,w;return b>=_.length?{value:void 0,done:!0}:(w=a(_,b),h.index+=w.length,{value:w,done:!1})})},"3f8c":function(o,s){o.exports={}},4160:function(o,s,i){var a=i("23e7"),l=i("17c2");a({target:"Array",proto:!0,forced:[].forEach!=l},{forEach:l})},"428f":function(o,s,i){var a=i("da84");o.exports=a},"44ad":function(o,s,i){var a=i("d039"),l=i("c6b6"),u="".split;o.exports=a(function(){return!Object("z").propertyIsEnumerable(0)})?function(m){return l(m)=="String"?u.call(m,""):Object(m)}:Object},"44d2":function(o,s,i){var a=i("b622"),l=i("7c73"),u=i("9bf2"),m=a("unscopables"),d=Array.prototype;d[m]==null&&u.f(d,m,{configurable:!0,value:l(null)}),o.exports=function(f){d[m][f]=!0}},"44e7":function(o,s,i){var a=i("861d"),l=i("c6b6"),u=i("b622"),m=u("match");o.exports=function(d){var f;return a(d)&&((f=d[m])!==void 0?!!f:l(d)=="RegExp")}},4930:function(o,s,i){var a=i("d039");o.exports=!!Object.getOwnPropertySymbols&&!a(function(){return!String(Symbol())})},"4d64":function(o,s,i){var a=i("fc6a"),l=i("50c4"),u=i("23cb"),m=function(d){return function(f,p,h){var _=a(f),b=l(_.length),w=u(h,b),C;if(d&&p!=p){for(;b>w;)if(C=_[w++],C!=C)return!0}else for(;b>w;w++)if((d||w in _)&&_[w]===p)return d||w||0;return!d&&-1}};o.exports={includes:m(!0),indexOf:m(!1)}},"4de4":function(o,s,i){var a=i("23e7"),l=i("b727").filter,u=i("1dde"),m=i("ae40"),d=u("filter"),f=m("filter");a({target:"Array",proto:!0,forced:!d||!f},{filter:function(h){return l(this,h,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(o,s,i){var a=i("0366"),l=i("7b0b"),u=i("9bdd"),m=i("e95a"),d=i("50c4"),f=i("8418"),p=i("35a1");o.exports=function(_){var b=l(_),w=typeof this=="function"?this:Array,C=arguments.length,v=C>1?arguments[1]:void 0,z=v!==void 0,E=p(b),x=0,M,R,P,L,Z,j;if(z&&(v=a(v,C>2?arguments[2]:void 0,2)),E!=null&&!(w==Array&&m(E)))for(L=E.call(b),Z=L.next,R=new w;!(P=Z.call(L)).done;x++)j=z?u(L,v,[P.value,x],!0):P.value,f(R,x,j);else for(M=d(b.length),R=new w(M);M>x;x++)j=z?v(b[x],x):b[x],f(R,x,j);return R.length=x,R}},"4fad":function(o,s,i){var a=i("23e7"),l=i("6f53").entries;a({target:"Object",stat:!0},{entries:function(m){return l(m)}})},"50c4":function(o,s,i){var a=i("a691"),l=Math.min;o.exports=function(u){return u>0?l(a(u),9007199254740991):0}},5135:function(o,s){var i={}.hasOwnProperty;o.exports=function(a,l){return i.call(a,l)}},5319:function(o,s,i){var a=i("d784"),l=i("825a"),u=i("7b0b"),m=i("50c4"),d=i("a691"),f=i("1d80"),p=i("8aa5"),h=i("14c3"),_=Math.max,b=Math.min,w=Math.floor,C=/\$([$&'`]|\d\d?|<[^>]*>)/g,v=/\$([$&'`]|\d\d?)/g,z=function(E){return E===void 0?E:String(E)};a("replace",2,function(E,x,M,R){var P=R.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,L=R.REPLACE_KEEPS_$0,Z=P?"$":"$0";return[function(Q,he){var q=f(this),re=Q==null?void 0:Q[E];return re!==void 0?re.call(Q,q,he):x.call(String(q),Q,he)},function(B,Q){if(!P&&L||typeof Q=="string"&&Q.indexOf(Z)===-1){var he=M(x,B,this,Q);if(he.done)return he.value}var q=l(B),re=String(this),se=typeof Q=="function";se||(Q=String(Q));var Be=q.global;if(Be){var ut=q.unicode;q.lastIndex=0}for(var Ve=[];;){var He=h(q,re);if(He===null||(Ve.push(He),!Be))break;var dt=String(He[0]);dt===""&&(q.lastIndex=p(re,m(q.lastIndex),ut))}for(var pt="",ht=0,Me=0;Me=ht&&(pt+=re.slice(ht,ue)+T,ht=ue+W.length)}return pt+re.slice(ht)}];function j(B,Q,he,q,re,se){var Be=he+B.length,ut=q.length,Ve=v;return re!==void 0&&(re=u(re),Ve=C),x.call(se,Ve,function(He,dt){var pt;switch(dt.charAt(0)){case"$":return"$";case"&":return B;case"`":return Q.slice(0,he);case"'":return Q.slice(Be);case"<":pt=re[dt.slice(1,-1)];break;default:var ht=+dt;if(ht===0)return He;if(ht>ut){var Me=w(ht/10);return Me===0?He:Me<=ut?q[Me-1]===void 0?dt.charAt(1):q[Me-1]+dt.charAt(1):He}pt=q[ht-1]}return pt===void 0?"":pt})}})},5692:function(o,s,i){var a=i("c430"),l=i("c6cd");(o.exports=function(u,m){return l[u]||(l[u]=m!==void 0?m:{})})("versions",[]).push({version:"3.6.5",mode:a?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(o,s,i){var a=i("d066"),l=i("241c"),u=i("7418"),m=i("825a");o.exports=a("Reflect","ownKeys")||function(f){var p=l.f(m(f)),h=u.f;return h?p.concat(h(f)):p}},"5a34":function(o,s,i){var a=i("44e7");o.exports=function(l){if(a(l))throw TypeError("The method doesn't accept regular expressions");return l}},"5c6c":function(o,s){o.exports=function(i,a){return{enumerable:!(i&1),configurable:!(i&2),writable:!(i&4),value:a}}},"5db7":function(o,s,i){var a=i("23e7"),l=i("a2bf"),u=i("7b0b"),m=i("50c4"),d=i("1c0b"),f=i("65f0");a({target:"Array",proto:!0},{flatMap:function(h){var _=u(this),b=m(_.length),w;return d(h),w=f(_,0),w.length=l(w,_,_,b,0,1,h,arguments.length>1?arguments[1]:void 0),w}})},6547:function(o,s,i){var a=i("a691"),l=i("1d80"),u=function(m){return function(d,f){var p=String(l(d)),h=a(f),_=p.length,b,w;return h<0||h>=_?m?"":void 0:(b=p.charCodeAt(h),b<55296||b>56319||h+1===_||(w=p.charCodeAt(h+1))<56320||w>57343?m?p.charAt(h):b:m?p.slice(h,h+2):(b-55296<<10)+(w-56320)+65536)}};o.exports={codeAt:u(!1),charAt:u(!0)}},"65f0":function(o,s,i){var a=i("861d"),l=i("e8b5"),u=i("b622"),m=u("species");o.exports=function(d,f){var p;return l(d)&&(p=d.constructor,typeof p=="function"&&(p===Array||l(p.prototype))?p=void 0:a(p)&&(p=p[m],p===null&&(p=void 0))),new(p===void 0?Array:p)(f===0?0:f)}},"69f3":function(o,s,i){var a=i("7f9a"),l=i("da84"),u=i("861d"),m=i("9112"),d=i("5135"),f=i("f772"),p=i("d012"),h=l.WeakMap,_,b,w,C=function(P){return w(P)?b(P):_(P,{})},v=function(P){return function(L){var Z;if(!u(L)||(Z=b(L)).type!==P)throw TypeError("Incompatible receiver, "+P+" required");return Z}};if(a){var z=new h,E=z.get,x=z.has,M=z.set;_=function(P,L){return M.call(z,P,L),L},b=function(P){return E.call(z,P)||{}},w=function(P){return x.call(z,P)}}else{var R=f("state");p[R]=!0,_=function(P,L){return m(P,R,L),L},b=function(P){return d(P,R)?P[R]:{}},w=function(P){return d(P,R)}}o.exports={set:_,get:b,has:w,enforce:C,getterFor:v}},"6eeb":function(o,s,i){var a=i("da84"),l=i("9112"),u=i("5135"),m=i("ce4e"),d=i("8925"),f=i("69f3"),p=f.get,h=f.enforce,_=String(String).split("String");(o.exports=function(b,w,C,v){var z=v?!!v.unsafe:!1,E=v?!!v.enumerable:!1,x=v?!!v.noTargetGet:!1;if(typeof C=="function"&&(typeof w=="string"&&!u(C,"name")&&l(C,"name",w),h(C).source=_.join(typeof w=="string"?w:"")),b===a){E?b[w]=C:m(w,C);return}else z?!x&&b[w]&&(E=!0):delete b[w];E?b[w]=C:l(b,w,C)})(Function.prototype,"toString",function(){return typeof this=="function"&&p(this).source||d(this)})},"6f53":function(o,s,i){var a=i("83ab"),l=i("df75"),u=i("fc6a"),m=i("d1e7").f,d=function(f){return function(p){for(var h=u(p),_=l(h),b=_.length,w=0,C=[],v;b>w;)v=_[w++],(!a||m.call(h,v))&&C.push(f?[v,h[v]]:h[v]);return C}};o.exports={entries:d(!0),values:d(!1)}},"73d9":function(o,s,i){var a=i("44d2");a("flatMap")},7418:function(o,s){s.f=Object.getOwnPropertySymbols},"746f":function(o,s,i){var a=i("428f"),l=i("5135"),u=i("e538"),m=i("9bf2").f;o.exports=function(d){var f=a.Symbol||(a.Symbol={});l(f,d)||m(f,d,{value:u.f(d)})}},7839:function(o,s){o.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(o,s,i){var a=i("1d80");o.exports=function(l){return Object(a(l))}},"7c73":function(o,s,i){var a=i("825a"),l=i("37e8"),u=i("7839"),m=i("d012"),d=i("1be4"),f=i("cc12"),p=i("f772"),h=">",_="<",b="prototype",w="script",C=p("IE_PROTO"),v=function(){},z=function(P){return _+w+h+P+_+"/"+w+h},E=function(P){P.write(z("")),P.close();var L=P.parentWindow.Object;return P=null,L},x=function(){var P=f("iframe"),L="java"+w+":",Z;return P.style.display="none",d.appendChild(P),P.src=String(L),Z=P.contentWindow.document,Z.open(),Z.write(z("document.F=Object")),Z.close(),Z.F},M,R=function(){try{M=document.domain&&new ActiveXObject("htmlfile")}catch{}R=M?E(M):x();for(var P=u.length;P--;)delete R[b][u[P]];return R()};m[C]=!0,o.exports=Object.create||function(L,Z){var j;return L!==null?(v[b]=a(L),j=new v,v[b]=null,j[C]=L):j=R(),Z===void 0?j:l(j,Z)}},"7dd0":function(o,s,i){var a=i("23e7"),l=i("9ed3"),u=i("e163"),m=i("d2bb"),d=i("d44e"),f=i("9112"),p=i("6eeb"),h=i("b622"),_=i("c430"),b=i("3f8c"),w=i("ae93"),C=w.IteratorPrototype,v=w.BUGGY_SAFARI_ITERATORS,z=h("iterator"),E="keys",x="values",M="entries",R=function(){return this};o.exports=function(P,L,Z,j,B,Q,he){l(Z,L,j);var q=function(Me){if(Me===B&&Ve)return Ve;if(!v&&Me in Be)return Be[Me];switch(Me){case E:return function(){return new Z(this,Me)};case x:return function(){return new Z(this,Me)};case M:return function(){return new Z(this,Me)}}return function(){return new Z(this)}},re=L+" Iterator",se=!1,Be=P.prototype,ut=Be[z]||Be["@@iterator"]||B&&Be[B],Ve=!v&&ut||q(B),He=L=="Array"&&Be.entries||ut,dt,pt,ht;if(He&&(dt=u(He.call(new P)),C!==Object.prototype&&dt.next&&(!_&&u(dt)!==C&&(m?m(dt,C):typeof dt[z]!="function"&&f(dt,z,R)),d(dt,re,!0,!0),_&&(b[re]=R))),B==x&&ut&&ut.name!==x&&(se=!0,Ve=function(){return ut.call(this)}),(!_||he)&&Be[z]!==Ve&&f(Be,z,Ve),b[L]=Ve,B)if(pt={values:q(x),keys:Q?Ve:q(E),entries:q(M)},he)for(ht in pt)(v||se||!(ht in Be))&&p(Be,ht,pt[ht]);else a({target:L,proto:!0,forced:v||se},pt);return pt}},"7f9a":function(o,s,i){var a=i("da84"),l=i("8925"),u=a.WeakMap;o.exports=typeof u=="function"&&/native code/.test(l(u))},"825a":function(o,s,i){var a=i("861d");o.exports=function(l){if(!a(l))throw TypeError(String(l)+" is not an object");return l}},"83ab":function(o,s,i){var a=i("d039");o.exports=!a(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},8418:function(o,s,i){var a=i("c04e"),l=i("9bf2"),u=i("5c6c");o.exports=function(m,d,f){var p=a(d);p in m?l.f(m,p,u(0,f)):m[p]=f}},"861d":function(o,s){o.exports=function(i){return typeof i=="object"?i!==null:typeof i=="function"}},8875:function(o,s,i){var a,l,u;(function(m,d){l=[],a=d,u=typeof a=="function"?a.apply(s,l):a,u!==void 0&&(o.exports=u)})(typeof self<"u"?self:this,function(){function m(){var d=Object.getOwnPropertyDescriptor(document,"currentScript");if(!d&&"currentScript"in document&&document.currentScript||d&&d.get!==m&&document.currentScript)return document.currentScript;try{throw new Error}catch(M){var f=/.*at [^(]*\((.*):(.+):(.+)\)$/ig,p=/@([^@]*):(\d+):(\d+)\s*$/ig,h=f.exec(M.stack)||p.exec(M.stack),_=h&&h[1]||!1,b=h&&h[2]||!1,w=document.location.href.replace(document.location.hash,""),C,v,z,E=document.getElementsByTagName("script");_===w&&(C=document.documentElement.outerHTML,v=new RegExp("(?:[^\\n]+?\\n){0,"+(b-2)+"}[^<]*