2020-08-29 19:09:42 +08:00
|
|
|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-075e2f32"],{"498a":function(n,t,e){"use strict";var r=e("23e7"),a=e("58a8").trim,i=e("c8d2");r({target:"String",proto:!0,forced:i("trim")},{trim:function(){return a(this)}})},5899:function(n,t){n.exports="\t\n\v\f\r \u2028\u2029\ufeff"},"58a8":function(n,t,e){var r=e("1d80"),a=e("5899"),i="["+a+"]",c=RegExp("^"+i+i+"*"),s=RegExp(i+i+"*$"),o=function(n){return function(t){var e=String(r(t));return 1&n&&(e=e.replace(c,"")),2&n&&(e=e.replace(s,"")),e}};n.exports={start:o(1),end:o(2),trim:o(3)}},6688:function(n,t,e){"use strict";var r=e("8f28"),a=e.n(r);a.a},"8f28":function(n,t,e){},b6ba:function(n,t,e){"use strict";e.r(t);var r=function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",{staticClass:"component-markdown"},[n.markedHTML?n._e():e("div",{staticClass:"spin-group"},[e("i",{staticClass:"fa fa-spinner fa-pulse fa-2x fa-fw"}),e("span",{staticClass:"sr-only"},[n._v("Loading...")])]),e("div",{staticClass:"markdown-body content",domProps:{innerHTML:n._s(n.markedHTML)}})])},a=[],i=(e("ac1f"),e("5319"),e("96cf"),e("1da1")),c=e("0e54"),s=e.n(c),o=(e("99af"),e("466d"),e("498a"),e("cbd9")),u=function(n){var t=n.replace(/<[^<>]+>/g,"").trim(),e=/^https:\/\/pan\.baidu\.com\/s\/[a-z0-9]+$/i,r=/^链接: https:\/\/pan\.baidu\.com\/s\/[a-z0-9]+ 密码: [a-z0-9]{4}$/i;if(e.test(t))return'<div class="baidupan">\n <a href="'.concat(t,'" class="container">\n <div class="icon">\n <img src="').concat(Object(o["a"])("images/baidu-pan-logo.png"),'" style="background-color: transparent;">\n </div>\n <div class="url">').concat(t,"</div>\n </a>\n </div>");if(r.test(t)){var a=t.match(/https:\/\/pan\.baidu\.com\/s\/[a-z0-9]+/i),i=t.match(/[a-z0-9]{4}$/i);return'<div class="baidupan">\n <div class="container">\n <a href="'.concat(a[0],'">\n <div class="icon">\n <img src="').concat(Object(o["a"])("images/baidu-pan-logo.png"),'" style="background-color: transparent;">\n </div>\n <div class="url">').concat(a[0],'</div>\n </a>\n <div class="line"></div>\n <div class="pwd">\n 密码\n <span>').concat(i[0],"</span>\n </div>\n </div>\n </div>")}return!1},d=e("9bd2");function l(n){return Object(d["a"])({url:n,method:"get"})}var f={name:"markdown",props:{url:{type:String,required:!1,default:""},source:{type:String,required:!1,default:""},highlight:{type:Boolean,required:!1,default:!1},baidupan:{type:Boolean,required:!1,default:!0}},data:function(){return{getReadmePublicPath:"",markedHTML:""}},mounted:function(){this.url?this.initWithUrl():this.source?this.initWithMd():console.log("not mounted init")},watch:{source:function(n){n&&this.initWithMd()}},methods:{handler:function(n){return n&&(n=n.replace(/---\n([\s\S]*)---\n/,"")),n},initWithMd:function(){this.markedHTML=this.marked(this.handler(this.source))},initWithUrl:function(){var n=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,n.getReadme(n.url);case 2:n.markedHTML=t.sent;case 3:case"end":return t.stop()}}),t)})))()},getReadme:function(n){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,l(n);case 2:return r=e.sent,console.log(r),e.abrupt("return",t.marked(r.data));case 5:case"end":return e.stop()}}),e)})))()},marked:function(n){var t=this,e=new s.a.Renderer;return e.blockquote=function(n){return t.baidupan&&u(n,t.$baseUrl)||"<blockquote>".concat(n,"</blockquote>")},s()(n,{renderer:e})}}},p=f,m=(e("6688"),e("2877")),h=Object(m["a"])(p,r,a,!1,null,null,null);t["default"]=h.exports},c8d2:function(n,t,e){var r=e("d039"),a=e("5899"),i="
";n.exports=function(n){return r((function(){return!!a[n]()||i[n]()!=i||a[n].name!==n}))}}}]);
|