(()=>{var a;a=function(){tainacan_dashboard.disable_cards_sorting&&(document.querySelectorAll("#tainacan-dashboard-app .postbox").forEach((function(a){return a.classList.add("not-sortable")})),jQuery((function(a){a(".meta-box-sortables").sortable({cancel:".not-sortable"})}))),function(){if(!tainacan_dashboard.disable_news_card){var a=document.getElementById("tainacan-dashboard-news");if(a&&null!==a.offsetParent){var n=new URLSearchParams;n.append("action","tainacan_fetch_dashboard_news"),n.append("_nonce",tainacan_dashboard.nonce),fetch(tainacan_dashboard.ajax_url,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:n}).then((function(a){return a.json()})).then((function(n){n.success?a.innerHTML=n.data.html:a.innerHTML="<p>"+n.data.message+"</p>"})).catch((function(n){console.error("Error fetching dashboard news:",n);var e=document.createElement("p");e.textContent=tainacan_dashboard.error_message,a.innerHTML="",a.appendChild(e)}))}}}()},/comp|inter|loaded/.test(document.readyState)?a():document.addEventListener("DOMContentLoaded",a,!1)})();