document.addEventListener("DOMContentLoaded",function(){var e=document.querySelector(".eb-admin-promotion-close");e&&e.addEventListener("click",function(e){e.preventDefault();var n=new FormData;n.append("action","eb_admin_promotion"),n.append("admin_nonce",EssentialBlocksLocalize.admin_nonce),fetch(EssentialBlocksLocalize.ajax_url,{method:"POST",body:n}).then(function(e){return e.text()}).then(function(e){if(JSON.parse(e).success){var n=document.getElementById("eb-admin-promotion-message");n&&n.remove()}}).catch(function(e){return console.log(e)})})});