"use strict";const BLACKLISTED_KEY_CONTROL_ELEMENTS=new Set(["TEXTAREA","INPUT","SELECT","BUTTON"]),_ready=e=>{document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e)},Documentation={init:()=>{Documentation.initDomainIndexTable(),Documentation.initOnKeyListeners()},TRANSLATIONS:{},PLURAL_EXPR:e=>e===1?0:1,LOCALE:"unknown",gettext:e=>{const t=Documentation.TRANSLATIONS[e];switch(typeof t){case"undefined":return e;case"string":return t;default:return t[0]}},ngettext:(e,t,n)=>{const s=Documentation.TRANSLATIONS[e];return typeof s!="undefined"?s[Documentation.PLURAL_EXPR(n)]:n===1?e:t},addTranslations:e=>{Object.assign(Documentation.TRANSLATIONS,e.messages),Documentation.PLURAL_EXPR=new Function("n",`return (${e.plural_expr})`),Documentation.LOCALE=e.locale},focusSearchBar:()=>{document.querySelectorAll("input[name=q]")[0]?.focus()},initDomainIndexTable:()=>{const t=e=>{const n=e.id.substr(7),t=document.querySelectorAll(`tr.cg-${n}`);e.src.substr(-9)==="minus.png"?(e.src=`${e.src.substr(0,e.src.length-9)}plus.png`,t.forEach(e=>e.style.display="none")):(e.src=`${e.src.substr(0,e.src.length-8)}minus.png`,t.forEach(e=>e.style.display=""))},e=document.querySelectorAll("img.toggler");e.forEach(e=>e.addEventListener("click",e=>t(e.currentTarget))),e.forEach(e=>e.style.display=""),DOCUMENTATION_OPTIONS.COLLAPSE_INDEX&&e.forEach(t)},initOnKeyListeners:()=>{if(!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS&&!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)return;document.addEventListener("keydown",e=>{if(BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName))return;if(e.altKey||e.ctrlKey||e.metaKey)return;if(!e.shiftKey)switch(e.key){case"ArrowLeft":if(!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS)break;const t=document.querySelector('link[rel="prev"]');t&&t.href&&(window.location.href=t.href,e.preventDefault());break;case"ArrowRight":if(!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS)break;const n=document.querySelector('link[rel="next"]');n&&n.href&&(window.location.href=n.href,e.preventDefault());break}switch(e.key){case"/":if(!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)break;Documentation.focusSearchBar(),e.preventDefault()}})}},_=Documentation.gettext;_ready(Documentation.init)