-
Notifications
You must be signed in to change notification settings - Fork 0
/
1-es2015.bd5854ce2b6641f301d9.js
1 lines (1 loc) · 40.9 KB
/
1-es2015.bd5854ce2b6641f301d9.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{DlQD:function(e,t,n){e.exports=function(){"use strict";function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function n(e,n){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,n){if(e){if("string"==typeof e)return t(e,undefined);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,undefined):void 0}}(e))||n&&e&&"number"==typeof e.length){r&&(e=r);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}var r=function(e,t){return function(e){function t(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},getDefaults:t,changeDefaults:function(t){e.exports.defaults=t}}}(t={exports:{}}),t.exports}(),i=/[&<>"']/,s=/[&<>"']/g,l=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(e){return o[e]},u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function h(e){return e.replace(u,function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}var p=/(^|[^\[])\^/g,g=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,d={},k=/^[^:]+:\/*[^/]*$/,m=/^([^:]+:)[\s\S]*$/,b=/^([^:]+:\/*[^/]*)[\s\S]*$/;function x(e,t,n){var r=e.length;if(0===r)return"";for(var i=0;i<r;){var s=e.charAt(r-i-1);if(s!==t||n){if(s===t||!n)break;i++}else i++}return e.substr(0,r-i)}var v=function(e,t){if(t){if(i.test(e))return e.replace(s,c)}else if(l.test(e))return e.replace(a,c);return e},w=h,y=function(e){for(var t,n,r=1;r<arguments.length;r++)for(n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},_=r.defaults,S=x,z=function(e,t){var n=e.replace(/\|/g,function(e,t,n){for(var r=!1,i=t;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n},$=v;function A(e,t,n){var r=t.href,i=t.title?$(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:n,href:r,title:i,text:s}:{type:"image",raw:n,href:r,title:i,text:$(s)}}var T=function(){function e(e){this.options=e||_}var t=e.prototype;return t.space=function(e){var t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e,t){var n=this.rules.block.code.exec(e);if(n){var r=t[t.length-1];if(r&&"paragraph"===r.type)return{raw:n[0],text:n[0].trimRight()};var i=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:S(i,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map(function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=r.length?e.slice(r.length):e}).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:r}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(/#$/.test(n)){var r=S(n,"#");this.options.pedantic?n=r.trim():r&&!/ $/.test(r)||(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n}}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var n={type:"table",header:z(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(n.header.length===n.align.length){var r,i=n.align.length;for(r=0;r<i;r++)n.align[r]=/^ *-+: *$/.test(n.align[r])?"right":/^ *:-+: *$/.test(n.align[r])?"center":/^ *:-+ *$/.test(n.align[r])?"left":null;for(i=n.cells.length,r=0;r<i;r++)n.cells[r]=z(n.cells[r],n.header.length);return n}}},t.hr=function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}},t.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){var n=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],text:n}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){var n,r,i,s,l,a,o,c,u=t[0],h=t[2],p=h.length>1,g={type:"list",raw:u,ordered:p,start:p?+h.slice(0,-1):"",loose:!1,items:[]},f=t[0].match(this.rules.block.item),d=!1,k=f.length;i=this.rules.block.listItemStart.exec(f[0]);for(var m=0;m<k;m++){if(u=n=f[m],m!==k-1){if((s=this.rules.block.listItemStart.exec(f[m+1]))[1].length>i[0].length||s[1].length>3){f.splice(m,2,f[m]+"\n"+f[m+1]),m--,k--;continue}(!this.options.pedantic||this.options.smartLists?s[2][s[2].length-1]!==h[h.length-1]:p===(1===s[2].length))&&(l=f.slice(m+1).join("\n"),g.raw=g.raw.substring(0,g.raw.length-l.length),m=k-1),i=s}r=n.length,~(n=n.replace(/^ *([*+-]|\d+[.)]) ?/,"")).indexOf("\n ")&&(r-=n.length,n=n.replace(this.options.pedantic?/^ {1,4}/gm:new RegExp("^ {1,"+r+"}","gm"),"")),a=d||/\n\n(?!\s*$)/.test(n),m!==k-1&&(d="\n"===n.charAt(n.length-1),a||(a=d)),a&&(g.loose=!0),this.options.gfm&&(c=void 0,(o=/^\[[ xX]\] /.test(n))&&(c=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:u,task:o,checked:c,loose:a,text:n})}return g}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):$(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:z(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i=n.align.length;for(r=0;r<i;r++)n.align[r]=/^ *-+: *$/.test(n.align[r])?"right":/^ *:-+: *$/.test(n.align[r])?"center":/^ *:-+ *$/.test(n.align[r])?"left":null;for(i=n.cells.length,r=0;r<i;r++)n.cells[r]=z(n.cells[r].replace(/^ *\| *| *\| *$/g,""),n.header.length);return n}}},t.lheading=function(e){var t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1]}},t.paragraph=function(e){var t=this.rules.block.paragraph.exec(e);if(t)return{type:"paragraph",raw:t[0],text:"\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1]}},t.text=function(e,t){var n=this.rules.block.text.exec(e);if(n){var r=t[t.length-1];return r&&"text"===r.type?{raw:n[0],text:n[0]}:{type:"text",raw:n[0],text:n[0]}}},t.escape=function(e){var t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:$(t[1])}},t.tag=function(e,t,n){var r=this.rules.inline.tag.exec(e);if(r)return!t&&/^<a /i.test(r[0])?t=!0:t&&/^<\/a>/i.test(r[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):$(r[0]):r[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^</.test(n)){if(!/>$/.test(n))return;var r=S(n.slice(0,-1),"\\");if((n.length-r.length)%2==0)return}else{var i=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,r=0,i=0;i<n;i++)if("\\"===e[i])i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&--r<0)return i;return-1}(t[2],"()");if(i>-1){var s=(0===t[0].indexOf("!")?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,s).trim(),t[3]=""}}var l=t[2],a="";if(this.options.pedantic){var o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(l);o&&(l=o[1],a=o[3])}else a=t[3]?t[3].slice(1,-1):"";return l=l.trim(),/^</.test(l)&&(l=this.options.pedantic&&!/>$/.test(n)?l.slice(1):l.slice(1,-1)),A(t,{href:l?l.replace(this.rules.inline._escapes,"$1"):l,title:a?a.replace(this.rules.inline._escapes,"$1"):a},t[0])}},t.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return A(n,r,n[0])}},t.strong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.strong.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,s="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(s.lastIndex=0;null!=(r=s.exec(t));)if(i=this.rules.inline.strong.middle.exec(t.slice(0,r.index+3)))return{type:"strong",raw:e.slice(0,i[0].length),text:e.slice(2,i[0].length-2)}}},t.em=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.em.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,s="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(s.lastIndex=0;null!=(r=s.exec(t));)if(i=this.rules.inline.em.middle.exec(t.slice(0,r.index+2)))return{type:"em",raw:e.slice(0,i[0].length),text:e.slice(1,i[0].length-1)}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return r&&i&&(n=n.substring(1,n.length-1)),n=$(n,!0),{type:"codespan",raw:t[0],text:n}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2]}},t.autolink=function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=$(this.options.mangle?t(i[1]):i[1])):n=$(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}},t.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=$(this.options.mangle?t(n[0]):n[0]));else{var s;do{s=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(s!==n[0]);r=$(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},t.inlineText=function(e,t,n){var r,i=this.rules.inline.text.exec(e);if(i)return r=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):$(i[0]):i[0]:$(this.options.smartypants?n(i[0]):i[0]),{type:"text",raw:i[0],text:r}},e}(),R={exec:function(){}},j=function(e,t){e=e.source||e,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(p,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n},I=y,O={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:R,table:R,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};O.def=j(O.def).replace("label",O._label).replace("title",O._title).getRegex(),O.bullet=/(?:[*+-]|\d{1,9}[.)])/,O.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,O.item=j(O.item,"gm").replace(/bull/g,O.bullet).getRegex(),O.listItemStart=j(/^( *)(bull)/).replace("bull",O.bullet).getRegex(),O.list=j(O.list).replace(/bull/g,O.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+O.def.source+")").getRegex(),O._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",O._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,O.html=j(O.html,"i").replace("comment",O._comment).replace("tag",O._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),O.paragraph=j(O._paragraph).replace("hr",O.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",O._tag).getRegex(),O.blockquote=j(O.blockquote).replace("paragraph",O.paragraph).getRegex(),O.normal=I({},O),O.gfm=I({},O.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),O.gfm.nptable=j(O.gfm.nptable).replace("hr",O.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",O._tag).getRegex(),O.gfm.table=j(O.gfm.table).replace("hr",O.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",O._tag).getRegex(),O.pedantic=I({},O.normal,{html:j("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",O._comment).replace(/tag/g,"(?!(?: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").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:R,paragraph:j(O.normal._paragraph).replace("hr",O.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",O.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var E={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:R,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation*\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation*\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:R,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\s*punctuation])/,_punctuation:"!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~"};E.punctuation=j(E.punctuation).replace(/punctuation/g,E._punctuation).getRegex(),E._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",E._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",E._comment=j(O._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),E.em.start=j(E.em.start).replace(/punctuation/g,E._punctuation).getRegex(),E.em.middle=j(E.em.middle).replace(/punctuation/g,E._punctuation).replace(/overlapSkip/g,E._overlapSkip).getRegex(),E.em.endAst=j(E.em.endAst,"g").replace(/punctuation/g,E._punctuation).getRegex(),E.em.endUnd=j(E.em.endUnd,"g").replace(/punctuation/g,E._punctuation).getRegex(),E.strong.start=j(E.strong.start).replace(/punctuation/g,E._punctuation).getRegex(),E.strong.middle=j(E.strong.middle).replace(/punctuation/g,E._punctuation).replace(/overlapSkip/g,E._overlapSkip).getRegex(),E.strong.endAst=j(E.strong.endAst,"g").replace(/punctuation/g,E._punctuation).getRegex(),E.strong.endUnd=j(E.strong.endUnd,"g").replace(/punctuation/g,E._punctuation).getRegex(),E.blockSkip=j(E._blockSkip,"g").getRegex(),E.overlapSkip=j(E._overlapSkip,"g").getRegex(),E._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,E._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,E._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,E.autolink=j(E.autolink).replace("scheme",E._scheme).replace("email",E._email).getRegex(),E._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,E.tag=j(E.tag).replace("comment",E._comment).replace("attribute",E._attribute).getRegex(),E._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,E._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,E._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,E.link=j(E.link).replace("label",E._label).replace("href",E._href).replace("title",E._title).getRegex(),E.reflink=j(E.reflink).replace("label",E._label).getRegex(),E.reflinkSearch=j(E.reflinkSearch,"g").replace("reflink",E.reflink).replace("nolink",E.nolink).getRegex(),E.normal=I({},E),E.pedantic=I({},E.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:j(/^!?\[(label)\]\((.*?)\)/).replace("label",E._label).getRegex(),reflink:j(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",E._label).getRegex()}),E.gfm=I({},E.normal,{escape:j(E.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),E.gfm.url=j(E.gfm.url,"i").replace("email",E.gfm._extended_email).getRegex(),E.breaks=I({},E.gfm,{br:j(E.br).replace("{2,}","*").getRegex(),text:j(E.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var C={block:O,inline:E},P=r.defaults,q=C.block,L=C.inline,Z=function(e,t){if(t<1)return"";for(var n="";t>1;)1&t&&(n+=e),t>>=1,e+=e;return n+e};function U(e){return e.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201c").replace(/"/g,"\u201d").replace(/\.{3}/g,"\u2026")}function N(e){var t,n,r="",i=e.length;for(t=0;t<i;t++)n=e.charCodeAt(t),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}var D=function(){function t(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||P,this.options.tokenizer=this.options.tokenizer||new T,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:q.normal,inline:L.normal};this.options.pedantic?(t.block=q.pedantic,t.inline=L.pedantic):this.options.gfm&&(t.block=q.gfm,t.inline=this.options.breaks?L.breaks:L.gfm),this.tokenizer.rules=t}t.lex=function(e,n){return new t(n).lex(e)},t.lexInline=function(e,n){return new t(n).inlineTokens(e)};var n,r,i=t.prototype;return i.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},i.blockTokens=function(e,t,n){var r,i,s,l;for(void 0===t&&(t=[]),void 0===n&&(n=!0),e=e.replace(/^ +$/gm,"");e;)if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),r.type&&t.push(r);else if(r=this.tokenizer.code(e,t))e=e.substring(r.raw.length),r.type?t.push(r):((l=t[t.length-1]).raw+="\n"+r.raw,l.text+="\n"+r.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.nptable(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],n),t.push(r);else if(r=this.tokenizer.list(e)){for(e=e.substring(r.raw.length),s=r.items.length,i=0;i<s;i++)r.items[i].tokens=this.blockTokens(r.items[i].text,[],!1);t.push(r)}else if(r=this.tokenizer.html(e))e=e.substring(r.raw.length),t.push(r);else if(n&&(r=this.tokenizer.def(e)))e=e.substring(r.raw.length),this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});else if(r=this.tokenizer.table(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.lheading(e))e=e.substring(r.raw.length),t.push(r);else if(n&&(r=this.tokenizer.paragraph(e)))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.text(e,t))e=e.substring(r.raw.length),r.type?t.push(r):((l=t[t.length-1]).raw+="\n"+r.raw,l.text+="\n"+r.text);else if(e){var a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}throw new Error(a)}return t},i.inline=function(e){var t,n,r,i,s,l,a=e.length;for(t=0;t<a;t++)switch((l=e[t]).type){case"paragraph":case"text":case"heading":l.tokens=[],this.inlineTokens(l.text,l.tokens);break;case"table":for(l.tokens={header:[],cells:[]},i=l.header.length,n=0;n<i;n++)l.tokens.header[n]=[],this.inlineTokens(l.header[n],l.tokens.header[n]);for(i=l.cells.length,n=0;n<i;n++)for(s=l.cells[n],l.tokens.cells[n]=[],r=0;r<s.length;r++)l.tokens.cells[n][r]=[],this.inlineTokens(s[r],l.tokens.cells[n][r]);break;case"blockquote":this.inline(l.tokens);break;case"list":for(i=l.items.length,n=0;n<i;n++)this.inline(l.items[n].tokens)}return e},i.inlineTokens=function(e,t,n,r){var i;void 0===t&&(t=[]),void 0===n&&(n=!1),void 0===r&&(r=!1);var s,l,a,o=e;if(this.tokens.links){var c=Object.keys(this.tokens.links);if(c.length>0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(o));)c.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,s.index)+"["+Z("a",s[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(o));)o=o.slice(0,s.index)+"["+Z("a",s[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;e;)if(l||(a=""),l=!1,i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e,n,r))e=e.substring(i.raw.length),n=i.inLink,r=i.inRawBlock,t.push(i);else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),"link"===i.type&&(i.tokens=this.inlineTokens(i.text,[],!0,r)),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(i.raw.length),"link"===i.type&&(i.tokens=this.inlineTokens(i.text,[],!0,r)),t.push(i);else if(i=this.tokenizer.strong(e,o,a))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,r),t.push(i);else if(i=this.tokenizer.em(e,o,a))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,r),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,r),t.push(i);else if(i=this.tokenizer.autolink(e,N))e=e.substring(i.raw.length),t.push(i);else if(n||!(i=this.tokenizer.url(e,N))){if(i=this.tokenizer.inlineText(e,r,U))e=e.substring(i.raw.length),a=i.raw.slice(-1),l=!0,t.push(i);else if(e){var u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}throw new Error(u)}}else e=e.substring(i.raw.length),t.push(i);return t},n=t,r=[{key:"rules",get:function(){return{block:q,inline:L}}}],null&&e(n.prototype,null),r&&e(n,r),t}(),H=r.defaults,M=function(e,t,n){if(e){var r;try{r=decodeURIComponent(h(n)).replace(g,"").toLowerCase()}catch(i){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!f.test(n)&&(n=function(e,t){d[" "+e]||(d[" "+e]=k.test(e)?e+"/":x(e,"/",!0));var n=-1===(e=d[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(m,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(b,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(i){return null}return n},B=v,X=function(){function e(e){this.options=e||H}var t=e.prototype;return t.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return r?'<pre><code class="'+this.options.langPrefix+B(r,!0)+'">'+(n?e:B(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:B(e,!0))+"</code></pre>\n"},t.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},t.html=function(e){return e},t.heading=function(e,t,n,r){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+r.slug(n)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},t.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},t.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"},t.listitem=function(e){return"<li>"+e+"</li>\n"},t.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},t.paragraph=function(e){return"<p>"+e+"</p>\n"},t.table=function(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"},t.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"},t.strong=function(e){return"<strong>"+e+"</strong>"},t.em=function(e){return"<em>"+e+"</em>"},t.codespan=function(e){return"<code>"+e+"</code>"},t.br=function(){return this.options.xhtml?"<br/>":"<br>"},t.del=function(e){return"<del>"+e+"</del>"},t.link=function(e,t,n){if(null===(e=M(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<a href="'+B(e)+'"';return t&&(r+=' title="'+t+'"'),r+">"+n+"</a>"},t.image=function(e,t,n){if(null===(e=M(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+(this.options.xhtml?"/>":">")},t.text=function(e){return e},e}(),J=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),F=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{n=e+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n},t.slug=function(e,t){void 0===t&&(t={});var n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)},e}(),K=r.defaults,V=w,W=function(){function e(e){this.options=e||K,this.options.renderer=this.options.renderer||new X,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new J,this.slugger=new F}e.parse=function(t,n){return new e(n).parse(t)},e.parseInline=function(t,n){return new e(n).parseInline(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,r,i,s,l,a,o,c,u,h,p,g,f,d,k,m,b,x,v="",w=e.length;for(n=0;n<w;n++)switch((h=e[n]).type){case"space":continue;case"hr":v+=this.renderer.hr();continue;case"heading":v+=this.renderer.heading(this.parseInline(h.tokens),h.depth,V(this.parseInline(h.tokens,this.textRenderer)),this.slugger);continue;case"code":v+=this.renderer.code(h.text,h.lang,h.escaped);continue;case"table":for(c="",o="",s=h.header.length,r=0;r<s;r++)o+=this.renderer.tablecell(this.parseInline(h.tokens.header[r]),{header:!0,align:h.align[r]});for(c+=this.renderer.tablerow(o),u="",s=h.cells.length,r=0;r<s;r++){for(o="",l=(a=h.tokens.cells[r]).length,i=0;i<l;i++)o+=this.renderer.tablecell(this.parseInline(a[i]),{header:!1,align:h.align[i]});u+=this.renderer.tablerow(o)}v+=this.renderer.table(c,u);continue;case"blockquote":u=this.parse(h.tokens),v+=this.renderer.blockquote(u);continue;case"list":for(p=h.ordered,g=h.start,f=h.loose,s=h.items.length,u="",r=0;r<s;r++)m=(k=h.items[r]).checked,b=k.task,d="",k.task&&(x=this.renderer.checkbox(m),f?k.tokens.length>0&&"text"===k.tokens[0].type?(k.tokens[0].text=x+" "+k.tokens[0].text,k.tokens[0].tokens&&k.tokens[0].tokens.length>0&&"text"===k.tokens[0].tokens[0].type&&(k.tokens[0].tokens[0].text=x+" "+k.tokens[0].tokens[0].text)):k.tokens.unshift({type:"text",text:x}):d+=x),d+=this.parse(k.tokens,f),u+=this.renderer.listitem(d,b,m);v+=this.renderer.list(u,p,g);continue;case"html":v+=this.renderer.html(h.text);continue;case"paragraph":v+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(u=h.tokens?this.parseInline(h.tokens):h.text;n+1<w&&"text"===e[n+1].type;)u+="\n"+((h=e[++n]).tokens?this.parseInline(h.tokens):h.text);v+=t?this.renderer.paragraph(u):u;continue;default:var y='Token with "'+h.type+'" type was not found.';if(this.options.silent)return void console.error(y);throw new Error(y)}return v},t.parseInline=function(e,t){t=t||this.renderer;var n,r,i="",s=e.length;for(n=0;n<s;n++)switch((r=e[n]).type){case"escape":i+=t.text(r.text);break;case"html":i+=t.html(r.text);break;case"link":i+=t.link(r.href,r.title,this.parseInline(r.tokens,t));break;case"image":i+=t.image(r.href,r.title,r.text);break;case"strong":i+=t.strong(this.parseInline(r.tokens,t));break;case"em":i+=t.em(this.parseInline(r.tokens,t));break;case"codespan":i+=t.codespan(r.text);break;case"br":i+=t.br();break;case"del":i+=t.del(this.parseInline(r.tokens,t));break;case"text":i+=t.text(r.text);break;default:var l='Token with "'+r.type+'" type was not found.';if(this.options.silent)return void console.error(l);throw new Error(l)}return i},e}(),G=y,Q=function(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")},Y=v,ee=r.getDefaults,te=r.changeDefaults,ne=r.defaults;function re(e,t,n){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof t&&(n=t,t=null),t=G({},re.defaults,t||{}),Q(t),n){var r,i=t.highlight;try{r=D.lex(e,t)}catch(o){return n(o)}var s=function(e){var s;if(!e)try{s=W.parse(r,t)}catch(o){e=o}return t.highlight=i,e?n(e):n(null,s)};if(!i||i.length<3)return s();if(delete t.highlight,!r.length)return s();var l=0;return re.walkTokens(r,function(e){"code"===e.type&&(l++,setTimeout(function(){i(e.text,e.lang,function(t,n){if(t)return s(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),0==--l&&s()})},0))}),void(0===l&&s())}try{var a=D.lex(e,t);return t.walkTokens&&re.walkTokens(a,t.walkTokens),W.parse(a,t)}catch(o){if(o.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+Y(o.message+"",!0)+"</pre>";throw o}}return re.options=re.setOptions=function(e){return G(re.defaults,e),te(re.defaults),re},re.getDefaults=ee,re.defaults=ne,re.use=function(e){var t=G({},e);if(e.renderer&&function(){var n=re.defaults.renderer||new X,r=function(t){var r=n[t];n[t]=function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];var a=e.renderer[t].apply(n,s);return!1===a&&(a=r.apply(n,s)),a}};for(var i in e.renderer)r(i);t.renderer=n}(),e.tokenizer&&function(){var n=re.defaults.tokenizer||new T,r=function(t){var r=n[t];n[t]=function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];var a=e.tokenizer[t].apply(n,s);return!1===a&&(a=r.apply(n,s)),a}};for(var i in e.tokenizer)r(i);t.tokenizer=n}(),e.walkTokens){var n=re.defaults.walkTokens;t.walkTokens=function(t){e.walkTokens(t),n&&n(t)}}re.setOptions(t)},re.walkTokens=function(e,t){for(var r,i=n(e);!(r=i()).done;){var s=r.value;switch(t(s),s.type){case"table":for(var l,a=n(s.tokens.header);!(l=a()).done;)re.walkTokens(l.value,t);for(var o,c=n(s.tokens.cells);!(o=c()).done;)for(var u,h=n(o.value);!(u=h()).done;)re.walkTokens(u.value,t);break;case"list":re.walkTokens(s.items,t);break;default:s.tokens&&re.walkTokens(s.tokens,t)}}},re.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");t=G({},re.defaults,t||{}),Q(t);try{var n=D.lexInline(e,t);return t.walkTokens&&re.walkTokens(n,t.walkTokens),W.parseInline(n,t)}catch(r){if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+Y(r.message+"",!0)+"</pre>";throw r}},re.Parser=W,re.parser=W.parse,re.Renderer=X,re.TextRenderer=J,re.Lexer=D,re.lexer=D.lex,re.Tokenizer=T,re.Slugger=F,re.parse=re,re}()},lR5k:function(e,t,n){"use strict";n.d(t,"a",function(){return f}),n.d(t,"b",function(){return d});var r=n("fXoL"),i=n("ofXK"),s=n("DlQD"),l=n("tk/3"),a=n("jhN1"),o=n("lJxs");n("SxV6");const c=["*"];class u{}const h=new r.q("SECURITY_CONTEXT");let p=(()=>{class e{constructor(e,t,n,r,i){this.platform=e,this.securityContext=t,this.http=n,this.sanitizer=i,this.initialMarkedOptions={renderer:new s.Renderer},this.options=r}get options(){return this._options}set options(e){this._options=Object.assign(Object.assign({},this.initialMarkedOptions),e)}get renderer(){return this.options.renderer}set renderer(e){this.options.renderer=e}compile(e,t=!1,n=!1,r=this.options){const i=this.trimIndentation(e),l=t?this.decodeHtml(i):i,a=n?this.renderEmoji(l):l,o=Object(s.parse)(a,r);return this.sanitizer.sanitize(this.securityContext,o)||""}getSource(e){if(!this.http)throw new Error("[ngx-markdown] When using the `src` attribute you *have to* pass the `HttpClient` as a parameter of the `forRoot` method. See README for more information");return this.http.get(e,{responseType:"text"}).pipe(Object(o.a)(t=>this.handleExtension(e,t)))}highlight(e){if(Object(i.x)(this.platform)&&"undefined"!=typeof Prism){e||(e=document);const t=e.querySelectorAll('pre code:not([class*="language-"])');Array.prototype.forEach.call(t,e=>e.classList.add("language-none")),Prism.highlightAllUnder(e)}}renderKatex(e,t){if(!Object(i.x)(this.platform))return e;if("undefined"==typeof katex||void 0===katex.renderToString)throw new Error("[ngx-markdown] When using the `katex` attribute you *have to* include KaTeX files to `angular.json` or use imports. See README for more information");return e.replace(/\$([^\s][^$]*?[^\s])\$/gm,(e,n)=>katex.renderToString(n,t))}decodeHtml(e){if(!Object(i.x)(this.platform))return e;const t=document.createElement("textarea");return t.innerHTML=e,t.value}handleExtension(e,t){const n=e?e.split("?")[0].split(".").splice(-1).join():null;return"md"!==n?"```"+n+"\n"+t+"\n```":t}renderEmoji(e){if(!Object(i.x)(this.platform))return e;if("undefined"==typeof joypixels||void 0===joypixels.shortnameToUnicode)throw new Error("[ngx-markdown] When using the `emoji` attribute you *have to* include Emoji-Toolkit files to `angular.json` or use imports. See README for more information");return joypixels.shortnameToUnicode(e)}trimIndentation(e){if(!e)return"";let t;return e.split("\n").map(e=>{let n=t;return e.length>0&&(n=isNaN(n)?e.search(/\S|$/):Math.min(e.search(/\S|$/),n)),isNaN(t)&&(t=n),n?e.substring(n):e}).join("\n")}}return e.\u0275fac=function(t){return new(t||e)(r.Sb(r.B),r.Sb(h),r.Sb(l.b,8),r.Sb(u,8),r.Sb(a.b))},e.\u0275prov=r.Fb({token:e,factory:e.\u0275fac}),e})();var g=function(e){return e.LineHighlight="line-highlight",e.LineNumbers="line-numbers",e}({});let f=(()=>{class e{constructor(e,t){this.element=e,this.markdownService=t,this.error=new r.n,this.load=new r.n,this.ready=new r.n,this._emoji=!1,this._katex=!1,this._lineHighlight=!1,this._lineNumbers=!1}get emoji(){return this._emoji}set emoji(e){this._emoji=this.coerceBooleanProperty(e)}get katex(){return this._katex}set katex(e){this._katex=this.coerceBooleanProperty(e)}get lineHighlight(){return this._lineHighlight}set lineHighlight(e){this._lineHighlight=this.coerceBooleanProperty(e)}get lineNumbers(){return this._lineNumbers}set lineNumbers(e){this._lineNumbers=this.coerceBooleanProperty(e)}ngOnChanges(){null==this.data?null==this.src||this.handleSrc():this.handleData()}ngAfterViewInit(){this.data||this.src||this.handleTransclusion()}render(e,t=!1){let n=this.markdownService.compile(e,t,this.emoji);n=this.katex?this.markdownService.renderKatex(n,this.katexOptions):n,this.element.nativeElement.innerHTML=n,this.handlePlugins(),this.markdownService.highlight(this.element.nativeElement),this.ready.emit()}coerceBooleanProperty(e){return null!=e&&""+e!="false"}handleData(){this.render(this.data)}handleSrc(){this.markdownService.getSource(this.src).subscribe(e=>{this.render(e),this.load.emit(e)},e=>this.error.emit(e))}handleTransclusion(){this.render(this.element.nativeElement.innerHTML,!0)}handlePlugins(){this.lineHighlight&&(this.setPluginClass(this.element.nativeElement,g.LineHighlight),this.setPluginOptions(this.element.nativeElement,{dataLine:this.line,dataLineOffset:this.lineOffset})),this.lineNumbers&&(this.setPluginClass(this.element.nativeElement,g.LineNumbers),this.setPluginOptions(this.element.nativeElement,{dataStart:this.start}))}setPluginClass(e,t){const n=e.querySelectorAll("pre");for(let r=0;r<n.length;r++){const e=t instanceof Array?t:[t];n.item(r).classList.add(...e)}}setPluginOptions(e,t){const n=e.querySelectorAll("pre");for(let r=0;r<n.length;r++)Object.keys(t).forEach(e=>{const i=t[e];if(i){const t=this.toLispCase(e);n.item(r).setAttribute(t,i.toString())}})}toLispCase(e){const t=e.match(/([A-Z])/g);if(!t)return e;let n=e.toString();for(let r=0,i=t.length;r<i;r++)n=n.replace(new RegExp(t[r]),"-"+t[r].toLowerCase());return"-"===n.slice(0,1)&&(n=n.slice(1)),n}}return e.\u0275fac=function(t){return new(t||e)(r.Jb(r.l),r.Jb(p))},e.\u0275cmp=r.Db({type:e,selectors:[["markdown"],["","markdown",""]],inputs:{emoji:"emoji",katex:"katex",lineHighlight:"lineHighlight",lineNumbers:"lineNumbers",data:"data",src:"src",katexOptions:"katexOptions",line:"line",lineOffset:"lineOffset",start:"start"},outputs:{error:"error",load:"load",ready:"ready"},features:[r.xb],ngContentSelectors:c,decls:1,vars:0,template:function(e,t){1&e&&(r.dc(),r.cc(0))},encapsulation:2}),e})(),d=(()=>{class e{static forRoot(t){return{ngModule:e,providers:[p,t&&t.loader||[],t&&t.markedOptions||[],{provide:h,useValue:t&&null!=t.sanitize?t.sanitize:r.I.HTML}]}}static forChild(){return{ngModule:e}}}return e.\u0275mod=r.Hb({type:e}),e.\u0275inj=r.Gb({factory:function(t){return new(t||e)}}),e})()}}]);