mutual-exclusion/editor/assets/index-930021cc.js

142 lines
162 KiB
JavaScript
Raw Normal View History

2023-02-12 07:18:43 +00:00
var ts=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Lc=ts((_n,es)=>{(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))r(d);new MutationObserver(d=>{for(const s of d)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(d){const s={};return d.integrity&&(s.integrity=d.integrity),d.referrerpolicy&&(s.referrerPolicy=d.referrerpolicy),d.crossorigin==="use-credentials"?s.credentials="include":d.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(d){if(d.ep)return;d.ep=!0;const s=n(d);fetch(d.href,s)}})();function gn(e,t){const n=Object.create(null),r=e.split(",");for(let d=0;d<r.length;d++)n[r[d]]=!0;return t?d=>!!n[d.toLowerCase()]:d=>!!n[d]}function bn(e){if(J(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],d=_e(r)?ds(r):bn(r);if(d)for(const s in d)t[s]=d[s]}return t}else{if(_e(e))return e;if(oe(e))return e}}const rs=/;(?![^(]*\))/g,ns=/:([^]+)/,us=/\/\*.*?\*\//gs;function ds(e){const t={};return e.replace(us,"").split(rs).forEach(n=>{if(n){const r=n.split(ns);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function wn(e){let t="";if(_e(e))t=e;else if(J(e))for(let n=0;n<e.length;n++){const r=wn(e[n]);r&&(t+=r+" ")}else if(oe(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const ss="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",is=gn(ss);function Nu(e){return!!e||e===""}function os(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=Cr(e[r],t[r]);return n}function Cr(e,t){if(e===t)return!0;let n=Jn(e),r=Jn(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=Dt(e),r=Dt(t),n||r)return e===t;if(n=J(e),r=J(t),n||r)return n&&r?os(e,t):!1;if(n=oe(e),r=oe(t),n||r){if(!n||!r)return!1;const d=Object.keys(e).length,s=Object.keys(t).length;if(d!==s)return!1;for(const a in e){const c=e.hasOwnProperty(a),h=t.hasOwnProperty(a);if(c&&!h||!c&&h||!Cr(e[a],t[a]))return!1}}return String(e)===String(t)}function Iu(e,t){return e.findIndex(n=>Cr(n,t))}const Lt=e=>_e(e)?e:e==null?"":J(e)||oe(e)&&(e.toString===Hu||!Y(e.toString))?JSON.stringify(e,Bu,2):String(e),Bu=(e,t)=>t&&t.__v_isRef?Bu(e,t.value):yt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,d])=>(n[`${r} =>`]=d,n),{})}:Ar(t)?{[`Set(${t.size})`]:[...t.values()]}:oe(t)&&!J(t)&&!$u(t)?String(t):t,ce={},wt=[],Ie=()=>{},as=()=>!1,cs=/^on[^a-z]/,Sr=e=>cs.test(e),yn=e=>e.startsWith("onUpdate:"),Ee=Object.assign,vn=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},ls=Object.prototype.hasOwnProperty,te=(e,t)=>ls.call(e,t),J=Array.isArray,yt=e=>Xt(e)==="[object Map]",Ar=e=>Xt(e)==="[object Set]",Jn=e=>Xt(e)==="[object Date]",Y=e=>typeof e=="function",_e=e=>typeof e=="string",Dt=e=>typeof e=="symbol",oe=e=>e!==null&&typeof e=="object",Fu=e=>oe(e)&&Y(e.then)&&Y(e.catch),Hu=Object.prototype.toString,Xt=e=>Hu.call(e),fs=e=>Xt(e).slice(8,-1),$u=e=>Xt(e)==="[object Object]",kn=e=>_e(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,or=gn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Tr=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},hs=/-(\w)/g,Et=Tr(e=>e.replace(hs,(t,n)=>n?n.toUpperCase():"")),ps=/\B([A-Z])/g,Tt=Tr(e=>e.replace(ps,"-$1").toLowerCase()),Du=Tr(e=>e.charAt(0).toUpperCase()+e.slice(1)),Hr=Tr(e=>e?`on${Du(e)}`:""),Ut=(e,t)=>!Object.is(e,t),ar=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},br=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Yr=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Gn;const ms=()=>Gn||(Gn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let Me;class _s{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Me,!t&&Me&&(this.index=(Me.scopes||(Me.scopes=[])).push(this)-1)}get active(
2023-02-12 07:12:32 +00:00
`),f=f.replace(/\r/g,`
`),f=f.replace(/\u00A0/g,"&nbsp;"),o.smartIndentationFix&&(f=M(f)),f=`
`+f+`
`,f=r.subParser("detab")(f,o,E),f=f.replace(/^[ \t]+$/mg,""),r.helper.forEach(i,function(R){f=r.subParser("runExtension")(R,f,o,E)}),f=r.subParser("metadata")(f,o,E),f=r.subParser("hashPreCodeTags")(f,o,E),f=r.subParser("githubCodeBlocks")(f,o,E),f=r.subParser("hashHTMLBlocks")(f,o,E),f=r.subParser("hashCodeTags")(f,o,E),f=r.subParser("stripLinkDefinitions")(f,o,E),f=r.subParser("blockGamut")(f,o,E),f=r.subParser("unhashHTMLSpans")(f,o,E),f=r.subParser("unescapeSpecialChars")(f,o,E),f=f.replace(/¨D/g,"$$"),f=f.replace(/¨T/g,"¨"),f=r.subParser("completeHTMLDocument")(f,o,E),r.helper.forEach(l,function(R){f=r.subParser("runExtension")(R,f,o,E)}),p=E.metadata,f},this.makeMarkdown=this.makeMd=function(f,E){if(f=f.replace(/\r\n/g,`
`),f=f.replace(/\r/g,`
`),f=f.replace(/>[ \t]+</,">¨NBSP;<"),!E)if(window&&window.document)E=window.document;else throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");var R=E.createElement("div");R.innerHTML=f;var U={preList:Ae(R)};be(R);for(var Q=R.childNodes,q="",se=0;se<Q.length;se++)q+=r.subParser("makeMarkdown.node")(Q[se],U);function be(he){for(var ae=0;ae<he.childNodes.length;++ae){var pe=he.childNodes[ae];pe.nodeType===3?!/\S/.test(pe.nodeValue)&&!/^[ ]+$/.test(pe.nodeValue)?(he.removeChild(pe),--ae):(pe.nodeValue=pe.nodeValue.split(`
`).join(" "),pe.nodeValue=pe.nodeValue.replace(/(\s)+/g,"$1")):pe.nodeType===1&&be(pe)}}function Ae(he){for(var ae=he.querySelectorAll("pre"),pe=[],we=0;we<ae.length;++we)if(ae[we].childElementCount===1&&ae[we].firstChild.tagName.toLowerCase()==="code"){var Fe=ae[we].firstChild.innerHTML.trim(),dt=ae[we].firstChild.getAttribute("data-language")||"";if(dt==="")for(var gt=ae[we].firstChild.className.split(" "),m=0;m<gt.length;++m){var b=gt[m].match(/^language-(.+)$/);if(b!==null){dt=b[1];break}}Fe=r.helper.unescapeHTMLEntities(Fe),pe.push(Fe),ae[we].outerHTML='<precode language="'+dt+'" precodenum="'+we.toString()+'"></precode>'}else pe.push(ae[we].innerHTML),ae[we].innerHTML="",ae[we].setAttribute("prenum",we.toString());return pe}return q},this.setOption=function(f,E){o[f]=E},this.getOption=function(f){return o[f]},this.getOptions=function(){return o},this.addExtension=function(f,E){E=E||null,z(f,E)},this.useExtension=function(f){z(f)},this.setFlavor=function(f){if(!h.hasOwnProperty(f))throw Error(f+" flavor was not found");var E=h[f];w=f;for(var R in E)E.hasOwnProperty(R)&&(o[R]=E[R])},this.getFlavor=function(){return w},this.removeExtension=function(f){r.helper.isArray(f)||(f=[f]);for(var E=0;E<f.length;++E){for(var R=f[E],U=0;U<i.length;++U)i[U]===R&&i.splice(U,1);for(var Q=0;Q<l.length;++Q)l[Q]===R&&l.splice(Q,1)}},this.getAllExtensions=function(){return{language:i,output:l}},this.getMetadata=function(f){return f?p.raw:p.parsed},this.getMetadataFormat=function(){return p.format},this._setMetadataPair=function(f,E){p.parsed[f]=E},this._setMetadataFormat=function(f){p.format=f},this._setMetadataRaw=function(f){p.raw=f}},r.subParser("anchors",function(u,o,i){u=i.converter._dispatch("anchors.before",u,o,i);var l=function(_,w,p,y,z,j,T){if(r.helper.isUndefined(T)&&(T=""),p=p.toLowerCase(),_.search(/\(<?\s*>? ?(['"].*['"])?\)$/m)>-1)y="";else if(!y)if(p||(p=w.toLowerCase().replace(/ ?\n/g," ")),y="#"+p,!r.helper.isUndefined(i.gUrls[p]))y=i.gUrls[p],r.helper.isUndefined(i.gTitles[p])||(T=i.gTitles[p]);else return _;y=y.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var M='<a href="'+y+'"';return T!==""&&T!==null&&(T=T.replace(/"/g,"&quot;"),T=T.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback),M+=' title="'+T+'"'),o.openLinksInNewWindow&&!/^#/.test(y)&&(M+=' rel="noopener noreferrer" target="¨E95Eblank"'),M+=">"+w+"</a>",M};return u=u.replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,l),u=u.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,l),u=u.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,l),u=u.replace(/\[([^\[\]]+)]()()()()()/g,l),o.ghMentions&&(u=u.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gmi,function(_,w,p,y,z){if(p==="\\")return w+y;if(!r.helper.isString(o.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var j=o.ghMentionsLink.replace(/\{u}/g,z),T="";return o.openLinksInNewWindow&&(T=' rel="noopener noreferrer" target="¨E95Eblank"'),w+'<a href="'+j+'"'+T+">"+y+"</a>"})),u=i.converter._dispatch("anchors.after",u,o,i),u});var I=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,D=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,B=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,H=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gmi,ue=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,X=function(u){return function(o,i,l,_,w,p,y){l=l.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var z=l,j="",T="",M=i||"",f=y||"";return/^www\./i.test(l)&&(l=l.replace(/^www\./i,"http://www.")),u.excludeTrailingPunctuationFromURLs&&p&&(j=p),u.openLinksInNewWindow&&(T=' rel="noopener noreferrer" target="¨E95Eblank"'),M+'<a href="'+l+'"'+T+">"+z+"</a>"+j+f}},le=function(u,o){return function(i
`;var l=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return o.splitAdjacentBlockquotes&&(l=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),u=u.replace(l,function(_){return _=_.replace(/^[ \t]*>[ \t]?/gm,""),_=_.replace(/¨0/g,""),_=_.replace(/^[ \t]+$/gm,""),_=r.subParser("githubCodeBlocks")(_,o,i),_=r.subParser("blockGamut")(_,o,i),_=_.replace(/(^|\n)/g,"$1 "),_=_.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,function(w,p){var y=p;return y=y.replace(/^ /mg,"¨0"),y=y.replace(/¨0/g,""),y}),r.subParser("hashBlock")(`<blockquote>
`+_+`
</blockquote>`,o,i)}),u=i.converter._dispatch("blockQuotes.after",u,o,i),u}),r.subParser("codeBlocks",function(u,o,i){u=i.converter._dispatch("codeBlocks.before",u,o,i),u+="¨0";var l=/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g;return u=u.replace(l,function(_,w,p){var y=w,z=p,j=`
`;return y=r.subParser("outdent")(y,o,i),y=r.subParser("encodeCode")(y,o,i),y=r.subParser("detab")(y,o,i),y=y.replace(/^\n+/g,""),y=y.replace(/\n+$/g,""),o.omitExtraWLInCodeBlocks&&(j=""),y="<pre><code>"+y+j+"</code></pre>",r.subParser("hashBlock")(y,o,i)+z}),u=u.replace(/¨0/,""),u=i.converter._dispatch("codeBlocks.after",u,o,i),u}),r.subParser("codeSpans",function(u,o,i){return u=i.converter._dispatch("codeSpans.before",u,o,i),typeof u>"u"&&(u=""),u=u.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(l,_,w,p){var y=p;return y=y.replace(/^([ \t]*)/g,""),y=y.replace(/[ \t]*$/g,""),y=r.subParser("encodeCode")(y,o,i),y=_+"<code>"+y+"</code>",y=r.subParser("hashHTMLSpans")(y,o,i),y}),u=i.converter._dispatch("codeSpans.after",u,o,i),u}),r.subParser("completeHTMLDocument",function(u,o,i){if(!o.completeHTMLDocument)return u;u=i.converter._dispatch("completeHTMLDocument.before",u,o,i);var l="html",_=`<!DOCTYPE HTML>
`,w="",p=`<meta charset="utf-8">
`,y="",z="";typeof i.metadata.parsed.doctype<"u"&&(_="<!DOCTYPE "+i.metadata.parsed.doctype+`>
`,l=i.metadata.parsed.doctype.toString().toLowerCase(),(l==="html"||l==="html5")&&(p='<meta charset="utf-8">'));for(var j in i.metadata.parsed)if(i.metadata.parsed.hasOwnProperty(j))switch(j.toLowerCase()){case"doctype":break;case"title":w="<title>"+i.metadata.parsed.title+`</title>
`;break;case"charset":l==="html"||l==="html5"?p='<meta charset="'+i.metadata.parsed.charset+`">
`:p='<meta name="charset" content="'+i.metadata.parsed.charset+`">
`;break;case"language":case"lang":y=' lang="'+i.metadata.parsed[j]+'"',z+='<meta name="'+j+'" content="'+i.metadata.parsed[j]+`">
`;break;default:z+='<meta name="'+j+'" content="'+i.metadata.parsed[j]+`">
`}return u=_+"<html"+y+`>
<head>
`+w+p+z+`</head>
<body>
`+u.trim()+`
</body>
</html>`,u=i.converter._dispatch("completeHTMLDocument.after",u,o,i),u}),r.subParser("detab",function(u,o,i){return u=i.converter._dispatch("detab.before",u,o,i),u=u.replace(/\t(?=\t)/g," "),u=u.replace(/\t/g,"¨A¨B"),u=u.replace(/¨B(.+?)¨A/g,function(l,_){for(var w=_,p=4-w.length%4,y=0;y<p;y++)w+=" ";return w}),u=u.replace(/¨A/g," "),u=u.replace(/¨B/g,""),u=i.converter._dispatch("detab.after",u,o,i),u}),r.subParser("ellipsis",function(u,o,i){return o.ellipsis&&(u=i.converter._dispatch("ellipsis.before",u,o,i),u=u.replace(/\.\.\./g,"…"),u=i.converter._dispatch("ellipsis.after",u,o,i)),u}),r.subParser("emoji",function(u,o,i){if(!o.emoji)return u;u=i.converter._dispatch("emoji.before",u,o,i);var l=/:([\S]+?):/g;return u=u.replace(l,function(_,w){return r.helper.emojis.hasOwnProperty(w)?r.helper.emojis[w]:_}),u=i.converter._dispatch("emoji.after",u,o,i),u}),r.subParser("encodeAmpsAndAngles",function(u,o,i){return u=i.converter._dispatch("encodeAmpsAndAngles.before",u,o,i),u=u.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&amp;"),u=u.replace(/<(?![a-z\/?$!])/gi,"&lt;"),u=u.replace(/</g,"&lt;"),u=u.replace(/>/g,"&gt;"),u=i.converter._dispatch("encodeAmpsAndAngles.after",u,o,i),u}),r.subParser("encodeBackslashEscapes",function(u,o,i){return u=i.converter._dispatch("encodeBackslashEscapes.before",u,o,i),u=u.replace(/\\(\\)/g,r.helper.escapeCharactersCallback),u=u.replace(/\\([`*_{}\[\]()>#+.!~=|:-])/g,r.helper.escapeCharactersCallback),u=i.converter._dispatch("encodeBackslashEscapes.after",u,o,i),u}),r.subParser("encodeCode",function(u,o,i){return u=i.converter._dispatch("encodeCode.before",u,o,i),u=u.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/([*_{}\[\]\\=~-])/g,r.helper.escapeCharactersCallback),u=i.converter._dispatch("encodeCode.after",u,o,i),u}),r.subParser("escapeSpecialCharsWithinTagAttributes",function(u,o,i){u=i.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",u,o,i);var l=/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,_=/<!(--(?:(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>/gi;return u=u.replace(l,function(w){return w.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,r.helper.escapeCharactersCallback)}),u=u.replace(_,function(w){return w.replace(/([\\`*_~=|])/g,r.helper.escapeCharactersCallback)}),u=i.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",u,o,i),u}),r.subParser("githubCodeBlocks",function(u,o,i){return o.ghCodeBlocks?(u=i.converter._dispatch("githubCodeBlocks.before",u,o,i),u+="¨0",u=u.replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(l,_,w,p){var y=o.omitExtraWLInCodeBlocks?"":`
`;return p=r.subParser("encodeCode")(p,o,i),p=r.subParser("detab")(p,o,i),p=p.replace(/^\n+/g,""),p=p.replace(/\n+$/g,""),p="<pre><code"+(w?' class="'+w+" language-"+w+'"':"")+">"+p+y+"</code></pre>",p=r.subParser("hashBlock")(p,o,i),`
¨G`+(i.ghCodeBlocks.push({text:l,codeblock:p})-1)+`G
`}),u=u.replace(/¨0/,""),i.converter._dispatch("githubCodeBlocks.after",u,o,i)):u}),r.subParser("hashBlock",function(u,o,i){return u=i.converter._dispatch("hashBlock.before",u,o,i),u=u.replace(/(^\n+|\n+$)/g,""),u=`
¨K`+(i.gHtmlBlocks.push(u)-1)+`K
`,u=i.converter._dispatch("hashBlock.after",u,o,i),u}),r.subParser("hashCodeTags",function(u,o,i){u=i.converter._dispatch("hashCodeTags.before",u,o,i);var l=function(_,w,p,y){var z=p+r.subParser("encodeCode")(w,o,i)+y;return"¨C"+(i.gHtmlSpans.push(z)-1)+"C"};return u=r.helper.replaceRecursiveRegExp(u,l,"<code\\b[^>]*>","</code>","gim"),u=i.converter._dispatch("hashCodeTags.after",u,o,i),u}),r.subParser("hashElement",function(u,o,i){return function(l,_){var w=_;return w=w.replace(/\n\n/g,`
`),w=w.replace(/^\n/,""),w=w.replace(/\n+$/g,""),w=`
¨K`+(i.gHtmlBlocks.push(w)-1)+`K
`,w}}),r.subParser("hashHTMLBlocks",function(u,o,i){u=i.converter._dispatch("hashHTMLBlocks.before",u,o,i);var l=["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"],_=function(f,E,R,U){var Q=f;return R.search(/\bmarkdown\b/)!==-1&&(Q=R+i.converter.makeHtml(E)+U),`
¨K`+(i.gHtmlBlocks.push(Q)-1)+`K
`};o.backslashEscapesHTMLTags&&(u=u.replace(/\\<(\/?[^>]+?)>/g,function(f,E){return"&lt;"+E+"&gt;"}));for(var w=0;w<l.length;++w)for(var p,y=new RegExp("^ {0,3}(<"+l[w]+"\\b[^>]*>)","im"),z="<"+l[w]+"\\b[^>]*>",j="</"+l[w]+">";(p=r.helper.regexIndexOf(u,y))!==-1;){var T=r.helper.splitAtIndex(u,p),M=r.helper.replaceRecursiveRegExp(T[1],_,z,j,"im");if(M===T[1])break;u=T[0].concat(M)}return u=u.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,r.subParser("hashElement")(u,o,i)),u=r.helper.replaceRecursiveRegExp(u,function(f){return`
¨K`+(i.gHtmlBlocks.push(f)-1)+`K
`},"^ {0,3}<!--","-->","gm"),u=u.replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,r.subParser("hashElement")(u,o,i)),u=i.converter._dispatch("hashHTMLBlocks.after",u,o,i),u}),r.subParser("hashHTMLSpans",function(u,o,i){u=i.converter._dispatch("hashHTMLSpans.before",u,o,i);function l(_){return"¨C"+(i.gHtmlSpans.push(_)-1)+"C"}return u=u.replace(/<[^>]+?\/>/gi,function(_){return l(_)}),u=u.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(_){return l(_)}),u=u.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(_){return l(_)}),u=u.replace(/<[^>]+?>/gi,function(_){return l(_)}),u=i.converter._dispatch("hashHTMLSpans.after",u,o,i),u}),r.subParser("unhashHTMLSpans",function(u,o,i){u=i.converter._dispatch("unhashHTMLSpans.before",u,o,i);for(var l=0;l<i.gHtmlSpans.length;++l){for(var _=i.gHtmlSpans[l],w=0;/¨C(\d+)C/.test(_);){var p=RegExp.$1;if(_=_.replace("¨C"+p+"C",i.gHtmlSpans[p]),w===10){console.error("maximum nesting of 10 spans reached!!!");break}++w}u=u.replace("¨C"+l+"C",_)}return u=i.converter._dispatch("unhashHTMLSpans.after",u,o,i),u}),r.subParser("hashPreCodeTags",function(u,o,i){u=i.converter._dispatch("hashPreCodeTags.before",u,o,i);var l=function(_,w,p,y){var z=p+r.subParser("encodeCode")(w,o,i)+y;return`
¨G`+(i.ghCodeBlocks.push({text:_,codeblock:z})-1)+`G
`};return u=r.helper.replaceRecursiveRegExp(u,l,"^ {0,3}<pre\\b[^>]*>\\s*<code\\b[^>]*>","^ {0,3}</code>\\s*</pre>","gim"),u=i.converter._dispatch("hashPreCodeTags.after",u,o,i),u}),r.subParser("headers",function(u,o,i){u=i.converter._dispatch("headers.before",u,o,i);var l=isNaN(parseInt(o.headerLevelStart))?1:parseInt(o.headerLevelStart),_=o.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,w=o.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;u=u.replace(_,function(z,j){var T=r.subParser("spanGamut")(j,o,i),M=o.noHeaderId?"":' id="'+y(j)+'"',f=l,E="<h"+f+M+">"+T+"</h"+f+">";return r.subParser("hashBlock")(E,o,i)}),u=u.replace(w,function(z,j){var T=r.subParser("spanGamut")(j,o,i),M=o.noHeaderId?"":' id="'+y(j)+'"',f=l+1,E="<h"+f+M+">"+T+"</h"+f+">";return r.subParser("hashBlock")(E,o,i)});var p=o.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;u=u.replace(p,function(z,j,T){var M=T;o.customizedHeaderId&&(M=T.replace(/\s?\{([^{]+?)}\s*$/,""));var f=r.subParser("spanGamut")(M,o,i),E=o.noHeaderId?"":' id="'+y(T)+'"',R=l-1+j.length,U="<h"+R+E+">"+f+"</h"+R+">";return r.subParser("hashBlock")(U,o,i)});function y(z){var j,T;if(o.customizedHeaderId){var M=z.match(/\{([^{]+?)}\s*$/);M&&M[1]&&(z=M[1])}return j=z,r.helper.isString(o.prefixHeaderId)?T=o.prefixHeaderId:o.prefixHeaderId===!0?T="section-":T="",o.rawPrefixHeaderId||(j=T+j),o.ghCompatibleHeaderId?j=j.replace(/ /g,"-").replace(/&amp;/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():o.rawHeaderId?j=j.replace(/ /g,"-").replace(/&amp;/g,"&").replace(/¨T/g,"¨").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():j=j.replace(/[^\w]/g,"").toLowerCase(),o.rawPrefixHeaderId&&(j=T+j),i.hashLinkCounts[j]?j=j+"-"+i.hashLinkCounts[j]++:i.hashLinkCounts[j]=1,j}return u=i.converter._dispatch("headers.after",u,o,i),u}),r.subParser("horizontalRule",function(u,o,i){u=i.converter._dispatch("horizontalRule.before",u,o,i);var l=r.subParser("hashBlock")("<hr />",o,i);return u=u.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,l),u=u.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,l),u=u.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,l),u=i.converter._dispatch("horizontalRule.after",u,o,i),u}),r.subParser("images",function(u,o,i){u=i.converter._dispatch("images.before",u,o,i);var l=/!\[([^\]]*?)][ \t]*()\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,_=/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,w=/!\[([^\]]*?)][ \t]*()\([ \t]?<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,p=/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,y=/!\[([^\[\]]+)]()()()()()/g;function z(T,M,f,E,R,U,Q,q){return E=E.replace(/\s/g,""),j(T,M,f,E,R,U,Q,q)}function j(T,M,f,E,R,U,Q,q){var se=i.gUrls,be=i.gTitles,Ae=i.gDimensions;if(f=f.toLowerCase(),q||(q=""),T.search(/\(<?\s*>? ?(['"].*['"])?\)$/m)>-1)E="";else if(E===""||E===null)if((f===""||f===null)&&(f=M.toLowerCase().replace(/ ?\n/g," ")),E="#"+f,!r.helper.isUndefined(se[f]))E=se[f],r.helper.isUndefined(be[f])||(q=be[f]),r.helper.isUndefined(Ae[f])||(R=Ae[f].width,U=Ae[f].height);else return T;M=M.replace(/"/g,"&quot;").replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback),E=E.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var he='<img src="'+E+'" alt="'+M+'"';return q&&r.helper.isString(q)&&(q=q.replace(/"/g,"&quot;").replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback),he+=' title="'+q+'"'),R&&U&&(R=R==="*"?"auto":R,U=U==="*"?"auto":U,he+=' width="'+R+'"',he+=' height="'+U+'"'),he+=" />",he}return u=u.replace(p,j),u=u.replace(w,z),u=u.replace(_,j),u=u.replace(l,j),u=u.replace(y,j),u=i.converter._dispatch("images.after",u,o,i),u}),r.subParser("italicsAndBold",function(u,o,i){u=i
`),p+="¨0";var z=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,j=/\n[ \t]*\n(?!¨0)/.test(p);return o.disableForced4SpacesIndentedSublists&&(z=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),p=p.replace(z,function(T,M,f,E,R,U,Q){Q=Q&&Q.trim()!=="";var q=r.subParser("outdent")(R,o,i),se="";return U&&o.tasklists&&(se=' class="task-list-item" style="list-style-type: none;"',q=q.replace(/^[ \t]*\[(x|X| )?]/m,function(){var be='<input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;"';return Q&&(be+=" checked"),be+=">",be})),q=q.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g,function(be){return"¨A"+be}),M||q.search(/\n{2,}/)>-1?(q=r.subParser("githubCodeBlocks")(q,o,i),q=r.subParser("blockGamut")(q,o,i)):(q=r.subParser("lists")(q,o,i),q=q.replace(/\n$/,""),q=r.subParser("hashHTMLBlocks")(q,o,i),q=q.replace(/\n\n+/g,`
`),j?q=r.subParser("paragraphs")(q,o,i):q=r.subParser("spanGamut")(q,o,i)),q=q.replace("¨A",""),q="<li"+se+">"+q+`</li>
`,q}),p=p.replace(/¨0/g,""),i.gListLevel--,y&&(p=p.replace(/\s+$/,"")),p}function _(p,y){if(y==="ol"){var z=p.match(/^ *(\d+)\./);if(z&&z[1]!=="1")return' start="'+z[1]+'"'}return""}function w(p,y,z){var j=o.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,T=o.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,M=y==="ul"?j:T,f="";if(p.search(M)!==-1)(function R(U){var Q=U.search(M),q=_(p,y);Q!==-1?(f+=`
<`+y+q+`>
`+l(U.slice(0,Q),!!z)+"</"+y+`>
`,y=y==="ul"?"ol":"ul",M=y==="ul"?j:T,R(U.slice(Q))):f+=`
<`+y+q+`>
`+l(U,!!z)+"</"+y+`>
`})(p);else{var E=_(p,y);f=`
<`+y+E+`>
`+l(p,!!z)+"</"+y+`>
`}return f}return u=i.converter._dispatch("lists.before",u,o,i),u+="¨0",i.gListLevel?u=u.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(p,y,z){var j=z.search(/[*+-]/g)>-1?"ul":"ol";return w(y,j,!0)}):u=u.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(p,y,z,j){var T=j.search(/[*+-]/g)>-1?"ul":"ol";return w(z,T,!1)}),u=u.replace(/¨0/,""),u=i.converter._dispatch("lists.after",u,o,i),u}),r.subParser("metadata",function(u,o,i){if(!o.metadata)return u;u=i.converter._dispatch("metadata.before",u,o,i);function l(_){i.metadata.raw=_,_=_.replace(/&/g,"&amp;").replace(/"/g,"&quot;"),_=_.replace(/\n {4}/g," "),_.replace(/^([\S ]+): +([\s\S]+?)$/gm,function(w,p,y){return i.metadata.parsed[p]=y,""})}return u=u.replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,function(_,w,p){return l(p),"¨M"}),u=u.replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,function(_,w,p){return w&&(i.metadata.format=w),l(p),"¨M"}),u=u.replace(/¨M/g,""),u=i.converter._dispatch("metadata.after",u,o,i),u}),r.subParser("outdent",function(u,o,i){return u=i.converter._dispatch("outdent.before",u,o,i),u=u.replace(/^(\t|[ ]{1,4})/gm,"¨0"),u=u.replace(/¨0/g,""),u=i.converter._dispatch("outdent.after",u,o,i),u}),r.subParser("paragraphs",function(u,o,i){u=i.converter._dispatch("paragraphs.before",u,o,i),u=u.replace(/^\n+/g,""),u=u.replace(/\n+$/g,"");for(var l=u.split(/\n{2,}/g),_=[],w=l.length,p=0;p<w;p++){var y=l[p];y.search(/¨(K|G)(\d+)\1/g)>=0?_.push(y):y.search(/\S/)>=0&&(y=r.subParser("spanGamut")(y,o,i),y=y.replace(/^([ \t]*)/g,"<p>"),y+="</p>",_.push(y))}for(w=_.length,p=0;p<w;p++){for(var z="",j=_[p],T=!1;/¨(K|G)(\d+)\1/.test(j);){var M=RegExp.$1,f=RegExp.$2;M==="K"?z=i.gHtmlBlocks[f]:T?z=r.subParser("encodeCode")(i.ghCodeBlocks[f].text,o,i):z=i.ghCodeBlocks[f].codeblock,z=z.replace(/\$/g,"$$$$"),j=j.replace(/(\n\n)?¨(K|G)\d+\2(\n\n)?/,z),/^<pre\b[^>]*>\s*<code\b[^>]*>/.test(j)&&(T=!0)}_[p]=j}return u=_.join(`
`),u=u.replace(/^\n+/g,""),u=u.replace(/\n+$/g,""),i.converter._dispatch("paragraphs.after",u,o,i)}),r.subParser("runExtension",function(u,o,i,l){if(u.filter)o=u.filter(o,l.converter,i);else if(u.regex){var _=u.regex;_ instanceof RegExp||(_=new RegExp(_,"g")),o=o.replace(_,u.replace)}return o}),r.subParser("spanGamut",function(u,o,i){return u=i.converter._dispatch("spanGamut.before",u,o,i),u=r.subParser("codeSpans")(u,o,i),u=r.subParser("escapeSpecialCharsWithinTagAttributes")(u,o,i),u=r.subParser("encodeBackslashEscapes")(u,o,i),u=r.subParser("images")(u,o,i),u=r.subParser("anchors")(u,o,i),u=r.subParser("autoLinks")(u,o,i),u=r.subParser("simplifiedAutoLinks")(u,o,i),u=r.subParser("emoji")(u,o,i),u=r.subParser("underline")(u,o,i),u=r.subParser("italicsAndBold")(u,o,i),u=r.subParser("strikethrough")(u,o,i),u=r.subParser("ellipsis")(u,o,i),u=r.subParser("hashHTMLSpans")(u,o,i),u=r.subParser("encodeAmpsAndAngles")(u,o,i),o.simpleLineBreaks?/\n\n¨K/.test(u)||(u=u.replace(/\n+/g,`<br />
`)):u=u.replace(/ +\n/g,`<br />
`),u=i.converter._dispatch("spanGamut.after",u,o,i),u}),r.subParser("strikethrough",function(u,o,i){function l(_){return o.simplifiedAutoLink&&(_=r.subParser("simplifiedAutoLinks")(_,o,i)),"<del>"+_+"</del>"}return o.strikethrough&&(u=i.converter._dispatch("strikethrough.before",u,o,i),u=u.replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(_,w){return l(w)}),u=i.converter._dispatch("strikethrough.after",u,o,i)),u}),r.subParser("stripLinkDefinitions",function(u,o,i){var l=/^ {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,_=/^ {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;u+="¨0";var w=function(p,y,z,j,T,M,f){return y=y.toLowerCase(),u.toLowerCase().split(y).length-1<2?p:(z.match(/^data:.+?\/.+?;base64,/)?i.gUrls[y]=z.replace(/\s/g,""):i.gUrls[y]=r.subParser("encodeAmpsAndAngles")(z,o,i),M?M+f:(f&&(i.gTitles[y]=f.replace(/"|'/g,"&quot;")),o.parseImgDimensions&&j&&T&&(i.gDimensions[y]={width:j,height:T}),""))};return u=u.replace(_,w),u=u.replace(l,w),u=u.replace(/¨0/,""),u}),r.subParser("tables",function(u,o,i){if(!o.tables)return u;var l=/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,_=/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm;function w(T){return/^:[ \t]*--*$/.test(T)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(T)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(T)?' style="text-align:center;"':""}function p(T,M){var f="";return T=T.trim(),(o.tablesHeaderId||o.tableHeaderId)&&(f=' id="'+T.replace(/ /g,"_").toLowerCase()+'"'),T=r.subParser("spanGamut")(T,o,i),"<th"+f+M+">"+T+`</th>
`}function y(T,M){var f=r.subParser("spanGamut")(T,o,i);return"<td"+M+">"+f+`</td>
`}function z(T,M){for(var f=`<table>
<thead>
<tr>
`,E=T.length,R=0;R<E;++R)f+=T[R];for(f+=`</tr>
</thead>
<tbody>
`,R=0;R<M.length;++R){f+=`<tr>
`;for(var U=0;U<E;++U)f+=M[R][U];f+=`</tr>
`}return f+=`</tbody>
</table>
`,f}function j(T){var M,f=T.split(`
`);for(M=0;M<f.length;++M)/^ {0,3}\|/.test(f[M])&&(f[M]=f[M].replace(/^ {0,3}\|/,"")),/\|[ \t]*$/.test(f[M])&&(f[M]=f[M].replace(/\|[ \t]*$/,"")),f[M]=r.subParser("codeSpans")(f[M],o,i);var E=f[0].split("|").map(function(he){return he.trim()}),R=f[1].split("|").map(function(he){return he.trim()}),U=[],Q=[],q=[],se=[];for(f.shift(),f.shift(),M=0;M<f.length;++M)f[M].trim()!==""&&U.push(f[M].split("|").map(function(he){return he.trim()}));if(E.length<R.length)return T;for(M=0;M<R.length;++M)q.push(w(R[M]));for(M=0;M<E.length;++M)r.helper.isUndefined(q[M])&&(q[M]=""),Q.push(p(E[M],q[M]));for(M=0;M<U.length;++M){for(var be=[],Ae=0;Ae<Q.length;++Ae)r.helper.isUndefined(U[M][Ae]),be.push(y(U[M][Ae],q[Ae]));se.push(be)}return z(Q,se)}return u=i.converter._dispatch("tables.before",u,o,i),u=u.replace(/\\(\|)/g,r.helper.escapeCharactersCallback),u=u.replace(l,j),u=u.replace(_,j),u=i.converter._dispatch("tables.after",u,o,i),u}),r.subParser("underline",function(u,o,i){return o.underline&&(u=i.converter._dispatch("underline.before",u,o,i),o.literalMidWordUnderscores?(u=u.replace(/\b___(\S[\s\S]*?)___\b/g,function(l,_){return"<u>"+_+"</u>"}),u=u.replace(/\b__(\S[\s\S]*?)__\b/g,function(l,_){return"<u>"+_+"</u>"})):(u=u.replace(/___(\S[\s\S]*?)___/g,function(l,_){return/\S$/.test(_)?"<u>"+_+"</u>":l}),u=u.replace(/__(\S[\s\S]*?)__/g,function(l,_){return/\S$/.test(_)?"<u>"+_+"</u>":l})),u=u.replace(/(_)/g,r.helper.escapeCharactersCallback),u=i.converter._dispatch("underline.after",u,o,i)),u}),r.subParser("unescapeSpecialChars",function(u,o,i){return u=i.converter._dispatch("unescapeSpecialChars.before",u,o,i),u=u.replace(/¨E(\d+)E/g,function(l,_){var w=parseInt(_);return String.fromCharCode(w)}),u=i.converter._dispatch("unescapeSpecialChars.after",u,o,i),u}),r.subParser("makeMarkdown.blockquote",function(u,o){var i="";if(u.hasChildNodes())for(var l=u.childNodes,_=l.length,w=0;w<_;++w){var p=r.subParser("makeMarkdown.node")(l[w],o);p!==""&&(i+=p)}return i=i.trim(),i="> "+i.split(`
`).join(`
> `),i}),r.subParser("makeMarkdown.codeBlock",function(u,o){var i=u.getAttribute("language"),l=u.getAttribute("precodenum");return"```"+i+`
`+o.preList[l]+"\n```"}),r.subParser("makeMarkdown.codeSpan",function(u){return"`"+u.innerHTML+"`"}),r.subParser("makeMarkdown.emphasis",function(u,o){var i="";if(u.hasChildNodes()){i+="*";for(var l=u.childNodes,_=l.length,w=0;w<_;++w)i+=r.subParser("makeMarkdown.node")(l[w],o);i+="*"}return i}),r.subParser("makeMarkdown.header",function(u,o,i){var l=new Array(i+1).join("#"),_="";if(u.hasChildNodes()){_=l+" ";for(var w=u.childNodes,p=w.length,y=0;y<p;++y)_+=r.subParser("makeMarkdown.node")(w[y],o)}return _}),r.subParser("makeMarkdown.hr",function(){return"---"}),r.subParser("makeMarkdown.image",function(u){var o="";return u.hasAttribute("src")&&(o+="!["+u.getAttribute("alt")+"](",o+="<"+u.getAttribute("src")+">",u.hasAttribute("width")&&u.hasAttribute("height")&&(o+=" ="+u.getAttribute("width")+"x"+u.getAttribute("height")),u.hasAttribute("title")&&(o+=' "'+u.getAttribute("title")+'"'),o+=")"),o}),r.subParser("makeMarkdown.links",function(u,o){var i="";if(u.hasChildNodes()&&u.hasAttribute("href")){var l=u.childNodes,_=l.length;i="[";for(var w=0;w<_;++w)i+=r.subParser("makeMarkdown.node")(l[w],o);i+="](",i+="<"+u.getAttribute("href")+">",u.hasAttribute("title")&&(i+=' "'+u.getAttribute("title")+'"'),i+=")"}return i}),r.subParser("makeMarkdown.list",function(u,o,i){var l="";if(!u.hasChildNodes())return"";for(var _=u.childNodes,w=_.length,p=u.getAttribute("start")||1,y=0;y<w;++y)if(!(typeof _[y].tagName>"u"||_[y].tagName.toLowerCase()!=="li")){var z="";i==="ol"?z=p.toString()+". ":z="- ",l+=z+r.subParser("makeMarkdown.listItem")(_[y],o),++p}return l+=`
<!-- -->
`,l.trim()}),r.subParser("makeMarkdown.listItem",function(u,o){for(var i="",l=u.childNodes,_=l.length,w=0;w<_;++w)i+=r.subParser("makeMarkdown.node")(l[w],o);return/\n$/.test(i)?i=i.split(`
`).join(`
`).replace(/^ {4}$/gm,"").replace(/\n\n+/g,`
`):i+=`
`,i}),r.subParser("makeMarkdown.node",function(u,o,i){i=i||!1;var l="";if(u.nodeType===3)return r.subParser("makeMarkdown.txt")(u,o);if(u.nodeType===8)return"<!--"+u.data+`-->
`;if(u.nodeType!==1)return"";var _=u.tagName.toLowerCase();switch(_){case"h1":i||(l=r.subParser("makeMarkdown.header")(u,o,1)+`
`);break;case"h2":i||(l=r.subParser("makeMarkdown.header")(u,o,2)+`
`);break;case"h3":i||(l=r.subParser("makeMarkdown.header")(u,o,3)+`
`);break;case"h4":i||(l=r.subParser("makeMarkdown.header")(u,o,4)+`
`);break;case"h5":i||(l=r.subParser("makeMarkdown.header")(u,o,5)+`
`);break;case"h6":i||(l=r.subParser("makeMarkdown.header")(u,o,6)+`
`);break;case"p":i||(l=r.subParser("makeMarkdown.paragraph")(u,o)+`
`);break;case"blockquote":i||(l=r.subParser("makeMarkdown.blockquote")(u,o)+`
`);break;case"hr":i||(l=r.subParser("makeMarkdown.hr")(u,o)+`
`);break;case"ol":i||(l=r.subParser("makeMarkdown.list")(u,o,"ol")+`
`);break;case"ul":i||(l=r.subParser("makeMarkdown.list")(u,o,"ul")+`
`);break;case"precode":i||(l=r.subParser("makeMarkdown.codeBlock")(u,o)+`
`);break;case"pre":i||(l=r.subParser("makeMarkdown.pre")(u,o)+`
`);break;case"table":i||(l=r.subParser("makeMarkdown.table")(u,o)+`
`);break;case"code":l=r.subParser("makeMarkdown.codeSpan")(u,o);break;case"em":case"i":l=r.subParser("makeMarkdown.emphasis")(u,o);break;case"strong":case"b":l=r.subParser("makeMarkdown.strong")(u,o);break;case"del":l=r.subParser("makeMarkdown.strikethrough")(u,o);break;case"a":l=r.subParser("makeMarkdown.links")(u,o);break;case"img":l=r.subParser("makeMarkdown.image")(u,o);break;default:l=u.outerHTML+`
`}return l}),r.subParser("makeMarkdown.paragraph",function(u,o){var i="";if(u.hasChildNodes())for(var l=u.childNodes,_=l.length,w=0;w<_;++w)i+=r.subParser("makeMarkdown.node")(l[w],o);return i=i.trim(),i}),r.subParser("makeMarkdown.pre",function(u,o){var i=u.getAttribute("prenum");return"<pre>"+o.preList[i]+"</pre>"}),r.subParser("makeMarkdown.strikethrough",function(u,o){var i="";if(u.hasChildNodes()){i+="~~";for(var l=u.childNodes,_=l.length,w=0;w<_;++w)i+=r.subParser("makeMarkdown.node")(l[w],o);i+="~~"}return i}),r.subParser("makeMarkdown.strong",function(u,o){var i="";if(u.hasChildNodes()){i+="**";for(var l=u.childNodes,_=l.length,w=0;w<_;++w)i+=r.subParser("makeMarkdown.node")(l[w],o);i+="**"}return i}),r.subParser("makeMarkdown.table",function(u,o){var i="",l=[[],[]],_=u.querySelectorAll("thead>tr>th"),w=u.querySelectorAll("tbody>tr"),p,y;for(p=0;p<_.length;++p){var z=r.subParser("makeMarkdown.tableCell")(_[p],o),j="---";if(_[p].hasAttribute("style")){var T=_[p].getAttribute("style").toLowerCase().replace(/\s/g,"");switch(T){case"text-align:left;":j=":---";break;case"text-align:right;":j="---:";break;case"text-align:center;":j=":---:";break}}l[0][p]=z.trim(),l[1][p]=j}for(p=0;p<w.length;++p){var M=l.push([])-1,f=w[p].getElementsByTagName("td");for(y=0;y<_.length;++y){var E=" ";typeof f[y]<"u"&&(E=r.subParser("makeMarkdown.tableCell")(f[y],o)),l[M].push(E)}}var R=3;for(p=0;p<l.length;++p)for(y=0;y<l[p].length;++y){var U=l[p][y].length;U>R&&(R=U)}for(p=0;p<l.length;++p){for(y=0;y<l[p].length;++y)p===1?l[p][y].slice(-1)===":"?l[p][y]=r.helper.padEnd(l[p][y].slice(-1),R-1,"-")+":":l[p][y]=r.helper.padEnd(l[p][y],R,"-"):l[p][y]=r.helper.padEnd(l[p][y],R);i+="| "+l[p].join(" | ")+` |
`}return i.trim()}),r.subParser("makeMarkdown.tableCell",function(u,o){var i="";if(!u.hasChildNodes())return"";for(var l=u.childNodes,_=l.length,w=0;w<_;++w)i+=r.subParser("makeMarkdown.node")(l[w],o,!0);return i.trim()}),r.subParser("makeMarkdown.txt",function(u){var o=u.nodeValue;return o=o.replace(/ +/g," "),o=o.replace(/¨NBSP;/g," "),o=r.helper.unescapeHTMLEntities(o),o=o.replace(/([*_~|`])/g,"\\$1"),o=o.replace(/^(\s*)>/g,"\\$1>"),o=o.replace(/^#/gm,"\\#"),o=o.replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3"),o=o.replace(/^( {0,3}\d+)\./gm,"$1\\."),o=o.replace(/^( {0,3})([+-])/gm,"$1\\$2"),o=o.replace(/]([\s]*)\(/g,"\\]$1\\("),o=o.replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:"),o});var G=this;e.exports?e.exports=r:G.showdown=r}).call(jo)})(Oo);const Mo=ln;/*!
* vue-showdown - Use showdown as a vue component
*
* @version v4.0.0
* @link https://vue-showdown.js.org
* @license MIT
* @copyright 2018-2022 meteorlxy
2023-02-12 07:18:43 +00:00
*/const Md=hd({name:"VueShowdown",props:{markdown:{type:String,required:!1,default:null},tag:{type:String,required:!1,default:"div"},flavor:{type:String,required:!1,default:null},options:{type:Object,required:!1,default:()=>({})},extensions:{type:Array,required:!1,default:null},vueTemplate:{type:Boolean,required:!1,default:!1},vueTemplateData:{type:Object,required:!1,default:()=>({})}},setup(e,{slots:t}){const n=mt(()=>{const s=new Mo.Converter({extensions:e.extensions||void 0});return e.flavor!==null&&s.setFlavor(e.flavor),Object.entries(e.options).forEach(([a,c])=>{s.setOption(a,c)}),s}),r=mt(()=>{var a;if(e.markdown!==null)return e.markdown;const s=(a=t.default)==null?void 0:a.call(t)[0];return(s==null?void 0:s.type)===Yt?s.children:""}),d=mt(()=>n.value.makeHtml(r.value));return()=>e.vueTemplate?hu({setup:()=>e.vueTemplateData,template:`<${e.tag}>${d.value}</${e.tag}>`}):hu(e.tag,{innerHTML:d.value})}});function Rd(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ld}=Object.prototype,{getPrototypeOf:In}=Object,Bn=(e=>t=>{const n=Ld.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ye=e=>(e=e.toLowerCase(),t=>Bn(t)===e),Nr=e=>t=>typeof t===e,{isArray:Mt}=Array,Gt=Nr("undefined");function Ro(e){return e!==null&&!Gt(e)&&e.constructor!==null&&!Gt(e.constructor)&&ut(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const zd=Ye("ArrayBuffer");function Lo(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&zd(e.buffer),t}const zo=Nr("string"),ut=Nr("function"),Nd=Nr("number"),Fn=e=>e!==null&&typeof e=="object",No=e=>e===!0||e===!1,hr=e=>{if(Bn(e)!=="object")return!1;const t=In(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Io=Ye("Date"),Bo=Ye("File"),Fo=Ye("Blob"),Ho=Ye("FileList"),$o=e=>Fn(e)&&ut(e.pipe),Do=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||Ld.call(e)===t||ut(e.toString)&&e.toString()===t)},Uo=Ye("URLSearchParams"),qo=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Qt(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,d;if(typeof e!="object"&&(e=[e]),Mt(e))for(r=0,d=e.length;r<d;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let c;for(r=0;r<a;r++)c=s[r],t.call(null,e[c],c,e)}}function Id(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,d;for(;r-- >0;)if(d=n[r],t===d.toLowerCase())return d;return null}const Bd=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Fd=e=>!Gt(e)&&e!==Bd;function fn(){const{caseless:e}=Fd(this)&&this||{},t={},n=(r,d)=>{const s=e&&Id(t,d)||d;hr(t[s])&&hr(r)?t[s]=fn(t[s],r):hr(r)?t[s]=fn({},r):Mt(r)?t[s]=r.slice():t[s]=r};for(let r=0,d=arguments.length;r<d;r++)arguments[r]&&Qt(arguments[r],n);return t}const Vo=(e,t,n,{allOwnKeys:r}={})=>(Qt(t,(d,s)=>{n&&ut(d)?e[s]=Rd(d,n):e[s]=d},{allOwnKeys:r}),e),Wo=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ko=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Jo=(e,t,n,r)=>{let d,s,a;const c={};if(t=t||{},e==null)return t;do{for(d=Object.getOwnPropertyNames(e),s=d.length;s-- >0;)a=d[s],(!r||r(a,e,t))&&!c[a]&&(t[a]=e[a],c[a]=!0);e=n!==!1&&In(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Go=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Zo=e=>{if(!e)return null;if(Mt(e))return e;let t=e.length;if(!Nd(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Xo=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&In(Uint8Array)),Yo=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let d;for(;(d=r.next())&&!d.done;){const s=d.value;t.call(e,s[0],s[1])}},Qo=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},xo=Ye("HTMLFormElement"),ea=e=>e.toLowerCase().replace(/
`).forEach(function(a){d=a.indexOf(":"),n=a.substring(0,d).trim().toLowerCase(),r=a.substring(d+1).trim(),!(!n||t[n]&&Ea[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Tu=Symbol("internals");function It(e){return e&&String(e).trim().toLowerCase()}function pr(e){return e===!1||e==null?e:P.isArray(e)?e.map(pr):String(e)}function Ca(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}function Sa(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function Gr(e,t,n,r){if(P.isFunction(r))return r.call(this,t,n);if(P.isString(t)){if(P.isString(r))return t.indexOf(r)!==-1;if(P.isRegExp(r))return r.test(t)}}function Aa(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Ta(e,t){const n=P.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(d,s,a){return this[r].call(this,t,d,s,a)},configurable:!0})})}class Fr{constructor(t){t&&this.set(t)}set(t,n,r){const d=this;function s(c,h,g){const v=It(h);if(!v)throw new Error("header name must be a non-empty string");const C=P.findKey(d,v);(!C||d[C]===void 0||g===!0||g===void 0&&d[C]!==!1)&&(d[C||h]=pr(c))}const a=(c,h)=>P.forEach(c,(g,v)=>s(g,v,h));return P.isPlainObject(t)||t instanceof this.constructor?a(t,n):P.isString(t)&&(t=t.trim())&&!Sa(t)?a(Pa(t),n):t!=null&&s(n,t,r),this}get(t,n){if(t=It(t),t){const r=P.findKey(this,t);if(r){const d=this[r];if(!n)return d;if(n===!0)return Ca(d);if(P.isFunction(n))return n.call(this,d,r);if(P.isRegExp(n))return n.exec(d);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=It(t),t){const r=P.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Gr(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let d=!1;function s(a){if(a=It(a),a){const c=P.findKey(r,a);c&&(!n||Gr(r,r[c],c,n))&&(delete r[c],d=!0)}}return P.isArray(t)?t.forEach(s):s(t),d}clear(t){const n=Object.keys(this);let r=n.length,d=!1;for(;r--;){const s=n[r];(!t||Gr(this,this[s],s,t))&&(delete this[s],d=!0)}return d}normalize(t){const n=this,r={};return P.forEach(this,(d,s)=>{const a=P.findKey(r,s);if(a){n[a]=pr(d),delete n[s];return}const c=t?Aa(s):String(s).trim();c!==s&&delete n[s],n[c]=pr(d),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return P.forEach(this,(r,d)=>{r!=null&&r!==!1&&(n[d]=t&&P.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(d=>r.set(d)),r}static accessor(t){const r=(this[Tu]=this[Tu]={accessors:{}}).accessors,d=this.prototype;function s(a){const c=It(a);r[c]||(Ta(d,a),r[c]=!0)}return P.isArray(t)?t.forEach(s):s(t),this}}Fr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);P.freezeMethods(Fr.prototype);P.freezeMethods(Fr);const Ge=Fr;function Zr(e,t){const n=this||$n,r=t||n,d=Ge.from(r.headers);let s=r.data;return P.forEach(e,function(c){s=c.call(n,s,d.normalize(),t?t.status:void 0)}),d.normalize(),s}function Gd(e){return!!(e&&e.__CANCEL__)}function xt(e,t,n){re.call(this,e??"canceled",re.ERR_CANCELED,t,n),this.name="CanceledError"}P.inherits(xt,re,{__CANCEL__:!0});function ja(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new re("Request failed with status code "+n.status,[re.ERR_BAD_REQUEST,re.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Oa=Ve.isStandardBrowserEnv?function(){return{write:function(n,r,d,s,a,c){const h=[];h.push(n+"="+encodeURIComponent(r)),P.isNumber(d)&&h.push("expires="+new Date(d).toGMTString()),P.isString(s)&&h.push("path="+s),P.isString(a)&&h.push("domain="+a),c===!0&&h.push("secure"),document.cookie=h.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Ma(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ra(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Zd(e,t){return e&&!Ma(t)?Ra(e,t):t}const La=Ve.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function d(s){let a=s;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=d(window.location.href),function(a){const c=P.isString(a)?d(a):a;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}();function za(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Na(e,t){e=e||10;const n=new Array(e),r=new Array(e);let d=0,s=0,a;return t=t!==void 0?t:1e3,function(h){const g=Date.now(),v=r[s];a||(a=g),n[d]=h,r[d]=g;let C=s,I=0;for(;C!==d;)I+=n[C++],C=C%e;if(d=(d+1)%e,d===s&&(s=(s+1)%e),g-a<t)return;const D=v&&g-v;return D?Math.round(I*1e3/D):void 0}}function ju(e,t){let n=0;const r=Na(50,250);return d=>{const s=d.loaded,a=d.lengthComputable?d.total:void 0,c=s-n,h=r(c),g=s<=a;n=s;const v={loaded:s,total:a,progress:a?s/a:void 0,bytes:c,rate:h||void 0,estimated:h&&a&&g?(a-s)/h:void 0,event:d};v[t?"download":"upload"]=!0,e(v)}}const Ia=typeof XMLHttpRequest<"u",Ba=Ia&&function(e){return new Promise(function(n,r){let d=e.data;const s=Ge.from(e.headers).normalize(),a=e.responseType;let c;function h(){e.cancelToken&&e.cancelToken.unsubscribe(c),e.signal&&e.signal.removeEventListener("abort",c)}P.isFormData(d)&&(Ve.isStandardBrowserEnv||Ve.isStandardBrowserWebWorkerEnv)&&s.setContentType(!1);let g=new XMLHttpRequest;if(e.auth){const D=e.auth.username||"",B=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.set("Authorization","Basic "+btoa(D+":"+B))}const v=Zd(e.baseURL,e.url);g.open(e.method.toUpperCase(),Wd(v,e.params,e.paramsSerializer),!0),g.timeout=e.timeout;function C(){if(!g)return;const D=Ge.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),H={data:!a||a==="text"||a==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:D,config:e,request:g};ja(function(X){n(X),h()},function(X){r(X),h()
2023-02-12 07:12:32 +00:00
Are you connected to the internet or is the location correct?`)})}async function xa(e,t){return await qn.get(`https://${e}/assets/posts/${t}.json`).then(n=>n.data).catch(n=>{alert(`Failed to load Post! We've got a ${n.message}!
2023-03-05 05:03:32 +00:00
Are you connected to the internet?`)})}const ec={class:"wrapper"},tc={id:"dialog"},rc={class:"dialog-header"},nc={key:0},uc=ee("h4",null,"Load Archive...",-1),dc=[uc],sc={key:1},ic=ee("h4",null,"Load post from Archive...",-1),oc=[ic],ac={class:"close-btn"},cc={key:0},lc=ee("br",null,null,-1),fc=["disabled"],hc={key:1,class:"loaded"},pc=["onClick"],mc={class:"editor-area"},_c={class:"title-area"},gc=ee("label",{for:"draft"},"Draft",-1),bc=ee("br",null,null,-1),wc={class:"preview"},yc=ee("p",{class:"preview-title"},"  Preview: ",-1),vc={class:"footer"},kc={key:0},Ec=ee("br",null,null,-1),Pc=ee("br",null,null,-1),Cc={key:1},Sc=ee("br",null,null,-1),Ac=ee("br",null,null,-1),Tc={class:"footer-buttons"},jc=["disabled"],Oc=ee("br",null,null,-1),Mc=ee("label",{for:"file-input"},"Load Post (from File)",-1),Rc=hd({__name:"App",setup(e){let t;const n=We(""),r=We(),d=We(""),s=We(""),a=We(""),c=We(""),h=We(!1),g=We(!1),v=We(!1),C=(o=!1)=>{v.value=o,document.getElementById("dialog").showModal()},I=()=>{document.getElementById("dialog").close()},D=()=>{r.value=void 0,d.value="",s.value="",a.value="",c.value="",h.value=!1,g.value=!1,c.value="",clearInterval(t),t=setInterval(()=>{a.value=ir()},33)},B=o=>{Qa(o).then(i=>{r.value=i,v.value&&(v.value=!1,I())})},H=o=>{r.value=void 0,Xa(o.target.files[0]).then(i=>{d.value=i.postTitle,s.value=i.postContent,a.value=i.timestamp,h.value=i.draft,g.value=!0,clearInterval(t),t=setInterval(()=>{c.value=ir()},33)})},ue=(o,i)=>{xa(o,i).then(l=>{d.value=l.postTitle,s.value=l.postContent,a.value=l.timestamp,h.value=l.draft,g.value=!0,clearInterval(t),t=setInterval(()=>{c.value=ir()},33),I()})},X=o=>{var i,l;d.value||(d.value="No title."),s.value||(s.value="No content."),Lu(Ya(d.value,a.value,s.value,le.value,h.value,g.value,c.value),le.value),o&&(!((i=r.value)!=null&&i.filter(_=>_.filename===le.value).length)&&!h&&((l=r.value)==null||l.push({postTitle:d.value,timestamp:a.value,filename:le.value})),Lu(r.value,"archive"))};_d(()=>{t=setInterval(()=>{a.value=ir()},33)});const le=mt(()=>Za(d.value)),G=mt(()=>zu(a.value)),u=mt(()=>zu(c.value));return(o,i)=>(De(),Ke(Re,null,[ee("div",ec,[ee("dialog",tc,[ee("div",rc,[v.value?(De(),Ke("div",nc,dc)):(De(),Ke("div",sc,oc)),ee("div",ac,[ee("button",{class:"btn-primary",onClick:i[0]||(i[0]=l=>I())}," X ")])]),r.value?Nt("",!0):(De(),Ke("div",cc,[je(" Blog Location: https:// "),sr(ee("input",{type:"text","onUpdate:modelValue":i[1]||(i[1]=l=>n.value=l),placeholder:"pedrocx486.club/blog"},null,512),[[Kr,n.value]]),je(" /assets/posts/archive.json "),lc,ee("button",{class:"btn-primary btn-wide",disabled:!n.value,onClick:i[2]||(i[2]=l=>B(n.value))}," Load Archive ",8,fc)])),r.value&&v.value?(De(),Ke("div",hc," Archive loaded. ")):Nt("",!0),v.value?Nt("",!0):(De(!0),Ke(Re,{key:2},Ci(r.value,l=>(De(),Ke("div",null,[ee("button",{class:"btn-secondary btn-wide",onClick:_=>ue(n.value,l.filename)},Lt(l.postTitle),9,pc)]))),256))]),ee("div",mc,[ee("div",_c,[sr(ee("input",{class:"title",type:"text",placeholder:"Post title...","onUpdate:modelValue":i[3]||(i[3]=l=>d.value=l)},null,512),[[Kr,d.value]]),sr(ee("input",{type:"checkbox",id:"draft","onUpdate:modelValue":i[4]||(i[4]=l=>h.value=l)},null,512),[[Eo,h.value]]),gc]),bc,sr(ee("textarea",{class:"editor","onUpdate:modelValue":i[5]||(i[5]=l=>s.value=l),placeholder:"Post content..."},null,512),[[Kr,s.value]])]),ee("div",wc,[yc,Ce(Ft(Md),{markdown:s.value,flavor:"github",options:{emoji:!0},tag:"span"},null,8,["markdown"])])]),ee("div",vc,[je(" Filename: "+Lt(Ft(le)),1),d.value?(De(),Ke("span",kc,".json")):Nt("",!0),je(),Ec,je(" Created on: "+Lt(Ft(G))+" ",1),Pc,g.value?(De(),Ke("span",Cc,[je("Edited on: "+Lt(Ft(u))+" ",1),Sc])):Nt("",!0),je(" Is it a draft? "+Lt(h.value?"Yes":"No")+". ",1),Ac,ee("div",Tc,[ee("button",{class:"btn-tertiary",onClick:i[6]||(i[6]=l=>D())},"Reset Editor"),je("   "),ee("button",{class:"btn-primary",onClick:i[7]||(i[7]=l=>C(!0))},"Load Archive"),je("   "),ee("button",{class:"btn-primary",onClick:i[8]||(i[8]=l=>C())},"Load Post (from Archive)"),je("   "),ee("button",{class:"btn-primary",onClick:i[9]||(i[9