1"use strict";(self.webpackChunkweb=self.webpackChunkweb||[]).push([[487],{473:function(e,n,c){c(2791);n.Z=c.p+"static/media/audio-spinner.c903c7c74b37cccf746ed0700eabd28e.svg"},9401:function(e,n,c){c(2791);n.Z=c.p+"static/media/loading-spinner.63623cd63cd5d02d2228bd2db215718e.svg"},7418:function(e,n,c){c(2791);n.Z=c.p+"static/media/pause.adf29ed4dbef48364d3bce5241dce5ca.svg"},5404:function(e,n,c){c(2791);n.Z=c.p+"static/media/play.38880997e9b1fec46b84257d72668cbf.svg"},487:function(e,n,c){c.r(n),c.d(n,{default:function(){return p}});var t=c(885),r=c(2791),a=c(4777),i=c(5946),s=function(e){if(!e)return"0:0";var n=Math.floor(e/60),c=Math.floor(e-60*n),t=c<10?"0"+c:c;return"".concat(n<10?"0"+n:n,":").concat(t)},u=c(8093),l=c(5404),o=c(7418);var d=c.p+"static/media/play-next.e0792decb0fda2a7dc7e56d045c0f841.svg";var f=c.p+"static/media/play-prev.b925e9a1c221047ef99dde1be0b094dd.svg",v=(c(473),c(9401)),m=c(184),p=function(){var e=(0,r.useContext)(i.pC),n=(0,r.useContext)(i.K7),c=n.currentTrack,p=n.tracks,x=c.trackIndex,h=c.isPlaying,b=c.fileUrl,L=c.isLoading,g=(0,r.useState)(0),C=(0,t.Z)(g,2),k=C[0],j=C[1],N=(0,r.useRef)(new Audio(b)),y=N.current.duration,E=(0,r.useRef)(),P=(0,r.useMemo)((function(){return s(k)}),[k]),Z=(0,r.useMemo)((function(){return s(y)}),[y]),I=N.current.readyState<=2,K=function(){clearInterval(E.current),E.current=setInterval((function(){N.current.ended?A():j(N.current.currentTime)}),[1e3])},w=function(){h||(0,i.Lc)(e,!0),K(),(0,a.Kz)(u.Z.PLAYER_SLIDER_CHANGE)},A=function(){(0,i.Lc)(e,!1);var n=0;x<p.length-1&&(n=x+1);var c=p[n];c.trackIndex=n,(0,i.Jh)(e,c),(0,a.Kz)(u.Z.PLAYER_NEXT_CLICK)},_=function(){(0,i.Lc)(e,!0),(0,a.Kz)(u.Z.PLAYER_PLAY_CLICK,{isPlaying:!0})},R=function(){(0,i.Lc)(e,!1),(0,a.Kz)(u.Z.PLAYER_PLAY_CLICK,{isPlaying:!1})},Y=(0,r.useCallback)((function(e){32===e.keyCode&&(h?R():_())}),[h]);return(0,r.useEffect)((function(){var n,c;b&&((0,i.Lc)(e,!1),null===N||void 0===N||null===(n=N.current)||void 0===n||n.pause(),N.current=new Audio(b),(0,i.Lc)(e,!0),null===N||void 0===N||null===(c=N.current)||void 0===c||c.play(),K())}),[b]),(0,r.useEffect)((function(){var e,n;h?null===N||void 0===N||null===(e=N.current)||void 0===e||e.play():null===N||void 0===N||null===(n=N.current)||void 0===n||n.pause()}),[h]),(0,r.useEffect)((function(){I?(0,i.K4)(e,!0):(0,i.K4)(e,!1)}),[I]),(0,r.useEffect)((function(){return function(){N.current.pause(),clearInterval(E.current)}}),[]),(0,r.useEffect)((function(){return window.addEventListener("keydown",Y),function(){window.removeEventListener("keydown",Y)}}),[Y]),(0,m.jsx)("div",{className:"music-player-container",children:(0,m.jsx)("div",{className:"music-player",children:(0,m.jsxs)("div",{className:"track-info",children:[(0,m.jsxs)("div",{className:"timeline",children:[(0,m.jsx)("div",{className:"time-track",children:(0,m.jsx)("input",{type:"range",value:k,step:"1",min:"0",max:y||"".concat(y),className:"progress",onChange:function(e){return n=e.target.value,clearInterval(E.current),N.current.currentTime=n,void j(N.current.currentTime);var n},onMouseUp:w,onKeyUp:w})}),(0,m.jsxs)("div",{className:"time-elapsed",children:[(0,m.jsx)("span",{className:"time start",children:P}),(0,m.jsx)("p",{className:"track-meta",children:c.name}),(0,m.jsx)("span",{className:"time end",children:Z})]})]}),(0,m.jsxs)("div",{className:"controls",children:[(0,m.jsx)("button",{className:"control-prev",onClick:function(){return function(){(0,i.Lc)(e,!1);var n=0;n=x-1<0?p.length-1:x-1;var c=p[n];c.trackIndex=n,(0,i.Jh)(e,c),(0,a.Kz)(u.Z.PLAYER_PREVIOUS_CLICK)}()},children:(0,m.jsx)("img",{src:f,alt:"Previous"})}),h?(0,m.jsx)("button",{className:"control-current",onClick:R,children:(0,m.jsx)("img",{src:L?v.Z:o.Z,alt:"Pause"})}):(0,m.jsx)("button",{className:"control-current",onClick:_,children:(0,m.jsx)("img",{src:L?v.Z:l.Z,alt:"Pause"})}),(0,m.jsx)("button",{className:"control-next",onClick:function(){return A()},children:(0,m.jsx)("img",{src:d,alt:"Next"})})]})]})})})}}}]); 2//# sourceMappingURL=487.8c96cbde.chunk.js.map
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.