1import{_ as pt}from"./Ql4hyve5.js";import{d as xt,k as ht,m as a,c as O,v as wt,K as Ue,J as gt,s as I,D as mt,o as s,g as M,P as Ye,w as _,e as r,x as h,i as t,y as W,H as c,f as n,t as f,B as ue,T as V,ay as kt,F as E,r as Ae,_ as bt,h as de,X as Xe,O as Mt,Q as Ct,ag as St,L as Je,j as Pt}from"./BM8COC30.js";import{u as _t}from"./bOb16_bF.js";const zt={class:"w-6 h-6 rounded-full bg-gray-800 flex-shrink-0 overflow-hidden"},Lt=["src"],Bt={key:1,class:"w-full h-full flex items-center justify-center"},It={class:"overflow-hidden w-[130px]"},Vt={class:"mini-marquee whitespace-nowrap text-xs font-semibold"},Et={class:"ml-10"},$t={key:0,class:"w-3 h-3",fill:"currentColor",viewBox:"0 0 24 24"},Ht={key:1,class:"w-3 h-3 ml-0.5",fill:"currentColor",viewBox:"0 0 24 24"},Dt={key:0,class:"absolute -top-10 left-1/2 -translate-x-1/2 bg-gray-800 text-white text-xs px-3 py-1.5 rounded-lg shadow-lg flex items-center gap-2 whitespace-nowrap"},Tt={class:"font-bold"},Nt={class:"w-7 h-7 rounded bg-gray-800 flex-shrink-0 overflow-hidden"},Rt=["src"],jt={key:1,class:"w-full h-full flex items-center justify-center"},Ot={class:"min-w-0 flex-1"},Ut={class:"text-[11px] font-semibold text-white leading-tight truncate"},Yt={class:"text-[10px] text-gray-500 leading-tight truncate"},At={key:0,class:"border-t border-gray-800 overflow-y-auto scrollbar-thin flex-shrink-0",style:{"max-height":"200px"}},Xt={key:0,class:"flex items-center justify-center py-4"},Jt=["onClick"],Wt={class:"text-[9px] text-gray-600 flex-shrink-0"},qt={key:0,class:"px-3 py-2 text-[10px] text-gray-600"},Kt=["data-current","onClick"],Ft={class:"min-w-0 flex-1"},Qt={class:"text-[11px] font-semibold text-white truncate"},Gt={class:"text-[10px] text-gray-500 truncate"},Zt={key:0,class:"text-center text-[10px] text-gray-600 py-3"},en={class:"relative w-full bg-black flex-shrink-0",style:{"aspect-ratio":"16/9"}},tn=["src"],nn={key:1,class:"absolute inset-0 flex items-center justify-center text-gray-700 bg-black"},on={key:0,class:"border-t border-gray-800 px-3 py-2.5 flex-shrink-0"},ln={class:"text-[11px] text-gray-300 font-semibold mb-2"},sn={key:0,class:"flex gap-1.5"},rn=["disabled"],an={class:"flex items-center justify-between px-2 py-1 flex-shrink-0"},un={class:"flex items-center"},dn=["title"],vn={key:0,class:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24"},cn={key:1,class:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24"},fn={key:3,class:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24"},yn=["title"],pn={key:0,class:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24"},xn={key:1,class:"w-3.5 h-3.5 ml-0.5",fill:"currentColor",viewBox:"0 0 24 24"},hn={class:"flex items-center gap-1"},wn={class:"text-[10px] text-gray-500 tabular-nums"},gn={key:0,class:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24"},mn={key:1,class:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24"},kn={key:0,class:"absolute bottom-full right-0 mb-1 bg-gray-900 border border-gray-700 rounded-lg shadow-2xl p-2 w-24"},bn={class:"text-[9px] text-gray-500 text-center mt-1"},ve="aha-player-dismissed",We="aha-player-pos",qe="aha-player-mini-pos",Mn=xt({__name:"PlayerBar",setup(Cn){const ce=_t(),{state:u,isLeader:fe,currentTrack:v,isVisible:ye,play:q,pause:Ke,next:K,prev:pe,playIndex:Fe,loadPlaylist:Qe,setVolume:Ge,setPlayMode:Ze,trackEnded:et}=ce,{isLoggedIn:$}=ht(),C=a(!1),S=a(""),H=a(!1),U=a(!1);async function xe(){if(!(!S.value.trim()||H.value)){H.value=!0;try{const{id:o}=await $fetch("/api/playlists",{method:"POST",body:{name:S.value.trim()}}),e=u.value.playlist;for(const i of e)await $fetch(`/api/playlists/${o}/tracks`,{method:"POST",body:{title:i.title,artist:i.artist,acrId:i.acrid,youtubeId:i.youtubeId,coverUrl:i.coverUrl}});U.value=!0,S.value="",setTimeout(()=>{U.value=!1,C.value=!1},1800)}catch{}finally{H.value=!1}}}const m=a(!1),F=a([]),P=a("history"),Q=a(!1);async function G(){if($.value)try{const o=await $fetch("/api/playlists");F.value=o.playlists}catch{}}async function he(o){m.value=!1,Q.value=!0,P.value=o;try{let e=[];
1if(o==="history"){const i=await $fetch("/api/history/list");i.success&&(e=i.records.filter(d=>d.acrId).flatMap(d=>{try{const l=typeof d.metadata=="string"?JSON.parse(d.metadata):d.metadata||{},p=l.youtubeId||null;return p?[{acrid:d.acrId,title:d.title,artist:d.artist||"",youtubeId:p,coverUrl:l.coverUrl||null}]:[]}catch{return[]}}))}else e=(await $fetch(`/api/playlists/${o}`)).tracks.filter(d=>d.youtubeId).map(d=>({acrid:d.acrId||d.id,title:d.title,artist:d.artist||"",youtubeId:d.youtubeId,coverUrl:d.coverUrl||null}));e.length&&(Qe(e,0),q())}finally{Q.value=!1}}const D=a(!1),T=a(!1);function tt(){try{return sessionStorage.getItem(ve)==="1"}catch{return!1}}function we(o){try{o?sessionStorage.setItem(ve,"1"):sessionStorage.removeItem(ve)}catch{}}const N=a(!1),R=a(!0),Z=a(null),ee=a(null),ge=a(null),j=a(!1),me=a(null);function nt(){return typeof window>"u"?{x:0,y:0}:{x:window.innerWidth-240-16,y:80}}function ot(){if(typeof localStorage>"u")return null;try{const o=localStorage.getItem(We);return o?JSON.parse(o):null}catch{return null}}const x=a({x:0,y:0}),Y=a(!1);let ke=0,be=0,Me=0,Ce=0;const Se=a(null),w=a({x:0,y:0}),A=a(!1);let Pe=0,_e=0,ze=0,Le=0;function Be(){if(typeof window>"u")return{x:0,y:0};const o=window.innerWidth,e=window.innerHeight;return{x:o-220-16,y:e-48-16}}function Ie(o){if(typeof window>"u")return o;const e=window.innerWidth,i=window.innerHeight,d=Se.value,l=d?.offsetWidth||220,p=d?.offsetHeight||48;return{x:Math.max(0,Math.min(e-l,o.x)),y:Math.max(0,Math.min(i-p,o.y))}}function lt(o){o.target.closest("button")||(o.preventDefault(),A.value=!0,Pe=o.clientX,_e=o.clientY,ze=w.value.x,Le=w.value.y,window.addEventListener("pointermove",te),window.addEventListener("pointerup",ne))}function te(o){A.value&&(w.value=Ie({x:ze+(o.clientX-Pe),y:Le+(o.clientY-_e)}))}function ne(){A.value=!1,window.removeEventListener("pointermove",te),window.removeEventListener("pointerup",ne);try{localStorage.setItem(qe,JSON.stringify(w.value))}catch{}}const st=O(()=>({left:`${w.value.x}px`,top:`${w.value.y}px`}));function oe(o){if(typeof window>"u")return o;const e=window.innerWidth,i=window.innerHeight,d=me.value,l=d?.offsetWidth||240,p=d?.offsetHeight||240;return{x:Math.max(0,Math.min(e-l,o.x)),y:Math.max(0,Math.min(i-p,o.y))}}function rt(o){o.target.closest("button")||(o.preventDefault(),Y.value=!0,ke=o.clientX,be=o.clientY,Me=x.value.x,Ce=x.value.y,window.addEventListener("pointermove",le),window.addEventListener("pointerup",se))}function le(o){Y.value&&(x.value=oe({x:Me+(o.clientX-ke),y:Ce+(o.clientY-be)}))}function se(){Y.value=!1,window.removeEventListener("pointermove",le),window.removeEventListener("pointerup",se);try{localStorage.setItem(We,JSON.stringify(x.value))}catch{}}const it=O(()=>typeof window>"u"?{}:window.innerWidth<768?{maxHeight:"calc(100vh - 32px)"}:{left:`${x.value.x}px`,top:`${x.value.y}px`,maxHeight:"calc(100vh - 32px)"}),y=a(null);let X=null;const z=a(0),k=a(0),g=a(!1),L=a(0);let J=null;const Ve=a(null);function at(){re(),J=Je(()=>{!j.value||g.value||(b("getCurrentTime",[]),b("getDuration",[]))},500)}function re(){J&&(clearInterval(J),J=null)}function Ee(o){if(!o||!isFinite(o))return"0:00";const e=Math.floor(o/60),i=Math.floor(o%60);return`${e}:${i<10?"0":""}${i}`}const ut=O(()=>{const o=g.value?L.value:z.value;return k.value?Math.min(100,Math.max(0,o/k.value*100)):0});function $e(o){const e=Ve.value;if(!e||!k.value)return 0;const i=e.getBoundingClientRect();return Math.max(0,Math.min(1,(o.clientX-i.left)/i.width))*k.value}function dt(o){k.value&&(g.value=!0,L.value=$e(o),window.addEventListener("pointermove",ie),window.addEventListener("pointerup",ae))}function ie(o){g.value&&(L.value=$e(o))}function ae(){g.value&&(window.removeEventListener("pointermove",ie),window.removeEventListener("pointerup",ae),b("seekTo",[L.value,!0]),z.value=L.value,g.value=!1)}const vt=["normal","repeat-all","repeat-one","shuffle"];function ct(){const o=vt,e=o.indexOf(u.value.playMode);Ze(o[(e+1)%o.length])}function He(){u.value.playMode==="repeat-one"?(B(),y.value=null,b("seekTo",[0,!0]),b("play"),u.value.playing||q()):et()}function ft(){y.value=3,X=Je(()=>{y.value!==null&&(y.value--,y.value<=0&&(B(),y.value=null,He()))},1e3)}function B(){X&&(clearInterval(X),X=null)}const De=O(()=>typeof window>"u"||!fe.value||!v.value?.youtubeId?"":`/proxy-player.html?${new URLSearchParams({host:window.location.origin,video_id:v.value.youtubeId,player_vars:JSON.stringify({autoplay:u.value.playing?1:0,controls:0})}).toString()}`);function b(o,e=[]){const i=ge.value?.contentWindow;if(i)try{i.postMessage(JSON.stringify({action:o,args:e}),"*")}catch{}}function Te(o){if(!o.data||typeof o.data!="string")return;let e;try{e=JSON.parse(o.data)}catch{return}if(!(!e||!e.action))switch(e.action){case"ready":j.value=!0,z.value=0,k.value=0,b("setVolume",[u.value.volume]),u.value.playing&&b("play"),at();break;case"stateChange":{const i=e.args?.[0];i===0&&ft(),i===1&&(B(),y.value=null);break}case"error":K();break;case"_response":{const i=e.args?.[0];e.sourceAction==="getCurrentTime"&&typeof i=="number"?g.value||(z.value=i):e.sourceAction==="getDuration"&&typeof i=="number"&&(k.value=i);break}}}function Ne(){x.value=oe(x.value)}function Re(){!document.hidden&&y.value!==null&&(B(),y.value=null,He())}wt(()=>{T.value=tt(),ce.init(),G(),window.addEventListener("message",Te),document.addEventListener("visibilitychange",Re),x.value=ot()||nt();try{const o=localStorage.getItem(qe);w.value=o?JSON.parse(o):Be()}
1catch{w.value=Be()}Ue(()=>{x.value=oe(x.value),w.value=Ie(w.value)}),window.addEventListener("resize",Ne)}),gt(()=>{B(),re(),window.removeEventListener("message",Te),document.removeEventListener("visibilitychange",Re),window.removeEventListener("resize",Ne),window.removeEventListener("pointermove",le),window.removeEventListener("pointerup",se),window.removeEventListener("pointermove",te),window.removeEventListener("pointerup",ne),window.removeEventListener("pointermove",ie),window.removeEventListener("pointerup",ae)}),I($,o=>{o&&G()}),I(()=>u.value.playing,o=>{!fe.value||!j.value||b(o?"play":"pause")}),I(()=>u.value.volume,o=>{j.value&&b("setVolume",[o])}),I(v,()=>{j.value=!1,z.value=0,k.value=0,re()}),I(v,(o,e)=>{o&&e&&o.acrid!==e.acrid&&(T.value=!1,we(!1))}),I(v,()=>{Ue(()=>{if(!ee.value)return;const o=ee.value.querySelector('[data-current="true"]');o&&o.scrollIntoView({behavior:"smooth",block:"center"})})});function je(){u.value.playing?Ke():q()}function yt(o){if(!Z.value)return;const e=Z.value.getBoundingClientRect();Ge(Math.round((o.clientX-e.left)/e.width*100))}const Oe=O(()=>u.value.playlist);return(o,e)=>{const i=pt,d=bt;return s(),mt(St,{to:"body"},[M(V,{name:"slide-up"},{default:_(()=>[t(ye)&&t(D)&&!t(T)?(s(),r("div",{key:0,ref_key:"miniPillRef",ref:Se,class:c(["fixed z-50 flex items-center gap-2 bg-gray-950 text-white rounded-full shadow-2xl pl-3 pr-2 py-2 cursor-move select-none",{"transition-[left,top] duration-150":!t(A)}]),style:W(t(st)),onPointerdown:lt},[n("div",zt,[t(v)?.coverUrl?(s(),r("img",{key:0,src:t(v).coverUrl,class:"w-full h-full object-cover",alt:""},null,8,Lt)):(s(),r("div",Bt,[...e[18]||(e[18]=[n("svg",{class:"w-3 h-3 text-gray-500",fill:"currentColor",viewBox:"0 0 24 24"},[n("path",{d:"M12 3v10.55A4 4 0 1 0 14 17V7h4V3h-6z"})],-1)])]))]),n("div",It,[n("div",Vt,[n("span",null,f(t(v)?.artist?`${t(v).artist} â ${t(v).title}`:t(v)?.title),1),n("span",Et,f(t(v)?.artist?`${t(v).artist} â ${t(v).title}`:t(v)?.title),1)])]),n("button",{class:"w-6 h-6 flex items-center justify-center rounded-full bg-white text-gray-900 flex-shrink-0",onClick:e[0]||(e[0]=ue(l=>{je(),D.value=!1},["stop"]))},[t(u).playing?(s(),r("svg",$t,[...e[19]||(e[19]=[n("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"},null,-1)])])):(s(),r("svg",Ht,[...e[20]||(e[20]=[n("path",{d:"M8 5v14l11-7z"},null,-1)])]))]),n("button",{class:"w-6 h-6 flex items-center justify-center rounded-full bg-gray-800 hover:bg-gray-700 text-gray-300 flex-shrink-0",onClick:e[1]||(e[1]=ue(l=>D.value=!1,["stop"]))},[...e[21]||(e[21]=[n("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[n("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 15l7-7 7 7"})],-1)])])],38)):h("",!0)]),_:1}),Ye(n("div",{ref_key:"widgetRef",ref:me,class:c(["fixed z-50 select-none flex flex-col bg-gray-950 text-white shadow-2xl overflow-hidden md:w-[240px] md:rounded-xl md:border md:border-gray-800 max-md:inset-x-0 max-md:bottom-0 max-md:rounded-t-xl",{"transition-all duration-200":!t(Y)}]),style:W(t(it))},[M(V,{name:"fade"},{default:_(()=>[t(y)!==null?(s(),r("div",Dt,[e[22]||(e[22]=n("span",{class:"text-gray-400"},"Next in",-1)),n("span",Tt,f(t(y)),1),n("button",{class:"ml-1 text-gray-400 hover:text-white",onClick:e[2]||(e[2]=l=>{B(),y.value=null})},"â")])):h("",!0)]),_:1}),n("div",{class:"flex items-center gap-2 px-2 py-1.5 flex-shrink-0 md:cursor-move",onPointerdown:rt},[n("div",Nt,[t(v)?.coverUrl?(s(),r("img",{key:0,src:t(v).coverUrl,class:"w-full h-full object-cover",alt:""},null,8,Rt)):(s(),r("div",jt,[...e[23]||(e[23]=[n("svg",{class:"w-3.5 h-3.5 text-gray-600",fill:"currentColor",viewBox:"0 0 24 24"},[n("path",{d:"M12 3v10.55A4 4 0 1 0 14 17V7h4V3h-6z"})],-1)])]))]),n("div",Ot,[n("p",Ut,f(t(v)?.title||"Not playing"),1),n("p",Yt,f(t(v)?.artist),1)]),t($)?(s(),r("button",{key:0,class:c(["transition-colors p-1 flex-shrink-0",t(m)?"text-sky-400":"text-gray-500 hover:text-white"]),title:"Switch playlist",onClick:e[3]||(e[3]=l=>{m.value=!t(m),R.value=!1,t(m)&&G()})},[...e[24]||(e[24]=[n("svg",{class:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[n("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 10
1h16M4 14h8m-8 4h8"}),n("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 17l3 3 3-3"})],-1)])],2)):h("",!0),n("button",{class:c(["transition-colors p-1 flex-shrink-0",t(R)&&!t(m)?"text-sky-400":"text-gray-500 hover:text-white"]),title:"Queue",onClick:e[4]||(e[4]=l=>{R.value=!t(R),m.value=!1})},[...e[25]||(e[25]=[n("svg",{class:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24"},[n("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"})],-1)])],2),n("button",{class:"text-gray-500 hover:text-white transition-colors p-1 flex-shrink-0",title:"Minimize",onClick:e[5]||(e[5]=l=>D.value=!0)},[...e[26]||(e[26]=[n("svg",{class:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[n("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 13H5"})],-1)])]),n("button",{class:"text-gray-500 hover:text-white transition-colors p-1 flex-shrink-0",title:"Close player",onClick:e[6]||(e[6]=l=>{T.value=!0,we(!0)})},[...e[27]||(e[27]=[n("svg",{class:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[n("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])],32),M(V,{name:"collapse"},{default:_(()=>[t(m)?(s(),r("div",At,[t(Q)?(s(),r("div",Xt,[...e[28]||(e[28]=[n("div",{class:"w-4 h-4 border-2 border-sky-500 border-t-transparent rounded-full animate-spin"},null,-1)])])):(s(),r(E,{key:1},[n("button",{class:c(["w-full text-left px-3 py-2 transition-colors flex items-center gap-2",t(P)==="history"?"bg-gray-800":"hover:bg-gray-900"]),onClick:e[7]||(e[7]=l=>he("history"))},[(s(),r("svg",{class:c(["w-3 h-3 flex-shrink-0",t(P)==="history"?"text-sky-400":"text-gray-600"]),fill:"currentColor",viewBox:"0 0 24 24"},[...e[29]||(e[29]=[n("path",{d:"M13 3a9 9 0 0 0-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42A8.954 8.954 0 0 0 13 21a9 9 0 0 0 0-18zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"},null,-1)])],2)),n("p",{class:c(["text-[11px] font-semibold truncate",t(P)==="history"?"text-sky-400":"text-gray-300"])},"History",2)],2),(s(!0),r(E,null,Ae(t(F),l=>(s(),r("button",{key:l.id,class:c(["w-full text-left px-3 py-2 transition-colors flex items-center gap-2",t(P)===l.id?"bg-gray-800":"hover:bg-gray-900"]),onClick:p=>he(l.id)},[(s(),r("svg",{class:c(["w-3 h-3 flex-shrink-0",t(P)===l.id?"text-sky-400":"text-gray-600"]),fill:"currentColor",viewBox:"0 0 24 24"},[...e[30]||(e[30]=[n("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"},null,-1)])],2)),n("p",{class:c(["text-[11px] font-semibold truncate flex-1",t(P)===l.id?"text-sky-400":"text-gray-300"])},f(l.name),3),n("span",Wt,f(l.trackCount),1)],10,Jt))),128)),t(F).length===0?(s(),r("div",qt,"No saved playlists")):h("",!0)],64))])):h("",!0)]),_:1}),M(V,{name:"collapse"},{default:_(()=>[t(R)&&!t(m)?(s(),r("div",{key:0,ref_key:"queueScrollRef",ref:ee,class:"overflow-y-auto border-t border-gray-800 scrollbar-thin",style:{"max-height":"160px"}},[(s(!0),r(E,null,Ae(t(Oe),(l,p)=>(s(),r("div",{key:l.acrid+p,"data-current":p===t(u).currentIndex,class:c(["w-full flex items-center gap-1 px-3 py-1.5 transition-colors cursor-pointer",p===t(u).currentIndex?"bg-gray-800":"hover:bg-gray-900"]),onClick:Sn=>t(Fe)(p)},[n("div",Ft,[n("p",Qt,f(l.title),1),n("p",Gt,f(l.artist),1)]),t($)?(s(),r("div",{key:0,class:"flex-shrink-0",onClick:e[8]||(e[8]=ue(()=>{},["stop"]))},[M(i,{track:{title:l.title,artist:l.artist,acrId:l.acrid,youtubeId:l.youtubeId,coverUrl:l.coverUrl},class:"text-gray-500"},null,8,["track"])])):h("",!0)],10,Kt))),128)),t(Oe).length===0?(s(),r("div",Zt," No tracks in queue ")):h("",!0)],512)):h("",!0)]),_:1}),n("div",en,[t(De)?(s(),r("iframe",{ref_key:"proxyIframe",ref:ge,key:t(v)?.youtubeId,src:t(De),class:"absolute inset-0 w-full h-full border-0",allow:"autoplay; encrypted-media; picture-in-picture; fullscreen",allowfullscreen:"",referrerpolicy:"origin"},null,8,tn)):(s(),r("div",nn,[...e[31]||(e[31]=[n("svg",{class:"w-8 h-8",fill:"currentColor",viewBox:"0 0 24 24"}
1,[n("path",{d:"M21.582 7.058c-.232-.871-.917-1.557-1.789-1.789C18.254 4.875 12 4.875 12 4.875s-6.254 0-7.793.394c-.872.232-1.557.918-1.789 1.789C2.024 8.596 2.024 12 2.024 12s0 3.404.394 4.942c.232.871.917 1.557 1.789 1.789 1.539.394 7.793.394 7.793.394s6.254 0 7.793-.394c.872-.232 1.557-.918 1.789-1.789.394-1.538.394-4.942.394-4.942s0-3.404-.394-4.942zM9.99 14.978V9.022l5.196 2.978-5.196 2.978z"})],-1)])]))]),n("div",{ref_key:"progressBarRef",ref:Ve,class:"group relative h-[3px] bg-gray-800 cursor-pointer flex-shrink-0 hover:h-[5px] transition-all",onPointerdown:dt},[n("div",{class:c(["h-full bg-gray-400 group-hover:bg-white pointer-events-none",{"transition-none":t(g),"transition-[width]":!t(g)}]),style:W({width:t(ut)+"%"})},null,6)],544),M(V,{name:"collapse"},{default:_(()=>[t(C)?(s(),r("div",on,[t($)?(s(),r(E,{key:1},[n("p",ln,f(t(U)?"Saved â":"Save playlist"),1),t(U)?h("",!0):(s(),r("div",sn,[Ye(n("input",{"onUpdate:modelValue":e[10]||(e[10]=l=>Mt(S)?S.value=l:null),class:"flex-1 bg-gray-800 text-white text-xs rounded-lg px-2 py-1.5 outline-none border border-gray-700 focus:border-sky-500 placeholder-gray-600 min-w-0",placeholder:"Playlist name",onKeydown:[Xe(xe,["enter"]),e[11]||(e[11]=Xe(l=>C.value=!1,["esc"]))]},null,544),[[Ct,t(S)]]),n("button",{class:"px-2.5 py-1.5 bg-sky-500 hover:bg-sky-600 text-white text-xs font-semibold rounded-lg transition-colors disabled:opacity-50",disabled:t(H)||!t(S).trim(),onClick:xe},f(t(H)?"â¦":"Save"),9,rn)]))],64)):(s(),r(E,{key:0},[e[33]||(e[33]=n("p",{class:"text-[11px] text-gray-300 font-semibold mb-1"},"Save playlist",-1)),e[34]||(e[34]=n("p",{class:"text-[10px] text-gray-500 mb-2"},"Sign in to save your playlist and listen anytime",-1)),M(d,{to:"/login",class:"block w-full py-1.5 bg-sky-500 hover:bg-sky-600 text-white text-xs font-semibold rounded-lg text-center transition-colors",onClick:e[9]||(e[9]=l=>C.value=!1)},{default:_(()=>[...e[32]||(e[32]=[de(" Sign in / Register ",-1)])]),_:1})],64))])):h("",!0)]),_:1}),n("div",an,[n("div",un,[n("button",{class:c(["transition-colors p-1 flex-shrink-0 relative",t(u).playMode!=="normal"?"text-sky-400":"text-gray-500 hover:text-white"]),title:t(u).playMode==="normal"?"No repeat":t(u).playMode==="repeat-all"?"Repeat all":t(u).playMode==="repeat-one"?"Repeat one":"Shuffle",onClick:ct},[t(u).playMode==="normal"?(s(),r("svg",vn,[...e[35]||(e[35]=[n("path",{d:"M17 17H7V14L3 18l4 4v-3h12v-6h-2v4zM7 7h10v3l4-4-4-4v3H5v6h2V7z"},null,-1)])])):t(u).playMode==="repeat-all"?(s(),r("svg",cn,[...e[36]||(e[36]=[n("path",{d:"M17 17H7V14L3 18l4 4v-3h12v-6h-2v4zM7 7h10v3l4-4-4-4v3H5v6h2V7z"},null,-1)])])):t(u).playMode==="repeat-one"?(s(),r(E,{key:2},[e[37]||(e[37]=n("svg",{class:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24"},[n("path",{d:"M17 17H7V14L3 18l4 4v-3h12v-6h-2v4zM7 7h10v3l4-4-4-4v3H5v6h2V7z"})],-1)),e[38]||(e[38]=n("span",{class:"absolute -top-0.5 -right-0.5 text-[8px] font-bold leading-none"},"1",-1))],64)):(s(),r("svg",fn,[...e[39]||(e[39]=[n("path",{d:"M10.59 9.17 5.41 4 4 5.41l5.17 5.17 1.42-1.41zM14.5 4l2.04 2.04L4 18.59 5.41 20 17.96 7.46 20 9.5V4h-5.5zm.33 9.41-1.41 1.41 3.13 3.13L14.5 20H20v-5.5l-2.04 2.04-3.13-3.13z"},null,-1)])]))],10,dn),n("button",{class:"text-gray-400 hover:text-white transition-colors p-1",onClick:e[12]||(e[12]=(...l)=>t(pe)&&t(pe)(...l)),title:"Previous"},[...e[40]||(e[40]=[n("svg",{class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24"},[n("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"})],-1)])]),n("button",{class:"w-7 h-7 rounded-full bg-white text-gray-900 flex items-center justify-center hover:scale-110 transition-transform mx-1",onClick:je,title:t(u).playing?"Pause":"Play"},[t(u).playing?(s(),r("svg",pn,[...e[41]||(e[41]=[n("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"},null,-1)])])):(s(),r("svg",xn,[...e[42]||(e[42]=[n("path",{d:"M8 5v14l11-7z"},null,-1)])]))],8,yn),n("button",{class:"text-gray-400 hover:text-white transition-colors p-1",onClick:e[13]||(e[13]=(...l)=>t(K)&&t(K)(...l)),title:"Next"},[...e[43]||(e[43]=[n("svg",{class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24"},[n("path",{d:"M6 18l8.5-6L6 6v12zM16 6v12h2V6h-2z"})],-1)])])]),n("div",hn,[n("span",wn,[de(f(Ee(t(g)?t(L):t(z))),1),e[44]||(e[44]=n("span",{class:"text-gray-700"},"/",-1)),de(f(Ee(t(k))),1)]),n("div",{class:"relative",onMouseleave:e[16]||(e[16]=l=>N.value=!1)},[n("button",{class:"text-gray-500 hover:text-white transition-colors p-1",onMouseenter:e[14]||(e[14]=l=>N.value=!0),onClick:e[15]||(e[15]=l=>N.value=!t(N)),title:"Volume"},[t(u).volume>0?(s(),r("svg",gn,[...e[45]||(e[45]=[n("path",{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3A4.5 4.5 0 0 0 14 7.97v8.05c1.48-.73 2.5-2.25 2.5-4.02z"},null,-1)])])):(s(),r("svg",mn,[...e[46]||(e[46]=[n("path",{d:"M16.5 12A4.5 4.5 0 0 0 14 7.97v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51A8.796 8.796 0 0 0 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.17v2.06a8.99 8.99 0 0 0 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4 9.91 6.09 12 8.18V4z"},null,-1)])]))],32),M(V,{name:"fade"},{default:_(()=>[t(N)?(s(),r("div",kn,[n("div",{ref_key:"volumeBarRef",ref:Z,class:"h-1 bg-gray-700 rounded-full cursor-pointer relative",onClick:yt},[n("div",{class:"h-full bg-white rounded-full pointer-events-none",style:W({width:t(u).volume+"%"})},null,4)],512),n("p",bn,f(t(u).volume)+"%",1)])):h("",!0)]),_:1})],32),n("button",{class:c(["transition-colors p-1",t(C)?"text-sky-400":"text-gray-500 hover:text-white"]),title:"Save playlist",onClick:e[17]||(e[17]=l=>C.value=!t(C))},[...e[47]||(e[47]=[n("svg",{class:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[n("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z"})],-1)])],2)])])],6),[[kt,t(ye)&&!t(D)&&!t(T)]])])}}}),Ln=Object.assign(Pt(Mn,[["__scopeId","data-v-5f2ab2f8"]]),{__name:"PlayerBar"});export{Ln as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.