blog/maps/kratosr.min.js.map

1 line
53 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"version":3,"sources":["kratosr.js"],"names":["_typeof","obj","Symbol","iterator","constructor","prototype","_regeneratorRuntime","exports","Op","Object","hasOwn","hasOwnProperty","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","key","value","defineProperty","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","state","method","arg","Error","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","type","done","fn","call","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","invoke","resolve","reject","result","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","undefined","return","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","displayName","isGeneratorFunction","genFun","ctor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","keys","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","catch","thrown","delegateYield","asyncGeneratorStep","gen","_next","_throw","_asyncToGenerator","args","arguments","apply","window","requestIdleCallback","handler","startTime","Date","now","setTimeout","didTimeout","timeRemaining","Math","max","cancelIdleCallback","id","clearTimeout","copyCode","triggerBtn","targetCodeID","targetCodeElement","document","getElementById","code","innerText","navigator","clipboard","writeText","origInner","innerHTML","copyrightString","loadConfig","_ref","_callee","_window$kr","url","_context","kr","siteRoot","fetch","json","docTitle","getTimeString","msec","tString","exact","sec","dnum","floor","hnum","mnum","snum","dstr","toString","hstr","mstr","sstr","makeDelay","callback","ms","timer","initPerPage","sidebarTocWidget","initFunc","tocDOMs","getElementsByClassName","tocItems","Array","from","tocItem","linkItem","querySelector","titleText","decodeURI","getAttribute","substring","titleElem","setAttribute","at","el","e","console","log","message","classList","add","curTocId","tocActivate","newId","remove","nCur","contains","parentNode","applyDecision","pos","scrollY","requestAnimationFrame","observer","IntersectionObserver","entries","decision","currentIndex","Number","parseInt","target","isIntersecting","boundingClientRect","top","rootBounds","bottom","height","intersectionRatio","rootMargin","threshold","x","observe","addEventListener","disconnect","once","tocUpdatePos","h","getBoundingClientRect","tocGetId","newPos","isInteger","nowY","tocOnScroll","tocOnResize","removeEventListener","readProgBar","articleElem","setPercent","currentTop","documentElement","scrollTop","docHeight","clientHeight","winHeight","headerHeight","offsetTop","contentMath","scrollHeight","scrollPercent","min","scrollPercentRound","round","style","width","offsetParent","title","querySelectorAll","figure","count","getElementsByTagName","concat","$","fancybox","defaults","hash","each","find","parent","hasClass","is","alt","after","src","runningOnBrowser","isBot","test","userAgent","supportsIntersectionObserver","commsArea","loadwork","loadCommentsEventHandler","load_comm","commentsLazyLoad","initPerPageWithConfig","imageboxs","randomAmount","cover","baseUrl","coverFileNameTemplate","filenameTemplate","usedCovers","generateNewCoverID","coverNo","remailFailCounts","random","len","attr","coverFileName","replace","coverUrl","includes","loadRandomCover","copyrightNotice","location","href","setCopyright","expire_day","expireAlert","dateTimeTag","updateDateTime","gap","expireNotify","themeInit","isScrolledDown","pageScrollDownClass","$clone","body","oncopy","copiedContent","getSelection","preventDefault","clipboardData","setData","copyEventInit","siteLeaveEvent","titleTime","OriginLogo","hidden","leaveTitle","leaveLogo","returnTitle","leaveEventInit","createTime","upTimeNode","setInterval","initTime","on","layer","open","area","donateBtn","resize","scrollbar","content","scanNotice","qr_alipay","qr_wechat","click","removeClass","addClass","donateConfig","topNavScrollToggle","lastHeight","innerHeight","isTopNavHidden","topNavScrollToggleInit","event","animate","offset","clone","prepend","css","w","container","has","slideToggle","fadeToggle","MathJax","Hub","Typeset","readyState"],"mappings":"AAAA,aAEA,SAASA,QAAQC,GAAkC,OAAOD,QAAU,mBAAqBE,QAAU,iBAAmBA,OAAOC,SAAW,SAAUF,GAAO,cAAcA,GAAS,SAAUA,GAAO,OAAOA,GAAO,mBAAqBC,QAAUD,EAAIG,cAAgBF,QAAUD,IAAQC,OAAOG,UAAY,gBAAkBJ,GAAQD,QAAQC,GAEzU,SAASK,0KAA2LA,oBAAsB,WAAiC,OAAOC,GAAY,IAAIA,EAAU,GAAIC,EAAKC,OAAOJ,UAAWK,EAASF,EAAGG,eAAgBC,EAAU,mBAAqBV,OAASA,OAAS,GAAIW,EAAiBD,EAAQT,UAAY,aAAcW,EAAsBF,EAAQG,eAAiB,kBAAmBC,EAAoBJ,EAAQK,aAAe,gBAAiB,SAASC,EAAOjB,EAAKkB,EAAKC,GAAS,OAAOX,OAAOY,eAAepB,EAAKkB,EAAK,CAAEC,MAAOA,EAAOE,YAAY,EAAIC,cAAc,EAAIC,UAAU,IAAOvB,EAAIkB,GAAQ,IAAMD,EAAO,GAAI,IAAO,MAAOO,GAAOP,EAAS,SAAgBjB,EAAKkB,EAAKC,GAAS,OAAOnB,EAAIkB,GAAOC,GAAY,SAASM,EAAKC,EAASC,EAASC,EAAMC,GAAe,IAAIC,EAAiBH,GAAWA,EAAQvB,qBAAqB2B,EAAYJ,EAAUI,EAAWC,EAAYxB,OAAOyB,OAAOH,EAAe1B,WAAY8B,EAAU,IAAIC,EAAQN,GAAe,IAAK,OAAOG,EAAUI,QAAU,SAAUV,EAASE,EAAMM,GAAW,IAAIG,EAAQ,iBAAkB,OAAO,SAAUC,EAAQC,GAAO,GAAI,cAAgBF,EAAO,MAAM,IAAIG,MAAM,gCAAiC,GAAI,cAAgBH,EAAO,CAAE,GAAI,UAAYC,EAAQ,MAAMC,EAAK,OAAOE,IAAgB,IAAKP,EAAQI,OAASA,EAAQJ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CkJ,EAAE7G,QAAQ,KACNQ,EAAE,eAAeO,SAAS,UACzBP,EAAE,eAAeuF,YAAY,QAC7BvF,EAAE,mBAAmBoG,IAAI,QAAQ,cAM7CpG,EAAEtI,UAAU4N,OAAM,SAACjK,GACf,IAAMiL,EAAYtG,EAAE,yCACfsG,EAAU9F,GAAGnF,EAAEwB,SAA8C,IAAnCyJ,EAAUC,IAAIlL,EAAEwB,QAAQlJ,QAC/CqM,EAAE,eAAeO,SAAS,UAC1BP,EAAE,eAAeuF,YAAY,QAC7BvF,EAAE,mBAAmBoG,IAAI,QAAQ,cAM7CpG,EAAEtI,UAAUiN,GAAG,QAAQ,aAAa,SAASoB,GACzC/F,EAAE/O,MAAMyB,OAAO8T,YAAY,KACvBxG,EAAE/O,MAAMqP,OAAO,aAAaC,SAAS,UACrCP,EAAE/O,MAAMqP,OAAO,aAAaiF,YAAY,UAExCvF,EAAE/O,MAAMqP,OAAO,aAAakF,SAAS,UAEzCO,EAAMpC,oBA6BV3D,EAAEtI,UAAUiN,GAAG,QAAQ,UAAS,WAAK3E,EAAE,eAAeyG,WAAW,WAuFjEzG,EAAEtI,UAAUiN,GAAG,QAAS,qBAAqB,WAIzC,OAHA3E,EAAE,cAAcgG,QAAQ,CACpBrH,UAAUqB,EAAElF,UAAUkF,EAAE/O,MAAMkR,KAAK,UAAU8D,SAASjJ,IAAM,IAC9D,MACK,KAieX9C,IA7BJ1D,OAAOiH,iBAAiB,iBAAiB,WACrCvD,IACuB,oBAAZwM,SACPA,QAAQC,IAAIC,aA6BQ,aAAxBlP,SAASmP,WACT/P,WAAWqM,IAEXzL,SAAS+F,iBAAiB,mBAAoB0F,GAAW,GACzD3M,OAAOiH,iBAAiB,OAAQ0F,GAAW,IAlrBnD","file":"../js/kratosr.min.js","sourcesContent":["/**\n * 因为后台任务API还是相当新的而你的代码可能需要在那些仍不支持此API的浏览器上运行。\n * 你可以把 setTimeout() 用作回调选项来做这样的事。\n * 这个并不是 polyfill ,因为它在功能上并不相同; \n * setTimeout() 并不会让你利用空闲时段,而是使你的代码在情况允许时执行你的代码,\n * 以使我们可以尽可能地避免造成用户体验性能表现延迟的后果。\n */\n// https://developer.mozilla.org/zh-CN/docs/Web/API/Background_Tasks_API \nwindow.requestIdleCallback = window.requestIdleCallback || function(handler) {\n let startTime = Date.now();\n return setTimeout(function() {\n handler({\n didTimeout: false,\n timeRemaining: function() {\n return Math.max(0, 50.0 - (Date.now() - startTime));\n }\n });\n }, 1);\n};\n\nwindow.cancelIdleCallback = window.cancelIdleCallback || function(id) {\n clearTimeout(id);\n};\n\n/**\n * 一些暴露给 DOM 交互使用的全局函数\n */\n\nwindow.copyCode = window.copyCode || function(triggerBtn, targetCodeID) {\n // 用了 navigator.clipboard API ,不要再用老依赖和写法了\n // https://developer.mozilla.org/en-US/docs/Web/API/Navigator/clipboard\n const targetCodeElement = document.getElementById(targetCodeID);\n if (targetCodeElement) {\n const code = targetCodeElement.innerText;\n navigator.clipboard.writeText(code);\n\n // 复制成功,庆祝一下\n const origInner = triggerBtn.innerHTML;\n triggerBtn.innerHTML = `<i class=\"fa fa-check-circle\"></i>&nbsp;成功~`;\n setTimeout(() => {\n triggerBtn.innerHTML = origInner;\n }, 3000);\n }\n // 并且这样复制不会触发 CC 提示,就不用担心代码被提示弄出一堆错了\n};\n\n/**\n * 核心的配置体,包一层防止全局变量命名导致的冲突\n */\n\n(()=>{\n const loadConfig = async () => {\n var url = (window.kr?.siteRoot || '/') + 'config/main.json';\n return await (await fetch(url)).json()\n };\n const pageScrollDownInit = ()=>{\n let isScrolledDown = false;\n const pageScrollDownClass = () => {\n window.requestAnimationFrame(() => {\n if (window.scrollY > 200){\n if (!isScrolledDown) {\n document.body.classList.add('scroll-down');\n isScrolledDown = true;\n }\n } else {\n if (isScrolledDown) {\n document.body.classList.remove('scroll-down');\n isScrolledDown = false;\n }\n }\n });\n };\n $('.gotop-box').on('click',function(event){\n // event.preventDefault();\n $('html, body').animate({\n scrollTop:$('html').offset().top\n },500);\n return false;\n });\n pageScrollDownClass();\n window.addEventListener('scroll', pageScrollDownClass);\n };\n const offcanvas = ()=>{\n let $clone = $('#kratos-menu-wrap').clone();\n $clone.attr({\n 'id':'offcanvas-menu'\n });\n $clone.find('> ul').attr({\n 'id':''\n }).addClass('ul-me');\n $('#kratos-page').prepend($clone);\n $('.js-kratos-nav-toggle').on('click',()=>{\n if($('.nav-toggle').hasClass('toon')){\n $('.nav-toggle').removeClass('toon');\n $('#offcanvas-menu').css('right','-240px');\n }else{\n $('.nav-toggle').addClass('toon');\n $('#offcanvas-menu').css('right','0px');\n }\n });\n $('#offcanvas-menu').css('height',$(window).height());\n $('#offcanvas-menu').css('right','-240px');\n $(window).resize(()=>{\n const w = $(window);\n $('#offcanvas-menu').css('height',w.height());\n if(w.width()>769){\n if($('.nav-toggle').hasClass('toon')){\n $('.nav-toggle').removeClass('toon');\n $('#offcanvas-menu').css('right','-240px');\n }\n }\n });\n };\n const mobiClick = ()=>{\n $(document).click((e)=>{\n const container = $(\"#offcanvas-menu,.js-kratos-nav-toggle\");\n if (!container.is(e.target) && container.has(e.target).length === 0) {\n if ($('.nav-toggle').hasClass('toon')) {\n $('.nav-toggle').removeClass('toon');\n $('#offcanvas-menu').css('right','-240px');\n }\n }\n });\n };\n const xControl = ()=>{\n $(document).on(\"click\",\".xHeading\", function(event){\n $(this).next().slideToggle(300);\n if ($(this).parent('.xControl').hasClass('active')) {\n $(this).parent('.xControl').removeClass('active');\n } else {\n $(this).parent('.xControl').addClass('active');\n }\n event.preventDefault();\n });\n };\n\n const donateConfig = (kr)=>{\n $(document).on(\"click\",\".donate\",()=>{\n layer.open({\n type:1,\n area:['300px', '370px'],\n title:kr.donateBtn,\n resize:false,\n scrollbar:false,\n content:'<div class=\"donate-box\"><div class=\"meta-pay text-center\"><strong>'+kr.scanNotice+'</strong></div><div class=\"qr-pay text-center\"><img class=\"pay-img\" id=\"alipay_qr\" src=\"'+kr.qr_alipay+'\"><img class=\"pay-img d-none\" id=\"wechat_qr\" src=\"'+kr.qr_wechat+'\"></div><div class=\"choose-pay text-center mt-2\"><input id=\"alipay\" type=\"radio\" name=\"pay-method\" checked><label for=\"alipay\" class=\"pay-button\"><img src=\"/images/alipay.webp\"></label><input id=\"wechatpay\" type=\"radio\" name=\"pay-method\"><label for=\"wechatpay\" class=\"pay-button\"><img src=\"/images/wechat.webp\"></label></div></div>'\n });\n $(\".choose-pay input[type='radio']\").click(function(){\n const id = $(this).attr(\"id\");\n if (id == 'alipay') {\n $(\".qr-pay #alipay_qr\").removeClass('d-none');\n $(\".qr-pay #wechat_qr\").addClass('d-none');\n }\n if (id == 'wechatpay') {\n $(\".qr-pay #alipay_qr\").addClass('d-none');\n $(\".qr-pay #wechat_qr\").removeClass('d-none');\n }\n });\n });\n };\n\n const shareMenu = ()=>{\n $(document).on(\"click\",\".share\",()=>{$(\".share-wrap\").fadeToggle(\"slow\");});\n };\n\n const loadRandomCover = (kr)=>{\n // 图片\n const imageboxs = document.getElementsByClassName(\"kratos-entry-thumb-new-img\");\n const randomAmount = kr.cover && kr.cover.randomAmount || 20;\n const baseUrl = kr.cover && kr.cover.baseUrl || 'https://cdn.jsdelivr.net/npm/hexo-theme-kratos-rebirth@latest/source/images/thumb/'\n const coverFileNameTemplate = kr.cover && kr.cover.filenameTemplate || \"thumb_{no}.webp\";\n const usedCovers = new Array(randomAmount + 1);\n\n const generateNewCoverID = () => {\n let remailFailCounts = 5; // set max fail counts\n let coverNo;\n while (remailFailCounts > 0) {\n // rand one\n coverNo = Math.floor(Math.random() * randomAmount + 1);\n if (!usedCovers[coverNo]) {\n // valid\n break;\n } else {\n // fails\n remailFailCounts--;\n }\n }\n\n if (remailFailCounts <= 0) {\n // rand failed, find one manually\n coverNo = -1;\n for (let i = 1; i <= randomAmount; i++) {\n if (!usedCovers[i]) {\n // use first\n coverNo = i;\n break;\n }\n }\n if (coverNo === -1) {\n // All used\n // clear all\n for (let i = 1; i <= randomAmount; i++) {\n usedCovers[i] = false;\n }\n // rand one\n coverNo = Math.floor(Math.random() * randomAmount + 1);\n }\n }\n\n // mark as used\n usedCovers[coverNo] = true;\n \n // return\n return coverNo;\n }\n\n for (let i = 0, len = imageboxs.length; i < len; i++) {\n if (!($(imageboxs[i]).attr(\"src\"))) {\n const coverNo = generateNewCoverID();\n const coverFileName = coverFileNameTemplate.replace(\"{no}\", coverNo.toString());\n let coverUrl;\n if (coverFileName.includes(\"//\")) {\n coverUrl = coverFileName;\n } else if (baseUrl.substring(baseUrl.length - 1) === \"/\") {\n coverUrl = baseUrl + coverFileName;\n } else {\n coverUrl = baseUrl + '/' + coverFileName;\n }\n $(imageboxs[i]).attr(\"src\", coverUrl);\n }\n }\n };\n\n const fancyboxInit = ()=>{\n if (typeof $.fancybox !== 'undefined'){\n $.fancybox.defaults.hash = false;\n $('.kratos-hentry').each(function(i){\n $(this).find('img').each(function(){\n if ($(this).parent().hasClass('fancybox') || $(this).parent().hasClass('qrcode') || $(this).parent().is('a')) return;\n const alt = this.alt;\n if (alt) $(this).after('<span class=\"caption\">' + alt + '</span>');\n $(this).wrap('<a rel=\"gallery\" href=\"' + this.src + '\" data-fancybox=\\\"gallery\\\" data-caption=\"' + alt + '\"></a>')\n });\n });\n $('.fancybox').fancybox();\n }\n };\n\n const tocNavInit = ()=>{\n $(document).on(\"click\", 'a[class=toc-link]', function(){\n $('html, body').animate({\n scrollTop:$(decodeURI($(this).attr(\"href\"))).offset().top - 60\n },500);\n return false;\n });\n };\n\n let copyrightString;\n const setCopyright = (kr)=>{\n copyrightString = `\n\n-------------------------\n${kr.copyrightNotice}\n作者${document.querySelector(\"meta[name='author']\").getAttribute('content')}\n来源${document.title}\n链接${window.location.href}\n`;\n }\n\n const copyEventInit = (kr)=>{\n if (kr.copyrightNotice) {\n document.body.oncopy = (e)=>{\n if (copyrightString) {\n const copiedContent = window.getSelection().toString();\n if (copiedContent.length > 150) {\n e.preventDefault();\n if (e.clipboardData) {\n e.clipboardData.setData(\"text/plain\", copiedContent + copyrightString);\n }\n }\n }\n };\n }\n };\n\n let docTitle = '';\n const saveTitle = () => {\n docTitle = document.title;\n };\n\n const leaveEventInit = (kr) => {\n if (kr.siteLeaveEvent) {\n let titleTime;\n const OriginLogo = $('[rel=\"icon\"]').attr(\"href\");\n document.addEventListener('visibilitychange', ()=>{\n if (document.hidden) {\n document.title = kr.leaveTitle;\n if (kr.leaveLogo) {\n $('[rel=\"icon\"]').attr(\"href\", kr.leaveLogo);\n }\n clearTimeout(titleTime);\n } else {\n document.title = kr.returnTitle + \" \" + docTitle;\n if (kr.leaveLogo) {\n $('[rel=\"icon\"]').attr(\"href\", OriginLogo);\n }\n titleTime = setTimeout(()=>{\n document.title = docTitle;\n titleTime = 0;\n }, 2000);\n }\n });\n }\n };\n\n const getTimeString = (msec, exact = true) => {\n let tString;\n const sec = msec / 1000;\n const dnum = Math.floor(sec / 60 / 60 / 24);\n const hnum = Math.floor(sec / 60 / 60 - (24 * dnum));\n const mnum = Math.floor(sec / 60 - (24 * 60 * dnum) - (60 * hnum));\n const snum = Math.floor(sec - (24 * 60 * 60 * dnum) - (60 * 60 * hnum) - (60 * mnum));\n let dstr = dnum.toString();\n let hstr = hnum.toString();\n let mstr = mnum.toString();\n let sstr = snum.toString();\n if (exact) {\n if (dstr && dstr.length === 1) {\n dstr = '0' + dstr;\n }\n if (hstr && hstr.length === 1) {\n hstr = '0' + hstr;\n }\n if (mstr && mstr.length === 1) {\n mstr = '0' + mstr;\n }\n if (sstr && sstr.length === 1) {\n sstr = '0' + sstr;\n }\n tString = dstr + \"天\" + hstr + \"小时\" + mstr + \"分\" + sstr + \"秒\";\n } else {\n // 大概值\n if (dnum < 540) {\n // 一年半内\n if (dnum < 60) {\n // 两个月内\n tString = dstr + \"天\";\n } else {\n // 年内月外\n tString = Math.floor(dnum / 30).toString() + '个月';\n }\n } else {\n // 年外\n tString = Math.floor(dnum / 365).toString() + '年';\n }\n }\n return tString;\n };\n\n const initTime = (kr) => {\n const createTime = new Date(kr.createTime);\n const upTimeNode = document.getElementById(\"span_dt\");\n setInterval(() => {\n upTimeNode.innerText = getTimeString(Date.now() - createTime);\n }, 1000);\n };\n\n const codeCopyInit = () => {\n const codeFigures = document.querySelectorAll('figure.highlight');\n codeFigures.forEach((figure, count) => {\n figure\n .getElementsByTagName('table')[0]\n .getElementsByTagName('tbody')[0]\n .getElementsByTagName('tr')[0]\n .getElementsByClassName('code')[0]\n .setAttribute('id', `code-${count}`);\n\n figure.innerHTML += \n `<button class=\"copy\" onclick=\"copyCode(this, 'code-${count}')\">\n <i class=\"fa fa-copy\"></i>&nbsp;复制\n </button>`;\n });\n };\n\n const commentsLazyLoad = () => {\n // 检查当前是否在浏览器中运行\n const runningOnBrowser = typeof window !== \"undefined\";\n // 通过检查 scroll 事件 API 和 User-Agent 来匹配爬虫\n const isBot = runningOnBrowser && !(\"onscroll\" in window) || typeof navigator !== \"undefined\" && /(gle|ing|ro|msn)bot|crawl|spider|yand|duckgo/i.test(navigator.userAgent);\n // 检查当前浏览器是否支持 IntersectionObserver API\n const supportsIntersectionObserver = runningOnBrowser && \"IntersectionObserver\" in window;\n // 需要懒加载的评论区块\n const commsArea = document.querySelector('.post-comments.lazy-load');\n // 加载评论的函数\n const loadwork = () => {\n if (window.loadCommentsEventHandler) {\n // 取消上一个加载事件\n window.cancelIdleCallback(window.loadCommentsEventHandler);\n }\n if (typeof load_comm === 'undefined' || load_comm === null) {\n return;\n }\n // 加载新评论模块\n window.loadCommentsEventHandler = window.requestIdleCallback(load_comm);\n // 防止二次加载,清理掉函数\n load_comm = null;\n };\n if (runningOnBrowser && !isBot && supportsIntersectionObserver && commsArea !== null) {\n const observer = new IntersectionObserver((entries) => {\n if (entries[0].isIntersecting) {\n loadwork();\n observer.disconnect();\n }\n }, { threshold: 0 });\n observer.observe(commsArea);\n } else {\n loadwork();\n }\n };\n\n const expireNotify = (kr) => {\n if (kr.expire_day) {\n const expireAlert = document.getElementById('expire-alert');\n if (expireAlert) {\n const dateTimeTag = expireAlert.querySelector('time');\n const updateDateTime = new Date(parseInt(dateTimeTag.getAttribute('datetime')));\n const nowDateTime = Date.now();\n const gap = nowDateTime - updateDateTime;\n if (gap > kr.expire_day * 24 * 3600 * 1000) {\n // 内容可能过期,需要提示\n dateTimeTag.innerText = getTimeString(gap, false);\n expireAlert.classList.remove('hidden');\n }\n }\n \n }\n };\n\n const makeDelay = (callback, ms) => {\n var timer = 0;\n return function () {\n var context = this, args = arguments;\n clearTimeout(timer);\n timer = setTimeout(function () {\n callback.apply(context, args);\n }, ms || 0);\n };\n }\n\n const tocWidgetAnimInit = () => {\n const sidebarTocWidget = document.getElementById('krw-toc');\n const initFunc = () => {\n // 有toc的页面\n // 获取侧边栏所有的toc项\n const tocDOMs = sidebarTocWidget.getElementsByClassName('toc-item');\n // 元素高度映射记录\n const tocItems = [];\n try {\n Array.from(tocDOMs).forEach((tocItem) => {\n const linkItem = tocItem.querySelector('.toc-link');\n const titleText = decodeURI(linkItem.getAttribute('href'));\n if (titleText.substring(0, 1) != '#') {\n throw new Error('TOC 小标题链接无效,格式无限');\n }\n const titleElem = document.getElementById(titleText.substring(1));\n if (!titleElem) {\n throw new Error('TOC 小标题链接无效,未找到相关引用');\n }\n titleElem.setAttribute(\"data-toc-id\", tocItems.length)\n tocItems.push({\n at: titleElem,\n el: tocItem\n });\n });\n } catch (e) {\n console.log('错误:', e.message);\n Array.from(tocDOMs).forEach((tocItem) => {\n tocItem.classList.add('show');\n });\n return;\n }\n\n // 初始化为不存在的标题\n let curTocId = -1;\n // 标题激活状态修改函数\n const tocActivate = (newId) => {\n if (curTocId === newId) {\n // Do nothing...\n return;\n }\n if (curTocId !== -1) {\n // 清除旧标题激活状态\n tocItems[curTocId].el.classList.remove('active');\n tocItems[curTocId].el.classList.remove('show');\n // 清除旧元素层级展示状态\n let nCur = tocItems[curTocId].el\n while (!nCur.classList.contains('toc')) {\n if (nCur.classList.contains('toc-item')) {\n nCur.classList.remove('show');\n }\n nCur = nCur.parentNode;\n }\n }\n if (newId !== -1) {\n // 构建新标题激活状态\n tocItems[newId].el.classList.add('active');\n tocItems[newId].el.classList.add('show');\n // 建立新元素层级展示状态\n let nCur = tocItems[newId].el\n while (!nCur.classList.contains('toc')) {\n if (nCur.classList.contains('toc-item')) {\n nCur.classList.add('show');\n }\n nCur = nCur.parentNode;\n }\n }\n curTocId = newId;\n };\n\n if (\"IntersectionObserver\" in window) {\n const applyDecision = makeDelay((i, pos) => {\n if (pos === window.scrollY) {\n window.requestAnimationFrame(() => {\n tocActivate(i);\n });\n } else {\n applyDecision(i, window.scrollY);\n }\n }, 100)\n\n const observer = new IntersectionObserver((entries) => {\n let decision = null\n entries.forEach((entry) => {\n const currentIndex = Number.parseInt(entry.target.getAttribute('data-toc-id'), 10);\n if (!entry.isIntersecting\n && entry.boundingClientRect.top <= entry.rootBounds.top) {\n decision = currentIndex\n } else if (entry.isIntersecting\n && entry.boundingClientRect.bottom < entry.rootBounds.top + entry.rootBounds.height / 2\n && entry.intersectionRatio === 1) {\n decision = currentIndex - 1\n }\n })\n if (decision !== null) {\n applyDecision(decision, window.scrollY);\n }\n }, {\n rootMargin: '-62px 0px 0px 0px',\n threshold: 1.0,\n })\n tocItems.forEach((x) => {\n observer.observe(x.at)\n });\n window.addEventListener('pjax:before', () => {\n observer.disconnect();\n tocItems.length = 0; // 奇妙的数组清空方式\n }, { once: true });\n } else {\n const tocUpdatePos = () => {\n tocItems.forEach((x) => {\n x.h = x.at.getBoundingClientRect().top + window.scrollY - 61 // 比 click 事件那里多减掉1避免浏览器 round 后导致的判断失败\n });\n };\n\n tocUpdatePos();\n\n // 标题定位函数\n const tocGetId = () => {\n let newPos;\n if (!Number.isInteger(curTocId) || curTocId < 0 || curTocId > tocItems.length - 1) {\n newPos = 0;\n } else {\n newPos = curTocId;\n }\n const nowY = window.scrollY;\n if (nowY >= tocItems[newPos].h) {\n if (nowY >= tocItems[tocItems.length - 1].h) {\n newPos = tocItems.length - 1;\n } else {\n while (nowY >= tocItems[newPos + 1].h) {\n newPos++;\n }\n }\n } else {\n while (nowY < tocItems[newPos].h) {\n newPos--;\n if (newPos < 0) break;\n }\n }\n return newPos;\n }\n\n // 处理事件的函数\n const tocOnScroll = makeDelay(() => {\n window.requestAnimationFrame(() => {\n tocActivate(tocGetId());\n });\n }, 100);\n\n const tocOnResize = makeDelay(() => {\n tocUpdatePos();\n window.requestAnimationFrame(() => {\n tocActivate(tocGetId());\n });\n }, 100);\n\n window.addEventListener(\"resize\", tocOnResize);\n window.addEventListener('scroll', tocOnScroll);\n // pjax前销毁\n window.addEventListener('pjax:before', () => {\n window.removeEventListener('resize', tocOnResize);\n window.removeEventListener('scroll', tocOnScroll);\n tocItems.length = 0; // 奇妙的数组清空方式\n }, { once: true });\n }\n\n // 阅读进度\n const readProgBar = document.getElementsByClassName('toc-progress-bar')[0];\n const articleElem = document.querySelector('.kratos-post-content');\n const setPercent = () => {\n // 参考 Butterfly 主题相关实现\n // https://github.com/jerryc127/hexo-theme-butterfly/blob/c1ac4a5e167f7bb26287fc9ca32a182cfc293231/source/js/main.js#L337-L346\n if (articleElem) {\n const currentTop = window.scrollY || document.documentElement.scrollTop\n const docHeight = articleElem.clientHeight\n const winHeight = document.documentElement.clientHeight\n const headerHeight = articleElem.offsetTop\n const contentMath =\n (docHeight > winHeight) ?\n (docHeight - winHeight) :\n (document.documentElement.scrollHeight - winHeight)\n const scrollPercent = Math.max(0, Math.min((currentTop - headerHeight) / (contentMath), 1))\n const scrollPercentRound = Math.round(scrollPercent * 100)\n readProgBar.style.width = (scrollPercent * 100).toString() + '%';\n readProgBar.setAttribute('aria-valuenow', scrollPercentRound);\n }\n }\n window.addEventListener('scroll', () => {\n window.requestAnimationFrame(setPercent);\n });\n setPercent(); // 初始运行一次\n }\n if (sidebarTocWidget) {\n if (sidebarTocWidget.offsetParent !== null) {\n initFunc();\n } else if (\"IntersectionObserver\" in window) {\n // Init when become visible\n new IntersectionObserver(initFunc, {\n threshold: 0,\n once: true,\n }).observe(sidebarTocWidget);\n }\n }\n };\n\n const topNavScrollToggleInit = (kr) => {\n // 判断设置参数\n if (!kr.topNavScrollToggle) {\n return; // 没有启用\n }\n // 记录上一次滚动高度,用于判断滚动方向\n let lastHeight = window.innerHeight;\n // 记录顶部栏隐藏状态\n let isTopNavHidden = false;\n\n // 处理事件的函数\n const handleTopNavScrollToggle = () => {\n window.requestAnimationFrame(() => {\n if (lastHeight < window.scrollY) {\n // 向下滚动\n if (!isTopNavHidden) {\n document.body.classList.add('nav-up');\n isTopNavHidden = true;\n }\n } else if (lastHeight > window.scrollY) {\n // 向上滚动\n if (isTopNavHidden) {\n document.body.classList.remove('nav-up');\n isTopNavHidden = false;\n }\n }\n // 相等则不做处理\n lastHeight = window.scrollY;\n });\n };\n\n // 仅处理鼠标滚动\n window.addEventListener('wheel', handleTopNavScrollToggle);\n\n };\n\n const initPerPage = () => {\n tocWidgetAnimInit();\n saveTitle();\n codeCopyInit();\n fancyboxInit();\n commentsLazyLoad();\n };\n\n const initPerPageWithConfig = kr => {\n loadRandomCover(kr);\n setCopyright(kr);\n expireNotify(kr);\n };\n\n window.addEventListener('pjax:complete', () => {\n initPerPage();\n if (typeof MathJax !== 'undefined') {\n MathJax.Hub.Typeset();\n }\n });\n\n function themeInit() {\n document.removeEventListener(\"DOMContentLoaded\", themeInit, false);\n window.removeEventListener(\"load\", themeInit, false);\n\n loadConfig().then(kr => {\n copyEventInit(kr);\n leaveEventInit(kr);\n initTime(kr);\n donateConfig(kr);\n topNavScrollToggleInit(kr);\n initPerPageWithConfig(kr);\n window.addEventListener('pjax:complete', () => {\n initPerPageWithConfig(kr);\n });\n });\n \n pageScrollDownInit();\n offcanvas();\n mobiClick();\n xControl();\n shareMenu();\n tocNavInit();\n initPerPage();\n }\n\n if (document.readyState === \"complete\") {\n setTimeout(themeInit);\n } else {\n document.addEventListener(\"DOMContentLoaded\", themeInit, false);\n window.addEventListener(\"load\", themeInit, false); //fallback\n }\n})();\n"]}