diff --git a/README.md b/README.md index 66911449c..8b33b5e6d 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ To see this theme in action, here is a live [demo site](https://hugodoit.pages.d * Some beautiful **CSS animations** * Easy-to-use and self-expanding **table of contents** * More **social links**, **share sites** and **comment system** -* **Search** supported by [Lunr.js](https://lunrjs.com/) or [algolia](https://www.algolia.com/) +* **Search** supported by [Lunr.js](https://lunrjs.com/) or [algolia](https://www.algolia.com/) or [Fuse.js](https://fusejs.io/) * **Copy code** to clipboard with one click * Extended Markdown syntax for **[Font Awesome](https://fontawesome.com/) icons** * Extended Markdown syntax for **ruby annotation** @@ -116,7 +116,7 @@ the DoIt theme may be more suitable for you. ### Extended Features -* **Search** supported by [Lunr.js](https://lunrjs.com/) or [algolia](https://www.algolia.com/) +* **Search** supported by [Lunr.js](https://lunrjs.com/) or [algolia](https://www.algolia.com/) or [Fuse.js](https://fusejs.io/) * **Twemoji** supported * Automatically **highlighting** code * **Copy code** to clipboard with one click @@ -188,6 +188,7 @@ Thanks to the authors of following resources included in the theme: * [autocomplete.js](https://github.com/algolia/autocomplete.js) * [Lunr.js](https://lunrjs.com/) * [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript) +* [Fuse.js](https://fusejs.io/) * [lazysizes](https://github.com/aFarkas/lazysizes) * [object-fit-images](https://github.com/fregante/object-fit-images) * [Twemoji](https://github.com/twitter/twemoji) diff --git a/README.zh-cn.md b/README.zh-cn.md index 8473acb86..7009c0ecd 100644 --- a/README.zh-cn.md +++ b/README.zh-cn.md @@ -51,7 +51,7 @@ DoIt 主题增加了许多新的功能与配置项,查看[变更日志](https: * 一些美观的 **CSS 动画** * 易用和自动展开的**文章目录** * 支持更多的**社交链接**、**网站分享**和**评论系统** -* 支持基于 [Lunr.js](https://lunrjs.com/) 或 [algolia](https://www.algolia.com/) 的**搜索** +* 支持基于 [Lunr.js](https://lunrjs.com/) 或 [algolia](https://www.algolia.com/) 或 [Fuse.js](https://fusejs.io/) 的**搜索** * 一键**复制代码**到剪贴板 * 支持基于 **[Font Awesome](https://fontawesome.com/) 图标**的扩展 Markdown 语法 * 支持**上标注释**的扩展 Markdown 语法 @@ -113,7 +113,7 @@ DoIt 主题增加了许多新的功能与配置项,查看[变更日志](https: ### 扩展功能 -* 支持基于 [Lunr.js](https://lunrjs.com/) 或 [algolia](https://www.algolia.com/) 的**搜索** +* 支持基于 [Lunr.js](https://lunrjs.com/) 或 [algolia](https://www.algolia.com/) 或 [Fuse.js](https://fusejs.io/) 的**搜索** * 支持 **Twemoji** * 支持**代码高亮** * 一键**复制代码**到剪贴板 @@ -185,6 +185,7 @@ DoIt 主题中用到了以下项目,感谢它们的作者: * [autocomplete.js](https://github.com/algolia/autocomplete.js) * [Lunr.js](https://lunrjs.com/) * [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript) +* [Fuse.js](https://fusejs.io/) * [lazysizes](https://github.com/aFarkas/lazysizes) * [object-fit-images](https://github.com/fregante/object-fit-images) * [Twemoji](https://github.com/twitter/twemoji) diff --git a/assets/data/cdn/jsdelivr.yml b/assets/data/cdn/jsdelivr.yml index cd493920b..c80964f1d 100644 --- a/assets/data/cdn/jsdelivr.yml +++ b/assets/data/cdn/jsdelivr.yml @@ -65,4 +65,6 @@ libFiles: cookieconsentCSS: cookieconsent@3.1.1/build/cookieconsent.min.css cookieconsentJS: cookieconsent@3.1.1/build/cookieconsent.min.js # twikoo@1.4.0-alpha.2 https://twikoo.js.org/ - twikooJS: twikoo@1.4.0-alpha.2/dist/twikoo.all.min.js \ No newline at end of file + twikooJS: twikoo@1.4.0-alpha.2/dist/twikoo.all.min.js + # fusejs@6.4.6 https://fusejs.io/ + fuseJS: fuse.js@6.4.6/dist/fuse.min.js \ No newline at end of file diff --git a/assets/js/theme.min.js b/assets/js/theme.min.js index 36d19802f..0b9c5768e 100644 --- a/assets/js/theme.min.js +++ b/assets/js/theme.min.js @@ -1,3 +1,3 @@ -"use strict";function _objectDestructuringEmpty(a){if(null==a)throw new TypeError("Cannot destructure undefined")}function _createForOfIteratorHelper(a,b){var c="undefined"!=typeof Symbol&&a[Symbol.iterator]||a["@@iterator"];if(!c){if(Array.isArray(a)||(c=_unsupportedIterableToArray(a))||b&&a&&"number"==typeof a.length){c&&(a=c);var d=0,e=function(){};return{s:e,n:function n(){return d>=a.length?{done:!0}:{done:!1,value:a[d++]}},e:function e(a){throw a},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var f,g=!0,h=!1;return{s:function s(){c=c.call(a)},n:function n(){var a=c.next();return g=a.done,a},e:function e(a){h=!0,f=a},f:function f(){try{g||null==c.return||c.return()}finally{if(h)throw f}}}}function _toConsumableArray(a){return _arrayWithoutHoles(a)||_iterableToArray(a)||_unsupportedIterableToArray(a)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(a,b){if(a){if("string"==typeof a)return _arrayLikeToArray(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);return"Object"===c&&a.constructor&&(c=a.constructor.name),"Map"===c||"Set"===c?Array.from(a):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?_arrayLikeToArray(a,b):void 0}}function _iterableToArray(a){if("undefined"!=typeof Symbol&&null!=a[Symbol.iterator]||null!=a["@@iterator"])return Array.from(a)}function _arrayWithoutHoles(a){if(Array.isArray(a))return _arrayLikeToArray(a)}function _arrayLikeToArray(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=Array(b);c$1")),k=k.replace(new RegExp("(".concat(a,")"),"gi"),"<".concat(f,">$1"))}),b[i]={uri:i,title:j,date:h.date,context:k}}}),Object.values(b).slice(0,d)};a._index?h(i()):fetch(b.lunrIndexURL).then(function(a){return a.json()}).then(function(c){var d={};a._index=lunr(function(){var a=this;b.lunrLanguageCode&&this.use(lunr[b.lunrLanguageCode]),this.ref("objectID"),this.field("title",{boost:50}),this.field("tags",{boost:20}),this.field("categories",{boost:20}),this.field("content",{boost:10}),this.metadataWhitelist=["position"],c.forEach(function(b){d[b.objectID]=b,a.add(b)})}),a._indexData=d,h(i())}).catch(function(a){console.error(a),h([])})}else"algolia"===b.type&&(a._algoliaIndex=a._algoliaIndex||algoliasearch(b.algoliaAppID,b.algoliaSearchKey).initIndex(b.algoliaIndex),a._algoliaIndex.search(c,{offset:0,length:8*d,attributesToHighlight:["title"],attributesToSnippet:["content:".concat(e)],highlightPreTag:"<".concat(f,">"),highlightPostTag:"")}).then(function(a){var b=a.hits,c={};b.forEach(function(a){var b=a.uri,d=a.date,e=a._highlightResult.title,f=a._snippetResult.content;c[b]&&c[b].context.length>f.value||(c[b]={uri:b,title:e.value,date:d,context:f.value})}),h(Object.values(c).slice(0,d))}).catch(function(a){console.error(a),h([])}))},templates:{suggestion:function suggestion(a){var b=a.title,c=a.date,d=a.context;return"
".concat(b,"").concat(c,"
").concat(d,"
")},empty:function empty(a){var c=a.query;return"
".concat(b.noResultsFound,": \"").concat(c,"\"
")},footer:function footer(a){_objectDestructuringEmpty(a);var c="algolia"===b.type?{searchType:"algolia",icon:"",href:"https://www.algolia.com/"}:{searchType:"Lunr.js",icon:"",href:"https://lunrjs.com/"},d=c.searchType,e=c.icon,f=c.href;return"
Search by ").concat(e," ").concat(d,"
")}}});h.on("autocomplete:selected",function(a,b){window.location.assign(b.uri)}),c?a._searchMobile=h:a._searchDesktop=h};if(b.lunrSegmentitURL&&!document.getElementById("lunr-segmentit")){var n=document.createElement("script");n.id="lunr-segmentit",n.type="text/javascript",n.src=b.lunrSegmentitURL,n.async=!0,n.readyState?n.onreadystatechange=function(){("loaded"==n.readyState||"complete"==n.readyState)&&(n.onreadystatechange=null,m())}:n.onload=function(){m()},document.body.appendChild(n)}else m()}}},{key:"initDetails",value:function initDetails(){this.util.forEach(document.getElementsByClassName("details"),function(a){var b=a.getElementsByClassName("details-summary")[0];b.addEventListener("click",function(){a.classList.toggle("open")},!1)})}},{key:"initLightGallery",value:function initLightGallery(){this.config.lightGallery&&lightGallery(document.getElementById("content"),this.config.lightGallery)}},{key:"initHighlight",value:function initHighlight(){var a=this;this.util.forEach(document.querySelectorAll(".highlight > pre.chroma"),function(a){var b=document.createElement("div");b.className=a.className;var c=document.createElement("table");b.appendChild(c);var d=document.createElement("tbody");c.appendChild(d);var e=document.createElement("tr");d.appendChild(e);var f=document.createElement("td");e.appendChild(f),a.parentElement.replaceChild(b,a),f.appendChild(a)}),this.util.forEach(document.querySelectorAll(".highlight > .chroma"),function(b){var c=b.querySelectorAll("pre.chroma > code");if(c.length){var d=c[c.length-1],e=document.createElement("div");e.className="code-header "+d.className.toLowerCase();var f=document.createElement("span");f.classList.add("code-title"),f.insertAdjacentHTML("afterbegin",""),f.addEventListener("click",function(){b.classList.toggle("open")},!1),e.appendChild(f);var g=document.createElement("span");g.insertAdjacentHTML("afterbegin",""),g.classList.add("ellipses"),g.addEventListener("click",function(){b.classList.add("open")},!1),e.appendChild(g);var h=document.createElement("span");h.insertAdjacentHTML("afterbegin",""),h.classList.add("copy");var i=d.innerText;if((0>a.config.code.maxShownLines||i.split("\n").length=a;a++)this.util.forEach(document.querySelectorAll(".single .content > h"+a),function(a){a.classList.add("headerLink"),a.insertAdjacentHTML("afterbegin",""))})}},{key:"initToc",value:function initToc(){var a=this,b=document.getElementById("TableOfContents");if(null!==b)if(document.getElementById("toc-static").getAttribute("kept")||this.util.isTocStatic()){var o=document.getElementById("toc-content-static");b.parentElement!==o&&(b.parentElement.removeChild(b),o.appendChild(b)),this._tocOnScroll&&this.scrollEventSet.delete(this._tocOnScroll)}else{var p=document.getElementById("toc-content-auto");b.parentElement!==p&&(b.parentElement.removeChild(b),p.appendChild(b));var c=document.getElementById("toc-auto"),d=document.getElementsByClassName("page")[0],e=d.getBoundingClientRect();c.style.left="".concat(e.left+e.width+20,"px"),c.style.maxWidth="20%",c.style.visibility="visible";var f=b.querySelectorAll("a:first-child"),g=b.getElementsByTagName("li"),h=document.getElementsByClassName("headerLink"),j="normal"!==document.body.getAttribute("header-desktop"),k=document.getElementById("header-desktop").offsetHeight,l=20+(j?k:0),m=c.offsetTop,n=m-l+(j?0:k);this._tocOnScroll=this._tocOnScroll||function(){var d=document.getElementById("post-footer").offsetTop,e=d-c.getBoundingClientRect().height,o=e-l+(j?0:k);a.newScrollTopo?(c.style.position="absolute",c.style.top="".concat(e,"px")):(c.style.position="fixed",c.style.top="".concat(l,"px")),a.util.forEach(f,function(a){a.classList.remove("active")}),a.util.forEach(g,function(a){a.classList.remove("has-active")});for(var p=20+(j?k:0),q=h.length-1,r=0;rp||s<=p&&t>p){q=r;break}}if(-1!==q){f[q].classList.add("active");for(var u=f[q].parentElement;u!==b;)u.classList.add("has-active"),u=u.parentElement.parentElement}},this._tocOnScroll(),this.scrollEventSet.add(this._tocOnScroll)}}},{key:"initMath",value:function initMath(){this.config.math&&renderMathInElement(document.body,this.config.math)}},{key:"initMermaid",value:function initMermaid(){var a=this,b=document.getElementsByClassName("mermaid");b.length&&(mermaid.initialize({startOnLoad:!1,theme:"default"}),this.util.forEach(b,function(b){mermaid.mermaidAPI.render("svg-"+b.id,a.data[b.id],function(a){b.insertAdjacentHTML("afterbegin",a),document.getElementById("svg-"+b.id).children[0].remove()},b)}))}},{key:"initEcharts",value:function initEcharts(){var a=this;this._echartsOnSwitchTheme=this._echartsOnSwitchTheme||function(){a._echartsArr=a._echartsArr||[];for(var b=0;bd?(b.classList.remove("animate__fadeInDown"),a.util.animateCSS(b,["animate__fadeOutUp","animate__faster"],!0)):e<-d&&(b.classList.remove("animate__fadeOutUp"),a.util.animateCSS(b,["animate__fadeInDown","animate__faster"],!0))}),a.newScrollTop>100?f&&e>d?(c.classList.remove("animate__fadeIn"),a.util.animateCSS(c,["animate__fadeOut","animate__faster"],!0)):(!f||e<-d)&&(c.style.display="block",c.classList.remove("animate__fadeOut"),a.util.animateCSS(c,["animate__fadeIn","animate__faster"],!0)):(!f&&(c.classList.remove("animate__fadeIn"),a.util.animateCSS(c,["animate__fadeOut","animate__faster"],!0)),c.style.display="none");var g,h=_createForOfIteratorHelper(a.scrollEventSet);try{for(h.s();!(g=h.n()).done;){var i=g.value;i()}}catch(a){h.e(a)}finally{h.f()}a.oldScrollTop=a.newScrollTop},!1)}},{key:"onResize",value:function onResize(){var a=this;window.addEventListener("resize",function(){a._resizeTimeout||(a._resizeTimeout=window.setTimeout(function(){a._resizeTimeout=null;var b,c=_createForOfIteratorHelper(a.resizeEventSet);try{for(c.s();!(b=c.n()).done;){var d=b.value;d()}}catch(a){c.e(a)}finally{c.f()}a.initToc(),a.initMermaid(),a.initSearch()},100))},!1)}},{key:"onClickMask",value:function onClickMask(){var a=this;document.getElementById("mask").addEventListener("click",function(){var b,c=_createForOfIteratorHelper(a.clickMaskEventSet);try{for(c.s();!(b=c.n()).done;){var d=b.value;d()}}catch(a){c.e(a)}finally{c.f()}document.body.classList.remove("blur")},!1)}},{key:"init",value:function init(){var a=this;try{this.initSVGIcon(),this.initTwemoji(),this.initMenuMobile(),this.initSwitchTheme(),this.initSelectTheme(),this.initMeta(),this.initSearch(),this.initDetails(),this.initLightGallery(),this.initHighlight(),this.initTable(),this.initHeaderLink(),this.initMath(),this.initMermaid(),this.initEcharts(),this.initTypeit(),this.initMapbox(),this.initCookieconsent()}catch(a){console.error(a)}window.setTimeout(function(){a.initToc(),a.initComment(),a.onScroll(),a.onResize(),a.onClickMask()},100)}}]),a}(),themeInit=function(){var a=new Theme;a.init()};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",themeInit,!1):themeInit(); +"use strict";function _objectDestructuringEmpty(a){if(null==a)throw new TypeError("Cannot destructure undefined")}function _createForOfIteratorHelper(a,b){var c="undefined"!=typeof Symbol&&a[Symbol.iterator]||a["@@iterator"];if(!c){if(Array.isArray(a)||(c=_unsupportedIterableToArray(a))||b&&a&&"number"==typeof a.length){c&&(a=c);var d=0,e=function(){};return{s:e,n:function n(){return d>=a.length?{done:!0}:{done:!1,value:a[d++]}},e:function e(a){throw a},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var f,g=!0,h=!1;return{s:function s(){c=c.call(a)},n:function n(){var a=c.next();return g=a.done,a},e:function e(a){h=!0,f=a},f:function f(){try{g||null==c.return||c.return()}finally{if(h)throw f}}}}function _toConsumableArray(a){return _arrayWithoutHoles(a)||_iterableToArray(a)||_unsupportedIterableToArray(a)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(a,b){if(a){if("string"==typeof a)return _arrayLikeToArray(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);return"Object"===c&&a.constructor&&(c=a.constructor.name),"Map"===c||"Set"===c?Array.from(a):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?_arrayLikeToArray(a,b):void 0}}function _iterableToArray(a){if("undefined"!=typeof Symbol&&null!=a[Symbol.iterator]||null!=a["@@iterator"])return Array.from(a)}function _arrayWithoutHoles(a){if(Array.isArray(a))return _arrayLikeToArray(a)}function _arrayLikeToArray(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=Array(b);c$1")),k=k.replace(new RegExp("(".concat(a,")"),"gi"),"<".concat(f,">$1"))}),b[i]={uri:i,title:j,date:h.date,context:k}}}),Object.values(b).slice(0,d)};a._index?q(r()):fetch(b.lunrIndexURL).then(function(a){return a.json()}).then(function(c){var d={};a._index=lunr(function(){var a=this;b.lunrLanguageCode&&this.use(lunr[b.lunrLanguageCode]),this.ref("objectID"),this.field("title",{boost:50}),this.field("tags",{boost:20}),this.field("categories",{boost:20}),this.field("content",{boost:10}),this.metadataWhitelist=["position"],c.forEach(function(b){d[b.objectID]=b,a.add(b)})}),a._indexData=d,q(r())}).catch(function(a){console.error(a),q([])})}else if("algolia"===b.type)a._algoliaIndex=a._algoliaIndex||algoliasearch(b.algoliaAppID,b.algoliaSearchKey).initIndex(b.algoliaIndex),a._algoliaIndex.search(c,{offset:0,length:8*d,attributesToHighlight:["title"],attributesToSnippet:["content:".concat(e)],highlightPreTag:"<".concat(f,">"),highlightPostTag:"")}).then(function(a){var b=a.hits,c={};b.forEach(function(a){var b=a.uri,d=a.date,e=a._highlightResult.title,f=a._snippetResult.content;c[b]&&c[b].context.length>f.value||(c[b]={uri:b,title:e.value,date:d,context:f.value})}),q(Object.values(c).slice(0,d))}).catch(function(a){console.error(a),q([])});else if("fuse"===b.type){var s=function(){var b={};return a._index.search(c).forEach(function(a){var c=a.item,d=a.refIndex,e=a.matches,g=c.title,h=c.content;e.forEach(function(a){var b=a.indices,c=a.value,d=a.key;if("content"===d)for(var e=0,j=0;j")+k+"");h=h.substring(0,b[j][0]+e)+l+h.substring(b[j][1]+1+e,h.length),e+=2*f.length+5}else if("title"===d)for(var m=0,n=0;n")+o+"");g=g.substring(0,b[n][0]+m)+p+g.substring(b[n][1]+1+m,h.length),m+=2*f.length+5}}),b[c.uri]={uri:c.uri,title:g,date:c.date,context:h}}),Object.values(b).slice(0,d)};a._index?q(s()):fetch(b.fuseIndexURL).then(function(a){return a.json()}).then(function(b){a._index=new Fuse(b,{isCaseSensitive:g,findAllMatches:i,minMatchCharLength:h,location:j,threshold:k,distance:l,ignoreLocation:m,useExtendedSearch:n,ignoreFieldNorm:o,includeScore:!1,shouldSort:!0,includeMatches:!0,keys:["content","title"]}),q(s())}).catch(function(a){console.error(a),q([])})}},templates:{suggestion:function suggestion(a){var b=a.title,c=a.date,d=a.context;return"
".concat(b,"").concat(c,"
").concat(d,"
")},empty:function empty(a){var c=a.query;return"
".concat(b.noResultsFound,": \"").concat(c,"\"
")},footer:function footer(a){_objectDestructuringEmpty(a);var c="algolia"===b.type?{searchType:"algolia",icon:"",href:"https://www.algolia.com/"}:"lunr"===b.type?{searchType:"Lunr.js",icon:"",href:"https://lunrjs.com/"}:{searchType:"Fuse.js",icon:"",href:"https://fusejs.io/"},d=c.searchType,e=c.icon,f=c.href;return"")}}});q.on("autocomplete:selected",function(a,b){window.location.assign(b.uri)}),c?a._searchMobile=q:a._searchDesktop=q};if(b.lunrSegmentitURL&&!document.getElementById("lunr-segmentit")){var w=document.createElement("script");w.id="lunr-segmentit",w.type="text/javascript",w.src=b.lunrSegmentitURL,w.async=!0,w.readyState?w.onreadystatechange=function(){("loaded"==w.readyState||"complete"==w.readyState)&&(w.onreadystatechange=null,v())}:w.onload=function(){v()},document.body.appendChild(w)}else v()}}},{key:"initDetails",value:function initDetails(){this.util.forEach(document.getElementsByClassName("details"),function(a){var b=a.getElementsByClassName("details-summary")[0];b.addEventListener("click",function(){a.classList.toggle("open")},!1)})}},{key:"initLightGallery",value:function initLightGallery(){this.config.lightGallery&&lightGallery(document.getElementById("content"),this.config.lightGallery)}},{key:"initHighlight",value:function initHighlight(){var a=this;this.util.forEach(document.querySelectorAll(".highlight > pre.chroma"),function(a){var b=document.createElement("div");b.className=a.className;var c=document.createElement("table");b.appendChild(c);var d=document.createElement("tbody");c.appendChild(d);var e=document.createElement("tr");d.appendChild(e);var f=document.createElement("td");e.appendChild(f),a.parentElement.replaceChild(b,a),f.appendChild(a)}),this.util.forEach(document.querySelectorAll(".highlight > .chroma"),function(b){var c=b.querySelectorAll("pre.chroma > code");if(c.length){var d=c[c.length-1],e=document.createElement("div");e.className="code-header "+d.className.toLowerCase();var f=document.createElement("span");f.classList.add("code-title"),f.insertAdjacentHTML("afterbegin",""),f.addEventListener("click",function(){b.classList.toggle("open")},!1),e.appendChild(f);var g=document.createElement("span");g.insertAdjacentHTML("afterbegin",""),g.classList.add("ellipses"),g.addEventListener("click",function(){b.classList.add("open")},!1),e.appendChild(g);var h=document.createElement("span");h.insertAdjacentHTML("afterbegin",""),h.classList.add("copy");var i=d.innerText;if((0>a.config.code.maxShownLines||i.split("\n").length=a;a++)this.util.forEach(document.querySelectorAll(".single .content > h"+a),function(a){a.classList.add("headerLink"),a.insertAdjacentHTML("afterbegin",""))})}},{key:"initToc",value:function initToc(){var a=this,b=document.getElementById("TableOfContents");if(null!==b)if(document.getElementById("toc-static").getAttribute("kept")||this.util.isTocStatic()){var o=document.getElementById("toc-content-static");b.parentElement!==o&&(b.parentElement.removeChild(b),o.appendChild(b)),this._tocOnScroll&&this.scrollEventSet.delete(this._tocOnScroll)}else{var p=document.getElementById("toc-content-auto");b.parentElement!==p&&(b.parentElement.removeChild(b),p.appendChild(b));var c=document.getElementById("toc-auto"),d=document.getElementsByClassName("page")[0],e=d.getBoundingClientRect();c.style.left="".concat(e.left+e.width+20,"px"),c.style.maxWidth="20%",c.style.visibility="visible";var f=b.querySelectorAll("a:first-child"),g=b.getElementsByTagName("li"),h=document.getElementsByClassName("headerLink"),j="normal"!==document.body.getAttribute("header-desktop"),k=document.getElementById("header-desktop").offsetHeight,l=20+(j?k:0),m=c.offsetTop,n=m-l+(j?0:k);this._tocOnScroll=this._tocOnScroll||function(){var d=document.getElementById("post-footer").offsetTop,e=d-c.getBoundingClientRect().height,o=e-l+(j?0:k);a.newScrollTopo?(c.style.position="absolute",c.style.top="".concat(e,"px")):(c.style.position="fixed",c.style.top="".concat(l,"px")),a.util.forEach(f,function(a){a.classList.remove("active")}),a.util.forEach(g,function(a){a.classList.remove("has-active")});for(var p=20+(j?k:0),q=h.length-1,r=0;rp||s<=p&&t>p){q=r;break}}if(-1!==q){f[q].classList.add("active");for(var u=f[q].parentElement;u!==b;)u.classList.add("has-active"),u=u.parentElement.parentElement}},this._tocOnScroll(),this.scrollEventSet.add(this._tocOnScroll)}}},{key:"initMath",value:function initMath(){this.config.math&&renderMathInElement(document.body,this.config.math)}},{key:"initMermaid",value:function initMermaid(){var a=this,b=document.getElementsByClassName("mermaid");b.length&&(mermaid.initialize({startOnLoad:!1,theme:"default"}),this.util.forEach(b,function(b){mermaid.mermaidAPI.render("svg-"+b.id,a.data[b.id],function(a){b.insertAdjacentHTML("afterbegin",a),document.getElementById("svg-"+b.id).children[0].remove()},b)}))}},{key:"initEcharts",value:function initEcharts(){var a=this;this._echartsOnSwitchTheme=this._echartsOnSwitchTheme||function(){a._echartsArr=a._echartsArr||[];for(var b=0;bd?(b.classList.remove("animate__fadeInDown"),a.util.animateCSS(b,["animate__fadeOutUp","animate__faster"],!0)):e<-d&&(b.classList.remove("animate__fadeOutUp"),a.util.animateCSS(b,["animate__fadeInDown","animate__faster"],!0))}),a.newScrollTop>100?f&&e>d?(c.classList.remove("animate__fadeIn"),a.util.animateCSS(c,["animate__fadeOut","animate__faster"],!0)):(!f||e<-d)&&(c.style.display="block",c.classList.remove("animate__fadeOut"),a.util.animateCSS(c,["animate__fadeIn","animate__faster"],!0)):(!f&&(c.classList.remove("animate__fadeIn"),a.util.animateCSS(c,["animate__fadeOut","animate__faster"],!0)),c.style.display="none");var g,h=_createForOfIteratorHelper(a.scrollEventSet);try{for(h.s();!(g=h.n()).done;){var i=g.value;i()}}catch(a){h.e(a)}finally{h.f()}a.oldScrollTop=a.newScrollTop},!1)}},{key:"onResize",value:function onResize(){var a=this;window.addEventListener("resize",function(){a._resizeTimeout||(a._resizeTimeout=window.setTimeout(function(){a._resizeTimeout=null;var b,c=_createForOfIteratorHelper(a.resizeEventSet);try{for(c.s();!(b=c.n()).done;){var d=b.value;d()}}catch(a){c.e(a)}finally{c.f()}a.initToc(),a.initMermaid(),a.initSearch()},100))},!1)}},{key:"onClickMask",value:function onClickMask(){var a=this;document.getElementById("mask").addEventListener("click",function(){var b,c=_createForOfIteratorHelper(a.clickMaskEventSet);try{for(c.s();!(b=c.n()).done;){var d=b.value;d()}}catch(a){c.e(a)}finally{c.f()}document.body.classList.remove("blur")},!1)}},{key:"init",value:function init(){var a=this;try{this.initSVGIcon(),this.initTwemoji(),this.initMenuMobile(),this.initSwitchTheme(),this.initSelectTheme(),this.initMeta(),this.initSearch(),this.initDetails(),this.initLightGallery(),this.initHighlight(),this.initTable(),this.initHeaderLink(),this.initMath(),this.initMermaid(),this.initEcharts(),this.initTypeit(),this.initMapbox(),this.initCookieconsent()}catch(a){console.error(a)}window.setTimeout(function(){a.initToc(),a.initComment(),a.onScroll(),a.onResize(),a.onClickMask()},100)}}]),a}(),themeInit=function(){var a=new Theme;a.init()};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",themeInit,!1):themeInit(); //# sourceMappingURL=theme.min.js.map \ No newline at end of file diff --git a/assets/js/theme.min.js.map b/assets/js/theme.min.js.map index e1c150d89..5af476524 100644 --- a/assets/js/theme.min.js.map +++ b/assets/js/theme.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/js/theme.js"],"names":[],"mappings":"upEAAM,CAAA,I,6FACF,iBAAQ,CAAR,CAAkB,CAAlB,CAA2B,CACvB,CAAQ,CAAG,CAAQ,EAAI,EADA,CAEvB,IAAK,GAAI,CAAA,CAAC,CAAG,CAAb,CAAgB,CAAC,CAAG,CAAQ,CAAC,MAA7B,CAAqC,CAAC,EAAtC,CAA0C,CAAO,CAAC,CAAQ,CAAC,CAAD,CAAT,CACpD,C,4BAED,uBAAe,CACX,MAAQ,CAAA,QAAQ,CAAC,eAAT,EAA4B,QAAQ,CAAC,eAAT,CAAyB,SAAtD,EAAoE,QAAQ,CAAC,IAAT,CAAc,SAC5F,C,wBAED,mBAAW,CACP,MAAO,CAAA,MAAM,CAAC,UAAP,CAAkB,oCAAlB,EAAwD,OAClE,C,2BAED,sBAAc,CACV,MAAO,CAAA,MAAM,CAAC,UAAP,CAAkB,qCAAlB,EAAyD,OACnE,C,0BAED,oBAAW,CAAX,CAAoB,CAApB,CAA+B,CAA/B,CAAyC,CAAzC,CAAmD,OAC1C,KAAK,CAAC,OAAN,CAAc,CAAd,CAD0C,GAChB,CAAS,CAAG,CAAC,CAAD,CADI,EAE/C,GAAA,CAAO,CAAC,SAAR,EAAkB,GAAlB,UAAsB,mBAAtB,4BAA8C,CAA9C,GAF+C,CAG/C,GAAM,CAAA,CAAO,CAAG,U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C,MAC5D,+BAAS,CAAA,CAAT,SAA0C,CAAK,EAA/C,CAD4D,+BAE5D,QAAQ,CAAC,IAAT,CAAc,SAAd,CAAwB,MAAxB,CAA+B,MAA/B,CACH,CAHD,IAIH,C,oBAED,eAAO,YACH,GAAI,CACA,KAAK,WAAL,EADA,CAEA,KAAK,WAAL,EAFA,CAGA,KAAK,cAAL,EAHA,CAIA,KAAK,eAAL,EAJA,CAKA,KAAK,eAAL,EALA,CAMA,KAAK,QAAL,EANA,CAOA,KAAK,UAAL,EAPA,CAQA,KAAK,WAAL,EARA,CASA,KAAK,gBAAL,EATA,CAUA,KAAK,aAAL,EAVA,CAWA,KAAK,SAAL,EAXA,CAYA,KAAK,cAAL,EAZA,CAaA,KAAK,QAAL,EAbA,CAcA,KAAK,WAAL,EAdA,CAeA,KAAK,WAAL,EAfA,CAgBA,KAAK,UAAL,EAhBA,CAiBA,KAAK,UAAL,EAjBA,CAkBA,KAAK,iBAAL,EACH,CAAC,MAAO,CAAP,CAAY,CACV,OAAO,CAAC,KAAR,CAAc,CAAd,CACH,CAED,MAAM,CAAC,UAAP,CAAkB,UAAM,CACpB,CAAI,CAAC,OAAL,EADoB,CAEpB,CAAI,CAAC,WAAL,EAFoB,CAIpB,CAAI,CAAC,QAAL,EAJoB,CAKpB,CAAI,CAAC,QAAL,EALoB,CAMpB,CAAI,CAAC,WAAL,EACH,CAPD,CAOG,GAPH,CAQH,C,SAGC,SAAS,CAAG,UAAM,CACpB,GAAM,CAAA,CAAK,CAAG,GAAI,CAAA,KAAlB,CACA,CAAK,CAAC,IAAN,EACH,C,CAE2B,SAAxB,GAAA,QAAQ,CAAC,U,CAGT,QAAQ,CAAC,gBAAT,CAA0B,kBAA1B,CAA8C,SAA9C,I,CAFA,SAAS,E","file":"theme.min.js","sourcesContent":["class Util {\r\n forEach(elements, handler) {\r\n elements = elements || [];\r\n for (let i = 0; i < elements.length; i++) handler(elements[i]);\r\n }\r\n\r\n getScrollTop() {\r\n return (document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop;\r\n }\r\n\r\n isMobile() {\r\n return window.matchMedia('only screen and (max-width: 680px)').matches;\r\n }\r\n\r\n isTocStatic() {\r\n return window.matchMedia('only screen and (max-width: 1000px)').matches;\r\n }\r\n\r\n animateCSS(element, animation, reserved, callback) {\r\n if (!Array.isArray(animation)) animation = [animation];\r\n element.classList.add('animate__animated', ...animation);\r\n const handler = () => {\r\n element.classList.remove('animate__animated', ...animation);\r\n element.removeEventListener('animationend', handler);\r\n if (typeof callback === 'function') callback();\r\n };\r\n if (!reserved) element.addEventListener('animationend', handler, false);\r\n }\r\n}\r\n\r\nclass Theme {\r\n constructor() {\r\n this.config = window.config;\r\n this.data = this.config.data;\r\n this.isDark = document.body.getAttribute('theme') !== 'light';\r\n this.util = new Util();\r\n this.newScrollTop = this.util.getScrollTop();\r\n this.oldScrollTop = this.newScrollTop;\r\n this.scrollEventSet = new Set();\r\n this.resizeEventSet = new Set();\r\n this.switchThemeEventSet = new Set();\r\n this.clickMaskEventSet = new Set();\r\n if (window.objectFitImages) objectFitImages();\r\n }\r\n\r\n initSVGIcon() {\r\n this.util.forEach(document.querySelectorAll('[data-svg-src]'), $icon => {\r\n fetch($icon.getAttribute('data-svg-src'))\r\n .then(response => response.text())\r\n .then(svg => {\r\n const $temp = document.createElement('div');\r\n $temp.insertAdjacentHTML('afterbegin', svg);\r\n const $svg = $temp.firstChild;\r\n $svg.setAttribute('data-svg-src', $icon.getAttribute('data-svg-src'));\r\n $svg.classList.add('icon');\r\n const $titleElements = $svg.getElementsByTagName('title');\r\n if ($titleElements.length) $svg.removeChild($titleElements[0]);\r\n $icon.parentElement.replaceChild($svg, $icon);\r\n })\r\n .catch(err => { console.error(err); });\r\n });\r\n }\r\n\r\n initTwemoji() {\r\n if (this.config.twemoji) twemoji.parse(document.body);\r\n }\r\n\r\n initMenuMobile() {\r\n const $menuToggleMobile = document.getElementById('menu-toggle-mobile');\r\n const $menuMobile = document.getElementById('menu-mobile');\r\n $menuToggleMobile.addEventListener('click', () => {\r\n document.body.classList.toggle('blur');\r\n $menuToggleMobile.classList.toggle('active');\r\n $menuMobile.classList.toggle('active');\r\n }, false);\r\n this._menuMobileOnClickMask = this._menuMobileOnClickMask || (() => {\r\n $menuToggleMobile.classList.remove('active');\r\n $menuMobile.classList.remove('active');\r\n });\r\n this.clickMaskEventSet.add(this._menuMobileOnClickMask);\r\n }\r\n\r\n initSwitchTheme() {\r\n this.util.forEach(document.getElementsByClassName('theme-switch'), $themeSwitch => {\r\n $themeSwitch.addEventListener('click', () => {\r\n let currentTheme = document.body.getAttribute('theme');\r\n if (currentTheme === 'dark') {\r\n document.body.setAttribute('theme', 'black');\r\n window.localStorage && localStorage.setItem('theme', 'black');\r\n this.isDark = true;\r\n } else if (currentTheme === 'black') {\r\n document.body.setAttribute('theme', 'light');\r\n window.localStorage && localStorage.setItem('theme', 'light');\r\n this.isDark = false;\r\n } else {\r\n document.body.setAttribute('theme', 'dark');\r\n window.localStorage && localStorage.setItem('theme', 'dark');\r\n this.isDark = true;\r\n }\r\n for (let event of this.switchThemeEventSet) event();\r\n }, false);\r\n });\r\n }\r\n\r\n initSelectTheme() {\r\n this.util.forEach(document.getElementsByClassName('color-theme-select'), $themeSelect => {\r\n let currentTheme = document.body.getAttribute('theme');\r\n for (let i, j = 0; i = $themeSelect.options[j]; j++) {\r\n if (i.value == currentTheme) {\r\n $themeSelect.selectedIndex = j;\r\n break;\r\n }\r\n }\r\n $themeSelect.addEventListener('change', () => {\r\n let theme = $themeSelect.value;\r\n window.localStorage && localStorage.setItem('theme', theme);\r\n if (theme != 'auto') {\r\n document.body.setAttribute('theme', theme);\r\n if (theme == 'light') {\r\n this.isDark = false;\r\n } else {\r\n this.isDark = true;\r\n }\r\n } else {\r\n if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {\r\n document.body.setAttribute('theme', 'dark');\r\n this.isDark = true;\r\n } else {\r\n document.body.setAttribute('theme', 'white');\r\n this.isDark = false;\r\n }\r\n }\r\n for (let event of this.switchThemeEventSet) event();\r\n }, false);\r\n });\r\n }\r\n\r\n initSearch() {\r\n const searchConfig = this.config.search;\r\n const isMobile = this.util.isMobile();\r\n if (!searchConfig || isMobile && this._searchMobileOnce || !isMobile && this._searchDesktopOnce) return;\r\n\r\n const maxResultLength = searchConfig.maxResultLength ? searchConfig.maxResultLength : 10;\r\n const snippetLength = searchConfig.snippetLength ? searchConfig.snippetLength : 50;\r\n const highlightTag = searchConfig.highlightTag ? searchConfig.highlightTag : 'em';\r\n\r\n const suffix = isMobile ? 'mobile' : 'desktop';\r\n const $header = document.getElementById(`header-${suffix}`);\r\n const $searchInput = document.getElementById(`search-input-${suffix}`);\r\n const $searchToggle = document.getElementById(`search-toggle-${suffix}`);\r\n const $searchLoading = document.getElementById(`search-loading-${suffix}`);\r\n const $searchClear = document.getElementById(`search-clear-${suffix}`);\r\n if (isMobile) {\r\n this._searchMobileOnce = true;\r\n $searchInput.addEventListener('focus', () => {\r\n document.body.classList.add('blur');\r\n $header.classList.add('open');\r\n }, false);\r\n document.getElementById('search-cancel-mobile').addEventListener('click', () => {\r\n $header.classList.remove('open');\r\n document.body.classList.remove('blur');\r\n document.getElementById('menu-toggle-mobile').classList.remove('active');\r\n document.getElementById('menu-mobile').classList.remove('active');\r\n $searchLoading.style.display = 'none';\r\n $searchClear.style.display = 'none';\r\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\r\n }, false);\r\n $searchClear.addEventListener('click', () => {\r\n $searchClear.style.display = 'none';\r\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\r\n }, false);\r\n this._searchMobileOnClickMask = this._searchMobileOnClickMask || (() => {\r\n $header.classList.remove('open');\r\n $searchLoading.style.display = 'none';\r\n $searchClear.style.display = 'none';\r\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\r\n });\r\n this.clickMaskEventSet.add(this._searchMobileOnClickMask);\r\n } else {\r\n this._searchDesktopOnce = true;\r\n $searchToggle.addEventListener('click', () => {\r\n document.body.classList.add('blur');\r\n $header.classList.add('open');\r\n $searchInput.focus();\r\n }, false);\r\n $searchClear.addEventListener('click', () => {\r\n $searchClear.style.display = 'none';\r\n this._searchDesktop && this._searchDesktop.autocomplete.setVal('');\r\n }, false);\r\n this._searchDesktopOnClickMask = this._searchDesktopOnClickMask || (() => {\r\n $header.classList.remove('open');\r\n $searchLoading.style.display = 'none';\r\n $searchClear.style.display = 'none';\r\n this._searchDesktop && this._searchDesktop.autocomplete.setVal('');\r\n });\r\n this.clickMaskEventSet.add(this._searchDesktopOnClickMask);\r\n }\r\n $searchInput.addEventListener('input', () => {\r\n if ($searchInput.value === '') $searchClear.style.display = 'none';\r\n else $searchClear.style.display = 'inline';\r\n }, false);\r\n\r\n const initAutosearch = () => {\r\n const autosearch = autocomplete(`#search-input-${suffix}`, {\r\n hint: false,\r\n autoselect: true,\r\n dropdownMenuContainer: `#search-dropdown-${suffix}`,\r\n clearOnSelected: true,\r\n cssClasses: { noPrefix: true },\r\n debug: true,\r\n }, {\r\n name: 'search',\r\n source: (query, callback) => {\r\n $searchLoading.style.display = 'inline';\r\n $searchClear.style.display = 'none';\r\n const finish = (results) => {\r\n $searchLoading.style.display = 'none';\r\n $searchClear.style.display = 'inline';\r\n callback(results);\r\n };\r\n if (searchConfig.type === 'lunr') {\r\n const search = () => {\r\n if (lunr.queryHandler) query = lunr.queryHandler(query);\r\n const results = {};\r\n this._index.search(query).forEach(({ ref, matchData: { metadata } }) => {\r\n const matchData = this._indexData[ref];\r\n let { uri, title, content: context } = matchData;\r\n if (results[uri]) return;\r\n let position = 0;\r\n Object.values(metadata).forEach(({ content }) => {\r\n if (content) {\r\n const matchPosition = content.position[0][0];\r\n if (matchPosition < position || position === 0) position = matchPosition;\r\n }\r\n });\r\n position -= snippetLength / 5;\r\n if (position > 0) {\r\n position += context.substr(position, 20).lastIndexOf(' ') + 1;\r\n context = '...' + context.substr(position, snippetLength);\r\n } else {\r\n context = context.substr(0, snippetLength);\r\n }\r\n Object.keys(metadata).forEach(key => {\r\n title = title.replace(new RegExp(`(${key})`, 'gi'), `<${highlightTag}>$1`);\r\n context = context.replace(new RegExp(`(${key})`, 'gi'), `<${highlightTag}>$1`);\r\n });\r\n results[uri] = {\r\n 'uri': uri,\r\n 'title' : title,\r\n 'date' : matchData.date,\r\n 'context' : context,\r\n };\r\n });\r\n return Object.values(results).slice(0, maxResultLength);\r\n }\r\n if (!this._index) {\r\n fetch(searchConfig.lunrIndexURL)\r\n .then(response => response.json())\r\n .then(data => {\r\n const indexData = {};\r\n this._index = lunr(function () {\r\n if (searchConfig.lunrLanguageCode) this.use(lunr[searchConfig.lunrLanguageCode]);\r\n this.ref('objectID');\r\n this.field('title', { boost: 50 });\r\n this.field('tags', { boost: 20 });\r\n this.field('categories', { boost: 20 });\r\n this.field('content', { boost: 10 });\r\n this.metadataWhitelist = ['position'];\r\n data.forEach((record) => {\r\n indexData[record.objectID] = record;\r\n this.add(record);\r\n });\r\n });\r\n this._indexData = indexData;\r\n finish(search());\r\n }).catch(err => {\r\n console.error(err);\r\n finish([]);\r\n });\r\n } else finish(search());\r\n } else if (searchConfig.type === 'algolia') {\r\n this._algoliaIndex = this._algoliaIndex || algoliasearch(searchConfig.algoliaAppID, searchConfig.algoliaSearchKey).initIndex(searchConfig.algoliaIndex);\r\n this._algoliaIndex\r\n .search(query, {\r\n offset: 0,\r\n length: maxResultLength * 8,\r\n attributesToHighlight: ['title'],\r\n attributesToSnippet: [`content:${snippetLength}`],\r\n highlightPreTag: `<${highlightTag}>`,\r\n highlightPostTag: ``,\r\n })\r\n .then(({ hits }) => {\r\n const results = {};\r\n hits.forEach(({ uri, date, _highlightResult: { title }, _snippetResult: { content } }) => {\r\n if (results[uri] && results[uri].context.length > content.value) return;\r\n results[uri] = {\r\n uri: uri,\r\n title: title.value,\r\n date: date,\r\n context: content.value,\r\n };\r\n });\r\n finish(Object.values(results).slice(0, maxResultLength));\r\n })\r\n .catch(err => {\r\n console.error(err);\r\n finish([]);\r\n });\r\n }\r\n },\r\n templates: {\r\n suggestion: ({ title, date, context }) => `
${title}${date}
${context}
`,\r\n empty: ({ query }) => `
${searchConfig.noResultsFound}: \"${query}\"
`,\r\n footer: ({}) => {\r\n const { searchType, icon, href } = searchConfig.type === 'algolia' ? {\r\n searchType: 'algolia',\r\n icon: '',\r\n href: 'https://www.algolia.com/',\r\n } : {\r\n searchType: 'Lunr.js',\r\n icon: '',\r\n href: 'https://lunrjs.com/',\r\n };\r\n return ``;},\r\n },\r\n });\r\n autosearch.on('autocomplete:selected', (_event, suggestion, _dataset, _context) => {\r\n window.location.assign(suggestion.uri);\r\n });\r\n if (isMobile) this._searchMobile = autosearch;\r\n else this._searchDesktop = autosearch;\r\n };\r\n if (searchConfig.lunrSegmentitURL && !document.getElementById('lunr-segmentit')) {\r\n const script = document.createElement('script');\r\n script.id = 'lunr-segmentit';\r\n script.type = 'text/javascript';\r\n script.src = searchConfig.lunrSegmentitURL;\r\n script.async = true;\r\n if (script.readyState) {\r\n script.onreadystatechange = () => {\r\n if (script.readyState == 'loaded' || script.readyState == 'complete'){\r\n script.onreadystatechange = null;\r\n initAutosearch();\r\n }\r\n };\r\n } else {\r\n script.onload = () => {\r\n initAutosearch();\r\n };\r\n }\r\n document.body.appendChild(script);\r\n } else initAutosearch();\r\n }\r\n\r\n initDetails() {\r\n this.util.forEach(document.getElementsByClassName('details'), $details => {\r\n const $summary = $details.getElementsByClassName('details-summary')[0];\r\n $summary.addEventListener('click', () => {\r\n $details.classList.toggle('open');\r\n }, false);\r\n });\r\n }\r\n\r\n initLightGallery() {\r\n if (this.config.lightGallery) lightGallery(document.getElementById('content'), this.config.lightGallery);\r\n }\r\n\r\n initHighlight() {\r\n this.util.forEach(document.querySelectorAll('.highlight > pre.chroma'), $preChroma => {\r\n const $chroma = document.createElement('div');\r\n $chroma.className = $preChroma.className;\r\n const $table = document.createElement('table');\r\n $chroma.appendChild($table);\r\n const $tbody = document.createElement('tbody');\r\n $table.appendChild($tbody);\r\n const $tr = document.createElement('tr');\r\n $tbody.appendChild($tr);\r\n const $td = document.createElement('td');\r\n $tr.appendChild($td);\r\n $preChroma.parentElement.replaceChild($chroma, $preChroma);\r\n $td.appendChild($preChroma);\r\n });\r\n this.util.forEach(document.querySelectorAll('.highlight > .chroma'), $chroma => {\r\n const $codeElements = $chroma.querySelectorAll('pre.chroma > code');\r\n if ($codeElements.length) {\r\n const $code = $codeElements[$codeElements.length - 1];\r\n const $header = document.createElement('div');\r\n $header.className = 'code-header ' + $code.className.toLowerCase();\r\n const $title = document.createElement('span');\r\n $title.classList.add('code-title');\r\n $title.insertAdjacentHTML('afterbegin', '');\r\n $title.addEventListener('click', () => {\r\n $chroma.classList.toggle('open');\r\n }, false);\r\n $header.appendChild($title);\r\n const $ellipses = document.createElement('span');\r\n $ellipses.insertAdjacentHTML('afterbegin', '');\r\n $ellipses.classList.add('ellipses');\r\n $ellipses.addEventListener('click', () => {\r\n $chroma.classList.add('open');\r\n }, false);\r\n $header.appendChild($ellipses);\r\n const $copy = document.createElement('span');\r\n $copy.insertAdjacentHTML('afterbegin', '');\r\n $copy.classList.add('copy');\r\n const code = $code.innerText;\r\n if (this.config.code.maxShownLines < 0 || code.split('\\n').length < this.config.code.maxShownLines + 2) $chroma.classList.add('open');\r\n if (this.config.code.copyTitle) {\r\n $copy.setAttribute('data-clipboard-text', code);\r\n $copy.title = this.config.code.copyTitle;\r\n const clipboard = new ClipboardJS($copy);\r\n clipboard.on('success', _e => {\r\n this.util.animateCSS($code, 'animate__flash');\r\n });\r\n $header.appendChild($copy);\r\n }\r\n $chroma.insertBefore($header, $chroma.firstChild);\r\n }\r\n });\r\n }\r\n\r\n initTable() {\r\n this.util.forEach(document.querySelectorAll('.content table'), $table => {\r\n const $wrapper = document.createElement('div');\r\n $wrapper.className = 'table-wrapper';\r\n $table.parentElement.replaceChild($wrapper, $table);\r\n $wrapper.appendChild($table);\r\n });\r\n }\r\n\r\n initHeaderLink() {\r\n for (let num = 1; num <= 6; num++) {\r\n this.util.forEach(document.querySelectorAll('.single .content > h' + num), $header => {\r\n $header.classList.add('headerLink');\r\n $header.insertAdjacentHTML('afterbegin', ``);\r\n });\r\n }\r\n }\r\n\r\n initToc() {\r\n const $tocCore = document.getElementById('TableOfContents');\r\n if ($tocCore === null) return;\r\n if (document.getElementById('toc-static').getAttribute('kept') || this.util.isTocStatic()) {\r\n const $tocContentStatic = document.getElementById('toc-content-static');\r\n if ($tocCore.parentElement !== $tocContentStatic) {\r\n $tocCore.parentElement.removeChild($tocCore);\r\n $tocContentStatic.appendChild($tocCore);\r\n }\r\n if (this._tocOnScroll) this.scrollEventSet.delete(this._tocOnScroll);\r\n } else {\r\n const $tocContentAuto = document.getElementById('toc-content-auto');\r\n if ($tocCore.parentElement !== $tocContentAuto) {\r\n $tocCore.parentElement.removeChild($tocCore);\r\n $tocContentAuto.appendChild($tocCore);\r\n }\r\n const $toc = document.getElementById('toc-auto');\r\n const $page = document.getElementsByClassName('page')[0];\r\n const rect = $page.getBoundingClientRect();\r\n $toc.style.left = `${rect.left + rect.width + 20}px`;\r\n $toc.style.maxWidth = `20%`;\r\n $toc.style.visibility = 'visible';\r\n const $tocLinkElements = $tocCore.querySelectorAll('a:first-child');\r\n const $tocLiElements = $tocCore.getElementsByTagName('li');\r\n const $headerLinkElements = document.getElementsByClassName('headerLink');\r\n const headerIsFixed = document.body.getAttribute('header-desktop') !== 'normal';\r\n const headerHeight = document.getElementById('header-desktop').offsetHeight;\r\n const TOP_SPACING = 20 + (headerIsFixed ? headerHeight : 0);\r\n const minTocTop = $toc.offsetTop;\r\n const minScrollTop = minTocTop - TOP_SPACING + (headerIsFixed ? 0 : headerHeight);\r\n this._tocOnScroll = this._tocOnScroll || (() => {\r\n const footerTop = document.getElementById('post-footer').offsetTop;\r\n const maxTocTop = footerTop - $toc.getBoundingClientRect().height;\r\n const maxScrollTop = maxTocTop - TOP_SPACING + (headerIsFixed ? 0 : headerHeight);\r\n if (this.newScrollTop < minScrollTop) {\r\n $toc.style.position = 'absolute';\r\n $toc.style.top = `${minTocTop}px`;\r\n } else if (this.newScrollTop > maxScrollTop) {\r\n $toc.style.position = 'absolute';\r\n $toc.style.top = `${maxTocTop}px`;\r\n } else {\r\n $toc.style.position = 'fixed';\r\n $toc.style.top = `${TOP_SPACING}px`;\r\n }\r\n\r\n this.util.forEach($tocLinkElements, $tocLink => { $tocLink.classList.remove('active'); });\r\n this.util.forEach($tocLiElements, $tocLi => { $tocLi.classList.remove('has-active'); });\r\n const INDEX_SPACING = 20 + (headerIsFixed ? headerHeight : 0);\r\n let activeTocIndex = $headerLinkElements.length - 1;\r\n for (let i = 0; i < $headerLinkElements.length - 1; i++) {\r\n const thisTop = $headerLinkElements[i].getBoundingClientRect().top;\r\n const nextTop = $headerLinkElements[i + 1].getBoundingClientRect().top;\r\n if ((i == 0 && thisTop > INDEX_SPACING)\r\n || (thisTop <= INDEX_SPACING && nextTop > INDEX_SPACING)) {\r\n activeTocIndex = i;\r\n break;\r\n }\r\n }\r\n if (activeTocIndex !== -1) {\r\n $tocLinkElements[activeTocIndex].classList.add('active');\r\n let $parent = $tocLinkElements[activeTocIndex].parentElement;\r\n while ($parent !== $tocCore) {\r\n $parent.classList.add('has-active');\r\n $parent = $parent.parentElement.parentElement;\r\n }\r\n }\r\n });\r\n this._tocOnScroll();\r\n this.scrollEventSet.add(this._tocOnScroll);\r\n }\r\n }\r\n\r\n initMath() {\r\n if (this.config.math) renderMathInElement(document.body, this.config.math);\r\n }\r\n\r\n initMermaid() {\r\n const $mermaidElements = document.getElementsByClassName('mermaid');\r\n if ($mermaidElements.length) {\r\n mermaid.initialize({startOnLoad: false, theme: 'default'});\r\n this.util.forEach($mermaidElements, $mermaid => {\r\n mermaid.mermaidAPI.render('svg-' + $mermaid.id, this.data[$mermaid.id], svgCode => {\r\n $mermaid.insertAdjacentHTML('afterbegin', svgCode);\r\n document.getElementById('svg-' + $mermaid.id).children[0].remove();\r\n }, $mermaid);\r\n });\r\n }\r\n }\r\n\r\n initEcharts() {\r\n this._echartsOnSwitchTheme = this._echartsOnSwitchTheme || (() => {\r\n this._echartsArr = this._echartsArr || [];\r\n for (let i = 0; i < this._echartsArr.length; i++) {\r\n this._echartsArr[i].dispose();\r\n }\r\n this._echartsArr = [];\r\n this.util.forEach(document.getElementsByClassName('echarts'), $echarts => {\r\n const chart = echarts.init($echarts, this.isDark ? 'dark' : 'macarons', {renderer: 'svg'});\r\n chart.setOption(JSON.parse(this.data[$echarts.id]));\r\n this._echartsArr.push(chart);\r\n });\r\n });\r\n this.switchThemeEventSet.add(this._echartsOnSwitchTheme);\r\n this._echartsOnSwitchTheme();\r\n this._echartsOnResize = this._echartsOnResize || (() => {\r\n for (let i = 0; i < this._echartsArr.length; i++) {\r\n this._echartsArr[i].resize();\r\n }\r\n });\r\n this.resizeEventSet.add(this._echartsOnResize);\r\n }\r\n\r\n initMapbox() {\r\n if (this.config.mapbox) {\r\n mapboxgl.accessToken = this.config.mapbox.accessToken;\r\n mapboxgl.setRTLTextPlugin(this.config.mapbox.RTLTextPlugin);\r\n this._mapboxArr = this._mapboxArr || [];\r\n this.util.forEach(document.getElementsByClassName('mapbox'), $mapbox => {\r\n const { lng, lat, zoom, lightStyle, darkStyle, marked, navigation, geolocate, scale, fullscreen } = this.data[$mapbox.id];\r\n const mapbox = new mapboxgl.Map({\r\n container: $mapbox,\r\n center: [lng, lat],\r\n zoom: zoom,\r\n minZoom: .2,\r\n style: this.isDark ? darkStyle : lightStyle,\r\n attributionControl: false,\r\n });\r\n if (marked) {\r\n new mapboxgl.Marker().setLngLat([lng, lat]).addTo(mapbox);\r\n }\r\n if (navigation) {\r\n mapbox.addControl(new mapboxgl.NavigationControl(), 'bottom-right');\r\n }\r\n if (geolocate) {\r\n mapbox.addControl(new mapboxgl.GeolocateControl({\r\n positionOptions: {\r\n enableHighAccuracy: true,\r\n },\r\n showUserLocation: true,\r\n trackUserLocation: true,\r\n }), 'bottom-right');\r\n }\r\n if (scale) {\r\n mapbox.addControl(new mapboxgl.ScaleControl());\r\n }\r\n if (fullscreen) {\r\n mapbox.addControl(new mapboxgl.FullscreenControl());\r\n }\r\n mapbox.addControl(new MapboxLanguage());\r\n this._mapboxArr.push(mapbox);\r\n });\r\n this._mapboxOnSwitchTheme = this._mapboxOnSwitchTheme || (() => {\r\n this.util.forEach(this._mapboxArr, mapbox => {\r\n const $mapbox = mapbox.getContainer();\r\n const { lightStyle, darkStyle } = this.data[$mapbox.id];\r\n mapbox.setStyle(this.isDark ? darkStyle : lightStyle);\r\n mapbox.addControl(new MapboxLanguage());\r\n });\r\n });\r\n this.switchThemeEventSet.add(this._mapboxOnSwitchTheme);\r\n }\r\n }\r\n\r\n initTypeit() {\r\n if (this.config.typeit) {\r\n const typeitConfig = this.config.typeit;\r\n const speed = typeitConfig.speed ? typeitConfig.speed : 100;\r\n const cursorSpeed = typeitConfig.cursorSpeed ? typeitConfig.cursorSpeed : 1000;\r\n const cursorChar = typeitConfig.cursorChar ? typeitConfig.cursorChar : '|';\r\n Object.values(typeitConfig.data).forEach(group => {\r\n const typeone = (i) => {\r\n const id = group[i];\r\n const instance = new TypeIt(`#${id}`, {\r\n strings: this.data[id],\r\n speed: speed,\r\n lifeLike: true,\r\n cursorSpeed: cursorSpeed,\r\n cursorChar: cursorChar,\r\n waitUntilVisible: true,\r\n afterComplete: () => {\r\n if (i === group.length - 1) {\r\n if (typeitConfig.duration >= 0) window.setTimeout(() => {\r\n instance.destroy();\r\n }, typeitConfig.duration);\r\n return;\r\n }\r\n instance.destroy();\r\n typeone(i + 1);\r\n },\r\n }).go();\r\n };\r\n typeone(0);\r\n });\r\n }\r\n }\r\n\r\n initComment() {\r\n if (this.config.comment) {\r\n if (this.config.comment.gitalk) {\r\n this.config.comment.gitalk.body = decodeURI(window.location.href);\r\n const gitalk = new Gitalk(this.config.comment.gitalk);\r\n gitalk.render('gitalk');\r\n }\r\n if (this.config.comment.valine) new Valine(this.config.comment.valine);\r\n if (this.config.comment.waline) new Waline(this.config.comment.waline);\r\n if (this.config.comment.twikoo) twikoo.init(this.config.comment.twikoo);\r\n if (this.config.comment.utterances) {\r\n const utterancesConfig = this.config.comment.utterances;\r\n const script = document.createElement('script');\r\n script.src = 'https://utteranc.es/client.js';\r\n script.type = 'text/javascript';\r\n script.setAttribute('repo', utterancesConfig.repo);\r\n script.setAttribute('issue-term', utterancesConfig.issueTerm);\r\n if (utterancesConfig.label) script.setAttribute('label', utterancesConfig.label);\r\n script.setAttribute('theme', this.isDark ? utterancesConfig.darkTheme : utterancesConfig.lightTheme);\r\n script.crossOrigin = 'anonymous';\r\n script.async = true;\r\n document.getElementById('utterances').appendChild(script);\r\n this._utterancesOnSwitchTheme = this._utterancesOnSwitchTheme || (() => {\r\n const message = {\r\n type: 'set-theme',\r\n theme: this.isDark ? utterancesConfig.darkTheme : utterancesConfig.lightTheme,\r\n };\r\n const iframe = document.querySelector('.utterances-frame');\r\n iframe.contentWindow.postMessage(message, 'https://utteranc.es');\r\n });\r\n this.switchThemeEventSet.add(this._utterancesOnSwitchTheme);\r\n }\r\n }\r\n }\r\n\r\n initMeta() {\r\n function getMeta(metaName) {\r\n const metas = document.getElementsByTagName('meta'); \r\n for (let i = 0; i < metas.length; i++) {\r\n if (metas[i].getAttribute('name') === metaName) {\r\n return metas[i];\r\n }\r\n }\r\n return '';\r\n }\r\n let themeColorMeta = getMeta('theme-color');\r\n if (this.isDark) {\r\n themeColorMeta.content = '#000000';\r\n } else {\r\n themeColorMeta.content = '#ffffff';\r\n }\r\n this._metaThemeColorOnSwitchTheme = this._metaThemeColorOnSwitchTheme || (() => {\r\n if (this.isDark) {\r\n themeColorMeta.content = '#000000';\r\n } else {\r\n themeColorMeta.content = '#ffffff';\r\n }\r\n });\r\n this.switchThemeEventSet.add(this._metaThemeColorOnSwitchTheme);\r\n }\r\n\r\n initCookieconsent() {\r\n if (this.config.cookieconsent) cookieconsent.initialise(this.config.cookieconsent);\r\n }\r\n\r\n onScroll() {\r\n const $headers = [];\r\n if (document.body.getAttribute('header-desktop') === 'auto') $headers.push(document.getElementById('header-desktop'));\r\n if (document.body.getAttribute('header-mobile') === 'auto') $headers.push(document.getElementById('header-mobile'));\r\n if (document.getElementById('comments')) {\r\n const $viewComments = document.getElementById('view-comments');\r\n $viewComments.href = `#comments`;\r\n $viewComments.style.display = 'block';\r\n }\r\n const $fixedButtons = document.getElementById('fixed-buttons');\r\n const ACCURACY = 20, MINIMUM = 100;\r\n window.addEventListener('scroll', () => {\r\n this.newScrollTop = this.util.getScrollTop();\r\n const scroll = this.newScrollTop - this.oldScrollTop;\r\n const isMobile = this.util.isMobile();\r\n this.util.forEach($headers, $header => {\r\n if (scroll > ACCURACY) {\r\n $header.classList.remove('animate__fadeInDown');\r\n this.util.animateCSS($header, ['animate__fadeOutUp', 'animate__faster'], true);\r\n } else if (scroll < - ACCURACY) {\r\n $header.classList.remove('animate__fadeOutUp');\r\n this.util.animateCSS($header, ['animate__fadeInDown', 'animate__faster'], true);\r\n }\r\n });\r\n if (this.newScrollTop > MINIMUM) {\r\n if (isMobile && scroll > ACCURACY) {\r\n $fixedButtons.classList.remove('animate__fadeIn');\r\n this.util.animateCSS($fixedButtons, ['animate__fadeOut', 'animate__faster'], true);\r\n } else if (!isMobile || scroll < - ACCURACY) {\r\n $fixedButtons.style.display = 'block';\r\n $fixedButtons.classList.remove('animate__fadeOut');\r\n this.util.animateCSS($fixedButtons, ['animate__fadeIn', 'animate__faster'], true);\r\n }\r\n } else {\r\n if (!isMobile) {\r\n $fixedButtons.classList.remove('animate__fadeIn');\r\n this.util.animateCSS($fixedButtons, ['animate__fadeOut', 'animate__faster'], true);\r\n }\r\n $fixedButtons.style.display = 'none';\r\n }\r\n for (let event of this.scrollEventSet) event();\r\n this.oldScrollTop = this.newScrollTop;\r\n }, false);\r\n }\r\n\r\n onResize() {\r\n window.addEventListener('resize', () => {\r\n if (!this._resizeTimeout) {\r\n this._resizeTimeout = window.setTimeout(() => {\r\n this._resizeTimeout = null;\r\n for (let event of this.resizeEventSet) event();\r\n this.initToc();\r\n this.initMermaid();\r\n this.initSearch();\r\n }, 100);\r\n }\r\n }, false);\r\n }\r\n\r\n onClickMask() {\r\n document.getElementById('mask').addEventListener('click', () => {\r\n for (let event of this.clickMaskEventSet) event();\r\n document.body.classList.remove('blur');\r\n }, false);\r\n }\r\n\r\n init() {\r\n try {\r\n this.initSVGIcon();\r\n this.initTwemoji();\r\n this.initMenuMobile();\r\n this.initSwitchTheme();\r\n this.initSelectTheme();\r\n this.initMeta();\r\n this.initSearch();\r\n this.initDetails();\r\n this.initLightGallery();\r\n this.initHighlight();\r\n this.initTable();\r\n this.initHeaderLink();\r\n this.initMath();\r\n this.initMermaid();\r\n this.initEcharts();\r\n this.initTypeit();\r\n this.initMapbox();\r\n this.initCookieconsent();\r\n } catch (err) {\r\n console.error(err);\r\n }\r\n\r\n window.setTimeout(() => {\r\n this.initToc();\r\n this.initComment();\r\n\r\n this.onScroll();\r\n this.onResize();\r\n this.onClickMask();\r\n }, 100);\r\n }\r\n}\r\n\r\nconst themeInit = () => {\r\n const theme = new Theme();\r\n theme.init();\r\n};\r\n\r\nif (document.readyState !== 'loading') {\r\n themeInit();\r\n} else {\r\n document.addEventListener('DOMContentLoaded', themeInit, false);\r\n}\r\n"]} \ No newline at end of file +{"version":3,"sources":["../../src/js/theme.js"],"names":[],"mappings":"upEAAM,CAAA,I,6FACF,iBAAQ,CAAR,CAAkB,CAAlB,CAA2B,CACvB,CAAQ,CAAG,CAAQ,EAAI,EADA,CAEvB,IAAK,GAAI,CAAA,CAAC,CAAG,CAAb,CAAgB,CAAC,CAAG,CAAQ,CAAC,MAA7B,CAAqC,CAAC,EAAtC,CAA0C,CAAO,CAAC,CAAQ,CAAC,CAAD,CAAT,CACpD,C,4BAED,uBAAe,CACX,MAAQ,CAAA,QAAQ,CAAC,eAAT,EAA4B,QAAQ,CAAC,eAAT,CAAyB,SAAtD,EAAoE,QAAQ,CAAC,IAAT,CAAc,SAC5F,C,wBAED,mBAAW,CAC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CACpB,CAAI,CAAC,OAAL,EADoB,CAEpB,CAAI,CAAC,WAAL,EAFoB,CAIpB,CAAI,CAAC,QAAL,EAJoB,CAKpB,CAAI,CAAC,QAAL,EALoB,CAMpB,CAAI,CAAC,WAAL,EACH,CAPD,CAOG,GAPH,CAQH,C,SAGC,SAAS,CAAG,UAAM,CACpB,GAAM,CAAA,CAAK,CAAG,GAAI,CAAA,KAAlB,CACA,CAAK,CAAC,IAAN,EACH,C,CAE2B,SAAxB,GAAA,QAAQ,CAAC,U,CAGT,QAAQ,CAAC,gBAAT,CAA0B,kBAA1B,CAA8C,SAA9C,I,CAFA,SAAS,E","file":"theme.min.js","sourcesContent":["class Util {\r\n forEach(elements, handler) {\r\n elements = elements || [];\r\n for (let i = 0; i < elements.length; i++) handler(elements[i]);\r\n }\r\n\r\n getScrollTop() {\r\n return (document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop;\r\n }\r\n\r\n isMobile() {\r\n return window.matchMedia('only screen and (max-width: 680px)').matches;\r\n }\r\n\r\n isTocStatic() {\r\n return window.matchMedia('only screen and (max-width: 1000px)').matches;\r\n }\r\n\r\n animateCSS(element, animation, reserved, callback) {\r\n if (!Array.isArray(animation)) animation = [animation];\r\n element.classList.add('animate__animated', ...animation);\r\n const handler = () => {\r\n element.classList.remove('animate__animated', ...animation);\r\n element.removeEventListener('animationend', handler);\r\n if (typeof callback === 'function') callback();\r\n };\r\n if (!reserved) element.addEventListener('animationend', handler, false);\r\n }\r\n}\r\n\r\nclass Theme {\r\n constructor() {\r\n this.config = window.config;\r\n this.data = this.config.data;\r\n this.isDark = document.body.getAttribute('theme') !== 'light';\r\n this.util = new Util();\r\n this.newScrollTop = this.util.getScrollTop();\r\n this.oldScrollTop = this.newScrollTop;\r\n this.scrollEventSet = new Set();\r\n this.resizeEventSet = new Set();\r\n this.switchThemeEventSet = new Set();\r\n this.clickMaskEventSet = new Set();\r\n if (window.objectFitImages) objectFitImages();\r\n }\r\n\r\n initSVGIcon() {\r\n this.util.forEach(document.querySelectorAll('[data-svg-src]'), $icon => {\r\n fetch($icon.getAttribute('data-svg-src'))\r\n .then(response => response.text())\r\n .then(svg => {\r\n const $temp = document.createElement('div');\r\n $temp.insertAdjacentHTML('afterbegin', svg);\r\n const $svg = $temp.firstChild;\r\n $svg.setAttribute('data-svg-src', $icon.getAttribute('data-svg-src'));\r\n $svg.classList.add('icon');\r\n const $titleElements = $svg.getElementsByTagName('title');\r\n if ($titleElements.length) $svg.removeChild($titleElements[0]);\r\n $icon.parentElement.replaceChild($svg, $icon);\r\n })\r\n .catch(err => { console.error(err); });\r\n });\r\n }\r\n\r\n initTwemoji() {\r\n if (this.config.twemoji) twemoji.parse(document.body);\r\n }\r\n\r\n initMenuMobile() {\r\n const $menuToggleMobile = document.getElementById('menu-toggle-mobile');\r\n const $menuMobile = document.getElementById('menu-mobile');\r\n $menuToggleMobile.addEventListener('click', () => {\r\n document.body.classList.toggle('blur');\r\n $menuToggleMobile.classList.toggle('active');\r\n $menuMobile.classList.toggle('active');\r\n }, false);\r\n this._menuMobileOnClickMask = this._menuMobileOnClickMask || (() => {\r\n $menuToggleMobile.classList.remove('active');\r\n $menuMobile.classList.remove('active');\r\n });\r\n this.clickMaskEventSet.add(this._menuMobileOnClickMask);\r\n }\r\n\r\n initSwitchTheme() {\r\n this.util.forEach(document.getElementsByClassName('theme-switch'), $themeSwitch => {\r\n $themeSwitch.addEventListener('click', () => {\r\n let currentTheme = document.body.getAttribute('theme');\r\n if (currentTheme === 'dark') {\r\n document.body.setAttribute('theme', 'black');\r\n window.localStorage && localStorage.setItem('theme', 'black');\r\n this.isDark = true;\r\n } else if (currentTheme === 'black') {\r\n document.body.setAttribute('theme', 'light');\r\n window.localStorage && localStorage.setItem('theme', 'light');\r\n this.isDark = false;\r\n } else {\r\n document.body.setAttribute('theme', 'dark');\r\n window.localStorage && localStorage.setItem('theme', 'dark');\r\n this.isDark = true;\r\n }\r\n for (let event of this.switchThemeEventSet) event();\r\n }, false);\r\n });\r\n }\r\n\r\n initSelectTheme() {\r\n this.util.forEach(document.getElementsByClassName('color-theme-select'), $themeSelect => {\r\n let currentTheme = document.body.getAttribute('theme');\r\n for (let i, j = 0; i = $themeSelect.options[j]; j++) {\r\n if (i.value == currentTheme) {\r\n $themeSelect.selectedIndex = j;\r\n break;\r\n }\r\n }\r\n $themeSelect.addEventListener('change', () => {\r\n let theme = $themeSelect.value;\r\n window.localStorage && localStorage.setItem('theme', theme);\r\n if (theme != 'auto') {\r\n document.body.setAttribute('theme', theme);\r\n if (theme == 'light') {\r\n this.isDark = false;\r\n } else {\r\n this.isDark = true;\r\n }\r\n } else {\r\n if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {\r\n document.body.setAttribute('theme', 'dark');\r\n this.isDark = true;\r\n } else {\r\n document.body.setAttribute('theme', 'white');\r\n this.isDark = false;\r\n }\r\n }\r\n for (let event of this.switchThemeEventSet) event();\r\n }, false);\r\n });\r\n }\r\n\r\n initSearch() {\r\n const searchConfig = this.config.search;\r\n const isMobile = this.util.isMobile();\r\n if (!searchConfig || isMobile && this._searchMobileOnce || !isMobile && this._searchDesktopOnce) return;\r\n\r\n const maxResultLength = searchConfig.maxResultLength ? searchConfig.maxResultLength : 10;\r\n const snippetLength = searchConfig.snippetLength ? searchConfig.snippetLength : 50;\r\n const highlightTag = searchConfig.highlightTag ? searchConfig.highlightTag : 'em';\r\n const isCaseSensitive = searchConfig.isCaseSensitive ? searchConfig.isCaseSensitive : false;\r\n const minMatchCharLength = searchConfig.minMatchCharLength ? searchConfig.minMatchCharLength : 1;\r\n const findAllMatches = searchConfig.findAllMatches ? searchConfig.findAllMatches : false;\r\n const location = searchConfig.location ? searchConfig.location : 0;\r\n const threshold = searchConfig.threshold ? searchConfig.threshold : 0.3;\r\n const distance = searchConfig.distance ? searchConfig.distance : 100;\r\n const ignoreLocation = searchConfig.ignoreLocation ? searchConfig.ignoreLocation : false;\r\n const useExtendedSearch = searchConfig.useExtendedSearch ? searchConfig.useExtendedSearch : false;\r\n const ignoreFieldNorm = searchConfig.ignoreFieldNorm ? searchConfig.ignoreFieldNorm : false;\r\n const suffix = isMobile ? 'mobile' : 'desktop';\r\n const $header = document.getElementById(`header-${suffix}`);\r\n const $searchInput = document.getElementById(`search-input-${suffix}`);\r\n const $searchToggle = document.getElementById(`search-toggle-${suffix}`);\r\n const $searchLoading = document.getElementById(`search-loading-${suffix}`);\r\n const $searchClear = document.getElementById(`search-clear-${suffix}`);\r\n if (isMobile) {\r\n this._searchMobileOnce = true;\r\n $searchInput.addEventListener('focus', () => {\r\n document.body.classList.add('blur');\r\n $header.classList.add('open');\r\n }, false);\r\n document.getElementById('search-cancel-mobile').addEventListener('click', () => {\r\n $header.classList.remove('open');\r\n document.body.classList.remove('blur');\r\n document.getElementById('menu-toggle-mobile').classList.remove('active');\r\n document.getElementById('menu-mobile').classList.remove('active');\r\n $searchLoading.style.display = 'none';\r\n $searchClear.style.display = 'none';\r\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\r\n }, false);\r\n $searchClear.addEventListener('click', () => {\r\n $searchClear.style.display = 'none';\r\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\r\n }, false);\r\n this._searchMobileOnClickMask = this._searchMobileOnClickMask || (() => {\r\n $header.classList.remove('open');\r\n $searchLoading.style.display = 'none';\r\n $searchClear.style.display = 'none';\r\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\r\n });\r\n this.clickMaskEventSet.add(this._searchMobileOnClickMask);\r\n } else {\r\n this._searchDesktopOnce = true;\r\n $searchToggle.addEventListener('click', () => {\r\n document.body.classList.add('blur');\r\n $header.classList.add('open');\r\n $searchInput.focus();\r\n }, false);\r\n $searchClear.addEventListener('click', () => {\r\n $searchClear.style.display = 'none';\r\n this._searchDesktop && this._searchDesktop.autocomplete.setVal('');\r\n }, false);\r\n this._searchDesktopOnClickMask = this._searchDesktopOnClickMask || (() => {\r\n $header.classList.remove('open');\r\n $searchLoading.style.display = 'none';\r\n $searchClear.style.display = 'none';\r\n this._searchDesktop && this._searchDesktop.autocomplete.setVal('');\r\n });\r\n this.clickMaskEventSet.add(this._searchDesktopOnClickMask);\r\n }\r\n $searchInput.addEventListener('input', () => {\r\n if ($searchInput.value === '') $searchClear.style.display = 'none';\r\n else $searchClear.style.display = 'inline';\r\n }, false);\r\n\r\n const initAutosearch = () => {\r\n const autosearch = autocomplete(`#search-input-${suffix}`, {\r\n hint: false,\r\n autoselect: true,\r\n dropdownMenuContainer: `#search-dropdown-${suffix}`,\r\n clearOnSelected: true,\r\n cssClasses: { noPrefix: true },\r\n debug: true,\r\n }, {\r\n name: 'search',\r\n source: (query, callback) => {\r\n $searchLoading.style.display = 'inline';\r\n $searchClear.style.display = 'none';\r\n const finish = (results) => {\r\n $searchLoading.style.display = 'none';\r\n $searchClear.style.display = 'inline';\r\n callback(results);\r\n };\r\n if (searchConfig.type === 'lunr') {\r\n const search = () => {\r\n if (lunr.queryHandler) query = lunr.queryHandler(query);\r\n const results = {};\r\n this._index.search(query).forEach(({ ref, matchData: { metadata } }) => {\r\n const matchData = this._indexData[ref];\r\n let { uri, title, content: context } = matchData;\r\n if (results[uri]) return;\r\n let position = 0;\r\n Object.values(metadata).forEach(({ content }) => {\r\n if (content) {\r\n const matchPosition = content.position[0][0];\r\n if (matchPosition < position || position === 0) position = matchPosition;\r\n }\r\n });\r\n position -= snippetLength / 5;\r\n if (position > 0) {\r\n position += context.substr(position, 20).lastIndexOf(' ') + 1;\r\n context = '...' + context.substr(position, snippetLength);\r\n } else {\r\n context = context.substr(0, snippetLength);\r\n }\r\n Object.keys(metadata).forEach(key => {\r\n title = title.replace(new RegExp(`(${key})`, 'gi'), `<${highlightTag}>$1`);\r\n context = context.replace(new RegExp(`(${key})`, 'gi'), `<${highlightTag}>$1`);\r\n });\r\n results[uri] = {\r\n 'uri': uri,\r\n 'title' : title,\r\n 'date' : matchData.date,\r\n 'context' : context,\r\n };\r\n });\r\n return Object.values(results).slice(0, maxResultLength);\r\n }\r\n if (!this._index) {\r\n fetch(searchConfig.lunrIndexURL)\r\n .then(response => response.json())\r\n .then(data => {\r\n const indexData = {};\r\n this._index = lunr(function () {\r\n if (searchConfig.lunrLanguageCode) this.use(lunr[searchConfig.lunrLanguageCode]);\r\n this.ref('objectID');\r\n this.field('title', { boost: 50 });\r\n this.field('tags', { boost: 20 });\r\n this.field('categories', { boost: 20 });\r\n this.field('content', { boost: 10 });\r\n this.metadataWhitelist = ['position'];\r\n data.forEach((record) => {\r\n indexData[record.objectID] = record;\r\n this.add(record);\r\n });\r\n });\r\n this._indexData = indexData;\r\n finish(search());\r\n }).catch(err => {\r\n console.error(err);\r\n finish([]);\r\n });\r\n } else finish(search());\r\n } else if (searchConfig.type === 'algolia') {\r\n this._algoliaIndex = this._algoliaIndex || algoliasearch(searchConfig.algoliaAppID, searchConfig.algoliaSearchKey).initIndex(searchConfig.algoliaIndex);\r\n this._algoliaIndex\r\n .search(query, {\r\n offset: 0,\r\n length: maxResultLength * 8,\r\n attributesToHighlight: ['title'],\r\n attributesToSnippet: [`content:${snippetLength}`],\r\n highlightPreTag: `<${highlightTag}>`,\r\n highlightPostTag: ``,\r\n })\r\n .then(({ hits }) => {\r\n const results = {};\r\n hits.forEach(({ uri, date, _highlightResult: { title }, _snippetResult: { content } }) => {\r\n if (results[uri] && results[uri].context.length > content.value) return;\r\n results[uri] = {\r\n uri: uri,\r\n title: title.value,\r\n date: date,\r\n context: content.value,\r\n };\r\n });\r\n finish(Object.values(results).slice(0, maxResultLength));\r\n })\r\n .catch(err => {\r\n console.error(err);\r\n finish([]);\r\n });\r\n } else if (searchConfig.type === 'fuse') {\r\n const search = () => {\r\n const results = {};\r\n this._index.search(query).forEach(({ item, refIndex, matches }) => {\r\n let title = item.title;\r\n let content = item.content;\r\n matches.forEach(({ indices, value, key }) => {\r\n if (key === 'content') {\r\n let offset = 0;\r\n for (let i = 0; i < indices.length; i ++) {\r\n let substr = content.substring(indices[i][0] + offset, indices[i][1] + 1 + offset);\r\n let tag = `<${highlightTag}>` + substr + ``;\r\n content = content.substring(0, indices[i][0] + offset) + tag + content.substring(indices[i][1] + 1 + offset, content.length);\r\n offset += highlightTag.length * 2 + 5;\r\n }\r\n } else if (key === 'title') {\r\n let offset = 0;\r\n for (let i = 0; i < indices.length; i ++) {\r\n let substr = title.substring(indices[i][0] + offset, indices[i][1] + 1 + offset);\r\n let tag = `<${highlightTag}>` + substr + ``;\r\n title = title.substring(0, indices[i][0] + offset) + tag + title.substring(indices[i][1] + 1 + offset, content.length);\r\n offset += highlightTag.length * 2 + 5;\r\n\r\n }\r\n }\r\n });\r\n results[item.uri] = {\r\n 'uri': item.uri,\r\n 'title': title,\r\n 'date': item.date,\r\n 'context': content\r\n };\r\n });\r\n return Object.values(results).slice(0, maxResultLength);\r\n }\r\n if (!this._index) {\r\n fetch(searchConfig.fuseIndexURL)\r\n .then(response => response.json())\r\n .then(data => {\r\n const options = {\r\n isCaseSensitive: isCaseSensitive,\r\n findAllMatches: findAllMatches,\r\n minMatchCharLength: minMatchCharLength,\r\n location: location,\r\n threshold: threshold,\r\n distance: distance,\r\n ignoreLocation: ignoreLocation,\r\n useExtendedSearch: useExtendedSearch,\r\n ignoreFieldNorm: ignoreFieldNorm,\r\n includeScore: false,\r\n shouldSort: true,\r\n includeMatches: true,\r\n keys: [\r\n \"content\",\r\n \"title\"\r\n ]\r\n };\r\n this._index = new Fuse(data, options);\r\n finish(search());\r\n }).catch(err => {\r\n console.error(err);\r\n finish([]);\r\n })\r\n } else finish(search());\r\n }\r\n },\r\n templates: {\r\n suggestion: ({ title, date, context }) => `
${title}${date}
${context}
`,\r\n empty: ({ query }) => `
${searchConfig.noResultsFound}: \"${query}\"
`,\r\n footer: ({}) => {\r\n const { searchType, icon, href } = searchConfig.type === 'algolia' ? {\r\n searchType: 'algolia',\r\n icon: '',\r\n href: 'https://www.algolia.com/',\r\n } : (searchConfig.type === 'lunr' ? {\r\n searchType: 'Lunr.js',\r\n icon: '',\r\n href: 'https://lunrjs.com/',\r\n } : {\r\n searchType: 'Fuse.js',\r\n icon: '',\r\n href: 'https://fusejs.io/',\r\n });\r\n return ``;},\r\n },\r\n });\r\n autosearch.on('autocomplete:selected', (_event, suggestion, _dataset, _context) => {\r\n window.location.assign(suggestion.uri);\r\n });\r\n if (isMobile) this._searchMobile = autosearch;\r\n else this._searchDesktop = autosearch;\r\n };\r\n if (searchConfig.lunrSegmentitURL && !document.getElementById('lunr-segmentit')) {\r\n const script = document.createElement('script');\r\n script.id = 'lunr-segmentit';\r\n script.type = 'text/javascript';\r\n script.src = searchConfig.lunrSegmentitURL;\r\n script.async = true;\r\n if (script.readyState) {\r\n script.onreadystatechange = () => {\r\n if (script.readyState == 'loaded' || script.readyState == 'complete'){\r\n script.onreadystatechange = null;\r\n initAutosearch();\r\n }\r\n };\r\n } else {\r\n script.onload = () => {\r\n initAutosearch();\r\n };\r\n }\r\n document.body.appendChild(script);\r\n } else initAutosearch();\r\n }\r\n\r\n initDetails() {\r\n this.util.forEach(document.getElementsByClassName('details'), $details => {\r\n const $summary = $details.getElementsByClassName('details-summary')[0];\r\n $summary.addEventListener('click', () => {\r\n $details.classList.toggle('open');\r\n }, false);\r\n });\r\n }\r\n\r\n initLightGallery() {\r\n if (this.config.lightGallery) lightGallery(document.getElementById('content'), this.config.lightGallery);\r\n }\r\n\r\n initHighlight() {\r\n this.util.forEach(document.querySelectorAll('.highlight > pre.chroma'), $preChroma => {\r\n const $chroma = document.createElement('div');\r\n $chroma.className = $preChroma.className;\r\n const $table = document.createElement('table');\r\n $chroma.appendChild($table);\r\n const $tbody = document.createElement('tbody');\r\n $table.appendChild($tbody);\r\n const $tr = document.createElement('tr');\r\n $tbody.appendChild($tr);\r\n const $td = document.createElement('td');\r\n $tr.appendChild($td);\r\n $preChroma.parentElement.replaceChild($chroma, $preChroma);\r\n $td.appendChild($preChroma);\r\n });\r\n this.util.forEach(document.querySelectorAll('.highlight > .chroma'), $chroma => {\r\n const $codeElements = $chroma.querySelectorAll('pre.chroma > code');\r\n if ($codeElements.length) {\r\n const $code = $codeElements[$codeElements.length - 1];\r\n const $header = document.createElement('div');\r\n $header.className = 'code-header ' + $code.className.toLowerCase();\r\n const $title = document.createElement('span');\r\n $title.classList.add('code-title');\r\n $title.insertAdjacentHTML('afterbegin', '');\r\n $title.addEventListener('click', () => {\r\n $chroma.classList.toggle('open');\r\n }, false);\r\n $header.appendChild($title);\r\n const $ellipses = document.createElement('span');\r\n $ellipses.insertAdjacentHTML('afterbegin', '');\r\n $ellipses.classList.add('ellipses');\r\n $ellipses.addEventListener('click', () => {\r\n $chroma.classList.add('open');\r\n }, false);\r\n $header.appendChild($ellipses);\r\n const $copy = document.createElement('span');\r\n $copy.insertAdjacentHTML('afterbegin', '');\r\n $copy.classList.add('copy');\r\n const code = $code.innerText;\r\n if (this.config.code.maxShownLines < 0 || code.split('\\n').length < this.config.code.maxShownLines + 2) $chroma.classList.add('open');\r\n if (this.config.code.copyTitle) {\r\n $copy.setAttribute('data-clipboard-text', code);\r\n $copy.title = this.config.code.copyTitle;\r\n const clipboard = new ClipboardJS($copy);\r\n clipboard.on('success', _e => {\r\n this.util.animateCSS($code, 'animate__flash');\r\n });\r\n $header.appendChild($copy);\r\n }\r\n $chroma.insertBefore($header, $chroma.firstChild);\r\n }\r\n });\r\n }\r\n\r\n initTable() {\r\n this.util.forEach(document.querySelectorAll('.content table'), $table => {\r\n const $wrapper = document.createElement('div');\r\n $wrapper.className = 'table-wrapper';\r\n $table.parentElement.replaceChild($wrapper, $table);\r\n $wrapper.appendChild($table);\r\n });\r\n }\r\n\r\n initHeaderLink() {\r\n for (let num = 1; num <= 6; num++) {\r\n this.util.forEach(document.querySelectorAll('.single .content > h' + num), $header => {\r\n $header.classList.add('headerLink');\r\n $header.insertAdjacentHTML('afterbegin', ``);\r\n });\r\n }\r\n }\r\n\r\n initToc() {\r\n const $tocCore = document.getElementById('TableOfContents');\r\n if ($tocCore === null) return;\r\n if (document.getElementById('toc-static').getAttribute('kept') || this.util.isTocStatic()) {\r\n const $tocContentStatic = document.getElementById('toc-content-static');\r\n if ($tocCore.parentElement !== $tocContentStatic) {\r\n $tocCore.parentElement.removeChild($tocCore);\r\n $tocContentStatic.appendChild($tocCore);\r\n }\r\n if (this._tocOnScroll) this.scrollEventSet.delete(this._tocOnScroll);\r\n } else {\r\n const $tocContentAuto = document.getElementById('toc-content-auto');\r\n if ($tocCore.parentElement !== $tocContentAuto) {\r\n $tocCore.parentElement.removeChild($tocCore);\r\n $tocContentAuto.appendChild($tocCore);\r\n }\r\n const $toc = document.getElementById('toc-auto');\r\n const $page = document.getElementsByClassName('page')[0];\r\n const rect = $page.getBoundingClientRect();\r\n $toc.style.left = `${rect.left + rect.width + 20}px`;\r\n $toc.style.maxWidth = `20%`;\r\n $toc.style.visibility = 'visible';\r\n const $tocLinkElements = $tocCore.querySelectorAll('a:first-child');\r\n const $tocLiElements = $tocCore.getElementsByTagName('li');\r\n const $headerLinkElements = document.getElementsByClassName('headerLink');\r\n const headerIsFixed = document.body.getAttribute('header-desktop') !== 'normal';\r\n const headerHeight = document.getElementById('header-desktop').offsetHeight;\r\n const TOP_SPACING = 20 + (headerIsFixed ? headerHeight : 0);\r\n const minTocTop = $toc.offsetTop;\r\n const minScrollTop = minTocTop - TOP_SPACING + (headerIsFixed ? 0 : headerHeight);\r\n this._tocOnScroll = this._tocOnScroll || (() => {\r\n const footerTop = document.getElementById('post-footer').offsetTop;\r\n const maxTocTop = footerTop - $toc.getBoundingClientRect().height;\r\n const maxScrollTop = maxTocTop - TOP_SPACING + (headerIsFixed ? 0 : headerHeight);\r\n if (this.newScrollTop < minScrollTop) {\r\n $toc.style.position = 'absolute';\r\n $toc.style.top = `${minTocTop}px`;\r\n } else if (this.newScrollTop > maxScrollTop) {\r\n $toc.style.position = 'absolute';\r\n $toc.style.top = `${maxTocTop}px`;\r\n } else {\r\n $toc.style.position = 'fixed';\r\n $toc.style.top = `${TOP_SPACING}px`;\r\n }\r\n\r\n this.util.forEach($tocLinkElements, $tocLink => { $tocLink.classList.remove('active'); });\r\n this.util.forEach($tocLiElements, $tocLi => { $tocLi.classList.remove('has-active'); });\r\n const INDEX_SPACING = 20 + (headerIsFixed ? headerHeight : 0);\r\n let activeTocIndex = $headerLinkElements.length - 1;\r\n for (let i = 0; i < $headerLinkElements.length - 1; i++) {\r\n const thisTop = $headerLinkElements[i].getBoundingClientRect().top;\r\n const nextTop = $headerLinkElements[i + 1].getBoundingClientRect().top;\r\n if ((i == 0 && thisTop > INDEX_SPACING)\r\n || (thisTop <= INDEX_SPACING && nextTop > INDEX_SPACING)) {\r\n activeTocIndex = i;\r\n break;\r\n }\r\n }\r\n if (activeTocIndex !== -1) {\r\n $tocLinkElements[activeTocIndex].classList.add('active');\r\n let $parent = $tocLinkElements[activeTocIndex].parentElement;\r\n while ($parent !== $tocCore) {\r\n $parent.classList.add('has-active');\r\n $parent = $parent.parentElement.parentElement;\r\n }\r\n }\r\n });\r\n this._tocOnScroll();\r\n this.scrollEventSet.add(this._tocOnScroll);\r\n }\r\n }\r\n\r\n initMath() {\r\n if (this.config.math) renderMathInElement(document.body, this.config.math);\r\n }\r\n\r\n initMermaid() {\r\n const $mermaidElements = document.getElementsByClassName('mermaid');\r\n if ($mermaidElements.length) {\r\n mermaid.initialize({startOnLoad: false, theme: 'default'});\r\n this.util.forEach($mermaidElements, $mermaid => {\r\n mermaid.mermaidAPI.render('svg-' + $mermaid.id, this.data[$mermaid.id], svgCode => {\r\n $mermaid.insertAdjacentHTML('afterbegin', svgCode);\r\n document.getElementById('svg-' + $mermaid.id).children[0].remove();\r\n }, $mermaid);\r\n });\r\n }\r\n }\r\n\r\n initEcharts() {\r\n this._echartsOnSwitchTheme = this._echartsOnSwitchTheme || (() => {\r\n this._echartsArr = this._echartsArr || [];\r\n for (let i = 0; i < this._echartsArr.length; i++) {\r\n this._echartsArr[i].dispose();\r\n }\r\n this._echartsArr = [];\r\n this.util.forEach(document.getElementsByClassName('echarts'), $echarts => {\r\n const chart = echarts.init($echarts, this.isDark ? 'dark' : 'macarons', {renderer: 'svg'});\r\n chart.setOption(JSON.parse(this.data[$echarts.id]));\r\n this._echartsArr.push(chart);\r\n });\r\n });\r\n this.switchThemeEventSet.add(this._echartsOnSwitchTheme);\r\n this._echartsOnSwitchTheme();\r\n this._echartsOnResize = this._echartsOnResize || (() => {\r\n for (let i = 0; i < this._echartsArr.length; i++) {\r\n this._echartsArr[i].resize();\r\n }\r\n });\r\n this.resizeEventSet.add(this._echartsOnResize);\r\n }\r\n\r\n initMapbox() {\r\n if (this.config.mapbox) {\r\n mapboxgl.accessToken = this.config.mapbox.accessToken;\r\n mapboxgl.setRTLTextPlugin(this.config.mapbox.RTLTextPlugin);\r\n this._mapboxArr = this._mapboxArr || [];\r\n this.util.forEach(document.getElementsByClassName('mapbox'), $mapbox => {\r\n const { lng, lat, zoom, lightStyle, darkStyle, marked, navigation, geolocate, scale, fullscreen } = this.data[$mapbox.id];\r\n const mapbox = new mapboxgl.Map({\r\n container: $mapbox,\r\n center: [lng, lat],\r\n zoom: zoom,\r\n minZoom: .2,\r\n style: this.isDark ? darkStyle : lightStyle,\r\n attributionControl: false,\r\n });\r\n if (marked) {\r\n new mapboxgl.Marker().setLngLat([lng, lat]).addTo(mapbox);\r\n }\r\n if (navigation) {\r\n mapbox.addControl(new mapboxgl.NavigationControl(), 'bottom-right');\r\n }\r\n if (geolocate) {\r\n mapbox.addControl(new mapboxgl.GeolocateControl({\r\n positionOptions: {\r\n enableHighAccuracy: true,\r\n },\r\n showUserLocation: true,\r\n trackUserLocation: true,\r\n }), 'bottom-right');\r\n }\r\n if (scale) {\r\n mapbox.addControl(new mapboxgl.ScaleControl());\r\n }\r\n if (fullscreen) {\r\n mapbox.addControl(new mapboxgl.FullscreenControl());\r\n }\r\n mapbox.addControl(new MapboxLanguage());\r\n this._mapboxArr.push(mapbox);\r\n });\r\n this._mapboxOnSwitchTheme = this._mapboxOnSwitchTheme || (() => {\r\n this.util.forEach(this._mapboxArr, mapbox => {\r\n const $mapbox = mapbox.getContainer();\r\n const { lightStyle, darkStyle } = this.data[$mapbox.id];\r\n mapbox.setStyle(this.isDark ? darkStyle : lightStyle);\r\n mapbox.addControl(new MapboxLanguage());\r\n });\r\n });\r\n this.switchThemeEventSet.add(this._mapboxOnSwitchTheme);\r\n }\r\n }\r\n\r\n initTypeit() {\r\n if (this.config.typeit) {\r\n const typeitConfig = this.config.typeit;\r\n const speed = typeitConfig.speed ? typeitConfig.speed : 100;\r\n const cursorSpeed = typeitConfig.cursorSpeed ? typeitConfig.cursorSpeed : 1000;\r\n const cursorChar = typeitConfig.cursorChar ? typeitConfig.cursorChar : '|';\r\n Object.values(typeitConfig.data).forEach(group => {\r\n const typeone = (i) => {\r\n const id = group[i];\r\n const instance = new TypeIt(`#${id}`, {\r\n strings: this.data[id],\r\n speed: speed,\r\n lifeLike: true,\r\n cursorSpeed: cursorSpeed,\r\n cursorChar: cursorChar,\r\n waitUntilVisible: true,\r\n afterComplete: () => {\r\n if (i === group.length - 1) {\r\n if (typeitConfig.duration >= 0) window.setTimeout(() => {\r\n instance.destroy();\r\n }, typeitConfig.duration);\r\n return;\r\n }\r\n instance.destroy();\r\n typeone(i + 1);\r\n },\r\n }).go();\r\n };\r\n typeone(0);\r\n });\r\n }\r\n }\r\n\r\n initComment() {\r\n if (this.config.comment) {\r\n if (this.config.comment.gitalk) {\r\n this.config.comment.gitalk.body = decodeURI(window.location.href);\r\n const gitalk = new Gitalk(this.config.comment.gitalk);\r\n gitalk.render('gitalk');\r\n }\r\n if (this.config.comment.valine) new Valine(this.config.comment.valine);\r\n if (this.config.comment.waline) new Waline(this.config.comment.waline);\r\n if (this.config.comment.twikoo) twikoo.init(this.config.comment.twikoo);\r\n if (this.config.comment.utterances) {\r\n const utterancesConfig = this.config.comment.utterances;\r\n const script = document.createElement('script');\r\n script.src = 'https://utteranc.es/client.js';\r\n script.type = 'text/javascript';\r\n script.setAttribute('repo', utterancesConfig.repo);\r\n script.setAttribute('issue-term', utterancesConfig.issueTerm);\r\n if (utterancesConfig.label) script.setAttribute('label', utterancesConfig.label);\r\n script.setAttribute('theme', this.isDark ? utterancesConfig.darkTheme : utterancesConfig.lightTheme);\r\n script.crossOrigin = 'anonymous';\r\n script.async = true;\r\n document.getElementById('utterances').appendChild(script);\r\n this._utterancesOnSwitchTheme = this._utterancesOnSwitchTheme || (() => {\r\n const message = {\r\n type: 'set-theme',\r\n theme: this.isDark ? utterancesConfig.darkTheme : utterancesConfig.lightTheme,\r\n };\r\n const iframe = document.querySelector('.utterances-frame');\r\n iframe.contentWindow.postMessage(message, 'https://utteranc.es');\r\n });\r\n this.switchThemeEventSet.add(this._utterancesOnSwitchTheme);\r\n }\r\n }\r\n }\r\n\r\n initMeta() {\r\n function getMeta(metaName) {\r\n const metas = document.getElementsByTagName('meta'); \r\n for (let i = 0; i < metas.length; i++) {\r\n if (metas[i].getAttribute('name') === metaName) {\r\n return metas[i];\r\n }\r\n }\r\n return '';\r\n }\r\n let themeColorMeta = getMeta('theme-color');\r\n if (this.isDark) {\r\n themeColorMeta.content = '#000000';\r\n } else {\r\n themeColorMeta.content = '#ffffff';\r\n }\r\n this._metaThemeColorOnSwitchTheme = this._metaThemeColorOnSwitchTheme || (() => {\r\n if (this.isDark) {\r\n themeColorMeta.content = '#000000';\r\n } else {\r\n themeColorMeta.content = '#ffffff';\r\n }\r\n });\r\n this.switchThemeEventSet.add(this._metaThemeColorOnSwitchTheme);\r\n }\r\n\r\n initCookieconsent() {\r\n if (this.config.cookieconsent) cookieconsent.initialise(this.config.cookieconsent);\r\n }\r\n\r\n onScroll() {\r\n const $headers = [];\r\n if (document.body.getAttribute('header-desktop') === 'auto') $headers.push(document.getElementById('header-desktop'));\r\n if (document.body.getAttribute('header-mobile') === 'auto') $headers.push(document.getElementById('header-mobile'));\r\n if (document.getElementById('comments')) {\r\n const $viewComments = document.getElementById('view-comments');\r\n $viewComments.href = `#comments`;\r\n $viewComments.style.display = 'block';\r\n }\r\n const $fixedButtons = document.getElementById('fixed-buttons');\r\n const ACCURACY = 20, MINIMUM = 100;\r\n window.addEventListener('scroll', () => {\r\n this.newScrollTop = this.util.getScrollTop();\r\n const scroll = this.newScrollTop - this.oldScrollTop;\r\n const isMobile = this.util.isMobile();\r\n this.util.forEach($headers, $header => {\r\n if (scroll > ACCURACY) {\r\n $header.classList.remove('animate__fadeInDown');\r\n this.util.animateCSS($header, ['animate__fadeOutUp', 'animate__faster'], true);\r\n } else if (scroll < - ACCURACY) {\r\n $header.classList.remove('animate__fadeOutUp');\r\n this.util.animateCSS($header, ['animate__fadeInDown', 'animate__faster'], true);\r\n }\r\n });\r\n if (this.newScrollTop > MINIMUM) {\r\n if (isMobile && scroll > ACCURACY) {\r\n $fixedButtons.classList.remove('animate__fadeIn');\r\n this.util.animateCSS($fixedButtons, ['animate__fadeOut', 'animate__faster'], true);\r\n } else if (!isMobile || scroll < - ACCURACY) {\r\n $fixedButtons.style.display = 'block';\r\n $fixedButtons.classList.remove('animate__fadeOut');\r\n this.util.animateCSS($fixedButtons, ['animate__fadeIn', 'animate__faster'], true);\r\n }\r\n } else {\r\n if (!isMobile) {\r\n $fixedButtons.classList.remove('animate__fadeIn');\r\n this.util.animateCSS($fixedButtons, ['animate__fadeOut', 'animate__faster'], true);\r\n }\r\n $fixedButtons.style.display = 'none';\r\n }\r\n for (let event of this.scrollEventSet) event();\r\n this.oldScrollTop = this.newScrollTop;\r\n }, false);\r\n }\r\n\r\n onResize() {\r\n window.addEventListener('resize', () => {\r\n if (!this._resizeTimeout) {\r\n this._resizeTimeout = window.setTimeout(() => {\r\n this._resizeTimeout = null;\r\n for (let event of this.resizeEventSet) event();\r\n this.initToc();\r\n this.initMermaid();\r\n this.initSearch();\r\n }, 100);\r\n }\r\n }, false);\r\n }\r\n\r\n onClickMask() {\r\n document.getElementById('mask').addEventListener('click', () => {\r\n for (let event of this.clickMaskEventSet) event();\r\n document.body.classList.remove('blur');\r\n }, false);\r\n }\r\n\r\n init() {\r\n try {\r\n this.initSVGIcon();\r\n this.initTwemoji();\r\n this.initMenuMobile();\r\n this.initSwitchTheme();\r\n this.initSelectTheme();\r\n this.initMeta();\r\n this.initSearch();\r\n this.initDetails();\r\n this.initLightGallery();\r\n this.initHighlight();\r\n this.initTable();\r\n this.initHeaderLink();\r\n this.initMath();\r\n this.initMermaid();\r\n this.initEcharts();\r\n this.initTypeit();\r\n this.initMapbox();\r\n this.initCookieconsent();\r\n } catch (err) {\r\n console.error(err);\r\n }\r\n\r\n window.setTimeout(() => {\r\n this.initToc();\r\n this.initComment();\r\n\r\n this.onScroll();\r\n this.onResize();\r\n this.onClickMask();\r\n }, 100);\r\n }\r\n}\r\n\r\nconst themeInit = () => {\r\n const theme = new Theme();\r\n theme.init();\r\n};\r\n\r\nif (document.readyState !== 'loading') {\r\n themeInit();\r\n} else {\r\n document.addEventListener('DOMContentLoaded', themeInit, false);\r\n}\r\n"]} \ No newline at end of file diff --git a/assets/lib/VERSION b/assets/lib/VERSION index 20b5fec92..757ab5726 100644 --- a/assets/lib/VERSION +++ b/assets/lib/VERSION @@ -24,4 +24,5 @@ gitalk@1.7.2 https://github.com/gitalk/gitalk valine@1.4.14 https://valine.js.org/ waline@0.17.0 https://waline.js.org/ cookieconsent@3.1.1 https://github.com/osano/cookieconsent -twikoo@1.4.0-alpha.2 https://twikoo.js.org/ \ No newline at end of file +twikoo@1.4.0-alpha.2 https://twikoo.js.org/ +fusejs@6.4.6 https://fusejs.io/ \ No newline at end of file diff --git a/assets/lib/fuse/fuse.min.js b/assets/lib/fuse/fuse.min.js new file mode 100644 index 000000000..a11752f0c --- /dev/null +++ b/assets/lib/fuse/fuse.min.js @@ -0,0 +1 @@ +var e,t;e=this,t=function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:3,t=new Map,n=Math.pow(10,e);return{get:function(e){var r=e.match(I).length;if(t.has(r))return t.get(r);var i=1/Math.sqrt(r),o=parseFloat(Math.round(i*n)/n);return t.set(r,o),o},clear:function(){t.clear()}}}var E=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.getFn,i=void 0===r?A.getFn:r;t(this,e),this.norm=C(3),this.getFn=i,this.isCreated=!1,this.setIndexRecords()}return r(e,[{key:"setSources",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setIndexRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=t,this._keysMap={},t.forEach((function(t,n){e._keysMap[t.id]=n}))}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,g(this.docs[0])?this.docs.forEach((function(t,n){e._addString(t,n)})):this.docs.forEach((function(t,n){e._addObject(t,n)})),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();g(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,i=void 0===r?A.getFn:r,o=new E({getFn:i});return o.setKeys(e.map(_)),o.setSources(t),o.create(),o}function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.errors,r=void 0===n?0:n,i=t.currentLocation,o=void 0===i?0:i,c=t.expectedLocation,a=void 0===c?0:c,s=t.distance,u=void 0===s?A.distance:s,h=t.ignoreLocation,f=void 0===h?A.ignoreLocation:h,l=r/e.length;if(f)return l;var d=Math.abs(a-o);return u?l+d/u:d?1:l}function F(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A.minMatchCharLength,n=[],r=-1,i=-1,o=0,c=e.length;o=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}function P(e){for(var t={},n=0,r=e.length;n1&&void 0!==arguments[1]?arguments[1]:{},o=i.location,c=void 0===o?A.location:o,a=i.threshold,s=void 0===a?A.threshold:a,u=i.distance,h=void 0===u?A.distance:u,f=i.includeMatches,l=void 0===f?A.includeMatches:f,d=i.findAllMatches,v=void 0===d?A.findAllMatches:d,g=i.minMatchCharLength,y=void 0===g?A.minMatchCharLength:g,p=i.isCaseSensitive,m=void 0===p?A.isCaseSensitive:p,k=i.ignoreLocation,M=void 0===k?A.ignoreLocation:k;if(t(this,e),this.options={location:c,threshold:s,distance:h,includeMatches:l,findAllMatches:v,minMatchCharLength:y,isCaseSensitive:m,ignoreLocation:M},this.pattern=m?n:n.toLowerCase(),this.chunks=[],this.pattern.length){var b=function(e,t){r.chunks.push({pattern:e,alphabet:P(e),startIndex:t})},x=this.pattern.length;if(x>32){for(var L=0,S=x%32,w=x-S;L3&&void 0!==arguments[3]?arguments[3]:{},i=r.location,o=void 0===i?A.location:i,c=r.distance,a=void 0===c?A.distance:c,s=r.threshold,u=void 0===s?A.threshold:s,h=r.findAllMatches,f=void 0===h?A.findAllMatches:h,l=r.minMatchCharLength,d=void 0===l?A.minMatchCharLength:l,v=r.includeMatches,g=void 0===v?A.includeMatches:v,y=r.ignoreLocation,p=void 0===y?A.ignoreLocation:y;if(t.length>32)throw new Error(L(32));for(var m,k=t.length,M=e.length,b=Math.max(0,Math.min(o,M)),x=u,S=b,w=d>1||g,_=w?Array(M):[];(m=e.indexOf(t,S))>-1;){var O=R(t,{currentLocation:m,expectedLocation:b,distance:a,ignoreLocation:p});if(x=Math.min(O,x),S=m+k,w)for(var j=0;j=K;J-=1){var T=J-1,U=n[e.charAt(T)];if(w&&(_[T]=+!!U),W[J]=(W[J+1]<<1|1)&U,P&&(W[J]|=(I[J+1]|I[J])<<1|1|I[J+1]),W[J]&$&&(C=R(t,{errors:P,currentLocation:T,expectedLocation:b,distance:a,ignoreLocation:p}))<=x){if(x=C,(S=T)<=b)break;K=Math.max(1,2*b-S)}}var V=R(t,{errors:P+1,currentLocation:b,expectedLocation:b,distance:a,ignoreLocation:p});if(V>x)break;I=W}var B={isMatch:S>=0,score:Math.max(.001,C)};if(w){var G=F(_,d);G.length?g&&(B.indices=G):B.isMatch=!1}return B}(e,n,i,{location:c+o,distance:a,threshold:s,findAllMatches:u,minMatchCharLength:h,includeMatches:r,ignoreLocation:f}),p=y.isMatch,m=y.score,k=y.indices;p&&(g=!0),v+=m,p&&k&&(d=[].concat(l(d),l(k)))}));var y={isMatch:g,score:g?v/this.chunks.length:1};return g&&r&&(y.indices=d),y}}]),e}(),D=function(){function e(n){t(this,e),this.pattern=n}return r(e,[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(e){return z(e,this.multiRegex)}},{key:"isSingleMatch",value:function(e){return z(e,this.singleRegex)}}]),e}();function z(e,t){var n=e.match(t);return n?n[1]:null}var K=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"exact"}},{key:"multiRegex",get:function(){return/^="(.*)"$/}},{key:"singleRegex",get:function(){return/^=(.*)$/}}]),i}(D),q=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"$/}},{key:"singleRegex",get:function(){return/^!(.*)$/}}]),i}(D),W=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"prefix-exact"}},{key:"multiRegex",get:function(){return/^\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^\^(.*)$/}}]),i}(D),J=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-prefix-exact"}},{key:"multiRegex",get:function(){return/^!\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^!\^(.*)$/}}]),i}(D),T=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}],[{key:"type",get:function(){return"suffix-exact"}},{key:"multiRegex",get:function(){return/^"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^(.*)\$$/}}]),i}(D),U=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-suffix-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^!(.*)\$$/}}]),i}(D),V=function(e){a(i,e);var n=f(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=o.location,a=void 0===c?A.location:c,s=o.threshold,u=void 0===s?A.threshold:s,h=o.distance,f=void 0===h?A.distance:h,l=o.includeMatches,d=void 0===l?A.includeMatches:l,v=o.findAllMatches,g=void 0===v?A.findAllMatches:v,y=o.minMatchCharLength,p=void 0===y?A.minMatchCharLength:y,m=o.isCaseSensitive,k=void 0===m?A.isCaseSensitive:m,M=o.ignoreLocation,b=void 0===M?A.ignoreLocation:M;return t(this,i),(r=n.call(this,e))._bitapSearch=new N(e,{location:a,threshold:u,distance:f,includeMatches:d,findAllMatches:g,minMatchCharLength:p,isCaseSensitive:k,ignoreLocation:b}),r}return r(i,[{key:"search",value:function(e){return this._bitapSearch.searchIn(e)}}],[{key:"type",get:function(){return"fuzzy"}},{key:"multiRegex",get:function(){return/^"(.*)"$/}},{key:"singleRegex",get:function(){return/^(.*)$/}}]),i}(D),B=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){for(var t,n=0,r=[],i=this.pattern.length;(t=e.indexOf(this.pattern,n))>-1;)n=t+i,r.push([t,n-1]);var o=!!r.length;return{isMatch:o,score:o?0:1,indices:r}}}],[{key:"type",get:function(){return"include"}},{key:"multiRegex",get:function(){return/^'"(.*)"$/}},{key:"singleRegex",get:function(){return/^'(.*)$/}}]),i}(D),G=[K,B,W,J,U,T,q,V],H=G.length,Q=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/;function X(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.split("|").map((function(e){for(var n=e.trim().split(Q).filter((function(e){return e&&!!e.trim()})),r=[],i=0,o=n.length;i1&&void 0!==arguments[1]?arguments[1]:{},i=r.isCaseSensitive,o=void 0===i?A.isCaseSensitive:i,c=r.includeMatches,a=void 0===c?A.includeMatches:c,s=r.minMatchCharLength,u=void 0===s?A.minMatchCharLength:s,h=r.ignoreLocation,f=void 0===h?A.ignoreLocation:h,l=r.findAllMatches,d=void 0===l?A.findAllMatches:l,v=r.location,g=void 0===v?A.location:v,y=r.threshold,p=void 0===y?A.threshold:y,m=r.distance,k=void 0===m?A.distance:m;t(this,e),this.query=null,this.options={isCaseSensitive:o,includeMatches:a,minMatchCharLength:u,findAllMatches:d,ignoreLocation:f,location:g,threshold:p,distance:k},this.pattern=o?n:n.toLowerCase(),this.query=X(this.pattern,this.options)}return r(e,[{key:"searchIn",value:function(e){var t=this.query;if(!t)return{isMatch:!1,score:1};var n=this.options,r=n.includeMatches;e=n.isCaseSensitive?e:e.toLowerCase();for(var i=0,o=[],c=0,a=0,s=t.length;a-1&&(n.refIndex=e.idx),t.matches.push(n)}}))}function le(e,t){t.score=e.score}function de(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.includeMatches,i=void 0===r?A.includeMatches:r,o=n.includeScore,c=void 0===o?A.includeScore:o,a=[];return i&&a.push(fe),c&&a.push(le),e.map((function(e){var n=e.idx,r={item:t[n],refIndex:n};return a.length&&a.forEach((function(t){t(e,r)})),r}))}var ve=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;t(this,e),this.options=c({},A,{},r),this.options.useExtendedSearch,this._keyStore=new w(this.options.keys),this.setCollection(n,i)}return r(e,[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof E))throw new Error("Incorrect 'index' type");this._myIndex=t||$(this.options.keys,this._docs,{getFn:this.options.getFn})}},{key:"add",value:function(e){k(e)&&(this._docs.push(e),this._myIndex.add(e))}},{key:"remove",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},t=[],n=0,r=this._docs.length;n1&&void 0!==arguments[1]?arguments[1]:{},n=t.limit,r=void 0===n?-1:n,i=this.options,o=i.includeMatches,c=i.includeScore,a=i.shouldSort,s=i.sortFn,u=i.ignoreFieldNorm,h=g(e)?g(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return he(h,{ignoreFieldNorm:u}),a&&h.sort(s),y(r)&&r>-1&&(h=h.slice(0,r)),de(h,this._docs,{includeMatches:o,includeScore:c})}},{key:"_searchStringList",value:function(e){var t=te(e,this.options),n=this._myIndex.records,r=[];return n.forEach((function(e){var n=e.v,i=e.i,o=e.n;if(k(n)){var c=t.searchIn(n),a=c.isMatch,s=c.score,u=c.indices;a&&r.push({item:n,idx:i,matches:[{score:s,value:n,norm:o,indices:u}]})}})),r}},{key:"_searchLogical",value:function(e){var t=this,n=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.auto,i=void 0===r||r,o=function e(n){var r=Object.keys(n),o=ae(n);if(!o&&r.length>1&&!ce(n))return e(ue(n));if(se(n)){var c=o?n[ie]:r[0],a=o?n[oe]:n[c];if(!g(a))throw new Error(x(c));var s={keyId:j(c),pattern:a};return i&&(s.searcher=te(a,t)),s}var u={children:[],operator:r[0]};return r.forEach((function(t){var r=n[t];v(r)&&r.forEach((function(t){u.children.push(e(t))}))})),u};return ce(e)||(e=ue(e)),o(e)}(e,this.options),r=this._myIndex.records,i={},o=[];return r.forEach((function(e){var r=e.$,c=e.i;if(k(r)){var a=function e(n,r,i){if(!n.children){var o=n.keyId,c=n.searcher,a=t._findMatches({key:t._keyStore.get(o),value:t._myIndex.getValueForItemAtKeyId(r,o),searcher:c});return a&&a.length?[{idx:i,item:r,matches:a}]:[]}switch(n.operator){case ne:for(var s=[],u=0,h=n.children.length;u1&&void 0!==arguments[1]?arguments[1]:{},n=t.getFn,r=void 0===n?A.getFn:n,i=e.keys,o=e.records,c=new E({getFn:r});return c.setKeys(i),c.setIndexRecords(o),c},ve.config=A,function(){ee.push.apply(ee,arguments)}(Z),ve},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Fuse=t(); \ No newline at end of file diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 34c319cdb..d9da0fb14 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -119,7 +119,7 @@ enableEmoji = true # Search config [languages.en.params.search] enable = true - # type of search engine ("lunr", "algolia") + # type of search engine ("lunr", "algolia", "fuse") type = "algolia" # max index length of the chunked content contentLength = 4000 @@ -137,6 +137,17 @@ enableEmoji = true index = "en_index" appID = "5YGRNRQK1G" searchKey = "0ff6874805de24b84aa1d5ebccad56cd" + [languages.en.params.search.fuse] + # https://fusejs.io/api/options.html + isCaseSensitive = false + minMatchCharLength = 2 + findAllMatches = false + location = 0 + threshold = 0.3 + distance = 100 + ignoreLocation = false + useExtendedSearch = false + ignoreFieldNorm = false # Home page config [languages.en.params.home] # amount of RSS pages @@ -326,7 +337,7 @@ enableEmoji = true # 搜索配置 [languages.zh-cn.params.search] enable = true - # 搜索引擎的类型 ("lunr", "algolia") + # 搜索引擎的类型 ("lunr", "algolia", "fuse") type = "algolia" # 文章内容最长索引长度 contentLength = 4000 @@ -344,6 +355,17 @@ enableEmoji = true index = "zh_cn_index" appID = "5YGRNRQK1G" searchKey = "0ff6874805de24b84aa1d5ebccad56cd" + [languages.zh-cn.params.search.fuse] + # https://fusejs.io/api/options.html + isCaseSensitive = false + minMatchCharLength = 2 + findAllMatches = false + location = 0 + threshold = 0.3 + distance = 100 + ignoreLocation = false + useExtendedSearch = false + ignoreFieldNorm = false # 主页信息设置 [languages.zh-cn.params.home] # RSS 文章数目 @@ -521,7 +543,7 @@ enableEmoji = true # Search config [languages.fr.params.search] enable = true - # type of search engine ("lunr", "algolia") + # type of search engine ("lunr", "algolia", "fuse") type = "algolia" # max index length of the chunked content contentLength = 4000 @@ -539,6 +561,17 @@ enableEmoji = true index = "fr_index" appID = "5YGRNRQK1G" searchKey = "0ff6874805de24b84aa1d5ebccad56cd" + [languages.fr.params.search.fuse] + # https://fusejs.io/api/options.html + isCaseSensitive = false + minMatchCharLength = 2 + findAllMatches = false + location = 0 + threshold = 0.3 + distance = 100 + ignoreLocation = false + useExtendedSearch = false + ignoreFieldNorm = false # Home page config [languages.fr.params.home] # amount of RSS pages diff --git a/exampleSite/content/about/index.en.md b/exampleSite/content/about/index.en.md index 0fe59fb47..15baa4f87 100644 --- a/exampleSite/content/about/index.en.md +++ b/exampleSite/content/about/index.en.md @@ -62,7 +62,7 @@ math: #### Extended Features -* :(fas fa-search fa-fw): **Search** supported by [Lunr.js](https://lunrjs.com/) or [algolia](https://www.algolia.com/) +* :(fas fa-search fa-fw): **Search** supported by [Lunr.js](https://lunrjs.com/) or [algolia](https://www.algolia.com/) or [Fuse.js](https://fusejs.io/) * :(far fa-grin-tongue-wink fa-fw): **Twemoji** supported * :(fas fa-code fa-fw): Automatically **highlighting** code * :(far fa-copy fa-fw): **Copy code** to clipboard with one click @@ -98,6 +98,7 @@ Thanks to the authors of following resources included in the theme: * [autocomplete.js](https://github.com/algolia/autocomplete.js) * [Lunr.js](https://lunrjs.com/) * [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript) +* [Fuse.js](https://fusejs.io/) * [lazysizes](https://github.com/aFarkas/lazysizes) * [object-fit-images](https://github.com/fregante/object-fit-images) * [Twemoji](https://github.com/twitter/twemoji) diff --git a/exampleSite/content/about/index.zh-cn.md b/exampleSite/content/about/index.zh-cn.md index 050554dfb..d33d440c3 100644 --- a/exampleSite/content/about/index.zh-cn.md +++ b/exampleSite/content/about/index.zh-cn.md @@ -63,7 +63,7 @@ math: #### 扩展功能 -* :(fas fa-search fa-fw): 支持基于 [Lunr.js](https://lunrjs.com/) 或 [algolia](https://www.algolia.com/) 的**搜索** +* :(fas fa-search fa-fw): 支持基于 [Lunr.js](https://lunrjs.com/) 或 [algolia](https://www.algolia.com/) 或 [Fuse.js](https://fusejs.io/) 的**搜索** * :(far fa-grin-tongue-wink fa-fw): 支持 **Twemoji** * :(fas fa-code fa-fw): 支持**代码高亮** * :(far fa-copy fa-fw): 一键**复制代码**到剪贴板 @@ -99,6 +99,7 @@ DoIt 主题中用到了以下项目,感谢它们的作者: * [autocomplete.js](https://github.com/algolia/autocomplete.js) * [Lunr.js](https://lunrjs.com/) * [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript) +* [Fuse.js](https://fusejs.io/) * [lazysizes](https://github.com/aFarkas/lazysizes) * [object-fit-images](https://github.com/fregante/object-fit-images) * [Twemoji](https://github.com/twitter/twemoji) diff --git a/exampleSite/content/posts/tests/author-fallback-tests/index.en.md b/exampleSite/content/posts/tests/author-fallback-tests/index.en.md index 2ffd8e8d1..3bb8c3c36 100644 --- a/exampleSite/content/posts/tests/author-fallback-tests/index.en.md +++ b/exampleSite/content/posts/tests/author-fallback-tests/index.en.md @@ -6,6 +6,7 @@ draft: false description: "Author Fallback Test" categories: [Tests] hiddenFromHomePage: true +hiddenFromSearch: true --- diff --git a/exampleSite/content/posts/tests/author-single-tests/index.en.md b/exampleSite/content/posts/tests/author-single-tests/index.en.md index a291428cf..63c5dbe40 100644 --- a/exampleSite/content/posts/tests/author-single-tests/index.en.md +++ b/exampleSite/content/posts/tests/author-single-tests/index.en.md @@ -7,6 +7,7 @@ authors: ["Alice"] description: "Single Author Test" categories: [Tests] hiddenFromHomePage: true +hiddenFromSearch: true --- diff --git a/exampleSite/content/posts/tests/bilibili-tests/index.en.md b/exampleSite/content/posts/tests/bilibili-tests/index.en.md index 20198d463..de9e6de7e 100644 --- a/exampleSite/content/posts/tests/bilibili-tests/index.en.md +++ b/exampleSite/content/posts/tests/bilibili-tests/index.en.md @@ -7,6 +7,7 @@ description: "Bilibili Tests" categories: [Tests] authors: [PCloud] hiddenFromHomePage: true +hiddenFromSearch: true --- diff --git a/exampleSite/content/posts/tests/builtin-shortcodes-tests/index.en.md b/exampleSite/content/posts/tests/builtin-shortcodes-tests/index.en.md index 4acd4fe7c..35bec04ef 100644 --- a/exampleSite/content/posts/tests/builtin-shortcodes-tests/index.en.md +++ b/exampleSite/content/posts/tests/builtin-shortcodes-tests/index.en.md @@ -7,6 +7,7 @@ description: "Built-in Shortcodes Tests" categories: [Tests] authors: [PCloud] hiddenFromHomePage: true +hiddenFromSearch: true --- diff --git a/exampleSite/content/posts/tests/echarts-tests/index.en.md b/exampleSite/content/posts/tests/echarts-tests/index.en.md index 258c168d0..8d1791cb7 100644 --- a/exampleSite/content/posts/tests/echarts-tests/index.en.md +++ b/exampleSite/content/posts/tests/echarts-tests/index.en.md @@ -7,6 +7,7 @@ description: "Echarts Tests" categories: [Tests] authors: [PCloud] hiddenFromHomePage: true +hiddenFromSearch: true --- diff --git a/exampleSite/content/posts/tests/extend-shortcodes-tests/index.en.md b/exampleSite/content/posts/tests/extend-shortcodes-tests/index.en.md index 9a041f76d..bb42a80d0 100644 --- a/exampleSite/content/posts/tests/extend-shortcodes-tests/index.en.md +++ b/exampleSite/content/posts/tests/extend-shortcodes-tests/index.en.md @@ -8,6 +8,7 @@ categories: [Tests] authors: [PCloud] lightgallery: true hiddenFromHomePage: true +hiddenFromSearch: true --- diff --git a/exampleSite/content/posts/tests/friend-link-tests/index.en.md b/exampleSite/content/posts/tests/friend-link-tests/index.en.md index f5aaecc36..0543e56ce 100644 --- a/exampleSite/content/posts/tests/friend-link-tests/index.en.md +++ b/exampleSite/content/posts/tests/friend-link-tests/index.en.md @@ -8,6 +8,7 @@ description: "Friend link test" categories: [Tests] authors: [PCloud] hiddenFromHomePage: true +hiddenFromSearch: true --- diff --git a/exampleSite/content/posts/tests/katex-tests/index.en.md b/exampleSite/content/posts/tests/katex-tests/index.en.md index 53042d1b1..bde822f24 100644 --- a/exampleSite/content/posts/tests/katex-tests/index.en.md +++ b/exampleSite/content/posts/tests/katex-tests/index.en.md @@ -9,7 +9,7 @@ authors: [PCloud] math: enable: true hiddenFromHomePage: true - +hiddenFromSearch: true --- diff --git a/exampleSite/content/posts/tests/mapbox-tests/index.en.md b/exampleSite/content/posts/tests/mapbox-tests/index.en.md index 209465a2b..aab3e0a0b 100644 --- a/exampleSite/content/posts/tests/mapbox-tests/index.en.md +++ b/exampleSite/content/posts/tests/mapbox-tests/index.en.md @@ -7,6 +7,7 @@ description: "Mapbox Tests" categories: [Tests] authors: [PCloud] hiddenFromHomePage: true +hiddenFromSearch: true --- diff --git a/exampleSite/content/posts/tests/markdown-tests/index.en.md b/exampleSite/content/posts/tests/markdown-tests/index.en.md index 5ac92beae..fbba68e67 100644 --- a/exampleSite/content/posts/tests/markdown-tests/index.en.md +++ b/exampleSite/content/posts/tests/markdown-tests/index.en.md @@ -8,6 +8,7 @@ description: "Test basic markdown rendering" categories: [Tests] authors: [PCloud] hiddenFromHomePage: true +hiddenFromSearch: true --- diff --git a/exampleSite/content/posts/tests/mermaid-tests/index.en.md b/exampleSite/content/posts/tests/mermaid-tests/index.en.md index e718bd15f..be87b2b7f 100644 --- a/exampleSite/content/posts/tests/mermaid-tests/index.en.md +++ b/exampleSite/content/posts/tests/mermaid-tests/index.en.md @@ -7,6 +7,7 @@ description: "Mermaid Tests" categories: [Tests] authors: [PCloud] hiddenFromHomePage: true +hiddenFromSearch: true --- diff --git a/exampleSite/content/posts/tests/multiple-authors-tests/index.en.md b/exampleSite/content/posts/tests/multiple-authors-tests/index.en.md index 5343b51b2..cea57869f 100644 --- a/exampleSite/content/posts/tests/multiple-authors-tests/index.en.md +++ b/exampleSite/content/posts/tests/multiple-authors-tests/index.en.md @@ -7,6 +7,7 @@ authors: ["Alice", "Bob", "Catherine", "David", "Edward", "Frank", "George", "Ha description: "Multr Author Test" categories: [Tests] hiddenFromHomePage: true +hiddenFromSearch: true --- diff --git a/exampleSite/content/posts/tests/multiple-authors-tests/index.zh-cn.md b/exampleSite/content/posts/tests/multiple-authors-tests/index.zh-cn.md index 7da5ff34d..40230b763 100644 --- a/exampleSite/content/posts/tests/multiple-authors-tests/index.zh-cn.md +++ b/exampleSite/content/posts/tests/multiple-authors-tests/index.zh-cn.md @@ -7,6 +7,7 @@ authors: ["Alice", "Bob", "大云云"] description: "多作者测试" categories: [Tests] hiddenFromHomePage: true +hiddenFromSearch: true --- diff --git a/exampleSite/content/posts/tests/music-tests/index.en.md b/exampleSite/content/posts/tests/music-tests/index.en.md index c842ecfbd..7188e492a 100644 --- a/exampleSite/content/posts/tests/music-tests/index.en.md +++ b/exampleSite/content/posts/tests/music-tests/index.en.md @@ -7,6 +7,7 @@ description: "Music Tests" categories: [Tests] authors: [PCloud] hiddenFromHomePage: true +hiddenFromSearch: true --- diff --git a/exampleSite/content/posts/tests/showcase-tests/index.en.md b/exampleSite/content/posts/tests/showcase-tests/index.en.md index 20beeffeb..c63d9bf8c 100644 --- a/exampleSite/content/posts/tests/showcase-tests/index.en.md +++ b/exampleSite/content/posts/tests/showcase-tests/index.en.md @@ -10,6 +10,7 @@ authors: [PCloud] hiddenFromHomePage: true toc: false pageStyle: wide +hiddenFromSearch: true --- diff --git a/exampleSite/content/posts/tests/typeit-tests/index.en.md b/exampleSite/content/posts/tests/typeit-tests/index.en.md index 4364ea30f..669f38006 100644 --- a/exampleSite/content/posts/tests/typeit-tests/index.en.md +++ b/exampleSite/content/posts/tests/typeit-tests/index.en.md @@ -7,6 +7,7 @@ description: "Typeit Tests" categories: [Tests] authors: [PCloud] hiddenFromHomePage: true +hiddenFromSearch: true --- diff --git a/exampleSite/content/posts/theme-documentation-basics/index.en.md b/exampleSite/content/posts/theme-documentation-basics/index.en.md index 56db7d0ad..59ad4981f 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.en.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.en.md @@ -229,8 +229,8 @@ Please open the code block below to view the complete sample configuration :(far # {{< version 0.2.0 >}} Search config [params.search] enable = true - # type of search engine ("lunr", "algolia") - type = "lunr" + # type of search engine ("lunr", "algolia","fuse") + type = "fuse" # max index length of the chunked content contentLength = 4000 # placeholder of the search bar @@ -247,7 +247,17 @@ Please open the code block below to view the complete sample configuration :(far index = "" appID = "" searchKey = "" - + [params.search.fuse] + # {{< version 0.2.12 >}} https://fusejs.io/api/options.html + isCaseSensitive = false + minMatchCharLength = 2 + findAllMatches = false + location = 0 + threshold = 0.3 + distance = 100 + ignoreLocation = false + useExtendedSearch = false + ignoreFieldNorm = false # Header config [params.header] # desktop header mode ("fixed", "normal", "auto") @@ -1052,8 +1062,8 @@ Here is the search configuration in your [site configuration](#site-configuratio ```toml [params.search] enable = true - # type of search engine ("lunr", "algolia") - type = "lunr" + # type of search engine ("lunr", "algolia", "fuse") + type = "fuse" # max index length of the chunked content contentLength = 4000 # placeholder of the search bar @@ -1070,11 +1080,23 @@ Here is the search configuration in your [site configuration](#site-configuratio index = "" appID = "" searchKey = "" + [params.search.fuse] + # {{< version 0.2.12 >}} https://fusejs.io/api/options.html + isCaseSensitive = false + minMatchCharLength = 2 + findAllMatches = false + location = 0 + threshold = 0.3 + distance = 100 + ignoreLocation = false + useExtendedSearch = false + ignoreFieldNorm = false ``` {{< admonition note "How to choose search engine?" >}} The following is a comparison of two search engines: +* `fuse`: simple, no need to synchronize `index.json`, no limit for `contentLength`, high performance * `lunr`: simple, no need to synchronize `index.json`, no limit for `contentLength`, but high bandwidth and low performance (Especially for Chinese which needs a large segmentit library) * `algolia`: high performance and low bandwidth, but need to synchronize `index.json` and limit for `contentLength` diff --git a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md index 39a08fd47..17f6a199c 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md @@ -232,8 +232,8 @@ hugo # {{< version 0.2.0 >}} 搜索配置 [params.search] enable = true - # 搜索引擎的类型 ("lunr", "algolia") - type = "lunr" + # 搜索引擎的类型 ("lunr", "algolia", "fuse") + type = "fuse" # 文章内容最长索引长度 contentLength = 4000 # 搜索框的占位提示语 @@ -250,6 +250,17 @@ hugo index = "" appID = "" searchKey = "" + [params.search.fuse] + # {{< version 0.2.12 >}} https://fusejs.io/api/options.html + isCaseSensitive = false + minMatchCharLength = 2 + findAllMatches = false + location = 0 + threshold = 0.3 + distance = 100 + ignoreLocation = false + useExtendedSearch = false + ignoreFieldNorm = false # 页面头部导航栏配置 [params.header] @@ -1054,8 +1065,8 @@ defaultContentLanguage = "zh-cn" ```toml [params.search] enable = true - # 搜索引擎的类型 ("lunr", "algolia") - type = "lunr" + # 搜索引擎的类型 ("lunr", "algolia", "fuse") + type = "fuse" # 文章内容最长索引长度 contentLength = 4000 # 搜索框的占位提示语 @@ -1072,11 +1083,23 @@ defaultContentLanguage = "zh-cn" index = "" appID = "" searchKey = "" + [params.search.fuse] + # {{< version 0.2.12 >}} https://fusejs.io/api/options.html + isCaseSensitive = false + minMatchCharLength = 2 + findAllMatches = false + location = 0 + threshold = 0.3 + distance = 100 + ignoreLocation = false + useExtendedSearch = false + ignoreFieldNorm = false ``` {{< admonition note "怎样选择搜索引擎?" >}} 以下是两种搜索引擎的对比: +* `fuse`: 简单, 无需同步 `index.json`, 没有 `contentLength` 的限制, 性能高 * `lunr`: 简单, 无需同步 `index.json`, 没有 `contentLength` 的限制, 但占用带宽大且性能低 (特别是中文需要一个较大的分词依赖库) * `algolia`: 高性能并且占用带宽低, 但需要同步 `index.json` 且有 `contentLength` 的限制 diff --git a/layouts/partials/assets.html b/layouts/partials/assets.html index 58d50bb73..516bc3aba 100644 --- a/layouts/partials/assets.html +++ b/layouts/partials/assets.html @@ -27,6 +27,13 @@ {{- $source := $cdn.algoliasearchJS | default "lib/algoliasearch/algoliasearch-lite.umd.min.js" -}} {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} {{- $config = dict "type" "algolia" "algoliaIndex" $search.algolia.index "algoliaAppID" $search.algolia.appID "algoliaSearchKey" $search.algolia.searchKey | dict "search" | merge $config -}} + {{- else if eq $search.type "fuse" -}} + {{- with .Site.Home.OutputFormats.Get "json" -}} + {{- $config = dict "type" "fuse" "fuseIndexURL" .RelPermalink | dict "search" | merge $config -}} + {{- end -}} + {{- $source := $cdn.fuseJS | default "lib/fuse/fuse.min.js" -}} + {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} + {{- $config = dict "isCaseSensitive" $search.fuse.isCaseSensitive "minMatchCharLength" $search.fuse.minMatchCharLength "findAllMatches" $search.fuse.findAllMatches "location" $search.fuse.location "threshold" $search.fuse.threshold "distance" $search.fuse.distance "ignoreLocation" $search.fuse.ignoreLocation "useExtendedSearch" $search.fuse.useExtendedSearch "ignoreFieldNorm" $search.fuse.ignoreFieldNorm | dict "search" | merge $config -}} {{- end -}} {{- end -}} diff --git a/src/js/theme.js b/src/js/theme.js index 870bb1f57..e60bf2480 100644 --- a/src/js/theme.js +++ b/src/js/theme.js @@ -143,7 +143,15 @@ class Theme { const maxResultLength = searchConfig.maxResultLength ? searchConfig.maxResultLength : 10; const snippetLength = searchConfig.snippetLength ? searchConfig.snippetLength : 50; const highlightTag = searchConfig.highlightTag ? searchConfig.highlightTag : 'em'; - + const isCaseSensitive = searchConfig.isCaseSensitive ? searchConfig.isCaseSensitive : false; + const minMatchCharLength = searchConfig.minMatchCharLength ? searchConfig.minMatchCharLength : 1; + const findAllMatches = searchConfig.findAllMatches ? searchConfig.findAllMatches : false; + const location = searchConfig.location ? searchConfig.location : 0; + const threshold = searchConfig.threshold ? searchConfig.threshold : 0.3; + const distance = searchConfig.distance ? searchConfig.distance : 100; + const ignoreLocation = searchConfig.ignoreLocation ? searchConfig.ignoreLocation : false; + const useExtendedSearch = searchConfig.useExtendedSearch ? searchConfig.useExtendedSearch : false; + const ignoreFieldNorm = searchConfig.ignoreFieldNorm ? searchConfig.ignoreFieldNorm : false; const suffix = isMobile ? 'mobile' : 'desktop'; const $header = document.getElementById(`header-${suffix}`); const $searchInput = document.getElementById(`search-input-${suffix}`); @@ -306,6 +314,70 @@ class Theme { console.error(err); finish([]); }); + } else if (searchConfig.type === 'fuse') { + const search = () => { + const results = {}; + this._index.search(query).forEach(({ item, refIndex, matches }) => { + let title = item.title; + let content = item.content; + matches.forEach(({ indices, value, key }) => { + if (key === 'content') { + let offset = 0; + for (let i = 0; i < indices.length; i ++) { + let substr = content.substring(indices[i][0] + offset, indices[i][1] + 1 + offset); + let tag = `<${highlightTag}>` + substr + ``; + content = content.substring(0, indices[i][0] + offset) + tag + content.substring(indices[i][1] + 1 + offset, content.length); + offset += highlightTag.length * 2 + 5; + } + } else if (key === 'title') { + let offset = 0; + for (let i = 0; i < indices.length; i ++) { + let substr = title.substring(indices[i][0] + offset, indices[i][1] + 1 + offset); + let tag = `<${highlightTag}>` + substr + ``; + title = title.substring(0, indices[i][0] + offset) + tag + title.substring(indices[i][1] + 1 + offset, content.length); + offset += highlightTag.length * 2 + 5; + + } + } + }); + results[item.uri] = { + 'uri': item.uri, + 'title': title, + 'date': item.date, + 'context': content + }; + }); + return Object.values(results).slice(0, maxResultLength); + } + if (!this._index) { + fetch(searchConfig.fuseIndexURL) + .then(response => response.json()) + .then(data => { + const options = { + isCaseSensitive: isCaseSensitive, + findAllMatches: findAllMatches, + minMatchCharLength: minMatchCharLength, + location: location, + threshold: threshold, + distance: distance, + ignoreLocation: ignoreLocation, + useExtendedSearch: useExtendedSearch, + ignoreFieldNorm: ignoreFieldNorm, + includeScore: false, + shouldSort: true, + includeMatches: true, + keys: [ + "content", + "title" + ] + }; + this._index = new Fuse(data, options); + finish(search()); + }).catch(err => { + console.error(err); + finish([]); + }) + } else finish(search()); } }, templates: { @@ -316,11 +388,15 @@ class Theme { searchType: 'algolia', icon: '', href: 'https://www.algolia.com/', - } : { + } : (searchConfig.type === 'lunr' ? { searchType: 'Lunr.js', icon: '', href: 'https://lunrjs.com/', - }; + } : { + searchType: 'Fuse.js', + icon: '', + href: 'https://fusejs.io/', + }); return ``;}, }, });