!function(){"use strict";document.addEventListener("DOMContentLoaded",(()=>{const e=document.querySelector("#JS-test-btn"),t=document.querySelector("#JS-test-input"),s=document.querySelector("#JS-test-loader"),o=document.querySelector("#JS-test-msg"),n=(e,t=!1)=>{o.innerHTML=e,t?o.classList.add("success"):o.classList.remove("success")};e.addEventListener("click",(e=>{e.preventDefault();const o=new FormData;o.append("action",wpmastertoolkit_smtp_mailer.action),o.append("nonce",wpmastertoolkit_smtp_mailer.nonce),o.append("testEmail",t.value);const a={method:"POST",body:o,redirect:"follow"};n(""),s.classList.add("show"),fetch(wpmastertoolkit_smtp_mailer.ajaxUrl,a).then((e=>e.json())).then((e=>{e.success?n(e.data.message,!0):n(e.data.message,!1),s.classList.remove("show"),console.log(e)}))}))}))}();