import{n as e}from"./rolldown-runtime-DAXXjFlN.js";import{An as t,Ar as n,Cn as r,Dn as i,Fn as a,Gn as o,Hn as s,I as c,Jn as l,L as u,Ln as d,Nr as f,On as p,Pn as m,Qn as h,Sn as g,Tr as _,X as v,Y as y,Zn as b,_n as x,_r as S,ar as C,bn as w,dn as T,dr as E,er as D,gr as O,jn as k,kn as A,mr as j,nr as M,pr as N,rr as P,sn as F,un as I,ur as ee,vr as L,zr as R}from"./vendor-Dcerr41Y.js";import{M as te,d as ne,i as re,j as ie,r as ae,v as oe}from"./vendor-vue-CzT6iKrm.js";import{Bt as z,Dt as B,E as V,Ft as se,Gt as ce,It as le,Kt as ue,Lt as H,Mt as U,Nt as de,Ot as fe,Pt as pe,Rt as me,S as he,T as ge,Ut as _e,Wt as ve,X as ye,Y as be,a as xe,at as Se,dt as Ce,ft as we,g as Te,gt as Ee,h as De,ht as Oe,i as ke,it as Ae,jt as je,lt as Me,mt as Ne,o as Pe,ot as Fe,pt as Ie,rt as Le,s as Re,ut as ze,x as Be,zt as Ve}from"./vendor-quasar-CU_esu6y.js";import{B as He,Bn as Ue,Ct as We,D as Ge,Di as Ke,Dr as W,Dt as qe,Er as G,Fi as Je,Ft as Ye,Hn as Xe,Ii as Ze,Li as Qe,Oi as $e,Ot as et,Pt as tt,R as nt,Ri as rt,St as it,Tt as at,Un as ot,Wn as st,Xt as ct,Y as lt,Yn as K,Zn as q,_ as ut,at as dt,b as J,br as ft,cr as pt,di as Y,g as mt,gr as ht,h as gt,lr as _t,m as vt,nr as yt,on as bt,or as xt,ot as St,ra as Ct,ta as wt,ui as X,vr as Tt,x as Z,xt as Et,y as Dt,zi as Ot}from"./ws-DjAvcWfg.js";import{m as kt,p as At}from"./index-IojTodLd.js";import{A as jt,B as Mt,Bn as Nt,C as Pt,H as Ft,Kt as It,Ln as Lt,P as Rt,Rn as zt,Un as Bt,Ut as Vt,Wn as Ht,X as Ut,Y as Wt,dn as Gt,h as Kt,in as qt,j as Jt,m as Yt,nr as Xt,on as Q,qt as Zt,rn as Qt,sn as $,tr as $t,un as en,w as tn,zn as nn}from"./smart-playlist-store-U6zHlhLg.js";import{c as rn,d as an,n as on,t as sn}from"./vLyricProgress-C2rfxWy2.js";import{n as cn,t as ln}from"./LyricsComposable-bPN0U0OS.js";import{a as un,d as dn,f as fn,h as pn,i as mn,m as hn,o as gn,p as _n,s as vn,u as yn}from"./AMQueue-CJJWCi_2.js";import{n as bn,t as xn}from"./party-store-BMdxCLGz.js";import{r as Sn,t as Cn}from"./useScrollPerfMode-C8OSASv_.js";import{r as wn,t as Tn}from"./AMSidebar-aCbvZQLR.js";import{n as En,t as Dn}from"./PlaybackSpeedButton-DNG1G-i4.js";import{i as On,n as kn,r as An,t as jn}from"./QueueButton-D2xC2ASx.js";import{a as Mn,c as Nn,i as Pn,l as Fn,r as In,t as Ln}from"./LCDPlayerGlass-By_dB_03.js";import{i as Rn,n as zn,r as Bn,t as Vn}from"./AirplayButton-Bo_jhcS1.js";import{D as Hn,E as Un,T as Wn,w as Gn}from"./RightDrawerContent-mrBXDOqa.js";var Kn,qn=e((()=>{F(),vn(),Kn=d({__name:`ImmersiveLyricView`,emits:[`has-lyrics`,`no-lyrics-found`,`instrumental`],setup(e,{emit:t}){let n=t;return(e,t)=>(D(),A(gn,{"show-no-lyrics-found-text":!1,onNoLyricsFound:t[0]||=e=>n(`no-lyrics-found`),onHasLyrics:t[1]||=e=>n(`has-lyrics`),onInstrumental:t[2]||=e=>n(`instrumental`),"is-immersive":``}))}})})),Jn,Yn=e((()=>{qn(),qn(),Jn=Kn})),Xn,Zn=e((()=>{Xn=`struct Globals {
  iResolution: vec2f,
  _pad0: vec2f,
};

@group(0) @binding(0) var<uniform> globals: Globals;
@group(0) @binding(1) var iChannel0: texture_2d<f32>;
@group(0) @binding(2) var iChannel0Sampler: sampler;

fn FsrEasuCF(p: vec2f) -> vec3f {
  return textureSample(iChannel0, iChannel0Sampler, p).rgb;
}

fn FsrEasuCon(
  con0: ptr<function, vec4f>,
  con1: ptr<function, vec4f>,
  con2: ptr<function, vec4f>,
  con3: ptr<function, vec4f>,
  inputViewportInPixels: vec2f,
  inputSizeInPixels: vec2f,
  outputSizeInPixels: vec2f,
) {
  *con0 = vec4f(
    inputViewportInPixels.x / outputSizeInPixels.x,
    inputViewportInPixels.y / outputSizeInPixels.y,
    0.5 * inputViewportInPixels.x / outputSizeInPixels.x - 0.5,
    0.5 * inputViewportInPixels.y / outputSizeInPixels.y - 0.5,
  );
  *con1 = vec4f(1.0, 1.0, 1.0, -1.0) / inputSizeInPixels.xyxy;
  *con2 = vec4f(-1.0, 2.0, 1.0, 2.0) / inputSizeInPixels.xyxy;
  *con3 = vec4f(0.0, 4.0, 0.0, 0.0) / inputSizeInPixels.xyxy;
}

fn FsrEasuTapF(
  aC: ptr<function, vec3f>,
  aW: ptr<function, f32>,
  off: vec2f,
  dir: vec2f,
  len: vec2f,
  lob: f32,
  clp: f32,
  c: vec3f,
) {
  var v = vec2f(dot(off, dir), dot(off, vec2f(-dir.y, dir.x)));
  v *= len;
  let d2 = min(dot(v, v), clp);

  var wB = 0.4 * d2 - 1.0;
  var wA = lob * d2 - 1.0;
  wB *= wB;
  wA *= wA;
  wB = 1.5625 * wB - 0.5625;
  let w = wB * wA;

  *aC += c * w;
  *aW += w;
}

fn FsrEasuSetF(
  dir: ptr<function, vec2f>,
  len: ptr<function, f32>,
  w: f32,
  lA: f32,
  lB: f32,
  lC: f32,
  lD: f32,
  lE: f32,
) {
  let lenXBase = max(abs(lD - lC), abs(lC - lB));
  let dirX = lD - lB;
  (*dir).x += dirX * w;
  var lenX = clamp(abs(dirX) / lenXBase, 0.0, 1.0);
  lenX *= lenX;
  *len += lenX * w;

  let lenYBase = max(abs(lE - lC), abs(lC - lA));
  let dirY = lE - lA;
  (*dir).y += dirY * w;
  var lenY = clamp(abs(dirY) / lenYBase, 0.0, 1.0);
  lenY *= lenY;
  *len += lenY * w;
}

fn FsrEasuF(
  ip: vec2f,
  con0: vec4f,
  con1: vec4f,
  con2: vec4f,
  con3: vec4f,
) -> vec3f {
  var pp = ip * con0.xy + con0.zw;
  let fp = floor(pp);
  pp -= fp;

  let p0 = fp * con1.xy + con1.zw;
  let p1 = p0 + con2.xy;
  let p2 = p0 + con2.zw;
  let p3 = p0 + con3.xy;

  let off = vec4f(-0.5, 0.5, -0.5, 0.5) * con1.xxyy;

  let bC = FsrEasuCF(p0 + off.xw);
  let bL = bC.g + 0.5 * (bC.r + bC.b);
  let cC = FsrEasuCF(p0 + off.yw);
  let cL = cC.g + 0.5 * (cC.r + cC.b);
  let iC = FsrEasuCF(p1 + off.xw);
  let iL = iC.g + 0.5 * (iC.r + iC.b);
  let jC = FsrEasuCF(p1 + off.yw);
  let jL = jC.g + 0.5 * (jC.r + jC.b);
  let fC = FsrEasuCF(p1 + off.yz);
  let fL = fC.g + 0.5 * (fC.r + fC.b);
  let eC = FsrEasuCF(p1 + off.xz);
  let eL = eC.g + 0.5 * (eC.r + eC.b);
  let kC = FsrEasuCF(p2 + off.xw);
  let kL = kC.g + 0.5 * (kC.r + kC.b);
  let lC = FsrEasuCF(p2 + off.yw);
  let lL = lC.g + 0.5 * (lC.r + lC.b);
  let hC = FsrEasuCF(p2 + off.yz);
  let hL = hC.g + 0.5 * (hC.r + hC.b);
  let gC = FsrEasuCF(p2 + off.xz);
  let gL = gC.g + 0.5 * (gC.r + gC.b);
  let oC = FsrEasuCF(p3 + off.yz);
  let oL = oC.g + 0.5 * (oC.r + oC.b);
  let nC = FsrEasuCF(p3 + off.xz);
  let nL = nC.g + 0.5 * (nC.r + nC.b);

  var dir = vec2f(0.0, 0.0);
  var len = 0.0;

  FsrEasuSetF(&dir, &len, (1.0 - pp.x) * (1.0 - pp.y), bL, eL, fL, gL, jL);
  FsrEasuSetF(&dir, &len, pp.x * (1.0 - pp.y), cL, fL, gL, hL, kL);
  FsrEasuSetF(&dir, &len, (1.0 - pp.x) * pp.y, fL, iL, jL, kL, nL);
  FsrEasuSetF(&dir, &len, pp.x * pp.y, gL, jL, kL, lL, oL);

  var dirR = dot(dir, dir);
  let zro = dirR < (1.0 / 32768.0);
  if (zro) {
    dirR = 1.0;
    dir = vec2f(1.0, 0.0);
  } else {
    dirR = inverseSqrt(dirR);
    dir *= dirR;
  }

  len *= 0.5;
  len *= len;

  let stretch = dot(dir, dir) / max(abs(dir.x), abs(dir.y));
  let len2 = vec2f(1.0 + (stretch - 1.0) * len, 1.0 - 0.5 * len);
  let lob = 0.5 - 0.29 * len;
  let clp = 1.0 / lob;

  let min4 = min(min(fC, gC), min(jC, kC));
  let max4 = max(max(fC, gC), max(jC, kC));

  var aC = vec3f(0.0, 0.0, 0.0);
  var aW = 0.0;

  FsrEasuTapF(&aC, &aW, vec2f(0.0, -1.0) - pp, dir, len2, lob, clp, bC);
  FsrEasuTapF(&aC, &aW, vec2f(1.0, -1.0) - pp, dir, len2, lob, clp, cC);
  FsrEasuTapF(&aC, &aW, vec2f(-1.0, 1.0) - pp, dir, len2, lob, clp, iC);
  FsrEasuTapF(&aC, &aW, vec2f(0.0, 1.0) - pp, dir, len2, lob, clp, jC);
  FsrEasuTapF(&aC, &aW, vec2f(0.0, 0.0) - pp, dir, len2, lob, clp, fC);
  FsrEasuTapF(&aC, &aW, vec2f(-1.0, 0.0) - pp, dir, len2, lob, clp, eC);
  FsrEasuTapF(&aC, &aW, vec2f(1.0, 1.0) - pp, dir, len2, lob, clp, kC);
  FsrEasuTapF(&aC, &aW, vec2f(2.0, 1.0) - pp, dir, len2, lob, clp, lC);
  FsrEasuTapF(&aC, &aW, vec2f(2.0, 0.0) - pp, dir, len2, lob, clp, hC);
  FsrEasuTapF(&aC, &aW, vec2f(1.0, 0.0) - pp, dir, len2, lob, clp, gC);
  FsrEasuTapF(&aC, &aW, vec2f(1.0, 2.0) - pp, dir, len2, lob, clp, oC);
  FsrEasuTapF(&aC, &aW, vec2f(0.0, 2.0) - pp, dir, len2, lob, clp, nC);

  return min(max4, max(min4, aC / aW));
}

struct FragmentInput {
  @builtin(position) fragCoord: vec4f,
};

struct FragmentOutput {
  @location(0) color: vec4f,
};

@fragment
fn main(input: FragmentInput) -> FragmentOutput {
  var con0 = vec4f(0.0);
  var con1 = vec4f(0.0);
  var con2 = vec4f(0.0);
  var con3 = vec4f(0.0);

  let dims = textureDimensions(iChannel0);
  let renderSize = vec2f(f32(dims.x), f32(dims.y));

  FsrEasuCon(&con0, &con1, &con2, &con3, renderSize, renderSize, globals.iResolution);

  let c = FsrEasuF(input.fragCoord.xy, con0, con1, con2, con3);

  var output: FragmentOutput;
  output.color = vec4f(c, 1.0);
  return output;
}
`})),Qn,$n=e((()=>{Qn=`const FSR_RCAS_LIMIT: f32 = 0.25 - (1.0 / 16.0);

struct Globals {
  iResolution: vec2f,
  sharpness: f32,
  _pad0: f32,
};

@group(0) @binding(0) var<uniform> globals: Globals;
@group(0) @binding(1) var iChannel0: texture_2d<f32>;
@group(0) @binding(2) var iChannel0Sampler: sampler;

fn FsrRcasLoadF(p: vec2f) -> vec4f {
  return textureSample(iChannel0, iChannel0Sampler, p / globals.iResolution.xy);
}

fn FsrRcasCon(sharpness: f32) -> f32 {
  return exp2(-sharpness);
}

fn FsrRcasF(ip: vec2f, con: f32) -> vec3f {
  let sp = vec2f(ip);
  let b = FsrRcasLoadF(sp + vec2f(0.0, -1.0)).rgb;
  let d = FsrRcasLoadF(sp + vec2f(-1.0, 0.0)).rgb;
  let e = FsrRcasLoadF(sp).rgb;
  let f = FsrRcasLoadF(sp + vec2f(1.0, 0.0)).rgb;
  let h = FsrRcasLoadF(sp + vec2f(0.0, 1.0)).rgb;

  let bL = b.g + 0.5 * (b.b + b.r);
  let dL = d.g + 0.5 * (d.b + d.r);
  let eL = e.g + 0.5 * (e.b + e.r);
  let fL = f.g + 0.5 * (f.b + f.r);
  let hL = h.g + 0.5 * (h.b + h.r);

  let mn4 = min(b, min(f, h));
  let mx4 = max(b, max(f, h));

  let peakC = vec2f(1.0, -4.0);
  let hitMin = mn4 / (4.0 * mx4);
  let hitMax = (peakC.x - mx4) / (4.0 * mn4 + peakC.y);
  let lobeRGB = max(-hitMin, hitMax);

  var lobe = max(
    -FSR_RCAS_LIMIT,
    min(max(lobeRGB.r, max(lobeRGB.g, lobeRGB.b)), 0.0),
  ) * con;

  return (lobe * (b + d + h + f) + e) / (4.0 * lobe + 1.0);
}

struct FragmentInput {
  @builtin(position) fragCoord: vec4f,
};

struct FragmentOutput {
  @location(0) color: vec4f,
};

@fragment
fn main(input: FragmentInput) -> FragmentOutput {
  let con = FsrRcasCon(globals.sharpness);
  let col = FsrRcasF(input.fragCoord.xy, con);

  var output: FragmentOutput;
  output.color = vec4f(col, 1.0);
  return output;
}
`})),er,tr=e((()=>{er=`struct VertexInput {
  @location(0) position: vec3f,
  @location(1) uv: vec2f,
};

struct VertexOutput {
  @builtin(position) position: vec4f,
  @location(0) vUv: vec2f,
};

@vertex
fn main(input: VertexInput) -> VertexOutput {
  var output: VertexOutput;
  output.vUv = input.uv;
  output.position = vec4f(input.position, 1.0);
  return output;
}
`}));function nr(){let e=navigator;return!!e?.gpu&&typeof e.gpu.requestAdapter==`function`}async function rr(){if(ur)return ur;let e=navigator;return ur=(async()=>{let t=await e.gpu.requestAdapter();if(!t)throw Error(`No WebGPU adapter is available.`);let n=await t.requestDevice();return n?.lost?.then?.(()=>{ur=null}),n})(),ur.catch(()=>{ur=null}),ur}function ir(e){return Number.isFinite(e)?Math.max(0,Math.min(1,e)):.5}function ar(e){return 2*(1-ir(e))}async function or(e,t={}){let n=navigator;if(!n?.gpu)throw Error(`WebGPU is not available in this browser.`);let r=t.device??await rr(),i=e.getContext(`webgpu`);if(!i)throw Error(`Failed to create WebGPU context for FSR upscale.`);let a=n.gpu.getPreferredCanvasFormat(),o=`rgba8unorm`,s=ir(t.sharpness??.5),c=!1,l=null,u=null,d=null,f=null,p=null,m=r.createSampler({magFilter:`linear`,minFilter:`linear`,addressModeU:`clamp-to-edge`,addressModeV:`clamp-to-edge`}),h=r.createBuffer({size:lr.byteLength,usage:(cr?.VERTEX??32)|(cr?.COPY_DST??8)});r.queue.writeBuffer(h,0,lr);let g=r.createBuffer({size:16,usage:(cr?.UNIFORM??64)|(cr?.COPY_DST??8)}),_=r.createBuffer({size:16,usage:(cr?.UNIFORM??64)|(cr?.COPY_DST??8)}),v={module:r.createShaderModule({code:er}),entryPoint:`main`,buffers:[{arrayStride:20,attributes:[{shaderLocation:0,offset:0,format:`float32x3`},{shaderLocation:1,offset:12,format:`float32x2`}]}]},y=r.createRenderPipeline({layout:`auto`,vertex:v,fragment:{module:r.createShaderModule({code:Xn}),entryPoint:`main`,targets:[{format:o}]},primitive:{topology:`triangle-list`}}),b=r.createRenderPipeline({layout:`auto`,vertex:v,fragment:{module:r.createShaderModule({code:Qn}),entryPoint:`main`,targets:[{format:a}]},primitive:{topology:`triangle-list`}});function x(){i.configure({device:r,format:a,alphaMode:`premultiplied`})}function S(){return{w:Math.max(1,e.width),h:Math.max(1,e.height)}}function C(){let{w:e,h:t}=S();u?.destroy(),u=r.createTexture({size:[e,t],format:o,usage:(sr?.TEXTURE_BINDING??4)|(sr?.RENDER_ATTACHMENT??16)}),d=u.createView(),p=r.createBindGroup({layout:b.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:_}},{binding:1,resource:d},{binding:2,resource:m}]}),l&&(f=r.createBindGroup({layout:y.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:g}},{binding:1,resource:l.createView()},{binding:2,resource:m}]}))}async function w(e){if(c)return;let t=0,n=0;if(e instanceof HTMLImageElement?((!e.complete||e.naturalWidth===0)&&await new Promise((t,n)=>{e.onload=()=>t(),e.onerror=()=>n(Error(`Failed to decode source image for FSR upscale.`))}),t=e.naturalWidth,n=e.naturalHeight):(e instanceof HTMLCanvasElement,t=e.width,n=e.height),t<=0||n<=0)throw Error(`Source image has zero dimensions.`);l?.destroy(),l=r.createTexture({size:[t,n],format:o,usage:(sr?.TEXTURE_BINDING??4)|(sr?.COPY_DST??2)|(sr?.RENDER_ATTACHMENT??16)}),r.queue.copyExternalImageToTexture({source:e},{texture:l},[t,n]),u&&(f=r.createBindGroup({layout:y.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:g}},{binding:1,resource:l.createView()},{binding:2,resource:m}]}))}function T(e){s=ir(e)}function E(){c||(x(),C())}function D(){let{w:e,h:t}=S();r.queue.writeBuffer(g,0,new Float32Array([e,t,0,0])),r.queue.writeBuffer(_,0,new Float32Array([e,t,ar(s),0]))}function O(){if(c||!l||!u||!f||!p)return;D();let e=r.createCommandEncoder(),t=e.beginRenderPass({colorAttachments:[{view:d,clearValue:{r:0,g:0,b:0,a:1},loadOp:`clear`,storeOp:`store`}]});t.setPipeline(y),t.setBindGroup(0,f),t.setVertexBuffer(0,h),t.draw(6),t.end();let n=e.beginRenderPass({colorAttachments:[{view:i.getCurrentTexture().createView(),clearValue:{r:0,g:0,b:0,a:1},loadOp:`clear`,storeOp:`store`}]});n.setPipeline(b),n.setBindGroup(0,p),n.setVertexBuffer(0,h),n.draw(6),n.end(),r.queue.submit([e.finish()])}function k(){if(!c){c=!0,l?.destroy(),u?.destroy(),h?.destroy(),g?.destroy(),_?.destroy(),l=null,u=null,d=null,f=null,p=null;try{i.unconfigure()}catch{}}}return x(),C(),{setSource:w,setSharpness:T,resize:E,render:O,dispose:k,hasSource:()=>!!l}}var sr,cr,lr,ur,dr=e((()=>{Zn(),$n(),tr(),sr=globalThis.GPUTextureUsage,cr=globalThis.GPUBufferUsage,lr=new Float32Array([-1,-1,0,0,1,1,-1,0,1,1,1,1,0,1,0,-1,-1,0,0,1,1,1,0,1,0,-1,1,0,0,0]),ur=null})),fr,pr=e((()=>{F(),Ye(),dr(),nn(),lt(),fr=d({__name:`ImmersiveArtworkFSR`,props:{artworkUrl:{},placeholderUrl:{default:null},sharpness:{default:.5},bgColor:{default:null},sourceAspect:{default:void 0},objectFit:{default:`cover`}},emits:[`fallback`,`loaded`],setup(e,{emit:t}){let r=e,a=t,o=n(),s=n(),c=n(),l=f(null),u=n(!1),d=n(!1),m=n(!1),g=n(!1),_,v=i(()=>!!r.placeholderUrl),y=Nt(),x=null,C=null,T=0,A=!1,M=null;function N(e,t){return M||=document.createElement(`canvas`),M.width=Math.max(1,e),M.height=Math.max(1,t),M}function P(){M&&(M.width=0,M.height=0)}let F=i(()=>{let e={"--bgColor":r.bgColor?`#${r.bgColor}`:`transparent`};return r.placeholderUrl&&!u.value&&(e.backgroundImage=`url("${r.placeholderUrl}")`,e.backgroundSize=`cover`,e.backgroundPosition=`center`),e});function I(){let e=s.value,t=o.value;if(!e||!t)return!1;let n=Math.min(2.5,Math.max(1,window.devicePixelRatio||1)),r=Math.max(1,Math.round(t.clientWidth*n)),i=Math.max(1,Math.round(t.clientHeight*n));return e.width!==r||e.height!==i?(e.width=r,e.height=i,!0):!1}function ee(){let e=r.sourceAspect;if(e&&Number.isFinite(e)&&e>0)return e;let t=s.value;return!t||t.width<=0||t.height<=0?null:t.width/t.height}function L(e){let t=ee();if(!t)return e;let n=e.width,i=e.height;if(n<=0||i<=0)return e;let a=n/i;if(Math.abs(a-t)/t<.005)return e;if(r.objectFit===`contain`){let r,o;a>t?(r=n,o=Math.round(n/t)):(o=i,r=Math.round(i*t));let s=N(r,o),c=s.getContext(`2d`);if(!c)return e;let l=Math.round((r-n)/2),u=Math.round((o-i)/2);return c.drawImage(e,l,u,n,i),s}let o=0,s=0,c=n,l=i;a>t?(c=Math.round(i*t),o=Math.round((n-c)/2)):(l=Math.round(n/t),s=Math.round((i-l)/2));let u=N(c,l),d=u.getContext(`2d`);return d?(d.drawImage(e,o,s,c,l,0,0,c,l),u):e}async function R(e){try{let t=await tt({url:e,variant:`hero`}),n=t?.imageHero??t?.image;if(n)return await createImageBitmap(n)}catch(e){console.warn(`[FSR] cache fetch failed, falling through to direct fetch`,e)}try{let t=e.includes(`{w}`)||e.includes(`%7Bw%7D`)?nt(e,2400,2400,`ss`,`jpg`):e,n=await fetch(t,{credentials:`omit`});if(!n.ok)return null;let r=await n.blob();return await createImageBitmap(r)}catch(e){return console.warn(`[FSR] direct fetch failed`,e),null}}function te(){let e=s.value,t=c.value;if(!e||!t||!u.value||e.width===0||e.height===0)return!1;try{(t.width!==e.width||t.height!==e.height)&&(t.width=e.width,t.height=e.height);let n=t.getContext(`2d`);return n?(n.clearRect(0,0,t.width,t.height),n.drawImage(e,0,0),!0):!1}catch{return!1}}function ne(e){te()?(m.value=!1,g.value=!0,d.value=!0):u.value=!1,ie(e)}function re(){d.value&&(m.value=!0,requestAnimationFrame(()=>{requestAnimationFrame(()=>{d.value=!1})}),_&&clearTimeout(_),_=setTimeout(()=>{g.value=!1,_=void 0;let e=c.value;e&&(e.width=0,e.height=0)},650))}async function ie(e){if(!l.value){console.warn(`[FSR] loadAndRender called before upscaler ready`);return}let t=++T,n=await R(e);if(A||t!==T){n?.close();return}if(!n){console.warn(`[FSR] no bitmap for url, falling back`,e),a(`fallback`,`load-failed`);return}try{I();let e=L(n);if(await l.value.setSource(e),A||t!==T){n.close();return}l.value.resize(),l.value.render(),u.value=!0,re();let r=e.width,i=e.height;console.info(`[FSR] rendered ${r}x${i} (src ${n.width}x${n.height}) -> ${s.value?.width}x${s.value?.height}`),a(`loaded`)}catch(e){console.error(`[FSR] setSource/render failed`,e),a(`fallback`,`render-failed`)}finally{P(),C?.close(),C=n}}return E(()=>r.artworkUrl,e=>{e&&ne(e)}),E(()=>r.sharpness,e=>{l.value&&(l.value.setSharpness(e),l.value.hasSource()&&l.value.render())}),E(()=>y.fsrRenderEpoch,()=>{!l.value||!r.artworkUrl||ne(r.artworkUrl)}),b(async()=>{if(!(!s.value||!o.value)){I();try{l.value=await or(s.value,{sharpness:r.sharpness})}catch(e){console.warn(`[FSR] init failed, requesting fallback`,e),a(`fallback`,`init-failed`);return}if(A){l.value.dispose(),l.value=null;return}x=new ResizeObserver(()=>{l.value&&I()&&(l.value.resize(),C?(async()=>{try{if(!l.value)return;let e=L(C);await l.value.setSource(e),l.value.render()}catch(e){console.warn(`[FSR] resize re-crop failed`,e)}finally{P()}})():l.value.hasSource()&&l.value.render())}),x.observe(o.value),r.artworkUrl&&ie(r.artworkUrl)}}),h(()=>{A=!0,_&&=(clearTimeout(_),void 0),x?.disconnect(),x=null,l.value?.dispose(),l.value=null,C?.close(),C=null,P(),M=null}),(e,t)=>(D(),k(`div`,{ref_key:`wrapper`,ref:o,class:O([`immersive-artwork-fsr`,{rendered:u.value,swapping:d.value,"fade-active":m.value||!v.value}]),style:S(F.value)},[j(p(`canvas`,{ref_key:`snapshotCanvas`,ref:c,class:`fsr-snapshot`},null,512),[[w,g.value]]),p(`canvas`,{ref_key:`canvas`,ref:s,class:`fsr-canvas`},null,512)],6))}})})),mr=e((()=>{})),hr,gr=e((()=>{pr(),pr(),mr(),Y(),hr=X(fr,[[`__scopeId`,`data-v-74efb6eb`]])}));function _r(e,t){let n=[t.value?.attributes?.releaseDate,e.player.nowPlayingItem?.attributes?.releaseDate,e.player.nowPlayingItem?.releaseDate];for(let e of n){if(!e)continue;let t=parseInt(String(e).slice(0,4),10);if(Number.isFinite(t))return t}return null}function vr(e={}){let t=it(),r=Zt(),a=n(!1),o=i(()=>{let e=t.nowPlayingArtwork;if(e?.url)return e.url.includes(`{w}`)||e.url.includes(`%7Bw%7D`)?e.url:He(e,3e3,3e3,`ss`)});E(o,()=>{a.value=!1});let s=i(()=>{let e=J(`visual.immersive.fsrUpscale.sharpness`);return typeof e==`number`?e:.5});return{useFsr:i(()=>{if(a.value||!J(`visual.immersive.fsrUpscale.enabled`))return!1;if(!nr())return console.info(`[FSR] WebGPU not available, skipping`),!1;if(e.animatedArtworkVideoUrl?.value||!o.value)return!1;if(J(`visual.immersive.fsrUpscale.forceAlways`))return console.info(`[FSR] activated (forceAlways)`),!0;let n=_r(t,r),i=J(`visual.immersive.fsrUpscale.thresholdYear`)??2010;if(n===null)return console.info(`[FSR] no release date for current track; enable "Apply to All Tracks" to upscale anyway`),!1;let s=n<i;return s&&console.info(`[FSR] activated (release year ${n} < threshold ${i})`),s}),fsrSharpness:s,fsrArtworkUrl:o,fsrFallback:a,handleFallback:()=>{a.value=!0}}}var yr=e((()=>{Z(),dr(),It(),Et(),lt(),F()})),br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr,Pr=e((()=>{ve(),Ee(),Ne(),we(),ze(),V(),Ae(),F(),Z(),pn(),_n(),rn(),sn(),Bt(),Et(),dn(),ln(),br={key:0,class:`loading-symbol-container`},xr={class:`loading-symbol`},Sr=[`lrc-count`,`data-lyric-slot`,`util-lyric-index`,`util-mod-2`],Cr={key:0,class:`lyric-line-item`},wr={key:0,class:`one-word`},Tr={key:1,class:`lyrics-credits`},Er={key:0},Dr={class:`q-pt-md`},Or={key:1},kr={key:1,class:`text-center q-pt-xl text-h2 text-bold`},Ar=.5,jr=4,Mr=1,Nr=d({__name:`LyricViewFocus`,props:{offsetY:{default:128},noSingLyrics:{type:Boolean,default:!1},simpleLyricStyle:{type:Boolean,default:!1},isImmersive:{type:Boolean,default:!1},zoomScale:{default:1},showNoLyricsFoundText:{type:Boolean,default:!0},type:{default:`lyrics`}},emits:[`has-lyrics`,`no-lyrics-found`,`has-active-line`],setup(e,{emit:o}){let c=o,l=n(!0),u=it(),{isHidden:d}=Ht(s(`windowContext`,null)??void 0),{sourceInfo:g,getLyrics:_,hasLyrics:v,lyricsList:y,songWriters:x,userLyricsVariations:C,selectedVariationIndex:w,selectUserLyricsVariation:P,hasMultipleVariations:F}=cn({props:e});E(v,e=>{if(e){c(`has-lyrics`);return}console.log(`no lyrics`),c(`no-lyrics-found`)});let ee=n(),{getCurrentTime:te,currentTimeSlowRef:ne,subscribeFrameTick:re}=an(),ie=0,ae=i(()=>(d.value||(ie=ne.value-(window.airplayActive?2.25:0)-J(`lyrics.timeOffset`)),ie)),oe=i(()=>u.player.nowPlayingItem),z=f([]);function B(){return(window.airplayActive?2.25:0)+J(`lyrics.timeOffset`)}let V=null;function se(e,t,n){return{...e,lineEnd:e.end,end:t,slot:n}}function ce(e){let t=-1;for(let n of e)n>t&&(t=n);let n=t+1;if(n<jr)return n;for(let t=0;t<jr;t++)if(!e.has(t))return t;return jr-1}function le(e){let t=y.value;if(!t.length)return V=null,[];let n=[];for(let r=0;r<t.length;r++){let i=t[r];e>=i.start&&e<=i.end&&n.push(i)}if(!V){if(n.length===0)return[];n.sort((e,t)=>e.start-t.start);let e=n[n.length-1].end;return V={members:n.map((t,n)=>se(t,e,n%jr)),groupEnd:e},V.members}let r=[];for(let t of V.members)e<=(t.lineEnd??t.end)+Ar&&r.push(t);let i=new Set(r.map(e=>e.index)),a=[];for(let e=0;e<n.length;e++){let t=n[e];i.has(t.index)||a.push(t)}if(r.length===0&&a.length===0)return V=null,[];if(a.length===0&&r.length===V.members.length)return V.members;let o=0;for(let e of r){let t=e.lineEnd??e.end;t>o&&(o=t)}for(let e of a)e.end>o&&(o=e.end);let s=new Set(U.value);for(let e of r)typeof e.slot==`number`&&s.add(e.slot);let c=[];for(let e of r)c.push(e);for(let e of a){let t=ce(s);s.add(t),c.push(se(e,o,t))}return c.sort((e,t)=>e.start-t.start),V={members:c,groupEnd:o},V.members}function ue(){if(!V)return;let e=V.members;if(e.length===0)return;let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r.slot!==n&&(e[n]={...r,slot:n},t=!0)}t&&(V={members:e.slice(),groupEnd:V.groupEnd},z.value=V.members)}let H=n(0),U=n(new Set),de=i(()=>z.value.length+H.value);E(()=>de.value>0,e=>c(`has-active-line`,e));function fe(e){let t=e.dataset?.lyricSlot;if(t==null)return null;let n=Number(t);return Number.isFinite(n)?n:null}function pe(e){let t=fe(e);if(t===null)return;H.value+=1;let n=new Set(U.value);n.add(t),U.value=n}function me(e){let t=fe(e);if(t!==null){if(H.value=Math.max(0,H.value-1),U.value.has(t)){let e=new Set(U.value);e.delete(t),U.value=e}ue()}}function he(e){let t=fe(e);if(t!==null&&(H.value=Math.max(0,H.value-1),U.value.has(t))){let e=new Set(U.value);e.delete(t),U.value=e}}function ve(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n].index!==t[n].index)return!1;return!0}function ye(e){let t=le(e);t!==z.value&&(ve(z.value,t)||(z.value=t))}let be=-1,xe=re(e=>{if(d.value)return;let t=e-B();be!==-1&&Math.abs(t-be)>Mr&&(V=null),be=t,ye(t)});E(y,()=>{V=null,z.value=[],ye(te()-B())});let Se=i(()=>{let e=de.value;return e>=3?`25vh`:e>=2?`50vh`:`100vh`});E(oe,e=>{we(e)}),b(async()=>{await we(oe.value),ye(te()-B())}),h(()=>{xe(),z.value=[],V=null});async function we(e){if(!e?.attributes){v.value=!1,l.value=!1;return}try{await _(e),l.value=!1;let t=y.value.findIndex(e=>e.start<=ae.value&&e.end>=ae.value);t===-1&&(t=0),ye(te()-B())}catch(e){console.log(e)}}function Te(e,t){return!0}function Ee(e){return!0}return(e,n)=>(D(),A(T,{class:`sing-focus-lyrics`,ref_key:`scrollArea`,ref:ee,style:S({"--lyric-count":R(de)}),name:`lyric_fade`,tag:`div`,onBeforeLeave:pe,onAfterLeave:me,onLeaveCancelled:he},{default:N(()=>[R(l)?(D(),k(`div`,br,[p(`div`,xr,[a(_e,{name:`svguse:cider-assets/cider-icons/icons.svg#big-lyrics`,class:`tab-icon`,size:`4em`})])])):(D(),k(r,{key:1},[R(v)?(D(!0),k(r,{key:0},M(R(z),e=>j((D(),k(`div`,{class:O([`lyric-line-container`,{"has-multiple-lyrics":R(de)>1,"position-0":(e.slot??0)===0,"position-1":(e.slot??0)===1,"position-2":(e.slot??0)===2,"position-3":(e.slot??0)===3}]),"lrc-count":R(de),"data-lyric-slot":e.slot??0,"util-lyric-index":e.index,"util-mod-2":e.index%2==0,style:S({height:R(Se),"--height":R(Se),"--lyric-duration":(e.lineEnd??e.end)-e.start+`s`,"--util-mod-2":e.index%2==0?1:-1}),key:e.index},[Te(e.start,e.end)?(D(),k(`div`,Cr,[(D(),A(yn,{active:Te(e.start,e.end),"has-passed":Ee(e.start),lyric:e,key:e.index},{default:N(()=>[e.isCredit?(D(),k(`div`,Tr,[e.text==``?t(``,!0):(D(),k(`div`,Er,[n[0]||=p(`b`,null,`Written by:`,-1),n[1]||=m(),n[2]||=p(`br`,null,null,-1),p(`span`,null,L(e.text),1)])),p(`div`,Dr,[n[3]||=p(`b`,null,`Sourced From:`,-1),n[4]||=m(),n[5]||=p(`br`,null,null,-1),R(g).provider===`User`&&R(F)()?(D(),A(ge,{key:0,flat:``,dense:``,"no-caps":``,label:R(g).contributorName||`User`,class:`variation-selector-focus`},{default:N(()=>[a(Me,{dense:``},{default:N(()=>[(D(!0),k(r,null,M(R(C),(e,n)=>j((D(),A(Ce,{key:e.id,clickable:``,onClick:e=>R(P)(n),active:R(w)===n},{default:N(()=>[a(Ie,null,{default:N(()=>[a(Oe,null,{default:N(()=>[m(L(e.contributorName||`Unknown`),1)]),_:2},1024),a(Oe,{caption:``},{default:N(()=>[m(L(e.syncType)+` sync · `+L(e.language||`Unknown`),1)]),_:2},1024)]),_:2},1024),R(w)===n?(D(),A(Ie,{key:0,side:``},{default:N(()=>[a(_e,{name:`check`,color:`primary`})]),_:1})):t(``,!0)]),_:2},1032,[`onClick`,`active`])),[[Le]])),128))]),_:1})]),_:1},8,[`label`])):(D(),k(`span`,Or,L(R(g).provider===`User`&&R(g).contributorName?R(g).contributorName:R(g).provider.charAt(0).toUpperCase()+R(g).provider.slice(1)),1))])])):(D(),k(r,{key:0},[(e.words?.length??0)>0?(D(!0),k(r,{key:0},M(e.words,(e,t)=>(D(),k(r,{key:t},[(e.words?.length??0)>0&&!e.isBackground?(D(),k(`div`,wr,[(D(!0),k(r,null,M(e.words,(e,t)=>(D(),A(fn,{key:t,word:e,active:Te(e.start,e.end)},null,8,[`word`,`active`]))),128))])):(D(),A(fn,{key:1,word:e,active:Te(e.start,e.end),"force-fancy":``},null,8,[`word`,`active`]))],64))),128)):(D(),A(I,{key:1,name:`simple_shrink`},{default:N(()=>[e.empty&&Te(e.start,e.end)?(D(),A(hn,{key:0,start:e?.start,end:e?.end},null,8,[`start`,`end`])):(D(),k(r,{key:1},[m(L(e.text),1)],64))]),_:2},1024))],64))]),_:2},1032,[`active`,`has-passed`,`lyric`]))])):t(``,!0)],14,Sr)),[[R(on),{start:e.start,end:e.lineEnd??e.end}]])),128)):(D(),k(`div`,kr,` No lyrics found `))],64))]),_:1},8,[`style`]))}})})),Fr=e((()=>{})),Ir,Lr=e((()=>{Pr(),Pr(),Fr(),Y(),Ir=X(Nr,[[`__scopeId`,`data-v-e90cb464`]])})),Rr,zr,Br=e((()=>{F(),Z(),Lr(),Fn(),Et(),Rr={class:`content-container`},zr=d({__name:`SolariumLyricDisplay`,setup(e){x(e=>({ad1fc05e:R(s)}));let t=it(),r=Ge(),o=i(()=>t.artworkCSSColors),s=i(()=>`28px`),c=n(!1),l=e=>{c.value=e},u=()=>{r.components.ImmersiveSolarium.LyricsType=`full`};return(e,t)=>(D(),k(`div`,{class:O([`compact-lyrics`,{"is-inactive":!R(c)}])},[p(`div`,{class:`lg-wrapper`,style:S(R(o)),onClick:u},[a(Nn,{interactive:!1,blur:6,"always-render":``},{default:N(()=>[t[0]||=p(`div`,{class:`lg-tint`},null,-1),p(`div`,Rr,[a(Ir,{type:`single-line`,"is-immersive":``,"show-no-lyrics-found-text":!1,onHasActiveLine:l})])]),_:1})],4)],2))}})})),Vr=e((()=>{})),Hr,Ur=e((()=>{Br(),Br(),Vr(),Y(),Hr=X(zr,[[`__scopeId`,`data-v-3ec5737a`]])})),Wr,Gr,Kr,qr=e((()=>{Fe(),ve(),Ae(),F(),$(),W(),K(),Ot(),Et(),Z(),Wr={class:`flex flex-gap-1`},Gr=70,Kr=d({__name:`SolariumLyricsButton`,setup(e){let t=q(),r=it(),o=i(()=>r.artworkCSSColors),s=Ge(),c=i(()=>s.components.ImmersiveSolarium.LyricsType),u=n(),d=n(),f=i(()=>t.isRightDrawerView(`lyrics`)),m=i(()=>{if(o.value)return{...o.value,background:`color-mix(in srgb, var(--bgColor) 50%, transparent 50%)`,color:`var(--textColor1, white)`,transition:`background 0.3s ease, color 0.3s ease`,boxShadow:`inset 0 0 0 1px color-mix(in srgb, var(--textColor2) 20%, rgba(255, 255, 255, 0.1)), inset 0 2px 5px rgba(255, 255, 255, 0.22), inset 0 -2px 6px rgba(0, 0, 0, 0.35), inset 0 0 14px rgba(255, 255, 255, 0.08), 0 6px 6px rgba(0, 0, 0, 0.2), 0 0 20px rgba(0, 0, 0, 0.1)`,backdropFilter:`backdrop-filter: blur(10px)`,borderRadius:`50px`}}),h=null,g=null,_=null;function v(){_&&=(window.removeEventListener(`mousemove`,_),null),g=null}function y(){h&&(g=h.getBoundingClientRect(),d.value?.show(),!_&&(_=e=>{if(!g)return;let t=e.clientX-g.left,n=e.clientY-g.top;Math.sqrt(t*t+n*n)>Gr&&(d.value?.hide(),v())},window.addEventListener(`mousemove`,_,{passive:!0})))}b(()=>{h=u.value?.$el??u.value,h?.addEventListener(`pointerenter`,y,{passive:!0})}),l(()=>{h?.removeEventListener(`pointerenter`,y),h=null,v()});let x=e=>{let n=c.value;if(s.components.ImmersiveSolarium.LyricsType=e,!t.rightDrawerOpen){t.invokeRightDrawerView(`lyrics`);return}if(t.rightDrawerOpen&&n==c.value){t.closeRightDrawerView();return}},C=e=>c.value===e&&t.isRightDrawerView(`lyrics`),w=()=>{t.invokeRightDrawerView(`lyrics`)};return(e,t)=>(D(),A(Q,{class:`lyrics-button`,active:R(f),title:R(Qe)(`term.lyrics`),"native-title":``,onTouchstart:t[2]||=e=>R(d)?.show(),onClick:w,ref_key:`target`,ref:u},{menu:N(()=>[a(Se,{anchor:`top middle`,self:`bottom middle`,class:`solarium-menu`,ref_key:`menu`,ref:d,offset:[0,10],style:S(R(m))},{default:N(()=>[p(`div`,Wr,[j((D(),A(Q,{title:R(Qe)(`term.lyrics`),onClick:t[0]||=e=>x(`full`),class:O([{"bg-primary text-white":C(`full`)},`lyrics-popup-button`])},{default:N(()=>[a(G,{name:`full-lyrics`})]),_:1},8,[`title`,`class`])),[[Le]]),j((D(),A(Q,{title:`Compact Lyrics`,onClick:t[1]||=e=>x(`compact`),class:O([{"bg-primary text-white":C(`compact`)},`lyrics-popup-button`])},{default:N(()=>[a(G,{name:`hud-lyrics`})]),_:1},8,[`class`])),[[Le]])])]),_:1},8,[`style`])]),default:N(()=>[a(_e,{name:`svguse:cider-assets/cider-icons/icons.svg#lyrics`,class:`tab-icon`,size:`20px`})]),_:1},8,[`active`,`title`]))}})})),Jr=e((()=>{})),Yr,Xr=e((()=>{qr(),qr(),Jr(),Y(),Yr=X(Kr,[[`__scopeId`,`data-v-2657cc00`]])})),Zr,Qr,$r,ei=e((()=>{F(),Z(),$(),Fn(),W(),K(),Et(),In(),kn(),Ur(),Xr(),Zr={class:`solarium-container`},Qr={class:`content-container`},$r=d({__name:`SolariumPlayer`,setup(e,{expose:r}){let o=it(),c=Ge(),l=q(),u=i(()=>o.artworkCSSColors),d=s(`openBrowser`),f=n(),m=()=>{f.value&&f.value.animate([{transform:`translateY(0) scale(1)`},{transform:`translateY(-20px) scale(1.05) scaleY(1.2)`},{transform:`translateY(0) scale(1)`}],{duration:300,easing:`ease-out`})},h=()=>{f.value&&f.value.animate([{transform:`translateY(0) scale(1)`},{transform:`translateY(20px) scale(0.95) scaleY(0.8)`},{transform:`translateY(0) scale(1)`}],{duration:400,delay:160,easing:`cubic-bezier(0.175, 0.885, 0.32, 1.275)`})};return r({popupAnimation:m,popdownAnimation:h}),(e,n)=>(D(),k(`div`,Zr,[a(I,{name:`compact_lyric_fade`,onBeforeEnter:m,onBeforeLeave:h},{default:N(()=>[R(c).components.ImmersiveSolarium.LyricsType==`compact`&&R(l).isRightDrawerView(`lyrics`)?(D(),A(Hr,{key:0})):t(``,!0)]),_:1}),p(`div`,{class:`lg-wrapper`,style:S(R(u)),ref_key:`player_wrapper`,ref:f},[a(Nn,{interactive:!1,blur:6,"always-render":``},{default:N(()=>[n[0]||=p(`div`,{class:`lg-tint`},null,-1),p(`div`,Qr,[a(Ln,{"no-artwork":``,compact:``,"compact-volume":``,"flat-exempt":``},{end_before:N(()=>[a(jn),a(Yr),a(Q,{title:`Browser`,"native-title":``,onClick:R(d)},{default:N(()=>[a(G,{name:`browser`})]),_:1},8,[`onClick`])]),_:1})])]),_:1})],4)]))}})})),ti=e((()=>{})),ni,ri=e((()=>{ei(),ei(),ti(),Y(),ni=X($r,[[`__scopeId`,`data-v-a2138a4d`]])})),ii,ai=e((()=>{F(),Z(),We(),ii=d({__name:`MojavePlayer`,props:{noArtwork:{type:Boolean}},setup(e){let t=at(),n=Ge(),r=i(()=>{switch(n.components.MojaveLayouts.PlayerType){default:case`default`:return t.getComponent(`BottomPlayer`);case`glass`:case`glass-compact`:return t.getComponent(`BottomPlayerCompact`)}}),a=i(()=>n.components.MojaveLayouts.PlayerType==`glass-compact`);return h(()=>{console.log(`unmounting MojavePlayer`)}),(t,i)=>(D(),A(C(R(r)),{compact:R(a),"no-artwork":e.noArtwork,"player-type":R(n).components.MojaveLayouts.PlayerType},{end_before:N(()=>[P(t.$slots,`end_before`)]),end_after:N(()=>[P(t.$slots,`end_after`)]),_:3},8,[`compact`,`no-artwork`,`player-type`]))}})})),oi,si=e((()=>{ai(),ai(),oi=ii})),ci,li,ui,di,fi,pi,mi,hi=e((()=>{ve(),F(),Hn(),ft(),ct(),Pt(),qe(),Ot(),zt(),ci={class:`threed-artwork`},li={key:0,class:`queued-item-overlay`},ui={class:`threed-queue-item_info`},di={class:`title`},fi={class:`title-text`},pi={class:`artist`},mi=d({__name:`ThreeDQueueItem`,props:{item:{type:Object,required:!0},index:{type:Number,required:!0}},setup(e){let r=et(),o=n(!1),s=e,c=i(()=>{let e=s.item?.item?.id,t=r.nowPlayingItem?.id;return e&&t&&e===t}),{elementRef:l,showContextMenu:u}=tn({item:{...s.item.item,href:bt(s.item.item)},opts:{slots:{singleSelectTop:[ht(Qe(`action.removeFromQueue`),()=>r.removeFromQueue(s.index)),ht(Qe(`action.moveToTop`),()=>r.moveQueueItemAbsolute(s.index,r.queuePosition+1))]}}});async function d(){await r.jumpToQueuePosition(s.index)}return(n,r)=>(D(),k(`div`,{class:`threed-queue-item_container`,ref_key:`elementRef`,ref:l},[p(`div`,{class:O([`threed-queue-item`,{"active-item":c.value}]),onMouseenter:r[0]||=e=>o.value=!0,onMouseleave:r[1]||=e=>o.value=!1},[p(`div`,ci,[a(I,{name:`generic-fade`},{default:N(()=>[o.value&&!c.value?(D(),k(`div`,li,[p(`div`,{class:`play-btn`,role:`button`,onClick:d},[a(_e,{name:`ion-ios-play`})])])):t(``,!0)]),_:1}),a(Lt,{class:`no-shadow`,artwork:e.item.item?.attributes?.artwork,"desired-height":600,"desired-width":600},null,8,[`artwork`])])],34),p(`div`,ui,[p(`div`,di,[c.value?(D(),A(Un,{key:0,class:`playing-indicator`})):t(``,!0),p(`span`,fi,L(e.item.item?.attributes?.name),1)]),p(`div`,pi,L(e.item.item?.attributes?.artistName),1)])],512))}})})),gi=e((()=>{})),_i,vi=e((()=>{hi(),hi(),gi(),Y(),_i=X(mi,[[`__scopeId`,`data-v-ae80fd6c`]])})),yi,bi,xi,Si,Ci=e((()=>{F(),ie(),be(),Z(),qe(),vi(),yi=[`initial-slide`,`breakpoints`,`effect`],bi=50,xi=100,Si={__name:`ThreeDQueue`,setup(e){let s=n(!1),c;function u(){c&&clearTimeout(c),s.value=!0,c=setTimeout(()=>{s.value=!1,F&&O.value<C.value.length&&F.slideTo(O.value,500,!1)},1e3*5)}b(()=>{window.addEventListener(`mousemove`,u,{passive:!0}),window.addEventListener(`touchmove`,u,{passive:!0})}),l(()=>{window.removeEventListener(`mousemove`,u),window.removeEventListener(`touchmove`,u),c&&clearTimeout(c)});let d=ye(),{queue:f,queuePosition:p,isStationMode:m,autoplayEnabled:h,nowPlayingItem:g,queueId:_}=te(et()),v=n(null);i(()=>h.value);let y,x=[],S=n(!0),C=n([]),w=n(bi),T=i(()=>{try{return(Array.isArray(f.value)?f.value:[]).map((e,t)=>{let n=e?.track;return!n||!n.id?null:{id:n.id,index:t,track:n,source:e?.source||`user`}}).filter(e=>e!==null)}catch(e){return console.warn(`[ThreeDQueue] Failed to get queue items`,e),[]}}),O=i(()=>{let e=Number(p.value??0);return Number.isFinite(e)?Math.floor(e):0}),A=i(()=>T.value);function j(){let e=A.value;if(e.length===0){C.value=[],w.value=0;return}e.length<w.value&&(w.value=e.length),C.value=e.slice(0,w.value),v.value=g.value}let N=i(()=>J(`components.ThreeDQueue.Style`)===`3d`?`coverflow`:``);function P(e){S.value=e}let F,I=n();function ee(e){let[t]=e.detail;F=t,console.log(F),F&&O.value<C.value.length&&setTimeout(()=>{F.slideTo(O.value,0,!1)},100)}E(()=>O.value,async(e,t)=>{e!==t&&(e>=C.value.length-10&&await ce(e),F&&e<C.value.length&&F.slideTo(e,500,!1))});function L(e){F?.slideTo(e,500,!1)}let R=i(()=>d.screen.width/d.screen.height),ne=i(()=>R.value>2.2),re=i(()=>d.screen.height<600),ie=i(()=>{let e=re.value?2:1;return ne.value?(console.log(`ultrawide`,R.value,e),{640:{slidesPerView:3*e,spaceBetween:0},1940:{slidesPerView:4*e,spaceBetween:0},3200:{slidesPerView:6*e,spaceBetween:0}}):(console.log(`normal screen`,R.value),{640:{slidesPerView:3*e,spaceBetween:0}})}),ae=n(0);async function oe(e){ae.value=e.activeIndex,u(),C.value.length<A.value.length&&e.activeIndex>=C.value.length-10&&await ce(e.activeIndex)}let z=!1,B=null;function V(e){let t=e.deltaY||e.wheelDelta||-e.detail,n=Math.abs(t);if(t%1,P(!1),x.push(n),x.length>5&&n>=100){x.shift();let e=x.every(e=>e===x[0]);y&&clearTimeout(y),y=setTimeout(()=>{},1e3),e&&((t>0?1:-1)>0?F?.slidePrev():F?.slideNext())}else{if(z)return;Math.abs(t)>3&&((t>0?1:-1)>0?F?.slidePrev():F?.slideNext(),z=!0,B&&clearTimeout(B),B=setTimeout(()=>{z=!1},xi))}y&&clearTimeout(y),y=setTimeout(()=>{},5e3)}b(()=>{j()}),l(()=>{c&&clearTimeout(c),y&&clearTimeout(y),B&&clearTimeout(B)});let se=i(()=>`bp-${ne.value}-${re.value}`);async function ce(e){let t=A.value;if(t.length>w.value&&e>=w.value-10){let e=t.slice(w.value,w.value+bi);e.length>0&&(C.value.push(...e),w.value+=e.length,await o(),F?.update(),F?.slideTo(F.activeIndex,0,!1))}}return E(()=>f.value,()=>{j(),o(()=>{F&&O.value<C.value.length&&F.slideTo(O.value,300,!1)})},{deep:!0}),E(()=>_.value,()=>{j(),o(()=>{F?.update()})}),E(C,()=>{o(()=>{F?.update()})},{deep:!0}),E(()=>g.value,e=>{v.value=e}),(e,n)=>(D(),k(`div`,null,[C.value.length>0?(D(),k(`swiper-container`,{"initial-slide":O.value,onSwiperinit:ee,keyboard:`true`,breakpoints:ie.value,style:{padding:`0px`},effect:N.value,"coverflow-effect-slide-shadows":`false`,"centered-slides":`true`,"coverflow-effect-scale":`0.9`,"coverflow-effect-rotate":`30`,onSlidechange:oe,onWheelPassive:V,ref_key:`swiperRef`,ref:I,key:se.value},[(D(!0),k(r,null,M(C.value,(e,t)=>(D(),k(`swiper-slide`,{key:`slide-${e.id}-${t}`,style:{width:`auto`}},[a(_i,{item:{item:e.track},index:e.index,onClick:t=>L(e.index)},null,8,[`item`,`index`,`onClick`])]))),128))],40,yi)):t(``,!0)]))}}})),wi,Ti,Ei=e((()=>{Ne(),Ee(),we(),F(),Ue(),zt(),wi={class:`history-artwork`},Ti=d({__name:`PageHistoryContentItem`,props:{item:{}},setup(e){let n=e,r=i(()=>/\/(artist|profile)\//.test(n.item.path??``));function o(){n.item.path&&Xe().push(n.item.path)}return(n,i)=>(D(),A(Ce,{class:`history-item`,clickable:``,onClick:o},{default:N(()=>[e.item.artwork?(D(),A(Ie,{key:0,side:``,class:`history-item-media`},{default:N(()=>[p(`div`,wi,[a(Lt,{classes:r.value?`round`:`rounded`,artwork:e.item.artwork,"desired-height":80,"desired-width":80},null,8,[`classes`,`artwork`])])]),_:1})):t(``,!0),a(Ie,{class:`history-item-body`},{default:N(()=>[a(Oe,{class:`history-item-title`,lines:`1`},{default:N(()=>[m(L(e.item.title),1)]),_:1}),e.item.type?(D(),A(Oe,{key:0,caption:``,lines:`1`,class:`history-item-type`},{default:N(()=>[m(L(e.item.type),1)]),_:1})):t(``,!0)]),_:1})]),_:1}))}})})),Di=e((()=>{})),Oi,ki=e((()=>{Ei(),Ei(),Di(),Y(),Oi=X(Ti,[[`__scopeId`,`data-v-c2a75f14`]])})),Ai,ji,Mi,Ni,Pi,Fi,Ii=e((()=>{me(),ze(),F(),K(),Et(),ki(),Ai={class:`row history-panel-header`},ji={class:`col flex items-center`},Mi={class:`shelf-title`},Ni={class:`col-auto flex flex-center`},Pi={class:`history-panel-content`},Fi=d({__name:`PageHistoryContent`,props:{width:{},maxHeight:{}},setup(e){let t=q(),n=it(),o=i(()=>t.appMetaList.slice().reverse()),s=e,c=i(()=>({"min-width":s.width??`0`,"max-height":s.maxHeight??`100%`,"--nowPlaying-bgColor":n.artworkCSSColors?.[`--bgColor`]}));return(e,n)=>(D(),k(`div`,{class:`history-panel`,style:S(c.value)},[p(`div`,Ai,[p(`div`,ji,[p(`div`,Mi,L(e.$lz(`Recently Viewed`,`term.recentlyViewed`)),1)]),p(`div`,Ni,[a(H,{label:e.$i(`term.clearAll`),flat:``,dense:``,"no-caps":``,onClick:R(t).clearAppMeta},null,8,[`label`,`onClick`])])]),p(`div`,Pi,[a(Me,null,{default:N(()=>[(D(!0),k(r,null,M(o.value,(e,t)=>(D(),A(Oi,{key:t,item:e},null,8,[`item`]))),128))]),_:1})])],4))}})})),Li=e((()=>{})),Ri,zi=e((()=>{Ii(),Ii(),Li(),Y(),Ri=X(Fi,[[`__scopeId`,`data-v-6c513c3b`]])})),Bi,Vi,Hi=e((()=>{Te(),z(),F(),ot(),W(),zi(),Bi={class:`nav-flipper`},Vi=d({__name:`NavFlipper`,setup(e){let t=st(),n=i(()=>t.currentRouterReference?.canGoBack??!0),r=i(()=>t.currentRouterReference?.canGoForward??!0);return(e,i)=>(D(),k(`div`,Bi,[j((D(),k(`button`,{class:O({"nav-inert":!n.value}),onClick:i[0]||=e=>R(t).goBack()},[a(G,{name:`chevron-left`}),a(De,{"context-menu":``,class:`page-history-menu`},{default:N(()=>[a(Ri,{"max-height":`80vh`,width:`284px`})]),_:1})],2)),[[Ve]]),i[2]||=p(`div`,{class:`flipper-divider`},null,-1),j((D(),k(`button`,{class:O({"nav-inert":!r.value}),onClick:i[1]||=e=>R(t).goForward()},[a(G,{name:`chevron-right`})],2)),[[Ve]])]))}})})),Ui=e((()=>{})),Wi,Gi=e((()=>{Hi(),Hi(),Ui(),Y(),Wi=X(Vi,[[`__scopeId`,`data-v-6f9160cc`]])})),Ki,qi=e((()=>{F(),ot(),$(),W(),Ki=d({__name:`NewTabButton`,setup(e){let t=st();return(e,n)=>(D(),A(Q,{onClick:n[0]||=e=>R(t).openTab(),title:`New Tab`,"native-title":``},{default:N(()=>[a(G,{name:`plus`})]),_:1}))}})})),Ji,Yi=e((()=>{qi(),qi(),Ji=Ki})),Xi,Zi,Qi,$i,ea,ta=e((()=>{Xt(),F(),ft(),pt(),ot(),W(),Xi=[`title`],Zi=[`textContent`],Qi={key:1,class:`tab-text loading`},$i={class:`tab-action`},ea=d({__name:`PodTab`,props:{tab:{},isDragging:{type:Boolean},isDragOver:{type:Boolean}},emits:[`dragstart`,`dragover`,`drop`,`dragend`],setup(e,{emit:t}){let{elementRef:r}=_t(Tt(({actionItem:e,menuSeperator:t,cascadeItem:n})=>()=>[e(`Close Tab`,()=>{l.closeTab(s.tab.id)}),t(),n(`Developer`,[e(`Copy Path`,()=>{navigator.clipboard.writeText(s.tab.path)})],{icon:`command`})])),s=e,c=t,l=st(),u=e=>{e.dataTransfer&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,s.tab.id)),c(`dragstart`,s.tab.id)},d=e=>{e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`move`),c(`dragover`,s.tab.id)},f=e=>{e.preventDefault(),c(`drop`,s.tab.id)},m=()=>{c(`dragend`)},h=i(()=>s.tab.title?s.tab.title:s.tab.path);n(null);let _=n(null),v=n(null),y=()=>{if(!_.value)return;let e=document.createElement(`div`);e.style.cssText=`position: absolute; visibility: hidden; white-space: nowrap; font-size: 14px; padding: 0 1em;`,e.textContent=h.value,document.body.appendChild(e);let t=e.offsetWidth+32+8;document.body.removeChild(e),v.value=Math.max(120,Math.min(240,t))};E(h,()=>{o(()=>{y()})},{immediate:!0}),b(()=>{y()});let x=i(()=>v.value===null?{}:{width:`${v.value}px`});return(t,n)=>{let i=$t;return D(),k(`div`,{class:O([`pod-tab`,{active:R(l).currentTab===e.tab.id,dragging:e.isDragging,"drag-over":e.isDragOver}]),style:S(R(x)),draggable:`true`,onClick:n[1]||=t=>R(l).currentTab=e.tab.id,onMouseupCapture:n[2]||=g(t=>R(l).closeTab(e.tab.id),[`middle`,`stop`,`prevent`]),onDragstart:u,onDragover:d,onDrop:f,onDragend:m,ref_key:`elementRef`,ref:r,title:R(h)},[R(h)===`...`?(D(),k(`div`,Qi,[a(i,{size:`1em`})])):(D(),k(`div`,{key:0,ref_key:`tabTextRef`,ref:_,class:`tab-text`,textContent:L(R(h))},null,8,Zi)),p(`div`,$i,[p(`button`,{onClick:n[0]||=g(t=>R(l).closeTab(e.tab.id),[`stop`,`prevent`]),class:`close-btn`},[a(G,{size:`.85rem`,name:`close`})])])],46,Xi)}}})})),na=e((()=>{})),ra,ia=e((()=>{ta(),ta(),na(),Y(),ra=X(ea,[[`__scopeId`,`data-v-d8c14878`]])})),aa,oa,sa,ca,la,ua=e((()=>{me(),F(),ot(),ia(),W(),re(),aa={key:0,class:`pod-tabs-container`},oa={class:`tabs-inner`},sa={class:`pod-tab-content`},ca={key:0,class:`overflow-add-button`},la=d({__name:`PodTabs`,setup(e){let i=n(!1),s=n(!1),c=st(),l=n(null),u=n(null),d=n(null),f=ee(`addTabBtn`),m=ne(f,{threshold:.1}),g=n(!1),_=e=>{l.value&&(e.preventDefault(),l.value.scrollLeft+=e.deltaY*2.5)},v=()=>{if(!l.value)return;let e=l.value.querySelector(`.pod-tab.active`);e&&e.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})};E(()=>c.currentTab,()=>{o(()=>{v()})});function y(){let e=l.value;if(!e){i.value=!1,s.value=!1;return}let t=e.scrollLeft,n=e.scrollWidth-e.clientWidth;i.value=t>2,s.value=n-t>2}function x(){y()}b(()=>{window.addEventListener(`keydown`,P),o(()=>{y(),l.value&&(l.value.addEventListener(`scroll`,x),window.addEventListener(`resize`,y))})}),h(()=>{window.removeEventListener(`keydown`,P),l.value&&(l.value.removeEventListener(`scroll`,x),window.removeEventListener(`resize`,y))});let S=e=>{u.value=e},C=e=>{d.value=e},T=e=>{u.value&&u.value!==e&&c.reorderTabs(u.value,e),u.value=null,d.value=null};function P(e){e.ctrlKey&&e.shiftKey&&e.key===`Tab`?(e.preventDefault(),c.activatePreviousTab()):e.ctrlKey&&e.key===`Tab`&&(e.preventDefault(),c.activateNextTab()),(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`t`&&(e.preventDefault(),c.openTab()),(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`w`&&(e.preventDefault(),c.closeTab(c.currentTab))}return(e,n)=>R(c).activeTabs.length>1?(D(),k(`div`,aa,[p(`div`,{ref_key:`tabsContainer`,ref:l,class:O([`pod-tabs`,{"solo-tab":R(c).activeTabs.length===1}]),onWheel:_},[p(`div`,oa,[p(`div`,sa,[(D(!0),k(r,null,M(R(c).activeTabs,e=>(D(),A(ra,{key:e.id,tab:e,"is-dragging":u.value===e.id,"is-drag-over":d.value===e.id,onDragstart:S,onDragover:C,onDrop:T,onDragend:n[0]||=()=>{u.value=null,d.value=null}},null,8,[`tab`,`is-dragging`,`is-drag-over`]))),128)),g.value?(D(),A(H,{key:`add-tab-btn`,round:``,size:`sm`,class:`add-tab-btn`,onClick:n[1]||=e=>R(c).openTab(),ref_key:`addTabBtn`,ref:f},{default:N(()=>[a(G,{name:`plus`})]),_:1},512)):t(``,!0)])])],34),g.value?j((D(),k(`div`,ca,[a(H,{key:`add-tab-btn`,round:``,size:`sm`,class:`add-tab-btn`,onClick:n[2]||=e=>R(c).openTab()},{default:N(()=>[a(G,{name:`plus`})]),_:1})],512)),[[w,!R(m)]]):t(``,!0)])):t(``,!0)}})})),da=e((()=>{})),fa,pa=e((()=>{ua(),ua(),da(),Y(),fa=X(la,[[`__scopeId`,`data-v-b2912c4b`]])})),ma,ha=e((()=>{F(),K(),$(),W(),ma=d({__name:`SidebarToggleButton`,setup(e){let t=q(),n=i({get(){return t.isCompact?t.leftDrawerOverlayOpened:t.leftDrawerOpen},set(e){t.isCompact?t.leftDrawerOverlayOpened=e:t.leftDrawerOpen=e}});function r(){t.wishCompactSidebar=!t.wishCompactSidebar}return(e,t)=>(D(),A(Q,{onClick:t[0]||=e=>n.value=!R(n),onDragenter:t[1]||=e=>n.value=!0,onContextmenu:g(r,[`prevent`,`stop`])},{default:N(()=>[R(n)?(D(),A(G,{key:0,name:`sidebar-opened`})):(D(),A(G,{key:1,name:`sidebar-closed`}))]),_:1}))}})})),ga=e((()=>{})),_a,va=e((()=>{ha(),ha(),ga(),Y(),_a=X(ma,[[`__scopeId`,`data-v-73bf271d`]])})),ya=e((()=>{})),ba,xa,Sa,Ca=e((()=>{F(),$(),jt(),c(),ya(),Y(),ba={class:`nav-glyph`},xa={__name:`AudioLabsButton`,setup(e){return(e,t)=>(D(),A(Q,{title:e.$i(`term.audioSettings`),"native-title":``,onClick:R(Jt)},{default:N(()=>[p(`div`,ba,[a(R(u),{type:`headphones`})])]),_:1},8,[`title`,`onClick`]))}},Sa=X(xa,[[`__scopeId`,`data-v-ea017faf`]])})),wa,Ta,Ea,Da,Oa=e((()=>{F(),Ue(),Gt(),Z(),vt(),lt(),wa=[`title`],Ta={class:`profile-artwork`},Ea=[`src`],Da=d({__name:`HomeButton`,setup(e){let t=gt();Ge();let n=i(()=>t.profile?.attributes?.artwork?nt(t.profile?.attributes?.artwork.url,64,64):en);return(e,t)=>(D(),k(`div`,{class:`profile-button`,title:e.$i(`home.title`),onClick:t[0]||=e=>R(Xe)().push(`/am/home`)},[p(`div`,Ta,[p(`img`,{src:R(n)},null,8,Ea)])],8,wa))}})})),ka=e((()=>{})),Aa,ja=e((()=>{Oa(),Oa(),ka(),Y(),Aa=X(Da,[[`__scopeId`,`data-v-5b9d785c`]])})),Ma,Na,Pa,Fa=e((()=>{F(),W(),$(),jt(),Ot(),xn(),Ma={class:`party-button-glyph`},Na={key:1,class:`party-button-badge`},Pa=d({__name:`PartyButton`,setup(e){let n=bn();return(e,r)=>(D(),A(Q,{class:`party-button`,active:R(n).inParty,title:R(rt)(`Listening Party`,`party.dialog.title`),"native-title":``,onClick:r[0]||=e=>R(Mt)()},{default:N(()=>[p(`div`,Ma,[a(G,{name:`headphones`,size:`20px`}),R(n).inParty?(D(),k(`span`,{key:0,class:O([`party-button-dot`,R(n).connection])},null,2)):t(``,!0),R(n).isHost&&R(n).pendingCount>0?(D(),k(`span`,Na,L(R(n).pendingCount),1)):t(``,!0)])]),_:1},8,[`active`,`title`]))}})})),Ia=e((()=>{})),La,Ra=e((()=>{Fa(),Fa(),Ia(),Y(),La=X(Pa,[[`__scopeId`,`data-v-f2406f96`]])})),za,Ba=e((()=>{F(),W(),$(),jt(),K(),za=d({__name:`SearchButton`,setup(e){let t=q();function n(){if(t.commandCenterOpen){t.commandCenterOpen=!1;return}Rt()}return(e,r)=>(D(),A(Q,{"native-title":``,title:e.$i(`term.search`),active:R(t).commandCenterOpen,onClick:n},{default:N(()=>[a(G,{name:`search`})]),_:1},8,[`title`,`active`]))}})})),Va=e((()=>{})),Ha,Ua=e((()=>{Ba(),Ba(),Va(),Y(),Ha=X(za,[[`__scopeId`,`data-v-5d080093`]])})),Wa,Ga,Ka,qa=e((()=>{F(),ot(),Ke(),Vt(),Wa={class:`label`},Ga={class:`track`},Ka=d({__name:`LibrarySyncIndicator`,setup(e){let n=$e(),r=st(),a=i(()=>n.showable&&n.libraryViewActive&&r.activeTabs.length<=1),o=i(()=>Qe(n.kind===`albums`?`term.album`:`term.song`,{count:n.total}).toLowerCase()),s=i(()=>n.indeterminate?n.total<=0?rt(`Synchronizing your library…`,`library.sync.indeterminateUnknown`):rt(`Synchronizing {count} {items}…`,`library.sync.indeterminate`,{count:n.total,items:o.value}):rt(`Synchronizing {count} {items}, {remaining} remaining`,`library.sync.progress`,{count:n.total,items:o.value,remaining:n.remaining}));return(e,r)=>(D(),A(I,{name:`sync-capsule`},{default:N(()=>[a.value?(D(),k(`div`,{key:0,class:O([`library-sync-capsule`,{indeterminate:R(n).indeterminate}])},[p(`span`,Wa,L(s.value),1),p(`div`,Ga,[p(`div`,{class:`bar`,style:S(R(n).indeterminate?void 0:{width:`${R(n).percent}%`})},null,4)])],2)):t(``,!0)]),_:1}))}})})),Ja=e((()=>{})),Ya,Xa=e((()=>{qa(),qa(),Ja(),Y(),Ya=X(Ka,[[`__scopeId`,`data-v-5a995a0f`]])})),Za,Qa,$a,eo,to,no,ro,io,ao=e((()=>{ve(),Ne(),Ee(),we(),ze(),Te(),F(),mn(),Je(),Xt(),W(),Za={key:0,class:`notification-pill__resting`},Qa=[`onClick`],$a={class:`notification-pill__text`},eo={class:`notification-pill__title`},to={key:0,class:`notification-pill__subtitle`},no={key:3,class:`notification-pill__badge`},ro=`nicon:`,io=d({__name:`NotificationMorphic`,setup(e){let s=Ze(),{contentRef:c,measuredWidth:l,measuredHeight:u,measure:d}=un(),f={info:`ion-information-circle`,success:`ion-checkmark-circle`,warning:`ion-warning`,error:`ion-close-circle`},h=i(()=>s.activeNotification),_=i(()=>h.value!==null),v=i(()=>!h.value&&s.hasPersistent),y=i(()=>_.value||v.value),b=i(()=>!h.value||h.value.working?null:h.value.icon??f[h.value.type]??f.info),x=i(()=>b.value?.startsWith(ro)??!1),C=i(()=>b.value?x.value?b.value.slice(6):b.value:``),w=i(()=>y.value?_.value?{width:l.value===null?`auto`:`${l.value}px`}:{width:`38px`}:{}),T=n(0);return E(()=>h.value?.id,()=>{T.value=s.queueCount}),E(()=>s.queueCount,e=>{e>T.value&&(T.value=e)}),E([_,()=>h.value?.title,()=>h.value?.subtitle,()=>h.value?.working],()=>{_.value&&o(d)}),(e,n)=>(D(),A(I,{name:`morphic-pill`},{default:N(()=>[y.value?(D(),k(`div`,{key:0,class:O([`notification-pill window-nodrag`,{"notification-pill--resting":v.value}]),style:S(w.value)},[v.value?(D(),k(`div`,Za,[R(s).hasWorking?(D(),A($t,{key:0,size:`1.3em`})):(D(),A(_e,{key:1,name:`ion-notifications`,size:`1.4em`})),a(De,{anchor:`bottom middle`,self:`top middle`},{default:N(()=>[a(Me,{class:`notify-popup-list`,separator:``},{default:N(()=>[(D(!0),k(r,null,M(R(s).persistentList,e=>(D(),A(Ce,{key:e.id,clickable:``},{default:N(()=>[e.working?(D(),A(Ie,{key:0,side:``},{default:N(()=>[a($t)]),_:1})):(D(),A(Ie,{key:1,side:``},{default:N(()=>[p(`div`,{class:`dismiss-btn`,onClick:g(t=>R(s).dismiss(e.id),[`stop`])},[a(_e,{name:`close`})],8,Qa)]),_:2},1024)),a(Ie,null,{default:N(()=>[a(Oe,null,{default:N(()=>[m(L(e.title),1)]),_:2},1024),e.subtitle?(D(),A(Oe,{key:0,caption:``},{default:N(()=>[m(L(e.subtitle),1)]),_:2},1024)):t(``,!0)]),_:2},1024),e.progress==null?t(``,!0):(D(),A(Ie,{key:2,side:``},{default:N(()=>[m(L(e.progress)+`% `,1)]),_:2},1024))]),_:2},1024))),128))]),_:1})]),_:1})])):(D(),k(`div`,{key:1,ref_key:`contentRef`,ref:c,class:`notification-pill__content`},[a(I,{name:`notif-swap`,mode:`out-in`},{default:N(()=>[(D(),k(`div`,{class:`notification-pill__inner`,key:h.value?.id??``},[h.value?.working?(D(),A($t,{key:0,size:`1.3em`,class:`notification-pill__icon`})):b.value&&x.value?(D(),A(G,{key:1,name:C.value,size:`1.3em`,class:`notification-pill__icon`},null,8,[`name`])):b.value?(D(),A(_e,{key:2,name:C.value,size:`1.3em`,class:`notification-pill__icon`},null,8,[`name`])):t(``,!0),p(`div`,$a,[p(`span`,eo,L(h.value?.title),1),h.value?.subtitle?(D(),k(`span`,to,L(h.value?.subtitle),1)):t(``,!0)]),T.value>0?(D(),k(`span`,no,` +`+L(T.value),1)):t(``,!0)]))]),_:1})],512))],6)):t(``,!0)]),_:1}))}})})),oo=e((()=>{})),so,co=e((()=>{ao(),ao(),oo(),Y(),so=X(io,[[`__scopeId`,`data-v-bf558b69`]])})),lo,uo=e((()=>{me(),F(),jt(),K(),lo=d({__name:`UpdateAppButton`,setup(e){let n=q();function r(){Ft(`updates`)}return(e,i)=>R(n).updateAvailable?(D(),A(H,{key:0,color:`primary`,icon:`ion-ios-download`,label:e.$i(`action.update`),onClick:r},null,8,[`label`])):t(``,!0)}})})),fo,po=e((()=>{uo(),uo(),fo=lo})),mo,ho,go,_o=e((()=>{Kt(),Re(),he(),ve(),Te(),xe(),F(),re(),be(),Ct(),Z(),kt(),zn(),Ca(),xt(),Et(),K(),pa(),ja(),On(),Ra(),En(),kn(),Ua(),$(),Xa(),Rn(),Gi(),Yi(),co(),Mn(),va(),po(),mo={class:`tabs-container`},ho={class:`overflow-items-grid`},go=d({__name:`chrome-top`,props:{secondaryBar:{type:Boolean,default:!1},searchBar:{type:Boolean,default:!0},noControls:{type:Boolean,default:!1},excludeControls:{default:()=>[]}},setup(e){let n=q(),o=ye(),s=it(),c=Ge(),l=e;wt();let u=i(()=>n.getWindowControlsSide()),d=ae(),f=i(()=>J(`audio.ciderAudio.enabled`)&&J(`audio.ciderAudio.showInToolbar`)),m=i(()=>J(`connectivity.parties.enabled`)!==!1),h=i(()=>n.leftDrawerOpen?!J(`components.SidebarProfile.HasMainMenu`)||!J(`components.SidebarProfile.Enabled`):!0),_=i(()=>J(`ui.mainMenuPosition`)===`left`),v=i(()=>l.searchBar===!1?!1:!n.sidebarSearchVisible),y=i(()=>!!(n.isIfLayout&&u.value==`left`&&!n.leftDrawerOpen||!n.isIfLayout&&u.value==`left`)),b=i(()=>yt.CustomButtons.getCustomButtonsByPosition(`chrome-top/right`)),x=i(()=>J(`casting.enabled`)&&J(`audio.ciderAudio.enabled`)&&!l.excludeControls.includes(`airplay`)),S=i(()=>x.value||b.value.length>0||n.updateAvailable);return(i,l)=>{let C=Yt;return D(),k(r,null,[a(R(d).define,null,{default:N(()=>[x.value?(D(),A(Vn,{key:0})):t(``,!0),(D(!0),k(r,null,M(b.value,(e,t)=>(D(),A(Pn,{key:t,button:e},null,8,[`button`]))),128)),a(fo)]),_:1}),a(ke,{class:O([`text-default flex chrome-top window-drag`,{"full-w":e.secondaryBar,"window-nodrag":e.secondaryBar,"color-enabled":R(J)(`visual.useAdaptiveColors`),"left-controls":y.value,"no-controls":R(n).hasTitleBar||R(n).isIfLayout&&u.value==`left`||e.noControls}]),onDblclick:l[0]||=g(e=>R(At).maximizeWindow(),[`self`])},{default:N(()=>[_.value&&!e.excludeControls.includes(`mainMenu`)&&h.value?(D(),A(Bn,{key:0})):t(``,!0),a(Wi),a(_a),R(J)(`appleMusic.home.buttonLocation`)==`top`&&R(J)(`ui.chromeTopWidget`)!=`am-tabs`?(D(),A(Aa,{key:1})):t(``,!0),f.value?(D(),A(Sa,{key:2})):t(``,!0),R(n).pageLoading?(D(),A(Q,{key:3},{default:N(()=>[a(Pe,{size:`16px`})]),_:1})):t(``,!0),a(Be),p(`div`,mo,[a(fa),a(Ya)]),v.value?(D(),A(Ha,{key:4})):t(``,!0),a(so),R(o).screen.width<850&&S.value?(D(),A(Q,{key:5,"native-title":``,title:`Hidden Icons`},{menu:N(()=>[a(De,null,{default:N(()=>[p(`div`,ho,[a(R(d).reuse)])]),_:1})]),default:N(()=>[a(_e,{name:`fa-solid fa-chevron-down`})]),_:1})):(D(),A(R(d).reuse,{key:6})),a(C,null,{default:N(()=>[a(Ji),e.excludeControls.includes(`lyrics`)?t(``,!0):(D(),A(An,{key:0})),e.excludeControls.includes(`queue`)?t(``,!0):(D(),A(jn,{key:1})),m.value&&!e.excludeControls.includes(`party`)?(D(),A(La,{key:2})):t(``,!0),e.secondaryBar&&(R(s).player.playerType==`podcast`||R(c).audio.allowPlaybackRateChangeEverywhere)?(D(),A(Dn,{key:3})):t(``,!0),!_.value&&!e.excludeControls.includes(`mainMenu`)&&h.value?(D(),A(Bn,{key:4})):t(``,!0)]),_:1})]),_:1},8,[`class`])],64)}}})})),vo=e((()=>{})),yo,bo=e((()=>{_o(),_o(),vo(),Y(),yo=X(go,[[`__scopeId`,`data-v-4b5ac2ff`]])})),xo,So=e((()=>{F(),Z(),K(),Et(),Wn(),Ut(),xo=d({__name:`ChromeArtworkBlurMap`,setup(e){let r=it(),a=n(new Image),o=new Image;o.crossOrigin=`anonymous`;let s=Dt(),c=q(),l=i(()=>c.windowIsHidden?`hidden`:c.windowFocusState===`blurred`&&s.visual.sweetener.immersive_lower_fps_on_blur?`blurred`:`active`),u=i(()=>s.visual.sweetener.immersiveBGStyle),d=n(``);function f(){console.log(`image tag loaded`),a.value=o}let p=i(()=>u.value==`lite`?`saturate(${s.visual.sweetener.immersive_bg_filter.saturate}%) contrast(${s.visual.sweetener.immersive_bg_filter.contrast}%)`:`saturate(${s.visual.sweetener.immersive_bg_filter.saturate}%) contrast(${s.visual.sweetener.immersive_bg_filter.contrast}%) brightness(${s.visual.sweetener.immersive_bg_filter.brightness}%)`),m=i(()=>({brightness:s.visual.sweetener.immersive_bg_filter.brightness,blur:s.visual.sweetener.immersive_bg_filter.blur,saturate:100,contrast:100})),h=i(()=>s.visual.sweetener.immersive_bg_fps);return E(()=>r.player.currentArtworkUrlHiRes||r.player.currentArtworkUrl||``,e=>{if(!e){d.value=``,a.value=void 0;return}d.value=e,a.value=void 0,o.onload=f,o.src=e},{immediate:!0}),(e,n)=>R(c).windowIsHidden?t(``,!0):(D(),k(`div`,{key:0,class:`blurmap-container`,style:S({"--filter":p.value})},[u.value=="default"?(D(),A(Wt,{key:0,image:a.value,"max-framerate":h.value,"visibility-tier":l.value},null,8,[`image`,`max-framerate`,`visibility-tier`])):t(``,!0),u.value==`lite`?(D(),A(I,{key:1,name:`bgfade`},{default:N(()=>[(D(),A(Gn,{key:d.value,"artwork-url":d.value,"filter-settings":m.value,"no-mask":``},null,8,[`artwork-url`,`filter-settings`]))]),_:1})):t(``,!0)],4))}})})),Co=e((()=>{})),wo,To=e((()=>{So(),So(),Co(),Y(),wo=X(xo,[[`__scopeId`,`data-v-3995cd20`]])})),Eo=e((()=>{}));function Do(e,t){return D(),k(`div`,ko)}var Oo,ko,Ao,jo=e((()=>{F(),Eo(),Y(),Oo={},ko={class:`page-viewport-glaze`},Ao=X(Oo,[[`render`,Do],[`__scopeId`,`data-v-5988f6aa`]])})),Mo=e((()=>{})),No,Po,Fo=e((()=>{F(),K(),Z(),Mo(),Y(),No={__name:`AdaptiveColorBackground`,setup(e){let t=q(),n=i(()=>J(`visual.adaptiveColorPercent`)*.01);return(e,r)=>(D(),A(I,{name:`fade`},{default:N(()=>[(D(),k(`div`,{id:`adaptive-bg-container`,key:R(t).surfaceColor},[p(`div`,{id:`adaptive-bg`,style:S({backgroundColor:R(t).surfaceColor,opacity:n.value})},null,4)]))]),_:1}))}},Po=X(No,[[`__scopeId`,`data-v-6dc505d1`]])})),Io,Lo,Ro=e((()=>{F(),ot(),Cn(),Io=[`currnet-route`],Lo=d({__name:`AppScrollBounds`,setup(e){let t=n(),r=st(),{markScrolling:a}=Sn(),s=i(()=>r.activeTabs.find(e=>e.id===r.currentTab)),c=0,l=()=>{if(!t.value||!s.value)return;let e=r.currentPath;e&&(s.value.scrollPositions||(s.value.scrollPositions={}),s.value.scrollPositions[e]=c)},u=()=>{if(!t.value||!s.value)return;let e=r.currentPath;s.value.scrollPositions||(s.value.scrollPositions={});let n=s.value.scrollPositions[e];n===void 0?(t.value.scrollTop=0,c=0):(t.value.scrollTop=n,c=n)},d=e=>{let t=e.currentTarget;t&&(c=t.scrollTop),a()},f=()=>{l()};return E(()=>r.currentPath,(e,n)=>{!t.value||!e||e===n||(n&&s.value&&(s.value.scrollPositions||(s.value.scrollPositions={}),s.value.scrollPositions[n]=c),t.value.scrollTop=0,c=0)}),E(()=>r.currentTab,(e,n)=>{if(!t.value||e===n)return;let i=r.activeTabs.find(e=>e.id===n);if(i){let e=i.path;e&&(i.scrollPositions||={},i.scrollPositions[e]=c)}o(()=>{u()})}),b(()=>{r.activeTabs.forEach(e=>{e.scrollPositions||={}}),t.value&&(t.value.addEventListener(`scroll`,d,{passive:!0}),t.value.addEventListener(`scrollend`,f,{passive:!0}))}),h(()=>{t.value&&(t.value.removeEventListener(`scroll`,d),t.value.removeEventListener(`scrollend`,f)),l()}),(e,n)=>(D(),k(`div`,{id:`app-scroll-bounds`,"currnet-route":R(r).currentPath,ref_key:`AppScrollBounds`,ref:t},[P(e.$slots,`default`,{},void 0,!0)],8,Io))}})})),zo=e((()=>{})),Bo,Vo=e((()=>{Ro(),Ro(),zo(),Y(),Bo=X(Lo,[[`__scopeId`,`data-v-6048f72f`]])})),Ho,Uo=e((()=>{me(),fe(),pe(),U(),le(),ue(),F(),ft(),pt(),qt(),Vt(),Ho=d({__name:`LoginButton`,setup(e){let t=n(!1),i=n(``),{showContextMenu:o}=_t(Tt(({actionItem:e,$i:n})=>[e(n(`action.sidebar.signIn.with`).replace(`{account}`,n(`term.apple`)),()=>c()),e(n(`action.sidebar.signIn.with`).replace(`{account}`,n(`term.userToken`)),()=>t.value=!0)])),s=()=>{Qt(i.value)},c=()=>{Qt()};return(e,n)=>(D(),k(r,null,[a(H,{onClick:R(o),class:`full-width`,color:`primary`,icon:`apple`,label:e.$i(`action.sidebar.signIn`).replace(`{account}`,e.$i(`term.appleMusic`))},null,8,[`onClick`,`label`]),a(ce,{modelValue:R(t),"onUpdate:modelValue":n[2]||=e=>_(t)?t.value=e:null},{default:N(()=>[a(se,null,{default:N(()=>[a(de,null,{default:N(()=>[a(B,{modelValue:R(i),"onUpdate:modelValue":n[0]||=e=>_(i)?i.value=e:null,type:`password`,label:e.$i(`term.userToken`)},null,8,[`modelValue`,`label`])]),_:1}),a(je,{align:`right`},{default:N(()=>[a(H,{label:e.$i(`dialog.cancel`),color:`primary`,onClick:n[1]||=e=>t.value=!1},null,8,[`label`]),a(H,{label:e.$i(`menu.signIn`),color:`primary`,onClick:s},null,8,[`label`])]),_:1})]),_:1})]),_:1},8,[`modelValue`])],64))}})})),Wo,Go=e((()=>{Uo(),Uo(),Wo=Ho})),Ko,qo,Jo,Yo,Xo,Zo,Qo,$o,es,ts,ns,rs,is,as=e((()=>{F(),ot(),ie(),Gt(),Z(),St(),Rn(),Ue(),K(),vt(),lt(),y(),Ko={key:0,class:`profile-background`},qo={style:{width:`0`,height:`0`,position:`absolute`},"aria-hidden":`true`,focusable:`false`},Jo=[`src`],Yo={class:`profile-artwork`},Xo=[`src`],Zo={class:`profile-info`},Qo={key:0,class:`title-with-badges`},$o={class:`title-text profile-name`},es={class:`ellipsis`},ts={key:1,class:`title-with-badges`},ns={class:`ellipsis`},rs={key:0,class:`profile-mainmenu`},is=d({__name:`SidebarProfile`,setup(e){x(e=>({aa888db4:R(c)}));let r=gt(),o=Ge(),s=st(),c=n(`var(--musicKeyColor)`),l=n(`var(--musicKeyColor)`),u=i(()=>{let e=o.components.SidebarProfile.CustomArtworkPath;return e&&typeof e==`string`&&!e.startsWith(`file://`)?e:r.profile?.attributes?.artwork?nt(r.profile?.attributes?.artwork.url,64,64):en});E(u,async e=>{if(e&&e!==`data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20width='100%25'%20height='100%25'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20xmlns:serif='http://www.serif.com/'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;'%3e%3crect%20x='0'%20y='0'%20width='1024'%20height='1024'%20style='fill:rgb(110,110,110);'/%3e%3cg%20transform='matrix(6.05996,0,0,6.05996,189.003,209)'%3e%3cpath%20d='M93.161,0.071C59.66,-1.043%2032.22,11.314%2032.22,11.314L32.2,74.023C28.789,72.669%2024.641,72.348%2020.428,73.372C11.345,75.579%205.397,83.192%207.143,90.379C8.889,97.566%2017.667,101.604%2026.749,99.398C35.313,97.317%2041.087,90.429%2040.256,83.626L40.256,36.771C40.256,36.771%2059.66,29.987%2084.829,28.286L84.829,63.135C81.455,61.843%2077.386,61.55%2073.25,62.555C64.167,64.761%2058.219,72.374%2059.965,79.562C61.71,86.749%2070.488,90.786%2079.571,88.58C87.502,86.653%2093.042,80.603%2093.158,74.316L93.161,74.32L93.161,0.071Z'%20style='fill-opacity:0.16;fill-rule:nonzero;'/%3e%3c/g%3e%3c/svg%3e`)try{let t=new Image;t.crossOrigin=`Anonymous`,t.src=e,t.onload=async()=>{try{let{quantized:e}=await dt(t),n=e.map(e=>v({r:e.r,g:e.g,b:e.b})).sort((e,t)=>t.toHsl().s-e.toHsl().s);if(n.length>0)if(c.value=n[0].toHexString(),n.length>=2){let e=n[0].toHexString(),t=n[1].toHexString(),r=n[2]?n[2].toHexString():e,i=v(n[0]).darken(30).toHexString();l.value=`
                radial-gradient(circle at top left, ${e}, transparent 70%),
                radial-gradient(circle at bottom right, ${t}, transparent 70%),
                radial-gradient(circle at center, ${r} 20%, transparent 80%),
                ${i}
              `}else l.value=n[0].toHexString();else c.value=`var(--musicKeyColor)`,l.value=`var(--musicKeyColor)`}catch(e){console.error(`Failed to extract colors`,e),c.value=`var(--musicKeyColor)`,l.value=`var(--musicKeyColor)`}}}catch(e){console.error(`Failed to load image for color extraction`,e),c.value=`var(--musicKeyColor)`,l.value=`var(--musicKeyColor)`}else c.value=`var(--musicKeyColor)`,l.value=`var(--musicKeyColor)`},{immediate:!0});let d=i(()=>s.currentPath.startsWith(`/am/home`));function f(){Xe().push(`/am/home`)}let{compactSidebar:m}=te(q()),h=i(()=>r.profile),_=i(()=>{if(o.components.SidebarProfile.NameVisible)return o.components.SidebarProfile.CustomName?o.components.SidebarProfile.CustomName:h.value?.attributes?.name}),y=i(()=>{if(!o.components.SidebarProfile.HandleVisible)return;if(o.components.SidebarProfile.CustomHandle)return o.components.SidebarProfile.CustomHandle;let e=h.value?.attributes?.handle,t=_.value;if(!(e&&t&&e.toLowerCase()===t.toLowerCase()))return e}),b=i(()=>o.components.SidebarProfile.HasMainMenu);return(e,n)=>(D(),k(`div`,{class:O([`profile-tab`,{"mini-profile":R(m)}])},[p(`div`,{class:O([`profile-btn`,{active:R(d)}]),onClick:g(f,[`self`])},[R(d)?(D(),k(`div`,Ko,[(D(),k(`svg`,qo,[...n[0]||=[p(`filter`,{id:`profile-turbulence`},[p(`feTurbulence`,{type:`fractalNoise`,baseFrequency:`0.05`,numOctaves:`3`,result:`noise`}),p(`feDisplacementMap`,{in:`SourceGraphic`,in2:`noise`,scale:`20`})],-1)]])),p(`img`,{src:R(u)},null,8,Jo)])):t(``,!0),p(`div`,Yo,[p(`img`,{src:R(u)},null,8,Xo)]),j(p(`div`,Zo,[R(_)?(D(),k(`div`,Qo,[p(`div`,$o,[p(`div`,es,L(R(_)),1)])])):t(``,!0),R(y)?(D(),k(`div`,ts,[p(`div`,{class:O([`title-text`,{"profile-handle":R(_),"profile-name":!R(_)}])},[p(`div`,ns,L(R(y)),1)],2)])):t(``,!0)],512),[[w,!R(m)]])],2),R(b)?(D(),k(`div`,rs,[a(Bn)])):t(``,!0)],2))}})})),os=e((()=>{})),ss,cs=e((()=>{as(),as(),os(),Y(),ss=X(is,[[`__scopeId`,`data-v-cd28e675`]])})),ls,us,ds=e((()=>{F(),re(),Z(),ls={class:`scrollbar-track`},us=d({__name:`OverlayScrollbar`,props:{element:{}},setup(e){let r=Ge(),i=n(null),{pressed:a}=oe({target:i}),o=e,s=n(100),c=n(0),l=n(!0),u=n(0);function d(){l.value&&(s.value=o.element.clientHeight/o.element.scrollHeight*100,c.value=o.element.scrollTop/o.element.scrollHeight*100,u.value=o.element.clientHeight)}function f(e){let t=(e.clientY-i.value.getBoundingClientRect().top-s.value/2)/i.value.clientHeight*o.element.scrollHeight;o.element.scrollTo(0,t),c.value=o.element.scrollTop/o.element.scrollHeight*100}function m(e){if(!a.value)return;let t=(e.clientY-i.value.getBoundingClientRect().top-s.value/2)/i.value.clientHeight*o.element.scrollHeight;o.element.scrollTo(0,t),c.value=o.element.scrollTop/o.element.scrollHeight*100}let g=n(!1);function _(){g.value=!0}function v(){g.value=!1}E(()=>a.value,e=>{l.value=!e});let y=new ResizeObserver(d),x=new MutationObserver(d);return b(()=>{if(r.visual.scrollbarType==`native`)return;let e=o.element;e.addEventListener(`scroll`,d),e.addEventListener(`resize`,d),e.addEventListener(`mouseover`,_),e.addEventListener(`mouseleave`,v),e.classList.add(`no-scrollbar`),x.observe(e,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),y.observe(e),s.value=o.element.clientHeight/o.element.scrollHeight*100,c.value=o.element.scrollTop/o.element.scrollHeight*100}),h(()=>{let e=o.element;e.removeEventListener(`scroll`,d),e.removeEventListener(`resize`,d),e.removeEventListener(`mouseover`,_),e.removeEventListener(`mouseleave`,v),x.disconnect(),y.unobserve(e)}),E(()=>r.visual.scrollbarType,()=>{let e=o.element;r.visual.scrollbarType==="default"?e.classList.add(`no-scrollbar`):e.classList.remove(`no-scrollbar`)},{immediate:!0}),(e,n)=>R(s)<100&&R(r).visual.scrollbarType=="default"?(D(),k(`div`,{key:0,class:O([`scrollbar-container`,{"not-visible":!R(g),"is-active":R(a)}]),ref_key:`ScrollContainer`,ref:i,onMousemove:m,onMousedown:f,style:S({height:R(u)+`px`})},[p(`div`,ls,[p(`div`,{class:`scrollbar-thumb`,style:S({height:R(s)+`%`,top:R(c)+`%`})},null,4)])],38)):t(``,!0)}})})),fs=e((()=>{})),ps,ms=e((()=>{ds(),ds(),fs(),Y(),ps=X(us,[[`__scopeId`,`data-v-6614a548`]])})),hs,gs=e((()=>{me(),F(),ft(),pt(),We(),$(),W(),hs=d({__name:`ProviderSwitcher`,props:{as:{}},setup(e){let t=at(),{showContextMenu:n}=_t(Tt(({actionItem:e})=>()=>[e(`Apple Music`,()=>{t.provider=`applemusic`},{enabled:t.provider!==`applemusic`,icon:`apple-music`}),e(`My Music`,()=>{t.provider=`local-music`},{enabled:t.provider!==`local-music`,icon:`media-library`})])),r=i(()=>{switch(t.provider){case`applemusic`:return`apple-music-note`;case`local-music`:return`media-library`;default:return`media-library`}});return(t,i)=>e.as==`chrome-button`?(D(),A(Q,{key:0,onMousedown:g(R(n),[`left`])},{default:N(()=>[a(G,{name:R(r)},null,8,[`name`])]),_:1},8,[`onMousedown`])):(D(),A(H,{key:1,round:``,dense:``,onMousedown:g(R(n),[`left`]),class:`provider-button`},{default:N(()=>[a(G,{name:R(r)},null,8,[`name`])]),_:1},8,[`onMousedown`]))}})})),_s=e((()=>{})),vs,ys=e((()=>{gs(),gs(),_s(),Y(),vs=X(hs,[[`__scopeId`,`data-v-755fd342`]])})),bs,xs,Ss,Cs,ws,Ts,Es,Ds,Os=e((()=>{F(),Z(),Go(),vt(),mt(),We(),K(),wn(),cs(),ms(),ys(),bs={class:`cider-sidebar`},xs={key:0,class:`osx-gap window-drag`},Ss={key:1,class:`win-gap window-drag`},Cs={key:2,class:`sidebar-widget search-widget`},ws={key:0},Ts={key:1,class:`q-mb-md`},Es={key:0},Ds=d({__name:`Sidebar`,props:{searchBar:{type:Boolean}},setup(e){let o=q(),s=gt();ut();let c=at(),l=n();Ge();let u=i(()=>!1);return b(()=>{}),(n,i)=>(D(),k(`div`,bs,[R(o).getWindowControlsSide()==`left`&&R(o).isIfLayout&&!R(o).hasTitleBar?(D(),k(`div`,xs)):(D(),k(`div`,Ss)),!R(o).compactSidebar&&e.searchBar?(D(),k(`div`,Cs,[(D(),A(C(R(c).getComponent(`SearchBar`)),{"results-position":`left`,label:n.$i(`term.search`)},null,8,[`label`])),R(u)?(D(),A(vs,{key:0})):t(``,!0)])):t(``,!0),R(c).provider===`applemusic`?(D(),k(r,{key:3},[p(`div`,{class:`sidebar-scroll-content no-scrollbar`,ref_key:`ScrollContent`,ref:l},[R(o).sidebarType==`am-sidebar`?(D(),k(r,{key:0},[R(J)(`ui.mainMenuPosition`)===`left`&&R(o).leftDrawerOpen&&n.$q.screen.xs?(D(),k(`br`,ws)):t(``,!0),R(s).isAuthorized?t(``,!0):(D(),k(`div`,Ts,[a(Wo,{sidebar:``})])),a(Tn),R(l)?(D(),A(ps,{key:2,element:R(l)},null,8,[`element`])):t(``,!0)],64)):t(``,!0)],512),R(J)(`components.SidebarProfile.Enabled`)?(D(),k(`div`,Es,[a(ss)])):t(``,!0)],64)):(D(),A(C(R(c).getComponent(`Sidebar`)),{key:4}))]))}})})),ks=e((()=>{})),As,js=e((()=>{Os(),Os(),ks(),Y(),As=X(Ds,[[`__scopeId`,`data-v-4d455e54`]])})),Ms=e((()=>{})),Ns,Ps,Fs,Is=e((()=>{F(),Z(),Ms(),Y(),Ns=500,Ps={__name:`AppBlurMap`,props:{inline:{type:Boolean,default:!1}},setup(e){let t=n(null),r=Dt(),i=null,a=new Image,o=!1,s=0,c=0,l=0;a.addEventListener(`load`,()=>{o=!0,a.src}),E(r,e=>{e&&(o=!0)});function u(){if(o){a.src!=J(`visual.backgroundBlurMap.src`)&&(a.src=J(`visual.backgroundBlurMap.src`));let e=t.value.getContext(`2d`),n=window.screen.height,r=window.screen.width,i=window.innerWidth,u=window.innerHeight;t.value.width=i,t.value.height=u,e.fillStyle=`black`,e.fillRect(0,0,t.value.width,t.value.height);function d(t=1){let i=a.width/a.height,o=r/n,s=i>o?n:r/i,c=i>o?n*i:r,l=(r-c)/2,u=(n-s)/2,d=(c-r)/2;e.drawImage(a,l+(r+d)*t-window.screenX,u-Math.abs(window.screenY),c,s)}e.filter=`blur(${J(`visual.backgroundBlurMap.filter.blur`)}px) saturate(${J(`visual.backgroundBlurMap.filter.saturate`)}%) contrast(${J(`visual.backgroundBlurMap.filter.contrast`)}%) brightness(${J(`visual.backgroundBlurMap.filter.brightness`)}%)`,d(-1),d(0),d(1),s=window.screenX,c=window.screenY,Date.now()-l>=Ns&&(l=Date.now(),o=!1)}if((s!==window.screenX||c!==window.screenY)&&(o=!0),document.hidden){i=null;return}i=requestAnimationFrame(u)}function d(){o=!0}let f=null;function p(){document.hidden||i===null&&(o=!0,u())}return b(()=>{o=!0,u(),window.addEventListener(`resize`,d),f=()=>p(),document.addEventListener(`visibilitychange`,f)}),h(()=>{i!==null&&cancelAnimationFrame(i),window.removeEventListener(`resize`,d),f&&document.removeEventListener(`visibilitychange`,f),f=null}),(n,r)=>(D(),k(`canvas`,{id:`appBlurMap`,class:O({inline:e.inline}),ref_key:`canvas`,ref:t},null,2))}},Fs=X(Ps,[[`__scopeId`,`data-v-a75f8cf2`]])})),Ls=e((()=>{}));function Rs(e,t){return D(),k(`div`,Bs,[...t[0]||=[p(`div`,{class:`immersive-lcd-metadata`},[p(`amp-lcd-metadata`)],-1)]])}var zs,Bs,Vs,Hs=e((()=>{F(),Ls(),Y(),zs={},Bs={class:`c-metadata`},Vs=X(zs,[[`render`,Rs],[`__scopeId`,`data-v-07d47bd8`]])}));export{Ci as A,gr as B,Ji as C,Ri as D,Gi as E,Ir as F,Yn as H,Lr as I,yr as L,si as M,ni as N,zi as O,ri as P,vr as R,pa as S,Wi as T,Jn as V,yo as _,As as a,va as b,ms as c,Po as d,Fo as f,To as g,wo as h,Is as i,oi as j,Si as k,Bo as l,jo as m,Hs as n,js as o,Ao as p,Fs as r,ps as s,Vs as t,Vo as u,bo as v,Yi as w,fa as x,_a as y,hr as z};