/*
THIS IS A GENERATED/BUNDLED FILE
If you want to view the source, visit the plugins github repository
https://github.com/ozntel/oz-image-in-editor-obsidian
*/
var cu=Object.create;var Se=Object.defineProperty;var su=Object.getOwnPropertyDescriptor;var lu=Object.getOwnPropertyNames,Rr=Object.getOwnPropertySymbols,fu=Object.getPrototypeOf,Ir=Object.prototype.hasOwnProperty,pu=Object.prototype.propertyIsEnumerable;var Fr=(e,n,r)=>n in e?Se(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,cr=(e,n)=>{for(var r in n||(n={}))Ir.call(n,r)&&Fr(e,r,n[r]);if(Rr)for(var r of Rr(n))pu.call(n,r)&&Fr(e,r,n[r]);return e};var jr=e=>Se(e,"__esModule",{value:!0});var H=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),mu=(e,n)=>{jr(e);for(var r in n)Se(e,r,{get:n[r],enumerable:!0})},hu=(e,n,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of lu(n))!Ir.call(e,a)&&a!=="default"&&Se(e,a,{get:()=>n[a],enumerable:!(r=su(n,a))||r.enumerable});return e},Z=e=>hu(jr(Se(e!=null?cu(fu(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var ne=(e,n,r)=>new Promise((a,d)=>{var o=_=>{try{m(r.next(_))}catch(A){d(A)}},c=_=>{try{m(r.throw(_))}catch(A){d(A)}},m=_=>_.done?a(_.value):Promise.resolve(_.value).then(o,c);m((r=r.apply(e,n)).next())});var Vr=H((Ur,Ue)=>{(function(){function e(i){"use strict";var t={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:`Remove only spaces, ' and " from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids`,type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,description:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,description:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,description:"Parses simple line breaks as
(GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex:
[^\r]+?<\/pre>)/gm,function(h,f){var g=f;return g=g.replace(/^ /mg,"\xA80"),g=g.replace(/¨0/g,""),g}),r.subParser("hashBlock")(`","gim"),i=u.converter._dispatch("hashPreCodeTags.after",i,t,u),i}),r.subParser("headers",function(i,t,u){"use strict";i=u.converter._dispatch("headers.before",i,t,u);var s=isNaN(parseInt(t.headerLevelStart))?1:parseInt(t.headerLevelStart),p=t.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,h=t.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;i=i.replace(p,function(T,b){var w=r.subParser("spanGamut")(b,t,u),y=t.noHeaderId?"":' id="'+g(b)+'"',l=s,k="`+p+``,t,u)}),i=u.converter._dispatch("blockQuotes.after",i,t,u),i}),r.subParser("codeBlocks",function(i,t,u){"use strict";i=u.converter._dispatch("codeBlocks.before",i,t,u),i+="\xA80";var s=/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g;return i=i.replace(s,function(p,h,f){var g=h,T=f,b=` `;return g=r.subParser("outdent")(g,t,u),g=r.subParser("encodeCode")(g,t,u),g=r.subParser("detab")(g,t,u),g=g.replace(/^\n+/g,""),g=g.replace(/\n+$/g,""),t.omitExtraWLInCodeBlocks&&(b=""),g="",r.subParser("hashBlock")(g,t,u)+T}),i=i.replace(/¨0/,""),i=u.converter._dispatch("codeBlocks.after",i,t,u),i}),r.subParser("codeSpans",function(i,t,u){"use strict";return i=u.converter._dispatch("codeSpans.before",i,t,u),typeof i=="undefined"&&(i=""),i=i.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(s,p,h,f){var g=f;return g=g.replace(/^([ \t]*)/g,""),g=g.replace(/[ \t]*$/g,""),g=r.subParser("encodeCode")(g,t,u),g=p+""+g+b+"
"+g+"
",g=r.subParser("hashHTMLSpans")(g,t,u),g}),i=u.converter._dispatch("codeSpans.after",i,t,u),i}),r.subParser("completeHTMLDocument",function(i,t,u){"use strict";if(!t.completeHTMLDocument)return i;i=u.converter._dispatch("completeHTMLDocument.before",i,t,u);var s="html",p=` `,h="",f=` `,g="",T="";typeof u.metadata.parsed.doctype!="undefined"&&(p=" `,s=u.metadata.parsed.doctype.toString().toLowerCase(),(s==="html"||s==="html5")&&(f=''));for(var b in u.metadata.parsed)if(u.metadata.parsed.hasOwnProperty(b))switch(b.toLowerCase()){case"doctype":break;case"title":h=""+u.metadata.parsed.title+` `;break;case"charset":s==="html"||s==="html5"?f=' `:f=' `;break;case"language":case"lang":g=' lang="'+u.metadata.parsed[b]+'"',T+=' `;break;default:T+=' `}return i=p+" `+h+f+T+` `+i.trim()+` `,i=u.converter._dispatch("completeHTMLDocument.after",i,t,u),i}),r.subParser("detab",function(i,t,u){"use strict";return i=u.converter._dispatch("detab.before",i,t,u),i=i.replace(/\t(?=\t)/g," "),i=i.replace(/\t/g,"\xA8A\xA8B"),i=i.replace(/¨B(.+?)¨A/g,function(s,p){for(var h=p,f=4-h.length%4,g=0;g/g,">"),i=u.converter._dispatch("encodeAmpsAndAngles.after",i,t,u),i}),r.subParser("encodeBackslashEscapes",function(i,t,u){"use strict";return i=u.converter._dispatch("encodeBackslashEscapes.before",i,t,u),i=i.replace(/\\(\\)/g,r.helper.escapeCharactersCallback),i=i.replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,r.helper.escapeCharactersCallback),i=u.converter._dispatch("encodeBackslashEscapes.after",i,t,u),i}),r.subParser("encodeCode",function(i,t,u){"use strict";return i=u.converter._dispatch("encodeCode.before",i,t,u),i=i.replace(/&/g,"&").replace(//g,">").replace(/([*_{}\[\]\\=~-])/g,r.helper.escapeCharactersCallback),i=u.converter._dispatch("encodeCode.after",i,t,u),i}),r.subParser("escapeSpecialCharsWithinTagAttributes",function(i,t,u){"use strict";i=u.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",i,t,u);var s=/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,p=/-]|-[^>])(?:[^-]|-[^-])*)--)>/gi;return i=i.replace(s,function(h){return h.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,r.helper.escapeCharactersCallback)}),i=i.replace(p,function(h){return h.replace(/([\\`*_~=|])/g,r.helper.escapeCharactersCallback)}),i=u.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",i,t,u),i}),r.subParser("githubCodeBlocks",function(i,t,u){"use strict";return t.ghCodeBlocks?(i=u.converter._dispatch("githubCodeBlocks.before",i,t,u),i+="\xA80",i=i.replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(s,p,h,f){var g=t.omitExtraWLInCodeBlocks?"":` `;return f=r.subParser("encodeCode")(f,t,u),f=r.subParser("detab")(f,t,u),f=f.replace(/^\n+/g,""),f=f.replace(/\n+$/g,""),f=" ",f=r.subParser("hashBlock")(f,t,u),` \xA8G`+(u.ghCodeBlocks.push({text:s,codeblock:f})-1)+`G `}),i=i.replace(/¨0/,""),u.converter._dispatch("githubCodeBlocks.after",i,t,u)):i}),r.subParser("hashBlock",function(i,t,u){"use strict";return i=u.converter._dispatch("hashBlock.before",i,t,u),i=i.replace(/(^\n+|\n+$)/g,""),i=` \xA8K`+(u.gHtmlBlocks.push(i)-1)+`K `,i=u.converter._dispatch("hashBlock.after",i,t,u),i}),r.subParser("hashCodeTags",function(i,t,u){"use strict";i=u.converter._dispatch("hashCodeTags.before",i,t,u);var s=function(p,h,f,g){var T=f+r.subParser("encodeCode")(h,t,u)+g;return"\xA8C"+(u.gHtmlSpans.push(T)-1)+"C"};return i=r.helper.replaceRecursiveRegExp(i,s,""+f+g+"
]*>","
","gim"),i=u.converter._dispatch("hashCodeTags.after",i,t,u),i}),r.subParser("hashElement",function(i,t,u){"use strict";return function(s,p){var h=p;return h=h.replace(/\n\n/g,` `),h=h.replace(/^\n/,""),h=h.replace(/\n+$/g,""),h=` \xA8K`+(u.gHtmlBlocks.push(h)-1)+`K `,h}}),r.subParser("hashHTMLBlocks",function(i,t,u){"use strict";i=u.converter._dispatch("hashHTMLBlocks.before",i,t,u);var s=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],p=function(l,k,C,L){var j=l;return C.search(/\bmarkdown\b/)!==-1&&(j=C+u.converter.makeHtml(k)+L),` \xA8K`+(u.gHtmlBlocks.push(j)-1)+`K `};t.backslashEscapesHTMLTags&&(i=i.replace(/\\<(\/?[^>]+?)>/g,function(l,k){return"<"+k+">"}));for(var h=0;h]*>)","im"),T="<"+s[h]+"\\b[^>]*>",b=""+s[h]+">";(f=r.helper.regexIndexOf(i,g))!==-1;){var w=r.helper.splitAtIndex(i,f),y=r.helper.replaceRecursiveRegExp(w[1],p,T,b,"im");if(y===w[1])break;i=w[0].concat(y)}return i=i.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,r.subParser("hashElement")(i,t,u)),i=r.helper.replaceRecursiveRegExp(i,function(l){return` \xA8K`+(u.gHtmlBlocks.push(l)-1)+`K `},"^ {0,3}","gm"),i=i.replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,r.subParser("hashElement")(i,t,u)),i=u.converter._dispatch("hashHTMLBlocks.after",i,t,u),i}),r.subParser("hashHTMLSpans",function(i,t,u){"use strict";i=u.converter._dispatch("hashHTMLSpans.before",i,t,u);function s(p){return"\xA8C"+(u.gHtmlSpans.push(p)-1)+"C"}return i=i.replace(/<[^>]+?\/>/gi,function(p){return s(p)}),i=i.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(p){return s(p)}),i=i.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(p){return s(p)}),i=i.replace(/<[^>]+?>/gi,function(p){return s(p)}),i=u.converter._dispatch("hashHTMLSpans.after",i,t,u),i}),r.subParser("unhashHTMLSpans",function(i,t,u){"use strict";i=u.converter._dispatch("unhashHTMLSpans.before",i,t,u);for(var s=0;s ]*>\\s* ]*>","^ {0,3}
\\s*
"),g+="
",p.push(g))}for(h=p.length,f=0;f]*>/.test(b)&&(w=!0)}p[f]=b}return i=p.join(`
`),i=i.replace(/^\n+/g,""),i=i.replace(/\n+$/g,""),u.converter._dispatch("paragraphs.after",i,t,u)}),r.subParser("runExtension",function(i,t,u,s){"use strict";if(i.filter)t=i.filter(t,s.converter,u);else if(i.regex){var p=i.regex;p instanceof RegExp||(p=new RegExp(p,"g")),t=t.replace(p,i.replace)}return t}),r.subParser("spanGamut",function(i,t,u){"use strict";return i=u.converter._dispatch("spanGamut.before",i,t,u),i=r.subParser("codeSpans")(i,t,u),i=r.subParser("escapeSpecialCharsWithinTagAttributes")(i,t,u),i=r.subParser("encodeBackslashEscapes")(i,t,u),i=r.subParser("images")(i,t,u),i=r.subParser("anchors")(i,t,u),i=r.subParser("autoLinks")(i,t,u),i=r.subParser("simplifiedAutoLinks")(i,t,u),i=r.subParser("emoji")(i,t,u),i=r.subParser("underline")(i,t,u),i=r.subParser("italicsAndBold")(i,t,u),i=r.subParser("strikethrough")(i,t,u),i=r.subParser("ellipsis")(i,t,u),i=r.subParser("hashHTMLSpans")(i,t,u),i=r.subParser("encodeAmpsAndAngles")(i,t,u),t.simpleLineBreaks?/\n\n¨K/.test(i)||(i=i.replace(/\n+/g,`
`)):i=i.replace(/ +\n/g,`
`),i=u.converter._dispatch("spanGamut.after",i,t,u),i}),r.subParser("strikethrough",function(i,t,u){"use strict";function s(p){return t.simplifiedAutoLink&&(p=r.subParser("simplifiedAutoLinks")(p,t,u)),""+p+""}return t.strikethrough&&(i=u.converter._dispatch("strikethrough.before",i,t,u),i=i.replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(p,h){return s(h)}),i=u.converter._dispatch("strikethrough.after",i,t,u)),i}),r.subParser("stripLinkDefinitions",function(i,t,u){"use strict";var s=/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,p=/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm;i+="\xA80";var h=function(f,g,T,b,w,y,l){return g=g.toLowerCase(),T.match(/^data:.+?\/.+?;base64,/)?u.gUrls[g]=T.replace(/\s/g,""):u.gUrls[g]=r.subParser("encodeAmpsAndAngles")(T,t,u),y?y+l:(l&&(u.gTitles[g]=l.replace(/"|'/g,""")),t.parseImgDimensions&&b&&w&&(u.gDimensions[g]={width:b,height:w}),"")};return i=i.replace(p,h),i=i.replace(s,h),i=i.replace(/¨0/,""),i}),r.subParser("tables",function(i,t,u){"use strict";if(!t.tables)return i;var s=/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,p=/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm;function h(w){return/^:[ \t]*--*$/.test(w)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(w)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(w)?' style="text-align:center;"':""}function f(w,y){var l="";return w=w.trim(),(t.tablesHeaderId||t.tableHeaderId)&&(l=' id="'+w.replace(/ /g,"_").toLowerCase()+'"'),w=r.subParser("spanGamut")(w,t,u),""+w+`
`}function g(w,y){var l=r.subParser("spanGamut")(w,t,u);return""+l+`
`}function T(w,y){for(var l=`
`,k=w.length,C=0;C
`,C=0;C
`;for(var L=0;L
`}return l+=`
`,l}function b(w){var y,l=w.split(`
`);for(y=0;y"+p+""}),i=i.replace(/\b__(\S[\s\S]*?)__\b/g,function(s,p){return""+p+""})):(i=i.replace(/___(\S[\s\S]*?)___/g,function(s,p){return/\S$/.test(p)?""+p+"":s}),i=i.replace(/__(\S[\s\S]*?)__/g,function(s,p){return/\S$/.test(p)?""+p+"":s})),i=i.replace(/(_)/g,r.helper.escapeCharactersCallback),i=u.converter._dispatch("underline.after",i,t,u)),i}),r.subParser("unescapeSpecialChars",function(i,t,u){"use strict";return i=u.converter._dispatch("unescapeSpecialChars.before",i,t,u),i=i.replace(/¨E(\d+)E/g,function(s,p){var h=parseInt(p);return String.fromCharCode(h)}),i=u.converter._dispatch("unescapeSpecialChars.after",i,t,u),i}),r.subParser("makeMarkdown.blockquote",function(i,t){"use strict";var u="";if(i.hasChildNodes())for(var s=i.childNodes,p=s.length,h=0;h "+u.split(`
`).join(`
> `),u}),r.subParser("makeMarkdown.codeBlock",function(i,t){"use strict";var u=i.getAttribute("language"),s=i.getAttribute("precodenum");return"```"+u+`
`+t.preList[s]+"\n```"}),r.subParser("makeMarkdown.codeSpan",function(i){"use strict";return"`"+i.innerHTML+"`"}),r.subParser("makeMarkdown.emphasis",function(i,t){"use strict";var u="";if(i.hasChildNodes()){u+="*";for(var s=i.childNodes,p=s.length,h=0;h
",i.hasAttribute("width")&&i.hasAttribute("height")&&(t+=" ="+i.getAttribute("width")+"x"+i.getAttribute("height")),i.hasAttribute("title")&&(t+=' "'+i.getAttribute("title")+'"'),t+=")"),t}),r.subParser("makeMarkdown.links",function(i,t){"use strict";var u="";if(i.hasChildNodes()&&i.hasAttribute("href")){var s=i.childNodes,p=s.length;u="[";for(var h=0;h
",i.hasAttribute("title")&&(u+=' "'+i.getAttribute("title")+'"'),u+=")"}return u}),r.subParser("makeMarkdown.list",function(i,t,u){"use strict";var s="";if(!i.hasChildNodes())return"";for(var p=i.childNodes,h=p.length,f=i.getAttribute("start")||1,g=0;g
`,s.trim()}),r.subParser("makeMarkdown.listItem",function(i,t){"use strict";for(var u="",s=i.childNodes,p=s.length,h=0;h
`;if(i.nodeType!==1)return"";var p=i.tagName.toLowerCase();switch(p){case"h1":u||(s=r.subParser("makeMarkdown.header")(i,t,1)+`
`);break;case"h2":u||(s=r.subParser("makeMarkdown.header")(i,t,2)+`
`);break;case"h3":u||(s=r.subParser("makeMarkdown.header")(i,t,3)+`
`);break;case"h4":u||(s=r.subParser("makeMarkdown.header")(i,t,4)+`
`);break;case"h5":u||(s=r.subParser("makeMarkdown.header")(i,t,5)+`
`);break;case"h6":u||(s=r.subParser("makeMarkdown.header")(i,t,6)+`
`);break;case"p":u||(s=r.subParser("makeMarkdown.paragraph")(i,t)+`
`);break;case"blockquote":u||(s=r.subParser("makeMarkdown.blockquote")(i,t)+`
`);break;case"hr":u||(s=r.subParser("makeMarkdown.hr")(i,t)+`
`);break;case"ol":u||(s=r.subParser("makeMarkdown.list")(i,t,"ol")+`
`);break;case"ul":u||(s=r.subParser("makeMarkdown.list")(i,t,"ul")+`
`);break;case"precode":u||(s=r.subParser("makeMarkdown.codeBlock")(i,t)+`
`);break;case"pre":u||(s=r.subParser("makeMarkdown.pre")(i,t)+`
`);break;case"table":u||(s=r.subParser("makeMarkdown.table")(i,t)+`
`);break;case"code":s=r.subParser("makeMarkdown.codeSpan")(i,t);break;case"em":case"i":s=r.subParser("makeMarkdown.emphasis")(i,t);break;case"strong":case"b":s=r.subParser("makeMarkdown.strong")(i,t);break;case"del":s=r.subParser("makeMarkdown.strikethrough")(i,t);break;case"a":s=r.subParser("makeMarkdown.links")(i,t);break;case"img":s=r.subParser("makeMarkdown.image")(i,t);break;default:s=i.outerHTML+`
`}return s}),r.subParser("makeMarkdown.paragraph",function(i,t){"use strict";var u="";if(i.hasChildNodes())for(var s=i.childNodes,p=s.length,h=0;h
"+t.preList[u]+""}),r.subParser("makeMarkdown.strikethrough",function(i,t){"use strict";var u="";if(i.hasChildNodes()){u+="~~";for(var s=i.childNodes,p=s.length,h=0;h
tr>th"),h=i.querySelectorAll("tbody>tr"),f,g;for(f=0;f
C&&(C=L)}for(f=0;f/g,"\\$1>"),t=t.replace(/^#/gm,"\\#"),t=t.replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3"),t=t.replace(/^( {0,3}\d+)\./gm,"$1\\."),t=t.replace(/^( {0,3})([+-])/gm,"$1\\$2"),t=t.replace(/]([\s]*)\(/g,"\\]$1\\("),t=t.replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:"),t});var ue=this;typeof define=="function"&&define.amd?define(function(){"use strict";return r}):typeof Ue!="undefined"&&Ue.exports?Ue.exports=r:ue.showdown=r}).call(Ur)});var pe=H((hl,fe)=>{"use strict";function Gr(e){return typeof e=="undefined"||e===null}function Vu(e){return typeof e=="object"&&e!==null}function Wu(e){return Array.isArray(e)?e:Gr(e)?[]:[e]}function Gu(e,n){var r,a,d,o;if(n)for(o=Object.keys(n),r=0,a=o.length;r{"use strict";function Me(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Me.prototype=Object.create(Error.prototype);Me.prototype.constructor=Me;Me.prototype.toString=function(n){var r=this.name+": ";return r+=this.reason||"(unknown reason)",!n&&this.mark&&(r+=" "+this.mark.toString()),r};Yr.exports=Me});var Zr=H((_l,Jr)=>{"use strict";var Kr=pe();function pr(e,n,r,a,d){this.name=e,this.buffer=n,this.position=r,this.line=a,this.column=d}pr.prototype.getSnippet=function(n,r){var a,d,o,c,m;if(!this.buffer)return null;for(n=n||4,r=r||75,a="",d=this.position;d>0&&`\0\r
\x85\u2028\u2029`.indexOf(this.buffer.charAt(d-1))===-1;)if(d-=1,this.position-d>r/2-1){a=" ... ",d+=5;break}for(o="",c=this.position;cr/2-1){o=" ... ",c-=5;break}return m=this.buffer.slice(d,c),Kr.repeat(" ",n)+a+m+o+`
`+Kr.repeat(" ",n+this.position-d+a.length)+"^"};pr.prototype.toString=function(n){var r,a="";return this.name&&(a+='in "'+this.name+'" '),a+="at line "+(this.line+1)+", column "+(this.column+1),n||(r=this.getSnippet(),r&&(a+=`:
`+r)),a};Jr.exports=pr});var V=H((wl,Xr)=>{"use strict";var Qr=ve(),Ju=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],Zu=["scalar","sequence","mapping"];function Qu(e){var n={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(a){n[String(a)]=r})}),n}function Xu(e,n){if(n=n||{},Object.keys(n).forEach(function(r){if(Ju.indexOf(r)===-1)throw new Qr('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(r){return r},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.defaultStyle=n.defaultStyle||null,this.styleAliases=Qu(n.styleAliases||null),Zu.indexOf(this.kind)===-1)throw new Qr('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}Xr.exports=Xu});var me=H((bl,rn)=>{"use strict";var en=pe(),Ge=ve(),ea=V();function mr(e,n,r){var a=[];return e.include.forEach(function(d){r=mr(d,n,r)}),e[n].forEach(function(d){r.forEach(function(o,c){o.tag===d.tag&&o.kind===d.kind&&a.push(c)}),r.push(d)}),r.filter(function(d,o){return a.indexOf(o)===-1})}function ra(){var e={scalar:{},sequence:{},mapping:{},fallback:{}},n,r;function a(d){e[d.kind][d.tag]=e.fallback[d.tag]=d}for(n=0,r=arguments.length;n{"use strict";var na=V();nn.exports=new na("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var tn=H((yl,an)=>{"use strict";var ia=V();an.exports=new ia("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var on=H((kl,dn)=>{"use strict";var ua=V();dn.exports=new ua("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var Ye=H((Tl,cn)=>{"use strict";var aa=me();cn.exports=new aa({explicit:[un(),tn(),on()]})});var ln=H((Al,sn)=>{"use strict";var ta=V();function da(e){if(e===null)return!0;var n=e.length;return n===1&&e==="~"||n===4&&(e==="null"||e==="Null"||e==="NULL")}function oa(){return null}function ca(e){return e===null}sn.exports=new ta("tag:yaml.org,2002:null",{kind:"scalar",resolve:da,construct:oa,predicate:ca,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var pn=H((xl,fn)=>{"use strict";var sa=V();function la(e){if(e===null)return!1;var n=e.length;return n===4&&(e==="true"||e==="True"||e==="TRUE")||n===5&&(e==="false"||e==="False"||e==="FALSE")}function fa(e){return e==="true"||e==="True"||e==="TRUE"}function pa(e){return Object.prototype.toString.call(e)==="[object Boolean]"}fn.exports=new sa("tag:yaml.org,2002:bool",{kind:"scalar",resolve:la,construct:fa,predicate:pa,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})});var hn=H((El,mn)=>{"use strict";var ma=pe(),ha=V();function ga(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function _a(e){return 48<=e&&e<=55}function wa(e){return 48<=e&&e<=57}function ba(e){if(e===null)return!1;var n=e.length,r=0,a=!1,d;if(!n)return!1;if(d=e[r],(d==="-"||d==="+")&&(d=e[++r]),d==="0"){if(r+1===n)return!0;if(d=e[++r],d==="b"){for(r++;r=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var wn=H((Cl,_n)=>{"use strict";var gn=pe(),ka=V(),Ta=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Aa(e){return!(e===null||!Ta.test(e)||e[e.length-1]==="_")}function xa(e){var n,r,a,d;return n=e.replace(/_/g,"").toLowerCase(),r=n[0]==="-"?-1:1,d=[],"+-".indexOf(n[0])>=0&&(n=n.slice(1)),n===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:n===".nan"?NaN:n.indexOf(":")>=0?(n.split(":").forEach(function(o){d.unshift(parseFloat(o,10))}),n=0,a=1,d.forEach(function(o){n+=o*a,a*=60}),r*n):r*parseFloat(n,10)}var Ea=/^[-+]?[0-9]+e/;function Ca(e,n){var r;if(isNaN(e))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(gn.isNegativeZero(e))return"-0.0";return r=e.toString(10),Ea.test(r)?r.replace("e",".e"):r}function Sa(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!=0||gn.isNegativeZero(e))}_n.exports=new ka("tag:yaml.org,2002:float",{kind:"scalar",resolve:Aa,construct:xa,predicate:Sa,represent:Ca,defaultStyle:"lowercase"})});var hr=H((Sl,bn)=>{"use strict";var La=me();bn.exports=new La({include:[Ye()],implicit:[ln(),pn(),hn(),wn()]})});var gr=H((Ll,vn)=>{"use strict";var Pa=me();vn.exports=new Pa({include:[hr()]})});var An=H((Pl,Tn)=>{"use strict";var Ma=V(),yn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),kn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Ra(e){return e===null?!1:yn.exec(e)!==null||kn.exec(e)!==null}function Ia(e){var n,r,a,d,o,c,m,_=0,A=null,S,x,E;if(n=yn.exec(e),n===null&&(n=kn.exec(e)),n===null)throw new Error("Date resolve error");if(r=+n[1],a=+n[2]-1,d=+n[3],!n[4])return new Date(Date.UTC(r,a,d));if(o=+n[4],c=+n[5],m=+n[6],n[7]){for(_=n[7].slice(0,3);_.length<3;)_+="0";_=+_}return n[9]&&(S=+n[10],x=+(n[11]||0),A=(S*60+x)*6e4,n[9]==="-"&&(A=-A)),E=new Date(Date.UTC(r,a,d,o,c,m,_)),A&&E.setTime(E.getTime()-A),E}function Fa(e){return e.toISOString()}Tn.exports=new Ma("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Ra,construct:Ia,instanceOf:Date,represent:Fa})});var En=H((Ml,xn)=>{"use strict";var ja=V();function Ha(e){return e==="<<"||e===null}xn.exports=new ja("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Ha})});var Ln=H((Rl,Sn)=>{"use strict";var he;try{Cn=require,he=Cn("buffer").Buffer}catch(e){}var Cn,za=V(),_r=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function Oa(e){if(e===null)return!1;var n,r,a=0,d=e.length,o=_r;for(r=0;r64)){if(n<0)return!1;a+=6}return a%8==0}function Da(e){var n,r,a=e.replace(/[\r\n=]/g,""),d=a.length,o=_r,c=0,m=[];for(n=0;n>16&255),m.push(c>>8&255),m.push(c&255)),c=c<<6|o.indexOf(a.charAt(n));return r=d%4*6,r===0?(m.push(c>>16&255),m.push(c>>8&255),m.push(c&255)):r===18?(m.push(c>>10&255),m.push(c>>2&255)):r===12&&m.push(c>>4&255),he?he.from?he.from(m):new he(m):m}function Na(e){var n="",r=0,a,d,o=e.length,c=_r;for(a=0;a>18&63],n+=c[r>>12&63],n+=c[r>>6&63],n+=c[r&63]),r=(r<<8)+e[a];return d=o%3,d===0?(n+=c[r>>18&63],n+=c[r>>12&63],n+=c[r>>6&63],n+=c[r&63]):d===2?(n+=c[r>>10&63],n+=c[r>>4&63],n+=c[r<<2&63],n+=c[64]):d===1&&(n+=c[r>>2&63],n+=c[r<<4&63],n+=c[64],n+=c[64]),n}function Ba(e){return he&&he.isBuffer(e)}Sn.exports=new za("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Oa,construct:Da,predicate:Ba,represent:Na})});var Mn=H((Il,Pn)=>{"use strict";var qa=V(),$a=Object.prototype.hasOwnProperty,Ua=Object.prototype.toString;function Va(e){if(e===null)return!0;var n=[],r,a,d,o,c,m=e;for(r=0,a=m.length;r{"use strict";var Ga=V(),Ya=Object.prototype.toString;function Ka(e){if(e===null)return!0;var n,r,a,d,o,c=e;for(o=new Array(c.length),n=0,r=c.length;n{"use strict";var Za=V(),Qa=Object.prototype.hasOwnProperty;function Xa(e){if(e===null)return!0;var n,r=e;for(n in r)if(Qa.call(r,n)&&r[n]!==null)return!1;return!0}function et(e){return e!==null?e:{}}Fn.exports=new Za("tag:yaml.org,2002:set",{kind:"mapping",resolve:Xa,construct:et})});var ke=H((Hl,Hn)=>{"use strict";var rt=me();Hn.exports=new rt({include:[gr()],implicit:[An(),En()],explicit:[Ln(),Mn(),In(),jn()]})});var On=H((zl,zn)=>{"use strict";var nt=V();function it(){return!0}function ut(){}function at(){return""}function tt(e){return typeof e=="undefined"}zn.exports=new nt("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:it,construct:ut,predicate:tt,represent:at})});var Nn=H((Ol,Dn)=>{"use strict";var dt=V();function ot(e){if(e===null||e.length===0)return!1;var n=e,r=/\/([gim]*)$/.exec(e),a="";return!(n[0]==="/"&&(r&&(a=r[1]),a.length>3||n[n.length-a.length-1]!=="/"))}function ct(e){var n=e,r=/\/([gim]*)$/.exec(e),a="";return n[0]==="/"&&(r&&(a=r[1]),n=n.slice(1,n.length-a.length-1)),new RegExp(n,a)}function st(e){var n="/"+e.source+"/";return e.global&&(n+="g"),e.multiline&&(n+="m"),e.ignoreCase&&(n+="i"),n}function lt(e){return Object.prototype.toString.call(e)==="[object RegExp]"}Dn.exports=new dt("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:ot,construct:ct,predicate:lt,represent:st})});var $n=H((Dl,qn)=>{"use strict";var Ke;try{Bn=require,Ke=Bn("esprima")}catch(e){typeof window!="undefined"&&(Ke=window.esprima)}var Bn,ft=V();function pt(e){if(e===null)return!1;try{var n="("+e+")",r=Ke.parse(n,{range:!0});return!(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")}catch(a){return!1}}function mt(e){var n="("+e+")",r=Ke.parse(n,{range:!0}),a=[],d;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(o){a.push(o.name)}),d=r.body[0].expression.body.range,r.body[0].expression.body.type==="BlockStatement"?new Function(a,n.slice(d[0]+1,d[1]-1)):new Function(a,"return "+n.slice(d[0],d[1]))}function ht(e){return e.toString()}function gt(e){return Object.prototype.toString.call(e)==="[object Function]"}qn.exports=new ft("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:pt,construct:mt,predicate:gt,represent:ht})});var Re=H((Nl,Vn)=>{"use strict";var Un=me();Vn.exports=Un.DEFAULT=new Un({include:[ke()],explicit:[On(),Nn(),$n()]})});var si=H((Bl,Ie)=>{"use strict";var oe=pe(),Wn=ve(),_t=Zr(),Gn=ke(),wt=Re(),ce=Object.prototype.hasOwnProperty,Je=1,Yn=2,Kn=3,Ze=4,wr=1,bt=2,Jn=3,vt=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,yt=/[\x85\u2028\u2029]/,kt=/[,\[\]\{\}]/,Zn=/^(?:!|!!|![a-z\-]+!)$/i,Qn=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Xn(e){return Object.prototype.toString.call(e)}function ae(e){return e===10||e===13}function ge(e){return e===9||e===32}function X(e){return e===9||e===32||e===10||e===13}function Te(e){return e===44||e===91||e===93||e===123||e===125}function Tt(e){var n;return 48<=e&&e<=57?e-48:(n=e|32,97<=n&&n<=102?n-97+10:-1)}function At(e){return e===120?2:e===117?4:e===85?8:0}function xt(e){return 48<=e&&e<=57?e-48:-1}function ei(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function Et(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var ri=new Array(256),ni=new Array(256);for(_e=0;_e<256;_e++)ri[_e]=ei(_e)?1:0,ni[_e]=ei(_e);var _e;function Ct(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||wt,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function ii(e,n){return new Wn(n,new _t(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function R(e,n){throw ii(e,n)}function Qe(e,n){e.onWarning&&e.onWarning.call(null,ii(e,n))}var ui={YAML:function(n,r,a){var d,o,c;n.version!==null&&R(n,"duplication of %YAML directive"),a.length!==1&&R(n,"YAML directive accepts exactly one argument"),d=/^([0-9]+)\.([0-9]+)$/.exec(a[0]),d===null&&R(n,"ill-formed argument of the YAML directive"),o=parseInt(d[1],10),c=parseInt(d[2],10),o!==1&&R(n,"unacceptable YAML version of the document"),n.version=a[0],n.checkLineBreaks=c<2,c!==1&&c!==2&&Qe(n,"unsupported YAML version of the document")},TAG:function(n,r,a){var d,o;a.length!==2&&R(n,"TAG directive accepts exactly two arguments"),d=a[0],o=a[1],Zn.test(d)||R(n,"ill-formed tag handle (first argument) of the TAG directive"),ce.call(n.tagMap,d)&&R(n,'there is a previously declared suffix for "'+d+'" tag handle'),Qn.test(o)||R(n,"ill-formed tag prefix (second argument) of the TAG directive"),n.tagMap[d]=o}};function se(e,n,r,a){var d,o,c,m;if(n1&&(e.result+=oe.repeat(`
`,n-1))}function St(e,n,r){var a,d,o,c,m,_,A,S,x=e.kind,E=e.result,v;if(v=e.input.charCodeAt(e.position),X(v)||Te(v)||v===35||v===38||v===42||v===33||v===124||v===62||v===39||v===34||v===37||v===64||v===96||(v===63||v===45)&&(d=e.input.charCodeAt(e.position+1),X(d)||r&&Te(d)))return!1;for(e.kind="scalar",e.result="",o=c=e.position,m=!1;v!==0;){if(v===58){if(d=e.input.charCodeAt(e.position+1),X(d)||r&&Te(d))break}else if(v===35){if(a=e.input.charCodeAt(e.position-1),X(a))break}else{if(e.position===e.lineStart&&Xe(e)||r&&Te(v))break;if(ae(v))if(_=e.line,A=e.lineStart,S=e.lineIndent,$(e,!1,-1),e.lineIndent>=n){m=!0,v=e.input.charCodeAt(e.position);continue}else{e.position=c,e.line=_,e.lineStart=A,e.lineIndent=S;break}}m&&(se(e,o,c,!1),vr(e,e.line-_),o=c=e.position,m=!1),ge(v)||(c=e.position+1),v=e.input.charCodeAt(++e.position)}return se(e,o,c,!1),e.result?!0:(e.kind=x,e.result=E,!1)}function Lt(e,n){var r,a,d;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,a=d=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(se(e,a,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)a=e.position,e.position++,d=e.position;else return!0;else ae(r)?(se(e,a,d,!0),vr(e,$(e,!1,n)),a=d=e.position):e.position===e.lineStart&&Xe(e)?R(e,"unexpected end of the document within a single quoted scalar"):(e.position++,d=e.position);R(e,"unexpected end of the stream within a single quoted scalar")}function Pt(e,n){var r,a,d,o,c,m;if(m=e.input.charCodeAt(e.position),m!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=a=e.position;(m=e.input.charCodeAt(e.position))!==0;){if(m===34)return se(e,r,e.position,!0),e.position++,!0;if(m===92){if(se(e,r,e.position,!0),m=e.input.charCodeAt(++e.position),ae(m))$(e,!1,n);else if(m<256&&ri[m])e.result+=ni[m],e.position++;else if((c=At(m))>0){for(d=c,o=0;d>0;d--)m=e.input.charCodeAt(++e.position),(c=Tt(m))>=0?o=(o<<4)+c:R(e,"expected hexadecimal character");e.result+=Et(o),e.position++}else R(e,"unknown escape sequence");r=a=e.position}else ae(m)?(se(e,r,a,!0),vr(e,$(e,!1,n)),r=a=e.position):e.position===e.lineStart&&Xe(e)?R(e,"unexpected end of the document within a double quoted scalar"):(e.position++,a=e.position)}R(e,"unexpected end of the stream within a double quoted scalar")}function Mt(e,n){var r=!0,a,d=e.tag,o,c=e.anchor,m,_,A,S,x,E={},v,M,F,I;if(I=e.input.charCodeAt(e.position),I===91)_=93,x=!1,o=[];else if(I===123)_=125,x=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),I=e.input.charCodeAt(++e.position);I!==0;){if($(e,!0,n),I=e.input.charCodeAt(e.position),I===_)return e.position++,e.tag=d,e.anchor=c,e.kind=x?"mapping":"sequence",e.result=o,!0;r||R(e,"missed comma between flow collection entries"),M=v=F=null,A=S=!1,I===63&&(m=e.input.charCodeAt(e.position+1),X(m)&&(A=S=!0,e.position++,$(e,!0,n))),a=e.line,xe(e,n,Je,!1,!0),M=e.tag,v=e.result,$(e,!0,n),I=e.input.charCodeAt(e.position),(S||e.line===a)&&I===58&&(A=!0,I=e.input.charCodeAt(++e.position),$(e,!0,n),xe(e,n,Je,!1,!0),F=e.result),x?Ae(e,o,E,M,v,F):A?o.push(Ae(e,null,E,M,v,F)):o.push(v),$(e,!0,n),I=e.input.charCodeAt(e.position),I===44?(r=!0,I=e.input.charCodeAt(++e.position)):r=!1}R(e,"unexpected end of the stream within a flow collection")}function Rt(e,n){var r,a,d=wr,o=!1,c=!1,m=n,_=0,A=!1,S,x;if(x=e.input.charCodeAt(e.position),x===124)a=!1;else if(x===62)a=!0;else return!1;for(e.kind="scalar",e.result="";x!==0;)if(x=e.input.charCodeAt(++e.position),x===43||x===45)wr===d?d=x===43?Jn:bt:R(e,"repeat of a chomping mode identifier");else if((S=xt(x))>=0)S===0?R(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?R(e,"repeat of an indentation width identifier"):(m=n+S-1,c=!0);else break;if(ge(x)){do x=e.input.charCodeAt(++e.position);while(ge(x));if(x===35)do x=e.input.charCodeAt(++e.position);while(!ae(x)&&x!==0)}for(;x!==0;){for(br(e),e.lineIndent=0,x=e.input.charCodeAt(e.position);(!c||e.lineIndentm&&(m=e.lineIndent),ae(x)){_++;continue}if(e.lineIndentn)&&_!==0)R(e,"bad indentation of a sequence entry");else if(e.lineIndentn)&&(xe(e,n,Ze,!0,d)&&(M?E=e.result:v=e.result),M||(Ae(e,A,S,x,E,v,o,c),x=E=v=null),$(e,!0,-1),I=e.input.charCodeAt(e.position)),e.lineIndent>n&&I!==0)R(e,"bad indentation of a mapping entry");else if(e.lineIndentn?_=1:e.lineIndent===n?_=0:e.lineIndentn?_=1:e.lineIndent===n?_=0:e.lineIndent tag; it should be "scalar", not "'+e.kind+'"'),x=0,E=e.implicitTypes.length;x tag; it should be "'+v.kind+'", not "'+e.kind+'"'),v.resolve(e.result)?(e.result=v.construct(e.result),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):R(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):R(e,"unknown tag !<"+e.tag+">");return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||S}function zt(e){var n=e.position,r,a,d,o=!1,c;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};(c=e.input.charCodeAt(e.position))!==0&&($(e,!0,-1),c=e.input.charCodeAt(e.position),!(e.lineIndent>0||c!==37));){for(o=!0,c=e.input.charCodeAt(++e.position),r=e.position;c!==0&&!X(c);)c=e.input.charCodeAt(++e.position);for(a=e.input.slice(r,e.position),d=[],a.length<1&&R(e,"directive name must not be less than one character in length");c!==0;){for(;ge(c);)c=e.input.charCodeAt(++e.position);if(c===35){do c=e.input.charCodeAt(++e.position);while(c!==0&&!ae(c));break}if(ae(c))break;for(r=e.position;c!==0&&!X(c);)c=e.input.charCodeAt(++e.position);d.push(e.input.slice(r,e.position))}c!==0&&br(e),ce.call(ui,a)?ui[a](e,a,d):Qe(e,'unknown document directive "'+a+'"')}if($(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,$(e,!0,-1)):o&&R(e,"directives end mark is expected"),xe(e,e.lineIndent-1,Ze,!1,!0),$(e,!0,-1),e.checkLineBreaks&&yt.test(e.input.slice(n,e.position))&&Qe(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Xe(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,$(e,!0,-1));return}if(e.position{"use strict";var Fe=pe(),je=ve(),Nt=Re(),Bt=ke(),li=Object.prototype.toString,fi=Object.prototype.hasOwnProperty,qt=9,He=10,$t=13,Ut=32,Vt=33,Wt=34,pi=35,Gt=37,Yt=38,Kt=39,Jt=42,mi=44,Zt=45,hi=58,Qt=61,Xt=62,ed=63,rd=64,gi=91,_i=93,nd=96,wi=123,id=124,bi=125,K={};K[0]="\\0";K[7]="\\a";K[8]="\\b";K[9]="\\t";K[10]="\\n";K[11]="\\v";K[12]="\\f";K[13]="\\r";K[27]="\\e";K[34]='\\"';K[92]="\\\\";K[133]="\\N";K[160]="\\_";K[8232]="\\L";K[8233]="\\P";var ud=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function ad(e,n){var r,a,d,o,c,m,_;if(n===null)return{};for(r={},a=Object.keys(n),d=0,o=a.length;d0?e.charCodeAt(o-1):null,E=E&&ki(c,m)}else{for(o=0;oa&&e[x+1]!==" ",x=o);else if(!Ee(c))return er;m=o>0?e.charCodeAt(o-1):null,E=E&&ki(c,m)}A=A||S&&o-x-1>a&&e[x+1]!==" "}return!_&&!A?E&&!d(e)?Ai:xi:r>9&&Ti(e)?er:A?Ci:Ei}function ld(e,n,r,a){e.dump=function(){if(n.length===0)return"''";if(!e.noCompatMode&&ud.indexOf(n)!==-1)return"'"+n+"'";var d=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-d),c=a||e.flowLevel>-1&&r>=e.flowLevel;function m(_){return dd(e,_)}switch(sd(n,c,e.indent,o,m)){case Ai:return n;case xi:return"'"+n.replace(/'/g,"''")+"'";case Ei:return"|"+Si(n,e.indent)+Li(yi(n,d));case Ci:return">"+Si(n,e.indent)+Li(yi(fd(n,o),d));case er:return'"'+pd(n,o)+'"';default:throw new je("impossible error: invalid scalar style")}}()}function Si(e,n){var r=Ti(e)?String(n):"",a=e[e.length-1]===`
`,d=a&&(e[e.length-2]===`
`||e===`
`),o=d?"+":a?"":"-";return r+o+`
`}function Li(e){return e[e.length-1]===`
`?e.slice(0,-1):e}function fd(e,n){for(var r=/(\n+)([^\n]*)/g,a=function(){var A=e.indexOf(`
`);return A=A!==-1?A:e.length,r.lastIndex=A,Pi(e.slice(0,A),n)}(),d=e[0]===`
`||e[0]===" ",o,c;c=r.exec(e);){var m=c[1],_=c[2];o=_[0]===" ",a+=m+(!d&&!o&&_!==""?`
`:"")+Pi(_,n),d=o}return a}function Pi(e,n){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,a,d=0,o,c=0,m=0,_="";a=r.exec(e);)m=a.index,m-d>n&&(o=c>d?c:m,_+=`
`+e.slice(d,o),d=o+1),c=m;return _+=`
`,e.length-d>n&&c>d?_+=e.slice(d,c)+`
`+e.slice(c+1):_+=e.slice(d),_.slice(1)}function pd(e){for(var n="",r,a,d,o=0;o=55296&&r<=56319&&(a=e.charCodeAt(o+1),a>=56320&&a<=57343)){n+=vi((r-55296)*1024+a-56320+65536),o++;continue}d=K[r],n+=!d&&Ee(r)?e[o]:d||vi(r)}return n}function md(e,n,r){var a="",d=e.tag,o,c;for(o=0,c=r.length;o1024&&(S+="? "),S+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),!!we(e,n,A,!1,!1)&&(S+=e.dump,a+=S));e.tag=d,e.dump="{"+a+"}"}function _d(e,n,r,a){var d="",o=e.tag,c=Object.keys(r),m,_,A,S,x,E;if(e.sortKeys===!0)c.sort();else if(typeof e.sortKeys=="function")c.sort(e.sortKeys);else if(e.sortKeys)throw new je("sortKeys must be a boolean or a function");for(m=0,_=c.length;m<_;m+=1)E="",(!a||m!==0)&&(E+=yr(e,n)),A=c[m],S=r[A],!!we(e,n+1,A,!0,!0,!0)&&(x=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,x&&(e.dump&&He===e.dump.charCodeAt(0)?E+="?":E+="? "),E+=e.dump,x&&(E+=yr(e,n)),!!we(e,n+1,S,!0,x)&&(e.dump&&He===e.dump.charCodeAt(0)?E+=":":E+=": ",E+=e.dump,d+=E));e.tag=o,e.dump=d||"{}"}function Mi(e,n,r){var a,d,o,c,m,_;for(d=r?e.explicitTypes:e.implicitTypes,o=0,c=d.length;o tag resolver accepts not "'+_+'" style');e.dump=a}return!0}return!1}function we(e,n,r,a,d,o){e.tag=null,e.dump=r,Mi(e,r,!1)||Mi(e,r,!0);var c=li.call(e.dump);a&&(a=e.flowLevel<0||e.flowLevel>n);var m=c==="[object Object]"||c==="[object Array]",_,A;if(m&&(_=e.duplicates.indexOf(r),A=_!==-1),(e.tag!==null&&e.tag!=="?"||A||e.indent!==2&&n>0)&&(d=!1),A&&e.usedDuplicates[_])e.dump="*ref_"+_;else{if(m&&A&&!e.usedDuplicates[_]&&(e.usedDuplicates[_]=!0),c==="[object Object]")a&&Object.keys(e.dump).length!==0?(_d(e,n,e.dump,d),A&&(e.dump="&ref_"+_+e.dump)):(gd(e,n,e.dump),A&&(e.dump="&ref_"+_+" "+e.dump));else if(c==="[object Array]"){var S=e.noArrayIndent&&n>0?n-1:n;a&&e.dump.length!==0?(hd(e,S,e.dump,d),A&&(e.dump="&ref_"+_+e.dump)):(md(e,S,e.dump),A&&(e.dump="&ref_"+_+" "+e.dump))}else if(c==="[object String]")e.tag!=="?"&&ld(e,e.dump,n,o);else{if(e.skipInvalid)return!1;throw new je("unacceptable kind of an object to dump "+c)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function wd(e,n){var r=[],a=[],d,o;for(Tr(e,r,a),d=0,o=a.length;d{"use strict";var rr=si(),Fi=Ii();function nr(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}B.exports.Type=V();B.exports.Schema=me();B.exports.FAILSAFE_SCHEMA=Ye();B.exports.JSON_SCHEMA=hr();B.exports.CORE_SCHEMA=gr();B.exports.DEFAULT_SAFE_SCHEMA=ke();B.exports.DEFAULT_FULL_SCHEMA=Re();B.exports.load=rr.load;B.exports.loadAll=rr.loadAll;B.exports.safeLoad=rr.safeLoad;B.exports.safeLoadAll=rr.safeLoadAll;B.exports.dump=Fi.dump;B.exports.safeDump=Fi.safeDump;B.exports.YAMLException=ve();B.exports.MINIMAL_SCHEMA=Ye();B.exports.SAFE_SCHEMA=ke();B.exports.DEFAULT_SCHEMA=Re();B.exports.scan=nr("scan");B.exports.parse=nr("parse");B.exports.compose=nr("compose");B.exports.addConstructor=nr("addConstructor")});var zi=H((Ul,Hi)=>{"use strict";var vd=ji();Hi.exports=vd});var Ni=H((Vl,xr)=>{var Oi=zi(),yd="\\ufeff?",kd=typeof process!="undefined"?process.platform:"",Td="^("+yd+"(= yaml =|---)$([\\s\\S]*?)^(?:\\2|\\.\\.\\.)\\s*$"+(kd==="win32"?"\\r?":"")+"(?:\\n)?)",Di=new RegExp(Td,"m");xr.exports=Ad;xr.exports.test=Cd;function Ad(e,n){e=e||"";var r={allowUnsafe:!1};n=n instanceof Object?cr(cr({},r),n):r,n.allowUnsafe=Boolean(n.allowUnsafe);var a=e.split(/(\r?\n)/);return a[0]&&/= yaml =|---/.test(a[0])?Ed(e,n.allowUnsafe):{attributes:{},body:e,bodyBegin:1}}function xd(e,n){for(var r=1,a=n.indexOf(`
`),d=e.index+e[0].length;a!==-1;){if(a>=d)return r;r++,a=n.indexOf(`
`,a+1)}return r}function Ed(e,n){var r=Di.exec(e);if(!r)return{attributes:{},body:e,bodyBegin:1};var a=n?Oi.load:Oi.safeLoad,d=r[r.length-1].replace(/^\s+|\s+$/g,""),o=a(d)||{},c=e.replace(r[0],""),m=xd(r,e);return{attributes:o,body:c,bodyBegin:m,frontmatter:d}}function Cd(e){return e=e||"",Di.test(e)}});mu(exports,{default:()=>Lr});var le=Z(require("obsidian"));var ie=Z(require("obsidian")),Hr={cm6RenderAll:!0,renderImages:!0,renderPDF:!0,renderIframe:!1,renderExcalidraw:!1,renderMsgFile:!1,renderRichLink:!1,renderTransclusion:!1,previewOnHoverInternalLink:!1,refreshImagesAfterChange:!1,WYSIWYG:!1},sr=class extends ie.PluginSettingTab{constructor(n,r){super(n,r);this.plugin=r}display(){let{containerEl:n}=this;n.empty(),n.createEl("h1",{text:"Image in Editor Settings"}).addClass("image-in-editor-settings-main-header");let a=n.createDiv("tip");a.addClass("oz-tip-div");let o=a.createEl("a",{href:"https://revolut.me/ozante"}).createEl("img",{attr:{src:"https://raw.githubusercontent.com/ozntel/file-tree-alternative/main/images/tip%20the%20artist_v2.png"}});o.height=55;let c=n.createDiv("coffee");c.addClass("oz-coffee-div");let _=c.createEl("a",{href:"https://ko-fi.com/L3L356V6Q"}).createEl("img",{attr:{src:"https://cdn.ko-fi.com/cdn/kofi2.png?v=3"}});_.height=45;let A=n.createEl("div");A.innerHTML=`
The plugin will add image preview within the "Source Mode" of New Editor.
In case you have Live Preview enabled, the plugin will automatically detect this and won't render additionally to avoid duplication.
`,new ie.Setting(n).setName("Render All").setDesc("Turn off this option if you want to stop rendering images in the editor source mode. Disabling requires vault reload.").addToggle(S=>{S.setValue(this.plugin.settings.cm6RenderAll).onChange(x=>{this.plugin.settings.cm6RenderAll=x,this.plugin.saveSettings()})}),new ie.Setting(n).setName("Render Images in Editor").setDesc("Turn on this option if you want Image files (jpeg, jpg, png, gif, svg, bmp) to be rendered in Editor").addToggle(S=>S.setValue(this.plugin.settings.renderImages).onChange(x=>{this.plugin.settings.renderImages=x,this.plugin.saveSettings()})),new ie.Setting(n).setName("Render Transclusion in Editor").setDesc("Turn on this option if you want transclusions to be rendered in Editor. Once this is enabled, you will have custom options for transclusions below.").addToggle(S=>S.setValue(this.plugin.settings.renderTransclusion).onChange(x=>{this.plugin.settings.renderTransclusion=x,this.plugin.saveSettings()})),new ie.Setting(n).setName("Render PDFs in Editor").setDesc("Turn on this option if you want also PDF files to be rendered in Editor").addToggle(S=>S.setValue(this.plugin.settings.renderPDF).onChange(x=>{this.plugin.settings.renderPDF=x,this.plugin.saveSettings()})),new ie.Setting(n).setName("Render Iframes in Editor").setDesc("Turn on this option if you want iframes to be rendered in Editor").addToggle(S=>S.setValue(this.plugin.settings.renderIframe).onChange(x=>{this.plugin.settings.renderIframe=x,this.plugin.saveSettings()})),new ie.Setting(n).setName("Render Excalidraw in Editor").setDesc(`
Turn on this option if you want drawings to be rendered in Editor.
You need to have "Excalidraw" plugin installed so that this
option works.
`).addToggle(S=>S.setValue(this.plugin.settings.renderExcalidraw).onChange(x=>{this.plugin.settings.renderExcalidraw=x,this.plugin.saveSettings()})),new ie.Setting(n).setName("Render Outlook MSG Files in Editor").setDesc(`
Turn on this option if you want outlook MSG Files to be rendered in Editor.
You need to have "MSG Handler" plugin installed so that
this option works
`).addToggle(S=>S.setValue(this.plugin.settings.renderMsgFile).onChange(x=>{this.plugin.settings.renderMsgFile=x,this.plugin.saveSettings()})),new ie.Setting(n).setName("Preview on Hover for File Links").setDesc("Turn on if you want to trigger preview when you hover on internal links within the rendered transclusion").addToggle(S=>S.setValue(this.plugin.settings.previewOnHoverInternalLink).onChange(x=>{this.plugin.settings.previewOnHoverInternalLink=x,this.plugin.saveSettings(),x?document.on("mouseover",".oz-obsidian-inner-link",this.plugin.filePreviewOnHover):document.off("mouseover",".oz-obsidian-inner-link",this.plugin.filePreviewOnHover)}))}};var Oe=Z(require("obsidian"));var De=(e,n)=>e.getResourcePath(n)+"?"+n.stat.mtime,zr=(e,n,r)=>{r.workspace.openLinkText(n,"/",Oe.Keymap.isModifier(e,"Mod")||e.button===1)},lr=e=>e.replace(/\s|\W|[#$%^&*()]/g,""),Ne=(e,n)=>e.plugins.getPlugin(n),fr=e=>{var n;return(n=e.vault.config)==null?void 0:n.livePreview},Or=()=>{var e;return((e=Oe.Platform)==null?void 0:e.resourcePathPrefix)||"app://local/"};var Dr=Z(require("obsidian"));var Be=e=>{let n=/[^(x|0-9)]/;if(e.match(n))return!1;let r=/[0-9]+x[0-9]+/,a=/[0-9]+/;var d=e.match(r);if(d){var o=d[0].indexOf("x");return{width:parseInt(d[0].substr(0,o)),height:parseInt(d[0].substr(o+1))}}else{var c=e.match(a);if(c)return{width:parseInt(c[0])}}return!1};var Nr=(e,n,r)=>{let a=new Dr.Menu(n.app);return a.addItem(d=>{d.setTitle("Copy Image to Clipboard"),d.setIcon("image-file"),d.onClick(o=>ne(void 0,null,function*(){var c=yield n.app.vault.adapter.readBinary(r.path),m=new Uint8Array(c),_=new Blob([m],{type:"image/png"});let A=new ClipboardItem({"image/png":_});window.navigator.clipboard.write([A])}))}),n.app.workspace.trigger("file-menu",a,r,"file-explorer"),a.showAtPosition({x:e.pageX,y:e.pageY}),!1};var qe=Z(require("@codemirror/state")),$e=Z(require("@codemirror/view"));function gu(){let e=qe.StateEffect.define(),n=qe.StateField.define({create(){return $e.Decoration.none},update(r,a){return a.effects.reduce((d,o)=>o.is(e)?o.value:d,r)},provide:r=>$e.EditorView.decorations.from(r)});return{update:e,field:n}}var Le=gu();var tu=Z(require("@codemirror/view"));var Ce=Z(require("obsidian")),uu=Z(require("@codemirror/state")),au=Z(require("@codemirror/view"));var Br=e=>Ne(e,"obsidian-excalidraw-plugin"),qr=e=>e.extension==="excalidraw"||ExcalidrawAutomate.isExcalidrawFile&&ExcalidrawAutomate.isExcalidrawFile(e),$r=e=>ne(void 0,null,function*(){ExcalidrawAutomate.reset();var n=yield ExcalidrawAutomate.createPNG(e.path);return n});var Bi=Z(Vr());var _u=function(){function e(n,r){for(var a=0;a1?c-1:0),_=1;_0&&Array.isArray(a[0])&&(a=a[0]),this.transformers=a.map(function(o){return typeof o=="function"?o():o}),this.tag}return _u(e,[{key:"interimTag",value:function(r,a){for(var d=arguments.length,o=Array(d>2?d-2:0),c=2;c0&&arguments[0]!==void 0?arguments[0]:"";return{onEndResult:function(a){if(n==="")return a.trim();if(n=n.toLowerCase(),n==="start"||n==="left")return a.replace(/^\s*/,"");if(n==="end"||n==="right")return a.replace(/\s*$/,"");throw new Error("Side not supported: "+n)}}},O=ku;function Tu(e){if(Array.isArray(e)){for(var n=0,r=Array(e.length);n0&&arguments[0]!==void 0?arguments[0]:"initial";return{onEndResult:function(a){if(n==="initial"){var d=a.match(/^[^\S\n]*(?=\S)/gm),o=d&&Math.min.apply(Math,Tu(d.map(function(m){return m.length})));if(o){var c=new RegExp("^.{"+o+"}","gm");return a.replace(c,"")}return a}if(n==="all")return a.replace(/^[^\S\n]+/gm,"");throw new Error("Unknown type: "+n)}}},G=Au;var xu=function(n,r){return{onEndResult:function(d){if(n==null||r==null)throw new Error("replaceResultTransformer requires at least 2 arguments.");return d.replace(n,r)}}},Q=xu;var Eu=function(n,r){return{onSubstitution:function(d,o){if(n==null||r==null)throw new Error("replaceSubstitutionTransformer requires at least 2 arguments.");return d==null?d:d.toString().replace(n,r)}}},de=Eu;var Su={separator:"",conjunction:"",serial:!1},Lu=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Su;return{onSubstitution:function(a,d){if(Array.isArray(a)){var o=a.length,c=n.separator,m=n.conjunction,_=n.serial,A=d.match(/(\n?[^\S\n]+)$/);if(A?a=a.join(c+A[1]):a=a.join(c+" "),m&&o>1){var S=a.lastIndexOf(c);a=a.slice(0,S)+(_?c:"")+" "+m+a.slice(S+1)}}return a}}},N=Lu;var Pu=function(n){return{onSubstitution:function(a,d){if(n!=null&&typeof n=="string")typeof a=="string"&&a.includes(n)&&(a=a.split(n));else throw new Error("You need to specify a string character to split by.");return a}}},be=Pu;var Wr=function(n){return n!=null&&!Number.isNaN(n)&&typeof n!="boolean"},Mu=function(){return{onSubstitution:function(r){return Array.isArray(r)?r.filter(Wr):Wr(r)?r:""}}},Ve=Mu;var No=new z(N({separator:","}),G,O);var Yo=new z(N({separator:",",conjunction:"and"}),G,O);var nc=new z(N({separator:",",conjunction:"or"}),G,O);var fc=new z(be(`
`),Ve,N,G,O);var Ec=new z(be(`
`),N,G,O,de(/&/g,"&"),de(//g,">"),de(/"/g,"""),de(/'/g,"'"),de(/`/g,"`"));var Ic=new z(Q(/(?:\n(?:\s*))+/g," "),O);var Nc=new z(Q(/(?:\n\s*)/g,""),O);var Yc=new z(N({separator:","}),Q(/(?:\s+)/g," "),O);var ns=new z(N({separator:",",conjunction:"or"}),Q(/(?:\s+)/g," "),O);var ss=new z(N({separator:",",conjunction:"and"}),Q(/(?:\s+)/g," "),O);var ws=new z(N,G,O);var Es=new z(N,Q(/(?:\s+)/g," "),O);var Is=new z(G,O);var Uu=new z(G("all"),O),We=Uu;var qi=Z(Ni()),Sd=e=>{let n=e,r=/\[\[.*?\]\]/g,a=n.match(r);if(a){let d=/\[\[.*?(?=(\]|\|))/,o=/\|.*(?=]])/;for(let c of a){let m=c.match(d);if(m){let _=c.match(o),A=Ld(m[0].replace("[[",""),_?_[0].replace("|",""):"");n=n.replace(c,A)}}}return n},Ld=(e,n)=>`[${n}](${encodeURI(e)})`,Pd=/!\[\[(.*)#\^(.*)\]\]/,Md=/!\[\[(.*)#((?!\^).*)\]\]/;var Rd=e=>{let n=e,r=e.match(new RegExp(`(${Pd.source})|(${Md.source})`,"g"));return r==null||r.forEach(a=>n=n.replace(a,a.substring(1))),n},Id=e=>{let n=/( +)#[^\s#]+|^#[^\s#]+/gm,r=e.match(n);if(!r)return e;let a=e;for(let d of r)a=a.replace(d,`${d}`);return a};var Fd=e=>{let n=Id(e);return n=Rd(n),n=Sd(n),n=Od(n),Ki()&&(n=Ud(n)),n},ze=e=>{let n=Fd(e);return new Bi.default.Converter({tables:!0,simpleLineBreaks:!0,strikethrough:!0,tasklists:!0,smartIndentationFix:!0}).makeHtml(n)},$i=(e,n,r)=>{let a=document.createElement("div"),d=r.substr(e,n-e);return a.innerHTML=ze(d),a},Ui=(e,n)=>{let r=document.createElement("div"),a=e.position.start.offset,d=e.position.end.offset,o=n.substr(a,d-a),c=o.indexOf(`^${e.id}`);return c!==-1&&(o=o.slice(0,c)+o.slice(c+e.id.length+1)),r.innerHTML=ze(o),r},ir=(e,n)=>{jd(e),Hd(e,n.app),zd(e,n.app),Dd(e),qd()&&Bd(e),Ki()&&Vd(e)},jd=e=>{e.querySelectorAll("pre > code").forEach(r=>{r.addClass("line-numbers")})},Hd=(e,n)=>{e.querySelectorAll("img").forEach(a=>{if(a.getAttr("src")){let o=n.metadataCache.getFirstLinkpathDest(decodeURI(a.getAttr("src")),"");if(o){let c=De(n.vault,o);a.setAttr("src",c);let m=a.getAttr("alt");if(m){let _=Be(m);_&&(a.width=_.width,_.height&&(a.height=_.height))}}}})},zd=(e,n)=>{e.querySelectorAll("a").forEach(a=>{let d=a.getAttr("href");a.innerText===""&&(a.innerText=decodeURI(d)),d.match(new RegExp(".*#.*"))&&(d=d.match(new RegExp(".*(?=#)"))[0]),n.metadataCache.getFirstLinkpathDest(decodeURI(d),"")&&(a.setAttr("href",decodeURI(d)),a.addClass("oz-obsidian-inner-link")),a.innerText.startsWith("#")&&a.addClass("tag")})},Od=e=>{try{return(0,qi.default)(e).body}catch(n){return e}},Dd=e=>{let n=e.querySelectorAll('code[class*="language-ad-"]');n==null||n.forEach(r=>{let a=r.className,d=/language-ad-.*?(?=\s)/,o=a.match(d),c=o?o[0].replace("language-ad-",""):"Note",m=Nd(c,r.innerHTML);r.parentElement.replaceWith(m)})},Nd=(e,n)=>{let r=Vi[e]?Vi[e]:"68, 138, 255",a=document.createElement("div");a.addClass("oz-admonition"),a.style.cssText=`--oz-admonition-color: ${r};`;let d=a.createEl("div");d.addClass("oz-admonition-title");let o=d.createEl("div");o.addClass("oz-admonition-title-content");let c=o.createEl("div");c.addClass("oz-admonition-title-markdown"),c.innerText=e;let m=a.createEl("div");m.addClass("oz-admonition-content-holder");let _=m.createEl("div");return _.addClass("oz-admonition-content"),_.innerHTML=ze(n),a},Vi={abstract:"0, 176, 255",attention:"255, 145, 0",bug:"245, 0, 87",caution:"255, 145, 0",check:"0, 200, 83",cite:"158, 158, 158",danger:"255, 23, 68",done:"0, 200, 83",error:"255, 23, 68",example:"124, 77, 255",fail:"255, 82, 82",failure:"255, 82, 82",faq:"100, 221, 23",help:"100, 221, 23",hint:"0, 191, 165",important:"0, 191, 165",info:"0, 184, 212",missing:"255, 82, 82",note:"68, 138, 255",question:"100, 221, 23",quote:"158, 158, 158",seealso:"68, 138, 255",success:"0, 200, 83",summary:"0, 176, 255",tip:"0, 191, 165",todo:"0, 184, 212"},Bd=e=>{let n=e.querySelectorAll('code[class*="language-mermaid"]');n.length!==0&&(window.mermaid.initialize($d),n==null||n.forEach(r=>{let a=document.createElement("div"),d=Math.floor(Math.random()*999999);a.id=`mermaid-${d}`,a.innerHTML=r.innerHTML;try{window.mermaid.mermaidAPI.render(`mermaid-${d}`,Gi(r.innerHTML),o=>{a.innerHTML=o}),r.parentElement.replaceWith(a)}catch(o){let c=document.createElement("p");c.addClass("mermaid-error-information"),c.innerText="Syntax Error in Mermaid graph",r.parentElement.prepend(c)}}))},Wi={nbsp:" ",cent:"\xA2",pound:"\xA3",yen:"\xA5",euro:"\u20AC",copy:"\xA9",reg:"\xAE",lt:"<",gt:">",quot:'"',amp:"&",apos:"'"},Gi=e=>e.replace(/\&([^;]+);/g,function(n,r){var a;return r in Wi?Wi[r]:(a=r.match(/^#x([\da-fA-F]+)$/))?String.fromCharCode(parseInt(a[1],16)):(a=r.match(/^#(\d+)$/))?String.fromCharCode(~~a[1]):n}),qd=()=>window.mermaid,$d={startOnLoad:!0,flowchart:{useMaxWidth:!1,htmlLabels:!0,curve:"cardinal"},securityLevel:"loose",theme:"forest",logLevel:5},Ud=e=>{let n=e,r=/\$\$.*?\$\$/gs,a=/\$\$.*?(?=\$\$)/s,d=e.match(r);if(d&&d.length>0)for(let _ of d){let A=_.match(a);!A||(n=n.replace(_,Yi(A[0].replace("$$",""),"newline")))}let o=/\$[^\s].*[^\s]\$/g,c=/\$.*?(?=\$)/,m=e.match(o);if(m&&m.length>0)for(let _ of m){let A=_.match(c);A&&(n=n.replace(_,Yi(A[0].replace("$",""),"inline")))}return n},Yi=(e,n)=>We`
${e}
`,Vd=e=>{let n=e.querySelectorAll("code.language-mathjax");for(let r=0;r{a.parentElement.replaceWith(o)})}},Wd=(e,n)=>ne(void 0,null,function*(){let r;n==="inline"?(r=document.createElement("span"),r.classList.add("inline-mathjax-block")):n==="newline"&&(r=document.createElement("div"),r.classList.add("newline-mathjax-block"));let a=Gi(e),d=yield window.MathJax.tex2chtmlPromise(a,{display:n!=="inline"}),o=window.MathJax.startup.adaptor;r.innerHTML=o.outerHTML(d);let c=document.createElement("style");return c.innerHTML=o.textContent(window.MathJax.chtmlStylesheet()),r.appendChild(c),r}),Ki=()=>{var e;return(e=window.MathJax)==null?void 0:e.version};var te=Z(require("@codemirror/view"));var ur=e=>te.Decoration.replace({widget:new Ji(e),inclusive:!1}),Er=e=>te.Decoration.replace({widget:new Zi(e),inclusive:!1}),Cr=e=>te.Decoration.replace({widget:new Qi(e),inclusive:!1}),ar=e=>te.Decoration.replace({widget:new Xi(e),inclusive:!1}),Ji=class extends te.WidgetType{constructor({url:n,altText:r,filePath:a}){super();this.url=n,this.altText=r,this.filePath=a}eq(n){return n.altText===this.altText&&n.filePath===this.filePath}toDOM(){let n=document.createElement("div");n.addClass("oz-image-widget-cm6");let r=n.createEl("img");r.src=this.url,r.setAttr("data-path",this.filePath);let a=Be(this.altText);return a&&(r.width=a.width,a.height&&(r.height=a.height)),r.alt=this.altText,n}ignoreEvent(){return!0}},Zi=class extends te.WidgetType{constructor({url:n,filePath:r}){super();this.url=n,this.filePath=r}toDOM(){let n=document.createElement("div");n.addClass("oz-pdf-widget-cm6");let r=n.createEl("embed");return r.src=this.url,r.type="application/pdf",r.width="100%",r.height="800px",n}eq(n){return n.filePath===this.filePath||n.url===this.url}ignoreEvent(){return!0}},Qi=class extends te.WidgetType{constructor({htmlText:n,htmlEl:r}){super();this.htmlText=n,this.htmlEl=r}toDOM(){let n=document.createElement("div");return n.addClass("oz-custom-html-widget-cm6"),this.htmlText?n.innerHTML=this.htmlText.trim():n.appendChild(this.htmlEl),n}eq(n){return n.htmlText===this.htmlText}ignoreEvent(){return!0}},Xi=class extends te.WidgetType{constructor({type:n,htmlDivElement:r,filePath:a,blockRef:d}){super();this.type=n,this.htmlDivElement=r,this.filePath=a,this.blockRef=d}toDOM(){let n=document.createElement("div");return n.addClasses(["oz-transclusion-widget-cm6",this.type]),n.appendChild(this.htmlDivElement),n}eq(n){return n.filePath+n.blockRef===this.filePath+this.blockRef}ignoreEvent(){return!0}};var eu=["file-transclusion","header-transclusion","blockid-transclusion"],ru=e=>{let{lineText:n,plugin:r,sourceFile:a}=e,d=/!\[\[.*?(jpe?g|png|gif|svg|bmp|webp).*?\]\]/,o=n.match(d);if(o){let g=/\[\[.*(jpe?g|png|gif|svg|bmp|webp)/,T=o[0].match(g);if(T){let b=T[0].replace("[[",""),w=r.app.metadataCache.getFirstLinkpathDest(decodeURIComponent(b),a.path);if(w){let y=/\|.*(?=]])/,l=o[0].match(y);return{type:"vault-image",match:o[0],linkText:b,altText:l?l[0].replace("|",""):"",blockRef:"",file:w}}}}let c=/!\[\[.*(pdf)(.*)?\]\]/,m=n.match(c);if(m){let g=/\[\[.*.pdf/,T=m[0].match(g);if(T){let b=T[0].replace("[[",""),w=r.app.metadataCache.getFirstLinkpathDest(decodeURIComponent(b),a.path);if(w){let y=new RegExp("#page=[0-9]+"),l=m[0].match(y);return{type:"pdf-file",match:m[0],linkText:"",altText:"",blockRef:l?l[0]:"",file:w}}}}let _=/!\[(^$|.*)\]\(.*(pdf)(.*)?\)/,A=n.match(_);if(A){let g=/\(.*.pdf/,T=A[0].match(g);if(T){let b=T[0].replace("(",""),w=/(http[s]?:\/\/)([^\/\s]+\/)(.*)/,y=new RegExp("#page=[0-9]+"),l=A[0].match(y);if(w.test(b))return{type:"pdf-link",match:A[0],linkText:b,altText:"",blockRef:l?l[0]:""};{let k=r.app.metadataCache.getFirstLinkpathDest(decodeURIComponent(b),a.path);if(k)return{type:"pdf-file",match:A[0],linkText:k.path,altText:"",blockRef:l?l[0]:"",file:k}}}}let S=/(http[s]?:\/\/)([^\/\s]+\/)(.*)/,x=/!\[[^)]*\]\([a-z][a-z0-9+\-.]+:\/[^)]*\)/,E=n.match(x);if(E){let g=/\(.*(?=\))/,T=E[0].match(g);if(T&&T[0].replace("(","").match(S)){let b=/\[(^$|.*)(?=\])/,w=E[0].match(b);return{type:"external-image",match:E[0],linkText:T[0].replace("(",""),altText:w?w[0].replace("[",""):"",blockRef:""}}}let v=/!\[(^$|.*?)\]\(.*?(jpe?g|png|gif|svg|bmp|webp)\)/,M=n.match(v);if(M){let g=/\(.*(jpe?g|png|gif|svg|bmp|webp)/,T=M[0].match(g);if(T){let b=T[0].replace("(",""),w=r.app.metadataCache.getFirstLinkpathDest(decodeURIComponent(b),a.path);if(w){let y=/\[(^$|.*)(?=\])/,l=M[0].match(y);return{type:"vault-image",match:M[0],linkText:b,altText:l?l[0].replace("[",""):"",blockRef:"",file:w}}}}let F=/!\[\[.*(msg|eml)(.*)?\]\]/,I=n.match(F);if(I){let g=/\[\[.*.(msg|eml)/,T=I[0].match(g);if(T){let b=T[0].replace("[[",""),w=r.app.metadataCache.getFirstLinkpathDest(decodeURIComponent(b),a.path);if(w)return{type:"msg-file",match:I[0],linkText:"",altText:"",blockRef:"",file:w}}}let W=/!\[(^$|.*?)\]\(.*?\)/,ue=/!\[\[.*?\]\]/,i=n.match(W),t=n.match(ue);if(i||t){let g=/\]\(.*?(?=\))/,T=/\[\[.*?((?=\|))|\[\[.*?(?=\]\])/,b=n.match(i?g:T);if(b){let w=b[0].replace("](","").replace("[[",""),y=r.app.metadataCache.getFirstLinkpathDest(decodeURIComponent(w),a.path);if(y&&Br(r.app)&&qr(y)){let C=i?/\[(^$|.*)(?=\])/:/\|.*(?=]])/,L=n.match(C);return{type:"excalidraw",match:i?i[0]:t[0],linkText:y.path,altText:L?L[0].replace("[","").replace("|",""):"",blockRef:"",file:y}}}if(t){let w=/!\[\[(.*)(?=#)/,y=/!\[\[(.*)#\^(.*)\]\]/,l=n.match(y);if(l){let J=l[0].match(w)[0].replace("![[",""),D=r.app.metadataCache.getFirstLinkpathDest(decodeURIComponent(J),a.path);if(D&&D.extension==="md"){let U=/#\^.*(?=]])/;return{type:"blockid-transclusion",match:t[0],linkText:D.path,altText:"",blockRef:n.match(U)[0].replace("#^",""),file:D}}}let k=/!\[\[(.*)#((?!\^).*)\]\]/,C=n.match(k);if(C){let J=C[0].match(w)[0].replace("![[",""),D=r.app.metadataCache.getFirstLinkpathDest(decodeURIComponent(J),a.path);if(D&&D.extension==="md"){let U=/#.*(?=]])/;return{type:"header-transclusion",match:t[0],linkText:D.path,altText:"",blockRef:n.match(U)[0].replace("#",""),file:D}}}let L=/\[\[.*?(?=\]\])/,P=n.match(L)[0].replace("[[",""),q=r.app.metadataCache.getFirstLinkpathDest(decodeURIComponent(P),a.path);if(q&&P!==""&&q.extension==="md")return{type:"file-transclusion",match:t[0],linkText:q.path,altText:"",blockRef:"",file:q}}}let u=/(?: