function eslpDisplayMessage(e,t){const n=document.createElement("div");n.textContent=e,n.className=`eslp_message eslp_message_${t}`,document.body.appendChild(n),setTimeout((()=>{n.remove()}),3e3)}document.querySelectorAll(".eslp_copy_content").forEach((function(e){e.addEventListener("click",(async function(){var e=this.getAttribute("data-copy-target"),t=document.getElementById(e);if(t){t.select(),t.setSelectionRange(0,99999);try{await navigator.clipboard.writeText(t.value),eslpDisplayMessage("Text copied to clipboard!","success")}catch(e){console.error("Error copying text:",e),eslpDisplayMessage("It was not possible to copy the text.","error")}}else eslpDisplayMessage("Text field not found.","error")}))})),document.addEventListener("DOMContentLoaded",(function(){window.toggleSecret=function(e){var t=document.getElementById(e);t.type="password"===t.type?"text":"password"}})),document.addEventListener("DOMContentLoaded",(function(){const e=document.getElementById("eslp_open_tutorial");e&&e.addEventListener("click",(function(){const e=document.querySelector('a[data-lightbox="tutorial"]');e&&e.click()}))})),document.addEventListener("DOMContentLoaded",(function(){const e=document.getElementById("eslp_donate_message_id"),t=document.getElementById("eslp_close_time_message_id"),n=document.getElementById("eslp_close_message_id");e&&(t&&t.addEventListener("click",(function(t){t.preventDefault(),fetch(donateMessageAjax.ajaxUrl+"?action=eslp_hide_message_time").then((()=>{e.style.display="none"}))})),n&&n.addEventListener("click",(function(t){t.preventDefault(),e.style.display="none"})))}));