(()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function n(e){const t=[].forEach,n=[].some,o="undefined"!=typeof window&&document.body,l=" ";let r,s=!0,i=0;function c(n,o){const r=o.appendChild(function(n){const o=document.createElement("li"),r=document.createElement("a");return e.listItemClass&&o.setAttribute("class",e.listItemClass),e.onClick&&(r.onclick=e.onClick),e.includeTitleTags&&r.setAttribute("title",n.textContent),e.includeHtml&&n.childNodes.length?t.call(n.childNodes,(e=>{r.appendChild(e.cloneNode(!0))})):r.textContent=n.textContent,r.setAttribute("href",`${e.basePath}#${n.id}`),r.setAttribute("class",`${e.linkClass+l}node-name--${n.nodeName}${l}${e.extraLinkClasses}`),o.appendChild(r),o}(n));if(n.children.length){const e=a(n.isCollapsed);n.children.forEach((t=>{c(t,e)})),r.appendChild(e)}}function a(t){const n=e.orderedList?"ol":"ul",o=document.createElement(n);let r=e.listClass+l+e.extraListClasses;return t&&(r=r+l+e.collapsibleClass,r=r+l+e.isCollapsedClass),o.setAttribute("class",r),o}function d(t){let n=0;return null!==t&&(n=t.offsetTop,e.hasInnerContainers&&(n+=d(t.offsetParent))),n}function u(e,t){return e&&e.className!==t&&(e.className=t),e}function f(t){return t&&-1!==t.className.indexOf(e.collapsibleClass)&&-1!==t.className.indexOf(e.isCollapsedClass)?(u(t,t.className.replace(l+e.isCollapsedClass,"")),f(t.parentNode.parentNode)):t}function m(t){const n=p(),o=document?.getElementById(t);return o.offsetTop>n.offsetHeight-1.4*n.clientHeight-e.bottomModeThreshold}function h(){const t=p(),n=t.scrollHeight>t.clientHeight,o=g()+t.clientHeight>t.offsetHeight-e.bottomModeThreshold;return n&&o}function p(){let t;return t=e.scrollContainer&&document.querySelector(e.scrollContainer)?document.querySelector(e.scrollContainer):document.documentElement||o,t}function g(){const e=p();return e?.scrollTop||0}function C(t,o=g()){let l;return n.call(t,((n,r)=>d(n)>o+e.headingsOffset+10?(l=t[0===r?r:r-1],!0):r===t.length-1?(l=t[t.length-1],!0):void 0)),l}return{enableTocAnimation:function(){s=!0},disableTocAnimation:function(t){const n=t.target||t.srcElement;"string"==typeof n.className&&-1!==n.className.indexOf(e.linkClass)&&(s=!1)},render:function(e,t){const n=a(!1);if(t.forEach((e=>{c(e,n)})),r=e||r,null!==r)return r.firstChild&&r.removeChild(r.firstChild),0===t.length?r:r.appendChild(n)},updateToc:function(n,o){e.positionFixedSelector&&function(){const t=g(),n=document.querySelector(e.positionFixedSelector);"auto"===e.fixedSidebarOffset&&(e.fixedSidebarOffset=r.offsetTop),t>e.fixedSidebarOffset?-1===n.className.indexOf(e.positionFixedClass)&&(n.className+=l+e.positionFixedClass):n.className=n.className.replace(l+e.positionFixedClass,"")}();const c=n,a=o?.target?.getAttribute?o?.target?.getAttribute("href"):null,d=!(!a||"#"!==a.charAt(0))&&m(a.replace("#",""));if(o&&i<5&&i++,(s||d)&&r&&c.length>0){const n=C(c),o=r.querySelector(`.${e.activeLinkClass}`),s=n.id.replace(/([ #;&,.+*~':"!^$[\]()=>|/\\@])/g,"\\$1"),p=window.location.hash.replace("#","");let g=s;const b=h();a&&d?g=a.replace("#",""):p&&p!==s&&b&&(m(s)||i<=2)&&(g=p);const S=r.querySelector(`.${e.linkClass}[href="${e.basePath}#${g}"]`);if(o===S)return;const y=r.querySelectorAll(`.${e.linkClass}`);t.call(y,(t=>{u(t,t.className.replace(l+e.activeLinkClass,""))}));const T=r.querySelectorAll(`.${e.listItemClass}`);t.call(T,(t=>{u(t,t.className.replace(l+e.activeListItemClass,""))})),S&&-1===S.className.indexOf(e.activeLinkClass)&&(S.className+=l+e.activeLinkClass);const v=S?.parentNode;v&&-1===v.className.indexOf(e.activeListItemClass)&&(v.className+=l+e.activeListItemClass);const w=r.querySelectorAll(`.${e.listClass}.${e.collapsibleClass}`);t.call(w,(t=>{-1===t.className.indexOf(e.isCollapsedClass)&&(t.className+=l+e.isCollapsedClass)})),S?.nextSibling&&-1!==S.nextSibling.className.indexOf(e.isCollapsedClass)&&u(S.nextSibling,S.nextSibling.className.replace(l+e.isCollapsedClass,"")),f(S?.parentNode.parentNode)}},getCurrentlyHighlighting:function(){return s},getTopHeader:C,getScrollTop:g,updateUrlHashForHeader:function(e){const t=g(),n=C(e,t),o=h();if(n&&!(t<5)||o){if(n&&!o){const e=`#${n.id}`;window.location.hash!==e&&window.history.pushState(null,null,e)}}else"#"!==window.location.hash&&""!==window.location.hash&&window.history.pushState(null,null,"#")}}}e.r(t),e.d(t,{_buildHtml:()=>r,_headingsArray:()=>i,_options:()=>d,_parseContent:()=>s,_scrollListener:()=>c,default:()=>b,destroy:()=>f,init:()=>u,refresh:()=>m});const o={tocSelector:".js-toc",tocElement:null,contentSelector:".js-toc-content",contentElement:null,headingSelector:"h1, h2, h3",ignoreSelector:".js-toc-ignore",hasInnerContainers:!1,linkClass:"toc-link",extraLinkClasses:"",activeLinkClass:"is-active-link",listClass:"toc-list",extraListClasses:"",isCollapsedClass:"is-collapsed",collapsibleClass:"is-collapsible",listItemClass:"toc-list-item",activeListItemClass:"is-active-li",collapseDepth:0,scrollSmooth:!0,scrollSmoothDuration:420,scrollSmoothOffset:0,scrollEndCallback:function(e){},headingsOffset:1,enableUrlHashUpdateOnScroll:!1,scrollHandlerType:"auto",scrollHandlerTimeout:50,throttleTimeout:50,positionFixedSelector:null,positionFixedClass:"is-position-fixed",fixedSidebarOffset:"auto",includeHtml:!1,includeTitleTags:!1,onClick:function(e){},orderedList:!0,scrollContainer:null,skipRendering:!1,headingLabelCallback:!1,ignoreHiddenElements:!1,headingObjectCallback:null,basePath:"",disableTocScrollSync:!1,tocScrollingWrapper:null,tocScrollOffset:30,bottomModeThreshold:30};function l(e){var t=e.duration,n=e.offset;if("undefined"!=typeof window&&"undefined"!=typeof location){var o=location.hash?l(location.href):location.href;document.body.addEventListener("click",(function(r){var s;"a"!==(s=r.target).tagName.toLowerCase()||!(s.hash.length>0||"#"===s.href.charAt(s.href.length-1))||l(s.href)!==o&&l(s.href)+"#"!==o||r.target.className.indexOf("no-smooth-scroll")>-1||"#"===r.target.href.charAt(r.target.href.length-2)&&"!"===r.target.href.charAt(r.target.href.length-1)||-1===r.target.className.indexOf(e.linkClass)||function(e,t){var n,o,l=window.pageYOffset,r={duration:t.duration,offset:t.offset||0,callback:t.callback,easing:t.easing||function(e,t,n,o){return(e/=o/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t}},s=document.querySelector('[id="'+decodeURI(e).split("#").join("")+'"]')||document.querySelector('[id="'+e.split("#").join("")+'"]'),i="string"==typeof e?r.offset+(e?s&&s.getBoundingClientRect().top||0:-(document.documentElement.scrollTop||document.body.scrollTop)):e,c="function"==typeof r.duration?r.duration(i):r.duration;function a(e){o=e-n,window.scrollTo(0,r.easing(o,l,i,c)),o0&&(c=n(i),!c||s!==c.headingLevel);)c&&void 0!==c.children&&(i=c.children),a--;s>=e.collapseDepth&&(r.isCollapsed=!0),i.push(r)}(r,t.nest),t}),{nest:[]})},selectHeadings:function(t,n){let o=n;e.ignoreSelector&&(o=n.split(",").map((function(t){return`${t.trim()}:not(${e.ignoreSelector})`})));try{return t.querySelectorAll(o)}catch(e){return console.warn(`Headers not found with selector: ${o}`),null}}}}(d),f();const u=function(e){try{return e.contentElement||document.querySelector(e.contentSelector)}catch(t){return console.warn(`Contents element not found: ${e.contentSelector}`),null}}(d);if(null===u)return;const m=C(d);if(null===m)return;if(i=s.selectHeadings(u,d.headingSelector),null===i)return;const b=s.nestHeadingsArray(i).nest;if(d.skipRendering)return this;r.render(m,b);let S=!1;const y=d.scrollHandlerTimeout||d.throttleTimeout;c=function(e,t,n="auto"){switch(n){case"debounce":return g(e,t);case"throttle":return p(e,t);default:return t<334?g(e,t):p(e,t)}}((e=>{r.updateToc(i,e),!d.disableTocScrollSync&&!S&&function(e){const t=e.tocScrollingWrapper||e.tocElement||document.querySelector(e.tocSelector);if(t&&t.scrollHeight>t.clientHeight){const n=t.querySelector(`.${e.activeListItemClass}`);if(n){const o=n.offsetTop-e.tocScrollOffset;t.scrollTop=o>0?o:0}}}(d),d.enableUrlHashUpdateOnScroll&&t&&r.getCurrentlyHighlighting()&&r.updateUrlHashForHeader(i);const n=0===e?.target?.scrollingElement?.scrollTop;(e&&(0===e.eventPhase||null===e.currentTarget)||n)&&(r.updateToc(i),d.scrollEndCallback?.(e))}),y,d.scrollHandlerType),t||(c(),t=!0),window.onhashchange=window.onscrollend=e=>{c(e)},d.scrollContainer&&document.querySelector(d.scrollContainer)?(document.querySelector(d.scrollContainer).addEventListener("scroll",c,!1),document.querySelector(d.scrollContainer).addEventListener("resize",c,!1)):(document.addEventListener("scroll",c,!1),document.addEventListener("resize",c,!1));let T=null;a=p((e=>{S=!0,d.scrollSmooth&&r.disableTocAnimation(e),r.updateToc(i,e),T&&clearTimeout(T),T=setTimeout((()=>{r.enableTocAnimation()}),d.scrollSmoothDuration),setTimeout((()=>{S=!1}),d.scrollSmoothDuration+100)}),d.throttleTimeout),d.scrollContainer&&document.querySelector(d.scrollContainer)?document.querySelector(d.scrollContainer).addEventListener("click",a,!1):document.addEventListener("click",a,!1)}function f(){const e=C(d);null!==e&&(d.skipRendering||e&&(e.innerHTML=""),d.scrollContainer&&document.querySelector(d.scrollContainer)?(document.querySelector(d.scrollContainer).removeEventListener("scroll",c,!1),document.querySelector(d.scrollContainer).removeEventListener("resize",c,!1),r&&document.querySelector(d.scrollContainer).removeEventListener("click",a,!1)):(document.removeEventListener("scroll",c,!1),document.removeEventListener("resize",c,!1),r&&document.removeEventListener("click",a,!1)))}function m(e){f(),u(e||d)}const h=Object.prototype.hasOwnProperty;function p(e,t,n){let o,l;return t||(t=250),function(...r){const s=n||this,i=+new Date;o&&i{o=i,e.apply(s,r)}),t)):(o=i,e.apply(s,r))}}function g(e,t){let n;return(...o)=>{clearTimeout(n),n=setTimeout((()=>e.apply(this,o)),t)}}function C(e){try{return e.tocElement||document.querySelector(e.tocSelector)}catch(t){return console.warn(`TOC element not found: ${e.tocSelector}`),null}}const b={_options:d,_buildHtml:r,_parseContent:s,init:u,destroy:f,refresh:m};var S,y;S=("undefined"==typeof global||global instanceof HTMLElement)&&window||global,y=e=>{const n=!!(e&&e.document&&e.document.querySelector&&e.addEventListener);if("undefined"!=typeof window||n)return e.tocbot=t,t},"function"==typeof define&&define.amd?define([],y(S)):"object"!=typeof exports||exports instanceof HTMLElement?S.tocbot=y(S):module.exports=y(S)})();