aboutsummaryrefslogtreecommitdiff
path: root/static/dist/even.26188efa.min.js
blob: 41ecff769cf95263a4b300d3a84f2dfafb4fe5ec (plain)
1
2
!function(t){var o={};function a(e){if(o[e])return o[e].exports;var n=o[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=t,a.c=o,a.d=function(e,n,t){a.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(n,e){if(1&e&&(n=a(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)a.d(t,o,function(e){return n[e]}.bind(null,o));return t},a.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(n,"a",n),n},a.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},a.p="",a(a.s=1)}([function(e,n,t){},function(e,n,t){"use strict";t.r(n);var o={backToTop:function(){var e=$("#back-to-top");$(window).scroll(function(){100<$(window).scrollTop()?e.fadeIn(1e3):e.fadeOut(1e3)}),e.click(function(){$("body,html").animate({scrollTop:0})})},mobileNavbar:function(){var e=$("#mobile-navbar"),n=$(".mobile-navbar-icon"),t=new Slideout({panel:document.getElementById("mobile-panel"),menu:document.getElementById("mobile-menu"),padding:180,tolerance:70});t.disableTouch(),n.click(function(){t.toggle()}),t.on("beforeopen",function(){e.addClass("fixed-open"),n.addClass("icon-click").removeClass("icon-out")}),t.on("beforeclose",function(){e.removeClass("fixed-open"),n.addClass("icon-out").removeClass("icon-click")}),$("#mobile-panel").on("touchend",function(){t.isOpen()&&n.click()})},_initToc:function(){var n=$(".post-toc"),e=$(".post-footer");if(n.length){var t=n.offset().top-20,o=e.offset().top-n.height()-20,a={start:{position:"absolute",top:t},process:{position:"fixed",top:20},end:{position:"absolute",top:o}};$(window).scroll(function(){var e=$(window).scrollTop();e<t?n.css(a.start):o<e?n.css(a.end):n.css(a.process)})}var r=$(".toc-link"),c=$(".headerlink"),l=$(".post-toc-content li"),i=$.map(c,function(e){return $(e).offset().top}),s=$.map(i,function(e){return e-30});$(window).scroll(function(){var e=$(window).scrollTop(),n=function(e,n){for(var t=0;t<e.length-1;t++)if(n>e[t]&&n<=e[t+1])return t;return n>e[e.length-1]?e.length-1:-1}(s,e);if($(r).removeClass("active"),$(l).removeClass("has-active"),-1!==n){$(r[n]).addClass("active");for(var t=r[n].parentNode;"NAV"!==t.tagName;)$(t).addClass("has-active"),t=t.parentNode.parentNode}})},fancybox:function(){$.fancybox&&($(".post-content").each(function(){$(this).find("img").each(function(){$(this).wrap('<a class="fancybox" href="'.concat(this.src,'" data-fancybox="gallery" data-caption="').concat(this.title,'"></a>'))})}),$(".fancybox").fancybox({selector:".fancybox",protect:!0}))},highlight:function(){for(var e=document.querySelectorAll("pre code"),n=0;n<e.length;n++){var t=e[n],o=t.parentElement,a=t.innerHTML.split(/\n/);""===a[a.length-1]&&a.pop();for(var r=a.length,c="",l=0;l<r;l++)c+='<div class="line">'.concat(l+1,"</div>");for(var i="",s=0;s<r;s++)i+='<div class="line">'.concat(a[s],"</div>");t.className+=" highlight";var d=document.createElement("figure");d.className=t.className,d.innerHTML='<table><tbody><tr><td class="gutter"><pre>'.concat(c,'</pre></td><td class="code"><pre>').concat(i,"</pre></td></tr></tbody></table>"),o.parentElement.replaceChild(d,o)}},chroma:function(){for(var e=document.querySelectorAll(".highlight > .chroma"),n=0;n<e.length;n++){var t=e[n],o=t.querySelector("pre.chroma > code"),a=o?o.className:"";t.className+=" "+a}},toc:function(){var e=document.getElementById("post-toc");if(null!==e){var n=document.getElementById("TableOfContents");null===n?e.parentNode.removeChild(e):(this._refactorToc(n),this._linkToc(),this._initToc())}},_refactorToc:function(e){for(var n,t=e.children[0],o=t;1===o.children.length&&"UL"===(n=o.children[0].children[0]).tagName;)o=n;o!==t&&e.replaceChild(o,t)},_linkToc:function(){for(var e=document.querySelectorAll("#TableOfContents a:first-child"),n=0;n<e.length;n++)e[n].className+=" toc-link";for(var t=1;t<=6;t++)for(var o=document.querySelectorAll(".post-content>h"+t),a=0;a<o.length;a++){var r=o[a];r.innerHTML='<a href="#'.concat(r.id,'" class="headerlink anchor"><i class="iconfont icon-link"></i></a>').concat(r.innerHTML)}},flowchart:function(){if(window.flowchart)for(var e=document.querySelectorAll("pre code.language-flowchart, pre code.language-flow"),n=0;n<e.length;n++)if(window.hljs||n%2!=0){var t=e[n],o=window.hljs?t.parentElement:t.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement,a=document.createElement("div"),r="js-flowchart-diagrams-".concat(n);a.id=r,a.className="align-center",o.parentElement.replaceChild(a,o),flowchart.parse(t.childNodes[0].nodeValue).drawSVG(r,window.flowchartDiagramsOptions?window.flowchartDiagramsOptions:{})}},sequence:function(){if(window.Diagram)for(var e=document.querySelectorAll("pre code.language-sequence"),n=0;n<e.length;n++)if(window.hljs||n%2!=0){var t=e[n],o=window.hljs?t.parentElement:t.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement,a=document.createElement("div"),r="js-sequence-diagrams-".concat(n);a.id=r,a.className="align-center",o.parentElement.replaceChild(a,o),Diagram.parse(t.childNodes[0].nodeValue).drawSVG(r,window.sequenceDiagramsOptions?window.sequenceDiagramsOptions:{theme:"simple"})}},responsiveTable:function(){for(var e=document.querySelectorAll(".post-content > table"),n=0;n<e.length;n++){var t=e[n],o=document.createElement("div");o.className="table-wrapper",t.parentElement.replaceChild(o,t),o.appendChild(t)}}};t(0);$(document).ready(function(){o.backToTop(),o.mobileNavbar(),o.toc(),o.fancybox()}),o.responsiveTable(),o.flowchart(),o.sequence(),window.hljs?(hljs.initHighlighting(),o.highlight()):o.chroma()}]);
//# sourceMappingURL=even.26188efa.min.js.map