diff --git a/docs/markdown-to-jsx.js b/docs/markdown-to-jsx.js index ffb9f9bd..b9fd8588 100644 --- a/docs/markdown-to-jsx.js +++ b/docs/markdown-to-jsx.js @@ -1,2 +1,2 @@ -!function(e,n,t,r){function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach(function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}}),n.default=e,n}var o=/*#__PURE__*/a(e),l=/*#__PURE__*/i(e),c=/*#__PURE__*/i(n),u=/*#__PURE__*/a(t),s=/*#__PURE__*/a(r);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(n,["children","math","block","errorColor","renderError","settings","as"]),f=u||(a?"div":"span"),p=null!=t?t:r,h=e.useState({innerHtml:""}),g=h[0],y=h[1];return e.useEffect(function(){try{var e=s.default.renderToString(p,m({displayMode:!!a,errorColor:i,throwOnError:!!l},c));y({innerHtml:e})}catch(e){if(!(e instanceof s.default.ParseError||e instanceof TypeError))throw e;y(l?{errorElement:l(e)}:{innerHtml:e.message})}},[a,p,i,l,c]),"errorElement"in g?g.errorElement:o.default.createElement(f,Object.assign({},d,{dangerouslySetInnerHTML:{__html:g.innerHtml}}))});function h(){return h=Object.assign?Object.assign.bind():function(e){for(var n=1;n",lt:"<",nbsp:" ",quot:"“"},E=["style","script"],w=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,O=/mailto:/i,C=/\n{2,}$/,j=/^( *>[^\n]+(\n[^\n]+)*\n*)+\n{2,}/,S=/^ *> ?/gm,z=/^ {2,}\n/,M=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,A=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,T=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,I=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,$=/^(?:\n *)*\n/,L=/\r\n?/g,R=/^\[\^([^\]]+)](:.*)\n/,H=/^\[\^([^\]]+)]/,_=/\f/g,N=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,P=/^\s*?\[(x|\s)\]/,B=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,D=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,U=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,G=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?([^>]*)\/{0}>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1)[\s\S])*?)<\/\1>\n*/i,F=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,W=/^)/,q=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Z=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,J=/^\{.*\}$/,X=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,V=/^<([^ >]+@[^ >]+)>/,Q=/^<([^ >]+:\/[^ >]+)>/,K=/-([a-z])?/gi,Y=/^(.*\|?.*)\n *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*)\n?/,ee=/^\[([^\]]*)\]:\s+]+)>?\s*("([^"]*)")?/,ne=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,te=/^\[([^\]]*)\] ?\[([^\]]*)\]/,re=/(\[|\])/g,ae=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,ie=/\t/g,oe=/^ *\| */,le=/(^ *\||\| *$)/g,ce=/ *$/,ue=/^ *:-+: *$/,se=/^ *:-+ *$/,de=/^ *-+: *$/,fe=/^([*_])\1((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1\1(?!\1)/,me=/^([*_])((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1(?!\1|\w)/,pe=/^==((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)==/,he=/^~~((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)~~/,ge=/^\\([^0-9A-Za-z\s])/,ye=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,ve=/^\n+/,ke=/^([ \t]*)/,xe=/\\([^\\])/g,be=/ *\n+$/,Ee=/(?:^|\n)( *)$/,we="(?:\\d+\\.)",Oe="(?:[*+-])";function Ce(e){return"( *)("+(1===e?we:Oe)+") +"}var je=Ce(1),Se=Ce(2);function ze(e){return new RegExp("^"+(1===e?je:Se))}var Me=ze(1),Ae=ze(2);function Te(e){return new RegExp("^"+(1===e?je:Se)+"[^\\n]*(?:\\n(?!\\1"+(1===e?we:Oe)+" )[^\\n]*)*(\\n|$)","gm")}var Ie=Te(1),$e=Te(2);function Le(e){var n=1===e?we:Oe;return new RegExp("^( *)("+n+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+n+" (?!"+n+" ))\\n*|\\s*\\n*$)")}var Re=Le(1),He=Le(2);function _e(e,n){var t=1===n,r=t?Re:He,a=t?Ie:$e,i=t?Me:Ae;return{match:function(e,n,t){var a=Ee.exec(t);return a&&(n.list||!n.inline&&!n.simple)?r.exec(e=a[1]+e):null},order:1,parse:function(e,n,r){var o=t?+e[2]:void 0,l=e[0].replace(C,"\n").match(a),c=!1;return{items:l.map(function(e,t){var a=i.exec(e)[0].length,o=new RegExp("^ {1,"+a+"}","gm"),u=e.replace(o,"").replace(i,""),s=t===l.length-1,d=-1!==u.indexOf("\n\n")||s&&c;c=d;var f,m=r.inline,p=r.list;r.list=!0,d?(r.inline=!1,f=u.replace(be,"\n\n")):(r.inline=!0,f=u.replace(be,""));var h=n(f,r);return r.inline=m,r.list=p,h}),ordered:t,start:o}},render:function(n,t,r){return e(n.ordered?"ol":"ul",{key:r.key,start:"20"===n.type?n.start:void 0},n.items.map(function(n,a){return e("li",{key:a},t(n,r))}))}}}var Ne=/^\[([^\]]*)]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,Pe=/^!\[([^\]]*)]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,Be=[j,A,T,B,U,D,W,Y,Ie,Re,$e,He],De=[].concat(Be,[/^[^\n]+(?: \n|\n{2,})/,G,Z]);function Ue(e){return e.replace(/[ÀÁÂÃÄÅàáâãäåæÆ]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function Ge(e){return de.test(e)?"right":ue.test(e)?"center":se.test(e)?"left":null}function Fe(e,n,t){var r=t.inTable;t.inTable=!0;var a=n(e.trim(),t);t.inTable=r;var i=[[]];return a.forEach(function(e,n){"26"===e.type?0!==n&&n!==a.length-1&&i.push([]):("27"!==e.type||null!=a[n+1]&&"26"!==a[n+1].type||(e.text=e.text.replace(ce,"")),i[i.length-1].push(e))}),i}function We(e,n,t){t.inline=!0;var r=Fe(e[1],n,t),a=e[2].replace(le,"").split("|").map(Ge),i=function(e,n,t){return e.trim().split("\n").map(function(e){return Fe(e,n,t)})}(e[3],n,t);return t.inline=!1,{align:a,cells:i,header:r,type:"25"}}function qe(e,n){return null==e.align[n]?{}:{textAlign:e.align[n]}}function Ze(e){return function(n,t){return t.inline?e.exec(n):null}}function Je(e){return function(n,t){return t.inline||t.simple?e.exec(n):null}}function Xe(e){return function(n,t){return t.inline||t.simple?null:e.exec(n)}}function Ve(e){return function(n){return e.exec(n)}}function Qe(e,n,t){if(n.inline||n.simple)return null;if(t&&!t.endsWith("\n"))return null;var r="";e.split("\n").every(function(e){return!Be.some(function(n){return n.test(e)})&&(r+=e+"\n",e.trim())});var a=r.trimEnd();return""==a?null:[r,a]}function Ke(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data(?!:image)):/i))return}catch(e){return null}return e}function Ye(e){return e.replace(xe,"$1")}function en(e,n,t){var r=t.inline||!1,a=t.simple||!1;t.inline=!0,t.simple=!0;var i=e(n,t);return t.inline=r,t.simple=a,i}function nn(e,n,t){var r=t.inline||!1,a=t.simple||!1;t.inline=!1,t.simple=!0;var i=e(n,t);return t.inline=r,t.simple=a,i}function tn(e,n,t){return t.inline=!1,e(n,t)}var rn,an,on,ln,cn,un,sn,dn,fn,mn,pn=function(e,n,t){return{children:en(n,e[1],t)}};function hn(){return{}}function gn(){return null}function yn(){return[].slice.call(arguments).filter(Boolean).join(" ")}function vn(e,n,t){for(var r=e,a=n.split(".");a.length&&void 0!==(r=r[a[0]]);)a.shift();return r||t}function kn(e,n){var t=vn(n,e);return t?"function"==typeof t||"object"==typeof t&&"render"in t?t:vn(n,e+".component",e):e}function xn(e,n){var t;void 0===n&&(n={}),n.overrides=n.overrides||{},n.slugify=n.slugify||Ue,n.namedCodesToUnicode=n.namedCodesToUnicode?h({},b,n.namedCodesToUnicode):b;var r=n.createElement||l.createElement;function a(e,t){var a=vn(n.overrides,e+".props",{});return r.apply(void 0,[kn(e,n.overrides),h({},t,a,{className:yn(null==t?void 0:t.className,a.className)||void 0})].concat([].slice.call(arguments,2)))}function i(e){e=e.replace(N,"");var t=!1;n.forceInline?t=!0:n.forceBlock||(t=!1===ae.test(e));for(var r=m(f(t?e:e.trimEnd().replace(ve,"")+"\n\n",{inline:t}));"string"==typeof r[r.length-1]&&!r[r.length-1].trim();)r.pop();if(null===n.wrapper)return r;var i,o=n.wrapper||(t?"span":"div");if(r.length>1||n.forceWrapper)i=r;else{if(1===r.length)return"string"==typeof(i=r[0])?a("span",{key:"outer"},i):i;i=null}return l.createElement(o,{key:"outer"},i)}function o(e){var n=e.match(w);return n?n.reduce(function(e,n,t){var r=n.indexOf("=");if(-1!==r){var a=function(e){return-1!==e.indexOf("-")&&null===e.match(q)&&(e=e.replace(K,function(e,n){return n.toUpperCase()})),e}(n.slice(0,r)).trim(),o=function(e){var n=e[0];return('"'===n||"'"===n)&&e.length>=2&&e[e.length-1]===n?e.slice(1,-1):e}(n.slice(r+1).trim()),c=x[a]||a,u=e[c]=function(e,n){return"style"===e?n.split(/;\s?/).reduce(function(e,n){var t=n.slice(0,n.indexOf(":"));return e[t.replace(/(-[a-z])/g,function(e){return e[1].toUpperCase()})]=n.slice(t.length+1).trim(),e},{}):"href"===e||"src"===e?Ke(n):(n.match(J)&&(n=n.slice(1,n.length-1)),"true"===n||"false"!==n&&n)}(a,o);"string"==typeof u&&(G.test(u)||Z.test(u))&&(e[c]=l.cloneElement(i(u.trim()),{key:t}))}else"style"!==n&&(e[x[n]||n]=!0);return e},{}):null}var c=[],u={},s=((t={})[0]={match:Xe(j),order:1,parse:function(e,n,t){return{children:n(e[0].replace(S,""),t)}},render:function(e,n,t){return a("blockquote",{key:t.key},n(e.children,t))}},t[1]={match:Ve(z),order:1,parse:hn,render:function(e,n,t){return a("br",{key:t.key})}},t[2]={match:Xe(M),order:1,parse:hn,render:function(e,n,t){return a("hr",{key:t.key})}},t[3]={match:Xe(T),order:0,parse:function(e){return{lang:void 0,text:e[0].replace(/^ {4}/gm,"").replace(/\n+$/,"")}},render:function(e,n,t){return a("pre",{key:t.key},a("code",h({},e.attrs,{className:e.lang?"lang-"+e.lang:""}),e.text))}},t[4]={match:Xe(A),order:0,parse:function(e){return{attrs:o(e[3]||""),lang:e[2]||void 0,text:e[4],type:"3"}}},t[5]={match:Je(I),order:3,parse:function(e){return{text:e[2]}},render:function(e,n,t){return a("code",{key:t.key},e.text)}},t[6]={match:Xe(R),order:0,parse:function(e){return c.push({footnote:e[2],identifier:e[1]}),{}},render:gn},t[7]={match:Ze(H),order:1,parse:function(e){return{target:"#"+n.slugify(e[1]),text:e[1]}},render:function(e,n,t){return a("a",{key:t.key,href:Ke(e.target)},a("sup",{key:t.key},e.text))}},t[8]={match:Ze(P),order:1,parse:function(e){return{completed:"x"===e[1].toLowerCase()}},render:function(e,n,t){return a("input",{checked:e.completed,key:t.key,readOnly:!0,type:"checkbox"})}},t[9]={match:Xe(n.enforceAtxHeadings?D:B),order:1,parse:function(e,t,r){return{children:en(t,e[2],r),id:n.slugify(e[2]),level:e[1].length}},render:function(e,n,t){return a("h"+e.level,{id:e.id,key:t.key},n(e.children,t))}},t[10]={match:Xe(U),order:0,parse:function(e,n,t){return{children:en(n,e[1],t),level:"="===e[2]?1:2,type:"9"}}},t[11]={match:Ve(G),order:1,parse:function(e,n,t){var r,a=e[3].match(ke),i=new RegExp("^"+a[1],"gm"),l=e[3].replace(i,""),c=(r=l,De.some(function(e){return e.test(r)})?tn:en),u=e[1].toLowerCase(),s=-1!==E.indexOf(u),d={attrs:o(e[2]),noInnerParse:s,tag:s?u:e[1]};return t.inAnchor=t.inAnchor||"a"===u,s?d.text=e[3]:d.children=c(n,l,t),t.inAnchor=!1,d},render:function(e,n,t){return a(e.tag,h({key:t.key},e.attrs),e.text||n(e.children,t))}},t[13]={match:Ve(Z),order:1,parse:function(e){return{attrs:o(e[2]||""),tag:e[1]}},render:function(e,n,t){return a(e.tag,h({},e.attrs,{key:t.key}))}},t[12]={match:Ve(W),order:1,parse:function(){return{}},render:gn},t[14]={match:Je(Pe),order:1,parse:function(e){return{alt:e[1],target:Ye(e[2]),title:e[3]}},render:function(e,n,t){return a("img",{key:t.key,alt:e.alt||void 0,title:e.title||void 0,src:Ke(e.target)})}},t[15]={match:Ze(Ne),order:3,parse:function(e,n,t){return{children:nn(n,e[1],t),target:Ye(e[2]),title:e[3]}},render:function(e,n,t){return a("a",{key:t.key,href:Ke(e.target),title:e.title},n(e.children,t))}},t[16]={match:Ze(Q),order:0,parse:function(e){return{children:[{text:e[1],type:"27"}],target:e[1],type:"15"}}},t[17]={match:function(e,n){return n.inAnchor?null:Ze(X)(e,n)},order:0,parse:function(e){return{children:[{text:e[1],type:"27"}],target:e[1],title:void 0,type:"15"}}},t[18]={match:Ze(V),order:0,parse:function(e){var n=e[1],t=e[1];return O.test(t)||(t="mailto:"+t),{children:[{text:n.replace("mailto:",""),type:"27"}],target:t,type:"15"}}},t[20]=_e(a,1),t[33]=_e(a,2),t[19]={match:Xe($),order:3,parse:hn,render:function(){return"\n"}},t[21]={match:Qe,order:3,parse:pn,render:function(e,n,t){return a("p",{key:t.key},n(e.children,t))}},t[22]={match:Ze(ee),order:0,parse:function(e){return u[e[1]]={target:e[2],title:e[4]},{}},render:gn},t[23]={match:Je(ne),order:0,parse:function(e){return{alt:e[1]||void 0,ref:e[2]}},render:function(e,n,t){return a("img",{key:t.key,alt:e.alt,src:Ke(u[e.ref].target),title:u[e.ref].title})}},t[24]={match:Ze(te),order:0,parse:function(e,n,t){return{children:n(e[1],t),fallbackChildren:n(e[0].replace(re,"\\$1"),t),ref:e[2]}},render:function(e,n,t){return u[e.ref]?a("a",{key:t.key,href:Ke(u[e.ref].target),title:u[e.ref].title},n(e.children,t)):a("span",{key:t.key},n(e.fallbackChildren,t))}},t[25]={match:Xe(Y),order:1,parse:We,render:function(e,n,t){return a("table",{key:t.key},a("thead",null,a("tr",null,e.header.map(function(r,i){return a("th",{key:i,style:qe(e,i)},n(r,t))}))),a("tbody",null,e.cells.map(function(r,i){return a("tr",{key:i},r.map(function(r,i){return a("td",{key:i,style:qe(e,i)},n(r,t))}))})))}},t[26]={match:function(e,n){return n.inTable?(n.inline=!0,oe.exec(e)):null},order:1,parse:function(){return{type:"26"}},render:function(){return" | "}},t[27]={match:Ve(ye),order:4,parse:function(e){return{text:e[0].replace(F,function(e,t){return n.namedCodesToUnicode[t]?n.namedCodesToUnicode[t]:e})}},render:function(e){return e.text}},t[28]={match:Je(fe),order:2,parse:function(e,n,t){return{children:n(e[2],t)}},render:function(e,n,t){return a("strong",{key:t.key},n(e.children,t))}},t[29]={match:Je(me),order:3,parse:function(e,n,t){return{children:n(e[2],t)}},render:function(e,n,t){return a("em",{key:t.key},n(e.children,t))}},t[30]={match:Je(ge),order:1,parse:function(e){return{text:e[1],type:"27"}}},t[31]={match:Je(pe),order:3,parse:pn,render:function(e,n,t){return a("mark",{key:t.key},n(e.children,t))}},t[32]={match:Je(he),order:3,parse:pn,render:function(e,n,t){return a("del",{key:t.key},n(e.children,t))}},t);!0===n.disableParsingRawHTML&&(delete s[11],delete s[13]);var d,f=function(e){var n=Object.keys(e);function t(r,a){for(var i=[],o="";r;)for(var l=0;l=0||(a[t]=e[t]);return a}(e,k);return l.cloneElement(xn(n,t),r)}function En(){var e=l.useState(document.getElementById("sample-content").textContent.trim()),n=e[0],t=e[1],r=l.useCallback(function(e){return t(e.target.value)},[]);/*#__PURE__*/return l.createElement("main",null,/*#__PURE__*/l.createElement(Cn,null),/*#__PURE__*/l.createElement(jn,null,/*#__PURE__*/l.createElement("a",{target:"_blank",href:"https://github.com/quantizor/markdown-to-jsx",title:"Check out the markdown-to-jsx source code",rel:"noopener noreferrer"},/*#__PURE__*/l.createElement("img",{src:"./images/logo.svg",alt:"markdown-to-jsx logo"})),/*#__PURE__*/l.createElement(Sn,null,/*#__PURE__*/l.createElement("h1",null,/*#__PURE__*/l.createElement("code",null,"markdown-to-jsx")," is an easy-to-use markdown component that takes Github-flavored Markdown (GFM) and makes native JSX without dangerous hacks. "),/*#__PURE__*/l.createElement("h2",null,"It's lightweight, customizable, and happily supports React-like libraries.")),/*#__PURE__*/l.createElement(zn,null,"See the"," ",/*#__PURE__*/l.createElement("a",{target:"_blank",href:"https://github.com/quantizor/markdown-to-jsx/blob/main/README.md",rel:"noopener noreferrer"},"project README")," ","for detailed installation & usage instructions.")),/*#__PURE__*/l.createElement(An,null,/*#__PURE__*/l.createElement(Tn,{onInput:r,value:n}),/*#__PURE__*/l.createElement(In,null,/*#__PURE__*/l.createElement(bn,{options:Ln},n))))}var wn="cornflowerblue",On="#fefefe",Cn=t.createGlobalStyle(rn||(rn=f(["\n\t*,\n\t*::before,\n\t*::after {\n\t\tbox-sizing: border-box;\n\t\toutline-color: ",";\n\t}\n\n\thtml,\n\tbody,\n\t#root,\n\tmain {\n\t\tmargin: 0;\n\t\tmin-height: 100vh;\n\t}\n\n\thtml {\n\t\tbackground: #1a1c23;\n\t\tcolor: ",";\n\t\tfont-family: Inter, Helvetica Neue, Helvetica, sans-serif;\n\t\tfont-size: 14px;\n\t\tline-height: 1.5;\n\t}\n\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6 {\n\t\tmargin: 0 0 1rem;\n text-wrap: balance;\n\t}\n\n\th1 {\n\t\tfont-size: 2rem;\n\t}\n\n\th2 {\n\t\tfont-size: 1.8rem;\n\t}\n\n\th3 {\n\t\tfont-size: 1.6rem;\n\t}\n\n\th4 {\n\t\tfont-size: 1.4rem;\n\t}\n\n\th5 {\n\t\tfont-size: 1.2rem;\n\t}\n\n\th6 {\n\t\tfont-size: 1rem;\n\t}\n\n\ta {\n\t\tcolor: ",";\n\t\ttransition: color 200ms ease;\n\n\t\t&:hover,\n\t\t&:focus {\n\t\t\tcolor: color-mix(in srgb, "," 75%, transparent);\n\t\t}\n\t}\n\n :root {\n --code-bg: color-mix(in srgb, "," 15%, transparent);\n }\n\n\tcode {\n background: var(--code-bg) !important;\n border-radius: 2px;\n\t\tdisplay: inline-block;\n font-family: 'Jetbrains Mono', Consolas, Monaco, monospace;\n font-size: 0.9em;\n\t\tpadding: 0 4px;\n text-decoration: inherit;\n\t}\n\n\tpre code {\n\t\tborder: 0;\n\t\tdisplay: block;\n\t\tpadding: 1em;\n\t}\n\n\tmain {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tpadding: 3rem 1.5rem 0;\n\t\tmargin: 0;\n\n\t\t@media all and (min-width: 1024px) {\n\t\t\tpadding: 3rem;\n\t\t}\n\t}\n\n p {\n text-wrap: balance;\n }\n"])),wn,On,wn,wn,wn),jn=u.default.header(an||(an=f(["\n flex-shrink: 0;\n margin-bottom: 2em;\n text-align: center;\n\n img {\n height: 100px;\n }\n"]))),Sn=u.default.p(on||(on=f(["\n font-size: 16px;\n margin-left: auto;\n margin-right: auto;\n max-width: 60vw;\n\n h1,\n h2 {\n font: inherit;\n }\n\n @media all and (max-width: 500px) {\n max-width: none;\n }\n\n @media all and (max-width: 1023px) {\n h1,\n h2 {\n display: block;\n margin-bottom: 1.5rem;\n }\n }\n"]))),zn=u.default.p(ln||(ln=f(["\n color: color-mix(in srgb, "," 20%, white);\n"])),On),Mn=t.css(cn||(cn=f(["\n flex: 0 0 50%;\n padding: 1em;\n"]))),An=u.default.section(un||(un=f(["\n display: flex;\n flex-grow: 1;\n margin-left: -1.5rem;\n margin-right: -1.5rem;\n\n @media all and (min-width: 1024px) {\n margin-left: 0;\n margin-right: 0;\n }\n\n @media all and (max-width: 500px) {\n flex-direction: column;\n }\n"]))),Tn=u.default.textarea(sn||(sn=f(["\n ",";\n background: color-mix(in srgb, "," 10%, transparent);\n border: 0;\n color: inherit;\n position: sticky;\n top: 0;\n font-family: 'Jetbrains Mono', Consolas, Monaco, monospace;\n font-size: inherit;\n max-height: 100vh;\n\n @media all and (max-width: 500px) {\n height: 300px;\n position: relative;\n }\n"])),Mn,wn),In=u.default.div(dn||(dn=f(["\n ",";\n padding-left: 2rem;\n padding-right: 1rem;\n overflow: auto;\n overflow-x: hidden;\n"])),Mn),$n=u.default.button(fn||(fn=f(["\n background: color-mix(in srgb, "," 50%, black);\n border: 1px solid color-mix(in srgb, "," 50%, transparent);\n border-radius: 2px;\n color: #fff;\n cursor: pointer;\n padding: 0.25em 0.75em;\n font: inherit;\n transition: background 200ms ease;\n\n &:hover,\n &:focus {\n background: ",";\n }\n\n &:active {\n background: color-mix(in srgb, "," 80%, black);\n }\n"])),wn,wn,wn,wn),Ln={overrides:{code:function(e){var n=l.useRef(null);return l.useEffect(function(){var t;n.current&&null!=(t=e.className)&&t.includes("lang-")&&window.hljs&&(window.hljs.highlightElement(n.current),n.current.removeAttribute("data-highlighted"))},[e.className,e.children]),/*#__PURE__*/l.createElement("code",d({},e,{ref:n}))},MyComponent:{component:function(e){/*#__PURE__*/return l.createElement($n,d({},e,{onClick:function(){alert("Look ma, I'm a real component!")}}))}}},renderRule:function(e,n,t,r){return"3"===n.type&&"latex"===n.lang?/*#__PURE__*/l.createElement(p,{as:"div",key:r.key,style:{margin:"1.5em 0"}},String.raw(mn||(mn=f(["",""])),n.text)):e()}};c.render(/*#__PURE__*/l.createElement(En,null),document.getElementById("root"))}(React,ReactDOM,styled,katex); +!function(e,n,t,r){function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function a(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach(function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}}),n.default=e,n}var o=/*#__PURE__*/i(e),l=/*#__PURE__*/a(e),c=/*#__PURE__*/a(n),u=/*#__PURE__*/i(t),s=/*#__PURE__*/i(r);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(n,["children","math","block","errorColor","renderError","settings","as"]),f=u||(i?"div":"span"),p=null!=t?t:r,h=e.useState({innerHtml:""}),g=h[0],y=h[1];return e.useEffect(function(){try{var e=s.default.renderToString(p,m({displayMode:!!i,errorColor:a,throwOnError:!!l},c));y({innerHtml:e})}catch(e){if(!(e instanceof s.default.ParseError||e instanceof TypeError))throw e;y(l?{errorElement:l(e)}:{innerHtml:e.message})}},[i,p,a,l,c]),"errorElement"in g?g.errorElement:o.default.createElement(f,Object.assign({},d,{dangerouslySetInnerHTML:{__html:g.innerHtml}}))});function h(){return h=Object.assign?Object.assign.bind():function(e){for(var n=1;n",lt:"<",nbsp:" ",quot:"“"},E=["style","script"],w=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,O=/mailto:/i,C=/\n{2,}$/,S=/^( *>[^\n]+(\n[^\n]+)*\n*)+\n{2,}/,j=/^ *> ?/gm,z=/^ {2,}\n/,M=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,R=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,A=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,T=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,I=/^(?:\n *)*\n/,$=/\r\n?/g,L=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,H=/^\[\^([^\]]+)]/,_=/\f/g,N=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,P=/^\s*?\[(x|\s)\]/,B=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,D=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,U=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,G=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?([^>]*)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,F=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,W=/^)/,q=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Z=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,J=/^\{.*\}$/,X=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,V=/^<([^ >]+@[^ >]+)>/,Q=/^<([^ >]+:\/[^ >]+)>/,K=/-([a-z])?/gi,Y=/^(.*\|?.*)\n *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*)\n?/,ee=/^\[([^\]]*)\]:\s+]+)>?\s*("([^"]*)")?/,ne=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,te=/^\[([^\]]*)\] ?\[([^\]]*)\]/,re=/(\[|\])/g,ie=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,ae=/\t/g,oe=/^ *\| */,le=/(^ *\||\| *$)/g,ce=/ *$/,ue=/^ *:-+: *$/,se=/^ *:-+ *$/,de=/^ *-+: *$/,fe="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~~.*?~~|==.*?==|.|\\n)*?)",me=new RegExp("^([*_])\\1"+fe+"\\1\\1(?!\\1)"),pe=new RegExp("^([*_])"+fe+"\\1(?!\\1|\\w)"),he=new RegExp("^=="+fe+"=="),ge=new RegExp("^~~"+fe+"~~"),ye=/^\\([^0-9A-Za-z\s])/,ve=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,ke=/^\n+/,xe=/^([ \t]*)/,be=/\\([^\\])/g,Ee=/ *\n+$/,we=/(?:^|\n)( *)$/,Oe="(?:\\d+\\.)",Ce="(?:[*+-])";function Se(e){return"( *)("+(1===e?Oe:Ce)+") +"}var je=Se(1),ze=Se(2);function Me(e){return new RegExp("^"+(1===e?je:ze))}var Re=Me(1),Ae=Me(2);function Te(e){return new RegExp("^"+(1===e?je:ze)+"[^\\n]*(?:\\n(?!\\1"+(1===e?Oe:Ce)+" )[^\\n]*)*(\\n|$)","gm")}var Ie=Te(1),$e=Te(2);function Le(e){var n=1===e?Oe:Ce;return new RegExp("^( *)("+n+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+n+" (?!"+n+" ))\\n*|\\s*\\n*$)")}var He=Le(1),_e=Le(2);function Ne(e,n){var t=1===n,r=t?He:_e,i=t?Ie:$e,a=t?Re:Ae;return{match:function(e,n,t){var i=we.exec(t);return i&&(n.list||!n.inline&&!n.simple)?r.exec(e=i[1]+e):null},order:1,parse:function(e,n,r){var o=t?+e[2]:void 0,l=e[0].replace(C,"\n").match(i),c=!1;return{items:l.map(function(e,t){var i=a.exec(e)[0].length,o=new RegExp("^ {1,"+i+"}","gm"),u=e.replace(o,"").replace(a,""),s=t===l.length-1,d=-1!==u.indexOf("\n\n")||s&&c;c=d;var f,m=r.inline,p=r.list;r.list=!0,d?(r.inline=!1,f=u.replace(Ee,"\n\n")):(r.inline=!0,f=u.replace(Ee,""));var h=n(f,r);return r.inline=m,r.list=p,h}),ordered:t,start:o}},render:function(n,t,r){return e(n.ordered?"ol":"ul",{key:r.key,start:"20"===n.type?n.start:void 0},n.items.map(function(n,i){return e("li",{key:i},t(n,r))}))}}}var Pe=new RegExp("^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*?(?:\\s+['\"]([\\s\\S]*?)['\"])?\\s*\\)"),Be=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,De=[S,R,A,B,U,D,W,Y,Ie,He,$e,_e],Ue=[].concat(De,[/^[^\n]+(?: \n|\n{2,})/,G,Z]);function Ge(e){return e.replace(/[ÀÁÂÃÄÅàáâãäåæÆ]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function Fe(e){return de.test(e)?"right":ue.test(e)?"center":se.test(e)?"left":null}function We(e,n,t){var r=t.inTable;t.inTable=!0;var i=n(e.trim(),t);t.inTable=r;var a=[[]];return i.forEach(function(e,n){"26"===e.type?0!==n&&n!==i.length-1&&a.push([]):("27"!==e.type||null!=i[n+1]&&"26"!==i[n+1].type||(e.text=e.text.replace(ce,"")),a[a.length-1].push(e))}),a}function qe(e,n,t){t.inline=!0;var r=We(e[1],n,t),i=e[2].replace(le,"").split("|").map(Fe),a=function(e,n,t){return e.trim().split("\n").map(function(e){return We(e,n,t)})}(e[3],n,t);return t.inline=!1,{align:i,cells:a,header:r,type:"25"}}function Ze(e,n){return null==e.align[n]?{}:{textAlign:e.align[n]}}function Je(e){return function(n,t){return t.inline?e.exec(n):null}}function Xe(e){return function(n,t){return t.inline||t.simple?e.exec(n):null}}function Ve(e){return function(n,t){return t.inline||t.simple?null:e.exec(n)}}function Qe(e){return function(n){return e.exec(n)}}function Ke(e,n,t){if(n.inline||n.simple)return null;if(t&&!t.endsWith("\n"))return null;var r="";e.split("\n").every(function(e){return!De.some(function(n){return n.test(e)})&&(r+=e+"\n",e.trim())});var i=r.trimEnd();return""==i?null:[r,i]}function Ye(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data(?!:image)):/i))return}catch(e){return null}return e}function en(e){return e.replace(be,"$1")}function nn(e,n,t){var r=t.inline||!1,i=t.simple||!1;t.inline=!0,t.simple=!0;var a=e(n,t);return t.inline=r,t.simple=i,a}function tn(e,n,t){var r=t.inline||!1,i=t.simple||!1;t.inline=!1,t.simple=!0;var a=e(n,t);return t.inline=r,t.simple=i,a}function rn(e,n,t){return t.inline=!1,e(n,t)}var an,on,ln,cn,un,sn,dn,fn,mn,pn,hn=function(e,n,t){return{children:nn(n,e[1],t)}};function gn(){return{}}function yn(){return null}function vn(){return[].slice.call(arguments).filter(Boolean).join(" ")}function kn(e,n,t){for(var r=e,i=n.split(".");i.length&&void 0!==(r=r[i[0]]);)i.shift();return r||t}function xn(e,n){var t=kn(n,e);return t?"function"==typeof t||"object"==typeof t&&"render"in t?t:kn(n,e+".component",e):e}function bn(e,n){var t;void 0===n&&(n={}),n.overrides=n.overrides||{},n.slugify=n.slugify||Ge,n.namedCodesToUnicode=n.namedCodesToUnicode?h({},b,n.namedCodesToUnicode):b;var r=n.createElement||l.createElement;function i(e,t){var i=kn(n.overrides,e+".props",{});return r.apply(void 0,[xn(e,n.overrides),h({},t,i,{className:vn(null==t?void 0:t.className,i.className)||void 0})].concat([].slice.call(arguments,2)))}function a(e){e=e.replace(N,"");var t=!1;n.forceInline?t=!0:n.forceBlock||(t=!1===ie.test(e));for(var r=m(f(t?e:e.trimEnd().replace(ke,"")+"\n\n",{inline:t}));"string"==typeof r[r.length-1]&&!r[r.length-1].trim();)r.pop();if(null===n.wrapper)return r;var a,o=n.wrapper||(t?"span":"div");if(r.length>1||n.forceWrapper)a=r;else{if(1===r.length)return"string"==typeof(a=r[0])?i("span",{key:"outer"},a):a;a=null}return l.createElement(o,{key:"outer"},a)}function o(e){var n=e.match(w);return n?n.reduce(function(e,n,t){var r=n.indexOf("=");if(-1!==r){var i=function(e){return-1!==e.indexOf("-")&&null===e.match(q)&&(e=e.replace(K,function(e,n){return n.toUpperCase()})),e}(n.slice(0,r)).trim(),o=function(e){var n=e[0];return('"'===n||"'"===n)&&e.length>=2&&e[e.length-1]===n?e.slice(1,-1):e}(n.slice(r+1).trim()),c=x[i]||i,u=e[c]=function(e,n){return"style"===e?n.split(/;\s?/).reduce(function(e,n){var t=n.slice(0,n.indexOf(":"));return e[t.trim().replace(/(-[a-z])/g,function(e){return e[1].toUpperCase()})]=n.slice(t.length+1).trim(),e},{}):"href"===e||"src"===e?Ye(n):(n.match(J)&&(n=n.slice(1,n.length-1)),"true"===n||"false"!==n&&n)}(i,o);"string"==typeof u&&(G.test(u)||Z.test(u))&&(e[c]=l.cloneElement(a(u.trim()),{key:t}))}else"style"!==n&&(e[x[n]||n]=!0);return e},{}):null}var c=[],u={},s=((t={})[0]={match:Ve(S),order:1,parse:function(e,n,t){return{children:n(e[0].replace(j,""),t)}},render:function(e,n,t){return i("blockquote",{key:t.key},n(e.children,t))}},t[1]={match:Qe(z),order:1,parse:gn,render:function(e,n,t){return i("br",{key:t.key})}},t[2]={match:Ve(M),order:1,parse:gn,render:function(e,n,t){return i("hr",{key:t.key})}},t[3]={match:Ve(A),order:0,parse:function(e){return{lang:void 0,text:e[0].replace(/^ {4}/gm,"").replace(/\n+$/,"")}},render:function(e,n,t){return i("pre",{key:t.key},i("code",h({},e.attrs,{className:e.lang?"lang-"+e.lang:""}),e.text))}},t[4]={match:Ve(R),order:0,parse:function(e){return{attrs:o(e[3]||""),lang:e[2]||void 0,text:e[4],type:"3"}}},t[5]={match:Xe(T),order:3,parse:function(e){return{text:e[2]}},render:function(e,n,t){return i("code",{key:t.key},e.text)}},t[6]={match:Ve(L),order:0,parse:function(e){return c.push({footnote:e[2],identifier:e[1]}),{}},render:yn},t[7]={match:Je(H),order:1,parse:function(e){return{target:"#"+n.slugify(e[1]),text:e[1]}},render:function(e,n,t){return i("a",{key:t.key,href:Ye(e.target)},i("sup",{key:t.key},e.text))}},t[8]={match:Je(P),order:1,parse:function(e){return{completed:"x"===e[1].toLowerCase()}},render:function(e,n,t){return i("input",{checked:e.completed,key:t.key,readOnly:!0,type:"checkbox"})}},t[9]={match:Ve(n.enforceAtxHeadings?D:B),order:1,parse:function(e,t,r){return{children:nn(t,e[2],r),id:n.slugify(e[2]),level:e[1].length}},render:function(e,n,t){return i("h"+e.level,{id:e.id,key:t.key},n(e.children,t))}},t[10]={match:Ve(U),order:0,parse:function(e,n,t){return{children:nn(n,e[1],t),level:"="===e[2]?1:2,type:"9"}}},t[11]={match:Qe(G),order:1,parse:function(e,n,t){var r,i=e[3].match(xe),a=new RegExp("^"+i[1],"gm"),l=e[3].replace(a,""),c=(r=l,Ue.some(function(e){return e.test(r)})?rn:nn),u=e[1].toLowerCase(),s=-1!==E.indexOf(u),d={attrs:o(e[2]),noInnerParse:s,tag:(s?u:e[1]).trim()};return t.inAnchor=t.inAnchor||"a"===u,s?d.text=e[3]:d.children=c(n,l,t),t.inAnchor=!1,d},render:function(e,n,t){return i(e.tag,h({key:t.key},e.attrs),e.text||n(e.children,t))}},t[13]={match:Qe(Z),order:1,parse:function(e){return{attrs:o(e[2]||""),tag:e[1].trim()}},render:function(e,n,t){return i(e.tag,h({},e.attrs,{key:t.key}))}},t[12]={match:Qe(W),order:1,parse:function(){return{}},render:yn},t[14]={match:Xe(Be),order:1,parse:function(e){return{alt:e[1],target:en(e[2]),title:e[3]}},render:function(e,n,t){return i("img",{key:t.key,alt:e.alt||void 0,title:e.title||void 0,src:Ye(e.target)})}},t[15]={match:Je(Pe),order:3,parse:function(e,n,t){return{children:tn(n,e[1],t),target:en(e[2]),title:e[3]}},render:function(e,n,t){return i("a",{key:t.key,href:Ye(e.target),title:e.title},n(e.children,t))}},t[16]={match:Je(Q),order:0,parse:function(e){return{children:[{text:e[1],type:"27"}],target:e[1],type:"15"}}},t[17]={match:function(e,n){return n.inAnchor?null:Je(X)(e,n)},order:0,parse:function(e){return{children:[{text:e[1],type:"27"}],target:e[1],title:void 0,type:"15"}}},t[18]={match:Je(V),order:0,parse:function(e){var n=e[1],t=e[1];return O.test(t)||(t="mailto:"+t),{children:[{text:n.replace("mailto:",""),type:"27"}],target:t,type:"15"}}},t[20]=Ne(i,1),t[33]=Ne(i,2),t[19]={match:Ve(I),order:3,parse:gn,render:function(){return"\n"}},t[21]={match:Ke,order:3,parse:hn,render:function(e,n,t){return i("p",{key:t.key},n(e.children,t))}},t[22]={match:Je(ee),order:0,parse:function(e){return u[e[1]]={target:e[2],title:e[4]},{}},render:yn},t[23]={match:Xe(ne),order:0,parse:function(e){return{alt:e[1]||void 0,ref:e[2]}},render:function(e,n,t){return u[e.ref]?i("img",{key:t.key,alt:e.alt,src:Ye(u[e.ref].target),title:u[e.ref].title}):null}},t[24]={match:Je(te),order:0,parse:function(e,n,t){return{children:n(e[1],t),fallbackChildren:n(e[0].replace(re,"\\$1"),t),ref:e[2]}},render:function(e,n,t){return u[e.ref]?i("a",{key:t.key,href:Ye(u[e.ref].target),title:u[e.ref].title},n(e.children,t)):i("span",{key:t.key},n(e.fallbackChildren,t))}},t[25]={match:Ve(Y),order:1,parse:qe,render:function(e,n,t){return i("table",{key:t.key},i("thead",null,i("tr",null,e.header.map(function(r,a){return i("th",{key:a,style:Ze(e,a)},n(r,t))}))),i("tbody",null,e.cells.map(function(r,a){return i("tr",{key:a},r.map(function(r,a){return i("td",{key:a,style:Ze(e,a)},n(r,t))}))})))}},t[26]={match:function(e,n){return n.inTable?(n.inline=!0,oe.exec(e)):null},order:1,parse:function(){return{type:"26"}},render:function(){return" | "}},t[27]={match:Qe(ve),order:4,parse:function(e){return{text:e[0].replace(F,function(e,t){return n.namedCodesToUnicode[t]?n.namedCodesToUnicode[t]:e})}},render:function(e){return e.text}},t[28]={match:Xe(me),order:2,parse:function(e,n,t){return{children:n(e[2],t)}},render:function(e,n,t){return i("strong",{key:t.key},n(e.children,t))}},t[29]={match:Xe(pe),order:3,parse:function(e,n,t){return{children:n(e[2],t)}},render:function(e,n,t){return i("em",{key:t.key},n(e.children,t))}},t[30]={match:Xe(ye),order:1,parse:function(e){return{text:e[1],type:"27"}}},t[31]={match:Xe(he),order:3,parse:hn,render:function(e,n,t){return i("mark",{key:t.key},n(e.children,t))}},t[32]={match:Xe(ge),order:3,parse:hn,render:function(e,n,t){return i("del",{key:t.key},n(e.children,t))}},t);!0===n.disableParsingRawHTML&&(delete s[11],delete s[13]);var d,f=function(e){var n=Object.keys(e);function t(r,i){for(var a=[],o="";r;)for(var l=0;l=0||(i[t]=e[t]);return i}(e,k);return l.cloneElement(bn(n,t),r)}function wn(){var e=l.useState(document.getElementById("sample-content").textContent.trim()),n=e[0],t=e[1],r=l.useCallback(function(e){return t(e.target.value)},[]);/*#__PURE__*/return l.createElement("main",null,/*#__PURE__*/l.createElement(Sn,null),/*#__PURE__*/l.createElement(jn,null,/*#__PURE__*/l.createElement("a",{target:"_blank",href:"https://github.com/quantizor/markdown-to-jsx",title:"Check out the markdown-to-jsx source code",rel:"noopener noreferrer"},/*#__PURE__*/l.createElement("img",{src:"./images/logo.svg",alt:"markdown-to-jsx logo"})),/*#__PURE__*/l.createElement(zn,null,/*#__PURE__*/l.createElement("h1",null,/*#__PURE__*/l.createElement("code",null,"markdown-to-jsx")," is an easy-to-use markdown component that takes Github-flavored Markdown (GFM) and makes native JSX without dangerous hacks. "),/*#__PURE__*/l.createElement("h2",null,"It's lightweight, customizable, and happily supports React-like libraries.")),/*#__PURE__*/l.createElement(Mn,null,"See the"," ",/*#__PURE__*/l.createElement("a",{target:"_blank",href:"https://github.com/quantizor/markdown-to-jsx/blob/main/README.md",rel:"noopener noreferrer"},"project README")," ","for detailed installation & usage instructions.")),/*#__PURE__*/l.createElement(An,null,/*#__PURE__*/l.createElement(Tn,{onInput:r,value:n}),/*#__PURE__*/l.createElement(In,null,/*#__PURE__*/l.createElement(En,{options:Ln},n))))}var On="cornflowerblue",Cn="#fefefe",Sn=t.createGlobalStyle(an||(an=f(["\n\t*,\n\t*::before,\n\t*::after {\n\t\tbox-sizing: border-box;\n\t\toutline-color: ",";\n\t}\n\n\thtml,\n\tbody,\n\t#root,\n\tmain {\n\t\tmargin: 0;\n\t\tmin-height: 100vh;\n\t}\n\n\thtml {\n\t\tbackground: #1a1c23;\n\t\tcolor: ",";\n\t\tfont-family: Inter, Helvetica Neue, Helvetica, sans-serif;\n\t\tfont-size: 14px;\n\t\tline-height: 1.5;\n\t}\n\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6 {\n\t\tmargin: 0 0 1rem;\n text-wrap: balance;\n\t}\n\n\th1 {\n\t\tfont-size: 2rem;\n\t}\n\n\th2 {\n\t\tfont-size: 1.8rem;\n\t}\n\n\th3 {\n\t\tfont-size: 1.6rem;\n\t}\n\n\th4 {\n\t\tfont-size: 1.4rem;\n\t}\n\n\th5 {\n\t\tfont-size: 1.2rem;\n\t}\n\n\th6 {\n\t\tfont-size: 1rem;\n\t}\n\n\ta {\n\t\tcolor: ",";\n\t\ttransition: color 200ms ease;\n\n\t\t&:hover,\n\t\t&:focus {\n\t\t\tcolor: color-mix(in srgb, "," 75%, transparent);\n\t\t}\n\t}\n\n :root {\n --code-bg: color-mix(in srgb, "," 15%, transparent);\n }\n\n\tcode {\n background: var(--code-bg) !important;\n border-radius: 2px;\n\t\tdisplay: inline-block;\n font-family: 'Jetbrains Mono', Consolas, Monaco, monospace;\n font-size: 0.9em;\n\t\tpadding: 0 4px;\n text-decoration: inherit;\n\t}\n\n\tpre code {\n\t\tborder: 0;\n\t\tdisplay: block;\n\t\tpadding: 1em;\n\t}\n\n\tmain {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tpadding: 3rem 1.5rem 0;\n\t\tmargin: 0;\n\n\t\t@media all and (min-width: 1024px) {\n\t\t\tpadding: 3rem;\n\t\t}\n\t}\n\n p {\n text-wrap: balance;\n }\n"])),On,Cn,On,On,On),jn=u.default.header(on||(on=f(["\n flex-shrink: 0;\n margin-bottom: 2em;\n text-align: center;\n\n img {\n height: 100px;\n }\n"]))),zn=u.default.p(ln||(ln=f(["\n font-size: 16px;\n margin-left: auto;\n margin-right: auto;\n max-width: 60vw;\n\n h1,\n h2 {\n font: inherit;\n }\n\n @media all and (max-width: 500px) {\n max-width: none;\n }\n\n @media all and (max-width: 1023px) {\n h1,\n h2 {\n display: block;\n margin-bottom: 1.5rem;\n }\n }\n"]))),Mn=u.default.p(cn||(cn=f(["\n color: color-mix(in srgb, "," 20%, white);\n"])),Cn),Rn=t.css(un||(un=f(["\n flex: 0 0 50%;\n padding: 1em;\n"]))),An=u.default.section(sn||(sn=f(["\n display: flex;\n flex-grow: 1;\n margin-left: -1.5rem;\n margin-right: -1.5rem;\n\n @media all and (min-width: 1024px) {\n margin-left: 0;\n margin-right: 0;\n }\n\n @media all and (max-width: 500px) {\n flex-direction: column;\n }\n"]))),Tn=u.default.textarea(dn||(dn=f(["\n ",";\n background: color-mix(in srgb, "," 10%, transparent);\n border: 0;\n color: inherit;\n position: sticky;\n top: 0;\n font-family: 'Jetbrains Mono', Consolas, Monaco, monospace;\n font-size: inherit;\n max-height: 100vh;\n\n @media all and (max-width: 500px) {\n height: 300px;\n position: relative;\n }\n"])),Rn,On),In=u.default.div(fn||(fn=f(["\n ",";\n padding-left: 2rem;\n padding-right: 1rem;\n overflow: auto;\n overflow-x: hidden;\n"])),Rn),$n=u.default.button(mn||(mn=f(["\n background: color-mix(in srgb, "," 50%, black);\n border: 1px solid color-mix(in srgb, "," 50%, transparent);\n border-radius: 2px;\n color: #fff;\n cursor: pointer;\n padding: 0.25em 0.75em;\n font: inherit;\n transition: background 200ms ease;\n\n &:hover,\n &:focus {\n background: ",";\n }\n\n &:active {\n background: color-mix(in srgb, "," 80%, black);\n }\n"])),On,On,On,On),Ln={overrides:{code:function(e){var n=l.useRef(null);return l.useEffect(function(){var t;n.current&&null!=(t=e.className)&&t.includes("lang-")&&window.hljs&&(window.hljs.highlightElement(n.current),n.current.removeAttribute("data-highlighted"))},[e.className,e.children]),/*#__PURE__*/l.createElement("code",d({},e,{ref:n}))},MyComponent:{component:function(e){/*#__PURE__*/return l.createElement($n,d({},e,{onClick:function(){alert("Look ma, I'm a real component!")}}))}}},renderRule:function(e,n,t,r){return"3"===n.type&&"latex"===n.lang?/*#__PURE__*/l.createElement(p,{as:"div",key:r.key,style:{margin:"1.5em 0"}},String.raw(pn||(pn=f(["",""])),n.text)):e()}};c.render(/*#__PURE__*/l.createElement(wn,null),document.getElementById("root"))}(React,ReactDOM,styled,katex); //# sourceMappingURL=markdown-to-jsx.js.map diff --git a/docs/markdown-to-jsx.js.map b/docs/markdown-to-jsx.js.map index 0763e18c..9dc20864 100644 --- a/docs/markdown-to-jsx.js.map +++ b/docs/markdown-to-jsx.js.map @@ -1 +1 @@ -{"version":3,"file":"markdown-to-jsx.js","sources":["../node_modules/@matejmazur/react-katex/dist/react-katex.m.js","../dist/index.module.js","../site.tsx"],"sourcesContent":["import r,{memo as e,useState as n,useEffect as t}from\"react\";import o from\"katex\";function a(){return(a=Object.assign||function(r){for(var e=1;e=0||(o[n]=r[n]);return o}(e,[\"children\",\"math\",\"block\",\"errorColor\",\"renderError\",\"settings\",\"as\"]),d=u||(s?\"div\":\"span\"),p=null!=i?i:l,g=n({innerHtml:\"\"}),E=g[0],v=g[1];return t(function(){try{var r=o.renderToString(p,a({displayMode:!!s,errorColor:c,throwOnError:!!f},m));v({innerHtml:r})}catch(r){if(!(r instanceof o.ParseError||r instanceof TypeError))throw r;v(f?{errorElement:f(r)}:{innerHtml:r.message})}},[s,p,c,f,m]),\"errorElement\"in E?E.errorElement:r.createElement(d,Object.assign({},h,{dangerouslySetInnerHTML:{__html:E.innerHtml}}))});export default i;\n//# sourceMappingURL=react-katex.m.js.map\n","import*as e from\"react\";function n(){return n=Object.assign?Object.assign.bind():function(e){for(var n=1;n\",lt:\"<\",nbsp:\" \",quot:\"“\"},o=[\"style\",\"script\"],l=/([-A-Z0-9_:]+)(?:\\s*=\\s*(?:(?:\"((?:\\\\.|[^\"])*)\")|(?:'((?:\\\\.|[^'])*)')|(?:\\{((?:\\\\.|{[^}]*?}|[^}])*)\\})))?/gi,u=/mailto:/i,s=/\\n{2,}$/,f=/^( *>[^\\n]+(\\n[^\\n]+)*\\n*)+\\n{2,}/,d=/^ *> ?/gm,p=/^ {2,}\\n/,h=/^(?:( *[-*_])){3,} *(?:\\n *)+\\n/,m=/^\\s*(`{3,}|~{3,}) *(\\S+)?([^\\n]*?)?\\n([\\s\\S]+?)\\s*\\1 *(?:\\n *)*\\n?/,g=/^(?: {4}[^\\n]+\\n*)+(?:\\n *)+\\n?/,y=/^(`+)\\s*([\\s\\S]*?[^`])\\s*\\1(?!`)/,k=/^(?:\\n *)*\\n/,v=/\\r\\n?/g,x=/^\\[\\^([^\\]]+)](:.*)\\n/,b=/^\\[\\^([^\\]]+)]/,S=/\\f/g,w=/^---[ \\t]*\\n(.|\\n)*\\n---[ \\t]*\\n/,C=/^\\s*?\\[(x|\\s)\\]/,E=/^ *(#{1,6}) *([^\\n]+?)(?: +#*)?(?:\\n *)*(?:\\n|$)/,$=/^ *(#{1,6}) +([^\\n]+?)(?: +#*)?(?:\\n *)*(?:\\n|$)/,A=/^([^\\n]+)\\n *(=|-){3,} *(?:\\n *)+\\n/,O=/^ *(?!<[a-z][^ >/]* ?\\/>)<([a-z][^ >/]*) ?([^>]*)\\/{0}>\\n?(\\s*(?:<\\1[^>]*?>[\\s\\S]*?<\\/\\1>|(?!<\\1)[\\s\\S])*?)<\\/\\1>\\n*/i,T=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,L=/^)/,z=/^(data|aria|x)-[a-z_][a-z\\d_.-]*$/,M=/^ *<([a-z][a-z0-9:]*)(?:\\s+((?:<.*?>|[^>])*))?\\/?>(?!<\\/\\1>)(\\s*\\n)?/i,I=/^\\{.*\\}$/,R=/^(https?:\\/\\/[^\\s<]+[^<.,:;\"')\\]\\s])/,U=/^<([^ >]+@[^ >]+)>/,j=/^<([^ >]+:\\/[^ >]+)>/,B=/-([a-z])?/gi,N=/^(.*\\|?.*)\\n *(\\|? *[-:]+ *\\|[-| :]*)\\n((?:.*\\|.*\\n)*)\\n?/,H=/^\\[([^\\]]*)\\]:\\s+]+)>?\\s*(\"([^\"]*)\")?/,D=/^!\\[([^\\]]*)\\] ?\\[([^\\]]*)\\]/,P=/^\\[([^\\]]*)\\] ?\\[([^\\]]*)\\]/,_=/(\\[|\\])/g,F=/(\\n|^[-*]\\s|^#|^ {2,}|^-{2,}|^>\\s)/,W=/\\t/g,G=/^ *\\| */,Z=/(^ *\\||\\| *$)/g,q=/ *$/,V=/^ *:-+: *$/,X=/^ *:-+ *$/,Q=/^ *-+: *$/,J=/^([*_])\\1((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\\1\\1(?!\\1)/,K=/^([*_])((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\\1(?!\\1|\\w)/,Y=/^==((?:\\[.*?\\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)==/,ee=/^~~((?:\\[.*?\\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)~~/,ne=/^\\\\([^0-9A-Za-z\\s])/,re=/^[\\s\\S]+?(?=[^0-9A-Z\\s\\u00c0-\\uffff&#;.()'\"]|\\d+\\.|\\n\\n| {2,}\\n|\\w+:\\S|$)/i,te=/^\\n+/,ie=/^([ \\t]*)/,ae=/\\\\([^\\\\])/g,ce=/ *\\n+$/,oe=/(?:^|\\n)( *)$/,le=\"(?:\\\\d+\\\\.)\",ue=\"(?:[*+-])\";function se(e){return\"( *)(\"+(1===e?le:ue)+\") +\"}var fe=se(1),de=se(2);function pe(e){return new RegExp(\"^\"+(1===e?fe:de))}var he=pe(1),me=pe(2);function ge(e){return new RegExp(\"^\"+(1===e?fe:de)+\"[^\\\\n]*(?:\\\\n(?!\\\\1\"+(1===e?le:ue)+\" )[^\\\\n]*)*(\\\\n|$)\",\"gm\")}var ye=ge(1),ke=ge(2);function ve(e){var n=1===e?le:ue;return new RegExp(\"^( *)(\"+n+\") [\\\\s\\\\S]+?(?:\\\\n{2,}(?! )(?!\\\\1\"+n+\" (?!\"+n+\" ))\\\\n*|\\\\s*\\\\n*$)\")}var xe=ve(1),be=ve(2);function Se(e,n){var r=1===n,t=r?xe:be,i=r?ye:ke,a=r?he:me;return{match:function(e,n,r){var i=oe.exec(r);return i&&(n.list||!n.inline&&!n.simple)?t.exec(e=i[1]+e):null},order:1,parse:function(e,n,t){var c=r?+e[2]:void 0,o=e[0].replace(s,\"\\n\").match(i),l=!1;return{items:o.map(function(e,r){var i=a.exec(e)[0].length,c=new RegExp(\"^ {1,\"+i+\"}\",\"gm\"),u=e.replace(c,\"\").replace(a,\"\"),s=r===o.length-1,f=-1!==u.indexOf(\"\\n\\n\")||s&&l;l=f;var d,p=t.inline,h=t.list;t.list=!0,f?(t.inline=!1,d=u.replace(ce,\"\\n\\n\")):(t.inline=!0,d=u.replace(ce,\"\"));var m=n(d,t);return t.inline=p,t.list=h,m}),ordered:r,start:c}},render:function(n,r,t){return e(n.ordered?\"ol\":\"ul\",{key:t.key,start:\"20\"===n.type?n.start:void 0},n.items.map(function(n,i){return e(\"li\",{key:i},r(n,t))}))}}}var we=/^\\[([^\\]]*)]\\( *((?:\\([^)]*\\)|[^() ])*) *\"?([^)\"]*)?\"?\\)/,Ce=/^!\\[([^\\]]*)]\\( *((?:\\([^)]*\\)|[^() ])*) *\"?([^)\"]*)?\"?\\)/,Ee=[f,m,g,E,A,$,L,N,ye,xe,ke,be],$e=[].concat(Ee,[/^[^\\n]+(?: \\n|\\n{2,})/,O,M]);function Ae(e){return e.replace(/[ÀÁÂÃÄÅàáâãäåæÆ]/g,\"a\").replace(/[çÇ]/g,\"c\").replace(/[ðÐ]/g,\"d\").replace(/[ÈÉÊËéèêë]/g,\"e\").replace(/[ÏïÎîÍíÌì]/g,\"i\").replace(/[Ññ]/g,\"n\").replace(/[øØœŒÕõÔôÓóÒò]/g,\"o\").replace(/[ÜüÛûÚúÙù]/g,\"u\").replace(/[ŸÿÝý]/g,\"y\").replace(/[^a-z0-9- ]/gi,\"\").replace(/ /gi,\"-\").toLowerCase()}function Oe(e){return Q.test(e)?\"right\":V.test(e)?\"center\":X.test(e)?\"left\":null}function Te(e,n,r){var t=r.inTable;r.inTable=!0;var i=n(e.trim(),r);r.inTable=t;var a=[[]];return i.forEach(function(e,n){\"26\"===e.type?0!==n&&n!==i.length-1&&a.push([]):(\"27\"!==e.type||null!=i[n+1]&&\"26\"!==i[n+1].type||(e.text=e.text.replace(q,\"\")),a[a.length-1].push(e))}),a}function Le(e,n,r){r.inline=!0;var t=Te(e[1],n,r),i=e[2].replace(Z,\"\").split(\"|\").map(Oe),a=function(e,n,r){return e.trim().split(\"\\n\").map(function(e){return Te(e,n,r)})}(e[3],n,r);return r.inline=!1,{align:i,cells:a,header:t,type:\"25\"}}function ze(e,n){return null==e.align[n]?{}:{textAlign:e.align[n]}}function Me(e){return function(n,r){return r.inline?e.exec(n):null}}function Ie(e){return function(n,r){return r.inline||r.simple?e.exec(n):null}}function Re(e){return function(n,r){return r.inline||r.simple?null:e.exec(n)}}function Ue(e){return function(n){return e.exec(n)}}function je(e,n,r){if(n.inline||n.simple)return null;if(r&&!r.endsWith(\"\\n\"))return null;var t=\"\";e.split(\"\\n\").every(function(e){return!Ee.some(function(n){return n.test(e)})&&(t+=e+\"\\n\",e.trim())});var i=t.trimEnd();return\"\"==i?null:[t,i]}function Be(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,\"\").match(/^\\s*(javascript|vbscript|data(?!:image)):/i))return}catch(e){return null}return e}function Ne(e){return e.replace(ae,\"$1\")}function He(e,n,r){var t=r.inline||!1,i=r.simple||!1;r.inline=!0,r.simple=!0;var a=e(n,r);return r.inline=t,r.simple=i,a}function De(e,n,r){var t=r.inline||!1,i=r.simple||!1;r.inline=!1,r.simple=!0;var a=e(n,r);return r.inline=t,r.simple=i,a}function Pe(e,n,r){return r.inline=!1,e(n,r)}var _e=function(e,n,r){return{children:He(n,e[1],r)}};function Fe(){return{}}function We(){return null}function Ge(){return[].slice.call(arguments).filter(Boolean).join(\" \")}function Ze(e,n,r){for(var t=e,i=n.split(\".\");i.length&&void 0!==(t=t[i[0]]);)i.shift();return t||r}function qe(e,n){var r=Ze(n,e);return r?\"function\"==typeof r||\"object\"==typeof r&&\"render\"in r?r:Ze(n,e+\".component\",e):e}function Ve(r,t){var i;void 0===t&&(t={}),t.overrides=t.overrides||{},t.slugify=t.slugify||Ae,t.namedCodesToUnicode=t.namedCodesToUnicode?n({},c,t.namedCodesToUnicode):c;var s=t.createElement||e.createElement;function Z(e,r){var i=Ze(t.overrides,e+\".props\",{});return s.apply(void 0,[qe(e,t.overrides),n({},r,i,{className:Ge(null==r?void 0:r.className,i.className)||void 0})].concat([].slice.call(arguments,2)))}function q(n){n=n.replace(w,\"\");var r=!1;t.forceInline?r=!0:t.forceBlock||(r=!1===F.test(n));for(var i=le(oe(r?n:n.trimEnd().replace(te,\"\")+\"\\n\\n\",{inline:r}));\"string\"==typeof i[i.length-1]&&!i[i.length-1].trim();)i.pop();if(null===t.wrapper)return i;var a,c=t.wrapper||(r?\"span\":\"div\");if(i.length>1||t.forceWrapper)a=i;else{if(1===i.length)return\"string\"==typeof(a=i[0])?Z(\"span\",{key:\"outer\"},a):a;a=null}return e.createElement(c,{key:\"outer\"},a)}function V(n){var r=n.match(l);return r?r.reduce(function(n,r,t){var i=r.indexOf(\"=\");if(-1!==i){var c=function(e){return-1!==e.indexOf(\"-\")&&null===e.match(z)&&(e=e.replace(B,function(e,n){return n.toUpperCase()})),e}(r.slice(0,i)).trim(),o=function(e){var n=e[0];return('\"'===n||\"'\"===n)&&e.length>=2&&e[e.length-1]===n?e.slice(1,-1):e}(r.slice(i+1).trim()),l=a[c]||c,u=n[l]=function(e,n){return\"style\"===e?n.split(/;\\s?/).reduce(function(e,n){var r=n.slice(0,n.indexOf(\":\"));return e[r.replace(/(-[a-z])/g,function(e){return e[1].toUpperCase()})]=n.slice(r.length+1).trim(),e},{}):\"href\"===e||\"src\"===e?Be(n):(n.match(I)&&(n=n.slice(1,n.length-1)),\"true\"===n||\"false\"!==n&&n)}(c,o);\"string\"==typeof u&&(O.test(u)||M.test(u))&&(n[l]=e.cloneElement(q(u.trim()),{key:t}))}else\"style\"!==r&&(n[a[r]||r]=!0);return n},{}):null}var X=[],Q={},ae=((i={})[0]={match:Re(f),order:1,parse:function(e,n,r){return{children:n(e[0].replace(d,\"\"),r)}},render:function(e,n,r){return Z(\"blockquote\",{key:r.key},n(e.children,r))}},i[1]={match:Ue(p),order:1,parse:Fe,render:function(e,n,r){return Z(\"br\",{key:r.key})}},i[2]={match:Re(h),order:1,parse:Fe,render:function(e,n,r){return Z(\"hr\",{key:r.key})}},i[3]={match:Re(g),order:0,parse:function(e){return{lang:void 0,text:e[0].replace(/^ {4}/gm,\"\").replace(/\\n+$/,\"\")}},render:function(e,r,t){return Z(\"pre\",{key:t.key},Z(\"code\",n({},e.attrs,{className:e.lang?\"lang-\"+e.lang:\"\"}),e.text))}},i[4]={match:Re(m),order:0,parse:function(e){return{attrs:V(e[3]||\"\"),lang:e[2]||void 0,text:e[4],type:\"3\"}}},i[5]={match:Ie(y),order:3,parse:function(e){return{text:e[2]}},render:function(e,n,r){return Z(\"code\",{key:r.key},e.text)}},i[6]={match:Re(x),order:0,parse:function(e){return X.push({footnote:e[2],identifier:e[1]}),{}},render:We},i[7]={match:Me(b),order:1,parse:function(e){return{target:\"#\"+t.slugify(e[1]),text:e[1]}},render:function(e,n,r){return Z(\"a\",{key:r.key,href:Be(e.target)},Z(\"sup\",{key:r.key},e.text))}},i[8]={match:Me(C),order:1,parse:function(e){return{completed:\"x\"===e[1].toLowerCase()}},render:function(e,n,r){return Z(\"input\",{checked:e.completed,key:r.key,readOnly:!0,type:\"checkbox\"})}},i[9]={match:Re(t.enforceAtxHeadings?$:E),order:1,parse:function(e,n,r){return{children:He(n,e[2],r),id:t.slugify(e[2]),level:e[1].length}},render:function(e,n,r){return Z(\"h\"+e.level,{id:e.id,key:r.key},n(e.children,r))}},i[10]={match:Re(A),order:0,parse:function(e,n,r){return{children:He(n,e[1],r),level:\"=\"===e[2]?1:2,type:\"9\"}}},i[11]={match:Ue(O),order:1,parse:function(e,n,r){var t,i=e[3].match(ie),a=new RegExp(\"^\"+i[1],\"gm\"),c=e[3].replace(a,\"\"),l=(t=c,$e.some(function(e){return e.test(t)})?Pe:He),u=e[1].toLowerCase(),s=-1!==o.indexOf(u),f={attrs:V(e[2]),noInnerParse:s,tag:s?u:e[1]};return r.inAnchor=r.inAnchor||\"a\"===u,s?f.text=e[3]:f.children=l(n,c,r),r.inAnchor=!1,f},render:function(e,r,t){return Z(e.tag,n({key:t.key},e.attrs),e.text||r(e.children,t))}},i[13]={match:Ue(M),order:1,parse:function(e){return{attrs:V(e[2]||\"\"),tag:e[1]}},render:function(e,r,t){return Z(e.tag,n({},e.attrs,{key:t.key}))}},i[12]={match:Ue(L),order:1,parse:function(){return{}},render:We},i[14]={match:Ie(Ce),order:1,parse:function(e){return{alt:e[1],target:Ne(e[2]),title:e[3]}},render:function(e,n,r){return Z(\"img\",{key:r.key,alt:e.alt||void 0,title:e.title||void 0,src:Be(e.target)})}},i[15]={match:Me(we),order:3,parse:function(e,n,r){return{children:De(n,e[1],r),target:Ne(e[2]),title:e[3]}},render:function(e,n,r){return Z(\"a\",{key:r.key,href:Be(e.target),title:e.title},n(e.children,r))}},i[16]={match:Me(j),order:0,parse:function(e){return{children:[{text:e[1],type:\"27\"}],target:e[1],type:\"15\"}}},i[17]={match:function(e,n){return n.inAnchor?null:Me(R)(e,n)},order:0,parse:function(e){return{children:[{text:e[1],type:\"27\"}],target:e[1],title:void 0,type:\"15\"}}},i[18]={match:Me(U),order:0,parse:function(e){var n=e[1],r=e[1];return u.test(r)||(r=\"mailto:\"+r),{children:[{text:n.replace(\"mailto:\",\"\"),type:\"27\"}],target:r,type:\"15\"}}},i[20]=Se(Z,1),i[33]=Se(Z,2),i[19]={match:Re(k),order:3,parse:Fe,render:function(){return\"\\n\"}},i[21]={match:je,order:3,parse:_e,render:function(e,n,r){return Z(\"p\",{key:r.key},n(e.children,r))}},i[22]={match:Me(H),order:0,parse:function(e){return Q[e[1]]={target:e[2],title:e[4]},{}},render:We},i[23]={match:Ie(D),order:0,parse:function(e){return{alt:e[1]||void 0,ref:e[2]}},render:function(e,n,r){return Z(\"img\",{key:r.key,alt:e.alt,src:Be(Q[e.ref].target),title:Q[e.ref].title})}},i[24]={match:Me(P),order:0,parse:function(e,n,r){return{children:n(e[1],r),fallbackChildren:n(e[0].replace(_,\"\\\\$1\"),r),ref:e[2]}},render:function(e,n,r){return Q[e.ref]?Z(\"a\",{key:r.key,href:Be(Q[e.ref].target),title:Q[e.ref].title},n(e.children,r)):Z(\"span\",{key:r.key},n(e.fallbackChildren,r))}},i[25]={match:Re(N),order:1,parse:Le,render:function(e,n,r){return Z(\"table\",{key:r.key},Z(\"thead\",null,Z(\"tr\",null,e.header.map(function(t,i){return Z(\"th\",{key:i,style:ze(e,i)},n(t,r))}))),Z(\"tbody\",null,e.cells.map(function(t,i){return Z(\"tr\",{key:i},t.map(function(t,i){return Z(\"td\",{key:i,style:ze(e,i)},n(t,r))}))})))}},i[26]={match:function(e,n){return n.inTable?(n.inline=!0,G.exec(e)):null},order:1,parse:function(){return{type:\"26\"}},render:function(){return\" | \"}},i[27]={match:Ue(re),order:4,parse:function(e){return{text:e[0].replace(T,function(e,n){return t.namedCodesToUnicode[n]?t.namedCodesToUnicode[n]:e})}},render:function(e){return e.text}},i[28]={match:Ie(J),order:2,parse:function(e,n,r){return{children:n(e[2],r)}},render:function(e,n,r){return Z(\"strong\",{key:r.key},n(e.children,r))}},i[29]={match:Ie(K),order:3,parse:function(e,n,r){return{children:n(e[2],r)}},render:function(e,n,r){return Z(\"em\",{key:r.key},n(e.children,r))}},i[30]={match:Ie(ne),order:1,parse:function(e){return{text:e[1],type:\"27\"}}},i[31]={match:Ie(Y),order:3,parse:_e,render:function(e,n,r){return Z(\"mark\",{key:r.key},n(e.children,r))}},i[32]={match:Ie(ee),order:3,parse:_e,render:function(e,n,r){return Z(\"del\",{key:r.key},n(e.children,r))}},i);!0===t.disableParsingRawHTML&&(delete ae[11],delete ae[13]);var ce,oe=function(e){var n=Object.keys(e);function r(t,i){for(var a=[],c=\"\";t;)for(var o=0;o=0||(i[r]=e[r]);return i}(n,i);return e.cloneElement(Ve(r,t),a)}export{r as RuleType,Ve as compiler};\n//# sourceMappingURL=index.module.js.map\n","/* @jsx React.createElement */\nimport * as React from 'react'\nimport * as ReactDOM from 'react-dom'\nimport styled, { createGlobalStyle, css, CSSProp } from 'styled-components'\nimport TeX from '@matejmazur/react-katex'\nimport Markdown, { MarkdownToJSX, RuleType } from './'\n\ndeclare global {\n interface Window {\n hljs: {\n highlightElement: (element: HTMLElement) => void\n }\n }\n}\n\ndeclare module 'react' {\n interface Attributes {\n css?: CSSProp\n }\n}\n\nfunction TryItLive() {\n const [markdown, setMarkdown] = React.useState(\n document.getElementById('sample-content')!.textContent!.trim()\n )\n\n const handleInput = React.useCallback(e => setMarkdown(e.target.value), [])\n\n return (\n
\n \n\n
\n \n \"markdown-to-jsx\n \n\n \n

\n markdown-to-jsx is an easy-to-use markdown component\n that takes Github-flavored Markdown (GFM) and makes native JSX\n without dangerous hacks. \n

\n

\n It's lightweight, customizable, and happily supports React-like\n libraries.\n

\n
\n\n \n See the{' '}\n \n project README\n {' '}\n for detailed installation & usage instructions.\n \n
\n\n \n