(()=> {
"use strict";
var __webpack_modules__=({
"./src/js/build-html.js":
((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__)=> {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
"default": ()=> ( __WEBPACK_DEFAULT_EXPORT__)
});
function __WEBPACK_DEFAULT_EXPORT__(options){
const forEach=[].forEach
const some=[].some
const body=typeof window!=="undefined"&&document.body
const SPACE_CHAR=" "
let tocElement
let currentlyHighlighting=true
let eventCount=0
function createEl(d, container){
const link=container.appendChild(createLink(d))
if(d.children.length){
const list=createList(d.isCollapsed)
d.children.forEach((child)=> {
createEl(child, list)
})
link.appendChild(list)
}}
function render(parent, data){
const collapsed=false
const container=createList(collapsed)
data.forEach((d)=> {
createEl(d, container)
})
tocElement=parent||tocElement
if(tocElement===null){
return
}
if(tocElement.firstChild){
tocElement.removeChild(tocElement.firstChild)
}
if(data.length===0){
return tocElement
}
return tocElement.appendChild(container)
}
function createLink(data){
const item=document.createElement("li")
const a=document.createElement("a")
if(options.listItemClass){
item.setAttribute("class", options.listItemClass)
}
if(options.onClick){
a.onclick=options.onClick
}
if(options.includeTitleTags){
a.setAttribute("title", data.textContent)
}
if(options.includeHtml&&data.childNodes.length){
forEach.call(data.childNodes, (node)=> {
a.appendChild(node.cloneNode(true))
})
}else{
a.textContent=data.textContent
}
a.setAttribute("href", `${options.basePath}#${data.id}`)
a.setAttribute("class",
`${
options.linkClass + SPACE_CHAR
}node-name--${data.nodeName}${SPACE_CHAR}${options.extraLinkClasses}`,
)
item.appendChild(a)
return item
}
function createList(isCollapsed){
const listElement=options.orderedList ? "ol":"ul"
const list=document.createElement(listElement)
let classes=options.listClass + SPACE_CHAR + options.extraListClasses
if(isCollapsed){
classes=classes + SPACE_CHAR + options.collapsibleClass
classes=classes + SPACE_CHAR + options.isCollapsedClass
}
list.setAttribute("class", classes)
return list
}
function updateFixedSidebarClass(){
const scrollTop=getScrollTop()
const posFixedEl=document.querySelector(options.positionFixedSelector)
if(options.fixedSidebarOffset==="auto"){
options.fixedSidebarOffset=tocElement.offsetTop
}
if(scrollTop > options.fixedSidebarOffset){
if(posFixedEl.className.indexOf(options.positionFixedClass)===-1){
posFixedEl.className +=SPACE_CHAR + options.positionFixedClass
}}else{
posFixedEl.className=posFixedEl.className.replace(SPACE_CHAR + options.positionFixedClass,
"",
)
}}
function getHeadingTopPos(obj){
let position=0
if(obj!==null){
position=obj.offsetTop
if(options.hasInnerContainers){
position +=getHeadingTopPos(obj.offsetParent)
}}
return position
}
function updateClassname(obj, className){
if(obj&&obj.className!==className){
obj.className=className
}
return obj
}
function updateToc(headingsArray, event){
if(options.positionFixedSelector){
updateFixedSidebarClass()
}
const headings=headingsArray
const clickedHref=event?.target?.getAttribute
? event?.target?.getAttribute("href")
: null
const isBottomMode =
clickedHref&&clickedHref.charAt(0)==="#"
? getIsHeaderBottomMode(clickedHref.replace("#", ""))
: false
const shouldUpdate=currentlyHighlighting||isBottomMode
if(event&&eventCount < 5){
eventCount++
}
if(shouldUpdate&&!!tocElement&&headings.length > 0){
const topHeader=getTopHeader(headings)
const oldActiveTocLink=tocElement.querySelector(`.${options.activeLinkClass}`,
)
const topHeaderId=topHeader.id.replace(/([ #;&,.+*~':"!^$[\]()=>|/\\@])/g,
"\\$1",
)
const hashId=window.location.hash.replace("#", "")
let activeId=topHeaderId
const isPageBottomMode=getIsPageBottomMode()
if(clickedHref&&isBottomMode){
activeId=clickedHref.replace("#", "")
}else if(hashId &&
hashId!==topHeaderId &&
isPageBottomMode &&
(getIsHeaderBottomMode(topHeaderId)||eventCount <=2)
){
activeId=hashId
}
const activeTocLink=tocElement.querySelector(`.${options.linkClass}[href="${options.basePath}#${activeId}"]`,
)
if(oldActiveTocLink===activeTocLink){
return
}
const tocLinks=tocElement.querySelectorAll(`.${options.linkClass}`)
forEach.call(tocLinks, (tocLink)=> {
updateClassname(
tocLink,
tocLink.className.replace(SPACE_CHAR + options.activeLinkClass, ""),
)
})
const tocLis=tocElement.querySelectorAll(`.${options.listItemClass}`)
forEach.call(tocLis, (tocLi)=> {
updateClassname(
tocLi,
tocLi.className.replace(SPACE_CHAR + options.activeListItemClass, ""),
)
})
if(activeTocLink &&
activeTocLink.className.indexOf(options.activeLinkClass)===-1
){
activeTocLink.className +=SPACE_CHAR + options.activeLinkClass
}
const li=activeTocLink?.parentNode
if(li&&li.className.indexOf(options.activeListItemClass)===-1){
li.className +=SPACE_CHAR + options.activeListItemClass
}
const tocLists=tocElement.querySelectorAll(`.${options.listClass}.${options.collapsibleClass}`,
)
forEach.call(tocLists, (list)=> {
if(list.className.indexOf(options.isCollapsedClass)===-1){
list.className +=SPACE_CHAR + options.isCollapsedClass
}})
if(activeTocLink?.nextSibling &&
activeTocLink.nextSibling.className.indexOf(options.isCollapsedClass,
)!==-1
){
updateClassname(
activeTocLink.nextSibling,
activeTocLink.nextSibling.className.replace(SPACE_CHAR + options.isCollapsedClass,
"",
),
)
}
removeCollapsedFromParents(activeTocLink?.parentNode.parentNode)
}}
function removeCollapsedFromParents(element){
if(element &&
element.className.indexOf(options.collapsibleClass)!==-1 &&
element.className.indexOf(options.isCollapsedClass)!==-1
){
updateClassname(
element,
element.className.replace(SPACE_CHAR + options.isCollapsedClass, ""),
)
return removeCollapsedFromParents(element.parentNode.parentNode)
}
return element
}
function disableTocAnimation(event){
const target=event.target||event.srcElement
if(typeof target.className!=="string" ||
target.className.indexOf(options.linkClass)===-1
){
return
}
currentlyHighlighting=false
}
function enableTocAnimation(){
currentlyHighlighting=true
}
function getCurrentlyHighlighting(){
return currentlyHighlighting
}
function getIsHeaderBottomMode(headerId){
const scrollEl=getScrollEl()
const activeHeading=document?.getElementById(headerId)
const isBottomMode =
activeHeading.offsetTop >
scrollEl.offsetHeight -
scrollEl.clientHeight * 1.4 -
options.bottomModeThreshold
return isBottomMode
}
function getIsPageBottomMode(){
const scrollEl=getScrollEl()
const isScrollable=scrollEl.scrollHeight > scrollEl.clientHeight
const isBottomMode =
getScrollTop() + scrollEl.clientHeight >
scrollEl.offsetHeight - options.bottomModeThreshold
return isScrollable&&isBottomMode
}
function getScrollEl(){
let el
if(options.scrollContainer &&
document.querySelector(options.scrollContainer)
){
el=document.querySelector(options.scrollContainer)
}else{
el=document.documentElement||body
}
return el
}
function getScrollTop(){
const el=getScrollEl()
return el?.scrollTop||0
}
function getTopHeader(headings, scrollTop=getScrollTop()){
let topHeader
some.call(headings, (heading, i)=> {
if(getHeadingTopPos(heading) > scrollTop + options.headingsOffset + 10){
const index=i===0 ? i:i - 1
topHeader=headings[index]
return true
}
if(i===headings.length - 1){
topHeader=headings[headings.length - 1]
return true
}})
return topHeader
}
function updateUrlHashForHeader(headingsArray){
const scrollTop=getScrollTop()
const topHeader=getTopHeader(headingsArray, scrollTop)
const isPageBottomMode=getIsPageBottomMode()
if((!topHeader||scrollTop < 5)&&!isPageBottomMode){
if(!(window.location.hash==="#"||window.location.hash==="")){
window.history.pushState(null, null, "#")
}}else if(topHeader&&!isPageBottomMode){
const newHash=`#${topHeader.id}`
if(window.location.hash!==newHash){
window.history.pushState(null, null, newHash)
}}
}
return {
enableTocAnimation,
disableTocAnimation,
render,
updateToc,
getCurrentlyHighlighting,
getTopHeader,
getScrollTop,
updateUrlHashForHeader,
}}
}),
"./src/js/default-options.js":
((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__)=> {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
"default": ()=> (__WEBPACK_DEFAULT_EXPORT__)
});
const __WEBPACK_DEFAULT_EXPORT__=({
tocSelector: ".js-toc",
tocElement: null,
contentSelector: ".js-toc-content",
contentElement: null,
headingSelector: "h1, h2, h3",
ignoreSelector: ".js-toc-ignore",
hasInnerContainers: false,
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: true,
scrollSmoothDuration: 420,
scrollSmoothOffset: 0,
scrollEndCallback: function (e){},
headingsOffset: 1,
enableUrlHashUpdateOnScroll: false,
scrollHandlerType: "auto",
scrollHandlerTimeout: 50,
throttleTimeout: 50,
positionFixedSelector: null,
positionFixedClass: "is-position-fixed",
fixedSidebarOffset: "auto",
includeHtml: false,
includeTitleTags: false,
onClick: function (e){},
orderedList: true,
scrollContainer: null,
skipRendering: false,
headingLabelCallback: false,
ignoreHiddenElements: false,
headingObjectCallback: null,
basePath: "",
disableTocScrollSync: false,
tocScrollingWrapper: null,
tocScrollOffset: 30,
bottomModeThreshold: 30,
});
}),
"./src/js/index-esm.js":
((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__)=> {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
_buildHtml: ()=> ( _buildHtml),
_headingsArray: ()=> ( _headingsArray),
_options: ()=> ( _options),
_parseContent: ()=> ( _parseContent),
_scrollListener: ()=> ( _scrollListener),
"default": ()=> (__WEBPACK_DEFAULT_EXPORT__),
destroy: ()=> ( destroy),
init: ()=> ( init),
refresh: ()=> ( refresh)
});
var _build_html_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__( "./src/js/build-html.js");
var _default_options_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__( "./src/js/default-options.js");
var _parse_content_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__( "./src/js/parse-content.js");
var _scroll_smooth_index_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__( "./src/js/scroll-smooth/index.js");
var _update_toc_scroll_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__( "./src/js/update-toc-scroll.js");
let _options={}
let _buildHtml
let _parseContent
let _headingsArray
let _scrollListener
let clickListener
function init(customOptions){
let hasInitialized=false
_options=extend(_default_options_js__WEBPACK_IMPORTED_MODULE_1__["default"], customOptions||{})
if(_options.scrollSmooth){
_options.duration=_options.scrollSmoothDuration
_options.offset=_options.scrollSmoothOffset
;(0,_scroll_smooth_index_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_options)
}
_buildHtml=(0,_build_html_js__WEBPACK_IMPORTED_MODULE_0__["default"])(_options)
_parseContent=(0,_parse_content_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_options)
destroy()
const contentElement=getContentElement(_options)
if(contentElement===null){
return
}
const tocElement=getTocElement(_options)
if(tocElement===null){
return
}
_headingsArray=_parseContent.selectHeadings(contentElement,
_options.headingSelector,
)
if(_headingsArray===null){
return
}
const nestedHeadingsObj=_parseContent.nestHeadingsArray(_headingsArray)
const nestedHeadings=nestedHeadingsObj.nest
if(!_options.skipRendering){
_buildHtml.render(tocElement, nestedHeadings)
}else{
return this
}
let isClick=false
const scrollHandlerTimeout =
_options.scrollHandlerTimeout||_options.throttleTimeout
const scrollHandler=(fn, delay)=>
getScrollHandler(fn, delay, _options.scrollHandlerType)
_scrollListener=scrollHandler((e)=> {
_buildHtml.updateToc(_headingsArray, e)
!_options.disableTocScrollSync&&!isClick&&(0,_update_toc_scroll_js__WEBPACK_IMPORTED_MODULE_4__["default"])(_options)
if(_options.enableUrlHashUpdateOnScroll&&hasInitialized){
const enableUpdatingHash=_buildHtml.getCurrentlyHighlighting()
enableUpdatingHash&&_buildHtml.updateUrlHashForHeader(_headingsArray)
}
const isTop=e?.target?.scrollingElement?.scrollTop===0
if((e&&(e.eventPhase===0||e.currentTarget===null))||isTop){
_buildHtml.updateToc(_headingsArray)
_options.scrollEndCallback?.(e)
}}, scrollHandlerTimeout)
if(!hasInitialized){
_scrollListener()
hasInitialized=true
}
window.onhashchange=window.onscrollend=(e)=> {
_scrollListener(e)
}
if(_options.scrollContainer &&
document.querySelector(_options.scrollContainer)
){
document
.querySelector(_options.scrollContainer)
.addEventListener("scroll", _scrollListener, false)
document
.querySelector(_options.scrollContainer)
.addEventListener("resize", _scrollListener, false)
}else{
document.addEventListener("scroll", _scrollListener, false)
document.addEventListener("resize", _scrollListener, false)
}
let timeout=null
clickListener=throttle((event)=> {
isClick=true
if(_options.scrollSmooth){
_buildHtml.disableTocAnimation(event)
}
_buildHtml.updateToc(_headingsArray, event)
timeout&&clearTimeout(timeout)
timeout=setTimeout(()=> {
_buildHtml.enableTocAnimation()
}, _options.scrollSmoothDuration)
setTimeout(()=> {
isClick=false
}, _options.scrollSmoothDuration + 100)
}, _options.throttleTimeout)
if(_options.scrollContainer &&
document.querySelector(_options.scrollContainer)
){
document
.querySelector(_options.scrollContainer)
.addEventListener("click", clickListener, false)
}else{
document.addEventListener("click", clickListener, false)
}}
function destroy(){
const tocElement=getTocElement(_options)
if(tocElement===null){
return
}
if(!_options.skipRendering){
if(tocElement){
tocElement.innerHTML=""
}}
if(_options.scrollContainer &&
document.querySelector(_options.scrollContainer)
){
document
.querySelector(_options.scrollContainer)
.removeEventListener("scroll", _scrollListener, false)
document
.querySelector(_options.scrollContainer)
.removeEventListener("resize", _scrollListener, false)
if(_buildHtml){
document
.querySelector(_options.scrollContainer)
.removeEventListener("click", clickListener, false)
}}else{
document.removeEventListener("scroll", _scrollListener, false)
document.removeEventListener("resize", _scrollListener, false)
if(_buildHtml){
document.removeEventListener("click", clickListener, false)
}}
}
function refresh(customOptions){
destroy()
init(customOptions||_options)
}
const hasOwnProp=Object.prototype.hasOwnProperty
function extend(...args){
const target={}
for (let i=0; i < args.length; i++){
const source=args[i]
for (const key in source){
if(hasOwnProp.call(source, key)){
target[key]=source[key]
}}
}
return target
}
function throttle(fn, threshold, scope){
threshold||(threshold=250)
let last
let deferTimer
return function (...args){
const context=scope||this
const now=+new Date()
if(last&&now < last + threshold){
clearTimeout(deferTimer)
deferTimer=setTimeout(()=> {
last=now
fn.apply(context, args)
}, threshold)
}else{
last=now
fn.apply(context, args)
}}
}
function debounce(func, wait){
let timeout
return (...args)=> {
clearTimeout(timeout)
timeout=setTimeout(()=> func.apply(this, args), wait)
}}
function getScrollHandler(func, timeout, type="auto"){
switch (type){
case "debounce":
return debounce(func, timeout)
case "throttle":
return throttle(func, timeout)
default:
return timeout < 334 ? debounce(func, timeout):throttle(func, timeout)
}}
function getContentElement(options){
try {
return (
options.contentElement||document.querySelector(options.contentSelector)
)
} catch (e){
console.warn(`Contents element not found: ${options.contentSelector}`)
return null
}}
function getTocElement(options){
try {
return options.tocElement||document.querySelector(options.tocSelector)
} catch (e){
console.warn(`TOC element not found: ${options.tocSelector}`)
return null
}}
const tocbot={
_options,
_buildHtml,
_parseContent,
init,
destroy,
refresh,
}
const __WEBPACK_DEFAULT_EXPORT__=(tocbot);
}),
"./src/js/parse-content.js":
((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__)=> {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
"default": ()=> ( parseContent)
});
function parseContent(options){
const reduce=[].reduce
function getLastItem(array){
return array[array.length - 1]
}
function getHeadingLevel(heading){
return +heading.nodeName.toUpperCase().replace("H", "")
}
function isHTMLElement(maybeElement){
try {
return (
maybeElement instanceof window.HTMLElement ||
maybeElement instanceof window.parent.HTMLElement
)
} catch (e){
return maybeElement instanceof window.HTMLElement
}}
function getHeadingObject(heading){
if(!isHTMLElement(heading)) return heading
if(options.ignoreHiddenElements &&
(!heading.offsetHeight||!heading.offsetParent)
){
return null
}
const headingLabel =
heading.getAttribute("data-heading-label") ||
(options.headingLabelCallback
? String(options.headingLabelCallback(heading.innerText))
: (heading.innerText||heading.textContent).trim())
const obj={
id: heading.id,
children: [],
nodeName: heading.nodeName,
headingLevel: getHeadingLevel(heading),
textContent: headingLabel,
}
if(options.includeHtml){
obj.childNodes=heading.childNodes
}
if(options.headingObjectCallback){
return options.headingObjectCallback(obj, heading)
}
return obj
}
function addNode(node, nest){
const obj=getHeadingObject(node)
const level=obj.headingLevel
let array=nest
let lastItem=getLastItem(array)
const lastItemLevel=lastItem ? lastItem.headingLevel:0
let counter=level - lastItemLevel
while (counter > 0){
lastItem=getLastItem(array)
if(lastItem&&level===lastItem.headingLevel){
break
}else if(lastItem&&lastItem.children!==undefined){
array=lastItem.children
}
counter--
}
if(level >=options.collapseDepth){
obj.isCollapsed=true
}
array.push(obj)
return array
}
function selectHeadings(contentElement, headingSelector){
let selectors=headingSelector
if(options.ignoreSelector){
selectors=headingSelector
.split(",")
.map(function mapSelectors(selector){
return `${selector.trim()}:not(${options.ignoreSelector})`
})
}
try {
return contentElement.querySelectorAll(selectors)
} catch (e){
console.warn(`Headers not found with selector: ${selectors}`)
return null
}}
function nestHeadingsArray(headingsArray){
return reduce.call(headingsArray,
function reducer(prev, curr){
const currentHeading=getHeadingObject(curr)
if(currentHeading){
addNode(currentHeading, prev.nest)
}
return prev
},
{
nest: [],
},
)
}
return {
nestHeadingsArray,
selectHeadings,
}}
}),
"./src/js/scroll-smooth/index.js":
((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__)=> {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
"default": ()=> ( initSmoothScrolling)
});
function initSmoothScrolling(options){
var duration=options.duration
var offset=options.offset
if(typeof window==="undefined"||typeof location==="undefined") return
var pageUrl=location.hash ? stripHash(location.href):location.href
delegatedLinkHijacking()
function delegatedLinkHijacking(){
document.body.addEventListener("click", onClick, false)
function onClick(e){
if(!isInPageLink(e.target) ||
e.target.className.indexOf("no-smooth-scroll") > -1 ||
(e.target.href.charAt(e.target.href.length - 2)==="#" &&
e.target.href.charAt(e.target.href.length - 1)==="!") ||
e.target.className.indexOf(options.linkClass)===-1
){
return
}
jump(e.target.hash, {
duration,
offset,
callback: function (){
setFocus(e.target.hash)
},
})
}}
function isInPageLink(n){
return (
n.tagName.toLowerCase()==="a" &&
(n.hash.length > 0||n.href.charAt(n.href.length - 1)==="#") &&
(stripHash(n.href)===pageUrl||stripHash(n.href) + "#"===pageUrl)
)
}
function stripHash(url){
return url.slice(0, url.lastIndexOf("#"))
}
function setFocus(hash){
var element=document.getElementById(hash.substring(1))
if(element){
if(!/^(?:a|select|input|button|textarea)$/i.test(element.tagName)){
element.tabIndex=-1
}
element.focus()
}}
}
function jump(target, options){
var start=window.pageYOffset
var opt={
duration: options.duration,
offset: options.offset||0,
callback: options.callback,
easing: options.easing||easeInOutQuad,
}
var tgt =
document.querySelector('[id="' + decodeURI(target).split("#").join("") + '"]',
)||document.querySelector('[id="' + target.split("#").join("") + '"]')
var distance =
typeof target==="string"
? opt.offset +
(target
? (tgt&&tgt.getBoundingClientRect().top)||0 
: -(document.documentElement.scrollTop||document.body.scrollTop))
: target
var duration =
typeof opt.duration==="function" ? opt.duration(distance):opt.duration
var timeStart
var timeElapsed
requestAnimationFrame(function (time){
timeStart=time
loop(time)
})
function loop(time){
timeElapsed=time - timeStart
window.scrollTo(0, opt.easing(timeElapsed, start, distance, duration))
if(timeElapsed < duration){
requestAnimationFrame(loop)
}else{
end()
}}
function end(){
window.scrollTo(0, start + distance)
if(typeof opt.callback==="function"){
opt.callback()
}}
function easeInOutQuad(t, b, c, d){
t /=d / 2
if(t < 1) return (c / 2) * t * t + b
t--
return (-c / 2) * (t * (t - 2) - 1) + b
}}
}),
"./src/js/update-toc-scroll.js":
((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__)=> {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
"default": ()=> ( updateTocScroll)
});
function updateTocScroll(options){
const toc =
options.tocScrollingWrapper ||
options.tocElement ||
document.querySelector(options.tocSelector)
if(toc&&toc.scrollHeight > toc.clientHeight){
const activeItem=toc.querySelector(`.${options.activeListItemClass}`)
if(activeItem){
const eTop=activeItem.offsetTop
const scrollAmount=eTop - options.tocScrollOffset
toc.scrollTop=scrollAmount > 0 ? scrollAmount:0
}}
}
})
});
var __webpack_module_cache__={};
function __webpack_require__(moduleId){
var cachedModule=__webpack_module_cache__[moduleId];
if(cachedModule!==undefined){
return cachedModule.exports;
}
var module=__webpack_module_cache__[moduleId]={
exports: {}
};
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
return module.exports;
}
(()=> {
__webpack_require__.d=(exports, definition)=> {
for(var key in definition){
if(__webpack_require__.o(definition, key)&&!__webpack_require__.o(exports, key)){
Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
}
}
};
})();
(()=> {
__webpack_require__.o=(obj, prop)=> (Object.prototype.hasOwnProperty.call(obj, prop))
})();
(()=> {
__webpack_require__.r=(exports)=> {
if(typeof Symbol!=='undefined'&&Symbol.toStringTag){
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
}
Object.defineProperty(exports, '__esModule', { value: true });
};
})();
var __webpack_exports__={};
(()=> {
__webpack_require__.r(__webpack_exports__);
var _index_esm_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__( "./src/js/index-esm.js");
((root, factory)=> {
if(typeof define==="function"&&define.amd){
define([], factory(root))
}else if(typeof exports==="object"&&!(exports instanceof HTMLElement)){
module.exports=factory(root)
}else{
root.tocbot=factory(root)
}})(
typeof global!=="undefined"&&!(global instanceof HTMLElement)
? global
: window||global,
(root)=> {
const supports =
!!root &&
!!root.document &&
!!root.document.querySelector &&
!!root.addEventListener
if(typeof window==="undefined"&&!supports){
return
}
root.tocbot=_index_esm_js__WEBPACK_IMPORTED_MODULE_0__
return _index_esm_js__WEBPACK_IMPORTED_MODULE_0__
},
)
})();
})()
;