diff --git a/web/comfy_shared.js b/web/comfy_shared.js index 60902cb..f679353 100644 --- a/web/comfy_shared.js +++ b/web/comfy_shared.js @@ -9,6 +9,36 @@ import { app } from '../../scripts/app.js' +// - crude uuid +export function makeUUID() { + let dt = new Date().getTime() + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => { + const r = (dt + Math.random() * 16) % 16 | 0 + dt = Math.floor(dt / 16) + return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16) + }) + return uuid +} + +// - log utilities + +function createLogger(emoji, color, consoleMethod = 'log') { + return function (message, ...args) { + if (window.MTB?.DEBUG) { + console[consoleMethod]( + `%c${emoji} ${message}`, + `color: ${color};`, + ...args + ) + } + } +} + +export const infoLogger = createLogger('โ„น๏ธ', 'yellow') +export const warnLogger = createLogger('โš ๏ธ', 'orange', 'warn') +export const errorLogger = createLogger('๐Ÿ”ฅ', 'red', 'error') +export const successLogger = createLogger('โœ…', 'green') + export const log = (...args) => { if (window.MTB?.DEBUG) { console.debug(...args) @@ -159,6 +189,25 @@ export const dynamic_connection = ( } } +export function calculateTotalChildrenHeight(parentElement) { + let totalHeight = 0 + + for (const child of parentElement.children) { + const style = window.getComputedStyle(child) + + // Get height as an integer (without 'px') + const height = parseInt(style.height, 10) + + // Get vertical margin as integers + const marginTop = parseInt(style.marginTop, 10) + const marginBottom = parseInt(style.marginBottom, 10) + + // Sum up height and vertical margins + totalHeight += height + marginTop + marginBottom + } + + return totalHeight +} /** * Appends a callback to the extra menu options of a given node type. * @param {*} nodeType diff --git a/web/extern/dom-purify.js b/web/extern/dom-purify.js new file mode 100644 index 0000000..9b16c5a --- /dev/null +++ b/web/extern/dom-purify.js @@ -0,0 +1,3 @@ +/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=N(Array.prototype.forEach),m=N(Array.prototype.pop),f=N(Array.prototype.push),p=N(String.prototype.toLowerCase),d=N(String.prototype.toString),h=N(String.prototype.match),g=N(String.prototype.replace),T=N(String.prototype.indexOf),y=N(String.prototype.trim),E=N(RegExp.prototype.test),A=(_=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:p;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function S(t){const n=l(null);for(const[o,i]of e(t))void 0!==r(t,o)&&(n[o]=i);return n}function R(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return N(n.get);if("function"==typeof n.value)return N(n.value)}e=o(e)}return function(e){return console.warn("fallback value for",e),null}}const w=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),D=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),L=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),v=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),x=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),k=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),C=i(["#text"]),O=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),I=i(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),M=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),U=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),P=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=a(/<%[\w\W]*|[\w\W]*%>/gm),H=a(/\${[\w\W]*}/gm),z=a(/^data-[\-\w.\u00B7-\uFFFF]/),B=a(/^aria-[\-\w]+$/),W=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=a(/^(?:\w+script|data):/i),Y=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),j=a(/^html$/i);var q=Object.freeze({__proto__:null,MUSTACHE_EXPR:P,ERB_EXPR:F,TMPLIT_EXPR:H,DATA_ATTR:z,ARIA_ATTR:B,IS_ALLOWED_URI:W,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:Y,DOCTYPE_NAME:j});const X=function(){return"undefined"==typeof window?null:window};var K=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X();const o=e=>t(e);if(o.version="3.0.6",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:_,Node:N,Element:P,NodeFilter:F,NamedNodeMap:H=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:z,DOMParser:B,trustedTypes:G}=n,Y=P.prototype,K=R(Y,"cloneNode"),V=R(Y,"nextSibling"),$=R(Y,"childNodes"),Z=R(Y,"parentNode");if("function"==typeof _){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let J,Q="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:oe}=r,{importNode:re}=a;let ie={};o.isSupported="function"==typeof e&&"function"==typeof Z&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:le,TMPLIT_EXPR:ce,DATA_ATTR:se,ARIA_ATTR:ue,IS_SCRIPT_OR_DATA:me,ATTR_WHITESPACE:fe}=q;let{IS_ALLOWED_URI:pe}=q,de=null;const he=b({},[...w,...D,...L,...x,...C]);let ge=null;const Te=b({},[...O,...I,...M,...U]);let ye=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ee=null,Ae=null,_e=!0,Ne=!0,be=!1,Se=!0,Re=!1,we=!1,De=!1,Le=!1,ve=!1,xe=!1,ke=!1,Ce=!0,Oe=!1,Ie=!0,Me=!1,Ue={},Pe=null;const Fe=b({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let He=null;const ze=b({},["audio","video","img","source","image","track"]);let Be=null;const We=b({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ge="http://www.w3.org/1998/Math/MathML",Ye="http://www.w3.org/2000/svg",je="http://www.w3.org/1999/xhtml";let qe=je,Xe=!1,Ke=null;const Ve=b({},[Ge,Ye,je],d);let $e=null;const Ze=["application/xhtml+xml","text/html"];let Je=null,Qe=null;const et=r.createElement("form"),tt=function(e){return e instanceof RegExp||e instanceof Function},nt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Qe||Qe!==e){if(e&&"object"==typeof e||(e={}),e=S(e),$e=-1===Ze.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Je="application/xhtml+xml"===$e?d:p,de="ALLOWED_TAGS"in e?b({},e.ALLOWED_TAGS,Je):he,ge="ALLOWED_ATTR"in e?b({},e.ALLOWED_ATTR,Je):Te,Ke="ALLOWED_NAMESPACES"in e?b({},e.ALLOWED_NAMESPACES,d):Ve,Be="ADD_URI_SAFE_ATTR"in e?b(S(We),e.ADD_URI_SAFE_ATTR,Je):We,He="ADD_DATA_URI_TAGS"in e?b(S(ze),e.ADD_DATA_URI_TAGS,Je):ze,Pe="FORBID_CONTENTS"in e?b({},e.FORBID_CONTENTS,Je):Fe,Ee="FORBID_TAGS"in e?b({},e.FORBID_TAGS,Je):{},Ae="FORBID_ATTR"in e?b({},e.FORBID_ATTR,Je):{},Ue="USE_PROFILES"in e&&e.USE_PROFILES,_e=!1!==e.ALLOW_ARIA_ATTR,Ne=!1!==e.ALLOW_DATA_ATTR,be=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Re=e.SAFE_FOR_TEMPLATES||!1,we=e.WHOLE_DOCUMENT||!1,ve=e.RETURN_DOM||!1,xe=e.RETURN_DOM_FRAGMENT||!1,ke=e.RETURN_TRUSTED_TYPE||!1,Le=e.FORCE_BODY||!1,Ce=!1!==e.SANITIZE_DOM,Oe=e.SANITIZE_NAMED_PROPS||!1,Ie=!1!==e.KEEP_CONTENT,Me=e.IN_PLACE||!1,pe=e.ALLOWED_URI_REGEXP||W,qe=e.NAMESPACE||je,ye=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&tt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ye.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&tt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ye.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ye.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re&&(Ne=!1),xe&&(ve=!0),Ue&&(de=b({},C),ge=[],!0===Ue.html&&(b(de,w),b(ge,O)),!0===Ue.svg&&(b(de,D),b(ge,I),b(ge,U)),!0===Ue.svgFilters&&(b(de,L),b(ge,I),b(ge,U)),!0===Ue.mathMl&&(b(de,x),b(ge,M),b(ge,U))),e.ADD_TAGS&&(de===he&&(de=S(de)),b(de,e.ADD_TAGS,Je)),e.ADD_ATTR&&(ge===Te&&(ge=S(ge)),b(ge,e.ADD_ATTR,Je)),e.ADD_URI_SAFE_ATTR&&b(Be,e.ADD_URI_SAFE_ATTR,Je),e.FORBID_CONTENTS&&(Pe===Fe&&(Pe=S(Pe)),b(Pe,e.FORBID_CONTENTS,Je)),Ie&&(de["#text"]=!0),we&&b(de,["html","head","body"]),de.table&&(b(de,["tbody"]),delete Ee.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,Q=J.createHTML("")}else void 0===J&&(J=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(G,c)),null!==J&&"string"==typeof Q&&(Q=J.createHTML(""));i&&i(e),Qe=e}},ot=b({},["mi","mo","mn","ms","mtext"]),rt=b({},["foreignobject","desc","title","annotation-xml"]),it=b({},["title","style","font","a","script"]),at=b({},[...D,...L,...v]),lt=b({},[...x,...k]),ct=function(e){f(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},st=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ge[e])if(ve||xe)try{ct(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ut=function(e){let t=null,n=null;if(Le)e=""+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===$e&&qe===je&&(e=''+e+"");const o=J?J.createHTML(e):e;if(qe===je)try{t=(new B).parseFromString(o,$e)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(qe,"template",null);try{t.documentElement.innerHTML=Xe?Q:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),qe===je?oe.call(t,we?"html":"body")[0]:we?t.documentElement:i},mt=function(e){return te.call(e.ownerDocument||e,e,F.SHOW_ELEMENT|F.SHOW_COMMENT|F.SHOW_TEXT,null)},ft=function(e){return"function"==typeof N&&e instanceof N},pt=function(e,t,n){ie[e]&&u(ie[e],(e=>{e.call(o,t,n,Qe)}))},dt=function(e){let t=null;if(pt("beforeSanitizeElements",e,null),(n=e)instanceof z&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof H)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return ct(e),!0;var n;const r=Je(e.nodeName);if(pt("uponSanitizeElement",e,{tagName:r,allowedTags:de}),e.hasChildNodes()&&!ft(e.firstElementChild)&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return ct(e),!0;if(!de[r]||Ee[r]){if(!Ee[r]&>(r)){if(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,r))return!1;if(ye.tagNameCheck instanceof Function&&ye.tagNameCheck(r))return!1}if(Ie&&!Pe[r]){const t=Z(e)||e.parentNode,n=$(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o)t.insertBefore(K(n[o],!0),V(e))}}return ct(e),!0}return e instanceof P&&!function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:qe,tagName:"template"});const n=p(e.tagName),o=p(t.tagName);return!!Ke[e.namespaceURI]&&(e.namespaceURI===Ye?t.namespaceURI===je?"svg"===n:t.namespaceURI===Ge?"svg"===n&&("annotation-xml"===o||ot[o]):Boolean(at[n]):e.namespaceURI===Ge?t.namespaceURI===je?"math"===n:t.namespaceURI===Ye?"math"===n&&rt[o]:Boolean(lt[n]):e.namespaceURI===je?!(t.namespaceURI===Ye&&!rt[o])&&!(t.namespaceURI===Ge&&!ot[o])&&!lt[n]&&(it[n]||!at[n]):!("application/xhtml+xml"!==$e||!Ke[e.namespaceURI]))}(e)?(ct(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!E(/<\/no(script|embed|frames)/i,e.innerHTML)?(Re&&3===e.nodeType&&(t=e.textContent,u([ae,le,ce],(e=>{t=g(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),pt("afterSanitizeElements",e,null),!1):(ct(e),!0)},ht=function(e,t,n){if(Ce&&("id"===t||"name"===t)&&(n in r||n in et))return!1;if(Ne&&!Ae[t]&&E(se,t));else if(_e&&E(ue,t));else if(!ge[t]||Ae[t]){if(!(gt(e)&&(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,e)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(e))&&(ye.attributeNameCheck instanceof RegExp&&E(ye.attributeNameCheck,t)||ye.attributeNameCheck instanceof Function&&ye.attributeNameCheck(t))||"is"===t&&ye.allowCustomizedBuiltInElements&&(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,n)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))))return!1}else if(Be[t]);else if(E(pe,g(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!He[e]){if(be&&!E(me,g(n,fe,"")));else if(n)return!1}else;return!0},gt=function(e){return e.indexOf("-")>0},Tt=function(e){pt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=Je(a);let f="value"===a?c:y(c);if(n.attrName=s,n.attrValue=f,n.keepAttr=!0,n.forceKeepAttr=void 0,pt("uponSanitizeAttribute",e,n),f=n.attrValue,n.forceKeepAttr)continue;if(st(a,e),!n.keepAttr)continue;if(!Se&&E(/\/>/i,f)){st(a,e);continue}Re&&u([ae,le,ce],(e=>{f=g(f,e," ")}));const p=Je(e.nodeName);if(ht(p,s,f)){if(!Oe||"id"!==s&&"name"!==s||(st(a,e),f="user-content-"+f),J&&"object"==typeof G&&"function"==typeof G.getAttributeType)if(l);else switch(G.getAttributeType(p,s)){case"TrustedHTML":f=J.createHTML(f);break;case"TrustedScriptURL":f=J.createScriptURL(f)}try{l?e.setAttributeNS(l,a,f):e.setAttribute(a,f),m(o.removed)}catch(e){}}}pt("afterSanitizeAttributes",e,null)},yt=function e(t){let n=null;const o=mt(t);for(pt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)pt("uponSanitizeShadowNode",n,null),dt(n)||(n.content instanceof s&&e(n.content),Tt(n));pt("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(Xe=!e,Xe&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ft(e)){if("function"!=typeof e.toString)throw A("toString is not a function");if("string"!=typeof(e=e.toString()))throw A("dirty is not a string, aborting")}if(!o.isSupported)return e;if(De||nt(t),o.removed=[],"string"==typeof e&&(Me=!1),Me){if(e.nodeName){const t=Je(e.nodeName);if(!de[t]||Ee[t])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof N)n=ut("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),1===r.nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!ve&&!Re&&!we&&-1===e.indexOf("<"))return J&&ke?J.createHTML(e):e;if(n=ut(e),!n)return ve?null:ke?Q:""}n&&Le&&ct(n.firstChild);const c=mt(Me?e:n);for(;i=c.nextNode();)dt(i)||(i.content instanceof s&&yt(i.content),Tt(i));if(Me)return e;if(ve){if(xe)for(l=ne.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(ge.shadowroot||ge.shadowrootmode)&&(l=re.call(a,l,!0)),l}let m=we?n.outerHTML:n.innerHTML;return we&&de["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&E(j,n.ownerDocument.doctype.name)&&(m="\n"+m),Re&&u([ae,le,ce],(e=>{m=g(m,e," ")})),J&&ke?J.createHTML(m):m},o.setConfig=function(){nt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),De=!0},o.clearConfig=function(){Qe=null,De=!1},o.isValidAttribute=function(e,t,n){Qe||nt({});const o=Je(e),r=Je(t);return ht(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(ie[e]=ie[e]||[],f(ie[e],t))},o.removeHook=function(e){if(ie[e])return m(ie[e])},o.removeHooks=function(e){ie[e]&&(ie[e]=[])},o.removeAllHooks=function(){ie={}},o}();return K})); +//# sourceMappingURL=purify.min.js.map \ No newline at end of file diff --git a/web/extern/shodown.min.js b/web/extern/shodown.min.js new file mode 100644 index 0000000..c523dc1 --- /dev/null +++ b/web/extern/shodown.min.js @@ -0,0 +1,3 @@ +/*! showdown v 2.1.0 - 21-04-2022 */ +!function(){function a(e){"use strict";var r={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,describe:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,describe:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,describe:"Parses simple line breaks as
(GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,describe:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,describe:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",describe:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,describe:"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,describe:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,describe:"Support for HTML Tag escaping. ex:
foo
",type:"boolean"},emoji:{defaultValue:!1,describe:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,describe:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},ellipsis:{defaultValue:!0,describe:"Replaces three dots with the ellipsis unicode character",type:"boolean"},completeHTMLDocument:{defaultValue:!1,describe:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,describe:"Enable support for document metadata (defined at the top of the document between `ยซยซยซ` and `ยปยปยป` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,describe:"Split adjacent blockquote blocks",type:"boolean"}};if(!1===e)return JSON.parse(JSON.stringify(r));var t,a={};for(t in r)r.hasOwnProperty(t)&&(a[t]=r[t].defaultValue);return a}var x={},t={},d={},p=a(!0),h="vanilla",_={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:a(!0),allOn:function(){"use strict";var e,r=a(!0),t={};for(e in r)r.hasOwnProperty(e)&&(t[e]=!0);return t}()};function g(e,r){"use strict";var t=r?"Error in "+r+" extension->":"Error in unnamed extension",a={valid:!0,error:""};x.helper.isArray(e)||(e=[e]);for(var n=0;n").replace(/&/g,"&")};function u(e,r,t,a){"use strict";var n,s,o,i=-1<(a=a||"").indexOf("g"),l=new RegExp(r+"|"+t,"g"+a.replace(/g/g,"")),c=new RegExp(r,a.replace(/g/g,"")),u=[];do{for(n=0;p=l.exec(e);)if(c.test(p[0]))n++||(o=(s=l.lastIndex)-p[0].length);else if(n&&!--n){var d=p.index+p[0].length,p={left:{start:o,end:s},match:{start:s,end:p.index},right:{start:p.index,end:d},wholeMatch:{start:o,end:d}};if(u.push(p),!i)return u}}while(n&&(l.lastIndex=s));return u}function s(u){"use strict";return function(e,r,t,a,n,s,o){var i=t=t.replace(x.helper.regexes.asteriskDashAndColon,x.helper.escapeCharactersCallback),l="",c="",r=r||"",o=o||"";return/^www\./i.test(t)&&(t=t.replace(/^www\./i,"http://www.")),u.excludeTrailingPunctuationFromURLs&&s&&(l=s),r+'"+i+""+l+o}}function o(n,s){"use strict";return function(e,r,t){var a="mailto:";return r=r||"",t=x.subParser("unescapeSpecialChars")(t,n,s),n.encodeEmails?(a=x.helper.encodeEmailAddress(a+t),t=x.helper.encodeEmailAddress(t)):a+=t,r+''+t+""}}x.helper.matchRecursiveRegExp=function(e,r,t,a){"use strict";for(var n=u(e,r,t,a),s=[],o=0;o>=0,t=String(t||" "),e.length>r?String(e):((r-=e.length)>t.length&&(t+=t.repeat(r/t.length)),String(e)+t.slice(0,r))},"undefined"==typeof console&&(console={warn:function(e){"use strict";alert(e)},log:function(e){"use strict";alert(e)},error:function(e){"use strict";throw e}}),x.helper.regexes={asteriskDashAndColon:/([*_:~])/g},x.helper.emojis={"+1":"๐Ÿ‘","-1":"๐Ÿ‘Ž",100:"๐Ÿ’ฏ",1234:"๐Ÿ”ข","1st_place_medal":"๐Ÿฅ‡","2nd_place_medal":"๐Ÿฅˆ","3rd_place_medal":"๐Ÿฅ‰","8ball":"๐ŸŽฑ",a:"๐Ÿ…ฐ๏ธ",ab:"๐Ÿ†Ž",abc:"๐Ÿ”ค",abcd:"๐Ÿ”ก",accept:"๐Ÿ‰‘",aerial_tramway:"๐Ÿšก",airplane:"โœˆ๏ธ",alarm_clock:"โฐ",alembic:"โš—๏ธ",alien:"๐Ÿ‘ฝ",ambulance:"๐Ÿš‘",amphora:"๐Ÿบ",anchor:"โš“๏ธ",angel:"๐Ÿ‘ผ",anger:"๐Ÿ’ข",angry:"๐Ÿ˜ ",anguished:"๐Ÿ˜ง",ant:"๐Ÿœ",apple:"๐ŸŽ",aquarius:"โ™’๏ธ",aries:"โ™ˆ๏ธ",arrow_backward:"โ—€๏ธ",arrow_double_down:"โฌ",arrow_double_up:"โซ",arrow_down:"โฌ‡๏ธ",arrow_down_small:"๐Ÿ”ฝ",arrow_forward:"โ–ถ๏ธ",arrow_heading_down:"โคต๏ธ",arrow_heading_up:"โคด๏ธ",arrow_left:"โฌ…๏ธ",arrow_lower_left:"โ†™๏ธ",arrow_lower_right:"โ†˜๏ธ",arrow_right:"โžก๏ธ",arrow_right_hook:"โ†ช๏ธ",arrow_up:"โฌ†๏ธ",arrow_up_down:"โ†•๏ธ",arrow_up_small:"๐Ÿ”ผ",arrow_upper_left:"โ†–๏ธ",arrow_upper_right:"โ†—๏ธ",arrows_clockwise:"๐Ÿ”ƒ",arrows_counterclockwise:"๐Ÿ”„",art:"๐ŸŽจ",articulated_lorry:"๐Ÿš›",artificial_satellite:"๐Ÿ›ฐ",astonished:"๐Ÿ˜ฒ",athletic_shoe:"๐Ÿ‘Ÿ",atm:"๐Ÿง",atom_symbol:"โš›๏ธ",avocado:"๐Ÿฅ‘",b:"๐Ÿ…ฑ๏ธ",baby:"๐Ÿ‘ถ",baby_bottle:"๐Ÿผ",baby_chick:"๐Ÿค",baby_symbol:"๐Ÿšผ",back:"๐Ÿ”™",bacon:"๐Ÿฅ“",badminton:"๐Ÿธ",baggage_claim:"๐Ÿ›„",baguette_bread:"๐Ÿฅ–",balance_scale:"โš–๏ธ",balloon:"๐ŸŽˆ",ballot_box:"๐Ÿ—ณ",ballot_box_with_check:"โ˜‘๏ธ",bamboo:"๐ŸŽ",banana:"๐ŸŒ",bangbang:"โ€ผ๏ธ",bank:"๐Ÿฆ",bar_chart:"๐Ÿ“Š",barber:"๐Ÿ’ˆ",baseball:"โšพ๏ธ",basketball:"๐Ÿ€",basketball_man:"โ›น๏ธ",basketball_woman:"โ›น๏ธ‍โ™€๏ธ",bat:"๐Ÿฆ‡",bath:"๐Ÿ›€",bathtub:"๐Ÿ›",battery:"๐Ÿ”‹",beach_umbrella:"๐Ÿ–",bear:"๐Ÿป",bed:"๐Ÿ›",bee:"๐Ÿ",beer:"๐Ÿบ",beers:"๐Ÿป",beetle:"๐Ÿž",beginner:"๐Ÿ”ฐ",bell:"๐Ÿ””",bellhop_bell:"๐Ÿ›Ž",bento:"๐Ÿฑ",biking_man:"๐Ÿšด",bike:"๐Ÿšฒ",biking_woman:"๐Ÿšด‍โ™€๏ธ",bikini:"๐Ÿ‘™",biohazard:"โ˜ฃ๏ธ",bird:"๐Ÿฆ",birthday:"๐ŸŽ‚",black_circle:"โšซ๏ธ",black_flag:"๐Ÿด",black_heart:"๐Ÿ–ค",black_joker:"๐Ÿƒ",black_large_square:"โฌ›๏ธ",black_medium_small_square:"โ—พ๏ธ",black_medium_square:"โ—ผ๏ธ",black_nib:"โœ’๏ธ",black_small_square:"โ–ช๏ธ",black_square_button:"๐Ÿ”ฒ",blonde_man:"๐Ÿ‘ฑ",blonde_woman:"๐Ÿ‘ฑ‍โ™€๏ธ",blossom:"๐ŸŒผ",blowfish:"๐Ÿก",blue_book:"๐Ÿ“˜",blue_car:"๐Ÿš™",blue_heart:"๐Ÿ’™",blush:"๐Ÿ˜Š",boar:"๐Ÿ—",boat:"โ›ต๏ธ",bomb:"๐Ÿ’ฃ",book:"๐Ÿ“–",bookmark:"๐Ÿ”–",bookmark_tabs:"๐Ÿ“‘",books:"๐Ÿ“š",boom:"๐Ÿ’ฅ",boot:"๐Ÿ‘ข",bouquet:"๐Ÿ’",bowing_man:"๐Ÿ™‡",bow_and_arrow:"๐Ÿน",bowing_woman:"๐Ÿ™‡‍โ™€๏ธ",bowling:"๐ŸŽณ",boxing_glove:"๐ŸฅŠ",boy:"๐Ÿ‘ฆ",bread:"๐Ÿž",bride_with_veil:"๐Ÿ‘ฐ",bridge_at_night:"๐ŸŒ‰",briefcase:"๐Ÿ’ผ",broken_heart:"๐Ÿ’”",bug:"๐Ÿ›",building_construction:"๐Ÿ—",bulb:"๐Ÿ’ก",bullettrain_front:"๐Ÿš…",bullettrain_side:"๐Ÿš„",burrito:"๐ŸŒฏ",bus:"๐ŸšŒ",business_suit_levitating:"๐Ÿ•ด",busstop:"๐Ÿš",bust_in_silhouette:"๐Ÿ‘ค",busts_in_silhouette:"๐Ÿ‘ฅ",butterfly:"๐Ÿฆ‹",cactus:"๐ŸŒต",cake:"๐Ÿฐ",calendar:"๐Ÿ“†",call_me_hand:"๐Ÿค™",calling:"๐Ÿ“ฒ",camel:"๐Ÿซ",camera:"๐Ÿ“ท",camera_flash:"๐Ÿ“ธ",camping:"๐Ÿ•",cancer:"โ™‹๏ธ",candle:"๐Ÿ•ฏ",candy:"๐Ÿฌ",canoe:"๐Ÿ›ถ",capital_abcd:"๐Ÿ” ",capricorn:"โ™‘๏ธ",car:"๐Ÿš—",card_file_box:"๐Ÿ—ƒ",card_index:"๐Ÿ“‡",card_index_dividers:"๐Ÿ—‚",carousel_horse:"๐ŸŽ ",carrot:"๐Ÿฅ•",cat:"๐Ÿฑ",cat2:"๐Ÿˆ",cd:"๐Ÿ’ฟ",chains:"โ›“",champagne:"๐Ÿพ",chart:"๐Ÿ’น",chart_with_downwards_trend:"๐Ÿ“‰",chart_with_upwards_trend:"๐Ÿ“ˆ",checkered_flag:"๐Ÿ",cheese:"๐Ÿง€",cherries:"๐Ÿ’",cherry_blossom:"๐ŸŒธ",chestnut:"๐ŸŒฐ",chicken:"๐Ÿ”",children_crossing:"๐Ÿšธ",chipmunk:"๐Ÿฟ",chocolate_bar:"๐Ÿซ",christmas_tree:"๐ŸŽ„",church:"โ›ช๏ธ",cinema:"๐ŸŽฆ",circus_tent:"๐ŸŽช",city_sunrise:"๐ŸŒ‡",city_sunset:"๐ŸŒ†",cityscape:"๐Ÿ™",cl:"๐Ÿ†‘",clamp:"๐Ÿ—œ",clap:"๐Ÿ‘",clapper:"๐ŸŽฌ",classical_building:"๐Ÿ›",clinking_glasses:"๐Ÿฅ‚",clipboard:"๐Ÿ“‹",clock1:"๐Ÿ•",clock10:"๐Ÿ•™",clock1030:"๐Ÿ•ฅ",clock11:"๐Ÿ•š",clock1130:"๐Ÿ•ฆ",clock12:"๐Ÿ•›",clock1230:"๐Ÿ•ง",clock130:"๐Ÿ•œ",clock2:"๐Ÿ•‘",clock230:"๐Ÿ•",clock3:"๐Ÿ•’",clock330:"๐Ÿ•ž",clock4:"๐Ÿ•“",clock430:"๐Ÿ•Ÿ",clock5:"๐Ÿ•”",clock530:"๐Ÿ• ",clock6:"๐Ÿ••",clock630:"๐Ÿ•ก",clock7:"๐Ÿ•–",clock730:"๐Ÿ•ข",clock8:"๐Ÿ•—",clock830:"๐Ÿ•ฃ",clock9:"๐Ÿ•˜",clock930:"๐Ÿ•ค",closed_book:"๐Ÿ“•",closed_lock_with_key:"๐Ÿ”",closed_umbrella:"๐ŸŒ‚",cloud:"โ˜๏ธ",cloud_with_lightning:"๐ŸŒฉ",cloud_with_lightning_and_rain:"โ›ˆ",cloud_with_rain:"๐ŸŒง",cloud_with_snow:"๐ŸŒจ",clown_face:"๐Ÿคก",clubs:"โ™ฃ๏ธ",cocktail:"๐Ÿธ",coffee:"โ˜•๏ธ",coffin:"โšฐ๏ธ",cold_sweat:"๐Ÿ˜ฐ",comet:"โ˜„๏ธ",computer:"๐Ÿ’ป",computer_mouse:"๐Ÿ–ฑ",confetti_ball:"๐ŸŽŠ",confounded:"๐Ÿ˜–",confused:"๐Ÿ˜•",congratulations:"ใŠ—๏ธ",construction:"๐Ÿšง",construction_worker_man:"๐Ÿ‘ท",construction_worker_woman:"๐Ÿ‘ท‍โ™€๏ธ",control_knobs:"๐ŸŽ›",convenience_store:"๐Ÿช",cookie:"๐Ÿช",cool:"๐Ÿ†’",policeman:"๐Ÿ‘ฎ",copyright:"ยฉ๏ธ",corn:"๐ŸŒฝ",couch_and_lamp:"๐Ÿ›‹",couple:"๐Ÿ‘ซ",couple_with_heart_woman_man:"๐Ÿ’‘",couple_with_heart_man_man:"๐Ÿ‘จ‍โค๏ธ‍๐Ÿ‘จ",couple_with_heart_woman_woman:"๐Ÿ‘ฉ‍โค๏ธ‍๐Ÿ‘ฉ",couplekiss_man_man:"๐Ÿ‘จ‍โค๏ธ‍๐Ÿ’‹‍๐Ÿ‘จ",couplekiss_man_woman:"๐Ÿ’",couplekiss_woman_woman:"๐Ÿ‘ฉ‍โค๏ธ‍๐Ÿ’‹‍๐Ÿ‘ฉ",cow:"๐Ÿฎ",cow2:"๐Ÿ„",cowboy_hat_face:"๐Ÿค ",crab:"๐Ÿฆ€",crayon:"๐Ÿ–",credit_card:"๐Ÿ’ณ",crescent_moon:"๐ŸŒ™",cricket:"๐Ÿ",crocodile:"๐ŸŠ",croissant:"๐Ÿฅ",crossed_fingers:"๐Ÿคž",crossed_flags:"๐ŸŽŒ",crossed_swords:"โš”๏ธ",crown:"๐Ÿ‘‘",cry:"๐Ÿ˜ข",crying_cat_face:"๐Ÿ˜ฟ",crystal_ball:"๐Ÿ”ฎ",cucumber:"๐Ÿฅ’",cupid:"๐Ÿ’˜",curly_loop:"โžฐ",currency_exchange:"๐Ÿ’ฑ",curry:"๐Ÿ›",custard:"๐Ÿฎ",customs:"๐Ÿ›ƒ",cyclone:"๐ŸŒ€",dagger:"๐Ÿ—ก",dancer:"๐Ÿ’ƒ",dancing_women:"๐Ÿ‘ฏ",dancing_men:"๐Ÿ‘ฏ‍โ™‚๏ธ",dango:"๐Ÿก",dark_sunglasses:"๐Ÿ•ถ",dart:"๐ŸŽฏ",dash:"๐Ÿ’จ",date:"๐Ÿ“…",deciduous_tree:"๐ŸŒณ",deer:"๐ŸฆŒ",department_store:"๐Ÿฌ",derelict_house:"๐Ÿš",desert:"๐Ÿœ",desert_island:"๐Ÿ",desktop_computer:"๐Ÿ–ฅ",male_detective:"๐Ÿ•ต๏ธ",diamond_shape_with_a_dot_inside:"๐Ÿ’ ",diamonds:"โ™ฆ๏ธ",disappointed:"๐Ÿ˜ž",disappointed_relieved:"๐Ÿ˜ฅ",dizzy:"๐Ÿ’ซ",dizzy_face:"๐Ÿ˜ต",do_not_litter:"๐Ÿšฏ",dog:"๐Ÿถ",dog2:"๐Ÿ•",dollar:"๐Ÿ’ต",dolls:"๐ŸŽŽ",dolphin:"๐Ÿฌ",door:"๐Ÿšช",doughnut:"๐Ÿฉ",dove:"๐Ÿ•Š",dragon:"๐Ÿ‰",dragon_face:"๐Ÿฒ",dress:"๐Ÿ‘—",dromedary_camel:"๐Ÿช",drooling_face:"๐Ÿคค",droplet:"๐Ÿ’ง",drum:"๐Ÿฅ",duck:"๐Ÿฆ†",dvd:"๐Ÿ“€","e-mail":"๐Ÿ“ง",eagle:"๐Ÿฆ…",ear:"๐Ÿ‘‚",ear_of_rice:"๐ŸŒพ",earth_africa:"๐ŸŒ",earth_americas:"๐ŸŒŽ",earth_asia:"๐ŸŒ",egg:"๐Ÿฅš",eggplant:"๐Ÿ†",eight_pointed_black_star:"โœด๏ธ",eight_spoked_asterisk:"โœณ๏ธ",electric_plug:"๐Ÿ”Œ",elephant:"๐Ÿ˜",email:"โœ‰๏ธ",end:"๐Ÿ”š",envelope_with_arrow:"๐Ÿ“ฉ",euro:"๐Ÿ’ถ",european_castle:"๐Ÿฐ",european_post_office:"๐Ÿค",evergreen_tree:"๐ŸŒฒ",exclamation:"โ—๏ธ",expressionless:"๐Ÿ˜‘",eye:"๐Ÿ‘",eye_speech_bubble:"๐Ÿ‘‍๐Ÿ—จ",eyeglasses:"๐Ÿ‘“",eyes:"๐Ÿ‘€",face_with_head_bandage:"๐Ÿค•",face_with_thermometer:"๐Ÿค’",fist_oncoming:"๐Ÿ‘Š",factory:"๐Ÿญ",fallen_leaf:"๐Ÿ‚",family_man_woman_boy:"๐Ÿ‘ช",family_man_boy:"๐Ÿ‘จ‍๐Ÿ‘ฆ",family_man_boy_boy:"๐Ÿ‘จ‍๐Ÿ‘ฆ‍๐Ÿ‘ฆ",family_man_girl:"๐Ÿ‘จ‍๐Ÿ‘ง",family_man_girl_boy:"๐Ÿ‘จ‍๐Ÿ‘ง‍๐Ÿ‘ฆ",family_man_girl_girl:"๐Ÿ‘จ‍๐Ÿ‘ง‍๐Ÿ‘ง",family_man_man_boy:"๐Ÿ‘จ‍๐Ÿ‘จ‍๐Ÿ‘ฆ",family_man_man_boy_boy:"๐Ÿ‘จ‍๐Ÿ‘จ‍๐Ÿ‘ฆ‍๐Ÿ‘ฆ",family_man_man_girl:"๐Ÿ‘จ‍๐Ÿ‘จ‍๐Ÿ‘ง",family_man_man_girl_boy:"๐Ÿ‘จ‍๐Ÿ‘จ‍๐Ÿ‘ง‍๐Ÿ‘ฆ",family_man_man_girl_girl:"๐Ÿ‘จ‍๐Ÿ‘จ‍๐Ÿ‘ง‍๐Ÿ‘ง",family_man_woman_boy_boy:"๐Ÿ‘จ‍๐Ÿ‘ฉ‍๐Ÿ‘ฆ‍๐Ÿ‘ฆ",family_man_woman_girl:"๐Ÿ‘จ‍๐Ÿ‘ฉ‍๐Ÿ‘ง",family_man_woman_girl_boy:"๐Ÿ‘จ‍๐Ÿ‘ฉ‍๐Ÿ‘ง‍๐Ÿ‘ฆ",family_man_woman_girl_girl:"๐Ÿ‘จ‍๐Ÿ‘ฉ‍๐Ÿ‘ง‍๐Ÿ‘ง",family_woman_boy:"๐Ÿ‘ฉ‍๐Ÿ‘ฆ",family_woman_boy_boy:"๐Ÿ‘ฉ‍๐Ÿ‘ฆ‍๐Ÿ‘ฆ",family_woman_girl:"๐Ÿ‘ฉ‍๐Ÿ‘ง",family_woman_girl_boy:"๐Ÿ‘ฉ‍๐Ÿ‘ง‍๐Ÿ‘ฆ",family_woman_girl_girl:"๐Ÿ‘ฉ‍๐Ÿ‘ง‍๐Ÿ‘ง",family_woman_woman_boy:"๐Ÿ‘ฉ‍๐Ÿ‘ฉ‍๐Ÿ‘ฆ",family_woman_woman_boy_boy:"๐Ÿ‘ฉ‍๐Ÿ‘ฉ‍๐Ÿ‘ฆ‍๐Ÿ‘ฆ",family_woman_woman_girl:"๐Ÿ‘ฉ‍๐Ÿ‘ฉ‍๐Ÿ‘ง",family_woman_woman_girl_boy:"๐Ÿ‘ฉ‍๐Ÿ‘ฉ‍๐Ÿ‘ง‍๐Ÿ‘ฆ",family_woman_woman_girl_girl:"๐Ÿ‘ฉ‍๐Ÿ‘ฉ‍๐Ÿ‘ง‍๐Ÿ‘ง",fast_forward:"โฉ",fax:"๐Ÿ“ ",fearful:"๐Ÿ˜จ",feet:"๐Ÿพ",female_detective:"๐Ÿ•ต๏ธ‍โ™€๏ธ",ferris_wheel:"๐ŸŽก",ferry:"โ›ด",field_hockey:"๐Ÿ‘",file_cabinet:"๐Ÿ—„",file_folder:"๐Ÿ“",film_projector:"๐Ÿ“ฝ",film_strip:"๐ŸŽž",fire:"๐Ÿ”ฅ",fire_engine:"๐Ÿš’",fireworks:"๐ŸŽ†",first_quarter_moon:"๐ŸŒ“",first_quarter_moon_with_face:"๐ŸŒ›",fish:"๐ŸŸ",fish_cake:"๐Ÿฅ",fishing_pole_and_fish:"๐ŸŽฃ",fist_raised:"โœŠ",fist_left:"๐Ÿค›",fist_right:"๐Ÿคœ",flags:"๐ŸŽ",flashlight:"๐Ÿ”ฆ",fleur_de_lis:"โšœ๏ธ",flight_arrival:"๐Ÿ›ฌ",flight_departure:"๐Ÿ›ซ",floppy_disk:"๐Ÿ’พ",flower_playing_cards:"๐ŸŽด",flushed:"๐Ÿ˜ณ",fog:"๐ŸŒซ",foggy:"๐ŸŒ",football:"๐Ÿˆ",footprints:"๐Ÿ‘ฃ",fork_and_knife:"๐Ÿด",fountain:"โ›ฒ๏ธ",fountain_pen:"๐Ÿ–‹",four_leaf_clover:"๐Ÿ€",fox_face:"๐ŸฆŠ",framed_picture:"๐Ÿ–ผ",free:"๐Ÿ†“",fried_egg:"๐Ÿณ",fried_shrimp:"๐Ÿค",fries:"๐ŸŸ",frog:"๐Ÿธ",frowning:"๐Ÿ˜ฆ",frowning_face:"โ˜น๏ธ",frowning_man:"๐Ÿ™‍โ™‚๏ธ",frowning_woman:"๐Ÿ™",middle_finger:"๐Ÿ–•",fuelpump:"โ›ฝ๏ธ",full_moon:"๐ŸŒ•",full_moon_with_face:"๐ŸŒ",funeral_urn:"โšฑ๏ธ",game_die:"๐ŸŽฒ",gear:"โš™๏ธ",gem:"๐Ÿ’Ž",gemini:"โ™Š๏ธ",ghost:"๐Ÿ‘ป",gift:"๐ŸŽ",gift_heart:"๐Ÿ’",girl:"๐Ÿ‘ง",globe_with_meridians:"๐ŸŒ",goal_net:"๐Ÿฅ…",goat:"๐Ÿ",golf:"โ›ณ๏ธ",golfing_man:"๐ŸŒ๏ธ",golfing_woman:"๐ŸŒ๏ธ‍โ™€๏ธ",gorilla:"๐Ÿฆ",grapes:"๐Ÿ‡",green_apple:"๐Ÿ",green_book:"๐Ÿ“—",green_heart:"๐Ÿ’š",green_salad:"๐Ÿฅ—",grey_exclamation:"โ•",grey_question:"โ”",grimacing:"๐Ÿ˜ฌ",grin:"๐Ÿ˜",grinning:"๐Ÿ˜€",guardsman:"๐Ÿ’‚",guardswoman:"๐Ÿ’‚‍โ™€๏ธ",guitar:"๐ŸŽธ",gun:"๐Ÿ”ซ",haircut_woman:"๐Ÿ’‡",haircut_man:"๐Ÿ’‡‍โ™‚๏ธ",hamburger:"๐Ÿ”",hammer:"๐Ÿ”จ",hammer_and_pick:"โš’",hammer_and_wrench:"๐Ÿ› ",hamster:"๐Ÿน",hand:"โœ‹",handbag:"๐Ÿ‘œ",handshake:"๐Ÿค",hankey:"๐Ÿ’ฉ",hatched_chick:"๐Ÿฅ",hatching_chick:"๐Ÿฃ",headphones:"๐ŸŽง",hear_no_evil:"๐Ÿ™‰",heart:"โค๏ธ",heart_decoration:"๐Ÿ’Ÿ",heart_eyes:"๐Ÿ˜",heart_eyes_cat:"๐Ÿ˜ป",heartbeat:"๐Ÿ’“",heartpulse:"๐Ÿ’—",hearts:"โ™ฅ๏ธ",heavy_check_mark:"โœ”๏ธ",heavy_division_sign:"โž—",heavy_dollar_sign:"๐Ÿ’ฒ",heavy_heart_exclamation:"โฃ๏ธ",heavy_minus_sign:"โž–",heavy_multiplication_x:"โœ–๏ธ",heavy_plus_sign:"โž•",helicopter:"๐Ÿš",herb:"๐ŸŒฟ",hibiscus:"๐ŸŒบ",high_brightness:"๐Ÿ”†",high_heel:"๐Ÿ‘ ",hocho:"๐Ÿ”ช",hole:"๐Ÿ•ณ",honey_pot:"๐Ÿฏ",horse:"๐Ÿด",horse_racing:"๐Ÿ‡",hospital:"๐Ÿฅ",hot_pepper:"๐ŸŒถ",hotdog:"๐ŸŒญ",hotel:"๐Ÿจ",hotsprings:"โ™จ๏ธ",hourglass:"โŒ›๏ธ",hourglass_flowing_sand:"โณ",house:"๐Ÿ ",house_with_garden:"๐Ÿก",houses:"๐Ÿ˜",hugs:"๐Ÿค—",hushed:"๐Ÿ˜ฏ",ice_cream:"๐Ÿจ",ice_hockey:"๐Ÿ’",ice_skate:"โ›ธ",icecream:"๐Ÿฆ",id:"๐Ÿ†”",ideograph_advantage:"๐Ÿ‰",imp:"๐Ÿ‘ฟ",inbox_tray:"๐Ÿ“ฅ",incoming_envelope:"๐Ÿ“จ",tipping_hand_woman:"๐Ÿ’",information_source:"โ„น๏ธ",innocent:"๐Ÿ˜‡",interrobang:"โ‰๏ธ",iphone:"๐Ÿ“ฑ",izakaya_lantern:"๐Ÿฎ",jack_o_lantern:"๐ŸŽƒ",japan:"๐Ÿ—พ",japanese_castle:"๐Ÿฏ",japanese_goblin:"๐Ÿ‘บ",japanese_ogre:"๐Ÿ‘น",jeans:"๐Ÿ‘–",joy:"๐Ÿ˜‚",joy_cat:"๐Ÿ˜น",joystick:"๐Ÿ•น",kaaba:"๐Ÿ•‹",key:"๐Ÿ”‘",keyboard:"โŒจ๏ธ",keycap_ten:"๐Ÿ”Ÿ",kick_scooter:"๐Ÿ›ด",kimono:"๐Ÿ‘˜",kiss:"๐Ÿ’‹",kissing:"๐Ÿ˜—",kissing_cat:"๐Ÿ˜ฝ",kissing_closed_eyes:"๐Ÿ˜š",kissing_heart:"๐Ÿ˜˜",kissing_smiling_eyes:"๐Ÿ˜™",kiwi_fruit:"๐Ÿฅ",koala:"๐Ÿจ",koko:"๐Ÿˆ",label:"๐Ÿท",large_blue_circle:"๐Ÿ”ต",large_blue_diamond:"๐Ÿ”ท",large_orange_diamond:"๐Ÿ”ถ",last_quarter_moon:"๐ŸŒ—",last_quarter_moon_with_face:"๐ŸŒœ",latin_cross:"โœ๏ธ",laughing:"๐Ÿ˜†",leaves:"๐Ÿƒ",ledger:"๐Ÿ“’",left_luggage:"๐Ÿ›…",left_right_arrow:"โ†”๏ธ",leftwards_arrow_with_hook:"โ†ฉ๏ธ",lemon:"๐Ÿ‹",leo:"โ™Œ๏ธ",leopard:"๐Ÿ†",level_slider:"๐ŸŽš",libra:"โ™Ž๏ธ",light_rail:"๐Ÿšˆ",link:"๐Ÿ”—",lion:"๐Ÿฆ",lips:"๐Ÿ‘„",lipstick:"๐Ÿ’„",lizard:"๐ŸฆŽ",lock:"๐Ÿ”’",lock_with_ink_pen:"๐Ÿ”",lollipop:"๐Ÿญ",loop:"โžฟ",loud_sound:"๐Ÿ”Š",loudspeaker:"๐Ÿ“ข",love_hotel:"๐Ÿฉ",love_letter:"๐Ÿ’Œ",low_brightness:"๐Ÿ”…",lying_face:"๐Ÿคฅ",m:"โ“‚๏ธ",mag:"๐Ÿ”",mag_right:"๐Ÿ”Ž",mahjong:"๐Ÿ€„๏ธ",mailbox:"๐Ÿ“ซ",mailbox_closed:"๐Ÿ“ช",mailbox_with_mail:"๐Ÿ“ฌ",mailbox_with_no_mail:"๐Ÿ“ญ",man:"๐Ÿ‘จ",man_artist:"๐Ÿ‘จ‍๐ŸŽจ",man_astronaut:"๐Ÿ‘จ‍๐Ÿš€",man_cartwheeling:"๐Ÿคธ‍โ™‚๏ธ",man_cook:"๐Ÿ‘จ‍๐Ÿณ",man_dancing:"๐Ÿ•บ",man_facepalming:"๐Ÿคฆ‍โ™‚๏ธ",man_factory_worker:"๐Ÿ‘จ‍๐Ÿญ",man_farmer:"๐Ÿ‘จ‍๐ŸŒพ",man_firefighter:"๐Ÿ‘จ‍๐Ÿš’",man_health_worker:"๐Ÿ‘จ‍โš•๏ธ",man_in_tuxedo:"๐Ÿคต",man_judge:"๐Ÿ‘จ‍โš–๏ธ",man_juggling:"๐Ÿคน‍โ™‚๏ธ",man_mechanic:"๐Ÿ‘จ‍๐Ÿ”ง",man_office_worker:"๐Ÿ‘จ‍๐Ÿ’ผ",man_pilot:"๐Ÿ‘จ‍โœˆ๏ธ",man_playing_handball:"๐Ÿคพ‍โ™‚๏ธ",man_playing_water_polo:"๐Ÿคฝ‍โ™‚๏ธ",man_scientist:"๐Ÿ‘จ‍๐Ÿ”ฌ",man_shrugging:"๐Ÿคท‍โ™‚๏ธ",man_singer:"๐Ÿ‘จ‍๐ŸŽค",man_student:"๐Ÿ‘จ‍๐ŸŽ“",man_teacher:"๐Ÿ‘จ‍๐Ÿซ",man_technologist:"๐Ÿ‘จ‍๐Ÿ’ป",man_with_gua_pi_mao:"๐Ÿ‘ฒ",man_with_turban:"๐Ÿ‘ณ",tangerine:"๐ŸŠ",mans_shoe:"๐Ÿ‘ž",mantelpiece_clock:"๐Ÿ•ฐ",maple_leaf:"๐Ÿ",martial_arts_uniform:"๐Ÿฅ‹",mask:"๐Ÿ˜ท",massage_woman:"๐Ÿ’†",massage_man:"๐Ÿ’†‍โ™‚๏ธ",meat_on_bone:"๐Ÿ–",medal_military:"๐ŸŽ–",medal_sports:"๐Ÿ…",mega:"๐Ÿ“ฃ",melon:"๐Ÿˆ",memo:"๐Ÿ“",men_wrestling:"๐Ÿคผ‍โ™‚๏ธ",menorah:"๐Ÿ•Ž",mens:"๐Ÿšน",metal:"๐Ÿค˜",metro:"๐Ÿš‡",microphone:"๐ŸŽค",microscope:"๐Ÿ”ฌ",milk_glass:"๐Ÿฅ›",milky_way:"๐ŸŒŒ",minibus:"๐Ÿš",minidisc:"๐Ÿ’ฝ",mobile_phone_off:"๐Ÿ“ด",money_mouth_face:"๐Ÿค‘",money_with_wings:"๐Ÿ’ธ",moneybag:"๐Ÿ’ฐ",monkey:"๐Ÿ’",monkey_face:"๐Ÿต",monorail:"๐Ÿš",moon:"๐ŸŒ”",mortar_board:"๐ŸŽ“",mosque:"๐Ÿ•Œ",motor_boat:"๐Ÿ›ฅ",motor_scooter:"๐Ÿ›ต",motorcycle:"๐Ÿ",motorway:"๐Ÿ›ฃ",mount_fuji:"๐Ÿ—ป",mountain:"โ›ฐ",mountain_biking_man:"๐Ÿšต",mountain_biking_woman:"๐Ÿšต‍โ™€๏ธ",mountain_cableway:"๐Ÿš ",mountain_railway:"๐Ÿšž",mountain_snow:"๐Ÿ”",mouse:"๐Ÿญ",mouse2:"๐Ÿ",movie_camera:"๐ŸŽฅ",moyai:"๐Ÿ—ฟ",mrs_claus:"๐Ÿคถ",muscle:"๐Ÿ’ช",mushroom:"๐Ÿ„",musical_keyboard:"๐ŸŽน",musical_note:"๐ŸŽต",musical_score:"๐ŸŽผ",mute:"๐Ÿ”‡",nail_care:"๐Ÿ’…",name_badge:"๐Ÿ“›",national_park:"๐Ÿž",nauseated_face:"๐Ÿคข",necktie:"๐Ÿ‘”",negative_squared_cross_mark:"โŽ",nerd_face:"๐Ÿค“",neutral_face:"๐Ÿ˜",new:"๐Ÿ†•",new_moon:"๐ŸŒ‘",new_moon_with_face:"๐ŸŒš",newspaper:"๐Ÿ“ฐ",newspaper_roll:"๐Ÿ—ž",next_track_button:"โญ",ng:"๐Ÿ†–",no_good_man:"๐Ÿ™…‍โ™‚๏ธ",no_good_woman:"๐Ÿ™…",night_with_stars:"๐ŸŒƒ",no_bell:"๐Ÿ”•",no_bicycles:"๐Ÿšณ",no_entry:"โ›”๏ธ",no_entry_sign:"๐Ÿšซ",no_mobile_phones:"๐Ÿ“ต",no_mouth:"๐Ÿ˜ถ",no_pedestrians:"๐Ÿšท",no_smoking:"๐Ÿšญ","non-potable_water":"๐Ÿšฑ",nose:"๐Ÿ‘ƒ",notebook:"๐Ÿ““",notebook_with_decorative_cover:"๐Ÿ“”",notes:"๐ŸŽถ",nut_and_bolt:"๐Ÿ”ฉ",o:"โญ•๏ธ",o2:"๐Ÿ…พ๏ธ",ocean:"๐ŸŒŠ",octopus:"๐Ÿ™",oden:"๐Ÿข",office:"๐Ÿข",oil_drum:"๐Ÿ›ข",ok:"๐Ÿ†—",ok_hand:"๐Ÿ‘Œ",ok_man:"๐Ÿ™†‍โ™‚๏ธ",ok_woman:"๐Ÿ™†",old_key:"๐Ÿ—",older_man:"๐Ÿ‘ด",older_woman:"๐Ÿ‘ต",om:"๐Ÿ•‰",on:"๐Ÿ”›",oncoming_automobile:"๐Ÿš˜",oncoming_bus:"๐Ÿš",oncoming_police_car:"๐Ÿš”",oncoming_taxi:"๐Ÿš–",open_file_folder:"๐Ÿ“‚",open_hands:"๐Ÿ‘",open_mouth:"๐Ÿ˜ฎ",open_umbrella:"โ˜‚๏ธ",ophiuchus:"โ›Ž",orange_book:"๐Ÿ“™",orthodox_cross:"โ˜ฆ๏ธ",outbox_tray:"๐Ÿ“ค",owl:"๐Ÿฆ‰",ox:"๐Ÿ‚",package:"๐Ÿ“ฆ",page_facing_up:"๐Ÿ“„",page_with_curl:"๐Ÿ“ƒ",pager:"๐Ÿ“Ÿ",paintbrush:"๐Ÿ–Œ",palm_tree:"๐ŸŒด",pancakes:"๐Ÿฅž",panda_face:"๐Ÿผ",paperclip:"๐Ÿ“Ž",paperclips:"๐Ÿ–‡",parasol_on_ground:"โ›ฑ",parking:"๐Ÿ…ฟ๏ธ",part_alternation_mark:"ใ€ฝ๏ธ",partly_sunny:"โ›…๏ธ",passenger_ship:"๐Ÿ›ณ",passport_control:"๐Ÿ›‚",pause_button:"โธ",peace_symbol:"โ˜ฎ๏ธ",peach:"๐Ÿ‘",peanuts:"๐Ÿฅœ",pear:"๐Ÿ",pen:"๐Ÿ–Š",pencil2:"โœ๏ธ",penguin:"๐Ÿง",pensive:"๐Ÿ˜”",performing_arts:"๐ŸŽญ",persevere:"๐Ÿ˜ฃ",person_fencing:"๐Ÿคบ",pouting_woman:"๐Ÿ™Ž",phone:"โ˜Ž๏ธ",pick:"โ›",pig:"๐Ÿท",pig2:"๐Ÿ–",pig_nose:"๐Ÿฝ",pill:"๐Ÿ’Š",pineapple:"๐Ÿ",ping_pong:"๐Ÿ“",pisces:"โ™“๏ธ",pizza:"๐Ÿ•",place_of_worship:"๐Ÿ›",plate_with_cutlery:"๐Ÿฝ",play_or_pause_button:"โฏ",point_down:"๐Ÿ‘‡",point_left:"๐Ÿ‘ˆ",point_right:"๐Ÿ‘‰",point_up:"โ˜๏ธ",point_up_2:"๐Ÿ‘†",police_car:"๐Ÿš“",policewoman:"๐Ÿ‘ฎ‍โ™€๏ธ",poodle:"๐Ÿฉ",popcorn:"๐Ÿฟ",post_office:"๐Ÿฃ",postal_horn:"๐Ÿ“ฏ",postbox:"๐Ÿ“ฎ",potable_water:"๐Ÿšฐ",potato:"๐Ÿฅ”",pouch:"๐Ÿ‘",poultry_leg:"๐Ÿ—",pound:"๐Ÿ’ท",rage:"๐Ÿ˜ก",pouting_cat:"๐Ÿ˜พ",pouting_man:"๐Ÿ™Ž‍โ™‚๏ธ",pray:"๐Ÿ™",prayer_beads:"๐Ÿ“ฟ",pregnant_woman:"๐Ÿคฐ",previous_track_button:"โฎ",prince:"๐Ÿคด",princess:"๐Ÿ‘ธ",printer:"๐Ÿ–จ",purple_heart:"๐Ÿ’œ",purse:"๐Ÿ‘›",pushpin:"๐Ÿ“Œ",put_litter_in_its_place:"๐Ÿšฎ",question:"โ“",rabbit:"๐Ÿฐ",rabbit2:"๐Ÿ‡",racehorse:"๐ŸŽ",racing_car:"๐ŸŽ",radio:"๐Ÿ“ป",radio_button:"๐Ÿ”˜",radioactive:"โ˜ข๏ธ",railway_car:"๐Ÿšƒ",railway_track:"๐Ÿ›ค",rainbow:"๐ŸŒˆ",rainbow_flag:"๐Ÿณ๏ธ‍๐ŸŒˆ",raised_back_of_hand:"๐Ÿคš",raised_hand_with_fingers_splayed:"๐Ÿ–",raised_hands:"๐Ÿ™Œ",raising_hand_woman:"๐Ÿ™‹",raising_hand_man:"๐Ÿ™‹‍โ™‚๏ธ",ram:"๐Ÿ",ramen:"๐Ÿœ",rat:"๐Ÿ€",record_button:"โบ",recycle:"โ™ป๏ธ",red_circle:"๐Ÿ”ด",registered:"ยฎ๏ธ",relaxed:"โ˜บ๏ธ",relieved:"๐Ÿ˜Œ",reminder_ribbon:"๐ŸŽ—",repeat:"๐Ÿ”",repeat_one:"๐Ÿ”‚",rescue_worker_helmet:"โ›‘",restroom:"๐Ÿšป",revolving_hearts:"๐Ÿ’ž",rewind:"โช",rhinoceros:"๐Ÿฆ",ribbon:"๐ŸŽ€",rice:"๐Ÿš",rice_ball:"๐Ÿ™",rice_cracker:"๐Ÿ˜",rice_scene:"๐ŸŽ‘",right_anger_bubble:"๐Ÿ—ฏ",ring:"๐Ÿ’",robot:"๐Ÿค–",rocket:"๐Ÿš€",rofl:"๐Ÿคฃ",roll_eyes:"๐Ÿ™„",roller_coaster:"๐ŸŽข",rooster:"๐Ÿ“",rose:"๐ŸŒน",rosette:"๐Ÿต",rotating_light:"๐Ÿšจ",round_pushpin:"๐Ÿ“",rowing_man:"๐Ÿšฃ",rowing_woman:"๐Ÿšฃ‍โ™€๏ธ",rugby_football:"๐Ÿ‰",running_man:"๐Ÿƒ",running_shirt_with_sash:"๐ŸŽฝ",running_woman:"๐Ÿƒ‍โ™€๏ธ",sa:"๐Ÿˆ‚๏ธ",sagittarius:"โ™๏ธ",sake:"๐Ÿถ",sandal:"๐Ÿ‘ก",santa:"๐ŸŽ…",satellite:"๐Ÿ“ก",saxophone:"๐ŸŽท",school:"๐Ÿซ",school_satchel:"๐ŸŽ’",scissors:"โœ‚๏ธ",scorpion:"๐Ÿฆ‚",scorpius:"โ™๏ธ",scream:"๐Ÿ˜ฑ",scream_cat:"๐Ÿ™€",scroll:"๐Ÿ“œ",seat:"๐Ÿ’บ",secret:"ใŠ™๏ธ",see_no_evil:"๐Ÿ™ˆ",seedling:"๐ŸŒฑ",selfie:"๐Ÿคณ",shallow_pan_of_food:"๐Ÿฅ˜",shamrock:"โ˜˜๏ธ",shark:"๐Ÿฆˆ",shaved_ice:"๐Ÿง",sheep:"๐Ÿ‘",shell:"๐Ÿš",shield:"๐Ÿ›ก",shinto_shrine:"โ›ฉ",ship:"๐Ÿšข",shirt:"๐Ÿ‘•",shopping:"๐Ÿ›",shopping_cart:"๐Ÿ›’",shower:"๐Ÿšฟ",shrimp:"๐Ÿฆ",signal_strength:"๐Ÿ“ถ",six_pointed_star:"๐Ÿ”ฏ",ski:"๐ŸŽฟ",skier:"โ›ท",skull:"๐Ÿ’€",skull_and_crossbones:"โ˜ ๏ธ",sleeping:"๐Ÿ˜ด",sleeping_bed:"๐Ÿ›Œ",sleepy:"๐Ÿ˜ช",slightly_frowning_face:"๐Ÿ™",slightly_smiling_face:"๐Ÿ™‚",slot_machine:"๐ŸŽฐ",small_airplane:"๐Ÿ›ฉ",small_blue_diamond:"๐Ÿ”น",small_orange_diamond:"๐Ÿ”ธ",small_red_triangle:"๐Ÿ”บ",small_red_triangle_down:"๐Ÿ”ป",smile:"๐Ÿ˜„",smile_cat:"๐Ÿ˜ธ",smiley:"๐Ÿ˜ƒ",smiley_cat:"๐Ÿ˜บ",smiling_imp:"๐Ÿ˜ˆ",smirk:"๐Ÿ˜",smirk_cat:"๐Ÿ˜ผ",smoking:"๐Ÿšฌ",snail:"๐ŸŒ",snake:"๐Ÿ",sneezing_face:"๐Ÿคง",snowboarder:"๐Ÿ‚",snowflake:"โ„๏ธ",snowman:"โ›„๏ธ",snowman_with_snow:"โ˜ƒ๏ธ",sob:"๐Ÿ˜ญ",soccer:"โšฝ๏ธ",soon:"๐Ÿ”œ",sos:"๐Ÿ†˜",sound:"๐Ÿ”‰",space_invader:"๐Ÿ‘พ",spades:"โ™ ๏ธ",spaghetti:"๐Ÿ",sparkle:"โ‡๏ธ",sparkler:"๐ŸŽ‡",sparkles:"โœจ",sparkling_heart:"๐Ÿ’–",speak_no_evil:"๐Ÿ™Š",speaker:"๐Ÿ”ˆ",speaking_head:"๐Ÿ—ฃ",speech_balloon:"๐Ÿ’ฌ",speedboat:"๐Ÿšค",spider:"๐Ÿ•ท",spider_web:"๐Ÿ•ธ",spiral_calendar:"๐Ÿ—“",spiral_notepad:"๐Ÿ—’",spoon:"๐Ÿฅ„",squid:"๐Ÿฆ‘",stadium:"๐ŸŸ",star:"โญ๏ธ",star2:"๐ŸŒŸ",star_and_crescent:"โ˜ช๏ธ",star_of_david:"โœก๏ธ",stars:"๐ŸŒ ",station:"๐Ÿš‰",statue_of_liberty:"๐Ÿ—ฝ",steam_locomotive:"๐Ÿš‚",stew:"๐Ÿฒ",stop_button:"โน",stop_sign:"๐Ÿ›‘",stopwatch:"โฑ",straight_ruler:"๐Ÿ“",strawberry:"๐Ÿ“",stuck_out_tongue:"๐Ÿ˜›",stuck_out_tongue_closed_eyes:"๐Ÿ˜",stuck_out_tongue_winking_eye:"๐Ÿ˜œ",studio_microphone:"๐ŸŽ™",stuffed_flatbread:"๐Ÿฅ™",sun_behind_large_cloud:"๐ŸŒฅ",sun_behind_rain_cloud:"๐ŸŒฆ",sun_behind_small_cloud:"๐ŸŒค",sun_with_face:"๐ŸŒž",sunflower:"๐ŸŒป",sunglasses:"๐Ÿ˜Ž",sunny:"โ˜€๏ธ",sunrise:"๐ŸŒ…",sunrise_over_mountains:"๐ŸŒ„",surfing_man:"๐Ÿ„",surfing_woman:"๐Ÿ„‍โ™€๏ธ",sushi:"๐Ÿฃ",suspension_railway:"๐ŸšŸ",sweat:"๐Ÿ˜“",sweat_drops:"๐Ÿ’ฆ",sweat_smile:"๐Ÿ˜…",sweet_potato:"๐Ÿ ",swimming_man:"๐ŸŠ",swimming_woman:"๐ŸŠ‍โ™€๏ธ",symbols:"๐Ÿ”ฃ",synagogue:"๐Ÿ•",syringe:"๐Ÿ’‰",taco:"๐ŸŒฎ",tada:"๐ŸŽ‰",tanabata_tree:"๐ŸŽ‹",taurus:"โ™‰๏ธ",taxi:"๐Ÿš•",tea:"๐Ÿต",telephone_receiver:"๐Ÿ“ž",telescope:"๐Ÿ”ญ",tennis:"๐ŸŽพ",tent:"โ›บ๏ธ",thermometer:"๐ŸŒก",thinking:"๐Ÿค”",thought_balloon:"๐Ÿ’ญ",ticket:"๐ŸŽซ",tickets:"๐ŸŽŸ",tiger:"๐Ÿฏ",tiger2:"๐Ÿ…",timer_clock:"โฒ",tipping_hand_man:"๐Ÿ’‍โ™‚๏ธ",tired_face:"๐Ÿ˜ซ",tm:"โ„ข๏ธ",toilet:"๐Ÿšฝ",tokyo_tower:"๐Ÿ—ผ",tomato:"๐Ÿ…",tongue:"๐Ÿ‘…",top:"๐Ÿ”",tophat:"๐ŸŽฉ",tornado:"๐ŸŒช",trackball:"๐Ÿ–ฒ",tractor:"๐Ÿšœ",traffic_light:"๐Ÿšฅ",train:"๐Ÿš‹",train2:"๐Ÿš†",tram:"๐ŸšŠ",triangular_flag_on_post:"๐Ÿšฉ",triangular_ruler:"๐Ÿ“",trident:"๐Ÿ”ฑ",triumph:"๐Ÿ˜ค",trolleybus:"๐ŸšŽ",trophy:"๐Ÿ†",tropical_drink:"๐Ÿน",tropical_fish:"๐Ÿ ",truck:"๐Ÿšš",trumpet:"๐ŸŽบ",tulip:"๐ŸŒท",tumbler_glass:"๐Ÿฅƒ",turkey:"๐Ÿฆƒ",turtle:"๐Ÿข",tv:"๐Ÿ“บ",twisted_rightwards_arrows:"๐Ÿ”€",two_hearts:"๐Ÿ’•",two_men_holding_hands:"๐Ÿ‘ฌ",two_women_holding_hands:"๐Ÿ‘ญ",u5272:"๐Ÿˆน",u5408:"๐Ÿˆด",u55b6:"๐Ÿˆบ",u6307:"๐Ÿˆฏ๏ธ",u6708:"๐Ÿˆท๏ธ",u6709:"๐Ÿˆถ",u6e80:"๐Ÿˆต",u7121:"๐Ÿˆš๏ธ",u7533:"๐Ÿˆธ",u7981:"๐Ÿˆฒ",u7a7a:"๐Ÿˆณ",umbrella:"โ˜”๏ธ",unamused:"๐Ÿ˜’",underage:"๐Ÿ”ž",unicorn:"๐Ÿฆ„",unlock:"๐Ÿ”“",up:"๐Ÿ†™",upside_down_face:"๐Ÿ™ƒ",v:"โœŒ๏ธ",vertical_traffic_light:"๐Ÿšฆ",vhs:"๐Ÿ“ผ",vibration_mode:"๐Ÿ“ณ",video_camera:"๐Ÿ“น",video_game:"๐ŸŽฎ",violin:"๐ŸŽป",virgo:"โ™๏ธ",volcano:"๐ŸŒ‹",volleyball:"๐Ÿ",vs:"๐Ÿ†š",vulcan_salute:"๐Ÿ––",walking_man:"๐Ÿšถ",walking_woman:"๐Ÿšถ‍โ™€๏ธ",waning_crescent_moon:"๐ŸŒ˜",waning_gibbous_moon:"๐ŸŒ–",warning:"โš ๏ธ",wastebasket:"๐Ÿ—‘",watch:"โŒš๏ธ",water_buffalo:"๐Ÿƒ",watermelon:"๐Ÿ‰",wave:"๐Ÿ‘‹",wavy_dash:"ใ€ฐ๏ธ",waxing_crescent_moon:"๐ŸŒ’",wc:"๐Ÿšพ",weary:"๐Ÿ˜ฉ",wedding:"๐Ÿ’’",weight_lifting_man:"๐Ÿ‹๏ธ",weight_lifting_woman:"๐Ÿ‹๏ธ‍โ™€๏ธ",whale:"๐Ÿณ",whale2:"๐Ÿ‹",wheel_of_dharma:"โ˜ธ๏ธ",wheelchair:"โ™ฟ๏ธ",white_check_mark:"โœ…",white_circle:"โšช๏ธ",white_flag:"๐Ÿณ๏ธ",white_flower:"๐Ÿ’ฎ",white_large_square:"โฌœ๏ธ",white_medium_small_square:"โ—ฝ๏ธ",white_medium_square:"โ—ป๏ธ",white_small_square:"โ–ซ๏ธ",white_square_button:"๐Ÿ”ณ",wilted_flower:"๐Ÿฅ€",wind_chime:"๐ŸŽ",wind_face:"๐ŸŒฌ",wine_glass:"๐Ÿท",wink:"๐Ÿ˜‰",wolf:"๐Ÿบ",woman:"๐Ÿ‘ฉ",woman_artist:"๐Ÿ‘ฉ‍๐ŸŽจ",woman_astronaut:"๐Ÿ‘ฉ‍๐Ÿš€",woman_cartwheeling:"๐Ÿคธ‍โ™€๏ธ",woman_cook:"๐Ÿ‘ฉ‍๐Ÿณ",woman_facepalming:"๐Ÿคฆ‍โ™€๏ธ",woman_factory_worker:"๐Ÿ‘ฉ‍๐Ÿญ",woman_farmer:"๐Ÿ‘ฉ‍๐ŸŒพ",woman_firefighter:"๐Ÿ‘ฉ‍๐Ÿš’",woman_health_worker:"๐Ÿ‘ฉ‍โš•๏ธ",woman_judge:"๐Ÿ‘ฉ‍โš–๏ธ",woman_juggling:"๐Ÿคน‍โ™€๏ธ",woman_mechanic:"๐Ÿ‘ฉ‍๐Ÿ”ง",woman_office_worker:"๐Ÿ‘ฉ‍๐Ÿ’ผ",woman_pilot:"๐Ÿ‘ฉ‍โœˆ๏ธ",woman_playing_handball:"๐Ÿคพ‍โ™€๏ธ",woman_playing_water_polo:"๐Ÿคฝ‍โ™€๏ธ",woman_scientist:"๐Ÿ‘ฉ‍๐Ÿ”ฌ",woman_shrugging:"๐Ÿคท‍โ™€๏ธ",woman_singer:"๐Ÿ‘ฉ‍๐ŸŽค",woman_student:"๐Ÿ‘ฉ‍๐ŸŽ“",woman_teacher:"๐Ÿ‘ฉ‍๐Ÿซ",woman_technologist:"๐Ÿ‘ฉ‍๐Ÿ’ป",woman_with_turban:"๐Ÿ‘ณ‍โ™€๏ธ",womans_clothes:"๐Ÿ‘š",womans_hat:"๐Ÿ‘’",women_wrestling:"๐Ÿคผ‍โ™€๏ธ",womens:"๐Ÿšบ",world_map:"๐Ÿ—บ",worried:"๐Ÿ˜Ÿ",wrench:"๐Ÿ”ง",writing_hand:"โœ๏ธ",x:"โŒ",yellow_heart:"๐Ÿ’›",yen:"๐Ÿ’ด",yin_yang:"โ˜ฏ๏ธ",yum:"๐Ÿ˜‹",zap:"โšก๏ธ",zipper_mouth_face:"๐Ÿค",zzz:"๐Ÿ’ค",octocat:':octocat:',showdown:"S"},x.Converter=function(e){"use strict";var r,t,n={},i=[],l=[],o={},a=h,s={parsed:{},raw:"",format:""};for(r in e=e||{},p)p.hasOwnProperty(r)&&(n[r]=p[r]);if("object"!=typeof e)throw Error("Converter expects the passed parameter to be an object, but "+typeof e+" was passed instead.");for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);function c(e,r){if(r=r||null,x.helper.isString(e)){if(r=e=x.helper.stdExtName(e),x.extensions[e]){console.warn("DEPRECATION WARNING: "+e+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!");var t=x.extensions[e],a=e;if("function"==typeof t&&(t=t(new x.Converter)),x.helper.isArray(t)||(t=[t]),!(a=g(t,a)).valid)throw Error(a.error);for(var n=0;n[ \t]+ยจNBSP;<"),!r){if(!window||!window.document)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");r=window.document}for(var r=r.createElement("div"),t=(r.innerHTML=e,{preList:function(e){for(var r=e.querySelectorAll("pre"),t=[],a=0;a'}else t.push(r[a].innerHTML),r[a].innerHTML="",r[a].setAttribute("prenum",a.toString());return t}(r)}),a=(!function e(r){for(var t=0;t? ?(['"].*['"])?\)$/m))a="";else if(!a){if(a="#"+(t=t||r.toLowerCase().replace(/ ?\n/g," ")),x.helper.isUndefined(l.gUrls[t]))return e;a=l.gUrls[t],x.helper.isUndefined(l.gTitles[t])||(o=l.gTitles[t])}return e='"}return e=(e=(e=(e=(e=l.converter._dispatch("anchors.before",e,i,l)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,r)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,r)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]??(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,r)).replace(/\[([^\[\]]+)]()()()()()/g,r),i.ghMentions&&(e=e.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gim,function(e,r,t,a,n){if("\\"===t)return r+a;if(!x.helper.isString(i.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");t="";return r+'"+a+""})),e=l.converter._dispatch("anchors.after",e,i,l)});var i=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,l=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,c=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,m=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gim,f=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi;x.subParser("autoLinks",function(e,r,t){"use strict";return e=(e=(e=t.converter._dispatch("autoLinks.before",e,r,t)).replace(c,s(r))).replace(f,o(r,t)),e=t.converter._dispatch("autoLinks.after",e,r,t)}),x.subParser("simplifiedAutoLinks",function(e,r,t){"use strict";return r.simplifiedAutoLink?(e=t.converter._dispatch("simplifiedAutoLinks.before",e,r,t),e=(e=r.excludeTrailingPunctuationFromURLs?e.replace(l,s(r)):e.replace(i,s(r))).replace(m,o(r,t)),t.converter._dispatch("simplifiedAutoLinks.after",e,r,t)):e}),x.subParser("blockGamut",function(e,r,t){"use strict";return e=t.converter._dispatch("blockGamut.before",e,r,t),e=x.subParser("blockQuotes")(e,r,t),e=x.subParser("headers")(e,r,t),e=x.subParser("horizontalRule")(e,r,t),e=x.subParser("lists")(e,r,t),e=x.subParser("codeBlocks")(e,r,t),e=x.subParser("tables")(e,r,t),e=x.subParser("hashHTMLBlocks")(e,r,t),e=x.subParser("paragraphs")(e,r,t),e=t.converter._dispatch("blockGamut.after",e,r,t)}),x.subParser("blockQuotes",function(e,r,t){"use strict";e=t.converter._dispatch("blockQuotes.before",e,r,t);var a=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return r.splitAdjacentBlockquotes&&(a=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),e=(e+="\n\n").replace(a,function(e){return e=(e=(e=e.replace(/^[ \t]*>[ \t]?/gm,"")).replace(/ยจ0/g,"")).replace(/^[ \t]+$/gm,""),e=x.subParser("githubCodeBlocks")(e,r,t),e=(e=(e=x.subParser("blockGamut")(e,r,t)).replace(/(^|\n)/g,"$1 ")).replace(/(\s*
[^\r]+?<\/pre>)/gm,function(e,r){return r.replace(/^  /gm,"ยจ0").replace(/ยจ0/g,"")}),x.subParser("hashBlock")("
\n"+e+"\n
",r,t)}),e=t.converter._dispatch("blockQuotes.after",e,r,t)}),x.subParser("codeBlocks",function(e,n,s){"use strict";e=s.converter._dispatch("codeBlocks.before",e,n,s);return e=(e=(e+="ยจ0").replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=ยจ0))/g,function(e,r,t){var a="\n",r=x.subParser("outdent")(r,n,s);return r=x.subParser("encodeCode")(r,n,s),r="
"+(r=(r=(r=x.subParser("detab")(r,n,s)).replace(/^\n+/g,"")).replace(/\n+$/g,""))+(a=n.omitExtraWLInCodeBlocks?"":a)+"
",x.subParser("hashBlock")(r,n,s)+t})).replace(/ยจ0/,""),e=s.converter._dispatch("codeBlocks.after",e,n,s)}),x.subParser("codeSpans",function(e,n,s){"use strict";return e=(e=void 0===(e=s.converter._dispatch("codeSpans.before",e,n,s))?"":e).replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(e,r,t,a){return a=(a=a.replace(/^([ \t]*)/g,"")).replace(/[ \t]*$/g,""),a=r+""+(a=x.subParser("encodeCode")(a,n,s))+"",a=x.subParser("hashHTMLSpans")(a,n,s)}),e=s.converter._dispatch("codeSpans.after",e,n,s)}),x.subParser("completeHTMLDocument",function(e,r,t){"use strict";if(!r.completeHTMLDocument)return e;e=t.converter._dispatch("completeHTMLDocument.before",e,r,t);var a,n="html",s="\n",o="",i='\n',l="",c="";for(a in void 0!==t.metadata.parsed.doctype&&(s="\n","html"!==(n=t.metadata.parsed.doctype.toString().toLowerCase())&&"html5"!==n||(i='')),t.metadata.parsed)if(t.metadata.parsed.hasOwnProperty(a))switch(a.toLowerCase()){case"doctype":break;case"title":o=""+t.metadata.parsed.title+"\n";break;case"charset":i="html"===n||"html5"===n?'\n':'\n';break;case"language":case"lang":l=' lang="'+t.metadata.parsed[a]+'"',c+='\n';break;default:c+='\n'}return e=s+"\n\n"+o+i+c+"\n\n"+e.trim()+"\n\n",e=t.converter._dispatch("completeHTMLDocument.after",e,r,t)}),x.subParser("detab",function(e,r,t){"use strict";return e=(e=(e=(e=(e=(e=t.converter._dispatch("detab.before",e,r,t)).replace(/\t(?=\t)/g," ")).replace(/\t/g,"ยจAยจB")).replace(/ยจB(.+?)ยจA/g,function(e,r){for(var t=r,a=4-t.length%4,n=0;n/g,">"),e=t.converter._dispatch("encodeAmpsAndAngles.after",e,r,t)}),x.subParser("encodeBackslashEscapes",function(e,r,t){"use strict";return e=(e=(e=t.converter._dispatch("encodeBackslashEscapes.before",e,r,t)).replace(/\\(\\)/g,x.helper.escapeCharactersCallback)).replace(/\\([`*_{}\[\]()>#+.!~=|:-])/g,x.helper.escapeCharactersCallback),e=t.converter._dispatch("encodeBackslashEscapes.after",e,r,t)}),x.subParser("encodeCode",function(e,r,t){"use strict";return e=(e=t.converter._dispatch("encodeCode.before",e,r,t)).replace(/&/g,"&").replace(//g,">").replace(/([*_{}\[\]\\=~-])/g,x.helper.escapeCharactersCallback),e=t.converter._dispatch("encodeCode.after",e,r,t)}),x.subParser("escapeSpecialCharsWithinTagAttributes",function(e,r,t){"use strict";return e=(e=(e=t.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",e,r,t)).replace(/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,function(e){return e.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,x.helper.escapeCharactersCallback)})).replace(/-]|-[^>])(?:[^-]|-[^-])*)--)>/gi,function(e){return e.replace(/([\\`*_~=|])/g,x.helper.escapeCharactersCallback)}),e=t.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",e,r,t)}),x.subParser("githubCodeBlocks",function(e,s,o){"use strict";return s.ghCodeBlocks?(e=o.converter._dispatch("githubCodeBlocks.before",e,s,o),e=(e=(e+="ยจ0").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(e,r,t,a){var n=s.omitExtraWLInCodeBlocks?"":"\n";return a=x.subParser("encodeCode")(a,s,o),a="
"+(a=(a=(a=x.subParser("detab")(a,s,o)).replace(/^\n+/g,"")).replace(/\n+$/g,""))+n+"
",a=x.subParser("hashBlock")(a,s,o),"\n\nยจG"+(o.ghCodeBlocks.push({text:e,codeblock:a})-1)+"G\n\n"})).replace(/ยจ0/,""),o.converter._dispatch("githubCodeBlocks.after",e,s,o)):e}),x.subParser("hashBlock",function(e,r,t){"use strict";return e=(e=t.converter._dispatch("hashBlock.before",e,r,t)).replace(/(^\n+|\n+$)/g,""),e="\n\nยจK"+(t.gHtmlBlocks.push(e)-1)+"K\n\n",e=t.converter._dispatch("hashBlock.after",e,r,t)}),x.subParser("hashCodeTags",function(e,n,s){"use strict";e=s.converter._dispatch("hashCodeTags.before",e,n,s);return e=x.helper.replaceRecursiveRegExp(e,function(e,r,t,a){t=t+x.subParser("encodeCode")(r,n,s)+a;return"ยจC"+(s.gHtmlSpans.push(t)-1)+"C"},"]*>","","gim"),e=s.converter._dispatch("hashCodeTags.after",e,n,s)}),x.subParser("hashElement",function(e,r,t){"use strict";return function(e,r){return r=(r=(r=r.replace(/\n\n/g,"\n")).replace(/^\n/,"")).replace(/\n+$/g,""),r="\n\nยจK"+(t.gHtmlBlocks.push(r)-1)+"K\n\n"}}),x.subParser("hashHTMLBlocks",function(e,r,n){"use strict";e=n.converter._dispatch("hashHTMLBlocks.before",e,r,n);function t(e,r,t,a){return-1!==t.search(/\bmarkdown\b/)&&(e=t+n.converter.makeHtml(r)+a),"\n\nยจK"+(n.gHtmlBlocks.push(e)-1)+"K\n\n"}var a=["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"];r.backslashEscapesHTMLTags&&(e=e.replace(/\\<(\/?[^>]+?)>/g,function(e,r){return"<"+r+">"}));for(var s=0;s]*>)","im"),i="<"+a[s]+"\\b[^>]*>",l="";-1!==(c=x.helper.regexIndexOf(e,o));){var c=x.helper.splitAtIndex(e,c),u=x.helper.replaceRecursiveRegExp(c[1],t,i,l,"im");if(u===c[1])break;e=c[0].concat(u)}return e=e.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,x.subParser("hashElement")(e,r,n)),e=(e=x.helper.replaceRecursiveRegExp(e,function(e){return"\n\nยจK"+(n.gHtmlBlocks.push(e)-1)+"K\n\n"},"^ {0,3}\x3c!--","--\x3e","gm")).replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,x.subParser("hashElement")(e,r,n)),e=n.converter._dispatch("hashHTMLBlocks.after",e,r,n)}),x.subParser("hashHTMLSpans",function(e,r,t){"use strict";function a(e){return"ยจC"+(t.gHtmlSpans.push(e)-1)+"C"}return e=(e=(e=(e=(e=t.converter._dispatch("hashHTMLSpans.before",e,r,t)).replace(/<[^>]+?\/>/gi,a)).replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,a)).replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,a)).replace(/<[^>]+?>/gi,a),e=t.converter._dispatch("hashHTMLSpans.after",e,r,t)}),x.subParser("unhashHTMLSpans",function(e,r,t){"use strict";e=t.converter._dispatch("unhashHTMLSpans.before",e,r,t);for(var a=0;a]*>\\s*]*>","^ {0,3}\\s*
","gim"),e=s.converter._dispatch("hashPreCodeTags.after",e,n,s)}),x.subParser("headers",function(e,n,s){"use strict";e=s.converter._dispatch("headers.before",e,n,s);var o=isNaN(parseInt(n.headerLevelStart))?1:parseInt(n.headerLevelStart),r=n.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,t=n.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm,r=(e=(e=e.replace(r,function(e,r){var t=x.subParser("spanGamut")(r,n,s),r=n.noHeaderId?"":' id="'+i(r)+'"',r=""+t+"";return x.subParser("hashBlock")(r,n,s)})).replace(t,function(e,r){var t=x.subParser("spanGamut")(r,n,s),r=n.noHeaderId?"":' id="'+i(r)+'"',a=o+1,r=""+t+"";return x.subParser("hashBlock")(r,n,s)}),n.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm);function i(e){var r=e=n.customizedHeaderId&&(r=e.match(/\{([^{]+?)}\s*$/))&&r[1]?r[1]:e,e=x.helper.isString(n.prefixHeaderId)?n.prefixHeaderId:!0===n.prefixHeaderId?"section-":"";return n.rawPrefixHeaderId||(r=e+r),r=(n.ghCompatibleHeaderId?r.replace(/ /g,"-").replace(/&/g,"").replace(/ยจT/g,"").replace(/ยจD/g,"").replace(/[&+$,\/:;=?@"#{}|^ยจ~\[\]`\\*)(%.!'<>]/g,""):n.rawHeaderId?r.replace(/ /g,"-").replace(/&/g,"&").replace(/ยจT/g,"ยจ").replace(/ยจD/g,"$").replace(/["']/g,"-"):r.replace(/[^\w]/g,"")).toLowerCase(),n.rawPrefixHeaderId&&(r=e+r),s.hashLinkCounts[r]?r=r+"-"+s.hashLinkCounts[r]++:s.hashLinkCounts[r]=1,r}return e=e.replace(r,function(e,r,t){var a=t,a=(n.customizedHeaderId&&(a=t.replace(/\s?\{([^{]+?)}\s*$/,"")),x.subParser("spanGamut")(a,n,s)),t=n.noHeaderId?"":' id="'+i(t)+'"',r=o-1+r.length,t=""+a+"";return x.subParser("hashBlock")(t,n,s)}),e=s.converter._dispatch("headers.after",e,n,s)}),x.subParser("horizontalRule",function(e,r,t){"use strict";e=t.converter._dispatch("horizontalRule.before",e,r,t);var a=x.subParser("hashBlock")("
",r,t);return e=(e=(e=e.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,a)).replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,a)).replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,a),e=t.converter._dispatch("horizontalRule.after",e,r,t)}),x.subParser("images",function(e,r,d){"use strict";function l(e,r,t,a,n,s,o,i){var l=d.gUrls,c=d.gTitles,u=d.gDimensions;if(t=t.toLowerCase(),i=i||"",-1? ?(['"].*['"])?\)$/m))a="";else if(""===a||null===a){if(a="#"+(t=""!==t&&null!==t?t:r.toLowerCase().replace(/ ?\n/g," ")),x.helper.isUndefined(l[t]))return e;a=l[t],x.helper.isUndefined(c[t])||(i=c[t]),x.helper.isUndefined(u[t])||(n=u[t].width,s=u[t].height)}r=r.replace(/"/g,""").replace(x.helper.regexes.asteriskDashAndColon,x.helper.escapeCharactersCallback);e=''+r+'"}return e=(e=(e=(e=(e=(e=d.converter._dispatch("images.before",e,r,d)).replace(/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,l)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,function(e,r,t,a,n,s,o,i){return l(e,r,t,a=a.replace(/\s/g,""),n,s,0,i)})).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,l)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,l)).replace(/!\[([^\[\]]+)]()()()()()/g,l),e=d.converter._dispatch("images.after",e,r,d)}),x.subParser("italicsAndBold",function(e,r,t){"use strict";return e=t.converter._dispatch("italicsAndBold.before",e,r,t),e=r.literalMidWordUnderscores?(e=(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,function(e,r){return""+r+""})).replace(/\b__(\S[\s\S]*?)__\b/g,function(e,r){return""+r+""})).replace(/\b_(\S[\s\S]*?)_\b/g,function(e,r){return""+r+""}):(e=(e=e.replace(/___(\S[\s\S]*?)___/g,function(e,r){return/\S$/.test(r)?""+r+"":e})).replace(/__(\S[\s\S]*?)__/g,function(e,r){return/\S$/.test(r)?""+r+"":e})).replace(/_([^\s_][\s\S]*?)_/g,function(e,r){return/\S$/.test(r)?""+r+"":e}),e=r.literalMidWordAsterisks?(e=(e=e.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,function(e,r,t){return r+""+t+""})).replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,function(e,r,t){return r+""+t+""})).replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,function(e,r,t){return r+""+t+""}):(e=(e=e.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,function(e,r){return/\S$/.test(r)?""+r+"":e})).replace(/\*\*(\S[\s\S]*?)\*\*/g,function(e,r){return/\S$/.test(r)?""+r+"":e})).replace(/\*([^\s*][\s\S]*?)\*/g,function(e,r){return/\S$/.test(r)?""+r+"":e}),e=t.converter._dispatch("italicsAndBold.after",e,r,t)}),x.subParser("lists",function(e,d,c){"use strict";function p(e,r){c.gListLevel++,e=e.replace(/\n{2,}$/,"\n");var t=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(ยจ0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,l=/\n[ \t]*\n(?!ยจ0)/.test(e+="ยจ0");return d.disableForced4SpacesIndentedSublists&&(t=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(ยจ0|\2([*+-]|\d+[.])[ \t]+))/gm),e=(e=e.replace(t,function(e,r,t,a,n,s,o){o=o&&""!==o.trim();var n=x.subParser("outdent")(n,d,c),i="";return s&&d.tasklists&&(i=' class="task-list-item" style="list-style-type: none;"',n=n.replace(/^[ \t]*\[(x|X| )?]/m,function(){var e='"+(n=(n=r||-1\n"})).replace(/ยจ0/g,""),c.gListLevel--,e=r?e.replace(/\s+$/,""):e}function h(e,r){if("ol"===r){r=e.match(/^ *(\d+)\./);if(r&&"1"!==r[1])return' start="'+r[1]+'"'}return""}function n(n,s,o){var e,i=d.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,l=d.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,c="ul"===s?i:l,u="";return-1!==n.search(c)?function e(r){var t=r.search(c),a=h(n,s);-1!==t?(u+="\n\n<"+s+a+">\n"+p(r.slice(0,t),!!o)+"\n",c="ul"===(s="ul"===s?"ol":"ul")?i:l,e(r.slice(t))):u+="\n\n<"+s+a+">\n"+p(r,!!o)+"\n"}(n):(e=h(n,s),u="\n\n<"+s+e+">\n"+p(n,!!o)+"\n"),u}return e=c.converter._dispatch("lists.before",e,d,c),e+="ยจ0",e=(e=c.gListLevel?e.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(ยจ0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(e,r,t){return n(r,-1"),i+="

",n.push(i))}for(s=n.length,o=0;o]*>\s*]*>/.test(c)&&(u=!0)}n[o]=c}return e=(e=(e=n.join("\n")).replace(/^\n+/g,"")).replace(/\n+$/g,""),t.converter._dispatch("paragraphs.after",e,r,t)}),x.subParser("runExtension",function(e,r,t,a){"use strict";return e.filter?r=e.filter(r,a.converter,t):e.regex&&((a=e.regex)instanceof RegExp||(a=new RegExp(a,"g")),r=r.replace(a,e.replace)),r}),x.subParser("spanGamut",function(e,r,t){"use strict";return e=t.converter._dispatch("spanGamut.before",e,r,t),e=x.subParser("codeSpans")(e,r,t),e=x.subParser("escapeSpecialCharsWithinTagAttributes")(e,r,t),e=x.subParser("encodeBackslashEscapes")(e,r,t),e=x.subParser("images")(e,r,t),e=x.subParser("anchors")(e,r,t),e=x.subParser("autoLinks")(e,r,t),e=x.subParser("simplifiedAutoLinks")(e,r,t),e=x.subParser("emoji")(e,r,t),e=x.subParser("underline")(e,r,t),e=x.subParser("italicsAndBold")(e,r,t),e=x.subParser("strikethrough")(e,r,t),e=x.subParser("ellipsis")(e,r,t),e=x.subParser("hashHTMLSpans")(e,r,t),e=x.subParser("encodeAmpsAndAngles")(e,r,t),r.simpleLineBreaks?/\n\nยจK/.test(e)||(e=e.replace(/\n+/g,"
\n")):e=e.replace(/ +\n/g,"
\n"),e=t.converter._dispatch("spanGamut.after",e,r,t)}),x.subParser("strikethrough",function(e,t,a){"use strict";return t.strikethrough&&(e=(e=a.converter._dispatch("strikethrough.before",e,t,a)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(e,r){return r=r,""+(r=t.simplifiedAutoLink?x.subParser("simplifiedAutoLinks")(r,t,a):r)+""}),e=a.converter._dispatch("strikethrough.after",e,t,a)),e}),x.subParser("stripLinkDefinitions",function(i,l,c){"use strict";function e(e,r,t,a,n,s,o){return r=r.toLowerCase(),i.toLowerCase().split(r).length-1<2?e:(t.match(/^data:.+?\/.+?;base64,/)?c.gUrls[r]=t.replace(/\s/g,""):c.gUrls[r]=x.subParser("encodeAmpsAndAngles")(t,l,c),s?s+o:(o&&(c.gTitles[r]=o.replace(/"|'/g,""")),l.parseImgDimensions&&a&&n&&(c.gDimensions[r]={width:a,height:n}),""))}return i=(i=(i=(i+="ยจ0").replace(/^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=ยจ0)|(?=\n\[))/gm,e)).replace(/^ {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,e)).replace(/ยจ0/,"")}),x.subParser("tables",function(e,y,P){"use strict";if(!y.tables)return e;function r(e){for(var r=e.split("\n"),t=0;t"+(n=x.subParser("spanGamut")(n,y,P))+"\n"));for(t=0;t"+x.subParser("spanGamut")(i,y,P)+"\n"));h.push(_)}for(var m=d,f=h,b="\n\n\n",w=m.length,k=0;k\n\n\n",k=0;k\n";for(var v=0;v\n"}return b+="\n
\n"}return e=(e=(e=(e=P.converter._dispatch("tables.before",e,y,P)).replace(/\\(\|)/g,x.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|ยจ0)/gm,r)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|ยจ0)/gm,r),e=P.converter._dispatch("tables.after",e,y,P)}),x.subParser("underline",function(e,r,t){"use strict";return r.underline?(e=t.converter._dispatch("underline.before",e,r,t),e=(e=r.literalMidWordUnderscores?(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,function(e,r){return""+r+""})).replace(/\b__(\S[\s\S]*?)__\b/g,function(e,r){return""+r+""}):(e=e.replace(/___(\S[\s\S]*?)___/g,function(e,r){return/\S$/.test(r)?""+r+"":e})).replace(/__(\S[\s\S]*?)__/g,function(e,r){return/\S$/.test(r)?""+r+"":e})).replace(/(_)/g,x.helper.escapeCharactersCallback),t.converter._dispatch("underline.after",e,r,t)):e}),x.subParser("unescapeSpecialChars",function(e,r,t){"use strict";return e=(e=t.converter._dispatch("unescapeSpecialChars.before",e,r,t)).replace(/ยจE(\d+)E/g,function(e,r){r=parseInt(r);return String.fromCharCode(r)}),e=t.converter._dispatch("unescapeSpecialChars.after",e,r,t)}),x.subParser("makeMarkdown.blockquote",function(e,r){"use strict";var t="";if(e.hasChildNodes())for(var a=e.childNodes,n=a.length,s=0;s ")}),x.subParser("makeMarkdown.codeBlock",function(e,r){"use strict";var t=e.getAttribute("language"),e=e.getAttribute("precodenum");return"```"+t+"\n"+r.preList[e]+"\n```"}),x.subParser("makeMarkdown.codeSpan",function(e){"use strict";return"`"+e.innerHTML+"`"}),x.subParser("makeMarkdown.emphasis",function(e,r){"use strict";var t="";if(e.hasChildNodes()){t+="*";for(var a=e.childNodes,n=a.length,s=0;s",e.hasAttribute("width")&&e.hasAttribute("height")&&(r+=" ="+e.getAttribute("width")+"x"+e.getAttribute("height")),e.hasAttribute("title")&&(r+=' "'+e.getAttribute("title")+'"'),r+=")"),r}),x.subParser("makeMarkdown.links",function(e,r){"use strict";var t="";if(e.hasChildNodes()&&e.hasAttribute("href")){for(var a=e.childNodes,n=a.length,t="[",s=0;s"),e.hasAttribute("title")&&(t+=' "'+e.getAttribute("title")+'"'),t+=")"}return t}),x.subParser("makeMarkdown.list",function(e,r,t){"use strict";var a="";if(!e.hasChildNodes())return"";for(var n=e.childNodes,s=n.length,o=e.getAttribute("start")||1,i=0;i"+r.preList[e]+""}),x.subParser("makeMarkdown.strikethrough",function(e,r){"use strict";var t="";if(e.hasChildNodes()){t+="~~";for(var a=e.childNodes,n=a.length,s=0;str>th"),s=e.querySelectorAll("tbody>tr"),o=0;o/g,"\\$1>")).replace(/^#/gm,"\\#")).replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3")).replace(/^( {0,3}\d+)\./gm,"$1\\.")).replace(/^( {0,3})([+-])/gm,"$1\\$2")).replace(/]([\s]*)\(/g,"\\]$1\\(")).replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:")});"function"==typeof define&&define.amd?define(function(){"use strict";return x}):"undefined"!=typeof module&&module.exports?module.exports=x:window.showdown=x}.call(this); +//# sourceMappingURL=showdown.min.js.map diff --git a/web/note_plus.js b/web/note_plus.js index aa07fb0..e6064bd 100644 --- a/web/note_plus.js +++ b/web/note_plus.js @@ -1,181 +1,605 @@ import { app } from '../../scripts/app.js' -import { api } from '../../scripts/api.js' import * as shared from './comfy_shared.js' +import { + infoLogger, + warnLogger, + successLogger, + errorLogger, +} from './comfy_shared.js' +const DEFAULT_CSS = `` +const DEFAULT_HTML = `

+ Note+ +

` +const DEFAULT_MD = '## Note+' +const DEFAULT_MODE = 'markdown' + +const CSS_RESET = ` +* { + font-family: monospace; + line-height: 1.25em; +} + +h1, h2, h3, h4, h5, h6 { + margin: 0; + padding: 0; + font-weight: normal; +} + +p, ul, ol, dl, blockquote { + margin: 0.3em; + padding: 0; +} + + +ul, ol { + + padding-left: 1em; + +} + +a { + color: inherit; + text-decoration: none; + pointer-events: all; + color: cyan; +} + +img { + padding: 1em 0; + max-width: 100%; +} + +iframe { + width: 100%; + height: auto; + border:none; + pointer-events:all; +} + +blockquote { + border-left: 4px solid #ccc; + padding-left: 1em; + margin-left: 0; + font-style: italic; +} + +pre, code { + font-family: monospace; +} + +table { + border-collapse: collapse; + width: 100%; + border-bottom: 1px solid #000; + margin: 1em 0; +} + +th, td { + border-left: 1px solid #000; + border-right: 1px solid #000; + padding: 8px; + text-align: left; +} + +th { + border: 1px solid #000; + + background-color: rgba(0,0,0,0.5); +} + +input[type="checkbox"] { + margin-right: 10px; +} + +` class NotePlus extends LiteGraph.LGraphNode { title = 'Note+ (mtb)' category = 'mtb/utils' + // same values as the comfy note + color = LGraphCanvas.node_colors.yellow.color + bgcolor = LGraphCanvas.node_colors.yellow.bgcolor + groupcolor = LGraphCanvas.node_colors.yellow.groupcolor + constructor() { super() + this.uuid = shared.makeUUID() + infoLogger(`Constructing Note+ instance`) + // - litegraph settings + this.collapsable = true this.isVirtualNode = true + this.shape = LiteGraph.BOX_SHAPE this.serialize_widgets = true - this.editing = false + // - default values, serialization is done through widgets + this._raw_html = DEFAULT_MODE == 'html' ? DEFAULT_HTML : DEFAULT_MD + + // - mardown converter + this.markdownConverter = new showdown.Converter({ + tables: true, + strikethrough: true, + emoji: true, + ghCodeBlocks: true, + tasklists: true, + ghMentions: true, + smoothLivePreview: true, + simplifiedAutoLink: true, + parseImgDimensions: true, + openLinksInNewWindow: true, + }) + + // - state this.live = true - this.rawVal = "

Note+\n

" - - this.calculated_height = 36 + this.calculated_height = 0 + // - add widgets const inner = document.createElement('div') inner.style.margin = '0' inner.style.padding = '0' + inner.style.pointerEvents = 'none' this.html_widget = this.addDOMWidget('HTML', 'html', inner, { - setValue: (v) => { - // update our widget preview - this.html_widget.element.innerHTML = v - // calculate height - this.calculated_height = this.html_widget.element.scrollHeight + 36 + setValue: (val) => { + this._raw_html = val }, - getValue: () => this.rawVal, + getValue: () => this._raw_html, getMinHeight: () => this.calculated_height, // (the edit button), + hideOnZoom: false, }) - // console.log(`Value of HTML: ${this.html_widget.value}`) - this.html_widget.element.innerHTML = this.html_widget.value + this.setupSerializationWidgets() + this.setupDialog() + this.loadAceEditor() + } - //- ace based editor - this.addWidget('button', 'Edit', 'Edit', () => { - const container = document.createElement('div') - Object.assign(container.style, { - display: 'flex', - gap: '10px', - }) + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {LGraphCanvas} graphcanvas + * @returns + */ - dialog.show('') - dialog.textElement.append(container) + onDrawForeground(ctx, graphcanvas) { + if (this.flags.collapsed) return - const value = document.createElement('div') - value.id = 'noteplus-editor' - Object.assign(value.style, { - width: '300px', - height: '200px', - backgroundColor: 'rgb(30,30,30)', - color: 'whitesmoke', - }) + // Define the size and position of the icon + const iconSize = 14 // Size of the icon + const iconMargin = 8 // Margin from the edges + const x = this.size[0] - iconSize - iconMargin + const y = iconMargin * 1.5 - container.append(value) + // Create a new Path2D object from SVG path data + const pencilPath = new Path2D( + 'M21.28 6.4l-9.54 9.54c-.95.95-3.77 1.39-4.4.76-.63-.63-.2-3.45.75-4.4l9.55-9.55a2.58 2.58 0 1 1 3.64 3.65z' + ) + const folderPath = new Path2D( + 'M11 4H6a4 4 0 0 0-4 4v10a4 4 0 0 0 4 4h11c2.21 0 3-1.8 3-4v-5' + ) - const live_edit = document.createElement('input') - live_edit.type = 'checkbox' - live_edit.checked = this.live - live_edit.onchange = () => { - this.live = live_edit.checked + // Draw the paths + ctx.save() + ctx.translate(x, y) // Position the icon on the canvas + ctx.scale(iconSize / 32, iconSize / 32) // Scale the icon to the desired size + ctx.strokeStyle = 'rgba(255,255,255,0.3)' + + ctx.lineCap = 'round' + ctx.lineJoin = 'round' + + ctx.lineWidth = 2.4 + ctx.stroke(pencilPath) + ctx.stroke(folderPath) + ctx.restore() + } + onMouseDown(e, localPos, graphcanvas) { + // Check if the click is within the pencil icon bounds + const iconSize = 14 + const iconMargin = 8 + const iconX = this.size[0] - iconSize - iconMargin + const iconY = iconMargin * 1.5 + + if ( + localPos[0] > iconX && + localPos[0] < iconX + iconSize && + localPos[1] > iconY && + localPos[1] < iconY + iconSize + ) { + // Pencil icon was clicked, open the editor + this.openEditorDialog() + return true // Return true to indicate the event was handled + } + + return false // Return false to let the event propagate + } + + setupSerializationWidgets() { + infoLogger(`Setup Serializing widgets`) + + this.edit_mode_widget = this.addWidget( + 'combo', + 'Mode', + DEFAULT_MODE, + (me) => successLogger(`Updating edit_mode`, me), + { + values: ['html', 'markdown', 'raw'], } + ) - const live_edit_label = document.createElement('label') - live_edit_label.textContent = 'Live Edit' - live_edit_label.append(live_edit) - - value.after(live_edit_label) - - this.setupEditor() - this.editor.setValue(this.html_widget.element.innerHTML) + this.css_widget = this.addWidget('text', 'CSS', DEFAULT_CSS, (val) => { + successLogger(`Updating css ${val}`) }) - const dialog = new app.ui.dialog.constructor() - dialog.element.classList.add('comfy-settings') + shared.hideWidgetForGood(this, this.edit_mode_widget) + shared.hideWidgetForGood(this, this.css_widget) + } + setupDialog() { + infoLogger(`Setup dialog`) + // this.addWidget('button', 'Edit', 'Edit', this.openEditorDialog.bind(this)) - const closeButton = dialog.element.querySelector('button') + this.dialog = new app.ui.dialog.constructor() + this.dialog.element.classList.add('comfy-settings') + + const closeButton = this.dialog.element.querySelector('button') closeButton.textContent = 'CANCEL' const saveButton = document.createElement('button') saveButton.textContent = 'SAVE' saveButton.onclick = () => { - this.updateHTML(this.editor.getValue()) + this.closeEditorDialog(true) + } + closeButton.onclick = () => { + this.closeEditorDialog(false) + } + closeButton.before(saveButton) + } - this.editor.destroy() - this.editor.container.remove() + teardownEditors() { + this.css_editor.destroy() + this.css_editor.container.remove() - dialog.close() + this.html_editor.destroy() + this.html_editor.container.remove() + } + + closeEditorDialog(accept) { + infoLogger(`Closing editor dialog`, accept) + if (accept) { + this.updateHTML(this.html_editor.getValue()) + this.updateCSS(this.css_editor.getValue()) + } + this.teardownEditors() + this.dialog.close() + } + + openEditorDialog() { + infoLogger(`Current edit mode ${this.edit_mode_widget.value}`) + const container = document.createElement('div') + + Object.assign(container.style, { + display: 'flex', + gap: '10px', + flexDirection: 'column', + }) + + const editorsContainer = document.createElement('div') + Object.assign(editorsContainer.style, { + display: 'flex', + gap: '10px', + flexDirection: 'row', + }) + + container.append(editorsContainer) + + this.dialog.show('') + this.dialog.textElement.append(container) + + const aceHTML = document.createElement('div') + aceHTML.id = 'noteplus-html-editor' + Object.assign(aceHTML.style, { + width: '300px', + height: '300px', + backgroundColor: 'rgb(30,30,30)', + color: 'whitesmoke', + }) + + editorsContainer.append(aceHTML) + + const aceCSS = document.createElement('div') + aceCSS.id = 'noteplus-css-editor' + Object.assign(aceCSS.style, { + width: '300px', + height: '300px', + backgroundColor: 'rgb(30,30,30)', + color: 'whitesmoke', + }) + + editorsContainer.append(aceCSS) + + const live_edit = document.createElement('input') + live_edit.type = 'checkbox' + live_edit.checked = this.live + live_edit.onchange = () => { + this.live = live_edit.checked } - closeButton.before(saveButton) + //- "Dynamic" elements + const firstButton = this.dialog.element.querySelector('button') + const syncUI = () => { + let convert_to_html = + this.dialog.element.querySelector('#convert-to-html') + if (this.edit_mode_widget.value == 'markdown') { + if (convert_to_html == null) { + convert_to_html = document.createElement('button') + convert_to_html.textContent = 'Convert to HTML (NO UNDO!)' + convert_to_html.id = 'convert-to-html' + convert_to_html.onclick = () => { + let select_mode = this.dialog.element.querySelector('#edit_mode') + let md = this.html_editor.getValue() + this.edit_mode_widget.value = 'html' + select_mode.value = 'html' + const html = this.markdownConverter.makeHtml(md) + this.html_widget.value = html + this.html_editor.setValue(html) + this.html_editor.session.setMode('ace/mode/html') + this.updateHTML(this.html_widget.value) + + convert_to_html.remove() + } + + firstButton.before(convert_to_html) + } + } else { + if (convert_to_html != null) { + convert_to_html.remove() + convert_to_html = null + } + } + select_mode.value = this.edit_mode_widget.value + } + //- combobox + let select_mode = this.dialog.element.querySelector('#edit_mode') + + if (!select_mode) { + infoLogger(`Creating combobox for select`) + select_mode = document.createElement('select') + select_mode.name = 'mode' + select_mode.id = 'edit_mode' + + const addOption = (label) => { + const option = document.createElement('option') + option.value = label + option.textContent = label + select_mode.append(option) + } + addOption('markdown') + addOption('html') + + select_mode.addEventListener('change', (event) => { + const val = event.target.value + this.edit_mode_widget.value = val + if (this.html_editor) { + this.html_editor.session.setMode(`ace/mode/${val}`) + this.updateHTML(this.html_editor.getValue()) + + syncUI() + } + }) + + // firstButton.before(select_mode) + container.append(select_mode) + } + select_mode.value = this.edit_mode_widget.value + + syncUI() + + const live_edit_label = document.createElement('label') + live_edit_label.textContent = 'Live Edit' + + // add a tooltip + live_edit_label.title = + 'When this is on, the editor will update the note+ whenever you change the text.' + + live_edit_label.append(live_edit) + + // select_mode.before(live_edit_label) + container.append(live_edit_label) + + this.setupEditors() + } + loadAceEditor() { shared .loadScript( 'https://cdn.jsdelivr.net/npm/ace-builds@1.16.0/src-min-noconflict/ace.min.js' ) .catch((e) => { - console.error(e) + errorLogger(e) }) } + onCreate() { + errorLogger('NotePlus onCreate') + } + configure(info) { + super.configure(info) + infoLogger('Restoring serialized values', info) + // - update view from serialzed data + this.html_widget.element.id = `note-plus-${this.uuid}` + this.setMode(this.edit_mode_widget.value) + this.updateHTML(this.html_widget.value) + this.updateCSS(this.css_widget.value) + this.setSize(info.size) + } + onNodeCreated() { + infoLogger('Node created', this.uuid) + this.html_widget.element.id = `note-plus-${this.uuid}` + this.setMode(this.edit_mode_widget.value) + this.updateHTML(this.html_widget.value) // widget is populated here since we called super + this.updateCSS(this.css_widget.value) + } + onRemoved() { + infoLogger('Node removed', this.uuid) + } + getExtraMenuOptions() { + var options = [] + // { + // content: string; + // callback?: ContextMenuEventListener; + // /** Used as innerHTML for extra child element */ + // title?: string; + // disabled?: boolean; + // has_submenu?: boolean; + // submenu?: { + // options: ContextMenuItem[]; + // } & IContextMenuOptions; + // className?: string; + // } + options.push({ + content: `Set to ${ + this.edit_mode_widget.value === 'html' ? 'markdown' : 'html' + }`, + callback: () => { + this.edit_mode_widget.value = + this.edit_mode_widget.value === 'html' ? 'markdown' : 'html' + this.updateHTML(this.html_widget.value) + }, + }) - setupEditor() { - this.editor = ace.edit('noteplus-editor') - this.editor.setTheme('ace/theme/dracula') - this.editor.session.setMode('ace/mode/html') + return options + } - this.editor.setShowPrintMargin(false) - this.editor.session.setUseWrapMode(true) - this.editor.renderer.setShowGutter(false) - this.editor.session.setTabSize(4) - this.editor.session.setUseSoftTabs(true) - this.editor.setFontSize(14) - this.editor.setReadOnly(false) - this.editor.setHighlightActiveLine(false) - this.editor.setShowFoldWidgets(true) + _setupEditor(editor) { + editor.setTheme('ace/theme/dracula') - this.editor.session.on('change', (delta) => { + editor.setShowPrintMargin(false) + editor.session.setUseWrapMode(true) + editor.renderer.setShowGutter(false) + editor.session.setTabSize(4) + editor.session.setUseSoftTabs(true) + editor.setFontSize(14) + editor.setReadOnly(false) + editor.setHighlightActiveLine(false) + editor.setShowFoldWidgets(true) + return editor + } + + setMode(mode) { + this.edit_mode_widget.value = mode + if (this.html_editor) { + this.html_editor.session.setMode(`ace/mode/${mode}`) + } + + this.updateHTML(this.html_widget.value) + } + setupEditors() { + infoLogger('NotePlus setupEditor') + + this.html_editor = ace.edit('noteplus-html-editor') + + this.css_editor = ace.edit('noteplus-css-editor') + this.css_editor.session.setMode('ace/mode/css') + + this.setMode(DEFAULT_MODE) + + this._setupEditor(this.html_editor) + this._setupEditor(this.css_editor) + + this.css_editor.session.on('change', (delta) => { // delta.start, delta.end, delta.lines, delta.action if (this.live) { - this.updateHTML(this.editor.getValue()) + this.updateCSS(this.css_editor.getValue()) } }) + + this.html_editor.session.on('change', (delta) => { + // delta.start, delta.end, delta.lines, delta.action + if (this.live) { + this.updateHTML(this.html_editor.getValue()) + } + }) + + this.html_editor.setValue(this.html_widget.value) + this.css_editor.setValue(this.css_widget.value) + } + + scopeCss(css, scopeId) { + return css + .split('}') + .map((rule) => { + if (rule.trim() === '') { + return '' + } + const scopedRule = rule + .split('{') + .map((segment, index) => { + if (index === 0) { + return `#${scopeId} ${segment.trim()}` + } + return `{${segment.trim()}` + }) + .join(' ') + return `${scopedRule}}` + }) + .join('\n') + } + getCssDom() { + const styleTagId = `note-plus-stylesheet-${this.uuid}` + + let styleTag = document.head.querySelector(`#${styleTagId}`) + + if (!styleTag) { + styleTag = document.createElement('style') + styleTag.type = 'text/css' + styleTag.id = styleTagId + document.head.appendChild(styleTag) + infoLogger(`Creating note-plus-stylesheet-${this.uuid}`, styleTag) + } + + return styleTag + } + calculateHeight() { + this.calculated_height = shared.calculateTotalChildrenHeight( + this.html_widget.element + ) + this.setDirtyCanvas(true, true) + } + updateCSS(css) { + infoLogger('NotePlus updateCSS') + // this.html_widget.element.style = css + const scopedCss = this.scopeCss( + `${CSS_RESET}\n${css}`, + `note-plus-${this.uuid}` + ) + + const cssDom = this.getCssDom() + cssDom.innerHTML = scopedCss + + this.css_widget.value = css + this.calculateHeight() + infoLogger('NotePlus updateCSS', this.calculated_height) + // this.setSize(this.computeSize()) } updateHTML(val) { - // if (CONTAINER_HTML.includes('${html}')) { - // console.log('found template') - // val = CONTAINER_HTML.replace('${html}', val) - // } + const cleanHTML = DOMPurify.sanitize(val, { ADD_TAGS: ['iframe'] }) + this.html_widget.value = cleanHTML - this.html_widget.value = val - this.rawVal = val - - this.calculated_height = this.html_widget.element.scrollHeight - - this.setSize(this.computeSize()) + // update our widget preview + if (this.edit_mode_widget.value === 'html') { + this.html_widget.element.innerHTML = cleanHTML + } else if (this.edit_mode_widget.value === 'markdown') { + this.html_widget.element.innerHTML = + this.markdownConverter.makeHtml(cleanHTML) + } + this.calculateHeight() + // this.setSize(this.computeSize()) } - - // // onRemoved() { - // // console.log('Removing', this) - // // for (const w of this.widgets) { - // // console.log('Removing', w) - // // w.onRemove?.() - // // w.onRemoved?.() - // // } - // // } } app.registerExtension({ name: 'mtb.noteplus', - setup() { - // app.ui.settings.addSetting({ - // id: "mtb.noteplus.Container", - // name: "๐Ÿ“ฆ HTML container", - // type: "text", - // defaultValue: "
${html}
", - // tooltip: - // "This defines the wrapper for the noteplus html content, use '${html}' to define the location of the placeholder", - // attrs: { - // style: { - // fontFamily: "monospace", - // }, - // }, - // onChange(value) { - // if (!value) { - // CONTAINER_HTML = null; - // return; - // } - // console.log(`NOTEPLUS| value changed: ${value}`) - // CONTAINER_HTML = value - // }, - // }); - }, - registerCustomNodes() { LiteGraph.registerNodeType('Note Plus (mtb)', NotePlus) + + NotePlus.title_mode = LiteGraph.NO_TITLE }, })