if(Joomla&&Joomla.getOptions("js-extensions-update")){const e=(e,o)=>{const s=document.getElementById("plg_quickicon_joomlaupdate"),t=[].slice.call(s.querySelectorAll("span.j-links-link"));s&&s.classList.add(e),t.length&&t.forEach((e=>{e.innerHTML=Joomla.sanitizeHtml(o)}))},o=()=>{const o=Joomla.getOptions("js-joomla-update");Joomla.enqueueRequest({url:o.ajaxUrl,method:"GET",promise:!0}).then((s=>{const t=s.responseText,a=JSON.parse(t);if(Array.isArray(a))if(0===a.length)e("success",Joomla.Text._("PLG_QUICKICON_JOOMLAUPDATE_UPTODATE"));else{const s=a.shift();s.version!==o.version?e("danger",Joomla.Text._("PLG_QUICKICON_JOOMLAUPDATE_UPDATEFOUND").replace("%s",`<span class="badge text-dark bg-light"> ‎ ${s.version}</span>`)):e("success",Joomla.Text._("PLG_QUICKICON_JOOMLAUPDATE_UPTODATE"))}else e("danger",Joomla.Text._("PLG_QUICKICON_JOOMLAUPDATE_ERROR"))})).catch((()=>{e("danger",Joomla.Text._("PLG_QUICKICON_JOOMLAUPDATE_ERROR"))}))};window.addEventListener("load",(()=>{setTimeout(o,300)}))}