const mss=document.getElementById("mss"),div1=document.getElementById("div1"),messageError1=document.getElementById("messageError1"),formData=document.getElementById("fSD");let validationData=!1;formData.addEventListener("submit",e=>{!0===div1.classList.contains("success")&&(validationData=!0),!1===validationData&&e.preventDefault()});const sendButton=document.getElementById("bSD");sendButton.addEventListener("click",()=>{let e=mss.value.trim();0===e.length?(div1.classList.remove("success"),mss.classList.add("error-input"),messageError1.classList.add("show-error-message")):e.length>=3?(div1.classList.add("success"),mss.classList.remove("error-input"),messageError1.classList.remove("show-error-message")):e.length<3&&(div1.classList.remove("success"),mss.classList.add("error-input"),messageError1.classList.add("show-error-message"))}),mss.addEventListener("input",function(){mss.value.trim().length>=3&&(div1.classList.add("success"),mss.classList.remove("error-input"),messageError1.classList.remove("show-error-message"))});const expiryTime=300;let remainingTime=300;function updateCounter(){let e=Math.floor(remainingTime/60),t=remainingTime%60;document.getElementById("minutes").textContent=e.toString().padStart(2,"0"),document.getElementById("seconds").textContent=t.toString().padStart(2,"0"),"00"===document.getElementById("minutes").textContent&&"00"===document.getElementById("seconds").textContent&&window.location.reload()}function countdown(){remainingTime>0?(remainingTime--,updateCounter()):(clearInterval(interval),document.querySelector(".counter").textContent="Expired")}updateCounter();const interval=setInterval(countdown,1e3);