diff --git a/CHANGELOG.md b/CHANGELOG.md index 2550e542..2acaeb41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. +# v0.2.13 + +- :tada: Feat: add Artalk comment support ([#54](https://github.com/Lruihao/FixIt/issues/54)) + ## v0.2.12 [2022-1-27] - :tada: Feat: add PWA support diff --git a/README.md b/README.md index 4c527c46..f3497da3 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,7 @@ the FixIt theme may be more suitable for you. * **Telegram comments** system supported by [Telegram Comments](https://comments.app/) * **Commento** comment system supported by [Commento](https://commento.io/) * **Utterances** comment system supported by [Utterances](https://utteranc.es/) +* **Artalk** comment system supported by [Artalk](https://artalk.js.org/) ### Extended Features @@ -223,6 +224,7 @@ Thanks to the authors of following resources included in the theme: * [cookieconsent](https://github.com/osano/cookieconsent) * [Watermark](https://github.com/Lruihao/watermark) * [pangu.js](https://github.com/vinta/pangu.js) +* [Artalk](https://artalk.js.org/) ## Author diff --git a/README.zh-cn.md b/README.zh-cn.md index 623f175b..43dd57b9 100644 --- a/README.zh-cn.md +++ b/README.zh-cn.md @@ -134,6 +134,7 @@ sh fixit_checker.sh * 支持 **[Telegram comments](https://comments.app/) 评论**系统 * 支持 **[Commento](https://commento.io/)** 评论系统 * 支持 **[Utterances](https://utteranc.es/)** 评论系统 +* 支持 **[Artalk](https://artalk.js.org/)** 评论系统 ### 扩展功能 @@ -220,6 +221,7 @@ FixIt 主题中用到了以下项目,感谢它们的作者: * [cookieconsent](https://github.com/osano/cookieconsent) * [Watermark](https://github.com/Lruihao/watermark) * [pangu.js](https://github.com/vinta/pangu.js) +* [Artalk](https://artalk.js.org/) ## 作者 diff --git a/assets/data/cdn/jsdelivr.yml b/assets/data/cdn/jsdelivr.yml index 3eac757e..27e3a582 100644 --- a/assets/data/cdn/jsdelivr.yml +++ b/assets/data/cdn/jsdelivr.yml @@ -10,6 +10,9 @@ libFiles: # aplayer@1.10.1 https://github.com/MoePlayer/APlayer aplayerCSS: aplayer@1.10.1/dist/APlayer.min.css aplayerJS: aplayer@1.10.1/dist/APlayer.min.js + # artalk@2.1.4 https://github.com/ArtalkJS/Artalk + artalkCSS: artalk@2.1.4/dist/Artalk.min.css + artalkJS: artalk@2.1.4/dist/Artalk.min.js # autocomplete.js@0.38.1 https://github.com/algolia/autocomplete.js autocompleteJS: autocomplete.js@0.38.1/dist/autocomplete.min.js # clipboard.js@2.0.8 https://github.com/zenorocha/clipboard.js diff --git a/assets/js/theme.min.js b/assets/js/theme.min.js index 7d436309..ee3e3396 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("header-link"),a.insertAdjacentHTML("afterbegin",""))})}},{key:"initToc",value:function initToc(){var a=this,b=document.getElementById("TableOfContents");if(null!==b)if("true"===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="".concat(d.getBoundingClientRect().left-20,"px"),c.style.visibility="visible";var f=b.querySelectorAll("a:first-child"),g=b.getElementsByTagName("li"),h=document.getElementsByClassName("header-link"),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)},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("fadeInDown"),a.util.animateCSS(b,["fadeOutUp","faster"],!0)):e<-d&&(b.classList.remove("fadeOutUp"),a.util.animateCSS(b,["fadeInDown","faster"],!0))}),a.newScrollTop>100?f&&e>d?(c.classList.remove("fadeIn"),a.util.animateCSS(c,["fadeOut","faster"],!0)):(!f||e<-d)&&(c.style.display="block",c.classList.remove("fadeOut"),a.util.animateCSS(c,["fadeIn","faster"],!0)):(!f&&(c.classList.remove("fadeIn"),a.util.animateCSS(c,["fadeOut","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.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?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"")}}});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("header-link"),a.insertAdjacentHTML("afterbegin",""))})}},{key:"initToc",value:function initToc(){var a=this,b=document.getElementById("TableOfContents");if(null!==b)if("true"===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="".concat(d.getBoundingClientRect().left-20,"px"),c.style.visibility="visible";var f=b.querySelectorAll("a:first-child"),g=b.getElementsByTagName("li"),h=document.getElementsByClassName("header-link"),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)},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("fadeInDown"),a.util.animateCSS(b,["fadeOutUp","faster"],!0)):e<-d&&(b.classList.remove("fadeOutUp"),a.util.animateCSS(b,["fadeInDown","faster"],!0))}),a.newScrollTop>100?f&&e>d?(c.classList.remove("fadeIn"),a.util.animateCSS(c,["fadeOut","faster"],!0)):(!f||e<-d)&&(c.style.display="block",c.classList.remove("fadeOut"),a.util.animateCSS(c,["fadeIn","faster"],!0)):(!f&&(c.classList.remove("fadeIn"),a.util.animateCSS(c,["fadeOut","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.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 942d8d4c..f031ab3d 100644 --- a/assets/js/theme.min.js.map +++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AAL,EAPE,CAQF,KAAK,aAAL,EARE,CASF,KAAK,SAAL,EATE,CAUF,KAAK,cAAL,EAVE,CAWF,KAAK,QAAL,EAXE,CAYF,KAAK,WAAL,EAZE,CAaF,KAAK,WAAL,EAbE,CAcF,KAAK,UAAL,EAdE,CAeF,KAAK,UAAL,EAfE,CAgBF,KAAK,iBAAL,EACD,CAAC,MAAO,CAAP,CAAY,CACZ,OAAO,CAAC,KAAR,CAAc,CAAd,CACD,CAED,MAAM,CAAC,UAAP,CAAkB,UAAM,CACtB,CAAI,CAAC,OAAL,EADsB,CAEtB,CAAI,CAAC,WAAL,EAFsB,CAItB,CAAI,CAAC,QAAL,EAJsB,CAKtB,CAAI,CAAC,QAAL,EALsB,CAMtB,CAAI,CAAC,WAAL,EACD,CAPD,CAOG,GAPH,CAQD,C,SAGG,SAAS,CAAG,UAAM,CACtB,GAAM,CAAA,CAAK,CAAG,GAAI,CAAA,KAAlB,CACA,CAAK,CAAC,IAAN,EACD,C,CAE2B,SAAxB,GAAA,QAAQ,CAAC,U,CAGX,QAAQ,CAAC,gBAAT,CAA0B,kBAA1B,CAA8C,SAA9C,I,CAFA,SAAS,E","file":"theme.min.js","sourcesContent":["class Util {\n forEach(elements, handler) {\n elements = elements || [];\n for (let i = 0; i < elements.length; i++) handler(elements[i]);\n }\n\n getScrollTop() {\n return (document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop;\n }\n\n isMobile() {\n return window.matchMedia('only screen and (max-width: 680px)').matches;\n }\n\n isTocStatic() {\n return window.matchMedia('only screen and (max-width: 960px)').matches;\n }\n\n animateCSS(element, animation, reserved, callback) {\n if (!Array.isArray(animation)) animation = [animation];\n element.classList.add('animated', ...animation);\n const handler = () => {\n element.classList.remove('animated', ...animation);\n element.removeEventListener('animationend', handler);\n if (typeof callback === 'function') callback();\n };\n if (!reserved) element.addEventListener('animationend', handler, false);\n }\n}\n\nclass Theme {\n constructor() {\n this.config = window.config;\n this.data = this.config.data;\n this.isDark = document.body.getAttribute('theme') === 'dark';\n this.util = new Util();\n this.newScrollTop = this.util.getScrollTop();\n this.oldScrollTop = this.newScrollTop;\n this.scrollEventSet = new Set();\n this.resizeEventSet = new Set();\n this.switchThemeEventSet = new Set();\n this.clickMaskEventSet = new Set();\n if (window.objectFitImages) objectFitImages();\n }\n\n initSVGIcon() {\n this.util.forEach(document.querySelectorAll('[data-svg-src]'), $icon => {\n fetch($icon.getAttribute('data-svg-src'))\n .then(response => response.text())\n .then(svg => {\n const $temp = document.createElement('div');\n $temp.insertAdjacentHTML('afterbegin', svg);\n const $svg = $temp.firstChild;\n $svg.setAttribute('data-svg-src', $icon.getAttribute('data-svg-src'));\n $svg.classList.add('icon');\n const $titleElements = $svg.getElementsByTagName('title');\n if ($titleElements.length) $svg.removeChild($titleElements[0]);\n $icon.parentElement.replaceChild($svg, $icon);\n })\n .catch(err => { console.error(err); });\n });\n }\n\n initTwemoji() {\n if (this.config.twemoji) twemoji.parse(document.body);\n }\n\n initMenuMobile() {\n const $menuToggleMobile = document.getElementById('menu-toggle-mobile');\n const $menuMobile = document.getElementById('menu-mobile');\n $menuToggleMobile.addEventListener('click', () => {\n document.body.classList.toggle('blur');\n $menuToggleMobile.classList.toggle('active');\n $menuMobile.classList.toggle('active');\n }, false);\n this._menuMobileOnClickMask = this._menuMobileOnClickMask || (() => {\n $menuToggleMobile.classList.remove('active');\n $menuMobile.classList.remove('active');\n });\n this.clickMaskEventSet.add(this._menuMobileOnClickMask);\n }\n\n initSwitchTheme() {\n this.util.forEach(document.getElementsByClassName('theme-switch'), $themeSwitch => {\n $themeSwitch.addEventListener('click', () => {\n if (document.body.getAttribute('theme') === 'dark') document.body.setAttribute('theme', 'light');\n else document.body.setAttribute('theme', 'dark');\n this.isDark = !this.isDark;\n window.localStorage && localStorage.setItem('theme', this.isDark ? 'dark' : 'light');\n for (let event of this.switchThemeEventSet) event();\n }, false);\n });\n }\n\n initSearch() {\n const searchConfig = this.config.search;\n const isMobile = this.util.isMobile();\n if (!searchConfig || isMobile && this._searchMobileOnce || !isMobile && this._searchDesktopOnce) return;\n\n const maxResultLength = searchConfig.maxResultLength ? searchConfig.maxResultLength : 10;\n const snippetLength = searchConfig.snippetLength ? searchConfig.snippetLength : 50;\n const highlightTag = searchConfig.highlightTag ? searchConfig.highlightTag : 'em';\n\n const suffix = isMobile ? 'mobile' : 'desktop';\n const $header = document.getElementById(`header-${suffix}`);\n const $searchInput = document.getElementById(`search-input-${suffix}`);\n const $searchToggle = document.getElementById(`search-toggle-${suffix}`);\n const $searchLoading = document.getElementById(`search-loading-${suffix}`);\n const $searchClear = document.getElementById(`search-clear-${suffix}`);\n if (isMobile) {\n this._searchMobileOnce = true;\n $searchInput.addEventListener('focus', () => {\n document.body.classList.add('blur');\n $header.classList.add('open');\n }, false);\n document.getElementById('search-cancel-mobile').addEventListener('click', () => {\n $header.classList.remove('open');\n document.body.classList.remove('blur');\n document.getElementById('menu-toggle-mobile').classList.remove('active');\n document.getElementById('menu-mobile').classList.remove('active');\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'none';\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\n }, false);\n $searchClear.addEventListener('click', () => {\n $searchClear.style.display = 'none';\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\n }, false);\n this._searchMobileOnClickMask = this._searchMobileOnClickMask || (() => {\n $header.classList.remove('open');\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'none';\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\n });\n this.clickMaskEventSet.add(this._searchMobileOnClickMask);\n } else {\n this._searchDesktopOnce = true;\n $searchToggle.addEventListener('click', () => {\n document.body.classList.add('blur');\n $header.classList.add('open');\n $searchInput.focus();\n }, false);\n $searchClear.addEventListener('click', () => {\n $searchClear.style.display = 'none';\n this._searchDesktop && this._searchDesktop.autocomplete.setVal('');\n }, false);\n this._searchDesktopOnClickMask = this._searchDesktopOnClickMask || (() => {\n $header.classList.remove('open');\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'none';\n this._searchDesktop && this._searchDesktop.autocomplete.setVal('');\n });\n this.clickMaskEventSet.add(this._searchDesktopOnClickMask);\n }\n $searchInput.addEventListener('input', () => {\n if ($searchInput.value === '') $searchClear.style.display = 'none';\n else $searchClear.style.display = 'inline';\n }, false);\n\n const initAutosearch = () => {\n const autosearch = autocomplete(`#search-input-${suffix}`, {\n hint: false,\n autoselect: true,\n dropdownMenuContainer: `#search-dropdown-${suffix}`,\n clearOnSelected: true,\n cssClasses: { noPrefix: true },\n debug: true,\n }, {\n name: 'search',\n source: (query, callback) => {\n $searchLoading.style.display = 'inline';\n $searchClear.style.display = 'none';\n const finish = (results) => {\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'inline';\n callback(results);\n };\n if (searchConfig.type === 'lunr') {\n const search = () => {\n if (lunr.queryHandler) query = lunr.queryHandler(query);\n const results = {};\n this._index.search(query).forEach(({ ref, matchData: { metadata } }) => {\n const matchData = this._indexData[ref];\n let { uri, title, content: context } = matchData;\n if (results[uri]) return;\n let position = 0;\n Object.values(metadata).forEach(({ content }) => {\n if (content) {\n const matchPosition = content.position[0][0];\n if (matchPosition < position || position === 0) position = matchPosition;\n }\n });\n position -= snippetLength / 5;\n if (position > 0) {\n position += context.substr(position, 20).lastIndexOf(' ') + 1;\n context = '...' + context.substr(position, snippetLength);\n } else {\n context = context.substr(0, snippetLength);\n }\n Object.keys(metadata).forEach(key => {\n title = title.replace(new RegExp(`(${key})`, 'gi'), `<${highlightTag}>$1`);\n context = context.replace(new RegExp(`(${key})`, 'gi'), `<${highlightTag}>$1`);\n });\n results[uri] = {\n 'uri': uri,\n 'title' : title,\n 'date' : matchData.date,\n 'context' : context,\n };\n });\n return Object.values(results).slice(0, maxResultLength);\n }\n if (!this._index) {\n fetch(searchConfig.lunrIndexURL)\n .then(response => response.json())\n .then(data => {\n const indexData = {};\n this._index = lunr(function () {\n if (searchConfig.lunrLanguageCode) this.use(lunr[searchConfig.lunrLanguageCode]);\n this.ref('objectID');\n this.field('title', { boost: 50 });\n this.field('tags', { boost: 20 });\n this.field('categories', { boost: 20 });\n this.field('content', { boost: 10 });\n this.metadataWhitelist = ['position'];\n data.forEach((record) => {\n indexData[record.objectID] = record;\n this.add(record);\n });\n });\n this._indexData = indexData;\n finish(search());\n }).catch(err => {\n console.error(err);\n finish([]);\n });\n } else finish(search());\n } else if (searchConfig.type === 'algolia') {\n this._algoliaIndex = this._algoliaIndex || algoliasearch(searchConfig.algoliaAppID, searchConfig.algoliaSearchKey).initIndex(searchConfig.algoliaIndex);\n this._algoliaIndex\n .search(query, {\n offset: 0,\n length: maxResultLength * 8,\n attributesToHighlight: ['title'],\n attributesToSnippet: [`content:${snippetLength}`],\n highlightPreTag: `<${highlightTag}>`,\n highlightPostTag: ``,\n })\n .then(({ hits }) => {\n const results = {};\n hits.forEach(({ uri, date, _highlightResult: { title }, _snippetResult: { content } }) => {\n if (results[uri] && results[uri].context.length > content.value) return;\n results[uri] = {\n uri: uri,\n title: title.value,\n date: date,\n context: content.value,\n };\n });\n finish(Object.values(results).slice(0, maxResultLength));\n })\n .catch(err => {\n console.error(err);\n finish([]);\n });\n }\n },\n templates: {\n suggestion: ({ title, date, context }) => `
${title}${date}
${context}
`,\n empty: ({ query }) => `
${searchConfig.noResultsFound}: \"${query}\"
`,\n footer: ({}) => {\n const { searchType, icon, href } = searchConfig.type === 'algolia' ? {\n searchType: 'algolia',\n icon: '',\n href: 'https://www.algolia.com/',\n } : {\n searchType: 'Lunr.js',\n icon: '',\n href: 'https://lunrjs.com/',\n };\n return ``;},\n },\n });\n autosearch.on('autocomplete:selected', (_event, suggestion, _dataset, _context) => {\n window.location.assign(suggestion.uri);\n });\n if (isMobile) this._searchMobile = autosearch;\n else this._searchDesktop = autosearch;\n };\n if (searchConfig.lunrSegmentitURL && !document.getElementById('lunr-segmentit')) {\n const script = document.createElement('script');\n script.id = 'lunr-segmentit';\n script.type = 'text/javascript';\n script.src = searchConfig.lunrSegmentitURL;\n script.async = true;\n if (script.readyState) {\n script.onreadystatechange = () => {\n if (script.readyState == 'loaded' || script.readyState == 'complete'){\n script.onreadystatechange = null;\n initAutosearch();\n }\n };\n } else {\n script.onload = () => {\n initAutosearch();\n };\n }\n document.body.appendChild(script);\n } else initAutosearch();\n }\n\n initDetails() {\n this.util.forEach(document.getElementsByClassName('details'), $details => {\n const $summary = $details.getElementsByClassName('details-summary')[0];\n $summary.addEventListener('click', () => {\n $details.classList.toggle('open');\n }, false);\n });\n }\n\n initLightGallery() {\n if (this.config.lightGallery) lightGallery(document.getElementById('content'), this.config.lightGallery);\n }\n\n initHighlight() {\n this.util.forEach(document.querySelectorAll('.highlight > pre.chroma'), $preChroma => {\n const $chroma = document.createElement('div');\n $chroma.className = $preChroma.className;\n const $table = document.createElement('table');\n $chroma.appendChild($table);\n const $tbody = document.createElement('tbody');\n $table.appendChild($tbody);\n const $tr = document.createElement('tr');\n $tbody.appendChild($tr);\n const $td = document.createElement('td');\n $tr.appendChild($td);\n $preChroma.parentElement.replaceChild($chroma, $preChroma);\n $td.appendChild($preChroma);\n });\n this.util.forEach(document.querySelectorAll('.highlight > .chroma'), $chroma => {\n const $codeElements = $chroma.querySelectorAll('pre.chroma > code');\n if ($codeElements.length) {\n const $code = $codeElements[$codeElements.length - 1];\n const $header = document.createElement('div');\n $header.className = 'code-header ' + $code.className.toLowerCase();\n const $title = document.createElement('span');\n $title.classList.add('code-title');\n $title.insertAdjacentHTML('afterbegin', '');\n $title.addEventListener('click', () => {\n $chroma.classList.toggle('open');\n }, false);\n $header.appendChild($title);\n const $ellipses = document.createElement('span');\n $ellipses.insertAdjacentHTML('afterbegin', '');\n $ellipses.classList.add('ellipses');\n $ellipses.addEventListener('click', () => {\n $chroma.classList.add('open');\n }, false);\n $header.appendChild($ellipses);\n const $copy = document.createElement('span');\n $copy.insertAdjacentHTML('afterbegin', '');\n $copy.classList.add('copy');\n const code = $code.innerText;\n if (this.config.code.maxShownLines < 0 || code.split('\\n').length < this.config.code.maxShownLines + 2) $chroma.classList.add('open');\n if (this.config.code.copyTitle) {\n $copy.setAttribute('data-clipboard-text', code);\n $copy.title = this.config.code.copyTitle;\n const clipboard = new ClipboardJS($copy);\n clipboard.on('success', _e => {\n this.util.animateCSS($code, 'flash');\n });\n $header.appendChild($copy);\n }\n $chroma.insertBefore($header, $chroma.firstChild);\n }\n });\n }\n\n initTable() {\n this.util.forEach(document.querySelectorAll('.content table'), $table => {\n const $wrapper = document.createElement('div');\n $wrapper.className = 'table-wrapper';\n $table.parentElement.replaceChild($wrapper, $table);\n $wrapper.appendChild($table);\n });\n }\n\n initHeaderLink() {\n for (let num = 1; num <= 6; num++) {\n this.util.forEach(document.querySelectorAll('.single .content > h' + num), $header => {\n $header.classList.add('header-link');\n $header.insertAdjacentHTML('afterbegin', ``);\n });\n }\n }\n\n initToc() {\n const $tocCore = document.getElementById('TableOfContents');\n if ($tocCore === null){\n return;\n }\n if (document.getElementById('toc-static').getAttribute('kept') === 'true' || this.util.isTocStatic()) {\n const $tocContentStatic = document.getElementById('toc-content-static');\n if ($tocCore.parentElement !== $tocContentStatic) {\n $tocCore.parentElement.removeChild($tocCore);\n $tocContentStatic.appendChild($tocCore);\n }\n if (this._tocOnScroll) this.scrollEventSet.delete(this._tocOnScroll);\n } else {\n const $tocContentAuto = document.getElementById('toc-content-auto');\n if ($tocCore.parentElement !== $tocContentAuto) {\n $tocCore.parentElement.removeChild($tocCore);\n $tocContentAuto.appendChild($tocCore);\n }\n const $toc = document.getElementById('toc-auto');\n const $page = document.getElementsByClassName('page')[0];\n const rect = $page.getBoundingClientRect();\n $toc.style.left = `${rect.left + rect.width + 20}px`;\n $toc.style.maxWidth = `${$page.getBoundingClientRect().left - 20}px`;\n $toc.style.visibility = 'visible';\n const $tocLinkElements = $tocCore.querySelectorAll('a:first-child');\n const $tocLiElements = $tocCore.getElementsByTagName('li');\n const $headerLinkElements = document.getElementsByClassName('header-link');\n const headerIsFixed = document.body.getAttribute('header-desktop') !== 'normal';\n const headerHeight = document.getElementById('header-desktop').offsetHeight;\n const TOP_SPACING = 20 + (headerIsFixed ? headerHeight : 0);\n const minTocTop = $toc.offsetTop;\n const minScrollTop = minTocTop - TOP_SPACING + (headerIsFixed ? 0 : headerHeight);\n this._tocOnScroll = this._tocOnScroll || (() => {\n const footerTop = document.getElementById('post-footer').offsetTop;\n const maxTocTop = footerTop - $toc.getBoundingClientRect().height;\n const maxScrollTop = maxTocTop - TOP_SPACING + (headerIsFixed ? 0 : headerHeight);\n if (this.newScrollTop < minScrollTop) {\n $toc.style.position = 'absolute';\n $toc.style.top = `${minTocTop}px`;\n } else if (this.newScrollTop > maxScrollTop) {\n $toc.style.position = 'absolute';\n $toc.style.top = `${maxTocTop}px`;\n } else {\n $toc.style.position = 'fixed';\n $toc.style.top = `${TOP_SPACING}px`;\n }\n\n this.util.forEach($tocLinkElements, $tocLink => { $tocLink.classList.remove('active'); });\n this.util.forEach($tocLiElements, $tocLi => { $tocLi.classList.remove('has-active'); });\n const INDEX_SPACING = 20 + (headerIsFixed ? headerHeight : 0);\n let activeTocIndex = $headerLinkElements.length - 1;\n for (let i = 0; i < $headerLinkElements.length - 1; i++) {\n const thisTop = $headerLinkElements[i].getBoundingClientRect().top;\n const nextTop = $headerLinkElements[i + 1].getBoundingClientRect().top;\n if ((i == 0 && thisTop > INDEX_SPACING)\n || (thisTop <= INDEX_SPACING && nextTop > INDEX_SPACING)) {\n activeTocIndex = i;\n break;\n }\n }\n if (activeTocIndex !== -1) {\n $tocLinkElements[activeTocIndex].classList.add('active');\n let $parent = $tocLinkElements[activeTocIndex].parentElement;\n while ($parent !== $tocCore) {\n $parent.classList.add('has-active');\n $parent = $parent.parentElement.parentElement;\n }\n }\n });\n this._tocOnScroll();\n this.scrollEventSet.add(this._tocOnScroll);\n }\n }\n\n initMath() {\n if (this.config.math) renderMathInElement(document.body, this.config.math);\n }\n\n initMermaid() {\n const $mermaidElements = document.getElementsByClassName('mermaid');\n if ($mermaidElements.length) {\n mermaid.initialize({startOnLoad: false, theme: 'default'});\n this.util.forEach($mermaidElements, $mermaid => {\n mermaid.mermaidAPI.render('svg-' + $mermaid.id, this.data[$mermaid.id], svgCode => {\n $mermaid.insertAdjacentHTML('afterbegin', svgCode);\n }, $mermaid);\n });\n }\n }\n\n initEcharts() {\n this._echartsOnSwitchTheme = this._echartsOnSwitchTheme || (() => {\n this._echartsArr = this._echartsArr || [];\n for (let i = 0; i < this._echartsArr.length; i++) {\n this._echartsArr[i].dispose();\n }\n this._echartsArr = [];\n this.util.forEach(document.getElementsByClassName('echarts'), $echarts => {\n const chart = echarts.init($echarts, this.isDark ? 'dark' : 'macarons', {renderer: 'svg'});\n chart.setOption(JSON.parse(this.data[$echarts.id]));\n this._echartsArr.push(chart);\n });\n });\n this.switchThemeEventSet.add(this._echartsOnSwitchTheme);\n this._echartsOnSwitchTheme();\n this._echartsOnResize = this._echartsOnResize || (() => {\n for (let i = 0; i < this._echartsArr.length; i++) {\n this._echartsArr[i].resize();\n }\n });\n this.resizeEventSet.add(this._echartsOnResize);\n }\n\n initMapbox() {\n if (this.config.mapbox) {\n mapboxgl.accessToken = this.config.mapbox.accessToken;\n mapboxgl.setRTLTextPlugin(this.config.mapbox.RTLTextPlugin);\n this._mapboxArr = this._mapboxArr || [];\n this.util.forEach(document.getElementsByClassName('mapbox'), $mapbox => {\n const { lng, lat, zoom, lightStyle, darkStyle, marked, navigation, geolocate, scale, fullscreen } = this.data[$mapbox.id];\n const mapbox = new mapboxgl.Map({\n container: $mapbox,\n center: [lng, lat],\n zoom: zoom,\n minZoom: .2,\n style: this.isDark ? darkStyle : lightStyle,\n attributionControl: false,\n });\n if (marked) {\n new mapboxgl.Marker().setLngLat([lng, lat]).addTo(mapbox);\n }\n if (navigation) {\n mapbox.addControl(new mapboxgl.NavigationControl(), 'bottom-right');\n }\n if (geolocate) {\n mapbox.addControl(new mapboxgl.GeolocateControl({\n positionOptions: {\n enableHighAccuracy: true,\n },\n showUserLocation: true,\n trackUserLocation: true,\n }), 'bottom-right');\n }\n if (scale) {\n mapbox.addControl(new mapboxgl.ScaleControl());\n }\n if (fullscreen) {\n mapbox.addControl(new mapboxgl.FullscreenControl());\n }\n mapbox.addControl(new MapboxLanguage());\n this._mapboxArr.push(mapbox);\n });\n this._mapboxOnSwitchTheme = this._mapboxOnSwitchTheme || (() => {\n this.util.forEach(this._mapboxArr, mapbox => {\n const $mapbox = mapbox.getContainer();\n const { lightStyle, darkStyle } = this.data[$mapbox.id];\n mapbox.setStyle(this.isDark ? darkStyle : lightStyle);\n mapbox.addControl(new MapboxLanguage());\n });\n });\n this.switchThemeEventSet.add(this._mapboxOnSwitchTheme);\n }\n }\n\n initTypeit() {\n if (this.config.typeit) {\n const typeitConfig = this.config.typeit;\n const speed = typeitConfig.speed ? typeitConfig.speed : 100;\n const cursorSpeed = typeitConfig.cursorSpeed ? typeitConfig.cursorSpeed : 1000;\n const cursorChar = typeitConfig.cursorChar ? typeitConfig.cursorChar : '|';\n Object.values(typeitConfig.data).forEach(group => {\n const typeone = (i) => {\n const id = group[i];\n const instance = new TypeIt(`#${id}`, {\n strings: this.data[id],\n speed: speed,\n lifeLike: true,\n cursorSpeed: cursorSpeed,\n cursorChar: cursorChar,\n waitUntilVisible: true,\n afterComplete: () => {\n if (i === group.length - 1) {\n if (typeitConfig.duration >= 0) window.setTimeout(() => {\n instance.destroy();\n }, typeitConfig.duration);\n return;\n }\n instance.destroy();\n typeone(i + 1);\n },\n }).go();\n };\n typeone(0);\n });\n }\n }\n\n initComment() {\n if (this.config.comment) {\n if (this.config.comment.gitalk) {\n this.config.comment.gitalk.body = decodeURI(window.location.href);\n const gitalk = new Gitalk(this.config.comment.gitalk);\n gitalk.render('gitalk');\n }\n if (this.config.comment.valine) new Valine(this.config.comment.valine);\n if (this.config.comment.utterances) {\n const utterancesConfig = this.config.comment.utterances;\n const script = document.createElement('script');\n script.src = 'https://utteranc.es/client.js';\n script.type = 'text/javascript';\n script.setAttribute('repo', utterancesConfig.repo);\n script.setAttribute('issue-term', utterancesConfig.issueTerm);\n if (utterancesConfig.label) script.setAttribute('label', utterancesConfig.label);\n script.setAttribute('theme', this.isDark ? utterancesConfig.darkTheme : utterancesConfig.lightTheme);\n script.crossOrigin = 'anonymous';\n script.async = true;\n document.getElementById('utterances').appendChild(script);\n this._utterancesOnSwitchTheme = this._utterancesOnSwitchTheme || (() => {\n const message = {\n type: 'set-theme',\n theme: this.isDark ? utterancesConfig.darkTheme : utterancesConfig.lightTheme,\n };\n const iframe = document.querySelector('.utterances-frame');\n iframe.contentWindow.postMessage(message, 'https://utteranc.es');\n });\n this.switchThemeEventSet.add(this._utterancesOnSwitchTheme);\n }\n }\n }\n\n initCookieconsent() {\n if (this.config.cookieconsent) cookieconsent.initialise(this.config.cookieconsent);\n }\n\n onScroll() {\n const $headers = [];\n if (document.body.getAttribute('header-desktop') === 'auto') $headers.push(document.getElementById('header-desktop'));\n if (document.body.getAttribute('header-mobile') === 'auto') $headers.push(document.getElementById('header-mobile'));\n if (document.getElementById('comments')) {\n const $viewComments = document.getElementById('view-comments');\n $viewComments.href = `#comments`;\n $viewComments.style.display = 'block';\n }\n const $fixedButtons = document.getElementById('fixed-buttons');\n const ACCURACY = 20, MINIMUM = 100;\n window.addEventListener('scroll', () => {\n this.newScrollTop = this.util.getScrollTop();\n const scroll = this.newScrollTop - this.oldScrollTop;\n const isMobile = this.util.isMobile();\n this.util.forEach($headers, $header => {\n if (scroll > ACCURACY) {\n $header.classList.remove('fadeInDown');\n this.util.animateCSS($header, ['fadeOutUp', 'faster'], true);\n } else if (scroll < - ACCURACY) {\n $header.classList.remove('fadeOutUp');\n this.util.animateCSS($header, ['fadeInDown', 'faster'], true);\n }\n });\n if (this.newScrollTop > MINIMUM) {\n if (isMobile && scroll > ACCURACY) {\n $fixedButtons.classList.remove('fadeIn');\n this.util.animateCSS($fixedButtons, ['fadeOut', 'faster'], true);\n } else if (!isMobile || scroll < - ACCURACY) {\n $fixedButtons.style.display = 'block';\n $fixedButtons.classList.remove('fadeOut');\n this.util.animateCSS($fixedButtons, ['fadeIn', 'faster'], true);\n }\n } else {\n if (!isMobile) {\n $fixedButtons.classList.remove('fadeIn');\n this.util.animateCSS($fixedButtons, ['fadeOut', 'faster'], true);\n }\n $fixedButtons.style.display = 'none';\n }\n for (let event of this.scrollEventSet) event();\n this.oldScrollTop = this.newScrollTop;\n }, false);\n }\n\n onResize() {\n window.addEventListener('resize', () => {\n if (!this._resizeTimeout) {\n this._resizeTimeout = window.setTimeout(() => {\n this._resizeTimeout = null;\n for (let event of this.resizeEventSet) event();\n this.initToc();\n this.initMermaid();\n this.initSearch();\n }, 100);\n }\n }, false);\n }\n\n onClickMask() {\n document.getElementById('mask').addEventListener('click', () => {\n for (let event of this.clickMaskEventSet) event();\n document.body.classList.remove('blur');\n }, false);\n }\n\n init() {\n try {\n this.initSVGIcon();\n this.initTwemoji();\n this.initMenuMobile();\n this.initSwitchTheme();\n this.initSearch();\n this.initDetails();\n this.initLightGallery();\n this.initHighlight();\n this.initTable();\n this.initHeaderLink();\n this.initMath();\n this.initMermaid();\n this.initEcharts();\n this.initTypeit();\n this.initMapbox();\n this.initCookieconsent();\n } catch (err) {\n console.error(err);\n }\n\n window.setTimeout(() => {\n this.initToc();\n this.initComment();\n\n this.onScroll();\n this.onResize();\n this.onClickMask();\n }, 100);\n }\n}\n\nconst themeInit = () => {\n const theme = new Theme();\n theme.init();\n};\n\nif (document.readyState !== 'loading') {\n themeInit();\n} else {\n document.addEventListener('DOMContentLoaded', themeInit, false);\n}\n"]} \ No newline at end of file +{"version":3,"sources":["../../src/js/theme.js"],"names":[],"mappings":"0sEAAM,CAAA,I,6FACJ,iBAAQ,CAAR,CAAkB,CAAlB,CAA2B,CACzB,CAAQ,CAAG,CAAQ,EAAI,EADE,CAEzB,IAAK,GAAI,CAAA,CAAC,CAAG,CAAb,CAAgB,CAAC,CAAG,CAAQ,CAAC,MAA7B,CAAqC,CAAC,EAAtC,CAA0C,CAAO,CAAC,CAAQ,CAAC,CAAD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UAAL,EAfE,CAgBF,KAAK,iBAAL,EACD,CAAC,MAAO,CAAP,CAAY,CACZ,OAAO,CAAC,KAAR,CAAc,CAAd,CACD,CAED,MAAM,CAAC,UAAP,CAAkB,UAAM,CACtB,CAAI,CAAC,OAAL,EADsB,CAEtB,CAAI,CAAC,WAAL,EAFsB,CAItB,CAAI,CAAC,QAAL,EAJsB,CAKtB,CAAI,CAAC,QAAL,EALsB,CAMtB,CAAI,CAAC,WAAL,EACD,CAPD,CAOG,GAPH,CAQD,C,SAGG,SAAS,CAAG,UAAM,CACtB,GAAM,CAAA,CAAK,CAAG,GAAI,CAAA,KAAlB,CACA,CAAK,CAAC,IAAN,EACD,C,CAE2B,SAAxB,GAAA,QAAQ,CAAC,U,CAGX,QAAQ,CAAC,gBAAT,CAA0B,kBAA1B,CAA8C,SAA9C,I,CAFA,SAAS,E","file":"theme.min.js","sourcesContent":["class Util {\n forEach(elements, handler) {\n elements = elements || [];\n for (let i = 0; i < elements.length; i++) handler(elements[i]);\n }\n\n getScrollTop() {\n return (document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop;\n }\n\n isMobile() {\n return window.matchMedia('only screen and (max-width: 680px)').matches;\n }\n\n isTocStatic() {\n return window.matchMedia('only screen and (max-width: 960px)').matches;\n }\n\n animateCSS(element, animation, reserved, callback) {\n if (!Array.isArray(animation)) animation = [animation];\n element.classList.add('animated', ...animation);\n const handler = () => {\n element.classList.remove('animated', ...animation);\n element.removeEventListener('animationend', handler);\n if (typeof callback === 'function') callback();\n };\n if (!reserved) element.addEventListener('animationend', handler, false);\n }\n}\n\nclass Theme {\n constructor() {\n this.config = window.config;\n this.data = this.config.data;\n this.isDark = document.body.getAttribute('theme') === 'dark';\n this.util = new Util();\n this.newScrollTop = this.util.getScrollTop();\n this.oldScrollTop = this.newScrollTop;\n this.scrollEventSet = new Set();\n this.resizeEventSet = new Set();\n this.switchThemeEventSet = new Set();\n this.clickMaskEventSet = new Set();\n if (window.objectFitImages) objectFitImages();\n }\n\n initSVGIcon() {\n this.util.forEach(document.querySelectorAll('[data-svg-src]'), $icon => {\n fetch($icon.getAttribute('data-svg-src'))\n .then(response => response.text())\n .then(svg => {\n const $temp = document.createElement('div');\n $temp.insertAdjacentHTML('afterbegin', svg);\n const $svg = $temp.firstChild;\n $svg.setAttribute('data-svg-src', $icon.getAttribute('data-svg-src'));\n $svg.classList.add('icon');\n const $titleElements = $svg.getElementsByTagName('title');\n if ($titleElements.length) $svg.removeChild($titleElements[0]);\n $icon.parentElement.replaceChild($svg, $icon);\n })\n .catch(err => { console.error(err); });\n });\n }\n\n initTwemoji() {\n if (this.config.twemoji) twemoji.parse(document.body);\n }\n\n initMenuMobile() {\n const $menuToggleMobile = document.getElementById('menu-toggle-mobile');\n const $menuMobile = document.getElementById('menu-mobile');\n $menuToggleMobile.addEventListener('click', () => {\n document.body.classList.toggle('blur');\n $menuToggleMobile.classList.toggle('active');\n $menuMobile.classList.toggle('active');\n }, false);\n this._menuMobileOnClickMask = this._menuMobileOnClickMask || (() => {\n $menuToggleMobile.classList.remove('active');\n $menuMobile.classList.remove('active');\n });\n this.clickMaskEventSet.add(this._menuMobileOnClickMask);\n }\n\n initSwitchTheme() {\n this.util.forEach(document.getElementsByClassName('theme-switch'), $themeSwitch => {\n $themeSwitch.addEventListener('click', () => {\n if (document.body.getAttribute('theme') === 'dark') document.body.setAttribute('theme', 'light');\n else document.body.setAttribute('theme', 'dark');\n this.isDark = !this.isDark;\n window.localStorage && localStorage.setItem('theme', this.isDark ? 'dark' : 'light');\n for (let event of this.switchThemeEventSet) event();\n }, false);\n });\n }\n\n initSearch() {\n const searchConfig = this.config.search;\n const isMobile = this.util.isMobile();\n if (!searchConfig || isMobile && this._searchMobileOnce || !isMobile && this._searchDesktopOnce) return;\n\n const maxResultLength = searchConfig.maxResultLength ? searchConfig.maxResultLength : 10;\n const snippetLength = searchConfig.snippetLength ? searchConfig.snippetLength : 50;\n const highlightTag = searchConfig.highlightTag ? searchConfig.highlightTag : 'em';\n\n const suffix = isMobile ? 'mobile' : 'desktop';\n const $header = document.getElementById(`header-${suffix}`);\n const $searchInput = document.getElementById(`search-input-${suffix}`);\n const $searchToggle = document.getElementById(`search-toggle-${suffix}`);\n const $searchLoading = document.getElementById(`search-loading-${suffix}`);\n const $searchClear = document.getElementById(`search-clear-${suffix}`);\n if (isMobile) {\n this._searchMobileOnce = true;\n $searchInput.addEventListener('focus', () => {\n document.body.classList.add('blur');\n $header.classList.add('open');\n }, false);\n document.getElementById('search-cancel-mobile').addEventListener('click', () => {\n $header.classList.remove('open');\n document.body.classList.remove('blur');\n document.getElementById('menu-toggle-mobile').classList.remove('active');\n document.getElementById('menu-mobile').classList.remove('active');\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'none';\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\n }, false);\n $searchClear.addEventListener('click', () => {\n $searchClear.style.display = 'none';\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\n }, false);\n this._searchMobileOnClickMask = this._searchMobileOnClickMask || (() => {\n $header.classList.remove('open');\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'none';\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\n });\n this.clickMaskEventSet.add(this._searchMobileOnClickMask);\n } else {\n this._searchDesktopOnce = true;\n $searchToggle.addEventListener('click', () => {\n document.body.classList.add('blur');\n $header.classList.add('open');\n $searchInput.focus();\n }, false);\n $searchClear.addEventListener('click', () => {\n $searchClear.style.display = 'none';\n this._searchDesktop && this._searchDesktop.autocomplete.setVal('');\n }, false);\n this._searchDesktopOnClickMask = this._searchDesktopOnClickMask || (() => {\n $header.classList.remove('open');\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'none';\n this._searchDesktop && this._searchDesktop.autocomplete.setVal('');\n });\n this.clickMaskEventSet.add(this._searchDesktopOnClickMask);\n }\n $searchInput.addEventListener('input', () => {\n if ($searchInput.value === '') $searchClear.style.display = 'none';\n else $searchClear.style.display = 'inline';\n }, false);\n\n const initAutosearch = () => {\n const autosearch = autocomplete(`#search-input-${suffix}`, {\n hint: false,\n autoselect: true,\n dropdownMenuContainer: `#search-dropdown-${suffix}`,\n clearOnSelected: true,\n cssClasses: { noPrefix: true },\n debug: true,\n }, {\n name: 'search',\n source: (query, callback) => {\n $searchLoading.style.display = 'inline';\n $searchClear.style.display = 'none';\n const finish = (results) => {\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'inline';\n callback(results);\n };\n if (searchConfig.type === 'lunr') {\n const search = () => {\n if (lunr.queryHandler) query = lunr.queryHandler(query);\n const results = {};\n this._index.search(query).forEach(({ ref, matchData: { metadata } }) => {\n const matchData = this._indexData[ref];\n let { uri, title, content: context } = matchData;\n if (results[uri]) return;\n let position = 0;\n Object.values(metadata).forEach(({ content }) => {\n if (content) {\n const matchPosition = content.position[0][0];\n if (matchPosition < position || position === 0) position = matchPosition;\n }\n });\n position -= snippetLength / 5;\n if (position > 0) {\n position += context.substr(position, 20).lastIndexOf(' ') + 1;\n context = '...' + context.substr(position, snippetLength);\n } else {\n context = context.substr(0, snippetLength);\n }\n Object.keys(metadata).forEach(key => {\n title = title.replace(new RegExp(`(${key})`, 'gi'), `<${highlightTag}>$1`);\n context = context.replace(new RegExp(`(${key})`, 'gi'), `<${highlightTag}>$1`);\n });\n results[uri] = {\n 'uri': uri,\n 'title' : title,\n 'date' : matchData.date,\n 'context' : context,\n };\n });\n return Object.values(results).slice(0, maxResultLength);\n }\n if (!this._index) {\n fetch(searchConfig.lunrIndexURL)\n .then(response => response.json())\n .then(data => {\n const indexData = {};\n this._index = lunr(function () {\n if (searchConfig.lunrLanguageCode) this.use(lunr[searchConfig.lunrLanguageCode]);\n this.ref('objectID');\n this.field('title', { boost: 50 });\n this.field('tags', { boost: 20 });\n this.field('categories', { boost: 20 });\n this.field('content', { boost: 10 });\n this.metadataWhitelist = ['position'];\n data.forEach((record) => {\n indexData[record.objectID] = record;\n this.add(record);\n });\n });\n this._indexData = indexData;\n finish(search());\n }).catch(err => {\n console.error(err);\n finish([]);\n });\n } else finish(search());\n } else if (searchConfig.type === 'algolia') {\n this._algoliaIndex = this._algoliaIndex || algoliasearch(searchConfig.algoliaAppID, searchConfig.algoliaSearchKey).initIndex(searchConfig.algoliaIndex);\n this._algoliaIndex\n .search(query, {\n offset: 0,\n length: maxResultLength * 8,\n attributesToHighlight: ['title'],\n attributesToSnippet: [`content:${snippetLength}`],\n highlightPreTag: `<${highlightTag}>`,\n highlightPostTag: ``,\n })\n .then(({ hits }) => {\n const results = {};\n hits.forEach(({ uri, date, _highlightResult: { title }, _snippetResult: { content } }) => {\n if (results[uri] && results[uri].context.length > content.value) return;\n results[uri] = {\n uri: uri,\n title: title.value,\n date: date,\n context: content.value,\n };\n });\n finish(Object.values(results).slice(0, maxResultLength));\n })\n .catch(err => {\n console.error(err);\n finish([]);\n });\n }\n },\n templates: {\n suggestion: ({ title, date, context }) => `
${title}${date}
${context}
`,\n empty: ({ query }) => `
${searchConfig.noResultsFound}: \"${query}\"
`,\n footer: ({}) => {\n const { searchType, icon, href } = searchConfig.type === 'algolia' ? {\n searchType: 'algolia',\n icon: '',\n href: 'https://www.algolia.com/',\n } : {\n searchType: 'Lunr.js',\n icon: '',\n href: 'https://lunrjs.com/',\n };\n return ``;},\n },\n });\n autosearch.on('autocomplete:selected', (_event, suggestion, _dataset, _context) => {\n window.location.assign(suggestion.uri);\n });\n if (isMobile) this._searchMobile = autosearch;\n else this._searchDesktop = autosearch;\n };\n if (searchConfig.lunrSegmentitURL && !document.getElementById('lunr-segmentit')) {\n const script = document.createElement('script');\n script.id = 'lunr-segmentit';\n script.type = 'text/javascript';\n script.src = searchConfig.lunrSegmentitURL;\n script.async = true;\n if (script.readyState) {\n script.onreadystatechange = () => {\n if (script.readyState == 'loaded' || script.readyState == 'complete'){\n script.onreadystatechange = null;\n initAutosearch();\n }\n };\n } else {\n script.onload = () => {\n initAutosearch();\n };\n }\n document.body.appendChild(script);\n } else initAutosearch();\n }\n\n initDetails() {\n this.util.forEach(document.getElementsByClassName('details'), $details => {\n const $summary = $details.getElementsByClassName('details-summary')[0];\n $summary.addEventListener('click', () => {\n $details.classList.toggle('open');\n }, false);\n });\n }\n\n initLightGallery() {\n if (this.config.lightGallery) lightGallery(document.getElementById('content'), this.config.lightGallery);\n }\n\n initHighlight() {\n this.util.forEach(document.querySelectorAll('.highlight > pre.chroma'), $preChroma => {\n const $chroma = document.createElement('div');\n $chroma.className = $preChroma.className;\n const $table = document.createElement('table');\n $chroma.appendChild($table);\n const $tbody = document.createElement('tbody');\n $table.appendChild($tbody);\n const $tr = document.createElement('tr');\n $tbody.appendChild($tr);\n const $td = document.createElement('td');\n $tr.appendChild($td);\n $preChroma.parentElement.replaceChild($chroma, $preChroma);\n $td.appendChild($preChroma);\n });\n this.util.forEach(document.querySelectorAll('.highlight > .chroma'), $chroma => {\n const $codeElements = $chroma.querySelectorAll('pre.chroma > code');\n if ($codeElements.length) {\n const $code = $codeElements[$codeElements.length - 1];\n const $header = document.createElement('div');\n $header.className = 'code-header ' + $code.className.toLowerCase();\n const $title = document.createElement('span');\n $title.classList.add('code-title');\n $title.insertAdjacentHTML('afterbegin', '');\n $title.addEventListener('click', () => {\n $chroma.classList.toggle('open');\n }, false);\n $header.appendChild($title);\n const $ellipses = document.createElement('span');\n $ellipses.insertAdjacentHTML('afterbegin', '');\n $ellipses.classList.add('ellipses');\n $ellipses.addEventListener('click', () => {\n $chroma.classList.add('open');\n }, false);\n $header.appendChild($ellipses);\n const $copy = document.createElement('span');\n $copy.insertAdjacentHTML('afterbegin', '');\n $copy.classList.add('copy');\n const code = $code.innerText;\n if (this.config.code.maxShownLines < 0 || code.split('\\n').length < this.config.code.maxShownLines + 2) $chroma.classList.add('open');\n if (this.config.code.copyTitle) {\n $copy.setAttribute('data-clipboard-text', code);\n $copy.title = this.config.code.copyTitle;\n const clipboard = new ClipboardJS($copy);\n clipboard.on('success', _e => {\n this.util.animateCSS($code, 'flash');\n });\n $header.appendChild($copy);\n }\n $chroma.insertBefore($header, $chroma.firstChild);\n }\n });\n }\n\n initTable() {\n this.util.forEach(document.querySelectorAll('.content table'), $table => {\n const $wrapper = document.createElement('div');\n $wrapper.className = 'table-wrapper';\n $table.parentElement.replaceChild($wrapper, $table);\n $wrapper.appendChild($table);\n });\n }\n\n initHeaderLink() {\n for (let num = 1; num <= 6; num++) {\n this.util.forEach(document.querySelectorAll('.single .content > h' + num), $header => {\n $header.classList.add('header-link');\n $header.insertAdjacentHTML('afterbegin', ``);\n });\n }\n }\n\n initToc() {\n const $tocCore = document.getElementById('TableOfContents');\n if ($tocCore === null){\n return;\n }\n if (document.getElementById('toc-static').getAttribute('kept') === 'true' || this.util.isTocStatic()) {\n const $tocContentStatic = document.getElementById('toc-content-static');\n if ($tocCore.parentElement !== $tocContentStatic) {\n $tocCore.parentElement.removeChild($tocCore);\n $tocContentStatic.appendChild($tocCore);\n }\n if (this._tocOnScroll) this.scrollEventSet.delete(this._tocOnScroll);\n } else {\n const $tocContentAuto = document.getElementById('toc-content-auto');\n if ($tocCore.parentElement !== $tocContentAuto) {\n $tocCore.parentElement.removeChild($tocCore);\n $tocContentAuto.appendChild($tocCore);\n }\n const $toc = document.getElementById('toc-auto');\n const $page = document.getElementsByClassName('page')[0];\n const rect = $page.getBoundingClientRect();\n $toc.style.left = `${rect.left + rect.width + 20}px`;\n $toc.style.maxWidth = `${$page.getBoundingClientRect().left - 20}px`;\n $toc.style.visibility = 'visible';\n const $tocLinkElements = $tocCore.querySelectorAll('a:first-child');\n const $tocLiElements = $tocCore.getElementsByTagName('li');\n const $headerLinkElements = document.getElementsByClassName('header-link');\n const headerIsFixed = document.body.getAttribute('header-desktop') !== 'normal';\n const headerHeight = document.getElementById('header-desktop').offsetHeight;\n const TOP_SPACING = 20 + (headerIsFixed ? headerHeight : 0);\n const minTocTop = $toc.offsetTop;\n const minScrollTop = minTocTop - TOP_SPACING + (headerIsFixed ? 0 : headerHeight);\n this._tocOnScroll = this._tocOnScroll || (() => {\n const footerTop = document.getElementById('post-footer').offsetTop;\n const maxTocTop = footerTop - $toc.getBoundingClientRect().height;\n const maxScrollTop = maxTocTop - TOP_SPACING + (headerIsFixed ? 0 : headerHeight);\n if (this.newScrollTop < minScrollTop) {\n $toc.style.position = 'absolute';\n $toc.style.top = `${minTocTop}px`;\n } else if (this.newScrollTop > maxScrollTop) {\n $toc.style.position = 'absolute';\n $toc.style.top = `${maxTocTop}px`;\n } else {\n $toc.style.position = 'fixed';\n $toc.style.top = `${TOP_SPACING}px`;\n }\n\n this.util.forEach($tocLinkElements, $tocLink => { $tocLink.classList.remove('active'); });\n this.util.forEach($tocLiElements, $tocLi => { $tocLi.classList.remove('has-active'); });\n const INDEX_SPACING = 20 + (headerIsFixed ? headerHeight : 0);\n let activeTocIndex = $headerLinkElements.length - 1;\n for (let i = 0; i < $headerLinkElements.length - 1; i++) {\n const thisTop = $headerLinkElements[i].getBoundingClientRect().top;\n const nextTop = $headerLinkElements[i + 1].getBoundingClientRect().top;\n if ((i == 0 && thisTop > INDEX_SPACING)\n || (thisTop <= INDEX_SPACING && nextTop > INDEX_SPACING)) {\n activeTocIndex = i;\n break;\n }\n }\n if (activeTocIndex !== -1) {\n $tocLinkElements[activeTocIndex].classList.add('active');\n let $parent = $tocLinkElements[activeTocIndex].parentElement;\n while ($parent !== $tocCore) {\n $parent.classList.add('has-active');\n $parent = $parent.parentElement.parentElement;\n }\n }\n });\n this._tocOnScroll();\n this.scrollEventSet.add(this._tocOnScroll);\n }\n }\n\n initMath() {\n if (this.config.math) renderMathInElement(document.body, this.config.math);\n }\n\n initMermaid() {\n const $mermaidElements = document.getElementsByClassName('mermaid');\n if ($mermaidElements.length) {\n mermaid.initialize({startOnLoad: false, theme: 'default'});\n this.util.forEach($mermaidElements, $mermaid => {\n mermaid.mermaidAPI.render('svg-' + $mermaid.id, this.data[$mermaid.id], svgCode => {\n $mermaid.insertAdjacentHTML('afterbegin', svgCode);\n }, $mermaid);\n });\n }\n }\n\n initEcharts() {\n this._echartsOnSwitchTheme = this._echartsOnSwitchTheme || (() => {\n this._echartsArr = this._echartsArr || [];\n for (let i = 0; i < this._echartsArr.length; i++) {\n this._echartsArr[i].dispose();\n }\n this._echartsArr = [];\n this.util.forEach(document.getElementsByClassName('echarts'), $echarts => {\n const chart = echarts.init($echarts, this.isDark ? 'dark' : 'macarons', {renderer: 'svg'});\n chart.setOption(JSON.parse(this.data[$echarts.id]));\n this._echartsArr.push(chart);\n });\n });\n this.switchThemeEventSet.add(this._echartsOnSwitchTheme);\n this._echartsOnSwitchTheme();\n this._echartsOnResize = this._echartsOnResize || (() => {\n for (let i = 0; i < this._echartsArr.length; i++) {\n this._echartsArr[i].resize();\n }\n });\n this.resizeEventSet.add(this._echartsOnResize);\n }\n\n initMapbox() {\n if (this.config.mapbox) {\n mapboxgl.accessToken = this.config.mapbox.accessToken;\n mapboxgl.setRTLTextPlugin(this.config.mapbox.RTLTextPlugin);\n this._mapboxArr = this._mapboxArr || [];\n this.util.forEach(document.getElementsByClassName('mapbox'), $mapbox => {\n const { lng, lat, zoom, lightStyle, darkStyle, marked, navigation, geolocate, scale, fullscreen } = this.data[$mapbox.id];\n const mapbox = new mapboxgl.Map({\n container: $mapbox,\n center: [lng, lat],\n zoom: zoom,\n minZoom: .2,\n style: this.isDark ? darkStyle : lightStyle,\n attributionControl: false,\n });\n if (marked) {\n new mapboxgl.Marker().setLngLat([lng, lat]).addTo(mapbox);\n }\n if (navigation) {\n mapbox.addControl(new mapboxgl.NavigationControl(), 'bottom-right');\n }\n if (geolocate) {\n mapbox.addControl(new mapboxgl.GeolocateControl({\n positionOptions: {\n enableHighAccuracy: true,\n },\n showUserLocation: true,\n trackUserLocation: true,\n }), 'bottom-right');\n }\n if (scale) {\n mapbox.addControl(new mapboxgl.ScaleControl());\n }\n if (fullscreen) {\n mapbox.addControl(new mapboxgl.FullscreenControl());\n }\n mapbox.addControl(new MapboxLanguage());\n this._mapboxArr.push(mapbox);\n });\n this._mapboxOnSwitchTheme = this._mapboxOnSwitchTheme || (() => {\n this.util.forEach(this._mapboxArr, mapbox => {\n const $mapbox = mapbox.getContainer();\n const { lightStyle, darkStyle } = this.data[$mapbox.id];\n mapbox.setStyle(this.isDark ? darkStyle : lightStyle);\n mapbox.addControl(new MapboxLanguage());\n });\n });\n this.switchThemeEventSet.add(this._mapboxOnSwitchTheme);\n }\n }\n\n initTypeit() {\n if (this.config.typeit) {\n const typeitConfig = this.config.typeit;\n const speed = typeitConfig.speed ? typeitConfig.speed : 100;\n const cursorSpeed = typeitConfig.cursorSpeed ? typeitConfig.cursorSpeed : 1000;\n const cursorChar = typeitConfig.cursorChar ? typeitConfig.cursorChar : '|';\n Object.values(typeitConfig.data).forEach(group => {\n const typeone = (i) => {\n const id = group[i];\n const instance = new TypeIt(`#${id}`, {\n strings: this.data[id],\n speed: speed,\n lifeLike: true,\n cursorSpeed: cursorSpeed,\n cursorChar: cursorChar,\n waitUntilVisible: true,\n afterComplete: () => {\n if (i === group.length - 1) {\n if (typeitConfig.duration >= 0) window.setTimeout(() => {\n instance.destroy();\n }, typeitConfig.duration);\n return;\n }\n instance.destroy();\n typeone(i + 1);\n },\n }).go();\n };\n typeone(0);\n });\n }\n }\n\n initComment() {\n if (this.config.comment) {\n if (this.config.comment.artalk){\n new Artalk(this.config.comment.artalk)\n }\n if (this.config.comment.gitalk) {\n this.config.comment.gitalk.body = decodeURI(window.location.href);\n const gitalk = new Gitalk(this.config.comment.gitalk);\n gitalk.render('gitalk');\n }\n if (this.config.comment.valine) {\n new Valine(this.config.comment.valine);\n }\n if (this.config.comment.utterances) {\n const utterancesConfig = this.config.comment.utterances;\n const script = document.createElement('script');\n script.src = 'https://utteranc.es/client.js';\n script.type = 'text/javascript';\n script.setAttribute('repo', utterancesConfig.repo);\n script.setAttribute('issue-term', utterancesConfig.issueTerm);\n if (utterancesConfig.label) script.setAttribute('label', utterancesConfig.label);\n script.setAttribute('theme', this.isDark ? utterancesConfig.darkTheme : utterancesConfig.lightTheme);\n script.crossOrigin = 'anonymous';\n script.async = true;\n document.getElementById('utterances').appendChild(script);\n this._utterancesOnSwitchTheme = this._utterancesOnSwitchTheme || (() => {\n const message = {\n type: 'set-theme',\n theme: this.isDark ? utterancesConfig.darkTheme : utterancesConfig.lightTheme,\n };\n const iframe = document.querySelector('.utterances-frame');\n iframe.contentWindow.postMessage(message, 'https://utteranc.es');\n });\n this.switchThemeEventSet.add(this._utterancesOnSwitchTheme);\n }\n }\n }\n\n initCookieconsent() {\n if (this.config.cookieconsent) cookieconsent.initialise(this.config.cookieconsent);\n }\n\n onScroll() {\n const $headers = [];\n if (document.body.getAttribute('header-desktop') === 'auto') $headers.push(document.getElementById('header-desktop'));\n if (document.body.getAttribute('header-mobile') === 'auto') $headers.push(document.getElementById('header-mobile'));\n if (document.getElementById('comments')) {\n const $viewComments = document.getElementById('view-comments');\n $viewComments.href = `#comments`;\n $viewComments.style.display = 'block';\n }\n const $fixedButtons = document.getElementById('fixed-buttons');\n const ACCURACY = 20, MINIMUM = 100;\n window.addEventListener('scroll', () => {\n this.newScrollTop = this.util.getScrollTop();\n const scroll = this.newScrollTop - this.oldScrollTop;\n const isMobile = this.util.isMobile();\n this.util.forEach($headers, $header => {\n if (scroll > ACCURACY) {\n $header.classList.remove('fadeInDown');\n this.util.animateCSS($header, ['fadeOutUp', 'faster'], true);\n } else if (scroll < - ACCURACY) {\n $header.classList.remove('fadeOutUp');\n this.util.animateCSS($header, ['fadeInDown', 'faster'], true);\n }\n });\n if (this.newScrollTop > MINIMUM) {\n if (isMobile && scroll > ACCURACY) {\n $fixedButtons.classList.remove('fadeIn');\n this.util.animateCSS($fixedButtons, ['fadeOut', 'faster'], true);\n } else if (!isMobile || scroll < - ACCURACY) {\n $fixedButtons.style.display = 'block';\n $fixedButtons.classList.remove('fadeOut');\n this.util.animateCSS($fixedButtons, ['fadeIn', 'faster'], true);\n }\n } else {\n if (!isMobile) {\n $fixedButtons.classList.remove('fadeIn');\n this.util.animateCSS($fixedButtons, ['fadeOut', 'faster'], true);\n }\n $fixedButtons.style.display = 'none';\n }\n for (let event of this.scrollEventSet) event();\n this.oldScrollTop = this.newScrollTop;\n }, false);\n }\n\n onResize() {\n window.addEventListener('resize', () => {\n if (!this._resizeTimeout) {\n this._resizeTimeout = window.setTimeout(() => {\n this._resizeTimeout = null;\n for (let event of this.resizeEventSet) event();\n this.initToc();\n this.initMermaid();\n this.initSearch();\n }, 100);\n }\n }, false);\n }\n\n onClickMask() {\n document.getElementById('mask').addEventListener('click', () => {\n for (let event of this.clickMaskEventSet) event();\n document.body.classList.remove('blur');\n }, false);\n }\n\n init() {\n try {\n this.initSVGIcon();\n this.initTwemoji();\n this.initMenuMobile();\n this.initSwitchTheme();\n this.initSearch();\n this.initDetails();\n this.initLightGallery();\n this.initHighlight();\n this.initTable();\n this.initHeaderLink();\n this.initMath();\n this.initMermaid();\n this.initEcharts();\n this.initTypeit();\n this.initMapbox();\n this.initCookieconsent();\n } catch (err) {\n console.error(err);\n }\n\n window.setTimeout(() => {\n this.initToc();\n this.initComment();\n\n this.onScroll();\n this.onResize();\n this.onClickMask();\n }, 100);\n }\n}\n\nconst themeInit = () => {\n const theme = new Theme();\n theme.init();\n};\n\nif (document.readyState !== 'loading') {\n themeInit();\n} else {\n document.addEventListener('DOMContentLoaded', themeInit, false);\n}\n"]} \ No newline at end of file diff --git a/assets/lib/VERSION b/assets/lib/VERSION index 2aaf6f53..4719011a 100644 --- a/assets/lib/VERSION +++ b/assets/lib/VERSION @@ -1,6 +1,7 @@ algoliasearch@4.11.0 https://github.com/algolia/algoliasearch-client-javascript animate.css@4.1.1 https://github.com/daneden/animate.css aplayer@1.10.1 https://github.com/MoePlayer/APlayer +artalk@2.1.4 https://github.com/ArtalkJS/Artalk autocomplete.js@0.38.1 https://github.com/algolia/autocomplete.js clipboard.js@2.0.8 https://github.com/zenorocha/clipboard.js cookieconsent@3.1.1 https://github.com/osano/cookieconsent @@ -24,4 +25,4 @@ simple-icons@5.21.1 https://github.com/simple-icons/simple-icons twemoji@13.1.0 https://github.com/twitter/twemoji typeit@7.0.4 https://github.com/alexmacarthur/typeit valine@1.4.16 https://github.com/xCss/Valine -watermark@1.0.2 https://github.com/Lruihao/watermark.git \ No newline at end of file +watermark@1.0.2 https://github.com/Lruihao/watermark \ No newline at end of file diff --git a/assets/lib/artalk/Artalk.min.css b/assets/lib/artalk/Artalk.min.css new file mode 100644 index 00000000..b0365a14 --- /dev/null +++ b/assets/lib/artalk/Artalk.min.css @@ -0,0 +1,7 @@ +/** + * Skipped minification because the original files appears to be already minified. + * Original file: /npm/artalk@2.1.4/dist/Artalk.css + * + * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files + */ +.artalk,.atk-layer-wrap{--at-color-font: #2a2e2e;--at-color-deep: #2a2e2e;--at-color-sub: #757575;--at-color-grey: #999;--at-color-meta: #757e91;--at-color-border: #eceff2;--at-color-light: #4285f4;--at-color-bg: #FFF;--at-color-bg-transl: rgba(255, 255, 255, .94);--at-color-bg-grey: #F4F4F4;--at-color-bg-grey-transl: rgba(244, 244, 244, .75);--at-color-bg-light: rgba(29, 161, 242, .1);--at-color-main: #0083ff;--at-color-red: #ff5652;--at-color-pink: #fa5a57;--at-color-yellow: #ff7c37;--at-color-green: #4caf50;--at-color-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255))}.artalk.atk-dark-mode,.atk-layer-wrap.atk-dark-mode{--at-color-font: #fff;--at-color-deep: #e7e7e7;--at-color-sub: #e7e7e7;--at-color-grey: #fff;--at-color-meta: #fff;--at-color-border: #2d3235;--at-color-light: #687a86;--at-color-bg: #1e2224;--at-color-bg-transl: rgba(30, 34, 36, .95);--at-color-bg-grey: #46494e;--at-color-bg-grey-transl: rgba(8, 8, 8, .95);--at-color-bg-light: rgba(29, 161, 242, .1);--at-color-main: #0083ff;--at-color-red: #ff5652;--at-color-pink: #fa5a57;--at-color-yellow: #ff7c37;--at-color-green: #4caf50;--at-color-gradient: linear-gradient(180deg, rgba(30, 34, 36, 0), #1e2224)}.artalk{position:relative;width:100%;min-height:200px}.artalk *,.atk-layer-wrap *{box-sizing:border-box;line-height:1.6em;color:var(--at-color-font);font-family:Helvetica Neue,PingFangSC-Light,Hiragino Sans GB,Microsoft YaHei,WenQuanYi Micro Hei,sans-serif;word-wrap:break-word;word-break:break-all}.artalk pre,.atk-layer-wrap pre{line-height:1.6em;background-color:var(--at-color-bg-grey);color:var(--at-color-font);padding:10px 15px;border-radius:4px;margin:0;font-family:Source Code Pro,courier new,Input Mono,PT Mono,SFMono-Regular,Consolas,Monaco,Menlo,PingFang SC,Liberation Mono,Microsoft YaHei,Courier,monospace}.artalk pre code,.atk-layer-wrap pre code{white-space:pre-wrap}.artalk a,.atk-layer-wrap a{color:var(--at-color-main);text-decoration:none}.artalk blockquote,.atk-layer-wrap blockquote{position:static;margin:10px 0;padding:10px 20px;background:var(--at-color-bg-grey);border-left:4px solid #687a86}.artalk p:first-child,.atk-layer-wrap p:first-child{margin-top:0}.artalk p:last-child,.atk-layer-wrap p:last-child{margin-bottom:0}.artalk img,.atk-layer-wrap img{max-width:100%}.atk-hide{display:none!important}.atk-full-layer,.atk-loading,.atk-error-layer,.atk-layer-dialog-wrap{width:100%;height:100%;position:absolute;top:0;left:0;background:var(--at-color-bg);z-index:10;align-items:center;justify-content:center;flex-flow:column;display:flex}.atk-loading{z-index:11}.atk-loading-spinner{position:relative;width:50px;height:50px}.atk-loading-spinner svg{-webkit-animation:atkRotate 2s linear infinite;animation:atkRotate 2s linear infinite;transform-origin:center center;width:100%;height:100%;position:absolute;top:0;left:0}.atk-loading-spinner svg circle{stroke-dasharray:1,200;stroke-dashoffset:0;-webkit-animation:atkDash 1.5s ease-in-out infinite,atkColor 6s ease-in-out infinite;animation:atkDash 1.5s ease-in-out infinite,atkColor 6s ease-in-out infinite;stroke-linecap:round}@-webkit-keyframes atkRotate{to{transform:rotate(360deg)}}@keyframes atkRotate{to{transform:rotate(360deg)}}@-webkit-keyframes atkDash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@keyframes atkDash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@-webkit-keyframes atkColor{0%,to{stroke:#ff5652}40%{stroke:#2196f3}66%{stroke:#32c787}80%,90%{stroke:#ffc107}}@keyframes atkColor{0%,to{stroke:#ff5652}40%{stroke:#2196f3}66%{stroke:#32c787}80%,90%{stroke:#ffc107}}@-webkit-keyframes atkLoadingIconRotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes atkLoadingIconRotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.atk-loading-icon{width:18px;height:18px;box-sizing:border-box;border:solid 1px transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:atkLoadingIconRotate .4s linear infinite;animation:atkLoadingIconRotate .4s linear infinite}.atk-fade-in{-webkit-animation:atkFadeIn both .3s;animation:atkFadeIn both .3s}.atk-fade-out{-webkit-animation:atkFadeOut both .2s;animation:atkFadeOut both .2s}@-webkit-keyframes atkFadeIn{0%{opacity:0}to{opacity:1}}@keyframes atkFadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes atkFadeOut{to{opacity:0}}@keyframes atkFadeOut{to{opacity:0}}i.atk-icon{width:20px;height:20px;background-color:var(--at-color-deep);background-size:contain;background-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center}.atk-icon-sync{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.99133 4.87635C2.22512 7.64257 2.22512 12.1275 4.99133 14.8937C6.04677 15.9491 7.3524 16.6019 8.71732 16.8519' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M14.4179 15.4815L15.0072 14.8922C17.7734 12.126 17.7734 7.64107 15.0072 4.87486C13.9518 3.81942 12.6461 3.16668 11.2812 2.91664' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M6.17106 4.99252L5.58181 4.40327L4.99255 3.81401H6.17106V4.99252Z' fill='%23C4C4C4' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M13.8299 15.0084L14.4192 15.5976L15.0084 16.1869H13.8299V15.0084Z' fill='%23C4C4C4' stroke='%234E5969' stroke-width='2'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.99133 4.87635C2.22512 7.64257 2.22512 12.1275 4.99133 14.8937C6.04677 15.9491 7.3524 16.6019 8.71732 16.8519' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M14.4179 15.4815L15.0072 14.8922C17.7734 12.126 17.7734 7.64107 15.0072 4.87486C13.9518 3.81942 12.6461 3.16668 11.2812 2.91664' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M6.17106 4.99252L5.58181 4.40327L4.99255 3.81401H6.17106V4.99252Z' fill='%23C4C4C4' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M13.8299 15.0084L14.4192 15.5976L15.0084 16.1869H13.8299V15.0084Z' fill='%23C4C4C4' stroke='%234E5969' stroke-width='2'/%3E%3C/svg%3E")}.atk-icon-del{background-color:var(--at-color-red)!important;-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.29167 5.04166L4.81251 5.04166M4.81251 5.04166L4.81251 18.3333C4.81251 18.5865 5.01771 18.7917 5.27084 18.7917L16.7292 18.7917C16.9823 18.7917 17.1875 18.5865 17.1875 18.3333V5.04166M4.81251 5.04166L7.33334 5.04166M17.1875 5.04166L19.7083 5.04166M17.1875 5.04166L14.6667 5.04166M7.33334 5.04166V3.20833L14.6667 3.20833V5.04166M7.33334 5.04166L14.6667 5.04166' stroke='%23D06565' stroke-width='2'/%3E%3Cpath d='M9.16667 8.25V15.125M12.8333 8.25V15.125' stroke='%23D06565' stroke-width='2'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.29167 5.04166L4.81251 5.04166M4.81251 5.04166L4.81251 18.3333C4.81251 18.5865 5.01771 18.7917 5.27084 18.7917L16.7292 18.7917C16.9823 18.7917 17.1875 18.5865 17.1875 18.3333V5.04166M4.81251 5.04166L7.33334 5.04166M17.1875 5.04166L19.7083 5.04166M17.1875 5.04166L14.6667 5.04166M7.33334 5.04166V3.20833L14.6667 3.20833V5.04166M7.33334 5.04166L14.6667 5.04166' stroke='%23D06565' stroke-width='2'/%3E%3Cpath d='M9.16667 8.25V15.125M12.8333 8.25V15.125' stroke='%23D06565' stroke-width='2'/%3E%3C/svg%3E")}.atk-icon-edit{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.70618 4.08515L12.6081 7.06376M1.00041 13.021L11.7376 2L14.6392 4.97861L3.90274 16H1L1.00041 13.021Z' stroke='%234E5969' stroke-width='1.5'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.70618 4.08515L12.6081 7.06376M1.00041 13.021L11.7376 2L14.6392 4.97861L3.90274 16H1L1.00041 13.021Z' stroke='%234E5969' stroke-width='1.5'/%3E%3C/svg%3E")}.atk-icon-no,.atk-icon-close{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='25' height='25' viewBox='0 0 25 25' fill='none'%3E%3Cpath d='M19.8657 5.13431L12.5 12.5L5.13431 19.8657' stroke='%234E5969'/%3E%3Cpath d='M5.13431 5.13432L12.5 12.5L19.8657 19.8657' stroke='%234E5969'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='25' height='25' viewBox='0 0 25 25' fill='none'%3E%3Cpath d='M19.8657 5.13431L12.5 12.5L5.13431 19.8657' stroke='%234E5969'/%3E%3Cpath d='M5.13431 5.13432L12.5 12.5L19.8657 19.8657' stroke='%234E5969'/%3E%3C/svg%3E")}.atk-icon-yes{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='25' height='25' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21.7071 5.75533L9.92197 17.5404L3.29285 10.9113' stroke='%234E5969'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='25' height='25' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21.7071 5.75533L9.92197 17.5404L3.29285 10.9113' stroke='%234E5969'/%3E%3C/svg%3E")}.atk-icon-plus{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.08331 10H17.9166' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M10 2.08334L10 17.9167' stroke='%234E5969' stroke-width='2'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.08331 10H17.9166' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M10 2.08334L10 17.9167' stroke='%234E5969' stroke-width='2'/%3E%3C/svg%3E")}.atk-error-layer{background-color:var(--at-color-bg-transl)}.atk-error-layer .atk-error-title{color:var(--at-color-red)}.atk-error-layer .atk-warn-title{color:var(--at-color-yellow)}.atk-error-layer .atk-error-title,.atk-error-layer .atk-warn-title{display:inline-block;padding:0 15px;margin-bottom:20px;font-size:20px;letter-spacing:-.5px}.atk-error-layer .atk-error-text{text-align:center;padding:0 20px}.atk-error-layer .atk-error-text *{color:var(--at-color-deep)}.atk-error-layer .atk-error-text a{color:var(--at-color-meta)}.atk-layer-dialog-wrap{background-color:var(--at-color-bg-transl)}.atk-layer-dialog-wrap>.atk-layer-dialog{width:25%}.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-content .atk-captcha-img{cursor:pointer;width:100px;height:auto;margin-right:10px;padding-right:10px;border-right:1px solid var(--at-color-border);vertical-align:bottom}.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-content input{width:100%;line-height:34px;background-color:var(--at-color-bg);border:1px solid var(--at-color-border);border-radius:2px;outline:none;padding:0 6px;display:block;margin-top:10px;margin-bottom:5px;text-align:center}.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-actions{display:flex;flex-direction:row}.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-actions button{flex:1;display:block;cursor:pointer;border:1px solid var(--at-color-main);background:transparent;color:var(--at-color-main);border-radius:2px;padding:0 15px;line-height:30px;outline:none}.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-actions button:active{color:#fff;background:var(--at-color-main)}.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-actions button:not(:last-child){margin-right:5px}.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-actions button.error{color:#fff;background:#ff5652;border-color:#ff5652}@media only screen and (max-width: 768px){.atk-layer-dialog-wrap>.atk-layer-dialog{width:90%!important}}.atk-notify{display:block;overflow:hidden;background-color:#2c2c2c;color:#fff;border-radius:2px;cursor:pointer;font-size:14px;padding:4px 15px}.atk-notify:not(:last-child){margin-bottom:3px}.atk-notify .atk-notify-content{color:#fff}.atk-layer-wrap .atk-layer-mask{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99998;background:rgba(0,0,0,.3)}.atk-layer-wrap .atk-layer-item{position:fixed;z-index:99999;top:0;right:0;width:100%;height:100%}.atk-common-action-btn.atk-btn-confirm,.atk-common-action-btn.atk-btn-warn{color:var(--at-color-yellow)!important}.atk-common-action-btn.atk-btn-error{color:var(--at-color-red)!important}.atk-common-action-btn.atk-btn-success{color:var(--at-color-green)!important}img[atk-emoticon]{max-height:60px}.atk-main-editor{z-index:5;position:relative;overflow:hidden;background:var(--at-color-bg);border:1px solid var(--at-color-border);border-radius:4px;margin-bottom:15px}@media only screen and (max-width: 768px){.atk-main-editor{margin-bottom:7px}}.atk-main-editor>.atk-header{display:flex;flex-direction:row;padding:5px 10px 0}.atk-main-editor>.atk-header input{flex:1;width:100%;font-size:14px;background:transparent;border:2px solid transparent;border-radius:2px;padding:6px 5px;resize:none;outline:none}.atk-main-editor>.atk-header input:not(:last-child){margin-right:2px}.atk-main-editor>.atk-textarea-wrap{position:relative}.atk-main-editor>.atk-textarea-wrap>.atk-textarea{display:block;overflow:hidden;color:var(--at-color-font);font-size:15px;background-color:var(--at-color-bg);border:2px solid transparent;border-radius:2px;width:100%;min-height:130px;margin-top:2px;padding:10px 15px;resize:none;word-wrap:break-word;outline:none}.atk-main-editor>.atk-textarea-wrap>.atk-comment-closed{pointer-events:none;color:var(--at-color-meta);font-size:12px;background-color:var(--at-color-bg);border-top:1px solid var(--at-color-border);padding:5px 15px}.atk-main-editor>.atk-textarea-wrap>.atk-send-reply{z-index:2;position:absolute;right:10px;bottom:8px;max-width:calc(100% - 20px);height:30px;line-height:30px;font-size:14px;background:var(--at-color-bg-grey-transl);padding:0 30px 0 10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.atk-main-editor>.atk-textarea-wrap>.atk-send-reply .atk-cancel{position:absolute;right:0;bottom:0;height:30px;text-align:center;width:30px;line-height:30px;font-weight:700}.atk-main-editor>.atk-textarea-wrap>.atk-send-reply .atk-cancel:hover{color:var(--at-color-deep)}.atk-main-editor>.atk-plug-wrap{position:relative;height:180px;width:100%;overflow:hidden;border-top:1px solid var(--at-color-border);-webkit-animation:.3s both atkFadeIn;animation:.3s both atkFadeIn;transition:.2s height ease-in-out}.atk-main-editor>.atk-bottom{display:flex;flex-direction:row;justify-content:space-between;border-top:1px solid var(--at-color-border);padding:0 0 0 5px}.atk-main-editor>.atk-bottom>.atk-item{display:flex;flex-direction:row;align-items:center}.atk-main-editor>.atk-bottom .atk-plug-btn{padding:0 8px;cursor:pointer;color:var(--at-color-grey);font-size:14px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.atk-main-editor>.atk-bottom .atk-plug-btn:not(:last-child){border-right:1px solid var(--at-color-border)}.atk-main-editor>.atk-bottom .atk-plug-btn.active{color:var(--at-color-main)}.atk-main-editor>.atk-bottom .atk-plug-btn.active svg.markdown path{fill:var(--at-color-main)}.atk-main-editor>.atk-bottom .atk-plug-btn i{color:var(--at-color-grey);display:inline-flex;vertical-align:sub;margin-left:4px}.atk-main-editor>.atk-bottom .atk-plug-btn i svg.markdown path{fill:var(--at-color-grey)}.atk-main-editor>.atk-bottom .atk-send-btn{background:var(--at-color-main);color:#fff;font-size:14px;border:none;padding:0 30px;margin:0;height:30px;cursor:pointer;transition:opacity .3s ease-in-out;outline:none}.atk-main-editor>.atk-bottom .atk-send-btn:active{opacity:.9}.atk-main-editor>.atk-notify-wrap{z-index:9;position:absolute;right:-2px;bottom:36px;width:225px;opacity:.83}.atk-editor-plug-emoticons{height:100%;width:100%}.atk-editor-plug-emoticons>.atk-grp-wrap{overflow-y:scroll;overflow-x:hidden;height:100%;width:100%}.atk-editor-plug-emoticons>.atk-grp-wrap::-webkit-scrollbar{width:4px;height:4px;background:transparent}.atk-editor-plug-emoticons>.atk-grp-wrap::-webkit-scrollbar-thumb,.atk-editor-plug-emoticons>.atk-grp-wrap::-webkit-scrollbar-thumb:window-inactive{background:rgba(86,86,86,.3)}.atk-editor-plug-emoticons>.atk-grp-wrap::-webkit-scrollbar-thumb:vertical:hover{background:rgba(65,74,82,.77)}.atk-editor-plug-emoticons>.atk-grp-wrap::-webkit-scrollbar-thumb:vertical:active{background:rgba(41,47,53,.77)}.atk-editor-plug-emoticons>.atk-grp-wrap>.atk-grp{display:flex;flex-wrap:wrap;flex-direction:row;padding:5px 10px 35px}.atk-editor-plug-emoticons>.atk-grp-wrap>.atk-grp[data-type=image]>.atk-item{height:63px;width:63px}.atk-editor-plug-emoticons>.atk-grp-wrap>.atk-grp>.atk-item{display:flex;align-items:center;justify-content:center;padding:5px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:2px;font-size:16px;min-width:35px}.atk-editor-plug-emoticons>.atk-grp-wrap>.atk-grp>.atk-item>img{max-height:100%;width:auto}.atk-editor-plug-emoticons>.atk-grp-wrap>.atk-grp>.atk-item:hover{background:var(--at-color-bg-grey)}.atk-editor-plug-emoticons>.atk-grp-switcher{position:absolute;bottom:0;left:0;width:100%;background:var(--at-color-bg-transl);height:30px;border-top:1px solid var(--at-color-border)}.atk-editor-plug-emoticons>.atk-grp-switcher>span{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:0 10px;line-height:30px;float:left;display:block;cursor:pointer;font-size:14px}.atk-editor-plug-emoticons>.atk-grp-switcher>span:hover,.atk-editor-plug-emoticons>.atk-grp-switcher>span.active{background:var(--at-color-bg-grey)}.atk-editor-plug-preview{overflow-y:scroll;overflow-x:hidden;height:100%;width:100%;padding:10px 15px}.artalk>.atk-list{position:relative}.artalk>.atk-list>.atk-list-header{display:flex;flex-direction:row;padding:10px 10px 5px;border-bottom:1px solid var(--at-color-border)}.artalk>.atk-list>.atk-list-header .atk-comment-count{font-size:15px}.artalk>.atk-list>.atk-list-header .atk-comment-count .atk-comment-count-num{font-size:22px;margin-right:4px}.artalk>.atk-list>.atk-list-header .atk-right-action{display:flex;flex:1;flex-direction:row;align-items:center;justify-content:flex-end}.artalk>.atk-list>.atk-list-header .atk-right-action>span{font-size:14px;color:var(--at-color-meta);cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative}.artalk>.atk-list>.atk-list-header .atk-right-action>span.atk-on,.artalk>.atk-list>.atk-list-header .atk-right-action>span.atk-on *{color:var(--at-color-main)}.artalk>.atk-list>.atk-list-header .atk-right-action>span:not(:last-child):not(.atk-hide){margin-right:10px;padding-right:10px;border-right:1px solid var(--at-color-border)}.artalk>.atk-list>.atk-list-header .atk-right-action>span .atk-unread-badge{position:absolute;top:-5px;left:-6px;color:#fff;background:var(--at-color-pink);text-align:center;min-width:16px;height:16px;padding:0 3px;border-radius:8px;line-height:16px;font-size:12px}.artalk>.atk-list>.atk-list-body{min-height:150px}.artalk>.atk-list>.atk-list-footer{z-index:1;position:absolute;bottom:5px;right:0}@media only screen and (max-width: 768px){.artalk>.atk-list>.atk-list-footer{position:relative;margin-top:10px;text-align:center}}.artalk>.atk-list>.atk-list-footer .atk-copyright{display:block;font-size:12px;color:var(--at-color-meta);padding-right:15px;margin-top:5px}.artalk>.atk-list>.atk-list-footer .atk-copyright a{color:var(--at-color-main);text-decoration:none}.atk-list-no-comment{text-align:center;height:150px;line-height:150px;display:block;font-size:19px}.atk-list-read-more{border-top:1px dashed var(--at-color-border);margin-top:20px;padding-bottom:20px}@media only screen and (max-width: 768px){.atk-list-read-more{padding-bottom:10px}}.atk-list-read-more .atk-list-read-more-inner{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:0 15px;font-size:14px;border-radius:4px;border:1px solid transparent;display:flex;height:30px;flex-direction:row;place-content:center;align-items:center;width:120px;margin:-15px auto 0;background:var(--at-color-bg);border-color:var(--at-color-border)}.atk-list-read-more .atk-list-read-more-inner.atk-err>.atk-text{color:var(--at-color-red)!important}.atk-list-read-more .atk-list-read-more-inner>.atk-loading-icon{height:15px;width:15px}.atk-list-read-more .atk-list-read-more-inner>.atk-text{color:var(--at-color-meta)}.atk-list-read-more .atk-list-read-more-inner:hover>.atk-text{color:var(--at-color-main)}.atk-comment-wrap{overflow:hidden;position:relative;border-bottom:1px solid var(--at-color-border)}.atk-comment-wrap.atk-flash-once{-webkit-animation:atkFlashOnce 1s ease-in-out 0s;animation:atkFlashOnce 1s ease-in-out 0s}@-webkit-keyframes atkFlashOnce{0%{background:rgba(0,131,255,.2)}to{background:transparent}}@keyframes atkFlashOnce{0%{background:rgba(0,131,255,.2)}to{background:transparent}}.atk-comment-wrap.atk-unread:before{content:" ";position:absolute;left:0;top:10%;width:3px;height:80%;background:var(--at-color-main)}.atk-comment-wrap.atk-openable{cursor:pointer}.atk-comment-wrap.atk-openable:hover{background:var(--at-color-bg-grey)}.atk-comment-wrap.atk-openable .atk-height-limit:after{background:transparent!important}.atk-comment-wrap:last-child{border-bottom:none}.atk-comment{display:block;padding:12px 10px}.atk-comment>.atk-avatar{display:block;padding:2px 0;float:left}.atk-comment>.atk-avatar img{width:48px;height:48px;border-radius:3px}.atk-comment>.atk-main{display:block;margin-left:62px}.atk-comment>.atk-main>.atk-header{line-height:1;font-size:13px;margin-bottom:3px;overflow:hidden;position:relative;display:flex;flex-wrap:wrap;align-items:center}.atk-comment>.atk-main>.atk-header .atk-item{display:flex;margin-bottom:2px;color:var(--at-color-meta)}.atk-comment>.atk-main>.atk-header .atk-item:not(:last-child){margin-right:6px}.atk-comment>.atk-main>.atk-header .atk-item.atk-nick,.atk-comment>.atk-main>.atk-header .atk-item.atk-nick a{font-size:14px;color:var(--at-color-main);text-decoration:none}.atk-comment>.atk-main>.atk-header .atk-badge{color:var(--at-color-meta);background:var(--at-color-bg-grey);padding:0 6px;line-height:18px;border-radius:3px;color:#fff}.atk-comment>.atk-main>.atk-header .atk-badge:not(:last-child){margin-right:6px}.atk-comment>.atk-main>.atk-header .atk-ua{color:var(--at-color-meta);background:var(--at-color-bg-grey);padding:0 6px;line-height:18px;border-radius:3px}.atk-comment>.atk-main>.atk-header .atk-ua:not(:last-child){margin-right:6px}@media only screen and (max-width: 768px){.atk-comment>.atk-main>.atk-header .atk-ua-wrap{display:block}}.atk-comment>.atk-main>.atk-body{display:block;overflow:hidden;position:relative}.atk-comment>.atk-main>.atk-body img{max-width:100%}.atk-comment>.atk-main>.atk-body>.atk-content{word-break:break-all}.atk-comment>.atk-main>.atk-body>.atk-content.atk-type-collapsed{border:3px solid var(--at-color-bg-grey);border-bottom:0;padding:5px 10px;border-radius:4px 4px 0 0;margin-bottom:-5px}.atk-comment>.atk-main>.atk-body>.atk-content>*:first-child{margin-top:0}.atk-comment>.atk-main>.atk-body>.atk-content>*:last-child{margin-bottom:0}.atk-comment>.atk-main>.atk-body>.atk-content .atk-height-limit-btn{bottom:5px}.atk-comment>.atk-main>.atk-body>.atk-pending{color:var(--at-color-meta);margin:3px 0;font-size:13px;padding:10px 18px;display:block;background:var(--at-color-bg-grey);border-left:4px solid #f44336}.atk-comment>.atk-main>.atk-body>.atk-reply-to{padding:5px 15px;border-left:3px solid #eee;margin-bottom:10px;position:relative}.atk-comment>.atk-main>.atk-body>.atk-reply-to .atk-meta{font-size:15px}.atk-comment>.atk-main>.atk-body>.atk-reply-to .atk-meta .atk-nick{color:var(--at-color-main)}.atk-comment>.atk-main>.atk-body>.atk-reply-to .atk-content{margin-top:5px}.atk-comment>.atk-main>.atk-body>.atk-collapsed{margin:3px 0;font-size:13px;padding:10px 18px;display:block;background:var(--at-color-bg-grey);border-radius:4px}.atk-comment>.atk-main>.atk-body>.atk-collapsed .atk-text{color:var(--at-color-meta)}.atk-comment>.atk-main>.atk-body>.atk-collapsed .atk-show-btn{color:var(--at-color-main);cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-left:3px}.atk-comment>.atk-main>.atk-body>.atk-collapsed .atk-show-btn:hover{color:var(--at-color-main)}.atk-comment>.atk-main>.atk-footer{margin-top:12px}.atk-comment>.atk-main>.atk-footer .atk-actions{display:flex;flex-direction:row;align-items:center}.atk-comment>.atk-main>.atk-footer .atk-actions>span{color:var(--at-color-meta);font-size:13px;line-height:15px;display:inline-flex;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.atk-comment>.atk-main>.atk-footer .atk-actions>span.atk-error,.atk-comment>.atk-main>.atk-footer .atk-actions>span.atk-error:hover{color:var(--at-color-red)}.atk-comment>.atk-main>.atk-footer .atk-actions>span:not(:first-child):not(.atk-hide){margin-left:8px;padding-left:8px;border-left:1px solid var(--at-color-border)}.atk-comment>.atk-main>.atk-footer .atk-actions>span:hover{color:var(--at-color-deep)}.atk-comment .atk-height-limit:after{position:absolute;z-index:1;display:block;overflow:hidden;width:100%;content:" ";bottom:0;height:80px;background:var(--at-color-gradient)}.atk-comment .atk-height-limit-btn{z-index:10;position:absolute;left:50%;bottom:10px;transform:translate(-50%);cursor:pointer;border:1px solid var(--at-color-border);border-radius:4px;background:var(--at-color-bg);padding:1px 20px;font-size:15px;color:var(--at-color-meta);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.atk-comment .atk-height-limit .atk-height-limit .atk-height-limit-btn{display:none}.atk-comment-children>.atk-comment-wrap{margin-top:10px;border-left:1px dashed var(--at-color-border);border-bottom-color:transparent}.atk-comment-children>.atk-comment-wrap:not(:last-child){margin-bottom:5px}.atk-comment-children>.atk-comment-wrap>.atk-comment{padding-top:4px;padding-bottom:4px}.atk-comment-children>.atk-comment-wrap>.atk-comment>.atk-avatar img{width:36px;height:36px}.atk-comment-children>.atk-comment-wrap>.atk-comment>.atk-main{margin-left:47px}.atk-pagination{display:flex;flex-direction:row;justify-content:center;padding:10px 0;position:relative}.atk-pagination>.atk-btn,.atk-pagination>.atk-input{font-size:15px;height:32px;border:1px solid var(--at-color-border);border-radius:3px;padding:0 5px;text-align:center;background:var(--at-color-bg)}.atk-pagination>.atk-btn{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:70px;cursor:pointer;display:flex;justify-content:center;align-items:center}.atk-pagination>.atk-btn:hover{background:var(--at-color-bg-grey)}.atk-pagination>.atk-btn.atk-disabled{color:var(--at-color-sub)}.atk-pagination>.atk-btn.atk-disabled:hover{cursor:default;background:initial}.atk-pagination>.atk-input{background:transparent;color:var(--at-color-font);font-size:18px;width:60px;outline:none}.atk-pagination>.atk-input:focus{border-color:var(--at-color-main)}.atk-pagination>*:not(:last-child){margin-right:10px}.atk-sidebar{position:fixed;z-index:99999;top:0;right:0;width:430px;height:100%;background:var(--at-color-bg);transition:transform .45s cubic-bezier(.23,1,.32,1) 0ms;transform:translate(430px)}@media only screen and (max-width: 430px){.atk-sidebar{width:100%}}.atk-sidebar .atk-sidebar-inner{position:relative}.atk-sidebar .atk-sidebar-header{display:flex;flex-direction:row;align-items:center;border-bottom:1px solid var(--at-color-border)}.atk-sidebar .atk-sidebar-header .atk-avatar{display:flex;width:65px;height:60px;align-items:center;justify-content:center}.atk-sidebar .atk-sidebar-header .atk-avatar img,.atk-sidebar .atk-sidebar-header .atk-avatar .atk-site-logo{height:30px;width:30px;border-radius:2px;background:var(--at-color-meta);text-align:center;line-height:30px;font-size:13px;color:var(--at-color-bg)}.atk-sidebar .atk-sidebar-header .atk-avatar .atk-site-logo{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.atk-sidebar .atk-sidebar-header .atk-menu{flex:auto;text-align:center}.atk-sidebar .atk-sidebar-header .atk-menu .atk-item{position:relative;color:var(--at-color-sub);font-size:20px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.atk-sidebar .atk-sidebar-header .atk-menu .atk-item:not(:last-child){margin-right:20px}.atk-sidebar .atk-sidebar-header .atk-menu .atk-item.atk-active{color:var(--at-color-font)}.atk-sidebar .atk-sidebar-header .atk-menu .atk-item.atk-active:after{content:" ";position:absolute;bottom:0;left:0;width:100%;height:6px;background:var(--at-color-main);opacity:.4}.atk-sidebar .atk-sidebar-header .atk-sidebar-close{display:flex;flex-direction:column;width:60px;height:60px;align-items:center;place-content:center;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-left:10px}.atk-sidebar .atk-sidebar-header .atk-sidebar-close:hover .atk-icon-close{background-color:#e81123e6}.atk-sidebar .atk-sidebar-nav{display:flex;flex-direction:row;border-bottom:1px solid var(--at-color-border);height:41px}.atk-sidebar .atk-sidebar-nav .akt-curt-view-btn{display:flex;align-items:center;padding:0 20px;border-right:1px solid var(--at-color-border);cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;height:40px;line-height:40px;white-space:nowrap}.atk-sidebar .atk-sidebar-nav .akt-curt-view-btn:hover{background:var(--at-color-bg-grey)}.atk-sidebar .atk-sidebar-nav .akt-curt-view-btn .atk-icon{width:17px}.atk-sidebar .atk-sidebar-nav .akt-curt-view-btn .atk-icon span{position:relative;display:block;width:14px;height:1px;margin:0 auto 4px;background:var(--at-color-deep);transform-origin:20px}.atk-sidebar .atk-sidebar-nav .akt-curt-view-btn .atk-icon span:last-child{margin-bottom:0}.atk-sidebar .atk-sidebar-nav .akt-curt-view-btn .atk-icon.atk-arrow span{width:8px;opacity:1;transform:rotate(-45deg);transform-origin:7px}.atk-sidebar .atk-sidebar-nav .akt-curt-view-btn .atk-icon.atk-arrow span:nth-child(2){transform:rotate(0);width:0;opacity:0}.atk-sidebar .atk-sidebar-nav .akt-curt-view-btn .atk-icon.atk-arrow span:nth-child(3){opacity:1;transform:rotate(45deg)}.atk-sidebar .atk-sidebar-nav .akt-curt-view-btn .atk-text{margin-left:10px}.atk-sidebar .atk-sidebar-nav .atk-tabs{display:flex;flex-direction:row;overflow-y:auto}.atk-sidebar .atk-sidebar-nav .atk-tabs::-webkit-scrollbar{width:0;height:0;background:transparent}.atk-sidebar .atk-sidebar-nav .atk-tabs .atk-tab-item{line-height:40px;height:40px;color:var(--at-color-sub);cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:0 20px;white-space:nowrap}.atk-sidebar .atk-sidebar-nav .atk-tabs .atk-tab-item:hover{background:var(--at-color-bg-grey)}.atk-sidebar .atk-sidebar-nav .atk-tabs .atk-tab-item.atk-active{color:var(--at-color-deep)}.atk-sidebar .atk-site-list-floater{position:absolute;z-index:9999;left:50%;top:70px;transform:translate(-50%);pointer-events:all;background:var(--at-color-bg);width:80%;max-height:40%;margin:0 auto;border:1px solid var(--at-color-border);border-radius:4px;overflow-y:auto}.atk-sidebar .atk-site-list-floater::-webkit-scrollbar{width:4px;height:4px;background:transparent}.atk-sidebar .atk-site-list-floater::-webkit-scrollbar-thumb,.atk-sidebar .atk-site-list-floater::-webkit-scrollbar-thumb:window-inactive{background:rgba(86,86,86,.3)}.atk-sidebar .atk-site-list-floater::-webkit-scrollbar-thumb:vertical:hover{background:rgba(65,74,82,.77)}.atk-sidebar .atk-site-list-floater::-webkit-scrollbar-thumb:vertical:active{background:rgba(41,47,53,.77)}.atk-sidebar .atk-site-list-floater .atk-sites{display:flex;flex-direction:column;padding:7px 0}.atk-sidebar .atk-site-list-floater .atk-sites .atk-site-item{display:flex;flex-direction:row;cursor:pointer;align-items:center;padding:0 10px;margin-bottom:1px}.atk-sidebar .atk-site-list-floater .atk-sites .atk-site-item .atk-site-logo{width:20px;height:20px;line-height:20px;background:var(--at-color-meta);margin:10px;border-radius:3px;text-align:center;color:var(--at-color-bg);font-size:12px}.atk-sidebar .atk-site-list-floater .atk-sites .atk-site-item .atk-site-name{color:var(--at-color-font);font-size:17px;margin-left:7px}.atk-sidebar .atk-site-list-floater .atk-sites .atk-site-item.atk-active,.atk-sidebar .atk-site-list-floater .atk-sites .atk-site-item:hover{background:var(--at-color-bg-grey)}.atk-sidebar .atk-sidebar-view-wrap{position:relative;overflow-y:auto;height:calc(100vh - 102px)}.atk-sidebar .atk-sidebar-view-wrap::-webkit-scrollbar{width:4px;height:4px;background:transparent}.atk-sidebar .atk-sidebar-view-wrap::-webkit-scrollbar-thumb,.atk-sidebar .atk-sidebar-view-wrap::-webkit-scrollbar-thumb:window-inactive{background:rgba(86,86,86,.3)}.atk-sidebar .atk-sidebar-view-wrap::-webkit-scrollbar-thumb:vertical:hover{background:rgba(65,74,82,.77)}.atk-sidebar .atk-sidebar-view-wrap::-webkit-scrollbar-thumb:vertical:active{background:rgba(41,47,53,.77)}.atk-sidebar .atk-sidebar-view-wrap .atk-sidebar-no-content{position:absolute;left:0;right:0;top:0;font-size:35px;color:var(--at-color-meta);pointer-events:none;height:100%;display:flex;justify-content:center;align-items:center}.atk-sidebar .atk-form{padding:20px 30px}.atk-sidebar .atk-form .atk-label{font-size:16px;margin-bottom:12px;color:var(--at-color-font)}.atk-sidebar .atk-form .atk-desc{font-size:14px;margin-top:12px;margin-left:15px;margin-bottom:20px;display:block;color:var(--at-color-meta)}.atk-sidebar .atk-form .atk-desc a{opacity:.8}.atk-sidebar .atk-form input,.atk-sidebar .atk-form textarea{display:block;line-height:35px;padding:0 10px;margin:0 0 25px;border:none;border-bottom:2px solid var(--at-color-border);outline:none;width:100%;background:var(--at-color-bg)}.atk-sidebar .atk-form input:focus,.atk-sidebar .atk-form textarea:focus{border-bottom-color:var(--at-color-bg-light)}.atk-sidebar .atk-form input[type=file],.atk-sidebar .atk-form textarea[type=file]{border-radius:2px;background:transparent;border-bottom:2px solid var(--at-color-border);cursor:pointer;position:relative;padding:0 15px;margin-bottom:30px}.atk-sidebar .atk-form textarea{font-size:13px;line-height:20px;min-height:80px;resize:vertical}.atk-sidebar .atk-form select{display:block;outline:none;height:35px;padding:5px 10px;width:100%;border:none;border-bottom:2px solid var(--at-color-border);margin-bottom:25px;-webkit-appearance:none;border-radius:0;background:var(--at-color-bg)}.atk-sidebar .atk-form button{text-align:center;color:var(--at-color-light);background:transparent;border:2px solid var(--at-color-bg-light);line-height:35px;letter-spacing:2em;text-indent:2em;cursor:pointer;outline:none;padding:0 20px;border-radius:4px;margin:0 5px;width:100%}.atk-sidebar .atk-form button:hover{background:var(--at-color-bg-light)}.atk-sidebar .atk-form input,.atk-sidebar .atk-form select,.atk-sidebar .atk-form button{font-size:15px}.atk-sidebar .atk-log-wrap .atk-log-back-btn{display:inline-block;padding:5px 33px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-right:1px solid var(--at-color-border);border-left:1px solid transparent}.atk-sidebar .atk-log-wrap .atk-log-back-btn:hover{background:#f4f4f4}.atk-sidebar .atk-log-wrap .atk-iframe{width:100%;height:calc(100vh - 150px);border:0;background:#f4f4f4;border:3px solid #eee}.atk-view-name-pages,.atk-view-name-comments{padding-bottom:55px}.atk-view-name-pages .atk-pagination-wrap,.atk-view-name-comments .atk-pagination-wrap{z-index:200;position:fixed;width:100%;bottom:0;left:0;background:var(--at-color-bg);border-top:1px solid var(--at-color-border)}.atk-view-name-pages .atk-list-read-more,.atk-view-name-comments .atk-list-read-more{margin-top:30px;margin-bottom:-40px}.atk-page-list .atk-page-item{display:flex;flex-direction:row;position:relative;min-height:120px;align-items:center}.atk-page-list .atk-page-item:not(:last-child){border-bottom:1px solid var(--at-color-border)}.atk-page-list .atk-page-main{display:flex;flex-direction:column;flex:auto;padding:20px 30px}.atk-page-list .atk-page-main .atk-title{color:var(--at-color-font);font-size:21px;margin-bottom:10px}.atk-page-list .atk-page-main .atk-sub{color:var(--at-color-sub);font-size:14px}.atk-page-list .atk-page-main-actions{display:flex;flex-direction:column;flex:auto;padding:10px 35px 0;flex-wrap:wrap;align-content:flex-start}.atk-page-list .atk-page-main-actions .atk-item{position:relative;font-size:17px;max-width:5em;display:inline-flex;margin-right:15px;margin-bottom:6px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.atk-page-list .atk-page-main-actions .atk-item.atk-green:after{position:absolute;content:" ";height:5px;width:100%;left:0;bottom:5px;background:rgba(50,199,134,.39)}.atk-page-list .atk-page-main-actions .atk-item.atk-yellow:after{position:absolute;content:" ";height:5px;width:100%;left:0;bottom:5px;background:rgba(255,203,0,.39)}.atk-page-list .atk-page-actions{display:flex;flex-direction:row;align-items:center;padding:0 20px}.atk-page-list .atk-page-actions .atk-item{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;width:35px;height:35px;border-radius:2px;align-items:center;justify-content:center}.atk-page-list .atk-page-actions .atk-item:hover{background:var(--at-color-bg-grey)}.atk-page-list .atk-page-actions .atk-item:not(:last-child){margin-right:15px}.atk-page-list .atk-page-actions .atk-item.atk-item-close{margin-left:10px}.atk-page-list .atk-page-actions .atk-icon{background-color:var(--at-color-meta)}.atk-page-list .atk-page-actions .atk-icon-yes{background-color:var(--at-color-main)}.atk-page-list .atk-page-edit-layer{z-index:999;background:var(--at-color-bg);position:absolute;width:100%;height:100%;display:flex;flex-direction:row;align-items:center}.atk-item-text-editor-layer{z-index:999;background:var(--at-color-bg);position:absolute;left:0;top:0;width:100%;height:100%;display:flex;flex-direction:row;align-items:center}.atk-item-text-editor-layer .atk-edit-form{flex:auto;padding-left:20px}.atk-item-text-editor-layer .atk-edit-form input{font-size:17px;width:100%;padding:3px 5px;border:0;border-bottom:1px solid var(--at-color-border);outline:none;background:transparent}.atk-item-text-editor-layer .atk-actions{display:flex;flex-direction:row;align-items:center;padding:0 20px}.atk-item-text-editor-layer .atk-actions .atk-item{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;width:35px;height:35px;border-radius:2px;align-items:center;justify-content:center}.atk-item-text-editor-layer .atk-actions .atk-item:hover{background:var(--at-color-bg-grey)}.atk-item-text-editor-layer .atk-actions .atk-item:not(:last-child){margin-right:15px}.atk-item-text-editor-layer .atk-actions .atk-item.atk-item-close{margin-left:10px}.atk-item-text-editor-layer .atk-actions .atk-icon{background-color:var(--at-color-meta)}.atk-item-text-editor-layer .atk-actions .atk-icon-yes{background-color:var(--at-color-main)}.atk-site-list>.atk-header{display:flex;flex-direction:row;padding:15px 30px;align-items:center}.atk-site-list>.atk-header .atk-title{flex:auto;padding-right:10px}.atk-site-list>.atk-header .atk-actions{display:flex;flex-direction:row}.atk-site-list>.atk-header .atk-actions .atk-item{display:flex;height:30px;width:30px;justify-content:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;border-radius:2px}.atk-site-list>.atk-header .atk-actions .atk-item:hover{background:var(--at-color-bg-grey)}.atk-site-list .atk-site-rows-wrap{position:relative}.atk-site-list .atk-site-rows-wrap .atk-site-row{display:flex;flex-direction:row;padding:10px 20px 0}.atk-site-list .atk-site-rows-wrap .atk-site-item{display:flex;flex-basis:25%;flex-direction:column;align-items:center;padding-bottom:5px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;border:1px solid transparent}.atk-site-list .atk-site-rows-wrap .atk-site-item .atk-site-logo{margin:15px;text-align:center;font-size:20px;height:65px;width:65px;line-height:65px;background:#687a86;color:#fff;border-radius:4px}.atk-site-list .atk-site-rows-wrap .atk-site-item .atk-site-name{text-align:center;font-size:15px;color:var(--at-color-sub);padding:0 17px;word-break:break-word}.atk-site-list .atk-site-rows-wrap .atk-site-item.atk-active{background-color:var(--at-color-bg-grey);border:1px solid var(--at-color-border);margin-top:-1px;border-radius:0 0 4px 4px}.atk-site-list .atk-site-rows-wrap .atk-site-item.atk-active .atk-site-name{color:var(--at-color-deep)}.atk-site-list .atk-site-rows-wrap .atk-site-item:hover .atk-site-name{color:var(--at-color-font)}.atk-site-list .atk-site-edit,.atk-site-list .atk-site-add{position:relative;min-height:120px;width:100%;border-top:1px solid var(--at-color-border);border-bottom:1px solid var(--at-color-border);margin-bottom:-10px}.atk-site-list .atk-site-edit .atk-header,.atk-site-list .atk-site-add .atk-header{display:flex;flex-direction:row;align-items:center;padding:10px 30px 0 35px;justify-content:space-between}.atk-site-list .atk-site-edit .atk-header .atk-site-info .atk-site-name,.atk-site-list .atk-site-add .atk-header .atk-site-info .atk-site-name{cursor:pointer;display:inline-block;font-size:23px;position:relative}.atk-site-list .atk-site-edit .atk-header .atk-site-info .atk-site-name:after,.atk-site-list .atk-site-add .atk-header .atk-site-info .atk-site-name:after{content:" ";position:absolute;width:100%;height:6px;background:var(--at-color-main);opacity:.4;left:0;bottom:6px}.atk-site-list .atk-site-edit .atk-header .atk-site-info .atk-site-urls,.atk-site-list .atk-site-add .atk-header .atk-site-info .atk-site-urls{display:flex;width:100%;margin-top:6px;flex-wrap:wrap;min-height:23px}.atk-site-list .atk-site-edit .atk-header .atk-site-info .atk-site-urls .atk-url-item,.atk-site-list .atk-site-add .atk-header .atk-site-info .atk-site-urls .atk-url-item{background:var(--at-color-bg-grey);color:var(--at-color-font);border-radius:2px;padding:0 8px;font-size:13px;margin-bottom:3px;margin-right:3px;cursor:pointer}.atk-site-list .atk-site-edit .atk-header .atk-close-btn,.atk-site-list .atk-site-add .atk-header .atk-close-btn{width:50px;height:50px;display:flex;justify-content:center;align-items:center;cursor:pointer}.atk-site-list .atk-site-edit .atk-header .atk-close-btn:hover i,.atk-site-list .atk-site-add .atk-header .atk-close-btn:hover i{background-color:var(--at-color-red)}.atk-site-list .atk-site-edit .atk-main,.atk-site-list .atk-site-add .atk-main{position:relative;display:flex;flex-direction:row;padding:20px 30px 10px 35px}.atk-site-list .atk-site-edit .atk-main .atk-site-text-actions,.atk-site-list .atk-site-add .atk-main .atk-site-text-actions{display:flex;flex-direction:column;flex:auto;flex-wrap:wrap;align-content:flex-start;height:90px;padding:0 0 0 10px}.atk-site-list .atk-site-edit .atk-main .atk-site-text-actions .atk-item,.atk-site-list .atk-site-add .atk-main .atk-site-text-actions .atk-item{position:relative;font-size:17px;max-width:5em;display:inline-flex;margin-right:15px;margin-bottom:6px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.atk-site-list .atk-site-edit .atk-main .atk-site-text-actions .atk-item.atk-green:after,.atk-site-list .atk-site-add .atk-main .atk-site-text-actions .atk-item.atk-green:after{position:absolute;content:" ";height:5px;width:100%;left:0;bottom:5px;background:rgba(50,199,134,.39)}.atk-site-list .atk-site-edit .atk-main .atk-site-text-actions .atk-item.atk-yellow:after,.atk-site-list .atk-site-add .atk-main .atk-site-text-actions .atk-item.atk-yellow:after{position:absolute;content:" ";height:5px;width:100%;left:0;bottom:5px;background:rgba(255,203,0,.39)}.atk-site-list .atk-site-edit .atk-main .atk-site-text-actions .atk-item,.atk-site-list .atk-site-add .atk-main .atk-site-text-actions .atk-item{margin-bottom:17px;margin-right:25px}.atk-site-list .atk-site-edit .atk-main .atk-site-btn-actions,.atk-site-list .atk-site-add .atk-main .atk-site-btn-actions{display:flex;flex-direction:row;align-items:center;padding:0 9px 0 20px}.atk-site-list .atk-site-edit .atk-main .atk-site-btn-actions .atk-item,.atk-site-list .atk-site-add .atk-main .atk-site-btn-actions .atk-item{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;width:35px;height:35px;border-radius:2px;align-items:center;justify-content:center}.atk-site-list .atk-site-edit .atk-main .atk-site-btn-actions .atk-item:hover,.atk-site-list .atk-site-add .atk-main .atk-site-btn-actions .atk-item:hover{background:var(--at-color-bg-grey)}.atk-site-list .atk-site-edit .atk-main .atk-site-btn-actions .atk-item:not(:last-child),.atk-site-list .atk-site-add .atk-main .atk-site-btn-actions .atk-item:not(:last-child){margin-right:15px}.atk-site-list .atk-site-edit .atk-main .atk-site-btn-actions .atk-item.atk-item-close,.atk-site-list .atk-site-add .atk-main .atk-site-btn-actions .atk-item.atk-item-close{margin-left:10px}.atk-site-list .atk-site-edit .atk-main .atk-site-btn-actions .atk-icon,.atk-site-list .atk-site-add .atk-main .atk-site-btn-actions .atk-icon{background-color:var(--at-color-meta)}.atk-site-list .atk-site-edit .atk-main .atk-site-btn-actions .atk-icon-yes,.atk-site-list .atk-site-add .atk-main .atk-site-btn-actions .atk-icon-yes{background-color:var(--at-color-main)}.atk-site-list .atk-site-edit .atk-main .atk-item-text-editor-layer,.atk-site-list .atk-site-add .atk-main .atk-item-text-editor-layer{padding:10px 20px}.atk-site-list .atk-site-add{position:relative}.atk-site-list .atk-site-add .atk-header .atk-title{font-size:20px}.atk-site-list .atk-site-add .atk-form{padding:20px 40px} diff --git a/assets/lib/artalk/Artalk.min.js b/assets/lib/artalk/Artalk.min.js new file mode 100644 index 00000000..49551652 --- /dev/null +++ b/assets/lib/artalk/Artalk.min.js @@ -0,0 +1,7 @@ +/** + * Skipped minification because the original files appears to be already minified. + * Original file: /npm/artalk@2.1.4/dist/Artalk.js + * + * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files + */ +var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(t,e,i)=>e in t?__defProp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,__spreadValues=(t,e)=>{for(var i in e||(e={}))__hasOwnProp.call(e,i)&&__defNormalProp(t,i,e[i]);if(__getOwnPropSymbols)for(var i of __getOwnPropSymbols(e))__propIsEnum.call(e,i)&&__defNormalProp(t,i,e[i]);return t},__spreadProps=(t,e)=>__defProps(t,__getOwnPropDescs(e)),__publicField=(t,e,i)=>(__defNormalProp(t,"symbol"!=typeof e?e+"":e,i),i),__async=(t,e,i)=>new Promise(((s,n)=>{var r=t=>{try{l(i.next(t))}catch(e){n(e)}},a=t=>{try{l(i.throw(t))}catch(e){n(e)}},l=t=>t.done?s(t.value):Promise.resolve(t.value).then(r,a);l((i=i.apply(t,e)).next())}));!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Artalk=e()}(this,(function(){"use strict";class t{constructor(t){__publicField(this,"data");const e=JSON.parse(window.localStorage.getItem("ArtalkUser")||"{}");this.data={nick:e.nick||"",email:e.email||"",link:e.link||"",token:e.token||"",isAdmin:e.isAdmin||!1}}save(){window.localStorage.setItem("ArtalkUser",JSON.stringify(this.data))}checkHasBasicUserInfo(){return!!this.data.nick&&!!this.data.email}}class e{constructor(e,i){__publicField(this,"cid"),__publicField(this,"$root"),__publicField(this,"conf"),__publicField(this,"user"),__publicField(this,"eventList",[]),this.cid=+new Date,this.$root=e,this.conf=i,this.user=new t(this.conf),this.$root.setAttribute("atk-run-id",this.cid.toString())}on(t,e,i="internal"){this.eventList.push({name:t,handler:e,scope:i})}off(t,e,i="internal"){this.eventList=this.eventList.filter((s=>e?!(s.name===t&&s.handler===e&&s.scope===i):!(s.name===t&&s.scope===i)))}trigger(t,e,i){this.eventList.filter((e=>e.name===t&&(!i||e.scope===i))).map((t=>t.handler)).forEach((t=>t(e)))}}class i{constructor(t){__publicField(this,"$el"),__publicField(this,"ctx"),__publicField(this,"conf"),this.ctx=t,this.conf=t.conf}}function s(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let n={baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const r=/[&<>"']/,a=/[&<>"']/g,l=/[<>"']|&(?!#?\w+;)/,o=/[<>"']|&(?!#?\w+;)/g,c={"&":"&","<":"<",">":">",'"':""","'":"'"},h=t=>c[t];function d(t,e){if(e){if(r.test(t))return t.replace(a,h)}else if(l.test(t))return t.replace(o,h);return t}const u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function p(t){return t.replace(u,((t,e)=>"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""))}const m=/(^|[^\[])\^/g;function g(t,e){t=t.source||t,e=e||"";const i={replace:(e,s)=>(s=(s=s.source||s).replace(m,"$1"),t=t.replace(e,s),i),getRegex:()=>new RegExp(t,e)};return i}const f=/[^\w:]/g,k=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function b(t,e,i){if(t){let t;try{t=decodeURIComponent(p(i)).replace(f,"").toLowerCase()}catch(s){return null}if(0===t.indexOf("javascript:")||0===t.indexOf("vbscript:")||0===t.indexOf("data:"))return null}e&&!k.test(i)&&(i=function(t,e){y[" "+t]||($.test(t)?y[" "+t]=t+"/":y[" "+t]=T(t,"/",!0));const i=-1===(t=y[" "+t]).indexOf(":");return"//"===e.substring(0,2)?i?e:t.replace(v,"$1")+e:"/"===e.charAt(0)?i?e:t.replace(x,"$1")+e:t+e}(e,i));try{i=encodeURI(i).replace(/%25/g,"%")}catch(s){return null}return i}const y={},$=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,x=/^([^:]+:\/*[^/]*)[\s\S]*$/;const _={exec:function(){}};function w(t){let e,i,s=1;for(;s{let s=!1,n=e;for(;--n>=0&&"\\"===i[n];)s=!s;return s?"|":" |"})).split(/ \|/);let s=0;if(i[0].trim()||i.shift(),i[i.length-1].trim()||i.pop(),i.length>e)i.splice(e);else for(;i.length1;)1&e&&(i+=t),e>>=1,t+=t;return i+t}function C(t,e,i,s){const n=e.href,r=e.title?d(e.title):null,a=t[1].replace(/\\([\[\]])/g,"$1");if("!"!==t[0].charAt(0)){s.state.inLink=!0;const t={type:"link",raw:i,href:n,title:r,text:a,tokens:s.inlineTokens(a,[])};return s.state.inLink=!1,t}return{type:"image",raw:i,href:n,title:r,text:d(a)}}class E{constructor(t){this.options=t||n}space(t){const e=this.rules.block.newline.exec(t);if(e)return e[0].length>1?{type:"space",raw:e[0]}:{raw:"\n"}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:T(t,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],i=function(t,e){const i=t.match(/^(\s+)(?:```)/);if(null===i)return e;const s=i[1];return e.split("\n").map((t=>{const e=t.match(/^\s+/);if(null===e)return t;const[i]=e;return i.length>=s.length?t.slice(s.length):t})).join("\n")}(t,e[3]||"");return{type:"code",raw:t,lang:e[2]?e[2].trim():e[2],text:i}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(/#$/.test(t)){const e=T(t,"#");this.options.pedantic?t=e.trim():e&&!/ $/.test(e)||(t=e.trim())}const i={type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:[]};return this.lexer.inline(i.text,i.tokens),i}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:e[0]}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){const t=e[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:e[0],tokens:this.lexer.blockTokens(t,[]),text:t}}}list(t){let e=this.rules.block.list.exec(t);if(e){let i,s,n,r,a,l,o,c,h,d,u=e[1].trim();const p=u.length>1,m={type:"list",raw:"",ordered:p,start:p?+u.slice(0,-1):"",loose:!1,items:[]};u=p?`\\d{1,9}\\${u.slice(-1)}`:`\\${u}`,this.options.pedantic&&(u=p?u:"[*+-]");const g=new RegExp(`^( {0,3}${u})((?: [^\\n]*| *)(?:\\n[^\\n]*)*(?:\\n|$))`);for(;t&&!this.rules.block.hr.test(t)&&(e=g.exec(t));){h=e[2].split("\n"),this.options.pedantic?(r=2,d=h[0].trimLeft()):(r=e[2].search(/[^ ]/),r=e[1].length+(r>4?1:r),d=h[0].slice(r-e[1].length)),l=!1,i=e[0],!h[0]&&/^ *$/.test(h[1])&&(i=e[1]+h.slice(0,2).join("\n")+"\n",m.loose=!0,h=[]);const u=new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(a=1;a=r)&&c.trim()){i=e[1]+h.slice(0,a).join("\n")+"\n";break}d+="\n"+c.slice(r)}else c.trim()||(l=!0),c.search(/[^ ]/)>=r?d+="\n"+c.slice(r):d+="\n"+c}m.loose||(o?m.loose=!0:/\n *\n *$/.test(i)&&(o=!0)),this.options.gfm&&(s=/^\[[ xX]\] /.exec(d),s&&(n="[ ] "!==s[0],d=d.replace(/^\[[ xX]\] +/,""))),m.items.push({type:"list_item",raw:i,task:!!s,checked:n,loose:!1,text:d}),m.raw+=i,t=t.slice(i.length)}m.items[m.items.length-1].raw=i.trimRight(),m.items[m.items.length-1].text=d.trimRight(),m.raw=m.raw.trimRight();const f=m.items.length;for(a=0;a"space"===t.type))&&(m.loose=!0,m.items[a].loose=!0);return m}}html(t){const e=this.rules.block.html.exec(t);if(e){const t={type:"html",raw:e[0],pre:!this.options.sanitizer&&("pre"===e[1]||"script"===e[1]||"style"===e[1]),text:e[0]};return this.options.sanitize&&(t.type="paragraph",t.text=this.options.sanitizer?this.options.sanitizer(e[0]):d(e[0]),t.tokens=[],this.lexer.inline(t.text,t.tokens)),t}}def(t){const e=this.rules.block.def.exec(t);if(e){e[3]&&(e[3]=e[3].substring(1,e[3].length-1));return{type:"def",tag:e[1].toLowerCase().replace(/\s+/g," "),raw:e[0],href:e[2],title:e[3]}}}table(t){const e=this.rules.block.table.exec(t);if(e){const t={type:"table",header:S(e[1]).map((t=>({text:t}))),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:e[3]?e[3].replace(/\n$/,"").split("\n"):[]};if(t.header.length===t.align.length){t.raw=e[0];let i,s,n,r,a=t.align.length;for(i=0;i({text:t})));for(a=t.header.length,s=0;s/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):d(e[0]):e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&/^$/.test(t))return;const e=T(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{const t=function(t,e){if(-1===t.indexOf(e[1]))return-1;const i=t.length;let s=0,n=0;for(;n-1){const i=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,i).trim(),e[3]=""}}let i=e[2],s="";if(this.options.pedantic){const t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);t&&(i=t[1],s=t[3])}else s=e[3]?e[3].slice(1,-1):"";return i=i.trim(),/^$/.test(t)?i.slice(1):i.slice(1,-1)),C(e,{href:i?i.replace(this.rules.inline._escapes,"$1"):i,title:s?s.replace(this.rules.inline._escapes,"$1"):s},e[0],this.lexer)}}reflink(t,e){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let t=(i[2]||i[1]).replace(/\s+/g," ");if(t=e[t.toLowerCase()],!t||!t.href){const t=i[0].charAt(0);return{type:"text",raw:t,text:t}}return C(i,t,i[0],this.lexer)}}emStrong(t,e,i=""){let s=this.rules.inline.emStrong.lDelim.exec(t);if(!s)return;if(s[3]&&i.match(/[\p{L}\p{N}]/u))return;const n=s[1]||s[2]||"";if(!n||n&&(""===i||this.rules.inline.punctuation.exec(i))){const i=s[0].length-1;let n,r,a=i,l=0;const o="*"===s[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(o.lastIndex=0,e=e.slice(-1*t.length+i);null!=(s=o.exec(e));){if(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n)continue;if(r=n.length,s[3]||s[4]){a+=r;continue}if((s[5]||s[6])&&i%3&&!((i+r)%3)){l+=r;continue}if(a-=r,a>0)continue;if(r=Math.min(r,r+a+l),Math.min(i,r)%2){const e=t.slice(1,i+s.index+r);return{type:"em",raw:t.slice(0,i+s.index+r+1),text:e,tokens:this.lexer.inlineTokens(e,[])}}const e=t.slice(2,i+s.index+r-1);return{type:"strong",raw:t.slice(0,i+s.index+r+1),text:e,tokens:this.lexer.inlineTokens(e,[])}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(/\n/g," ");const i=/[^ ]/.test(t),s=/^ /.test(t)&&/ $/.test(t);return i&&s&&(t=t.substring(1,t.length-1)),t=d(t,!0),{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2],[])}}autolink(t,e){const i=this.rules.inline.autolink.exec(t);if(i){let t,s;return"@"===i[2]?(t=d(this.options.mangle?e(i[1]):i[1]),s="mailto:"+t):(t=d(i[1]),s=t),{type:"link",raw:i[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}url(t,e){let i;if(i=this.rules.inline.url.exec(t)){let t,s;if("@"===i[2])t=d(this.options.mangle?e(i[0]):i[0]),s="mailto:"+t;else{let e;do{e=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0]}while(e!==i[0]);t=d(i[0]),s="www."===i[1]?"http://"+t:t}return{type:"link",raw:i[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t,e){const i=this.rules.inline.text.exec(t);if(i){let t;return t=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):d(i[0]):i[0]:d(this.options.smartypants?e(i[0]):i[0]),{type:"text",raw:i[0],text:t}}}}const F={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:_,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};F.def=g(F.def).replace("label",F._label).replace("title",F._title).getRegex(),F.bullet=/(?:[*+-]|\d{1,9}[.)])/,F.listItemStart=g(/^( *)(bull) */).replace("bull",F.bullet).getRegex(),F.list=g(F.list).replace(/bull/g,F.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+F.def.source+")").getRegex(),F._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",F._comment=/|$)/,F.html=g(F.html,"i").replace("comment",F._comment).replace("tag",F._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),F.paragraph=g(F._paragraph).replace("hr",F.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",F._tag).getRegex(),F.blockquote=g(F.blockquote).replace("paragraph",F.paragraph).getRegex(),F.normal=w({},F),F.gfm=w({},F.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),F.gfm.table=g(F.gfm.table).replace("hr",F.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",F._tag).getRegex(),F.pedantic=w({},F.normal,{html:g("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",F._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_,paragraph:g(F.normal._paragraph).replace("hr",F.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",F.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const O={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:_,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:_,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(i="x"+i.toString(16)),s+="&#"+i+";";return s}O._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",O.punctuation=g(O.punctuation).replace(/punctuation/g,O._punctuation).getRegex(),O.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,O.escapedEmSt=/\\\*|\\_/g,O._comment=g(F._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),O.emStrong.lDelim=g(O.emStrong.lDelim).replace(/punct/g,O._punctuation).getRegex(),O.emStrong.rDelimAst=g(O.emStrong.rDelimAst,"g").replace(/punct/g,O._punctuation).getRegex(),O.emStrong.rDelimUnd=g(O.emStrong.rDelimUnd,"g").replace(/punct/g,O._punctuation).getRegex(),O._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,O._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,O._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,O.autolink=g(O.autolink).replace("scheme",O._scheme).replace("email",O._email).getRegex(),O._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,O.tag=g(O.tag).replace("comment",O._comment).replace("attribute",O._attribute).getRegex(),O._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,O._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,O._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,O.link=g(O.link).replace("label",O._label).replace("href",O._href).replace("title",O._title).getRegex(),O.reflink=g(O.reflink).replace("label",O._label).getRegex(),O.reflinkSearch=g(O.reflinkSearch,"g").replace("reflink",O.reflink).replace("nolink",O.nolink).getRegex(),O.normal=w({},O),O.pedantic=w({},O.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:g(/^!?\[(label)\]\((.*?)\)/).replace("label",O._label).getRegex(),reflink:g(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",O._label).getRegex()}),O.gfm=w({},O.normal,{escape:g(O.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\!!(i=s.call({lexer:this},t,e))&&(t=t.substring(i.raw.length),e.push(i),!0)))))if(i=this.tokenizer.space(t))t=t.substring(i.raw.length),i.type&&e.push(i);else if(i=this.tokenizer.code(t))t=t.substring(i.raw.length),s=e[e.length-1],!s||"paragraph"!==s.type&&"text"!==s.type?e.push(i):(s.raw+="\n"+i.raw,s.text+="\n"+i.text,this.inlineQueue[this.inlineQueue.length-1].src=s.text);else if(i=this.tokenizer.fences(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.heading(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.hr(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.blockquote(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.list(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.html(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.def(t))t=t.substring(i.raw.length),s=e[e.length-1],!s||"paragraph"!==s.type&&"text"!==s.type?this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title}):(s.raw+="\n"+i.raw,s.text+="\n"+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=s.text);else if(i=this.tokenizer.table(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.lheading(t))t=t.substring(i.raw.length),e.push(i);else{if(n=t,this.options.extensions&&this.options.extensions.startBlock){let e=1/0;const i=t.slice(1);let s;this.options.extensions.startBlock.forEach((function(t){s=t.call({lexer:this},i),"number"==typeof s&&s>=0&&(e=Math.min(e,s))})),e<1/0&&e>=0&&(n=t.substring(0,e+1))}if(this.state.top&&(i=this.tokenizer.paragraph(n)))s=e[e.length-1],r&&"paragraph"===s.type?(s.raw+="\n"+i.raw,s.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):e.push(i),r=n.length!==t.length,t=t.substring(i.raw.length);else if(i=this.tokenizer.text(t))t=t.substring(i.raw.length),s=e[e.length-1],s&&"text"===s.type?(s.raw+="\n"+i.raw,s.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):e.push(i);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e){this.inlineQueue.push({src:t,tokens:e})}inlineTokens(t,e=[]){let i,s,n,r,a,l,o=t;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(o));)t.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,r.index)+"["+A("a",r[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(o));)o=o.slice(0,r.index)+"["+A("a",r[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.escapedEmSt.exec(o));)o=o.slice(0,r.index)+"++"+o.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;t;)if(a||(l=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((s=>!!(i=s.call({lexer:this},t,e))&&(t=t.substring(i.raw.length),e.push(i),!0)))))if(i=this.tokenizer.escape(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.tag(t))t=t.substring(i.raw.length),s=e[e.length-1],s&&"text"===i.type&&"text"===s.type?(s.raw+=i.raw,s.text+=i.text):e.push(i);else if(i=this.tokenizer.link(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(i.raw.length),s=e[e.length-1],s&&"text"===i.type&&"text"===s.type?(s.raw+=i.raw,s.text+=i.text):e.push(i);else if(i=this.tokenizer.emStrong(t,o,l))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.codespan(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.br(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.del(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.autolink(t,q))t=t.substring(i.raw.length),e.push(i);else if(this.state.inLink||!(i=this.tokenizer.url(t,q))){if(n=t,this.options.extensions&&this.options.extensions.startInline){let e=1/0;const i=t.slice(1);let s;this.options.extensions.startInline.forEach((function(t){s=t.call({lexer:this},i),"number"==typeof s&&s>=0&&(e=Math.min(e,s))})),e<1/0&&e>=0&&(n=t.substring(0,e+1))}if(i=this.tokenizer.inlineText(n,B))t=t.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(l=i.raw.slice(-1)),a=!0,s=e[e.length-1],s&&"text"===s.type?(s.raw+=i.raw,s.text+=i.text):e.push(i);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}else t=t.substring(i.raw.length),e.push(i);return e}}class R{constructor(t){this.options=t||n}code(t,e,i){const s=(e||"").match(/\S*/)[0];if(this.options.highlight){const e=this.options.highlight(t,s);null!=e&&e!==t&&(i=!0,t=e)}return t=t.replace(/\n$/,"")+"\n",s?'
'+(i?t:d(t,!0))+"
\n":"
"+(i?t:d(t,!0))+"
\n"}blockquote(t){return"
\n"+t+"
\n"}html(t){return t}heading(t,e,i,s){return this.options.headerIds?"'+t+"\n":""+t+"\n"}hr(){return this.options.xhtml?"
\n":"
\n"}list(t,e,i){const s=e?"ol":"ul";return"<"+s+(e&&1!==i?' start="'+i+'"':"")+">\n"+t+"\n"}listitem(t){return"
  • "+t+"
  • \n"}checkbox(t){return" "}paragraph(t){return"

    "+t+"

    \n"}table(t,e){return e&&(e=""+e+""),"\n\n"+t+"\n"+e+"
    \n"}tablerow(t){return"\n"+t+"\n"}tablecell(t,e){const i=e.header?"th":"td";return(e.align?"<"+i+' align="'+e.align+'">':"<"+i+">")+t+"\n"}strong(t){return""+t+""}em(t){return""+t+""}codespan(t){return""+t+""}br(){return this.options.xhtml?"
    ":"
    "}del(t){return""+t+""}link(t,e,i){if(null===(t=b(this.options.sanitize,this.options.baseUrl,t)))return i;let s='",s}image(t,e,i){if(null===(t=b(this.options.sanitize,this.options.baseUrl,t)))return i;let s=''+i+'":">",s}text(t){return t}}class I{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,e,i){return""+i}image(t,e,i){return""+i}br(){return""}}class P{constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,e){let i=t,s=0;if(this.seen.hasOwnProperty(i)){s=this.seen[t];do{s++,i=t+"-"+s}while(this.seen.hasOwnProperty(i))}return e||(this.seen[t]=s,this.seen[i]=0),i}slug(t,e={}){const i=this.serialize(t);return this.getNextSafeSlug(i,e.dryrun)}}class U{constructor(t){this.options=t||n,this.options.renderer=this.options.renderer||new R,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new I,this.slugger=new P}static parse(t,e){return new U(e).parse(t)}static parseInline(t,e){return new U(e).parseInline(t)}parse(t,e=!0){let i,s,n,r,a,l,o,c,h,d,u,m,g,f,k,b,y,$,v,x="";const _=t.length;for(i=0;i<_;i++)if(d=t[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[d.type]&&(v=this.options.extensions.renderers[d.type].call({parser:this},d),!1!==v||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type)))x+=v||"";else switch(d.type){case"space":continue;case"hr":x+=this.renderer.hr();continue;case"heading":x+=this.renderer.heading(this.parseInline(d.tokens),d.depth,p(this.parseInline(d.tokens,this.textRenderer)),this.slugger);continue;case"code":x+=this.renderer.code(d.text,d.lang,d.escaped);continue;case"table":for(c="",o="",r=d.header.length,s=0;s0&&"paragraph"===k.tokens[0].type?(k.tokens[0].text=$+" "+k.tokens[0].text,k.tokens[0].tokens&&k.tokens[0].tokens.length>0&&"text"===k.tokens[0].tokens[0].type&&(k.tokens[0].tokens[0].text=$+" "+k.tokens[0].tokens[0].text)):k.tokens.unshift({type:"text",text:$}):f+=$),f+=this.parse(k.tokens,g),h+=this.renderer.listitem(f,y,b);x+=this.renderer.list(h,u,m);continue;case"html":x+=this.renderer.html(d.text);continue;case"paragraph":x+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":for(h=d.tokens?this.parseInline(d.tokens):d.text;i+1<_&&"text"===t[i+1].type;)d=t[++i],h+="\n"+(d.tokens?this.parseInline(d.tokens):d.text);x+=e?this.renderer.paragraph(h):h;continue;default:{const t='Token with "'+d.type+'" type was not found.';if(this.options.silent)return void console.error(t);throw new Error(t)}}return x}parseInline(t,e){e=e||this.renderer;let i,s,n,r="";const a=t.length;for(i=0;i{n(t.text,t.lang,(function(e,i){if(e)return a(e);null!=i&&i!==t.text&&(t.text=i,t.escaped=!0),l--,0===l&&a()}))}),0))})),void(0===l&&a())}try{const i=M.lex(t,e);return e.walkTokens&&z.walkTokens(i,e.walkTokens),U.parse(i,e)}catch(s){if(s.message+="\nPlease report this to https://github.com/markedjs/marked.",e.silent)return"

    An error occurred:

    "+d(s.message+"",!0)+"
    ";throw s}}z.options=z.setOptions=function(t){var e;return w(z.defaults,t),e=z.defaults,n=e,z},z.getDefaults=s,z.defaults=n,z.use=function(...t){const e=w({},...t),i=z.defaults.extensions||{renderers:{},childTokens:{}};let s;t.forEach((t=>{if(t.extensions&&(s=!0,t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if(t.renderer){const e=i.renderers?i.renderers[t.name]:null;i.renderers[t.name]=e?function(...i){let s=t.renderer.apply(this,i);return!1===s&&(s=e.apply(this,i)),s}:t.renderer}if(t.tokenizer){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");i[t.level]?i[t.level].unshift(t.tokenizer):i[t.level]=[t.tokenizer],t.start&&("block"===t.level?i.startBlock?i.startBlock.push(t.start):i.startBlock=[t.start]:"inline"===t.level&&(i.startInline?i.startInline.push(t.start):i.startInline=[t.start]))}t.childTokens&&(i.childTokens[t.name]=t.childTokens)}))),t.renderer){const i=z.defaults.renderer||new R;for(const e in t.renderer){const s=i[e];i[e]=(...n)=>{let r=t.renderer[e].apply(i,n);return!1===r&&(r=s.apply(i,n)),r}}e.renderer=i}if(t.tokenizer){const i=z.defaults.tokenizer||new E;for(const e in t.tokenizer){const s=i[e];i[e]=(...n)=>{let r=t.tokenizer[e].apply(i,n);return!1===r&&(r=s.apply(i,n)),r}}e.tokenizer=i}if(t.walkTokens){const i=z.defaults.walkTokens;e.walkTokens=function(e){t.walkTokens.call(this,e),i&&i.call(this,e)}}s&&(e.extensions=i),z.setOptions(e)}))},z.walkTokens=function(t,e){for(const i of t)switch(e.call(z,i),i.type){case"table":for(const t of i.header)z.walkTokens(t.tokens,e);for(const t of i.rows)for(const i of t)z.walkTokens(i.tokens,e);break;case"list":z.walkTokens(i.items,e);break;default:z.defaults.extensions&&z.defaults.extensions.childTokens&&z.defaults.extensions.childTokens[i.type]?z.defaults.extensions.childTokens[i.type].forEach((function(t){z.walkTokens(i[t],e)})):i.tokens&&z.walkTokens(i.tokens,e)}},z.parseInline=function(t,e){if(null==t)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof t)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected");L(e=w({},z.defaults,e||{}));try{const i=M.lexInline(t,e);return e.walkTokens&&z.walkTokens(i,e.walkTokens),U.parseInline(i,e)}catch(i){if(i.message+="\nPlease report this to https://github.com/markedjs/marked.",e.silent)return"

    An error occurred:

    "+d(i.message+"",!0)+"
    ";throw i}},z.Parser=U,z.parser=U.parse,z.Renderer=R,z.TextRenderer=I,z.Lexer=M,z.lexer=M.lex,z.Tokenizer=E,z.Slugger=P,z.parse=z,U.parse,M.lex;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var N={"&":"&","<":"<",">":">",'"':""","'":"'"},D={"&":"&","<":"<",">":">",""":'"',"'":"'"},W=/(&|<|>|"|')/g,H=/[&<>"']/g;function V(t){return N[t]}function j(t){return D[t]}function Q(t){return null==t?"":String(t).replace(H,V)}function G(t){return null==t?"":String(t).replace(W,j)}Q.options=G.options={};var Y={encode:Q,escape:Q,decode:G,unescape:G,version:"1.0.0-browser"};var Z=function t(e){for(var i,s,n=Array.prototype.slice.call(arguments,1);n.length;)for(s in i=n.shift())i.hasOwnProperty(s)&&("[object Object]"===Object.prototype.toString.call(e[s])?e[s]=t(e[s],i[s]):e[s]=i[s]);return e},K=function(t){return"string"==typeof t?t.toLowerCase():t};function X(t,e){return t[e]=!0,t}var J=function(t){return t.reduce(X,{})},tt={uris:J(["background","base","cite","href","longdesc","src","usemap"])},et={voids:J(["area","br","col","hr","img","wbr","input","base","basefont","link","meta"])},it=Y,st=K,nt=et,rt=/^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,at=/^<\s*\/\s*([\w:-]+)[^>]*>/,lt=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,ot=/^=0&&(e.comment&&e.comment(t.substring(4,s)),t=t.substring(s+3),i=!1):ct.test(t)?a(at,o):ot.test(t)&&a(rt,l);var s;!function(){if(!i)return;var s,n=t.indexOf("<");n>=0?(s=t.substring(0,n),t=t.substring(n)):(s=t,t="");e.chars&&e.chars(s)}()}();var s=t===n;n=t,s&&(t="")}function a(e,s){var n=t.match(e);n&&(t=t.substring(n[0].length),n[0].replace(e,s),i=!1)}function l(t,i,n,r){var a={},l=st(i),o=nt.voids[l]||!!r;n.replace(lt,(function(t,e,i,s,n){a[e]=void 0===i&&void 0===s&&void 0===n?void 0:it.decode(i||s||n||"")})),o||s.push(l),e.start&&e.start(l,a,o)}function o(t,i){var n,r=0,a=st(i);if(a)for(r=s.length-1;r>=0&&s[r]!==a;r--);if(r>=0){for(n=s.length-1;n>=r;n--)e.end&&e.end(s[n]);s.length=r}}o()},ft=function(t,e){var i,s=e||{};return l(),{start:function(t,e,a){var l=dt(t);if(i.ignoring)return void r(l);if(-1===(s.allowedTags||[]).indexOf(l))return void r(l);if(s.filter&&!s.filter({tag:l,attrs:e}))return void r(l);n("<"),n(l),Object.keys(e).forEach((function(t){var i=e[t],r=(s.allowedClasses||{})[l]||[],a=(s.allowedAttributes||{})[l]||[],o=dt(t);("class"===o&&-1===a.indexOf(o)?(i=i.split(" ").filter((function(t){return r&&-1!==r.indexOf(t)})).join(" ").trim()).length:-1!==a.indexOf(o)&&(!0!==ut.uris[o]||function(t){var e=t[0];if("#"===e||"/"===e)return!0;var i=t.indexOf(":");if(-1===i)return!0;var n=t.indexOf("?");if(-1!==n&&i>n)return!0;var r=t.indexOf("#");return-1!==r&&i>r||s.allowedSchemes.some(a);function a(e){return 0===t.indexOf(e+":")}}(i)))&&(n(" "),n(t),"string"==typeof i&&(n('="'),n(ht.encode(i)),n('"')))})),n(a?"/>":">")},end:function(t){var e=dt(t);-1!==(s.allowedTags||[]).indexOf(e)&&!1===i.ignoring?(n("")):a(e)},chars:function(t){!1===i.ignoring&&n(s.transformText?s.transformText(t):t)}};function n(e){t.push(e)}function r(t){pt.voids[t]||(!1===i.ignoring?i={ignoring:t,depth:1}:i.ignoring===t&&i.depth++)}function a(t){i.ignoring===t&&--i.depth<=0&&l()}function l(){i={ignoring:!1,depth:0}}},kt={allowedAttributes:{a:["href","name","target","title","aria-label"],iframe:["allowfullscreen","frameborder","src"],img:["src","alt","title","aria-label"]},allowedClasses:{},allowedSchemes:["http","https","mailto"],allowedTags:["a","abbr","article","b","blockquote","br","caption","code","del","details","div","em","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","main","mark","ol","p","pre","section","span","strike","strong","sub","summary","sup","table","tbody","td","th","thead","tr","u","ul"],filter:null};function bt(t,e,i){var s=[],n=!0===i?e:mt({},kt,e),r=ft(s,n);return gt(t,r),s.join("")}bt.defaults=kt;var yt=bt,$t={exports:{}};$t.exports=function(){function t(t,e){return t(e={exports:{}},e.exports),e.exports}var e=t((function(t){var e=t.exports=function(){return new RegExp("(?:"+e.line().source+")|(?:"+e.block().source+")","gm")};e.line=function(){return/(?:^|\s)\/\/(.+?)$/gm},e.block=function(){return/\/\*([\S\s]*?)\*\//gm}})),i=["23AC69","91C132","F19726","E8552D","1AAB8E","E1147F","2980C1","1BA1E6","9FA0A0","F19726","E30B20","E30B20","A3338B"];function s(t){return''+t+""}return function(t,n){void 0===n&&(n={});var r=n.colors;void 0===r&&(r=i);var a=0,l={},o=new RegExp("("+/[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af\u0400-\u04FF]+|\w+/.source+"|"+/'+e+"";return a=++a%r.length,o}))}}();var vt=$t.exports;function xt(t=""){const e=document.createElement("div");return e.innerHTML=t.trim(),e.firstElementChild||e}function _t(t){return parseFloat(getComputedStyle(t,null).height.replace("px",""))}function wt(t){const e=RegExp(`[?&]${t}=([^&]*)`).exec(window.location.search);return e&&decodeURIComponent(e[1].replace(/\+/g," "))}function St(t){const e=t.getBoundingClientRect();return{top:e.top+window.scrollY,left:e.left+window.scrollX}}function Tt(t,e){let i=t.toString();for(;i.length{s--,0===s&&e()})),0===s&&e()}function Ct(t,e){var i,s;return`${((null==(i=t.conf.gravatar)?void 0:i.mirror)||"").replace(/\/$/,"")}/${e}?d=${encodeURIComponent((null==(s=t.conf.gravatar)?void 0:s.default)||"")}&s=80`}let Et;function Ft(t,e){if(!Et){const t=new z.Renderer,e=t.link;t.link=(i,s,n)=>{const r=null==i?void 0:i.startsWith(`${window.location.protocol}//${window.location.hostname}`);return e.call(t,i,s,n).replace(/^
    vt(t),pedantic:!1,gfm:!0,breaks:!0,smartLists:!0,smartypants:!0,xhtml:!1,sanitize:!0,sanitizer:t=>yt(t,__spreadProps(__spreadValues({},yt.defaults),{allowedAttributes:__spreadProps(__spreadValues({},yt.defaults.allowedAttributes),{img:["src","atk-emoticon"]})})),silent:!0}),Et=i}return Et.parse(e)}function Ot(t){t instanceof e&&(t=t.$root);let i=t.querySelector(".atk-loading");i||(i=xt(''),t.appendChild(i)),i.style.display="";const s=i.querySelector(".atk-loading-spinner");s&&(s.style.display="none",window.setTimeout((()=>{s.style.display=""}),500))}function Bt(t){t instanceof e&&(t=t.$root);const i=t.querySelector(".atk-loading");i&&(i.style.display="none")}function qt(t,e=!0){const i=St(t).top+_t(t)/2-document.documentElement.clientHeight/2;e?window.scroll({top:i>0?i:0,left:0}):window.scroll(0,i>0?i:0)}function Mt(t,e,i){const s=xt(`
    `);s.querySelector(".atk-notify-content").innerHTML=function(t){const e=document.createElement("div");return e.innerText=t,e.innerHTML}(e).replace("\n","
    "),t.appendChild(s);const n=()=>{s.classList.add("atk-fade-out"),setTimeout((()=>{s.remove()}),200)};let r;r=window.setTimeout((()=>{n()}),3e3),s.addEventListener("click",(()=>{n(),window.clearTimeout(r)}))}function Rt(t,e){!function(t,e,i="in"){t.classList.add(`atk-fade-${i}`);const s=()=>{t.classList.remove(`atk-fade-${i}`),t.removeEventListener("animationend",s),e&&e()};t.addEventListener("animationend",s)}(t,e,"in")}function It(t,i,s='Artalk Error'){t instanceof e&&(t=t.$root);let n=t.querySelector(".atk-error-layer");if(null===i)return void(null!==n&&n.remove());n||(n=xt(`
    ${s}
    `),t.appendChild(n));const r=n.querySelector(".atk-error-text");r.innerHTML="",null!==i&&(i instanceof HTMLElement?r.appendChild(i):r.innerText=i)}const Pt=class extends i{constructor(t,e,i){super(t),__publicField(this,"name"),__publicField(this,"$wrap"),__publicField(this,"$mask"),__publicField(this,"maskClickHideEnable",!0),__publicField(this,"bodyStyleOrgOverflow",""),__publicField(this,"bodyStyleOrgPaddingRight",""),__publicField(this,"afterHide"),this.name=e;const{$wrap:s,$mask:n}=zt(t);this.$wrap=s,this.$mask=n,this.$el=this.$wrap.querySelector(`[data-layer-name="${e}"].atk-layer-item`),null===this.$el&&(i?this.$el=i:(this.$el=xt(),this.$el.classList.add("atk-layer-item"))),this.$el.setAttribute("data-layer-name",e),this.$el.style.display="none",this.$wrap.append(this.$el)}getName(){return this.name}getWrapEl(){return this.$wrap}getEl(){return this.$el}show(){this.fireAllActionTimer(),this.$wrap.style.display="block",this.$mask.style.display="block",this.$mask.classList.add("atk-fade-in"),this.$el.style.display="",this.$mask.onclick=()=>{this.maskClickHideEnable&&this.hide()},this.bodyStyleOrgOverflow=document.body.style.overflow,this.bodyStyleOrgPaddingRight=document.body.style.paddingRight,document.body.style.overflow="hidden";const t=parseInt(window.getComputedStyle(document.body,null).getPropertyValue("padding-right"),10);document.body.style.paddingRight=`${function(){const t=document.createElement("p");t.style.width="100%",t.style.height="200px";const e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.visibility="hidden",e.style.width="200px",e.style.height="150px",e.style.overflow="hidden",e.appendChild(t),document.body.appendChild(e);const i=t.offsetWidth;e.style.overflow="scroll";let s=t.offsetWidth;return i===s&&(s=e.clientWidth),document.body.removeChild(e),i-s}()+t||0}px`}hide(){this.afterHide&&this.afterHide(),this.$wrap.classList.add("atk-fade-out"),this.$el.style.display="none",this.newActionTimer((()=>{this.$wrap.style.display="none",document.body.style.overflow=this.bodyStyleOrgOverflow,document.body.style.paddingRight=this.bodyStyleOrgPaddingRight,this.checkCleanLayer()}),450),this.newActionTimer((()=>{this.$wrap.style.display="none",this.$wrap.classList.remove("atk-fade-out")}),200)}setMaskClickHide(t){this.maskClickHideEnable=t}newActionTimer(t,e){const i=()=>{t(),Pt.actionTimers=Pt.actionTimers.filter((t=>t.act!==i))},s=window.setTimeout((()=>i()),e);Pt.actionTimers.push({act:i,tid:s})}fireAllActionTimer(){Pt.actionTimers.forEach((t=>{clearTimeout(t.tid),t.act()}))}disposeNow(){document.body.style.overflow="",this.$el.remove(),this.checkCleanLayer()}dispose(){this.hide(),this.$el.remove(),this.checkCleanLayer()}checkCleanLayer(){0===this.getWrapEl().querySelectorAll(".atk-layer-item").length&&(this.$wrap.style.display="none")}};let Ut=Pt;function zt(t){let e=document.querySelector(`.atk-layer-wrap#ctx-${t.cid}`);e||(e=xt(``),document.body.appendChild(e));const i=e.querySelector(".atk-layer-mask");return{$wrap:e,$mask:i}}__publicField(Ut,"actionTimers",[]);class Nt{constructor(t){return __publicField(this,"$el"),__publicField(this,"$content"),__publicField(this,"$actions"),this.$el=xt('
    \n
    \n
    \n
    \n
    \n
    '),this.$actions=this.$el.querySelector(".atk-layer-dialog-actions"),this.$content=this.$el.querySelector(".atk-layer-dialog-content"),this.$content.appendChild(t),this}setYes(t){const e=xt('');return e.onclick=this.onBtnClick(t),this.$actions.appendChild(e),this}setNo(t){const e=xt('');return e.onclick=this.onBtnClick(t),this.$actions.appendChild(e),this}onBtnClick(t){return e=>{const i=t(e.currentTarget,this);void 0!==i&&!0!==i||this.$el.remove()}}}function Dt(t,e,i,s){return __async(this,null,(function*(){if(t.user.data.token){const e=new Headers;e.set("Authorization",`Bearer ${t.user.data.token}`),i.headers=e}try{let a;if(a="number"!=typeof s&&0===t.conf.reqTimeout||0===s?yield fetch(e,i):yield(n=s||t.conf.reqTimeout||15e3,r=fetch(e,i),new Promise(((t,e)=>{const i=setTimeout((()=>{e(new Error("请求超时"))}),n);r.then((e=>{clearTimeout(i),t(e)}),(t=>{clearTimeout(i),e(t)}))}))),!a.ok&&401!==a.status)throw new Error(`请求响应 ${a.status}`);let l=yield a.json();const o=(s,n)=>{Dt(t,e,i).then((t=>{s(t)})).catch((t=>{n(t)}))};if(l.data&&l.data.need_captcha?l=yield new Promise(((e,i)=>{t.trigger("checker-captcha",{imgData:l.data.img_data,onSuccess:()=>{o(e,i)},onCancel:()=>{i(l)}})})):(l.data&&l.data.need_login||401===a.status)&&(l=yield new Promise(((e,i)=>{t.trigger("checker-admin",{onSuccess:()=>{o(e,i)},onCancel:()=>{i(l)}})}))),!l.success)throw l;return l}catch(a){if(console.error(a),a instanceof TypeError)throw new Error("网络错误");throw a}var n,r}))}function Wt(t,e,i){return __async(this,null,(function*(){const s={method:"POST"};i&&(s.body=Vt(i));return(yield Dt(t,e,s)).data||{}}))}function Ht(t,e,i){return __async(this,null,(function*(){return(yield Dt(t,e+(i?`?${new URLSearchParams(i)}`:""),{method:"GET"})).data||{}}))}function Vt(t){const e=new FormData;return Object.keys(t).forEach((i=>e.append(i,String(t[i])))),e}class jt{constructor(t){__publicField(this,"ctx"),__publicField(this,"baseURL"),this.ctx=t,this.baseURL=t.conf.server}get(t,e,i,s){const n={page_key:this.ctx.conf.pageKey,site_name:this.ctx.conf.site||"",limit:e,offset:t};return i&&(n.flat_mode=i),this.ctx.user.checkHasBasicUserInfo()&&(n.name=this.ctx.user.data.nick,n.email=this.ctx.user.data.email),s&&s(n),Wt(this.ctx,`${this.baseURL}/get`,n)}add(t){return __async(this,null,(function*(){const e={name:t.nick,email:t.email,link:t.link,content:t.content,rid:t.rid,page_key:t.page_key};t.page_title&&(e.page_title=t.page_title),t.site_name&&(e.site_name=t.site_name);return(yield Wt(this.ctx,`${this.baseURL}/add`,e)).comment}))}commentEdit(t){return __async(this,null,(function*(){const e=__spreadValues({},t);return(yield Wt(this.ctx,`${this.baseURL}/admin/comment-edit`,e)).comment}))}commentDel(t,e){const i={id:String(t),site_name:e||""};return Wt(this.ctx,`${this.baseURL}/admin/comment-del`,i)}login(t,e,i){return __async(this,null,(function*(){const s={name:t,email:e,password:i};this.ctx.conf.site&&(s.site_name=this.ctx.conf.site);return(yield Wt(this.ctx,`${this.baseURL}/login`,s)).token}))}userGet(t,e){const i=new AbortController,{signal:s}=i,n={name:t,email:e,site_name:this.ctx.conf.site||""};return{req:Dt(this.ctx,`${this.baseURL}/user-get`,{method:"POST",body:Vt(n),signal:s}).then((t=>({user:t.data.user,is_login:t.data.is_login,unread:t.data.unread||[],unread_count:t.data.unread_count||0}))),abort:()=>{i.abort()}}}pageGet(t,e,i){return __async(this,null,(function*(){const s={site_name:t||"",offset:e||0,limit:i||15};return yield Wt(this.ctx,`${this.baseURL}/admin/page-get`,s)}))}pageEdit(t){return __async(this,null,(function*(){const e={id:t.id,key:t.key,title:t.title,admin_only:t.admin_only,site_name:t.site_name||this.ctx.conf.site};return(yield Wt(this.ctx,`${this.baseURL}/admin/page-edit`,e)).page}))}pageDel(t,e){const i={key:String(t),site_name:e||""};return Wt(this.ctx,`${this.baseURL}/admin/page-del`,i)}pageFetch(t){return __async(this,null,(function*(){const e={id:t};return(yield Wt(this.ctx,`${this.baseURL}/admin/page-fetch`,e)).page}))}siteGet(){return __async(this,null,(function*(){return(yield Wt(this.ctx,`${this.baseURL}/admin/site-get`,{})).sites}))}siteAdd(t,e){return __async(this,null,(function*(){const i={name:t,urls:e};return(yield Wt(this.ctx,`${this.baseURL}/admin/site-add`,i)).site}))}siteEdit(t){return __async(this,null,(function*(){const e={id:t.id,name:t.name||"",urls:t.urls||""};return(yield Wt(this.ctx,`${this.baseURL}/admin/site-edit`,e)).site}))}siteDel(t,e=!1){const i={id:t,del_content:e};return Wt(this.ctx,`${this.baseURL}/admin/site-del`,i)}export(){return __async(this,null,(function*(){var t;return(null==(t=(yield Dt(this.ctx,`${this.baseURL}/admin/export`,{method:"POST"},0)).data)?void 0:t.data)||""}))}vote(t,e){return __async(this,null,(function*(){const i={site_name:this.ctx.conf.site||"",target_id:t,type:e};this.ctx.user.checkHasBasicUserInfo()&&(i.name=this.ctx.user.data.nick,i.email=this.ctx.user.data.email);return yield Wt(this.ctx,`${this.baseURL}/vote`,i)}))}markRead(t,e=!1){const i={site_name:this.ctx.conf.site||"",notify_key:t};return e&&(delete i.notify_key,i.read_all=!0,i.name=this.ctx.user.data.nick,i.email=this.ctx.user.data.email),Wt(this.ctx,`${this.baseURL}/mark-read`,i)}captchaGet(){return __async(this,null,(function*(){return(yield Ht(this.ctx,`${this.baseURL}/captcha/refresh`)).img_data||""}))}captchaCheck(t){return __async(this,null,(function*(){return(yield Ht(this.ctx,`${this.baseURL}/captcha/check`,{value:t})).img_data||""}))}}const Qt={request:(t,e)=>new jt(t.ctx).captchaCheck(e),body(t){const e=xt(`验证码敲入验证码继续:`);return e.querySelector(".atk-captcha-img").onclick=()=>{const i=e.querySelector(".atk-captcha-img");new jt(t.ctx).captchaGet().then((t=>{i.setAttribute("src",t)})).catch((t=>{console.error("验证码获取失败 ",t)}))},e},onSuccess(t,e,i,s){t.submitCaptchaVal=i},onError(t,e,i,s){s.querySelector(".atk-captcha-img").click()}},Gt={inputType:"password",request(t,e){const i={name:t.ctx.user.data.nick,email:t.ctx.user.data.email,password:e};return new jt(t.ctx).login(i.name,i.email,i.password)},body:()=>xt("敲入密码来验证管理员身份:"),onSuccess(t,e,i,s){t.ctx.user.data.isAdmin=!0,t.ctx.user.data.token=e,t.ctx.user.save(),t.ctx.trigger("user-changed",t.ctx.user.data),t.ctx.trigger("list-reload")},onError(t,e,i,s){}};class Yt{constructor(t){__publicField(this,"ctx"),__publicField(this,"launched",[]),__publicField(this,"submitCaptchaVal"),__publicField(this,"submitCaptchaImgData"),this.ctx=t,this.initEventBind()}initEventBind(){this.ctx.on("checker-captcha",(t=>{t.imgData&&(this.submitCaptchaImgData=t.imgData),this.fire(Qt,t)})),this.ctx.on("checker-admin",(t=>{this.fire(Gt,t)}))}fire(t,e){if(this.launched.includes(t))return;this.launched.push(t);const i=new Ut(this.ctx,`checker-${(new Date).getTime()}`);i.setMaskClickHide(!1),i.show();const s=xt();s.appendChild(t.body(this));const n=xt(``);let r;s.appendChild(n),setTimeout((()=>n.focus()),80),n.onkeyup=t=>{"Enter"!==t.key&&13!==t.keyCode||(t.preventDefault(),i.getEl().querySelector('button[data-action="confirm"]').click())};const a=new Nt(s);a.setYes((l=>{const o=n.value.trim();r||(r=l.innerText);const c=()=>{l.innerText=r||"",l.classList.remove("error")};return l.innerText="加载中...",t.request(this,o).then((n=>{this.done(t,i),t.onSuccess&&t.onSuccess(this,n,o,s),e.onSuccess&&e.onSuccess(o,a.$el)})).catch((e=>{var i;i=String(e.msg||String(e)),l.innerText=i,l.classList.add("error"),t.onError&&t.onError(this,e,o,s);const r=setTimeout((()=>c()),3e3);n.onfocus=()=>{c(),clearTimeout(r)}})),!1})),a.setNo((()=>(this.done(t,i),e.onCancel&&e.onCancel(),!1))),i.getEl().append(a.$el),e.onMount&&e.onMount(a.$el)}done(t,e){e.disposeNow(),this.launched=this.launched.filter((e=>e!==t))}}class Zt{constructor(t){__publicField(this,"editor"),__publicField(this,"ctx"),this.editor=t,this.ctx=t.ctx}}__publicField(Zt,"Name"),__publicField(Zt,"BtnHTML");class Kt extends Zt{constructor(t){super(t),__publicField(this,"$el"),__publicField(this,"emoticons",[]),__publicField(this,"$grpWrap"),__publicField(this,"$grpSwitcher"),this.editor=t,this.$el=xt('
    '),this.init()}init(){return __async(this,null,(function*(){Ot(this.$el),this.emoticons=yield this.handleData(this.ctx.conf.emoticons),Bt(this.$el),this.initEmoticonsList()}))}handleData(t){return __async(this,null,(function*(){if(!Array.isArray(t)&&["object","string"].includes(typeof t)&&(t=[t]),!Array.isArray(t))return It(this.$el,"表情包数据必须为 Array/Object/String 类型"),Bt(this.$el),[];const e=e=>{"object"==typeof e&&(e.name&&t.find((t=>t.name===e.name))||t.push(e))},i=t=>__async(this,null,(function*(){yield Promise.all(t.map(((t,s)=>__async(this,null,(function*(){if("object"!=typeof t||Array.isArray(t)){if(Array.isArray(t))yield i(t);else if("string"==typeof t){const s=yield this.remoteLoad(t);Array.isArray(s)?yield i(s):"object"==typeof s&&e(s)}}else e(t)})))))}));return yield i(t),t.forEach((t=>{if(this.isOwOFormat(t)){this.convertOwO(t).forEach((t=>{e(t)}))}else Array.isArray(t)&&t.forEach((t=>{e(t)}))})),t=t.filter((t=>"object"==typeof t&&!Array.isArray(t)&&!!t&&!!t.name)),console.log(t),this.solveNullKey(t),this.solveSameKey(t),t}))}remoteLoad(t){return __async(this,null,(function*(){if(!t)return[];try{const e=yield fetch(t);return yield e.json()}catch(e){return Bt(this.$el),It(this.$el,`表情加载失败 ${String(e)}`),[]}}))}solveNullKey(t){t.forEach((t=>{t.items.forEach(((e,i)=>{e.key||(e.key=`${t.name} ${i+1}`)}))}))}solveSameKey(t){const e={};t.forEach((t=>{t.items.forEach((t=>{t.key&&""!==String(t.key).trim()&&(e[t.key]?e[t.key]++:e[t.key]=1,e[t.key]>1&&(t.key=`${t.key} ${e[t.key]}`))}))}))}isOwOFormat(t){try{return"object"==typeof t&&!!Object.values(t).length&&Array.isArray(Object.keys(Object.values(t)[0].container))&&Object.keys(Object.values(t)[0].container[0]).includes("icon")}catch(e){return!1}}convertOwO(t){const e=[];return Object.entries(t).forEach((([t,i])=>{const s={name:t,type:i.type,items:[]};i.container.forEach(((e,i)=>{const n=e.icon;if(/<(img|IMG)/.test(n)){const t=/src=["'](.*?)["']/.exec(n);t&&t.length>1&&(e.icon=t[1])}s.items.push({key:e.text||`${t} ${i+1}`,val:e.icon})})),e.push(s)})),e}initEmoticonsList(){this.$grpWrap=xt('
    '),this.$el.append(this.$grpWrap),this.emoticons.forEach(((t,e)=>{const i=xt('');this.$grpWrap.append(i),i.setAttribute("data-index",String(e)),i.setAttribute("data-grp-name",t.name),i.setAttribute("data-type",t.type),t.items.forEach((e=>{const s=xt('');if(i.append(s),e.key&&!new RegExp(`^(${t.name})?\\s?[0-9]+$`).test(e.key)&&s.setAttribute("title",e.key),"image"===t.type){const t=document.createElement("img");t.src=e.val,t.alt=e.key,s.append(t)}else s.innerText=e.val;s.onclick=()=>{"image"===t.type?this.editor.insertContent(`:[${e.key}]`):this.editor.insertContent(e.val||"")}}))})),this.$grpSwitcher=xt('
    '),this.$el.append(this.$grpSwitcher),this.emoticons.forEach(((t,e)=>{const i=xt("");i.innerText=t.name,i.setAttribute("data-index",String(e)),i.onclick=()=>this.openGrp(e),this.$grpSwitcher.append(i)})),this.emoticons.length>0&&this.openGrp(0)}openGrp(t){var e;Array.from(this.$grpWrap.children).forEach((e=>{const i=e;i.getAttribute("data-index")!==String(t)?i.style.display="none":i.style.display=""})),this.$grpSwitcher.querySelectorAll("span.active").forEach((t=>t.classList.remove("active"))),null==(e=this.$grpSwitcher.querySelector(`span[data-index="${t}"]`))||e.classList.add("active"),this.changeListHeight()}getEl(){return this.$el}changeListHeight(){}onShow(){setTimeout((()=>{this.changeListHeight()}),30)}onHide(){this.$el.parentElement.style.height=""}transEmoticonImageText(t){return this.emoticons&&Array.isArray(this.emoticons)?(this.emoticons.forEach((e=>{"image"===e.type&&Object.entries(e.items).forEach((([e,i])=>{t=t.split(`:[${i.key}]`).join(``)}))})),t):t}}__publicField(Kt,"Name","emoticons"),__publicField(Kt,"BtnHTML","表情");class Xt extends Zt{constructor(t){super(t),__publicField(this,"$el"),__publicField(this,"binded",!1),this.initEl()}initEl(){this.$el=xt('
    '),this.binded=!1}getEl(){return this.$el}onShow(){if(this.updateContent(),!this.binded){const t=()=>{this.updateContent()};this.editor.$textarea.addEventListener("input",t),this.editor.$textarea.addEventListener("change",t),this.binded=!0}}onHide(){}updateContent(){"none"!==this.$el.style.display&&(this.$el.innerHTML=this.editor.getContentMarked())}}__publicField(Xt,"Name","preview"),__publicField(Xt,"BtnHTML",'预览 ');class Jt extends i{constructor(t){super(t),__publicField(this,"LOADABLE_PLUG_LIST",[Kt,Xt]),__publicField(this,"plugList",{}),__publicField(this,"$header"),__publicField(this,"$textareaWrap"),__publicField(this,"$textarea"),__publicField(this,"$plugWrap"),__publicField(this,"$bottom"),__publicField(this,"$plugBtnWrap"),__publicField(this,"$submitBtn"),__publicField(this,"$notifyWrap"),__publicField(this,"replyComment",null),__publicField(this,"$sendReply",null),__publicField(this,"isTraveling",!1),__publicField(this,"queryUserInfo",{timeout:null,abortFunc:null}),__publicField(this,"openedPlugName",null),this.$el=xt('
    \n
    \n \n \n \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n'),this.$header=this.$el.querySelector(".atk-header"),this.$textareaWrap=this.$el.querySelector(".atk-textarea-wrap"),this.$textarea=this.$el.querySelector(".atk-textarea"),this.$plugWrap=this.$el.querySelector(".atk-plug-wrap"),this.$bottom=this.$el.querySelector(".atk-bottom"),this.$plugBtnWrap=this.$el.querySelector(".atk-plug-btn-wrap"),this.$submitBtn=this.$el.querySelector(".atk-send-btn"),this.$notifyWrap=this.$el.querySelector(".atk-notify-wrap"),this.initLocalStorage(),this.initHeader(),this.initTextarea(),this.initEditorPlug(),this.initBottomPart(),this.ctx.on("editor-open",(()=>this.open())),this.ctx.on("editor-close",(()=>this.close())),this.ctx.on("editor-reply",(t=>this.setReply(t.data,t.$el,t.scroll))),this.ctx.on("editor-reply-cancel",(()=>this.cancelReply())),this.ctx.on("editor-show-loading",(()=>Ot(this.$el))),this.ctx.on("editor-hide-loading",(()=>Bt(this.$el))),this.ctx.on("editor-notify",(t=>this.showNotify(t.msg,t.type))),this.ctx.on("editor-travel",(t=>this.travel(t))),this.ctx.on("editor-travel-back",(()=>this.travelBack()))}get user(){return this.ctx.user}initLocalStorage(){const t=window.localStorage.getItem("ArtalkContent")||"";""!==t.trim()&&(this.showNotify("已自动恢复","i"),this.setContent(t)),this.$textarea.addEventListener("input",(()=>{this.saveContent()}))}initHeader(){Object.keys(this.user.data).forEach((t=>{const e=this.getInputEl(t);e&&e instanceof HTMLInputElement&&(e.value=this.user.data[t]||"",e.addEventListener("input",(()=>this.onHeaderInputChanged(t,e))))}))}getInputEl(t){return this.$header.querySelector(`[name="${t}"]`)}onHeaderInputChanged(t,e){this.user.data[t]=e.value.trim(),"nick"!==t&&"email"!==t||(this.user.data.token="",this.user.data.isAdmin=!1,null!==this.queryUserInfo.timeout&&window.clearTimeout(this.queryUserInfo.timeout),null!==this.queryUserInfo.abortFunc&&this.queryUserInfo.abortFunc(),this.queryUserInfo.timeout=window.setTimeout((()=>{this.queryUserInfo.timeout=null;const{req:t,abort:e}=new jt(this.ctx).userGet(this.user.data.nick,this.user.data.email);this.queryUserInfo.abortFunc=e,t.then((t=>{t.is_login||(this.user.data.token="",this.user.data.isAdmin=!1),this.ctx.trigger("unread-update",{notifies:t.unread}),this.user.checkHasBasicUserInfo()&&!t.is_login&&t.user&&t.user.is_admin&&this.showLoginDialog(),t.user&&t.user.link&&(this.user.data.link=t.user.link,this.getInputEl("link").value=t.user.link)})).finally((()=>{this.queryUserInfo.abortFunc=null}))}),400)),this.saveUser()}showLoginDialog(){this.ctx.trigger("checker-admin",{onSuccess:()=>{}})}saveUser(){this.user.save(),this.ctx.trigger("user-changed",this.ctx.user.data)}saveContent(){window.localStorage.setItem("ArtalkContent",this.getContentOriginal().trim())}initTextarea(){this.$textarea.placeholder=this.ctx.conf.placeholder||"",this.$textarea.addEventListener("keydown",(t=>{9===(t.keyCode||t.which)&&(t.preventDefault(),this.insertContent("\t"))})),this.$textarea.addEventListener("input",(t=>{this.adjustTextareaHeight()}))}adjustTextareaHeight(){const t=this.$textarea.offsetHeight-this.$textarea.clientHeight;this.$textarea.style.height="0px",this.$textarea.style.height=`${this.$textarea.scrollHeight+t}px`}initEditorPlug(){this.plugList={},this.$plugWrap.innerHTML="",this.$plugWrap.style.display="none",this.openedPlugName=null,this.$plugBtnWrap.innerHTML="",this.LOADABLE_PLUG_LIST.forEach((t=>{const e=xt(`${t.BtnHTML}`);this.$plugBtnWrap.appendChild(e),e.addEventListener("click",(()=>{let i=this.plugList[t.Name];if(i||(i=new t(this),this.plugList[t.Name]=i),this.$plugBtnWrap.querySelectorAll(".active").forEach((t=>t.classList.remove("active"))),t.Name===this.openedPlugName)return i.onHide(),this.$plugWrap.style.display="none",void(this.openedPlugName=null);if(null===this.$plugWrap.querySelector(`[data-plug-name="${t.Name}"]`)){const e=i.getEl();e.setAttribute("data-plug-name",t.Name),e.style.display="none",this.$plugWrap.appendChild(e)}Array.from(this.$plugWrap.children).forEach((e=>{const i=e.getAttribute("data-plug-name");i===t.Name?(e.style.display="",this.plugList[i].onShow()):(e.style.display="none",this.plugList[i].onHide())})),this.$plugWrap.style.display="",this.openedPlugName=t.Name,e.classList.add("active")}))}))}closePlug(){this.$plugWrap.innerHTML="",this.$plugWrap.style.display="none",this.openedPlugName=null}insertContent(t){if(document.selection)this.$textarea.focus(),document.selection.createRange().text=t,this.$textarea.focus();else if(this.$textarea.selectionStart||0===this.$textarea.selectionStart){const e=this.$textarea.selectionStart,i=this.$textarea.selectionEnd,s=this.$textarea.scrollTop;this.setContent(this.$textarea.value.substring(0,e)+t+this.$textarea.value.substring(i,this.$textarea.value.length)),this.$textarea.focus(),this.$textarea.selectionStart=e+t.length,this.$textarea.selectionEnd=e+t.length,this.$textarea.scrollTop=s}else this.$textarea.focus(),this.$textarea.value+=t}setContent(t){this.$textarea.value=t,this.saveContent(),this.plugList&&this.plugList.preview&&this.plugList.preview.updateContent(),this.adjustTextareaHeight()}clearEditor(){this.setContent(""),this.cancelReply()}getContent(){let t=this.getContentOriginal();if(this.plugList&&this.plugList.emoticons){t=this.plugList.emoticons.transEmoticonImageText(t)}return t}getContentOriginal(){return this.$textarea.value||""}getContentMarked(){return Ft(this.ctx,this.getContent())}initBottomPart(){this.initReply(),this.initSubmit()}initReply(){this.replyComment=null,this.$sendReply=null}setReply(t,e,i=!0){null!==this.replyComment&&this.cancelReply(),null===this.$sendReply&&(this.$sendReply=xt('
    回复 ×
    '),this.$sendReply.querySelector(".atk-text").innerText=`@${t.nick}`,this.$sendReply.addEventListener("click",(()=>{this.cancelReply()})),this.$textareaWrap.append(this.$sendReply)),this.replyComment=t,!0===this.ctx.conf.editorTravel&&this.travel(e),i&&qt(this.$el),this.$textarea.focus()}cancelReply(){null!==this.$sendReply&&(this.$sendReply.remove(),this.$sendReply=null),this.replyComment=null,!0===this.ctx.conf.editorTravel&&this.travelBack()}initSubmit(){this.$submitBtn.innerText=this.ctx.conf.sendBtn||"Send",this.$submitBtn.addEventListener("click",(t=>{t.currentTarget,this.submit()}))}submit(){return __async(this,null,(function*(){if(""!==this.getContent().trim()){this.ctx.trigger("editor-submit"),Ot(this.$el);try{const t=yield new jt(this.ctx).add({content:this.getContent(),nick:this.user.data.nick,email:this.user.data.email,link:this.user.data.link,rid:null===this.replyComment?0:this.replyComment.id,page_key:null===this.replyComment?this.ctx.conf.pageKey:this.replyComment.page_key,page_title:null===this.replyComment?this.ctx.conf.pageTitle:void 0,site_name:null===this.replyComment?this.ctx.conf.site:this.replyComment.site_name});null!==this.replyComment&&this.replyComment.page_key!==this.ctx.conf.pageKey&&window.open(`${this.replyComment.page_key}#atk-comment-${t.id}`),this.ctx.trigger("list-insert",t),this.clearEditor(),this.ctx.trigger("editor-submitted")}catch(t){return console.error(t),void this.showNotify(`评论失败,${t.msg||String(t)}`,"e")}finally{Bt(this.$el)}}else this.$textarea.focus()}))}showNotify(t,e){Mt(this.$notifyWrap,t,e)}close(){this.$textareaWrap.querySelector(".atk-comment-closed")||this.$textareaWrap.prepend(xt('
    仅管理员可评论
    ')),this.user.data.isAdmin?(this.$textarea.style.display="",this.$bottom.style.display=""):(this.$textarea.style.display="none",this.closePlug(),this.$bottom.style.display="none")}open(){var t;null==(t=this.$textareaWrap.querySelector(".atk-comment-closed"))||t.remove(),this.$textarea.style.display="",this.$bottom.style.display=""}travel(t){if(this.isTraveling)return;this.isTraveling=!0,this.$el.after(xt('
    '));const e=xt("
    ");t.after(e),e.replaceWith(this.$el)}travelBack(){var t;this.isTraveling&&(this.isTraveling=!1,null==(t=this.ctx.$root.querySelector(".atk-editor-travel-placeholder"))||t.replaceWith(this.$el),null!==this.replyComment&&this.cancelReply())}}var te=window||{},ee=navigator||{};function ie(t){var e=t||ee.userAgent,i=this,s={Trident:e.indexOf("Trident")>-1||e.indexOf("NET CLR")>-1,Presto:e.indexOf("Presto")>-1,WebKit:e.indexOf("AppleWebKit")>-1,Gecko:e.indexOf("Gecko/")>-1,Safari:e.indexOf("Safari")>-1,Chrome:e.indexOf("Chrome")>-1||e.indexOf("CriOS")>-1,IE:e.indexOf("MSIE")>-1||e.indexOf("Trident")>-1,Edge:e.indexOf("Edge")>-1,Firefox:e.indexOf("Firefox")>-1||e.indexOf("FxiOS")>-1,"Firefox Focus":e.indexOf("Focus")>-1,Chromium:e.indexOf("Chromium")>-1,Opera:e.indexOf("Opera")>-1||e.indexOf("OPR")>-1,Vivaldi:e.indexOf("Vivaldi")>-1,Yandex:e.indexOf("YaBrowser")>-1,Kindle:e.indexOf("Kindle")>-1||e.indexOf("Silk/")>-1,360:e.indexOf("360EE")>-1||e.indexOf("360SE")>-1,UC:e.indexOf("UC")>-1||e.indexOf(" UBrowser")>-1,QQBrowser:e.indexOf("QQBrowser")>-1,QQ:e.indexOf("QQ/")>-1,Baidu:e.indexOf("Baidu")>-1||e.indexOf("BIDUBrowser")>-1,Maxthon:e.indexOf("Maxthon")>-1,Sogou:e.indexOf("MetaSr")>-1||e.indexOf("Sogou")>-1,LBBROWSER:e.indexOf("LBBROWSER")>-1,"2345Explorer":e.indexOf("2345Explorer")>-1,TheWorld:e.indexOf("TheWorld")>-1,XiaoMi:e.indexOf("MiuiBrowser")>-1,Quark:e.indexOf("Quark")>-1,Qiyu:e.indexOf("Qiyu")>-1,Wechat:e.indexOf("MicroMessenger")>-1,Taobao:e.indexOf("AliApp(TB")>-1,Alipay:e.indexOf("AliApp(AP")>-1,Weibo:e.indexOf("Weibo")>-1,Douban:e.indexOf("com.douban.frodo")>-1,Suning:e.indexOf("SNEBUY-APP")>-1,iQiYi:e.indexOf("IqiyiApp")>-1,Windows:e.indexOf("Windows")>-1,Linux:e.indexOf("Linux")>-1||e.indexOf("X11")>-1,"Mac OS":e.indexOf("Macintosh")>-1,Android:e.indexOf("Android")>-1||e.indexOf("Adr")>-1,Ubuntu:e.indexOf("Ubuntu")>-1,FreeBSD:e.indexOf("FreeBSD")>-1,Debian:e.indexOf("Debian")>-1,"Windows Phone":e.indexOf("IEMobile")>-1||e.indexOf("Windows Phone")>-1,BlackBerry:e.indexOf("BlackBerry")>-1||e.indexOf("RIM")>-1,MeeGo:e.indexOf("MeeGo")>-1,Symbian:e.indexOf("Symbian")>-1,iOS:e.indexOf("like Mac OS X")>-1,"Chrome OS":e.indexOf("CrOS")>-1,WebOS:e.indexOf("hpwOS")>-1,Mobile:e.indexOf("Mobi")>-1||e.indexOf("iPh")>-1||e.indexOf("480")>-1,Tablet:e.indexOf("Tablet")>-1||e.indexOf("Pad")>-1||e.indexOf("Nexus 7")>-1};s.Mobile?s.Mobile=!(e.indexOf("iPad")>-1):te.showModalDialog&&te.chrome&&(s[360]=!0);var n,r={engine:["WebKit","Trident","Gecko","Presto"],browser:["Safari","Chrome","Edge","IE","Firefox","Firefox Focus","Chromium","Opera","Vivaldi","Yandex","Kindle","360","UC","QQBrowser","QQ","Baidu","Maxthon","Sogou","LBBROWSER","2345Explorer","TheWorld","XiaoMi","Quark","Qiyu","Wechat","Taobao","Alipay","Weibo","Douban","Suning","iQiYi"],os:["Windows","Linux","Mac OS","Android","Ubuntu","FreeBSD","Debian","iOS","Windows Phone","BlackBerry","MeeGo","Symbian","Chrome OS","WebOS"],device:["Mobile","Tablet"]};for(var a in i.device="PC",i.language=((n=(ee.browserLanguage||ee.language).split("-"))[1]&&(n[1]=n[1].toUpperCase()),n.join("_")),r)for(var l=0;l27||"Opera"===i.browser&&parseInt(i.version)>12||"Yandex"===i.browser?i.engine="Blink":void 0===i.browser&&(i.browser="Unknow App")}function se(t){return new ie(t)}class ne{constructor(t){__publicField(this,"conf"),__publicField(this,"$el"),__publicField(this,"isLoading",!1),__publicField(this,"msgRecTimer"),__publicField(this,"msgRecTimerFunc"),__publicField(this,"isConfirming",!1),__publicField(this,"confirmRecTimer"),this.$el=xt(''),this.conf="object"!=typeof t?{text:t}:t,this.$el.innerText=this.getText(),this.conf.adminOnly&&this.$el.setAttribute("atk-only-admin-show","")}get isMessaging(){return!!this.msgRecTimer}appendTo(t){return t.append(this.$el),this}getText(){return"string"==typeof this.conf.text?this.conf.text:this.conf.text()}setClick(t){this.$el.onclick=e=>{if(e.stopPropagation(),!this.isLoading){if(this.conf.confirm&&!this.isMessaging){const t=()=>{this.isConfirming=!1,this.$el.classList.remove("atk-btn-confirm"),this.$el.innerText=this.getText()};if(!this.isConfirming)return this.isConfirming=!0,this.$el.classList.add("atk-btn-confirm"),this.$el.innerText=this.conf.confirmText||"确认操作",void(this.confirmRecTimer=window.setTimeout((()=>t()),5e3));this.confirmRecTimer&&window.clearTimeout(this.confirmRecTimer),t()}if(this.msgRecTimer)return this.fireMsgRecTimer(),void this.clearMsgRecTimer();t()}}}updateText(t){t&&(this.conf.text=t),this.setLoading(!1),this.$el.innerText=this.getText()}setLoading(t,e){this.isLoading!==t&&(this.isLoading=t,t?(this.$el.classList.add("atk-btn-loading"),this.$el.innerText=e||"加载中..."):(this.$el.classList.remove("atk-btn-loading"),this.$el.innerText=this.getText()))}setError(t){this.setMsg(t,"atk-btn-error")}setWarn(t){this.setMsg(t,"atk-btn-warn")}setSuccess(t){this.setMsg(t,"atk-btn-success")}setMsg(t,e,i,s){this.setLoading(!1),e&&this.$el.classList.add(e),this.$el.innerText=t,this.setMsgRecTimer((()=>{this.$el.innerText=this.getText(),e&&this.$el.classList.remove(e),s&&s()}),i||2500)}setMsgRecTimer(t,e){this.fireMsgRecTimer(),this.clearMsgRecTimer(),this.msgRecTimerFunc=t,this.msgRecTimer=window.setTimeout((()=>{t(),this.clearMsgRecTimer()}),e)}fireMsgRecTimer(){this.msgRecTimerFunc&&this.msgRecTimerFunc()}clearMsgRecTimer(){this.msgRecTimer&&window.clearTimeout(this.msgRecTimer),this.msgRecTimer=void 0,this.msgRecTimerFunc=void 0}}class re extends i{constructor(t,e){super(t),__publicField(this,"data"),__publicField(this,"$main"),__publicField(this,"$header"),__publicField(this,"$body"),__publicField(this,"$content"),__publicField(this,"$children"),__publicField(this,"$actions"),__publicField(this,"voteBtnUp"),__publicField(this,"voteBtnDown"),__publicField(this,"parent"),__publicField(this,"nestedNum"),__publicField(this,"maxNestingNum"),__publicField(this,"children",[]),__publicField(this,"replyTo"),__publicField(this,"$replyTo"),__publicField(this,"afterRender"),__publicField(this,"unread",!1),__publicField(this,"openable",!1),__publicField(this,"openURL"),__publicField(this,"openEvt"),__publicField(this,"onReplyBtnClick"),__publicField(this,"onDelete"),this.maxNestingNum=t.conf.maxNesting||3,this.data=__spreadValues({},e),this.data.date=this.data.date.replace(/-/g,"/"),this.parent=null,this.nestedNum=1}render(){return this.$el=xt('
    \n
    \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n'),this.$main=this.$el.querySelector(".atk-main"),this.$header=this.$el.querySelector(".atk-header"),this.$body=this.$el.querySelector(".atk-body"),this.$content=this.$body.querySelector(".atk-content"),this.$actions=this.$el.querySelector(".atk-actions"),this.$children=null,this.$el.setAttribute("data-comment-id",`${this.data.id}`),this.renderCheckUnread(),this.renderCheckClickable(),this.renderAvatar(),this.renderHeader(),this.renderContent(),this.renderReplyTo(),this.renderPending(),this.renderActionBtn(),this.afterRender&&this.afterRender(),this.$el}renderCheckUnread(){this.unread?this.$el.classList.add("atk-unread"):this.$el.classList.remove("atk-unread")}renderCheckClickable(){this.openable?this.$el.classList.add("atk-openable"):this.$el.classList.remove("atk-openable"),this.$el.addEventListener("click",(t=>{this.openable&&this.openURL&&(t.preventDefault(),window.open(this.openURL)),this.openEvt&&this.openEvt()}))}renderAvatar(){const t=this.$el.querySelector(".atk-avatar"),e=xt("");if(e.src=this.getGravatarUrl(),this.data.link){const i=xt('
    ');i.href=this.data.link,i.append(e),t.append(i)}else t.append(e)}renderHeader(){const t=this.$el.querySelector(".atk-nick");if(this.data.link){const e=xt('');e.innerText=this.data.nick,e.href=this.data.link,t.append(e)}else t.innerText=this.data.nick;const e=this.$el.querySelector(".atk-badge");this.data.badge_name?(e.innerText=this.data.badge_name,this.data.badge_color&&(e.style.backgroundColor=this.data.badge_color)):e.remove();const i=this.$el.querySelector(".atk-date");if(i.innerText=this.getDateFormatted(),i.setAttribute("data-atk-comment-date",String(+new Date(this.data.date))),this.conf.uaBadge){const t=xt(''),e=xt(''),i=xt('');e.innerText=this.getUserUaBrowser(),i.innerText=this.getUserUaOS(),t.append(e),t.append(i),this.$header.append(t)}}renderContent(){if(!this.data.is_collapsed)return void(this.$content.innerHTML=this.getContentMarked());this.$content.classList.add("atk-hide","atk-type-collapsed");const t=xt('\n
    \n 该评论已被系统或管理员折叠\n 查看内容\n
    ');this.$body.insertAdjacentElement("beforeend",t);const e=t.querySelector(".atk-show-btn");e.addEventListener("click",(t=>{t.stopPropagation(),this.$content.classList.contains("atk-hide")?(this.$content.innerHTML=this.getContentMarked(),this.$content.classList.remove("atk-hide"),Rt(this.$content),e.innerHTML="收起内容"):(this.$content.innerHTML="",this.$content.classList.add("atk-hide"),e.innerHTML="查看内容")}))}renderReplyTo(){if(!this.replyTo)return;this.$replyTo=xt('\n
    \n
    回复 :
    \n
    \n
    '),this.$replyTo.querySelector(".atk-nick").innerText=`@${this.replyTo.nick}`;let t=Ft(this.ctx,this.replyTo.content);this.replyTo.is_collapsed&&(t="[已折叠]"),this.$replyTo.querySelector(".atk-content").innerHTML=t,this.$body.prepend(this.$replyTo)}renderPending(){if(!this.data.is_pending)return;const t=xt('
    审核中,仅本人可见。
    ');this.$body.prepend(t)}renderActionBtn(){if(this.ctx.conf.vote&&(this.voteBtnUp=new ne((()=>`赞同 (${this.data.vote_up||0})`)).appendTo(this.$actions),this.voteBtnUp.setClick((()=>{this.vote("up")})),this.ctx.conf.voteDown&&(this.voteBtnDown=new ne((()=>`反对 (${this.data.vote_down||0})`)).appendTo(this.$actions),this.voteBtnDown.setClick((()=>{this.vote("down")})))),this.data.is_allow_reply){const t=xt("回复");this.$actions.append(t),t.addEventListener("click",(t=>{t.stopPropagation(),this.onReplyBtnClick?this.onReplyBtnClick():this.ctx.trigger("editor-reply",{data:this.data,$el:this.$el})}))}const t=new ne({text:()=>this.data.is_collapsed?"取消折叠":"折叠",adminOnly:!0});t.appendTo(this.$actions),t.setClick((()=>{this.adminEdit("collapsed",t)}));const e=new ne({text:()=>this.data.is_pending?"待审":"已审",adminOnly:!0});e.appendTo(this.$actions),e.setClick((()=>{this.adminEdit("pending",e)}));const i=new ne({text:"删除",confirm:!0,confirmText:"确认删除",adminOnly:!0});i.appendTo(this.$actions),i.setClick((()=>{this.adminDelete(i)}))}refreshUI(){const t=this.$el,e=this.render();t.replaceWith(e),this.playFadeInAnim(),this.eachComment(this.children,(t=>{var e;null==(e=t.parent)||e.getChildrenEl().appendChild(t.render()),t.playFadeInAnim()})),this.ctx.trigger("comments-loaded")}eachComment(t,e){0!==t.length&&t.every((i=>!1!==e(i,t)&&(this.eachComment(i.getChildren(),e),!0)))}getIsRoot(){return null===this.parent}getChildren(){return this.children}putChild(t){t.parent=this,t.nestedNum=this.nestedNum+1,this.children.push(t),this.getChildrenEl().appendChild(t.getEl()),t.playFadeInAnim(),t.checkHeightLimitArea("content")}getChildrenEl(){return null===this.$children&&(this.nestedNum'),this.$main.appendChild(this.$children)):this.parent&&(this.$children=this.parent.getChildrenEl())),this.$children}getParent(){return this.parent}getParents(){const t=[],e=i=>{i.parent&&(t.push(i.parent),e(i.parent))};return e(this),t}getEl(){return this.$el}getData(){return this.data}getGravatarUrl(){return Ct(this.ctx,this.data.email_encrypted)}getContentMarked(){return Ft(this.ctx,this.data.content)}getDateFormatted(){return Lt(new Date(this.data.date))}getUserUaBrowser(){const t=se(this.data.ua);return`${t.browser} ${t.version}`}getUserUaOS(){const t=se(this.data.ua);return`${t.os} ${t.osVersion}`}playFadeInAnim(){Rt(this.$el)}vote(t){const e="up"===t?this.voteBtnUp:this.voteBtnDown;new jt(this.ctx).vote(this.data.id,`comment_${t}`).then((t=>{var e,i;this.data.vote_up=t.up,this.data.vote_down=t.down,null==(e=this.voteBtnUp)||e.updateText(),null==(i=this.voteBtnDown)||i.updateText()})).catch((t=>{null==e||e.setError("投票失败"),console.log(t)}))}adminEdit(t,e){if(e.isLoading)return;e.setLoading(!0,"修改中...");const i=__spreadValues({},this.data);"collapsed"===t?i.is_collapsed=!i.is_collapsed:"pending"===t&&(i.is_pending=!i.is_pending),new jt(this.ctx).commentEdit(i).then((t=>{e.setLoading(!1),this.data=t,this.refreshUI(),Rt(this.$body),this.ctx.trigger("list-refresh-ui")})).catch((t=>{console.error(t),e.setError("修改失败")}))}adminDelete(t){t.isLoading||(t.setLoading(!0,"删除中..."),new jt(this.ctx).commentDel(this.data.id,this.data.site_name).then((()=>{t.setLoading(!1),this.onDelete&&this.onDelete(this)})).catch((e=>{console.error(e),t.setError("删除失败")})))}setUnread(t){this.unread=t,this.unread?this.$el.classList.add("atk-unread"):this.$el.classList.remove("atk-unread")}setOpenURL(t){t||(this.openable=!1,this.$el.classList.remove("atk-openable")),this.openable=!0,this.openURL=t,this.$el.classList.add("atk-openable")}checkHeightLimit(){this.checkHeightLimitArea("content"),this.checkHeightLimitArea("children")}checkHeightLimitArea(t){var e,i;const s=null==(e=this.ctx.conf.heightLimit)?void 0:e.children,n=null==(i=this.ctx.conf.heightLimit)?void 0:i.content;if("children"===t&&!s)return;if("content"===t&&!n)return;let r;"children"===t&&(r=s),"content"===t&&(r=n);const a=t=>{t&&_t(t)>r&&this.heightLimitAdd(t,r)};"children"===t?a(this.$children):"content"===t&&(a(this.$content),a(this.$replyTo),At(this.$content,(()=>{a(this.$content)})),this.$replyTo&&At(this.$replyTo,(()=>{a(this.$replyTo)})))}heightLimitRemove(t){t&&t.classList.contains("atk-height-limit")&&(t.classList.remove("atk-height-limit"),Array.from(t.children).forEach((t=>{t.classList.contains("atk-height-limit-btn")&&t.remove()})),t.style.height="",t.style.overflow="")}heightLimitAdd(t,e){if(!t)return;if(t.classList.contains("atk-height-limit"))return;t.classList.add("atk-height-limit"),t.style.height=`${e}px`,t.style.overflow="hidden";const i=xt('
    阅读更多');i.onclick=e=>{e.stopPropagation(),this.heightLimitRemove(t);const i=this.getChildren();1===i.length&&i[0].heightLimitRemove(i[0].$content)},t.append(i)}}class ae{constructor(t,e){__publicField(this,"conf"),__publicField(this,"total"),__publicField(this,"$el"),__publicField(this,"$input"),__publicField(this,"inputTimer"),__publicField(this,"$prevBtn"),__publicField(this,"$nextBtn"),__publicField(this,"page",1),this.total=t,this.conf=e,this.$el=xt('
    \n
    \n
    Prev
    \n \n
    Next
    \n
    \n
    '),this.$input=this.$el.querySelector(".atk-input"),this.$input.value=`${this.page}`,this.$input.oninput=()=>this.input(),this.$input.onkeydown=t=>this.keydown(t),this.$prevBtn=this.$el.querySelector(".atk-btn-prev"),this.$nextBtn=this.$el.querySelector(".atk-btn-next"),this.$prevBtn.onclick=()=>this.prev(),this.$nextBtn.onclick=()=>this.next(),this.checkDisabled()}get pageSize(){return this.conf.pageSize}get offset(){return this.pageSize*(this.page-1)}get maxPage(){return Math.ceil(this.total/this.pageSize)}update(t,e){this.page=Math.ceil(t/this.pageSize)+1,this.total=e,this.setInput(this.page),this.checkDisabled()}setInput(t){this.$input.value=`${t}`}input(t=!1){window.clearTimeout(this.inputTimer);const e=this.$input.value.trim(),i=()=>{if(""===e)return void this.setInput(this.page);let t=Number(e);Number.isNaN(t)||t<1?this.setInput(this.page):(t>this.maxPage&&(this.setInput(this.maxPage),t=this.maxPage),this.change(t))};t?i():this.inputTimer=window.setTimeout((()=>i()),800)}prev(){const t=this.page-1;t<1||this.change(t)}next(){const t=this.page+1;t>this.maxPage||this.change(t)}change(t){this.page=t,this.conf.onChange(this.offset),this.setInput(t),this.checkDisabled()}checkDisabled(){this.page+1>this.maxPage?this.$nextBtn.classList.add("atk-disabled"):this.$nextBtn.classList.remove("atk-disabled"),this.page-1<1?this.$prevBtn.classList.add("atk-disabled"):this.$prevBtn.classList.remove("atk-disabled")}keydown(t){const e=t.keyCode||t.which;if(38===e){const t=Number(this.$input.value)+1;if(t>this.maxPage)return;this.setInput(t),this.input()}else if(40===e){const t=Number(this.$input.value)-1;if(t<1)return;this.setInput(t),this.input()}else 13===e&&this.input(!0)}setLoading(t){t?Ot(this.$el):Bt(this.$el)}}class le{constructor(t){__publicField(this,"conf"),__publicField(this,"$el"),__publicField(this,"$loading"),__publicField(this,"$text"),__publicField(this,"offset",0),__publicField(this,"total",0),this.conf=t,this.$el=xt(''),this.$loading=this.$el.querySelector(".atk-loading-icon"),this.$text=this.$el.querySelector(".atk-text"),this.$el.onclick=()=>{this.click()}}get hasMore(){return this.total>this.offset+this.conf.pageSize}click(){this.hasMore&&this.conf.onClick(this.offset+this.conf.pageSize),this.checkDisabled()}show(){this.$el.style.display=""}hide(){this.$el.style.display="none"}setLoading(t){this.$loading.style.display=t?"":"none",this.$text.style.display=t?"none":""}showErr(t){this.setLoading(!1),this.$text.innerText=t,this.$el.classList.add("atk-err"),window.setTimeout((()=>{this.$text.innerText="查看更多",this.$el.classList.remove("atk-err")}),2e3)}update(t,e){this.offset=t,this.total=e,this.checkDisabled()}checkDisabled(){this.hasMore?this.show():this.hide()}}class oe extends i{constructor(t){super(t),__publicField(this,"$commentsWrap"),__publicField(this,"comments",[]),__publicField(this,"data"),__publicField(this,"isLoading",!1),__publicField(this,"noCommentText","无内容"),__publicField(this,"flatMode",!1),__publicField(this,"pageMode","pagination"),__publicField(this,"pageSize",20),__publicField(this,"scrollListenerAt"),__publicField(this,"repositionAt"),__publicField(this,"pagination"),__publicField(this,"readMoreBtn"),__publicField(this,"autoLoadScrollEvent"),__publicField(this,"renderComment"),__publicField(this,"paramsEditor"),__publicField(this,"onAfterLoad"),__publicField(this,"unread",[]),__publicField(this,"unreadHighlight"),this.$el=xt('
    \n
    \n
    '),this.$commentsWrap=this.$el.querySelector(".atk-list-comments-wrap"),window.setInterval((()=>{this.$el.querySelectorAll("[data-atk-comment-date]").forEach((t=>{const e=t.getAttribute("data-atk-comment-date");t.innerText=Lt(new Date(Number(e)))}))}),3e4),this.ctx.on("unread-update",(t=>this.updateUnread(t.notifies)))}fetchComments(t){return __async(this,null,(function*(){if(this.isLoading)return;const e=()=>{this.isLoading=!1,0===t?Bt(this.$el):"read-more"===this.pageMode?this.readMoreBtn.setLoading(!1):"pagination"===this.pageMode&&this.pagination.setLoading(!1)};let i;(()=>{this.isLoading=!0,0===t?Ot(this.$el):"read-more"===this.pageMode?this.readMoreBtn.setLoading(!0):"pagination"===this.pageMode&&this.pagination.setLoading(!0)})(),this.ctx.trigger("comments-load"),"read-more"===this.pageMode&&0===t&&this.clearAllComments();try{i=yield new jt(this.ctx).get(t,this.pageSize,this.flatMode,this.paramsEditor)}catch(s){throw this.onError(s.msg||String(s),t),s}finally{e()}It(this.$el,null);try{this.onLoad(i,t)}catch(s){throw this.onError(String(s),t),s}finally{e()}}))}onLoad(t,e){"pagination"===this.pageMode&&this.clearAllComments(),this.data=t,this.ctx.conf.versionCheck&&this.versionCheck(t.api_version)||(this.importComments(t.comments),this.refreshPagination(e,this.flatMode?t.total:t.total_roots),this.refreshUI(),this.ctx.trigger("unread-update",{notifies:t.unread||[]}),this.ctx.trigger("comments-loaded"),this.onAfterLoad&&this.onAfterLoad(t))}refreshPagination(t,e){const i="pagination"===this.pageMode,s="read-more"===this.pageMode;(i?!!this.pagination:!!this.readMoreBtn)||this.initPagination(),i&&this.pagination.update(t,e),s&&this.readMoreBtn.update(t,e)}initPagination(){var t;if("read-more"===this.pageMode&&(this.readMoreBtn=new le({pageSize:this.pageSize,onClick:t=>__async(this,null,(function*(){yield this.fetchComments(t)}))}),this.$el.append(this.readMoreBtn.$el),null==(t=this.conf.pagination)?void 0:t.autoLoad)){const t=this.scrollListenerAt||document;this.autoLoadScrollEvent&&t.removeEventListener("scroll",this.autoLoadScrollEvent),this.autoLoadScrollEvent=()=>{if("read-more"!==this.pageMode)return;if(!this.readMoreBtn)return;if(!this.readMoreBtn.hasMore)return;if(this.isLoading)return;const t=this.$el.querySelector(".atk-list-comments-wrap > .atk-comment-wrap:nth-last-child(3)");t&&function(t,e=document.documentElement){const i=e.clientHeight,s=e.scrollTop,n=s+i,r=t.getBoundingClientRect();return r.top+s+r.height<=n}(t,this.scrollListenerAt)&&this.readMoreBtn.click()},t.addEventListener("scroll",this.autoLoadScrollEvent)}"pagination"===this.pageMode&&(this.pagination=new ae(this.flatMode?this.data.total:this.data.total_roots,{pageSize:this.pageSize,onChange:t=>__async(this,null,(function*(){if(!0===this.ctx.conf.editorTravel&&this.ctx.trigger("editor-travel-back"),yield this.fetchComments(t),this.repositionAt){(this.scrollListenerAt||window).scroll({top:this.repositionAt?St(this.repositionAt).top:0,left:0})}}))}),this.$el.append(this.pagination.$el))}onError(t,e){var i;if(t=String(t),console.error(t),0!==e&&"read-more"===this.pageMode)return void(null==(i=this.readMoreBtn)||i.showErr("获取失败"));const s=xt(`${t},无法获取评论列表数据
    `),n=xt('点击重新获取');n.onclick=()=>this.fetchComments(0),s.appendChild(n);const r=xt(' | 打开控制台');r.onclick=()=>this.ctx.trigger("sidebar-show"),this.ctx.user.data.isAdmin||r.classList.add("atk-hide"),s.appendChild(r),It(this.$el,s)}refreshUI(){const t=this.comments.length<=0;let e=this.$commentsWrap.querySelector(".atk-list-no-comment");t?e||(e=xt('
    '),e.innerHTML=this.noCommentText,this.$commentsWrap.appendChild(e)):null==e||e.remove(),this.ctx.trigger("check-admin-show-el")}createComment(t){const e=new re(this.ctx,t);return e.afterRender=()=>{this.renderComment&&this.renderComment(e)},e.onDelete=t=>{this.deleteComment(t),this.refreshUI()},e}importComments(t){this.flatMode?t.forEach((e=>{this.putCommentFlatMode(e,t,"append")})):this.importCommentsNesting(t)}importCommentsNesting(t){const e=i=>{t.filter((t=>t.rid===i.data.id)).forEach((t=>{const s=this.createComment(t);s.render(),i.putChild(s),e(s)}))};t.filter((t=>0===t.rid)).forEach((t=>{const i=this.createComment(t);i.render(),this.$commentsWrap.appendChild(i.getEl()),i.playFadeInAnim(),this.comments.push(i),e(i),i.checkHeightLimit()}))}putCommentFlatMode(t,e,i){t.is_collapsed&&(t.is_allow_reply=!1);const s=this.createComment(t);if(0!==t.rid){const i=e.find((e=>e.id===t.rid));i&&(s.replyTo=i)}return s.render(),"append"===i&&this.comments.push(s),"prepend"===i&&this.comments.unshift(s),t.visible&&("append"===i&&this.$commentsWrap.append(s.getEl()),"prepend"===i&&this.$commentsWrap.prepend(s.getEl()),s.playFadeInAnim()),s.checkHeightLimit(),s}insertComment(t){if(this.flatMode){qt(this.putCommentFlatMode(t,this.comments.map((t=>t.data)),"prepend").getEl())}else{const e=this.createComment(t);if(e.render(),0===t.rid)this.$commentsWrap.prepend(e.getEl()),this.comments.unshift(e);else{const i=this.findComment(t.rid);i&&(i.putChild(e),e.getParents().forEach((t=>{t.$children&&t.heightLimitRemove(t.$children)})))}e.checkHeightLimit(),qt(e.getEl()),e.playFadeInAnim()}this.data&&(this.data.total+=1),this.refreshUI(),this.ctx.trigger("comments-loaded")}eachComment(t,e){0!==t.length&&t.every((i=>!1!==e(i,t)&&(this.eachComment(i.getChildren(),e),!0)))}findComment(t,e){e||(e=this.comments);let i=null;return this.eachComment(e,(e=>e.data.id!==t||(i=e,!1))),i}deleteComment(t){let e;if("number"==typeof t){if(e=this.findComment(t),!e)throw Error(`未找到评论 ${t}`)}else e=t;e.getEl().remove(),this.eachComment(this.comments,((t,i)=>t!==e||(i.splice(i.indexOf(t),1),!1))),this.data&&(this.data.total-=1),this.refreshUI()}clearAllComments(){this.$commentsWrap.innerHTML="",this.data=void 0,this.comments=[]}updateUnread(t){this.unread=t,!0===this.unreadHighlight&&this.eachComment(this.comments,(t=>{const e=this.unread.find((e=>e.comment_id===t.data.id));e?(t.setUnread(!0),t.setOpenURL(e.read_link),t.openEvt=()=>{this.unread=this.unread.filter((e=>e.comment_id!==t.data.id)),this.ctx.trigger("unread-update",{notifies:this.unread})}):t.setUnread(!1)}))}versionCheck(t){const e=(null==t?void 0:t.fe_min_version)||"0.0.0",i=1===function(t,e){const i=t.split("."),s=e.split(".");for(let n=0;n<3;n++){const t=Number(i[n]),e=Number(s[n]);if(t>e)return 1;if(e>t)return-1;if(!Number.isNaN(t)&&Number.isNaN(e))return 1;if(Number.isNaN(t)&&!Number.isNaN(e))return-1}return 0}(e,"2.1.4");if(i){const t=xt(`
    前端 Artalk 版本已过时,请更新以获得完整体验
    若您是站点管理员,请前往 “官方文档” 获取帮助

    前端版本 2.1.4,需求版本 >= ${e}

    `),i=xt('忽略');i.onclick=()=>{It(this.ctx,null),this.ctx.conf.versionCheck=!1,this.fetchComments(0)},t.append(i),It(this.ctx,t,'Artalk Warn')}return i}}class ce extends oe{constructor(t){var e,i;const s=xt('
    \n
    \n
    \n 0\n 条评论\n
    \n
    \n 关闭评论\n \n \n
    通知中心
    \n
    \n
    \n
    \n
    \n \n
    \n');super(t),__publicField(this,"$closeCommentBtn"),__publicField(this,"$openSidebarBtn"),__publicField(this,"$unreadBadge"),s.querySelector(".atk-list-body").append(this.$el),this.$el=s;let n=!1;"auto"===this.ctx.conf.flatMode?window.matchMedia("(max-width: 768px)").matches&&(n=!0):!0===this.ctx.conf.flatMode&&(n=!0),this.flatMode=n,this.pageMode=(null==(e=this.conf.pagination)?void 0:e.readMore)?"read-more":"pagination",this.pageSize=(null==(i=this.conf.pagination)?void 0:i.pageSize)||20,this.repositionAt=this.$el,this.initListActionBtn(),this.$el.querySelector(".atk-copyright").innerHTML='Powered By Artalk',this.ctx.on("list-reload",(()=>this.fetchComments(0))),this.ctx.on("list-refresh-ui",(()=>this.refreshUI())),this.ctx.on("list-import",(t=>this.importComments(t))),this.ctx.on("list-insert",(t=>this.insertComment(t))),this.ctx.on("list-delete",(t=>this.deleteComment(t.id))),this.ctx.on("list-update",(t=>{t(this.data),this.refreshUI()})),this.ctx.on("unread-update",(t=>{var e;return this.showUnreadBadge((null==(e=t.notifies)?void 0:e.length)||0)}))}initListActionBtn(){this.$openSidebarBtn=this.$el.querySelector('[data-action="open-sidebar"]'),this.$closeCommentBtn=this.$el.querySelector('[data-action="admin-close-comment"]'),this.$unreadBadge=this.$el.querySelector(".atk-unread-badge"),this.$openSidebarBtn.addEventListener("click",(()=>{this.ctx.trigger("sidebar-show")})),this.$closeCommentBtn.addEventListener("click",(()=>{this.data&&(this.data.page.admin_only=!this.data.page.admin_only,this.adminPageEditSave())}))}refreshUI(){var t;super.refreshUI(),this.$el.querySelector(".atk-comment-count-num").innerText=String(Number(null==(t=this.data)?void 0:t.total)||0),this.ctx.user.data.nick&&this.ctx.user.data.email?this.$openSidebarBtn.classList.remove("atk-hide"):this.$openSidebarBtn.classList.add("atk-hide"),this.ctx.trigger("check-admin-show-el"),this.$openSidebarBtn.querySelector(".atk-text").innerText=this.ctx.user.data.isAdmin?"控制中心":"通知中心",this.data&&this.data.page&&!0===this.data.page.admin_only?(this.ctx.trigger("editor-close"),this.$closeCommentBtn.innerHTML="打开评论"):(this.ctx.trigger("editor-open"),this.$closeCommentBtn.innerHTML="关闭评论")}onLoad(t,e){super.onLoad(t,e),this.checkGoToCommentByUrlHash()}checkGoToCommentByUrlHash(){return __async(this,null,(function*(){let t=Number(wt("atk_comment"));if(!t){const e=window.location.hash.match(/#atk-comment-([0-9]+)/);if(!e||!e[1]||Number.isNaN(Number(e[1])))return;t=Number(e[1])}if(!t)return;const e=wt("atk_notify_key");e&&new jt(this.ctx).markRead(e).then((()=>{this.unread=this.unread.filter((e=>e.comment_id!==t)),this.ctx.trigger("unread-update",{notifies:this.unread})}));const i=this.findComment(t);i&&(qt(i.getEl(),!1),window.setTimeout((()=>{i.getEl().classList.add("atk-flash-once")}),800))}))}adminPageEditSave(){this.data&&this.data.page&&(this.ctx.trigger("editor-show-loading"),new jt(this.ctx).pageEdit(this.data.page).then((t=>{this.data&&(this.data.page=__spreadValues({},t)),this.refreshUI()})).catch((t=>{this.ctx.trigger("editor-notify",{msg:`修改页面数据失败:${t.msg||String(t)}`,type:"e"})})).finally((()=>{this.ctx.trigger("editor-hide-loading")})))}showUnreadBadge(t){t>0?(this.$unreadBadge.innerText=`${Number(t||0)}`,this.$unreadBadge.style.display="block"):this.$unreadBadge.style.display="none"}}var he=function(t){var e=function(t){for(var e,i="0123456789ABCDEF",s="",n=0;n>>4&15)+i.charAt(15&e);return s}(function(t){for(var e="",i=0;i<32*t.length;i+=8)e+=String.fromCharCode(t[i>>5]>>>i%32&255);return e}(function(t,e){t[e>>5]|=128<>>9<<4)]=e;for(var i=1732584193,s=-271733879,n=-1732584194,r=271733878,a=0;a>2),i=0;i>5]|=(255&t.charCodeAt(i/8))<>>32-e}(fe(fe(e,t),fe(s,r)),n),i)}function ue(t,e,i,s,n,r,a){return de(e&i|~e&s,t,e,n,r,a)}function pe(t,e,i,s,n,r,a){return de(e&s|i&~s,t,e,n,r,a)}function me(t,e,i,s,n,r,a){return de(e^i^s,t,e,n,r,a)}function ge(t,e,i,s,n,r,a){return de(i^(e|~s),t,e,n,r,a)}function fe(t,e){var i=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(i>>16)<<16|65535&i}class ke extends i{constructor(t,e){super(t),__publicField(this,"viewTabs",{}),__publicField(this,"viewActiveTab",""),__publicField(this,"$parent"),this.$parent=e,this.$el=xt('
    ')}mount(t){}switchTab(t,e){}}__publicField(ke,"viewName",""),__publicField(ke,"viewTitle",""),__publicField(ke,"viewAdminOnly",!1);class be extends ke{constructor(){super(...arguments),__publicField(this,"viewTabs",{}),__publicField(this,"viewActiveTab",""),__publicField(this,"list")}mount(t){this.ctx.user.data.isAdmin?(this.viewTabs={admin_all:"全部",admin_pending:"待审",all:"个人"},this.viewActiveTab="admin_all"):(this.viewTabs={mentions:"提及",all:"全部",mine:"我的",pending:"待审"},this.viewActiveTab="mentions"),this.list=new oe(this.ctx),this.list.flatMode=!0,this.list.unreadHighlight=!0,this.list.scrollListenerAt=this.$parent,this.list.pageMode="pagination",this.list.noCommentText='
    无内容
    ',this.list.renderComment=t=>{t.setOpenURL(`${t.data.page_key}#atk-comment-${t.data.id}`),t.onReplyBtnClick=()=>{!0===this.ctx.conf.editorTravel?this.ctx.trigger("editor-reply",{data:t.data,$el:t.$el,scroll:!1}):(this.ctx.trigger("sidebar-hide"),this.ctx.trigger("editor-reply",{data:t.data,$el:t.$el,scroll:!0}))}},this.list.paramsEditor=e=>{e.site_name=t},this.$el.innerHTML="",this.$el.append(this.list.$el),this.switchTab(this.viewActiveTab,t)}switchTab(t,e){return this.viewActiveTab=t,this.list.paramsEditor=i=>{i.type=t,i.site_name=e},this.list.fetchComments(0),!0}}__publicField(be,"viewName","comments"),__publicField(be,"viewTitle","评论");class ye{constructor(t){__publicField(this,"conf"),__publicField(this,"$el"),__publicField(this,"$input"),__publicField(this,"$yesBtn"),__publicField(this,"$noBtn"),__publicField(this,"value",""),__publicField(this,"allowSubmit",!0),this.conf=t,this.$el=xt('
    \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    '),this.$input=this.$el.querySelector(".atk-main-input"),this.$yesBtn=this.$el.querySelector(".atk-yes-btn"),this.$noBtn=this.$el.querySelector(".atk-no-btn"),this.$input.value=t.initValue||"",this.value=t.initValue||"",this.conf.placeholder&&(this.$input.placeholder=this.conf.placeholder),this.$input.oninput=()=>this.onInput(),this.$input.onkeyup=t=>{"Enter"!==t.key&&13!==t.keyCode||(t.preventDefault(),this.submit())},window.setTimeout((()=>this.$input.focus()),80),this.$yesBtn.onclick=()=>{this.submit()},this.$noBtn.onclick=()=>{this.cancel()}}appendTo(t){return t.append(this.$el),this}onInput(){if(this.value=this.$input.value,this.conf.validator){const t=this.conf.validator(this.value);this.setAllowSubmit(t),t?this.$input.classList.remove("atk-invalid"):this.$input.classList.add("atk-invalid")}}setAllowSubmit(t){this.allowSubmit!==t&&(this.allowSubmit=t,t?this.$yesBtn.classList.remove(".atk-disabled"):this.$yesBtn.classList.add(".atk-disabled"))}submit(){return __async(this,null,(function*(){if(this.allowSubmit)if(this.conf.onYes){let t;t=this.conf.onYes instanceof(()=>__async(this,null,(function*(){}))).constructor?yield this.conf.onYes(this.value):this.conf.onYes(this.value),void 0!==t&&!0!==t||this.closeEditor()}else this.closeEditor()}))}cancel(){return __async(this,null,(function*(){if(this.conf.onNo){let t;t=this.conf.onNo instanceof(()=>__async(this,null,(function*(){}))).constructor?yield this.conf.onNo():this.conf.onNo(),void 0!==t&&!0!==t||this.closeEditor()}else this.closeEditor()}))}closeEditor(){this.$el.remove()}}class $e extends i{constructor(t){super(t),__publicField(this,"$editor"),__publicField(this,"$inputer"),__publicField(this,"pages",[]),this.$el=xt('
    ')}clearAll(){this.pages=[],this.$el.innerHTML=""}importPages(t){this.pages.push(...t),t.forEach((t=>{const e=this.renderPage(t);this.$el.append(e)}))}renderPage(t){const e=xt('
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    '),i=e.querySelector(".atk-page-main"),s=i.querySelector(".atk-title"),n=i.querySelector(".atk-sub"),r=e.querySelector(".atk-edit-btn");return s.innerText=t.title,n.innerText=t.url||t.key,r.onclick=()=>this.showEditor(t,e),e}showEditor(t,e){this.closeEditor(),this.$editor=xt('
    \n
    \n
    标题修改
    \n
    KEY 变更
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    '),e.prepend(this.$editor);const i=this.$editor.querySelector(".atk-title-edit-btn"),s=this.$editor.querySelector(".atk-key-edit-btn"),n=this.$editor.querySelector(".atk-admin-only-btn"),r=this.$editor.querySelector(".atk-sync-btn"),a=this.$editor.querySelector(".atk-del-btn"),l=this.$editor.querySelector(".atk-close-btn"),o=()=>{Ot(this.$editor)},c=()=>{Bt(this.$editor)},h=t=>{window.alert(t)};l.onclick=()=>this.closeEditor();const d=i=>{const s=new ye({initValue:t[i]||"",onYes:n=>__async(this,null,(function*(){let r;Ot(s.$el);try{r=yield new jt(this.ctx).pageEdit(__spreadProps(__spreadValues({},t),{[i]:n}))}catch(a){return h(`修改失败:${a.msg||"未知错误"}`),console.error(a),!1}finally{Bt(s.$el)}return e.replaceWith(this.renderPage(r)),!0}))});s.appendTo(this.$editor)};i.onclick=()=>d("title"),s.onclick=()=>d("key");const u=new ne({text:()=>(n.classList.remove("atk-green","atk-yellow"),n.classList.add(t.admin_only?"atk-yellow":"atk-green"),t.admin_only?"管理员可评":"所有人可评")}).appendTo(n);n.onclick=()=>__async(this,null,(function*(){let e;o();try{e=yield new jt(this.ctx).pageEdit(__spreadProps(__spreadValues({},t),{admin_only:!t.admin_only}))}catch(i){return h(`修改失败:${i.msg||"未知错误"}`),void console.log(i)}finally{c()}t.admin_only=e.admin_only,u.updateText()})),r.onclick=()=>__async(this,null,(function*(){let i;o();try{i=yield new jt(this.ctx).pageFetch(t.id)}catch(s){return h(`同步失败:${s.msg||"未知错误"}`),void console.log(s)}finally{c()}e.replaceWith(this.renderPage(i))})),a.onclick=()=>{window.confirm(`确认删除页面 "${t.title||t.key}"?将会删除所有相关数据`)&&(()=>{__async(this,null,(function*(){o();try{yield new jt(this.ctx).pageDel(t.key,t.site_name)}catch(i){return console.log(i),void h(`删除失败 ${String(i)}`)}finally{c()}e.remove()}))})()}}closeEditor(){this.$editor&&this.$editor.remove()}}class ve extends ke{constructor(){super(...arguments),__publicField(this,"viewTabs",{}),__publicField(this,"viewActiveTab",""),__publicField(this,"pageList"),__publicField(this,"pagination")}mount(t){this.pageList||(this.pageList=new $e(this.ctx),this.$el.append(this.pageList.$el)),this.switchTab(this.viewActiveTab,t)}switchTab(t,e){this.reqPages(e,0)}reqPages(t,e){return __async(this,null,(function*(){var i;this.pageList.clearAll(),null==(i=this.$el.parentNode)||i.scrollTo(0,0),Ot(this.$el);const s=yield new jt(this.ctx).pageGet(t,e,20);this.pageList.importPages(s.pages||[]),Bt(this.$el),this.pagination||(this.pagination=new ae(s.total,{pageSize:20,onChange:e=>{this.reqPages(t,e)}}),this.$el.append(this.pagination.$el)),this.pagination&&0===e&&this.pagination.update(e,s.total)}))}}__publicField(ve,"viewName","pages"),__publicField(ve,"viewTitle","页面"),__publicField(ve,"viewAdminOnly",!0);class xe extends i{constructor(t){super(t),__publicField(this,"sites",[]),__publicField(this,"$header"),__publicField(this,"$headerTitle"),__publicField(this,"$headerActions"),__publicField(this,"$rowsWrap"),__publicField(this,"$editor"),__publicField(this,"activeSite",""),__publicField(this,"$add"),this.$el=xt('
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    '),this.$header=this.$el.querySelector(".atk-header"),this.$headerTitle=this.$header.querySelector(".atk-title"),this.$headerActions=this.$header.querySelector(".atk-actions"),this.$rowsWrap=this.$el.querySelector(".atk-site-rows-wrap"),this.$headerTitle.innerText="共 0 个站点";this.$headerActions.querySelector(".atk-site-add-btn").onclick=()=>{this.closeEditor(),this.showAdd()}}loadSites(t){let e;this.sites=t,this.activeSite="",this.$rowsWrap.innerHTML="",this.$headerTitle.innerText="共 0 个站点";for(let i=0;i'),this.$rowsWrap.append(e));const n=this.renderSite(s,e);e.append(n)}this.$headerTitle.innerText=`共 ${t.length} 个站点`}renderSite(t,e){const i=xt('
    \n \n
    \n
    '),s=i.querySelector(".atk-site-logo"),n=i.querySelector(".atk-site-name"),r=()=>{i.classList.add("atk-active")};return s.innerText=t.name.substr(0,1),n.innerText=t.name,i.onclick=()=>{this.closeEditor(),this.closeAdd(),r(),this.showEditor(t,i,e)},this.activeSite===t.name&&r(),i}showEditor(t,e,i){this.activeSite=t.name,this.$editor=xt('\n
    \n
    \n
    \n \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    重命名
    \n
    修改 URL
    \n \x3c!--
    导出
    \n
    导入
    --\x3e\n
    \n
    \n
    \n \n
    \n
    \n
    \n
    '),i.before(this.$editor);const s=this.$editor.querySelector(".atk-site-name"),n=this.$editor.querySelector(".atk-site-urls");this.$editor.querySelector(".atk-close-btn").onclick=()=>this.closeEditor();const r=e=>{var i;t=e,s.innerText=t.name,s.onclick=()=>{t.first_url&&window.open(t.first_url)},n.innerHTML="",null==(i=t.urls)||i.forEach((t=>{const e=xt('');n.append(e),e.innerText=(t||"").replace(/\/$/,""),e.onclick=()=>{window.open(t)}}))};r(t);const a=this.$editor.querySelector(".atk-main"),l=this.$editor.querySelector(".atk-site-text-actions"),o=l.querySelector(".atk-rename-btn"),c=l.querySelector(".atk-edit-url-btn"),h=this.$editor.querySelector(".atk-del-btn"),d=()=>{Ot(this.$editor)},u=()=>{Bt(this.$editor)},p=t=>{window.alert(t)},m=s=>{let n=t[s]||"";"urls"===s&&(n=t.urls_raw||"");const l=new ye({initValue:n,onYes:n=>__async(this,null,(function*(){let a;Ot(l.$el);try{a=yield new jt(this.ctx).siteEdit(__spreadProps(__spreadValues({},t),{[s]:n}))}catch(o){return p(`修改失败:${o.msg||"未知错误"}`),console.error(o),!1}finally{Bt(l.$el)}return e.replaceWith(this.renderSite(a,i)),r(a),!0}))});l.appendTo(a)};o.onclick=()=>m("name"),c.onclick=()=>m("urls"),h.onclick=()=>{window.confirm(`确认删除站点 "${t.name}"?将会删除所有相关数据`)&&(()=>{__async(this,null,(function*(){d();try{yield new jt(this.ctx).siteDel(t.id,!0)}catch(i){return console.log(i),void p(`删除失败 ${String(i)}`)}finally{u()}this.closeEditor(),e.remove(),this.sites=this.sites.filter((e=>e.name!==t.name))}))})()}}closeEditor(){this.$editor&&(this.$editor.remove(),this.$rowsWrap.querySelectorAll(".atk-site-item").forEach((t=>t.classList.remove("atk-active"))),this.activeSite="")}showAdd(){this.closeAdd(),this.$add=xt('\n
    \n
    \n
    新增站点
    \n
    \n \n
    \n
    \n
    \n \n \n \n
    \n
    '),this.$header.after(this.$add);this.$add.querySelector(".atk-close-btn").onclick=()=>this.closeAdd();const t=this.$add.querySelector('[name="AtkSiteName"]'),e=this.$add.querySelector('[name="AtkSiteUrls"]'),i=this.$add.querySelector('[name="AtkSubmit"]');i.onclick=()=>__async(this,null,(function*(){const i=t.value.trim(),s=e.value.trim();if(""===i)return void t.focus();let n;Ot(this.$add);try{n=yield new jt(this.ctx).siteAdd(i,s)}catch(r){return window.alert(`创建失败:${r.msg||""}`),void console.error(r)}finally{Bt(this.$add)}this.sites.push(n),this.loadSites(this.sites),this.closeAdd()}));const s=t=>{"Enter"===t.key&&i.click()};t.onkeyup=t=>s(t),e.onkeyup=t=>s(t)}closeAdd(){var t;null==(t=this.$add)||t.remove()}}class _e extends ke{constructor(){super(...arguments),__publicField(this,"viewTabs",{}),__publicField(this,"viewActiveTab",""),__publicField(this,"siteList")}mount(t){this.siteList||(this.siteList=new xe(this.ctx),this.$el.append(this.siteList.$el)),this.reqSites()}switchTab(t,e){this.reqSites()}reqSites(){return __async(this,null,(function*(){const t=yield new jt(this.ctx).siteGet();this.siteList.loadSites(t)}))}}__publicField(_e,"viewName","sites"),__publicField(_e,"viewTitle","站点"),__publicField(_e,"viewAdminOnly",!0);class we extends ke{constructor(){super(...arguments),__publicField(this,"ß"),__publicField(this,"viewTabs",{import:"导入",export:"导出"}),__publicField(this,"viewActiveTab","import")}mount(t){this.switchTab("import",t)}switchTab(t,e){if("import"===t)this.initImport();else if("export"===t)return this.initExport(),!1;return!0}initImport(){this.$el.innerHTML='\n
    \n
    数据类型
    \n \n
    数据文件
    \n \n
    目标站点名
    \n \n
    目标站点 URL
    \n \n
    启动参数(可选)
    \n \n 启动参数查阅:“文档 · 数据搬家\n \n
    ';const t=this.$el.querySelector(".atk-form"),e=t.querySelector('[name="AtkDataType"]'),i=t.querySelector('[name="AtkDataFile"]'),s=t.querySelector(".atk-data-file-label"),n=t.querySelector('[name="AtkSiteName"]'),r=t.querySelector('[name="AtkSiteURL"]'),a=t.querySelector('[name="AtkPayload"]'),l=t.querySelector('[name="AtkSubmit"]'),o=t=>window.alert(t);e.onchange=()=>{["typecho"].includes(e.value)?(i.style.display="none",s.style.display="none"):(i.style.display="",s.style.display="")},l.onclick=()=>{var s;const l=e.value.trim(),c=n.value.trim(),h=r.value.trim(),d=a.value.trim();if(""===l)return void o("请选择数据类型");let u={};if(d){try{u=JSON.parse(d)}catch(g){return void o(`Payload JSON 格式有误:${String(g)}`)}if(u instanceof Object)return void o("Payload 需为 JSON 对象")}c&&(u.t_name=c),h&&(u.t_url=h);const p=e=>{const i=this.$el.querySelector(".atk-log-wrap"),s=i.querySelector(".atk-log"),n=this.$el.querySelector(".atk-log-back-btn");i.style.display="",t.style.display="none",n.onclick=()=>{i.style.display="none",t.style.display=""},e&&(u.json_data=e);const r="f_"+ +new Date,a=document.createElement("iframe");a.className="atk-iframe",a.name=r,s.innerHTML="",s.append(a);const o={type:l,payload:JSON.stringify(u),token:this.ctx.user.data.token||""},c=document.createElement("form");c.style.display="none",c.setAttribute("method","post"),c.setAttribute("action",`${this.ctx.conf.server}/admin/import`),c.setAttribute("target",r),Object.entries(o).forEach((([t,e])=>{const i=document.createElement("input");i.setAttribute("type","hidden"),i.setAttribute("name",t),i.value=e,c.appendChild(i)})),i.append(c),c.submit(),c.remove()},m=new FileReader;m.onload=()=>{const t=String(m.result);p(t)},(null==(s=i.files)?void 0:s.length)?m.readAsText(i.files[0]):p()}}initExport(){return __async(this,null,(function*(){Ot(this.$el);try{const t=yield new jt(this.ctx).export();this.download(`artrans-${this.getYmdHisFilename()}.json`,t)}catch(t){return console.log(t),void window.alert(`${String(t)}`)}finally{Bt(this.$el)}}))}download(t,e){const i=document.createElement("a");i.setAttribute("href",`data:text/json;charset=utf-8,${encodeURIComponent(e)}`),i.setAttribute("download",t),i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i)}getYmdHisFilename(){const t=new Date,e=t.getFullYear(),i=t.getMonth()+1,s=t.getDate(),n=t.getHours(),r=t.getMinutes(),a=t.getSeconds();return`${e}${i}${s}-${n}${Tt(r,2)}${Tt(a,2)}`}}__publicField(we,"viewName","transfer"),__publicField(we,"viewTitle","迁移"),__publicField(we,"viewAdminOnly",!0);class Se{constructor(t,e){__publicField(this,"ctx"),__publicField(this,"conf"),__publicField(this,"$el"),__publicField(this,"sites",[]),__publicField(this,"$sites"),__publicField(this,"outsideChecker"),this.ctx=t,this.conf=e,this.$el=xt(''),this.$sites=this.$el.querySelector(".atk-sites")}load(t){return __async(this,null,(function*(){this.$sites.innerHTML="";const e=(e,i,s,n)=>{const r=xt('
    \n \n
    \n
    ');r.onclick=n?()=>n():()=>this.switch(s||e),r.setAttribute("data-name",s||e);const a=r.querySelector(".atk-site-logo"),l=r.querySelector(".atk-site-name");a.innerText=i,l.innerText=e,t===(s||e)&&r.classList.add("atk-active"),this.$sites.append(r)};e("所有站点","_","__ATK_SITE_ALL");(yield new jt(this.ctx).siteGet()).forEach((t=>{e(t.name,t.name.substr(0,1))})),e("站点管理","+","",(()=>{this.conf.onClickSitesViewBtn(),this.hide()}))}))}switch(t){!1!==this.conf.onSwitchSite(t)&&(this.$sites.querySelectorAll(".atk-site-item").forEach((e=>{e.getAttribute("data-name")!==t?e.classList.remove("atk-active"):e.classList.add("atk-active")})),this.hide())}show(t){this.$el.style.display="",t&&(this.outsideChecker=e=>{t.contains(e.target)||this.$el.contains(e.target)||this.hide()},document.addEventListener("click",this.outsideChecker))}hide(){this.$el.style.display="none",this.outsideChecker&&document.removeEventListener("click",this.outsideChecker)}}const Te="comments",Le=[be,ve,_e,we];class Ae extends i{constructor(t){super(t),__publicField(this,"layer"),__publicField(this,"$header"),__publicField(this,"$headerMenu"),__publicField(this,"$title"),__publicField(this,"$avatar"),__publicField(this,"$siteLogo"),__publicField(this,"$closeBtn"),__publicField(this,"$nav"),__publicField(this,"$curtViewBtn"),__publicField(this,"$curtViewBtnIcon"),__publicField(this,"$curtViewBtnText"),__publicField(this,"$navTabs"),__publicField(this,"$navViews"),__publicField(this,"$viewWrap"),__publicField(this,"siteSwitcher"),__publicField(this,"curtSite"),__publicField(this,"curtView",Te),__publicField(this,"curtTab"),__publicField(this,"viewInstances",{}),__publicField(this,"viewSwitcherShow",!1),__publicField(this,"firstShow",!0),this.$el=xt('
    \n
    \n
    \n \n \n \n \n 控制中心\n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n'),this.$header=this.$el.querySelector(".atk-sidebar-header"),this.$headerMenu=this.$header.querySelector(".atk-menu"),this.$title=this.$header.querySelector(".atk-sidebar-title"),this.$avatar=this.$header.querySelector(".atk-avatar"),this.$closeBtn=this.$header.querySelector(".atk-sidebar-close"),this.$nav=this.$el.querySelector(".atk-sidebar-nav"),this.$curtViewBtn=this.$nav.querySelector(".akt-curt-view-btn"),this.$curtViewBtnIcon=this.$curtViewBtn.querySelector(".atk-icon"),this.$curtViewBtnText=this.$curtViewBtn.querySelector(".atk-text"),this.$navTabs=this.$nav.querySelector(".atk-tabs"),this.$navViews=this.$nav.querySelector(".atk-views"),this.$viewWrap=this.$el.querySelector(".atk-sidebar-view-wrap"),this.initViewSwitcher(),this.$closeBtn.onclick=()=>{this.hide()},this.ctx.on("sidebar-show",(()=>this.show())),this.ctx.on("sidebar-hide",(()=>this.hide())),this.ctx.on("user-changed",(()=>{this.firstShow=!0}))}get isAdmin(){return this.ctx.user.data.isAdmin}get curtViewInstance(){return this.curtView?this.viewInstances[this.curtView]:void 0}initViewSwitcher(){this.$curtViewBtn.onclick=()=>{this.toggleViewSwitcher()},this.$navViews.innerHTML="",Le.forEach((t=>{const e=xt('
    ');this.$navViews.append(e),e.setAttribute("data-name",t.viewName),e.innerText=t.viewTitle,t.viewName===this.curtView&&(e.classList.add("atk-active"),this.$curtViewBtnText.innerText=t.viewTitle),e.onclick=()=>{this.switchView(t.viewName),this.toggleViewSwitcher()}}))}toggleViewSwitcher(){this.viewSwitcherShow?(this.$navViews.style.display="none",this.$navTabs.style.display="",this.$curtViewBtnIcon.classList.remove("atk-arrow")):(this.$navViews.style.display="",this.$navTabs.style.display="none",this.$curtViewBtnIcon.classList.add("atk-arrow")),this.viewSwitcherShow=!this.viewSwitcherShow}show(){return __async(this,null,(function*(){if(this.$el.style.transform="",this.layer=new Ut(this.ctx,"sidebar",this.$el),this.layer.afterHide=()=>{!0===this.ctx.conf.editorTravel&&this.ctx.trigger("editor-travel-back")},this.layer.show(),this.$viewWrap.scrollTo(0,0),setTimeout((()=>{this.$el.style.transform="translate(0, 0)"}),20),this.firstShow){if(this.isAdmin){this.$title.innerText="控制中心",this.$curtViewBtn.style.display="",this.siteSwitcher||(this.siteSwitcher=new Se(this.ctx,{onSwitchSite:t=>{this.switchSite(t)},onClickSitesViewBtn:()=>{this.switchView("sites")}}),this.$viewWrap.before(this.siteSwitcher.$el),this.$avatar.onclick=t=>{var e;this.isAdmin&&(null==(e=this.siteSwitcher)||e.show(t.target))}),this.curtSite=this.conf.site,Ot(this.$el);try{yield this.siteSwitcher.load(this.curtSite)}catch(t){const e=xt(`加载失败:${t.msg||"网络错误"}
    `),i=xt('点击重新获取');return e.appendChild(i),i.onclick=()=>{It(this.$el,null),this.show()},void It(this.$el,e)}finally{Bt(this.$el)}this.$avatar.innerHTML="",this.$siteLogo=xt(''),this.$siteLogo.innerText=(this.curtSite||"").substr(0,1),this.$avatar.append(this.$siteLogo)}else{this.$title.innerText="通知中心",this.$curtViewBtn.style.display="none",this.curtSite=this.conf.site;const t=document.createElement("img");t.src=Ct(this.ctx,he(this.ctx.user.data.email.toLowerCase())),this.$avatar.innerHTML="",this.$avatar.append(t)}this.switchView(Te),this.firstShow=!1}}))}hide(){var t;this.$el.style.transform="",null==(t=this.layer)||t.hide()}switchView(t){let e=this.viewInstances[t];if(!e){e=new(Le.find((e=>e.viewName===t)))(this.ctx,this.$viewWrap),this.viewInstances[t]=e}e.mount(this.curtSite),this.curtView=t,this.curtTab=e.viewActiveTab,this.$curtViewBtnText.innerText=e.constructor.viewTitle,this.$navViews.querySelectorAll(".atk-tab-item").forEach((e=>{e.getAttribute("data-name")===t?e.classList.add("atk-active"):e.classList.remove("atk-active")})),this.loadViewTabs(e),this.$viewWrap.innerHTML="",this.$viewWrap.append(e.$el),this.$viewWrap.classList.forEach((t=>{t.startsWith("atk-view-name-")&&this.$viewWrap.classList.remove(t)})),this.$viewWrap.classList.add(`atk-view-name-${e.constructor.viewName}`)}loadViewTabs(t){this.$navTabs.innerHTML="",Object.entries(t.viewTabs).forEach((([e,i])=>{const s=xt('
    ');this.$navTabs.append(s),s.innerText=i,t.viewActiveTab===e&&s.classList.add("atk-active"),s.onclick=()=>{!1!==t.switchTab(e,this.curtSite)&&(this.$navTabs.querySelectorAll(".atk-active").forEach((t=>t.classList.remove("atk-active"))),s.classList.add("atk-active"),this.curtTab=e)}}))}switchSite(t){this.curtSite=t;const e=this.curtViewInstance;null==e||e.switchTab(this.curtTab,t),this.$siteLogo&&(this.$siteLogo.innerText=this.curtSite.substr(0,1))}}const Ce=class{constructor(t){__publicField(this,"ctx"),__publicField(this,"conf"),__publicField(this,"$root"),__publicField(this,"checkerLauncher"),__publicField(this,"editor"),__publicField(this,"list"),__publicField(this,"sidebar"),this.conf=__spreadValues(__spreadValues({},Ce.defaults),t),this.conf.server=this.conf.server.replace(/\/$/,""),this.conf.pageKey||(this.conf.pageKey=`${window.location.protocol}//${window.location.host}${window.location.pathname}`);try{const t=document.querySelector(this.conf.el);if(!t)throw Error(`Sorry, target element "${this.conf.el}" was not found.`);this.$root=t}catch(i){throw console.error(i),new Error("Please check your Artalk `el` config.")}this.ctx=new e(this.$root,this.conf),this.$root.classList.add("artalk"),this.$root.innerHTML="",this.initDarkMode(),this.checkerLauncher=new Yt(this.ctx),this.editor=new Jt(this.ctx),this.$root.appendChild(this.editor.$el),this.list=new ce(this.ctx),this.$root.appendChild(this.list.$el),this.sidebar=new Ae(this.ctx),this.$root.appendChild(this.sidebar.$el),this.list.fetchComments(0),this.initEventBind()}initEventBind(){window.addEventListener("hashchange",(()=>{this.list.checkGoToCommentByUrlHash()})),this.ctx.on("check-admin-show-el",(()=>{const t=[];this.$root.querySelectorAll("[atk-only-admin-show]").forEach((e=>t.push(e)));const{$wrap:e}=zt(this.ctx);e&&e.querySelectorAll("[atk-only-admin-show]").forEach((e=>t.push(e))),t.forEach((t=>{this.ctx.user.data.isAdmin?t.classList.remove("atk-hide"):t.classList.add("atk-hide")}))})),this.ctx.on("user-changed",(()=>{this.ctx.trigger("check-admin-show-el"),this.ctx.trigger("list-refresh-ui")}))}reload(){this.list.fetchComments(0)}initDarkMode(){const t="atk-dark-mode";this.conf.darkMode?this.$root.classList.add(t):this.$root.classList.remove(t);const{$wrap:e}=zt(this.ctx);e&&(this.conf.darkMode?e.classList.add(t):e.classList.remove(t))}setDarkMode(t){this.ctx.conf.darkMode=t,this.initDarkMode()}on(t,e){this.ctx.on(t,e,"external")}off(t,e){this.ctx.off(t,e,"external")}trigger(t,e){this.ctx.trigger(t,e,"external")}};let Ee=Ce;return __publicField(Ee,"defaults",{el:"",pageKey:"",server:"",site:"",placeholder:"键入内容...",noComment:"「此时无声胜有声」",sendBtn:"发送评论",darkMode:!1,editorTravel:!0,emoticons:"https://cdn.jsdelivr.net/gh/ArtalkJS/Emoticons/grps/default.json",vote:!0,voteDown:!1,uaBadge:!0,flatMode:"auto",maxNesting:3,gravatar:{default:"mp",mirror:"https://sdn.geekzu.org/avatar/"},pagination:{pageSize:20,readMore:!0,autoLoad:!0},heightLimit:{content:300,children:400},reqTimeout:15e3,versionCheck:!0}),Ee})); diff --git a/exampleSite/config.toml b/exampleSite/config.toml index bb962692..3259b513 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -707,13 +707,19 @@ enableEmoji = true # Comment config # 评论系统设置 [params.page.comment] - enable = true - # Artalk comment system config - # Artalk 评论系统设置 + enable = false + # Artalk comment config (https://artalk.js.org/) since v0.2.12 + # Artalk 评论系统设置 (https://artalk.js.org/) since v0.2.12 [params.page.comment.artalk] - enable = true + enable = false server = "https://yourdomain/api/" - sitename = "默认站点" + site = "your site name" + placeholder = "" + noComment = "" + sendBtn = "" + editorTravel = true + flatMode = 'auto' + maxNesting = 3 # Disqus comment config (https://disqus.com/) # Disqus 评论系统设置 (https://disqus.com/) [params.page.comment.disqus] diff --git a/exampleSite/content/about/index.en.md b/exampleSite/content/about/index.en.md index bb961d78..179c7ac0 100644 --- a/exampleSite/content/about/index.en.md +++ b/exampleSite/content/about/index.en.md @@ -58,7 +58,8 @@ math: * :(far fa-comments fa-fw): **Facebook comments** system supported by [Facebook](https://developers.facebook.com/docs/plugins/comments/) * :(fas fa-comment fa-fw): **Telegram comments** system supported by [Comments](https://comments.app/) * :(fas fa-comment-dots fa-fw): **Commento** comment system supported by [Commento](https://commento.io/) -* :(fas fa-comment-alt fa-fw): **Utterances** comment system supported by [Utterances](https://utteranc.es/) +* :(far fa-comment-alt fa-fw): **Utterances** comment system supported by [Utterances](https://utteranc.es/) +* :(far fa-comment-alt fa-fw): **Artalk** comment system supported by [Artalk](https://artalk.js.org/) #### Extended Features @@ -120,4 +121,5 @@ Thanks to the authors of following resources included in the theme: * [Valine](https://valine.js.org/) * [cookieconsent](https://github.com/osano/cookieconsent) * [Watermark](https://github.com/Lruihao/watermark) -* [pangu.js](https://github.com/vinta/pangu.js) \ No newline at end of file +* [pangu.js](https://github.com/vinta/pangu.js) +* [Artalk](https://artalk.js.org/) \ No newline at end of file diff --git a/exampleSite/content/about/index.zh-cn.md b/exampleSite/content/about/index.zh-cn.md index ce622125..411707e5 100644 --- a/exampleSite/content/about/index.zh-cn.md +++ b/exampleSite/content/about/index.zh-cn.md @@ -59,6 +59,7 @@ math: * :(fas fa-comment fa-fw): 支持 **[Telegram comments](https://comments.app/) 评论**系统 * :(fas fa-comment-dots fa-fw): 支持 **[Commento](https://commento.io/)** 评论系统 * :(far fa-comment-alt fa-fw): 支持 **[Utterances](https://utteranc.es/)** 评论系统 +* :(far fa-comment-alt fa-fw): 支持 **[Artalk](https://artalk.js.org/)** 评论系统 #### 扩展功能 @@ -121,3 +122,4 @@ FixIt 主题中用到了以下项目,感谢它们的作者: * [cookieconsent](https://github.com/osano/cookieconsent) * [Watermark](https://github.com/Lruihao/watermark) * [pangu.js](https://github.com/vinta/pangu.js) +* [Artalk](https://artalk.js.org/) diff --git a/exampleSite/content/posts/theme-documentation-basics/index.en.md b/exampleSite/content/posts/theme-documentation-basics/index.en.md index 250c9aa0..1e7c6c0a 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.en.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.en.md @@ -497,9 +497,21 @@ Please open the code block below to view the complete sample configuration :(far Skype = false Trello = false Mix = false - # {{< version 0.2.0 changed >}} Comment config + # {{< version 0.2.13 changed >}} Comment config [params.page.comment] - enable = true + enable = false + # {{< version 0.2.13 >}} + # {{< link "https://artalk.js.org/" Artalk >}} comment config (https://artalk.js.org/) + [params.page.comment.artalk] + enable = false + server = "https://yourdomain/api/" + site = "your site name" + placeholder = "" + noComment = "" + sendBtn = "" + editorTravel = true + flatMode = 'auto' + maxNesting = 3 # {{< link "https://disqus.com/" Disqus >}} comment config (https://disqus.com) [params.page.comment.disqus] # {{< version 0.1.1 >}} 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 9a91c65e..406adcf8 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md @@ -508,9 +508,21 @@ hugo Skype = false Trello = false Mix = false - # {{< version 0.2.0 changed >}} 评论系统设置 + # {{< version 0.2.13 changed >}} 评论系统设置 [params.page.comment] - enable = true + enable = false + # {{< version 0.2.13 >}} + # {{< link "https://artalk.js.org/" Artalk >}} 评论系统设置 (https://artalk.js.org/) + [params.page.comment.artalk] + enable = false + server = "https://yourdomain/api/" + site = "你的网站名称" + placeholder = "" + noComment = "" + sendBtn = "" + editorTravel = true + flatMode = 'auto' + maxNesting = 3 # {{< link "https://disqus.com/" Disqus >}} 评论系统设置 (https://disqus.com) [params.page.comment.disqus] # {{< version 0.1.1 >}} diff --git a/layouts/partials/comment.html b/layouts/partials/comment.html index 426f48db..caa624cc 100644 --- a/layouts/partials/comment.html +++ b/layouts/partials/comment.html @@ -4,159 +4,141 @@ {{- $commentConfig := dict -}} {{- if $comment.enable -}} -
    - {{- /* Artalk Comment System */ -}} - {{- $artalk := $comment.artalk | default dict -}} - {{- if $artalk.enable -}} -
    - - - - - -
    - - {{- end -}} +
    + {{- /* Artalk Comment System */ -}} + {{- $artalk := $comment.artalk | default dict -}} + {{- if $artalk.enable -}} +
    + {{- $source := $cdn.artalkCSS | default "lib/artalk/Artalk.min.css" -}} + {{- dict "Source" $source "Minify" true "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}} + {{- $source := $cdn.artalkJS | default "lib/artalk/Artalk.min.js" -}} + {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} + {{- $commentConfig = dict "el" "#artalk" "server" $artalk.server "site" $artalk.site "placeholder" $artalk.placeholder "noComment" $artalk.noComment "sendBtn" $artalk.sendBtn "editorTravel" $artalk.editorTravel "flatMode" $artalk.flatMode "maxNesting" $artalk.maxNesting | dict "artalk" | merge $commentConfig -}} + + {{- end -}} - {{- /* Disqus Comment System */ -}} - {{- $disqus := $comment.disqus | default dict -}} - {{- if $disqus.enable -}} -
    - {{- $source := printf "https://%v.disqus.com/embed.js" $disqus.shortname -}} - {{- dict "Source" $source "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - - {{- end -}} + {{- /* Disqus Comment System */ -}} + {{- $disqus := $comment.disqus | default dict -}} + {{- if $disqus.enable -}} +
    + {{- $source := printf "https://%v.disqus.com/embed.js" $disqus.shortname -}} + {{- dict "Source" $source "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} + + {{- end -}} - {{- /* Gitalk Comment System */ -}} - {{- $gitalk := $comment.gitalk | default dict -}} - {{- if $gitalk.enable -}} -
    - {{- $source := $cdn.gitalkCSS | default "lib/gitalk/gitalk.css" -}} - {{- dict "Source" $source "Minify" true "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial - "scratch/style.html" -}} - {{- $source := $cdn.gitalkJS | default "lib/gitalk/gitalk.min.js" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" - -}} - {{- $commentConfig = dict "id" .Date "title" .Title "clientID" $gitalk.clientId "clientSecret" $gitalk.clientSecret - "repo" $gitalk.repo "owner" $gitalk.owner "admin" (slice $gitalk.owner) | dict "gitalk" | merge $commentConfig -}} - - {{- end -}} + {{- /* Gitalk Comment System */ -}} + {{- $gitalk := $comment.gitalk | default dict -}} + {{- if $gitalk.enable -}} +
    + {{- $source := $cdn.gitalkCSS | default "lib/gitalk/gitalk.css" -}} + {{- dict "Source" $source "Minify" true "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}} + {{- $source := $cdn.gitalkJS | default "lib/gitalk/gitalk.min.js" -}} + {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} + {{- $commentConfig = dict "id" .Date "title" .Title "clientID" $gitalk.clientId "clientSecret" $gitalk.clientSecret "repo" $gitalk.repo "owner" $gitalk.owner "admin" (slice $gitalk.owner) | dict "gitalk" | merge $commentConfig -}} + + {{- end -}} - {{- /* Valine Comment System */ -}} - {{- $valine := $comment.valine | default dict -}} - {{- if $valine.enable -}} -
    - {{- $options := dict "targetPath" "lib/valine/valine.min.css" -}} - {{- dict "Source" "lib/valine/valine.scss" "ToCSS" $options | dict "Scratch" .Scratch "Data" | partial - "scratch/style.html" -}} - {{- $source := $cdn.valineJS | default "lib/valine/Valine.min.js" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" - -}} - {{- $commentConfig = dict "el" "#valine" "appId" $valine.appId "appKey" $valine.appKey "lang" ($valine.lang | default - (T "valineLang")) "visitor" $valine.visitor "recordIP" $valine.recordIP "placeholder" ($valine.placeholder | default - (T "valinePlaceholder")) "highlight" (ne $valine.highlight false) "enableQQ" $valine.enableQQ | dict "valine" | merge - $commentConfig -}} - {{- with $valine.avatar -}} - {{- $commentConfig = dict "avatar" . | dict "valine" | merge $commentConfig -}} - {{- end -}} - {{- with $valine.meta -}} - {{- $commentConfig = dict "meta" . | dict "valine" | merge $commentConfig -}} - {{- end -}} - {{- with $valine.pageSize -}} - {{- $commentConfig = dict "pageSize" . | dict "valine" | merge $commentConfig -}} - {{- end -}} - {{- with $valine.serverURLs -}} - {{- $commentConfig = dict "serverURLs" . | dict "valine" | merge $commentConfig -}} - {{- end -}} - {{- $commentConfig = $valine.emoji | default "google.yml" | printf "data/emoji/%v" | resources.Get | - transform.Unmarshal | dict "valine" | merge $commentConfig -}} - - {{- end -}} + {{- /* Valine Comment System */ -}} + {{- $valine := $comment.valine | default dict -}} + {{- if $valine.enable -}} +
    + {{- $options := dict "targetPath" "lib/valine/valine.min.css" -}} + {{- dict "Source" "lib/valine/valine.scss" "ToCSS" $options | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}} + {{- $source := $cdn.valineJS | default "lib/valine/Valine.min.js" -}} + {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} + {{- $commentConfig = dict "el" "#valine" "appId" $valine.appId "appKey" $valine.appKey "lang" ($valine.lang | default (T "valineLang")) "visitor" $valine.visitor "recordIP" $valine.recordIP "placeholder" ($valine.placeholder | default (T "valinePlaceholder")) "highlight" (ne $valine.highlight false) "enableQQ" $valine.enableQQ | dict "valine" | merge $commentConfig -}} + {{- with $valine.avatar -}} + {{- $commentConfig = dict "avatar" . | dict "valine" | merge $commentConfig -}} + {{- end -}} + {{- with $valine.meta -}} + {{- $commentConfig = dict "meta" . | dict "valine" | merge $commentConfig -}} + {{- end -}} + {{- with $valine.pageSize -}} + {{- $commentConfig = dict "pageSize" . | dict "valine" | merge $commentConfig -}} + {{- end -}} + {{- with $valine.serverURLs -}} + {{- $commentConfig = dict "serverURLs" . | dict "valine" | merge $commentConfig -}} + {{- end -}} + {{- $commentConfig = $valine.emoji | default "google.yml" | printf "data/emoji/%v" | resources.Get | transform.Unmarshal | dict "valine" | merge $commentConfig -}} + + {{- end -}} - {{- /* Facebook Comment System */ -}} - {{- $facebook := $comment.facebook | default dict -}} - {{- if $facebook.enable -}} -
    -
    - {{- $source := printf "https://connect.facebook.net/%v/sdk.js#xfbml=1&version=v5.0&appId=%v&autoLogAppEvents=1" - ($facebook.languageCode | default (T "facebookLanguageCode")) $facebook.appId -}} - {{- dict "Source" $source "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - - {{- end -}} + {{- /* Facebook Comment System */ -}} + {{- $facebook := $comment.facebook | default dict -}} + {{- if $facebook.enable -}} +
    +
    + {{- $source := printf "https://connect.facebook.net/%v/sdk.js#xfbml=1&version=v5.0&appId=%v&autoLogAppEvents=1" ($facebook.languageCode | default (T "facebookLanguageCode")) $facebook.appId -}} + {{- dict "Source" $source "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} + + {{- end -}} - {{- /* Telegram Comments System */ -}} - {{- $telegram := $comment.telegram | default dict -}} - {{- if $telegram.enable -}} -
    - {{- $attr := printf `data-comments-app-website="%v"` $telegram.siteID -}} - {{- $attr = printf `%v data-limit="%v"` $attr ($telegram.limit | default 5) -}} - {{- with $telegram.height -}} - {{- $attr = printf `%v data-height="%v"` $attr . -}} - {{- end -}} - {{- with $telegram.color -}} - {{- $attr = printf `%v data-color="%v"` $attr . -}} - {{- end -}} - {{- if $telegram.colorful -}} - {{- $attr = printf `%v data-colorful="1"` $attr -}} - {{- end -}} - {{- if $telegram.dislikes -}} - {{- $attr = printf `%v data-dislikes="1"` $attr -}} - {{- end -}} - {{- if $telegram.outlined -}} - {{- $attr = printf `%v data-outlined="1"` $attr -}} - {{- end -}} - {{- dict "Source" "https://comments.app/js/widget.js?2" "Defer" true "Attr" $attr | dict "Scratch" .Scratch "Data" | - partial "scratch/script.html" -}} - - {{- end -}} + {{- /* Telegram Comments System */ -}} + {{- $telegram := $comment.telegram | default dict -}} + {{- if $telegram.enable -}} +
    + {{- $attr := printf `data-comments-app-website="%v"` $telegram.siteID -}} + {{- $attr = printf `%v data-limit="%v"` $attr ($telegram.limit | default 5) -}} + {{- with $telegram.height -}} + {{- $attr = printf `%v data-height="%v"` $attr . -}} + {{- end -}} + {{- with $telegram.color -}} + {{- $attr = printf `%v data-color="%v"` $attr . -}} + {{- end -}} + {{- if $telegram.colorful -}} + {{- $attr = printf `%v data-colorful="1"` $attr -}} + {{- end -}} + {{- if $telegram.dislikes -}} + {{- $attr = printf `%v data-dislikes="1"` $attr -}} + {{- end -}} + {{- if $telegram.outlined -}} + {{- $attr = printf `%v data-outlined="1"` $attr -}} + {{- end -}} + {{- dict "Source" "https://comments.app/js/widget.js?2" "Defer" true "Attr" $attr | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} + + {{- end -}} - {{- /* Commento Comment System */ -}} - {{- $commento := $comment.commento | default dict -}} - {{- if $commento.enable -}} -
    - {{- dict "Source" "https://cdn.commento.io/js/commento.js" "Defer" true | dict "Scratch" .Scratch "Data" | partial - "scratch/script.html" -}} - - {{- end -}} + {{- /* Commento Comment System */ -}} + {{- $commento := $comment.commento | default dict -}} + {{- if $commento.enable -}} +
    + {{- dict "Source" "https://cdn.commento.io/js/commento.js" "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} + + {{- end -}} - {{- /* Utterances Comment System */ -}} - {{- $utterances := $comment.utterances | default dict -}} - {{- if $utterances.enable -}} -
    - {{- $commentConfig = dict "repo" $utterances.repo | dict "utterances" | merge $commentConfig -}} - {{- $commentConfig = $utterances.issueTerm | default "pathname" | dict "issueTerm" | dict "utterances" | merge - $commentConfig -}} - {{- $commentConfig = dict "label" $utterances.label | dict "utterances" | merge $commentConfig -}} - {{- $commentConfig = $utterances.lightTheme | default "github-light" | dict "lightTheme" | dict "utterances" | merge - $commentConfig -}} - {{- $commentConfig = $utterances.darkTheme | default "github-dark" | dict "darkTheme" | dict "utterances" | merge - $commentConfig -}} - - {{- end -}} -
    + {{- /* Utterances Comment System */ -}} + {{- $utterances := $comment.utterances | default dict -}} + {{- if $utterances.enable -}} +
    + {{- $commentConfig = dict "repo" $utterances.repo | dict "utterances" | merge $commentConfig -}} + {{- $commentConfig = $utterances.issueTerm | default "pathname" | dict "issueTerm" | dict "utterances" | merge $commentConfig -}} + {{- $commentConfig = dict "label" $utterances.label | dict "utterances" | merge $commentConfig -}} + {{- $commentConfig = $utterances.lightTheme | default "github-light" | dict "lightTheme" | dict "utterances" | merge $commentConfig -}} + {{- $commentConfig = $utterances.darkTheme | default "github-dark" | dict "darkTheme" | dict "utterances" | merge $commentConfig -}} + + {{- end -}} +
    {{- end -}} -{{- dict "comment" $commentConfig | dict "config" | merge (.Scratch.Get "this") | .Scratch.Set "this" -}} \ No newline at end of file +{{- dict "comment" $commentConfig | dict "config" | merge (.Scratch.Get "this") | .Scratch.Set "this" -}} diff --git a/src/js/theme.js b/src/js/theme.js index 617df1ec..797337bd 100644 --- a/src/js/theme.js +++ b/src/js/theme.js @@ -593,12 +593,17 @@ class Theme { initComment() { if (this.config.comment) { + if (this.config.comment.artalk){ + new Artalk(this.config.comment.artalk) + } if (this.config.comment.gitalk) { this.config.comment.gitalk.body = decodeURI(window.location.href); const gitalk = new Gitalk(this.config.comment.gitalk); gitalk.render('gitalk'); } - if (this.config.comment.valine) new Valine(this.config.comment.valine); + if (this.config.comment.valine) { + new Valine(this.config.comment.valine); + } if (this.config.comment.utterances) { const utterancesConfig = this.config.comment.utterances; const script = document.createElement('script');