(function(e){if("function"==typeofbootstrap)bootstrap("katex",e);elseif("object"==typeofexports)module.exports=e();elseif("function"==typeofdefine&&define.amd)define(e);elseif("undefined"!=typeofses){if(!ses.ok())return;ses.makeKatex=e}else"undefined"!=typeofwindow?window.katex=e():global.katex=e()})(function(){vare,t,i,h,a;returnfunctionr(e,t,i){functionh(l,s){if(!t[l]){if(!e[l]){varp=typeofrequire=="function"&&require;if(!s&&p)returnp(l,!0);if(a)returna(l,!0);thrownewError("Cannot find module '"+l+"'")}varc=t[l]={exports:{}};e[l][0].call(c.exports,function(t){vari=e[l][1][t];returnh(i?i:t)},c,c.exports,r,e,t,i)}returnt[l].exports}vara=typeofrequire=="function"&&require;for(varl=0;l<i.length;l++)h(i[l]);returnh}({1:[function(e,t,i){varh=e("./src/ParseError");vara=e("./src/Settings");varr=e("./src/buildTree");varl=e("./src/parseTree");vars=e("./src/utils");varp=function(e,t,i){s.clearNode(t);varh=newa(i);varp=l(e,h);varc=r(p,e,h).toNode();t.appendChild(c)};if(typeofdocument!=="undefined"){if(document.compatMode!=="CSS1Compat"){typeofconsole!=="undefined"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your "+"website has a suitable doctype.");p=function(){thrownewh("KaTeX doesn't work in quirks mode.")}}}varc=function(e,t){vari=newa(t);varh=l(e,i);returnr(h,e,i).toMarkup()};t.exports={render:p,renderToString:c,ParseError:h}},{"./src/ParseError":4,"./src/Settings":6,"./src/buildTree":11,"./src/parseTree":17,"./src/utils":19}],2:[function(e,t,i){varh=e("./ParseError");functiona(e){this._input=e}functionr(e,t,i){this.text=e;this.data=t;this.position=i}varl=[/^[/|@.""`0-9a-zA-Z]/,/^[*+-]/,/^[=<>:]/,/^[,;]/,/^['\^_{}]/,/^[(\[]/,/^[)\]?!]/,/^~/];vars=[/^[a-zA-Z0-9`!@*()-=+\[\]'";:?\/.,]/,/^[{}]/,/^~/];varp=/^\s*/;varc=/^( +|\\ +)/;varo=/^\\(?:[a-zA-Z]+|.)/;a.prototype._innerLex=function(e,t,i){vara=this._input.slice(e);varl;if(i){l=a.match(p)[0];e+=l.length;a=a.slice(l.length)}else{l=a.match(c);if(l!==null){returnnewr(" ",null,e+l[0].length)}}if(a.length===0){returnnewr("EOF",null,e)}vars;if(s=a.match(o)){returnnewr(s[0],null,e+s[0].length)}else{for(varn=0;n<t.length;n++){varg=t[n];if(s=a.match(g)){returnnewr(s[0],null,e+s[0].length)}}}thrownewh("Unexpected character: '"+a[0]+"'",this,e)};varn=/^(#[a-z0-9]+|[a-z]+)/i;a.prototype._innerLexColor=function(e){vart=this._input.slice(e);vari=t.match(p)[0];e+=i.length;t=t.slice(i.length);vara;if(a=t.match(n)){returnnewr(a[0],null,e+a[0].length)}else{thrownewh("Invalid color",this,e)}};varg=/^(-?)\s*(\d+(?:\.\d*)?|\.\d+)\s*([a-z]{2})/;a.prototype._innerLexSize=function(e){vart=this._input.slice(e);vari=t.match(p)[0];e+=i.length;t=t.slice(i.length);vara;if(a=t.match(g)){varl=a[3];if(l!=="em"&&l!=="ex"){thrownewh("Invalid unit: '"+l+"'",this,e)}returnnewr(a[0],{number:+(a[1]+a[2]),unit:l},e+a[0].length)}thrownewh("Invalid size",this,e)};a.prototype._innerLexWhitespace=function(e){vart=this._input.slice(e);vari=t.match(p)[0];e+=i.length;returnnewr(i,null,e)};a.prototype.lex=function(e,t){if(t==="math"){returnthis._innerLex(e,l,true)}elseif(t==="text"){returnthis._innerLex(e,s,false)}elseif(t==="color"){returnthis._innerLexColor(e)}elseif(t==="size"){returnthis._innerLexSize(e)}elseif(t==="whitespace"){returnthis._innerLexWhitespace(e)}};t.exports=a},{"./ParseError":4}],3:[function(e,t,i){functionh(e,t,i,h,a){this.style=e;this.color=i;this.size=t;if(h===undefined){h=e}this.parentStyle=h;if(a===undefined){a=t}this.parentSize=a}h.prototype.withStyle=function(e){returnnewh(e,this.size,this.color,this.style,this.size)};h.prototype.withSize=function(e){returnnewh(this.style,e,this.color,this.style,this.size)};h.prototype.withColor=function(e){returnnewh(this.style,this.size,e,this.style,this.size)};h.prototype.reset=function(){returnnewh(this.style,this.size,this.color,this.style,this.size)};vara={"katex-blue":"#6495ed","katex-orange":"#ffa500","katex-pink":"#ff00af","katex-red":"#df0030","katex-green":"#28ae7b","katex-gray":"gray","katex-purple":"#9d38bd"};h.pro
t.setAttribute("lspace","-1width");t.setAttribute("width","0px");returnt},rlap:function(e){vart=newa.MathNode("mpadded",[n(e.value.body)]);t.setAttribute("width","0px");returnt}};varo=function(e){vart=[];for(vari=0;i<e.length;i++){varh=e[i];t.push(n(h))}returnt};varn=function(e){if(!e){returnnewa.MathNode("mrow")}if(c[e.type]){returnc[e.type](e)}else{thrownewr("Got group of unknown type: '"+e.type+"'")}};varg=function(e,t,i){varh=o(e);varr=newa.MathNode("mrow",h);varl=newa.MathNode("annotation",[newa.TextNode(t)]);l.setAttribute("encoding","application/x-tex");varp=newa.MathNode("semantics",[r,l]);varc=newa.MathNode("math",[p]);returns(["katex-mathml"],[c])};t.exports=g},{"./ParseError":4,"./buildCommon":8,"./mathMLTree":16,"./symbols":18}],11:[function(e,t,i){varh=e("./buildHTML");vara=e("./buildMathML");varr=e("./buildCommon");varl=r.makeSpan;vars=function(e,t,i){varr=a(e,t,i);vars=h(e,i);varp=l(["katex"],[r,s]);if(i.displayMode){returnl(["katex-display"],[p])}else{returnp}};t.exports=s},{"./buildCommon":8,"./buildHTML":9,"./buildMathML":10}],12:[function(e,t,i){varh=e("./ParseError");vara=e("./Style");varr=e("./buildCommon");varl=e("./fontMetrics");vars=e("./symbols");varp=e("./utils");varc=r.makeSpan;varo=function(e,t){if(s.math[e]&&s.math[e].replace){returnl.getCharacterMetrics(s.math[e].replace,t)}else{returnl.getCharacterMetrics(e,t)}};varn=function(e,t,i){returnr.makeSymbol(e,"Size"+t+"-Regular",i)};varg=function(e,t,i){varh=c(["style-wrap",i.style.reset(),t.cls()],[e]);vara=t.sizeMultiplier/i.style.sizeMultiplier;h.height*=a;h.depth*=a;h.maxFontSize=t.sizeMultiplier;returnh};vard=function(e,t,i,h,a){vars=r.makeSymbol(e,"Main-Regular",a);varp=g(s,t,h);if(i){varc=(1-h.style.sizeMultiplier/t.sizeMultiplier)*l.metrics.axisHeight;p.style.top=c+"em";p.height-=c;p.depth+=c}returnp};varu=function(e,t,i,h,r){vars=n(e,t,r);varp=g(c(["delimsizing","size"+t],[s],h.getColor()),a.TEXT,h);if(i){varo=(1-h.style.sizeMultiplier)*l.metrics.axisHeight;p.style.top=o+"em";p.height-=o;p.depth+=o}returnp};varw=function(e,t,i){varh;if(t==="Size1-Regular"){h="delim-size1"}elseif(t==="Size4-Regular"){h="delim-size4"}vara=c(["delimsizinginner",h],[c([],[r.makeSymbol(e,t,i)])]);return{type:"elem",elem:a}};vark=function(e,t,i,h,s){varp,n,d,u;p=d=u=e;n=null;vark="Size1-Regular";if(e==="\\uparrow"){d=u="\u23d0"}elseif(e==="\\Uparrow"){d=u="\u2016"}elseif(e==="\\downarrow"){p=d="\u23d0"}elseif(e==="\\Downarrow"){p=d="\u2016"}elseif(e==="\\updownarrow"){p="\\uparrow";d="\u23d0";u="\\downarrow"}elseif(e==="\\Updownarrow"){p="\\Uparrow";d="\u2016";u="\\Downarrow"}elseif(e==="["||e==="\\lbrack"){p="\u23a1";d="\u23a2";u="\u23a3";k="Size4-Regular"}elseif(e==="]"||e==="\\rbrack"){p="\u23a4";d="\u23a5";u="\u23a6";k="Size4-Regular"}elseif(e==="\\lfloor"){d=p="\u23a2";u="\u23a3";k="Size4-Regular"}elseif(e==="\\lceil"){p="\u23a1";d=u="\u23a2";k="Size4-Regular"}elseif(e==="\\rfloor"){d=p="\u23a5";u="\u23a6";k="Size4-Regular"}elseif(e==="\\rceil"){p="\u23a4";d=u="\u23a5";k="Size4-Regular"}elseif(e==="("){p="\u239b";d="\u239c";u="\u239d";k="Size4-Regular"}elseif(e===")"){p="\u239e";d="\u239f";u="\u23a0";k="Size4-Regular"}elseif(e==="\\{"||e==="\\lbrace"){p="\u23a7";n="\u23a8";u="\u23a9";d="\u23aa";k="Size4-Regular"}elseif(e==="\\}"||e==="\\rbrace"){p="\u23ab";n="\u23ac";u="\u23ad";d="\u23aa";k="Size4-Regular"}elseif(e==="\\surd"){p="\ue001";u="\u23b7";d="\ue000";k="Size4-Regular"}varm=o(p,k);varf=m.height+m.depth;varv=o(d,k);vary=v.height+v.depth;varb=o(u,k);varx=b.height+b.depth;varz,S;if(n!==null){z=o(n,k);S=z.height+z.depth}varM=f+x;if(n!==null){M+=S}while(M<t){M+=y;if(n!==null){M+=y}}varq=l.metrics.axisHeight;if(i){q*=h.style.sizeMultiplier}varT=M/2-q;varN=[];N.push(w(u,k,s));varA;if(n===null){varR=M-f-x;varC=Math.ceil(R/y);for(A=0;A<C;A++){N.push(w(d,k,s))}}else{varL=M/2-f-S/2;varE=Math.ceil(L/y);varP=M/2-f-S/2;varD=Math.ceil(P/y);for(A=0;A<E;A++){N.push(w(d,k,s))}N.push(w(n,k,s));for(A=0;A<D;A++){N.push(w(d,k,s))}}N.push(w(p,k,s));varI=r.makeVList(
varV=function(e,t){returnH[t][e.charCodeAt(0)]};t.exports={metrics:G,getCharacterMetrics:V}},{"./Style":7}],15:[function(e,t,i){varh=e("./utils");vara=e("./ParseError");varr={"\\sqrt":{numArgs:1,numOptionalArgs:1,handler:function(e,t,i,h){if(t!=null){thrownewa("Optional arguments to \\sqrt aren't supported yet",this.lexer,h[1]-1)}return{type:"sqrt",body:i}}},"\\text":{numArgs:1,argTypes:["text"],greediness:2,handler:function(e,t){vari;if(t.type==="ordgroup"){i=t.value}else{i=[t]}return{type:"text",body:i}}},"\\color":{numArgs:2,allowedInText:true,argTypes:["color","original"],handler:function(e,t,i){varh;if(i.type==="ordgroup"){h=i.value}else{h=[i]}return{type:"color",color:t.value,value:h}}},"\\overline":{numArgs:1,handler:function(e,t){return{type:"overline",body:t}}},"\\rule":{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"],handler:function(e,t,i,h){return{type:"rule",shift:t&&t.value,width:i.value,height:h.value}}},"\\KaTeX":{numArgs:0,handler:function(e){return{type:"katex"}}}};varl={"\\bigl":{type:"open",size:1},"\\Bigl":{type:"open",size:2},"\\biggl":{type:"open",size:3},"\\Biggl":{type:"open",size:4},"\\bigr":{type:"close",size:1},"\\Bigr":{type:"close",size:2},"\\biggr":{type:"close",size:3},"\\Biggr":{type:"close",size:4},"\\bigm":{type:"rel",size:1},"\\Bigm":{type:"rel",size:2},"\\biggm":{type:"rel",size:3},"\\Biggm":{type:"rel",size:4},"\\big":{type:"textord",size:1},"\\Big":{type:"textord",size:2},"\\bigg":{type:"textord",size:3},"\\Bigg":{type:"textord",size:4}};vars=["(",")","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\\lceil","\\rceil","<",">","\\langle","\\rangle","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];varp=[{funcs:["\\blue","\\orange","\\pink","\\red","\\green","\\gray","\\purple"],data:{numArgs:1,allowedInText:true,handler:function(e,t){vari;if(t.type==="ordgroup"){i=t.value}else{i=[t]}return{type:"color",color:"katex-"+e.slice(1),value:i}}}},{funcs:["\\arcsin","\\arccos","\\arctan","\\arg","\\cos","\\cosh","\\cot","\\coth","\\csc","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\tan","\\tanh"],data:{numArgs:0,handler:function(e){return{type:"op",limits:false,symbol:false,body:e}}}},{funcs:["\\det","\\gcd","\\inf","\\lim","\\liminf","\\limsup","\\max","\\min","\\Pr","\\sup"],data:{numArgs:0,handler:function(e){return{type:"op",limits:true,symbol:false,body:e}}}},{funcs:["\\int","\\iint","\\iiint","\\oint"],data:{numArgs:0,handler:function(e){return{type:"op",limits:false,symbol:true,body:e}}}},{funcs:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint"],data:{numArgs:0,handler:function(e){return{type:"op",limits:true,symbol:true,body:e}}}},{funcs:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom"],data:{numArgs:2,greediness:2,handler:function(e,t,i){varh;vara=null;varr=null;varl="auto";switch(e){case"\\dfrac":case"\\frac":case"\\tfrac":h=true;break;case"\\dbinom":case"\\binom":case"\\tbinom":h=false;a="(";r=")";break;default:thrownewError("Unrecognized genfrac command")}switch(e){case"\\dfrac":case"\\dbinom":l="display";break;case"\\tfrac":case"\\tbinom":l="text";break}return{type:"genfrac",numer:t,denom:i,hasBarLine:h,leftDelim:a,rightDelim:r,size:l}}}},{funcs:["\\llap","\\rlap"],data:{numArgs:1,allowedInText:true,handler:function(e,t){return{type:e.slice(1),body:t}}}},{funcs:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg","\\left","\\right"],data:{numArgs:1,handler:function(e,t,i){if(!h.contains(s,t.value)){thrownewa("Invalid delimiter: '"+t.value+"' after '"+e+"'",this.lexer,i[1])}if(e==="\\left"||e==="\\right"){return{type:"leftright",value:t.value}}else{return{type:"delimsizing",size:l[e].size,delimType:l[e].type,value:t.value}}}}},{funcs:["\\tiny","\\scriptsize","\\foo