PageSourceSearch

https://www.after.band/_next/static/chunks/85-3aecdd983678cd2f.js

js after.band collected 2026-10-08 16:13:14 UTC 15,389 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[85],{85:(e,t,r)=>{"use strict";r.d(t,{default:()=>y});var l=r(95155),a=r(12115),n=r(66766),i=r(92988),s=r.n(i),c=r(70853);let o=e=>{let{width:t=600,height:r=200,dotColumns:n=40,dotSize:i=3,dotGap:s=5,smoothing:c=4,fftSize:o=2048,sizeRandomness:u=.8,isActive:d=!0}=e,h=(0,a.useRef)(null),p=(0,a.useRef)(0);(0,a.useRef)(!0);let f=(0,a.useRef)([]),y=(0,a.useRef)(Array.from({length:n},()=>({smoothingFactor:.15+.25*Math.random(),frequencyMultiplier:.8+.4*Math.random(),phaseOffset:Math.random()*Math.PI*2,sensitivity:.7+.6*Math.random(),decay:.88+.08*Math.random()}))),m=(0,a.useRef)(0),[x,g]=(0,a.useState)(!1),v=(0,a.useRef)(d);return(0,a.useEffect)(()=>{v.current=d},[d]),(0,a.useEffect)(()=>{f.current=Array(n).fill(0),g(!0)},[]),(0,a.useEffect)(()=>{if(!x)return;let e=h.current;if(!e)return;let l=e.getContext("2d");if(!l)return;(()=>{var l;let a=null==(l=e.parentElement)?void 0:l.getBoundingClientRect();a?(e.width=a.width,e.height=a.height):(e.width=t,e.height=r)})();let a=()=>{let t;v.current?(m.current+=16,t=(e=>{let t=new Uint8Array(256);for(let r=0;r<t.length;r++){let l=90*Math.sin(6e-4*e+.17*r)+50*Math.sin(.0013*e+.09*r+1.3)+35*Math.sin(.0021*e-.05*r+2.1),a=43758.5453*Math.sin((r+1)*12.9898+e%1e4*2e-4),n=l*Math.exp(-(.0065*r))+100+(a-Math.floor(a)-.5)*30+120*(Math.random()>.985);t[r]=Math.max(0,Math.min(255,n))}return t})(m.current)):t=new Uint8Array(256),l.clearRect(0,0,e.width,e.height);let r=e.width/n,c=i+s,o=Math.floor(e.height/c);for(let a=0;a<n;a++){let s=y.current[a],h=0;if(v.current){let e=Math.floor(a/n*t.length*.5*s.frequencyMultiplier)%t.length;h=t[e]/255*s.sensitivity}let p=f.current[a],m=h,x=m>p?p+(m-p)*(1-s.smoothingFactor):p*s.decay;x=Math.max(0,Math.min(1,x)),f.current[a]=x;let g=Math.floor((d?x:Math.max(.9*x,1/o))*o),_=a*r+r/2;for(let t=0;t<g;t++){let r=e.height-t*c-2*i,a=t/o,n=1-.4*a,s=Math.max(.5,i*(1-.15*a)*(1+(Math.random()-.5)*(v.current?u:.05*u)));l.beginPath(),l.arc(_,r,s,0,2*Math.PI),l.fillStyle="rgba(255,255,255,".concat(n*Math.min(1,x+.1),")"),l.fill()}}p.current=requestAnimationFrame(a)};return a(),()=>{p.current&&cancelAnimationFrame(p.current)}},[x,n,i,s,u,t,r,d]),(0,l.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center",zIndex:0},children:(0,l.jsx)("canvas",{ref:h,style:{width:"100%",height:"100%"}})})},u=()=>(0,l.jsx)("svg",{width:"14",height:"16",viewBox:"0 0 14 16",fill:"currentColor","aria-hidden":"true",children:(0,l.jsx)("polygon",{points:"0,0 14,8 0,16"})}),d=()=>(0,l.jsxs)("svg",{width:"14",height:"16",viewBox:"0 0 14 16",fill:"currentColor","aria-hidden":"true",children:[(0,l.jsx)("rect",{x:"0",y:"0",width:"4",height:"16"}),(0,l.jsx)("rect",{x:"10",y:"0",width:"4",height:"16"})]}),h=()=>(0,l.jsxs)("svg",{width:"14",height:"16",viewBox:"0 0 14 16",fill:"currentColor","aria-hidden":"true",children:[(0,l.jsx)("polygon",{points:"14,0 6,8 14,16"}),(0,l.jsx)("rect",{x:"0",y:"0",width:"2",height:"16"})]}),p=()=>(0,l.jsxs)("svg",{width:"14",height:"16",viewBox:"0 0 14 16",fill:"currentColor","aria-hidden":"true",children:[(0,l.jsx)("polygon",{points:"0,0 8,8 0,16"}),(0,l.jsx)("rect",{x:"12",y:"0",width:"2",height:"16"})]}),f=e=>{let{showPlaylist:t=!1}=e,{isPlaying:r,currentTime:i,duration:f,volume:y,muted:m,loading:x,currentTrack:g,currentTrackIndex:v,playlist:_,togglePlay:k,skipToNext:M,skipToPrevious:w,seekTo:E,setVolume:b,toggleMute:A,selectTrack:P,play:j}=(0,c.e)(),T=(0,a.useCallback)(e=>{if(!Number.isFinite(e))return"0:00";let t=Math.floor(e/60),r=Math.floor(e%60);return"".concat(t,":").concat(r.toString().padStart(2,"0"))},[]);return _.length?x&&!g?(0,l.jsx)("div",{className:s().player,children:"Loading audio..."}):(0,l.jsxs)("div",{className:"".concat(s().player," flex flex-col min-h-0"),children:[(0,l.jsx)(o,{isActive:r}),(null==g?void 0:g.title)&&(0,l.jsx)("span",{className:s().backgroundTitle,children:g.title}),(0,l.jsx)("div",{className:s().nowPlaying,children:(0,l.jsx)("span",{className:s().trackTitle,children:(null==g?void 0:g.title)||"—"})}
1),(0,l.jsxs)("div",{className:s().controls,children:[(0,l.jsx)("a",{href:(null==g?void 0:g.spotifyUrl)||"https://open.spotify.com/artist/7KfMR05zRrWyhQimnYa8li",target:"_blank",rel:"noopener noreferrer",className:s().serviceControl,"aria-label":"Open in Spotify",children:(0,l.jsx)(n.default,{src:"/spotify-button.png",alt:"Spotify",width:40,height:40,style:{objectFit:"contain",width:"100%",height:"100%"},priority:!0,unoptimized:!0})}),(0,l.jsx)("button",{className:s().control,"aria-label":"Previous",onClick:w,disabled:x,children:(0,l.jsx)(h,{})}),(0,l.jsx)("button",{className:s().control,onClick:k,"aria-label":r?"Pause":"Play",disabled:x,style:{position:"relative"},children:x?(0,l.jsx)("div",{style:{width:"14px",height:"14px",border:"2px solid currentColor",borderTop:"2px solid transparent",borderRadius:"50%",animation:"spin 1s linear infinite"}}):r?(0,l.jsx)(d,{}):(0,l.jsx)(u,{})}),(0,l.jsx)("button",{className:s().control,"aria-label":"Next",onClick:M,disabled:x,children:(0,l.jsx)(p,{})}),(null==g?void 0:g.appleMusicUrl)?(0,l.jsx)("a",{href:g.appleMusicUrl,target:"_blank",rel:"noopener noreferrer",className:s().serviceControl,"aria-label":"Open in Apple Music",children:(0,l.jsx)(n.default,{src:"/apple-button.png",alt:"Apple Music",width:40,height:40,style:{objectFit:"contain",width:"100%",height:"100%"},priority:!0,unoptimized:!0})}):(0,l.jsx)("button",{disabled:!0,className:"".concat(s().serviceControl," opacity-50 cursor-not-allowed"),"aria-label":"Open in Apple Music",children:(0,l.jsx)(n.default,{src:"/apple-button.png",alt:"Apple Music",width:40,height:40,style:{objectFit:"contain",width:"100%",height:"100%"},priority:!0,unoptimized:!0})})]}),(0,l.jsxs)("div",{className:s().progressWrapper,children:[(0,l.jsx)("span",{className:s().time,children:T(i)}),(0,l.jsx)("input",{type:"range",min:"0",max:f||0,value:i,onChange:e=>{E(parseFloat(e.target.value))},className:s().progress,disabled:x||!g}),(0,l.jsx)("span",{className:s().time,children:T(f)})]}),(0,l.jsxs)("div",{className:s().volume,children:[(0,l.jsx)("button",{className:s().control,onClick:A,"aria-label":m?"Unmute":"Mute",children:m||0===y?(0,l.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[(0,l.jsx)("path",{d:"M16.5 12a4.5 4.5 0 0 0-2.5-4.03v8.05A4.5 4.5 0 0 0 16.5 12z"}),(0,l.jsx)("path",{d:"M4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25 1.27-1.27L4.27 3z"})]}):(0,l.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[(0,l.jsx)("path",{d:"M3 9v6h4l5 5V4L7 9H3z"}),(0,l.jsx)("path",{d:"M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"})]})}),(0,l.jsx)("input",{type:"range",min:"0",max:"0.3",step:"0.01",value:m?0:y,onChange:e=>{b(parseFloat(e.target.value))},"aria-label":"Volume"})]}),t&&(0,l.jsx)("div",{className:s().playlistContainer,children:_.map((e,t)=>(0,l.jsxs)("button",{className:"".concat(s().playlistItem," ").concat(t===v?s().playlistItemActive:""),onClick:()=>P(t),children:[(0,l.jsxs)("span",{className:s().trackIndex,children:[t+1,"."]}),(0,l.jsx)("span",{className:s().trackTitle,children:e.title}),(0,l.jsx)("span",{className:s().trackDuration,children:T(e.duration)})]},e.id))})]}):(0,l.jsx)("div",{className:s().player,children:"Loading tracks..."})},y=e=>{let{showPlaylist:t}=e;return(0,l.jsx)(f,{showPlaylist:t})}},70853:(e,t,r)=>{"use strict";r.d(t,{V:()=>c,e:()=>o});var l=r(95155),a=r(12115);let n={isPlaying:!1,currentTime:0,duration:0,volume:.3,muted:!1,loading:!1,error:null,currentTrack:null,playlist:[],currentTrackIndex:0,playbackRate:1,shuffle:!1,shuffledPlaylist:[],shuffledIndex:0},i="after_music_player",s=(0,a.createContext)(null),c=e=>{let{children:t}=e,[r,c]=(0,a.useState)([]),o=function(e){let{playlist:t,autoPlay:r=!1,onTrackChange:l,onError:s,onStateChange:c}=e,o=(0,a.useRef)(null),[u,d]=(0,a.useState)(n);(0,a.useEffect)(()=>{o.current=new Audio,o.current.crossOrigin="anonymous";let e=o.current;try{let e=localStorage.getItem(i);if(e){let t=JSON.parse(e);d(e=>{var r,l,a,n;return{...e,volume:null!=(r=t.volume)?r:1,muted:null!=(l=t.muted)&&l,currentTrackIndex:null!=(a=t.currentTrackIndex)?a:0,shuffle:null!=(n=t.shuffle)&&n}})}}catch(e){console.warn("Failed to load player state from localStorage:",e)}return()=>{e&&(e.pause(),e.src="")}},[]),(0,a.useEffect)(()=>
1{if(!u.loading)return;let e=setTimeout(()=>{d(e=>e.loading?{...e,loading:!1,isPlaying:!1,error:{code:"MEDIA_ERR_NETWORK",message:"Track failed to load. Check connection and try again.",timestamp:new Date}}:e)},1e4);return()=>clearTimeout(e)},[u.loading]);let h=(0,a.useCallback)(e=>{let t=[...e];for(let e=t.length-1;e>0;e--){let r=Math.floor(Math.random()*(e+1));[t[e],t[r]]=[t[r],t[e]]}return t},[]);(0,a.useEffect)(()=>{d(e=>{let r=e.currentTrackIndex>=t.length?0:e.currentTrackIndex,l=e.shuffle?h(t):t,a=t[r]||t[0]||null,n=e.shuffle&&a?l.findIndex(e=>e.id===a.id):r;return{...e,playlist:t,shuffledPlaylist:l,currentTrack:a,currentTrackIndex:r,shuffledIndex:n>=0?n:0}})},[t,h]),(0,a.useEffect)(()=>{let e=o.current;if(!e)return;let t=()=>{d(e=>({...e,loading:!0,error:null}))},r=()=>{d(t=>({...t,loading:!1,duration:e.duration||0}))},l=()=>{d(t=>({...t,currentTime:e.currentTime||0}))},a=()=>{d(e=>({...e,isPlaying:!1})),m()},n=()=>{var t;let r=function(e){switch(e){case 1:return"MEDIA_ERR_ABORTED";case 2:default:return"MEDIA_ERR_NETWORK";case 3:return"MEDIA_ERR_DECODE";case 4:return"MEDIA_ERR_SRC_NOT_SUPPORTED"}}(null==(t=e.error)?void 0:t.code),l={code:r,message:function(e){switch(e){case"MEDIA_ERR_ABORTED":return"Audio playback was aborted";case"MEDIA_ERR_NETWORK":return"Network error occurred while loading audio";case"MEDIA_ERR_DECODE":return"Audio file could not be decoded";case"MEDIA_ERR_SRC_NOT_SUPPORTED":return"Audio format not supported";default:return"Unknown audio error occurred"}}(r),timestamp:new Date};d(e=>({...e,loading:!1,isPlaying:!1,error:l})),null==s||s(l)},i=()=>{d(e=>({...e,isPlaying:!0}))},c=()=>{d(e=>({...e,isPlaying:!1}))};return e.addEventListener("loadstart",t),e.addEventListener("canplay",r),e.addEventListener("timeupdate",l),e.addEventListener("ended",a),e.addEventListener("error",n),e.addEventListener("play",i),e.addEventListener("pause",c),()=>{e.removeEventListener("loadstart",t),e.removeEventListener("canplay",r),e.removeEventListener("timeupdate",l),e.removeEventListener("ended",a),e.removeEventListener("error",n),e.removeEventListener("play",i),e.removeEventListener("pause",c)}},[s]),(0,a.useEffect)(()=>{let e=o.current,t=u.currentTrack;e&&t&&(e.src=t.previewUrl,e.volume=u.volume,e.muted=u.muted,u.isPlaying?(e.load(),e.play().catch(console.error)):r&&u.playlist.length>0&&e.play().catch(console.error),null==l||l(t))},[u.currentTrack,r,l]),(0,a.useEffect)(()=>{let{volume:e,muted:t,currentTrackIndex:r,shuffle:l}=u;try{localStorage.setItem(i,JSON.stringify({volume:e,muted:t,currentTrackIndex:r,shuffle:l}))}catch(e){console.warn("Failed to save player state:",e)}null==c||c(u)},[u,c]);let p=(0,a.useCallback)(async()=>{let e=o.current;if(e&&u.currentTrack)try{await e.play()}catch(e){if(e instanceof Error&&"NotAllowedError"===e.name){let e={code:"MEDIA_ERR_ABORTED",message:"Tap the play button to start audio (mobile browser restriction)",timestamp:new Date};d(t=>({...t,loading:!1,isPlaying:!1,error:e})),null==s||s(e)}else console.error("Failed to play audio:",e)}},[u.currentTrack,s]),f=(0,a.useCallback)(()=>{let e=o.current;e&&e.pause()},[]),y=(0,a.useCallback)(()=>{u.isPlaying?f():p()},[u.isPlaying,p,f]),m=(0,a.useCallback)(()=>{d(e=>{if(e.shuffle){let t=(e.shuffledIndex+1)%e.shuffledPlaylist.length,r=e.shuffledPlaylist[t],l=e.playlist.findIndex(e=>e.id===(null==r?void 0:r.id));return{...e,shuffledIndex:t,currentTrackIndex:l>=0?l:0,currentTrack:r||null}}{let t=(e.currentTrackIndex+1)%e.playlist.length;return{...e,currentTrackIndex:t,currentTrack:e.playlist[t]||null}}})},[]),x=(0,a.useCallback)(()=>{d(e=>{if(e.shuffle){let t=0===e.shuffledIndex?e.shuffledPlaylist.length-1:e.shuffledIndex-1,r=e.shuffledPlaylist[t],l=e.playlist.findIndex(e=>e.id===(null==r?void 0:r.id));return{...e,shuffledIndex:t,currentTrackIndex:l>=0?l:0,currentTrack:r||null}}{let t=0===e.currentTrackIndex?e.playlist.length-1:e.currentTrackIndex-1;return{...e,currentTrackIndex:t,currentTrack:e.playlist[t]||null}}})},[]),g=(0,a.useCallback)(e=>{let t=o.current;t&&(t.currentTime=e)},[]),v=(0,a.useCallback)(e=>{let t=o.current;if(!t)return;let r=Math.max(0,Math.min(.7,e));t.volume=r,d(e=>({...e,volume:r}))},[]),_=(0,a.useCallback)(()=>{let e=o.current;if(!e)return;let t=!u.muted;e.muted=t,d(e=>({...e,muted:t}))},[u.muted]),k=(0,a.useCallback)(e=>{e<0||e>=u.playlist.length||d(t=>{let r=t.playlist[e],l=t.shuffle&&r?t.shuffledPlaylist.findIndex(e=>e.id===r.id):e;return{...t,currentTrackIndex:e,shuffledIndex:l>=0?l:e,currentTrack:r||null}})},[u.playlist.length]),M=(0,a.useCallback)(()=>{d(e=>{let t=!e.shuffle,r=t?h(e.playlist):e.playlist,l=e.currentTrack,a=t&&l?r.findIndex(e=>e.id===l.id):e.currentTrackIndex;return{...e,shuffle:t,shuffledPlaylist:r,shuffledIndex:a>=0?a:0}})},[h]);return{...u,audioRef:o,play:p,pause:f,togglePlay:y,skipToNext:m,skipToPrevious:x,seekTo:g,setVolume:v,toggleMute:_,selectTrack:k,toggleShuffle:M}}({playlist:r,autoPlay:!1}
1);return(0,a.useEffect)(()=>{(async()=>{try{let t=await fetch("/api/itunes/artist-tracks");if(!t.ok)throw Error("HTTP ".concat(t.status,": ").concat(t.statusText));let r=await t.json();if(!r.success){var e;console.warn("iTunes API returned error:",(null==(e=r.error)?void 0:e.message)||"Unknown error");return}if(!r.data||!Array.isArray(r.data))return void console.warn("No track data received from iTunes API");let l=r.data.map(e=>({id:e.id,title:e.title,artist:e.artist,album:e.album,duration:e.duration,previewUrl:e.previewUrl,artworkUrl:e.artworkUrl,appleMusicUrl:e.trackViewUrl||"https://music.apple.com/us/song/".concat(e.id)}));c(l),console.log("Loaded ".concat(l.length," tracks from iTunes API"))}catch(e){console.error("GlobalAudioPlayerContext: failed to fetch tracks",e)}})()},[]),(0,l.jsx)(s.Provider,{value:o,children:t})};function o(){let e=(0,a.useContext)(s);if(!e)throw Error("useGlobalAudioPlayer must be used within AudioPlayerProvider");return e}},92988:e=>{e.exports={player:"AppleMusicPlayer_player__yYvi5",nowPlaying:"AppleMusicPlayer_nowPlaying__O9Ey_",trackTitle:"Ap
1pleMusicPlayer_trackTitle__5nqPQ",artistName:"AppleMusicPlayer_artistName__HHkZS",spotifyBtn:"AppleMusicPlayer_spotifyBtn__3wFlz",spotifyLabel:"AppleMusicPlayer_spotifyLabel__xaP4g",controls:"AppleMusicPlayer_controls__3Tpe8",control:"AppleMusicPlayer_control__gjyAJ",progressWrapper:"AppleMusicPlayer_progressWrapper__dN6av",progress:"AppleMusicPlayer_progress__jICOY",time:"AppleMusicPlayer_time__wAfC1",volume:"AppleMusicPlayer_volume__XV1O6",playlistContainer:"AppleMusicPlayer_playlistContainer__QEXa_",playlistItem:"AppleMusicPlayer_playlistItem__aKuqE",playlistItemActive:"AppleMusicPlayer_playlistItemActive__vdeA2",trackIndex:"AppleMusicPlayer_trackIndex__92oVA",trackDuration:"AppleMusicPlayer_trackDuration___s4LB",backgroundTitle:"AppleMusicPlayer_backgroundTitle__ocCGa",serviceControl:"AppleMusicPlayer_serviceControl__gWRF1",spin:"AppleMusicPlayer_spin__erl0v"}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.