window.daextrevopGeneral=function(){"use strict";let t,n={value:null,utterance:null,synth:null};function a(){var e;n.playIcon=document.getElementById("daextrevop-play-icon"),n.playCircle=document.getElementById("daextrevop-play-circle"),n.pauseCircle=document.getElementById("daextrevop-pause-circle"),n.currentTime=document.getElementById("daextrevop-current-time"),void 0!==n.playIcon&&null!=n.playIcon&&(window.speechSynthesis.cancel(),n.synth=window.speechSynthesis,e=window.daextrevop_content,n.utterance=new SpeechSynthesisUtterance,n.utterance.text=e,""!==window.DAEXTREVOP_PHPDATA.speechSynthesisLang&&(n.utterance.lang=window.DAEXTREVOP_PHPDATA.speechSynthesisLang),n.utterance.pitch=window.DAEXTREVOP_PHPDATA.speechSynthesisPitch,n.utterance.rate=window.DAEXTREVOP_PHPDATA.speechSynthesisRate,n.utterance.volume=window.DAEXTREVOP_PHPDATA.speechSynthesisVolume,n.utterance.addEventListener("end",e=>{n.playCircle.classList.remove("daextrevop-display-none"),n.pauseCircle.classList.add("daextrevop-display-none"),n.currentTime.textContent="0:00"}),n.utterance.addEventListener("boundary",e=>{var e=Math.round(e.elapsedTime/1e3),t=Math.floor(e/60),e=(e-60*t).toString().padStart(2,"0");n.currentTime.textContent=t+":"+e}),n.playIcon.addEventListener("click",()=>{(!1===n.synth.speaking?(n.synth.speak(n.utterance),n.playCircle.classList.add("daextrevop-display-none"),n.pauseCircle):window.speechSynthesis.paused?(n.synth.resume(n.utterance),n.playCircle.classList.add("daextrevop-display-none"),n.pauseCircle):(n.synth.pause(n.utterance),n.pauseCircle.classList.add("daextrevop-display-none"),n.playCircle)).classList.remove("daextrevop-display-none")}))}return{initialize:function(e){t=e,document.addEventListener("DOMContentLoaded",()=>{a()})}}}(),window.daextrevopGeneral.initialize({});