(()=>{window.addEventListener("scroll",function(n){if(document.querySelector("body").clientWidth>767){let o=document.querySelector(".rightcolumn"),e=document.querySelector(".mantletitle")||document.querySelector(".crusttitle")||!1;if(!e)return;let i=document.querySelector(".mantlebar"),t=document.querySelector(".grid"),l=e.getBoundingClientRect();if(document.querySelector("body").clientHeight-(t.clientHeight+e.clientHeight+32)<window.innerHeight)return;l.top<20&&!t.classList.contains("moved")?(t.classList.add("moved"),i.style.display="inline",e.style.visibility="hidden"):l.top>21&&t.classList.contains("moved")&&(t.classList.remove("moved"),e.style.visibility="visible",i.style.display="none")}else{let o=document.querySelector(".rightcolumn"),e=document.querySelector(".mantletitle")||document.querySelector(".crusttitle")||!1;if(!e)return;let i=document.querySelector(".mantlebar"),t=document.querySelector(".grid"),l=e.getBoundingClientRect();l.top<20&&!t.classList.contains("moved")?(t.classList.add("moved"),i.style.display="inline",e.style.visibility="hidden"):l.top>21&&t.classList.contains("moved")&&(t.classList.remove("moved"),e.style.visibility="visible",i.style.display="none")}});window.addEventListener("DOMContentLoaded",n=>{let o=document.querySelector("#TableOfContents > ol:first-child > li:first-child"),e=document.createElement("span");if(e.appendChild(o.cloneNode(!0)),o.remove(),document.querySelector("#TableOfContents > ol:first-child").insertBefore(e,document.querySelector("#TableOfContents > ol:first-child").firstChild),document.querySelector(".soundcite")){let l="../".repeat(relPathDepth-1);var i=document.createElement("script");i.src=`${l}js/popcorn.min.js`,document.body.appendChild(i);var t=document.createElement("script");t.src=`${l}js/soundcite.min.js`,document.body.appendChild(t)}document.querySelectorAll("#TableOfContents a").forEach(l=>{l.addEventListener("click",r=>{setTimeout(()=>{window.scrollBy({top:document.querySelector(".header").clientHeight*-1.25,behavior:"smooth"})},50)})})});toggleAllLinks=function(){document.querySelectorAll("details").forEach(n=>{n.open?n.removeAttribute("open"):n.setAttribute("open",!0)})};})();
