Build 533169stable
Module 449754
741 characters · in no known chunkDependencies
Source Raw
function(e,t,n){"use strict";n.d(t,{A:()=>T});var r=n(982520),i=n.n(r),s=n(439372),a=n(400492);let o=100,l=.5,u=500,c=(0,a.Qh)("vibing_wumpus","vibing_wumpus",0),d=0,_=0,f=null;function p(e,t){let n=Math.round(100*e),r=Math.round(100*_),s=Math.round(100*d);n>0&&s>=r||n<0&&s<=r?(clearInterval(f),0===r&&null!=t&&t()):(s+=n,d=s/100,c.volume=i()(d,0,l))}function h(e){null!=f&&clearInterval(f),_=0;let t=A();f=setInterval(()=>{p(t,e)},o)}function m(){null!=f&&clearInterval(f),c.loop(),_=l;let e=A();f=setInterval(()=>p(e),o)}function E(){h(c.pause.bind(c))}function g(){h(c.stop.bind(c))}function A(){return o/u*(_-d)}class I extends s.A{actions={VIBING_WUMPUS_PLAY_MUSIC:m,VIBING_WUMPUS_STOP_MUSIC:g,VIBING_WUMPUS_PAUSE_MUSIC:E}}let T=new I}