From b0da9f23d3ba61799350fb73089fd3164a9f4967 Mon Sep 17 00:00:00 2001
From: "qingwei.li"
Date: Sat, 11 Mar 2017 18:16:34 +0800
Subject: [PATCH 1/5] docs(vue): fix typo
---
docs/vue.md | 2 +-
docs/zh-cn/vue.md | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/vue.md b/docs/vue.md
index 4eaa1feae..b2d4d3272 100644
--- a/docs/vue.md
+++ b/docs/vue.md
@@ -77,7 +77,7 @@ You can manually initialize a Vue instance.
-
diff --git a/docs/zh-cn/vue.md b/docs/zh-cn/vue.md
index 88213de02..e0ecc5958 100644
--- a/docs/zh-cn/vue.md
+++ b/docs/zh-cn/vue.md
@@ -58,9 +58,18 @@
*index.html*
```html
+
+
+
+
+
+
+
+
+
```
*README.md*
@@ -84,4 +93,20 @@
```
+
+
+
+
+
?> 具体效果参考 [Vuep 文档](https://qingwei-li.github.io/vuep/)。
From 3aef37a445a0b68bf1bd525f0e8d10f63d08b562 Mon Sep 17 00:00:00 2001
From: "qingwei.li"
Date: Sat, 11 Mar 2017 19:30:38 +0800
Subject: [PATCH 3/5] feat(emojify): add no-emoji option
---
docs/configuration.md | 10 ++++++++++
docs/zh-cn/configuration.md | 10 ++++++++++
src/core/config.js | 1 +
src/core/render/emojify.js | 2 +-
4 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/docs/configuration.md b/docs/configuration.md
index f5880f0ae..8aa1c41e9 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -295,3 +295,13 @@ window.$docsify = {
```
Note that if you are running an external script, e.g. an embedded jsfiddle demo, make sure to include the [external-script](plugins?id=external-script) plugin.
+
+## no-emoji
+
+Disabled emoji parse.
+
+```js
+window.$docsify = {
+ noEmoji: true
+}
+```
diff --git a/docs/zh-cn/configuration.md b/docs/zh-cn/configuration.md
index 103e88439..3ef44c056 100644
--- a/docs/zh-cn/configuration.md
+++ b/docs/zh-cn/configuration.md
@@ -305,3 +305,13 @@ window.$docsify = {
```
注意如果执行的是一个外链脚本,比如 jsfiddle 的内嵌 demo,请确保引入 [external-script](zh-cn/plugins?id=外链脚本-external-script) 插件。
+
+## no-emoji
+
+禁用 emoji 解析。
+
+```js
+window.$docsify = {
+ noEmoji: true
+}
+```
diff --git a/src/core/config.js b/src/core/config.js
index 2cccfc503..705051967 100644
--- a/src/core/config.js
+++ b/src/core/config.js
@@ -16,6 +16,7 @@ const config = merge({
nameLink: window.location.pathname,
autoHeader: false,
executeScript: null,
+ noEmoji: false,
ga: ''
}, window.$docsify)
diff --git a/src/core/render/emojify.js b/src/core/render/emojify.js
index 8d7983c3e..b8d41aaff 100644
--- a/src/core/render/emojify.js
+++ b/src/core/render/emojify.js
@@ -3,7 +3,7 @@ function replace (m, $1) {
}
export function emojify (text) {
- return text
+ return $docsify.noEmoji ? text : text
.replace(/<(pre|template|code)[^>]*?>[\s\S]+?<\/(pre|template|code)>/g, m => m.replace(/:/g, '__colon__'))
.replace(/:(\w+?):/ig, window.emojify || replace)
.replace(/__colon__/g, ':')
From 9b858fc4c40232126645a139c2997cab1d75bc42 Mon Sep 17 00:00:00 2001
From: "qingwei.li"
Date: Sat, 11 Mar 2017 19:31:57 +0800
Subject: [PATCH 4/5] bump: 3.4.2
---
CHANGELOG.md | 4 ++++
lib/docsify.js | 3 ++-
lib/docsify.min.js | 2 +-
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c83cf9096..7f42709b1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,8 @@
+# 3.4.2 / 2017-03-11
+
+* feat(emojify): add no-emoji option
+
# 3.4.1 / 2017-03-10
* fix(dom): Disable the dom cache when vue is present, fixed [#119](https://github.com/QingWei-Li/docsify/issues/119)
diff --git a/lib/docsify.js b/lib/docsify.js
index 7ef9608d2..7b60b40fb 100644
--- a/lib/docsify.js
+++ b/lib/docsify.js
@@ -75,6 +75,7 @@ var config = merge({
nameLink: window.location.pathname,
autoHeader: false,
executeScript: null,
+ noEmoji: false,
ga: ''
}, window.$docsify);
@@ -2938,7 +2939,7 @@ function replace (m, $1) {
}
function emojify (text) {
- return text
+ return $docsify.noEmoji ? text : text
.replace(/<(pre|template|code)[^>]*?>[\s\S]+?<\/(pre|template|code)>/g, function (m) { return m.replace(/:/g, '__colon__'); })
.replace(/:(\w+?):/ig, window.emojify || replace)
.replace(/__colon__/g, ':')
diff --git a/lib/docsify.min.js b/lib/docsify.min.js
index 31c3618e4..02802b02e 100644
--- a/lib/docsify.min.js
+++ b/lib/docsify.min.js
@@ -1,2 +1,2 @@
-!function(){"use strict";function e(e){var t=Object.create(null);return function(n){var r=t[n];return r||(t[n]=e(n))}}function t(e){return"string"==typeof e||"number"==typeof e}function n(){}function r(e){return"function"==typeof e}function i(e){var t=["init","mounted","beforeEach","afterEach","doneEach","ready"];e._hooks={},e._lifecycle={},t.forEach(function(t){var n=e._hooks[t]=[];e._lifecycle[t]=function(e){return n.push(e)}})}function a(e,t,r,i){void 0===i&&(i=n);var a=r,o=e._hooks[t],s=function(e){var t=o[e];if(e>=o.length)i(a);else if("function"==typeof t)if(2===t.length)t(r,function(t){a=t,s(e+1)});else{var n=t(r);a=void 0!==n?n:a,s(e+1)}else s(e+1)};s(0)}function o(e,t){if(void 0===t&&(t=!1),"string"==typeof e){if("undefined"!=typeof window.Vue)return s(e);e=t?s(e):be[e]||(be[e]=s(e))}return e}function s(e,t){return t?e.querySelector(t):ye.querySelector(e)}function l(e,t){return[].slice.call(t?e.querySelectorAll(t):ye.querySelectorAll(e))}function u(e,t){return e=ye.createElement(e),t&&(e.innerHTML=t),e}function c(e,t){return e.appendChild(t)}function p(e,t){return e.insertBefore(t,e.children[0])}function h(e,t,n){r(t)?window.addEventListener(e,t):e.addEventListener(t,n)}function d(e,t,n){r(t)?window.removeEventListener(e,t):e.removeEventListener(t,n)}function g(e,t,n){e&&e.classList[n?t:"toggle"](n||t)}function f(e){var t={};return(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach(function(e){var n=e.replace(/\+/g," ").split("=");t[n[0]]=Ce(n[1])}),t):t}function m(e){var t=[];for(var n in e)t.push((Ee(n)+"="+Ee(e[n])).toLowerCase());return t.length?"?"+t.join("&"):""}function v(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return je(e.join("/"))}function b(e){var t=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,t>=0?t:0)+"#"+e)}function y(){var e=k();return e=Oe(e),"/"===e.charAt(0)?b(e):void b("/"+e)}function k(){var e=window.location.href,t=e.indexOf("#");return t===-1?"":e.slice(t+1)}function w(e){void 0===e&&(e=window.location.href);var t="",n=e.indexOf("?");n>=0&&(t=e.slice(n+1),e=e.slice(0,n));var r=e.indexOf("#");return r&&(e=e.slice(r+1)),{path:e,query:f(t)}}function x(e,t){var n=w(Oe(e));return n.query=pe({},n.query,t),e=n.path+m(n.query),je("#/"+e)}function _(e){var t=function(){return ke.classList.toggle("close")};e=o(e),h(e,"click",t);var n=o(".sidebar");h(n,"click",function(){Se&&t(),setTimeout(function(){return S(n,!0,!0)},0)})}function L(){var e=o("section.cover");if(e){var t=e.getBoundingClientRect().height;window.pageYOffset>=t||e.classList.contains("hidden")?g(ke,"add","sticky"):g(ke,"remove","sticky")}}function S(e,t,n){e=o(e);var r,i=l(e,"a"),a="#"+k();return i.sort(function(e,t){return t.href.length-e.href.length}).forEach(function(e){var n=e.getAttribute("href"),i=t?e.parentNode:e;0!==a.indexOf(n)||r?g(i,"remove","active"):(r=e,g(i,"add","active"))}),n&&(ye.title=r?r.innerText+" - "+Pe:Pe),r}function C(){for(var e,t=o(".sidebar"),n=l(".anchor"),r=s(t,".sidebar-nav"),i=s(t,"li.active"),a=ke.scrollTop,u=0,c=n.length;ua){e||(e=p);break}e=p}if(e){var h=qe[e.getAttribute("data-id")];if(h&&h!==i&&(i&&i.classList.remove("active"),h.classList.add("active"),i=h,!Ne&&ke.classList.contains("sticky"))){var d=t.clientHeight,g=0,f=i.offsetTop+i.clientHeight+40,m=i.offsetTop>=r.scrollTop&&f<=r.scrollTop+d,v=f-g=400?a(n):(ze[e]=n.response,r(n.response))})},abort:function(e){return 4!==r.readyState&&r.abort()}})}function O(e,t){e.innerHTML=e.innerHTML.replace(/var\(\s*--theme-color.*?\)/g,t)}function M(e){return e?(/\/\//.test(e)||(e="https://github.com/"+e),e=e.replace(/^git\+/,""),''):""}function P(e){var t='';return(Se?t+"":""+t)+''}function q(){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''}function N(e,t){return void 0===t&&(t=""),e&&e.length?(e.forEach(function(e){t+=''+e.title+"",e.children&&(t+='")}),t):""}function F(e,t){return''+t.slice(5).trim()+"
"}function I(e){return""}function z(e,t){return t={exports:{}},e(t,t.exports),t.exports}function H(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||[]).concat(e):n.push(e),r[i]=e)}),n}function R(e){if("string"!=typeof e)return"";var t=e.toLowerCase().trim().replace(/<[^>\d]+>/g,"").replace(Ue,"").replace(/\s/g,"-").replace(/-+/g,"-").replace(/^(\d)/,"_$1"),n=De[t];return n=De.hasOwnProperty(t)?n+1:0,De[t]=n,n&&(t=t+"-"+n),t}function W(e,t){return'
'}function B(e){return e.replace(/<(pre|template|code)[^>]*?>[\s\S]+?<\/(pre|template|code)>/g,function(e){return e.replace(/:/g,"__colon__")}).replace(/:(\w+?):/gi,window.emojify||W).replace(/__colon__/g,":")}function D(e,t){var n="";if(e)n=Qe(e),n=n.match(/]*>([\s\S]+)<\/ul>/g)[0];else{var r=Ye[Xe]||H(Je,t);n=N(r,""),Ye[Xe]=r}return n}function U(e,t){if(e){Je[0]&&1===Je[0].level&&Je.shift();var n=Ye[Xe]||H(Je,t);e.parentNode.innerHTML+=N(n,'
"+a(e.message+"",!0)+"
";throw e}}var p={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:l,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:l,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:l,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};p.bullet=/(?:[*+-]|\d+\.)/,p.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,p.item=s(p.item,"gm")(/bull/g,p.bullet)(),p.list=s(p.list)(/bull/g,p.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+p.def.source+")")(),p.blockquote=s(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=s(p.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,p._tag)(),p.paragraph=s(p.paragraph)("hr",p.hr)("heading",p.heading)("lheading",p.lheading)("blockquote",p.blockquote)("tag","<"+p._tag)("def",p.def)(),p.normal=u({},p),p.gfm=u({},p.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),p.gfm.paragraph=s(p.paragraph)("(?!","(?!"+p.gfm.fences.source.replace("\\1","\\2")+"|"+p.list.source.replace("\\1","\\3")+"|")(),p.tables=u({},p.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),t.rules=p,t.lex=function(e,n){var r=new t(n);return r.lex(e)},t.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)},t.prototype.token=function(e,t,n){for(var r,i,a,o,s,l,u,c,h,d=this,e=e.replace(/^ +$/gm,"");e;)if((a=d.rules.newline.exec(e))&&(e=e.substring(a[0].length),a[0].length>1&&d.tokens.push({type:"space"})),a=d.rules.code.exec(e))e=e.substring(a[0].length),a=a[0].replace(/^ {4}/gm,""),d.tokens.push({type:"code",text:d.options.pedantic?a:a.replace(/\n+$/,"")});else if(a=d.rules.fences.exec(e))e=e.substring(a[0].length),d.tokens.push({type:"code",lang:a[2],text:a[3]||""});else if(a=d.rules.heading.exec(e))e=e.substring(a[0].length),d.tokens.push({type:"heading",depth:a[1].length,text:a[2]});else if(t&&(a=d.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 ?/gm,""),d.token(a,t,!0),d.tokens.push({type:"blockquote_end"});else if(a=d.rules.list.exec(e)){for(e=e.substring(a[0].length),o=a[2],d.tokens.push({type:"list_start",ordered:o.length>1}),a=a[0].match(d.rules.item),r=!1,h=a.length,c=0;c1&&s.length>1||(e=a.slice(c+1).join("\n")+e,c=h-1)),i=r||/\n\n(?!\s*$)/.test(l),c!==h-1&&(r="\n"===l.charAt(l.length-1),i||(i=r)),d.tokens.push({type:i?"loose_item_start":"list_item_start"}),d.token(l,!1,n),d.tokens.push({type:"list_item_end"});d.tokens.push({type:"list_end"})}else if(a=d.rules.html.exec(e))e=e.substring(a[0].length),d.tokens.push({type:d.options.sanitize?"paragraph":"html",pre:!d.options.sanitizer&&("pre"===a[1]||"script"===a[1]||"style"===a[1]),text:a[0]});else if(!n&&t&&(a=d.rules.def.exec(e)))e=e.substring(a[0].length),d.tokens.links[a[1].toLowerCase()]={href:a[2],title:a[3]};else if(t&&(a=d.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])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:l,tag:/^|^<\/?\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:l,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,h.link=s(h.link)("inside",h._inside)("href",h._href)(),h.reflink=s(h.reflink)("inside",h._inside)(),h.normal=u({},h),h.pedantic=u({},h.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),h.gfm=u({},h.normal,{escape:s(h.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:s(h.text)("]|","~]|")("|","|https?://|")()}),h.breaks=u({},h.gfm,{br:s(h.br)("{2,}","*")(),text:s(h.gfm.text)("{2,}","*")()}),n.rules=h,n.output=function(e,t,r){var i=new n(t,r);return i.output(e)},n.prototype.output=function(e){for(var t,n,r,i,o=this,s="";e;)if(i=o.rules.escape.exec(e))e=e.substring(i[0].length),s+=i[1];else if(i=o.rules.autolink.exec(e))e=e.substring(i[0].length),"@"===i[2]?(n=":"===i[1].charAt(6)?o.mangle(i[1].substring(7)):o.mangle(i[1]),r=o.mangle("mailto:")+n):(n=a(i[1]),r=n),s+=o.renderer.link(r,null,n);else if(o.inLink||!(i=o.rules.url.exec(e))){if(i=o.rules.tag.exec(e))!o.inLink&&/^/i.test(i[0])&&(o.inLink=!1),e=e.substring(i[0].length),s+=o.options.sanitize?o.options.sanitizer?o.options.sanitizer(i[0]):a(i[0]):i[0];else if(i=o.rules.link.exec(e))e=e.substring(i[0].length),o.inLink=!0,s+=o.outputLink(i,{href:i[2],title:i[3]}),o.inLink=!1;else if((i=o.rules.reflink.exec(e))||(i=o.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),t=o.links[t.toLowerCase()],!t||!t.href){s+=i[0].charAt(0),e=i[0].substring(1)+e;continue}o.inLink=!0,s+=o.outputLink(i,t),o.inLink=!1}else if(i=o.rules.strong.exec(e))e=e.substring(i[0].length),s+=o.renderer.strong(o.output(i[2]||i[1]));else if(i=o.rules.em.exec(e))e=e.substring(i[0].length),s+=o.renderer.em(o.output(i[2]||i[1]));else if(i=o.rules.code.exec(e))e=e.substring(i[0].length),s+=o.renderer.codespan(a(i[2],!0));else if(i=o.rules.br.exec(e))e=e.substring(i[0].length),s+=o.renderer.br();else if(i=o.rules.del.exec(e))e=e.substring(i[0].length),s+=o.renderer.del(o.output(i[1]));else if(i=o.rules.text.exec(e))e=e.substring(i[0].length),s+=o.renderer.text(a(o.smartypants(i[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(i[0].length),n=a(i[1]),r=n,s+=o.renderer.link(r,null,n);return s},n.prototype.outputLink=function(e,t){var n=a(t.href),r=t.title?a(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,a(e[1]))},n.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},n.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,i=0;i.5&&(t="x"+t.toString(16)),n+=""+t+";";return n},r.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?''+(n?e:a(e,!0))+"\n
\n":""+(n?e:a(e,!0))+"\n
"},r.prototype.blockquote=function(e){return"\n"+e+"
\n"},r.prototype.html=function(e){return e},r.prototype.heading=function(e,t,n){return"\n"},r.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},r.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+""+n+">\n"},r.prototype.listitem=function(e){return""+e+"\n"},r.prototype.paragraph=function(e){return""+e+"
\n"},r.prototype.table=function(e,t){return"\n"},r.prototype.tablerow=function(e){return"\n"+e+"
\n"},r.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"},r.prototype.strong=function(e){return""+e+""},r.prototype.em=function(e){return""+e+""},r.prototype.codespan=function(e){return""+e+"
"},r.prototype.br=function(){return this.options.xhtml?"
":"
"},r.prototype.del=function(e){return""+e+""},r.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='"+n+""},r.prototype.image=function(e,t,n){var r='
":">"},r.prototype.text=function(e){return e},i.parse=function(e,t,n){var r=new i(t,n);return r.parse(e)},i.prototype.parse=function(e){var t=this;this.inline=new n(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var r="";this.next();)r+=t.tok();return r},i.prototype.next=function(){return this.token=this.tokens.pop()},i.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},i.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)},i.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,o="",s="";for(r="",t=0;t=o.length)i(a);else if("function"==typeof t)if(2===t.length)t(r,function(t){a=t,s(e+1)});else{var n=t(r);a=void 0!==n?n:a,s(e+1)}else s(e+1)};s(0)}function o(e,t){if(void 0===t&&(t=!1),"string"==typeof e){if("undefined"!=typeof window.Vue)return s(e);e=t?s(e):be[e]||(be[e]=s(e))}return e}function s(e,t){return t?e.querySelector(t):ye.querySelector(e)}function l(e,t){return[].slice.call(t?e.querySelectorAll(t):ye.querySelectorAll(e))}function u(e,t){return e=ye.createElement(e),t&&(e.innerHTML=t),e}function c(e,t){return e.appendChild(t)}function p(e,t){return e.insertBefore(t,e.children[0])}function h(e,t,n){r(t)?window.addEventListener(e,t):e.addEventListener(t,n)}function d(e,t,n){r(t)?window.removeEventListener(e,t):e.removeEventListener(t,n)}function g(e,t,n){e&&e.classList[n?t:"toggle"](n||t)}function f(e){var t={};return(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach(function(e){var n=e.replace(/\+/g," ").split("=");t[n[0]]=Ce(n[1])}),t):t}function m(e){var t=[];for(var n in e)t.push((Ee(n)+"="+Ee(e[n])).toLowerCase());return t.length?"?"+t.join("&"):""}function v(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return je(e.join("/"))}function b(e){var t=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,t>=0?t:0)+"#"+e)}function y(){var e=k();return e=Oe(e),"/"===e.charAt(0)?b(e):void b("/"+e)}function k(){var e=window.location.href,t=e.indexOf("#");return t===-1?"":e.slice(t+1)}function w(e){void 0===e&&(e=window.location.href);var t="",n=e.indexOf("?");n>=0&&(t=e.slice(n+1),e=e.slice(0,n));var r=e.indexOf("#");return r&&(e=e.slice(r+1)),{path:e,query:f(t)}}function x(e,t){var n=w(Oe(e));return n.query=pe({},n.query,t),e=n.path+m(n.query),je("#/"+e)}function _(e){var t=function(){return ke.classList.toggle("close")};e=o(e),h(e,"click",t);var n=o(".sidebar");h(n,"click",function(){Se&&t(),setTimeout(function(){return S(n,!0,!0)},0)})}function L(){var e=o("section.cover");if(e){var t=e.getBoundingClientRect().height;window.pageYOffset>=t||e.classList.contains("hidden")?g(ke,"add","sticky"):g(ke,"remove","sticky")}}function S(e,t,n){e=o(e);var r,i=l(e,"a"),a="#"+k();return i.sort(function(e,t){return t.href.length-e.href.length}).forEach(function(e){var n=e.getAttribute("href"),i=t?e.parentNode:e;0!==a.indexOf(n)||r?g(i,"remove","active"):(r=e,g(i,"add","active"))}),n&&(ye.title=r?r.innerText+" - "+Pe:Pe),r}function C(){for(var e,t=o(".sidebar"),n=l(".anchor"),r=s(t,".sidebar-nav"),i=s(t,"li.active"),a=ke.scrollTop,u=0,c=n.length;ua){e||(e=p);break}e=p}if(e){var h=qe[e.getAttribute("data-id")];if(h&&h!==i&&(i&&i.classList.remove("active"),h.classList.add("active"),i=h,!Ne&&ke.classList.contains("sticky"))){var d=t.clientHeight,g=0,f=i.offsetTop+i.clientHeight+40,m=i.offsetTop>=r.scrollTop&&f<=r.scrollTop+d,v=f-g=400?a(n):(ze[e]=n.response,r(n.response))})},abort:function(e){return 4!==r.readyState&&r.abort()}})}function O(e,t){e.innerHTML=e.innerHTML.replace(/var\(\s*--theme-color.*?\)/g,t)}function M(e){return e?(/\/\//.test(e)||(e="https://github.com/"+e),e=e.replace(/^git\+/,""),''):""}function P(e){var t='';return(Se?t+"":""+t)+''}function q(){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''}function N(e,t){return void 0===t&&(t=""),e&&e.length?(e.forEach(function(e){t+=''+e.title+"",e.children&&(t+='")}),t):""}function F(e,t){return''+t.slice(5).trim()+"
"}function I(e){return""}function z(e,t){return t={exports:{}},e(t,t.exports),t.exports}function H(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||[]).concat(e):n.push(e),r[i]=e)}),n}function R(e){if("string"!=typeof e)return"";var t=e.toLowerCase().trim().replace(/<[^>\d]+>/g,"").replace(Ue,"").replace(/\s/g,"-").replace(/-+/g,"-").replace(/^(\d)/,"_$1"),n=De[t];return n=De.hasOwnProperty(t)?n+1:0,De[t]=n,n&&(t=t+"-"+n),t}function W(e,t){return'
'}function B(e){return $docsify.noEmoji?e:e.replace(/<(pre|template|code)[^>]*?>[\s\S]+?<\/(pre|template|code)>/g,function(e){return e.replace(/:/g,"__colon__")}).replace(/:(\w+?):/gi,window.emojify||W).replace(/__colon__/g,":")}function D(e,t){var n="";if(e)n=Qe(e),n=n.match(/]*>([\s\S]+)<\/ul>/g)[0];else{var r=Ye[Xe]||H(Je,t);n=N(r,""),Ye[Xe]=r}return n}function U(e,t){if(e){Je[0]&&1===Je[0].level&&Je.shift();var n=Ye[Xe]||H(Je,t);e.parentNode.innerHTML+=N(n,'