1document.addEventListener("DOMContentLoaded",function(){let e=document.querySelector(".sp-table-of-content-toc");if(!e)return;let t="true"===e.dataset.smoothScroll,s=parseFloat(e.dataset.offsetTop)||0,o=document.querySelectorAll(".sps-toc-link"),i=e.dataset.preset||"presetOne",l=e.dataset.hashUrl||!1,r=document.querySelectorAll("h1, h2, h3, h4, h5, h6");r.forEach(e=>{let t=e.querySelector(".sps-toc-heading-copy-link");console.log("Heading:",e),t&&(t.style.transition="opacity 0.3s",e.addEventListener("mouseenter",()=>{l?t.style.setProperty("opacity","1","important"):t.style.pointerEvents="none"}),e.addEventListener("mouseleave",()=>{t.style.opacity="0"}))});let a=null,n={},c=e.querySelector(".sps-toc-container"),d=e.querySelector(".sps-toc-indicator");document.querySelectorAll(".sps-toc-item").forEach(e=>{let t=e.getAttribute("data-item-id");t&&(n[t]=e)});let p=()=>{if(!c||!d||null===a||c.classList.contains("sps-toc-hidden")){d&&d.classList.add("hidden");return}let e=n[a];if(!e){d&&d.classList.add("hidden");return}let t=e.querySelector(".sps-toc-link-wrapper");if(!t){d&&d.classList.add("hidden");return}d.classList.remove("hidden");let s=c.getBoundingClientRect(),o=t.getBoundingClientRect(),i=o.top-s.top;d.style.top=`${i}px`,d.style.height=`${o.height}px`},u=()=>{if(document.querySelectorAll(".sps-toc-link-wrapper").forEach(e=>{e.classList.remove("sps-toc-selected-background")}),["presetTwo","presetFive","presetThree","presetFour"].includes(i)&&a){let e=n[a];if(e){let t=e.querySelector(".sps-toc-link-wrapper");t&&t.classList.add("sps-toc-selected-background")}}};o.forEach(e=>{e.addEventListener("click",function(e){e.preventDefault();let o=this.getAttribute("href").substring(1),l=decodeURIComponent(o),r=document.getElementById(l);if(r||(r=document.getElementById(o)),a=r?r.id:l,u(),["presetThree","presetFour","presetFive"].includes(i)&&p(),r){let n=r.getBoundingClientRect().top+window.pageYOffset;window.scrollTo({top:n-s,behavior:t?"smooth":"auto"})}else console.warn("TOC target not found:",l)})});let h=document.querySelectorAll(".sps-toc-copy");h.forEach(e=>{e.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation();let t=this.getAttribute("data-clipboard-text"),s=document.createElement("input");s.value=t,document.body.appendChild(s),s.select();try{let o=document.execCommand("copy");if(o){let i=this.getAttribute("title");this.setAttribute("title","Copied!"),this.classList.add("copied"),setTimeout(()=>{this.setAttribute("title",i),this.classList.remove("copied")},2e3)}}catch(l){console.error("Copy error:",l)}document.body.removeChild(s)})});let f=document.querySelectorAll(".sps-toc-main-toggle");f.forEach(t=>{t&&t.addEventListener("click",function(s){s.preventDefault();let o=t.closest(".sp-table-of-content-toc.sp-smart-post-table-of-content"),l=o.querySelector(".sps-toc-container"),r=l.classList.contains("sps-toc-hidden");l.classList.toggle("sps-toc-hidden"),!r&&d&&d.classList.add("hidden"),this.classList.toggle("expanded");let a=this.classList.contains("expanded");this.setAttribute("aria-expanded",a?"true":"false");let n=e.dataset.buttonType,c=e.dataset.collapseText,u=e.dataset.expandText,h=e.dataset.iconSource;if("icon"===n){let f=e.querySelector(".sps-toc-wrapper"),y=JSON.parse(f.dataset.icons),g;switch(h){case"one":g=y.one;break;case"two":g=y.two;break;case"three":g=y.three;break;case"four":default:g=a?y.four_expanded:y.four_collapsed;break;case"five":g=a?y.five_expanded:y.five_collapsed;break;case"six":g=y.six;break;case"seven":g=a?y.seven_expanded:y.seven_collapsed;break;case"eight":g=y.eight}this.innerHTML=g}else this.textContent=a?c:u;this.setAttribute("aria-label",a?c:u),r&&["presetThree","presetFour","presetFive"].includes(i)&&setTimeout(()=>{p()},350)})});let y=document.querySelectorAll(".sps-toc-toggle");if(y.forEach(t=>{t.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation();let s=this.closest("li.sps-toc-item"),o=s.querySelector(".sps-toc-sublist");if(o){o.classList.contains("sps-toc-sublist-collapsed"),o.classList.toggle("sps-toc-sublist-collapsed"),this.classList.toggle("expanded");let l=this.classList.contains("expanded"),r=e.dataset.childIconSource,a=e.querySelector(".sps-toc-wrapper"),n=JSON.parse(a.dataset.icons),c;switch(r){case"one":c=n.one;break;case"two":c=n.two;break;case"three":c=n.three;break;case"four":default:c=l?n.four_expanded:n.four_collapsed;break;case"five":c=l?n.five_expanded:n.five_collapsed;break;case"six":c=n.six;break;case"seven":c=l?n.seven_expanded:n.seven_collapsed;break;case"eight":c=n.eight}this.innerHTML=c,this.setAttribute("aria-expanded",l?"true":"false"),this.setAttribute("aria-label",l?"Collapse section":"Expand section"),["presetThree","presetFour","presetFive"].includes(i)&&setTimeout(()=>{p()},350)}})}),["presetThree","presetFour","presetFive"].includes(i)){if(!a&&o.length>0){let g=o[0],b=g.getAttribute("href").substring(1);a=b,p()}if(window.addEventListener("resize",()=>{requestAnimationFrame(p)}),c){let v=new ResizeObserver(()=>{requestAnimationFrame(p)});v.observe(c)}}["presetTwo","presetFive"].includes(i)&&u(),document.body.addEventListener("click",function(e){let t=e.target.closest(".sps-toc-heading-copy-link");if(!t)return;e.preventDefault(),e.stopPropagation();let s=t.dataset.url;!function e(t){let s=document.createElement("textarea");s.value=t,s.style.position="fixed",s.style.top=0,s.style.left=0,s.style.opacity="0",document.body.appendChild(s),s.focus(),s.select();try{document.execCommand("copy")}
1catch(o){console.error("Failed to copy: ",o),prompt("Copy this link:",t)}document.body.removeChild(s)}(s);let o=document.createElement("div");o.textContent="Link copied!",o.style.position="fixed",o.style.bottom="20px",o.style.right="20px",o.style.background="#333",o.style.color="#fff",o.style.padding="8px 12px",o.style.borderRadius="4px",o.style.zIndex="99999",o.style.fontSize="13px",document.body.appendChild(o),setTimeout(()=>{o.style.opacity="0",setTimeout(()=>o.remove(),300)},1500)});let x=document.querySelectorAll(".sp-table-of-content-toc");x.forEach(e=>{let t=e.classList.contains("sp-toc-position-floating");if(e.style.transition="opacity 0.3s ease-in-out",t){let s=document.createElement("div");s.style.height=e.offsetHeight+"px";let o=e.getBoundingClientRect(),i=o.top+window.scrollY+o.height;window.addEventListener("scroll",()=>{window.scrollY>i?(e.style.position="fixed",e.parentNode.insertBefore(s,e),e.style.opacity="1"):(e.style.position="static",e.style.opacity="1",s.remove())})}})});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.