docsify/lib/docsify.min.js
2016-12-23 01:20:47 +08:00

3 lines
34 KiB
JavaScript
Raw 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.

var Docsify=function(){"use strict";function e(e,t,n){void 0===t&&(t="GET");var r=new XMLHttpRequest;return r.open(t,e),r.send(),{then:function(e,t){if(void 0===t&&(t=function(){}),n){var i=setInterval(function(e){return n({step:Math.floor(5*Math.random()+1)})},500);r.addEventListener("progress",n),r.addEventListener("loadend",function(e){n(e),clearInterval(i)})}r.addEventListener("error",t),r.addEventListener("load",function(n){var r=n.target;r.status>=400?t(r):e(r.response)})},abort:function(){return 4!==r.readyState&&r.abort()}}}function t(e,t){var n=[],r={};return e.forEach(function(e){var i=e.level||1,a=i-1;i>t||(r[a]?(r[a].children=r[a].children||[],r[a].children.push(e)):n.push(e),r[i]=e)}),n}function n(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}function r(e){return null===e||void 0===e}function i(){var e=window.location;if(A===e.hash&&!r(C))return C;var t=e.hash.match(/^#\/([^#]+)/);return t=t&&2===t.length?t[1]:/^#\//.test(e.hash)?"":e.pathname,C=t,A=e.hash,t}function a(){return document.body.clientWidth<=600}function s(){function e(){for(var e=0,r=t.length;e<r;e+=1){var a=t[e],s=a.getBoundingClientRect();if(s.top<10&&s.bottom>10){var o=n[a.getAttribute("data-id")];if(!o||o===i)return;return i&&i.setAttribute("class",""),o.setAttribute("class","active"),void(i=o)}}}if(!a()){for(var t=document.querySelectorAll(".anchor"),n={},r=document.querySelectorAll(".sidebar li"),i=null,s=0,o=r.length;s<o;s+=1){var l=r[s],u=l.querySelector("a").getAttribute("href");"/"!==u&&(u=u.match(/#([^#]+)$/g)[0].slice(1)),n[decodeURIComponent(u)]=l}window.removeEventListener("scroll",e),window.addEventListener("scroll",e),e()}}function o(){var e=window.location.hash.match(/#[^#\/]+$/g);if(e&&e.length){var t=document.querySelector(decodeURIComponent(e[0]));t&&t.scrollIntoView()}}function l(e,t){var n=window.location.href;e="object"==typeof e?e:document.querySelector(e),e&&[].slice.call(e.querySelectorAll("a")).forEach(function(e){e.href===n?t?e.parentNode.setAttribute("class","active"):e.setAttribute("class","active"):t?e.parentNode.removeAttribute("class"):e.removeAttribute("class")})}function u(e){if(e="object"==typeof e?e:document.querySelector(e)){var t=document.body;e.addEventListener("click",function(){return t.classList.toggle("close")}),/mobile/i.test(navigator.userAgent)&&document.querySelector("aside").addEventListener("click",function(e){t.classList.toggle("close")})}}function c(){if(!_){var e=a()?"body":"section.content";_=document.querySelector(e)}_.scrollTop=0}function d(){var e=document.querySelector("section.cover"),t=e.getBoundingClientRect().height;return function(){window.pageYOffset>=t||e.classList.contains("hidden")?document.body.classList.add("sticky"):document.body.classList.remove("sticky")}()}function p(e,t){return t={exports:{}},e(t,t.exports),t.exports}function g(e){return e?(/\/\//.test(e)||(e="https://github.com/"+e),e=e.replace(/^git\+/,""),'\n <a href="'+e+'" class="github-corner" aria-label="View source on Github">\n <svg viewBox="0 0 250 250" aria-hidden="true">\n <path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>\n <path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path>\n <path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path>\n </svg>\n </a>'):""}function h(e){return"<main>\n "+e+'\n <aside class="sidebar"></aside>\n <section class="content">\n <article class="markdown-section"></article>\n </section>\n </main>'}function f(){var e=", 100%, 85%",t="linear-gradient(to left bottom, hsl("+(Math.floor(255*Math.random())+e)+") 0%, hsl("+(Math.floor(255*Math.random())+e)+") 100%)";return'<section class="cover" style="background: '+t+'">\n <div class="cover-main"></div>\n </section>'}function m(){return'<button class="sidebar-toggle">\n <span></span><span></span><span></span>\n </button>'}function b(e,t){return void 0===t&&(t=""),e&&e.length?(e.forEach(function(e){t+='<li><a class="section-link" href="'+e.slug+'">'+e.title+"</a></li>",e.children&&(t+='<li><ul class="children">'+b(e.children)+"</li></ul>")}),t):""}function y(e,t){var n=document.querySelector("nav")||document.createElement("nav");j.repo||n.classList.add("no-badge"),e[t?"outerHTML":"innerHTML"]=g(j.repo)+(j.coverpage?f():"")+h(j.sidebarToggle?m():""),document.body.insertBefore(n,document.body.children[0]),u("button.sidebar-toggle"),j.coverpage?!a()&&window.addEventListener("scroll",d):document.body.classList.add("sticky")}function v(e){N("article",e?E(e):"not found"),x.rendered||x(null,j),k.rendered||k(null,j),x.rendered=!1,k.rendered=!1,j.auto2top&&c()}function k(e){T.navbar&&T.navbar===e||(T.navbar=e,k.rendered=!0,e&&N("nav",E(e)),l("nav"))}function x(e){var n=!1;e?e=E(e):j.sidebar?e=b(j.sidebar,"<ul>"):(e=b(t(M,j.maxLevel),"<ul>"),n=!0),x.rendered=!0,T.sidebar&&T.sidebar===e||(T.sidebar=e,N("aside.sidebar",e),n&&s(),M=[])}function w(e){w.dom=w.dom||document.querySelector("section.cover"),e?(w.dom.classList.remove("hidden"),!w.rendered&&N(".cover-main",E(e)),w.rendered=!0):w.dom.classList.add("hidden")}function S(e){var t,n=e.loaded,r=e.total,i=e.step;if(!T.loading){var a=document.createElement("div");a.classList.add("progress"),document.body.appendChild(a),T.loading=a}i?(t=parseInt(T.loading.style.width,10)+i,t=t>80?80:t):t=Math.floor(n/r*100),T.loading.style.opacity=1,T.loading.style.width=t>=95?"100%":t+"%",t>=95&&(clearTimeout(S.cacheTimeout),S.cacheTimeout=setTimeout(function(e){T.loading.style.opacity=0,T.loading.style.width="0%"},200))}function L(e){j=e}var _,C=null,A=null,$="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},E=p(function(e,t){(function(){function n(e){this.tokens=[],this.tokens.links={},this.options=e||d.defaults,this.rules=p.normal,this.options.gfm&&(this.options.tables?this.rules=p.tables:this.rules=p.gfm)}function r(e,t){if(this.options=t||d.defaults,this.links=e,this.rules=g.normal,this.renderer=this.options.renderer||new i,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=g.breaks:this.rules=g.gfm:this.options.pedantic&&(this.rules=g.pedantic)}function i(e){this.options=e||{}}function a(e){this.tokens=[],this.token=null,this.options=e||d.defaults,this.options.renderer=this.options.renderer||new i,this.renderer=this.options.renderer,this.renderer.options=this.options}function s(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function o(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function l(e,t){return e=e.source,t=t||"",function n(r,i){return r?(i=i.source||i,i=i.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(r,i),n):new RegExp(e,t)}}function u(){}function c(e){for(var t,n,r=arguments,i=1;i<arguments.length;i++){t=r[i];for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}function d(e,t,r){if(r||"function"==typeof t){r||(r=t,t=null),t=c({},d.defaults,t||{});var i,o,l=t.highlight,u=0;try{i=n.lex(e,t)}catch(e){return r(e)}o=i.length;var p=function(e){if(e)return t.highlight=l,r(e);var n;try{n=a.parse(i,t)}catch(t){e=t}return t.highlight=l,e?r(e):r(null,n)};if(!l||l.length<3)return p();if(delete t.highlight,!o)return p();for(;u<i.length;u++)!function(e){return"code"!==e.type?--o||p():l(e.text,e.lang,function(t,n){return t?p(t):null==n||n===e.text?--o||p():(e.text=n,e.escaped=!0,void(--o||p()))})}(i[u])}else try{return t&&(t=c({},d.defaults,t)),a.parse(n.lex(e,t),t)}catch(e){if(e.message+="\nPlease report this to https://github.com/chjj/marked.",(t||d.defaults).silent)return"<p>An error occured:</p><pre>"+s(e.message+"",!0)+"</pre>";throw e}}var p={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:u,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:u,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:u,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};p.bullet=/(?:[*+-]|\d+\.)/,p.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,p.item=l(p.item,"gm")(/bull/g,p.bullet)(),p.list=l(p.list)(/bull/g,p.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+p.def.source+")")(),p.blockquote=l(p.blockquote)("def",p.def)(),p._tag="(?!(?: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",p.html=l(p.html)("comment",/<!--[\s\S]*?-->/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,p._tag)(),p.paragraph=l(p.paragraph)("hr",p.hr)("heading",p.heading)("lheading",p.lheading)("blockquote",p.blockquote)("tag","<"+p._tag)("def",p.def)(),p.normal=c({},p),p.gfm=c({},p.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),p.gfm.paragraph=l(p.paragraph)("(?!","(?!"+p.gfm.fences.source.replace("\\1","\\2")+"|"+p.list.source.replace("\\1","\\3")+"|")(),p.tables=c({},p.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),n.rules=p,n.lex=function(e,t){var r=new n(t);return r.lex(e)},n.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},n.prototype.token=function(e,t,n){for(var r,i,a,s,o,l,u,c,d,g=this,e=e.replace(/^ +$/gm,"");e;)if((a=g.rules.newline.exec(e))&&(e=e.substring(a[0].length),a[0].length>1&&g.tokens.push({type:"space"})),a=g.rules.code.exec(e))e=e.substring(a[0].length),a=a[0].replace(/^ {4}/gm,""),g.tokens.push({type:"code",text:g.options.pedantic?a:a.replace(/\n+$/,"")});else if(a=g.rules.fences.exec(e))e=e.substring(a[0].length),g.tokens.push({type:"code",lang:a[2],text:a[3]||""});else if(a=g.rules.heading.exec(e))e=e.substring(a[0].length),g.tokens.push({type:"heading",depth:a[1].length,text:a[2]});else if(t&&(a=g.rules.nptable.exec(e))){for(e=e.substring(a[0].length),l={type:"table",header:a[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:a[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:a[3].replace(/\n$/,"").split("\n")},c=0;c<l.align.length;c++)/^ *-+: *$/.test(l.align[c])?l.align[c]="right":/^ *:-+: *$/.test(l.align[c])?l.align[c]="center":/^ *:-+ *$/.test(l.align[c])?l.align[c]="left":l.align[c]=null;for(c=0;c<l.cells.length;c++)l.cells[c]=l.cells[c].split(/ *\| */);g.tokens.push(l)}else if(a=g.rules.lheading.exec(e))e=e.substring(a[0].length),g.tokens.push({type:"heading",depth:"="===a[2]?1:2,text:a[1]});else if(a=g.rules.hr.exec(e))e=e.substring(a[0].length),g.tokens.push({type:"hr"});else if(a=g.rules.blockquote.exec(e))e=e.substring(a[0].length),g.tokens.push({type:"blockquote_start"}),a=a[0].replace(/^ *> ?/gm,""),g.token(a,t,!0),g.tokens.push({type:"blockquote_end"});else if(a=g.rules.list.exec(e)){for(e=e.substring(a[0].length),s=a[2],g.tokens.push({type:"list_start",ordered:s.length>1}),a=a[0].match(g.rules.item),r=!1,d=a.length,c=0;c<d;c++)l=a[c],u=l.length,l=l.replace(/^ *([*+-]|\d+\.) +/,""),~l.indexOf("\n ")&&(u-=l.length,l=g.options.pedantic?l.replace(/^ {1,4}/gm,""):l.replace(new RegExp("^ {1,"+u+"}","gm"),"")),g.options.smartLists&&c!==d-1&&(o=p.bullet.exec(a[c+1])[0],s===o||s.length>1&&o.length>1||(e=a.slice(c+1).join("\n")+e,c=d-1)),i=r||/\n\n(?!\s*$)/.test(l),c!==d-1&&(r="\n"===l.charAt(l.length-1),i||(i=r)),g.tokens.push({type:i?"loose_item_start":"list_item_start"}),g.token(l,!1,n),g.tokens.push({type:"list_item_end"});g.tokens.push({type:"list_end"})}else if(a=g.rules.html.exec(e))e=e.substring(a[0].length),g.tokens.push({type:g.options.sanitize?"paragraph":"html",pre:!g.options.sanitizer&&("pre"===a[1]||"script"===a[1]||"style"===a[1]),text:a[0]});else if(!n&&t&&(a=g.rules.def.exec(e)))e=e.substring(a[0].length),g.tokens.links[a[1].toLowerCase()]={href:a[2],title:a[3]};else if(t&&(a=g.rules.table.exec(e))){for(e=e.substring(a[0].length),l={type:"table",header:a[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:a[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:a[3].replace(/(?: *\| *)?\n$/,"").split("\n")},c=0;c<l.align.length;c++)/^ *-+: *$/.test(l.align[c])?l.align[c]="right":/^ *:-+: *$/.test(l.align[c])?l.align[c]="center":/^ *:-+ *$/.test(l.align[c])?l.align[c]="left":l.align[c]=null;for(c=0;c<l.cells.length;c++)l.cells[c]=l.cells[c].replace(/^ *\| *| *\| *$/g,"").split(/ *\| */);g.tokens.push(l)}else if(t&&(a=g.rules.paragraph.exec(e)))e=e.substring(a[0].length),g.tokens.push({type:"paragraph",text:"\n"===a[1].charAt(a[1].length-1)?a[1].slice(0,-1):a[1]});else if(a=g.rules.text.exec(e))e=e.substring(a[0].length),g.tokens.push({type:"text",text:a[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens};var g={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:u,tag:/^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:u,text:/^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/};g._inside=/(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/,g._href=/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/,g.link=l(g.link)("inside",g._inside)("href",g._href)(),g.reflink=l(g.reflink)("inside",g._inside)(),g.normal=c({},g),g.pedantic=c({},g.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),g.gfm=c({},g.normal,{escape:l(g.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:l(g.text)("]|","~]|")("|","|https?://|")()}),g.breaks=c({},g.gfm,{br:l(g.br)("{2,}","*")(),text:l(g.gfm.text)("{2,}","*")()}),r.rules=g,r.output=function(e,t,n){var i=new r(t,n);return i.output(e)},r.prototype.output=function(e){for(var t,n,r,i,a=this,o="";e;)if(i=a.rules.escape.exec(e))e=e.substring(i[0].length),o+=i[1];else if(i=a.rules.autolink.exec(e))e=e.substring(i[0].length),"@"===i[2]?(n=":"===i[1].charAt(6)?a.mangle(i[1].substring(7)):a.mangle(i[1]),r=a.mangle("mailto:")+n):(n=s(i[1]),r=n),o+=a.renderer.link(r,null,n);else if(a.inLink||!(i=a.rules.url.exec(e))){if(i=a.rules.tag.exec(e))!a.inLink&&/^<a /i.test(i[0])?a.inLink=!0:a.inLink&&/^<\/a>/i.test(i[0])&&(a.inLink=!1),e=e.substring(i[0].length),o+=a.options.sanitize?a.options.sanitizer?a.options.sanitizer(i[0]):s(i[0]):i[0];else if(i=a.rules.link.exec(e))e=e.substring(i[0].length),a.inLink=!0,o+=a.outputLink(i,{href:i[2],title:i[3]}),a.inLink=!1;else if((i=a.rules.reflink.exec(e))||(i=a.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),t=a.links[t.toLowerCase()],!t||!t.href){o+=i[0].charAt(0),e=i[0].substring(1)+e;continue}a.inLink=!0,o+=a.outputLink(i,t),a.inLink=!1}else if(i=a.rules.strong.exec(e))e=e.substring(i[0].length),o+=a.renderer.strong(a.output(i[2]||i[1]));else if(i=a.rules.em.exec(e))e=e.substring(i[0].length),o+=a.renderer.em(a.output(i[2]||i[1]));else if(i=a.rules.code.exec(e))e=e.substring(i[0].length),o+=a.renderer.codespan(s(i[2],!0));else if(i=a.rules.br.exec(e))e=e.substring(i[0].length),o+=a.renderer.br();else if(i=a.rules.del.exec(e))e=e.substring(i[0].length),o+=a.renderer.del(a.output(i[1]));else if(i=a.rules.text.exec(e))e=e.substring(i[0].length),o+=a.renderer.text(s(a.smartypants(i[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(i[0].length),n=s(i[1]),r=n,o+=a.renderer.link(r,null,n);return o},r.prototype.outputLink=function(e,t){var n=s(t.href),r=t.title?s(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,s(e[1]))},r.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1").replace(/'/g,"").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},r.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,i=0;i<r;i++)t=e.charCodeAt(i),Math.random()>.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},i.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'<pre><code class="'+this.options.langPrefix+s(t,!0)+'">'+(n?e:s(e,!0))+"\n</code></pre>\n":"<pre><code>"+(n?e:s(e,!0))+"\n</code></pre>"},i.prototype.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},i.prototype.html=function(e){return e},i.prototype.heading=function(e,t,n){return"<h"+t+' id="'+this.options.headerPrefix+n.toLowerCase().replace(/[^\w]+/g,"-")+'">'+e+"</h"+t+">\n"},i.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},i.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"</"+n+">\n"},i.prototype.listitem=function(e){return"<li>"+e+"</li>\n"},i.prototype.paragraph=function(e){return"<p>"+e+"</p>\n"},i.prototype.table=function(e,t){return"<table>\n<thead>\n"+e+"</thead>\n<tbody>\n"+t+"</tbody>\n</table>\n"},i.prototype.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},i.prototype.tablecell=function(e,t){var n=t.header?"th":"td",r=t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">";return r+e+"</"+n+">\n"},i.prototype.strong=function(e){return"<strong>"+e+"</strong>"},i.prototype.em=function(e){return"<em>"+e+"</em>"},i.prototype.codespan=function(e){return"<code>"+e+"</code>"},i.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"},i.prototype.del=function(e){return"<del>"+e+"</del>"},i.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(o(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:"))return""}var i='<a href="'+e+'"';return t&&(i+=' title="'+t+'"'),i+=">"+n+"</a>"},i.prototype.image=function(e,t,n){var r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">"},i.prototype.text=function(e){return e},a.parse=function(e,t,n){var r=new a(t,n);return r.parse(e)},a.prototype.parse=function(e){var t=this;this.inline=new r(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var n="";this.next();)n+=t.tok();return n},a.prototype.next=function(){return this.token=this.tokens.pop()},a.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},a.prototype.parseText=function(){for(var e=this,t=this.token.text;"text"===this.peek().type;)t+="\n"+e.next().text;return this.inline.output(t)},a.prototype.tok=function(){var e=this;switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var t,n,r,i,a,s="",o="";for(r="",t=0;t<this.token.header.length;t++)i={header:!0,align:e.token.align[t]},r+=e.renderer.tablecell(e.inline.output(e.token.header[t]),{header:!0,align:e.token.align[t]});for(s+=this.renderer.tablerow(r),t=0;t<this.token.cells.length;t++){for(n=e.token.cells[t],r="",a=0;a<n.length;a++)r+=e.renderer.tablecell(e.inline.output(n[a]),{header:!1,align:e.token.align[a]});o+=e.renderer.tablerow(r)}return this.renderer.table(s,o);case"blockquote_start":for(var o="";"blockquote_end"!==this.next().type;)o+=e.tok();return this.renderer.blockquote(o);case"list_start":for(var o="",l=this.token.ordered;"list_end"!==this.next().type;)o+=e.tok();return this.renderer.list(o,l);case"list_item_start":for(var o="";"list_item_end"!==this.next().type;)o+="text"===e.token.type?e.parseText():e.tok();return this.renderer.listitem(o);case"loose_item_start":for(var o="";"list_item_end"!==this.next().type;)o+=e.tok();return this.renderer.listitem(o);case"html":var u=this.token.pre||this.options.pedantic?this.token.text:this.inline.output(this.token.text);return this.renderer.html(u);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText())}},u.exec=u,d.options=d.setOptions=function(e){return c(d.defaults,e),d},d.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,sanitizer:null,mangle:!0,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new i,xhtml:!1},d.Parser=a,d.parser=a.parse,d.Renderer=i,d.Lexer=n,d.lexer=n.lex,d.InlineLexer=r,d.inlineLexer=r.output,d.parse=d,"undefined"!=typeof e&&"object"==typeof t?e.exports=d:"function"==typeof define&&define.amd?define(function(){return d}):this.marked=d}).call(function(){return this||("undefined"!=typeof window?window:$)}())}),q=p(function(e){var t="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},n=function(){var e=/\blang(?:uage)?-(\w+)\b/i,n=0,r=t.Prism={util:{encode:function(e){return e instanceof i?new i(e.type,r.util.encode(e.content),e.alias):"Array"===r.util.type(e)?e.map(r.util.encode):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function(e){var t=r.util.type(e);switch(t){case"Object":var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=r.util.clone(e[i]));return n;case"Array":return e.map&&e.map(function(e){return r.util.clone(e)})}return e}},languages:{extend:function(e,t){var n=r.util.clone(r.languages[e]);for(var i in t)n[i]=t[i];return n},insertBefore:function(e,t,n,i){i=i||r.languages;var a=i[e];if(2==arguments.length){n=arguments[1];for(var s in n)n.hasOwnProperty(s)&&(a[s]=n[s]);return a}var o={};for(var l in a)if(a.hasOwnProperty(l)){if(l==t)for(var s in n)n.hasOwnProperty(s)&&(o[s]=n[s]);o[l]=a[l]}return r.languages.DFS(r.languages,function(t,n){n===i[e]&&t!=e&&(this[t]=o)}),i[e]=o},DFS:function(e,t,n,i){i=i||{};for(var a in e)e.hasOwnProperty(a)&&(t.call(e,a,e[a],n||a),"Object"!==r.util.type(e[a])||i[r.util.objId(e[a])]?"Array"!==r.util.type(e[a])||i[r.util.objId(e[a])]||(i[r.util.objId(e[a])]=!0,r.languages.DFS(e[a],t,a,i)):(i[r.util.objId(e[a])]=!0,r.languages.DFS(e[a],t,null,i)))}},plugins:{},highlightAll:function(e,t){var n={callback:t,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",n);for(var i,a=n.elements||document.querySelectorAll(n.selector),s=0;i=a[s++];)r.highlightElement(i,e===!0,n.callback)},highlightElement:function(n,i,a){for(var s,o,l=n;l&&!e.test(l.className);)l=l.parentNode;l&&(s=(l.className.match(e)||[,""])[1].toLowerCase(),o=r.languages[s]),n.className=n.className.replace(e,"").replace(/\s+/g," ")+" language-"+s,l=n.parentNode,/pre/i.test(l.nodeName)&&(l.className=l.className.replace(e,"").replace(/\s+/g," ")+" language-"+s);var u=n.textContent,c={element:n,language:s,grammar:o,code:u};if(r.hooks.run("before-sanity-check",c),!c.code||!c.grammar)return void r.hooks.run("complete",c);if(r.hooks.run("before-highlight",c),i&&t.Worker){var d=new Worker(r.filename);d.onmessage=function(e){c.highlightedCode=e.data,r.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,a&&a.call(c.element),r.hooks.run("after-highlight",c),r.hooks.run("complete",c)},d.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else c.highlightedCode=r.highlight(c.code,c.grammar,c.language),r.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,a&&a.call(n),r.hooks.run("after-highlight",c),r.hooks.run("complete",c)},highlight:function(e,t,n){var a=r.tokenize(e,t);return i.stringify(r.util.encode(a),n)},tokenize:function(e,t,n){var i=r.Token,a=[e],s=t.rest;if(s){for(var o in s)t[o]=s[o];delete t.rest}e:for(var o in t)if(t.hasOwnProperty(o)&&t[o]){var l=t[o];l="Array"===r.util.type(l)?l:[l];for(var u=0;u<l.length;++u){var c=l[u],d=c.inside,p=!!c.lookbehind,g=!!c.greedy,h=0,f=c.alias;c=c.pattern||c;for(var m=0;m<a.length;m++){var b=a[m];if(a.length>e.length)break e;if(!(b instanceof i)){c.lastIndex=0;var y=c.exec(b),v=1;if(!y&&g&&m!=a.length-1){var k=a[m+1].matchedStr||a[m+1],x=b+k;if(m<a.length-2&&(x+=a[m+2].matchedStr||a[m+2]),c.lastIndex=0,y=c.exec(x),!y)continue;var w=y.index+(p?y[1].length:0);if(w>=b.length)continue;var S=y.index+y[0].length,L=b.length+k.length;if(v=3,S<=L){if(a[m+1].greedy)continue;v=2,x=x.slice(0,L)}b=x}if(y){p&&(h=y[1].length);var w=y.index+h,y=y[0].slice(h),S=w+y.length,_=b.slice(0,w),C=b.slice(S),A=[m,v];_&&A.push(_);var $=new i(o,d?r.tokenize(y,d):y,f,y,g);A.push($),C&&A.push(C),Array.prototype.splice.apply(a,A)}}}}}return a},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var i,a=0;i=n[a++];)i(t)}}},i=r.Token=function(e,t,n,r,i){this.type=e,this.content=t,this.alias=n,this.matchedStr=r||null,this.greedy=!!i};if(i.stringify=function(e,t,n){if("string"==typeof e)return e;if("Array"===r.util.type(e))return e.map(function(n){return i.stringify(n,t,e)}).join("");var a={type:e.type,content:i.stringify(e.content,t,n),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:n};if("comment"==a.type&&(a.attributes.spellcheck="true"),e.alias){var s="Array"===r.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(a.classes,s)}r.hooks.run("wrap",a);var o="";for(var l in a.attributes)o+=(o?" ":"")+l+'="'+(a.attributes[l]||"")+'"';return"<"+a.tag+' class="'+a.classes.join(" ")+'" '+o+">"+a.content+"</"+a.tag+">"},!t.document)return t.addEventListener?(t.addEventListener("message",function(e){var n=JSON.parse(e.data),i=n.language,a=n.code,s=n.immediateClose;t.postMessage(r.highlight(a,r.languages[i],i)),s&&t.close()},!1),t.Prism):t.Prism;var a=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return a&&(r.filename=a.src,document.addEventListener&&!a.hasAttribute("data-manual")&&("loading"!==document.readyState?requestAnimationFrame(r.highlightAll,0):document.addEventListener("DOMContentLoaded",r.highlightAll))),t.Prism}();"undefined"!=typeof e&&e.exports&&(e.exports=n),"undefined"!=typeof $&&($.Prism=n),n.languages.markup={comment:/<!--[\w\W]*?-->/,prolog:/<\?[\w\W]+?\?>/,doctype:/<!DOCTYPE[\w\W]+?>/,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=.$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},n.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),n.languages.xml=n.languages.markup,n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},n.languages.css.atrule.inside.rest=n.util.clone(n.languages.css),n.languages.markup&&(n.languages.insertBefore("markup","tag",{style:{pattern:/(<style[\w\W]*?>)[\w\W]*?(?=<\/style>)/i,lookbehind:!0,inside:n.languages.css,alias:"language-css"}}),n.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:n.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:n.languages.css}},alias:"language-css"}},n.languages.markup.tag)),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:{pattern:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(true|false)\b/,function:/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,function:/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i}),n.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}}),n.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\\\|\\?[^\\])*?`/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}}}),n.languages.markup&&n.languages.insertBefore("markup","tag",{script:{pattern:/(<script[\w\W]*?>)[\w\W]*?(?=<\/script>)/i,lookbehind:!0,inside:n.languages.javascript,alias:"language-javascript"}}),n.languages.js=n.languages.javascript,function(){"undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector&&(self.Prism.fileHighlight=function(){var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"};Array.prototype.forEach&&Array.prototype.slice.call(document.querySelectorAll("pre[data-src]")).forEach(function(t){for(var r,i=t.getAttribute("data-src"),a=t,s=/\blang(?:uage)?-(?!\*)(\w+)\b/i;a&&!s.test(a.className);)a=a.parentNode;if(a&&(r=(t.className.match(s)||[,""])[1]),!r){var o=(i.match(/\.(\w+)$/)||[,""])[1];r=e[o]||o}var l=document.createElement("code");
l.className="language-"+r,t.textContent="",l.textContent="Loading…",t.appendChild(l);var u=new XMLHttpRequest;u.open("GET",i,!0),u.onreadystatechange=function(){4==u.readyState&&(u.status<400&&u.responseText?(l.textContent=u.responseText,n.highlightElement(l)):u.status>=400?l.textContent="✖ Error "+u.status+" while fetching file: "+u.statusText:l.textContent="✖ Error: File does not exist or is empty")},u.send(null)})},document.addEventListener("DOMContentLoaded",self.Prism.fileHighlight))}()}),j={},T={},N=function(e,t){return e="object"==typeof e?e:document.querySelector(e),e.innerHTML=t,e},M=[],P=new E.Renderer;P.heading=function(e,t){var n=e.toLowerCase().replace(/<(?:.|\n)*?>/gm,"").replace(/[^\w|\u4e00-\u9fa5]+/g,"-"),r="";return j.router&&(r="#/"+i()),M.push({level:t,slug:r+"#"+encodeURIComponent(n),title:e}),'<a href="'+r+"#"+n+'" data-id="'+n+'" class="anchor"><h'+t+' id="'+n+'">'+e+"</h"+t+"></a>"},P.code=function(e,t){void 0===t&&(t="");var n=q.highlight(e,q.languages[t]||q.languages.markup);return'<pre data-lang="'+t+'"><code class="lang-'+t+'">'+n+"</code></pre>"},P.link=function(e,t,n){return j.router&&!/^(?:\w+:)?\/\/([^\s\.]+\.\S{2}|localhost[\:?\d]*)\S*$/.test(e)&&(e=("#/"+e).replace(/\/\//g,"/")),'<a href="'+e+'" title="'+(t||"")+'">'+n+"</a>"},E.setOptions({renderer:P});var O={el:"#app",repo:"",maxLevel:6,sidebar:"",sidebarToggle:!1,loadSidebar:null,loadNavbar:null,router:!1,homepage:"README.md",coverpage:"",basePath:"",auto2top:!1},I=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();if(I){for(var W in O){var z=I.getAttribute("data-"+n(W));O[W]=r(z)?O[W]:z||!0}O.loadSidebar===!0&&(O.loadSidebar="_sidebar.md"),O.loadNavbar===!0&&(O.loadNavbar="_navbar.md"),O.coverpage===!0&&(O.coverpage="_coverpage.md"),O.sidebar&&(O.sidebar=window[O.sidebar])}L(O);var F=null,R=null,B=function(t){var n=O.basePath+i();if(F===n)return t();var r,a=F=n;/\//.test(a)?a&&!/\/$/.test(a)&&(a=a.match(/(\S*\/)[^\/]+$/)[1]):a="";var s;s=n?/\/$/.test(n)?n+"README.md":n+".md":O.homepage||"README.md",O.coverpage&&(s===O.homepage?e(O.coverpage).then(w):w()),R&&R.abort&&R.abort(),R=e(s,"GET",S),R.then(function(e){v(e),O.loadSidebar?(r===!1&&t(),r=!1):t()},function(e){return v(null)}),O.loadSidebar&&e(a+O.loadSidebar).then(function(e){x(e),r===!1&&t(),r=!1}),O.loadNavbar&&e(a+O.loadNavbar).then(k)},D=function(){var e=document.querySelector(O.el)||document.body,t=e!==document.body,n=function(){B(function(e){l("aside.sidebar",!0),o(),O.coverpage&&d()})};y(e,t),n(),O.router&&(/^#\//.test(window.location.hash)||(window.location.hash="#/"),window.addEventListener("hashchange",n))},H=D();return H}();