import{n as e}from"./rolldown-runtime-CMxvf4Kt.js";import{$n as t,A as n,Bn as r,Cn as i,Gn as a,Hn as o,Ln as s,On as c,Pn as l,Qn as u,Rn as d,U as f,Un as p,W as m,Xn as h,Xt as g,Yn as _,Zt as v,_n as y,bn as b,cn as x,gn as S,hn as C,hr as w,j as T,jn as E,ln as D,mn as O,nr as k,on as A,pn as j,qt as M,rn as ee,rr as N,tr as P,ur as F,vr as te,wr as I,xn as L}from"./vendor-C4JLrdLj.js";import{N as ne,P as re,b as ie,d as ae,i as R,r as oe,x as z,y as se}from"./vendor-vue-SNAXxxQe.js";import{At as B,Bt as V,E as ce,Ft as le,Gt as ue,Ht as de,It as fe,Jt as H,Kt as U,Lt as pe,Nt as me,Pt as he,Q as ge,Rt as _e,S as ve,St as ye,T as be,Vt as xe,Z as Se,_t as Ce,a as we,at as Te,ct as Ee,dt as De,ft as Oe,g as ke,gt as Ae,h as je,ht as Me,i as Ne,kt as Pe,mt as Fe,n as Ie,ot as Le,pt as Re,qt as ze,r as Be,st as Ve,vt as He,x as Ue,xt as We,zt as Ge}from"./vendor-quasar-BMuYn1t2.js";import{An as Ke,Bn as W,E as G,F as qe,Fn as Je,Gn as Ye,Hn as K,Ht as Xe,Jr as q,K as Ze,L as Qe,Mi as $e,Mt as et,Ni as tt,Nn as nt,Pn as rt,Qn as it,Qt as at,St as ot,Tt as st,Yn as ct,Zn as lt,_ as ut,_i as dt,ar as ft,b as J,bt as pt,g as mt,gi as ht,gr as Y,h as gt,hi as _t,hr as X,jt as vt,lr as yt,m as bt,nt as xt,qr as Z,rt as St,sr as Ct,vt as wt,wt as Tt,x as Q,y as Et,yi as Dt,yt as Ot}from"./ws-JRT2XE7Y.js";import{T as kt,w as At}from"./index-Dhwlon97.js";import{D as jt,Dt as Mt,E as Nt,Ft as Pt,H as Ft,Ht as It,I as Lt,Lt as $,Ot as Rt,Pt as zt,Rt as Bt,V as Vt,Vt as Ht,_n as Ut,b as Wt,bt as Gt,cn as Kt,d as qt,in as Jt,k as Yt,nn as Xt,rn as Zt,sn as Qt,tn as $t,u as en,vn as tn,y as nn}from"./smart-playlist-store-DUBQztY1.js";import{n as rn,s as an,t as on,u as sn}from"./vLyricProgress-BwMTxAeJ.js";import{n as cn,t as ln}from"./LyricsComposable-OTbXqlqp.js";import{_ as un,a as dn,c as fn,f as pn,g as mn,h as hn,i as gn,l as _n,m as vn,o as yn,p as bn,s as xn}from"./AMQueue-BtQKcoMP.js";import{r as Sn,t as Cn}from"./AMSidebar-CJGcaeHM.js";import{n as wn,t as Tn}from"./PlaybackSpeedButton-eMpeGpLG.js";import{i as En,n as Dn,r as On,t as kn}from"./QueueButton-CvYMzy0n.js";import{a as An,c as jn,i as Mn,l as Nn,r as Pn,t as Fn}from"./LCDPlayerGlass-B7Rqwo-8.js";import{i as In,n as Ln,r as Rn,t as zn}from"./AirplayButton-DT_n7WqN.js";import{D as Bn,E as Vn,T as Hn,w as Un}from"./RightDrawerContent-DL-S5LV4.js";var Wn,Gn=e((()=>{M(),_n(),Wn=i({__name:`ImmersiveLyricView`,emits:[`has-lyrics`,`no-lyrics-found`,`instrumental`],setup(e,{emit:t}){let n=t;return(e,t)=>(r(),C(fn,{"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":``}))}})})),Kn,qn=e((()=>{Gn(),Gn(),Kn=Wn})),Jn,Yn=e((()=>{Jn=`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;
}
`})),Xn,Zn=e((()=>{Xn=`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;
}
`})),Qn,$n=e((()=>{Qn=`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 er(){let e=navigator;return!!e?.gpu&&typeof e.gpu.requestAdapter==`function`}async function tr(){if(cr)return cr;let e=navigator;return cr=(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?.(()=>{cr=null}),n})(),cr.catch(()=>{cr=null}),cr}function nr(e){return Number.isFinite(e)?Math.max(0,Math.min(1,e)):.5}function rr(e){return 2*(1-nr(e))}async function ir(e,t={}){let n=navigator;if(!n?.gpu)throw Error(`WebGPU is not available in this browser.`);let r=t.device??await tr(),i=e.getContext(`webgpu`);if(!i)throw Error(`Failed to create WebGPU context for FSR upscale.`);let a=n.gpu.getPreferredCanvasFormat(),o=`rgba8unorm`,s=nr(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:sr.byteLength,usage:(or?.VERTEX??32)|(or?.COPY_DST??8)});r.queue.writeBuffer(h,0,sr);let g=r.createBuffer({size:16,usage:(or?.UNIFORM??64)|(or?.COPY_DST??8)}),_=r.createBuffer({size:16,usage:(or?.UNIFORM??64)|(or?.COPY_DST??8)}),v={module:r.createShaderModule({code:Qn}),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:Jn}),entryPoint:`main`,targets:[{format:o}]},primitive:{topology:`triangle-list`}}),b=r.createRenderPipeline({layout:`auto`,vertex:v,fragment:{module:r.createShaderModule({code:Xn}),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:(ar?.TEXTURE_BINDING??4)|(ar?.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:(ar?.TEXTURE_BINDING??4)|(ar?.COPY_DST??2)|(ar?.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=nr(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,rr(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 ar,or,sr,cr,lr=e((()=>{Yn(),Zn(),$n(),ar=globalThis.GPUTextureUsage,or=globalThis.GPUBufferUsage,sr=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]),cr=null})),ur,dr=e((()=>{M(),et(),lr(),Zt(),Ze(),ur=i({__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:n}){let i=e,a=n,o=w(),c=w(),l=w(),u=te(null),f=w(!1),p=w(!1),m=w(!1),g=w(!1),_,v=j(()=>!!i.placeholderUrl),b=Jt(),x=null,S=null,C=0,T=!1,E=null;function D(e,t){return E||=document.createElement(`canvas`),E.width=Math.max(1,e),E.height=Math.max(1,t),E}function M(){E&&(E.width=0,E.height=0)}let ee=j(()=>{let e={"--bgColor":i.bgColor?`#${i.bgColor}`:`transparent`};return i.placeholderUrl&&!f.value&&(e.backgroundImage=`url("${i.placeholderUrl}")`,e.backgroundSize=`cover`,e.backgroundPosition=`center`),e});function N(){let e=c.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 F(){let e=i.sourceAspect;if(e&&Number.isFinite(e)&&e>0)return e;let t=c.value;return!t||t.width<=0||t.height<=0?null:t.width/t.height}function I(e){let t=F();if(!t)return e;let n=e.width,r=e.height;if(n<=0||r<=0)return e;let a=n/r;if(Math.abs(a-t)/t<.005)return e;if(i.objectFit===`contain`){let i,o;a>t?(i=n,o=Math.round(n/t)):(o=r,i=Math.round(r*t));let s=D(i,o),c=s.getContext(`2d`);if(!c)return e;let l=Math.round((i-n)/2),u=Math.round((o-r)/2);return c.drawImage(e,l,u,n,r),s}let o=0,s=0,c=n,l=r;a>t?(c=Math.round(r*t),o=Math.round((n-c)/2)):(l=Math.round(n/t),s=Math.round((r-l)/2));let u=D(c,l),d=u.getContext(`2d`);return d?(d.drawImage(e,o,s,c,l,0,0,c,l),u):e}async function L(e){try{let t=await vt({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`)?qe(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 ne(){let e=c.value,t=l.value;if(!e||!t||!f.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 re(e){ne()?(m.value=!1,g.value=!0,p.value=!0):f.value=!1,ae(e)}function ie(){p.value&&(m.value=!0,requestAnimationFrame(()=>{requestAnimationFrame(()=>{p.value=!1})}),_&&clearTimeout(_),_=setTimeout(()=>{g.value=!1,_=void 0;let e=l.value;e&&(e.width=0,e.height=0)},650))}async function ae(e){if(!u.value){console.warn(`[FSR] loadAndRender called before upscaler ready`);return}let t=++C,n=await L(e);if(T||t!==C){n?.close();return}if(!n){console.warn(`[FSR] no bitmap for url, falling back`,e),a(`fallback`,`load-failed`);return}try{N();let e=I(n);if(await u.value.setSource(e),T||t!==C){n.close();return}u.value.resize(),u.value.render(),f.value=!0,ie();let r=e.width,i=e.height;console.info(`[FSR] rendered ${r}x${i} (src ${n.width}x${n.height}) -> ${c.value?.width}x${c.value?.height}`),a(`loaded`)}catch(e){console.error(`[FSR] setSource/render failed`,e),a(`fallback`,`render-failed`)}finally{M(),S?.close(),S=n}}return h(()=>i.artworkUrl,e=>{e&&re(e)}),h(()=>i.sharpness,e=>{u.value&&(u.value.setSharpness(e),u.value.hasSource()&&u.value.render())}),h(()=>b.fsrRenderEpoch,()=>{!u.value||!i.artworkUrl||re(i.artworkUrl)}),s(async()=>{if(!(!c.value||!o.value)){N();try{u.value=await ir(c.value,{sharpness:i.sharpness})}catch(e){console.warn(`[FSR] init failed, requesting fallback`,e),a(`fallback`,`init-failed`);return}if(T){u.value.dispose(),u.value=null;return}x=new ResizeObserver(()=>{u.value&&N()&&(u.value.resize(),S?(async()=>{try{if(!u.value)return;let e=I(S);await u.value.setSource(e),u.value.render()}catch(e){console.warn(`[FSR] resize re-crop failed`,e)}finally{M()}})():u.value.hasSource()&&u.value.render())}),x.observe(o.value),i.artworkUrl&&ae(i.artworkUrl)}}),d(()=>{T=!0,_&&=(clearTimeout(_),void 0),x?.disconnect(),x=null,u.value?.dispose(),u.value=null,S?.close(),S=null,M(),E=null}),(e,n)=>(r(),y(`div`,{ref_key:`wrapper`,ref:o,class:P([`immersive-artwork-fsr`,{rendered:f.value,swapping:p.value,"fade-active":m.value||!v.value}]),style:k(ee.value)},[t(O(`canvas`,{ref_key:`snapshotCanvas`,ref:l,class:`fsr-snapshot`},null,512),[[A,g.value]]),O(`canvas`,{ref_key:`canvas`,ref:c,class:`fsr-canvas`},null,512)],6))}})})),fr=e((()=>{})),pr,mr=e((()=>{dr(),dr(),fr(),q(),pr=Z(ur,[[`__scopeId`,`data-v-74efb6eb`]])}));function hr(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 gr(e={}){let t=Ot(),n=Rt(),r=w(!1),i=j(()=>{let e=t.nowPlayingArtwork;if(e?.url)return e.url.includes(`{w}`)||e.url.includes(`%7Bw%7D`)?e.url:Qe(e,3e3,3e3,`ss`)});h(i,()=>{r.value=!1});let a=j(()=>{let e=J(`visual.immersive.fsrUpscale.sharpness`);return typeof e==`number`?e:.5});return{useFsr:j(()=>{if(r.value||!J(`visual.immersive.fsrUpscale.enabled`))return!1;if(!er())return console.info(`[FSR] WebGPU not available, skipping`),!1;if(e.animatedArtworkVideoUrl?.value||!i.value)return!1;if(J(`visual.immersive.fsrUpscale.forceAlways`))return console.info(`[FSR] activated (forceAlways)`),!0;let a=hr(t,n),o=J(`visual.immersive.fsrUpscale.thresholdYear`)??2010;if(a===null)return console.info(`[FSR] no release date for current track; enable "Apply to All Tracks" to upscale anyway`),!1;let s=a<o;return s&&console.info(`[FSR] activated (release year ${a} < threshold ${o})`),s}),fsrSharpness:a,fsrArtworkUrl:i,fsrFallback:r,handleFallback:()=>{r.value=!0}}}var _r=e((()=>{Q(),lr(),Mt(),wt(),Ze(),M()})),vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr=e((()=>{U(),He(),Ae(),Fe(),Oe(),ce(),Le(),M(),Q(),un(),hn(),an(),on(),Qt(),wt(),bn(),ln(),vr={key:0,class:`loading-symbol-container`},yr={class:`loading-symbol`},br=[`lrc-count`,`data-lyric-slot`,`util-lyric-index`,`util-mod-2`],xr={key:0,class:`lyric-line-item`},Sr={key:0,class:`one-word`},Cr={key:1,class:`lyrics-credits`},wr={key:0},Tr={class:`q-pt-md`},Er={key:1},Dr={key:1,class:`text-center q-pt-xl text-h2 text-bold`},Or=.5,kr=4,Ar=1,jr=i({__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:n}){let i=n,a=w(!0),l=Ot(),{isHidden:f}=Kt(c(`windowContext`,null)??void 0),{sourceInfo:p,getLyrics:m,hasLyrics:_,lyricsList:x,songWriters:T,userLyricsVariations:E,selectedVariationIndex:A,selectUserLyricsVariation:M,hasMultipleVariations:ee}=cn({props:e});h(_,e=>{if(e){i(`has-lyrics`);return}console.log(`no lyrics`),i(`no-lyrics-found`)});let F=w(),{getCurrentTime:ne,currentTimeSlowRef:re,subscribeFrameTick:ie}=sn(),ae=0,R=j(()=>(f.value||(ae=re.value-(window.airplayActive?2.25:0)-J(`lyrics.timeOffset`)),ae)),oe=j(()=>l.player.nowPlayingItem),z=te([]);function se(){return(window.airplayActive?2.25:0)+J(`lyrics.timeOffset`)}let B=null;function V(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<kr)return n;for(let t=0;t<kr;t++)if(!e.has(t))return t;return kr-1}function le(e){let t=x.value;if(!t.length)return B=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(!B){if(n.length===0)return[];n.sort((e,t)=>e.start-t.start);let e=n[n.length-1].end;return B={members:n.map((t,n)=>V(t,e,n%kr)),groupEnd:e},B.members}let r=[];for(let t of B.members)e<=(t.lineEnd??t.end)+Or&&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 B=null,[];if(a.length===0&&r.length===B.members.length)return B.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(H.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(V(e,o,t))}return c.sort((e,t)=>e.start-t.start),B={members:c,groupEnd:o},B.members}function de(){if(!B)return;let e=B.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&&(B={members:e.slice(),groupEnd:B.groupEnd},z.value=B.members)}let fe=w(0),H=w(new Set),U=j(()=>z.value.length+fe.value);h(()=>U.value>0,e=>i(`has-active-line`,e));function pe(e){let t=e.dataset?.lyricSlot;if(t==null)return null;let n=Number(t);return Number.isFinite(n)?n:null}function me(e){let t=pe(e);if(t===null)return;fe.value+=1;let n=new Set(H.value);n.add(t),H.value=n}function he(e){let t=pe(e);if(t!==null){if(fe.value=Math.max(0,fe.value-1),H.value.has(t)){let e=new Set(H.value);e.delete(t),H.value=e}de()}}function ge(e){let t=pe(e);if(t!==null&&(fe.value=Math.max(0,fe.value-1),H.value.has(t))){let e=new Set(H.value);e.delete(t),H.value=e}}function _e(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 ve(e){let t=le(e);t!==z.value&&(_e(z.value,t)||(z.value=t))}let ye=-1,xe=ie(e=>{if(f.value)return;let t=e-se();ye!==-1&&Math.abs(t-ye)>Ar&&(B=null),ye=t,ve(t)});h(x,()=>{B=null,z.value=[],ve(ne()-se())});let Se=j(()=>{let e=U.value;return e>=3?`25vh`:e>=2?`50vh`:`100vh`});h(oe,e=>{we(e)}),s(async()=>{await we(oe.value),ve(ne()-se())}),d(()=>{xe(),z.value=[],B=null});async function we(e){if(!e?.attributes){_.value=!1,a.value=!1;return}try{await m(e),a.value=!1;let t=x.value.findIndex(e=>e.start<=R.value&&e.end>=R.value);t===-1&&(t=0),ve(ne()-se())}catch(e){console.log(e)}}function Ee(e,t){return!0}function Oe(e){return!0}return(e,n)=>(r(),C(v,{class:`sing-focus-lyrics`,ref_key:`scrollArea`,ref:F,style:k({"--lyric-count":I(U)}),name:`lyric_fade`,tag:`div`,onBeforeLeave:me,onAfterLeave:he,onLeaveCancelled:ge},{default:u(()=>[I(a)?(r(),y(`div`,vr,[O(`div`,yr,[L(ue,{name:`svguse:cider-assets/cider-icons/icons.svg#big-lyrics`,class:`tab-icon`,size:`4em`})])])):(r(),y(D,{key:1},[I(_)?(r(!0),y(D,{key:0},o(I(z),e=>t((r(),y(`div`,{class:P([`lyric-line-container`,{"has-multiple-lyrics":I(U)>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":I(U),"data-lyric-slot":e.slot??0,"util-lyric-index":e.index,"util-mod-2":e.index%2==0,style:k({height:I(Se),"--height":I(Se),"--lyric-duration":(e.lineEnd??e.end)-e.start+`s`,"--util-mod-2":e.index%2==0?1:-1}),key:e.index},[Ee(e.start,e.end)?(r(),y(`div`,xr,[(r(),C(pn,{active:Ee(e.start,e.end),"has-passed":Oe(e.start),lyric:e,key:e.index},{default:u(()=>[e.isCredit?(r(),y(`div`,Cr,[e.text==``?S(``,!0):(r(),y(`div`,wr,[n[0]||=O(`b`,null,`Written by:`,-1),n[1]||=b(),n[2]||=O(`br`,null,null,-1),O(`span`,null,N(e.text),1)])),O(`div`,Tr,[n[3]||=O(`b`,null,`Sourced From:`,-1),n[4]||=b(),n[5]||=O(`br`,null,null,-1),I(p).provider===`User`&&I(ee)()?(r(),C(be,{key:0,flat:``,dense:``,"no-caps":``,label:I(p).contributorName||`User`,class:`variation-selector-focus`},{default:u(()=>[L(De,{dense:``},{default:u(()=>[(r(!0),y(D,null,o(I(E),(e,n)=>t((r(),C(Re,{key:e.id,clickable:``,onClick:e=>I(M)(n),active:I(A)===n},{default:u(()=>[L(Me,null,{default:u(()=>[L(Ce,null,{default:u(()=>[b(N(e.contributorName||`Unknown`),1)]),_:2},1024),L(Ce,{caption:``},{default:u(()=>[b(N(e.syncType)+` sync · `+N(e.language||`Unknown`),1)]),_:2},1024)]),_:2},1024),I(A)===n?(r(),C(Me,{key:0,side:``},{default:u(()=>[L(ue,{name:`check`,color:`primary`})]),_:1})):S(``,!0)]),_:2},1032,[`onClick`,`active`])),[[Te]])),128))]),_:1})]),_:1},8,[`label`])):(r(),y(`span`,Er,N(I(p).provider===`User`&&I(p).contributorName?I(p).contributorName:I(p).provider.charAt(0).toUpperCase()+I(p).provider.slice(1)),1))])])):(r(),y(D,{key:0},[(e.words?.length??0)>0?(r(!0),y(D,{key:0},o(e.words,(e,t)=>(r(),y(D,{key:t},[(e.words?.length??0)>0&&!e.isBackground?(r(),y(`div`,Sr,[(r(!0),y(D,null,o(e.words,(e,t)=>(r(),C(vn,{key:t,word:e,active:Ee(e.start,e.end)},null,8,[`word`,`active`]))),128))])):(r(),C(vn,{key:1,word:e,active:Ee(e.start,e.end),"force-fancy":``},null,8,[`word`,`active`]))],64))),128)):(r(),C(g,{key:1,name:`simple_shrink`},{default:u(()=>[e.empty&&Ee(e.start,e.end)?(r(),C(mn,{key:0,start:e?.start,end:e?.end},null,8,[`start`,`end`])):(r(),y(D,{key:1},[b(N(e.text),1)],64))]),_:2},1024))],64))]),_:2},1032,[`active`,`has-passed`,`lyric`]))])):S(``,!0)],14,br)),[[I(rn),{start:e.start,end:e.lineEnd??e.end}]])),128)):(r(),y(`div`,Dr,` No lyrics found `))],64))]),_:1},8,[`style`]))}})})),Nr=e((()=>{})),Pr,Fr=e((()=>{Mr(),Mr(),Nr(),q(),Pr=Z(jr,[[`__scopeId`,`data-v-e90cb464`]])})),Ir,Lr,Rr=e((()=>{M(),Q(),Fr(),Nn(),wt(),Ir={class:`content-container`},Lr=i({__name:`SolariumLyricDisplay`,setup(e){ee(e=>({ad1fc05e:I(a)}));let t=Ot(),n=G(),i=j(()=>t.artworkCSSColors),a=j(()=>`28px`),o=w(!1),s=e=>{o.value=e},c=()=>{n.components.ImmersiveSolarium.LyricsType=`full`};return(e,t)=>(r(),y(`div`,{class:P([`compact-lyrics`,{"is-inactive":!I(o)}])},[O(`div`,{class:`lg-wrapper`,style:k(I(i)),onClick:c},[L(jn,{interactive:!1,blur:6,"always-render":``},{default:u(()=>[t[0]||=O(`div`,{class:`lg-tint`},null,-1),O(`div`,Ir,[L(Pr,{type:`single-line`,"is-immersive":``,"show-no-lyrics-found-text":!1,onHasActiveLine:s})])]),_:1})],4)],2))}})})),zr=e((()=>{})),Br,Vr=e((()=>{Rr(),Rr(),zr(),q(),Br=Z(Lr,[[`__scopeId`,`data-v-3ec5737a`]])})),Hr,Ur,Wr,Gr=e((()=>{Ee(),U(),Le(),M(),Bt(),Y(),W(),Dt(),R(),wt(),Q(),Hr={class:`flex flex-gap-1`},Ur=70,Wr=i({__name:`SolariumLyricsButton`,setup(e){let n=K(),i=Ot(),a=j(()=>i.artworkCSSColors),o=G(),s=j(()=>o.components.ImmersiveSolarium.LyricsType),c=w(),{elementX:l,elementY:d,isOutside:f}=ie(c),p=w(),m=j(()=>n.isRightDrawerView(`lyrics`)),g=j(()=>{if(a.value)return{...a.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([l,d],()=>{Math.sqrt(l.value**2+d.value**2)>Ur&&p.value?.hide()}),h(f,e=>{e||p.value?.show()});let _=e=>{let t=s.value;if(o.components.ImmersiveSolarium.LyricsType=e,!n.rightDrawerOpen){n.invokeRightDrawerView(`lyrics`);return}if(n.rightDrawerOpen&&t==s.value){n.closeRightDrawerView();return}},v=e=>s.value===e&&n.isRightDrawerView(`lyrics`),y=()=>{n.invokeRightDrawerView(`lyrics`)};return(e,n)=>(r(),C($,{class:`lyrics-button`,active:I(m),title:I(dt)(`term.lyrics`),"native-title":``,onTouchstart:n[2]||=e=>I(p)?.show(),onClick:y,ref_key:`target`,ref:c},{menu:u(()=>[L(Ve,{anchor:`top middle`,self:`bottom middle`,class:`solarium-menu`,ref_key:`menu`,ref:p,offset:[0,10],style:k(I(g))},{default:u(()=>[O(`div`,Hr,[t((r(),C($,{title:I(dt)(`term.lyrics`),onClick:n[0]||=e=>_(`full`),class:P([{"bg-primary text-white":v(`full`)},`lyrics-popup-button`])},{default:u(()=>[L(X,{name:`full-lyrics`})]),_:1},8,[`title`,`class`])),[[Te]]),t((r(),C($,{title:`Compact Lyrics`,onClick:n[1]||=e=>_(`compact`),class:P([{"bg-primary text-white":v(`compact`)},`lyrics-popup-button`])},{default:u(()=>[L(X,{name:`hud-lyrics`})]),_:1},8,[`class`])),[[Te]])])]),_:1},8,[`style`])]),default:u(()=>[L(ue,{name:`svguse:cider-assets/cider-icons/icons.svg#lyrics`,class:`tab-icon`,size:`20px`})]),_:1},8,[`active`,`title`]))}})})),Kr=e((()=>{})),qr,Jr=e((()=>{Gr(),Gr(),Kr(),q(),qr=Z(Wr,[[`__scopeId`,`data-v-22728cf2`]])})),Yr,Xr,Zr,Qr=e((()=>{M(),Q(),Bt(),Nn(),Y(),W(),wt(),Pn(),Dn(),Vr(),Jr(),Yr={class:`solarium-container`},Xr={class:`content-container`},Zr=i({__name:`SolariumPlayer`,setup(e,{expose:t}){let n=Ot(),i=G(),a=K(),o=j(()=>n.artworkCSSColors),s=c(`openBrowser`),l=w(),d=()=>{l.value&&l.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`})},f=()=>{l.value&&l.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 t({popupAnimation:d,popdownAnimation:f}),(e,t)=>(r(),y(`div`,Yr,[L(g,{name:`compact_lyric_fade`,onBeforeEnter:d,onBeforeLeave:f},{default:u(()=>[I(i).components.ImmersiveSolarium.LyricsType==`compact`&&I(a).isRightDrawerView(`lyrics`)?(r(),C(Br,{key:0})):S(``,!0)]),_:1}),O(`div`,{class:`lg-wrapper`,style:k(I(o)),ref_key:`player_wrapper`,ref:l},[L(jn,{interactive:!1,blur:6,"always-render":``},{default:u(()=>[t[0]||=O(`div`,{class:`lg-tint`},null,-1),O(`div`,Xr,[L(Fn,{"no-artwork":``,compact:``,"compact-volume":``},{end_before:u(()=>[L(kn),L(qr),L($,{title:`Browser`,"native-title":``,onClick:I(s)},{default:u(()=>[L(X,{name:`browser`})]),_:1},8,[`onClick`])]),_:1})])]),_:1})],4)]))}})})),$r=e((()=>{})),ei,ti=e((()=>{Qr(),Qr(),$r(),q(),ei=Z(Zr,[[`__scopeId`,`data-v-df2b9c61`]])})),ni,ri=e((()=>{M(),Q(),pt(),ni=i({__name:`MojavePlayer`,props:{noArtwork:{type:Boolean}},setup(e){let t=ot(),n=G(),i=j(()=>{switch(n.components.MojaveLayouts.PlayerType){default:case`default`:return t.getComponent(`BottomPlayer`);case`glass`:case`glass-compact`:return t.getComponent(`BottomPlayerCompact`)}}),o=j(()=>n.components.MojaveLayouts.PlayerType==`glass-compact`);return d(()=>{console.log(`unmounting MojavePlayer`)}),(t,s)=>(r(),C(a(I(i)),{compact:I(o),"no-artwork":e.noArtwork,"player-type":I(n).components.MojaveLayouts.PlayerType},{end_before:u(()=>[p(t.$slots,`end_before`)]),end_after:u(()=>[p(t.$slots,`end_after`)]),_:3},8,[`compact`,`no-artwork`,`player-type`]))}})})),ii,ai=e((()=>{ri(),ri(),ii=ni})),oi,si,ci,li,ui,di,fi,pi=e((()=>{U(),M(),Bn(),yt(),Xe(),nn(),Tt(),Dt(),Xt(),oi={class:`threed-artwork`},si={key:0,class:`queued-item-overlay`},ci={class:`threed-queue-item_info`},li={class:`title`},ui={class:`title-text`},di={class:`artist`},fi=i({__name:`ThreeDQueueItem`,props:{item:{type:Object,required:!0},index:{type:Number,required:!0}},setup(e){let t=st(),n=w(!1),i=e,a=j(()=>{let e=i.item?.item?.id,n=t.nowPlayingItem?.id;return e&&n&&e===n}),{elementRef:o,showContextMenu:s}=Wt({item:{...i.item.item,href:at(i.item.item)},opts:{slots:{singleSelectTop:[ft(dt(`action.removeFromQueue`),()=>t.removeFromQueue(i.index)),ft(dt(`action.moveToTop`),()=>t.moveQueueItemAbsolute(i.index,t.queuePosition+1))]}}});async function c(){await t.jumpToQueuePosition(i.index)}return(t,i)=>(r(),y(`div`,{class:`threed-queue-item_container`,ref_key:`elementRef`,ref:o},[O(`div`,{class:P([`threed-queue-item`,{"active-item":a.value}]),onMouseenter:i[0]||=e=>n.value=!0,onMouseleave:i[1]||=e=>n.value=!1},[O(`div`,oi,[L(g,{name:`generic-fade`},{default:u(()=>[n.value&&!a.value?(r(),y(`div`,si,[O(`div`,{class:`play-btn`,role:`button`,onClick:c},[L(ue,{name:`ion-ios-play`})])])):S(``,!0)]),_:1}),L($t,{class:`no-shadow`,artwork:e.item.item?.attributes?.artwork,"desired-height":600,"desired-width":600},null,8,[`artwork`])])],34),O(`div`,ci,[O(`div`,li,[a.value?(r(),C(Vn,{key:0,class:`playing-indicator`})):S(``,!0),O(`span`,ui,N(e.item.item?.attributes?.name),1)]),O(`div`,di,N(e.item.item?.attributes?.artistName),1)])],512))}})})),mi=e((()=>{})),hi,gi=e((()=>{pi(),pi(),mi(),q(),hi=Z(fi,[[`__scopeId`,`data-v-ae80fd6c`]])})),_i,vi,yi,bi,xi=e((()=>{M(),R(),ne(),Se(),Q(),Tt(),gi(),_i=[`initial-slide`,`breakpoints`,`effect`],vi=50,yi=100,bi={__name:`ThreeDQueue`,setup(e){let{x:t,y:n}=se({touch:!0}),i=w(!1),a;function c(){a&&clearTimeout(a),i.value=!0,a=setTimeout(()=>{i.value=!1,F&&A.value<T.value.length&&F.slideTo(A.value,500,!1)},1e3*5)}h([t,n],c);let u=ge(),{queue:d,queuePosition:f,isStationMode:p,autoplayEnabled:m,nowPlayingItem:g,queueId:_}=re(st()),v=w(null);j(()=>m.value);let b,x=[],C=w(!0),T=w([]),O=w(vi),k=j(()=>{try{return(Array.isArray(d.value)?d.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),[]}}),A=j(()=>{let e=Number(f.value??0);return Number.isFinite(e)?Math.floor(e):0}),M=j(()=>k.value);function ee(){let e=M.value;if(e.length===0){T.value=[],O.value=0;return}e.length<O.value&&(O.value=e.length),T.value=e.slice(0,O.value),v.value=g.value}let N=j(()=>J(`components.ThreeDQueue.Style`)===`3d`?`coverflow`:``);function P(e){C.value=e}let F,te=w();function I(e){let[t]=e.detail;F=t,console.log(F),F&&A.value<T.value.length&&setTimeout(()=>{F.slideTo(A.value,0,!1)},100)}h(()=>A.value,async(e,t)=>{e!==t&&(e>=T.value.length-10&&await de(e),F&&e<T.value.length&&F.slideTo(e,500,!1))});function ne(e){F?.slideTo(e,500,!1)}let ie=j(()=>u.screen.width/u.screen.height),ae=j(()=>ie.value>2.2),R=j(()=>u.screen.height<600),oe=j(()=>{let e=R.value?2:1;return ae.value?(console.log(`ultrawide`,ie.value,e),{640:{slidesPerView:3*e,spaceBetween:0},1940:{slidesPerView:4*e,spaceBetween:0},3200:{slidesPerView:6*e,spaceBetween:0}}):(console.log(`normal screen`,ie.value),{640:{slidesPerView:3*e,spaceBetween:0}})}),z=w(0);async function B(e){z.value=e.activeIndex,c(),T.value.length<M.value.length&&e.activeIndex>=T.value.length-10&&await de(e.activeIndex)}let V=!1,ce=null;function le(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]);b&&clearTimeout(b),b=setTimeout(()=>{},1e3),e&&((t>0?1:-1)>0?F?.slidePrev():F?.slideNext())}else{if(V)return;Math.abs(t)>3&&((t>0?1:-1)>0?F?.slidePrev():F?.slideNext(),V=!0,ce&&clearTimeout(ce),ce=setTimeout(()=>{V=!1},yi))}b&&clearTimeout(b),b=setTimeout(()=>{},5e3)}s(()=>{ee()}),l(()=>{a&&clearTimeout(a),b&&clearTimeout(b),ce&&clearTimeout(ce)});let ue=j(()=>`bp-${ae.value}-${R.value}`);async function de(e){let t=M.value;if(t.length>O.value&&e>=O.value-10){let e=t.slice(O.value,O.value+vi);e.length>0&&(T.value.push(...e),O.value+=e.length,await E(),F?.update(),F?.slideTo(F.activeIndex,0,!1))}}return h(()=>d.value,()=>{ee(),E(()=>{F&&A.value<T.value.length&&F.slideTo(A.value,300,!1)})},{deep:!0}),h(()=>_.value,()=>{ee(),E(()=>{F?.update()})}),h(T,()=>{E(()=>{F?.update()})},{deep:!0}),h(()=>g.value,e=>{v.value=e}),(e,t)=>(r(),y(`div`,null,[T.value.length>0?(r(),y(`swiper-container`,{"initial-slide":A.value,onSwiperinit:I,keyboard:`true`,breakpoints:oe.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:B,onWheelPassive:le,ref_key:`swiperRef`,ref:te,key:ue.value},[(r(!0),y(D,null,o(T.value,(e,t)=>(r(),y(`swiper-slide`,{key:`slide-${e.id}-${t}`,style:{width:`auto`}},[L(hi,{item:{item:e.track},index:e.index,onClick:t=>ne(e.index)},null,8,[`item`,`index`,`onClick`])]))),128))],40,_i)):S(``,!0)]))}}})),Si,Ci=e((()=>{Ae(),ye(),Fe(),M(),Ke(),Xt(),Si=i({__name:`PageHistoryContentItem`,props:{item:{}},setup(e){let t=e,n=w(null);function i(){t.item.path&&nt().push(t.item.path)}return(t,a)=>(r(),C(Re,{onClick:i,clickable:``},{default:u(()=>[L(Me,null,{default:u(()=>[O(`div`,null,N(e.item.title),1)]),_:1}),e.item.artwork?(r(),C(Me,{key:0,avatar:``},{default:u(()=>[L(We,{rounded:``},{default:u(()=>[L($t,{ref_key:`artworkElement`,ref:n,classes:`no-shadow`,artwork:e.item.artwork,"desired-height":80,"desired-width":80},null,8,[`artwork`])]),_:1})]),_:1})):S(``,!0)]),_:1}))}})})),wi,Ti=e((()=>{Ci(),Ci(),wi=Si})),Ei,Di,Oi,ki,Ai=e((()=>{V(),Oe(),M(),W(),Ti(),Ei={class:`row q-pa-sm history-panel-header`},Di={class:`col-auto flex flex-center`},Oi={class:`history-panel-content`},ki=i({__name:`PageHistoryContent`,props:{width:{},maxHeight:{}},setup(e){let t=K(),n=j(()=>t.appMetaList.slice().reverse());return(i,a)=>(r(),y(`div`,{class:`history-panel`,style:k({"min-width":e.width??`0`,"max-height":e.maxHeight??`100%`})},[O(`div`,Ei,[a[0]||=O(`div`,{class:`col flex items-center`},[O(`div`,{class:`shelf-title`},`Recently Viewed`)],-1),O(`div`,Di,[L(Ge,{label:i.$i(`term.clearAll`),flat:``,onClick:I(t).clearAppMeta},null,8,[`label`,`onClick`])])]),O(`div`,Oi,[L(De,null,{default:u(()=>[(r(!0),y(D,null,o(n.value,(e,t)=>(r(),C(wi,{key:t,item:e},null,8,[`item`]))),128))]),_:1})])],4))}})})),ji=e((()=>{})),Mi,Ni=e((()=>{Ai(),Ai(),ji(),q(),Mi=Z(ki,[[`__scopeId`,`data-v-8a58e04d`]])})),Pi,Fi,Ii=e((()=>{ke(),de(),M(),rt(),Y(),Ni(),Pi={class:`nav-flipper`},Fi=i({__name:`NavFlipper`,setup(e){let n=Je();return(e,i)=>(r(),y(`div`,Pi,[t((r(),y(`button`,{onClick:i[0]||=e=>I(n).useCurrentPodRouter().back()},[L(X,{name:`chevron-left`}),L(je,{"context-menu":``},{default:u(()=>[L(Mi,{"max-height":`80vh`,width:`250px`})]),_:1})])),[[xe]]),t((r(),y(`button`,{onClick:i[1]||=e=>I(n).useCurrentPodRouter().forward()},[L(X,{name:`chevron-right`})])),[[xe]])]))}})})),Li=e((()=>{})),Ri,zi=e((()=>{Ii(),Ii(),Li(),q(),Ri=Z(Fi,[[`__scopeId`,`data-v-e95bdeae`]])})),Bi,Vi=e((()=>{M(),rt(),Bt(),Y(),Bi=i({__name:`NewTabButton`,setup(e){let t=Je();return(e,n)=>(r(),C($,{onClick:n[0]||=e=>I(t).openTab(),title:`New Tab`,"native-title":``},{default:u(()=>[L(X,{name:`plus`})]),_:1}))}})})),Hi,Ui=e((()=>{Vi(),Vi(),Hi=Bi})),Wi,Gi,Ki,qi,Ji,Yi=e((()=>{tn(),M(),yt(),lt(),rt(),Y(),Wi=[`title`],Gi=[`textContent`],Ki={key:1,class:`tab-text loading`},qi={class:`tab-action`},Ji=i({__name:`PodTab`,props:{tab:{},isDragging:{type:Boolean},isDragOver:{type:Boolean}},emits:[`dragstart`,`dragover`,`drop`,`dragend`],setup(e,{emit:t}){let{elementRef:n}=it(Ct(({actionItem:e,menuSeperator:t,cascadeItem:n})=>()=>[e(`Close Tab`,()=>{o.closeTab(i.tab.id)}),t(),n(`Developer`,[e(`Copy Path`,()=>{navigator.clipboard.writeText(i.tab.path)})],{icon:`command`})])),i=e,a=t,o=Je(),c=e=>{e.dataTransfer&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,i.tab.id)),a(`dragstart`,i.tab.id)},l=e=>{e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`move`),a(`dragover`,i.tab.id)},u=e=>{e.preventDefault(),a(`drop`,i.tab.id)},d=()=>{a(`dragend`)},f=j(()=>i.tab.title?i.tab.title:i.tab.path);w(null);let p=w(null),m=w(null),g=()=>{if(!p.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=f.value,document.body.appendChild(e);let t=e.offsetWidth+32+8;document.body.removeChild(e),m.value=Math.max(120,Math.min(240,t))};h(f,()=>{E(()=>{g()})},{immediate:!0}),s(()=>{g()});let _=j(()=>m.value===null?{}:{width:`${m.value}px`});return(t,i)=>{let a=Ut;return r(),y(`div`,{class:P([`pod-tab`,{active:I(o).currentTab===e.tab.id,dragging:e.isDragging,"drag-over":e.isDragOver}]),style:k(I(_)),draggable:`true`,onClick:i[1]||=t=>I(o).currentTab=e.tab.id,onMouseupCapture:i[2]||=x(t=>I(o).closeTab(e.tab.id),[`middle`,`stop`,`prevent`]),onDragstart:c,onDragover:l,onDrop:u,onDragend:d,ref_key:`elementRef`,ref:n,title:I(f)},[I(f)===`...`?(r(),y(`div`,Ki,[L(a,{size:`1em`})])):(r(),y(`div`,{key:0,ref_key:`tabTextRef`,ref:p,class:`tab-text`,textContent:N(I(f))},null,8,Gi)),O(`div`,qi,[O(`button`,{onClick:i[0]||=x(t=>I(o).closeTab(e.tab.id),[`stop`,`prevent`]),class:`close-btn`},[L(X,{size:`.85rem`,name:`close`})])])],46,Wi)}}})})),Xi=e((()=>{})),Zi,Qi=e((()=>{Yi(),Yi(),Xi(),q(),Zi=Z(Ji,[[`__scopeId`,`data-v-d8c14878`]])})),$i,ea,ta,na,ra,ia=e((()=>{V(),M(),rt(),Qi(),Y(),R(),$i={key:0,class:`pod-tabs-container`},ea={class:`tabs-inner`},ta={class:`pod-tab-content`},na={key:0,class:`overflow-add-button`},ra=i({__name:`PodTabs`,setup(e){let n=w(!1),i=w(!1),a=Je(),c=w(null),l=w(null),f=w(null),p=_(`addTabBtn`),m=ae(p,{threshold:.1}),g=w(!1),v=e=>{c.value&&(e.preventDefault(),c.value.scrollLeft+=e.deltaY*2.5)},b=()=>{if(!c.value)return;let e=c.value.querySelector(`.pod-tab.active`);e&&e.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})};h(()=>a.currentTab,()=>{E(()=>{b()})});function x(){let e=c.value;if(!e){n.value=!1,i.value=!1;return}let t=e.scrollLeft,r=e.scrollWidth-e.clientWidth;n.value=t>2,i.value=r-t>2}function T(){x()}s(()=>{window.addEventListener(`keydown`,ee),E(()=>{x(),c.value&&(c.value.addEventListener(`scroll`,T),window.addEventListener(`resize`,x))})}),d(()=>{window.removeEventListener(`keydown`,ee),c.value&&(c.value.removeEventListener(`scroll`,T),window.removeEventListener(`resize`,x))});let k=e=>{l.value=e},j=e=>{f.value=e},M=e=>{l.value&&l.value!==e&&a.reorderTabs(l.value,e),l.value=null,f.value=null};function ee(e){e.ctrlKey&&e.shiftKey&&e.key===`Tab`?(e.preventDefault(),a.activatePreviousTab()):e.ctrlKey&&e.key===`Tab`&&(e.preventDefault(),a.activateNextTab()),(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`t`&&(e.preventDefault(),a.openTab()),(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`w`&&(e.preventDefault(),a.closeTab(a.currentTab))}return(e,n)=>I(a).activeTabs.length>1?(r(),y(`div`,$i,[O(`div`,{ref_key:`tabsContainer`,ref:c,class:P([`pod-tabs`,{"solo-tab":I(a).activeTabs.length===1}]),onWheel:v},[O(`div`,ea,[O(`div`,ta,[(r(!0),y(D,null,o(I(a).activeTabs,e=>(r(),C(Zi,{key:e.id,tab:e,"is-dragging":l.value===e.id,"is-drag-over":f.value===e.id,onDragstart:k,onDragover:j,onDrop:M,onDragend:n[0]||=()=>{l.value=null,f.value=null}},null,8,[`tab`,`is-dragging`,`is-drag-over`]))),128)),g.value?(r(),C(Ge,{key:`add-tab-btn`,round:``,size:`sm`,class:`add-tab-btn`,onClick:n[1]||=e=>I(a).openTab(),ref_key:`addTabBtn`,ref:p},{default:u(()=>[L(X,{name:`plus`})]),_:1},512)):S(``,!0)])])],34),g.value?t((r(),y(`div`,na,[L(Ge,{key:`add-tab-btn`,round:``,size:`sm`,class:`add-tab-btn`,onClick:n[2]||=e=>I(a).openTab()},{default:u(()=>[L(X,{name:`plus`})]),_:1})],512)),[[A,!I(m)]]):S(``,!0)])):S(``,!0)}})})),aa=e((()=>{})),oa,sa=e((()=>{ia(),ia(),aa(),q(),oa=Z(ra,[[`__scopeId`,`data-v-b2912c4b`]])})),ca,la=e((()=>{M(),W(),Bt(),Y(),ca=i({__name:`SidebarToggleButton`,setup(e){let t=K(),n=j({get(){return t.isCompact?t.leftDrawerOverlayOpened:t.leftDrawerOpen},set(e){t.isCompact?t.leftDrawerOverlayOpened=e:t.leftDrawerOpen=e}});function i(){t.wishCompactSidebar=!t.wishCompactSidebar}return(e,t)=>(r(),C($,{onClick:t[0]||=e=>n.value=!I(n),onDragenter:t[1]||=e=>n.value=!0,onContextmenu:x(i,[`prevent`,`stop`])},{default:u(()=>[I(n)?(r(),C(X,{key:0,name:`sidebar-opened`})):(r(),C(X,{key:1,name:`sidebar-closed`}))]),_:1}))}})})),ua=e((()=>{})),da,fa=e((()=>{la(),la(),ua(),q(),da=Z(ca,[[`__scopeId`,`data-v-73bf271d`]])})),pa=e((()=>{})),ma,ha,ga,_a=e((()=>{M(),Bt(),Nt(),n(),pa(),q(),ma={class:`nav-glyph`},ha={__name:`AudioLabsButton`,setup(e){return(e,t)=>(r(),C($,{title:e.$i(`term.audioSettings`),"native-title":``,onClick:I(jt)},{default:u(()=>[O(`div`,ma,[L(I(T),{type:`headphones`})])]),_:1},8,[`title`,`onClick`]))}},ga=Z(ha,[[`__scopeId`,`data-v-ea017faf`]])})),va,ya,ba,xa,Sa=e((()=>{M(),Ke(),It(),Q(),bt(),Ze(),va=[`title`],ya={class:`profile-artwork`},ba=[`src`],xa=i({__name:`HomeButton`,setup(e){let t=gt();G();let n=j(()=>t.profile?.attributes?.artwork?qe(t.profile?.attributes?.artwork.url,64,64):Ht);return(e,t)=>(r(),y(`div`,{class:`profile-button`,title:e.$i(`home.title`),onClick:t[0]||=e=>I(nt)().push(`/am/home`)},[O(`div`,ya,[O(`img`,{src:I(n)},null,8,ba)])],8,va))}})})),Ca=e((()=>{})),wa,Ta=e((()=>{Sa(),Sa(),Ca(),q(),wa=Z(xa,[[`__scopeId`,`data-v-5b9d785c`]])})),Ea,Da=e((()=>{M(),Y(),Bt(),Nt(),W(),Ea=i({__name:`SearchButton`,setup(e){let t=K();function n(){if(t.commandCenterOpen){t.commandCenterOpen=!1;return}Yt()}return(e,i)=>(r(),C($,{"native-title":``,title:e.$i(`term.search`),active:I(t).commandCenterOpen,onClick:n},{default:u(()=>[L(X,{name:`search`})]),_:1},8,[`title`,`active`]))}})})),Oa=e((()=>{})),ka,Aa=e((()=>{Da(),Da(),Oa(),q(),ka=Z(Ea,[[`__scopeId`,`data-v-5d080093`]])})),ja,Ma,Na,Pa,Fa,Ia,La,Ra,za=e((()=>{U(),Ae(),He(),Fe(),Oe(),ke(),M(),yn(),_t(),tn(),Y(),ja={key:0,class:`notification-pill__resting`},Ma=[`onClick`],Na={class:`notification-pill__text`},Pa={class:`notification-pill__title`},Fa={key:0,class:`notification-pill__subtitle`},Ia={key:3,class:`notification-pill__badge`},La=`nicon:`,Ra=i({__name:`NotificationMorphic`,setup(e){let t=ht(),{contentRef:n,measuredWidth:i,measuredHeight:a,measure:s}=xn(),c={info:`ion-information-circle`,success:`ion-checkmark-circle`,warning:`ion-warning`,error:`ion-close-circle`},l=j(()=>t.activeNotification),d=j(()=>l.value!==null),f=j(()=>!l.value&&t.hasPersistent),p=j(()=>d.value||f.value),m=j(()=>!l.value||l.value.working?null:l.value.icon??c[l.value.type]??c.info),_=j(()=>m.value?.startsWith(La)??!1),v=j(()=>m.value?_.value?m.value.slice(6):m.value:``),T=j(()=>p.value?d.value?{width:i.value===null?`auto`:`${i.value}px`}:{width:`38px`}:{}),A=w(0);return h(()=>l.value?.id,()=>{A.value=t.queueCount}),h(()=>t.queueCount,e=>{e>A.value&&(A.value=e)}),h([d,()=>l.value?.title,()=>l.value?.subtitle,()=>l.value?.working],()=>{d.value&&E(s)}),(e,i)=>(r(),C(g,{name:`morphic-pill`},{default:u(()=>[p.value?(r(),y(`div`,{key:0,class:P([`notification-pill window-nodrag`,{"notification-pill--resting":f.value}]),style:k(T.value)},[f.value?(r(),y(`div`,ja,[I(t).hasWorking?(r(),C(Ut,{key:0,size:`1.3em`})):(r(),C(ue,{key:1,name:`ion-notifications`,size:`1.4em`})),L(je,{anchor:`bottom middle`,self:`top middle`},{default:u(()=>[L(De,{class:`notify-popup-list`,separator:``},{default:u(()=>[(r(!0),y(D,null,o(I(t).persistentList,e=>(r(),C(Re,{key:e.id,clickable:``},{default:u(()=>[e.working?(r(),C(Me,{key:0,side:``},{default:u(()=>[L(Ut)]),_:1})):(r(),C(Me,{key:1,side:``},{default:u(()=>[O(`div`,{class:`dismiss-btn`,onClick:x(n=>I(t).dismiss(e.id),[`stop`])},[L(ue,{name:`close`})],8,Ma)]),_:2},1024)),L(Me,null,{default:u(()=>[L(Ce,null,{default:u(()=>[b(N(e.title),1)]),_:2},1024),e.subtitle?(r(),C(Ce,{key:0,caption:``},{default:u(()=>[b(N(e.subtitle),1)]),_:2},1024)):S(``,!0)]),_:2},1024),e.progress==null?S(``,!0):(r(),C(Me,{key:2,side:``},{default:u(()=>[b(N(e.progress)+`% `,1)]),_:2},1024))]),_:2},1024))),128))]),_:1})]),_:1})])):(r(),y(`div`,{key:1,ref_key:`contentRef`,ref:n,class:`notification-pill__content`},[L(g,{name:`notif-swap`,mode:`out-in`},{default:u(()=>[(r(),y(`div`,{class:`notification-pill__inner`,key:l.value?.id??``},[l.value?.working?(r(),C(Ut,{key:0,size:`1.3em`,class:`notification-pill__icon`})):m.value&&_.value?(r(),C(X,{key:1,name:v.value,size:`1.3em`,class:`notification-pill__icon`},null,8,[`name`])):m.value?(r(),C(ue,{key:2,name:v.value,size:`1.3em`,class:`notification-pill__icon`},null,8,[`name`])):S(``,!0),O(`div`,Na,[O(`span`,Pa,N(l.value?.title),1),l.value?.subtitle?(r(),y(`span`,Fa,N(l.value?.subtitle),1)):S(``,!0)]),A.value>0?(r(),y(`span`,Ia,` +`+N(A.value),1)):S(``,!0)]))]),_:1})],512))],6)):S(``,!0)]),_:1}))}})})),Ba=e((()=>{})),Va,Ha=e((()=>{za(),za(),Ba(),q(),Va=Z(Ra,[[`__scopeId`,`data-v-bf558b69`]])})),Ua,Wa=e((()=>{V(),M(),Nt(),W(),Ua=i({__name:`UpdateAppButton`,setup(e){let t=K();function n(){Lt(`updates`)}return(e,i)=>I(t).updateAvailable?(r(),C(Ge,{key:0,color:`primary`,icon:`ion-ios-download`,label:e.$i(`action.update`),onClick:n},null,8,[`label`])):S(``,!0)}})})),Ga,Ka=e((()=>{Wa(),Wa(),Ga=Ua})),qa=e((()=>{})),Ja,Ya,Xa=e((()=>{M(),kt(),W(),qa(),q(),Ja={__name:`window-controls-pill`,setup(e){let t=K();return s(()=>{t.inlinePillMounted=!0}),l(()=>{t.inlinePillMounted=!1}),(e,n)=>(r(),y(`div`,{class:P([`window-controls-pill window-nodrag`,{"out-of-focus":I(t).windowFocusState==`blurred`}]),"app-window-controls":`1`},[O(`button`,{class:`pill-btn`,title:`Minimize`,onClick:n[0]||=e=>I(At).minimizeWindow()},[...n[6]||=[O(`div`,{class:`codicon codicon-chrome-minimize`},null,-1)]]),I(t).window.maximized?(r(),y(`button`,{key:1,class:`pill-btn`,title:`Restore`,onClick:n[3]||=e=>I(At).maximizeWindow(),onContextmenu:n[4]||=x(e=>I(At).toggleFullscreen(),[`prevent`])},[...n[8]||=[O(`div`,{class:`codicon codicon-chrome-restore`},null,-1)]],32)):(r(),y(`button`,{key:0,class:`pill-btn`,title:`Maximize`,onClick:n[1]||=e=>I(At).maximizeWindow(),onContextmenu:n[2]||=x(e=>I(At).toggleFullscreen(),[`prevent`])},[...n[7]||=[O(`div`,{class:`codicon codicon-chrome-maximize`},null,-1)]],32)),O(`button`,{class:`pill-btn close`,title:`Close`,onClick:n[5]||=e=>I(At).closeWindow()},[...n[9]||=[O(`div`,{class:`codicon codicon-chrome-close`},null,-1)]])],2))}},Ya=Z(Ja,[[`__scopeId`,`data-v-6bf83d91`]])})),Za,Qa,$a,eo=e((()=>{qt(),we(),ve(),U(),ke(),Be(),M(),R(),Se(),tt(),Q(),kt(),Ln(),_a(),ct(),wt(),W(),sa(),Ta(),En(),wn(),Dn(),Aa(),Bt(),In(),zi(),Ui(),Ha(),An(),fa(),Ka(),Xa(),Za={class:`tabs-container`},Qa={class:`overflow-items-grid`},$a=i({__name:`chrome-top`,props:{secondaryBar:{type:Boolean,default:!1},searchBar:{type:Boolean,default:!0},noControls:{type:Boolean,default:!1},excludeControls:{default:()=>[]}},setup(e){let t=K(),n=ge(),i=Ot(),a=G(),s=e,c=$e(),l=j(()=>t.getWindowControlsSide()),d=oe(),f=j(()=>J(`audio.ciderAudio.enabled`)&&J(`audio.ciderAudio.showInToolbar`)),p=j(()=>t.leftDrawerOpen?!J(`components.SidebarProfile.HasMainMenu`)||!J(`components.SidebarProfile.Enabled`):!0),m=j(()=>J(`ui.mainMenuPosition`)===`left`),h=j(()=>s.searchBar===!1?!1:!t.sidebarSearchVisible),_=j(()=>{let e=a.visual.layoutType;return e===`maverick`||e===`cupertino`||e===`maverick-if`||t.appMode!==`browser`?!1:c===`win32`&&a.visual.forceViewportRounding&&!t.rightDrawerOpen}),v=j(()=>!!(t.isIfLayout&&l.value==`left`&&!t.leftDrawerOpen||!t.isIfLayout&&l.value==`left`)),b=j(()=>Ye.CustomButtons.getCustomButtonsByPosition(`chrome-top/right`)),w=j(()=>J(`casting.enabled`)&&J(`audio.ciderAudio.enabled`)&&!s.excludeControls.includes(`airplay`)),T=j(()=>w.value||b.value.length>0||t.updateAvailable);return(s,c)=>{let E=en;return r(),y(D,null,[L(I(d).define,null,{default:u(()=>[w.value?(r(),C(zn,{key:0})):S(``,!0),(r(!0),y(D,null,o(b.value,(e,t)=>(r(),C(Mn,{key:t,button:e},null,8,[`button`]))),128)),L(Ga)]),_:1}),L(Ie,{class:P([`text-default flex chrome-top window-drag`,{"full-w":e.secondaryBar,"window-nodrag":e.secondaryBar,"color-enabled":I(J)(`visual.useAdaptiveColors`),"left-controls":v.value,"no-controls":I(t).hasTitleBar||I(t).isIfLayout&&l.value==`left`||e.noControls,"pill-controls":_.value}]),onDblclick:c[0]||=x(e=>I(At).maximizeWindow(),[`self`])},{default:u(()=>[m.value&&!e.excludeControls.includes(`mainMenu`)&&p.value?(r(),C(Rn,{key:0})):S(``,!0),L(Ri),L(da),I(J)(`appleMusic.home.buttonLocation`)==`top`&&I(J)(`ui.chromeTopWidget`)!=`am-tabs`?(r(),C(wa,{key:1})):S(``,!0),f.value?(r(),C(ga,{key:2})):S(``,!0),I(t).pageLoading?(r(),C($,{key:3},{default:u(()=>[L(Ne,{size:`16px`})]),_:1})):S(``,!0),L(Ue),O(`div`,Za,[L(oa)]),h.value?(r(),C(ka,{key:4})):S(``,!0),L(Va),I(n).screen.width<850&&T.value?(r(),C($,{key:5,"native-title":``,title:`Hidden Icons`},{menu:u(()=>[L(je,null,{default:u(()=>[O(`div`,Qa,[L(I(d).reuse)])]),_:1})]),default:u(()=>[L(ue,{name:`fa-solid fa-chevron-down`})]),_:1})):(r(),C(I(d).reuse,{key:6})),L(E,null,{default:u(()=>[L(Hi),e.excludeControls.includes(`lyrics`)?S(``,!0):(r(),C(On,{key:0})),e.excludeControls.includes(`queue`)?S(``,!0):(r(),C(kn,{key:1})),e.secondaryBar&&(I(i).player.playerType==`podcast`||I(a).audio.allowPlaybackRateChangeEverywhere)?(r(),C(Tn,{key:2})):S(``,!0),!m.value&&!e.excludeControls.includes(`mainMenu`)&&p.value?(r(),C(Rn,{key:3})):S(``,!0)]),_:1}),L(g,{name:`pill-slide`},{default:u(()=>[_.value?(r(),C(Ya,{key:0})):S(``,!0)]),_:1})]),_:1},8,[`class`])],64)}}})})),to=e((()=>{})),no,ro=e((()=>{eo(),eo(),to(),q(),no=Z($a,[[`__scopeId`,`data-v-51528563`]])})),io,ao=e((()=>{M(),Q(),W(),wt(),Hn(),Ft(),io=i({__name:`ChromeArtworkBlurMap`,setup(e){let t=Ot(),n=w(new Image),i=new Image;i.crossOrigin=`anonymous`;let a=Et(),o=K(),s=j(()=>o.windowIsHidden?`hidden`:o.windowFocusState===`blurred`?`blurred`:`active`),c=j(()=>a.visual.sweetener.immersiveBGStyle),l=w(``);function d(){console.log(`image tag loaded`),n.value=i}let f=j(()=>c.value==`lite`?`saturate(${a.visual.sweetener.immersive_bg_filter.saturate}%) contrast(${a.visual.sweetener.immersive_bg_filter.contrast}%)`:`saturate(${a.visual.sweetener.immersive_bg_filter.saturate}%) contrast(${a.visual.sweetener.immersive_bg_filter.contrast}%) brightness(${a.visual.sweetener.immersive_bg_filter.brightness}%)`),p=j(()=>({brightness:a.visual.sweetener.immersive_bg_filter.brightness,blur:a.visual.sweetener.immersive_bg_filter.blur,saturate:100,contrast:100})),m=j(()=>a.visual.sweetener.immersive_lower_fps_on_blur&&o.windowFocusState==`blurred`?15:a.visual.sweetener.immersive_bg_fps);return h(()=>t.player.currentArtworkUrlHiRes||t.player.currentArtworkUrl||``,e=>{if(!e){l.value=``,n.value=void 0;return}l.value=e,n.value=void 0,i.onload=d,i.src=e},{immediate:!0}),(e,t)=>I(o).windowIsHidden?S(``,!0):(r(),y(`div`,{key:0,class:`blurmap-container`,style:k({"--filter":f.value})},[c.value=="default"?(r(),C(Vt,{key:0,image:n.value,"max-framerate":m.value,"visibility-tier":s.value},null,8,[`image`,`max-framerate`,`visibility-tier`])):S(``,!0),c.value==`lite`?(r(),C(g,{key:1,name:`bgfade`},{default:u(()=>[(r(),C(Un,{key:l.value,"artwork-url":l.value,"filter-settings":p.value,"no-mask":``},null,8,[`artwork-url`,`filter-settings`]))]),_:1})):S(``,!0)],4))}})})),oo=e((()=>{})),so,co=e((()=>{ao(),ao(),oo(),q(),so=Z(io,[[`__scopeId`,`data-v-aff88c40`]])})),lo=e((()=>{}));function uo(e,t){return r(),y(`div`,po)}var fo,po,mo,ho=e((()=>{M(),lo(),q(),fo={},po={class:`page-viewport-glaze`},mo=Z(fo,[[`render`,uo],[`__scopeId`,`data-v-d390f47d`]])})),go=e((()=>{})),_o,vo,yo=e((()=>{M(),W(),Q(),go(),q(),_o={__name:`AdaptiveColorBackground`,setup(e){let t=K(),n=j(()=>J(`visual.adaptiveColorPercent`)*.01);return(e,i)=>(r(),C(g,{name:`fade`},{default:u(()=>[(r(),y(`div`,{id:`adaptive-bg-container`,key:I(t).surfaceColor},[O(`div`,{id:`adaptive-bg`,style:k({backgroundColor:I(t).surfaceColor,opacity:n.value})},null,4)]))]),_:1}))}},vo=Z(_o,[[`__scopeId`,`data-v-6dc505d1`]])})),bo,xo,So=e((()=>{M(),rt(),gn(),bo=[`currnet-route`],xo=i({__name:`AppScrollBounds`,setup(e){let t=w(),n=Je(),{markScrolling:i}=dn(),a=j(()=>n.activeTabs.find(e=>e.id===n.currentTab)),o=0,c=()=>{if(!t.value||!a.value)return;let e=n.currentPath;e&&(a.value.scrollPositions||(a.value.scrollPositions={}),a.value.scrollPositions[e]=o)},l=()=>{if(!t.value||!a.value)return;let e=n.currentPath;a.value.scrollPositions||(a.value.scrollPositions={});let r=a.value.scrollPositions[e];r===void 0?(t.value.scrollTop=0,o=0):(t.value.scrollTop=r,o=r)};function u(){return t.value?.scrollTop??o}let f=()=>{i()},m=()=>{o=u(),c()};return h(()=>n.currentPath,(e,n)=>{!t.value||!e||e===n||(n&&a.value&&(a.value.scrollPositions||(a.value.scrollPositions={}),a.value.scrollPositions[n]=u()),t.value.scrollTop=0,o=0)}),h(()=>n.currentTab,(e,r)=>{if(!t.value||e===r)return;let i=n.activeTabs.find(e=>e.id===r);if(i){let e=i.path;e&&(i.scrollPositions||={},i.scrollPositions[e]=u())}E(()=>{l()})}),s(()=>{n.activeTabs.forEach(e=>{e.scrollPositions||={}}),t.value&&(t.value.addEventListener(`scroll`,f,{passive:!0}),t.value.addEventListener(`scrollend`,m,{passive:!0}))}),d(()=>{t.value&&(t.value.removeEventListener(`scroll`,f),t.value.removeEventListener(`scrollend`,m)),c()}),(e,i)=>(r(),y(`div`,{id:`app-scroll-bounds`,"currnet-route":I(n).currentPath,ref_key:`AppScrollBounds`,ref:t},[p(e.$slots,`default`,{},void 0,!0)],8,bo))}})})),Co=e((()=>{})),wo,To=e((()=>{So(),So(),Co(),q(),wo=Z(xo,[[`__scopeId`,`data-v-a4841362`]])})),Eo,Do=e((()=>{V(),B(),fe(),he(),_e(),H(),M(),yt(),lt(),Pt(),Gt(),Eo=i({__name:`LoginButton`,setup(e){let t=w(!1),n=w(``),{showContextMenu:i}=it(Ct(({actionItem:e,$i:n})=>[e(n(`action.sidebar.signIn.with`).replace(`{account}`,n(`term.apple`)),()=>o()),e(n(`action.sidebar.signIn.with`).replace(`{account}`,n(`term.userToken`)),()=>t.value=!0)])),a=()=>{localStorage.setItem(`oobe-welcome`,`true`),zt(n.value)},o=()=>{localStorage.setItem(`oobe-welcome`,`true`),zt()};return(e,o)=>(r(),y(D,null,[L(Ge,{onClick:I(i),class:`full-width`,color:`primary`,icon:`apple`,label:e.$i(`action.sidebar.signIn`).replace(`{account}`,e.$i(`term.appleMusic`))},null,8,[`onClick`,`label`]),L(ze,{modelValue:I(t),"onUpdate:modelValue":o[2]||=e=>F(t)?t.value=e:null},{default:u(()=>[L(pe,null,{default:u(()=>[L(le,null,{default:u(()=>[L(Pe,{modelValue:I(n),"onUpdate:modelValue":o[0]||=e=>F(n)?n.value=e:null,type:`password`,label:e.$i(`term.userToken`)},null,8,[`modelValue`,`label`])]),_:1}),L(me,{align:`right`},{default:u(()=>[L(Ge,{label:e.$i(`dialog.cancel`),color:`primary`,onClick:o[1]||=e=>t.value=!1},null,8,[`label`]),L(Ge,{label:e.$i(`menu.signIn`),color:`primary`,onClick:a},null,8,[`label`])]),_:1})]),_:1})]),_:1},8,[`modelValue`])],64))}})})),Oo,ko=e((()=>{Do(),Do(),Oo=Eo})),Ao,jo,Mo,No,Po,Fo,Io,Lo,Ro,zo,Bo,Vo,Ho,Uo=e((()=>{M(),rt(),ne(),It(),Q(),St(),In(),Ke(),W(),bt(),Ze(),f(),Ao={key:0,class:`profile-background`},jo={style:{width:`0`,height:`0`,position:`absolute`},"aria-hidden":`true`,focusable:`false`},Mo=[`src`],No={class:`profile-artwork`},Po=[`src`],Fo={class:`profile-info`},Io={key:0,class:`title-with-badges`},Lo={class:`title-text profile-name`},Ro={class:`ellipsis`},zo={key:1,class:`title-with-badges`},Bo={class:`ellipsis`},Vo={key:0,class:`profile-mainmenu`},Ho=i({__name:`SidebarProfile`,setup(e){ee(e=>({aa888db4:I(o)}));let n=gt(),i=G(),a=Je(),o=w(`var(--musicKeyColor)`),s=w(`var(--musicKeyColor)`),c=j(()=>{let e=i.components.SidebarProfile.CustomArtworkPath;return e&&typeof e==`string`&&!e.startsWith(`file://`)?e:n.profile?.attributes?.artwork?qe(n.profile?.attributes?.artwork.url,64,64):Ht});h(c,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 xt(t),n=e.map(e=>m({r:e.r,g:e.g,b:e.b})).sort((e,t)=>t.toHsl().s-e.toHsl().s);if(n.length>0)if(o.value=n[0].toHexString(),n.length>=2){let e=n[0].toHexString();s.value=`
                radial-gradient(circle at top left, ${e}, transparent 70%),
                radial-gradient(circle at bottom right, ${n[1].toHexString()}, transparent 70%),
                radial-gradient(circle at center, ${n[2]?n[2].toHexString():e} 20%, transparent 80%),
                ${m(n[0]).darken(30).toHexString()}
              `}else s.value=n[0].toHexString();else o.value=`var(--musicKeyColor)`,s.value=`var(--musicKeyColor)`}catch(e){console.error(`Failed to extract colors`,e),o.value=`var(--musicKeyColor)`,s.value=`var(--musicKeyColor)`}}}catch(e){console.error(`Failed to load image for color extraction`,e),o.value=`var(--musicKeyColor)`,s.value=`var(--musicKeyColor)`}else o.value=`var(--musicKeyColor)`,s.value=`var(--musicKeyColor)`},{immediate:!0});let l=j(()=>a.currentPath.startsWith(`/am/home`));function u(){nt().push(`/am/home`)}let{compactSidebar:d}=re(K()),f=j(()=>n.profile),p=j(()=>{if(i.components.SidebarProfile.NameVisible)return i.components.SidebarProfile.CustomName?i.components.SidebarProfile.CustomName:f.value?.attributes?.name}),g=j(()=>{if(!i.components.SidebarProfile.HandleVisible)return;if(i.components.SidebarProfile.CustomHandle)return i.components.SidebarProfile.CustomHandle;let e=f.value?.attributes?.handle,t=p.value;if(!(e&&t&&e.toLowerCase()===t.toLowerCase()))return e}),_=j(()=>i.components.SidebarProfile.HasMainMenu);return(e,n)=>(r(),y(`div`,{class:P([`profile-tab`,{"mini-profile":I(d)}])},[O(`div`,{class:P([`profile-btn`,{active:I(l)}]),onClick:x(u,[`self`])},[I(l)?(r(),y(`div`,Ao,[(r(),y(`svg`,jo,[...n[0]||=[O(`filter`,{id:`profile-turbulence`},[O(`feTurbulence`,{type:`fractalNoise`,baseFrequency:`0.05`,numOctaves:`3`,result:`noise`}),O(`feDisplacementMap`,{in:`SourceGraphic`,in2:`noise`,scale:`20`})],-1)]])),O(`img`,{src:I(c)},null,8,Mo)])):S(``,!0),O(`div`,No,[O(`img`,{src:I(c)},null,8,Po)]),t(O(`div`,Fo,[I(p)?(r(),y(`div`,Io,[O(`div`,Lo,[O(`div`,Ro,N(I(p)),1)])])):S(``,!0),I(g)?(r(),y(`div`,zo,[O(`div`,{class:P([`title-text`,{"profile-handle":I(p),"profile-name":!I(p)}])},[O(`div`,Bo,N(I(g)),1)],2)])):S(``,!0)],512),[[A,!I(d)]])],2),I(_)?(r(),y(`div`,Vo,[L(Rn)])):S(``,!0)],2))}})})),Wo=e((()=>{})),Go,Ko=e((()=>{Uo(),Uo(),Wo(),q(),Go=Z(Ho,[[`__scopeId`,`data-v-cd28e675`]])})),qo,Jo,Yo=e((()=>{M(),R(),Q(),qo={class:`scrollbar-track`},Jo=i({__name:`OverlayScrollbar`,props:{element:{}},setup(e){let t=G(),n=w(null),{pressed:i}=z({target:n}),a=e,o=w(100),c=w(0),l=w(!0),u=w(0);function f(){l.value&&(o.value=a.element.clientHeight/a.element.scrollHeight*100,c.value=a.element.scrollTop/a.element.scrollHeight*100,u.value=a.element.clientHeight)}function p(e){let t=(e.clientY-n.value.getBoundingClientRect().top-o.value/2)/n.value.clientHeight*a.element.scrollHeight;a.element.scrollTo(0,t),c.value=a.element.scrollTop/a.element.scrollHeight*100}function m(e){if(!i.value)return;let t=(e.clientY-n.value.getBoundingClientRect().top-o.value/2)/n.value.clientHeight*a.element.scrollHeight;a.element.scrollTo(0,t),c.value=a.element.scrollTop/a.element.scrollHeight*100}let g=w(!1);function _(){g.value=!0}function v(){g.value=!1}h(()=>i.value,e=>{l.value=!e});let b=new ResizeObserver(f),x=new MutationObserver(f);return s(()=>{if(t.visual.scrollbarType==`native`)return;let e=a.element;e.addEventListener(`scroll`,f),e.addEventListener(`resize`,f),e.addEventListener(`mouseover`,_),e.addEventListener(`mouseleave`,v),e.classList.add(`no-scrollbar`),x.observe(e,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),b.observe(e),o.value=a.element.clientHeight/a.element.scrollHeight*100,c.value=a.element.scrollTop/a.element.scrollHeight*100}),d(()=>{let e=a.element;e.removeEventListener(`scroll`,f),e.removeEventListener(`resize`,f),e.removeEventListener(`mouseover`,_),e.removeEventListener(`mouseleave`,v),x.disconnect(),b.unobserve(e)}),h(()=>t.visual.scrollbarType,()=>{let e=a.element;t.visual.scrollbarType==="default"?e.classList.add(`no-scrollbar`):e.classList.remove(`no-scrollbar`)},{immediate:!0}),(e,a)=>I(o)<100&&I(t).visual.scrollbarType=="default"?(r(),y(`div`,{key:0,class:P([`scrollbar-container`,{"not-visible":!I(g),"is-active":I(i)}]),ref_key:`ScrollContainer`,ref:n,onMousemove:m,onMousedown:p,style:k({height:I(u)+`px`})},[O(`div`,qo,[O(`div`,{class:`scrollbar-thumb`,style:k({height:I(o)+`%`,top:I(c)+`%`})},null,4)])],38)):S(``,!0)}})})),Xo=e((()=>{})),Zo,Qo=e((()=>{Yo(),Yo(),Xo(),q(),Zo=Z(Jo,[[`__scopeId`,`data-v-6614a548`]])})),$o,es=e((()=>{V(),M(),yt(),lt(),pt(),Bt(),Y(),$o=i({__name:`ProviderSwitcher`,props:{as:{}},setup(e){let t=ot(),{showContextMenu:n}=it(Ct(({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`})])),i=j(()=>{switch(t.provider){case`applemusic`:return`apple-music-note`;case`local-music`:return`media-library`;default:return`media-library`}});return(t,a)=>e.as==`chrome-button`?(r(),C($,{key:0,onMousedown:x(I(n),[`left`])},{default:u(()=>[L(X,{name:I(i)},null,8,[`name`])]),_:1},8,[`onMousedown`])):(r(),C(Ge,{key:1,round:``,dense:``,onMousedown:x(I(n),[`left`]),class:`provider-button`},{default:u(()=>[L(X,{name:I(i)},null,8,[`name`])]),_:1},8,[`onMousedown`]))}})})),ts=e((()=>{})),ns,rs=e((()=>{es(),es(),ts(),q(),ns=Z($o,[[`__scopeId`,`data-v-755fd342`]])})),is,as,os,ss,cs,ls,us,ds,fs=e((()=>{M(),Q(),ko(),bt(),mt(),pt(),W(),Sn(),Ko(),Qo(),rs(),is={class:`cider-sidebar`},as={key:0,class:`osx-gap window-drag`},os={key:1,class:`win-gap window-drag`},ss={key:2,class:`sidebar-widget search-widget`},cs={key:0},ls={key:1,class:`q-mb-md`},us={key:0},ds=i({__name:`Sidebar`,props:{searchBar:{type:Boolean}},setup(e){let t=K(),n=gt();ut();let i=ot(),o=w();G();let c=j(()=>!1);return s(()=>{}),(s,l)=>(r(),y(`div`,is,[I(t).getWindowControlsSide()==`left`&&I(t).isIfLayout&&!I(t).hasTitleBar?(r(),y(`div`,as)):(r(),y(`div`,os)),!I(t).compactSidebar&&e.searchBar?(r(),y(`div`,ss,[(r(),C(a(I(i).getComponent(`SearchBar`)),{"results-position":`left`,label:s.$i(`term.search`)},null,8,[`label`])),I(c)?(r(),C(ns,{key:0})):S(``,!0)])):S(``,!0),I(i).provider===`applemusic`?(r(),y(D,{key:3},[O(`div`,{class:`sidebar-scroll-content no-scrollbar`,ref_key:`ScrollContent`,ref:o},[I(t).sidebarType==`am-sidebar`?(r(),y(D,{key:0},[I(J)(`ui.mainMenuPosition`)===`left`&&I(t).leftDrawerOpen&&s.$q.screen.xs?(r(),y(`br`,cs)):S(``,!0),I(n).isAuthorized?S(``,!0):(r(),y(`div`,ls,[L(Oo,{sidebar:``})])),L(Cn),I(o)?(r(),C(Zo,{key:2,element:I(o)},null,8,[`element`])):S(``,!0)],64)):S(``,!0)],512),I(J)(`components.SidebarProfile.Enabled`)?(r(),y(`div`,us,[L(Go)])):S(``,!0)],64)):(r(),C(a(I(i).getComponent(`Sidebar`)),{key:4}))]))}})})),ps=e((()=>{})),ms,hs=e((()=>{fs(),fs(),ps(),q(),ms=Z(ds,[[`__scopeId`,`data-v-4d455e54`]])})),gs=e((()=>{})),_s,vs,ys,bs=e((()=>{M(),Q(),gs(),q(),_s=500,vs={__name:`AppBlurMap`,props:{inline:{type:Boolean,default:!1}},setup(e){let t=w(null),n=Et(),i=null,a=new Image,o=!1,c=0,l=0,u=0;a.addEventListener(`load`,()=>{o=!0,a.src}),h(n,e=>{e&&(o=!0)});function f(){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,s=window.innerHeight;t.value.width=i,t.value.height=s,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),c=window.screenX,l=window.screenY,Date.now()-u>=_s&&(u=Date.now(),o=!1)}if((c!==window.screenX||l!==window.screenY)&&(o=!0),document.hidden){i=null;return}i=requestAnimationFrame(f)}function p(){o=!0}let m=null;function g(){document.hidden||i===null&&(o=!0,f())}return s(()=>{o=!0,f(),window.addEventListener(`resize`,p),m=()=>g(),document.addEventListener(`visibilitychange`,m)}),d(()=>{i!==null&&cancelAnimationFrame(i),window.removeEventListener(`resize`,p),m&&document.removeEventListener(`visibilitychange`,m),m=null}),(n,i)=>(r(),y(`canvas`,{id:`appBlurMap`,class:P({inline:e.inline}),ref_key:`canvas`,ref:t},null,2))}},ys=Z(vs,[[`__scopeId`,`data-v-a75f8cf2`]])})),xs=e((()=>{}));function Ss(e,t){return r(),y(`div`,ws,[...t[0]||=[O(`div`,{class:`immersive-lcd-metadata`},[O(`amp-lcd-metadata`)],-1)]])}var Cs,ws,Ts,Es=e((()=>{M(),xs(),q(),Cs={},ws={class:`c-metadata`},Ts=Z(Cs,[[`render`,Ss],[`__scopeId`,`data-v-07d47bd8`]])}));export{xi as A,mr as B,Hi as C,Mi as D,zi as E,Pr as F,qn as H,Fr as I,_r as L,ai as M,ei as N,Ni as O,ti as P,gr as R,sa as S,Ri as T,Kn as V,no as _,ms as a,fa as b,Qo as c,vo as d,yo as f,co as g,so as h,bs as i,ii as j,bi as k,wo as l,ho as m,Es as n,hs as o,mo as p,ys as r,Zo as s,Ts as t,To as u,ro as v,Ui as w,oa as x,da as y,pr as z};