text: /*!
   * eAudio.js v1.0.1
   * (c) 2019 DIDAVA Media
   * Released under the MIT License.
   * https://www.didava.ir
   * https://github.com/DIDAVA/eAudio
   */
  const AudioContext=window.AudioContext||window.webkitAudioContext;class eAudio extends Audio{constructor(e){const t=["function"==typeof Audio,"function"==typeof AudioContext,"function"==typeof GainNode,"function"==typeof DynamicsCompressorNode,"function"==typeof BiquadFilterNode];if(t.includes(!1))throw new Error("Incompatible Browser");super();const n=new AudioContext,o=n.createMediaElementSource(this),i=n.createGain();let s=[o,i];const r=[31,63,125,250,500,1e3,2e3,4e3,8e3,16e3];r.forEach((e,t)=>{const o=n.createBiquadFilter();0==t?o.type="lowshelf":t==r.length-1?o.type="highshelf":o.type="peaking",o.frequency.value=e;const i=`q${e}`;Object.defineProperty(this,i,{enumerable:!0,get:()=>o.gain.value,set(e){e>6?e=6:e<-24&&(e=-24),o.gain.value=e}}),s.push(o)});const u=n.createAnalyser();u.maxDecibels=-9,u.minDecibels=-96,u.fftSize=128,u.smoothingTimeConstant=.75;let a=new Uint8Array(u.frequencyBinCount);s.push(u,n.destination),s.forEach((e,t)=>{0!=t&&s[t-1].connect(e)}),Object.defineProperties(eAudio.prototype,{playToggle:{enumerable:!0,get(){return!this.paused},set(e){"boolean"==typeof e&&(this.paused?this.play():this.pause())}},specLines:{enumerable:!0,get:()=>u.fftSize,set(e){[16,32,64,128,256,512,1024].includes(e)&&(u.fftSize=2*e,a=new Uint8Array(u.frequencyBinCount))}},specSmooth:{enumerable:!0,get:()=>u.smoothingTimeConstant,set(e){"number"==typeof e&&e>=0&&e<=1&&(u.smoothingTimeConstant=e)}},specFreq:{enumerable:!0,get:()=>(u.getByteFrequencyData(a),a)},specDomain:{enumerable:!0,get:()=>(u.getByteTimeDomainData(a),a)},formattedTime:{enumerable:!0,get(){const e=(e,t)=>("000"+e).slice(-1*t),t=this.currentTime,n=Math.floor(t/3600),o=Math.floor(t/60)%60,i=Math.floor(t-60*o);return`${e(n,2)}:${e(o,2)}:${e(i,2)}`}},preset:{enumerable:!0,get(){return JSON.stringify({s:this.currentSrc,v:this.volume,0:this.q31,1:this.q63,2:this.q125,3:this.q250,4:this.q500,5:this.q1000,6:this.q2000,7:this.q4000,8:this.q8000,9:this.q16000})},set(e){const t=JSON.parse(e);"object"==typeof t&&("string"==typeof t.s&&(this.src=t.s),"number"==typeof t.v&&(this.volume=t.v),"number"==typeof t[0]&&(this.q31=t[0]),"number"==typeof t[1]&&(this.q63=t[1]),"number"==typeof t[2]&&(this.q125=t[2]),"number"==typeof t[3]&&(this.q250=t[3]),"number"==typeof t[4]&&(this.q500=t[4]),"number"==typeof t[5]&&(this.q1000=t[5]),"number"==typeof t[6]&&(this.q2000=t[6]),"number"==typeof t[7]&&(this.q4000=t[7]),"number"==typeof t[8]&&(this.q8000=t[8]),"number"==typeof t[9]&&(this.q16000=t[9]))}}}),eAudio.prototype.fadein=function(e=3){i.gain.linearRampToValueAtTime(1,n.currentTime+e)},eAudio.prototype.fadeout=function(e=3){i.gain.linearRampToValueAtTime(1e-6,n.currentTime+e)},e&&(this.src=e)}}
  export default eAudio;