diff --git a/src/ui/dist/assets/Albums.4593d0bc.js b/src/ui/dist/assets/Albums.71c91c6e.js similarity index 59% rename from src/ui/dist/assets/Albums.4593d0bc.js rename to src/ui/dist/assets/Albums.71c91c6e.js index 9055d5504..ce16602ec 100644 --- a/src/ui/dist/assets/Albums.4593d0bc.js +++ b/src/ui/dist/assets/Albums.71c91c6e.js @@ -1 +1 @@ -import{C as s}from"./CollectionHeader.a249f890.js";import{_ as a,o as t,c,g as n,e as _,k as d,l as p,a as l}from"./index.1d09503d.js";const r={components:{CollectionHeader:s},name:"Albums"},i=e=>(d("data-v-5744d16a"),e=e(),p(),e),m={class:"padding-20"},u=i(()=>l("div",{class:"albums"}," Albums ",-1));function f(e,v,b,h,C,x){const o=_("CollectionHeader");return t(),c("div",m,[n(o),u])}const $=a(r,[["render",f],["__scopeId","data-v-5744d16a"]]);export{$ as default}; +import{C as s}from"./CollectionHeader.14ae124c.js";import{_ as a,o as t,c,g as n,e as _,k as d,l as p,a as l}from"./index.c970909a.js";const r={components:{CollectionHeader:s},name:"Albums"},i=e=>(d("data-v-5744d16a"),e=e(),p(),e),m={class:"padding-20"},u=i(()=>l("div",{class:"albums"}," Albums ",-1));function f(e,v,b,h,C,x){const o=_("CollectionHeader");return t(),c("div",m,[n(o),u])}const $=a(r,[["render",f],["__scopeId","data-v-5744d16a"]]);export{$ as default}; diff --git a/src/ui/dist/assets/ArtistItem.ae25c587.js b/src/ui/dist/assets/ArtistItem.79a83f4c.js similarity index 92% rename from src/ui/dist/assets/ArtistItem.ae25c587.js rename to src/ui/dist/assets/ArtistItem.79a83f4c.js index 73e4419e9..fdfee7122 100644 --- a/src/ui/dist/assets/ArtistItem.ae25c587.js +++ b/src/ui/dist/assets/ArtistItem.79a83f4c.js @@ -1 +1 @@ -import{F as A,T as b,a as S,c as k}from"./song.619409cb.js";import{T,P as B}from"./TrackInfo.a2d7128f.js";import{m as C,j as P,n as u,o as f,f as j,w as F,g as d,u as N,B as O,a as c,_ as D,e as E,c as p,t as g,d as x}from"./index.1d09503d.js";const L=c("br",null,null,-1),M=C({__name:"ImportSpotifyArtist",props:{artist:{type:Object,required:!0}},setup(i,{expose:s}){const e=i,m=P(),l=u([{name:"playlist",type:"dropdown",required:!0,value:null,options:m.playlistsAsDropdown}]),n=u(null),r=u(null),a=u([]),h=async()=>{if(n.value.load(),a.value.length==0){const o=await fetch(`/api/spotify/artists/${e.artist.id}`);a.value=await o.json()}n.value.show()},w=async o=>{if(o==="new"){const t=await k(e.artist.name,"",e.artist.image);return l.value[0].options=m.playlistsAsDropdown,l.value[0].value=t,t}return Number(o)},_=async(o,t=null)=>{a.value[o].added||(t!=null||(t=r.value.toObject().playlist),t=await w(t),await S(t!=null?t:r.value.toObject().playlist,a.value[o]),a.value[o].added=!0)},y=async()=>{let o=r.value.toObject().playlist;o=await w(o),a.value.forEach((t,v)=>{_(v,o)})};return s({show:h}),(o,t)=>(f(),j(b,{ref_key:"modal",ref:n,submit:{label:"Add All",icon:"add"},name:"Import Artist",onClose:t[0]||(t[0]=v=>o.$emit("close")),onSubmit:y},{default:F(()=>[d(T,{cover:i.artist.image,icons:[{name:"share",onClick:()=>N(O)(i.artist.href)}],title:i.artist.name},null,8,["cover","icons","title"]),d(A,{ref_key:"form",ref:r,options:l.value},null,8,["options"]),L,d(B,{songs:a.value,onAdd:_},null,8,["songs"])]),_:1},512))}});const V={components:{AddArtistToPlaylist:M},name:"ArtistItem",methods:{redirect(){this.$refs.import.show()},follow(i){i.stopPropagation();const s=this.following?"DELETE":"POST";fetch("/api/spotify/following",{method:s,body:JSON.stringify({artistId:this.id})}).then(e=>{e.status==200&&(this.following=!this.following)})}},data(){return{following:!1}},props:{cover:String,name:String,description:String,id:String,showFollowButton:Boolean}},q={class:"wrapper drop-shadow-md"},H=["src"],J=["innerHTML"];function W(i,s,e,m,l,n){const r=E("add-artist-to-playlist");return f(),p("div",q,[d(r,{artist:{id:e.id,name:e.name,href:`https://open.spotify.com/artist/${e.id}`,image:e.cover},ref:"import"},null,8,["artist"]),c("div",{class:"item",onClick:s[1]||(s[1]=(...a)=>n.redirect&&n.redirect(...a))},[c("img",{src:e.cover},null,8,H),c("h4",null,g(e.name),1),c("p",{innerHTML:e.description},null,8,J),e.showFollowButton?(f(),p("button",{key:0,onClick:s[0]||(s[0]=(...a)=>n.follow&&n.follow(...a)),class:"followButton"},g(l.following?"Following":"Follow"),1)):x("",!0)])])}const Q=D(V,[["render",W],["__scopeId","data-v-c0f0764c"]]);export{Q as A}; +import{F as A,T as b,a as S,c as k}from"./song.6a60a886.js";import{T,P as B}from"./TrackInfo.2ed5fbe0.js";import{m as C,j as P,n as u,o as f,f as j,w as F,g as d,u as N,B as O,a as c,_ as D,e as E,c as p,t as g,d as x}from"./index.c970909a.js";const L=c("br",null,null,-1),M=C({__name:"ImportSpotifyArtist",props:{artist:{type:Object,required:!0}},setup(i,{expose:s}){const e=i,m=P(),l=u([{name:"playlist",type:"dropdown",required:!0,value:null,options:m.playlistsAsDropdown}]),n=u(null),r=u(null),a=u([]),h=async()=>{if(n.value.load(),a.value.length==0){const o=await fetch(`/api/spotify/artists/${e.artist.id}`);a.value=await o.json()}n.value.show()},w=async o=>{if(o==="new"){const t=await k(e.artist.name,"",e.artist.image);return l.value[0].options=m.playlistsAsDropdown,l.value[0].value=t,t}return Number(o)},_=async(o,t=null)=>{a.value[o].added||(t!=null||(t=r.value.toObject().playlist),t=await w(t),await S(t!=null?t:r.value.toObject().playlist,a.value[o]),a.value[o].added=!0)},y=async()=>{let o=r.value.toObject().playlist;o=await w(o),a.value.forEach((t,v)=>{_(v,o)})};return s({show:h}),(o,t)=>(f(),j(b,{ref_key:"modal",ref:n,submit:{label:"Add All",icon:"add"},name:"Import Artist",onClose:t[0]||(t[0]=v=>o.$emit("close")),onSubmit:y},{default:F(()=>[d(T,{cover:i.artist.image,icons:[{name:"share",onClick:()=>N(O)(i.artist.href)}],title:i.artist.name},null,8,["cover","icons","title"]),d(A,{ref_key:"form",ref:r,options:l.value},null,8,["options"]),L,d(B,{songs:a.value,onAdd:_},null,8,["songs"])]),_:1},512))}});const V={components:{AddArtistToPlaylist:M},name:"ArtistItem",methods:{redirect(){this.$refs.import.show()},follow(i){i.stopPropagation();const s=this.following?"DELETE":"POST";fetch("/api/spotify/following",{method:s,body:JSON.stringify({artistId:this.id})}).then(e=>{e.status==200&&(this.following=!this.following)})}},data(){return{following:!1}},props:{cover:String,name:String,description:String,id:String,showFollowButton:Boolean}},q={class:"wrapper drop-shadow-md"},H=["src"],J=["innerHTML"];function W(i,s,e,m,l,n){const r=E("add-artist-to-playlist");return f(),p("div",q,[d(r,{artist:{id:e.id,name:e.name,href:`https://open.spotify.com/artist/${e.id}`,image:e.cover},ref:"import"},null,8,["artist"]),c("div",{class:"item",onClick:s[1]||(s[1]=(...a)=>n.redirect&&n.redirect(...a))},[c("img",{src:e.cover},null,8,H),c("h4",null,g(e.name),1),c("p",{innerHTML:e.description},null,8,J),e.showFollowButton?(f(),p("button",{key:0,onClick:s[0]||(s[0]=(...a)=>n.follow&&n.follow(...a)),class:"followButton"},g(l.following?"Following":"Follow"),1)):x("",!0)])])}const Q=D(V,[["render",W],["__scopeId","data-v-c0f0764c"]]);export{Q as A}; diff --git a/src/ui/dist/assets/ArtistItem.79a83f4c.js.gz b/src/ui/dist/assets/ArtistItem.79a83f4c.js.gz new file mode 100644 index 000000000..b3a87f94c Binary files /dev/null and b/src/ui/dist/assets/ArtistItem.79a83f4c.js.gz differ diff --git a/src/ui/dist/assets/ArtistItem.ae25c587.js.gz b/src/ui/dist/assets/ArtistItem.ae25c587.js.gz deleted file mode 100644 index be951e1f8..000000000 Binary files a/src/ui/dist/assets/ArtistItem.ae25c587.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/Artists.b45ab61b.js b/src/ui/dist/assets/Artists.1ec72faf.js similarity index 62% rename from src/ui/dist/assets/Artists.b45ab61b.js rename to src/ui/dist/assets/Artists.1ec72faf.js index 140fda8e6..4c75e1366 100644 --- a/src/ui/dist/assets/Artists.b45ab61b.js +++ b/src/ui/dist/assets/Artists.1ec72faf.js @@ -1 +1 @@ -import{F as l}from"./FullShelf.434ba053.js";import{A as d}from"./ArtistItem.ae25c587.js";import{C as f}from"./CollectionHeader.a249f890.js";import{_ as m,o as s,c as i,g as r,a as u,w as h,F as v,i as y,f as A,e as o}from"./index.1d09503d.js";import"./song.619409cb.js";import"./Dropdown.f68f135c.js";import"./TrackInfo.a2d7128f.js";const g={components:{CollectionHeader:f,ArtistItem:d,FullShelf:l},name:"Artists",data(){return fetch("/api/spotify/artists").then(t=>t.json()).then(t=>this.spotifyArtists.push(...t)),{spotifyArtists:[]}}},C={class:"padding-20"},x={class:"artists"};function F(t,k,B,w,a,H){const n=o("CollectionHeader"),c=o("artist-item"),p=o("full-shelf");return s(),i("div",C,[r(n),u("div",x,[r(p,{heading:"Following on Spotify"},{default:h(()=>[(s(!0),i(v,null,y(a.spotifyArtists,(e,_)=>(s(),A(c,{key:_,cover:e.cover,description:e.description,name:e.name,id:e.id},null,8,["cover","description","name","id"]))),128))]),_:1})])])}const L=m(g,[["render",F],["__scopeId","data-v-f8aeae99"]]);export{L as default}; +import{F as l}from"./FullShelf.13880daa.js";import{A as d}from"./ArtistItem.79a83f4c.js";import{C as f}from"./CollectionHeader.14ae124c.js";import{_ as m,o as s,c as i,g as r,a as u,w as h,F as v,i as y,f as A,e as o}from"./index.c970909a.js";import"./song.6a60a886.js";import"./Dropdown.7541a2ee.js";import"./TrackInfo.2ed5fbe0.js";const g={components:{CollectionHeader:f,ArtistItem:d,FullShelf:l},name:"Artists",data(){return fetch("/api/spotify/artists").then(t=>t.json()).then(t=>this.spotifyArtists.push(...t)),{spotifyArtists:[]}}},C={class:"padding-20"},x={class:"artists"};function F(t,k,B,w,a,H){const n=o("CollectionHeader"),c=o("artist-item"),p=o("full-shelf");return s(),i("div",C,[r(n),u("div",x,[r(p,{heading:"Following on Spotify"},{default:h(()=>[(s(!0),i(v,null,y(a.spotifyArtists,(e,_)=>(s(),A(c,{key:_,cover:e.cover,description:e.description,name:e.name,id:e.id},null,8,["cover","description","name","id"]))),128))]),_:1})])])}const L=m(g,[["render",F],["__scopeId","data-v-f8aeae99"]]);export{L as default}; diff --git a/src/ui/dist/assets/Artists.1ec72faf.js.gz b/src/ui/dist/assets/Artists.1ec72faf.js.gz new file mode 100644 index 000000000..dd68fc6a4 Binary files /dev/null and b/src/ui/dist/assets/Artists.1ec72faf.js.gz differ diff --git a/src/ui/dist/assets/Artists.b45ab61b.js.gz b/src/ui/dist/assets/Artists.b45ab61b.js.gz deleted file mode 100644 index 45790c0ba..000000000 Binary files a/src/ui/dist/assets/Artists.b45ab61b.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/BigPlayer.efee3d3d.js b/src/ui/dist/assets/BigPlayer.ed629159.js similarity index 86% rename from src/ui/dist/assets/BigPlayer.efee3d3d.js rename to src/ui/dist/assets/BigPlayer.ed629159.js index edf58e1ac..ad58a34f1 100644 --- a/src/ui/dist/assets/BigPlayer.efee3d3d.js +++ b/src/ui/dist/assets/BigPlayer.ed629159.js @@ -1 +1 @@ -import{_ as M,J as V,j as z,E as i,n as d,D as F,aZ as H,o as a,c as n,u as t,F as _,a as e,g as h,C as x,h as j,H as f,i as b,f as P,d as J,t as w,x as L,k as O,l as Z}from"./index.1d09503d.js";import{P as q}from"./PlaylistEntry.486af7f1.js";import{P as A}from"./song.619409cb.js";import{P as G}from"./PlaylistItem.41431c3c.js";import"./EditSong.vue_vue_type_script_setup_true_lang.b4546726.js";import"./playerInPicture.37a9ab56.js";import"./Dropdown.f68f135c.js";import"./TrackInfo.a2d7128f.js";const B=u=>(O("data-v-d204b5f5"),u=u(),Z(),u),K={class:"bigPlayer"},Q={class:"upNow"},R=B(()=>e("div",{style:{"animation-delay":"0s"},class:"block"},null,-1)),U={key:0,class:"playlistOverflow drop-shadow-2xl"},W={class:"settings"},X={key:1,class:"no-playlist-selected"},Y={class:"wrapper"},ss=B(()=>e("h2",null,"Nothing playing yet...",-1)),es={class:"playlists"},ts={__name:"BigPlayer",emits:["maximise"],setup(u,{emit:C}){const l=V(),S=z(),g=i(()=>l.playing),I=i(()=>l.song.cover),$=i(()=>l.song.id),N=i(()=>l.playlist),k=i(()=>`${l.song.title} \u2022 ${l.song.artist}`),E=i(()=>S.playlists),v=d(null);document.title=k.value,F(k,r=>{document.title=r}),H(()=>{window.setTimeout(()=>{var o,s;if((o=v.value)!=null&&o.scrollTop)return;const r=(s=document.getElementById(`bplayer-entry-${$.value}`))==null?void 0:s.offsetTop;r>=354&&(v.value.scrollTop=r-354)},1e3)});let p=d(!1);const T=()=>{p.value=!p.value,C("maximise",p.value)},y=d(!1),c=d(!1),m=d(-1);return(r,o)=>(a(),n("div",K,[t(l).loaded?(a(),n(_,{key:0},[e("div",Q,[h(j,{class:x([{playing:t(g),animate:c.value},"drop-shadow-2xl"]),src:t(I),type:"track"},null,8,["class","src"]),e("div",{class:x([{playing:t(g),animate:c.value},"blocks"])},[R,e("div",{style:f({"animation-delay":".25s"}),class:"block"},null,4),e("div",{style:f({"animation-delay":".5s"}),class:"block"},null,4)],2)]),y.value?J("",!0):(a(),n("div",U,[e("div",{ref_key:"playlistScroll",ref:v,class:"playlist"},[h(A),(a(!0),n(_,null,b(t(N).songs,(s,D)=>(a(),P(q,{id:"bplayer-entry-"+s.id,key:s.source,index:D,selected:m.value==s.id,song:s,"with-cover":"",onClick:ls=>m.value==s.id?m.value=-1:m.value=s.id},null,8,["id","index","selected","song","onClick"]))),128))],512)])),e("div",W,[e("span",{class:"iconButton material-symbols-rounded",onClick:T},w(t(p)?"fullscreen_exit":"fullscreen"),1),e("span",{style:f({transform:`rotate(${y.value?0:180}deg)`}),class:"iconButton material-symbols-rounded",onClick:o[0]||(o[0]=()=>y.value=!y.value)},"menu_open",4),e("span",{class:"iconButton material-symbols-rounded",onClick:o[1]||(o[1]=()=>c.value=!c.value)},w(c.value?"motion_photos_off":"animation"),1)])],64)):(a(),n("div",X,[e("div",Y,[ss,e("div",es,[(a(!0),n(_,null,b(t(E),s=>(a(),P(t(G),{key:s.id,cover:s.cover,description:s.description,title:s.name,onClick:L(()=>t(l).loadPlaylist(s.id),["stop"])},null,8,["cover","description","title","onClick"]))),128))])])]))]))}},ps=M(ts,[["__scopeId","data-v-d204b5f5"]]);export{ps as default}; +import{_ as M,J as V,j as z,E as i,n as d,D as F,aZ as H,o as a,c as n,u as t,F as _,a as e,g as h,C as x,h as j,H as f,i as b,f as P,d as J,t as w,x as L,k as O,l as Z}from"./index.c970909a.js";import{P as q}from"./PlaylistEntry.75d93026.js";import{P as A}from"./song.6a60a886.js";import{P as G}from"./PlaylistItem.ca2725f3.js";import"./EditSong.vue_vue_type_script_setup_true_lang.42f3815c.js";import"./playerInPicture.37a9ab56.js";import"./Dropdown.7541a2ee.js";import"./TrackInfo.2ed5fbe0.js";const B=u=>(O("data-v-d204b5f5"),u=u(),Z(),u),K={class:"bigPlayer"},Q={class:"upNow"},R=B(()=>e("div",{style:{"animation-delay":"0s"},class:"block"},null,-1)),U={key:0,class:"playlistOverflow drop-shadow-2xl"},W={class:"settings"},X={key:1,class:"no-playlist-selected"},Y={class:"wrapper"},ss=B(()=>e("h2",null,"Nothing playing yet...",-1)),es={class:"playlists"},ts={__name:"BigPlayer",emits:["maximise"],setup(u,{emit:C}){const l=V(),S=z(),g=i(()=>l.playing),I=i(()=>l.song.cover),$=i(()=>l.song.id),N=i(()=>l.playlist),k=i(()=>`${l.song.title} \u2022 ${l.song.artist}`),E=i(()=>S.playlists),v=d(null);document.title=k.value,F(k,r=>{document.title=r}),H(()=>{window.setTimeout(()=>{var o,s;if((o=v.value)!=null&&o.scrollTop)return;const r=(s=document.getElementById(`bplayer-entry-${$.value}`))==null?void 0:s.offsetTop;r>=354&&(v.value.scrollTop=r-354)},1e3)});let p=d(!1);const T=()=>{p.value=!p.value,C("maximise",p.value)},y=d(!1),c=d(!1),m=d(-1);return(r,o)=>(a(),n("div",K,[t(l).loaded?(a(),n(_,{key:0},[e("div",Q,[h(j,{class:x([{playing:t(g),animate:c.value},"drop-shadow-2xl"]),src:t(I),type:"track"},null,8,["class","src"]),e("div",{class:x([{playing:t(g),animate:c.value},"blocks"])},[R,e("div",{style:f({"animation-delay":".25s"}),class:"block"},null,4),e("div",{style:f({"animation-delay":".5s"}),class:"block"},null,4)],2)]),y.value?J("",!0):(a(),n("div",U,[e("div",{ref_key:"playlistScroll",ref:v,class:"playlist"},[h(A),(a(!0),n(_,null,b(t(N).songs,(s,D)=>(a(),P(q,{id:"bplayer-entry-"+s.id,key:s.source,index:D,selected:m.value==s.id,song:s,"with-cover":"",onClick:ls=>m.value==s.id?m.value=-1:m.value=s.id},null,8,["id","index","selected","song","onClick"]))),128))],512)])),e("div",W,[e("span",{class:"iconButton material-symbols-rounded",onClick:T},w(t(p)?"fullscreen_exit":"fullscreen"),1),e("span",{style:f({transform:`rotate(${y.value?0:180}deg)`}),class:"iconButton material-symbols-rounded",onClick:o[0]||(o[0]=()=>y.value=!y.value)},"menu_open",4),e("span",{class:"iconButton material-symbols-rounded",onClick:o[1]||(o[1]=()=>c.value=!c.value)},w(c.value?"motion_photos_off":"animation"),1)])],64)):(a(),n("div",X,[e("div",Y,[ss,e("div",es,[(a(!0),n(_,null,b(t(E),s=>(a(),P(t(G),{key:s.id,cover:s.cover,description:s.description,title:s.name,onClick:L(()=>t(l).loadPlaylist(s.id),["stop"])},null,8,["cover","description","title","onClick"]))),128))])])]))]))}},ps=M(ts,[["__scopeId","data-v-d204b5f5"]]);export{ps as default}; diff --git a/src/ui/dist/assets/BigPlayer.ed629159.js.gz b/src/ui/dist/assets/BigPlayer.ed629159.js.gz new file mode 100644 index 000000000..8bed4b923 Binary files /dev/null and b/src/ui/dist/assets/BigPlayer.ed629159.js.gz differ diff --git a/src/ui/dist/assets/BigPlayer.efee3d3d.js.gz b/src/ui/dist/assets/BigPlayer.efee3d3d.js.gz deleted file mode 100644 index c56b18139..000000000 Binary files a/src/ui/dist/assets/BigPlayer.efee3d3d.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/Breaking.08709248.js b/src/ui/dist/assets/Breaking.08709248.js new file mode 100644 index 000000000..9de98f6a2 --- /dev/null +++ b/src/ui/dist/assets/Breaking.08709248.js @@ -0,0 +1 @@ +import{I as r}from"./index.99d9af59.js";import{o,f as t,u as e}from"./index.c970909a.js";import"./FixedPlaylistHeader.8b130c57.js";import"./song.6a60a886.js";import"./Dropdown.7541a2ee.js";import"./PlaylistEntry.75d93026.js";import"./EditSong.vue_vue_type_script_setup_true_lang.42f3815c.js";import"./playerInPicture.37a9ab56.js";const k={__name:"Breaking",setup(p){return(m,a)=>(o(),t(e(r),{src:"/api/me/new",id:-2}))}};export{k as default}; diff --git a/src/ui/dist/assets/Breaking.f80c3c09.js b/src/ui/dist/assets/Breaking.f80c3c09.js deleted file mode 100644 index 21af1887c..000000000 --- a/src/ui/dist/assets/Breaking.f80c3c09.js +++ /dev/null @@ -1 +0,0 @@ -import{I as r}from"./index.49a58e31.js";import{o,f as t,u as e}from"./index.1d09503d.js";import"./FixedPlaylistHeader.28982abf.js";import"./song.619409cb.js";import"./Dropdown.f68f135c.js";import"./PlaylistEntry.486af7f1.js";import"./EditSong.vue_vue_type_script_setup_true_lang.b4546726.js";import"./playerInPicture.37a9ab56.js";const k={__name:"Breaking",setup(p){return(m,a)=>(o(),t(e(r),{src:"/api/me/new",id:-2}))}};export{k as default}; diff --git a/src/ui/dist/assets/Card.4b544f8d.js b/src/ui/dist/assets/Card.d68bcee4.js similarity index 72% rename from src/ui/dist/assets/Card.4b544f8d.js rename to src/ui/dist/assets/Card.d68bcee4.js index 44b1a6353..3d556f007 100644 --- a/src/ui/dist/assets/Card.4b544f8d.js +++ b/src/ui/dist/assets/Card.d68bcee4.js @@ -1 +1 @@ -import{_,o as c,c as s,r as t}from"./index.1d09503d.js";const o={},r={class:"card"};function d(e,n){return c(),s("div",r,[t(e.$slots,"default",{},void 0,!0)])}const f=_(o,[["render",d],["__scopeId","data-v-ff26f2dc"]]);export{f as C}; +import{_,o as c,c as s,r as t}from"./index.c970909a.js";const o={},r={class:"card"};function d(e,n){return c(),s("div",r,[t(e.$slots,"default",{},void 0,!0)])}const f=_(o,[["render",d],["__scopeId","data-v-ff26f2dc"]]);export{f as C}; diff --git a/src/ui/dist/assets/CloudPlaylist.b86620c0.js b/src/ui/dist/assets/CloudPlaylist.3209552c.js similarity index 97% rename from src/ui/dist/assets/CloudPlaylist.b86620c0.js rename to src/ui/dist/assets/CloudPlaylist.3209552c.js index 01df43528..1421981a7 100644 --- a/src/ui/dist/assets/CloudPlaylist.b86620c0.js +++ b/src/ui/dist/assets/CloudPlaylist.3209552c.js @@ -1 +1 @@ -import{_ as y,p as h,o as n,c,a as l,t as i,b as d,F as p,d as u}from"./index.1d09503d.js";const _={name:"cloudPlaylist",props:{playlist:Object,localPlaylists:Array,cloudPlaylists:Array},data(){return{statusText:""}},methods:{parseCover:h,import(){this.statusIcon!="cloud_done"&&this.statusIcon=="cloud"&&(this.statusText="creating playlist...",fetch("/api/playlists/new").then(async e=>{this.statusText="updating playlist...";const t=Number(await e.text());await fetch(`/api/playlists/${t}`,{method:"POST",body:JSON.stringify({name:this.playlist.name,description:this.playlist.description})});for(let s=0;sJSON.stringify(t)==JSON.stringify(this.playlist)).length?"cloud_done":e.filter(t=>t.name==this.playlist.name).length?"cloud_sync":this.localPlaylists?"cloud":"cloud_off"}}},m={class:"cloudPlaylist"},g=["src"],f={class:"data"},v={class:"lead"},x={class:"status"},P={class:"material-symbols-rounded"},T={key:0,class:"lead"};function b(e,t,s,a,r,o){return n(),c("div",m,[l("span",{onClick:t[0]||(t[0]=()=>e.$emit("remove")),class:"close material-symbols-rounded"},"close"),l("img",{src:o.parseCover(o.cover)},null,8,g),l("div",f,[l("h2",null,i(s.playlist.name),1),l("div",v,[d(i(s.playlist.songs.length)+" "+i(s.playlist.songs.length==1?"song":"songs"),1),s.playlist.description?(n(),c(p,{key:0},[d(" \u2022 "),l("i",null,i(s.playlist.description),1)],64)):u("",!0)]),l("div",x,[l("span",P,i(o.statusIcon),1),r.statusText?(n(),c("div",T,[l("i",null,i(r.statusText),1)])):u("",!0)])])])}const C=y(_,[["render",b],["__scopeId","data-v-917a200e"]]);export{C}; +import{_ as y,p as h,o as n,c,a as l,t as i,b as d,F as p,d as u}from"./index.c970909a.js";const _={name:"cloudPlaylist",props:{playlist:Object,localPlaylists:Array,cloudPlaylists:Array},data(){return{statusText:""}},methods:{parseCover:h,import(){this.statusIcon!="cloud_done"&&this.statusIcon=="cloud"&&(this.statusText="creating playlist...",fetch("/api/playlists/new").then(async e=>{this.statusText="updating playlist...";const t=Number(await e.text());await fetch(`/api/playlists/${t}`,{method:"POST",body:JSON.stringify({name:this.playlist.name,description:this.playlist.description})});for(let s=0;sJSON.stringify(t)==JSON.stringify(this.playlist)).length?"cloud_done":e.filter(t=>t.name==this.playlist.name).length?"cloud_sync":this.localPlaylists?"cloud":"cloud_off"}}},m={class:"cloudPlaylist"},g=["src"],f={class:"data"},v={class:"lead"},x={class:"status"},P={class:"material-symbols-rounded"},T={key:0,class:"lead"};function b(e,t,s,a,r,o){return n(),c("div",m,[l("span",{onClick:t[0]||(t[0]=()=>e.$emit("remove")),class:"close material-symbols-rounded"},"close"),l("img",{src:o.parseCover(o.cover)},null,8,g),l("div",f,[l("h2",null,i(s.playlist.name),1),l("div",v,[d(i(s.playlist.songs.length)+" "+i(s.playlist.songs.length==1?"song":"songs"),1),s.playlist.description?(n(),c(p,{key:0},[d(" \u2022 "),l("i",null,i(s.playlist.description),1)],64)):u("",!0)]),l("div",x,[l("span",P,i(o.statusIcon),1),r.statusText?(n(),c("div",T,[l("i",null,i(r.statusText),1)])):u("",!0)])])])}const C=y(_,[["render",b],["__scopeId","data-v-917a200e"]]);export{C}; diff --git a/src/ui/dist/assets/CloudPlaylist.3209552c.js.gz b/src/ui/dist/assets/CloudPlaylist.3209552c.js.gz new file mode 100644 index 000000000..8c14fdbdf Binary files /dev/null and b/src/ui/dist/assets/CloudPlaylist.3209552c.js.gz differ diff --git a/src/ui/dist/assets/CloudPlaylist.b86620c0.js.gz b/src/ui/dist/assets/CloudPlaylist.b86620c0.js.gz deleted file mode 100644 index 631b1c3ed..000000000 Binary files a/src/ui/dist/assets/CloudPlaylist.b86620c0.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/CollectionHeader.a249f890.js b/src/ui/dist/assets/CollectionHeader.14ae124c.js similarity index 91% rename from src/ui/dist/assets/CollectionHeader.a249f890.js rename to src/ui/dist/assets/CollectionHeader.14ae124c.js index 73db63c3c..a1be0ac97 100644 --- a/src/ui/dist/assets/CollectionHeader.a249f890.js +++ b/src/ui/dist/assets/CollectionHeader.14ae124c.js @@ -1 +1 @@ -import{_ as l,e as n,o as _,c as i,g as s,w as t,d as r,k as d,l as p,a as c}from"./index.1d09503d.js";const f={name:"CollectionHeader",props:{href:String}},a=e=>(d("data-v-6c46ff9c"),e=e(),p(),e),u={class:"wrapper"},h=a(()=>c("div",{class:"collection"}," Playlists ",-1)),m=a(()=>c("div",{class:"collection"}," Releases ",-1)),v=a(()=>c("div",{class:"collection"}," Artists ",-1));function k(e,C,x,w,y,I){const o=n("router-link");return _(),i("div",u,[s(o,{class:"link",to:"/collection/playlists"},{default:t(()=>[h]),_:1}),s(o,{class:"link",to:"/collection/releases"},{default:t(()=>[m]),_:1}),s(o,{class:"link",to:"/collection/artists"},{default:t(()=>[v]),_:1}),r("",!0)])}const $=l(f,[["render",k],["__scopeId","data-v-6c46ff9c"]]);export{$ as C}; +import{_ as l,e as n,o as _,c as i,g as s,w as t,d as r,k as d,l as p,a as c}from"./index.c970909a.js";const f={name:"CollectionHeader",props:{href:String}},a=e=>(d("data-v-6c46ff9c"),e=e(),p(),e),u={class:"wrapper"},h=a(()=>c("div",{class:"collection"}," Playlists ",-1)),m=a(()=>c("div",{class:"collection"}," Releases ",-1)),v=a(()=>c("div",{class:"collection"}," Artists ",-1));function k(e,C,x,w,y,I){const o=n("router-link");return _(),i("div",u,[s(o,{class:"link",to:"/collection/playlists"},{default:t(()=>[h]),_:1}),s(o,{class:"link",to:"/collection/releases"},{default:t(()=>[m]),_:1}),s(o,{class:"link",to:"/collection/artists"},{default:t(()=>[v]),_:1}),r("",!0)])}const $=l(f,[["render",k],["__scopeId","data-v-6c46ff9c"]]);export{$ as C}; diff --git a/src/ui/dist/assets/Dropdown.f68f135c.js b/src/ui/dist/assets/Dropdown.7541a2ee.js similarity index 93% rename from src/ui/dist/assets/Dropdown.f68f135c.js rename to src/ui/dist/assets/Dropdown.7541a2ee.js index 0d162f850..980273717 100644 --- a/src/ui/dist/assets/Dropdown.f68f135c.js +++ b/src/ui/dist/assets/Dropdown.7541a2ee.js @@ -1 +1 @@ -import{m as w,o,c as s,C as f,t as d,d as i,_ as b,n as _,D as v,E as k,a as c,u as B,x as y,F as C,i as D,N as S}from"./index.1d09503d.js";const V={key:1},q=w({__name:"IconButton",props:{icon:{type:String,required:!1},label:{type:String,required:!0},disabled:{type:Boolean,required:!1,default:!1},type:{type:String,required:!1,default:"negative"}},setup(e){return(m,u)=>(o(),s("button",{class:f([e.disabled?"disabled":" "+e.type,"flex items-center justify-center h-12 p-4 mt-4 rounded-full"])},[e.icon?(o(),s("span",{key:0,class:f([{"mr-2":e.label},"material-symbols-rounded"])},d(e.icon),3)):i("",!0),e.label?(o(),s("span",V,d(e.label),1)):i("",!0)],2))}});const z=b(q,[["__scopeId","data-v-e0df0773"]]),I={class:"dropdown"},$={class:"flex flex-row gap-2"},N={key:0,class:"material-symbols-rounded ms-wght-200"},E={class:"material-symbols-rounded"},F=["onClick"],L=w({__name:"Dropdown",props:{modelValue:{type:String,required:!0},options:{type:Array,required:!0},icon:{type:String,required:!1}},emits:["update:modelValue"],setup(e,{emit:m}){const u=e,p=_(u.modelValue),a=_(!1);v(u,t=>{p.value=t.modelValue},{deep:!0});const g=t=>{p.value=t,m("update:modelValue",t),a.value=!1},h=k(()=>{const t=u.options.find(n=>n.value==p.value);return t?t.label:""}),l=_(null);return v(a,t=>{S(()=>{if(t){const n=l.value.getBoundingClientRect();window.innerHeight-n.top>n.height?(l.value.style.top="100%",l.value.style.bottom="auto"):(l.value.style.top="auto",l.value.style.bottom="100%")}})}),window.onclick=()=>a.value=!1,(t,n)=>(o(),s("div",I,[c("div",{class:"dropdown__selected",onClick:n[0]||(n[0]=y(r=>a.value=!a.value,["stop"]))},[c("div",$,[e.icon?(o(),s("span",N,d(e.icon),1)):i("",!0),c("span",null,d(B(h)),1)]),c("i",E,d(a.value?"expand_less":"expand_more"),1)]),a.value?(o(),s("div",{key:0,ref_key:"trueDropdown",ref:l,class:"dropdown__options"},[(o(!0),s(C,null,D(e.options,r=>(o(),s("div",{key:r.value,class:"dropdown__option",onClick:y(x=>g(r.value),["stop"])},d(r.label),9,F))),128))],512)):i("",!0)]))}});const A=b(L,[["__scopeId","data-v-2b1b98f4"]]);export{A as D,z as I}; +import{m as w,o,c as s,C as f,t as d,d as i,_ as b,n as _,D as v,E as k,a as c,u as B,x as y,F as C,i as D,N as S}from"./index.c970909a.js";const V={key:1},q=w({__name:"IconButton",props:{icon:{type:String,required:!1},label:{type:String,required:!0},disabled:{type:Boolean,required:!1,default:!1},type:{type:String,required:!1,default:"negative"}},setup(e){return(m,u)=>(o(),s("button",{class:f([e.disabled?"disabled":" "+e.type,"flex items-center justify-center h-12 p-4 mt-4 rounded-full"])},[e.icon?(o(),s("span",{key:0,class:f([{"mr-2":e.label},"material-symbols-rounded"])},d(e.icon),3)):i("",!0),e.label?(o(),s("span",V,d(e.label),1)):i("",!0)],2))}});const z=b(q,[["__scopeId","data-v-e0df0773"]]),I={class:"dropdown"},$={class:"flex flex-row gap-2"},N={key:0,class:"material-symbols-rounded ms-wght-200"},E={class:"material-symbols-rounded"},F=["onClick"],L=w({__name:"Dropdown",props:{modelValue:{type:String,required:!0},options:{type:Array,required:!0},icon:{type:String,required:!1}},emits:["update:modelValue"],setup(e,{emit:m}){const u=e,p=_(u.modelValue),a=_(!1);v(u,t=>{p.value=t.modelValue},{deep:!0});const g=t=>{p.value=t,m("update:modelValue",t),a.value=!1},h=k(()=>{const t=u.options.find(n=>n.value==p.value);return t?t.label:""}),l=_(null);return v(a,t=>{S(()=>{if(t){const n=l.value.getBoundingClientRect();window.innerHeight-n.top>n.height?(l.value.style.top="100%",l.value.style.bottom="auto"):(l.value.style.top="auto",l.value.style.bottom="100%")}})}),window.onclick=()=>a.value=!1,(t,n)=>(o(),s("div",I,[c("div",{class:"dropdown__selected",onClick:n[0]||(n[0]=y(r=>a.value=!a.value,["stop"]))},[c("div",$,[e.icon?(o(),s("span",N,d(e.icon),1)):i("",!0),c("span",null,d(B(h)),1)]),c("i",E,d(a.value?"expand_less":"expand_more"),1)]),a.value?(o(),s("div",{key:0,ref_key:"trueDropdown",ref:l,class:"dropdown__options"},[(o(!0),s(C,null,D(e.options,r=>(o(),s("div",{key:r.value,class:"dropdown__option",onClick:y(x=>g(r.value),["stop"])},d(r.label),9,F))),128))],512)):i("",!0)]))}});const A=b(L,[["__scopeId","data-v-2b1b98f4"]]);export{A as D,z as I}; diff --git a/src/ui/dist/assets/Dropdown.7541a2ee.js.gz b/src/ui/dist/assets/Dropdown.7541a2ee.js.gz new file mode 100644 index 000000000..257fb9a5d Binary files /dev/null and b/src/ui/dist/assets/Dropdown.7541a2ee.js.gz differ diff --git a/src/ui/dist/assets/Dropdown.f68f135c.js.gz b/src/ui/dist/assets/Dropdown.f68f135c.js.gz deleted file mode 100644 index 85af74a39..000000000 Binary files a/src/ui/dist/assets/Dropdown.f68f135c.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/EditSong.vue_vue_type_script_setup_true_lang.b4546726.js b/src/ui/dist/assets/EditSong.vue_vue_type_script_setup_true_lang.42f3815c.js similarity index 90% rename from src/ui/dist/assets/EditSong.vue_vue_type_script_setup_true_lang.b4546726.js rename to src/ui/dist/assets/EditSong.vue_vue_type_script_setup_true_lang.42f3815c.js index 53fec1fcf..2c5acf989 100644 --- a/src/ui/dist/assets/EditSong.vue_vue_type_script_setup_true_lang.b4546726.js +++ b/src/ui/dist/assets/EditSong.vue_vue_type_script_setup_true_lang.42f3815c.js @@ -1 +1 @@ -import{F as g,T as f,u as y}from"./song.619409cb.js";import{m as w,n as s,o as b,f as _,w as h,g as x}from"./index.1d09503d.js";const C=w({__name:"EditSong",props:{song:{type:Object,required:!0}},setup(c,{expose:l}){const t=c,r=async(o,e)=>{const a=new FormData,m="."+e.name.split(".").pop();var d=e.slice(0,e.size,e.type),v=new File([d],t.song.id+m,{type:e.type});return a.append("file",v),await(await fetch(o,{method:"POST",body:a})).text()},n=s([{name:"source",type:"upload",icon:"music_note",accept:"audio/mp3",required:!0,onUpload:o=>{r("/api/config/tracks",o).then(e=>n.value.find(a=>a.name=="source").value=e)},value:t.song.source},{name:"title",type:"text",icon:"title",required:!0,value:t.song.title},{name:"artist",type:"text",icon:"person",required:!0,value:t.song.artist},{name:"album",type:"text",icon:"album",value:t.song.album},{name:"cover",type:"upload",icon:"art_track",accept:"image/*",imagePreview:!0,value:t.song.cover,onUpload:o=>{r("/api/config/images",o).then(e=>n.value.find(a=>a.name=="cover").value=e)}}]),p=async()=>{await y({...t.song,...u.value.toObject()})},i=s(null),u=s(null);return l({show:()=>{i.value.show()}}),(o,e)=>(b(),_(f,{ref_key:"modal",ref:i,submit:{label:"Save",icon:"save"},name:"Edit Song",onClose:e[0]||(e[0]=a=>o.$emit("close")),onSubmit:p},{default:h(()=>[x(g,{ref_key:"form",ref:u,options:n.value},null,8,["options"])]),_:1},512))}});export{C as _}; +import{F as g,T as f,u as y}from"./song.6a60a886.js";import{m as w,n as s,o as b,f as _,w as h,g as x}from"./index.c970909a.js";const C=w({__name:"EditSong",props:{song:{type:Object,required:!0}},setup(c,{expose:l}){const t=c,r=async(o,e)=>{const a=new FormData,m="."+e.name.split(".").pop();var d=e.slice(0,e.size,e.type),v=new File([d],t.song.id+m,{type:e.type});return a.append("file",v),await(await fetch(o,{method:"POST",body:a})).text()},n=s([{name:"source",type:"upload",icon:"music_note",accept:"audio/mp3",required:!0,onUpload:o=>{r("/api/config/tracks",o).then(e=>n.value.find(a=>a.name=="source").value=e)},value:t.song.source},{name:"title",type:"text",icon:"title",required:!0,value:t.song.title},{name:"artist",type:"text",icon:"person",required:!0,value:t.song.artist},{name:"album",type:"text",icon:"album",value:t.song.album},{name:"cover",type:"upload",icon:"art_track",accept:"image/*",imagePreview:!0,value:t.song.cover,onUpload:o=>{r("/api/config/images",o).then(e=>n.value.find(a=>a.name=="cover").value=e)}}]),p=async()=>{await y({...t.song,...u.value.toObject()})},i=s(null),u=s(null);return l({show:()=>{i.value.show()}}),(o,e)=>(b(),_(f,{ref_key:"modal",ref:i,submit:{label:"Save",icon:"save"},name:"Edit Song",onClose:e[0]||(e[0]=a=>o.$emit("close")),onSubmit:p},{default:h(()=>[x(g,{ref_key:"form",ref:u,options:n.value},null,8,["options"])]),_:1},512))}});export{C as _}; diff --git a/src/ui/dist/assets/EditSong.vue_vue_type_script_setup_true_lang.42f3815c.js.gz b/src/ui/dist/assets/EditSong.vue_vue_type_script_setup_true_lang.42f3815c.js.gz new file mode 100644 index 000000000..fef0661e4 Binary files /dev/null and b/src/ui/dist/assets/EditSong.vue_vue_type_script_setup_true_lang.42f3815c.js.gz differ diff --git a/src/ui/dist/assets/EditSong.vue_vue_type_script_setup_true_lang.b4546726.js.gz b/src/ui/dist/assets/EditSong.vue_vue_type_script_setup_true_lang.b4546726.js.gz deleted file mode 100644 index e958ad0b7..000000000 Binary files a/src/ui/dist/assets/EditSong.vue_vue_type_script_setup_true_lang.b4546726.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/Explore.c5ba2183.js b/src/ui/dist/assets/Explore.95be350d.js similarity index 96% rename from src/ui/dist/assets/Explore.c5ba2183.js rename to src/ui/dist/assets/Explore.95be350d.js index 28bd8af17..228568acf 100644 --- a/src/ui/dist/assets/Explore.c5ba2183.js +++ b/src/ui/dist/assets/Explore.95be350d.js @@ -1 +1 @@ -import{_ as p,o as i,c as r,a as o,r as h,H as u,k as f,l as y,F as m,i as k,g as n,w as c,M as d,u as v,p as _,v as g,e as b}from"./index.1d09503d.js";const $={props:{src:String}},S=s=>(f("data-v-770bf737"),s=s(),y(),s),x=S(()=>o("div",{class:"filter"},null,-1)),C={class:"info"};function I(s,e,a,l,t,B){return i(),r("div",{class:"image",style:u({backgroundImage:"url("+a.src+")"})},[x,o("div",C,[h(s.$slots,"default",{},void 0,!0)])],4)}const w=p($,[["render",I],["__scopeId","data-v-770bf737"]]);const H={class:"songContent"},O={class:"play"},E=["onClick"],M={class:"info"},P={data(){return fetch("/api/playlists").then(async s=>{const e=await s.json();for(let a=0;as.songs).flat();for(let s=0;s<4;s++)this.picks.push(this.songs[Math.floor(Math.random()*this.songs.length)])},onScroll(){this.$refs.container.clientHeight+this.$refs.container.scrollTop>=this.$refs.container.scrollHeight-100&&this.pick()},href(s){return`/track/${g(s.id)}`},loadPlaylist(s){console.log(s),fetch("/api/player/load",{method:"POST",body:JSON.stringify({id:s,type:"track"})})}}},j=Object.assign(P,{__name:"Explore",setup(s){return(e,a)=>{const l=b("router-link");return i(),r("div",{class:"explore",ref:"container",onScroll:a[0]||(a[0]=(...t)=>e.onScroll&&e.onScroll(...t))},[(i(!0),r(m,null,k(e.picks,t=>(i(),r("div",{class:"item",key:t.name},[n(w,{src:v(_)(t.cover)},{default:c(()=>[o("div",H,[o("div",O,[o("span",{id:"loadPlaylist",onClick:()=>e.loadPlaylist(t.id),class:"material-symbols-rounded play"},"play_circle",8,E)]),o("div",M,[n(l,{class:"linkOnHover",to:e.href(t)},{default:c(()=>[o("h1",null,[n(d,{text:t.title},null,8,["text"])])]),_:2},1032,["to"]),n(l,{class:"linkOnHover",to:`/search/${t.artist}`},{default:c(()=>[o("p",null,[n(d,{text:t.artist},null,8,["text"])])]),_:2},1032,["to"])])])]),_:2},1032,["src"])]))),128))],544)}}}),T=p(j,[["__scopeId","data-v-bb707b8b"]]);export{T as default}; +import{_ as p,o as i,c as r,a as o,r as h,H as u,k as f,l as y,F as m,i as k,g as n,w as c,M as d,u as v,p as _,v as g,e as b}from"./index.c970909a.js";const $={props:{src:String}},S=s=>(f("data-v-770bf737"),s=s(),y(),s),x=S(()=>o("div",{class:"filter"},null,-1)),C={class:"info"};function I(s,e,a,l,t,B){return i(),r("div",{class:"image",style:u({backgroundImage:"url("+a.src+")"})},[x,o("div",C,[h(s.$slots,"default",{},void 0,!0)])],4)}const w=p($,[["render",I],["__scopeId","data-v-770bf737"]]);const H={class:"songContent"},O={class:"play"},E=["onClick"],M={class:"info"},P={data(){return fetch("/api/playlists").then(async s=>{const e=await s.json();for(let a=0;as.songs).flat();for(let s=0;s<4;s++)this.picks.push(this.songs[Math.floor(Math.random()*this.songs.length)])},onScroll(){this.$refs.container.clientHeight+this.$refs.container.scrollTop>=this.$refs.container.scrollHeight-100&&this.pick()},href(s){return`/track/${g(s.id)}`},loadPlaylist(s){console.log(s),fetch("/api/player/load",{method:"POST",body:JSON.stringify({id:s,type:"track"})})}}},j=Object.assign(P,{__name:"Explore",setup(s){return(e,a)=>{const l=b("router-link");return i(),r("div",{class:"explore",ref:"container",onScroll:a[0]||(a[0]=(...t)=>e.onScroll&&e.onScroll(...t))},[(i(!0),r(m,null,k(e.picks,t=>(i(),r("div",{class:"item",key:t.name},[n(w,{src:v(_)(t.cover)},{default:c(()=>[o("div",H,[o("div",O,[o("span",{id:"loadPlaylist",onClick:()=>e.loadPlaylist(t.id),class:"material-symbols-rounded play"},"play_circle",8,E)]),o("div",M,[n(l,{class:"linkOnHover",to:e.href(t)},{default:c(()=>[o("h1",null,[n(d,{text:t.title},null,8,["text"])])]),_:2},1032,["to"]),n(l,{class:"linkOnHover",to:`/search/${t.artist}`},{default:c(()=>[o("p",null,[n(d,{text:t.artist},null,8,["text"])])]),_:2},1032,["to"])])])]),_:2},1032,["src"])]))),128))],544)}}}),T=p(j,[["__scopeId","data-v-bb707b8b"]]);export{T as default}; diff --git a/src/ui/dist/assets/Explore.95be350d.js.gz b/src/ui/dist/assets/Explore.95be350d.js.gz new file mode 100644 index 000000000..91694ed99 Binary files /dev/null and b/src/ui/dist/assets/Explore.95be350d.js.gz differ diff --git a/src/ui/dist/assets/Explore.c5ba2183.js.gz b/src/ui/dist/assets/Explore.c5ba2183.js.gz deleted file mode 100644 index 937bf01f9..000000000 Binary files a/src/ui/dist/assets/Explore.c5ba2183.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/Export.84d2e49c.js b/src/ui/dist/assets/Export.754fd59a.js similarity index 99% rename from src/ui/dist/assets/Export.84d2e49c.js rename to src/ui/dist/assets/Export.754fd59a.js index 2b99835fe..853b717c3 100644 --- a/src/ui/dist/assets/Export.84d2e49c.js +++ b/src/ui/dist/assets/Export.754fd59a.js @@ -1,4 +1,4 @@ -import{C as Lr}from"./CloudPlaylist.b86620c0.js";import{_ as br,bQ as Dr,o as H,c as sr,a as $,b as $r,d as Mr,F as Pr,i as Or,f as jr,e as Gr,k as Wr,l as Yr}from"./index.1d09503d.js";var fr={},G={};G.byteLength=Hr;G.toByteArray=Xr;G.fromByteArray=Qr;var R=[],T=[],Vr=typeof Uint8Array<"u"?Uint8Array:Array,J="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var D=0,qr=J.length;D0)throw new Error("Invalid string. Length must be a multiple of 4");var p=s.indexOf("=");p===-1&&(p=c);var w=p===c?0:4-p%4;return[p,w]}function Hr(s){var c=pr(s),p=c[0],w=c[1];return(p+w)*3/4-w}function Jr(s,c,p){return(c+p)*3/4-p}function Xr(s){var c,p=pr(s),w=p[0],y=p[1],l=new Vr(Jr(s,w,y)),f=0,o=y>0?w-4:w,d;for(d=0;d>16&255,l[f++]=c>>8&255,l[f++]=c&255;return y===2&&(c=T[s.charCodeAt(d)]<<2|T[s.charCodeAt(d+1)]>>4,l[f++]=c&255),y===1&&(c=T[s.charCodeAt(d)]<<10|T[s.charCodeAt(d+1)]<<4|T[s.charCodeAt(d+2)]>>2,l[f++]=c>>8&255,l[f++]=c&255),l}function zr(s){return R[s>>18&63]+R[s>>12&63]+R[s>>6&63]+R[s&63]}function Kr(s,c,p){for(var w,y=[],l=c;lo?o:f+l));return w===1?(c=s[p-1],y.push(R[c>>2]+R[c<<4&63]+"==")):w===2&&(c=(s[p-2]<<8)+s[p-1],y.push(R[c>>10]+R[c>>4&63]+R[c<<2&63]+"=")),y.join("")}var X={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */X.read=function(s,c,p,w,y){var l,f,o=y*8-w-1,d=(1<>1,I=-7,F=p?y-1:0,S=p?-1:1,A=s[c+F];for(F+=S,l=A&(1<<-I)-1,A>>=-I,I+=o;I>0;l=l*256+s[c+F],F+=S,I-=8);for(f=l&(1<<-I)-1,l>>=-I,I+=w;I>0;f=f*256+s[c+F],F+=S,I-=8);if(l===0)l=1-_;else{if(l===d)return f?NaN:(A?-1:1)*(1/0);f=f+Math.pow(2,w),l=l-_}return(A?-1:1)*f*Math.pow(2,l-w)};X.write=function(s,c,p,w,y,l){var f,o,d,_=l*8-y-1,I=(1<<_)-1,F=I>>1,S=y===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=w?0:l-1,M=w?1:-1,P=c<0||c===0&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(o=isNaN(c)?1:0,f=I):(f=Math.floor(Math.log(c)/Math.LN2),c*(d=Math.pow(2,-f))<1&&(f--,d*=2),f+F>=1?c+=S/d:c+=S*Math.pow(2,1-F),c*d>=2&&(f++,d/=2),f+F>=I?(o=0,f=I):f+F>=1?(o=(c*d-1)*Math.pow(2,y),f=f+F):(o=c*Math.pow(2,F-1)*Math.pow(2,y),f=0));y>=8;s[p+A]=o&255,A+=M,o/=256,y-=8);for(f=f<0;s[p+A]=f&255,A+=M,f/=256,_-=8);s[p+A-M]|=P*128};/*! +import{C as Lr}from"./CloudPlaylist.3209552c.js";import{_ as br,bQ as Dr,o as H,c as sr,a as $,b as $r,d as Mr,F as Pr,i as Or,f as jr,e as Gr,k as Wr,l as Yr}from"./index.c970909a.js";var fr={},G={};G.byteLength=Hr;G.toByteArray=Xr;G.fromByteArray=Qr;var R=[],T=[],Vr=typeof Uint8Array<"u"?Uint8Array:Array,J="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var D=0,qr=J.length;D0)throw new Error("Invalid string. Length must be a multiple of 4");var p=s.indexOf("=");p===-1&&(p=c);var w=p===c?0:4-p%4;return[p,w]}function Hr(s){var c=pr(s),p=c[0],w=c[1];return(p+w)*3/4-w}function Jr(s,c,p){return(c+p)*3/4-p}function Xr(s){var c,p=pr(s),w=p[0],y=p[1],l=new Vr(Jr(s,w,y)),f=0,o=y>0?w-4:w,d;for(d=0;d>16&255,l[f++]=c>>8&255,l[f++]=c&255;return y===2&&(c=T[s.charCodeAt(d)]<<2|T[s.charCodeAt(d+1)]>>4,l[f++]=c&255),y===1&&(c=T[s.charCodeAt(d)]<<10|T[s.charCodeAt(d+1)]<<4|T[s.charCodeAt(d+2)]>>2,l[f++]=c>>8&255,l[f++]=c&255),l}function zr(s){return R[s>>18&63]+R[s>>12&63]+R[s>>6&63]+R[s&63]}function Kr(s,c,p){for(var w,y=[],l=c;lo?o:f+l));return w===1?(c=s[p-1],y.push(R[c>>2]+R[c<<4&63]+"==")):w===2&&(c=(s[p-2]<<8)+s[p-1],y.push(R[c>>10]+R[c>>4&63]+R[c<<2&63]+"=")),y.join("")}var X={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */X.read=function(s,c,p,w,y){var l,f,o=y*8-w-1,d=(1<>1,I=-7,F=p?y-1:0,S=p?-1:1,A=s[c+F];for(F+=S,l=A&(1<<-I)-1,A>>=-I,I+=o;I>0;l=l*256+s[c+F],F+=S,I-=8);for(f=l&(1<<-I)-1,l>>=-I,I+=w;I>0;f=f*256+s[c+F],F+=S,I-=8);if(l===0)l=1-_;else{if(l===d)return f?NaN:(A?-1:1)*(1/0);f=f+Math.pow(2,w),l=l-_}return(A?-1:1)*f*Math.pow(2,l-w)};X.write=function(s,c,p,w,y,l){var f,o,d,_=l*8-y-1,I=(1<<_)-1,F=I>>1,S=y===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=w?0:l-1,M=w?1:-1,P=c<0||c===0&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(o=isNaN(c)?1:0,f=I):(f=Math.floor(Math.log(c)/Math.LN2),c*(d=Math.pow(2,-f))<1&&(f--,d*=2),f+F>=1?c+=S/d:c+=S*Math.pow(2,1-F),c*d>=2&&(f++,d/=2),f+F>=I?(o=0,f=I):f+F>=1?(o=(c*d-1)*Math.pow(2,y),f=f+F):(o=c*Math.pow(2,F-1)*Math.pow(2,y),f=0));y>=8;s[p+A]=o&255,A+=M,o/=256,y-=8);for(f=f<0;s[p+A]=f&255,A+=M,f/=256,_-=8);s[p+A-M]|=P*128};/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh diff --git a/src/ui/dist/assets/Export.754fd59a.js.gz b/src/ui/dist/assets/Export.754fd59a.js.gz new file mode 100644 index 000000000..f8b5cee54 Binary files /dev/null and b/src/ui/dist/assets/Export.754fd59a.js.gz differ diff --git a/src/ui/dist/assets/Export.84d2e49c.js.gz b/src/ui/dist/assets/Export.84d2e49c.js.gz deleted file mode 100644 index 4779ee1bc..000000000 Binary files a/src/ui/dist/assets/Export.84d2e49c.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/FixedPlaylistHeader.28982abf.js b/src/ui/dist/assets/FixedPlaylistHeader.8b130c57.js similarity index 82% rename from src/ui/dist/assets/FixedPlaylistHeader.28982abf.js rename to src/ui/dist/assets/FixedPlaylistHeader.8b130c57.js index 2950a68a7..314a0314f 100644 --- a/src/ui/dist/assets/FixedPlaylistHeader.28982abf.js +++ b/src/ui/dist/assets/FixedPlaylistHeader.8b130c57.js @@ -1 +1 @@ -import{P as o}from"./song.619409cb.js";import{_ as i,e as l,o as d,c as r,a as e,t as n,g as c}from"./index.1d09503d.js";const _={name:"FixedPlaylistHeader",components:{PlaylistHeader:o},props:{title:String}},p={class:"fixedPlaylistHeader"},m={class:"upperWrapper"},y={class:"font-bold"},f={class:"padding-20 darkback"};function P(h,s,a,x,u,v){const t=l("PlaylistHeader");return d(),r("div",p,[e("div",m,[e("span",{id:"loadPlaylist",class:"material-symbols-rounded hideIfMobile",onClick:s[0]||(s[0]=H=>this.$emit("loadPlaylist"))},"play_circle"),e("h3",y,n(a.title),1)]),e("div",f,[c(t,{class:"fixedHeader hideIfMobile","with-album":"","with-more":""})])])}const k=i(_,[["render",P],["__scopeId","data-v-32a7413e"]]);export{k as F}; +import{P as o}from"./song.6a60a886.js";import{_ as i,e as l,o as d,c as r,a as e,t as n,g as c}from"./index.c970909a.js";const _={name:"FixedPlaylistHeader",components:{PlaylistHeader:o},props:{title:String}},p={class:"fixedPlaylistHeader"},m={class:"upperWrapper"},y={class:"font-bold"},f={class:"padding-20 darkback"};function P(h,s,a,x,u,v){const t=l("PlaylistHeader");return d(),r("div",p,[e("div",m,[e("span",{id:"loadPlaylist",class:"material-symbols-rounded hideIfMobile",onClick:s[0]||(s[0]=H=>this.$emit("loadPlaylist"))},"play_circle"),e("h3",y,n(a.title),1)]),e("div",f,[c(t,{class:"fixedHeader hideIfMobile","with-album":"","with-more":""})])])}const k=i(_,[["render",P],["__scopeId","data-v-32a7413e"]]);export{k as F}; diff --git a/src/ui/dist/assets/FullShelf.434ba053.js b/src/ui/dist/assets/FullShelf.13880daa.js similarity index 87% rename from src/ui/dist/assets/FullShelf.434ba053.js rename to src/ui/dist/assets/FullShelf.13880daa.js index 30b281b9e..6d74caa79 100644 --- a/src/ui/dist/assets/FullShelf.434ba053.js +++ b/src/ui/dist/assets/FullShelf.13880daa.js @@ -1 +1 @@ -import{_ as c,o as t,c as a,a as s,b as i,t as n,d as l,r as _}from"./index.1d09503d.js";const d={name:"FullShelf",props:{heading:String,icon:String}},r={class:"shelf"},u={class:"header"},f={key:0,class:"icon material-icons-outlined"},h={class:"items"};function m(o,p,e,S,g,v){return t(),a("div",r,[s("div",u,[s("h2",null,[i(n(e.heading),1),e.icon?(t(),a("span",f,n(e.icon),1)):l("",!0)])]),s("div",h,[_(o.$slots,"default",{},void 0,!0)])])}const y=c(d,[["render",m],["__scopeId","data-v-4ac5b29f"]]);export{y as F}; +import{_ as c,o as t,c as a,a as s,b as i,t as n,d as l,r as _}from"./index.c970909a.js";const d={name:"FullShelf",props:{heading:String,icon:String}},r={class:"shelf"},u={class:"header"},f={key:0,class:"icon material-icons-outlined"},h={class:"items"};function m(o,p,e,S,g,v){return t(),a("div",r,[s("div",u,[s("h2",null,[i(n(e.heading),1),e.icon?(t(),a("span",f,n(e.icon),1)):l("",!0)])]),s("div",h,[_(o.$slots,"default",{},void 0,!0)])])}const y=c(d,[["render",m],["__scopeId","data-v-4ac5b29f"]]);export{y as F}; diff --git a/src/ui/dist/assets/Import.bc91f73f.js.gz b/src/ui/dist/assets/Import.bc91f73f.js.gz deleted file mode 100644 index deb9ef755..000000000 Binary files a/src/ui/dist/assets/Import.bc91f73f.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/Import.bc91f73f.js b/src/ui/dist/assets/Import.ccefe9a3.js similarity index 94% rename from src/ui/dist/assets/Import.bc91f73f.js rename to src/ui/dist/assets/Import.ccefe9a3.js index 28fdec86a..328d82f0b 100644 --- a/src/ui/dist/assets/Import.bc91f73f.js +++ b/src/ui/dist/assets/Import.ccefe9a3.js @@ -1 +1 @@ -import{C as h}from"./CloudPlaylist.b86620c0.js";import{_,j as f,o as r,c as p,a as o,b as u,d as y,F as v,i as k,f as P,e as $,k as C,l as F}from"./index.1d09503d.js";const w={name:"import",methods:{login(){window.location=`https://eu-apollo.herokuapp.com/user/accessToken?redirect=${encodeURIComponent(window.location.origin+"/#/import/")}`}},mounted(){this.$refs.upFile.addEventListener("change",()=>{var t,i,l,n;const s=(t=this.$refs.upFile.files)==null?void 0:t[0];if(!!s){this.uploadedCoverName=(n=(l=(i=this.$refs.upFile)==null?void 0:i.files)==null?void 0:l[0])==null?void 0:n.name;var e=new FileReader;e.onloadend=()=>{this.cloudPlaylists=JSON.parse(e.result)},e.readAsText(s)}})},data(){const s=f();if(this.$route.params.data){const e=this.$route.params.data;fetch(`https://eu-apollo.herokuapp.com/user/${e}`).then(async t=>{this.userData=await t.json(),this.cloudPlaylists=this.userData.data.playlists})}for(let e=0;et.json()).then(t=>this.localPlaylists.push(t));return{localPlaylists:[],cloudPlaylists:[],userData:{},dataStore:s}},components:{CloudPlaylist:h}},c=s=>(C("data-v-3d90df46"),s=s(),F(),s),I={class:"import"},g={class:"action"},S=c(()=>o("h1",null,"Restore From File",-1)),T={type:"file",ref:"upFile",style:{display:"none"},accept:"application/json"},b=c(()=>o("span",{class:"material-symbols-rounded"},"file_upload",-1)),x=c(()=>o("span",{class:"material-symbols-rounded"},"done",-1)),E={class:"data"};function N(s,e,t,i,l,n){const m=$("CloudPlaylist");return r(),p("div",I,[o("div",g,[S,o("input",T,null,512),o("button",{onClick:e[0]||(e[0]=()=>s.$refs.upFile.click()),class:"iconWithText"},[b,u(" Upload")]),o("button",{onClick:e[1]||(e[1]=d=>s.$refs.playlistsElements.forEach(a=>a.import())),class:"iconWithText"},[x,u(" Apply")])]),y("",!0),o("div",E,[(r(!0),p(v,null,k(l.cloudPlaylists,(d,a)=>(r(),P(m,{onRemove:()=>l.cloudPlaylists.splice(a,1),ref_for:!0,ref:"playlistsElements",key:a,playlist:d,localPlaylists:l.localPlaylists},null,8,["onRemove","playlist","localPlaylists"]))),128))])])}const B=_(w,[["render",N],["__scopeId","data-v-3d90df46"]]);export{B as default}; +import{C as h}from"./CloudPlaylist.3209552c.js";import{_,j as f,o as r,c as p,a as o,b as u,d as y,F as v,i as k,f as P,e as $,k as C,l as F}from"./index.c970909a.js";const w={name:"import",methods:{login(){window.location=`https://eu-apollo.herokuapp.com/user/accessToken?redirect=${encodeURIComponent(window.location.origin+"/#/import/")}`}},mounted(){this.$refs.upFile.addEventListener("change",()=>{var t,i,l,n;const s=(t=this.$refs.upFile.files)==null?void 0:t[0];if(!!s){this.uploadedCoverName=(n=(l=(i=this.$refs.upFile)==null?void 0:i.files)==null?void 0:l[0])==null?void 0:n.name;var e=new FileReader;e.onloadend=()=>{this.cloudPlaylists=JSON.parse(e.result)},e.readAsText(s)}})},data(){const s=f();if(this.$route.params.data){const e=this.$route.params.data;fetch(`https://eu-apollo.herokuapp.com/user/${e}`).then(async t=>{this.userData=await t.json(),this.cloudPlaylists=this.userData.data.playlists})}for(let e=0;et.json()).then(t=>this.localPlaylists.push(t));return{localPlaylists:[],cloudPlaylists:[],userData:{},dataStore:s}},components:{CloudPlaylist:h}},c=s=>(C("data-v-3d90df46"),s=s(),F(),s),I={class:"import"},g={class:"action"},S=c(()=>o("h1",null,"Restore From File",-1)),T={type:"file",ref:"upFile",style:{display:"none"},accept:"application/json"},b=c(()=>o("span",{class:"material-symbols-rounded"},"file_upload",-1)),x=c(()=>o("span",{class:"material-symbols-rounded"},"done",-1)),E={class:"data"};function N(s,e,t,i,l,n){const m=$("CloudPlaylist");return r(),p("div",I,[o("div",g,[S,o("input",T,null,512),o("button",{onClick:e[0]||(e[0]=()=>s.$refs.upFile.click()),class:"iconWithText"},[b,u(" Upload")]),o("button",{onClick:e[1]||(e[1]=d=>s.$refs.playlistsElements.forEach(a=>a.import())),class:"iconWithText"},[x,u(" Apply")])]),y("",!0),o("div",E,[(r(!0),p(v,null,k(l.cloudPlaylists,(d,a)=>(r(),P(m,{onRemove:()=>l.cloudPlaylists.splice(a,1),ref_for:!0,ref:"playlistsElements",key:a,playlist:d,localPlaylists:l.localPlaylists},null,8,["onRemove","playlist","localPlaylists"]))),128))])])}const B=_(w,[["render",N],["__scopeId","data-v-3d90df46"]]);export{B as default}; diff --git a/src/ui/dist/assets/Import.ccefe9a3.js.gz b/src/ui/dist/assets/Import.ccefe9a3.js.gz new file mode 100644 index 000000000..2728fef53 Binary files /dev/null and b/src/ui/dist/assets/Import.ccefe9a3.js.gz differ diff --git a/src/ui/dist/assets/ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.c66e56c3.js.gz b/src/ui/dist/assets/ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.c66e56c3.js.gz deleted file mode 100644 index ab61c089b..000000000 Binary files a/src/ui/dist/assets/ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.c66e56c3.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.c66e56c3.js b/src/ui/dist/assets/ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.ec33d761.js similarity index 89% rename from src/ui/dist/assets/ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.c66e56c3.js rename to src/ui/dist/assets/ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.ec33d761.js index bfbb90fc9..045f7c7d7 100644 --- a/src/ui/dist/assets/ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.c66e56c3.js +++ b/src/ui/dist/assets/ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.ec33d761.js @@ -1 +1 @@ -import{F as y,T as h,a as A,c as g}from"./song.619409cb.js";import{T as k,P as C}from"./TrackInfo.a2d7128f.js";import{m as j,j as $,n as s,o as P,f as S,w as T,g as i,u as B,B as D,a as N}from"./index.1d09503d.js";const O=N("br",null,null,-1),F=j({__name:"ImportSpotifyAlbum",props:{album:{type:Object,required:!0}},setup(l,{expose:d}){const t=l,c=$(),r=s([{name:"playlist",type:"dropdown",icon:"playlist_add",required:!0,value:null,options:c.playlistsAsDropdown}]),u=s(null),n=s(null),o=s([]),f=async()=>{if(o.value.length>0){u.value.show();return}const e=await u.value.fetch(`/api/spotify/albums/${t.album.id}`);!e||(o.value=await e.json())},p=()=>{const e=new CustomEvent("player.play",{detail:{artist:t.album.artist,title:t.album.title,source:t.album.href}});window.dispatchEvent(e)},m=async e=>{if(e==="new"){const a=await g(t.album.title,`${t.album.releaseDate}, ${t.album.artist}`,t.album.cover);return r.value[0].options=c.playlistsAsDropdown,r.value[0].value=a,a}return Number(e)},b=async(e,a=null)=>{o.value[e].added||(a!=null||(a=n.value.toObject().playlist),a=await m(a),await A(a!=null?a:n.value.toObject().playlist,o.value[e]),o.value[e].added=!0)},w=async()=>{let e=n.value.toObject().playlist;e=await m(e),o.value.forEach((a,v)=>{b(v,e)})};return d({show:f}),(e,a)=>(P(),S(h,{ref_key:"modal",ref:u,submit:{label:"Add All",icon:"add"},name:"Import Album",onClose:a[0]||(a[0]=v=>e.$emit("close")),onSubmit:w},{default:T(()=>[i(k,{cover:l.album.cover,icons:[{name:"share",onClick:()=>B(D)(l.album.href)},{name:"play_arrow",onClick:p}],subtitle:l.album.artist,title:l.album.title},null,8,["cover","icons","subtitle","title"]),i(y,{ref_key:"form",ref:n,options:r.value},null,8,["options"]),O,i(C,{songs:o.value,noCover:"",onAdd:b},null,8,["songs"])]),_:1},512))}});export{F as _}; +import{F as y,T as h,a as A,c as g}from"./song.6a60a886.js";import{T as k,P as C}from"./TrackInfo.2ed5fbe0.js";import{m as j,j as $,n as s,o as P,f as S,w as T,g as i,u as B,B as D,a as N}from"./index.c970909a.js";const O=N("br",null,null,-1),F=j({__name:"ImportSpotifyAlbum",props:{album:{type:Object,required:!0}},setup(l,{expose:d}){const t=l,c=$(),r=s([{name:"playlist",type:"dropdown",icon:"playlist_add",required:!0,value:null,options:c.playlistsAsDropdown}]),u=s(null),n=s(null),o=s([]),f=async()=>{if(o.value.length>0){u.value.show();return}const e=await u.value.fetch(`/api/spotify/albums/${t.album.id}`);!e||(o.value=await e.json())},p=()=>{const e=new CustomEvent("player.play",{detail:{artist:t.album.artist,title:t.album.title,source:t.album.href}});window.dispatchEvent(e)},m=async e=>{if(e==="new"){const a=await g(t.album.title,`${t.album.releaseDate}, ${t.album.artist}`,t.album.cover);return r.value[0].options=c.playlistsAsDropdown,r.value[0].value=a,a}return Number(e)},b=async(e,a=null)=>{o.value[e].added||(a!=null||(a=n.value.toObject().playlist),a=await m(a),await A(a!=null?a:n.value.toObject().playlist,o.value[e]),o.value[e].added=!0)},w=async()=>{let e=n.value.toObject().playlist;e=await m(e),o.value.forEach((a,v)=>{b(v,e)})};return d({show:f}),(e,a)=>(P(),S(h,{ref_key:"modal",ref:u,submit:{label:"Add All",icon:"add"},name:"Import Album",onClose:a[0]||(a[0]=v=>e.$emit("close")),onSubmit:w},{default:T(()=>[i(k,{cover:l.album.cover,icons:[{name:"share",onClick:()=>B(D)(l.album.href)},{name:"play_arrow",onClick:p}],subtitle:l.album.artist,title:l.album.title},null,8,["cover","icons","subtitle","title"]),i(y,{ref_key:"form",ref:n,options:r.value},null,8,["options"]),O,i(C,{songs:o.value,noCover:"",onAdd:b},null,8,["songs"])]),_:1},512))}});export{F as _}; diff --git a/src/ui/dist/assets/ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.ec33d761.js.gz b/src/ui/dist/assets/ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.ec33d761.js.gz new file mode 100644 index 000000000..299ac5e97 Binary files /dev/null and b/src/ui/dist/assets/ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.ec33d761.js.gz differ diff --git a/src/ui/dist/assets/ImportSpotifySong.vue_vue_type_script_setup_true_lang.66b612a0.js.gz b/src/ui/dist/assets/ImportSpotifySong.vue_vue_type_script_setup_true_lang.66b612a0.js.gz deleted file mode 100644 index 50ff596cb..000000000 Binary files a/src/ui/dist/assets/ImportSpotifySong.vue_vue_type_script_setup_true_lang.66b612a0.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/ImportSpotifySong.vue_vue_type_script_setup_true_lang.66b612a0.js b/src/ui/dist/assets/ImportSpotifySong.vue_vue_type_script_setup_true_lang.c34c7594.js similarity index 83% rename from src/ui/dist/assets/ImportSpotifySong.vue_vue_type_script_setup_true_lang.66b612a0.js rename to src/ui/dist/assets/ImportSpotifySong.vue_vue_type_script_setup_true_lang.c34c7594.js index b06b9b72c..6996ce133 100644 --- a/src/ui/dist/assets/ImportSpotifySong.vue_vue_type_script_setup_true_lang.66b612a0.js +++ b/src/ui/dist/assets/ImportSpotifySong.vue_vue_type_script_setup_true_lang.c34c7594.js @@ -1 +1 @@ -import{F as p,T as g,a as h,c as b}from"./song.619409cb.js";import{T as k}from"./TrackInfo.a2d7128f.js";import{m as y,j as S,n as s,o as C,f as T,w as j,g as c,u as O,B as A}from"./index.1d09503d.js";const D=y({__name:"ImportSpotifySong",props:{song:{type:Object,required:!0}},setup(a,{expose:m}){const t=a,u=S(),r=s([{name:"playlist",type:"dropdown",required:!0,value:null,options:u.playlistsAsDropdown}]),n=s(null),l=s(null),i=s(null),f=async()=>{if(!i.value){n.value.show();return}const o=await n.value.fetch("/api/browse/track",{method:"POST",body:JSON.stringify({url:t.song.href})});!o||(n.value.load(),i.value=await o.json(),n.value.show())},v=()=>{const o=new CustomEvent("player.play",{detail:{artist:t.song.artist,title:t.song.title,source:t.song.href}});window.dispatchEvent(o)},w=async o=>{if(o==="new"){const e=await b(t.song.title,t.song.artist,t.song.cover);return r.value[0].options=u.playlistsAsDropdown,r.value[0].value=e,e}return Number(o)},d=async(o,e=null)=>{e!=null||(e=l.value.toObject().playlist),e=await w(e),await h(e!=null?e:l.value.toObject().playlist,i.value),t.song.added=!0};return m({show:f}),(o,e)=>(C(),T(g,{ref_key:"modal",ref:n,submit:{label:"Add All",icon:"add"},name:"Import Song",onClose:e[0]||(e[0]=N=>o.$emit("close")),onSubmit:d},{default:j(()=>[c(k,{cover:a.song.cover,icons:[{name:"share",onClick:()=>O(A)(a.song.href)},{name:"play_arrow",onClick:v}],title:a.song.title},null,8,["cover","icons","title"]),c(p,{ref_key:"form",ref:l,options:r.value},null,8,["options"])]),_:1},512))}});export{D as _}; +import{F as p,T as g,a as h,c as b}from"./song.6a60a886.js";import{T as k}from"./TrackInfo.2ed5fbe0.js";import{m as y,j as S,n as s,o as C,f as T,w as j,g as c,u as O,B as A}from"./index.c970909a.js";const D=y({__name:"ImportSpotifySong",props:{song:{type:Object,required:!0}},setup(a,{expose:m}){const t=a,u=S(),r=s([{name:"playlist",type:"dropdown",required:!0,value:null,options:u.playlistsAsDropdown}]),n=s(null),l=s(null),i=s(null),f=async()=>{if(!i.value){n.value.show();return}const o=await n.value.fetch("/api/browse/track",{method:"POST",body:JSON.stringify({url:t.song.href})});!o||(n.value.load(),i.value=await o.json(),n.value.show())},v=()=>{const o=new CustomEvent("player.play",{detail:{artist:t.song.artist,title:t.song.title,source:t.song.href}});window.dispatchEvent(o)},w=async o=>{if(o==="new"){const e=await b(t.song.title,t.song.artist,t.song.cover);return r.value[0].options=u.playlistsAsDropdown,r.value[0].value=e,e}return Number(o)},d=async(o,e=null)=>{e!=null||(e=l.value.toObject().playlist),e=await w(e),await h(e!=null?e:l.value.toObject().playlist,i.value),t.song.added=!0};return m({show:f}),(o,e)=>(C(),T(g,{ref_key:"modal",ref:n,submit:{label:"Add All",icon:"add"},name:"Import Song",onClose:e[0]||(e[0]=N=>o.$emit("close")),onSubmit:d},{default:j(()=>[c(k,{cover:a.song.cover,icons:[{name:"share",onClick:()=>O(A)(a.song.href)},{name:"play_arrow",onClick:v}],title:a.song.title},null,8,["cover","icons","title"]),c(p,{ref_key:"form",ref:l,options:r.value},null,8,["options"])]),_:1},512))}});export{D as _}; diff --git a/src/ui/dist/assets/ImportSpotifySong.vue_vue_type_script_setup_true_lang.c34c7594.js.gz b/src/ui/dist/assets/ImportSpotifySong.vue_vue_type_script_setup_true_lang.c34c7594.js.gz new file mode 100644 index 000000000..b9ab55b50 Binary files /dev/null and b/src/ui/dist/assets/ImportSpotifySong.vue_vue_type_script_setup_true_lang.c34c7594.js.gz differ diff --git a/src/ui/dist/assets/LocalData.55d88dea.js.gz b/src/ui/dist/assets/LocalData.55d88dea.js.gz deleted file mode 100644 index 56ce2c850..000000000 Binary files a/src/ui/dist/assets/LocalData.55d88dea.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/LocalData.55d88dea.js b/src/ui/dist/assets/LocalData.aa99f014.js similarity index 84% rename from src/ui/dist/assets/LocalData.55d88dea.js rename to src/ui/dist/assets/LocalData.aa99f014.js index 881671df7..518b71e3a 100644 --- a/src/ui/dist/assets/LocalData.55d88dea.js +++ b/src/ui/dist/assets/LocalData.aa99f014.js @@ -1 +1 @@ -import{T as h}from"./TrackCompact.b3e226ee.js";import{_ as C,n as v,J as P,o,c,a as t,F as i,i as r,g as u,h as S,M as y,f as k,u as g,k as j,l as D}from"./index.1d09503d.js";import"./ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.c66e56c3.js";import"./song.619409cb.js";import"./Dropdown.f68f135c.js";import"./TrackInfo.a2d7128f.js";import"./ImportSpotifySong.vue_vue_type_script_setup_true_lang.66b612a0.js";const b=l=>(j("data-v-525fe5be"),l=l(),D(),l),T={class:"wrap"},$={class:"covers"},B=b(()=>t("h2",null,"Local covers",-1)),I={class:"items grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-4"},N={class:"flex justify-between w-full mb-4"},J={class:"overflow-hidden"},F=["onClick"],M={class:"tracks"},O=b(()=>t("h2",null,"Local tracks",-1)),V={class:"items grid grid-cols-2 md:grid-cols-4 gap-4"},q={class:"flex justify-between w-full mb-4"},z={class:"overflow-hidden"},A=["onClick"],G={class:"flex justify-center w-full mb-4"},H=["src"],K={__name:"LocalData",setup(l){const p=v([]),m=v([]),x=P(),n=()=>{fetch("/api/config/images").then(e=>e.json()).then(e=>p.value=e),fetch("/api/config/tracks").then(e=>e.json()).then(e=>m.value=e)},w=async e=>{await fetch("/api/config/images",{method:"DELETE",body:JSON.stringify({name:e})}),n()},L=async e=>{fetch("/api/config/tracks",{method:"DELETE",body:JSON.stringify({name:e})}),n()},f=e=>{x.loadPlaylist("track",e)};return n(),(e,Q)=>(o(),c("div",T,[t("div",$,[B,t("div",I,[(o(!0),c(i,null,r(p.value,(a,d)=>(o(),c("div",{class:"cover-wrapper",key:d},[u(S,{src:a.name,class:"rounded-xl mb-4"},null,8,["src"]),t("div",N,[t("p",J,[u(y,{text:a.name},null,8,["text"])]),t("span",{class:"ml-2 material-symbols-rounded cursor-pointer",onClick:s=>w(a.name)},"delete",8,F)]),(o(!0),c(i,null,r(a.songs,(s,_)=>(o(),k(g(h),{key:_,artist:s.artist,title:s.title,cover:s.cover,id:s.id,onPlay:E=>f(s.id)},null,8,["artist","title","cover","id","onPlay"]))),128))]))),128))])]),t("div",M,[O,t("div",V,[(o(!0),c(i,null,r(m.value,(a,d)=>(o(),c("div",{class:"track",key:d},[t("div",q,[t("p",z,[u(y,{text:a.name},null,8,["text"])]),t("span",{class:"material-symbols-rounded cursor-pointer",onClick:s=>L(a.name)},"delete",8,A)]),t("div",G,[t("audio",{controls:"",src:"/api/"+a.name.replace("local:","/src/tracks/")},null,8,H)]),(o(!0),c(i,null,r(a.songs,(s,_)=>(o(),k(g(h),{key:_,artist:s.artist,title:s.title,cover:s.cover,id:s.id,onPlay:E=>f(s.id)},null,8,["artist","title","cover","id","onPlay"]))),128))]))),128))])])]))}},te=C(K,[["__scopeId","data-v-525fe5be"]]);export{te as default}; +import{T as h}from"./TrackCompact.3692910e.js";import{_ as C,n as v,J as P,o,c,a as t,F as i,i as r,g as u,h as S,M as y,f as k,u as g,k as j,l as D}from"./index.c970909a.js";import"./ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.ec33d761.js";import"./song.6a60a886.js";import"./Dropdown.7541a2ee.js";import"./TrackInfo.2ed5fbe0.js";import"./ImportSpotifySong.vue_vue_type_script_setup_true_lang.c34c7594.js";const b=l=>(j("data-v-525fe5be"),l=l(),D(),l),T={class:"wrap"},$={class:"covers"},B=b(()=>t("h2",null,"Local covers",-1)),I={class:"items grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-4"},N={class:"flex justify-between w-full mb-4"},J={class:"overflow-hidden"},F=["onClick"],M={class:"tracks"},O=b(()=>t("h2",null,"Local tracks",-1)),V={class:"items grid grid-cols-2 md:grid-cols-4 gap-4"},q={class:"flex justify-between w-full mb-4"},z={class:"overflow-hidden"},A=["onClick"],G={class:"flex justify-center w-full mb-4"},H=["src"],K={__name:"LocalData",setup(l){const p=v([]),m=v([]),x=P(),n=()=>{fetch("/api/config/images").then(e=>e.json()).then(e=>p.value=e),fetch("/api/config/tracks").then(e=>e.json()).then(e=>m.value=e)},w=async e=>{await fetch("/api/config/images",{method:"DELETE",body:JSON.stringify({name:e})}),n()},L=async e=>{fetch("/api/config/tracks",{method:"DELETE",body:JSON.stringify({name:e})}),n()},f=e=>{x.loadPlaylist("track",e)};return n(),(e,Q)=>(o(),c("div",T,[t("div",$,[B,t("div",I,[(o(!0),c(i,null,r(p.value,(a,d)=>(o(),c("div",{class:"cover-wrapper",key:d},[u(S,{src:a.name,class:"rounded-xl mb-4"},null,8,["src"]),t("div",N,[t("p",J,[u(y,{text:a.name},null,8,["text"])]),t("span",{class:"ml-2 material-symbols-rounded cursor-pointer",onClick:s=>w(a.name)},"delete",8,F)]),(o(!0),c(i,null,r(a.songs,(s,_)=>(o(),k(g(h),{key:_,artist:s.artist,title:s.title,cover:s.cover,id:s.id,onPlay:E=>f(s.id)},null,8,["artist","title","cover","id","onPlay"]))),128))]))),128))])]),t("div",M,[O,t("div",V,[(o(!0),c(i,null,r(m.value,(a,d)=>(o(),c("div",{class:"track",key:d},[t("div",q,[t("p",z,[u(y,{text:a.name},null,8,["text"])]),t("span",{class:"material-symbols-rounded cursor-pointer",onClick:s=>L(a.name)},"delete",8,A)]),t("div",G,[t("audio",{controls:"",src:"/api/"+a.name.replace("local:","/src/tracks/")},null,8,H)]),(o(!0),c(i,null,r(a.songs,(s,_)=>(o(),k(g(h),{key:_,artist:s.artist,title:s.title,cover:s.cover,id:s.id,onPlay:E=>f(s.id)},null,8,["artist","title","cover","id","onPlay"]))),128))]))),128))])])]))}},te=C(K,[["__scopeId","data-v-525fe5be"]]);export{te as default}; diff --git a/src/ui/dist/assets/LocalData.aa99f014.js.gz b/src/ui/dist/assets/LocalData.aa99f014.js.gz new file mode 100644 index 000000000..ad9ac6fac Binary files /dev/null and b/src/ui/dist/assets/LocalData.aa99f014.js.gz differ diff --git a/src/ui/dist/assets/News.0915b4bf.js b/src/ui/dist/assets/News.0915b4bf.js deleted file mode 100644 index ccd91eeff..000000000 --- a/src/ui/dist/assets/News.0915b4bf.js +++ /dev/null @@ -1 +0,0 @@ -import{F as T}from"./FullShelf.434ba053.js";import{C as v}from"./Card.4b544f8d.js";import{_ as f,e as r,o as n,f as c,w,c as i,d as y,a,t as p,F as h,i as g,k as $,l as N}from"./index.1d09503d.js";const k={name:"NewsItemBig",components:{Card:v},methods:{redirect(){this.$router.push(this.href)}},computed:{updatedTimestamp(){const e=new Date(this.updated),s=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];return`${s[e.getUTCDay()]} ${e.getUTCDate()} ${t[e.getUTCMonth()]} ${e.getUTCFullYear()} ${e.getUTCHours()}.${e.getUTCMinutes()} GMT`}},props:{image:String,title:String,summary:String,href:String,updated:String,source:String}},b=["src"],I=["innerHTML"],x={class:"small"};function M(e,s,t,u,_,d){const l=r("Card");return n(),c(l,{class:"p-4 col-span-2 cursor-pointer",onClick:d.redirect},{default:w(()=>[t.image?(n(),i("img",{key:0,src:t.image},null,8,b)):y("",!0),a("h4",null,p(t.title),1),a("p",{class:"newsSummary",innerHTML:t.summary},null,8,I),a("p",x,p(`${d.updatedTimestamp}, ${t.source}`),1)]),_:1},8,["onClick"])}const B=f(k,[["render",M],["__scopeId","data-v-65bb62e7"]]);const F={components:{FullShelf:T,NewsItemBig:B},name:"News",data(){return{news:[]}},mounted(){fetch("/api/news/articles").then(e=>e.json()).then(e=>{this.news.length=0;for(const s of e){const t=this.news.findIndex(u=>u.source==s.source);t>=0?this.news[t].items.push(s):this.news.push({source:s.source,items:[s]})}})}},D=e=>($("data-v-3bae2738"),e=e(),N(),e),U={class:"padding-20"},L={class:"news"},H=D(()=>a("h1",null,"News",-1));function A(e,s,t,u,_,d){const l=r("Loading"),S=r("news-item-big"),C=r("full-shelf");return n(),i("div",U,[a("div",L,[H,_.news.length==0?(n(),c(l,{key:0})):y("",!0),(n(!0),i(h,null,g(_.news,m=>(n(),c(C,{key:m.source,heading:m.source,class:"mt-10"},{default:w(()=>[(n(!0),i(h,null,g(m.items,o=>(n(),c(S,{key:o.url,href:o.link,image:o.image,source:o.source,summary:o.summary,title:o.title,updated:o.updated},null,8,["href","image","source","summary","title","updated"]))),128))]),_:2},1032,["heading"]))),128))])])}const Y=f(F,[["render",A],["__scopeId","data-v-3bae2738"]]);export{Y as default}; diff --git a/src/ui/dist/assets/News.0915b4bf.js.gz b/src/ui/dist/assets/News.0915b4bf.js.gz deleted file mode 100644 index 2102e435c..000000000 Binary files a/src/ui/dist/assets/News.0915b4bf.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/News.1f47f9e9.js b/src/ui/dist/assets/News.1f47f9e9.js new file mode 100644 index 000000000..f85b38e86 --- /dev/null +++ b/src/ui/dist/assets/News.1f47f9e9.js @@ -0,0 +1 @@ +import{F as v}from"./FullShelf.13880daa.js";import{C as T}from"./Card.d68bcee4.js";import{_ as f,e as r,o as n,f as m,w,c as a,d as y,a as c,t as p,L as N,g as $,F as h,i as g,k,l as I}from"./index.c970909a.js";const x={name:"NewsItemBig",components:{Card:T},methods:{redirect(){this.$router.push(this.href)}},computed:{updatedTimestamp(){const e=new Date(this.updated),s=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];return`${s[e.getUTCDay()]} ${e.getUTCDate()} ${t[e.getUTCMonth()]} ${e.getUTCFullYear()} ${e.getUTCHours()}.${e.getUTCMinutes()} GMT`}},props:{image:String,title:String,summary:String,href:String,updated:String,source:String}},M=["src"],B=["innerHTML"],b={class:"small"};function F(e,s,t,i,u,_){const d=r("Card");return n(),m(d,{class:"p-4 col-span-2 cursor-pointer",onClick:_.redirect},{default:w(()=>[t.image?(n(),a("img",{key:0,src:t.image},null,8,M)):y("",!0),c("h4",null,p(t.title),1),c("p",{class:"newsSummary",innerHTML:t.summary},null,8,B),c("p",b,p(`${_.updatedTimestamp}, ${t.source}`),1)]),_:1},8,["onClick"])}const L=f(x,[["render",F],["__scopeId","data-v-65bb62e7"]]);const D={components:{Loader:N,FullShelf:v,NewsItemBig:L},name:"News",data(){return{news:[]}},mounted(){fetch("/api/news/articles").then(e=>e.json()).then(e=>{this.news.length=0;for(const s of e){const t=this.news.findIndex(i=>i.source==s.source);t>=0?this.news[t].items.push(s):this.news.push({source:s.source,items:[s]})}})}},U=e=>(k("data-v-cf4ce161"),e=e(),I(),e),H={class:"padding-20"},A={class:"news"},J=U(()=>c("h1",null,"News",-1)),V={key:0,class:"fillPage"};function O(e,s,t,i,u,_){const d=r("Loader"),S=r("news-item-big"),C=r("full-shelf");return n(),a("div",H,[c("div",A,[J,u.news.length?y("",!0):(n(),a("div",V,[$(d)])),(n(!0),a(h,null,g(u.news,l=>(n(),m(C,{key:l.source,heading:l.source,class:"mt-10"},{default:w(()=>[(n(!0),a(h,null,g(l.items,o=>(n(),m(S,{key:o.url,href:o.link,image:o.image,source:o.source,summary:o.summary,title:o.title,updated:o.updated},null,8,["href","image","source","summary","title","updated"]))),128))]),_:2},1032,["heading"]))),128))])])}const G=f(D,[["render",O],["__scopeId","data-v-cf4ce161"]]);export{G as default}; diff --git a/src/ui/dist/assets/News.1f47f9e9.js.gz b/src/ui/dist/assets/News.1f47f9e9.js.gz new file mode 100644 index 000000000..bfd2d14d5 Binary files /dev/null and b/src/ui/dist/assets/News.1f47f9e9.js.gz differ diff --git a/src/ui/dist/assets/News.6750251f.css b/src/ui/dist/assets/News.af29ed08.css similarity index 67% rename from src/ui/dist/assets/News.6750251f.css rename to src/ui/dist/assets/News.af29ed08.css index 6b86d07c0..b4f3aef1c 100644 --- a/src/ui/dist/assets/News.6750251f.css +++ b/src/ui/dist/assets/News.af29ed08.css @@ -1 +1 @@ -p.note[data-v-65bb62e7]{font-size:.8em}.wrapper[data-v-65bb62e7]{display:flex;flex-direction:column;justify-content:flex-end;height:100%}img[data-v-65bb62e7]{border-radius:12px;margin-bottom:20px}h4[data-v-65bb62e7]{margin:0;font-size:1em}p[data-v-65bb62e7]{margin:0;color:var(--fg-base-dk);font-size:.9em;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.small[data-v-65bb62e7]{font-size:.6em;margin:auto auto 0 0}p.newsSummary a,p.newsSummary a:hover{color:var(--fg-base-dk)}font{display:none}.padding-20[data-v-3bae2738]{padding:20px} +p.note[data-v-65bb62e7]{font-size:.8em}.wrapper[data-v-65bb62e7]{display:flex;flex-direction:column;justify-content:flex-end;height:100%}img[data-v-65bb62e7]{border-radius:12px;margin-bottom:20px}h4[data-v-65bb62e7]{margin:0;font-size:1em}p[data-v-65bb62e7]{margin:0;color:var(--fg-base-dk);font-size:.9em;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.small[data-v-65bb62e7]{font-size:.6em;margin:auto auto 0 0}p.newsSummary a,p.newsSummary a:hover{color:var(--fg-base-dk)}font{display:none}.padding-20[data-v-cf4ce161]{padding:20px}.fillPage[data-v-cf4ce161]{display:flex;flex-direction:column;justify-content:center;align-items:center;height:calc(100vh - var(--h-header) - var(--h-player) - 200px)} diff --git a/src/ui/dist/assets/NewsArticle.414bf554.js.gz b/src/ui/dist/assets/NewsArticle.414bf554.js.gz deleted file mode 100644 index bffca923d..000000000 Binary files a/src/ui/dist/assets/NewsArticle.414bf554.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/NewsArticle.414bf554.js b/src/ui/dist/assets/NewsArticle.feaafe35.js similarity index 97% rename from src/ui/dist/assets/NewsArticle.414bf554.js rename to src/ui/dist/assets/NewsArticle.feaafe35.js index 0ad377ea3..607e0f202 100644 --- a/src/ui/dist/assets/NewsArticle.414bf554.js +++ b/src/ui/dist/assets/NewsArticle.feaafe35.js @@ -1 +1 @@ -import{_ as p,o as i,c as _,a as r,L as m,f as d,t as c,b as y,d as h,C as g,e as u}from"./index.1d09503d.js";const w={name:"Error",props:{msg:String},methods:{toggleSidebar(){this.$emit("toggleSidebar")}}},v={class:"error"},L=["innerHTML"];function b(s,t,o,l,e,a){return i(),_("div",v,[r("h1",{innerHTML:o.msg},null,8,L)])}const k=p(w,[["render",b],["__scopeId","data-v-e01e0aa9"]]);const x={name:"NewsArticle",components:{Loader:m,Error:k},data(){return{error:"",article:{},fullWidth:!1}},methods:{updateData(){fetch(`/api/news/articles/${this.$route.params.url}`).then(async s=>{if(s.status==404){this.error="This wouldn't have happened if you had clicked on the links we provided!
\u30FD(\u0CA0_\u0CA0)\u30CE",setTimeout(this.updateData,1e3);return}if(s.status==400){window.open(await s.text()),this.$router.push("/news");return}if(s.status==200){if(this.article=await s.json(),this.article.headline==="N/A"){window.open(this.article.href),this.$router.push("/news");return}let t=this.article.body.split(" ").filter(e=>e.includes('href="/'));t=t.map(e=>e.split('href="')[1].split('"')[0]);const o=this.article.href.split("/")[2],l=t.map(e=>"https://"+o+e);for(const e in t){let a=l[e];fetch("/api/news/articles",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:l[e]})}).then(async n=>{n.status==200?a=await n.text():console.error(await n.text()),this.article.body=this.article.body.replaceAll(t[e],a)})}return}this.error=s.statusText})}},mounted(){this.updateData()}},T={key:2,class:"padding-20 newsArticle"},N=["innerHTML"],H={class:"leading-tight headline"},M=["innerHTML"],A={key:0,class:"date"},E=["href"],C={key:1,class:"my-4"},S=["innerHTML"];function W(s,t,o,l,e,a){const n=u("Error"),f=u("Loader");return e.error?(i(),d(n,{key:0,msg:e.error},null,8,["msg"])):e.article.headline?(i(),_("div",T,[r("span",{class:"toggleWidth material-icons-round",onClick:t[0]||(t[0]=B=>e.fullWidth=!e.fullWidth)},c(e.fullWidth?"close_fullscreen":"open_in_full"),1),r("div",{class:g([{slim:!e.fullWidth},"wrapper"])},[r("h6",{class:"accentLink topic",innerHTML:e.article.topic},null,8,N),r("h1",H,c(e.article.headline),1),r("h4",{class:"standfirst",innerHTML:e.article.standfirst},null,8,M),e.article.date?(i(),_("h6",A,[y(c(e.article.date)+", ",1),r("a",{href:e.article.href},c(e.article.href),9,E)])):h("",!0),e.article.body?(i(),_("hr",C)):h("",!0),r("div",{class:"body leading-relaxed text-md",innerHTML:e.article.body},null,8,S)],2)])):(i(),d(f,{key:1}))}const V=p(x,[["render",W],["__scopeId","data-v-f3cbc8f7"]]);export{V as default}; +import{_ as p,o as i,c as _,a as r,L as m,f as d,t as c,b as y,d as h,C as g,e as u}from"./index.c970909a.js";const w={name:"Error",props:{msg:String},methods:{toggleSidebar(){this.$emit("toggleSidebar")}}},v={class:"error"},L=["innerHTML"];function b(s,t,o,l,e,a){return i(),_("div",v,[r("h1",{innerHTML:o.msg},null,8,L)])}const k=p(w,[["render",b],["__scopeId","data-v-e01e0aa9"]]);const x={name:"NewsArticle",components:{Loader:m,Error:k},data(){return{error:"",article:{},fullWidth:!1}},methods:{updateData(){fetch(`/api/news/articles/${this.$route.params.url}`).then(async s=>{if(s.status==404){this.error="This wouldn't have happened if you had clicked on the links we provided!
\u30FD(\u0CA0_\u0CA0)\u30CE",setTimeout(this.updateData,1e3);return}if(s.status==400){window.open(await s.text()),this.$router.push("/news");return}if(s.status==200){if(this.article=await s.json(),this.article.headline==="N/A"){window.open(this.article.href),this.$router.push("/news");return}let t=this.article.body.split(" ").filter(e=>e.includes('href="/'));t=t.map(e=>e.split('href="')[1].split('"')[0]);const o=this.article.href.split("/")[2],l=t.map(e=>"https://"+o+e);for(const e in t){let a=l[e];fetch("/api/news/articles",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:l[e]})}).then(async n=>{n.status==200?a=await n.text():console.error(await n.text()),this.article.body=this.article.body.replaceAll(t[e],a)})}return}this.error=s.statusText})}},mounted(){this.updateData()}},T={key:2,class:"padding-20 newsArticle"},N=["innerHTML"],H={class:"leading-tight headline"},M=["innerHTML"],A={key:0,class:"date"},E=["href"],C={key:1,class:"my-4"},S=["innerHTML"];function W(s,t,o,l,e,a){const n=u("Error"),f=u("Loader");return e.error?(i(),d(n,{key:0,msg:e.error},null,8,["msg"])):e.article.headline?(i(),_("div",T,[r("span",{class:"toggleWidth material-icons-round",onClick:t[0]||(t[0]=B=>e.fullWidth=!e.fullWidth)},c(e.fullWidth?"close_fullscreen":"open_in_full"),1),r("div",{class:g([{slim:!e.fullWidth},"wrapper"])},[r("h6",{class:"accentLink topic",innerHTML:e.article.topic},null,8,N),r("h1",H,c(e.article.headline),1),r("h4",{class:"standfirst",innerHTML:e.article.standfirst},null,8,M),e.article.date?(i(),_("h6",A,[y(c(e.article.date)+", ",1),r("a",{href:e.article.href},c(e.article.href),9,E)])):h("",!0),e.article.body?(i(),_("hr",C)):h("",!0),r("div",{class:"body leading-relaxed text-md",innerHTML:e.article.body},null,8,S)],2)])):(i(),d(f,{key:1}))}const V=p(x,[["render",W],["__scopeId","data-v-f3cbc8f7"]]);export{V as default}; diff --git a/src/ui/dist/assets/NewsArticle.feaafe35.js.gz b/src/ui/dist/assets/NewsArticle.feaafe35.js.gz new file mode 100644 index 000000000..151b54a60 Binary files /dev/null and b/src/ui/dist/assets/NewsArticle.feaafe35.js.gz differ diff --git a/src/ui/dist/assets/Playlist.67e9ec8e.js b/src/ui/dist/assets/Playlist.44a6b876.js similarity index 94% rename from src/ui/dist/assets/Playlist.67e9ec8e.js rename to src/ui/dist/assets/Playlist.44a6b876.js index 0983d3584..9a3a50fb4 100644 --- a/src/ui/dist/assets/Playlist.67e9ec8e.js +++ b/src/ui/dist/assets/Playlist.44a6b876.js @@ -1 +1 @@ -import{F}from"./FixedPlaylistHeader.28982abf.js";import{P as H}from"./PlaylistEntry.486af7f1.js";import{F as C,T as k,b as O,a as A,e as U,h as q,P as M,i as V,g as R}from"./song.619409cb.js";import{m as I,n as _,o as P,f as D,w as S,g as p,P as B,Q as z,R as N,v as J,D as L,q as Q,_ as $,j,h as G,J as K,p as W,S as X,U as Y,c as x,C as Z,y as ee,a as c,t as w,e as g,I as te,k as ae,l as se}from"./index.1d09503d.js";import{d as ie}from"./vuedraggable.umd.e9aa7b2f.js";import"./EditSong.vue_vue_type_script_setup_true_lang.b4546726.js";import"./playerInPicture.37a9ab56.js";import"./Dropdown.f68f135c.js";const le=I({__name:"AddNewSong",setup(s,{expose:l}){const n=B(),d={title:"",artist:"",album:"",cover:"",source:""},i=async(o,t)=>{const e=J(String(new Date().getTime())),m=new FormData,r="."+t.name.split(".").pop();var f=t.slice(0,t.size,t.type),b=new File([f],e+r,{type:t.type});return m.append("file",b),await(await fetch(o,{method:"POST",body:m})).text()},a=_([{name:"source",type:"upload",accept:"audio/mp3",required:!0,onUpload:o=>{i("/api/config/tracks",o).then(t=>a.value.find(e=>e.name=="source").value=t)},onChange:async o=>{const t=await O(o);a.value.find(e=>e.name==="title").value=t.title,a.value.find(e=>e.name==="artist").value=t.artist,a.value.find(e=>e.name==="album").value=t.album,a.value.find(e=>e.name==="cover").value=t.cover,a.value.find(e=>e.name==="source").value=t.source},value:d.source},{name:"title",type:"text",icon:"title",required:!0,value:d.title},{name:"artist",type:"text",icon:"person",required:!0,value:d.artist},{name:"album",type:"text",icon:"album",value:d.album},{name:"cover",type:"upload",accept:"image/*",imagePreview:!0,value:d.cover,onUpload:o=>{i("/api/config/images",o).then(t=>a.value.find(e=>e.name=="cover").value=t)}}]),u=_(null),y=_(null),h=async()=>{if(u.value.show(),!navigator.clipboard)return;const o=await navigator.clipboard.readText();if(!z(o))return;const t=a.value.find(e=>e.name==="source");t.value=o,t.onChange(o)},v=async o=>{const t=Number(N(String(n.params.id)));await A(t,y.value.toObject())};return l({show:h}),(o,t)=>(P(),D(k,{ref_key:"modal",ref:u,submit:{label:"Add",icon:"add"},name:"Add Song",onClose:t[0]||(t[0]=e=>o.$emit("close")),onSubmit:v},{default:S(()=>[p(C,{ref_key:"form",ref:y,options:a.value},null,8,["options"])]),_:1},512))}}),oe=I({__name:"EditPlaylist",props:{playlist:{type:Object,required:!0}},setup(s,{expose:l}){const n=s,d=async(t,e)=>{const m=new FormData,r="."+e.name.split(".").pop();var f=e.slice(0,e.size,e.type),b=new File([f],n.playlist.name+r,{type:e.type});return m.append("file",b),await(await fetch(t,{method:"POST",body:m})).text()};L(()=>n.playlist,t=>{i.value.find(e=>e.name=="name").value=t.name,i.value.find(e=>e.name=="description").value=t.description,i.value.find(e=>e.name=="cover").value=t.cover},{deep:!0});const i=_([{name:"name",type:"text",icon:"title",required:!0,value:n.playlist.name},{name:"description",type:"text",icon:"description",required:!0,value:n.playlist.description},{name:"cover",type:"upload",icon:"image",accept:"image/*",imagePreview:!0,value:n.playlist.cover,onUpload:t=>{d("/api/config/images",t).then(e=>n.playlist.cover=e)}}]),a=_(null),u=_(null),y=Q(),h=()=>{a.value.show()},v=async()=>{await U({...n.playlist,...u.value.toObject()})},o=async()=>{await q(n.playlist.id),await y.push("/collection/playlists")};return l({show:h}),(t,e)=>(P(),D(k,{ref_key:"modal",ref:a,secondary:{label:"Delete",icon:"delete",type:"danger"},submit:{label:"Save",icon:"save"},name:"Edit Playlist",onClose:e[0]||(e[0]=m=>t.$emit("close")),onSecondary:o,onSubmit:v},{default:S(()=>[p(C,{ref_key:"form",ref:u,options:i.value},null,8,["options"])]),_:1},512))}});j();const ne={components:{PlaylistEntry:H,FixedPlaylistHeader:F,PlaylistHeader:M,AddSong:le,EditPlaylist:oe,draggable:ie,Cover:G},name:"Playlist",data(){return this.updatePlaylist(),{fixedHeaderHidden:!0,playlist:[],playlistName:"N/A",playlistDescription:"",playlistCover:null,store:K(),selectedSongId:-1}},methods:{parseCover:W,parsePlaylistCover:X,download(s){var n;const l=(n=this.playlist)==null?void 0:n[s];window.open(`/api/tracks/${l.id}/download`)},onPlaylistRearrange(s){const l=s.moved;!l||fetch(`/api/playlists/${this.id}/tracks`,{method:"PUT",body:JSON.stringify({songOldIndex:l.oldIndex,songNewIndex:l.newIndex})})},headerVisibilityChanged(s){this.fixedHeaderHidden=s},addToPlaylist(){this.$refs.addSongPopup.show()},editPlaylist(){this.$refs.editPlaylistPopup.show()},updateIsPlaying(){this.playlist.forEach(s=>{s.playing=s.id==this.currentSong})},updatePlaylist(){if(!!this.id&&!!this.$route.path.includes("/playlist/")){if(this.$route.params.id=="create"){V().then(s=>{const l=Y(s);this.$router.push(l)});return}R(this.id).then(async s=>{if(!s){this.$router.push("/");return}this.playlist=s.songs,this.playlistName=s.name,this.playlistDescription=s.description,this.playlistCover=s.cover,document.title=`${this.playlistName} - reAudioPlayer One`,this.updateIsPlaying()})}},loadPlaylist(){fetch("/api/player/load",{method:"POST",body:JSON.stringify({id:Number(this.id),type:"playlist"})})}},computed:{id(){return N(this.$route.params.id)},autogeneratedDescription(){return`${this.playlist.length} ${this.playlist.length==1?"song":"songs"}${this.estimatedDuration}`},currentSong(){return this.store.song.id},estimatedDuration(){let s=0,l=!1;if(!this.playlist.length)return"";for(const u of this.playlist){l=l||u.duration=="-1:59";const y=u.duration=="-1:59"?"3:00":u.duration,[h,v]=y.split(":");s+=Number(h*60)+Number(v)}const n=s,d=Math.floor(n/60),i=Math.floor(d/60),a=l?", about ":", ";return i?a+`${i} hr ${d-i*60} min`:d?a+`${d} min ${n-d*60} sec`:a+s+" sec"}},mounted(){this.updatePlaylist()},watch:{$route(){this.updatePlaylist()},currentSong(){this.updateIsPlaying()}}},T=s=>(ae("data-v-933bddee"),s=s(),se(),s),re={class:"playlist"},de={class:"details"},ce={class:"text-muted text-xs my-0 description"},ue={class:"mobileMenu showIfMobile"},pe=T(()=>c("hr",null,null,-1)),ye={class:"padding-20"},me={class:"grid"},he=T(()=>c("hr",null,null,-1)),ve={class:"playlistEntries"};function ge(s,l,n,d,i,a){const u=g("AddSong"),y=g("EditPlaylist"),h=g("fixed-playlist-header"),v=g("Cover"),o=g("PlaylistHeader"),t=g("PlaylistEntry"),e=g("draggable"),m=te("observe-visibility");return P(),x("div",re,[p(u,{ref:"addSongPopup",onClose:a.updatePlaylist},null,8,["onClose"]),p(y,{ref:"editPlaylistPopup",playlist:{name:i.playlistName,description:i.playlistDescription,cover:i.playlistCover,id:a.id},onClose:a.updatePlaylist},null,8,["playlist","onClose"]),p(h,{ref:"fixedHeading",class:Z({hidden:i.fixedHeaderHidden}),title:i.playlistName,onLoadPlaylist:a.loadPlaylist},null,8,["class","title","onLoadPlaylist"]),ee((P(),x("div",{class:"padding-20 playlisteditor",onClick:l[0]||(l[0]=(...r)=>a.editPlaylist&&a.editPlaylist(...r))},[p(v,{src:i.playlistCover,type:"playlist"},null,8,["src"]),c("div",de,[c("h1",null,w(i.playlistName),1),c("h6",null,w(i.playlistDescription),1),c("p",ce,w(a.autogeneratedDescription),1)])])),[[m,a.headerVisibilityChanged]]),c("div",ue,[c("span",{class:"material-symbols-rounded",onClick:l[1]||(l[1]=()=>s.$emit("toggleFullSidebar"))},"menu")]),pe,c("div",ye,[c("span",{id:"loadPlaylist",class:"material-symbols-rounded",onClick:l[2]||(l[2]=(...r)=>a.loadPlaylist&&a.loadPlaylist(...r))},"play_circle"),c("span",{id:"addToPlaylist",class:"material-symbols-rounded",onClick:l[3]||(l[3]=(...r)=>a.addToPlaylist&&a.addToPlaylist(...r))},"add_circle"),c("div",me,[p(o,{class:"hideIfMobile","with-album":"","with-more":""}),he,c("div",ve,[p(e,{modelValue:i.playlist,"onUpdate:modelValue":l[4]||(l[4]=r=>i.playlist=r),onChange:a.onPlaylistRearrange},{item:S(({element:r})=>[p(t,{index:i.playlist.findIndex(f=>f.source==r.source),"playlist-id":Number(a.id),selected:i.selectedSongId==r.id,song:r,"with-album":"","with-cover":"","with-more":"",onClick:f=>i.selectedSongId==r.id?i.selectedSongId=-1:i.selectedSongId=r.id,onUpdate:a.updatePlaylist},null,8,["index","playlist-id","selected","song","onClick","onUpdate"])]),_:1},8,["modelValue","onChange"])])])])])}const ke=$(ne,[["render",ge],["__scopeId","data-v-933bddee"]]);export{ke as default}; +import{F}from"./FixedPlaylistHeader.8b130c57.js";import{P as H}from"./PlaylistEntry.75d93026.js";import{F as C,T as k,b as O,a as A,e as U,h as q,P as M,i as V,g as R}from"./song.6a60a886.js";import{m as I,n as _,o as P,f as D,w as S,g as p,P as B,Q as z,R as N,v as J,D as L,q as Q,_ as $,j,h as G,J as K,p as W,S as X,U as Y,c as x,C as Z,y as ee,a as c,t as w,e as g,I as te,k as ae,l as se}from"./index.c970909a.js";import{d as ie}from"./vuedraggable.umd.6e1f6451.js";import"./EditSong.vue_vue_type_script_setup_true_lang.42f3815c.js";import"./playerInPicture.37a9ab56.js";import"./Dropdown.7541a2ee.js";const le=I({__name:"AddNewSong",setup(s,{expose:l}){const n=B(),d={title:"",artist:"",album:"",cover:"",source:""},i=async(o,t)=>{const e=J(String(new Date().getTime())),m=new FormData,r="."+t.name.split(".").pop();var f=t.slice(0,t.size,t.type),b=new File([f],e+r,{type:t.type});return m.append("file",b),await(await fetch(o,{method:"POST",body:m})).text()},a=_([{name:"source",type:"upload",accept:"audio/mp3",required:!0,onUpload:o=>{i("/api/config/tracks",o).then(t=>a.value.find(e=>e.name=="source").value=t)},onChange:async o=>{const t=await O(o);a.value.find(e=>e.name==="title").value=t.title,a.value.find(e=>e.name==="artist").value=t.artist,a.value.find(e=>e.name==="album").value=t.album,a.value.find(e=>e.name==="cover").value=t.cover,a.value.find(e=>e.name==="source").value=t.source},value:d.source},{name:"title",type:"text",icon:"title",required:!0,value:d.title},{name:"artist",type:"text",icon:"person",required:!0,value:d.artist},{name:"album",type:"text",icon:"album",value:d.album},{name:"cover",type:"upload",accept:"image/*",imagePreview:!0,value:d.cover,onUpload:o=>{i("/api/config/images",o).then(t=>a.value.find(e=>e.name=="cover").value=t)}}]),u=_(null),y=_(null),h=async()=>{if(u.value.show(),!navigator.clipboard)return;const o=await navigator.clipboard.readText();if(!z(o))return;const t=a.value.find(e=>e.name==="source");t.value=o,t.onChange(o)},v=async o=>{const t=Number(N(String(n.params.id)));await A(t,y.value.toObject())};return l({show:h}),(o,t)=>(P(),D(k,{ref_key:"modal",ref:u,submit:{label:"Add",icon:"add"},name:"Add Song",onClose:t[0]||(t[0]=e=>o.$emit("close")),onSubmit:v},{default:S(()=>[p(C,{ref_key:"form",ref:y,options:a.value},null,8,["options"])]),_:1},512))}}),oe=I({__name:"EditPlaylist",props:{playlist:{type:Object,required:!0}},setup(s,{expose:l}){const n=s,d=async(t,e)=>{const m=new FormData,r="."+e.name.split(".").pop();var f=e.slice(0,e.size,e.type),b=new File([f],n.playlist.name+r,{type:e.type});return m.append("file",b),await(await fetch(t,{method:"POST",body:m})).text()};L(()=>n.playlist,t=>{i.value.find(e=>e.name=="name").value=t.name,i.value.find(e=>e.name=="description").value=t.description,i.value.find(e=>e.name=="cover").value=t.cover},{deep:!0});const i=_([{name:"name",type:"text",icon:"title",required:!0,value:n.playlist.name},{name:"description",type:"text",icon:"description",required:!0,value:n.playlist.description},{name:"cover",type:"upload",icon:"image",accept:"image/*",imagePreview:!0,value:n.playlist.cover,onUpload:t=>{d("/api/config/images",t).then(e=>n.playlist.cover=e)}}]),a=_(null),u=_(null),y=Q(),h=()=>{a.value.show()},v=async()=>{await U({...n.playlist,...u.value.toObject()})},o=async()=>{await q(n.playlist.id),await y.push("/collection/playlists")};return l({show:h}),(t,e)=>(P(),D(k,{ref_key:"modal",ref:a,secondary:{label:"Delete",icon:"delete",type:"danger"},submit:{label:"Save",icon:"save"},name:"Edit Playlist",onClose:e[0]||(e[0]=m=>t.$emit("close")),onSecondary:o,onSubmit:v},{default:S(()=>[p(C,{ref_key:"form",ref:u,options:i.value},null,8,["options"])]),_:1},512))}});j();const ne={components:{PlaylistEntry:H,FixedPlaylistHeader:F,PlaylistHeader:M,AddSong:le,EditPlaylist:oe,draggable:ie,Cover:G},name:"Playlist",data(){return this.updatePlaylist(),{fixedHeaderHidden:!0,playlist:[],playlistName:"N/A",playlistDescription:"",playlistCover:null,store:K(),selectedSongId:-1}},methods:{parseCover:W,parsePlaylistCover:X,download(s){var n;const l=(n=this.playlist)==null?void 0:n[s];window.open(`/api/tracks/${l.id}/download`)},onPlaylistRearrange(s){const l=s.moved;!l||fetch(`/api/playlists/${this.id}/tracks`,{method:"PUT",body:JSON.stringify({songOldIndex:l.oldIndex,songNewIndex:l.newIndex})})},headerVisibilityChanged(s){this.fixedHeaderHidden=s},addToPlaylist(){this.$refs.addSongPopup.show()},editPlaylist(){this.$refs.editPlaylistPopup.show()},updateIsPlaying(){this.playlist.forEach(s=>{s.playing=s.id==this.currentSong})},updatePlaylist(){if(!!this.id&&!!this.$route.path.includes("/playlist/")){if(this.$route.params.id=="create"){V().then(s=>{const l=Y(s);this.$router.push(l)});return}R(this.id).then(async s=>{if(!s){this.$router.push("/");return}this.playlist=s.songs,this.playlistName=s.name,this.playlistDescription=s.description,this.playlistCover=s.cover,document.title=`${this.playlistName} - reAudioPlayer One`,this.updateIsPlaying()})}},loadPlaylist(){fetch("/api/player/load",{method:"POST",body:JSON.stringify({id:Number(this.id),type:"playlist"})})}},computed:{id(){return N(this.$route.params.id)},autogeneratedDescription(){return`${this.playlist.length} ${this.playlist.length==1?"song":"songs"}${this.estimatedDuration}`},currentSong(){return this.store.song.id},estimatedDuration(){let s=0,l=!1;if(!this.playlist.length)return"";for(const u of this.playlist){l=l||u.duration=="-1:59";const y=u.duration=="-1:59"?"3:00":u.duration,[h,v]=y.split(":");s+=Number(h*60)+Number(v)}const n=s,d=Math.floor(n/60),i=Math.floor(d/60),a=l?", about ":", ";return i?a+`${i} hr ${d-i*60} min`:d?a+`${d} min ${n-d*60} sec`:a+s+" sec"}},mounted(){this.updatePlaylist()},watch:{$route(){this.updatePlaylist()},currentSong(){this.updateIsPlaying()}}},T=s=>(ae("data-v-933bddee"),s=s(),se(),s),re={class:"playlist"},de={class:"details"},ce={class:"text-muted text-xs my-0 description"},ue={class:"mobileMenu showIfMobile"},pe=T(()=>c("hr",null,null,-1)),ye={class:"padding-20"},me={class:"grid"},he=T(()=>c("hr",null,null,-1)),ve={class:"playlistEntries"};function ge(s,l,n,d,i,a){const u=g("AddSong"),y=g("EditPlaylist"),h=g("fixed-playlist-header"),v=g("Cover"),o=g("PlaylistHeader"),t=g("PlaylistEntry"),e=g("draggable"),m=te("observe-visibility");return P(),x("div",re,[p(u,{ref:"addSongPopup",onClose:a.updatePlaylist},null,8,["onClose"]),p(y,{ref:"editPlaylistPopup",playlist:{name:i.playlistName,description:i.playlistDescription,cover:i.playlistCover,id:a.id},onClose:a.updatePlaylist},null,8,["playlist","onClose"]),p(h,{ref:"fixedHeading",class:Z({hidden:i.fixedHeaderHidden}),title:i.playlistName,onLoadPlaylist:a.loadPlaylist},null,8,["class","title","onLoadPlaylist"]),ee((P(),x("div",{class:"padding-20 playlisteditor",onClick:l[0]||(l[0]=(...r)=>a.editPlaylist&&a.editPlaylist(...r))},[p(v,{src:i.playlistCover,type:"playlist"},null,8,["src"]),c("div",de,[c("h1",null,w(i.playlistName),1),c("h6",null,w(i.playlistDescription),1),c("p",ce,w(a.autogeneratedDescription),1)])])),[[m,a.headerVisibilityChanged]]),c("div",ue,[c("span",{class:"material-symbols-rounded",onClick:l[1]||(l[1]=()=>s.$emit("toggleFullSidebar"))},"menu")]),pe,c("div",ye,[c("span",{id:"loadPlaylist",class:"material-symbols-rounded",onClick:l[2]||(l[2]=(...r)=>a.loadPlaylist&&a.loadPlaylist(...r))},"play_circle"),c("span",{id:"addToPlaylist",class:"material-symbols-rounded",onClick:l[3]||(l[3]=(...r)=>a.addToPlaylist&&a.addToPlaylist(...r))},"add_circle"),c("div",me,[p(o,{class:"hideIfMobile","with-album":"","with-more":""}),he,c("div",ve,[p(e,{modelValue:i.playlist,"onUpdate:modelValue":l[4]||(l[4]=r=>i.playlist=r),onChange:a.onPlaylistRearrange},{item:S(({element:r})=>[p(t,{index:i.playlist.findIndex(f=>f.source==r.source),"playlist-id":Number(a.id),selected:i.selectedSongId==r.id,song:r,"with-album":"","with-cover":"","with-more":"",onClick:f=>i.selectedSongId==r.id?i.selectedSongId=-1:i.selectedSongId=r.id,onUpdate:a.updatePlaylist},null,8,["index","playlist-id","selected","song","onClick","onUpdate"])]),_:1},8,["modelValue","onChange"])])])])])}const ke=$(ne,[["render",ge],["__scopeId","data-v-933bddee"]]);export{ke as default}; diff --git a/src/ui/dist/assets/Playlist.44a6b876.js.gz b/src/ui/dist/assets/Playlist.44a6b876.js.gz new file mode 100644 index 000000000..54c7ce40a Binary files /dev/null and b/src/ui/dist/assets/Playlist.44a6b876.js.gz differ diff --git a/src/ui/dist/assets/Playlist.67e9ec8e.js.gz b/src/ui/dist/assets/Playlist.67e9ec8e.js.gz deleted file mode 100644 index fed3bd5b0..000000000 Binary files a/src/ui/dist/assets/Playlist.67e9ec8e.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/PlaylistEntry.486af7f1.js.gz b/src/ui/dist/assets/PlaylistEntry.486af7f1.js.gz deleted file mode 100644 index be438b902..000000000 Binary files a/src/ui/dist/assets/PlaylistEntry.486af7f1.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/PlaylistEntry.486af7f1.js b/src/ui/dist/assets/PlaylistEntry.75d93026.js similarity index 96% rename from src/ui/dist/assets/PlaylistEntry.486af7f1.js rename to src/ui/dist/assets/PlaylistEntry.75d93026.js index 6eb3ca58b..3cf23ba0c 100644 --- a/src/ui/dist/assets/PlaylistEntry.486af7f1.js +++ b/src/ui/dist/assets/PlaylistEntry.75d93026.js @@ -1 +1 @@ -import{m as T,j as z,E as M,n as P,y as J,o as l,c as g,r as K,g as o,w as s,b as d,F as L,i as R,f as I,t as y,u as p,d as x,e as b,I as W,J as X,a as m,C as E,h as G,M as F,K as Q,_ as Z}from"./index.1d09503d.js";import{_ as ee}from"./EditSong.vue_vue_type_script_setup_true_lang.b4546726.js";import{p as te}from"./playerInPicture.37a9ab56.js";import{a as oe,c as ne,r as se,d as ae,f as le}from"./song.619409cb.js";const ie=T({__name:"SongContext",props:{song:{type:Object,required:!0},playlistId:{type:Number,required:!1,default:-1}},emits:["update","edit"],setup(e,{expose:A,emit:a}){const t=e,B=z(),i=M(()=>B.playlists),C=M(()=>t.playlistId==-1),$=()=>{te(t.song.artist,t.song.title,t.song.source)},k=async n=>{n!=-1&&await oe(n,t.song)},_=async()=>{const n=await ne(t.song.title,t.song.artist,t.song.cover);k(n)},N=async()=>{await se(t.playlistId,t.song.id),a("update")},S=P(null),v=P(null),u=()=>{v.value.visible?h():w()},h=()=>{v.value.hide()},w=()=>{const n=S.value.getBoundingClientRect(),f={top:n.height+n.top+window.scrollY,left:n.width+n.left+window.scrollX};v.value.show(f)};A({show:w,toggle:u,hide:h});const O={Soundcloud:`https://soundcloud.com/search?q=${t.song.artist} ${t.song.title}`,Audius:`https://audius.co/search/${t.song.artist} ${t.song.title}`,"Youtube Music":`https://music.youtube.com/search?q=${t.song.artist} ${t.song.title}`,Spotify:`https://open.spotify.com/search/${t.song.artist} ${t.song.title}`},j=()=>{a("edit")},U=n=>{window.open(O[n]),j()};return(n,f)=>{const r=b("v-contextmenu-item"),V=b("v-contextmenu-submenu"),q=b("v-contextmenu-divider"),H=b("v-contextmenu"),Y=W("contextmenu");return J((l(),g("div",{ref_key:"box",ref:S},[K(n.$slots,"default"),o(H,{ref_key:"contextmenu",ref:v},{default:s(()=>[o(r,{onClick:$},{default:s(()=>[d(" Preview ")]),_:1}),o(V,{title:"Find source"},{default:s(()=>[(l(!0),g(L,null,R(Object.keys(O),c=>(l(),I(r,{key:c,onClick:D=>U(c)},{default:s(()=>[d(y(c),1)]),_:2},1032,["onClick"]))),128))]),_:1}),o(q),o(r,{onClick:f[0]||(f[0]=c=>n.$emit("like"))},{default:s(()=>[d(y((e.song.favourite?"Remove from":"Save to")+" your Liked Songs"),1)]),_:1}),p(C)?x("",!0):(l(),I(r,{key:0,onClick:N},{default:s(()=>[d(" Remove from this playlist ")]),_:1})),o(V,{title:"Add to playlist"},{default:s(()=>[o(r,{onClick:_},{default:s(()=>[d("Add to new playlist")]),_:1}),o(q),(l(!0),g(L,null,R(p(i),(c,D)=>(l(),I(r,{key:D,onClick:ge=>k(D)},{default:s(()=>[d(y(c.name),1)]),_:2},1032,["onClick"]))),128))]),_:1}),o(q),o(r,{onClick:j},{default:s(()=>[d(" Update Metadata ")]),_:1}),o(q),o(r,{onClick:f[1]||(f[1]=c=>p(ae)(e.song.id))},{default:s(()=>[d("Download")]),_:1})]),_:1},512)])),[[Y,void 0,"contextmenu"]])}}}),ue={key:0,class:"cover"},re={class:"artist-title"},de={class:"title"},ce={class:"artist"},ve={key:1,class:"album"},fe={class:"duration text-center"},me=T({__name:"PlaylistEntry",props:{song:{type:Object,required:!0},index:{type:Number,required:!0},withCover:{type:Boolean,required:!1,default:!1},withAlbum:{type:Boolean,required:!1,default:!1},withMore:{type:Boolean,required:!1,default:!1},selected:{type:Boolean,required:!1,default:!1},playlistId:{type:Number,required:!1,default:null}},emits:["update"],setup(e,{emit:A}){const a=e,t=X(),B=M(()=>a.song.id==t.song.id),i=P(!1),C=()=>{a.song.favourite=!a.song.favourite,le(a.song.id,a.song.favourite)},$=M(()=>a.playlistId==null?t.playlist.id:a.playlistId),k=()=>{t.loadSong($.value,a.index)},_=P(null),N=()=>{_.value.show()},S=()=>{A("update")};return(v,u)=>{const h=b("router-link");return l(),I(ie,{ref:"ctxMenu",liked:e.song.favourite,playlistId:p($),song:e.song,onEdit:N,onLike:C,onUpdate:S},{default:s(()=>[o(ee,{ref_key:"updatePopup",ref:_,song:e.song,onUpdate:u[0]||(u[0]=w=>v.$emit("update"))},null,8,["song"]),m("div",{class:E([{playing:p(B),selected:e.selected,hovering:i.value,withCover:e.withCover,withAlbum:e.withAlbum,withMore:e.withMore},"playlist-entry"]),onDblclick:k,onMouseenter:u[2]||(u[2]=w=>i.value=!0),onMouseleave:u[3]||(u[3]=w=>i.value=!1)},[m("div",{class:E([{"material-symbols-rounded":i.value},"index text-right"]),onClick:k},y(i.value?"play_arrow":e.index+1),3),e.withCover?(l(),g("div",ue,[o(G,{src:e.song.cover,type:"track"},null,8,["src"])])):x("",!0),m("div",re,[m("span",de,[o(h,{to:`/track/${e.song.id}`,class:"linkOnHover"},{default:s(()=>[o(F,{text:e.song.title},null,8,["text"])]),_:1},8,["to"])]),m("span",ce,[o(h,{to:`/search/artist:${e.song.artist}`,class:"linkOnHover"},{default:s(()=>[o(F,{text:e.song.artist},null,8,["text"])]),_:1},8,["to"])])]),e.withAlbum&&!p(Q)?(l(),g("div",ve,[o(F,{text:e.song.album},null,8,["text"])])):x("",!0),e.selected||i.value||e.song.favourite?(l(),g("div",{key:2,class:E([{favourite:e.song.favourite},"favourite-icon icon text-right material-symbols-rounded"]),onClick:C},y(e.song.favourite?"favorite":"heart_plus"),3)):x("",!0),m("div",fe,y(e.song.duration=="-1:59"?"N/A":e.song.duration),1),x("",!0)],34)]),_:1},8,["liked","playlistId","song"])}}});const we=Z(me,[["__scopeId","data-v-f1278207"]]);export{we as P}; +import{m as T,j as z,E as M,n as P,y as J,o as l,c as g,r as K,g as o,w as s,b as d,F as L,i as R,f as I,t as y,u as p,d as x,e as b,I as W,J as X,a as m,C as E,h as G,M as F,K as Q,_ as Z}from"./index.c970909a.js";import{_ as ee}from"./EditSong.vue_vue_type_script_setup_true_lang.42f3815c.js";import{p as te}from"./playerInPicture.37a9ab56.js";import{a as oe,c as ne,r as se,d as ae,f as le}from"./song.6a60a886.js";const ie=T({__name:"SongContext",props:{song:{type:Object,required:!0},playlistId:{type:Number,required:!1,default:-1}},emits:["update","edit"],setup(e,{expose:A,emit:a}){const t=e,B=z(),i=M(()=>B.playlists),C=M(()=>t.playlistId==-1),$=()=>{te(t.song.artist,t.song.title,t.song.source)},k=async n=>{n!=-1&&await oe(n,t.song)},_=async()=>{const n=await ne(t.song.title,t.song.artist,t.song.cover);k(n)},N=async()=>{await se(t.playlistId,t.song.id),a("update")},S=P(null),v=P(null),u=()=>{v.value.visible?h():w()},h=()=>{v.value.hide()},w=()=>{const n=S.value.getBoundingClientRect(),f={top:n.height+n.top+window.scrollY,left:n.width+n.left+window.scrollX};v.value.show(f)};A({show:w,toggle:u,hide:h});const O={Soundcloud:`https://soundcloud.com/search?q=${t.song.artist} ${t.song.title}`,Audius:`https://audius.co/search/${t.song.artist} ${t.song.title}`,"Youtube Music":`https://music.youtube.com/search?q=${t.song.artist} ${t.song.title}`,Spotify:`https://open.spotify.com/search/${t.song.artist} ${t.song.title}`},j=()=>{a("edit")},U=n=>{window.open(O[n]),j()};return(n,f)=>{const r=b("v-contextmenu-item"),V=b("v-contextmenu-submenu"),q=b("v-contextmenu-divider"),H=b("v-contextmenu"),Y=W("contextmenu");return J((l(),g("div",{ref_key:"box",ref:S},[K(n.$slots,"default"),o(H,{ref_key:"contextmenu",ref:v},{default:s(()=>[o(r,{onClick:$},{default:s(()=>[d(" Preview ")]),_:1}),o(V,{title:"Find source"},{default:s(()=>[(l(!0),g(L,null,R(Object.keys(O),c=>(l(),I(r,{key:c,onClick:D=>U(c)},{default:s(()=>[d(y(c),1)]),_:2},1032,["onClick"]))),128))]),_:1}),o(q),o(r,{onClick:f[0]||(f[0]=c=>n.$emit("like"))},{default:s(()=>[d(y((e.song.favourite?"Remove from":"Save to")+" your Liked Songs"),1)]),_:1}),p(C)?x("",!0):(l(),I(r,{key:0,onClick:N},{default:s(()=>[d(" Remove from this playlist ")]),_:1})),o(V,{title:"Add to playlist"},{default:s(()=>[o(r,{onClick:_},{default:s(()=>[d("Add to new playlist")]),_:1}),o(q),(l(!0),g(L,null,R(p(i),(c,D)=>(l(),I(r,{key:D,onClick:ge=>k(D)},{default:s(()=>[d(y(c.name),1)]),_:2},1032,["onClick"]))),128))]),_:1}),o(q),o(r,{onClick:j},{default:s(()=>[d(" Update Metadata ")]),_:1}),o(q),o(r,{onClick:f[1]||(f[1]=c=>p(ae)(e.song.id))},{default:s(()=>[d("Download")]),_:1})]),_:1},512)])),[[Y,void 0,"contextmenu"]])}}}),ue={key:0,class:"cover"},re={class:"artist-title"},de={class:"title"},ce={class:"artist"},ve={key:1,class:"album"},fe={class:"duration text-center"},me=T({__name:"PlaylistEntry",props:{song:{type:Object,required:!0},index:{type:Number,required:!0},withCover:{type:Boolean,required:!1,default:!1},withAlbum:{type:Boolean,required:!1,default:!1},withMore:{type:Boolean,required:!1,default:!1},selected:{type:Boolean,required:!1,default:!1},playlistId:{type:Number,required:!1,default:null}},emits:["update"],setup(e,{emit:A}){const a=e,t=X(),B=M(()=>a.song.id==t.song.id),i=P(!1),C=()=>{a.song.favourite=!a.song.favourite,le(a.song.id,a.song.favourite)},$=M(()=>a.playlistId==null?t.playlist.id:a.playlistId),k=()=>{t.loadSong($.value,a.index)},_=P(null),N=()=>{_.value.show()},S=()=>{A("update")};return(v,u)=>{const h=b("router-link");return l(),I(ie,{ref:"ctxMenu",liked:e.song.favourite,playlistId:p($),song:e.song,onEdit:N,onLike:C,onUpdate:S},{default:s(()=>[o(ee,{ref_key:"updatePopup",ref:_,song:e.song,onUpdate:u[0]||(u[0]=w=>v.$emit("update"))},null,8,["song"]),m("div",{class:E([{playing:p(B),selected:e.selected,hovering:i.value,withCover:e.withCover,withAlbum:e.withAlbum,withMore:e.withMore},"playlist-entry"]),onDblclick:k,onMouseenter:u[2]||(u[2]=w=>i.value=!0),onMouseleave:u[3]||(u[3]=w=>i.value=!1)},[m("div",{class:E([{"material-symbols-rounded":i.value},"index text-right"]),onClick:k},y(i.value?"play_arrow":e.index+1),3),e.withCover?(l(),g("div",ue,[o(G,{src:e.song.cover,type:"track"},null,8,["src"])])):x("",!0),m("div",re,[m("span",de,[o(h,{to:`/track/${e.song.id}`,class:"linkOnHover"},{default:s(()=>[o(F,{text:e.song.title},null,8,["text"])]),_:1},8,["to"])]),m("span",ce,[o(h,{to:`/search/artist:${e.song.artist}`,class:"linkOnHover"},{default:s(()=>[o(F,{text:e.song.artist},null,8,["text"])]),_:1},8,["to"])])]),e.withAlbum&&!p(Q)?(l(),g("div",ve,[o(F,{text:e.song.album},null,8,["text"])])):x("",!0),e.selected||i.value||e.song.favourite?(l(),g("div",{key:2,class:E([{favourite:e.song.favourite},"favourite-icon icon text-right material-symbols-rounded"]),onClick:C},y(e.song.favourite?"favorite":"heart_plus"),3)):x("",!0),m("div",fe,y(e.song.duration=="-1:59"?"N/A":e.song.duration),1),x("",!0)],34)]),_:1},8,["liked","playlistId","song"])}}});const we=Z(me,[["__scopeId","data-v-f1278207"]]);export{we as P}; diff --git a/src/ui/dist/assets/PlaylistEntry.75d93026.js.gz b/src/ui/dist/assets/PlaylistEntry.75d93026.js.gz new file mode 100644 index 000000000..052fca5d7 Binary files /dev/null and b/src/ui/dist/assets/PlaylistEntry.75d93026.js.gz differ diff --git a/src/ui/dist/assets/PlaylistItem.41431c3c.js.gz b/src/ui/dist/assets/PlaylistItem.41431c3c.js.gz deleted file mode 100644 index 760cec4c6..000000000 Binary files a/src/ui/dist/assets/PlaylistItem.41431c3c.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/PlaylistItem.41431c3c.js b/src/ui/dist/assets/PlaylistItem.ca2725f3.js similarity index 92% rename from src/ui/dist/assets/PlaylistItem.41431c3c.js rename to src/ui/dist/assets/PlaylistItem.ca2725f3.js index 83d563765..c4fb249eb 100644 --- a/src/ui/dist/assets/PlaylistItem.41431c3c.js +++ b/src/ui/dist/assets/PlaylistItem.ca2725f3.js @@ -1 +1 @@ -import{m as C,j as S,n as c,o as y,f as w,w as b,g as d,u as k,B as T,a as u,_ as A,h as j,p as x,e as h,c as B,d as N,t as D}from"./index.1d09503d.js";import{F as M,T as O,a as V,c as q}from"./song.619409cb.js";import{T as E,P as F}from"./TrackInfo.a2d7128f.js";import{p as H}from"./playerInPicture.37a9ab56.js";const L=u("br",null,null,-1),W=C({__name:"ImportSpotifyPlaylist",props:{playlist:{type:Object,required:!0}},setup(n,{expose:i}){const e=n,p=S(),r=c([{name:"playlist",type:"dropdown",required:!0,value:null,options:p.playlistsAsDropdown}]),o=c(null),l=c(null),s=c([]),m=async()=>{if(o.value.load(),s.value.length==0){const a=await fetch(`/api/spotify/playlists/${e.playlist.id}`);s.value=await a.json()}o.value.show()},P=()=>{H("Spotify Playlist",e.playlist.name,e.playlist.href)},f=async a=>{if(a==="new"){const t=await q(e.playlist.name,e.playlist.description,e.playlist.cover);return r.value[0].options=p.playlistsAsDropdown,r.value[0].value=t,t}return Number(a)},v=async(a,t=null)=>{s.value[a].added||(t!=null||(t=l.value.toObject().playlist),t=await f(t),await V(t!=null?t:l.value.toObject().playlist,s.value[a]),s.value[a].added=!0)},g=async()=>{let a=l.value.toObject().playlist;a=await f(a),s.value.forEach((t,_)=>{v(_,a)})};return i({show:m}),(a,t)=>(y(),w(O,{ref_key:"modal",ref:o,submit:{label:"Add All",icon:"add"},name:"Import Playlist",onClose:t[0]||(t[0]=_=>a.$emit("close")),onSubmit:g},{default:b(()=>[d(E,{cover:n.playlist.cover,icons:[{name:"share",onClick:()=>k(T)(n.playlist.href)},{name:"play_arrow",onClick:P}],title:n.playlist.name},null,8,["cover","icons","title"]),d(M,{ref_key:"form",ref:l,options:r.value},null,8,["options"]),L,d(F,{songs:s.value,onAdd:v},null,8,["songs"])]),_:1},512))}});const $={components:{Cover:j,AddPlaylistToPlaylist:W},name:"PlaylistItem",methods:{parseCover:x,redirect(){this.spotify?this.$refs.import.show():this.$router.push(this.href)}},props:{cover:String,title:String,description:String,href:String,spotify:Boolean,id:String}},z={class:"wrapper drop-shadow-md"},G=["innerHTML"];function J(n,i,e,p,r,o){const l=h("add-playlist-to-playlist"),s=h("Cover");return y(),B("div",z,[e.spotify?(y(),w(l,{key:0,ref:"import",playlist:{cover:e.cover,name:e.title,description:e.description,id:e.id,href:e.href}},null,8,["playlist"])):N("",!0),u("div",{class:"item",onClick:i[0]||(i[0]=(...m)=>o.redirect&&o.redirect(...m))},[d(s,{src:o.parseCover(e.cover),type:"playlist"},null,8,["src"]),u("h4",null,D(e.title),1),u("p",{class:"text-muted text-xs hideIfMobile",innerHTML:e.description},null,8,G)])])}const X=A($,[["render",J],["__scopeId","data-v-86dca7d3"]]);export{X as P}; +import{m as C,j as S,n as c,o as y,f as w,w as b,g as d,u as k,B as T,a as u,_ as A,h as j,p as x,e as h,c as B,d as N,t as D}from"./index.c970909a.js";import{F as M,T as O,a as V,c as q}from"./song.6a60a886.js";import{T as E,P as F}from"./TrackInfo.2ed5fbe0.js";import{p as H}from"./playerInPicture.37a9ab56.js";const L=u("br",null,null,-1),W=C({__name:"ImportSpotifyPlaylist",props:{playlist:{type:Object,required:!0}},setup(n,{expose:i}){const e=n,p=S(),r=c([{name:"playlist",type:"dropdown",required:!0,value:null,options:p.playlistsAsDropdown}]),o=c(null),l=c(null),s=c([]),m=async()=>{if(o.value.load(),s.value.length==0){const a=await fetch(`/api/spotify/playlists/${e.playlist.id}`);s.value=await a.json()}o.value.show()},P=()=>{H("Spotify Playlist",e.playlist.name,e.playlist.href)},f=async a=>{if(a==="new"){const t=await q(e.playlist.name,e.playlist.description,e.playlist.cover);return r.value[0].options=p.playlistsAsDropdown,r.value[0].value=t,t}return Number(a)},v=async(a,t=null)=>{s.value[a].added||(t!=null||(t=l.value.toObject().playlist),t=await f(t),await V(t!=null?t:l.value.toObject().playlist,s.value[a]),s.value[a].added=!0)},g=async()=>{let a=l.value.toObject().playlist;a=await f(a),s.value.forEach((t,_)=>{v(_,a)})};return i({show:m}),(a,t)=>(y(),w(O,{ref_key:"modal",ref:o,submit:{label:"Add All",icon:"add"},name:"Import Playlist",onClose:t[0]||(t[0]=_=>a.$emit("close")),onSubmit:g},{default:b(()=>[d(E,{cover:n.playlist.cover,icons:[{name:"share",onClick:()=>k(T)(n.playlist.href)},{name:"play_arrow",onClick:P}],title:n.playlist.name},null,8,["cover","icons","title"]),d(M,{ref_key:"form",ref:l,options:r.value},null,8,["options"]),L,d(F,{songs:s.value,onAdd:v},null,8,["songs"])]),_:1},512))}});const $={components:{Cover:j,AddPlaylistToPlaylist:W},name:"PlaylistItem",methods:{parseCover:x,redirect(){this.spotify?this.$refs.import.show():this.$router.push(this.href)}},props:{cover:String,title:String,description:String,href:String,spotify:Boolean,id:String}},z={class:"wrapper drop-shadow-md"},G=["innerHTML"];function J(n,i,e,p,r,o){const l=h("add-playlist-to-playlist"),s=h("Cover");return y(),B("div",z,[e.spotify?(y(),w(l,{key:0,ref:"import",playlist:{cover:e.cover,name:e.title,description:e.description,id:e.id,href:e.href}},null,8,["playlist"])):N("",!0),u("div",{class:"item",onClick:i[0]||(i[0]=(...m)=>o.redirect&&o.redirect(...m))},[d(s,{src:o.parseCover(e.cover),type:"playlist"},null,8,["src"]),u("h4",null,D(e.title),1),u("p",{class:"text-muted text-xs hideIfMobile",innerHTML:e.description},null,8,G)])])}const X=A($,[["render",J],["__scopeId","data-v-86dca7d3"]]);export{X as P}; diff --git a/src/ui/dist/assets/PlaylistItem.ca2725f3.js.gz b/src/ui/dist/assets/PlaylistItem.ca2725f3.js.gz new file mode 100644 index 000000000..eba54d6e2 Binary files /dev/null and b/src/ui/dist/assets/PlaylistItem.ca2725f3.js.gz differ diff --git a/src/ui/dist/assets/Playlists.66fd83c1.js.gz b/src/ui/dist/assets/Playlists.66fd83c1.js.gz deleted file mode 100644 index edf4aacc9..000000000 Binary files a/src/ui/dist/assets/Playlists.66fd83c1.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/Playlists.66fd83c1.js b/src/ui/dist/assets/Playlists.90b48e78.js similarity index 88% rename from src/ui/dist/assets/Playlists.66fd83c1.js rename to src/ui/dist/assets/Playlists.90b48e78.js index 95c450258..5a1c0262b 100644 --- a/src/ui/dist/assets/Playlists.66fd83c1.js +++ b/src/ui/dist/assets/Playlists.90b48e78.js @@ -1 +1 @@ -import{F as f}from"./FullShelf.434ba053.js";import{P as u}from"./PlaylistItem.41431c3c.js";import{_ as b,o as s,c,a as n,t as _,d as l,j,E as C,g as F,u as v,f as a,w as P,F as S,i as B}from"./index.1d09503d.js";import{C as w}from"./CollectionHeader.a249f890.js";import"./song.619409cb.js";import"./Dropdown.f68f135c.js";import"./TrackInfo.a2d7128f.js";import"./playerInPicture.37a9ab56.js";const $={name:"ReleaseItemBig",methods:{redirect(){this.$router.push(this.href)}},props:{title:String,description:String,href:String,icon:String}},x={class:"itemBig drop-shadow-md"},N={key:0,class:"icon"},V={class:"material-symbols-rounded"},D={class:"wrapper"};function E(t,d,i,o,I,e){return s(),c("div",x,[n("div",{class:"item h-full flex justify-between",onClick:d[0]||(d[0]=(...r)=>e.redirect&&e.redirect(...r))},[i.icon?(s(),c("div",N,[n("span",V,_(i.icon),1)])):l("",!0),n("div",D,[n("h4",null,_(i.title),1),n("p",null,_(i.description),1)])])])}const h=b($,[["render",E],["__scopeId","data-v-afe96d3f"]]);const L={class:"padding-20"},H={class:"playlists"},O={components:{CollectionHeader:w,PlaylistItem:u,FullShelf:f,PlaylistItemBig:h},data(){return fetch("/api/me/liked").then(t=>t.json()).then(t=>{this.likedTracks=t}),fetch("/api/me/new").then(t=>t.json()).then(t=>{this.breakingTracks=t}),fetch("/api/spotify/playlists").then(t=>t.json()).then(t=>{this.spotifyPlaylists=t}),{likedTracks:null,breakingTracks:null,spotifyPlaylists:[]}}},R=Object.assign(O,{__name:"Playlists",setup(t){const d=j(),i=C(()=>d.playlists);return(o,I)=>(s(),c("div",L,[F(w),n("div",H,[v(i).length?(s(),a(f,{key:0,heading:"Playlists"},{default:P(()=>{var e,r,y,g,k,m;return[(r=(e=o.likedTracks)==null?void 0:e.songs)!=null&&r.length?(s(),a(h,{key:0,title:"Liked Songs",icon:"favorite",description:`${(g=(y=o.likedTracks)==null?void 0:y.songs)==null?void 0:g.length} liked songs`,href:"/collection/tracks"},null,8,["description"])):l("",!0),(m=(k=o.breakingTracks)==null?void 0:k.songs)!=null&&m.length?(s(),a(h,{key:1,title:"Breaking Songs",description:"your 25 newest songs",icon:"trending_up",href:"/collection/tracks/breaking"})):l("",!0),(s(!0),c(S,null,B(v(i),(p,T)=>(s(),a(u,{key:T,href:p.href,cover:p.cover,description:p.description,title:p.name,spotify:!1},null,8,["href","cover","description","title"]))),128))]}),_:1})):l("",!0),o.spotifyPlaylists.length?(s(),a(f,{key:1,heading:"Import From Spotify"},{default:P(()=>[(s(!0),c(S,null,B(o.spotifyPlaylists,(e,r)=>(s(),a(u,{key:r,cover:e.cover,description:e.description,title:e.name,id:e.id,spotify:!0,href:`https://open.spotify.com/playlist/${e.id}`},null,8,["cover","description","title","id","href"]))),128))]),_:1})):l("",!0)])]))}}),U=b(R,[["__scopeId","data-v-e9d2a481"]]);export{U as default}; +import{F as f}from"./FullShelf.13880daa.js";import{P as u}from"./PlaylistItem.ca2725f3.js";import{_ as b,o as s,c,a as n,t as _,d as l,j,E as C,g as F,u as v,f as a,w as P,F as S,i as B}from"./index.c970909a.js";import{C as w}from"./CollectionHeader.14ae124c.js";import"./song.6a60a886.js";import"./Dropdown.7541a2ee.js";import"./TrackInfo.2ed5fbe0.js";import"./playerInPicture.37a9ab56.js";const $={name:"ReleaseItemBig",methods:{redirect(){this.$router.push(this.href)}},props:{title:String,description:String,href:String,icon:String}},x={class:"itemBig drop-shadow-md"},N={key:0,class:"icon"},V={class:"material-symbols-rounded"},D={class:"wrapper"};function E(t,d,i,o,I,e){return s(),c("div",x,[n("div",{class:"item h-full flex justify-between",onClick:d[0]||(d[0]=(...r)=>e.redirect&&e.redirect(...r))},[i.icon?(s(),c("div",N,[n("span",V,_(i.icon),1)])):l("",!0),n("div",D,[n("h4",null,_(i.title),1),n("p",null,_(i.description),1)])])])}const h=b($,[["render",E],["__scopeId","data-v-afe96d3f"]]);const L={class:"padding-20"},H={class:"playlists"},O={components:{CollectionHeader:w,PlaylistItem:u,FullShelf:f,PlaylistItemBig:h},data(){return fetch("/api/me/liked").then(t=>t.json()).then(t=>{this.likedTracks=t}),fetch("/api/me/new").then(t=>t.json()).then(t=>{this.breakingTracks=t}),fetch("/api/spotify/playlists").then(t=>t.json()).then(t=>{this.spotifyPlaylists=t}),{likedTracks:null,breakingTracks:null,spotifyPlaylists:[]}}},R=Object.assign(O,{__name:"Playlists",setup(t){const d=j(),i=C(()=>d.playlists);return(o,I)=>(s(),c("div",L,[F(w),n("div",H,[v(i).length?(s(),a(f,{key:0,heading:"Playlists"},{default:P(()=>{var e,r,y,g,k,m;return[(r=(e=o.likedTracks)==null?void 0:e.songs)!=null&&r.length?(s(),a(h,{key:0,title:"Liked Songs",icon:"favorite",description:`${(g=(y=o.likedTracks)==null?void 0:y.songs)==null?void 0:g.length} liked songs`,href:"/collection/tracks"},null,8,["description"])):l("",!0),(m=(k=o.breakingTracks)==null?void 0:k.songs)!=null&&m.length?(s(),a(h,{key:1,title:"Breaking Songs",description:"your 25 newest songs",icon:"trending_up",href:"/collection/tracks/breaking"})):l("",!0),(s(!0),c(S,null,B(v(i),(p,T)=>(s(),a(u,{key:T,href:p.href,cover:p.cover,description:p.description,title:p.name,spotify:!1},null,8,["href","cover","description","title"]))),128))]}),_:1})):l("",!0),o.spotifyPlaylists.length?(s(),a(f,{key:1,heading:"Import From Spotify"},{default:P(()=>[(s(!0),c(S,null,B(o.spotifyPlaylists,(e,r)=>(s(),a(u,{key:r,cover:e.cover,description:e.description,title:e.name,id:e.id,spotify:!0,href:`https://open.spotify.com/playlist/${e.id}`},null,8,["cover","description","title","id","href"]))),128))]),_:1})):l("",!0)])]))}}),U=b(R,[["__scopeId","data-v-e9d2a481"]]);export{U as default}; diff --git a/src/ui/dist/assets/Playlists.90b48e78.js.gz b/src/ui/dist/assets/Playlists.90b48e78.js.gz new file mode 100644 index 000000000..01369e7c1 Binary files /dev/null and b/src/ui/dist/assets/Playlists.90b48e78.js.gz differ diff --git a/src/ui/dist/assets/ReleaseItem.eba9b352.js b/src/ui/dist/assets/ReleaseItem.0fc4048a.js similarity index 89% rename from src/ui/dist/assets/ReleaseItem.eba9b352.js rename to src/ui/dist/assets/ReleaseItem.0fc4048a.js index f73c585ea..e46a6072d 100644 --- a/src/ui/dist/assets/ReleaseItem.eba9b352.js +++ b/src/ui/dist/assets/ReleaseItem.0fc4048a.js @@ -1 +1 @@ -import{_}from"./ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.c66e56c3.js";import{_ as m,e as h,o,c,g as f,a as t,t as s,d as u}from"./index.1d09503d.js";const p={name:"ReleaseItem",components:{AddAlbumToPlaylist:_},methods:{redirect(){this.$refs.addAlbum.show()}},props:{cover:String,title:String,artist:String,href:String,releaseDate:String}},v={class:"wrapper drop-shadow-md"},b=["src"],g={key:0,class:"note"};function y(D,a,e,S,I,r){var i,l;const n=h("add-album-to-playlist");return o(),c("div",v,[f(n,{id:(i=this.href)==null?void 0:i.replace("https://open.spotify.com/album/",""),cover:e.cover,title:e.title,artist:e.artist,href:e.href,ref:"addAlbum",album:{id:(l=this.href)==null?void 0:l.replace("https://open.spotify.com/album/",""),title:this.title,artist:this.artist,cover:this.cover,href:this.href,releaseDate:this.releaseDate}},null,8,["id","cover","title","artist","href","album"]),t("div",{class:"item",onClick:a[0]||(a[0]=(...d)=>r.redirect&&r.redirect(...d))},[t("img",{src:e.cover},null,8,b),t("h4",null,s(e.title),1),t("p",null,s(e.artist),1),e.releaseDate?(o(),c("p",g,"Released on "+s(e.releaseDate),1)):u("",!0)])])}const A=m(p,[["render",y],["__scopeId","data-v-3fedeeec"]]);export{A as I}; +import{_}from"./ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.ec33d761.js";import{_ as m,e as h,o,c,g as f,a as t,t as s,d as u}from"./index.c970909a.js";const p={name:"ReleaseItem",components:{AddAlbumToPlaylist:_},methods:{redirect(){this.$refs.addAlbum.show()}},props:{cover:String,title:String,artist:String,href:String,releaseDate:String}},v={class:"wrapper drop-shadow-md"},b=["src"],g={key:0,class:"note"};function y(D,a,e,S,I,r){var i,l;const n=h("add-album-to-playlist");return o(),c("div",v,[f(n,{id:(i=this.href)==null?void 0:i.replace("https://open.spotify.com/album/",""),cover:e.cover,title:e.title,artist:e.artist,href:e.href,ref:"addAlbum",album:{id:(l=this.href)==null?void 0:l.replace("https://open.spotify.com/album/",""),title:this.title,artist:this.artist,cover:this.cover,href:this.href,releaseDate:this.releaseDate}},null,8,["id","cover","title","artist","href","album"]),t("div",{class:"item",onClick:a[0]||(a[0]=(...d)=>r.redirect&&r.redirect(...d))},[t("img",{src:e.cover},null,8,b),t("h4",null,s(e.title),1),t("p",null,s(e.artist),1),e.releaseDate?(o(),c("p",g,"Released on "+s(e.releaseDate),1)):u("",!0)])])}const A=m(p,[["render",y],["__scopeId","data-v-3fedeeec"]]);export{A as I}; diff --git a/src/ui/dist/assets/ReleaseItem.eba9b352.js.gz b/src/ui/dist/assets/ReleaseItem.0fc4048a.js.gz similarity index 58% rename from src/ui/dist/assets/ReleaseItem.eba9b352.js.gz rename to src/ui/dist/assets/ReleaseItem.0fc4048a.js.gz index f529c72f2..6c0d22f83 100644 Binary files a/src/ui/dist/assets/ReleaseItem.eba9b352.js.gz and b/src/ui/dist/assets/ReleaseItem.0fc4048a.js.gz differ diff --git a/src/ui/dist/assets/Releases.52d1060c.js.gz b/src/ui/dist/assets/Releases.52d1060c.js.gz deleted file mode 100644 index 402529733..000000000 Binary files a/src/ui/dist/assets/Releases.52d1060c.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/Releases.52d1060c.js b/src/ui/dist/assets/Releases.f174936b.js similarity index 87% rename from src/ui/dist/assets/Releases.52d1060c.js rename to src/ui/dist/assets/Releases.f174936b.js index 762766ba1..7ace5d1bd 100644 --- a/src/ui/dist/assets/Releases.52d1060c.js +++ b/src/ui/dist/assets/Releases.f174936b.js @@ -1 +1 @@ -import{F as k}from"./FullShelf.434ba053.js";import{I}from"./ReleaseItem.eba9b352.js";import{_ as B}from"./ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.c66e56c3.js";import{_ as b,e as n,o as s,c as u,g as w,a as c,t as g,d as h,f as i,w as v,F as y,i as D}from"./index.1d09503d.js";import{C as A}from"./CollectionHeader.a249f890.js";import"./song.619409cb.js";import"./Dropdown.f68f135c.js";import"./TrackInfo.a2d7128f.js";const C={components:{AddAlbumToPlaylist:B},name:"ReleaseItemBig",methods:{redirect(){this.$refs.addAlbum.show()}},props:{cover:String,title:String,artist:String,href:String,releaseDate:String}},N={class:"itemBig drop-shadow-md"},x=["src"],R={class:"wrapper"},F={key:0,class:"note"};function j(_,o,t,a,r,f){var d,l;const m=n("add-album-to-playlist");return s(),u("div",N,[w(m,{id:(d=this.href)==null?void 0:d.replace("https://open.spotify.com/album/",""),cover:t.cover,title:t.title,artist:t.artist,href:t.href,ref:"addAlbum",album:{id:(l=this.href)==null?void 0:l.replace("https://open.spotify.com/album/",""),title:this.title,artist:this.artist,cover:this.cover,href:this.href,releaseDate:this.releaseDate}},null,8,["id","cover","title","artist","href","album"]),c("div",{class:"item",onClick:o[0]||(o[0]=(...p)=>f.redirect&&f.redirect(...p))},[c("img",{src:t.cover},null,8,x),c("div",R,[c("h4",null,g(t.title),1),c("p",null,g(t.artist),1),t.releaseDate?(s(),u("p",F,"Released on "+g(t.releaseDate),1)):h("",!0)])])])}const H=b(C,[["render",j],["__scopeId","data-v-405b8b34"]]);const V={components:{CollectionHeader:A,FullShelf:k,Item:I,ItemBig:H},name:"Releases",data(){return{outSoon:[],outNow:[],outAlready:[]}},mounted(){fetch("/api/releases").then(_=>_.json()).then(_=>{const o=new Date;for(const t of _){const a=new Date(t.releaseDate);o[(s(!0),u(y,null,D(r.outSoon,e=>(s(),i(d,{key:e.url,releaseDate:e.releaseDate,cover:e.cover,href:e.url,artist:e.artists.join(", "),title:e.title},null,8,["releaseDate","cover","href","artist","title"]))),128))]),_:1})):h("",!0),r.outNow.length?(s(),i(l,{key:1,heading:"Out Now"},{default:v(()=>[(s(!0),u(y,null,D(r.outNow,e=>(s(),i(p,{key:e.url,releaseDate:e.releaseDate,cover:e.cover,href:e.url,artist:e.artists.join(", "),title:e.title},null,8,["releaseDate","cover","href","artist","title"]))),128))]),_:1})):h("",!0),r.outAlready.length?(s(),i(l,{key:2,heading:"Releases"},{default:v(()=>[(s(!0),u(y,null,D(r.outAlready,e=>(s(),i(S,{key:e.url,releaseDate:e.releaseDate,cover:e.cover,href:e.url,artist:e.artists.join(", "),title:e.title},null,8,["releaseDate","cover","href","artist","title"]))),128))]),_:1})):h("",!0)])])}const K=b(V,[["render",Y],["__scopeId","data-v-aaa9aa10"]]);export{K as default}; +import{F as k}from"./FullShelf.13880daa.js";import{I}from"./ReleaseItem.0fc4048a.js";import{_ as B}from"./ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.ec33d761.js";import{_ as b,e as n,o as s,c as u,g as w,a as c,t as g,d as h,f as i,w as v,F as y,i as D}from"./index.c970909a.js";import{C as A}from"./CollectionHeader.14ae124c.js";import"./song.6a60a886.js";import"./Dropdown.7541a2ee.js";import"./TrackInfo.2ed5fbe0.js";const C={components:{AddAlbumToPlaylist:B},name:"ReleaseItemBig",methods:{redirect(){this.$refs.addAlbum.show()}},props:{cover:String,title:String,artist:String,href:String,releaseDate:String}},N={class:"itemBig drop-shadow-md"},x=["src"],R={class:"wrapper"},F={key:0,class:"note"};function j(_,o,t,a,r,f){var d,l;const m=n("add-album-to-playlist");return s(),u("div",N,[w(m,{id:(d=this.href)==null?void 0:d.replace("https://open.spotify.com/album/",""),cover:t.cover,title:t.title,artist:t.artist,href:t.href,ref:"addAlbum",album:{id:(l=this.href)==null?void 0:l.replace("https://open.spotify.com/album/",""),title:this.title,artist:this.artist,cover:this.cover,href:this.href,releaseDate:this.releaseDate}},null,8,["id","cover","title","artist","href","album"]),c("div",{class:"item",onClick:o[0]||(o[0]=(...p)=>f.redirect&&f.redirect(...p))},[c("img",{src:t.cover},null,8,x),c("div",R,[c("h4",null,g(t.title),1),c("p",null,g(t.artist),1),t.releaseDate?(s(),u("p",F,"Released on "+g(t.releaseDate),1)):h("",!0)])])])}const H=b(C,[["render",j],["__scopeId","data-v-405b8b34"]]);const V={components:{CollectionHeader:A,FullShelf:k,Item:I,ItemBig:H},name:"Releases",data(){return{outSoon:[],outNow:[],outAlready:[]}},mounted(){fetch("/api/releases").then(_=>_.json()).then(_=>{const o=new Date;for(const t of _){const a=new Date(t.releaseDate);o[(s(!0),u(y,null,D(r.outSoon,e=>(s(),i(d,{key:e.url,releaseDate:e.releaseDate,cover:e.cover,href:e.url,artist:e.artists.join(", "),title:e.title},null,8,["releaseDate","cover","href","artist","title"]))),128))]),_:1})):h("",!0),r.outNow.length?(s(),i(l,{key:1,heading:"Out Now"},{default:v(()=>[(s(!0),u(y,null,D(r.outNow,e=>(s(),i(p,{key:e.url,releaseDate:e.releaseDate,cover:e.cover,href:e.url,artist:e.artists.join(", "),title:e.title},null,8,["releaseDate","cover","href","artist","title"]))),128))]),_:1})):h("",!0),r.outAlready.length?(s(),i(l,{key:2,heading:"Releases"},{default:v(()=>[(s(!0),u(y,null,D(r.outAlready,e=>(s(),i(S,{key:e.url,releaseDate:e.releaseDate,cover:e.cover,href:e.url,artist:e.artists.join(", "),title:e.title},null,8,["releaseDate","cover","href","artist","title"]))),128))]),_:1})):h("",!0)])])}const K=b(V,[["render",Y],["__scopeId","data-v-aaa9aa10"]]);export{K as default}; diff --git a/src/ui/dist/assets/Releases.f174936b.js.gz b/src/ui/dist/assets/Releases.f174936b.js.gz new file mode 100644 index 000000000..95ec65b7a Binary files /dev/null and b/src/ui/dist/assets/Releases.f174936b.js.gz differ diff --git a/src/ui/dist/assets/Search.b4e619e4.js b/src/ui/dist/assets/Search.a1316368.js similarity index 90% rename from src/ui/dist/assets/Search.b4e619e4.js rename to src/ui/dist/assets/Search.a1316368.js index 579cb81e0..722f07609 100644 --- a/src/ui/dist/assets/Search.b4e619e4.js +++ b/src/ui/dist/assets/Search.a1316368.js @@ -1 +1 @@ -import{A as C}from"./ArtistItem.ae25c587.js";import{I as x}from"./ReleaseItem.eba9b352.js";import{_ as q}from"./ImportSpotifySong.vue_vue_type_script_setup_true_lang.66b612a0.js";import{_ as k,h as I,e as l,o as e,c as o,g as m,a as u,t as p,d,r as B,L,F as f,f as n,w as v,i as g}from"./index.1d09503d.js";import"./song.619409cb.js";import"./Dropdown.f68f135c.js";import"./TrackInfo.a2d7128f.js";import"./ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.c66e56c3.js";const D={components:{Cover:I,AddSongToPlaylist:q},name:"SearchItem",methods:{redirect(){this.$refs.addAlbum.show()}},props:{cover:String,title:String,artist:String,releaseDate:String,href:String,preview:String}},N={class:"wrapper drop-shadow-md"},$={key:0,class:"note"};function F(s,c,r,S,i,a){const h=l("add-song-to-playlist"),y=l("Cover");return e(),o("div",N,[m(h,{song:{cover:r.cover,artist:r.artist,title:r.title,preview:r.preview,href:r.href},ref:"addAlbum"},null,8,["song"]),u("div",{class:"item",onClick:c[0]||(c[0]=(..._)=>a.redirect&&a.redirect(..._))},[m(y,{src:r.cover},null,8,["src"]),u("h4",null,p(r.title),1),u("p",null,p(r.artist),1),r.releaseDate?(e(),o("p",$,"Released on "+p(r.releaseDate),1)):d("",!0)])])}const P=k(D,[["render",F],["__scopeId","data-v-60cf114a"]]);const V={name:"Shelf",props:{heading:String,href:String},methods:{redirect(){!this.href||this.$router.push(this.href)}}},E={class:"shelf"},O={key:0,class:"header"},j={class:"items"};function J(s,c,r,S,i,a){return e(),o("div",E,[r.heading?(e(),o("div",O,[u("h2",null,p(r.heading),1),u("h5",{onClick:c[0]||(c[0]=(...h)=>a.redirect&&a.redirect(...h))},"See All")])):d("",!0),u("div",j,[B(s.$slots,"default",{},void 0,!0)])])}const R=k(V,[["render",J],["__scopeId","data-v-a88c43f2"]]);const Y={name:"TrackItem",components:{Cover:I},methods:{redirect(){console.log("redirect"),this.$router.push(this.href)}},props:{cover:String,title:String,artist:String,href:String}},z={class:"wrapper drop-shadow-md"};function G(s,c,r,S,i,a){const h=l("Cover");return e(),o("div",z,[u("div",{class:"item",onClick:c[0]||(c[0]=(...y)=>a.redirect&&a.redirect(...y))},[m(h,{src:r.cover},null,8,["src"]),u("h4",null,p(r.title),1),u("p",null,p(r.artist),1)])])}const H=k(Y,[["render",G],["__scopeId","data-v-44fdc623"]]);const K={name:"Search",components:{Shelf:R,Item:x,SearchItem:P,ArtistItem:C,TrackItem:H,Loader:L},data(){return{query:"",spotifyTracks:[],spotifyArtists:[],tracks:[],artists:[],youtubeTracks:[],loading:!1}},methods:{search(){this.query=this.$route.params.query,this.query&&(this.loading=!0,fetch("/api/search",{method:"POST",body:JSON.stringify({query:this.query})}).then(s=>s.json()).then(s=>{this.spotifyTracks.length=0,this.spotifyArtists.length=0,this.tracks.length=0,this.artists.length=0,this.youtubeTracks.length=0,this.spotifyTracks.push(...s.spotifyTracks||[]),this.spotifyArtists.push(...s.spotifyArtists||[]),this.tracks.push(...s.tracks||[]),this.artists.push(...s.artists||[]),this.youtubeTracks.push(...s.youtubeTracks||[]),this.loading=!1}))},enterText(s){s.key==="Enter"&&this.$router.push("/search/"+this.query)}},watch:{$route(){this.search()}},mounted(){this.search()}},M={class:"search"},Q={key:0,class:"fillPage"};function U(s,c,r,S,i,a){const h=l("Loader"),y=l("TrackItem"),_=l("Shelf"),T=l("search-item"),w=l("Item"),A=l("artist-item");return e(),o("div",M,[i.loading?(e(),o("div",Q,[m(h)])):(e(),o(f,{key:1},[i.tracks.length?(e(),n(_,{key:0,heading:"Songs"},{default:v(()=>[(e(!0),o(f,null,g(i.tracks,t=>(e(),n(y,{key:t.url,cover:t.cover,href:t.url,artist:t.artists.join(", "),title:t.title},null,8,["cover","href","artist","title"]))),128))]),_:1})):d("",!0),i.spotifyTracks.length?(e(),n(_,{key:1,heading:"Songs (Spotify)"},{default:v(()=>[(e(!0),o(f,null,g(i.spotifyTracks,t=>(e(),n(T,{key:t.url,preview:t.preview,cover:t.cover,href:t.url,artist:t.artists.join(", "),title:t.title},null,8,["preview","cover","href","artist","title"]))),128))]),_:1})):d("",!0),i.youtubeTracks.length?(e(),n(_,{key:2,heading:"Songs (Youtube)"},{default:v(()=>[(e(!0),o(f,null,g(i.youtubeTracks,t=>(e(),n(T,{key:t.url,cover:t.cover,href:t.url,artist:t.artists.join(", "),title:t.title},null,8,["cover","href","artist","title"]))),128))]),_:1})):d("",!0),i.artists.length?(e(),n(_,{key:3,heading:"Artists"},{default:v(()=>[(e(!0),o(f,null,g(i.artists,t=>(e(),n(w,{key:t.url,cover:t.cover,href:t.url,artist:t.artists.join(", "),title:t.title},null,8,["cover","href","artist","title"]))),128))]),_:1})):d("",!0),i.spotifyArtists.length?(e(),n(_,{key:4,heading:"Artists (Spotify)"},{default:v(()=>[(e(!0),o(f,null,g(i.spotifyArtists,(t,b)=>(e(),n(A,{key:b,cover:t.cover,description:t.description,name:t.name,id:t.id,showFollowButton:!0},null,8,["cover","description","name","id"]))),128))]),_:1})):d("",!0)],64))])}const ot=k(K,[["render",U],["__scopeId","data-v-0542abc0"]]);export{ot as default}; +import{A as C}from"./ArtistItem.79a83f4c.js";import{I as x}from"./ReleaseItem.0fc4048a.js";import{_ as q}from"./ImportSpotifySong.vue_vue_type_script_setup_true_lang.c34c7594.js";import{_ as k,h as I,e as l,o as e,c as o,g as m,a as u,t as p,d,r as B,L,F as f,f as n,w as v,i as g}from"./index.c970909a.js";import"./song.6a60a886.js";import"./Dropdown.7541a2ee.js";import"./TrackInfo.2ed5fbe0.js";import"./ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.ec33d761.js";const D={components:{Cover:I,AddSongToPlaylist:q},name:"SearchItem",methods:{redirect(){this.$refs.addAlbum.show()}},props:{cover:String,title:String,artist:String,releaseDate:String,href:String,preview:String}},N={class:"wrapper drop-shadow-md"},$={key:0,class:"note"};function F(s,c,r,S,i,a){const h=l("add-song-to-playlist"),y=l("Cover");return e(),o("div",N,[m(h,{song:{cover:r.cover,artist:r.artist,title:r.title,preview:r.preview,href:r.href},ref:"addAlbum"},null,8,["song"]),u("div",{class:"item",onClick:c[0]||(c[0]=(..._)=>a.redirect&&a.redirect(..._))},[m(y,{src:r.cover},null,8,["src"]),u("h4",null,p(r.title),1),u("p",null,p(r.artist),1),r.releaseDate?(e(),o("p",$,"Released on "+p(r.releaseDate),1)):d("",!0)])])}const P=k(D,[["render",F],["__scopeId","data-v-60cf114a"]]);const V={name:"Shelf",props:{heading:String,href:String},methods:{redirect(){!this.href||this.$router.push(this.href)}}},E={class:"shelf"},O={key:0,class:"header"},j={class:"items"};function J(s,c,r,S,i,a){return e(),o("div",E,[r.heading?(e(),o("div",O,[u("h2",null,p(r.heading),1),u("h5",{onClick:c[0]||(c[0]=(...h)=>a.redirect&&a.redirect(...h))},"See All")])):d("",!0),u("div",j,[B(s.$slots,"default",{},void 0,!0)])])}const R=k(V,[["render",J],["__scopeId","data-v-a88c43f2"]]);const Y={name:"TrackItem",components:{Cover:I},methods:{redirect(){console.log("redirect"),this.$router.push(this.href)}},props:{cover:String,title:String,artist:String,href:String}},z={class:"wrapper drop-shadow-md"};function G(s,c,r,S,i,a){const h=l("Cover");return e(),o("div",z,[u("div",{class:"item",onClick:c[0]||(c[0]=(...y)=>a.redirect&&a.redirect(...y))},[m(h,{src:r.cover},null,8,["src"]),u("h4",null,p(r.title),1),u("p",null,p(r.artist),1)])])}const H=k(Y,[["render",G],["__scopeId","data-v-44fdc623"]]);const K={name:"Search",components:{Shelf:R,Item:x,SearchItem:P,ArtistItem:C,TrackItem:H,Loader:L},data(){return{query:"",spotifyTracks:[],spotifyArtists:[],tracks:[],artists:[],youtubeTracks:[],loading:!1}},methods:{search(){this.query=this.$route.params.query,this.query&&(this.loading=!0,fetch("/api/search",{method:"POST",body:JSON.stringify({query:this.query})}).then(s=>s.json()).then(s=>{this.spotifyTracks.length=0,this.spotifyArtists.length=0,this.tracks.length=0,this.artists.length=0,this.youtubeTracks.length=0,this.spotifyTracks.push(...s.spotifyTracks||[]),this.spotifyArtists.push(...s.spotifyArtists||[]),this.tracks.push(...s.tracks||[]),this.artists.push(...s.artists||[]),this.youtubeTracks.push(...s.youtubeTracks||[]),this.loading=!1}))},enterText(s){s.key==="Enter"&&this.$router.push("/search/"+this.query)}},watch:{$route(){this.search()}},mounted(){this.search()}},M={class:"search"},Q={key:0,class:"fillPage"};function U(s,c,r,S,i,a){const h=l("Loader"),y=l("TrackItem"),_=l("Shelf"),T=l("search-item"),w=l("Item"),A=l("artist-item");return e(),o("div",M,[i.loading?(e(),o("div",Q,[m(h)])):(e(),o(f,{key:1},[i.tracks.length?(e(),n(_,{key:0,heading:"Songs"},{default:v(()=>[(e(!0),o(f,null,g(i.tracks,t=>(e(),n(y,{key:t.url,cover:t.cover,href:t.url,artist:t.artists.join(", "),title:t.title},null,8,["cover","href","artist","title"]))),128))]),_:1})):d("",!0),i.spotifyTracks.length?(e(),n(_,{key:1,heading:"Songs (Spotify)"},{default:v(()=>[(e(!0),o(f,null,g(i.spotifyTracks,t=>(e(),n(T,{key:t.url,preview:t.preview,cover:t.cover,href:t.url,artist:t.artists.join(", "),title:t.title},null,8,["preview","cover","href","artist","title"]))),128))]),_:1})):d("",!0),i.youtubeTracks.length?(e(),n(_,{key:2,heading:"Songs (Youtube)"},{default:v(()=>[(e(!0),o(f,null,g(i.youtubeTracks,t=>(e(),n(T,{key:t.url,cover:t.cover,href:t.url,artist:t.artists.join(", "),title:t.title},null,8,["cover","href","artist","title"]))),128))]),_:1})):d("",!0),i.artists.length?(e(),n(_,{key:3,heading:"Artists"},{default:v(()=>[(e(!0),o(f,null,g(i.artists,t=>(e(),n(w,{key:t.url,cover:t.cover,href:t.url,artist:t.artists.join(", "),title:t.title},null,8,["cover","href","artist","title"]))),128))]),_:1})):d("",!0),i.spotifyArtists.length?(e(),n(_,{key:4,heading:"Artists (Spotify)"},{default:v(()=>[(e(!0),o(f,null,g(i.spotifyArtists,(t,b)=>(e(),n(A,{key:b,cover:t.cover,description:t.description,name:t.name,id:t.id,showFollowButton:!0},null,8,["cover","description","name","id"]))),128))]),_:1})):d("",!0)],64))])}const ot=k(K,[["render",U],["__scopeId","data-v-0542abc0"]]);export{ot as default}; diff --git a/src/ui/dist/assets/Search.a1316368.js.gz b/src/ui/dist/assets/Search.a1316368.js.gz new file mode 100644 index 000000000..a3abc536b Binary files /dev/null and b/src/ui/dist/assets/Search.a1316368.js.gz differ diff --git a/src/ui/dist/assets/Search.b4e619e4.js.gz b/src/ui/dist/assets/Search.b4e619e4.js.gz deleted file mode 100644 index 989d685e8..000000000 Binary files a/src/ui/dist/assets/Search.b4e619e4.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/Sports.4c158524.js.gz b/src/ui/dist/assets/Sports.4c158524.js.gz deleted file mode 100644 index db91d8239..000000000 Binary files a/src/ui/dist/assets/Sports.4c158524.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/Sports.4c158524.js b/src/ui/dist/assets/Sports.b552157b.js similarity index 97% rename from src/ui/dist/assets/Sports.4c158524.js rename to src/ui/dist/assets/Sports.b552157b.js index 407e5d17e..b2c51422b 100644 --- a/src/ui/dist/assets/Sports.4c158524.js +++ b/src/ui/dist/assets/Sports.b552157b.js @@ -1 +1 @@ -import{F as D}from"./FullShelf.434ba053.js";import{_ as k,o as i,c as m,a as o,t as _,C as A,T as C,g as F,F as v,i as w,f as S,w as x,d as N,e as y,k as V,l as B}from"./index.1d09503d.js";const O={name:"FootballItem",methods:{redirect(){window.open(this.oref)},remove(e){e.stopPropagation(),this.$emit("remove")}},props:{result:String,date:String,competition:String,href:String,oref:String,team1:String,team2:String,progress:String}},b={class:"itemBig"},j={class:"wrapper topalign"},H={class:"wrapper"},L=["innerHTML"],J=["innerHTML"],P=["innerHTML"],U={class:"wrapper bottomalign"},W={class:"small"};function $(e,s,t,c,n,r){var h;return i(),m("div",b,[o("div",{class:"item",onClick:s[1]||(s[1]=(...p)=>r.redirect&&r.redirect(...p))},[o("div",j,[o("p",null,_(t.competition),1),o("p",{class:A([{accent:(h=t.progress)==null?void 0:h.includes("'")},"right progress"])},_(t.progress),3)]),o("div",H,[o("p",{class:"team",innerHTML:t.team1},null,8,L),o("h4",{class:"result",innerHTML:t.result},null,8,J),o("p",{class:"team",innerHTML:t.team2},null,8,P)]),o("div",U,[o("p",W,_(t.date)+", "+_(t.href),1),o("span",{class:"deleteIcon small material-icons-round",onClick:s[0]||(s[0]=(...p)=>r.remove&&r.remove(...p))},"clear")])])])}const K=k(O,[["render",$],["__scopeId","data-v-64418ae1"]]);const R={components:{TextInputWithIcon:C,FullShelf:D,FootballItem:K},name:"Sports",data(){return{sports:[],watchMatches:[],sourceToAdd:"",supportedSources:["https://onefootball.com/en/team/","https://onefootball.com/en/match/","https://onefootball.com/en/competition/","https://www.cev.eu/match-centres/","https://championsleague.cev.eu/en/match-centres/","https://www.cev.eu/calendar/","https://cev-nex.tk/#/match/","https://cevnex.tk/#/match/"]}},mounted(){this.watchMatches=JSON.parse(window.localStorage.getItem("sports.watchMatches"))||[],this.updateMatches()},computed:{volleyMatches(){return this.watchMatches.filter(e=>e.includes("cev")).map(e=>{let s=e;return e.includes("nex.tk")&&(s=e.split("/match/")[1]),{src:s,ref:e}})},notVolleyMatches(){return this.watchMatches.filter(e=>!e.includes("cev"))}},methods:{removeSource(e,s,t){this.watchMatches.splice(this.watchMatches.indexOf(e),1),this.sports[s].items.splice(t,1),window.localStorage.setItem("sports.watchMatches",JSON.stringify(this.watchMatches))},removeSourceD(e){this.watchMatches.splice(this.watchMatches.indexOf(e),1),window.localStorage.setItem("sports.watchMatches",JSON.stringify(this.watchMatches))},tryAddSource(){for(const e of this.supportedSources)if(this.sourceToAdd.startsWith(e)){this.addSource();return}alert("unsupported source")},addSource(){this.watchMatches.push(this.sourceToAdd),window.localStorage.setItem("sports.watchMatches",JSON.stringify(this.watchMatches)),this.sourceToAdd=""},updateMatches(){if(!(this.$route.path=="/sports"||this.$route.path=="/sports/")){console.log("not update",this.$route.path);return}fetch("/api/sports",{method:"POST",body:JSON.stringify({urls:this.notVolleyMatches})}).then(e=>e.json()).then(e=>{this.sports=[];for(const s of e){const t=this.sports.findIndex(c=>c.sport==s.sport);t>=0?this.sports[t].items.push(s):this.sports.push({sport:s.sport,icon:s.sportIcon,items:[s]})}for(const s of this.sports)s.items.sort((t,c)=>{if(t.progress=t.progress.replace("Half time","45'"),c.progress=c.progress.replace("Half time","45'"),(t.progress.includes("Pens")||t.progress.includes("N/A"))&&(t.progress="Full time"),(c.progress.includes("Pens")||c.progress.includes("N/A"))&&(c.progress="Full time"),t.progress.includes("'")&&!c.progress.includes("'"))return-1;if(!t.progress.includes("'")&&c.progress.includes("'"))return 1;if(t.progress.includes("'")&&c.progress.includes("'")){const f=Number(t.progress.replace("'","").replace("+","")),I=Number(c.progress.replace("'","").replace("+",""));return ff.toISOString().split("T")[0];n=n.replace("Today",a(d)).split("/").reverse().join("-"),n=n.replace("Tomorrow",a(l)).split("/").reverse().join("-"),n=n.replace("Yesterday",a(u)).split("/").reverse().join("-"),r=r.replace("Today",a(d)).split("/").reverse().join("-"),r=r.replace("Tomorrow",a(l)).split("/").reverse().join("-"),r=r.replace("Yesterday",a(u)).split("/").reverse().join("-");let g=new Date(`${n}T${h}`.replace(" ","")),M=new Date(`${r}T${p}`.replace(" ",""));return g>M?-1:g==M?0:1})}),setTimeout(this.updateMatches,1e3*45)}}},T=e=>(V("data-v-cae3e92d"),e=e(),B(),e),Y={class:"news"},z=T(()=>o("div",{class:"padding-20"},[o("h1",null,"Sports")],-1)),E=T(()=>o("hr",null,null,-1)),q={class:"padding-20"},G={class:"small"},Q={class:"addWrapper"},X=T(()=>o("hr",null,null,-1)),Z=["src"],ee=["onClick"];function te(e,s,t,c,n,r){const h=y("TextInputWithIcon"),p=y("football-item"),d=y("full-shelf");return i(),m("div",Y,[z,E,o("div",q,[o("p",G,"Supported urls: "+_(n.supportedSources.join("*, ")),1),o("div",Q,[F(h,{modelValue:n.sourceToAdd,"onUpdate:modelValue":s[0]||(s[0]=l=>n.sourceToAdd=l),icon:"link",onKeyup:e.enterText},null,8,["modelValue","onKeyup"]),o("span",{id:"addToPlaylist",class:"material-icons-outlined",onClick:s[1]||(s[1]=(...l)=>r.tryAddSource&&r.tryAddSource(...l))},"add_circle")]),X,(i(!0),m(v,null,w(n.sports,(l,u)=>(i(),S(d,{key:l.sport,heading:l.sport,icon:l.icon},{default:x(()=>[(i(!0),m(v,null,w(l.items,(a,g)=>(i(),S(p,{key:a.href,competition:a.competition,date:a.date,href:a.href,oref:a.oref,progress:a.progress,result:a.result,team1:a.team1,team2:a.team2,onRemove:()=>r.removeSource(a.sref,u,g)},null,8,["competition","date","href","oref","progress","result","team1","team2","onRemove"]))),128))]),_:2},1032,["heading","icon"]))),128)),r.volleyMatches.length?(i(),S(d,{key:0,heading:"Volleyball",icon:"sports_volleyball"},{default:x(()=>[(i(!0),m(v,null,w(r.volleyMatches,(l,u)=>(i(),m("div",{key:u,class:"wrapIframe"},[o("iframe",{src:`https://cev-nex.tk/#/embed?match=${l.src}`},null,8,Z),o("span",{class:"deleteIcon small material-symbols-rounded",onClick:()=>r.removeSourceD(l.ref)},"clear",8,ee)]))),128))]),_:1})):N("",!0)])])}const re=k(R,[["render",te],["__scopeId","data-v-cae3e92d"]]);export{re as default}; +import{F as D}from"./FullShelf.13880daa.js";import{_ as k,o as i,c as m,a as o,t as _,C as A,T as C,g as F,F as v,i as w,f as S,w as x,d as N,e as y,k as V,l as B}from"./index.c970909a.js";const O={name:"FootballItem",methods:{redirect(){window.open(this.oref)},remove(e){e.stopPropagation(),this.$emit("remove")}},props:{result:String,date:String,competition:String,href:String,oref:String,team1:String,team2:String,progress:String}},b={class:"itemBig"},j={class:"wrapper topalign"},H={class:"wrapper"},L=["innerHTML"],J=["innerHTML"],P=["innerHTML"],U={class:"wrapper bottomalign"},W={class:"small"};function $(e,s,t,c,n,r){var h;return i(),m("div",b,[o("div",{class:"item",onClick:s[1]||(s[1]=(...p)=>r.redirect&&r.redirect(...p))},[o("div",j,[o("p",null,_(t.competition),1),o("p",{class:A([{accent:(h=t.progress)==null?void 0:h.includes("'")},"right progress"])},_(t.progress),3)]),o("div",H,[o("p",{class:"team",innerHTML:t.team1},null,8,L),o("h4",{class:"result",innerHTML:t.result},null,8,J),o("p",{class:"team",innerHTML:t.team2},null,8,P)]),o("div",U,[o("p",W,_(t.date)+", "+_(t.href),1),o("span",{class:"deleteIcon small material-icons-round",onClick:s[0]||(s[0]=(...p)=>r.remove&&r.remove(...p))},"clear")])])])}const K=k(O,[["render",$],["__scopeId","data-v-64418ae1"]]);const R={components:{TextInputWithIcon:C,FullShelf:D,FootballItem:K},name:"Sports",data(){return{sports:[],watchMatches:[],sourceToAdd:"",supportedSources:["https://onefootball.com/en/team/","https://onefootball.com/en/match/","https://onefootball.com/en/competition/","https://www.cev.eu/match-centres/","https://championsleague.cev.eu/en/match-centres/","https://www.cev.eu/calendar/","https://cev-nex.tk/#/match/","https://cevnex.tk/#/match/"]}},mounted(){this.watchMatches=JSON.parse(window.localStorage.getItem("sports.watchMatches"))||[],this.updateMatches()},computed:{volleyMatches(){return this.watchMatches.filter(e=>e.includes("cev")).map(e=>{let s=e;return e.includes("nex.tk")&&(s=e.split("/match/")[1]),{src:s,ref:e}})},notVolleyMatches(){return this.watchMatches.filter(e=>!e.includes("cev"))}},methods:{removeSource(e,s,t){this.watchMatches.splice(this.watchMatches.indexOf(e),1),this.sports[s].items.splice(t,1),window.localStorage.setItem("sports.watchMatches",JSON.stringify(this.watchMatches))},removeSourceD(e){this.watchMatches.splice(this.watchMatches.indexOf(e),1),window.localStorage.setItem("sports.watchMatches",JSON.stringify(this.watchMatches))},tryAddSource(){for(const e of this.supportedSources)if(this.sourceToAdd.startsWith(e)){this.addSource();return}alert("unsupported source")},addSource(){this.watchMatches.push(this.sourceToAdd),window.localStorage.setItem("sports.watchMatches",JSON.stringify(this.watchMatches)),this.sourceToAdd=""},updateMatches(){if(!(this.$route.path=="/sports"||this.$route.path=="/sports/")){console.log("not update",this.$route.path);return}fetch("/api/sports",{method:"POST",body:JSON.stringify({urls:this.notVolleyMatches})}).then(e=>e.json()).then(e=>{this.sports=[];for(const s of e){const t=this.sports.findIndex(c=>c.sport==s.sport);t>=0?this.sports[t].items.push(s):this.sports.push({sport:s.sport,icon:s.sportIcon,items:[s]})}for(const s of this.sports)s.items.sort((t,c)=>{if(t.progress=t.progress.replace("Half time","45'"),c.progress=c.progress.replace("Half time","45'"),(t.progress.includes("Pens")||t.progress.includes("N/A"))&&(t.progress="Full time"),(c.progress.includes("Pens")||c.progress.includes("N/A"))&&(c.progress="Full time"),t.progress.includes("'")&&!c.progress.includes("'"))return-1;if(!t.progress.includes("'")&&c.progress.includes("'"))return 1;if(t.progress.includes("'")&&c.progress.includes("'")){const f=Number(t.progress.replace("'","").replace("+","")),I=Number(c.progress.replace("'","").replace("+",""));return ff.toISOString().split("T")[0];n=n.replace("Today",a(d)).split("/").reverse().join("-"),n=n.replace("Tomorrow",a(l)).split("/").reverse().join("-"),n=n.replace("Yesterday",a(u)).split("/").reverse().join("-"),r=r.replace("Today",a(d)).split("/").reverse().join("-"),r=r.replace("Tomorrow",a(l)).split("/").reverse().join("-"),r=r.replace("Yesterday",a(u)).split("/").reverse().join("-");let g=new Date(`${n}T${h}`.replace(" ","")),M=new Date(`${r}T${p}`.replace(" ",""));return g>M?-1:g==M?0:1})}),setTimeout(this.updateMatches,1e3*45)}}},T=e=>(V("data-v-cae3e92d"),e=e(),B(),e),Y={class:"news"},z=T(()=>o("div",{class:"padding-20"},[o("h1",null,"Sports")],-1)),E=T(()=>o("hr",null,null,-1)),q={class:"padding-20"},G={class:"small"},Q={class:"addWrapper"},X=T(()=>o("hr",null,null,-1)),Z=["src"],ee=["onClick"];function te(e,s,t,c,n,r){const h=y("TextInputWithIcon"),p=y("football-item"),d=y("full-shelf");return i(),m("div",Y,[z,E,o("div",q,[o("p",G,"Supported urls: "+_(n.supportedSources.join("*, ")),1),o("div",Q,[F(h,{modelValue:n.sourceToAdd,"onUpdate:modelValue":s[0]||(s[0]=l=>n.sourceToAdd=l),icon:"link",onKeyup:e.enterText},null,8,["modelValue","onKeyup"]),o("span",{id:"addToPlaylist",class:"material-icons-outlined",onClick:s[1]||(s[1]=(...l)=>r.tryAddSource&&r.tryAddSource(...l))},"add_circle")]),X,(i(!0),m(v,null,w(n.sports,(l,u)=>(i(),S(d,{key:l.sport,heading:l.sport,icon:l.icon},{default:x(()=>[(i(!0),m(v,null,w(l.items,(a,g)=>(i(),S(p,{key:a.href,competition:a.competition,date:a.date,href:a.href,oref:a.oref,progress:a.progress,result:a.result,team1:a.team1,team2:a.team2,onRemove:()=>r.removeSource(a.sref,u,g)},null,8,["competition","date","href","oref","progress","result","team1","team2","onRemove"]))),128))]),_:2},1032,["heading","icon"]))),128)),r.volleyMatches.length?(i(),S(d,{key:0,heading:"Volleyball",icon:"sports_volleyball"},{default:x(()=>[(i(!0),m(v,null,w(r.volleyMatches,(l,u)=>(i(),m("div",{key:u,class:"wrapIframe"},[o("iframe",{src:`https://cev-nex.tk/#/embed?match=${l.src}`},null,8,Z),o("span",{class:"deleteIcon small material-symbols-rounded",onClick:()=>r.removeSourceD(l.ref)},"clear",8,ee)]))),128))]),_:1})):N("",!0)])])}const re=k(R,[["render",te],["__scopeId","data-v-cae3e92d"]]);export{re as default}; diff --git a/src/ui/dist/assets/Sports.b552157b.js.gz b/src/ui/dist/assets/Sports.b552157b.js.gz new file mode 100644 index 000000000..98c2a5369 Binary files /dev/null and b/src/ui/dist/assets/Sports.b552157b.js.gz differ diff --git a/src/ui/dist/assets/Track.25dd5002.js.gz b/src/ui/dist/assets/Track.25dd5002.js.gz deleted file mode 100644 index 6f2df8c8c..000000000 Binary files a/src/ui/dist/assets/Track.25dd5002.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/Track.25dd5002.js b/src/ui/dist/assets/Track.4cb4db00.js similarity index 93% rename from src/ui/dist/assets/Track.25dd5002.js rename to src/ui/dist/assets/Track.4cb4db00.js index ed0a986d7..f6dff3482 100644 --- a/src/ui/dist/assets/Track.25dd5002.js +++ b/src/ui/dist/assets/Track.4cb4db00.js @@ -1 +1 @@ -import{F as E}from"./FixedPlaylistHeader.28982abf.js";import{P as I}from"./song.619409cb.js";import{_ as H}from"./EditSong.vue_vue_type_script_setup_true_lang.b4546726.js";import{d as T}from"./vuedraggable.umd.e9aa7b2f.js";import{_ as g,o as u,c as p,a,t as c,d as _,e as n,g as d,C as m,p as f,bO as A,y as v,w as P,b as V,I as M,bJ as O,k as B,l as D}from"./index.1d09503d.js";import"./Dropdown.f68f135c.js";const j={name:"MiniPlayer",props:{src:String,artist:String,title:String,display:{type:Boolean,default:!0}},data(){return{playing:!1}},methods:{get(s){fetch(`/api/${s}`)},pause(){this.get("pause")},play(){this.get("play")},playPause(){this.$refs.player.onended||(this.$refs.player.onended=()=>{this.playing=!1});const s=new CustomEvent("player.play",{detail:{title:this.title,artist:this.artist,source:this.src}});window.dispatchEvent(s)}}},J={class:"miniPlayer"},L=["src"];function R(s,t,o,y,e,i){return u(),p("div",J,[a("audio",{src:o.src,ref:"player"},null,8,L),o.display?(u(),p("span",{key:0,onClick:t[0]||(t[0]=(...h)=>i.playPause&&i.playPause(...h)),class:"material-icons-round circle"},c(e.playing?"pause":"play_arrow"),1)):_("",!0)])}const q=g(j,[["render",R],["__scopeId","data-v-6ce9ef8c"]]);const U={components:{MiniPlayer:q},name:"SpotifyPlaylistEntry",props:{index:Number,id:Number,source:String,artist:{type:String,default:"N/A"},title:{type:String,default:"N/A"},added:Boolean,cover:String,album:String,preview:String},data(){return{highlighted:!1,favourited:this.favourite,isAutoPlaylist:this.$route.path=="/collection/tracks",hovering:!1}},methods:{remove(){fetch(`/api/playlists/${this.$route.params.id}/tracks`,{method:"DELETE",body:JSON.stringify({songId:this.id})})},onselect(){this.highlighted=!this.highlighted},playAt(){this.$emit("edit",this.index)},add(){console.log("add"),this.$emit("add",this.index)}},watch:{added(){console.log("change"),this.$refs.add.innerHTML=this.added?"done":"add"}}},F={class:"track"},z=["src"],G={class:"trackwrapper"},K={class:"title"},Q={class:"artist"};function W(s,t,o,y,e,i){const h=n("mini-player");return u(),p("div",{onDblclick:t[2]||(t[2]=()=>{i.playAt(),i.onselect()}),onClick:t[3]||(t[3]=(...r)=>i.onselect&&i.onselect(...r)),onMouseover:t[4]||(t[4]=r=>e.hovering=!0),onMouseleave:t[5]||(t[5]=r=>e.hovering=!1),class:m(["playlistEntry",{selected:e.highlighted}])},[d(h,{class:m(["miniPlayer",{hidden:!e.hovering}]),title:o.title,artist:o.artist,src:o.source},null,8,["class","title","artist","src"]),e.hovering?_("",!0):(u(),p("span",{key:0,onClick:t[0]||(t[0]=(...r)=>s.edit&&s.edit(...r)),class:"id"},c(o.index+1),1)),a("div",F,[a("img",{src:o.cover||"/assets/img/music_placeholder.png"},null,8,z),a("div",G,[a("span",K,c(o.title),1),a("span",Q,c(o.artist),1)]),_("",!0)]),a("span",{onClick:t[1]||(t[1]=(...r)=>i.add&&i.add(...r)),class:"material-icons-round edit",ref:"add"},"add",512)],34)}const X=g(U,[["render",W],["__scopeId","data-v-d2738e1c"]]);const Y={components:{PlaylistHeader:I,FixedPlaylistHeader:E,draggable:T,SpotifyPlaylistEntry:X,EditSong:H},data(){return this.updatePlaylist(),{fixedHeaderHidden:!0,title:"N/A",artist:"N/A",album:"N/A",cover:f(null),src:"",id:-1,recommendations:[]}},methods:{getId(){return A(this.$route.params.id)},onPlaylistRearrange(s){s.moved},headerVisibilityChanged(s){this.fixedHeaderHidden=s},editSong(){this.$refs.editSongPopup.show()},addToPlaylist(){},updatePlaylist(){!this.getId()||!this.$route.path.includes("/track/")||fetch(`/api/tracks/${this.getId()}`).then(async s=>{if(s.status==404){this.$router.push("/");return}const t=await s.json();console.log(t),this.title=t.title||"N/A",this.artist=t.artist||"N/A",this.cover=f(t.cover),this.src=t.source,this.album=t.album||"N/A",this.id=t.id,document.title=`${this.title} \u2022 ${this.artist}`;const y=await(await fetch("/api/spotify/recommendations",{method:"POST",body:JSON.stringify({query:`${this.artist} ${this.title}`})})).json();this.recommendations.push(...y)})},loadPlaylist(){fetch("/api/player/load",{method:"POST",body:JSON.stringify({id:Number(this.getId()),type:"track"})})}},watch:{$route(){this.updatePlaylist()},currentSong(){this.updateIsPlaying()}}},b=s=>(B("data-v-43ec8edb"),s=s(),D(),s),Z={class:"playlist"},$=["src"],tt={class:"details"},et=b(()=>a("hr",null,null,-1)),it={class:"padding-20"},st={class:"grid"},at=b(()=>a("hr",null,null,-1)),lt={class:"playlistEntries"};function ot(s,t,o,y,e,i){const h=n("EditSong"),r=n("fixed-playlist-header"),S=n("h7"),k=n("PlaylistHeader"),x=n("spotify-playlist-entry"),w=n("draggable"),C=M("observe-visibility");return u(),p("div",Z,[d(h,{ref:"editSongPopup",song:{cover:e.cover,album:e.album,title:e.title,artist:e.artist,source:e.src,id:e.id},onClose:i.updatePlaylist},null,8,["song","onClose"]),d(r,{ref:"fixedHeading",class:m({hidden:e.fixedHeaderHidden}),title:`${e.artist} - ${e.title}`,onLoadPlaylist:i.loadPlaylist},null,8,["class","title","onLoadPlaylist"]),v((u(),p("div",{class:"padding-20 songdetails",onClick:t[0]||(t[0]=(...l)=>i.editSong&&i.editSong(...l))},[a("img",{src:e.cover,class:"cover"},null,8,$),a("div",tt,[d(S,null,{default:P(()=>[V("Song")]),_:1}),a("h1",null,c(e.title),1),a("h5",null,c(e.artist),1)])])),[[C,i.headerVisibilityChanged]]),et,a("div",it,[a("span",{id:"loadPlaylist",class:"material-icons-outlined",onClick:t[1]||(t[1]=(...l)=>i.loadPlaylist&&i.loadPlaylist(...l))},"play_circle_filled"),v(a("span",{id:"addToPlaylist",class:"material-icons-outlined",onClick:t[2]||(t[2]=(...l)=>i.addToPlaylist&&i.addToPlaylist(...l))},"add_circle",512),[[O,!1]]),a("div",st,[a("h2",null,c("Recommendations based on "+e.title),1),d(k),at,a("div",lt,[d(w,{modelValue:e.recommendations,"onUpdate:modelValue":t[3]||(t[3]=l=>e.recommendations=l)},{item:P(({element:l})=>[d(x,{id:l.id,album:l.album,artist:l.artists.join(", "),cover:l.cover,duration:l.duration,favourite:l.favourite,index:e.recommendations.findIndex(N=>N.source==l.source),preview:l.preview,source:l.source,title:l.title,onRequestUpdate:i.updatePlaylist},null,8,["id","album","artist","cover","duration","favourite","index","preview","source","title","onRequestUpdate"])]),_:1},8,["modelValue"])])])])])}const ht=g(Y,[["render",ot],["__scopeId","data-v-43ec8edb"]]);export{ht as default}; +import{F as E}from"./FixedPlaylistHeader.8b130c57.js";import{P as I}from"./song.6a60a886.js";import{_ as H}from"./EditSong.vue_vue_type_script_setup_true_lang.42f3815c.js";import{d as T}from"./vuedraggable.umd.6e1f6451.js";import{_ as g,o as u,c as p,a,t as c,d as _,e as n,g as d,C as m,p as f,bO as A,y as v,w as P,b as V,I as M,bJ as O,k as B,l as D}from"./index.c970909a.js";import"./Dropdown.7541a2ee.js";const j={name:"MiniPlayer",props:{src:String,artist:String,title:String,display:{type:Boolean,default:!0}},data(){return{playing:!1}},methods:{get(s){fetch(`/api/${s}`)},pause(){this.get("pause")},play(){this.get("play")},playPause(){this.$refs.player.onended||(this.$refs.player.onended=()=>{this.playing=!1});const s=new CustomEvent("player.play",{detail:{title:this.title,artist:this.artist,source:this.src}});window.dispatchEvent(s)}}},J={class:"miniPlayer"},L=["src"];function R(s,t,o,y,e,i){return u(),p("div",J,[a("audio",{src:o.src,ref:"player"},null,8,L),o.display?(u(),p("span",{key:0,onClick:t[0]||(t[0]=(...h)=>i.playPause&&i.playPause(...h)),class:"material-icons-round circle"},c(e.playing?"pause":"play_arrow"),1)):_("",!0)])}const q=g(j,[["render",R],["__scopeId","data-v-6ce9ef8c"]]);const U={components:{MiniPlayer:q},name:"SpotifyPlaylistEntry",props:{index:Number,id:Number,source:String,artist:{type:String,default:"N/A"},title:{type:String,default:"N/A"},added:Boolean,cover:String,album:String,preview:String},data(){return{highlighted:!1,favourited:this.favourite,isAutoPlaylist:this.$route.path=="/collection/tracks",hovering:!1}},methods:{remove(){fetch(`/api/playlists/${this.$route.params.id}/tracks`,{method:"DELETE",body:JSON.stringify({songId:this.id})})},onselect(){this.highlighted=!this.highlighted},playAt(){this.$emit("edit",this.index)},add(){console.log("add"),this.$emit("add",this.index)}},watch:{added(){console.log("change"),this.$refs.add.innerHTML=this.added?"done":"add"}}},F={class:"track"},z=["src"],G={class:"trackwrapper"},K={class:"title"},Q={class:"artist"};function W(s,t,o,y,e,i){const h=n("mini-player");return u(),p("div",{onDblclick:t[2]||(t[2]=()=>{i.playAt(),i.onselect()}),onClick:t[3]||(t[3]=(...r)=>i.onselect&&i.onselect(...r)),onMouseover:t[4]||(t[4]=r=>e.hovering=!0),onMouseleave:t[5]||(t[5]=r=>e.hovering=!1),class:m(["playlistEntry",{selected:e.highlighted}])},[d(h,{class:m(["miniPlayer",{hidden:!e.hovering}]),title:o.title,artist:o.artist,src:o.source},null,8,["class","title","artist","src"]),e.hovering?_("",!0):(u(),p("span",{key:0,onClick:t[0]||(t[0]=(...r)=>s.edit&&s.edit(...r)),class:"id"},c(o.index+1),1)),a("div",F,[a("img",{src:o.cover||"/assets/img/music_placeholder.png"},null,8,z),a("div",G,[a("span",K,c(o.title),1),a("span",Q,c(o.artist),1)]),_("",!0)]),a("span",{onClick:t[1]||(t[1]=(...r)=>i.add&&i.add(...r)),class:"material-icons-round edit",ref:"add"},"add",512)],34)}const X=g(U,[["render",W],["__scopeId","data-v-d2738e1c"]]);const Y={components:{PlaylistHeader:I,FixedPlaylistHeader:E,draggable:T,SpotifyPlaylistEntry:X,EditSong:H},data(){return this.updatePlaylist(),{fixedHeaderHidden:!0,title:"N/A",artist:"N/A",album:"N/A",cover:f(null),src:"",id:-1,recommendations:[]}},methods:{getId(){return A(this.$route.params.id)},onPlaylistRearrange(s){s.moved},headerVisibilityChanged(s){this.fixedHeaderHidden=s},editSong(){this.$refs.editSongPopup.show()},addToPlaylist(){},updatePlaylist(){!this.getId()||!this.$route.path.includes("/track/")||fetch(`/api/tracks/${this.getId()}`).then(async s=>{if(s.status==404){this.$router.push("/");return}const t=await s.json();console.log(t),this.title=t.title||"N/A",this.artist=t.artist||"N/A",this.cover=f(t.cover),this.src=t.source,this.album=t.album||"N/A",this.id=t.id,document.title=`${this.title} \u2022 ${this.artist}`;const y=await(await fetch("/api/spotify/recommendations",{method:"POST",body:JSON.stringify({query:`${this.artist} ${this.title}`})})).json();this.recommendations.push(...y)})},loadPlaylist(){fetch("/api/player/load",{method:"POST",body:JSON.stringify({id:Number(this.getId()),type:"track"})})}},watch:{$route(){this.updatePlaylist()},currentSong(){this.updateIsPlaying()}}},b=s=>(B("data-v-43ec8edb"),s=s(),D(),s),Z={class:"playlist"},$=["src"],tt={class:"details"},et=b(()=>a("hr",null,null,-1)),it={class:"padding-20"},st={class:"grid"},at=b(()=>a("hr",null,null,-1)),lt={class:"playlistEntries"};function ot(s,t,o,y,e,i){const h=n("EditSong"),r=n("fixed-playlist-header"),S=n("h7"),k=n("PlaylistHeader"),x=n("spotify-playlist-entry"),w=n("draggable"),C=M("observe-visibility");return u(),p("div",Z,[d(h,{ref:"editSongPopup",song:{cover:e.cover,album:e.album,title:e.title,artist:e.artist,source:e.src,id:e.id},onClose:i.updatePlaylist},null,8,["song","onClose"]),d(r,{ref:"fixedHeading",class:m({hidden:e.fixedHeaderHidden}),title:`${e.artist} - ${e.title}`,onLoadPlaylist:i.loadPlaylist},null,8,["class","title","onLoadPlaylist"]),v((u(),p("div",{class:"padding-20 songdetails",onClick:t[0]||(t[0]=(...l)=>i.editSong&&i.editSong(...l))},[a("img",{src:e.cover,class:"cover"},null,8,$),a("div",tt,[d(S,null,{default:P(()=>[V("Song")]),_:1}),a("h1",null,c(e.title),1),a("h5",null,c(e.artist),1)])])),[[C,i.headerVisibilityChanged]]),et,a("div",it,[a("span",{id:"loadPlaylist",class:"material-icons-outlined",onClick:t[1]||(t[1]=(...l)=>i.loadPlaylist&&i.loadPlaylist(...l))},"play_circle_filled"),v(a("span",{id:"addToPlaylist",class:"material-icons-outlined",onClick:t[2]||(t[2]=(...l)=>i.addToPlaylist&&i.addToPlaylist(...l))},"add_circle",512),[[O,!1]]),a("div",st,[a("h2",null,c("Recommendations based on "+e.title),1),d(k),at,a("div",lt,[d(w,{modelValue:e.recommendations,"onUpdate:modelValue":t[3]||(t[3]=l=>e.recommendations=l)},{item:P(({element:l})=>[d(x,{id:l.id,album:l.album,artist:l.artists.join(", "),cover:l.cover,duration:l.duration,favourite:l.favourite,index:e.recommendations.findIndex(N=>N.source==l.source),preview:l.preview,source:l.source,title:l.title,onRequestUpdate:i.updatePlaylist},null,8,["id","album","artist","cover","duration","favourite","index","preview","source","title","onRequestUpdate"])]),_:1},8,["modelValue"])])])])])}const ht=g(Y,[["render",ot],["__scopeId","data-v-43ec8edb"]]);export{ht as default}; diff --git a/src/ui/dist/assets/Track.4cb4db00.js.gz b/src/ui/dist/assets/Track.4cb4db00.js.gz new file mode 100644 index 000000000..23055a3d4 Binary files /dev/null and b/src/ui/dist/assets/Track.4cb4db00.js.gz differ diff --git a/src/ui/dist/assets/TrackCompact.b3e226ee.js b/src/ui/dist/assets/TrackCompact.3692910e.js similarity index 88% rename from src/ui/dist/assets/TrackCompact.b3e226ee.js rename to src/ui/dist/assets/TrackCompact.3692910e.js index a5a400cfa..3f6d4dc9f 100644 --- a/src/ui/dist/assets/TrackCompact.b3e226ee.js +++ b/src/ui/dist/assets/TrackCompact.3692910e.js @@ -1 +1 @@ -import{_ as x,v as C,n as l,D as I,E as $,G as n,e as H,o as r,c as p,f as i,u as c,d as y,a as t,H as T,w as g,g as d,M as _,t as B,k as D,l as N}from"./index.1d09503d.js";import{_ as E}from"./ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.c66e56c3.js";import{_ as M}from"./ImportSpotifySong.vue_vue_type_script_setup_true_lang.66b612a0.js";const O=e=>(D("data-v-b2671156"),e=e(),N(),e),V={class:"home-track-compact-wrapper drop-shadow-md"},R=["src"],q=O(()=>t("div",{class:"play"},[t("span",{class:"material-symbols-rounded"},"play_arrow")],-1)),z={class:"info"},A={class:"title"},G=["href"],P={class:"artist"},j={__name:"TrackCompact",props:{title:String,artist:String,cover:String,id:Number,href:String},emits:["play"],setup(e,{emit:S}){const a=e,u=`/track/${C(String(a.id))}`,f=l(null),h=l(null),b=o=>{o.stopPropagation(),S("play")},w=()=>{var o;a.href||this.$router.push(u),(o=a.href)!=null&&o.includes("spotify")?h.show():f.show()},s=l(a.cover);I(()=>a.cover,()=>{s.value=a.cover});const m=$(()=>n(s.value));return(o,k)=>{const v=H("router-link");return r(),p("div",V,[e.href?(r(),i(E,{key:0,album:{cover:c(m),name:e.title,artist:e.artist,id:e.href.replace("https://open.spotify.com/album/",""),href:e.href,releaseDate:null},ref_key:"addRelease",ref:h},null,8,["album"])):y("",!0),e.href?(r(),i(M,{key:1,song:{cover:c(m),title:e.title,artist:e.artist,id:e.href.replace("https://open.spotify.com/track/",""),href:e.href,releaseDate:null},ref_key:"addSong",ref:f},null,8,["song"])):y("",!0),t("div",{class:"home-track-compact",onClick:w},[t("div",{onClick:b,class:"cover",style:T({backgroundImage:`url(${c(n)(s.value)})`})},[t("img",{src:c(n)(s.value),onError:k[0]||(k[0]=J=>s.value=null),class:"hidden"},null,40,R),q],4),t("div",z,[t("span",A,[e.href?(r(),p("a",{key:1,href:e.href,class:"linkOnHover"},[d(_,{text:e.title},null,8,["text"])],8,G)):(r(),i(v,{key:0,class:"linkOnHover",to:u},{default:g(()=>[d(_,{text:e.title},null,8,["text"])]),_:1}))]),d(v,{class:"linkOnHover",to:`/search/artist:${e.artist}`},{default:g(()=>[t("span",P,B(e.artist),1)]),_:1},8,["to"])])])])}}},U=x(j,[["__scopeId","data-v-b2671156"]]);export{U as T}; +import{_ as x,v as C,n as l,D as I,E as $,G as n,e as H,o as r,c as p,f as i,u as c,d as y,a as t,H as T,w as g,g as d,M as _,t as B,k as D,l as N}from"./index.c970909a.js";import{_ as E}from"./ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.ec33d761.js";import{_ as M}from"./ImportSpotifySong.vue_vue_type_script_setup_true_lang.c34c7594.js";const O=e=>(D("data-v-b2671156"),e=e(),N(),e),V={class:"home-track-compact-wrapper drop-shadow-md"},R=["src"],q=O(()=>t("div",{class:"play"},[t("span",{class:"material-symbols-rounded"},"play_arrow")],-1)),z={class:"info"},A={class:"title"},G=["href"],P={class:"artist"},j={__name:"TrackCompact",props:{title:String,artist:String,cover:String,id:Number,href:String},emits:["play"],setup(e,{emit:S}){const a=e,u=`/track/${C(String(a.id))}`,f=l(null),h=l(null),b=o=>{o.stopPropagation(),S("play")},w=()=>{var o;a.href||this.$router.push(u),(o=a.href)!=null&&o.includes("spotify")?h.show():f.show()},s=l(a.cover);I(()=>a.cover,()=>{s.value=a.cover});const m=$(()=>n(s.value));return(o,k)=>{const v=H("router-link");return r(),p("div",V,[e.href?(r(),i(E,{key:0,album:{cover:c(m),name:e.title,artist:e.artist,id:e.href.replace("https://open.spotify.com/album/",""),href:e.href,releaseDate:null},ref_key:"addRelease",ref:h},null,8,["album"])):y("",!0),e.href?(r(),i(M,{key:1,song:{cover:c(m),title:e.title,artist:e.artist,id:e.href.replace("https://open.spotify.com/track/",""),href:e.href,releaseDate:null},ref_key:"addSong",ref:f},null,8,["song"])):y("",!0),t("div",{class:"home-track-compact",onClick:w},[t("div",{onClick:b,class:"cover",style:T({backgroundImage:`url(${c(n)(s.value)})`})},[t("img",{src:c(n)(s.value),onError:k[0]||(k[0]=J=>s.value=null),class:"hidden"},null,40,R),q],4),t("div",z,[t("span",A,[e.href?(r(),p("a",{key:1,href:e.href,class:"linkOnHover"},[d(_,{text:e.title},null,8,["text"])],8,G)):(r(),i(v,{key:0,class:"linkOnHover",to:u},{default:g(()=>[d(_,{text:e.title},null,8,["text"])]),_:1}))]),d(v,{class:"linkOnHover",to:`/search/artist:${e.artist}`},{default:g(()=>[t("span",P,B(e.artist),1)]),_:1},8,["to"])])])])}}},U=x(j,[["__scopeId","data-v-b2671156"]]);export{U as T}; diff --git a/src/ui/dist/assets/TrackCompact.3692910e.js.gz b/src/ui/dist/assets/TrackCompact.3692910e.js.gz new file mode 100644 index 000000000..810b33943 Binary files /dev/null and b/src/ui/dist/assets/TrackCompact.3692910e.js.gz differ diff --git a/src/ui/dist/assets/TrackCompact.b3e226ee.js.gz b/src/ui/dist/assets/TrackCompact.b3e226ee.js.gz deleted file mode 100644 index caa00debb..000000000 Binary files a/src/ui/dist/assets/TrackCompact.b3e226ee.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/TrackInfo.a2d7128f.js b/src/ui/dist/assets/TrackInfo.2ed5fbe0.js similarity index 95% rename from src/ui/dist/assets/TrackInfo.a2d7128f.js rename to src/ui/dist/assets/TrackInfo.2ed5fbe0.js index 2bdef8b71..387c3735c 100644 --- a/src/ui/dist/assets/TrackInfo.a2d7128f.js +++ b/src/ui/dist/assets/TrackInfo.2ed5fbe0.js @@ -1 +1 @@ -import{P as I}from"./song.619409cb.js";import{m as v,J as q,E as g,n as h,e as S,o as a,c as n,a as t,t as c,C as x,g as o,h as A,d as b,w as k,M as y,u as $,K as B,x as E,O as P,_,F as w,i as C,f as M,k as N,l as O}from"./index.1d09503d.js";const T={key:0,class:"cover"},H={class:"artist-title"},V={class:"title"},D={class:"artist"},F={key:1,class:"album"},j=v({__name:"ExternalEntry",props:{song:{type:Object,required:!0},index:{type:Number,required:!0},withCover:{type:Boolean,required:!1,default:!1},withAlbum:{type:Boolean,required:!1,default:!1},selected:{type:Boolean,required:!1,default:!1},playlistId:{type:Number,required:!1,default:null}},emits:["update"],setup(e,{emit:u}){const l=e,s=q(),i=g(()=>l.song.id==s.song.id),r=h(!1);g(()=>l.playlistId==null?s.playlist.id:l.playlistId);const m=()=>{P(l.song.title,l.song.artist,l.song.source)};return h(null),(ee,d)=>{const f=S("router-link");return a(),n("div",{class:x([{playing:$(i),selected:e.selected,hovering:r.value,withCover:e.withCover,withAlbum:e.withAlbum},"playlist-entry"]),onDblclick:m,onMouseenter:d[1]||(d[1]=p=>r.value=!0),onMouseleave:d[2]||(d[2]=p=>r.value=!1)},[t("div",{class:x([{"material-symbols-rounded":r.value},"index text-right"]),onClick:m},c(r.value?"play_arrow":e.index+1),3),e.withCover?(a(),n("div",T,[o(A,{src:e.song.cover,type:"track"},null,8,["src"])])):b("",!0),t("div",H,[t("span",V,[o(f,{to:`/track/${e.song.id}`,class:"linkOnHover"},{default:k(()=>[o(y,{text:e.song.title},null,8,["text"])]),_:1},8,["to"])]),t("span",D,[o(f,{to:`/search/artist:${e.song.artist}`,class:"linkOnHover"},{default:k(()=>[o(y,{text:e.song.artist},null,8,["text"])]),_:1},8,["to"])])]),e.withAlbum&&!$(B)?(a(),n("div",F,[o(y,{text:e.song.album},null,8,["text"])])):b("",!0),t("div",{class:"icon text-left material-symbols-rounded",onClick:d[0]||(d[0]=E(p=>u("add"),["stop"]))},c(e.song.added?"done":"add"),1)],34)}}});const z=_(j,[["__scopeId","data-v-f4a00755"]]),J=e=>(N("data-v-4cba310c"),e=e(),O(),e),K={class:"playlist"},L=J(()=>t("hr",null,null,-1)),G={class:"entries"},Q=v({__name:"Playlist",props:{songs:{type:Array,required:!0},noCover:{type:Boolean,default:!1}},setup(e){return(u,l)=>(a(),n("div",K,[o(I,{"without-duration":""}),L,t("div",G,[(a(!0),n(w,null,C(e.songs,(s,i)=>(a(),M(z,{key:s.source,added:s.added,index:i,song:s,title:s.title,"with-cover":!e.noCover,onAdd:r=>u.$emit("add",i)},null,8,["added","index","song","title","with-cover","onAdd"]))),128))])]))}});const ae=_(Q,[["__scopeId","data-v-4cba310c"]]),R={class:"padding-20 playlisteditor"},U=["src"],W={class:"details"},X={class:"detailswrapper"},Y=["onClick"],Z=v({__name:"TrackInfo",props:{title:{type:String,required:!0},subtitle:{type:String,required:!0},cover:{type:String,required:!0},icons:{type:Array,required:!0}},setup(e){return(u,l)=>(a(),n("div",R,[t("img",{src:e.cover,class:"cover"},null,8,U),t("div",W,[t("div",X,[(a(!0),n(w,null,C(e.icons,(s,i)=>(a(),n("span",{key:i,class:"material-icons-round",onClick:s.onClick},c(s.name),9,Y))),128))]),t("h1",null,c(e.title),1),t("h6",null,c(e.subtitle),1)])]))}});const le=_(Z,[["__scopeId","data-v-096bfba7"]]);export{ae as P,le as T}; +import{P as I}from"./song.6a60a886.js";import{m as v,J as q,E as g,n as h,e as S,o as a,c as n,a as t,t as c,C as x,g as o,h as A,d as b,w as k,M as y,u as $,K as B,x as E,O as P,_,F as w,i as C,f as M,k as N,l as O}from"./index.c970909a.js";const T={key:0,class:"cover"},H={class:"artist-title"},V={class:"title"},D={class:"artist"},F={key:1,class:"album"},j=v({__name:"ExternalEntry",props:{song:{type:Object,required:!0},index:{type:Number,required:!0},withCover:{type:Boolean,required:!1,default:!1},withAlbum:{type:Boolean,required:!1,default:!1},selected:{type:Boolean,required:!1,default:!1},playlistId:{type:Number,required:!1,default:null}},emits:["update"],setup(e,{emit:u}){const l=e,s=q(),i=g(()=>l.song.id==s.song.id),r=h(!1);g(()=>l.playlistId==null?s.playlist.id:l.playlistId);const m=()=>{P(l.song.title,l.song.artist,l.song.source)};return h(null),(ee,d)=>{const f=S("router-link");return a(),n("div",{class:x([{playing:$(i),selected:e.selected,hovering:r.value,withCover:e.withCover,withAlbum:e.withAlbum},"playlist-entry"]),onDblclick:m,onMouseenter:d[1]||(d[1]=p=>r.value=!0),onMouseleave:d[2]||(d[2]=p=>r.value=!1)},[t("div",{class:x([{"material-symbols-rounded":r.value},"index text-right"]),onClick:m},c(r.value?"play_arrow":e.index+1),3),e.withCover?(a(),n("div",T,[o(A,{src:e.song.cover,type:"track"},null,8,["src"])])):b("",!0),t("div",H,[t("span",V,[o(f,{to:`/track/${e.song.id}`,class:"linkOnHover"},{default:k(()=>[o(y,{text:e.song.title},null,8,["text"])]),_:1},8,["to"])]),t("span",D,[o(f,{to:`/search/artist:${e.song.artist}`,class:"linkOnHover"},{default:k(()=>[o(y,{text:e.song.artist},null,8,["text"])]),_:1},8,["to"])])]),e.withAlbum&&!$(B)?(a(),n("div",F,[o(y,{text:e.song.album},null,8,["text"])])):b("",!0),t("div",{class:"icon text-left material-symbols-rounded",onClick:d[0]||(d[0]=E(p=>u("add"),["stop"]))},c(e.song.added?"done":"add"),1)],34)}}});const z=_(j,[["__scopeId","data-v-f4a00755"]]),J=e=>(N("data-v-4cba310c"),e=e(),O(),e),K={class:"playlist"},L=J(()=>t("hr",null,null,-1)),G={class:"entries"},Q=v({__name:"Playlist",props:{songs:{type:Array,required:!0},noCover:{type:Boolean,default:!1}},setup(e){return(u,l)=>(a(),n("div",K,[o(I,{"without-duration":""}),L,t("div",G,[(a(!0),n(w,null,C(e.songs,(s,i)=>(a(),M(z,{key:s.source,added:s.added,index:i,song:s,title:s.title,"with-cover":!e.noCover,onAdd:r=>u.$emit("add",i)},null,8,["added","index","song","title","with-cover","onAdd"]))),128))])]))}});const ae=_(Q,[["__scopeId","data-v-4cba310c"]]),R={class:"padding-20 playlisteditor"},U=["src"],W={class:"details"},X={class:"detailswrapper"},Y=["onClick"],Z=v({__name:"TrackInfo",props:{title:{type:String,required:!0},subtitle:{type:String,required:!0},cover:{type:String,required:!0},icons:{type:Array,required:!0}},setup(e){return(u,l)=>(a(),n("div",R,[t("img",{src:e.cover,class:"cover"},null,8,U),t("div",W,[t("div",X,[(a(!0),n(w,null,C(e.icons,(s,i)=>(a(),n("span",{key:i,class:"material-icons-round",onClick:s.onClick},c(s.name),9,Y))),128))]),t("h1",null,c(e.title),1),t("h6",null,c(e.subtitle),1)])]))}});const le=_(Z,[["__scopeId","data-v-096bfba7"]]);export{ae as P,le as T}; diff --git a/src/ui/dist/assets/TrackInfo.2ed5fbe0.js.gz b/src/ui/dist/assets/TrackInfo.2ed5fbe0.js.gz new file mode 100644 index 000000000..95e78c507 Binary files /dev/null and b/src/ui/dist/assets/TrackInfo.2ed5fbe0.js.gz differ diff --git a/src/ui/dist/assets/TrackInfo.a2d7128f.js.gz b/src/ui/dist/assets/TrackInfo.a2d7128f.js.gz deleted file mode 100644 index 6a359e2e1..000000000 Binary files a/src/ui/dist/assets/TrackInfo.a2d7128f.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/Tracks.31f4a252.js b/src/ui/dist/assets/Tracks.31f4a252.js deleted file mode 100644 index d8674a412..000000000 --- a/src/ui/dist/assets/Tracks.31f4a252.js +++ /dev/null @@ -1 +0,0 @@ -import{I as r}from"./index.49a58e31.js";import{o,f as t,u as e}from"./index.1d09503d.js";import"./FixedPlaylistHeader.28982abf.js";import"./song.619409cb.js";import"./Dropdown.f68f135c.js";import"./PlaylistEntry.486af7f1.js";import"./EditSong.vue_vue_type_script_setup_true_lang.b4546726.js";import"./playerInPicture.37a9ab56.js";const k={__name:"Tracks",setup(p){return(m,a)=>(o(),t(e(r),{src:"/api/me/liked",id:-1}))}};export{k as default}; diff --git a/src/ui/dist/assets/Tracks.3ce0f3ba.js b/src/ui/dist/assets/Tracks.3ce0f3ba.js new file mode 100644 index 000000000..74b0fc185 --- /dev/null +++ b/src/ui/dist/assets/Tracks.3ce0f3ba.js @@ -0,0 +1 @@ +import{I as r}from"./index.99d9af59.js";import{o,f as t,u as e}from"./index.c970909a.js";import"./FixedPlaylistHeader.8b130c57.js";import"./song.6a60a886.js";import"./Dropdown.7541a2ee.js";import"./PlaylistEntry.75d93026.js";import"./EditSong.vue_vue_type_script_setup_true_lang.42f3815c.js";import"./playerInPicture.37a9ab56.js";const k={__name:"Tracks",setup(p){return(m,a)=>(o(),t(e(r),{src:"/api/me/liked",id:-1}))}};export{k as default}; diff --git a/src/ui/dist/assets/Welcome.d749cf62.js b/src/ui/dist/assets/Welcome.9f2613e4.js similarity index 98% rename from src/ui/dist/assets/Welcome.d749cf62.js rename to src/ui/dist/assets/Welcome.9f2613e4.js index faec56e25..78a71c941 100644 --- a/src/ui/dist/assets/Welcome.d749cf62.js +++ b/src/ui/dist/assets/Welcome.9f2613e4.js @@ -1 +1 @@ -import{_,o as i,c as d,a as e,C as y,bR as v,s as C,bS as g,F as S,i as T,f as w,b as p,y as a,bI as h,d as b,e as k,k as I,l as R}from"./index.1d09503d.js";const x={name:"ThemeSmall",props:{name:String},methods:{selected(){return window.getCurrentTheme()==this.name},select(){window.setTheme(this.name),this.$emit("selected")}}},A=["src"];function E(n,s,u,m,o,l){return i(),d("div",{onClick:s[0]||(s[0]=(...r)=>l.select&&l.select(...r)),class:"wrapper"},[e("img",{src:`/assets/img/themes/${this.name}.svg`,class:y({selected:l.selected()})},null,10,A)])}const B=_(x,[["render",E],["__scopeId","data-v-479f3651"]]);const N={components:{ThemeSmall:B},methods:{updateThemes(){this.mode++},redirect(n){window.open(n)},finalRedirectRestricted(){this.spotifyClientId||this.spotifyClientSecret||fetch("/api/config/spotify",{method:"POST",body:JSON.stringify({id:"restricted",secret:"restricted"})}).then(n=>{n.status==200&&(setTimeout(()=>fetch("/api/releases"),1e3),this.mode++,setTimeout(()=>{this.$router.push("/")},6*1e3))})},async finalRedirect(){!this.spotifyClientId||!this.spotifyClientSecret||(await v(this.spotifyClientId,this.spotifyClientSecret),setTimeout(()=>fetch("/api/releases"),1e3),setTimeout(()=>fetch("/api/news/articles"),1e3),this.mode++,setTimeout(async()=>{await C(),this.$router.push("/")},6*1e3))}},data(){setInterval(()=>{if(this.mode<3){this.mode++;return}},7*1e3);const n=["dynamic","dark","light"],s=window.getCurrentTheme();return{mode:0,themes:n,themeSelected:s,spotifyClientId:"",spotifyClientSecret:""}},async mounted(){await g()||this.$router.push("/")}},t=n=>(I("data-v-d5fb03e7"),n=n(),R(),n),V={class:"welcome bouncy centred-column"},Y={key:0,class:"first centred-column"},O=t(()=>e("p",null,"Welcome to",-1)),D=t(()=>e("h1",null,"reAudioPlayer ONE",-1)),F=[O,D],L={key:1,class:"first centred-column"},P=t(()=>e("p",null,"The free audio player with the most extensive catalogue",-1)),U=t(()=>e("h1",null,"ARE YOU READY?",-1)),W=[P,U],H={key:2,class:"first centred-column"},M=t(()=>e("h1",null,"Almost There",-1)),z=t(()=>e("p",null,"After a few configurations you're ready to go",-1)),G=[M,z],J={key:3,class:"permanent centred-column"},j=t(()=>e("h1",null,"Pick a Theme",-1)),q=t(()=>e("p",null,"You'll be able to change the theme at any point later on",-1)),K=t(()=>e("br",null,null,-1)),Q={class:"centred-column appear-delayed"},X={key:4,class:"permanent centred-column"},Z=t(()=>e("h1",null,"Let's integrate Spotify then!",-1)),$=t(()=>e("p",null,"You'll be able to change the tokens at any point later on",-1)),ee=t(()=>e("br",null,null,-1)),te={class:"centred-column appear-delayed"},se=t(()=>e("p",null,"2) Create An App",-1)),oe=t(()=>e("p",null,"3) Enter any name and any description",-1)),ne=t(()=>e("p",null,[p("4) Edit the settings: set the redirect url to "),e("a",{href:"http://reap.ml/"},"http://reap.ml/")],-1)),ie=t(()=>e("p",null,"5) Copy and enter the client id and secret into the corresponding input field",-1)),le=t(()=>e("br",null,null,-1)),de={class:"wrapTogether"},ce=t(()=>e("p",null,"Client ID: ",-1)),re={class:"wrapTogether"},ae=t(()=>e("p",null,"Client Secret: ",-1)),he={class:"wrapTogether spaceBetween"},_e={key:5,class:"centred-column"},pe=t(()=>e("h1",null,"ALRIGHT!",-1)),ue=t(()=>e("p",null,"You're ready to go",-1)),me=[pe,ue];function fe(n,s,u,m,o,l){const r=k("theme-small");return i(),d("div",V,[o.mode==0?(i(),d("div",Y,F)):o.mode==1?(i(),d("div",L,W)):o.mode==2?(i(),d("div",H,G)):o.mode==3?(i(),d("div",J,[j,q,K,e("div",Q,[(i(),d("div",{class:"themes",key:o.themeSelected},[(i(!0),d(S,null,T(o.themes,(c,f)=>(i(),w(r,{onSelected:l.updateThemes,key:f,name:c},null,8,["onSelected","name"]))),128))]))])])):o.mode==4?(i(),d("div",X,[Z,$,ee,e("div",te,[e("p",null,[p("1) Head over to the "),e("a",{onClick:s[0]||(s[0]=()=>l.redirect("https://developer.spotify.com/dashboard/applications"))},"spotify developer dashboard")]),se,oe,ne,ie,le,e("div",de,[ce,a(e("input",{type:"text","onUpdate:modelValue":s[1]||(s[1]=c=>o.spotifyClientId=c)},null,512),[[h,o.spotifyClientId]])]),e("div",re,[ae,a(e("input",{type:"text","onUpdate:modelValue":s[2]||(s[2]=c=>o.spotifyClientSecret=c)},null,512),[[h,o.spotifyClientSecret]])]),e("div",he,[e("button",{onClick:s[3]||(s[3]=(...c)=>l.finalRedirect&&l.finalRedirect(...c))},"continue"),e("button",{onClick:s[4]||(s[4]=(...c)=>l.finalRedirectRestricted&&l.finalRedirectRestricted(...c)),class:"restrictedMode"},"enter restricted mode")])])])):o.mode==5?(i(),d("div",_e,me)):b("",!0)])}const ve=_(N,[["render",fe],["__scopeId","data-v-d5fb03e7"]]);export{ve as default}; +import{_,o as i,c as d,a as e,C as y,bR as v,s as C,bS as g,F as S,i as T,f as w,b as p,y as a,bI as h,d as b,e as k,k as I,l as R}from"./index.c970909a.js";const x={name:"ThemeSmall",props:{name:String},methods:{selected(){return window.getCurrentTheme()==this.name},select(){window.setTheme(this.name),this.$emit("selected")}}},A=["src"];function E(n,s,u,m,o,l){return i(),d("div",{onClick:s[0]||(s[0]=(...r)=>l.select&&l.select(...r)),class:"wrapper"},[e("img",{src:`/assets/img/themes/${this.name}.svg`,class:y({selected:l.selected()})},null,10,A)])}const B=_(x,[["render",E],["__scopeId","data-v-479f3651"]]);const N={components:{ThemeSmall:B},methods:{updateThemes(){this.mode++},redirect(n){window.open(n)},finalRedirectRestricted(){this.spotifyClientId||this.spotifyClientSecret||fetch("/api/config/spotify",{method:"POST",body:JSON.stringify({id:"restricted",secret:"restricted"})}).then(n=>{n.status==200&&(setTimeout(()=>fetch("/api/releases"),1e3),this.mode++,setTimeout(()=>{this.$router.push("/")},6*1e3))})},async finalRedirect(){!this.spotifyClientId||!this.spotifyClientSecret||(await v(this.spotifyClientId,this.spotifyClientSecret),setTimeout(()=>fetch("/api/releases"),1e3),setTimeout(()=>fetch("/api/news/articles"),1e3),this.mode++,setTimeout(async()=>{await C(),this.$router.push("/")},6*1e3))}},data(){setInterval(()=>{if(this.mode<3){this.mode++;return}},7*1e3);const n=["dynamic","dark","light"],s=window.getCurrentTheme();return{mode:0,themes:n,themeSelected:s,spotifyClientId:"",spotifyClientSecret:""}},async mounted(){await g()||this.$router.push("/")}},t=n=>(I("data-v-d5fb03e7"),n=n(),R(),n),V={class:"welcome bouncy centred-column"},Y={key:0,class:"first centred-column"},O=t(()=>e("p",null,"Welcome to",-1)),D=t(()=>e("h1",null,"reAudioPlayer ONE",-1)),F=[O,D],L={key:1,class:"first centred-column"},P=t(()=>e("p",null,"The free audio player with the most extensive catalogue",-1)),U=t(()=>e("h1",null,"ARE YOU READY?",-1)),W=[P,U],H={key:2,class:"first centred-column"},M=t(()=>e("h1",null,"Almost There",-1)),z=t(()=>e("p",null,"After a few configurations you're ready to go",-1)),G=[M,z],J={key:3,class:"permanent centred-column"},j=t(()=>e("h1",null,"Pick a Theme",-1)),q=t(()=>e("p",null,"You'll be able to change the theme at any point later on",-1)),K=t(()=>e("br",null,null,-1)),Q={class:"centred-column appear-delayed"},X={key:4,class:"permanent centred-column"},Z=t(()=>e("h1",null,"Let's integrate Spotify then!",-1)),$=t(()=>e("p",null,"You'll be able to change the tokens at any point later on",-1)),ee=t(()=>e("br",null,null,-1)),te={class:"centred-column appear-delayed"},se=t(()=>e("p",null,"2) Create An App",-1)),oe=t(()=>e("p",null,"3) Enter any name and any description",-1)),ne=t(()=>e("p",null,[p("4) Edit the settings: set the redirect url to "),e("a",{href:"http://reap.ml/"},"http://reap.ml/")],-1)),ie=t(()=>e("p",null,"5) Copy and enter the client id and secret into the corresponding input field",-1)),le=t(()=>e("br",null,null,-1)),de={class:"wrapTogether"},ce=t(()=>e("p",null,"Client ID: ",-1)),re={class:"wrapTogether"},ae=t(()=>e("p",null,"Client Secret: ",-1)),he={class:"wrapTogether spaceBetween"},_e={key:5,class:"centred-column"},pe=t(()=>e("h1",null,"ALRIGHT!",-1)),ue=t(()=>e("p",null,"You're ready to go",-1)),me=[pe,ue];function fe(n,s,u,m,o,l){const r=k("theme-small");return i(),d("div",V,[o.mode==0?(i(),d("div",Y,F)):o.mode==1?(i(),d("div",L,W)):o.mode==2?(i(),d("div",H,G)):o.mode==3?(i(),d("div",J,[j,q,K,e("div",Q,[(i(),d("div",{class:"themes",key:o.themeSelected},[(i(!0),d(S,null,T(o.themes,(c,f)=>(i(),w(r,{onSelected:l.updateThemes,key:f,name:c},null,8,["onSelected","name"]))),128))]))])])):o.mode==4?(i(),d("div",X,[Z,$,ee,e("div",te,[e("p",null,[p("1) Head over to the "),e("a",{onClick:s[0]||(s[0]=()=>l.redirect("https://developer.spotify.com/dashboard/applications"))},"spotify developer dashboard")]),se,oe,ne,ie,le,e("div",de,[ce,a(e("input",{type:"text","onUpdate:modelValue":s[1]||(s[1]=c=>o.spotifyClientId=c)},null,512),[[h,o.spotifyClientId]])]),e("div",re,[ae,a(e("input",{type:"text","onUpdate:modelValue":s[2]||(s[2]=c=>o.spotifyClientSecret=c)},null,512),[[h,o.spotifyClientSecret]])]),e("div",he,[e("button",{onClick:s[3]||(s[3]=(...c)=>l.finalRedirect&&l.finalRedirect(...c))},"continue"),e("button",{onClick:s[4]||(s[4]=(...c)=>l.finalRedirectRestricted&&l.finalRedirectRestricted(...c)),class:"restrictedMode"},"enter restricted mode")])])])):o.mode==5?(i(),d("div",_e,me)):b("",!0)])}const ve=_(N,[["render",fe],["__scopeId","data-v-d5fb03e7"]]);export{ve as default}; diff --git a/src/ui/dist/assets/Welcome.9f2613e4.js.gz b/src/ui/dist/assets/Welcome.9f2613e4.js.gz new file mode 100644 index 000000000..3cf64c7df Binary files /dev/null and b/src/ui/dist/assets/Welcome.9f2613e4.js.gz differ diff --git a/src/ui/dist/assets/Welcome.d749cf62.js.gz b/src/ui/dist/assets/Welcome.d749cf62.js.gz deleted file mode 100644 index 1afb8899c..000000000 Binary files a/src/ui/dist/assets/Welcome.d749cf62.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/index.49a58e31.js.gz b/src/ui/dist/assets/index.49a58e31.js.gz deleted file mode 100644 index 882cd7bc0..000000000 Binary files a/src/ui/dist/assets/index.49a58e31.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/index.97c4f77b.js b/src/ui/dist/assets/index.819329ca.js similarity index 93% rename from src/ui/dist/assets/index.97c4f77b.js rename to src/ui/dist/assets/index.819329ca.js index 5892940c5..da6aad5ef 100644 --- a/src/ui/dist/assets/index.97c4f77b.js +++ b/src/ui/dist/assets/index.819329ca.js @@ -1 +1 @@ -import{_ as y,o,c as i,a,b as f,t as $,d as u,r as C,e as I,f as d,w as c,g as l,h as q,F as h,i as p,u as w,p as B,j as F,k as j,l as D,m as N,n as g,q as E,s as T}from"./index.1d09503d.js";import{P,g as R,F as z,c as L}from"./song.619409cb.js";import{T as b}from"./TrackCompact.b3e226ee.js";import{P as x}from"./PlaylistEntry.486af7f1.js";import{P as M}from"./PlaylistItem.41431c3c.js";import{I as V}from"./Dropdown.f68f135c.js";import"./ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.c66e56c3.js";import"./TrackInfo.a2d7128f.js";import"./ImportSpotifySong.vue_vue_type_script_setup_true_lang.66b612a0.js";import"./EditSong.vue_vue_type_script_setup_true_lang.b4546726.js";import"./playerInPicture.37a9ab56.js";const G={name:"FlexShelf",props:{heading:String,icon:String}},J={class:"shelf"},W={class:"header"},A={key:0},K={key:0,class:"icon material-symbols-round"},Q={class:"items"};function U(e,s,_,r,t,n){return o(),i("div",J,[a("div",W,[_.heading||_.icon?(o(),i("h2",A,[f($(_.heading),1),_.icon?(o(),i("span",K,$(_.icon),1)):u("",!0)])):u("",!0)]),a("div",Q,[C(e.$slots,"default",{},void 0,!0)])])}const v=y(G,[["render",U],["__scopeId","data-v-b884f5aa"]]);const X={class:"home-playlist drop-shadow-md"},Y={__name:"Playlist",props:{name:{type:String,required:!0},cover:{type:String,required:!0},href:{type:String,required:!0}},setup(e){return(s,_)=>{const r=I("router-link");return o(),d(r,{to:e.href,class:"no-underline"},{default:c(()=>[a("div",X,[l(q,{src:e.cover,type:"playlist"},null,8,["src"]),a("h2",null,$(e.name),1)])]),_:1},8,["to"])}}},Z=y(Y,[["__scopeId","data-v-68017d43"]]);const ee=e=>(j("data-v-298fbe10"),e=e(),D(),e),te={class:"home"},se={class:"main"},oe={key:0,class:"playlists"},ne={key:1,class:"liked"},ae={key:2,class:"breaking"},ie={class:"side"},le={key:0,class:"releases"},re={key:1,class:"disovery"},ce={key:2,class:"recommendations"},de=ee(()=>a("h2",null,"Recommendations",-1)),_e={name:"Home",data(){const e=new Date;return{greeting:e.getHours()<12?"Good morning":e.getHours()<18?"Good afternoon":"Good evening",releases:[],picks:[],songs:[],liked:[],breaking:[],recommendations:[],data:F()}},mounted(){fetch("/api/releases").then(e=>e.json()).then(e=>{this.releases=e.slice(0,3)}),fetch("/api/me/liked").then(e=>e.json()).then(e=>{this.liked=e.songs.slice(0,3)}),fetch("/api/me/new").then(e=>e.json()).then(e=>{this.breaking=e.songs.slice(0,3)}),this.pick()},computed:{playlists(){return this.data.playlists}},methods:{playDiscover(e){fetch("/api/player/load",{method:"POST",body:JSON.stringify({id:e.id,type:"track"})})},playRecommendation(e){const s=new CustomEvent("player.play",{detail:{artist:e.artist,title:e.title,source:e.source||e.url}});window.dispatchEvent(s)},async pick(){if(!this.data.playlists.length){setTimeout(()=>this.pick(),2e3);return}if(this.songs=(await Promise.all(this.playlists.map(async e=>{var s;return((s=await R(e.id))==null?void 0:s.songs)||[]}))).flat(),!(this.songs.length<3)){for(let e=0;e<3;e++)this.picks.push(this.songs[Math.floor(Math.random()*this.songs.length)]);fetch("/api/spotify/recommendations",{method:"POST",body:JSON.stringify({query:`${this.picks[0].artist} ${this.picks[0].title}`})}).then(e=>e.json()).then(e=>{this.recommendations=e.slice(0,3)})}}}},ue=Object.assign(_e,{setup(e){return(s,_)=>{const r=I("router-link");return o(),i("div",te,[a("div",se,[s.playlists.length?(o(),i("div",oe,[a("h2",null,[l(r,{to:"/collection/playlists",class:"linkOnHover"},{default:c(()=>[f("Playlists")]),_:1})]),l(v,null,{default:c(()=>[(o(!0),i(h,null,p(s.playlists,(t,n)=>(o(),d(Z,{key:n,name:t.name,cover:t.cover,href:t==null?void 0:t.href},null,8,["name","cover","href"]))),128))]),_:1})])):u("",!0),s.liked.length?(o(),i("div",ne,[a("h2",null,[l(r,{to:"/collection/tracks",class:"linkOnHover"},{default:c(()=>[f("Liked Songs")]),_:1})]),l(P),(o(!0),i(h,null,p(s.liked,(t,n)=>(o(),d(x,{key:n,index:n,song:t,"playlist-id":-1,"with-cover":""},null,8,["index","song"]))),128))])):u("",!0),s.breaking.length?(o(),i("div",ae,[a("h2",null,[l(r,{to:"/collection/tracks/breaking",class:"linkOnHover"},{default:c(()=>[f("Breaking Songs")]),_:1})]),l(P),(o(!0),i(h,null,p(s.breaking,(t,n)=>(o(),d(x,{key:n,index:n,song:t,"playlist-id":-2,"with-cover":""},null,8,["index","song"]))),128))])):u("",!0)]),a("div",ie,[s.releases.length?(o(),i("div",le,[a("h2",null,[l(r,{to:"/collection/releases",class:"linkOnHover"},{default:c(()=>[f("Out now")]),_:1})]),l(v,null,{default:c(()=>[(o(!0),i(h,null,p(s.releases,(t,n)=>(o(),d(b,{onPlay:()=>s.playRecommendation(t),key:n,artist:t.artist,title:t.title,cover:t.cover,href:t.url},null,8,["onPlay","artist","title","cover","href"]))),128))]),_:1})])):u("",!0),s.picks.length?(o(),i("div",re,[a("h2",null,[l(r,{to:"/discover",class:"linkOnHover"},{default:c(()=>[f("Discover")]),_:1})]),l(v,null,{default:c(()=>[(o(!0),i(h,null,p(s.picks,(t,n)=>(o(),d(b,{onPlay:()=>s.playDiscover(t),key:n,artist:t.artist,title:t.title,cover:w(B)(t.cover),id:t.id,href:t.href},null,8,["onPlay","artist","title","cover","id","href"]))),128))]),_:1})])):u("",!0),s.recommendations.length?(o(),i("div",ce,[de,l(v,null,{default:c(()=>[(o(!0),i(h,null,p(s.recommendations,(t,n)=>(o(),d(b,{onPlay:()=>s.playRecommendation(t),key:n,artist:t.artist,title:t.title,cover:t.cover,href:t.source},null,8,["onPlay","artist","title","cover","href"]))),128))]),_:1})])):u("",!0)])])}}}),he=y(ue,[["__scopeId","data-v-298fbe10"]]);const pe={},me={class:"card"};function fe(e,s){return o(),i("div",me,[C(e.$slots,"default",{},void 0,!0)])}const O=y(pe,[["render",fe],["__scopeId","data-v-a2964c73"]]),ye={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 168 168"},ve=a("path",{fill:"#111",d:"M83.996.277C37.747.277.253 37.77.253 84.019c0 46.251 37.494 83.741 83.743 83.741 46.254 0 83.744-37.49 83.744-83.741 0-46.246-37.49-83.738-83.745-83.738l.001-.004zm38.404 120.78a5.217 5.217 0 0 1-7.18 1.73c-19.662-12.01-44.414-14.73-73.564-8.07a5.222 5.222 0 0 1-6.249-3.93 5.213 5.213 0 0 1 3.926-6.25c31.9-7.291 59.263-4.15 81.337 9.34 2.46 1.51 3.24 4.72 1.73 7.18zm10.25-22.805c-1.89 3.075-5.91 4.045-8.98 2.155-22.51-13.839-56.823-17.846-83.448-9.764-3.453 1.043-7.1-.903-8.148-4.35a6.538 6.538 0 0 1 4.354-8.143c30.413-9.228 68.222-4.758 94.072 11.127 3.07 1.89 4.04 5.91 2.15 8.976v-.001zm.88-23.744c-26.99-16.031-71.52-17.505-97.289-9.684-4.138 1.255-8.514-1.081-9.768-5.219a7.835 7.835 0 0 1 5.221-9.771c29.581-8.98 78.756-7.245 109.83 11.202a7.823 7.823 0 0 1 2.74 10.733c-2.2 3.722-7.02 4.949-10.73 2.739z"},null,-1),ke=[ve];function ge(e,s){return o(),i("svg",ye,ke)}const be={render:ge},k=e=>(j("data-v-a00595fa"),e=e(),D(),e),$e={class:"onboarding p-4"},we=k(()=>a("h1",null,"So nice to meet you!",-1)),Se=k(()=>a("p",null,"Let's get you set up",-1)),Pe={class:"grid grid-cols-2 gap-4 mt-8"},xe=k(()=>a("div",{class:"flex flex-row items-center"},[a("span",{class:"material-symbols-rounded ms-wght-700 text-4xl mr-4"},"add"),a("h2",null,"Create your first playlist")],-1)),Oe={class:"flex flex-row justify-end w-full"},Ce={class:"flex flex-row items-center"},Ie=k(()=>a("h2",null,"Import from Spotify",-1)),Fe={class:"spotify-playlists"},je=N({__name:"Onboarding",setup(e){const s=g([]),_=g(!1),r=g(null);E(),T().then(n=>{_.value=n}),fetch("/api/spotify/playlists").then(n=>n.json()).then(n=>{s.value=n});const t={fields:[{name:"name",label:"Name",placeholder:"Playlist name",type:"text",required:!0},{name:"description",label:"Description",placeholder:"Playlist description",type:"text",required:!1}],submit:{label:"Create",action:async()=>{const n=r.value.toObject();await L(n.name,n.description)}}};return(n,S)=>(o(),i("div",$e,[we,Se,a("div",Pe,[l(O,null,{default:c(()=>[xe,l(z,{ref_key:"createForm",ref:r,options:t.fields},null,8,["options"]),a("div",Oe,[l(V,{onClick:S[0]||(S[0]=m=>t.submit.action()),icon:"add",label:t.submit.label},null,8,["label"])])]),_:1}),s.value.length?(o(),d(O,{key:0},{default:c(()=>[a("div",Ce,[l(w(be),{class:"spotify mr-4"}),Ie]),a("div",Fe,[(o(!0),i(h,null,p(s.value,(m,H)=>(o(),d(M,{key:H,cover:m.cover,description:m.description,title:m.name,id:m.id,spotify:!0,href:`https://open.spotify.com/playlist/${m.id}`},null,8,["cover","description","title","id","href"]))),128))])]),_:1})):u("",!0)])]))}});const De=y(je,[["__scopeId","data-v-a00595fa"]]),Ge={__name:"index",setup(e){const s=F();return(_,r)=>w(s).notEmpty?(o(),d(he,{key:0})):(o(),d(De,{key:1}))}};export{Ge as default}; +import{_ as y,o,c as i,a,b as f,t as $,d as u,r as C,e as I,f as d,w as c,g as l,h as q,F as h,i as p,u as w,p as B,j as F,k as j,l as D,m as N,n as g,q as E,s as T}from"./index.c970909a.js";import{P,g as R,F as z,c as L}from"./song.6a60a886.js";import{T as b}from"./TrackCompact.3692910e.js";import{P as x}from"./PlaylistEntry.75d93026.js";import{P as M}from"./PlaylistItem.ca2725f3.js";import{I as V}from"./Dropdown.7541a2ee.js";import"./ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.ec33d761.js";import"./TrackInfo.2ed5fbe0.js";import"./ImportSpotifySong.vue_vue_type_script_setup_true_lang.c34c7594.js";import"./EditSong.vue_vue_type_script_setup_true_lang.42f3815c.js";import"./playerInPicture.37a9ab56.js";const G={name:"FlexShelf",props:{heading:String,icon:String}},J={class:"shelf"},W={class:"header"},A={key:0},K={key:0,class:"icon material-symbols-round"},Q={class:"items"};function U(e,s,_,r,t,n){return o(),i("div",J,[a("div",W,[_.heading||_.icon?(o(),i("h2",A,[f($(_.heading),1),_.icon?(o(),i("span",K,$(_.icon),1)):u("",!0)])):u("",!0)]),a("div",Q,[C(e.$slots,"default",{},void 0,!0)])])}const v=y(G,[["render",U],["__scopeId","data-v-b884f5aa"]]);const X={class:"home-playlist drop-shadow-md"},Y={__name:"Playlist",props:{name:{type:String,required:!0},cover:{type:String,required:!0},href:{type:String,required:!0}},setup(e){return(s,_)=>{const r=I("router-link");return o(),d(r,{to:e.href,class:"no-underline"},{default:c(()=>[a("div",X,[l(q,{src:e.cover,type:"playlist"},null,8,["src"]),a("h2",null,$(e.name),1)])]),_:1},8,["to"])}}},Z=y(Y,[["__scopeId","data-v-68017d43"]]);const ee=e=>(j("data-v-298fbe10"),e=e(),D(),e),te={class:"home"},se={class:"main"},oe={key:0,class:"playlists"},ne={key:1,class:"liked"},ae={key:2,class:"breaking"},ie={class:"side"},le={key:0,class:"releases"},re={key:1,class:"disovery"},ce={key:2,class:"recommendations"},de=ee(()=>a("h2",null,"Recommendations",-1)),_e={name:"Home",data(){const e=new Date;return{greeting:e.getHours()<12?"Good morning":e.getHours()<18?"Good afternoon":"Good evening",releases:[],picks:[],songs:[],liked:[],breaking:[],recommendations:[],data:F()}},mounted(){fetch("/api/releases").then(e=>e.json()).then(e=>{this.releases=e.slice(0,3)}),fetch("/api/me/liked").then(e=>e.json()).then(e=>{this.liked=e.songs.slice(0,3)}),fetch("/api/me/new").then(e=>e.json()).then(e=>{this.breaking=e.songs.slice(0,3)}),this.pick()},computed:{playlists(){return this.data.playlists}},methods:{playDiscover(e){fetch("/api/player/load",{method:"POST",body:JSON.stringify({id:e.id,type:"track"})})},playRecommendation(e){const s=new CustomEvent("player.play",{detail:{artist:e.artist,title:e.title,source:e.source||e.url}});window.dispatchEvent(s)},async pick(){if(!this.data.playlists.length){setTimeout(()=>this.pick(),2e3);return}if(this.songs=(await Promise.all(this.playlists.map(async e=>{var s;return((s=await R(e.id))==null?void 0:s.songs)||[]}))).flat(),!(this.songs.length<3)){for(let e=0;e<3;e++)this.picks.push(this.songs[Math.floor(Math.random()*this.songs.length)]);fetch("/api/spotify/recommendations",{method:"POST",body:JSON.stringify({query:`${this.picks[0].artist} ${this.picks[0].title}`})}).then(e=>e.json()).then(e=>{this.recommendations=e.slice(0,3)})}}}},ue=Object.assign(_e,{setup(e){return(s,_)=>{const r=I("router-link");return o(),i("div",te,[a("div",se,[s.playlists.length?(o(),i("div",oe,[a("h2",null,[l(r,{to:"/collection/playlists",class:"linkOnHover"},{default:c(()=>[f("Playlists")]),_:1})]),l(v,null,{default:c(()=>[(o(!0),i(h,null,p(s.playlists,(t,n)=>(o(),d(Z,{key:n,name:t.name,cover:t.cover,href:t==null?void 0:t.href},null,8,["name","cover","href"]))),128))]),_:1})])):u("",!0),s.liked.length?(o(),i("div",ne,[a("h2",null,[l(r,{to:"/collection/tracks",class:"linkOnHover"},{default:c(()=>[f("Liked Songs")]),_:1})]),l(P),(o(!0),i(h,null,p(s.liked,(t,n)=>(o(),d(x,{key:n,index:n,song:t,"playlist-id":-1,"with-cover":""},null,8,["index","song"]))),128))])):u("",!0),s.breaking.length?(o(),i("div",ae,[a("h2",null,[l(r,{to:"/collection/tracks/breaking",class:"linkOnHover"},{default:c(()=>[f("Breaking Songs")]),_:1})]),l(P),(o(!0),i(h,null,p(s.breaking,(t,n)=>(o(),d(x,{key:n,index:n,song:t,"playlist-id":-2,"with-cover":""},null,8,["index","song"]))),128))])):u("",!0)]),a("div",ie,[s.releases.length?(o(),i("div",le,[a("h2",null,[l(r,{to:"/collection/releases",class:"linkOnHover"},{default:c(()=>[f("Out now")]),_:1})]),l(v,null,{default:c(()=>[(o(!0),i(h,null,p(s.releases,(t,n)=>(o(),d(b,{onPlay:()=>s.playRecommendation(t),key:n,artist:t.artist,title:t.title,cover:t.cover,href:t.url},null,8,["onPlay","artist","title","cover","href"]))),128))]),_:1})])):u("",!0),s.picks.length?(o(),i("div",re,[a("h2",null,[l(r,{to:"/discover",class:"linkOnHover"},{default:c(()=>[f("Discover")]),_:1})]),l(v,null,{default:c(()=>[(o(!0),i(h,null,p(s.picks,(t,n)=>(o(),d(b,{onPlay:()=>s.playDiscover(t),key:n,artist:t.artist,title:t.title,cover:w(B)(t.cover),id:t.id,href:t.href},null,8,["onPlay","artist","title","cover","id","href"]))),128))]),_:1})])):u("",!0),s.recommendations.length?(o(),i("div",ce,[de,l(v,null,{default:c(()=>[(o(!0),i(h,null,p(s.recommendations,(t,n)=>(o(),d(b,{onPlay:()=>s.playRecommendation(t),key:n,artist:t.artist,title:t.title,cover:t.cover,href:t.source},null,8,["onPlay","artist","title","cover","href"]))),128))]),_:1})])):u("",!0)])])}}}),he=y(ue,[["__scopeId","data-v-298fbe10"]]);const pe={},me={class:"card"};function fe(e,s){return o(),i("div",me,[C(e.$slots,"default",{},void 0,!0)])}const O=y(pe,[["render",fe],["__scopeId","data-v-a2964c73"]]),ye={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 168 168"},ve=a("path",{fill:"#111",d:"M83.996.277C37.747.277.253 37.77.253 84.019c0 46.251 37.494 83.741 83.743 83.741 46.254 0 83.744-37.49 83.744-83.741 0-46.246-37.49-83.738-83.745-83.738l.001-.004zm38.404 120.78a5.217 5.217 0 0 1-7.18 1.73c-19.662-12.01-44.414-14.73-73.564-8.07a5.222 5.222 0 0 1-6.249-3.93 5.213 5.213 0 0 1 3.926-6.25c31.9-7.291 59.263-4.15 81.337 9.34 2.46 1.51 3.24 4.72 1.73 7.18zm10.25-22.805c-1.89 3.075-5.91 4.045-8.98 2.155-22.51-13.839-56.823-17.846-83.448-9.764-3.453 1.043-7.1-.903-8.148-4.35a6.538 6.538 0 0 1 4.354-8.143c30.413-9.228 68.222-4.758 94.072 11.127 3.07 1.89 4.04 5.91 2.15 8.976v-.001zm.88-23.744c-26.99-16.031-71.52-17.505-97.289-9.684-4.138 1.255-8.514-1.081-9.768-5.219a7.835 7.835 0 0 1 5.221-9.771c29.581-8.98 78.756-7.245 109.83 11.202a7.823 7.823 0 0 1 2.74 10.733c-2.2 3.722-7.02 4.949-10.73 2.739z"},null,-1),ke=[ve];function ge(e,s){return o(),i("svg",ye,ke)}const be={render:ge},k=e=>(j("data-v-a00595fa"),e=e(),D(),e),$e={class:"onboarding p-4"},we=k(()=>a("h1",null,"So nice to meet you!",-1)),Se=k(()=>a("p",null,"Let's get you set up",-1)),Pe={class:"grid grid-cols-2 gap-4 mt-8"},xe=k(()=>a("div",{class:"flex flex-row items-center"},[a("span",{class:"material-symbols-rounded ms-wght-700 text-4xl mr-4"},"add"),a("h2",null,"Create your first playlist")],-1)),Oe={class:"flex flex-row justify-end w-full"},Ce={class:"flex flex-row items-center"},Ie=k(()=>a("h2",null,"Import from Spotify",-1)),Fe={class:"spotify-playlists"},je=N({__name:"Onboarding",setup(e){const s=g([]),_=g(!1),r=g(null);E(),T().then(n=>{_.value=n}),fetch("/api/spotify/playlists").then(n=>n.json()).then(n=>{s.value=n});const t={fields:[{name:"name",label:"Name",placeholder:"Playlist name",type:"text",required:!0},{name:"description",label:"Description",placeholder:"Playlist description",type:"text",required:!1}],submit:{label:"Create",action:async()=>{const n=r.value.toObject();await L(n.name,n.description)}}};return(n,S)=>(o(),i("div",$e,[we,Se,a("div",Pe,[l(O,null,{default:c(()=>[xe,l(z,{ref_key:"createForm",ref:r,options:t.fields},null,8,["options"]),a("div",Oe,[l(V,{onClick:S[0]||(S[0]=m=>t.submit.action()),icon:"add",label:t.submit.label},null,8,["label"])])]),_:1}),s.value.length?(o(),d(O,{key:0},{default:c(()=>[a("div",Ce,[l(w(be),{class:"spotify mr-4"}),Ie]),a("div",Fe,[(o(!0),i(h,null,p(s.value,(m,H)=>(o(),d(M,{key:H,cover:m.cover,description:m.description,title:m.name,id:m.id,spotify:!0,href:`https://open.spotify.com/playlist/${m.id}`},null,8,["cover","description","title","id","href"]))),128))])]),_:1})):u("",!0)])]))}});const De=y(je,[["__scopeId","data-v-a00595fa"]]),Ge={__name:"index",setup(e){const s=F();return(_,r)=>w(s).notEmpty?(o(),d(he,{key:0})):(o(),d(De,{key:1}))}};export{Ge as default}; diff --git a/src/ui/dist/assets/index.819329ca.js.gz b/src/ui/dist/assets/index.819329ca.js.gz new file mode 100644 index 000000000..1c79c4b99 Binary files /dev/null and b/src/ui/dist/assets/index.819329ca.js.gz differ diff --git a/src/ui/dist/assets/index.97c4f77b.js.gz b/src/ui/dist/assets/index.97c4f77b.js.gz deleted file mode 100644 index 938853aa8..000000000 Binary files a/src/ui/dist/assets/index.97c4f77b.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/index.981eedbc.js.gz b/src/ui/dist/assets/index.981eedbc.js.gz deleted file mode 100644 index b4785b723..000000000 Binary files a/src/ui/dist/assets/index.981eedbc.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/index.49a58e31.js b/src/ui/dist/assets/index.99d9af59.js similarity index 89% rename from src/ui/dist/assets/index.49a58e31.js rename to src/ui/dist/assets/index.99d9af59.js index 2dd367299..653258380 100644 --- a/src/ui/dist/assets/index.49a58e31.js +++ b/src/ui/dist/assets/index.99d9af59.js @@ -1 +1 @@ -import{F as f}from"./FixedPlaylistHeader.28982abf.js";import{P as v}from"./PlaylistEntry.486af7f1.js";import{P}from"./song.619409cb.js";import{_ as S,J as I,p as k,e as n,I as x,o as d,c as r,g as c,C as w,y as C,a as t,t as p,F as H,i as b,f as N,k as E,l as B}from"./index.1d09503d.js";const F={components:{PlaylistEntry:v,FixedPlaylistHeader:f,PlaylistHeader:P},props:{src:{type:String,required:!0},id:{type:Number,required:!0}},data(){return this.updateTracks(),{fixedHeaderHidden:!0,playlist:[],playlistName:"",store:I(),selectedSongId:-1}},watch:{currentSong(){this.updateIsPlaying()}},computed:{currentSong(){return this.store.song.id}},methods:{parseCover:k,download(e){var o;const a=(o=this.playlist)==null?void 0:o[e];window.open(`/api/tracks/${a.id}/download`)},updateIsPlaying(){console.log("Updating is playing",this.currentSong),this.playlist.forEach(e=>{e.playing=e.id==this.currentSong})},headerVisibilityChanged(e){this.fixedHeaderHidden=e},updateTracks(){fetch(this.src).then(e=>e.json()).then(e=>{this.playlist=e.songs,this.playlistName=e.name,this.updateIsPlaying()})},loadPlaylist(){fetch("/api/player/load",{method:"POST",body:JSON.stringify({type:"collection"})})}}},y=e=>(E("data-v-a0e4630d"),e=e(),B(),e),T={class:"playlist"},V={class:"padding-20"},D=y(()=>t("hr",null,null,-1)),U={class:"padding-20"},q={class:"grid"},J=y(()=>t("hr",null,null,-1)),O={class:"playlistEntries"};function j(e,a,o,z,s,l){const h=n("fixed-playlist-header"),_=n("PlaylistHeader"),u=n("PlaylistEntry"),g=x("observe-visibility");return d(),r("div",T,[c(h,{onClick:l.loadPlaylist,ref:"fixedHeading",class:w({hidden:s.fixedHeaderHidden}),title:s.playlistName},null,8,["onClick","class","title"]),C((d(),r("div",V,[t("h1",null,p(s.playlistName),1),t("h6",null,"Your "+p(s.playlist.length)+" favourite tracks, auto-generated just for you",1)])),[[g,l.headerVisibilityChanged]]),D,t("div",U,[t("span",{id:"loadPlaylist",onClick:a[0]||(a[0]=(...i)=>l.loadPlaylist&&l.loadPlaylist(...i)),class:"material-icons-outlined"},"play_circle_filled"),t("div",q,[c(_,{class:"hideIfMobile","with-more":""}),J,t("div",O,[(d(!0),r(H,null,b(s.playlist,(i,m)=>(d(),N(u,{key:i.source,index:m,song:i,"with-cover":"","with-album":"","with-more":"","playlist-id":o.id,onClick:L=>s.selectedSongId==i.id?s.selectedSongId=-1:s.selectedSongId=i.id,onUpdate:l.updateTracks,selected:s.selectedSongId==i.id},null,8,["index","song","playlist-id","onClick","onUpdate","selected"]))),128))])])])])}const K=S(F,[["render",j],["__scopeId","data-v-a0e4630d"]]);export{K as I}; +import{F as f}from"./FixedPlaylistHeader.8b130c57.js";import{P as v}from"./PlaylistEntry.75d93026.js";import{P}from"./song.6a60a886.js";import{_ as S,J as I,p as k,e as n,I as x,o as d,c as r,g as c,C as w,y as C,a as t,t as p,F as H,i as b,f as N,k as E,l as B}from"./index.c970909a.js";const F={components:{PlaylistEntry:v,FixedPlaylistHeader:f,PlaylistHeader:P},props:{src:{type:String,required:!0},id:{type:Number,required:!0}},data(){return this.updateTracks(),{fixedHeaderHidden:!0,playlist:[],playlistName:"",store:I(),selectedSongId:-1}},watch:{currentSong(){this.updateIsPlaying()}},computed:{currentSong(){return this.store.song.id}},methods:{parseCover:k,download(e){var o;const a=(o=this.playlist)==null?void 0:o[e];window.open(`/api/tracks/${a.id}/download`)},updateIsPlaying(){console.log("Updating is playing",this.currentSong),this.playlist.forEach(e=>{e.playing=e.id==this.currentSong})},headerVisibilityChanged(e){this.fixedHeaderHidden=e},updateTracks(){fetch(this.src).then(e=>e.json()).then(e=>{this.playlist=e.songs,this.playlistName=e.name,this.updateIsPlaying()})},loadPlaylist(){fetch("/api/player/load",{method:"POST",body:JSON.stringify({type:"collection"})})}}},y=e=>(E("data-v-a0e4630d"),e=e(),B(),e),T={class:"playlist"},V={class:"padding-20"},D=y(()=>t("hr",null,null,-1)),U={class:"padding-20"},q={class:"grid"},J=y(()=>t("hr",null,null,-1)),O={class:"playlistEntries"};function j(e,a,o,z,s,l){const h=n("fixed-playlist-header"),_=n("PlaylistHeader"),u=n("PlaylistEntry"),g=x("observe-visibility");return d(),r("div",T,[c(h,{onClick:l.loadPlaylist,ref:"fixedHeading",class:w({hidden:s.fixedHeaderHidden}),title:s.playlistName},null,8,["onClick","class","title"]),C((d(),r("div",V,[t("h1",null,p(s.playlistName),1),t("h6",null,"Your "+p(s.playlist.length)+" favourite tracks, auto-generated just for you",1)])),[[g,l.headerVisibilityChanged]]),D,t("div",U,[t("span",{id:"loadPlaylist",onClick:a[0]||(a[0]=(...i)=>l.loadPlaylist&&l.loadPlaylist(...i)),class:"material-icons-outlined"},"play_circle_filled"),t("div",q,[c(_,{class:"hideIfMobile","with-more":""}),J,t("div",O,[(d(!0),r(H,null,b(s.playlist,(i,m)=>(d(),N(u,{key:i.source,index:m,song:i,"with-cover":"","with-album":"","with-more":"","playlist-id":o.id,onClick:L=>s.selectedSongId==i.id?s.selectedSongId=-1:s.selectedSongId=i.id,onUpdate:l.updateTracks,selected:s.selectedSongId==i.id},null,8,["index","song","playlist-id","onClick","onUpdate","selected"]))),128))])])])])}const K=S(F,[["render",j],["__scopeId","data-v-a0e4630d"]]);export{K as I}; diff --git a/src/ui/dist/assets/index.99d9af59.js.gz b/src/ui/dist/assets/index.99d9af59.js.gz new file mode 100644 index 000000000..40cd6d824 Binary files /dev/null and b/src/ui/dist/assets/index.99d9af59.js.gz differ diff --git a/src/ui/dist/assets/index.1d09503d.js b/src/ui/dist/assets/index.c970909a.js similarity index 97% rename from src/ui/dist/assets/index.1d09503d.js rename to src/ui/dist/assets/index.c970909a.js index c9f4febf9..7f39d6ec3 100644 --- a/src/ui/dist/assets/index.1d09503d.js +++ b/src/ui/dist/assets/index.c970909a.js @@ -15,7 +15,7 @@ var ac=Object.defineProperty;var lc=(e,t,n)=>t in e?ac(e,t,{enumerable:!0,config * vue-router v4.1.5 * (c) 2022 Eduardo San Martin Morote * @license MIT - */const yn=typeof window<"u";function Mm(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const ke=Object.assign;function Ys(e,t){const n={};for(const r in t){const s=t[r];n[r]=dt(s)?s.map(e):e(s)}return n}const tr=()=>{},dt=Array.isArray,Tm=/\/$/,Im=e=>e.replace(Tm,"");function Zs(e,t,n="/"){let r,s={},i="",o="";const a=t.indexOf("#");let l=t.indexOf("?");return a=0&&(l=-1),l>-1&&(r=t.slice(0,l),i=t.slice(l+1,a>-1?a:t.length),s=e(i)),a>-1&&(r=r||t.slice(0,a),o=t.slice(a,t.length)),r=Bm(r!=null?r:t,n),{fullPath:r+(i&&"?")+i+o,path:r,query:s,hash:o}}function Lm(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function pa(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function $m(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&Bn(t.matched[r],n.matched[s])&&Du(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Bn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Du(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Vm(e[n],t[n]))return!1;return!0}function Vm(e,t){return dt(e)?ma(e,t):dt(t)?ma(t,e):e===t}function ma(e,t){return dt(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function Bm(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/");let s=n.length-1,i,o;for(i=0;i1&&s--;else break;return n.slice(0,s).join("/")+"/"+r.slice(i-(i===r.length?1:0)).join("/")}var hr;(function(e){e.pop="pop",e.push="push"})(hr||(hr={}));var nr;(function(e){e.back="back",e.forward="forward",e.unknown=""})(nr||(nr={}));function jm(e){if(!e)if(yn){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Im(e)}const Dm=/^[^#]+#/;function Nm(e,t){return e.replace(Dm,"#")+t}function Wm(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Ls=()=>({left:window.pageXOffset,top:window.pageYOffset});function Fm(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=Wm(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function va(e,t){return(history.state?history.state.position-t:-1)+e}const Ai=new Map;function Hm(e,t){Ai.set(e,t)}function Um(e){const t=Ai.get(e);return Ai.delete(e),t}let zm=()=>location.protocol+"//"+location.host;function Nu(e,t){const{pathname:n,search:r,hash:s}=t,i=e.indexOf("#");if(i>-1){let a=s.includes(e.slice(i))?e.slice(i).length:1,l=s.slice(a);return l[0]!=="/"&&(l="/"+l),pa(l,"")}return pa(n,e)+r+s}function qm(e,t,n,r){let s=[],i=[],o=null;const a=({state:c})=>{const b=Nu(e,location),y=n.value,O=t.value;let R=0;if(c){if(n.value=b,t.value=c,o&&o===y){o=null;return}R=O?c.position-O.position:0}else r(b);s.forEach(w=>{w(n.value,y,{delta:R,type:hr.pop,direction:R?R>0?nr.forward:nr.back:nr.unknown})})};function l(){o=n.value}function u(c){s.push(c);const b=()=>{const y=s.indexOf(c);y>-1&&s.splice(y,1)};return i.push(b),b}function f(){const{history:c}=window;!c.state||c.replaceState(ke({},c.state,{scroll:Ls()}),"")}function d(){for(const c of i)c();i=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",f)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",f),{pauseListeners:l,listen:u,destroy:d}}function ga(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?Ls():null}}function Km(e){const{history:t,location:n}=window,r={value:Nu(e,n)},s={value:t.state};s.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(l,u,f){const d=e.indexOf("#"),c=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+l:zm()+e+l;try{t[f?"replaceState":"pushState"](u,"",c),s.value=u}catch(b){console.error(b),n[f?"replace":"assign"](c)}}function o(l,u){const f=ke({},t.state,ga(s.value.back,l,s.value.forward,!0),u,{position:s.value.position});i(l,f,!0),r.value=l}function a(l,u){const f=ke({},s.value,t.state,{forward:l,scroll:Ls()});i(f.current,f,!0);const d=ke({},ga(r.value,l,null),{position:f.position+1},u);i(l,d,!1),r.value=l}return{location:r,state:s,push:a,replace:o}}function Ym(e){e=jm(e);const t=Km(e),n=qm(e,t.state,t.location,t.replace);function r(i,o=!0){o||n.pauseListeners(),history.go(i)}const s=ke({location:"",base:e,go:r,createHref:Nm.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function Zm(e){return typeof e=="string"||e&&typeof e=="object"}function Wu(e){return typeof e=="string"||typeof e=="symbol"}const Vt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Fu=Symbol("");var ya;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(ya||(ya={}));function jn(e,t){return ke(new Error,{type:e,[Fu]:!0},t)}function wt(e,t){return e instanceof Error&&Fu in e&&(t==null||!!(e.type&t))}const ba="[^/]+?",Xm={sensitive:!1,strict:!1,start:!0,end:!0},Gm=/[.+*?^${}()[\]/\\]/g;function Jm(e,t){const n=ke({},Xm,t),r=[];let s=n.start?"^":"";const i=[];for(const u of e){const f=u.length?[]:[90];n.strict&&!u.length&&(s+="/");for(let d=0;dt.length?t.length===1&&t[0]===40+40?1:-1:0}function ev(e,t){let n=0;const r=e.score,s=t.score;for(;n0&&t[t.length-1]<0}const tv={type:0,value:""},nv=/[a-zA-Z0-9_]/;function rv(e){if(!e)return[[]];if(e==="/")return[[tv]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(b){throw new Error(`ERR (${n})/"${u}": ${b}`)}let n=0,r=n;const s=[];let i;function o(){i&&s.push(i),i=[]}let a=0,l,u="",f="";function d(){!u||(n===0?i.push({type:0,value:u}):n===1||n===2||n===3?(i.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:u,regexp:f,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),u="")}function c(){u+=l}for(;a{o(h)}:tr}function o(f){if(Wu(f)){const d=r.get(f);d&&(r.delete(f),n.splice(n.indexOf(d),1),d.children.forEach(o),d.alias.forEach(o))}else{const d=n.indexOf(f);d>-1&&(n.splice(d,1),f.record.name&&r.delete(f.record.name),f.children.forEach(o),f.alias.forEach(o))}}function a(){return n}function l(f){let d=0;for(;d=0&&(f.record.path!==n[d].record.path||!Hu(f,n[d]));)d++;n.splice(d,0,f),f.record.name&&!Aa(f)&&r.set(f.record.name,f)}function u(f,d){let c,b={},y,O;if("name"in f&&f.name){if(c=r.get(f.name),!c)throw jn(1,{location:f});O=c.record.name,b=ke(wa(d.params,c.keys.filter(h=>!h.optional).map(h=>h.name)),f.params&&wa(f.params,c.keys.map(h=>h.name))),y=c.stringify(b)}else if("path"in f)y=f.path,c=n.find(h=>h.re.test(y)),c&&(b=c.parse(y),O=c.record.name);else{if(c=d.name?r.get(d.name):n.find(h=>h.re.test(d.path)),!c)throw jn(1,{location:f,currentLocation:d});O=c.record.name,b=ke({},d.params,f.params),y=c.stringify(b)}const R=[];let w=c;for(;w;)R.unshift(w.record),w=w.parent;return{name:O,path:y,params:b,matched:R,meta:lv(R)}}return e.forEach(f=>i(f)),{addRoute:i,resolve:u,removeRoute:o,getRoutes:a,getRecordMatcher:s}}function wa(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function ov(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:av(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function av(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="boolean"?n:n[r];return t}function Aa(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function lv(e){return e.reduce((t,n)=>ke(t,n.meta),{})}function Pa(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function Hu(e,t){return t.children.some(n=>n===e||Hu(e,n))}const Uu=/#/g,uv=/&/g,cv=/\//g,fv=/=/g,dv=/\?/g,zu=/\+/g,hv=/%5B/g,pv=/%5D/g,qu=/%5E/g,mv=/%60/g,Ku=/%7B/g,vv=/%7C/g,Yu=/%7D/g,gv=/%20/g;function to(e){return encodeURI(""+e).replace(vv,"|").replace(hv,"[").replace(pv,"]")}function yv(e){return to(e).replace(Ku,"{").replace(Yu,"}").replace(qu,"^")}function Pi(e){return to(e).replace(zu,"%2B").replace(gv,"+").replace(Uu,"%23").replace(uv,"%26").replace(mv,"`").replace(Ku,"{").replace(Yu,"}").replace(qu,"^")}function bv(e){return Pi(e).replace(fv,"%3D")}function _v(e){return to(e).replace(Uu,"%23").replace(dv,"%3F")}function wv(e){return e==null?"":_v(e).replace(cv,"%2F")}function as(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function Av(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;si&&Pi(i)):[r&&Pi(r)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+n,i!=null&&(t+="="+i))})}return t}function Pv(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=dt(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const kv=Symbol(""),Ca=Symbol(""),$s=Symbol(""),no=Symbol(""),ki=Symbol("");function zn(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e,reset:n}}function Wt(e,t,n,r,s){const i=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((o,a)=>{const l=d=>{d===!1?a(jn(4,{from:n,to:t})):d instanceof Error?a(d):Zm(d)?a(jn(2,{from:t,to:d})):(i&&r.enterCallbacks[s]===i&&typeof d=="function"&&i.push(d),o())},u=e.call(r&&r.instances[s],t,n,l);let f=Promise.resolve(u);e.length<3&&(f=f.then(l)),f.catch(d=>a(d))})}function Xs(e,t,n,r){const s=[];for(const i of e)for(const o in i.components){let a=i.components[o];if(!(t!=="beforeRouteEnter"&&!i.instances[o]))if(Cv(a)){const u=(a.__vccOpts||a)[t];u&&s.push(Wt(u,n,r,i,o))}else{let l=a();s.push(()=>l.then(u=>{if(!u)return Promise.reject(new Error(`Couldn't resolve component "${o}" at "${i.path}"`));const f=Mm(u)?u.default:u;i.components[o]=f;const c=(f.__vccOpts||f)[t];return c&&Wt(c,n,r,i,o)()}))}}return s}function Cv(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Ea(e){const t=Ye($s),n=Ye(no),r=be(()=>t.resolve(F(e.to))),s=be(()=>{const{matched:l}=r.value,{length:u}=l,f=l[u-1],d=n.matched;if(!f||!d.length)return-1;const c=d.findIndex(Bn.bind(null,f));if(c>-1)return c;const b=xa(l[u-2]);return u>1&&xa(f)===b&&d[d.length-1].path!==b?d.findIndex(Bn.bind(null,l[u-2])):c}),i=be(()=>s.value>-1&&Sv(n.params,r.value.params)),o=be(()=>s.value>-1&&s.value===n.matched.length-1&&Du(n.params,r.value.params));function a(l={}){return Ov(l)?t[F(e.replace)?"replace":"push"](F(e.to)).catch(tr):Promise.resolve()}return{route:r,href:be(()=>r.value.href),isActive:i,isExactActive:o,navigate:a}}const Ev=Ne({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Ea,setup(e,{slots:t}){const n=Jt(Ea(e)),{options:r}=Ye($s),s=be(()=>({[Oa(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Oa(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&t.default(n);return e.custom?i:Gi("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},i)}}}),xv=Ev;function Ov(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Sv(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!dt(s)||s.length!==r.length||r.some((i,o)=>i!==s[o]))return!1}return!0}function xa(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Oa=(e,t,n)=>e!=null?e:t!=null?t:n,Rv=Ne({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=Ye(ki),s=be(()=>e.route||r.value),i=Ye(Ca,0),o=be(()=>{let u=F(i);const{matched:f}=s.value;let d;for(;(d=f[u])&&!d.components;)u++;return u}),a=be(()=>s.value.matched[o.value]);Ft(Ca,be(()=>o.value+1)),Ft(kv,a),Ft(ki,s);const l=ce();return Pe(()=>[l.value,a.value,e.name],([u,f,d],[c,b,y])=>{f&&(f.instances[d]=u,b&&b!==f&&u&&u===c&&(f.leaveGuards.size||(f.leaveGuards=b.leaveGuards),f.updateGuards.size||(f.updateGuards=b.updateGuards))),u&&f&&(!b||!Bn(f,b)||!c)&&(f.enterCallbacks[d]||[]).forEach(O=>O(u))},{flush:"post"}),()=>{const u=s.value,f=e.name,d=a.value,c=d&&d.components[f];if(!c)return Sa(n.default,{Component:c,route:u});const b=d.props[f],y=b?b===!0?u.params:typeof b=="function"?b(u):b:null,R=Gi(c,ke({},y,t,{onVnodeUnmounted:w=>{w.component.isUnmounted&&(d.instances[f]=null)},ref:l}));return Sa(n.default,{Component:R,route:u})||R}}});function Sa(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Mv=Rv;function Tv(e){const t=iv(e.routes,e),n=e.parseQuery||Av,r=e.stringifyQuery||ka,s=e.history,i=zn(),o=zn(),a=zn(),l=zc(Vt);let u=Vt;yn&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const f=Ys.bind(null,D=>""+D),d=Ys.bind(null,wv),c=Ys.bind(null,as);function b(D,U){let j,K;return Wu(D)?(j=t.getRecordMatcher(D),K=U):K=D,t.addRoute(K,j)}function y(D){const U=t.getRecordMatcher(D);U&&t.removeRoute(U)}function O(){return t.getRoutes().map(D=>D.record)}function R(D){return!!t.getRecordMatcher(D)}function w(D,U){if(U=ke({},U||l.value),typeof D=="string"){const _=Zs(n,D,U.path),x=t.resolve({path:_.path},U),W=s.createHref(_.fullPath);return ke(_,x,{params:c(x.params),hash:as(_.hash),redirectedFrom:void 0,href:W})}let j;if("path"in D)j=ke({},D,{path:Zs(n,D.path,U.path).path});else{const _=ke({},D.params);for(const x in _)_[x]==null&&delete _[x];j=ke({},D,{params:d(D.params)}),U.params=d(U.params)}const K=t.resolve(j,U),J=D.hash||"";K.params=f(c(K.params));const he=Lm(r,ke({},D,{hash:yv(J),path:K.path})),oe=s.createHref(he);return ke({fullPath:he,hash:J,query:r===ka?Pv(D.query):D.query||{}},K,{redirectedFrom:void 0,href:oe})}function h(D){return typeof D=="string"?Zs(n,D,l.value.path):ke({},D)}function A(D,U){if(u!==D)return jn(8,{from:U,to:D})}function S(D){return L(D)}function I(D){return S(ke(h(D),{replace:!0}))}function V(D){const U=D.matched[D.matched.length-1];if(U&&U.redirect){const{redirect:j}=U;let K=typeof j=="function"?j(D):j;return typeof K=="string"&&(K=K.includes("?")||K.includes("#")?K=h(K):{path:K},K.params={}),ke({query:D.query,hash:D.hash,params:"path"in K?{}:D.params},K)}}function L(D,U){const j=u=w(D),K=l.value,J=D.state,he=D.force,oe=D.replace===!0,_=V(j);if(_)return L(ke(h(_),{state:typeof _=="object"?ke({},J,_.state):J,force:he,replace:oe}),U||j);const x=j;x.redirectedFrom=U;let W;return!he&&$m(r,K,j)&&(W=jn(16,{to:x,from:K}),N(K,K,!0,!1)),(W?Promise.resolve(W):$(x,K)).catch(H=>wt(H)?wt(H,2)?H:p(H):M(H,x,K)).then(H=>{if(H){if(wt(H,2))return L(ke({replace:oe},h(H.to),{state:typeof H.to=="object"?ke({},J,H.to.state):J,force:he}),U||x)}else H=T(x,K,!0,oe,J);return B(x,K,H),H})}function E(D,U){const j=A(D,U);return j?Promise.reject(j):Promise.resolve()}function $(D,U){let j;const[K,J,he]=Iv(D,U);j=Xs(K.reverse(),"beforeRouteLeave",D,U);for(const _ of K)_.leaveGuards.forEach(x=>{j.push(Wt(x,D,U))});const oe=E.bind(null,D,U);return j.push(oe),gn(j).then(()=>{j=[];for(const _ of i.list())j.push(Wt(_,D,U));return j.push(oe),gn(j)}).then(()=>{j=Xs(J,"beforeRouteUpdate",D,U);for(const _ of J)_.updateGuards.forEach(x=>{j.push(Wt(x,D,U))});return j.push(oe),gn(j)}).then(()=>{j=[];for(const _ of D.matched)if(_.beforeEnter&&!U.matched.includes(_))if(dt(_.beforeEnter))for(const x of _.beforeEnter)j.push(Wt(x,D,U));else j.push(Wt(_.beforeEnter,D,U));return j.push(oe),gn(j)}).then(()=>(D.matched.forEach(_=>_.enterCallbacks={}),j=Xs(he,"beforeRouteEnter",D,U),j.push(oe),gn(j))).then(()=>{j=[];for(const _ of o.list())j.push(Wt(_,D,U));return j.push(oe),gn(j)}).catch(_=>wt(_,8)?_:Promise.reject(_))}function B(D,U,j){for(const K of a.list())K(D,U,j)}function T(D,U,j,K,J){const he=A(D,U);if(he)return he;const oe=U===Vt,_=yn?history.state:{};j&&(K||oe?s.replace(D.fullPath,ke({scroll:oe&&_&&_.scroll},J)):s.push(D.fullPath,J)),l.value=D,N(D,U,j,oe),p()}let m;function P(){m||(m=s.listen((D,U,j)=>{if(!fe.listening)return;const K=w(D),J=V(K);if(J){L(ke(J,{replace:!0}),K).catch(tr);return}u=K;const he=l.value;yn&&Hm(va(he.fullPath,j.delta),Ls()),$(K,he).catch(oe=>wt(oe,12)?oe:wt(oe,2)?(L(oe.to,K).then(_=>{wt(_,20)&&!j.delta&&j.type===hr.pop&&s.go(-1,!1)}).catch(tr),Promise.reject()):(j.delta&&s.go(-j.delta,!1),M(oe,K,he))).then(oe=>{oe=oe||T(K,he,!1),oe&&(j.delta&&!wt(oe,8)?s.go(-j.delta,!1):j.type===hr.pop&&wt(oe,20)&&s.go(-1,!1)),B(K,he,oe)}).catch(tr)}))}let C=zn(),g=zn(),v;function M(D,U,j){p(D);const K=g.list();return K.length?K.forEach(J=>J(D,U,j)):console.error(D),Promise.reject(D)}function k(){return v&&l.value!==Vt?Promise.resolve():new Promise((D,U)=>{C.add([D,U])})}function p(D){return v||(v=!D,P(),C.list().forEach(([U,j])=>D?j(D):U()),C.reset()),D}function N(D,U,j,K){const{scrollBehavior:J}=e;if(!yn||!J)return Promise.resolve();const he=!j&&Um(va(D.fullPath,0))||(K||!j)&&history.state&&history.state.scroll||null;return ft().then(()=>J(D,U,he)).then(oe=>oe&&Fm(oe)).catch(oe=>M(oe,D,U))}const q=D=>s.go(D);let ee;const ne=new Set,fe={currentRoute:l,listening:!0,addRoute:b,removeRoute:y,hasRoute:R,getRoutes:O,resolve:w,options:e,push:S,replace:I,go:q,back:()=>q(-1),forward:()=>q(1),beforeEach:i.add,beforeResolve:o.add,afterEach:a.add,onError:g.add,isReady:k,install(D){const U=this;D.component("RouterLink",xv),D.component("RouterView",Mv),D.config.globalProperties.$router=U,Object.defineProperty(D.config.globalProperties,"$route",{enumerable:!0,get:()=>F(l)}),yn&&!ee&&l.value===Vt&&(ee=!0,S(s.location).catch(J=>{}));const j={};for(const J in Vt)j[J]=be(()=>l.value[J]);D.provide($s,U),D.provide(no,Jt(j)),D.provide(ki,l);const K=D.unmount;ne.add(D),D.unmount=function(){ne.delete(D),ne.size<1&&(u=Vt,m&&m(),m=null,l.value=Vt,ee=!1,v=!1),K()}}};return fe}function gn(e){return e.reduce((t,n)=>t.then(()=>n()),Promise.resolve())}function Iv(e,t){const n=[],r=[],s=[],i=Math.max(t.matched.length,e.matched.length);for(let o=0;oBn(u,a))?r.push(a):n.push(a));const l=e.matched[o];l&&(t.matched.find(u=>Bn(u,l))||s.push(l))}return[n,r,s]}function Oy(){return Ye($s)}function Sy(){return Ye(no)}const Lv=[{path:"/",component:()=>Me(()=>import("./index.97c4f77b.js"),["assets/index.97c4f77b.js","assets/index.a9ab7070.css","assets/song.619409cb.js","assets/song.565875f1.css","assets/Dropdown.f68f135c.js","assets/Dropdown.cc052785.css","assets/TrackCompact.b3e226ee.js","assets/TrackCompact.827ae0c2.css","assets/ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.c66e56c3.js","assets/TrackInfo.a2d7128f.js","assets/TrackInfo.764c7643.css","assets/ImportSpotifySong.vue_vue_type_script_setup_true_lang.66b612a0.js","assets/PlaylistEntry.486af7f1.js","assets/PlaylistEntry.8b98aab6.css","assets/EditSong.vue_vue_type_script_setup_true_lang.b4546726.js","assets/playerInPicture.37a9ab56.js","assets/PlaylistItem.41431c3c.js","assets/PlaylistItem.e9227964.css"])},{path:"/discover",component:()=>Me(()=>import("./Explore.c5ba2183.js"),["assets/Explore.c5ba2183.js","assets/Explore.59aaf783.css"]),meta:{title:"Discover - reAudioPlayer One"}},{path:"/search",component:()=>Me(()=>import("./Search.b4e619e4.js"),["assets/Search.b4e619e4.js","assets/Search.188610fb.css","assets/ArtistItem.ae25c587.js","assets/ArtistItem.cdf9f1aa.css","assets/song.619409cb.js","assets/song.565875f1.css","assets/Dropdown.f68f135c.js","assets/Dropdown.cc052785.css","assets/TrackInfo.a2d7128f.js","assets/TrackInfo.764c7643.css","assets/ReleaseItem.eba9b352.js","assets/ReleaseItem.2ca76435.css","assets/ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.c66e56c3.js","assets/ImportSpotifySong.vue_vue_type_script_setup_true_lang.66b612a0.js"]),meta:{title:"Search - reAudioPlayer One"}},{name:"Search",path:"/search/:query",component:()=>Me(()=>import("./Search.b4e619e4.js"),["assets/Search.b4e619e4.js","assets/Search.188610fb.css","assets/ArtistItem.ae25c587.js","assets/ArtistItem.cdf9f1aa.css","assets/song.619409cb.js","assets/song.565875f1.css","assets/Dropdown.f68f135c.js","assets/Dropdown.cc052785.css","assets/TrackInfo.a2d7128f.js","assets/TrackInfo.764c7643.css","assets/ReleaseItem.eba9b352.js","assets/ReleaseItem.2ca76435.css","assets/ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.c66e56c3.js","assets/ImportSpotifySong.vue_vue_type_script_setup_true_lang.66b612a0.js"]),meta:{title:"Search - reAudioPlayer One"}},{path:"/collection/albums",component:()=>Me(()=>import("./Albums.4593d0bc.js"),["assets/Albums.4593d0bc.js","assets/Albums.a0edb897.css","assets/CollectionHeader.a249f890.js","assets/CollectionHeader.209c6d6c.css"]),meta:{title:"Your Library - reAudioPlayer One"}},{path:"/collection/artists",component:()=>Me(()=>import("./Artists.b45ab61b.js"),["assets/Artists.b45ab61b.js","assets/Artists.de7a7e1e.css","assets/FullShelf.434ba053.js","assets/FullShelf.3fda7300.css","assets/ArtistItem.ae25c587.js","assets/ArtistItem.cdf9f1aa.css","assets/song.619409cb.js","assets/song.565875f1.css","assets/Dropdown.f68f135c.js","assets/Dropdown.cc052785.css","assets/TrackInfo.a2d7128f.js","assets/TrackInfo.764c7643.css","assets/CollectionHeader.a249f890.js","assets/CollectionHeader.209c6d6c.css"]),meta:{title:"Your Library - reAudioPlayer One"}},{path:"/collection/playlists",component:()=>Me(()=>import("./Playlists.66fd83c1.js"),["assets/Playlists.66fd83c1.js","assets/Playlists.7339af32.css","assets/FullShelf.434ba053.js","assets/FullShelf.3fda7300.css","assets/PlaylistItem.41431c3c.js","assets/PlaylistItem.e9227964.css","assets/song.619409cb.js","assets/song.565875f1.css","assets/Dropdown.f68f135c.js","assets/Dropdown.cc052785.css","assets/TrackInfo.a2d7128f.js","assets/TrackInfo.764c7643.css","assets/playerInPicture.37a9ab56.js","assets/CollectionHeader.a249f890.js","assets/CollectionHeader.209c6d6c.css"]),meta:{title:"Your Library - reAudioPlayer One"}},{path:"/collection/releases",component:()=>Me(()=>import("./Releases.52d1060c.js"),["assets/Releases.52d1060c.js","assets/Releases.f85f3a42.css","assets/FullShelf.434ba053.js","assets/FullShelf.3fda7300.css","assets/ReleaseItem.eba9b352.js","assets/ReleaseItem.2ca76435.css","assets/ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.c66e56c3.js","assets/song.619409cb.js","assets/song.565875f1.css","assets/Dropdown.f68f135c.js","assets/Dropdown.cc052785.css","assets/TrackInfo.a2d7128f.js","assets/TrackInfo.764c7643.css","assets/CollectionHeader.a249f890.js","assets/CollectionHeader.209c6d6c.css"]),meta:{title:"Releases - reAudioPlayer One"}},{path:"/collection/tracks",component:()=>Me(()=>import("./Tracks.31f4a252.js"),["assets/Tracks.31f4a252.js","assets/index.49a58e31.js","assets/index.0e7f65b5.css","assets/FixedPlaylistHeader.28982abf.js","assets/FixedPlaylistHeader.42191fb7.css","assets/song.619409cb.js","assets/song.565875f1.css","assets/Dropdown.f68f135c.js","assets/Dropdown.cc052785.css","assets/PlaylistEntry.486af7f1.js","assets/PlaylistEntry.8b98aab6.css","assets/EditSong.vue_vue_type_script_setup_true_lang.b4546726.js","assets/playerInPicture.37a9ab56.js"]),meta:{title:"Liked Songs - reAudioPlayer One"}},{path:"/collection/tracks/breaking",component:()=>Me(()=>import("./Breaking.f80c3c09.js"),["assets/Breaking.f80c3c09.js","assets/index.49a58e31.js","assets/index.0e7f65b5.css","assets/FixedPlaylistHeader.28982abf.js","assets/FixedPlaylistHeader.42191fb7.css","assets/song.619409cb.js","assets/song.565875f1.css","assets/Dropdown.f68f135c.js","assets/Dropdown.cc052785.css","assets/PlaylistEntry.486af7f1.js","assets/PlaylistEntry.8b98aab6.css","assets/EditSong.vue_vue_type_script_setup_true_lang.b4546726.js","assets/playerInPicture.37a9ab56.js"]),meta:{title:"Breaking Songs - reAudioPlayer One"}},{path:"/playlist/:id",component:()=>Me(()=>import("./Playlist.67e9ec8e.js"),["assets/Playlist.67e9ec8e.js","assets/Playlist.5a5cc8d1.css","assets/FixedPlaylistHeader.28982abf.js","assets/FixedPlaylistHeader.42191fb7.css","assets/song.619409cb.js","assets/song.565875f1.css","assets/Dropdown.f68f135c.js","assets/Dropdown.cc052785.css","assets/PlaylistEntry.486af7f1.js","assets/PlaylistEntry.8b98aab6.css","assets/EditSong.vue_vue_type_script_setup_true_lang.b4546726.js","assets/playerInPicture.37a9ab56.js","assets/vuedraggable.umd.e9aa7b2f.js"]),meta:{title:"Playlist - reAudioPlayer One"}},{path:"/track/:id",component:()=>Me(()=>import("./Track.25dd5002.js"),["assets/Track.25dd5002.js","assets/Track.350d7319.css","assets/FixedPlaylistHeader.28982abf.js","assets/FixedPlaylistHeader.42191fb7.css","assets/song.619409cb.js","assets/song.565875f1.css","assets/Dropdown.f68f135c.js","assets/Dropdown.cc052785.css","assets/EditSong.vue_vue_type_script_setup_true_lang.b4546726.js","assets/vuedraggable.umd.e9aa7b2f.js"]),meta:{title:"Track - reAudioPlayer One"}},{path:"/preferences",component:()=>Me(()=>import("./index.981eedbc.js"),["assets/index.981eedbc.js","assets/index.df517fe7.css","assets/Card.4b544f8d.js","assets/Card.d4130af4.css","assets/Dropdown.f68f135c.js","assets/Dropdown.cc052785.css"]),meta:{title:"Preferences - reAudioPlayer One"}},{path:"/preferences/my-data",component:()=>Me(()=>import("./LocalData.55d88dea.js"),["assets/LocalData.55d88dea.js","assets/LocalData.6def6daa.css","assets/TrackCompact.b3e226ee.js","assets/TrackCompact.827ae0c2.css","assets/ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.c66e56c3.js","assets/song.619409cb.js","assets/song.565875f1.css","assets/Dropdown.f68f135c.js","assets/Dropdown.cc052785.css","assets/TrackInfo.a2d7128f.js","assets/TrackInfo.764c7643.css","assets/ImportSpotifySong.vue_vue_type_script_setup_true_lang.66b612a0.js"]),meta:{title:"Preferences - reAudioPlayer One"}},{path:"/import",component:()=>Me(()=>import("./Import.bc91f73f.js"),["assets/Import.bc91f73f.js","assets/Import.00fcad81.css","assets/CloudPlaylist.b86620c0.js","assets/CloudPlaylist.da3ebea2.css"]),meta:{title:"Import - reAudioPlayer One"}},{path:"/import/:data",component:()=>Me(()=>import("./Import.bc91f73f.js"),["assets/Import.bc91f73f.js","assets/Import.00fcad81.css","assets/CloudPlaylist.b86620c0.js","assets/CloudPlaylist.da3ebea2.css"]),meta:{title:"Import - reAudioPlayer One"}},{path:"/export",component:()=>Me(()=>import("./Export.84d2e49c.js"),["assets/Export.84d2e49c.js","assets/Export.3bfcf734.css","assets/CloudPlaylist.b86620c0.js","assets/CloudPlaylist.da3ebea2.css"]),meta:{title:"Export - reAudioPlayer One"}},{path:"/export/:data",component:()=>Me(()=>import("./Export.84d2e49c.js"),["assets/Export.84d2e49c.js","assets/Export.3bfcf734.css","assets/CloudPlaylist.b86620c0.js","assets/CloudPlaylist.da3ebea2.css"]),meta:{title:"Export - reAudioPlayer One"}},{path:"/welcome",component:()=>Me(()=>import("./Welcome.d749cf62.js"),["assets/Welcome.d749cf62.js","assets/Welcome.c12e1e1a.css"]),meta:{title:"Welcome to reAudioPlayer One"}},{path:"/news",component:()=>Me(()=>import("./News.0915b4bf.js"),["assets/News.0915b4bf.js","assets/News.6750251f.css","assets/FullShelf.434ba053.js","assets/FullShelf.3fda7300.css","assets/Card.4b544f8d.js","assets/Card.d4130af4.css"]),meta:{title:"News - reAudioPlayer One"}},{path:"/sports",component:()=>Me(()=>import("./Sports.4c158524.js"),["assets/Sports.4c158524.js","assets/Sports.7fae834f.css","assets/FullShelf.434ba053.js","assets/FullShelf.3fda7300.css"]),meta:{title:"Sports - reAudioPlayer One"}},{path:"/news/:url",component:()=>Me(()=>import("./NewsArticle.414bf554.js"),["assets/NewsArticle.414bf554.js","assets/NewsArticle.e53fcadb.css"]),meta:{title:"News - reAudioPlayer One"}},{path:"/player",component:()=>Me(()=>import("./BigPlayer.efee3d3d.js"),["assets/BigPlayer.efee3d3d.js","assets/BigPlayer.2aaa0b4d.css","assets/PlaylistEntry.486af7f1.js","assets/PlaylistEntry.8b98aab6.css","assets/EditSong.vue_vue_type_script_setup_true_lang.b4546726.js","assets/song.619409cb.js","assets/song.565875f1.css","assets/Dropdown.f68f135c.js","assets/Dropdown.cc052785.css","assets/playerInPicture.37a9ab56.js","assets/PlaylistItem.41431c3c.js","assets/PlaylistItem.e9227964.css","assets/TrackInfo.a2d7128f.js","assets/TrackInfo.764c7643.css"]),meta:{title:"reAudioPlayer One"}}],zr=Tv({history:Ym(),routes:Lv});const $v={class:"text-input-with-icon rounded-3xl flex items-center px-4"},Vv={class:"material-symbols-rounded ms-wght-200"},Bv=["placeholder"],jv={__name:"TextInputWithIcon",props:{icon:String,placeholder:String,modelValue:String},emits:["update:modelValue","change","submit"],setup(e,{emit:t}){const n=e,r=ce(n.modelValue);Pe(()=>n.modelValue,o=>{r.value=o});const s=()=>{t("update:modelValue",r.value),t("change",r.value)},i=o=>{o.key==="Enter"&&t("submit",r)};return(o,a)=>(se(),me("div",$v,[re("span",Vv,Oe(e.icon),1),Sn(re("input",{"onUpdate:modelValue":a[0]||(a[0]=l=>r.value=l),placeholder:e.placeholder,type:"text",onInput:s,onKeyup:i},null,40,Bv),[[is,r.value]])]))}},Dv=rt(jv,[["__scopeId","data-v-6fd30d02"]]);const Nv={class:"header grid grid-cols-3 justify-between drop-shadow-md"},Wv={class:"search flex flex-row"},Fv={__name:"Header",setup(e){let t=ce("");Ze(()=>{t.value=zr.currentRoute.value.params.query||"",zr.afterEach(r=>{t.value=r.params.query||"",console.log(t.value)})});let n=()=>{zr.push({name:"Search",params:{query:t.value}})};return(r,s)=>(se(),me("div",Nv,[te(F(ju),{class:"hideIfMobile logo",onClick:s[0]||(s[0]=i=>r.$router.push("/"))}),re("div",Wv,[te(pt,{class:"ml-2 sm:ml-0 mr-2",href:"/",icon:"home",minimised:"",name:"Home"}),te(Dv,{modelValue:F(t),"onUpdate:modelValue":s[1]||(s[1]=i=>Re(t)?t.value=i:t=i),class:"md:!w-96",icon:"search",placeholder:"Search...",onSubmit:F(n)},null,8,["modelValue","onSubmit"])]),te(pt,{class:"mr-2",href:"/preferences",icon:"settings",minimised:"",name:"Preferences"})]))}},Hv=rt(Fv,[["__scopeId","data-v-88c17054"]]);const Uv={name:"Loader"},zv=e=>(Cs("data-v-4c57394f"),e=e(),Es(),e),qv={class:"loader"},Kv=zv(()=>re("div",{class:"spinner"},[re("div",{class:"bounce1"}),re("div",{class:"bounce2"}),re("div",{class:"bounce3"})],-1)),Yv=[Kv];function Zv(e,t,n,r,s,i){return se(),me("div",qv,Yv)}const Xv=rt(Uv,[["render",Zv],["__scopeId","data-v-4c57394f"]]);const Gv={class:"startup"},Jv={class:"wrap"},Qv={class:"logo"},eg={__name:"Startup",setup(e){return(t,n)=>(se(),me("div",Gv,[re("div",Jv,[re("div",Qv,[te(F(ju))]),te(F(Xv))])]))}},tg=rt(eg,[["__scopeId","data-v-9670d8ba"]]);const ng=["src"],rg={id:"appRoot",class:"appRoot"},sg={class:"interface"},ig={name:"App",components:{Sidebar:Iu,Body:Lu,Player:Bu},async mounted(){const e=Is();window.getThemes=()=>{window.themes=[];for(const t of Object.keys(bn))for(const n of Object.keys(bn[t]))window.themes.includes(n)||window.themes.push(n);return window.themes},window.getCurrentTheme=()=>e.theme,window.setTheme=t=>{if(!!window.getThemes().includes(t)){e.theme=t;for(const n of Object.keys(bn)){const r=bn[n];if(n=="coverAsBackground"){this.coverAsBackground=Boolean(r[t]);continue}document.documentElement.style.setProperty(`--${n}`,r[t]||r.dark)}}},window.setTheme(e.theme||"dynamic"),np(),Tu(),await rp()&&this.$router.push("/welcome"),await sp()},data(){return{maximised:!1,coverAsBackground:!1}},watch:{$route(e){document.title=e.meta.title||"reAudioPlayer One"}}},og=Object.assign(ig,{setup(e){$u();const t=lt(),n=ce(t.song.cover);Pe(()=>t.song.cover,()=>{n.value=t.song.cover});const r=be(()=>Su(n.value));return(s,i)=>(se(),me(xe,null,[re("div",{class:Ie([{hidden:!s.coverAsBackground},"bgImageWrapper"])},[re("div",{style:Dn({backgroundImage:`url(${F(r)})`}),class:"bgImage"},[re("img",{src:F(r),class:"hidden",onError:i[0]||(i[0]=o=>n.value=null)},null,40,ng)],4)],2),re("div",rg,[F(t).ready?(se(),me(xe,{key:0},[te(Hv),re("div",sg,[s.maximised?Te("",!0):(se(),Ce(Iu,{key:0})),te(Lu,{onMaximise:i[1]||(i[1]=o=>s.maximised=o)})]),te(Bu),s.maximised?Te("",!0):(se(),Ce(km,{key:0}))],64)):(se(),Ce(tg,{key:1}))])],64))}});function qr(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qr=function(t){return typeof t}:qr=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qr(e)}function ag(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ra(e,t){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:{},r,s,i,o=function(l){for(var u=arguments.length,f=new Array(u>1?u-1:0),d=1;d1){var u=a.find(function(d){return d.isIntersecting});u&&(l=u)}if(s.callback){var f=l.isIntersecting&&l.intersectionRatio>=s.threshold;if(f===s.oldResult)return;s.oldResult=f,s.callback(f,l)}},this.options.intersection),r.context.$nextTick(function(){s.observer&&s.observer.observe(s.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),e}();function Xu(e,t,n){var r=t.value;if(!!r)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var s=new pg(e,r,n);e._vue_visibilityState=s}}function mg(e,t,n){var r=t.value,s=t.oldValue;if(!Zu(r,s)){var i=e._vue_visibilityState;if(!r){Gu(e);return}i?i.createObserver(r,n):Xu(e,{value:r},n)}}function Gu(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var Kr={bind:Xu,update:mg,unbind:Gu};function vg(e){e.directive("observe-visibility",Kr)}var gg={version:"1.0.0",install:vg},ls=null;typeof window<"u"?ls=window.Vue:typeof global<"u"&&(ls=global.Vue);ls&&ls.use(gg);function ro(e){return(ro=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function Ta(e,t,n,r,s,i,o){try{var a=e[i](o),l=a.value}catch(u){return void n(u)}a.done?t(l):Promise.resolve(l).then(r,s)}function yg(e,t){for(var n=0;n{},dt=Array.isArray,Tm=/\/$/,Im=e=>e.replace(Tm,"");function Zs(e,t,n="/"){let r,s={},i="",o="";const a=t.indexOf("#");let l=t.indexOf("?");return a=0&&(l=-1),l>-1&&(r=t.slice(0,l),i=t.slice(l+1,a>-1?a:t.length),s=e(i)),a>-1&&(r=r||t.slice(0,a),o=t.slice(a,t.length)),r=Bm(r!=null?r:t,n),{fullPath:r+(i&&"?")+i+o,path:r,query:s,hash:o}}function Lm(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function pa(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function $m(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&Bn(t.matched[r],n.matched[s])&&Du(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Bn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Du(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Vm(e[n],t[n]))return!1;return!0}function Vm(e,t){return dt(e)?ma(e,t):dt(t)?ma(t,e):e===t}function ma(e,t){return dt(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function Bm(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/");let s=n.length-1,i,o;for(i=0;i1&&s--;else break;return n.slice(0,s).join("/")+"/"+r.slice(i-(i===r.length?1:0)).join("/")}var hr;(function(e){e.pop="pop",e.push="push"})(hr||(hr={}));var nr;(function(e){e.back="back",e.forward="forward",e.unknown=""})(nr||(nr={}));function jm(e){if(!e)if(yn){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Im(e)}const Dm=/^[^#]+#/;function Nm(e,t){return e.replace(Dm,"#")+t}function Wm(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Ls=()=>({left:window.pageXOffset,top:window.pageYOffset});function Fm(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=Wm(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function va(e,t){return(history.state?history.state.position-t:-1)+e}const Ai=new Map;function Hm(e,t){Ai.set(e,t)}function Um(e){const t=Ai.get(e);return Ai.delete(e),t}let zm=()=>location.protocol+"//"+location.host;function Nu(e,t){const{pathname:n,search:r,hash:s}=t,i=e.indexOf("#");if(i>-1){let a=s.includes(e.slice(i))?e.slice(i).length:1,l=s.slice(a);return l[0]!=="/"&&(l="/"+l),pa(l,"")}return pa(n,e)+r+s}function qm(e,t,n,r){let s=[],i=[],o=null;const a=({state:c})=>{const b=Nu(e,location),y=n.value,O=t.value;let R=0;if(c){if(n.value=b,t.value=c,o&&o===y){o=null;return}R=O?c.position-O.position:0}else r(b);s.forEach(w=>{w(n.value,y,{delta:R,type:hr.pop,direction:R?R>0?nr.forward:nr.back:nr.unknown})})};function l(){o=n.value}function u(c){s.push(c);const b=()=>{const y=s.indexOf(c);y>-1&&s.splice(y,1)};return i.push(b),b}function f(){const{history:c}=window;!c.state||c.replaceState(ke({},c.state,{scroll:Ls()}),"")}function d(){for(const c of i)c();i=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",f)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",f),{pauseListeners:l,listen:u,destroy:d}}function ga(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?Ls():null}}function Km(e){const{history:t,location:n}=window,r={value:Nu(e,n)},s={value:t.state};s.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(l,u,f){const d=e.indexOf("#"),c=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+l:zm()+e+l;try{t[f?"replaceState":"pushState"](u,"",c),s.value=u}catch(b){console.error(b),n[f?"replace":"assign"](c)}}function o(l,u){const f=ke({},t.state,ga(s.value.back,l,s.value.forward,!0),u,{position:s.value.position});i(l,f,!0),r.value=l}function a(l,u){const f=ke({},s.value,t.state,{forward:l,scroll:Ls()});i(f.current,f,!0);const d=ke({},ga(r.value,l,null),{position:f.position+1},u);i(l,d,!1),r.value=l}return{location:r,state:s,push:a,replace:o}}function Ym(e){e=jm(e);const t=Km(e),n=qm(e,t.state,t.location,t.replace);function r(i,o=!0){o||n.pauseListeners(),history.go(i)}const s=ke({location:"",base:e,go:r,createHref:Nm.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function Zm(e){return typeof e=="string"||e&&typeof e=="object"}function Wu(e){return typeof e=="string"||typeof e=="symbol"}const Vt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Fu=Symbol("");var ya;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(ya||(ya={}));function jn(e,t){return ke(new Error,{type:e,[Fu]:!0},t)}function wt(e,t){return e instanceof Error&&Fu in e&&(t==null||!!(e.type&t))}const ba="[^/]+?",Xm={sensitive:!1,strict:!1,start:!0,end:!0},Gm=/[.+*?^${}()[\]/\\]/g;function Jm(e,t){const n=ke({},Xm,t),r=[];let s=n.start?"^":"";const i=[];for(const u of e){const f=u.length?[]:[90];n.strict&&!u.length&&(s+="/");for(let d=0;dt.length?t.length===1&&t[0]===40+40?1:-1:0}function ev(e,t){let n=0;const r=e.score,s=t.score;for(;n0&&t[t.length-1]<0}const tv={type:0,value:""},nv=/[a-zA-Z0-9_]/;function rv(e){if(!e)return[[]];if(e==="/")return[[tv]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(b){throw new Error(`ERR (${n})/"${u}": ${b}`)}let n=0,r=n;const s=[];let i;function o(){i&&s.push(i),i=[]}let a=0,l,u="",f="";function d(){!u||(n===0?i.push({type:0,value:u}):n===1||n===2||n===3?(i.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:u,regexp:f,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),u="")}function c(){u+=l}for(;a{o(h)}:tr}function o(f){if(Wu(f)){const d=r.get(f);d&&(r.delete(f),n.splice(n.indexOf(d),1),d.children.forEach(o),d.alias.forEach(o))}else{const d=n.indexOf(f);d>-1&&(n.splice(d,1),f.record.name&&r.delete(f.record.name),f.children.forEach(o),f.alias.forEach(o))}}function a(){return n}function l(f){let d=0;for(;d=0&&(f.record.path!==n[d].record.path||!Hu(f,n[d]));)d++;n.splice(d,0,f),f.record.name&&!Aa(f)&&r.set(f.record.name,f)}function u(f,d){let c,b={},y,O;if("name"in f&&f.name){if(c=r.get(f.name),!c)throw jn(1,{location:f});O=c.record.name,b=ke(wa(d.params,c.keys.filter(h=>!h.optional).map(h=>h.name)),f.params&&wa(f.params,c.keys.map(h=>h.name))),y=c.stringify(b)}else if("path"in f)y=f.path,c=n.find(h=>h.re.test(y)),c&&(b=c.parse(y),O=c.record.name);else{if(c=d.name?r.get(d.name):n.find(h=>h.re.test(d.path)),!c)throw jn(1,{location:f,currentLocation:d});O=c.record.name,b=ke({},d.params,f.params),y=c.stringify(b)}const R=[];let w=c;for(;w;)R.unshift(w.record),w=w.parent;return{name:O,path:y,params:b,matched:R,meta:lv(R)}}return e.forEach(f=>i(f)),{addRoute:i,resolve:u,removeRoute:o,getRoutes:a,getRecordMatcher:s}}function wa(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function ov(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:av(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function av(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="boolean"?n:n[r];return t}function Aa(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function lv(e){return e.reduce((t,n)=>ke(t,n.meta),{})}function Pa(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function Hu(e,t){return t.children.some(n=>n===e||Hu(e,n))}const Uu=/#/g,uv=/&/g,cv=/\//g,fv=/=/g,dv=/\?/g,zu=/\+/g,hv=/%5B/g,pv=/%5D/g,qu=/%5E/g,mv=/%60/g,Ku=/%7B/g,vv=/%7C/g,Yu=/%7D/g,gv=/%20/g;function to(e){return encodeURI(""+e).replace(vv,"|").replace(hv,"[").replace(pv,"]")}function yv(e){return to(e).replace(Ku,"{").replace(Yu,"}").replace(qu,"^")}function Pi(e){return to(e).replace(zu,"%2B").replace(gv,"+").replace(Uu,"%23").replace(uv,"%26").replace(mv,"`").replace(Ku,"{").replace(Yu,"}").replace(qu,"^")}function bv(e){return Pi(e).replace(fv,"%3D")}function _v(e){return to(e).replace(Uu,"%23").replace(dv,"%3F")}function wv(e){return e==null?"":_v(e).replace(cv,"%2F")}function as(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function Av(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;si&&Pi(i)):[r&&Pi(r)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+n,i!=null&&(t+="="+i))})}return t}function Pv(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=dt(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const kv=Symbol(""),Ca=Symbol(""),$s=Symbol(""),no=Symbol(""),ki=Symbol("");function zn(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e,reset:n}}function Wt(e,t,n,r,s){const i=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((o,a)=>{const l=d=>{d===!1?a(jn(4,{from:n,to:t})):d instanceof Error?a(d):Zm(d)?a(jn(2,{from:t,to:d})):(i&&r.enterCallbacks[s]===i&&typeof d=="function"&&i.push(d),o())},u=e.call(r&&r.instances[s],t,n,l);let f=Promise.resolve(u);e.length<3&&(f=f.then(l)),f.catch(d=>a(d))})}function Xs(e,t,n,r){const s=[];for(const i of e)for(const o in i.components){let a=i.components[o];if(!(t!=="beforeRouteEnter"&&!i.instances[o]))if(Cv(a)){const u=(a.__vccOpts||a)[t];u&&s.push(Wt(u,n,r,i,o))}else{let l=a();s.push(()=>l.then(u=>{if(!u)return Promise.reject(new Error(`Couldn't resolve component "${o}" at "${i.path}"`));const f=Mm(u)?u.default:u;i.components[o]=f;const c=(f.__vccOpts||f)[t];return c&&Wt(c,n,r,i,o)()}))}}return s}function Cv(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Ea(e){const t=Ye($s),n=Ye(no),r=be(()=>t.resolve(F(e.to))),s=be(()=>{const{matched:l}=r.value,{length:u}=l,f=l[u-1],d=n.matched;if(!f||!d.length)return-1;const c=d.findIndex(Bn.bind(null,f));if(c>-1)return c;const b=xa(l[u-2]);return u>1&&xa(f)===b&&d[d.length-1].path!==b?d.findIndex(Bn.bind(null,l[u-2])):c}),i=be(()=>s.value>-1&&Sv(n.params,r.value.params)),o=be(()=>s.value>-1&&s.value===n.matched.length-1&&Du(n.params,r.value.params));function a(l={}){return Ov(l)?t[F(e.replace)?"replace":"push"](F(e.to)).catch(tr):Promise.resolve()}return{route:r,href:be(()=>r.value.href),isActive:i,isExactActive:o,navigate:a}}const Ev=Ne({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Ea,setup(e,{slots:t}){const n=Jt(Ea(e)),{options:r}=Ye($s),s=be(()=>({[Oa(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Oa(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&t.default(n);return e.custom?i:Gi("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},i)}}}),xv=Ev;function Ov(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Sv(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!dt(s)||s.length!==r.length||r.some((i,o)=>i!==s[o]))return!1}return!0}function xa(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Oa=(e,t,n)=>e!=null?e:t!=null?t:n,Rv=Ne({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=Ye(ki),s=be(()=>e.route||r.value),i=Ye(Ca,0),o=be(()=>{let u=F(i);const{matched:f}=s.value;let d;for(;(d=f[u])&&!d.components;)u++;return u}),a=be(()=>s.value.matched[o.value]);Ft(Ca,be(()=>o.value+1)),Ft(kv,a),Ft(ki,s);const l=ce();return Pe(()=>[l.value,a.value,e.name],([u,f,d],[c,b,y])=>{f&&(f.instances[d]=u,b&&b!==f&&u&&u===c&&(f.leaveGuards.size||(f.leaveGuards=b.leaveGuards),f.updateGuards.size||(f.updateGuards=b.updateGuards))),u&&f&&(!b||!Bn(f,b)||!c)&&(f.enterCallbacks[d]||[]).forEach(O=>O(u))},{flush:"post"}),()=>{const u=s.value,f=e.name,d=a.value,c=d&&d.components[f];if(!c)return Sa(n.default,{Component:c,route:u});const b=d.props[f],y=b?b===!0?u.params:typeof b=="function"?b(u):b:null,R=Gi(c,ke({},y,t,{onVnodeUnmounted:w=>{w.component.isUnmounted&&(d.instances[f]=null)},ref:l}));return Sa(n.default,{Component:R,route:u})||R}}});function Sa(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Mv=Rv;function Tv(e){const t=iv(e.routes,e),n=e.parseQuery||Av,r=e.stringifyQuery||ka,s=e.history,i=zn(),o=zn(),a=zn(),l=zc(Vt);let u=Vt;yn&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const f=Ys.bind(null,D=>""+D),d=Ys.bind(null,wv),c=Ys.bind(null,as);function b(D,U){let j,K;return Wu(D)?(j=t.getRecordMatcher(D),K=U):K=D,t.addRoute(K,j)}function y(D){const U=t.getRecordMatcher(D);U&&t.removeRoute(U)}function O(){return t.getRoutes().map(D=>D.record)}function R(D){return!!t.getRecordMatcher(D)}function w(D,U){if(U=ke({},U||l.value),typeof D=="string"){const _=Zs(n,D,U.path),x=t.resolve({path:_.path},U),W=s.createHref(_.fullPath);return ke(_,x,{params:c(x.params),hash:as(_.hash),redirectedFrom:void 0,href:W})}let j;if("path"in D)j=ke({},D,{path:Zs(n,D.path,U.path).path});else{const _=ke({},D.params);for(const x in _)_[x]==null&&delete _[x];j=ke({},D,{params:d(D.params)}),U.params=d(U.params)}const K=t.resolve(j,U),J=D.hash||"";K.params=f(c(K.params));const he=Lm(r,ke({},D,{hash:yv(J),path:K.path})),oe=s.createHref(he);return ke({fullPath:he,hash:J,query:r===ka?Pv(D.query):D.query||{}},K,{redirectedFrom:void 0,href:oe})}function h(D){return typeof D=="string"?Zs(n,D,l.value.path):ke({},D)}function A(D,U){if(u!==D)return jn(8,{from:U,to:D})}function S(D){return L(D)}function I(D){return S(ke(h(D),{replace:!0}))}function V(D){const U=D.matched[D.matched.length-1];if(U&&U.redirect){const{redirect:j}=U;let K=typeof j=="function"?j(D):j;return typeof K=="string"&&(K=K.includes("?")||K.includes("#")?K=h(K):{path:K},K.params={}),ke({query:D.query,hash:D.hash,params:"path"in K?{}:D.params},K)}}function L(D,U){const j=u=w(D),K=l.value,J=D.state,he=D.force,oe=D.replace===!0,_=V(j);if(_)return L(ke(h(_),{state:typeof _=="object"?ke({},J,_.state):J,force:he,replace:oe}),U||j);const x=j;x.redirectedFrom=U;let W;return!he&&$m(r,K,j)&&(W=jn(16,{to:x,from:K}),N(K,K,!0,!1)),(W?Promise.resolve(W):$(x,K)).catch(H=>wt(H)?wt(H,2)?H:p(H):M(H,x,K)).then(H=>{if(H){if(wt(H,2))return L(ke({replace:oe},h(H.to),{state:typeof H.to=="object"?ke({},J,H.to.state):J,force:he}),U||x)}else H=T(x,K,!0,oe,J);return B(x,K,H),H})}function E(D,U){const j=A(D,U);return j?Promise.reject(j):Promise.resolve()}function $(D,U){let j;const[K,J,he]=Iv(D,U);j=Xs(K.reverse(),"beforeRouteLeave",D,U);for(const _ of K)_.leaveGuards.forEach(x=>{j.push(Wt(x,D,U))});const oe=E.bind(null,D,U);return j.push(oe),gn(j).then(()=>{j=[];for(const _ of i.list())j.push(Wt(_,D,U));return j.push(oe),gn(j)}).then(()=>{j=Xs(J,"beforeRouteUpdate",D,U);for(const _ of J)_.updateGuards.forEach(x=>{j.push(Wt(x,D,U))});return j.push(oe),gn(j)}).then(()=>{j=[];for(const _ of D.matched)if(_.beforeEnter&&!U.matched.includes(_))if(dt(_.beforeEnter))for(const x of _.beforeEnter)j.push(Wt(x,D,U));else j.push(Wt(_.beforeEnter,D,U));return j.push(oe),gn(j)}).then(()=>(D.matched.forEach(_=>_.enterCallbacks={}),j=Xs(he,"beforeRouteEnter",D,U),j.push(oe),gn(j))).then(()=>{j=[];for(const _ of o.list())j.push(Wt(_,D,U));return j.push(oe),gn(j)}).catch(_=>wt(_,8)?_:Promise.reject(_))}function B(D,U,j){for(const K of a.list())K(D,U,j)}function T(D,U,j,K,J){const he=A(D,U);if(he)return he;const oe=U===Vt,_=yn?history.state:{};j&&(K||oe?s.replace(D.fullPath,ke({scroll:oe&&_&&_.scroll},J)):s.push(D.fullPath,J)),l.value=D,N(D,U,j,oe),p()}let m;function P(){m||(m=s.listen((D,U,j)=>{if(!fe.listening)return;const K=w(D),J=V(K);if(J){L(ke(J,{replace:!0}),K).catch(tr);return}u=K;const he=l.value;yn&&Hm(va(he.fullPath,j.delta),Ls()),$(K,he).catch(oe=>wt(oe,12)?oe:wt(oe,2)?(L(oe.to,K).then(_=>{wt(_,20)&&!j.delta&&j.type===hr.pop&&s.go(-1,!1)}).catch(tr),Promise.reject()):(j.delta&&s.go(-j.delta,!1),M(oe,K,he))).then(oe=>{oe=oe||T(K,he,!1),oe&&(j.delta&&!wt(oe,8)?s.go(-j.delta,!1):j.type===hr.pop&&wt(oe,20)&&s.go(-1,!1)),B(K,he,oe)}).catch(tr)}))}let C=zn(),g=zn(),v;function M(D,U,j){p(D);const K=g.list();return K.length?K.forEach(J=>J(D,U,j)):console.error(D),Promise.reject(D)}function k(){return v&&l.value!==Vt?Promise.resolve():new Promise((D,U)=>{C.add([D,U])})}function p(D){return v||(v=!D,P(),C.list().forEach(([U,j])=>D?j(D):U()),C.reset()),D}function N(D,U,j,K){const{scrollBehavior:J}=e;if(!yn||!J)return Promise.resolve();const he=!j&&Um(va(D.fullPath,0))||(K||!j)&&history.state&&history.state.scroll||null;return ft().then(()=>J(D,U,he)).then(oe=>oe&&Fm(oe)).catch(oe=>M(oe,D,U))}const q=D=>s.go(D);let ee;const ne=new Set,fe={currentRoute:l,listening:!0,addRoute:b,removeRoute:y,hasRoute:R,getRoutes:O,resolve:w,options:e,push:S,replace:I,go:q,back:()=>q(-1),forward:()=>q(1),beforeEach:i.add,beforeResolve:o.add,afterEach:a.add,onError:g.add,isReady:k,install(D){const U=this;D.component("RouterLink",xv),D.component("RouterView",Mv),D.config.globalProperties.$router=U,Object.defineProperty(D.config.globalProperties,"$route",{enumerable:!0,get:()=>F(l)}),yn&&!ee&&l.value===Vt&&(ee=!0,S(s.location).catch(J=>{}));const j={};for(const J in Vt)j[J]=be(()=>l.value[J]);D.provide($s,U),D.provide(no,Jt(j)),D.provide(ki,l);const K=D.unmount;ne.add(D),D.unmount=function(){ne.delete(D),ne.size<1&&(u=Vt,m&&m(),m=null,l.value=Vt,ee=!1,v=!1),K()}}};return fe}function gn(e){return e.reduce((t,n)=>t.then(()=>n()),Promise.resolve())}function Iv(e,t){const n=[],r=[],s=[],i=Math.max(t.matched.length,e.matched.length);for(let o=0;oBn(u,a))?r.push(a):n.push(a));const l=e.matched[o];l&&(t.matched.find(u=>Bn(u,l))||s.push(l))}return[n,r,s]}function Oy(){return Ye($s)}function Sy(){return Ye(no)}const Lv=[{path:"/",component:()=>Me(()=>import("./index.819329ca.js"),["assets/index.819329ca.js","assets/index.a9ab7070.css","assets/song.6a60a886.js","assets/song.565875f1.css","assets/Dropdown.7541a2ee.js","assets/Dropdown.cc052785.css","assets/TrackCompact.3692910e.js","assets/TrackCompact.827ae0c2.css","assets/ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.ec33d761.js","assets/TrackInfo.2ed5fbe0.js","assets/TrackInfo.764c7643.css","assets/ImportSpotifySong.vue_vue_type_script_setup_true_lang.c34c7594.js","assets/PlaylistEntry.75d93026.js","assets/PlaylistEntry.8b98aab6.css","assets/EditSong.vue_vue_type_script_setup_true_lang.42f3815c.js","assets/playerInPicture.37a9ab56.js","assets/PlaylistItem.ca2725f3.js","assets/PlaylistItem.e9227964.css"])},{path:"/discover",component:()=>Me(()=>import("./Explore.95be350d.js"),["assets/Explore.95be350d.js","assets/Explore.59aaf783.css"]),meta:{title:"Discover - reAudioPlayer One"}},{path:"/search",component:()=>Me(()=>import("./Search.a1316368.js"),["assets/Search.a1316368.js","assets/Search.188610fb.css","assets/ArtistItem.79a83f4c.js","assets/ArtistItem.cdf9f1aa.css","assets/song.6a60a886.js","assets/song.565875f1.css","assets/Dropdown.7541a2ee.js","assets/Dropdown.cc052785.css","assets/TrackInfo.2ed5fbe0.js","assets/TrackInfo.764c7643.css","assets/ReleaseItem.0fc4048a.js","assets/ReleaseItem.2ca76435.css","assets/ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.ec33d761.js","assets/ImportSpotifySong.vue_vue_type_script_setup_true_lang.c34c7594.js"]),meta:{title:"Search - reAudioPlayer One"}},{name:"Search",path:"/search/:query",component:()=>Me(()=>import("./Search.a1316368.js"),["assets/Search.a1316368.js","assets/Search.188610fb.css","assets/ArtistItem.79a83f4c.js","assets/ArtistItem.cdf9f1aa.css","assets/song.6a60a886.js","assets/song.565875f1.css","assets/Dropdown.7541a2ee.js","assets/Dropdown.cc052785.css","assets/TrackInfo.2ed5fbe0.js","assets/TrackInfo.764c7643.css","assets/ReleaseItem.0fc4048a.js","assets/ReleaseItem.2ca76435.css","assets/ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.ec33d761.js","assets/ImportSpotifySong.vue_vue_type_script_setup_true_lang.c34c7594.js"]),meta:{title:"Search - reAudioPlayer One"}},{path:"/collection/albums",component:()=>Me(()=>import("./Albums.71c91c6e.js"),["assets/Albums.71c91c6e.js","assets/Albums.a0edb897.css","assets/CollectionHeader.14ae124c.js","assets/CollectionHeader.209c6d6c.css"]),meta:{title:"Your Library - reAudioPlayer One"}},{path:"/collection/artists",component:()=>Me(()=>import("./Artists.1ec72faf.js"),["assets/Artists.1ec72faf.js","assets/Artists.de7a7e1e.css","assets/FullShelf.13880daa.js","assets/FullShelf.3fda7300.css","assets/ArtistItem.79a83f4c.js","assets/ArtistItem.cdf9f1aa.css","assets/song.6a60a886.js","assets/song.565875f1.css","assets/Dropdown.7541a2ee.js","assets/Dropdown.cc052785.css","assets/TrackInfo.2ed5fbe0.js","assets/TrackInfo.764c7643.css","assets/CollectionHeader.14ae124c.js","assets/CollectionHeader.209c6d6c.css"]),meta:{title:"Your Library - reAudioPlayer One"}},{path:"/collection/playlists",component:()=>Me(()=>import("./Playlists.90b48e78.js"),["assets/Playlists.90b48e78.js","assets/Playlists.7339af32.css","assets/FullShelf.13880daa.js","assets/FullShelf.3fda7300.css","assets/PlaylistItem.ca2725f3.js","assets/PlaylistItem.e9227964.css","assets/song.6a60a886.js","assets/song.565875f1.css","assets/Dropdown.7541a2ee.js","assets/Dropdown.cc052785.css","assets/TrackInfo.2ed5fbe0.js","assets/TrackInfo.764c7643.css","assets/playerInPicture.37a9ab56.js","assets/CollectionHeader.14ae124c.js","assets/CollectionHeader.209c6d6c.css"]),meta:{title:"Your Library - reAudioPlayer One"}},{path:"/collection/releases",component:()=>Me(()=>import("./Releases.f174936b.js"),["assets/Releases.f174936b.js","assets/Releases.f85f3a42.css","assets/FullShelf.13880daa.js","assets/FullShelf.3fda7300.css","assets/ReleaseItem.0fc4048a.js","assets/ReleaseItem.2ca76435.css","assets/ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.ec33d761.js","assets/song.6a60a886.js","assets/song.565875f1.css","assets/Dropdown.7541a2ee.js","assets/Dropdown.cc052785.css","assets/TrackInfo.2ed5fbe0.js","assets/TrackInfo.764c7643.css","assets/CollectionHeader.14ae124c.js","assets/CollectionHeader.209c6d6c.css"]),meta:{title:"Releases - reAudioPlayer One"}},{path:"/collection/tracks",component:()=>Me(()=>import("./Tracks.3ce0f3ba.js"),["assets/Tracks.3ce0f3ba.js","assets/index.99d9af59.js","assets/index.0e7f65b5.css","assets/FixedPlaylistHeader.8b130c57.js","assets/FixedPlaylistHeader.42191fb7.css","assets/song.6a60a886.js","assets/song.565875f1.css","assets/Dropdown.7541a2ee.js","assets/Dropdown.cc052785.css","assets/PlaylistEntry.75d93026.js","assets/PlaylistEntry.8b98aab6.css","assets/EditSong.vue_vue_type_script_setup_true_lang.42f3815c.js","assets/playerInPicture.37a9ab56.js"]),meta:{title:"Liked Songs - reAudioPlayer One"}},{path:"/collection/tracks/breaking",component:()=>Me(()=>import("./Breaking.08709248.js"),["assets/Breaking.08709248.js","assets/index.99d9af59.js","assets/index.0e7f65b5.css","assets/FixedPlaylistHeader.8b130c57.js","assets/FixedPlaylistHeader.42191fb7.css","assets/song.6a60a886.js","assets/song.565875f1.css","assets/Dropdown.7541a2ee.js","assets/Dropdown.cc052785.css","assets/PlaylistEntry.75d93026.js","assets/PlaylistEntry.8b98aab6.css","assets/EditSong.vue_vue_type_script_setup_true_lang.42f3815c.js","assets/playerInPicture.37a9ab56.js"]),meta:{title:"Breaking Songs - reAudioPlayer One"}},{path:"/playlist/:id",component:()=>Me(()=>import("./Playlist.44a6b876.js"),["assets/Playlist.44a6b876.js","assets/Playlist.5a5cc8d1.css","assets/FixedPlaylistHeader.8b130c57.js","assets/FixedPlaylistHeader.42191fb7.css","assets/song.6a60a886.js","assets/song.565875f1.css","assets/Dropdown.7541a2ee.js","assets/Dropdown.cc052785.css","assets/PlaylistEntry.75d93026.js","assets/PlaylistEntry.8b98aab6.css","assets/EditSong.vue_vue_type_script_setup_true_lang.42f3815c.js","assets/playerInPicture.37a9ab56.js","assets/vuedraggable.umd.6e1f6451.js"]),meta:{title:"Playlist - reAudioPlayer One"}},{path:"/track/:id",component:()=>Me(()=>import("./Track.4cb4db00.js"),["assets/Track.4cb4db00.js","assets/Track.350d7319.css","assets/FixedPlaylistHeader.8b130c57.js","assets/FixedPlaylistHeader.42191fb7.css","assets/song.6a60a886.js","assets/song.565875f1.css","assets/Dropdown.7541a2ee.js","assets/Dropdown.cc052785.css","assets/EditSong.vue_vue_type_script_setup_true_lang.42f3815c.js","assets/vuedraggable.umd.6e1f6451.js"]),meta:{title:"Track - reAudioPlayer One"}},{path:"/preferences",component:()=>Me(()=>import("./index.dcb64849.js"),["assets/index.dcb64849.js","assets/index.df517fe7.css","assets/Card.d68bcee4.js","assets/Card.d4130af4.css","assets/Dropdown.7541a2ee.js","assets/Dropdown.cc052785.css"]),meta:{title:"Preferences - reAudioPlayer One"}},{path:"/preferences/my-data",component:()=>Me(()=>import("./LocalData.aa99f014.js"),["assets/LocalData.aa99f014.js","assets/LocalData.6def6daa.css","assets/TrackCompact.3692910e.js","assets/TrackCompact.827ae0c2.css","assets/ImportSpotifyAlbum.vue_vue_type_script_setup_true_lang.ec33d761.js","assets/song.6a60a886.js","assets/song.565875f1.css","assets/Dropdown.7541a2ee.js","assets/Dropdown.cc052785.css","assets/TrackInfo.2ed5fbe0.js","assets/TrackInfo.764c7643.css","assets/ImportSpotifySong.vue_vue_type_script_setup_true_lang.c34c7594.js"]),meta:{title:"Preferences - reAudioPlayer One"}},{path:"/import",component:()=>Me(()=>import("./Import.ccefe9a3.js"),["assets/Import.ccefe9a3.js","assets/Import.00fcad81.css","assets/CloudPlaylist.3209552c.js","assets/CloudPlaylist.da3ebea2.css"]),meta:{title:"Import - reAudioPlayer One"}},{path:"/import/:data",component:()=>Me(()=>import("./Import.ccefe9a3.js"),["assets/Import.ccefe9a3.js","assets/Import.00fcad81.css","assets/CloudPlaylist.3209552c.js","assets/CloudPlaylist.da3ebea2.css"]),meta:{title:"Import - reAudioPlayer One"}},{path:"/export",component:()=>Me(()=>import("./Export.754fd59a.js"),["assets/Export.754fd59a.js","assets/Export.3bfcf734.css","assets/CloudPlaylist.3209552c.js","assets/CloudPlaylist.da3ebea2.css"]),meta:{title:"Export - reAudioPlayer One"}},{path:"/export/:data",component:()=>Me(()=>import("./Export.754fd59a.js"),["assets/Export.754fd59a.js","assets/Export.3bfcf734.css","assets/CloudPlaylist.3209552c.js","assets/CloudPlaylist.da3ebea2.css"]),meta:{title:"Export - reAudioPlayer One"}},{path:"/welcome",component:()=>Me(()=>import("./Welcome.9f2613e4.js"),["assets/Welcome.9f2613e4.js","assets/Welcome.c12e1e1a.css"]),meta:{title:"Welcome to reAudioPlayer One"}},{path:"/news",component:()=>Me(()=>import("./News.1f47f9e9.js"),["assets/News.1f47f9e9.js","assets/News.af29ed08.css","assets/FullShelf.13880daa.js","assets/FullShelf.3fda7300.css","assets/Card.d68bcee4.js","assets/Card.d4130af4.css"]),meta:{title:"News - reAudioPlayer One"}},{path:"/sports",component:()=>Me(()=>import("./Sports.b552157b.js"),["assets/Sports.b552157b.js","assets/Sports.7fae834f.css","assets/FullShelf.13880daa.js","assets/FullShelf.3fda7300.css"]),meta:{title:"Sports - reAudioPlayer One"}},{path:"/news/:url",component:()=>Me(()=>import("./NewsArticle.feaafe35.js"),["assets/NewsArticle.feaafe35.js","assets/NewsArticle.e53fcadb.css"]),meta:{title:"News - reAudioPlayer One"}},{path:"/player",component:()=>Me(()=>import("./BigPlayer.ed629159.js"),["assets/BigPlayer.ed629159.js","assets/BigPlayer.2aaa0b4d.css","assets/PlaylistEntry.75d93026.js","assets/PlaylistEntry.8b98aab6.css","assets/EditSong.vue_vue_type_script_setup_true_lang.42f3815c.js","assets/song.6a60a886.js","assets/song.565875f1.css","assets/Dropdown.7541a2ee.js","assets/Dropdown.cc052785.css","assets/playerInPicture.37a9ab56.js","assets/PlaylistItem.ca2725f3.js","assets/PlaylistItem.e9227964.css","assets/TrackInfo.2ed5fbe0.js","assets/TrackInfo.764c7643.css"]),meta:{title:"reAudioPlayer One"}}],zr=Tv({history:Ym(),routes:Lv});const $v={class:"text-input-with-icon rounded-3xl flex items-center px-4"},Vv={class:"material-symbols-rounded ms-wght-200"},Bv=["placeholder"],jv={__name:"TextInputWithIcon",props:{icon:String,placeholder:String,modelValue:String},emits:["update:modelValue","change","submit"],setup(e,{emit:t}){const n=e,r=ce(n.modelValue);Pe(()=>n.modelValue,o=>{r.value=o});const s=()=>{t("update:modelValue",r.value),t("change",r.value)},i=o=>{o.key==="Enter"&&t("submit",r)};return(o,a)=>(se(),me("div",$v,[re("span",Vv,Oe(e.icon),1),Sn(re("input",{"onUpdate:modelValue":a[0]||(a[0]=l=>r.value=l),placeholder:e.placeholder,type:"text",onInput:s,onKeyup:i},null,40,Bv),[[is,r.value]])]))}},Dv=rt(jv,[["__scopeId","data-v-6fd30d02"]]);const Nv={class:"header grid grid-cols-3 justify-between drop-shadow-md"},Wv={class:"search flex flex-row"},Fv={__name:"Header",setup(e){let t=ce("");Ze(()=>{t.value=zr.currentRoute.value.params.query||"",zr.afterEach(r=>{t.value=r.params.query||"",console.log(t.value)})});let n=()=>{zr.push({name:"Search",params:{query:t.value}})};return(r,s)=>(se(),me("div",Nv,[te(F(ju),{class:"hideIfMobile logo",onClick:s[0]||(s[0]=i=>r.$router.push("/"))}),re("div",Wv,[te(pt,{class:"ml-2 sm:ml-0 mr-2",href:"/",icon:"home",minimised:"",name:"Home"}),te(Dv,{modelValue:F(t),"onUpdate:modelValue":s[1]||(s[1]=i=>Re(t)?t.value=i:t=i),class:"md:!w-96",icon:"search",placeholder:"Search...",onSubmit:F(n)},null,8,["modelValue","onSubmit"])]),te(pt,{class:"mr-2",href:"/preferences",icon:"settings",minimised:"",name:"Preferences"})]))}},Hv=rt(Fv,[["__scopeId","data-v-88c17054"]]);const Uv={name:"Loader"},zv=e=>(Cs("data-v-4c57394f"),e=e(),Es(),e),qv={class:"loader"},Kv=zv(()=>re("div",{class:"spinner"},[re("div",{class:"bounce1"}),re("div",{class:"bounce2"}),re("div",{class:"bounce3"})],-1)),Yv=[Kv];function Zv(e,t,n,r,s,i){return se(),me("div",qv,Yv)}const Xv=rt(Uv,[["render",Zv],["__scopeId","data-v-4c57394f"]]);const Gv={class:"startup"},Jv={class:"wrap"},Qv={class:"logo"},eg={__name:"Startup",setup(e){return(t,n)=>(se(),me("div",Gv,[re("div",Jv,[re("div",Qv,[te(F(ju))]),te(F(Xv))])]))}},tg=rt(eg,[["__scopeId","data-v-9670d8ba"]]);const ng=["src"],rg={id:"appRoot",class:"appRoot"},sg={class:"interface"},ig={name:"App",components:{Sidebar:Iu,Body:Lu,Player:Bu},async mounted(){const e=Is();window.getThemes=()=>{window.themes=[];for(const t of Object.keys(bn))for(const n of Object.keys(bn[t]))window.themes.includes(n)||window.themes.push(n);return window.themes},window.getCurrentTheme=()=>e.theme,window.setTheme=t=>{if(!!window.getThemes().includes(t)){e.theme=t;for(const n of Object.keys(bn)){const r=bn[n];if(n=="coverAsBackground"){this.coverAsBackground=Boolean(r[t]);continue}document.documentElement.style.setProperty(`--${n}`,r[t]||r.dark)}}},window.setTheme(e.theme||"dynamic"),np(),Tu(),await rp()&&this.$router.push("/welcome"),await sp()},data(){return{maximised:!1,coverAsBackground:!1}},watch:{$route(e){document.title=e.meta.title||"reAudioPlayer One"}}},og=Object.assign(ig,{setup(e){$u();const t=lt(),n=ce(t.song.cover);Pe(()=>t.song.cover,()=>{n.value=t.song.cover});const r=be(()=>Su(n.value));return(s,i)=>(se(),me(xe,null,[re("div",{class:Ie([{hidden:!s.coverAsBackground},"bgImageWrapper"])},[re("div",{style:Dn({backgroundImage:`url(${F(r)})`}),class:"bgImage"},[re("img",{src:F(r),class:"hidden",onError:i[0]||(i[0]=o=>n.value=null)},null,40,ng)],4)],2),re("div",rg,[F(t).ready?(se(),me(xe,{key:0},[te(Hv),re("div",sg,[s.maximised?Te("",!0):(se(),Ce(Iu,{key:0})),te(Lu,{onMaximise:i[1]||(i[1]=o=>s.maximised=o)})]),te(Bu),s.maximised?Te("",!0):(se(),Ce(km,{key:0}))],64)):(se(),Ce(tg,{key:1}))])],64))}});function qr(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qr=function(t){return typeof t}:qr=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qr(e)}function ag(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ra(e,t){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:{},r,s,i,o=function(l){for(var u=arguments.length,f=new Array(u>1?u-1:0),d=1;d1){var u=a.find(function(d){return d.isIntersecting});u&&(l=u)}if(s.callback){var f=l.isIntersecting&&l.intersectionRatio>=s.threshold;if(f===s.oldResult)return;s.oldResult=f,s.callback(f,l)}},this.options.intersection),r.context.$nextTick(function(){s.observer&&s.observer.observe(s.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),e}();function Xu(e,t,n){var r=t.value;if(!!r)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var s=new pg(e,r,n);e._vue_visibilityState=s}}function mg(e,t,n){var r=t.value,s=t.oldValue;if(!Zu(r,s)){var i=e._vue_visibilityState;if(!r){Gu(e);return}i?i.createObserver(r,n):Xu(e,{value:r},n)}}function Gu(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var Kr={bind:Xu,update:mg,unbind:Gu};function vg(e){e.directive("observe-visibility",Kr)}var gg={version:"1.0.0",install:vg},ls=null;typeof window<"u"?ls=window.Vue:typeof global<"u"&&(ls=global.Vue);ls&&ls.use(gg);function ro(e){return(ro=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function Ta(e,t,n,r,s,i,o){try{var a=e[i](o),l=a.value}catch(u){return void n(u)}a.done?t(l):Promise.resolve(l).then(r,s)}function yg(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1),Ht=[],cs=!1,Yr=0,ja=-1,wg=function(e,t){var n=!1;return function(r){for(var s=[];r;){if(s.push(r),r.classList.contains("vfm"))return s;r=r.parentElement}return s}(e).forEach(function(r){(function(s){if(!s||s.nodeType!==Node.ELEMENT_NODE)return!1;var i=window.getComputedStyle(s);return["auto","scroll"].includes(i.overflowY)&&s.scrollHeight>s.clientHeight})(r)&&function(s,i){return!(s.scrollTop===0&&i<0||s.scrollTop+s.clientHeight+i>=s.scrollHeight&&i>0)}(r,t)&&(n=!0)}),n},Qu=function(e){return Ht.some(function(){return wg(e,-Yr)})},Ci=function(e){var t=e||window.event;return!!Qu(t.target)||t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1)},Ag=function(e,t){if(e){if(!Ht.some(function(r){return r.targetElement===e})){var n={targetElement:e,options:t||{}};Ht=[].concat(fn(Ht),[n]),Ju?(e.ontouchstart=function(r){r.targetTouches.length===1&&(ja=r.targetTouches[0].clientY)},e.ontouchmove=function(r){r.targetTouches.length===1&&function(s,i){Yr=s.targetTouches[0].clientY-ja,!Qu(s.target)&&(i&&i.scrollTop===0&&Yr>0||function(o){return!!o&&o.scrollHeight-o.scrollTop<=o.clientHeight}(i)&&Yr<0?Ci(s):s.stopPropagation())}(r,e)},cs||(document.addEventListener("touchmove",Ci,so?{passive:!1}:void 0),cs=!0)):function(r){if(sr===void 0){var s=!!r&&r.reserveScrollBarGap===!0,i=window.innerWidth-document.documentElement.clientWidth;if(s&&i>0){var o=parseInt(getComputedStyle(document.body).getPropertyValue("padding-right"),10);sr=document.body.style.paddingRight,document.body.style.paddingRight="".concat(o+i,"px")}}rr===void 0&&(rr=document.body.style.overflow,document.body.style.overflow="hidden")}(t)}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},Js=function(e){e?(Ht=Ht.filter(function(t){return t.targetElement!==e}),Ju?(e.ontouchstart=null,e.ontouchmove=null,cs&&Ht.length===0&&(document.removeEventListener("touchmove",Ci,so?{passive:!1}:void 0),cs=!1)):Ht.length||(sr!==void 0&&(document.body.style.paddingRight=sr,sr=void 0),rr!==void 0&&(document.body.style.overflow=rr,rr=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")},Vr=function(){},Da="enter",Na="entering",Br="leave",Wa="leavng",Pg={t:"ns-resize",tr:"nesw-resize",r:"ew-resize",br:"nwse-resize",b:"ns-resize",bl:"nesw-resize",l:"ew-resize",tl:"nwse-resize"},Zr={props:{name:{type:String,default:null},modelValue:{type:Boolean,default:!1},ssr:{type:Boolean,default:!0},classes:{type:[String,Object,Array],default:""},overlayClass:{type:[String,Object,Array],default:""},contentClass:{type:[String,Object,Array],default:""},styles:{type:[Object,Array],default:function(){return{}}},overlayStyle:{type:[Object,Array],default:function(){return{}}},contentStyle:{type:[Object,Array],default:function(){return{}}},lockScroll:{type:Boolean,default:!0},hideOverlay:{type:Boolean,default:!1},clickToClose:{type:Boolean,default:!0},escToClose:{type:Boolean,default:!1},preventClick:{type:Boolean,default:!1},attach:{type:null,default:!1,validator:function(e){var t=ro(e);return t==="boolean"||t==="string"||e.nodeType===Node.ELEMENT_NODE}},transition:{type:[String,Object],default:"vfm"},overlayTransition:{type:[String,Object],default:"vfm"},keepOverlay:{type:Boolean,default:!1},zIndexAuto:{type:Boolean,default:!0},zIndexBase:{type:[String,Number],default:1e3},zIndex:{type:[Boolean,String,Number],default:!1},focusRetain:{type:Boolean,default:!0},focusTrap:{type:Boolean,default:!1},fitParent:{type:Boolean,default:!0},drag:{type:Boolean,default:!1},dragSelector:{type:String,default:""},keepChangedStyle:{type:Boolean,default:!1},resize:{type:Boolean,default:!1},resizeDirections:{type:Array,default:function(){return["t","tr","r","br","b","bl","l","tl"]},validator:function(e){return["t","tr","r","br","b","bl","l","tl"].filter(function(t){return e.indexOf(t)!==-1}).length===e.length}},minWidth:{type:Number,default:0},minHeight:{type:Number,default:0},maxWidth:{type:Number,default:1/0},maxHeight:{type:Number,default:1/0}},emits:["update:modelValue","click-outside","before-open","opened","before-close","closed","_before-open","_opened","_closed","drag:start","drag:move","drag:end","resize:start","resize:move","resize:end"],setup:function(e,t){var n=t.emit,r=Symbol("vfm"),s=ce(null),i=ce(null),o=ce(null),a=ce(null),l=ce(null),u=ce(null),f=ce(null),d=new _g,c=ce(!1),b=Jt({modal:!1,overlay:!1,resize:!1}),y=ce(null),O=ce(null),R=ce(!1),w=ce({}),h=ce({}),A=ce(null),S=ce(null),I=Vr,V=Vr,L=be(function(){return typeof e.overlayTransition=="string"?{name:e.overlayTransition}:ze({},e.overlayTransition)}),E=be(function(){return typeof e.transition=="string"?{name:e.transition}:ze({},e.transition)}),$=be(function(){return(e.hideOverlay||y.value===Br)&&O.value===Br}),B=be(function(){return e.zIndex===!1?!!e.zIndexAuto&&+e.zIndexBase+2*(f.value||0):e.zIndex}),T=be(function(){return ze({},B.value!==!1&&{zIndex:B.value})}),m=be(function(){var j=[h.value];return Array.isArray(e.contentStyle)?j.push.apply(j,fn(e.contentStyle)):j.push(e.contentStyle),j});function P(){return{uid:r,props:e,emit:n,vfmContainer:i,vfmContent:o,vfmResize:a,vfmOverlayTransition:l,vfmTransition:u,getAttachElement:M,modalStackIndex:f,visibility:b,handleLockScroll:v,$focusTrap:d,toggle:q,params:w}}function C(){if(e.modelValue){if(n("_before-open",k({type:"_before-open"})),p("before-open",!1))return void V("show");var j=M();if(j||e.attach===!1){if(e.attach!==!1){if(!s.value)return c.value=!0,void ft(function(){C()});j.appendChild(s.value)}var K=e.api.openedModals.findIndex(function(J){return J.uid===r});K!==-1&&e.api.openedModals.splice(K,1),e.api.openedModals.push(P()),f.value=e.api.openedModals.length-1,v(),e.api.openedModals.filter(function(J){return J.uid!==r}).forEach(function(J,he){J.getAttachElement()===j&&(J.modalStackIndex.value=he,!J.props.keepOverlay&&(J.visibility.overlay=!1))}),c.value=!0,b.overlay=!0,b.modal=!0}else j!==!1&&console.warn("Unable to locate target ".concat(e.attach))}}function g(){var j=e.api.openedModals.findIndex(function(J){return J.uid===r});if(j!==-1&&e.api.openedModals.splice(j,1),e.api.openedModals.length>0){var K=e.api.openedModals[e.api.openedModals.length-1];K.props.focusTrap&&K.$focusTrap.firstElement().focus(),(K.props.focusRetain||K.props.focusTrap)&&K.vfmContainer.value.focus(),!K.props.hideOverlay&&(K.visibility.overlay=!0)}e.drag&&fe(),e.resize&&U(),A.value=null,b.overlay=!1,b.modal=!1}function v(){e.modelValue&&ft(function(){e.lockScroll?Ag(i.value,{reserveScrollBarGap:!0}):Js(i.value)})}function M(){return e.attach!==!1&&(typeof e.attach=="string"?!!window&&window.document.querySelector(e.attach):e.attach)}function k(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return ze({ref:P()},j)}function p(j,K){var J=!1,he=k({type:j,stop:function(){J=!0}});return n(j,he),!!J&&(R.value=!0,ft(function(){n("update:modelValue",K)}),!0)}function N(j,K,J){A.value="".concat(K,":").concat(J),n(A.value,j)}function q(j,K){var J=arguments;return new Promise(function(he,oe){I=function(x){he(x),I=Vr},V=function(x){oe(x),V=Vr};var _=typeof j=="boolean"?j:!e.modelValue;_&&J.length===2&&(w.value=K),n("update:modelValue",_)})}function ee(j){j.stopPropagation();var K,J="resize",he="drag",oe=j.target.getAttribute("direction");if(oe)K=J;else{if(!function(ue,de,ge){return ge===""||fn(de.querySelectorAll(ge)).includes(ue.target)}(j,o.value,e.dragSelector))return;K=he}N(j,K,"start");var _,x,W,H,z=$a(j),Z=i.value.getBoundingClientRect(),Q=o.value.getBoundingClientRect(),X=window.getComputedStyle(o.value).position==="absolute",G=Va(h.value.top),Y=Va(h.value.left),ae=function(){if(e.fitParent){var ue={absolute:function(){return{minTop:0,minLeft:0,maxTop:Z.height-Q.height,maxLeft:Z.width-Q.width}},relative:function(){return{minTop:G+Z.top-Q.top,minLeft:Y+Z.left-Q.left,maxTop:G+Z.bottom-Q.bottom,maxLeft:Y+Z.right-Q.right}}};return X?ue.absolute():ue.relative()}return{}}(),ie=K===J&&(_=document.body,x="cursor",W=Pg[oe],H=_.style[x],_.style[x]=W,function(){_.style[x]=H}),le=function(ue){ue.stopPropagation(),N(ue,K,"move");var de,ge,_e=$a(ue),we={x:_e.x-z.x,y:_e.y-z.y};K===J&&(we=function(Rt,_r,en,tn,We){var st=function(Ue){var ut,Mt=_r[Ue.axis];Mt=e.fitParent?Ir(Ue.min,Mt,Ue.max):Mt;var Tt=Ir(Ue.minEdge,Ue.getEdge(Mt),Ue.maxEdge);return Mt=Ue.getOffsetAxis(Tt,We),Cn(ut={},Ue.edgeName,Tt),Cn(ut,Ue.axis,Mt),ut},wr=function(Ue,ut,Mt,Tt){var io,oo=tn[ut],ao=en[Ue]-tn[Ue],lo=(io=ut).charAt(0).toUpperCase()+io.slice(1);return{axis:Mt,edgeName:ut,min:Tt?ao:-oo,max:Tt?oo:ao,minEdge:e["min".concat(lo)],maxEdge:e["max".concat(lo)],getEdge:function(js){return tn[ut]-js*(Tt?1:-1)},getOffsetAxis:function(js,oc){var uo=tn[ut]-js;return oc?Tt?uo:0:(Tt?1:-1)*uo/2}}},ic={t:["top","height","y",!0],b:["bottom","height","y",!1],l:["left","width","x",!0],r:["right","width","x",!1]},Bs={x:0,y:0};return Rt.split("").forEach(function(Ue){var ut=wr.apply(void 0,fn(ic[Ue]));Bs=ze(ze({},Bs),st(ut))}),Bs}(oe,we,Z,Q,X)),X?(de=Q.top-Z.top+we.y,ge=Q.left-Z.left+we.x):(de=G+we.y,ge=Y+we.x),K===he&&e.fitParent&&(de=Ir(ae.minTop,de,ae.maxTop),ge=Ir(ae.minLeft,ge,ae.maxLeft));var Ge=ze(ze(ze({position:"relative",top:de+"px",left:ge+"px",margin:"unset",touchAction:"none"},X&&{position:"absolute",transform:"unset",width:Q.width+"px",height:Q.height+"px"}),we.width&&{width:we.width+"px"}),we.height&&{height:we.height+"px"});h.value=ze(ze({},h.value),Ge)};Lr("move",document,le),Lr("up",document,function ue(de){de.stopPropagation(),K===J&&ie&&ie(),setTimeout(function(){N(de,K,"end")}),$r("move",document,le),$r("up",document,ue)})}function ne(){Lr("down",o.value,ee),h.value.touchAction="none"}function fe(){$r("down",o.value,ee)}function D(){b.resize=!0,ft(function(){Lr("down",a.value,ee)})}function U(){$r("down",a.value,ee),b.resize=!1}return Pe(function(){return e.modelValue},function(j){if(R.value)R.value=!1;else if(C(),!j){if(p("before-close",!0))return void V("hide");g()}}),Pe(function(){return e.lockScroll},v),Pe(function(){return e.hideOverlay},function(j){e.modelValue&&!j&&(b.overlay=!0)}),Pe(function(){return e.attach},C),Pe($,function(j){j&&(c.value=!1,i.value.style.display="none")},{flush:"post"}),Pe(function(){return e.drag},function(j){c.value&&(j?ne():fe())}),Pe(function(){return e.resize},function(j){c.value&&(j?D():U())}),Pe(function(){return e.keepChangedStyle},function(j){j||(h.value={})}),e.api.modals.push(P()),Ze(function(){C()}),vr(function(){var j;g(),e.lockScroll&&i.value&&Js(i.value),s==null||(j=s.value)===null||j===void 0||j.remove();var K=e.api.modals.findIndex(function(J){return J.uid===r});e.api.modals.splice(K,1)}),{root:s,vfmContainer:i,vfmContent:o,vfmResize:a,vfmOverlayTransition:l,vfmTransition:u,computedOverlayTransition:L,computedTransition:E,visible:c,visibility:b,params:w,calculateZIndex:B,bindStyle:T,bindContentStyle:m,beforeOverlayEnter:function(){y.value=Na},afterOverlayEnter:function(){y.value=Da},beforeOverlayLeave:function(){y.value=Wa},afterOverlayLeave:function(){y.value=Br},beforeModalEnter:function(){O.value=Na},afterModalEnter:function(){O.value=Da,(e.focusRetain||e.focusTrap)&&i.value.focus(),e.focusTrap&&d.enable(i.value),e.drag&&ne(),e.resize&&D(),n("_opened"),n("opened",k({type:"opened"})),I("show")},beforeModalLeave:function(){O.value=Wa,d.enabled()&&d.disable()},afterModalLeave:function(){O.value=Br,f.value=null,e.lockScroll&&Js(i.value),e.keepChangedStyle||(h.value={});var j=!1,K=k({type:"closed",stop:function(){j=!0}});n("_closed"),n("closed",K),I("hide"),j||(w.value={})},onMousedown:function(j){S.value=j==null?void 0:j.target},onMouseupContainer:function(){S.value===i.value&&A.value!=="resize:move"&&(n("click-outside",k({type:"click-outside"})),e.clickToClose&&n("update:modelValue",!1))},onEsc:function(){c.value&&e.escToClose&&n("update:modelValue",!1)}}}},Qs=Pf();Cs("data-v-2836fdb5");var kg={key:0,ref:"vfmResize",class:"vfm__resize vfm--absolute vfm--inset vfm--prevent-none vfm--select-none vfm--touch-none"};Es();var Cg=Qs(function(e,t,n,r,s,i){return n.ssr||r.visible?Sn((se(),Ce("div",{key:0,ref:"root",style:r.bindStyle,class:["vfm vfm--inset",[n.attach===!1?"vfm--fixed":"vfm--absolute",{"vfm--prevent-none":n.preventClick}]],onKeydown:t[4]||(t[4]=Ah(function(){return r.onEsc&&r.onEsc.apply(r,arguments)},["esc"]))},[te(ss,dr(r.computedOverlayTransition,{onBeforeEnter:r.beforeOverlayEnter,onAfterEnter:r.afterOverlayEnter,onBeforeLeave:r.beforeOverlayLeave,onAfterLeave:r.afterOverlayLeave}),{default:Qs(function(){return[!n.hideOverlay&&r.visibility.overlay?(se(),Ce("div",{key:0,class:["vfm__overlay vfm--overlay vfm--absolute vfm--inset",n.overlayClass],style:n.overlayStyle},null,6)):Te("v-if",!0)]}),_:1},16,["onBeforeEnter","onAfterEnter","onBeforeLeave","onAfterLeave"]),te(ss,dr(r.computedTransition,{onBeforeEnter:r.beforeModalEnter,onAfterEnter:r.afterModalEnter,onBeforeLeave:r.beforeModalLeave,onAfterLeave:r.afterModalLeave}),{default:Qs(function(){return[Sn(te("div",{ref:"vfmContainer",class:["vfm__container vfm--absolute vfm--inset vfm--outline-none",n.classes],style:n.styles,"aria-expanded":r.visibility.modal.toString(),role:"dialog","aria-modal":"true",tabindex:"-1",onMouseup:t[2]||(t[2]=$n(function(){return r.onMouseupContainer&&r.onMouseupContainer.apply(r,arguments)},["self"])),onMousedown:t[3]||(t[3]=$n(function(){return r.onMousedown&&r.onMousedown.apply(r,arguments)},["self"]))},[te("div",{ref:"vfmContent",class:["vfm__content",[n.contentClass,{"vfm--prevent-auto":n.preventClick}]],style:r.bindContentStyle,onMousedown:t[1]||(t[1]=function(o){return r.onMousedown(null)})},[Yf(e.$slots,"default",{params:r.params,close:function(){return e.$emit("update:modelValue",!1)}}),r.visibility.resize&&r.visibility.modal?(se(),Ce("div",kg,[(se(!0),Ce(xe,null,Mn(n.resizeDirections,function(o){return se(),Ce("div",{key:o,direction:o,class:["vfm--resize-".concat(o),"vfm--absolute vfm--prevent-auto"]},null,10,["direction"])}),128))],512)):Te("v-if",!0)],38)],46,["aria-expanded"]),[[Vn,r.visibility.modal]])]}),_:3},16,["onBeforeEnter","onAfterEnter","onBeforeLeave","onAfterLeave"])],38)),[[Vn,!n.ssr||r.visible]]):Te("v-if",!0)});(function(e,t){t===void 0&&(t={});var n=t.insertAt;if(e&&typeof document<"u"){var r=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",n==="top"&&r.firstChild?r.insertBefore(s,r.firstChild):r.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}})(` .vfm--fixed[data-v-2836fdb5] { position: fixed; diff --git a/src/ui/dist/assets/index.1d09503d.js.gz b/src/ui/dist/assets/index.c970909a.js.gz similarity index 81% rename from src/ui/dist/assets/index.1d09503d.js.gz rename to src/ui/dist/assets/index.c970909a.js.gz index e6b5596b8..2e33feb9a 100644 Binary files a/src/ui/dist/assets/index.1d09503d.js.gz and b/src/ui/dist/assets/index.c970909a.js.gz differ diff --git a/src/ui/dist/assets/index.981eedbc.js b/src/ui/dist/assets/index.dcb64849.js similarity index 97% rename from src/ui/dist/assets/index.981eedbc.js rename to src/ui/dist/assets/index.dcb64849.js index ce7c28c9e..2c0e035e6 100644 --- a/src/ui/dist/assets/index.981eedbc.js +++ b/src/ui/dist/assets/index.dcb64849.js @@ -1 +1 @@ -import{m as P,o as h,c as f,a as t,t as _,_ as k,n as V,D,d as U,y as E,z as N,C as S,E as q,bP as W,g as o,w as y,b as T,u as m,F as j,i as F,k as M,l as O}from"./index.1d09503d.js";import{C as g}from"./Card.4b544f8d.js";import{I as w,D as z}from"./Dropdown.f68f135c.js";const A={class:"material-symbols-rounded ms-wght-300 cursor-pointer"},H={class:"checkbox__label"},J={class:"checkbox__label__title"},K={class:"checkbox__label__sublabel italic"},L=P({__name:"Checkbox",props:{modelValue:{type:Boolean,required:!0},label:{type:String,required:!1,default:""},disabled:{type:Boolean,required:!1,default:!1},sublabel:{type:String,required:!1,default:""}},emits:["update:modelValue"],setup(n,{emit:s}){const a=n,u=p=>s("update:modelValue",p),i=()=>u(!a.modelValue);return(p,d)=>(h(),f("div",{class:"checkbox",onClick:i},[t("span",A,_(n.modelValue?"check_box":"check_box_outline_blank"),1),t("div",H,[t("div",J,_(n.label),1),t("div",K,_(n.sublabel),1)])]))}});const x=k(L,[["__scopeId","data-v-25720abd"]]);const R={key:0,class:"material-symbols-rounded"},G=["type","placeholder","disabled"],Q={__name:"PasswordInputWithIcon",props:{icon:String,placeholder:String,modelValue:String,disabled:Boolean},emits:["update:modelValue","change","submit"],setup(n,{emit:s}){const a=n,u=V(a.modelValue);D(()=>a.modelValue,b=>{u.value=b});const i=()=>{s("update:modelValue",u.value),s("change",u.value)},p=b=>{b.key==="Enter"&&s("submit",u)},d=V(!1);return(b,v)=>(h(),f("div",{class:S(["text-input-with-icon rounded-3xl flex items-center px-4",{disabled:n.disabled}])},[n.icon?(h(),f("span",R,_(n.icon),1)):U("",!0),E(t("input",{type:d.value?"text":"password","onUpdate:modelValue":v[0]||(v[0]=C=>u.value=C),onInput:i,onKeyup:p,placeholder:n.placeholder,disabled:n.disabled},null,40,G),[[N,u.value]]),t("span",{class:"material-symbols-rounded cursor-pointer",onClick:v[1]||(v[1]=C=>d.value=!d.value)},_(d.value?"visibility":"visibility_off"),1)],2))}},$=k(Q,[["__scopeId","data-v-d593805e"]]);const X={name:"Theme",props:{name:String},methods:{selected(){return window.getCurrentTheme()==this.name},select(){window.setTheme(this.name),this.$emit("selected")}}},Y=["src"];function Z(n,s,a,u,i,p){return h(),f("div",{onClick:s[0]||(s[0]=(...d)=>p.select&&p.select(...d)),class:"wrapper"},[t("p",{class:S(["mb-4",{selected:p.selected()}])},_(a.name),3),t("img",{src:`/assets/img/themes/${this.name}.svg`,class:S({selected:p.selected()})},null,10,Y)])}const ee=k(X,[["render",Z],["__scopeId","data-v-40cb3441"]]),c=n=>(M("data-v-efa5d4d4"),n=n(),O(),n),te={class:"p-[10px] preferences"},le=c(()=>t("summary",{class:"cursor-pointer"},"How to",-1)),se=c(()=>t("p",null,[T("1) Head over to the "),t("a",{href:"https://developer.spotify.com/dashboard/applications",target:"_blank"},"spotify developer dashboard")],-1)),ae=c(()=>t("p",null,"2) Create An App",-1)),oe=c(()=>t("p",null,"3) Enter any name and any description",-1)),ne=c(()=>t("p",null,"5) Copy and enter the client id and secret into the corresponding input field",-1)),de=c(()=>t("hr",{class:"my-4"},null,-1)),ie=c(()=>t("h5",null,"Client ID: ",-1)),re=c(()=>t("h5",{class:"mt-4"},"Client Secret: ",-1)),ue=c(()=>t("h2",{class:"mt-[10px]"},"Player",-1)),ce=c(()=>t("h2",{class:"mt-[10px]"},"My Data",-1)),pe=c(()=>t("h2",{class:"mt-[10px]"},"Theme",-1)),me={class:"themes"},_e=c(()=>t("h2",{class:"mt-[10px]"},"Sidebar",-1)),be=P({__name:"index",setup(n){const s=V(!1),a=V({id:"",secret:""}),u=q(()=>s.value?Object.values(a.value).some(r=>r==="")?!1:a.value.id!==i.value.id||a.value.secret!==i.value.secret||s.value!==i.value.enabled:i.value.enabled),i=V({id:"",secret:"",enabled:!1});fetch("/api/config/spotify").then(async r=>{let e={id:"",secret:"",enabled:!1};if(r.status==200)e=await r.json();else if([204,401].includes(r.status))e={id:"restricted",secret:"restricted",enabled:!1};else throw new Error("Failed to fetch spotify config");i.value=e,i.value.enabled=![e.id,e.secret].includes("restricted"),s.value=i.value.enabled,a.value.id=e.id.replace("restricted",""),a.value.secret=e.secret.replace("restricted","")});const p=async()=>{if(!u.value)return;let r=a.value.id,e=a.value.secret;s.value||(e=r="restricted"),(await fetch("/api/config/spotify",{method:"POST",body:JSON.stringify({id:r,secret:e})})).ok&&(i.value={id:r,secret:e,enabled:s.value})},d=W(),b=["dynamic","light","dark"],v=()=>{localStorage.clear(),sessionStorage.clear(),window.location.reload()},I=`http://${window.location.host}/api/spotify/callback`;return(r,e)=>(h(),f("div",te,[o(g,{class:"p-4 pt-0"},{default:y(()=>[o(x,{modelValue:s.value,"onUpdate:modelValue":e[0]||(e[0]=l=>s.value=l),class:"h2 mb-2",label:"Spotify"},null,8,["modelValue"]),t("details",null,[le,se,ae,oe,t("p",null,[T("4) Edit the settings: set the redirect url to "),t("a",{href:I},_(I))]),ne]),de,ie,o($,{modelValue:a.value.id,"onUpdate:modelValue":e[1]||(e[1]=l=>a.value.id=l),disabled:!s.value,icon:"token"},null,8,["modelValue","disabled"]),re,o($,{modelValue:a.value.secret,"onUpdate:modelValue":e[2]||(e[2]=l=>a.value.secret=l),disabled:!s.value,icon:"lock"},null,8,["modelValue","disabled"]),o(w,{disabled:!m(u),class:"ml-auto mt-4",icon:"save",label:"Save",onClick:p},null,8,["disabled"])]),_:1}),o(g,{class:"p-4 pt-0"},{default:y(()=>[ue,o(x,{modelValue:m(d).player.pictureInPicture,"onUpdate:modelValue":e[3]||(e[3]=l=>m(d).player.pictureInPicture=l),label:"Support Picture in Picture",sublabel:"this will slightly reduce performance"},null,8,["modelValue"]),o(z,{modelValue:m(d).player.type,"onUpdate:modelValue":e[4]||(e[4]=l=>m(d).player.type=l),options:[{value:"web",label:"Native player"},{value:"web/wave",label:"Wave player"}]},null,8,["modelValue"])]),_:1}),o(g,{class:"p-4 pt-0"},{default:y(()=>[ce,o(w,{class:"mx-auto mt-4",icon:"backup",label:"Back up database",onClick:e[5]||(e[5]=l=>r.$router.push("/export"))}),o(w,{class:"mx-auto mt-4",icon:"cloud_download",label:"Import database",onClick:e[6]||(e[6]=l=>r.$router.push("/import"))}),o(w,{class:"mx-auto mt-4",icon:"delete",label:"Clean browser settings",onClick:v}),o(w,{class:"mx-auto mt-4",icon:"folder",label:"Manage files",onClick:e[7]||(e[7]=l=>r.$router.push("/preferences/my-data"))})]),_:1}),o(g,{class:"p-4 pt-0"},{default:y(()=>[pe,t("div",me,[(h(),f(j,null,F(b,(l,B)=>o(ee,{key:B,name:l},null,8,["name"])),64))])]),_:1}),o(g,{class:"p-4 pt-0"},{default:y(()=>[_e,o(x,{modelValue:m(d).sidebar.news,"onUpdate:modelValue":e[8]||(e[8]=l=>m(d).sidebar.news=l),label:"Show 'News' Tab"},null,8,["modelValue"]),o(x,{modelValue:m(d).sidebar.sports,"onUpdate:modelValue":e[9]||(e[9]=l=>m(d).sidebar.sports=l),label:"Show 'Sports' Tab"},null,8,["modelValue"])]),_:1})]))}});const ye=k(be,[["__scopeId","data-v-efa5d4d4"]]);export{ye as default}; +import{m as P,o as h,c as f,a as t,t as _,_ as k,n as V,D,d as U,y as E,z as N,C as S,E as q,bP as W,g as o,w as y,b as T,u as m,F as j,i as F,k as M,l as O}from"./index.c970909a.js";import{C as g}from"./Card.d68bcee4.js";import{I as w,D as z}from"./Dropdown.7541a2ee.js";const A={class:"material-symbols-rounded ms-wght-300 cursor-pointer"},H={class:"checkbox__label"},J={class:"checkbox__label__title"},K={class:"checkbox__label__sublabel italic"},L=P({__name:"Checkbox",props:{modelValue:{type:Boolean,required:!0},label:{type:String,required:!1,default:""},disabled:{type:Boolean,required:!1,default:!1},sublabel:{type:String,required:!1,default:""}},emits:["update:modelValue"],setup(n,{emit:s}){const a=n,u=p=>s("update:modelValue",p),i=()=>u(!a.modelValue);return(p,d)=>(h(),f("div",{class:"checkbox",onClick:i},[t("span",A,_(n.modelValue?"check_box":"check_box_outline_blank"),1),t("div",H,[t("div",J,_(n.label),1),t("div",K,_(n.sublabel),1)])]))}});const x=k(L,[["__scopeId","data-v-25720abd"]]);const R={key:0,class:"material-symbols-rounded"},G=["type","placeholder","disabled"],Q={__name:"PasswordInputWithIcon",props:{icon:String,placeholder:String,modelValue:String,disabled:Boolean},emits:["update:modelValue","change","submit"],setup(n,{emit:s}){const a=n,u=V(a.modelValue);D(()=>a.modelValue,b=>{u.value=b});const i=()=>{s("update:modelValue",u.value),s("change",u.value)},p=b=>{b.key==="Enter"&&s("submit",u)},d=V(!1);return(b,v)=>(h(),f("div",{class:S(["text-input-with-icon rounded-3xl flex items-center px-4",{disabled:n.disabled}])},[n.icon?(h(),f("span",R,_(n.icon),1)):U("",!0),E(t("input",{type:d.value?"text":"password","onUpdate:modelValue":v[0]||(v[0]=C=>u.value=C),onInput:i,onKeyup:p,placeholder:n.placeholder,disabled:n.disabled},null,40,G),[[N,u.value]]),t("span",{class:"material-symbols-rounded cursor-pointer",onClick:v[1]||(v[1]=C=>d.value=!d.value)},_(d.value?"visibility":"visibility_off"),1)],2))}},$=k(Q,[["__scopeId","data-v-d593805e"]]);const X={name:"Theme",props:{name:String},methods:{selected(){return window.getCurrentTheme()==this.name},select(){window.setTheme(this.name),this.$emit("selected")}}},Y=["src"];function Z(n,s,a,u,i,p){return h(),f("div",{onClick:s[0]||(s[0]=(...d)=>p.select&&p.select(...d)),class:"wrapper"},[t("p",{class:S(["mb-4",{selected:p.selected()}])},_(a.name),3),t("img",{src:`/assets/img/themes/${this.name}.svg`,class:S({selected:p.selected()})},null,10,Y)])}const ee=k(X,[["render",Z],["__scopeId","data-v-40cb3441"]]),c=n=>(M("data-v-efa5d4d4"),n=n(),O(),n),te={class:"p-[10px] preferences"},le=c(()=>t("summary",{class:"cursor-pointer"},"How to",-1)),se=c(()=>t("p",null,[T("1) Head over to the "),t("a",{href:"https://developer.spotify.com/dashboard/applications",target:"_blank"},"spotify developer dashboard")],-1)),ae=c(()=>t("p",null,"2) Create An App",-1)),oe=c(()=>t("p",null,"3) Enter any name and any description",-1)),ne=c(()=>t("p",null,"5) Copy and enter the client id and secret into the corresponding input field",-1)),de=c(()=>t("hr",{class:"my-4"},null,-1)),ie=c(()=>t("h5",null,"Client ID: ",-1)),re=c(()=>t("h5",{class:"mt-4"},"Client Secret: ",-1)),ue=c(()=>t("h2",{class:"mt-[10px]"},"Player",-1)),ce=c(()=>t("h2",{class:"mt-[10px]"},"My Data",-1)),pe=c(()=>t("h2",{class:"mt-[10px]"},"Theme",-1)),me={class:"themes"},_e=c(()=>t("h2",{class:"mt-[10px]"},"Sidebar",-1)),be=P({__name:"index",setup(n){const s=V(!1),a=V({id:"",secret:""}),u=q(()=>s.value?Object.values(a.value).some(r=>r==="")?!1:a.value.id!==i.value.id||a.value.secret!==i.value.secret||s.value!==i.value.enabled:i.value.enabled),i=V({id:"",secret:"",enabled:!1});fetch("/api/config/spotify").then(async r=>{let e={id:"",secret:"",enabled:!1};if(r.status==200)e=await r.json();else if([204,401].includes(r.status))e={id:"restricted",secret:"restricted",enabled:!1};else throw new Error("Failed to fetch spotify config");i.value=e,i.value.enabled=![e.id,e.secret].includes("restricted"),s.value=i.value.enabled,a.value.id=e.id.replace("restricted",""),a.value.secret=e.secret.replace("restricted","")});const p=async()=>{if(!u.value)return;let r=a.value.id,e=a.value.secret;s.value||(e=r="restricted"),(await fetch("/api/config/spotify",{method:"POST",body:JSON.stringify({id:r,secret:e})})).ok&&(i.value={id:r,secret:e,enabled:s.value})},d=W(),b=["dynamic","light","dark"],v=()=>{localStorage.clear(),sessionStorage.clear(),window.location.reload()},I=`http://${window.location.host}/api/spotify/callback`;return(r,e)=>(h(),f("div",te,[o(g,{class:"p-4 pt-0"},{default:y(()=>[o(x,{modelValue:s.value,"onUpdate:modelValue":e[0]||(e[0]=l=>s.value=l),class:"h2 mb-2",label:"Spotify"},null,8,["modelValue"]),t("details",null,[le,se,ae,oe,t("p",null,[T("4) Edit the settings: set the redirect url to "),t("a",{href:I},_(I))]),ne]),de,ie,o($,{modelValue:a.value.id,"onUpdate:modelValue":e[1]||(e[1]=l=>a.value.id=l),disabled:!s.value,icon:"token"},null,8,["modelValue","disabled"]),re,o($,{modelValue:a.value.secret,"onUpdate:modelValue":e[2]||(e[2]=l=>a.value.secret=l),disabled:!s.value,icon:"lock"},null,8,["modelValue","disabled"]),o(w,{disabled:!m(u),class:"ml-auto mt-4",icon:"save",label:"Save",onClick:p},null,8,["disabled"])]),_:1}),o(g,{class:"p-4 pt-0"},{default:y(()=>[ue,o(x,{modelValue:m(d).player.pictureInPicture,"onUpdate:modelValue":e[3]||(e[3]=l=>m(d).player.pictureInPicture=l),label:"Support Picture in Picture",sublabel:"this will slightly reduce performance"},null,8,["modelValue"]),o(z,{modelValue:m(d).player.type,"onUpdate:modelValue":e[4]||(e[4]=l=>m(d).player.type=l),options:[{value:"web",label:"Native player"},{value:"web/wave",label:"Wave player"}]},null,8,["modelValue"])]),_:1}),o(g,{class:"p-4 pt-0"},{default:y(()=>[ce,o(w,{class:"mx-auto mt-4",icon:"backup",label:"Back up database",onClick:e[5]||(e[5]=l=>r.$router.push("/export"))}),o(w,{class:"mx-auto mt-4",icon:"cloud_download",label:"Import database",onClick:e[6]||(e[6]=l=>r.$router.push("/import"))}),o(w,{class:"mx-auto mt-4",icon:"delete",label:"Clean browser settings",onClick:v}),o(w,{class:"mx-auto mt-4",icon:"folder",label:"Manage files",onClick:e[7]||(e[7]=l=>r.$router.push("/preferences/my-data"))})]),_:1}),o(g,{class:"p-4 pt-0"},{default:y(()=>[pe,t("div",me,[(h(),f(j,null,F(b,(l,B)=>o(ee,{key:B,name:l},null,8,["name"])),64))])]),_:1}),o(g,{class:"p-4 pt-0"},{default:y(()=>[_e,o(x,{modelValue:m(d).sidebar.news,"onUpdate:modelValue":e[8]||(e[8]=l=>m(d).sidebar.news=l),label:"Show 'News' Tab"},null,8,["modelValue"]),o(x,{modelValue:m(d).sidebar.sports,"onUpdate:modelValue":e[9]||(e[9]=l=>m(d).sidebar.sports=l),label:"Show 'Sports' Tab"},null,8,["modelValue"])]),_:1})]))}});const ye=k(be,[["__scopeId","data-v-efa5d4d4"]]);export{ye as default}; diff --git a/src/ui/dist/assets/index.dcb64849.js.gz b/src/ui/dist/assets/index.dcb64849.js.gz new file mode 100644 index 000000000..53539a008 Binary files /dev/null and b/src/ui/dist/assets/index.dcb64849.js.gz differ diff --git a/src/ui/dist/assets/song.619409cb.js.gz b/src/ui/dist/assets/song.619409cb.js.gz deleted file mode 100644 index a2dd61ce7..000000000 Binary files a/src/ui/dist/assets/song.619409cb.js.gz and /dev/null differ diff --git a/src/ui/dist/assets/song.619409cb.js b/src/ui/dist/assets/song.6a60a886.js similarity index 97% rename from src/ui/dist/assets/song.619409cb.js rename to src/ui/dist/assets/song.6a60a886.js index eabb4fbe2..ccd40f663 100644 --- a/src/ui/dist/assets/song.619409cb.js +++ b/src/ui/dist/assets/song.6a60a886.js @@ -1 +1 @@ -import{j as I,v as M,m as g,n as w,o as l,f as y,w as E,a as o,t as T,L as F,c as r,r as A,d as m,x as b,e as J,k as O,l as U,_ as C,F as P,i as L,u as k,g as H,T as V,h as z,y as W,z as G,A as K,p as Q,B as R,C as X}from"./index.1d09503d.js";import{I as x,D as Y}from"./Dropdown.f68f135c.js";const f=I(),Z=async e=>{await fetch(`/api/playlists/${e.id}`,{method:"POST",body:JSON.stringify({name:e.name,description:e.description,cover:e.cover})}),await f.fetchPlaylists()},Se=async e=>{const t=await fetch(`/api/playlists/${e}`);if(t.status===404)return null;const c=await t.json();for(const n of c.songs)n.href=`/track/${M(n.id)}`;return c},Pe=async e=>{await fetch(`/api/playlists/${e}`,{method:"DELETE"}),await f.fetchPlaylists()},q=async()=>{const t=await(await fetch("/api/playlists/new")).json();return await f.fetchPlaylists(),t},Ve=async(e,t="",c="")=>{const n=await q();return await Z({id:n,name:e,description:t,cover:c}),n},xe=async(e,t)=>{await fetch(`/api/playlists/${e}/tracks`,{method:"DELETE",body:JSON.stringify({songId:t})}),await f.fetchPlaylists()},ee=e=>(O("data-v-7e2e81d1"),e=e(),U(),e),ae={class:"wrapper"},te={class:"header bg-secondary rounded-t-2xl p-3"},se={class:"title font-black"},le=ee(()=>o("span",{class:"title material-icons-round"}," close ",-1)),ne=[le],oe={key:1},ce={key:2,class:"p-4 pt-0"},re={key:0,class:"confirm"},de=g({__name:"Template",props:{name:{type:String,required:!0},submit:{type:Object,required:!0},secondary:{type:Object,required:!1,default:null}},emits:["submit","close","secondary"],setup(e,{expose:t,emit:c}){const n=e,u=w(!1),i=w(!1),a=w(""),s=()=>i.value=!1,h=()=>{u.value=!1,i.value=!0},S=()=>{u.value=!0,i.value=!0},D=async(p,d)=>{S();const _=await window.fetch(p,d);return h(),_.ok?_:(a.value=await _.text(),null)},v=()=>{s(),c("close")},N=()=>{c("submit"),v()},j=()=>{c("secondary"),v()};return t({show:h,hide:s,load:S,fetch:D}),(p,d)=>{const _=J("vue-final-modal");return l(),y(_,{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=B=>i.value=B),classes:"modal-container","content-class":"modal-content",onClick:d[1]||(d[1]=b(()=>{},["stop"])),onContextmenu:d[2]||(d[2]=b(()=>{},["stop"])),onDrag:d[3]||(d[3]=b(()=>{},["stop"]))},{default:E(()=>[o("div",ae,[o("div",te,[o("h3",se,T(e.name),1),o("button",{class:"modal-close",onClick:v},ne)]),u.value?(l(),y(F,{key:0})):a.value?(l(),r("div",oe)):(l(),r("div",ce,[A(p.$slots,"default",{},void 0,!0),n.submit||n.secondary?(l(),r("div",re,[n.secondary?(l(),y(x,{key:0,icon:n.secondary.icon,label:n.secondary.label,type:n.secondary.type,onClick:j},null,8,["icon","label","type"])):m("",!0),n.submit?(l(),y(x,{key:1,icon:n.submit.icon,label:n.submit.label,type:n.submit.type,onClick:N},null,8,["icon","label","type"])):m("",!0)])):m("",!0)]))])]),_:3},8,["modelValue"])}}});const Te=C(de,[["__scopeId","data-v-7e2e81d1"]]),ie={class:"form"},ue={class:"content"},ye=["onClick"],me=["accept","onChange"],he=["onUpdate:modelValue","type","onChange"],_e=g({__name:"Form",props:{options:{type:Array,required:!0}},setup(e,{expose:t}){const c=e;return t({toObject:()=>{const u={};return c.options.forEach(i=>{u[i.name]=i.value}),u}}),(u,i)=>(l(),r("div",ie,[(l(!0),r(P,null,L(e.options,a=>(l(),r("div",{key:a.name,class:"option"},[o("h4",null,T(k(K)(a.name)),1),o("div",ue,[a.type=="upload"?(l(),r(P,{key:0},[o("span",{class:"material-symbols-rounded icon-button",onClick:()=>{var s,h;return(h=(s=u.$refs["upload-"+a.name])==null?void 0:s[0])==null?void 0:h.click()}}," file_upload ",8,ye),o("input",{ref_for:!0,ref:"upload-"+a.name,accept:a.accept,style:{display:"none"},type:"file",onChange:s=>a==null?void 0:a.onUpload(s.target.files[0])},null,40,me),H(V,{ref_for:!0,ref:"cover",modelValue:a.value,"onUpdate:modelValue":s=>a.value=s,icon:a.icon,class:"addSong cover",type:"text",onChange:s=>a==null?void 0:a.onChange(a.value)},null,8,["modelValue","onUpdate:modelValue","icon","onChange"]),a.imagePreview?(l(),y(z,{key:0,src:k(Q)(a.value),class:"imagePreview",onClick:s=>k(R)(a.value)},null,8,["src","onClick"])):m("",!0)],64)):a.type=="dropdown"?(l(),y(Y,{key:1,modelValue:a.value,"onUpdate:modelValue":s=>a.value=s,icon:a.icon,options:a.options},null,8,["modelValue","onUpdate:modelValue","icon","options"])):a.type=="text"?(l(),y(V,{key:2,modelValue:a.value,"onUpdate:modelValue":s=>a.value=s,icon:a.icon,placeholder:a.placeholder,required:a.required,type:a.type,onChange:s=>a.onChange?a==null?void 0:a.onChange(a.value):null},null,8,["modelValue","onUpdate:modelValue","icon","placeholder","required","type","onChange"])):W((l(),r("input",{key:3,"onUpdate:modelValue":s=>a.value=s,type:a.type,onChange:s=>a.onChange?a==null?void 0:a.onChange(a.value):null},null,40,he)),[[G,a.value]])])]))),128))]))}});const Oe=C(_e,[["__scopeId","data-v-e7fa149a"]]),$=e=>(O("data-v-538de663"),e=e(),U(),e),fe=$(()=>o("div",{class:"index text-right"},"#",-1)),ve=$(()=>o("div",{class:"artist-title"}," title ",-1)),pe={key:0,class:"album"},we={key:1,class:"duration"},be=$(()=>o("span",{class:"material-symbols-rounded"},"schedule",-1)),ke=[be],ge=g({__name:"PlaylistHeader",props:{index:{type:Number,required:!0},withAlbum:{type:Boolean,required:!1,default:!1},withMore:{type:Boolean,required:!1,default:!1},withoutDuration:{type:Boolean,required:!1,default:!1}},setup(e){return(t,c)=>(l(),r("div",{class:X([{withAlbum:e.withAlbum,withMore:e.withMore},"playlist-header"])},[fe,ve,e.withAlbum?(l(),r("div",pe," album ")):m("",!0),e.withoutDuration?m("",!0):(l(),r("div",we,ke))],2))}});const Ue=C(ge,[["__scopeId","data-v-538de663"]]),qe=async e=>{await fetch(`/api/tracks/${e.id}`,{method:"PUT",body:JSON.stringify({source:e.source,title:e.title,artist:e.artist,album:e.album,cover:e.cover})})},De=async e=>await(await fetch("/api/browse/track",{method:"POST",body:JSON.stringify({url:e})})).json(),Ne=async(e,t)=>{e==="new"&&(e=await q()),typeof e=="string"&&console.error("playlistId cannot be a string",e),await fetch(`/api/playlists/${e}/tracks`,{method:"POST",body:JSON.stringify({source:t.source,title:t.title,artist:t.artist,album:t.album,cover:t.cover})})},je=async(e,t=!0)=>{await fetch(`/api/tracks/${e}`,{method:"PUT",body:JSON.stringify({favourite:t})})},Be=async e=>{window.open(`/api/tracks/${e}/download`)};export{Oe as F,Ue as P,Te as T,Ne as a,De as b,Ve as c,Be as d,Z as e,je as f,Se as g,Pe as h,q as i,xe as r,qe as u}; +import{j as I,v as M,m as g,n as w,o as l,f as y,w as E,a as o,t as T,L as F,c as r,r as A,d as m,x as b,e as J,k as O,l as U,_ as C,F as P,i as L,u as k,g as H,T as V,h as z,y as W,z as G,A as K,p as Q,B as R,C as X}from"./index.c970909a.js";import{I as x,D as Y}from"./Dropdown.7541a2ee.js";const f=I(),Z=async e=>{await fetch(`/api/playlists/${e.id}`,{method:"POST",body:JSON.stringify({name:e.name,description:e.description,cover:e.cover})}),await f.fetchPlaylists()},Se=async e=>{const t=await fetch(`/api/playlists/${e}`);if(t.status===404)return null;const c=await t.json();for(const n of c.songs)n.href=`/track/${M(n.id)}`;return c},Pe=async e=>{await fetch(`/api/playlists/${e}`,{method:"DELETE"}),await f.fetchPlaylists()},q=async()=>{const t=await(await fetch("/api/playlists/new")).json();return await f.fetchPlaylists(),t},Ve=async(e,t="",c="")=>{const n=await q();return await Z({id:n,name:e,description:t,cover:c}),n},xe=async(e,t)=>{await fetch(`/api/playlists/${e}/tracks`,{method:"DELETE",body:JSON.stringify({songId:t})}),await f.fetchPlaylists()},ee=e=>(O("data-v-7e2e81d1"),e=e(),U(),e),ae={class:"wrapper"},te={class:"header bg-secondary rounded-t-2xl p-3"},se={class:"title font-black"},le=ee(()=>o("span",{class:"title material-icons-round"}," close ",-1)),ne=[le],oe={key:1},ce={key:2,class:"p-4 pt-0"},re={key:0,class:"confirm"},de=g({__name:"Template",props:{name:{type:String,required:!0},submit:{type:Object,required:!0},secondary:{type:Object,required:!1,default:null}},emits:["submit","close","secondary"],setup(e,{expose:t,emit:c}){const n=e,u=w(!1),i=w(!1),a=w(""),s=()=>i.value=!1,h=()=>{u.value=!1,i.value=!0},S=()=>{u.value=!0,i.value=!0},D=async(p,d)=>{S();const _=await window.fetch(p,d);return h(),_.ok?_:(a.value=await _.text(),null)},v=()=>{s(),c("close")},N=()=>{c("submit"),v()},j=()=>{c("secondary"),v()};return t({show:h,hide:s,load:S,fetch:D}),(p,d)=>{const _=J("vue-final-modal");return l(),y(_,{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=B=>i.value=B),classes:"modal-container","content-class":"modal-content",onClick:d[1]||(d[1]=b(()=>{},["stop"])),onContextmenu:d[2]||(d[2]=b(()=>{},["stop"])),onDrag:d[3]||(d[3]=b(()=>{},["stop"]))},{default:E(()=>[o("div",ae,[o("div",te,[o("h3",se,T(e.name),1),o("button",{class:"modal-close",onClick:v},ne)]),u.value?(l(),y(F,{key:0})):a.value?(l(),r("div",oe)):(l(),r("div",ce,[A(p.$slots,"default",{},void 0,!0),n.submit||n.secondary?(l(),r("div",re,[n.secondary?(l(),y(x,{key:0,icon:n.secondary.icon,label:n.secondary.label,type:n.secondary.type,onClick:j},null,8,["icon","label","type"])):m("",!0),n.submit?(l(),y(x,{key:1,icon:n.submit.icon,label:n.submit.label,type:n.submit.type,onClick:N},null,8,["icon","label","type"])):m("",!0)])):m("",!0)]))])]),_:3},8,["modelValue"])}}});const Te=C(de,[["__scopeId","data-v-7e2e81d1"]]),ie={class:"form"},ue={class:"content"},ye=["onClick"],me=["accept","onChange"],he=["onUpdate:modelValue","type","onChange"],_e=g({__name:"Form",props:{options:{type:Array,required:!0}},setup(e,{expose:t}){const c=e;return t({toObject:()=>{const u={};return c.options.forEach(i=>{u[i.name]=i.value}),u}}),(u,i)=>(l(),r("div",ie,[(l(!0),r(P,null,L(e.options,a=>(l(),r("div",{key:a.name,class:"option"},[o("h4",null,T(k(K)(a.name)),1),o("div",ue,[a.type=="upload"?(l(),r(P,{key:0},[o("span",{class:"material-symbols-rounded icon-button",onClick:()=>{var s,h;return(h=(s=u.$refs["upload-"+a.name])==null?void 0:s[0])==null?void 0:h.click()}}," file_upload ",8,ye),o("input",{ref_for:!0,ref:"upload-"+a.name,accept:a.accept,style:{display:"none"},type:"file",onChange:s=>a==null?void 0:a.onUpload(s.target.files[0])},null,40,me),H(V,{ref_for:!0,ref:"cover",modelValue:a.value,"onUpdate:modelValue":s=>a.value=s,icon:a.icon,class:"addSong cover",type:"text",onChange:s=>a==null?void 0:a.onChange(a.value)},null,8,["modelValue","onUpdate:modelValue","icon","onChange"]),a.imagePreview?(l(),y(z,{key:0,src:k(Q)(a.value),class:"imagePreview",onClick:s=>k(R)(a.value)},null,8,["src","onClick"])):m("",!0)],64)):a.type=="dropdown"?(l(),y(Y,{key:1,modelValue:a.value,"onUpdate:modelValue":s=>a.value=s,icon:a.icon,options:a.options},null,8,["modelValue","onUpdate:modelValue","icon","options"])):a.type=="text"?(l(),y(V,{key:2,modelValue:a.value,"onUpdate:modelValue":s=>a.value=s,icon:a.icon,placeholder:a.placeholder,required:a.required,type:a.type,onChange:s=>a.onChange?a==null?void 0:a.onChange(a.value):null},null,8,["modelValue","onUpdate:modelValue","icon","placeholder","required","type","onChange"])):W((l(),r("input",{key:3,"onUpdate:modelValue":s=>a.value=s,type:a.type,onChange:s=>a.onChange?a==null?void 0:a.onChange(a.value):null},null,40,he)),[[G,a.value]])])]))),128))]))}});const Oe=C(_e,[["__scopeId","data-v-e7fa149a"]]),$=e=>(O("data-v-538de663"),e=e(),U(),e),fe=$(()=>o("div",{class:"index text-right"},"#",-1)),ve=$(()=>o("div",{class:"artist-title"}," title ",-1)),pe={key:0,class:"album"},we={key:1,class:"duration"},be=$(()=>o("span",{class:"material-symbols-rounded"},"schedule",-1)),ke=[be],ge=g({__name:"PlaylistHeader",props:{index:{type:Number,required:!0},withAlbum:{type:Boolean,required:!1,default:!1},withMore:{type:Boolean,required:!1,default:!1},withoutDuration:{type:Boolean,required:!1,default:!1}},setup(e){return(t,c)=>(l(),r("div",{class:X([{withAlbum:e.withAlbum,withMore:e.withMore},"playlist-header"])},[fe,ve,e.withAlbum?(l(),r("div",pe," album ")):m("",!0),e.withoutDuration?m("",!0):(l(),r("div",we,ke))],2))}});const Ue=C(ge,[["__scopeId","data-v-538de663"]]),qe=async e=>{await fetch(`/api/tracks/${e.id}`,{method:"PUT",body:JSON.stringify({source:e.source,title:e.title,artist:e.artist,album:e.album,cover:e.cover})})},De=async e=>await(await fetch("/api/browse/track",{method:"POST",body:JSON.stringify({url:e})})).json(),Ne=async(e,t)=>{e==="new"&&(e=await q()),typeof e=="string"&&console.error("playlistId cannot be a string",e),await fetch(`/api/playlists/${e}/tracks`,{method:"POST",body:JSON.stringify({source:t.source,title:t.title,artist:t.artist,album:t.album,cover:t.cover})})},je=async(e,t=!0)=>{await fetch(`/api/tracks/${e}`,{method:"PUT",body:JSON.stringify({favourite:t})})},Be=async e=>{window.open(`/api/tracks/${e}/download`)};export{Oe as F,Ue as P,Te as T,Ne as a,De as b,Ve as c,Be as d,Z as e,je as f,Se as g,Pe as h,q as i,xe as r,qe as u}; diff --git a/src/ui/dist/assets/song.6a60a886.js.gz b/src/ui/dist/assets/song.6a60a886.js.gz new file mode 100644 index 000000000..6d8732399 Binary files /dev/null and b/src/ui/dist/assets/song.6a60a886.js.gz differ diff --git a/src/ui/dist/assets/vuedraggable.umd.e9aa7b2f.js b/src/ui/dist/assets/vuedraggable.umd.6e1f6451.js similarity index 99% rename from src/ui/dist/assets/vuedraggable.umd.e9aa7b2f.js rename to src/ui/dist/assets/vuedraggable.umd.6e1f6451.js index 58ed91b0b..769fbb550 100644 --- a/src/ui/dist/assets/vuedraggable.umd.e9aa7b2f.js +++ b/src/ui/dist/assets/vuedraggable.umd.6e1f6451.js @@ -1,4 +1,4 @@ -import{V as Br,W as Kr,X as Hr,Y as Wr,Z as Vr,$ as Xr,a0 as Yr,a1 as zr,a2 as Jr,a3 as Zr,a4 as Qr,a5 as kr,a6 as qr,a7 as _r,a8 as tn,a9 as en,n as rn,aa as nn,ab as on,ac as an,ad as sn,ae as ln,af as fn,ag as un,ah as cn,u as dn,ai as vn,aj as hn,C as pn,ak as gn,H as mn,t as yn,al as Sn,am as bn,an as En,F as xn,ao as On,ap as Tn,aq as In,ar as Pn,as as Dn,at as Cn,au as An,av as Rn,aw as Mn,E as Nn,f as jn,d as wn,c as Fn,a as Ln,ax as Un,ay as Gn,az as $n,aA as Bn,aB as Kn,b as Hn,g as Wn,aC as Vn,m as Xn,aD as Yn,aE as zn,aF as Jn,aG as Zn,aH as Qn,aI as kn,aJ as qn,aK as _n,aL as to,aM as eo,aN as ro,aO as no,aP as oo,aQ as ao,aR as io,aS as so,N as lo,aT as fo,aU as uo,aV as co,aW as vo,aX as ho,aY as po,aZ as go,a_ as mo,a$ as yo,b0 as So,b1 as bo,b2 as Eo,o as xo,l as Oo,b3 as To,k as Io,b4 as Po,b5 as Do,i as Co,r as Ao,e as Ro,I as Mo,b6 as No,b7 as jo,b8 as wo,b9 as Fo,ba as Lo,bb as Uo,bc as Go,bd as $o,be as Bo,bf as Ko,bg as Ho,bh as Wo,bi as Vo,bj as Xo,bk as Yo,bl as zo,D as Jo,bm as Zo,bn as Qo,bo as ko,bp as qo,w as _o,bq as ta,y as ea,br as ra,bs as na,bt as oa,bu as aa,bv as ia,bw as sa,bx as la,by as fa,bz as ua,bA as ca,bB as da,bC as va,bD as ha,bE as pa,bF as ga,z as ma,bG as ya,bH as Sa,bI as ba,bJ as Ea,bK as xa,x as Oa,bL as Pr,bM as Ta,bN as Ia}from"./index.1d09503d.js";const Pa=()=>{},Da=Object.freeze(Object.defineProperty({__proto__:null,compile:Pa,EffectScope:Br,ReactiveEffect:Kr,customRef:Hr,effect:Wr,effectScope:Vr,getCurrentScope:Xr,isProxy:Yr,isReactive:zr,isReadonly:Jr,isRef:Zr,isShallow:Qr,markRaw:kr,onScopeDispose:qr,proxyRefs:_r,reactive:tn,readonly:en,ref:rn,shallowReactive:nn,shallowReadonly:on,shallowRef:an,stop:sn,toRaw:ln,toRef:fn,toRefs:un,triggerRef:cn,unref:dn,camelize:vn,capitalize:hn,normalizeClass:pn,normalizeProps:gn,normalizeStyle:mn,toDisplayString:yn,toHandlerKey:Sn,BaseTransition:bn,Comment:En,Fragment:xn,KeepAlive:On,Static:Tn,Suspense:In,Teleport:Pn,Text:Dn,callWithAsyncErrorHandling:Cn,callWithErrorHandling:An,cloneVNode:Rn,compatUtils:Mn,computed:Nn,createBlock:jn,createCommentVNode:wn,createElementBlock:Fn,createElementVNode:Ln,createHydrationRenderer:Un,createPropsRestProxy:Gn,createRenderer:$n,createSlots:Bn,createStaticVNode:Kn,createTextVNode:Hn,createVNode:Wn,defineAsyncComponent:Vn,defineComponent:Xn,defineEmits:Yn,defineExpose:zn,defineProps:Jn,get devtools(){return Zn},getCurrentInstance:Qn,getTransitionRawChildren:kn,guardReactiveProps:qn,h:_n,handleError:to,initCustomFormatter:eo,inject:ro,isMemoSame:no,isRuntimeOnly:oo,isVNode:ao,mergeDefaults:io,mergeProps:so,nextTick:lo,onActivated:fo,onBeforeMount:uo,onBeforeUnmount:co,onBeforeUpdate:vo,onDeactivated:ho,onErrorCaptured:po,onMounted:go,onRenderTracked:mo,onRenderTriggered:yo,onServerPrefetch:So,onUnmounted:bo,onUpdated:Eo,openBlock:xo,popScopeId:Oo,provide:To,pushScopeId:Io,queuePostFlushCb:Po,registerRuntimeCompiler:Do,renderList:Co,renderSlot:Ao,resolveComponent:Ro,resolveDirective:Mo,resolveDynamicComponent:No,resolveFilter:jo,resolveTransitionHooks:wo,setBlockTracking:Fo,setDevtoolsHook:Lo,setTransitionHooks:Uo,ssrContextKey:Go,ssrUtils:$o,toHandlers:Bo,transformVNodeArgs:Ko,useAttrs:Ho,useSSRContext:Wo,useSlots:Vo,useTransitionState:Xo,version:Yo,warn:zo,watch:Jo,watchEffect:Zo,watchPostEffect:Qo,watchSyncEffect:ko,withAsyncContext:qo,withCtx:_o,withDefaults:ta,withDirectives:ea,withMemo:ra,withScopeId:na,Transition:oa,TransitionGroup:aa,VueElement:ia,createApp:sa,createSSRApp:la,defineCustomElement:fa,defineSSRCustomElement:ua,hydrate:ca,initDirectivesForSSR:da,render:va,useCssModule:ha,useCssVars:pa,vModelCheckbox:ga,vModelDynamic:ma,vModelRadio:ya,vModelSelect:Sa,vModelText:ba,vShow:Ea,withKeys:xa,withModifiers:Oa},Symbol.toStringTag,{value:"Module"}));var Dr={exports:{}};const Ca=Pr(Da);/**! +import{V as Br,W as Kr,X as Hr,Y as Wr,Z as Vr,$ as Xr,a0 as Yr,a1 as zr,a2 as Jr,a3 as Zr,a4 as Qr,a5 as kr,a6 as qr,a7 as _r,a8 as tn,a9 as en,n as rn,aa as nn,ab as on,ac as an,ad as sn,ae as ln,af as fn,ag as un,ah as cn,u as dn,ai as vn,aj as hn,C as pn,ak as gn,H as mn,t as yn,al as Sn,am as bn,an as En,F as xn,ao as On,ap as Tn,aq as In,ar as Pn,as as Dn,at as Cn,au as An,av as Rn,aw as Mn,E as Nn,f as jn,d as wn,c as Fn,a as Ln,ax as Un,ay as Gn,az as $n,aA as Bn,aB as Kn,b as Hn,g as Wn,aC as Vn,m as Xn,aD as Yn,aE as zn,aF as Jn,aG as Zn,aH as Qn,aI as kn,aJ as qn,aK as _n,aL as to,aM as eo,aN as ro,aO as no,aP as oo,aQ as ao,aR as io,aS as so,N as lo,aT as fo,aU as uo,aV as co,aW as vo,aX as ho,aY as po,aZ as go,a_ as mo,a$ as yo,b0 as So,b1 as bo,b2 as Eo,o as xo,l as Oo,b3 as To,k as Io,b4 as Po,b5 as Do,i as Co,r as Ao,e as Ro,I as Mo,b6 as No,b7 as jo,b8 as wo,b9 as Fo,ba as Lo,bb as Uo,bc as Go,bd as $o,be as Bo,bf as Ko,bg as Ho,bh as Wo,bi as Vo,bj as Xo,bk as Yo,bl as zo,D as Jo,bm as Zo,bn as Qo,bo as ko,bp as qo,w as _o,bq as ta,y as ea,br as ra,bs as na,bt as oa,bu as aa,bv as ia,bw as sa,bx as la,by as fa,bz as ua,bA as ca,bB as da,bC as va,bD as ha,bE as pa,bF as ga,z as ma,bG as ya,bH as Sa,bI as ba,bJ as Ea,bK as xa,x as Oa,bL as Pr,bM as Ta,bN as Ia}from"./index.c970909a.js";const Pa=()=>{},Da=Object.freeze(Object.defineProperty({__proto__:null,compile:Pa,EffectScope:Br,ReactiveEffect:Kr,customRef:Hr,effect:Wr,effectScope:Vr,getCurrentScope:Xr,isProxy:Yr,isReactive:zr,isReadonly:Jr,isRef:Zr,isShallow:Qr,markRaw:kr,onScopeDispose:qr,proxyRefs:_r,reactive:tn,readonly:en,ref:rn,shallowReactive:nn,shallowReadonly:on,shallowRef:an,stop:sn,toRaw:ln,toRef:fn,toRefs:un,triggerRef:cn,unref:dn,camelize:vn,capitalize:hn,normalizeClass:pn,normalizeProps:gn,normalizeStyle:mn,toDisplayString:yn,toHandlerKey:Sn,BaseTransition:bn,Comment:En,Fragment:xn,KeepAlive:On,Static:Tn,Suspense:In,Teleport:Pn,Text:Dn,callWithAsyncErrorHandling:Cn,callWithErrorHandling:An,cloneVNode:Rn,compatUtils:Mn,computed:Nn,createBlock:jn,createCommentVNode:wn,createElementBlock:Fn,createElementVNode:Ln,createHydrationRenderer:Un,createPropsRestProxy:Gn,createRenderer:$n,createSlots:Bn,createStaticVNode:Kn,createTextVNode:Hn,createVNode:Wn,defineAsyncComponent:Vn,defineComponent:Xn,defineEmits:Yn,defineExpose:zn,defineProps:Jn,get devtools(){return Zn},getCurrentInstance:Qn,getTransitionRawChildren:kn,guardReactiveProps:qn,h:_n,handleError:to,initCustomFormatter:eo,inject:ro,isMemoSame:no,isRuntimeOnly:oo,isVNode:ao,mergeDefaults:io,mergeProps:so,nextTick:lo,onActivated:fo,onBeforeMount:uo,onBeforeUnmount:co,onBeforeUpdate:vo,onDeactivated:ho,onErrorCaptured:po,onMounted:go,onRenderTracked:mo,onRenderTriggered:yo,onServerPrefetch:So,onUnmounted:bo,onUpdated:Eo,openBlock:xo,popScopeId:Oo,provide:To,pushScopeId:Io,queuePostFlushCb:Po,registerRuntimeCompiler:Do,renderList:Co,renderSlot:Ao,resolveComponent:Ro,resolveDirective:Mo,resolveDynamicComponent:No,resolveFilter:jo,resolveTransitionHooks:wo,setBlockTracking:Fo,setDevtoolsHook:Lo,setTransitionHooks:Uo,ssrContextKey:Go,ssrUtils:$o,toHandlers:Bo,transformVNodeArgs:Ko,useAttrs:Ho,useSSRContext:Wo,useSlots:Vo,useTransitionState:Xo,version:Yo,warn:zo,watch:Jo,watchEffect:Zo,watchPostEffect:Qo,watchSyncEffect:ko,withAsyncContext:qo,withCtx:_o,withDefaults:ta,withDirectives:ea,withMemo:ra,withScopeId:na,Transition:oa,TransitionGroup:aa,VueElement:ia,createApp:sa,createSSRApp:la,defineCustomElement:fa,defineSSRCustomElement:ua,hydrate:ca,initDirectivesForSSR:da,render:va,useCssModule:ha,useCssVars:pa,vModelCheckbox:ga,vModelDynamic:ma,vModelRadio:ya,vModelSelect:Sa,vModelText:ba,vShow:Ea,withKeys:xa,withModifiers:Oa},Symbol.toStringTag,{value:"Module"}));var Dr={exports:{}};const Ca=Pr(Da);/**! * Sortable 1.14.0 * @author RubaXa * @author owenm diff --git a/src/ui/dist/assets/vuedraggable.umd.6e1f6451.js.gz b/src/ui/dist/assets/vuedraggable.umd.6e1f6451.js.gz new file mode 100644 index 000000000..98f770ee8 Binary files /dev/null and b/src/ui/dist/assets/vuedraggable.umd.6e1f6451.js.gz differ diff --git a/src/ui/dist/assets/vuedraggable.umd.e9aa7b2f.js.gz b/src/ui/dist/assets/vuedraggable.umd.e9aa7b2f.js.gz deleted file mode 100644 index 226f17cc6..000000000 Binary files a/src/ui/dist/assets/vuedraggable.umd.e9aa7b2f.js.gz and /dev/null differ diff --git a/src/ui/dist/index.html b/src/ui/dist/index.html index c5bd96e94..9f4eb6188 100644 --- a/src/ui/dist/index.html +++ b/src/ui/dist/index.html @@ -31,7 +31,7 @@ reAudioPlayer One - + diff --git a/src/ui/dist/index.html.gz b/src/ui/dist/index.html.gz index c5b5d1865..b7a95aa42 100644 Binary files a/src/ui/dist/index.html.gz and b/src/ui/dist/index.html.gz differ diff --git a/src/ui/package-lock.json b/src/ui/package-lock.json index 00ceb0cff..99bd779a5 100644 --- a/src/ui/package-lock.json +++ b/src/ui/package-lock.json @@ -1,12 +1,12 @@ { "name": "reAudioPlayer", - "version": "0.10.12", + "version": "0.10.13", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "reAudioPlayer", - "version": "0.10.12", + "version": "0.10.13", "dependencies": { "hashids": "2.2.10", "pinia": "^2.0.23", diff --git a/src/ui/package.json b/src/ui/package.json index e8c317c84..67cfef70f 100644 --- a/src/ui/package.json +++ b/src/ui/package.json @@ -1,6 +1,6 @@ { "name": "reAudioPlayer", - "version": "0.10.12", + "version": "0.10.13", "scripts": { "dev": "vite", "preview": "vite preview --port 8080", diff --git a/src/ui/src/views/News.vue b/src/ui/src/views/News.vue index e32c42bb0..162a06349 100644 --- a/src/ui/src/views/News.vue +++ b/src/ui/src/views/News.vue @@ -2,7 +2,9 @@

News

- +
+ +
@@ -13,9 +15,10 @@