((t,e)=>{if(!e)throw new Error("Joomla API is not properly initialised");e.addShortcut=(t,e)=>{hotkeys(t,"joomla",(t=>{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),e.call()}))},e.addClickShortcut=(o,s)=>{e.addShortcut(o,(()=>{const e=t.querySelector(s);e&&e.click()}))},e.addFocusShortcut=(o,s)=>{e.addShortcut(o,(()=>{const e=t.querySelector(s);e&&e.focus()}))},e.addLinkShortcut=(t,o)=>{e.addShortcut(t,(()=>{window.location.href=o}))};t.addEventListener("DOMContentLoaded",(()=>{const o=e.getOptions("plg_system_shortcut.shortcuts");Object.values(o).forEach((t=>{t.shortcut&&t.selector&&(t.selector.startsWith("/")||t.selector.startsWith("http://")||t.selector.startsWith("www.")?e.addLinkShortcut(t.shortcut,t.selector):t.selector.includes("input")?e.addFocusShortcut(t.shortcut,t.selector):e.addClickShortcut(t.shortcut,t.selector))})),t.querySelector("nav")&&((o=>{const s=new Map;Object.values(o).forEach((t=>{if(!t.shortcut||!t.title)return;let e=[];s.has(t.shortcut)?(e=s.get(t.shortcut),e.push(t.title)):e=[t.title],s.set(t.shortcut,e)}));let a="
";s.forEach(((t,o)=>{a+="
",a+='
J',o.split("+").forEach((t=>{a+=` ${e.Text._("PLG_SYSTEM_SHORTCUT_THEN")} ${t.trim()}`})),a+="
",t.forEach((t=>{a+=`
${t}
`})),a+="
"})),a+="
";const c=`\n \n `;t.body.insertAdjacentHTML("beforeend",c);const d=new bootstrap.Modal(t.getElementById("shortcutOverviewModal"),{keyboard:!0,backdrop:!0});hotkeys("X","joomla",(()=>d.show()))})(o),(()=>{const o=t.querySelector(".com_cpanel .container-main");if(o){const s=t.createElement("section");s.className="content pt-4",s.insertAdjacentHTML("beforeend",e.Text._("PLG_SYSTEM_SHORTCUT_OVERVIEW_HINT")),o.appendChild(s)}})()),hotkeys.filter=t=>{const e=t.target||t.srcElement,{tagName:o}=e;return"checkbox"===e.type||!(e.isContentEditable||"INPUT"===o||"SELECT"===o||"TEXTAREA"===o)},hotkeys("J",(t=>{"joomla"!==hotkeys.getScope()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),hotkeys.setScope("joomla"),setTimeout((()=>{hotkeys.setScope(!1)}),e.getOptions("plg_system_shortcut.timeout",2e3)))}))}))})(document,Joomla);