From 888140d34deda28aa90d559c80032c12a5ea4b74 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" <dpvc@union.edu> Date: Wed, 15 Aug 2012 14:59:12 -0400 Subject: [PATCH] Properly handle the scale configuration parameter. (Resolves issue #244.) --- config/TeX-AMS-MML_SVG-full.js | 4 ++-- config/TeX-AMS-MML_SVG.js | 2 +- jax/output/SVG/config.js | 2 +- jax/output/SVG/jax.js | 2 +- unpacked/jax/output/SVG/config.js | 2 +- unpacked/jax/output/SVG/jax.js | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config/TeX-AMS-MML_SVG-full.js b/config/TeX-AMS-MML_SVG-full.js index 671fcc8b0..a4f9bacb9 100644 --- a/config/TeX-AMS-MML_SVG-full.js +++ b/config/TeX-AMS-MML_SVG-full.js @@ -39,7 +39,7 @@ MathJax.InputJax.TeX=MathJax.InputJax({id:"TeX",version:"2.0.3",directory:MathJa MathJax.InputJax.MathML=MathJax.InputJax({id:"MathML",version:"2.0",directory:MathJax.InputJax.directory+"/MathML",extensionDir:MathJax.InputJax.extensionDir+"/MathML",entityDir:MathJax.InputJax.directory+"/MathML/entities",config:{useMathMLspacing:false}});MathJax.InputJax.MathML.Register("math/mml");MathJax.InputJax.MathML.loadComplete("config.js"); -MathJax.OutputJax.SVG=MathJax.OutputJax({id:"SVG",version:"2.0.3",directory:MathJax.OutputJax.directory+"/SVG",extensionDir:MathJax.OutputJax.extensionDir+"/SVG",autoloadDir:MathJax.OutputJax.directory+"/SVG/autoload",fontDir:MathJax.OutputJax.directory+"/SVG/fonts",config:{scale:100,minScaleAdjust:50,font:"TeX",blacker:10,mtextFontInherit:false,undefinedFamily:"STIXGeneral,'Arial Unicode MS',serif",addMMLclasses:false,EqnChunk:(MathJax.Hub.Browser.isMobile?10:50),EqnChunkFactor:1.5,EqnChunkDelay:100,linebreaks:{automatic:false,width:"container"},styles:{".MathJax_SVG_Display":{"text-align":"center",margin:"1em 0em"},"#MathJax_SVG_Tooltip":{"background-color":"InfoBackground",color:"InfoText",border:"1px solid black","box-shadow":"2px 2px 5px #AAAAAA","-webkit-box-shadow":"2px 2px 5px #AAAAAA","-moz-box-shadow":"2px 2px 5px #AAAAAA","-khtml-box-shadow":"2px 2px 5px #AAAAAA",padding:"3px 4px"}}}});if(!MathJax.Hub.config.delayJaxRegistration){MathJax.OutputJax.SVG.Register("jax/mml")}MathJax.OutputJax.SVG.loadComplete("config.js"); +MathJax.OutputJax.SVG=MathJax.OutputJax({id:"SVG",version:"2.0.4",directory:MathJax.OutputJax.directory+"/SVG",extensionDir:MathJax.OutputJax.extensionDir+"/SVG",autoloadDir:MathJax.OutputJax.directory+"/SVG/autoload",fontDir:MathJax.OutputJax.directory+"/SVG/fonts",config:{scale:100,minScaleAdjust:50,font:"TeX",blacker:10,mtextFontInherit:false,undefinedFamily:"STIXGeneral,'Arial Unicode MS',serif",addMMLclasses:false,EqnChunk:(MathJax.Hub.Browser.isMobile?10:50),EqnChunkFactor:1.5,EqnChunkDelay:100,linebreaks:{automatic:false,width:"container"},styles:{".MathJax_SVG_Display":{"text-align":"center",margin:"1em 0em"},"#MathJax_SVG_Tooltip":{"background-color":"InfoBackground",color:"InfoText",border:"1px solid black","box-shadow":"2px 2px 5px #AAAAAA","-webkit-box-shadow":"2px 2px 5px #AAAAAA","-moz-box-shadow":"2px 2px 5px #AAAAAA","-khtml-box-shadow":"2px 2px 5px #AAAAAA",padding:"3px 4px"}}}});if(!MathJax.Hub.config.delayJaxRegistration){MathJax.OutputJax.SVG.Register("jax/mml")}MathJax.OutputJax.SVG.loadComplete("config.js"); MathJax.Extension.tex2jax={version:"2.0",config:{inlineMath:[["\\(","\\)"]],displayMath:[["$$","$$"],["\\[","\\]"]],balanceBraces:true,skipTags:["script","noscript","style","textarea","pre","code"],ignoreClass:"tex2jax_ignore",processClass:"tex2jax_process",processEscapes:false,processEnvironments:true,processRefs:true,preview:"TeX"},PreProcess:function(a){if(!this.configured){this.config=MathJax.Hub.CombineConfig("tex2jax",this.config);if(this.config.Augment){MathJax.Hub.Insert(this,this.config.Augment)}if(typeof(this.config.previewTeX)!=="undefined"&&!this.config.previewTeX){this.config.preview="none"}this.configured=true}if(typeof(a)==="string"){a=document.getElementById(a)}if(!a){a=document.body}if(this.createPatterns()){this.scanElement(a,a.nextSibling)}},createPatterns:function(){var d=[],e=[],c,a,b=this.config;this.match={};for(c=0,a=b.inlineMath.length;c<a;c++){d.push(this.patternQuote(b.inlineMath[c][0]));this.match[b.inlineMath[c][0]]={mode:"",end:b.inlineMath[c][1],pattern:this.endPattern(b.inlineMath[c][1])}}for(c=0,a=b.displayMath.length;c<a;c++){d.push(this.patternQuote(b.displayMath[c][0]));this.match[b.displayMath[c][0]]={mode:"; mode=display",end:b.displayMath[c][1],pattern:this.endPattern(b.displayMath[c][1])}}if(d.length){e.push(d.sort(this.sortLength).join("|"))}if(b.processEnvironments){e.push("\\\\begin\\{([^}]*)\\}")}if(b.processEscapes){e.push("\\\\*\\\\\\$")}if(b.processRefs){e.push("\\\\(eq)?ref\\{[^}]*\\}")}this.start=new RegExp(e.join("|"),"g");this.skipTags=new RegExp("^("+b.skipTags.join("|")+")$","i");this.ignoreClass=new RegExp("(^| )("+b.ignoreClass+")( |$)");this.processClass=new RegExp("(^| )("+b.processClass+")( |$)");return(e.length>0)},patternQuote:function(a){return a.replace(/([\^$(){}+*?\-|\[\]\:\\])/g,"\\$1")},endPattern:function(a){return new RegExp(this.patternQuote(a)+"|\\\\.|[{}]","g")},sortLength:function(d,c){if(d.length!==c.length){return c.length-d.length}return(d==c?0:(d<c?-1:1))},scanElement:function(c,b,g){var a,e,d,f;while(c&&c!=b){if(c.nodeName.toLowerCase()==="#text"){if(!g){c=this.scanText(c)}}else{a=(typeof(c.className)==="undefined"?"":c.className);e=(typeof(c.tagName)==="undefined"?"":c.tagName);if(typeof(a)!=="string"){a=String(a)}f=this.processClass.exec(a);if(c.firstChild&&!a.match(/(^| )MathJax/)&&(f||!this.skipTags.exec(e))){d=(g||this.ignoreClass.exec(a))&&!f;this.scanElement(c.firstChild,b,d)}}if(c){c=c.nextSibling}}},scanText:function(b){if(b.nodeValue.replace(/\s+/,"")==""){return b}var a,c;this.search={start:true};this.pattern=this.start;while(b){this.pattern.lastIndex=0;while(b&&b.nodeName.toLowerCase()==="#text"&&(a=this.pattern.exec(b.nodeValue))){if(this.search.start){b=this.startMatch(a,b)}else{b=this.endMatch(a,b)}}if(this.search.matched){b=this.encloseMath(b)}if(b){do{c=b;b=b.nextSibling}while(b&&(b.nodeName.toLowerCase()==="br"||b.nodeName.toLowerCase()==="#comment"));if(!b||b.nodeName!=="#text"){return(this.search.close?this.prevEndMatch():c)}}}return b},startMatch:function(a,b){var f=this.match[a[0]];if(f!=null){this.search={end:f.end,mode:f.mode,pcount:0,open:b,olen:a[0].length,opos:this.pattern.lastIndex-a[0].length};this.switchPattern(f.pattern)}else{if(a[0].substr(0,6)==="\\begin"){this.search={end:"\\end{"+a[1]+"}",mode:"; mode=display",pcount:0,open:b,olen:0,opos:this.pattern.lastIndex-a[0].length,isBeginEnd:true};this.switchPattern(this.endPattern(this.search.end))}else{if(a[0].substr(0,4)==="\\ref"||a[0].substr(0,6)==="\\eqref"){this.search={mode:"",end:"",open:b,pcount:0,olen:0,opos:this.pattern.lastIndex-a[0].length};return this.endMatch([""],b)}else{var d=a[0].substr(0,a[0].length-1),g,c;if(d.length%2===0){c=[d.replace(/\\\\/g,"\\")];g=1}else{c=[d.substr(1).replace(/\\\\/g,"\\"),"$"];g=0}c=MathJax.HTML.Element("span",null,c);var e=MathJax.HTML.TextNode(b.nodeValue.substr(0,a.index));b.nodeValue=b.nodeValue.substr(a.index+a[0].length-g);b.parentNode.insertBefore(c,b);b.parentNode.insertBefore(e,c);this.pattern.lastIndex=g}}}return b},endMatch:function(a,c){var b=this.search;if(a[0]==b.end){if(!b.close||b.pcount===0){b.close=c;b.cpos=this.pattern.lastIndex;b.clen=(b.isBeginEnd?0:a[0].length)}if(b.pcount===0){b.matched=true;c=this.encloseMath(c);this.switchPattern(this.start)}}else{if(a[0]==="{"){b.pcount++}else{if(a[0]==="}"&&b.pcount){b.pcount--}}}return c},prevEndMatch:function(){this.search.matched=true;var a=this.encloseMath(this.search.close);this.switchPattern(this.start);return a},switchPattern:function(a){a.lastIndex=this.pattern.lastIndex;this.pattern=a;this.search.start=(a===this.start)},encloseMath:function(b){var a=this.search,f=a.close,e,c;if(a.cpos===f.length){f=f.nextSibling}else{f=f.splitText(a.cpos)}if(!f){e=f=MathJax.HTML.addText(a.close.parentNode,"")}a.close=f;c=(a.opos?a.open.splitText(a.opos):a.open);while(c.nextSibling&&c.nextSibling!==f){if(c.nextSibling.nodeValue!==null){if(c.nextSibling.nodeName==="#comment"){c.nodeValue+=c.nextSibling.nodeValue.replace(/^\[CDATA\[((.|\n|\r)*)\]\]$/,"$1")}else{c.nodeValue+=c.nextSibling.nodeValue}}else{if(this.msieNewlineBug){c.nodeValue+=(c.nextSibling.nodeName.toLowerCase()==="br"?"\n":" ")}else{c.nodeValue+=" "}}c.parentNode.removeChild(c.nextSibling)}var d=c.nodeValue.substr(a.olen,c.nodeValue.length-a.olen-a.clen);c.parentNode.removeChild(c);if(this.config.preview!=="none"){this.createPreview(a.mode,d)}c=this.createMathTag(a.mode,d);this.search={};this.pattern.lastIndex=0;if(e){e.parentNode.removeChild(e)}return c},insertNode:function(b){var a=this.search;a.close.parentNode.insertBefore(b,a.close)},createPreview:function(c,a){var b;if(this.config.preview==="TeX"){b=[this.filterPreview(a)]}else{if(this.config.preview instanceof Array){b=this.config.preview}}if(b){b=MathJax.HTML.Element("span",{className:MathJax.Hub.config.preRemoveClass},b);this.insertNode(b)}},createMathTag:function(c,b){var a=document.createElement("script");a.type="math/tex"+c;MathJax.HTML.setScript(a,b);this.insertNode(a);return a},filterPreview:function(a){return a},msieNewlineBug:(MathJax.Hub.Browser.isMSIE&&document.documentMode<9)};MathJax.Hub.Register.PreProcessor(["PreProcess",MathJax.Extension.tex2jax]);MathJax.Ajax.loadComplete("[MathJax]/extensions/tex2jax.js"); @@ -67,7 +67,7 @@ MathJax.Extension["TeX/AMSsymbols"]={version:"2.0"};MathJax.Hub.Register.Startup (function(b,c){var a;b.Parse=MathJax.Object.Subclass({Init:function(d){this.Parse(d)},Parse:function(g){var h;if(typeof g!=="string"){h=g.parentNode}else{if(g.match(/^<[a-z]+:/i)&&!g.match(/^<[^<>]* xmlns:/)){g=g.replace(/^<([a-z]+)(:math)/i,'<$1$2 xmlns:$1="http://www.w3.org/1998/Math/MathML"')}var d=g.match(/^(<math( ('.*?'|".*?"|[^>])+)>)/i);if(d&&d[2].match(/ (?!xmlns=)[a-z]+=\"http:/i)){g=d[1].replace(/ (?!xmlns=)([a-z]+=(['"])http:.*?\2)/ig," xmlns:$1 $1")+g.substr(d[0].length)}g=g.replace(/^\s*(?:\/\/)?<!(--)?\[CDATA\[((.|\n)*)(\/\/)?\]\]\1>\s*$/,"$2");g=g.replace(/&([a-z][a-z0-9]*);/ig,this.replaceEntity);h=b.ParseXML(g);if(h==null){b.Error("Error parsing MathML")}}var f=h.getElementsByTagName("parsererror")[0];if(f){b.Error("Error parsing MathML: "+f.textContent.replace(/This page.*?errors:|XML Parsing Error: |Below is a rendering of the page.*/g,""))}if(h.childNodes.length!==1){b.Error("MathML must be formed by a single element")}if(h.firstChild.nodeName.toLowerCase()==="html"){var e=h.getElementsByTagName("h1")[0];if(e&&e.textContent==="XML parsing error"&&e.nextSibling){b.Error("Error parsing MathML: "+String(e.nextSibling.nodeValue).replace(/fatal parsing error: /,""))}}if(h.firstChild.nodeName.toLowerCase().replace(/^[a-z]+:/,"")!=="math"){b.Error("MathML must be formed by a <math> element, not <"+h.firstChild.nodeName+">")}this.mml=this.MakeMML(h.firstChild)},MakeMML:function(g){var h=String(g.getAttribute("class")||"");var e,f=g.nodeName.toLowerCase().replace(/^[a-z]+:/,"");var d=(h.match(/(^| )MJX-TeXAtom-([^ ]*)/));if(d){e=this.TeXAtom(d[2])}else{if(!(a[f]&&a[f].isa&&a[f].isa(a.mbase))){MathJax.Hub.signal.Post(["MathML Jax - unknown node type",f]);return a.merror("Unknown node type: "+f)}else{e=a[f]()}}this.AddAttributes(e,g);this.CheckClass(e,h);this.AddChildren(e,g);if(b.config.useMathMLspacing){e.useMMLspacing=8}return e},TeXAtom:function(e){var d=a.TeXAtom().With({texClass:a.TEXCLASS[e]});if(d.texClass===a.TEXCLASS.OP){d.movesupsub=d.movablelimits=true}return d},CheckClass:function(e,g){g=g.split(/ /);var h=[];for(var f=0,d=g.length;f<d;f++){if(g[f].substr(0,4)==="MJX-"){if(g[f]==="MJX-arrow"){e.arrow=true}else{if(g[f]==="MJX-variant"){e.variantForm=true;if(!MathJax.Extension["TeX/AMSsymbols"]){MathJax.Hub.RestartAfter(MathJax.Ajax.Require("[MathJax]/extensions/TeX/AMSsymbols.js"))}}else{if(g[f].substr(0,11)!=="MJX-TeXAtom"){e.mathvariant=g[f].substr(3);if(e.mathvariant==="-tex-caligraphic-bold"||e.mathvariant==="-tex-oldstyle-bold"){if(!MathJax.Extension["TeX/boldsymbol"]){MathJax.Hub.RestartAfter(MathJax.Ajax.Require("[MathJax]/extensions/TeX/boldsymbol.js"))}}}}}}else{h.push(g[f])}}if(h.length){e["class"]=h.join(" ")}else{delete e["class"]}},AddAttributes:function(f,h){f.attr={};f.attrNames=[];for(var g=0,d=h.attributes.length;g<d;g++){var e=h.attributes[g].name;if(e=="xlink:href"){e="href"}if(e.match(/:/)){continue}var j=h.attributes[g].value;if(j.toLowerCase()==="true"){j=true}else{if(j.toLowerCase()==="false"){j=false}}if(f.defaults[e]!=null||a.copyAttributes[e]){f[e]=j}else{f.attr[e]=j}f.attrNames.push(e)}},AddChildren:function(f,h){for(var g=0,d=h.childNodes.length;g<d;g++){var k=h.childNodes[g];if(k.nodeName==="#comment"){continue}if(k.nodeName==="#text"){if(f.isToken&&!f.mmlSelfClosing){var j=k.nodeValue.replace(/&([a-z][a-z0-9]*);/ig,this.replaceEntity);f.Append(a.chars(this.trimSpace(j)))}else{if(k.nodeValue.match(/\S/)){b.Error("Unexpected text node: '"+k.nodeValue+"'")}}}else{if(f.type==="annotation-xml"){f.Append(a.xml(k))}else{var e=this.MakeMML(k);f.Append(e);if(e.mmlSelfClosing&&e.data.length){f.Append.apply(f,e.data);e.data=[]}}}}},trimSpace:function(d){return d.replace(/[\t\n\r]/g," ").replace(/^ +/,"").replace(/ +$/,"").replace(/ +/g," ")},replaceEntity:function(f,e){if(e.match(/^(lt|amp|quot)$/)){return f}if(b.Parse.Entity[e]){return b.Parse.Entity[e]}var g=e.charAt(0).toLowerCase();var d=e.match(/^[a-zA-Z](fr|scr|opf)$/);if(d){g=d[1]}if(!b.Parse.loaded[g]){b.Parse.loaded[g]=true;MathJax.Hub.RestartAfter(MathJax.Ajax.Require(b.entityDir+"/"+g+".js"))}return f}},{loaded:[]});b.Augment({sourceMenuTitle:"Original MathML",prefilterHooks:MathJax.Callback.Hooks(true),postfilterHooks:MathJax.Callback.Hooks(true),Translate:function(d){if(!this.ParseXML){this.ParseXML=this.createParser()}var e,g,h={script:d};if(d.firstChild&&d.firstChild.nodeName.toLowerCase().replace(/^[a-z]+:/,"")==="math"){h.math=d.firstChild;this.prefilterHooks.Execute(h);g=h.math}else{g=MathJax.HTML.getScript(d);if(c.isMSIE){g=g.replace(/( )+$/,"")}h.math=g;this.prefilterHooks.Execute(h);g=h.math}try{e=b.Parse(g).mml}catch(f){if(!f.mathmlError){throw f}e=this.formatError(f,g,d)}h.math=a(e);this.postfilterHooks.Execute(h);return h.math},prefilterMath:function(e,d){return e},prefilterMathML:function(e,d){return e},formatError:function(g,f,d){var e=g.message.replace(/\n.*/,"");MathJax.Hub.signal.Post(["MathML Jax - parse error",e,f,d]);return a.merror(e)},Error:function(d){throw MathJax.Hub.Insert(Error(d),{mathmlError:true})},parseDOM:function(d){return this.parser.parseFromString(d,"text/xml")},parseMS:function(d){return(this.parser.loadXML(d)?this.parser:null)},parseDIV:function(d){this.div.innerHTML=d.replace(/<([a-z]+)([^>]*)\/>/g,"<$1$2></$1>");return this.div},parseError:function(d){return null},createParser:function(){if(window.DOMParser){this.parser=new DOMParser();return(this.parseDOM)}else{if(window.ActiveXObject){var e=["MSXML2.DOMDocument.6.0","MSXML2.DOMDocument.5.0","MSXML2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","MSXML2.DOMDocument.2.0","Microsoft.XMLDOM"];for(var f=0,d=e.length;f<d&&!this.parser;f++){try{this.parser=new ActiveXObject(e[f])}catch(g){}}if(!this.parser){alert("MathJax can't create an XML parser for MathML. Check that\nthe 'Script ActiveX controls marked safe for scripting' security\nsetting is enabled (use the Internet Options item in the Tools\nmenu, and select the Security panel, then press the Custom Level\nbutton to check this).\n\nMathML equations will not be able to be processed by MathJax.");return(this.parseError)}this.parser.async=false;return(this.parseMS)}}this.div=MathJax.Hub.Insert(document.createElement("div"),{style:{visibility:"hidden",overflow:"hidden",height:"1px",position:"absolute",top:0}});if(!document.body.firstChild){document.body.appendChild(this.div)}else{document.body.insertBefore(this.div,document.body.firstChild)}return(this.parseDIV)},Startup:function(){a=MathJax.ElementJax.mml;a.mspace.Augment({mmlSelfClosing:true});a.none.Augment({mmlSelfClosing:true});a.mprescripts.Augment({mmlSelfClosing:true})}});b.prefilterHooks.Add(function(d){d.math=(typeof(d.math)==="string"?b.prefilterMath(d.math,d.script):b.prefilterMathML(d.math,d.script))});b.Parse.Entity={ApplyFunction:"\u2061",Backslash:"\u2216",Because:"\u2235",Breve:"\u02D8",Cap:"\u22D2",CenterDot:"\u00B7",CircleDot:"\u2299",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",Congruent:"\u2261",ContourIntegral:"\u222E",Coproduct:"\u2210",Cross:"\u2A2F",Cup:"\u22D3",CupCap:"\u224D",Dagger:"\u2021",Del:"\u2207",Delta:"\u0394",Diamond:"\u22C4",DifferentialD:"\u2146",DotEqual:"\u2250",DoubleDot:"\u00A8",DoubleRightTee:"\u22A8",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",DownLeftVector:"\u21BD",DownRightVector:"\u21C1",DownTee:"\u22A4",Downarrow:"\u21D3",Element:"\u2208",EqualTilde:"\u2242",Equilibrium:"\u21CC",Exists:"\u2203",ExponentialE:"\u2147",FilledVerySmallSquare:"\u25AA",ForAll:"\u2200",Gamma:"\u0393",Gg:"\u22D9",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Hacek:"\u02C7",Hat:"\u005E",HumpDownHump:"\u224E",HumpEqual:"\u224F",Im:"\u2111",ImaginaryI:"\u2148",Integral:"\u222B",Intersection:"\u22C2",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",Lambda:"\u039B",Larr:"\u219E",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",LeftArrowRightArrow:"\u21C6",LeftCeiling:"\u2308",LeftDownVector:"\u21C3",LeftFloor:"\u230A",LeftRightArrow:"\u2194",LeftTee:"\u22A3",LeftTriangle:"\u22B2",LeftTriangleEqual:"\u22B4",LeftUpVector:"\u21BF",LeftVector:"\u21BC",Leftarrow:"\u21D0",Leftrightarrow:"\u21D4",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",Ll:"\u22D8",Lleftarrow:"\u21DA",LongLeftArrow:"\u27F5",LongLeftRightArrow:"\u27F7",LongRightArrow:"\u27F6",Longleftarrow:"\u27F8",Longleftrightarrow:"\u27FA",Longrightarrow:"\u27F9",Lsh:"\u21B0",MinusPlus:"\u2213",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotLeftTriangle:"\u22EA",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotPrecedes:"\u2280",NotPrecedesSlantEqual:"\u22E0",NotRightTriangle:"\u22EB",NotRightTriangleEqual:"\u22ED",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsSlantEqual:"\u22E1",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotVerticalBar:"\u2224",Omega:"\u03A9",OverBar:"\u203E",OverBrace:"\u23DE",PartialD:"\u2202",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\u00B1",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Product:"\u220F",Proportional:"\u221D",Psi:"\u03A8",Rarr:"\u21A0",Re:"\u211C",ReverseEquilibrium:"\u21CB",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDownVector:"\u21C2",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTriangle:"\u22B3",RightTriangleEqual:"\u22B5",RightUpVector:"\u21BE",RightVector:"\u21C0",Rightarrow:"\u21D2",Rrightarrow:"\u21DB",Rsh:"\u21B1",Sigma:"\u03A3",SmallCircle:"\u2218",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Star:"\u22C6",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",Therefore:"\u2234",Theta:"\u0398",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",UnderBar:"\u005F",UnderBrace:"\u23DF",Union:"\u22C3",UnionPlus:"\u228E",UpArrow:"\u2191",UpDownArrow:"\u2195",UpTee:"\u22A5",Uparrow:"\u21D1",Updownarrow:"\u21D5",Upsilon:"\u03A5",Vdash:"\u22A9",Vee:"\u22C1",VerticalBar:"\u2223",VerticalTilde:"\u2240",Vvdash:"\u22AA",Wedge:"\u22C0",Xi:"\u039E",acute:"\u00B4",aleph:"\u2135",alpha:"\u03B1",amalg:"\u2A3F",and:"\u2227",ang:"\u2220",angmsd:"\u2221",angsph:"\u2222",ape:"\u224A",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",beta:"\u03B2",beth:"\u2136",between:"\u226C",bigcirc:"\u25EF",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",blacklozenge:"\u29EB",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",bowtie:"\u22C8",boxdl:"\u2510",boxdr:"\u250C",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxul:"\u2518",boxur:"\u2514",bsol:"\u005C",bull:"\u2022",cap:"\u2229",check:"\u2713",chi:"\u03C7",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledR:"\u00AE",circledS:"\u24C8",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",clubs:"\u2663",colon:"\u003A",comp:"\u2201",ctdot:"\u22EF",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cup:"\u222A",curarr:"\u21B7",curlyvee:"\u22CE",curlywedge:"\u22CF",dagger:"\u2020",daleth:"\u2138",ddarr:"\u21CA",deg:"\u00B0",delta:"\u03B4",digamma:"\u03DD",div:"\u00F7",divideontimes:"\u22C7",dot:"\u02D9",doteqdot:"\u2251",dotplus:"\u2214",dotsquare:"\u22A1",dtdot:"\u22F1",ecir:"\u2256",efDot:"\u2252",egs:"\u2A96",ell:"\u2113",els:"\u2A95",empty:"\u2205",epsi:"\u03B5",epsiv:"\u03F5",erDot:"\u2253",eta:"\u03B7",eth:"\u00F0",flat:"\u266D",fork:"\u22D4",frown:"\u2322",gEl:"\u2A8C",gamma:"\u03B3",gap:"\u2A86",gimel:"\u2137",gnE:"\u2269",gnap:"\u2A8A",gne:"\u2A88",gnsim:"\u22E7",gt:"\u003E",gtdot:"\u22D7",harrw:"\u21AD",hbar:"\u210F",hellip:"\u2026",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",imath:"\u0131",infin:"\u221E",intcal:"\u22BA",iota:"\u03B9",jmath:"\u0237",kappa:"\u03BA",kappav:"\u03F0",lEg:"\u2A8B",lambda:"\u03BB",lap:"\u2A85",larrlp:"\u21AB",larrtl:"\u21A2",lbrace:"\u007B",lbrack:"\u005B",le:"\u2264",leftleftarrows:"\u21C7",leftthreetimes:"\u22CB",lessdot:"\u22D6",lmoust:"\u23B0",lnE:"\u2268",lnap:"\u2A89",lne:"\u2A87",lnsim:"\u22E6",longmapsto:"\u27FC",looparrowright:"\u21AC",lowast:"\u2217",loz:"\u25CA",lt:"\u003C",ltimes:"\u22C9",ltri:"\u25C3",macr:"\u00AF",malt:"\u2720",mho:"\u2127",mu:"\u03BC",multimap:"\u22B8",nLeftarrow:"\u21CD",nLeftrightarrow:"\u21CE",nRightarrow:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",natur:"\u266E",nearr:"\u2197",nharr:"\u21AE",nlarr:"\u219A",not:"\u00AC",nrarr:"\u219B",nu:"\u03BD",nvDash:"\u22AD",nvdash:"\u22AC",nwarr:"\u2196",omega:"\u03C9",omicron:"\u03BF",or:"\u2228",osol:"\u2298",period:"\u002E",phi:"\u03C6",phiv:"\u03D5",pi:"\u03C0",piv:"\u03D6",prap:"\u2AB7",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",prime:"\u2032",psi:"\u03C8",rarrtl:"\u21A3",rbrace:"\u007D",rbrack:"\u005D",rho:"\u03C1",rhov:"\u03F1",rightrightarrows:"\u21C9",rightthreetimes:"\u22CC",ring:"\u02DA",rmoust:"\u23B1",rtimes:"\u22CA",rtri:"\u25B9",scap:"\u2AB8",scnE:"\u2AB6",scnap:"\u2ABA",scnsim:"\u22E9",sdot:"\u22C5",searr:"\u2198",sect:"\u00A7",sharp:"\u266F",sigma:"\u03C3",sigmav:"\u03C2",simne:"\u2246",smile:"\u2323",spades:"\u2660",sub:"\u2282",subE:"\u2AC5",subnE:"\u2ACB",subne:"\u228A",supE:"\u2AC6",supnE:"\u2ACC",supne:"\u228B",swarr:"\u2199",tau:"\u03C4",theta:"\u03B8",thetav:"\u03D1",tilde:"\u02DC",times:"\u00D7",triangle:"\u25B5",triangleq:"\u225C",upsi:"\u03C5",upuparrows:"\u21C8",veebar:"\u22BB",vellip:"\u22EE",weierp:"\u2118",xi:"\u03BE",yen:"\u00A5",zeta:"\u03B6",zigrarr:"\u21DD"};b.loadComplete("jax.js")})(MathJax.InputJax.MathML,MathJax.Hub.Browser); -(function(h,c,e,a){var g;var b="http://www.w3.org/2000/svg";var j="http://www.w3.org/1999/xlink";a.Augment({config:{styles:{".MathJax_SVG":{display:"inline","font-style":"normal","font-weight":"normal","line-height":"normal","font-size":"100%","font-size-adjust":"none","text-indent":0,"text-align":"left","text-transform":"none","letter-spacing":"normal","word-spacing":"normal","word-wrap":"normal","white-space":"nowrap","float":"none",direction:"ltr",border:0,padding:0,margin:0},".MathJax_SVG_Display":{position:"relative",display:"block",width:"100%"},".MathJax_SVG_Processing":{visibility:"hidden",position:"absolute",top:0,left:0,width:0,height:0,overflow:"hidden",display:"block"},".MathJax_SVG_Processed":{display:"none!important"},".MathJax_SVG_ExBox":{display:"block",overflow:"hidden",width:"1px",height:"60ex"},"#MathJax_SVG_Tooltip":{position:"absolute",left:0,top:0,width:"auto",height:"auto",display:"none"}}},hideProcessedMath:true,Config:function(){var k=c.config.menuSettings;if(k.scale){this.config.scale=k.scale}this.SUPER(arguments).Config.apply(this,arguments);this.fontInUse=this.config.font;this.fontDir+="/"+this.config.font;if(!this.require){this.require=[]}this.require.push(this.fontDir+"/fontdata.js");this.require.push(MathJax.OutputJax.extensionDir+"/MathEvents.js")},Startup:function(){EVENT=MathJax.Extension.MathEvents.Event;TOUCH=MathJax.Extension.MathEvents.Touch;HOVER=MathJax.Extension.MathEvents.Hover;this.ContextMenu=EVENT.ContextMenu;this.Mousedown=EVENT.AltContextMenu;this.Mouseover=HOVER.Mouseover;this.Mouseout=HOVER.Mouseout;this.Mousemove=HOVER.Mousemove;this.hiddenDiv=e.Element("div",{style:{visibility:"hidden",overflow:"hidden",position:"absolute",top:0,height:"1px",width:"auto",padding:0,border:0,margin:0,textAlign:"left",textIndent:0,textTransform:"none",lineHeight:"normal",letterSpacing:"normal",wordSpacing:"normal"}});if(!document.body.firstChild){document.body.appendChild(this.hiddenDiv)}else{document.body.insertBefore(this.hiddenDiv,document.body.firstChild)}this.hiddenDiv=e.addElement(this.hiddenDiv,"div",{id:"MathJax_SVG_Hidden"});var k=e.addElement(this.hiddenDiv,"div",{style:{width:"5in"}});this.pxPerInch=k.offsetWidth/5;this.hiddenDiv.removeChild(k);this.textSVG=this.Element("svg");d=this.addElement(this.addElement(this.hiddenDiv.parentNode,"svg"),"defs",{id:"MathJax_SVG_glyphs"});f={};this.ExSpan=e.Element("span",{style:{position:"absolute","font-size-adjust":"none"}},[["span",{className:"MathJax_SVG_ExBox"}]]);this.linebreakSpan=e.Element("span",null,[["hr",{style:{width:"auto",size:1,padding:0,border:0,margin:0}}]]);return h.Styles(this.config.styles,["InitializeSVG",this])},InitializeSVG:function(){document.body.appendChild(this.ExSpan);document.body.appendChild(this.linebreakSpan);this.defaultEx=this.ExSpan.firstChild.offsetHeight/60;this.defaultWidth=this.linebreakSpan.firstChild.offsetWidth;document.body.removeChild(this.linebreakSpan);document.body.removeChild(this.ExSpan)},preTranslate:function(o){var t=o.jax[this.id],u,r=t.length,z,s,A,n,y,l,x,q,k,w=false,v,B=this.config.linebreaks.automatic,p=this.config.linebreaks.width;if(B){w=(p.match(/^\s*(\d+(\.\d*)?%\s*)?container\s*$/)!=null);if(w){p=p.replace(/\s*container\s*/,"")}else{k=this.defaultWidth}if(p===""){p="100%"}}else{k=100000}for(u=0;u<r;u++){z=t[u];if(!z.parentNode){continue}s=z.previousSibling;if(s&&String(s.className).match(/^MathJax(_SVG)?(_Display)?( MathJax(_SVG)?_Processing)?$/)){s.parentNode.removeChild(s)}l=z.MathJax.elementJax;if(!l){continue}l.SVG={display:(l.root.Get("display")==="block")};A=n=e.Element("span",{style:{"font-size":this.scale+"%",display:"inline-block"},className:"MathJax_SVG",id:l.inputID+"-Frame",isMathJax:true,jaxID:this.id,oncontextmenu:EVENT.Menu,onmousedown:EVENT.Mousedown,onmouseover:EVENT.Mouseover,onmouseout:EVENT.Mouseout,onmousemove:EVENT.Mousemove,onclick:EVENT.Click,ondblclick:EVENT.DblClick});if(c.Browser.noContextMenu){A.ontouchstart=TOUCH.start;A.ontouchend=TOUCH.end}if(l.SVG.display){n=e.Element("div",{className:"MathJax_SVG_Display"});n.appendChild(A)}n.setAttribute("role","textbox");n.setAttribute("aria-readonly","true");n.className+=" MathJax_SVG_Processing";z.parentNode.insertBefore(n,z);z.parentNode.insertBefore(this.ExSpan.cloneNode(true),z);n.parentNode.insertBefore(this.linebreakSpan.cloneNode(true),n)}for(u=0;u<r;u++){z=t[u];if(!z.parentNode){continue}y=z.previousSibling;n=y.previousSibling;l=z.MathJax.elementJax;if(!l){continue}x=y.firstChild.offsetHeight/60;v=n.previousSibling.firstChild.offsetWidth;if(w){k=v}if(x===0||x==="NaN"){this.hiddenDiv.appendChild(n);l.SVG.isHidden=true;x=this.defaultEx;v=this.defaultWidth;if(w){k=this.defaultWidth}}l.SVG.ex=x;l.SVG.cwidth=v;l.SVG.em=q=x/a.TeX.x_height*1000;l.SVG.lineWidth=(B?this.length2em(p,1,k/q):1000000)}for(u=0;u<r;u++){z=t[u];if(!z.parentNode){continue}y=t[u].previousSibling;A=y.previousSibling;l=t[u].MathJax.elementJax;if(!l){continue}if(!l.SVG.isHidden){A=A.previousSibling}A.parentNode.removeChild(A);y.parentNode.removeChild(y)}o.SVGeqn=o.SVGlast=0;o.SVGi=-1;o.SVGchunk=this.config.EqnChunk;o.SVGdelay=false},Translate:function(l,p){if(!l.parentNode){return}if(p.SVGdelay){p.SVGdelay=false;c.RestartAfter(MathJax.Callback.Delay(this.config.EqnChunkDelay))}var k=l.MathJax.elementJax,o=k.root,m=document.getElementById(k.inputID+"-Frame"),q=(k.SVG.display?m.parentNode:m);this.em=g.mbase.prototype.em=k.SVG.em;this.ex=k.SVG.ex;this.linebreakWidth=k.SVG.lineWidth*1000;this.cwidth=k.SVG.cwidth;this.mathDiv=q;m.appendChild(this.textSVG);this.initSVG(o,m);o.setTeXclass();try{o.toSVG(m,q)}catch(n){if(n.restart){while(m.firstChild){m.removeChild(m.firstChild)}}throw n}m.removeChild(this.textSVG);if(k.SVG.isHidden){l.parentNode.insertBefore(q,l)}q.className=q.className.split(/ /)[0];if(this.hideProcessedMath){q.className+=" MathJax_SVG_Processed";if(l.MathJax.preview){k.SVG.preview=l.MathJax.preview;delete l.MathJax.preview}p.SVGeqn+=(p.i-p.SVGi);p.SVGi=p.i;if(p.SVGeqn>=p.SVGlast+p.SVGchunk){this.postTranslate(p);p.SVGchunk=Math.floor(p.SVGchunk*this.config.EqnChunkFactor);p.SVGdelay=true}}},postTranslate:function(q){var l=q.jax[this.id];if(!this.hideProcessedMath){return}for(var o=q.SVGlast,k=q.SVGeqn;o<k;o++){var n=l[o];if(n&&n.MathJax.elementJax){n.previousSibling.className=n.previousSibling.className.split(/ /)[0];var p=n.MathJax.elementJax.SVG;if(p.preview){p.preview.innerHTML="";n.MathJax.preview=p.preview;delete p.preview}}}q.SVGlast=q.SVGeqn},getJaxFromMath:function(k){if(k.parentNode.className==="MathJax_SVG_Display"){k=k.parentNode}return c.getJaxFor(k.nextSibling)},getHoverSpan:function(k,l){l.style.position="relative";return l.firstChild},getHoverBBox:function(k,l,m){var n=EVENT.getBBox(l.parentNode);n.h+=2;n.d-=2;return n},Zoom:function(l,s,q,k,p){s.className="MathJax_SVG";var u=s.appendChild(this.ExSpan.cloneNode(true));var o=u.firstChild.offsetHeight/60;this.em=g.mbase.prototype.em=o/a.TeX.x_height*1000;this.cwidth=0.85*a.defaultWidth;u.parentNode.removeChild(u);this.idPostfix="-zoom";l.root.toSVG(s,s);this.idPostfix="";s.style.position=q.style.position="absolute";var r=s.offsetWidth,n=s.offsetHeight,t=q.offsetHeight,m=q.offsetWidth;s.style.position=q.style.position="";return{Y:-EVENT.getBBox(s).h,mW:m,mH:t,zW:r,zH:n}},initSVG:function(l,k){},Remove:function(k){var l=document.getElementById(k.inputID+"-Frame");if(l){if(k.SVG.display){l=l.parentNode}l.parentNode.removeChild(l)}delete k.SVG},Em:function(k){if(Math.abs(k)<0.0006){return"0em"}return k.toFixed(3).replace(/\.?0+$/,"")+"em"},Ex:function(k){k=k/this.TeX.x_height;if(Math.abs(k)<0.0006){return"0ex"}return k.toFixed(3).replace(/\.?0+$/,"")+"ex"},Percent:function(k){return(100*k).toFixed(1).replace(/\.?0+$/,"")+"%"},length2em:function(q,l,o){if(typeof(q)!=="string"){q=q.toString()}if(q===""){return""}if(q===g.SIZE.NORMAL){return 1000}if(q===g.SIZE.BIG){return 2000}if(q===g.SIZE.SMALL){return 710}if(q==="infinity"){return a.BIGDIMEN}if(q.match(/mathspace$/)){return 1000*a.MATHSPACE[q]}var n=q.match(/^\s*([-+]?(?:\.\d+|\d+(?:\.\d*)?))?(pt|em|ex|mu|px|pc|in|mm|cm|%)?/);var k=parseFloat(n[1]||"1")*1000,p=n[2];if(o==null){o=1000}if(l==null){l=1}if(p==="em"){return k}if(p==="ex"){return k*a.TeX.x_height/1000}if(p==="%"){return k/100*o/1000}if(p==="px"){return k/a.em}if(p==="pt"){return k/10}if(p==="pc"){return k*1.2}if(p==="in"){return k*this.pxPerInch/a.em}if(p==="cm"){return k*this.pxPerInch/a.em/2.54}if(p==="mm"){return k*this.pxPerInch/a.em/25.4}if(p==="mu"){return k/18*l}return k*o/1000},thickness2em:function(l,k){var m=a.TeX.rule_thickness;if(l===g.LINETHICKNESS.MEDIUM){return m}if(l===g.LINETHICKNESS.THIN){return 0.67*m}if(l===g.LINETHICKNESS.THICK){return 1.67*m}return this.length2em(l,k,m)},getPadding:function(l){var n={top:0,right:0,bottom:0,left:0},k=false;for(var o in n){if(n.hasOwnProperty(o)){var m=l.style["padding"+o.charAt(0).toUpperCase()+o.substr(1)];if(m){n[o]=this.length2em(m);k=true}}}return(k?n:false)},getBorders:function(o){var m={top:0,right:0,bottom:0,left:0},l=false;for(var p in m){if(m.hasOwnProperty(p)){var k="border"+p.charAt(0).toUpperCase()+p.substr(1);var n=o.style[k+"Style"];if(n){l=true;m[p]=this.length2em(o.style[k+"Width"]);m[p+"Style"]=o.style[k+"Style"];m[p+"Color"]=o.style[k+"Color"];if(m[p+"Color"]==="initial"){m[p+"Color"]=""}}}}return(l?m:false)},Element:function(k,l){var m=(typeof(k)==="string"?document.createElementNS(b,k):k);m.isMathJax=true;if(l){for(var n in l){if(l.hasOwnProperty(n)){m.setAttribute(n,l[n].toString())}}}return m},addElement:function(l,k,m){return l.appendChild(this.Element(k,m))},TextNode:e.TextNode,addText:e.addText,ucMatch:e.ucMatch,HandleVariant:function(s,r,C){var v=i.G();var o,x,z,p,A,t,q,l,y,k;if(!s){s=this.FONTDATA.VARIANT[g.VARIANT.NORMAL]}if(s.forceFamily){C=i.TEXT(r,C,s.font);if(s.h!=null){C.h=s.h}if(s.d!=null){C.d=s.d}v.Add(C);C=""}A=s;for(t=0,q=C.length;t<q;t++){s=A;o=C.charCodeAt(t);z=C.charAt(t);if(o>=55296&&o<56319){t++;o=(((o-55296)<<10)+(C.charCodeAt(t)-56320))+65536;if(this.FONTDATA.RemapPlane1){var w=this.FONTDATA.RemapPlane1(o,s);o=w.n;s=w.variant}}else{k=this.FONTDATA.RANGES;for(l=0,y=k.length;l<y;l++){if(k[l].name==="alpha"&&s.noLowerCase){continue}x=s["offset"+k[l].offset];if(x&&o>=k[l].low&&o<=k[l].high){if(k[l].remap&&k[l].remap[o]){o=x+k[l].remap[o]}else{o=o-k[l].low+x;if(k[l].add){o+=k[l].add}}if(s["variant"+k[l].offset]){s=this.FONTDATA.VARIANT[s["variant"+k[l].offset]]}break}}}if(s.remap&&s.remap[o]){if(s.remap[o] instanceof Array){var B=s.remap[o];o=B[0];s=this.FONTDATA.VARIANT[B[1]]}else{if(typeof(s.remap[o])==="string"){C=s.remap[o]+C.substr(t+1);t=0;q=C.length;o=C.charCodeAt(0)}else{o=s.remap[o];if(s.remap.variant){s=this.FONTDATA.VARIANT[s.remap.variant]}}}}if(this.FONTDATA.REMAP[o]&&!s.noRemap){o=this.FONTDATA.REMAP[o];if(o instanceof Array){s=this.FONTDATA.VARIANT[o[1]];o=o[0]}if(typeof(o)==="string"){C=o+C.substr(t+1);t=0;q=C.length;o=o.charCodeAt(0)}}p=this.lookupChar(s,o);z=p[o];if(z){z=[r,p.id+"-"+o.toString(16).toUpperCase()].concat(z);v.Add(i.GLYPH.apply(i,z),v.w,0)}else{if(this.FONTDATA.DELIMITERS[o]){v.Add(this.createDelimiter(o,0,1,p),v.w,0)}else{if(o<=65535){z=String.fromCharCode(o)}else{x=o-65536;z=String.fromCharCode((x>>10)+55296)+String.fromCharCode((x&1023)+56320)}var u=i.TEXT(r,z,{"font-family":s.defaultFamily||a.config.undefinedFamily,"font-style":(s.italic?"italic":""),"font-weight":(s.bold?"bold":"")});if(s.h!=null){u.h=s.h}if(s.d!=null){u.d=s.d}z=i.G();z.Add(u);v.Add(z,v.w,0);c.signal.Post(["SVG Jax - unknown char",o,s])}}}if(C.length==1&&p.skew&&p.skew[o]){v.skew=p.skew[o]*1000}if(v.element.childNodes.length===1){v.element=v.element.firstChild;v.removeable=false;v.scale=r}return v},lookupChar:function(p,s){var o,k;if(!p.FONTS){var r=this.FONTDATA.FONTS;var q=(p.fonts||this.FONTDATA.VARIANT.normal.fonts);if(!(q instanceof Array)){q=[q]}if(p.fonts!=q){p.fonts=q}p.FONTS=[];for(o=0,k=q.length;o<k;o++){if(r[q[o]]){p.FONTS.push(r[q[o]])}}}for(o=0,k=p.FONTS.length;o<k;o++){var l=p.FONTS[o];if(typeof(l)==="string"){delete p.FONTS;this.loadFont(l)}if(l[s]){return l}else{this.findBlock(l,s)}}return{id:"unknown"}},findBlock:function(l,q){if(l.Ranges){for(var p=0,k=l.Ranges.length;p<k;p++){if(q<l.Ranges[p][0]){return}if(q<=l.Ranges[p][1]){var o=l.Ranges[p][2];for(var n=l.Ranges.length-1;n>=0;n--){if(l.Ranges[n][2]==o){l.Ranges.splice(n,1)}}this.loadFont(l.directory+"/"+o+".js")}}}},loadFont:function(k){c.RestartAfter(h.Require(this.fontDir+"/"+k))},createDelimiter:function(k,n,q,o){if(!q){q=1}var s=i.G();if(!k){s.Clean();delete s.element;s.w=s.r=this.TeX.nulldelimiterspace*q;return s}if(!(n instanceof Array)){n=[n,n]}var t=n[1];n=n[0];var l={alias:k};while(l.alias){k=l.alias;l=this.FONTDATA.DELIMITERS[k];if(!l){l={HW:[0,this.FONTDATA.VARIANT[g.VARIANT.NORMAL]]}}}if(l.load){c.RestartAfter(h.Require(this.fontDir+"/fontdata-"+l.load+".js"))}for(var r=0,p=l.HW.length;r<p;r++){if(l.HW[r][0]*q>=n-10-a.config.blacker||(r==p-1&&!l.stretch)){if(l.HW[r][2]){q*=l.HW[r][2]}if(l.HW[r][3]){k=l.HW[r][3]}return this.createChar(q,[k,l.HW[r][1]],o).With({stretched:true})}}if(l.stretch){this["extendDelimiter"+l.dir](s,t,l.stretch,q,o)}return s},createChar:function(s,q,n){var r="",p={fonts:[q[1]],noRemap:true};if(n&&n===g.VARIANT.BOLD){p.fonts=[q[1]+"-bold",q[1]]}if(typeof(q[1])!=="string"){p=q[1]}if(q[0] instanceof Array){for(var o=0,k=q[0].length;o<k;o++){r+=String.fromCharCode(q[0][o])}}else{r=String.fromCharCode(q[0])}var l=this.HandleVariant(p,s,r);if(q[2]){l.x=q[2]*1000}if(q[3]){l.y=q[3]*1000}if(q[5]){l.h+=q[5]*1000}if(q[6]){l.d+=q[6]*1000}return l},extendDelimiterV:function(r,A,m,o,n){var x=this.createChar(o,(m.top||m.ext),n);var u=this.createChar(o,(m.bot||m.ext),n);var q=x.h+x.d+u.h+u.d;var w=-x.h;r.Add(x,0,w);w-=x.d;if(m.mid){var z=this.createChar(o,m.mid,n);q+=z.h+z.d}if(A>q){var l=this.createChar(o,m.ext,n);var p=(m.mid?2:1),v=(A-q)/p,B=(v+100)/(l.h+l.d);while(p-->0){var t=a.Element("g",{transform:"translate("+l.y+","+(w-B*l.h+50+l.y)+") scale(1,"+B+")"});t.appendChild(l.element.cloneNode(false));r.element.appendChild(t);w-=v;if(m.mid&&p){r.Add(z,0,w-z.h);w-=(z.h+z.d)}}}else{if(m.mid){w+=(q-A)/2;r.Add(z,0,w-z.h);w+=-(z.h+z.d)+(q-A)/2}else{w+=(q-A)}}r.Add(u,0,w-u.h);r.Clean();r.scale=o;r.isMultiChar=true},extendDelimiterH:function(t,o,m,q,n){var p=this.createChar(q,(m.left||m.rep),n);var C=this.createChar(q,(m.right||m.rep),n);t.Add(p,-p.l,0);var B=(p.r-p.l)+(C.r-C.l),z=p.r-p.l;if(m.mid){var A=this.createChar(q,m.mid,n);B+=A.w}if(o>B){var y=this.createChar(q,m.rep,n),l=m.fuzz||0;var r=(m.mid?2:1),v=(o-B)/r,E=(v+l)/(y.r-y.l);while(r-->0){var u=a.Element("g",{transform:"translate("+(z-l/2-E*y.l+y.x)+","+y.y+") scale("+E+",1)"});u.appendChild(y.element.cloneNode(false));t.element.appendChild(u);z+=v;if(m.mid&&r){t.Add(A,z,0);z+=A.w}}}else{if(m.mid){var D=Math.min(B-o,p.w/2);z-=D/2;t.Add(A,z,0);z+=A.w-D/2}else{z-=(B-o)}}t.Add(C,z-C.l,0);t.Clean();t.scale=q;t.isMultiChar=true},MATHSPACE:{veryverythinmathspace:1/18,verythinmathspace:2/18,thinmathspace:3/18,mediummathspace:4/18,thickmathspace:5/18,verythickmathspace:6/18,veryverythickmathspace:7/18,negativeveryverythinmathspace:-1/18,negativeverythinmathspace:-2/18,negativethinmathspace:-3/18,negativemediummathspace:-4/18,negativethickmathspace:-5/18,negativeverythickmathspace:-6/18,negativeveryverythickmathspace:-7/18},TeX:{x_height:430.554,quad:1000,num1:676.508,num2:393.732,num3:443.73,denom1:685.951,denom2:344.841,sup1:412.892,sup2:362.892,sup3:288.888,sub1:150,sub2:247.217,sup_drop:386.108,sub_drop:50,delim1:2390,delim2:1000,axis_height:250,rule_thickness:60,big_op_spacing1:111.111,big_op_spacing2:166.666,big_op_spacing3:200,big_op_spacing4:600,big_op_spacing5:100,scriptspace:100,nulldelimiterspace:120,delimiterfactor:901,delimitershortfall:100,min_rule_thickness:1.25,min_root_space:1.5},BIGDIMEN:10000000,NBSP:"\u00A0"});var i=a.BBOX=MathJax.Object.Subclass({type:"g",removeable:true,Init:function(k){this.h=this.d=-a.BIGDIMEN;this.H=this.D=0;this.w=this.r=0;this.l=a.BIGDIMEN;this.x=this.y=0;this.scale=1;this.n=0;if(this.type){this.element=a.Element(this.type,k)}},With:function(k){return c.Insert(this,k)},Add:function(n,m,l,p,o){if(m){n.x+=m}if(l){n.y+=l}if(n.element){if(n.removeable&&n.element.childNodes.length===1&&n.n===1){var r=n.element.firstChild;if(r.nodeName==="use"||r.nodeName==="rect"){n.element=r;n.scale=n.childScale;var k=n.childX,q=n.childY;n.x+=k;n.y+=q;n.h-=q;n.d+=q;n.H-=q;n.D+=q;n.w-=k;n.r-=k;n.l+=k;n.removeable=false}}if(Math.abs(n.x)<1&&Math.abs(n.y)<1){n.remove=n.removeable}else{if(n.element.nodeName==="g"){if(!n.element.firstChild){n.remove=n.removeable}else{n.element.setAttribute("transform","translate("+Math.floor(n.x)+","+Math.floor(n.y)+")")}}else{if(n.element.nodeName==="line"||n.element.nodeName==="polygon"||n.element.nodeName==="path"||n.element.nodeName==="a"){n.element.setAttribute("transform","translate("+Math.floor(n.x)+","+Math.floor(n.y)+")")}else{n.element.setAttribute("x",Math.floor(n.x/n.scale));n.element.setAttribute("y",Math.floor(n.y/n.scale))}}}if(n.remove){this.n+=n.n;while(n.element.firstChild){if(o&&this.element.firstChild){this.element.insertBefore(n.element.firstChild,this.element.firstChild)}else{this.element.appendChild(n.element.firstChild)}}}else{if(o){this.element.insertBefore(n.element,this.element.firstChild)}else{this.element.appendChild(n.element)}}delete n.element}if(n.hasIndent){this.hasIndent=n.hasIndent}if(n.d-n.y>this.d){this.d=n.d-n.y;if(this.d>this.D){this.D=this.d}}if(n.y+n.h>this.h){this.h=n.y+n.h;if(this.h>this.H){this.H=this.h}}if(n.D-n.y>this.D){this.D=n.D-n.y}if(n.y+n.H>this.H){this.H=n.y+n.H}if(n.x+n.l<this.l){this.l=n.x+n.l}if(n.x+n.r>this.r){this.r=n.x+n.r}if(p||n.x+n.w+(n.X||0)>this.w){this.w=n.x+n.w+(n.X||0)}this.childScale=n.scale;this.childX=n.x;this.childY=n.y;this.n++;return n},Align:function(m,n,l,k){l=({left:l,center:(this.w-m.w)/2,right:this.w-m.w-l})[n]||0;this.Add(m,l,k)},Clean:function(){if(this.h===-a.BIGDIMEN){this.h=this.d=this.l=0}return this}});i.ROW=i.Subclass({Init:function(){this.SUPER(arguments).Init.call(this);this.svg=[];this.sh=this.sd=0},Check:function(l){var k=l.toSVG();this.svg.push(k);if(l.SVGcanStretch("Vertical")){k.mml=l}if(k.h>this.sh){this.sh=k.h}if(k.d>this.sd){this.sd=k.d}},Stretch:function(){for(var n=0,k=this.svg.length;n<k;n++){var l=this.svg[n];if(l.mml){l=l.mml.SVGstretchV(this.sh,this.sd)}if(l.ic){this.ic=l.ic}else{delete this.ic}this.Add(l,this.w,0,true)}delete this.svg}});i.RECT=i.Subclass({type:"rect",removeable:false,Init:function(l,n,k,m){if(m==null){m={stroke:"none"}}m.width=Math.floor(k);m.height=Math.floor(l+n);this.SUPER(arguments).Init.call(this,m);this.w=this.r=k;this.h=this.H=l+n;this.d=this.D=this.l=0;this.y=-n}});i.FRAME=i.Subclass({type:"rect",removeable:false,Init:function(n,q,k,m,p,l,o){if(o==null){o={}}o.fill="none";o["stroke-width"]=m.toFixed(2).replace(/\.?0+$/,"");o.width=Math.floor(k-m);o.height=Math.floor(n+q-m);o.transform="translate("+Math.floor(m/2)+","+Math.floor(-q+m/2)+")";if(p==="dashed"){o["stroke-dasharray"]=[Math.floor(6*a.em),Math.floor(6*a.em)].join(" ")}this.SUPER(arguments).Init.call(this,o);this.w=this.r=k;this.h=this.H=n;this.d=this.D=q;this.l=0}});i.HLINE=i.Subclass({type:"line",removeable:false,Init:function(l,p,r,o,q){if(q==null){q={}}if(o&&o!==""){q.stroke=o}q["stroke-width"]=p.toFixed(2).replace(/\.?0+$/,"");q.x1=0;q.y1=q.y2=p/2;q.x2=Math.floor(l);if(r==="dashed"){var s=Math.floor(l/(6*p)),k=Math.floor(l/(2*s+1));q["stroke-dasharray"]=k+" "+k}this.SUPER(arguments).Init.call(this,q);this.w=this.r=l;this.l=0;this.h=this.H=p;this.d=this.D=0}});i.VLINE=i.Subclass({type:"line",removeable:false,Init:function(p,o,r,l,q){if(q==null){q={}}if(l&&l!==""){q.stroke=l}q["stroke-width"]=o.toFixed(2).replace(/\.?0+$/,"");q.x1=q.x2=o/2;q.y1=0;q.y2=Math.floor(p);if(r==="dashed"){var s=Math.floor(p/(6*o)),k=Math.floor(p/(2*s+1));q["stroke-dasharray"]=k+" "+k}this.SUPER(arguments).Init.call(this,q);this.w=this.r=o;this.l=0;this.h=this.H=p;this.d=this.D=0}});i.TEXT=i.Subclass({type:"text",removeable:false,Init:function(n,m,k){if(!k){k={}}k.stroke="none";this.SUPER(arguments).Init.call(this,k);a.addText(this.element,m);a.textSVG.appendChild(this.element);var l=this.element.getBBox();a.textSVG.removeChild(this.element);n*=1000/a.em;this.element.setAttribute("transform","scale("+n+") matrix(1 0 0 -1 0 0)");this.w=this.r=l.width*n;this.l=0;this.h=this.H=-l.y*n;this.d=this.D=(l.height+l.y)*n}});i.G=i;i.NULL=i.Subclass({Init:function(){this.SUPER(arguments).Init.apply(this,arguments);this.Clean()}});var f,d;i.GLYPH=i.Subclass({type:"path",removeable:false,Init:function(q,m,u,v,x,s,k,n){var o,y=a.config.blacker;if(!f[m]){o={id:m,"stroke-width":y};if(n!==""){o.d="M"+n+"Z"}this.SUPER(arguments).Init.call(this,o);d.appendChild(this.element);f[m]=true}o={};if(q!==1){o.transform="scale("+q+")"}this.element=a.Element("use",o);this.element.setAttributeNS(j,"href","#"+m);this.h=(u+y)*q;this.d=(v+y)*q;this.w=(x+y/2)*q;this.l=(s+y/2)*q;this.r=(k+y/2)*q;this.H=Math.max(0,this.h);this.D=Math.max(0,this.d);this.x=this.y=0;this.scale=q}});c.Register.StartupHook("mml Jax Ready",function(){g=MathJax.ElementJax.mml;g.mbase.Augment({SVG:i,toSVG:function(){this.SVGgetStyles();var o=this.SVGgetVariant();var l=this.SVG();l.scale=this.SVGgetScale();this.SVGhandleSpace(l);for(var n=0,k=this.data.length;n<k;n++){if(this.data[n]){var q=l.Add(this.data[n].toSVG(o,l.scale),l.w,0,true);if(q.skew){l.skew=q.skew}}}l.Clean();var p=this.data.join("");if(l.skew&&p.length!==1){delete l.skew}if(l.r>l.w&&p.length===1&&!o.noIC){l.ic=l.r-l.w;l.w=l.r}this.SVGhandleColor(l);this.SVGsaveData(l);return l},SVGdataStretched:function(l,k,m){this.SVGdata={HW:k,D:m};if(m!=null){return this.data[l].SVGstretchV(k,m)}if(k!=null){return this.data[l].SVGstretchH(k)}return this.data[l].toSVG()},SVGsaveData:function(l){if(!this.SVGdata){this.SVGdata={}}this.SVGdata.w=l.w,this.SVGdata.x=l.x;if(l.X!=null){this.SVGdata.X=l.X}if(this["class"]){l.removeable=false;a.Element(l.element,{"class":this["class"]})}if(this.id){l.removeable=false;a.Element(l.element,{id:this.id})}if(this.href){var k=a.Element("a");k.setAttributeNS(j,"href",this.href);a.addElement(k,"rect",{width:l.w,height:l.h+l.d,y:-l.d,fill:"none",stroke:"none","pointer-events":"all"});if(l.type==="svg"){var n=l.element.firstChild;while(n.firstChild){k.appendChild(n.firstChild)}n.appendChild(k)}else{if(l.removeable&&l.element.nodeName==="g"){while(l.element.firstChild){k.appendChild(l.element.firstChild)}}else{k.appendChild(l.element)}l.element=k}l.removeable=false}if(a.config.addMMLclasses){l.removeable=false;l.element.setAttribute("className","mjx-svg-"+this.type)}var m=this.style;if(m){l.element.style.cssText=m;if(l.element.style.fontSize){l.element.style.fontSize=""}l.element.style.border=l.element.style.padding="";if(l.removeable){l.removeable=l.element.style.cssText===""}}},SVGgetStyles:function(){if(this.style){var k=e.Element("span");k.style.cssText=this.style;this.styles={border:a.getBorders(k),padding:a.getPadding(k)};if(k.style.fontSize){this.styles.fontSize=k.style.fontSize}if(k.style.color){this.styles.color=k.style.color}if(k.style.backgroundColor){this.styles.background=k.style.backgroundColor}if(k.style.fontStyle){this.styles.fontStyle=k.style.fontStyle}if(k.style.fontWeight){this.styles.fontWeight=k.style.fontWeight}if(k.style.fontFamily){this.styles.fontFamily=k.style.fontFamily}if(this.styles.fontWeight&&this.styles.fontWeight.match(/^\d+$/)){this.styles.fontWeight=(parseInt(this.styles.fontWeight)>600?"bold":"normal")}}},SVGhandleSpace:function(n){if(this.useMMLspacing){if(this.type!=="mo"){return}var m=this.getValues("scriptlevel","lspace","rspace");if(m.scriptlevel<=0||this.hasValue("lspace")||this.hasValue("rspace")){var l=this.SVGgetMu(n);m.lspace=Math.max(0,a.length2em(m.lspace,l));m.rspace=Math.max(0,a.length2em(m.rspace,l));var k=this,o=this.Parent();while(o&&o.isEmbellished()&&o.Core()===k){k=o;o=o.Parent()}if(m.lspace){n.x+=m.lspace}if(m.rspace){n.X=m.rspace}}}else{var p=this.texSpacing();if(p!==""){n.x+=a.length2em(p,this.SVGgetScale())/n.scale}}},SVGhandleColor:function(o){var w=this.getValues("mathcolor","color");if(this.styles&&this.styles.color&&!w.color){w.color=this.styles.color}if(w.color&&!this.mathcolor){w.mathcolor=w.color}if(w.mathcolor){a.Element(o.element,{fill:w.mathcolor,stroke:w.mathcolor});o.removeable=false}var s=(this.styles||{}).border,u=(this.styles||{}).padding,t=((s||{}).left||0),q=((u||{}).left||0),k;w.background=(this.mathbackground||this.background||(this.styles||{}).background||g.COLOR.TRANSPARENT);if(t+q){var l=i();for(k in o){if(o.hasOwnProperty(k)){l[k]=o[k]}}l.x=0;l.y=0;o.element=a.Element("g");o.removeable=true;o.Add(l,t+q,0)}if(u){o.w+=u.right;o.h+=u.top;o.d+=u.bottom}if(s){o.w+=s.right;o.h+=s.top;o.d+=s.bottom}if(w.background!==g.COLOR.TRANSPARENT){if(o.element.nodeName!=="g"&&o.element.nodeName!=="svg"){var p=a.Element("g");p.appendChild(o.element);o.element=p;o.removeable=true}o.Add(i.RECT(o.h,o.d,o.w,{fill:w.background,stroke:"none"}),0,0,false,true)}if(s){var v=5;var m={left:["V",o.h+o.d,-v,-o.d],right:["V",o.h+o.d,o.w-s.right+v,-o.d],top:["H",o.w,0,o.h-s.top+v],bottom:["H",o.w,0,-o.d-v]};for(k in m){if(m.hasOwnProperty(k)){if(s[k]){var r=m[k],n=i[r[0]+"LINE"];o.Add(n(r[1],s[k],s[k+"Style"],s[k+"Color"]),r[2],r[3])}}}}},SVGhandleVariant:function(k,m,l){return a.HandleVariant(k,m,l)},SVGgetVariant:function(){var k=this.getValues("mathvariant","fontfamily","fontweight","fontstyle");var l=k.mathvariant;if(this.variantForm){l="-TeX-variant"}k.hasVariant=this.Get("mathvariant",true);if(!k.hasVariant){k.family=k.fontfamily;k.weight=k.fontweight;k.style=k.fontstyle}if(this.styles){if(!k.style&&this.styles.fontStyle){k.style=this.styles.fontStyle}if(!k.weight&&this.styles.fontWeight){k.weight=this.styles.fontWeight}if(!k.family&&this.styles.fontFamily){k.family=this.styles.fontFamily}}if(k.family&&!k.hasVariant){if(!k.weight&&k.mathvariant.match(/bold/)){k.weight="bold"}if(!k.style&&k.mathvariant.match(/italic/)){k.style="italic"}l={forceFamily:true,font:{"font-family":k.family}};if(k.style){l.font["font-style"]=k.style}if(k.weight){l.font["font-weight"]=k.weight}return l}if(k.weight==="bold"){l={normal:g.VARIANT.BOLD,italic:g.VARIANT.BOLDITALIC,fraktur:g.VARIANT.BOLDFRAKTUR,script:g.VARIANT.BOLDSCRIPT,"sans-serif":g.VARIANT.BOLDSANSSERIF,"sans-serif-italic":g.VARIANT.SANSSERIFBOLDITALIC}[l]||l}else{if(k.weight==="normal"){l={bold:g.VARIANT.normal,"bold-italic":g.VARIANT.ITALIC,"bold-fraktur":g.VARIANT.FRAKTUR,"bold-script":g.VARIANT.SCRIPT,"bold-sans-serif":g.VARIANT.SANSSERIF,"sans-serif-bold-italic":g.VARIANT.SANSSERIFITALIC}[l]||l}}if(k.style==="italic"){l={normal:g.VARIANT.ITALIC,bold:g.VARIANT.BOLDITALIC,"sans-serif":g.VARIANT.SANSSERIFITALIC,"bold-sans-serif":g.VARIANT.SANSSERIFBOLDITALIC}[l]||l}else{if(k.style==="normal"){l={italic:g.VARIANT.NORMAL,"bold-italic":g.VARIANT.BOLD,"sans-serif-italic":g.VARIANT.SANSSERIF,"sans-serif-bold-italic":g.VARIANT.BOLDSANSSERIF}[l]||l}}return a.FONTDATA.VARIANT[l]},SVGgetScale:function(){var l=1,k=this.getValues("mathsize","scriptlevel","fontsize");if((this.styles||{}).fontSize&&!k.fontsize){k.fontsize=this.styles.fontSize}if(k.fontsize&&!this.mathsize){k.mathsize=k.fontsize}if(k.scriptlevel!==0){if(k.scriptlevel>2){k.scriptlevel=2}l=Math.pow(this.Get("scriptsizemultiplier"),k.scriptlevel);k.scriptminsize=a.length2em(this.Get("scriptminsize"))/1000;if(l<k.scriptminsize){l=k.scriptminsize}}l*=a.length2em(k.mathsize)/1000;return l},SVGgetMu:function(m){var k=1,l=this.getValues("scriptlevel","scriptsizemultiplier");if(m.scale&&m.scale!==1){k=1/m.scale}if(l.scriptlevel!==0){if(l.scriptlevel>2){l.scriptlevel=2}k=Math.sqrt(Math.pow(l.scriptsizemultiplier,l.scriptlevel))}return k},SVGnotEmpty:function(k){while(k){if((k.type!=="mrow"&&k.type!=="texatom")||k.data.length>1){return true}k=k.data[0]}return false},SVGcanStretch:function(k){if(this.isEmbellished()){return this.Core().SVGcanStretch(k)}return false},SVGstretchV:function(k,l){return this.toSVG(k,l)},SVGstretchH:function(k){return this.toSVG(k)},SVGlineBreaks:function(){return false}},{SVGautoload:function(){var k=a.autoloadDir+"/"+this.type+".js";c.RestartAfter(h.Require(k))},SVGautoloadFile:function(k){var l=a.autoloadDir+"/"+k+".js";c.RestartAfter(h.Require(l))}});g.chars.Augment({toSVG:function(l,o,k,m){var n=this.data.join("").replace(/[\u2061-\u2064]/g,"");if(k){n=k(n,m)}return this.SVGhandleVariant(l,o,n)}});g.entity.Augment({toSVG:function(k,l){return this.SVGhandleVariant(k,l,this.toString().replace(/[\u2061-\u2064]/g,""))}});g.mo.Augment({toSVG:function(){this.SVGgetStyles();var r=this.svg=this.SVG();this.SVGhandleSpace(r);if(this.data.length==0){r.Clean();this.SVGsaveData(r);return r}var n=this.SVGgetScale(),p=this.SVGgetVariant();var w=this.getValues("largeop","displaystyle");if(w.largeop){p=a.FONTDATA.VARIANT[w.displaystyle?"-largeOp":"-smallOp"]}var v=this.CoreParent(),o=(v&&v.isa(g.msubsup)&&this!==v.data[0]),k=(o?this.SVGremapChars:null);if(this.data.join("").length===1&&v&&v.isa(g.munderover)&&this.CoreText(v.data[v.base]).length===1){var s=v.data[v.over],u=v.data[v.under];if(s&&this===s.CoreMO()&&v.Get("accent")){k=a.FONTDATA.REMAPACCENT}else{if(u&&this===u.CoreMO()&&v.Get("accentunder")){k=a.FONTDATA.REMAPACCENTUNDER}}}for(var q=0,l=this.data.length;q<l;q++){if(this.data[q]){var y=this.data[q].toSVG(p,n,this.SVGremap,k),t=r.w;if(t===0&&-y.l>10*y.w){t+=-y.l}r.Add(y,t,0,true);if(y.skew){r.skew=y.skew}}}r.Clean();if(this.data.join("").length!==1){delete r.skew}if(w.largeop){r.y=(r.h-r.d)/2/n-a.TeX.axis_height;if(r.r>r.w){r.ic=r.r-r.w;r.w=r.r}}this.SVGhandleColor(r);this.SVGsaveData(r);return r},CoreParent:function(){var k=this;while(k&&k.isEmbellished()&&k.CoreMO()===this&&!k.isa(g.math)){k=k.Parent()}return k},CoreText:function(k){if(!k){return""}if(k.isEmbellished()){return k.CoreMO().data.join("")}while(k.isa(g.mrow)&&k.data.length===1&&k.data[0]){k=k.data[0]}if(!k.isToken){return""}else{return k.data.join("")}},SVGremapChars:{"*":"\u2217",'"':"\u2033","\u00B0":"\u2218","\u00B2":"2","\u00B3":"3","\u00B4":"\u2032","\u00B9":"1"},SVGremap:function(l,k){l=l.replace(/-/g,"\u2212");if(k){l=l.replace(/'/g,"\u2032").replace(/`/g,"\u2035");if(l.length===1){l=k[l]||l}}return l},SVGcanStretch:function(o){if(!this.Get("stretchy")){return false}var p=this.data.join("");if(p.length>1){return false}var l=this.CoreParent();if(l&&l.isa(g.munderover)&&this.CoreText(l.data[l.base]).length===1){var n=l.data[l.over],k=l.data[l.under];if(n&&this===n.CoreMO()&&l.Get("accent")){p=a.FONTDATA.REMAPACCENT[p]||p}else{if(k&&this===k.CoreMO()&&l.Get("accentunder")){p=a.FONTDATA.REMAPACCENTUNDER[p]||p}}}p=a.FONTDATA.DELIMITERS[p.charCodeAt(0)];var m=(p&&p.dir==o.substr(0,1));if(!m){delete this.svg}return m},SVGstretchV:function(p,q){var m=this.svg||this.toSVG();var l=this.getValues("symmetric","maxsize","minsize");var o=a.TeX.axis_height,k=this.SVGgetMu(m),n;if(l.symmetric){n=2*Math.max(p-o,q+o)}else{n=p+q}l.maxsize=a.length2em(l.maxsize,k,m.h+m.d);l.minsize=a.length2em(l.minsize,k,m.h+m.d);n=Math.max(l.minsize,Math.min(l.maxsize,n));m=a.createDelimiter(this.data.join("").charCodeAt(0),n,m.scale);if(l.symmetric){n=(m.h+m.d)/2+o}else{n=(m.h+m.d)*p/(p+q)}m.y=n-m.h;this.SVGhandleSpace(m);this.SVGhandleColor(m);delete this.svg;this.SVGsaveData(m);return m},SVGstretchH:function(l){var n=this.svg||this.toSVG(),k=this.SVGgetMu(n);var m=this.getValues("maxsize","minsize","mathvariant","fontweight");if((m.fontweight==="bold"||parseInt(m.fontweight)>=600)&&!this.Get("mathvariant",true)){m.mathvariant=g.VARIANT.BOLD}m.maxsize=a.length2em(m.maxsize,k,n.w);m.minsize=a.length2em(m.minsize,k,n.w);l=Math.max(m.minsize,Math.min(m.maxsize,l));n=a.createDelimiter(this.data.join("").charCodeAt(0),l,n.scale,m.mathvariant);this.SVGhandleSpace(n);this.SVGhandleColor(n);delete this.svg;this.SVGsaveData(n);return n}});g.mtext.Augment({toSVG:function(){this.SVGgetStyles();var k,m,l=this.SVGgetScale();if(this.Parent().type==="merror"){k=this.SVG();this.SVGhandleSpace(k);m=i.G();m.Add(i.TEXT(0.9*l,this.data.join(""),{fill:"#C00"}));k.Add(i.RECT(m.h+100,m.d+100,m.w+200,{fill:"#FF8",stroke:"#C00","stroke-width":50}),0,0);k.Add(m,150,0);k.H+=150;k.D+=50;k.Clean();this.SVGsaveData(k);return k}else{if(a.config.mtextFontInherit){k=this.SVG();this.SVGhandleSpace(k);k.Add(i.TEXT(l,this.data.join("")));k.Clean();this.SVGhandleColor(k);this.SVGsaveData(k);return k}else{return this.SUPER(arguments).toSVG.call(this)}}}});g.ms.Augment({toSVG:g.mbase.SVGautoload});g.mglyph.Augment({toSVG:g.mbase.SVGautoload});g.mspace.Augment({toSVG:function(){this.SVGgetStyles();var m=this.getValues("height","depth","width");m.mathbackground=this.mathbackground;if(this.background&&!this.mathbackground){m.mathbackground=this.background}var l=this.SVG(),k=this.SVGgetMu(l);l.h=a.length2em(m.height,k)/l.scale;l.d=a.length2em(m.depth,k)/l.scale;l.w=l.r=a.length2em(m.width,k)/l.scale;if(l.w<0){l.x=l.w;l.w=l.r=0}if(l.h<-l.d){l.d=-l.h}l.l=0;l.Clean();this.SVGhandleColor(l);this.SVGsaveData(l);return l}});g.mphantom.Augment({toSVG:function(k,m){this.SVGgetStyles();var l=this.SVG();if(this.data[0]!=null){this.SVGhandleSpace(l);l.Add(this.SVGdataStretched(0,k,m));l.Clean();while(l.element.firstChild){l.element.removeChild(l.element.firstChild)}}this.SVGhandleColor(l);this.SVGsaveData(l);if(l.removeable&&!l.element.firstChild){delete l.element}return l}});g.mpadded.Augment({toSVG:function(l,k){this.SVGgetStyles();var o=this.SVG();if(this.data[0]!=null){this.SVGhandleSpace(o);var m=this.SVGdataStretched(0,l,k),u=this.SVGgetMu(o);var t=this.getValues("height","depth","width","lspace","voffset"),r=0,q=0;if(t.lspace){r=this.SVGlength2em(m,t.lspace,u)}if(t.voffset){q=this.SVGlength2em(m,t.voffset,u)}var n=m.h,p=m.d,s=m.w;o.Add(m,r,q);o.Clean();o.h=n;o.d=p;o.w=s;o.removeable=false;if(t.height!==""){o.h=this.SVGlength2em(o,t.height,u,"h",0)}if(t.depth!==""){o.d=this.SVGlength2em(o,t.depth,u,"d",0)}if(t.width!==""){o.w=this.SVGlength2em(o,t.width,u,"w",0)}if(o.h>o.H){o.H=o.h}if(o.d>o.D){o.D=o.d}}this.SVGhandleColor(o);this.SVGsaveData(o);return o},SVGlength2em:function(o,r,l,s,k){if(k==null){k=-a.BIGDIMEN}var p=String(r).match(/width|height|depth/);var q=(p?o[p[0].charAt(0)]:(s?o[s]:0));var n=a.length2em(r,l,q);if(s&&String(r).match(/^\s*[-+]/)){return Math.max(k,o[s]+n)}else{return n}}});g.mrow.Augment({SVG:i.ROW,toSVG:function(){this.SVGgetStyles();var l=this.SVG();this.SVGhandleSpace(l);for(var n=0,k=this.data.length;n<k;n++){if(this.data[n]){l.Check(this.data[n])}}l.Stretch();l.Clean();if(this.SVGlineBreaks(l)){l=this.SVGmultiline(l)}this.SVGhandleColor(l);this.SVGsaveData(l);return l},SVGlineBreaks:function(k){if(!this.parent.linebreakContainer){return false}return(a.config.linebreaks.automatic&&k.w>a.linebreakWidth)||this.hasNewline()},SVGmultiline:function(k){g.mbase.SVGautoloadFile("multiline")},SVGstretchH:function(k){var l=this.data[this.core].SVGstretchH(k);this.SVGhandleColor(l);this.SVGsaveData(l);return l},SVGstretchV:function(l,m){var k=this.data[this.core].SVGstretchV(l,m);this.SVGhandleColor(k);this.SVGsaveData(k);return k}});g.mstyle.Augment({toSVG:function(){this.SVGgetStyles();var k=this.SVG();if(this.data[0]!=null){this.SVGhandleSpace(k);var l=k.Add(this.data[0].toSVG());k.Clean();if(l.ic){k.ic=l.ic}this.SVGhandleColor(k)}this.SVGsaveData(k);return k},SVGstretchH:function(k){return(this.data[0]!=null?this.data[0].SVGstretchH(k):i.NULL())},SVGstretchV:function(k,l){return(this.data[0]!=null?this.data[0].SVGstretchV(k,l):i.NULL())}});g.mfrac.Augment({toSVG:function(){this.SVGgetStyles();var w=this.SVG();this.SVGhandleSpace(w);var s=this.data[0].toSVG(),y=this.data[1].toSVG();var C=this.getValues("displaystyle","linethickness","numalign","denomalign","bevelled");var r=w.scale=this.SVGgetScale(),n=C.displaystyle;var x=a.TeX.axis_height*r;if(C.bevelled){var B=(n?400:150);var A=Math.max(s.h+s.d,y.h+y.d)+2*B;var F=a.createDelimiter(47,A);w.Add(s,0,(s.d-s.h)/2+x+B);w.Add(F,s.w-B/2,(F.d-F.h)/2+x);w.Add(y,s.w+F.w-B,(y.d-y.h)/2+x-B)}else{var o=Math.max(s.w,y.w);var E=a.thickness2em(C.linethickness,r),m,l,D,z;var k=a.TeX.min_rule_thickness/a.em*1000;if(n){D=a.TeX.num1;z=a.TeX.denom1}else{D=(E===0?a.TeX.num3:a.TeX.num2);z=a.TeX.denom2}D*=r;z*=r;if(E===0){m=Math.max((n?7:3)*a.TeX.rule_thickness,2*k);l=(D-s.d)-(y.h-z);if(l<m){D+=(m-l)/2;z+=(m-l)/2}w.w=o;E=0}else{m=Math.max((n?2:0)*k+E,E/2+1.5*k);l=(D-s.d)-(x+E/2);if(l<m){D+=m-l}l=(x-E/2)-(y.h-z);if(l<m){z+=m-l}w.Add(i.RECT(E/2,E/2,o+2*E),0,x)}w.Align(s,C.numalign,E,D);w.Align(y,C.denomalign,E,-z)}w.Clean();this.SVGhandleColor(w);this.SVGsaveData(w);return w},SVGcanStretch:function(k){return false},SVGhandleSpace:function(k){if(!this.texWithDelims){k.x=(this.useMMLspacing?0:a.length2em(this.texSpacing()||0))+120;k.X=120}}});g.msqrt.Augment({toSVG:function(){this.SVGgetStyles();var r=this.SVG();this.SVGhandleSpace(r);var m=this.data[0].toSVG(),s,o;var n=this.SVGgetScale();var w=a.TeX.rule_thickness*n,l,k,v,u=0;if(this.Get("displaystyle")){l=a.TeX.x_height*n}else{l=w}k=Math.max(w+l/4,1000*a.TeX.min_root_space/a.em);v=m.h+m.d+k+w;o=a.createDelimiter(8730,v,n);if(o.h+o.d>v){k=((o.h+o.d)-(v-w))/2}s=i.RECT(w,0,m.w);v=m.h+k+w;u=this.SVGaddRoot(r,o,u,o.h+o.d-v,n);r.Add(o,u,v-o.h);r.Add(s,u+o.w,v-s.h);r.Add(m,u+o.w,0);r.Clean();r.h+=w;r.H+=w;this.SVGhandleColor(r);this.SVGsaveData(r);return r},SVGaddRoot:function(l,m,k,o,n){return k}});g.mroot.Augment({toSVG:g.msqrt.prototype.toSVG,SVGaddRoot:function(n,l,q,o,k){var s=(l.isMultiChar?0.55:0.65)*l.w;if(this.data[1]){var p=this.data[1].toSVG();p.x=0;var m=this.SVGrootHeight(l.h+l.d,k,p)-o;var r=Math.min(p.w,p.r);q=Math.max(r,s);n.Add(p,q-r,m)}else{s=q}return q-s},SVGrootHeight:function(m,l,k){return 0.45*(m-900*l)+600*l+Math.max(0,k.d-75)}});g.mfenced.Augment({SVG:i.ROW,toSVG:function(){this.SVGgetStyles();var l=this.SVG();this.SVGhandleSpace(l);if(this.data.open){l.Check(this.data.open)}if(this.data[0]!=null){l.Check(this.data[0])}for(var n=1,k=this.data.length;n<k;n++){if(this.data[n]){if(this.data["sep"+n]){l.Check(this.data["sep"+n])}l.Check(this.data[n])}}if(this.data.close){l.Check(this.data.close)}l.Stretch();l.Clean();this.SVGhandleColor(l);this.SVGsaveData(l);return l}});g.menclose.Augment({toSVG:g.mbase.SVGautoload});g.maction.Augment({toSVG:g.mbase.SVGautoload});g.semantics.Augment({toSVG:function(){this.SVGgetStyles();var k=this.SVG();if(this.data[0]!=null){this.SVGhandleSpace(k);k.Add(this.data[0].toSVG());k.Clean()}else{k.Clean()}this.SVGsaveData(k);return k},SVGstretchH:function(k){return(this.data[0]!=null?this.data[0].SVGstretchH(k):i.NULL())},SVGstretchV:function(k,l){return(this.data[0]!=null?this.data[0].SVGstretchV(k,l):i.NULL())}});g.munderover.Augment({toSVG:function(F,C){this.SVGgetStyles();var l=this.getValues("displaystyle","accent","accentunder","align");if(!l.displaystyle&&this.data[this.base]!=null&&this.data[this.base].CoreMO().Get("movablelimits")){return g.msubsup.prototype.toSVG.call(this)}var E=this.SVG();this.SVGhandleSpace(E);var M=E.scale=this.SVGgetScale();var p=[],K=[],u,J,G,n=-a.BIGDIMEN,I=n;for(J=0,G=this.data.length;J<G;J++){if(this.data[J]!=null){if(J==this.base){p[J]=this.SVGdataStretched(J,F,C);K[J]=(C!=null||F==null)&&this.data[J].SVGcanStretch("Horizontal")}else{p[J]=this.data[J].toSVG();K[J]=this.data[J].SVGcanStretch("Horizontal")}if(p[J].w>I){I=p[J].w}if(!K[J]&&I>n){n=I}}}if(C==null&&F!=null){n=F}else{if(n==-a.BIGDIMEN){n=I}}for(J=I=0,G=this.data.length;J<G;J++){if(this.data[J]){if(K[J]){p[J]=this.data[J].SVGstretchH(n)}if(p[J].w>I){I=p[J].w}}}var B=a.TeX.rule_thickness;var o=p[this.base]||{w:0,h:0,d:0,H:0,D:0,l:0,r:0,scale:M};var s,q,w,v,r,A,H,L=0;if(o.ic){L=1.3*o.ic+0.05}for(J=0,G=this.data.length;J<G;J++){if(this.data[J]!=null){u=p[J];r=a.TeX.big_op_spacing5*M;var z=(J!=this.base&&l[this.ACCENTS[J]]);if(z&&u.w<=1){u.x=-u.l;p[J]=i.G().With({removeable:false});p[J].Add(u);p[J].Clean();p[J].w=-u.l;u=p[J]}A={left:0,center:(I-u.w)/2,right:I-u.w}[l.align];s=A;q=0;if(J==this.over){if(z){H=B*M;r=0;if(o.skew){s+=o.skew}}else{w=a.TeX.big_op_spacing1*M;v=a.TeX.big_op_spacing3*M;H=Math.max(w,v-Math.max(0,u.d))}H=Math.max(H,1500/a.em);s+=L/2;q=o.h+u.d+H;u.h+=r;if(u.h>u.H){u.H=u.h}}else{if(J==this.under){if(z){H=3*B*M;r=0}else{w=a.TeX.big_op_spacing2*M;v=a.TeX.big_op_spacing4*M;H=Math.max(w,v-u.h)}H=Math.max(H,1500/a.em);s-=L/2;q=-(o.d+u.h+H);u.d+=r;if(u.d>u.D){u.D=u.d}}}E.Add(u,s,q)}}E.Clean();this.SVGhandleColor(E);this.SVGsaveData(E);return E}});g.msubsup.Augment({toSVG:function(G,z){this.SVGgetStyles();var B=this.SVG();this.SVGhandleSpace(B);var K=B.scale=this.SVGgetScale(),E=this.SVGgetMu(B);var m=B.Add(this.SVGdataStretched(this.base,G,z));var l=(this.data[this.sup]||this.data[this.sub]||this).SVGgetScale();var I=a.TeX.x_height*K,y=a.TeX.scriptspace*K;var k,n;if(this.SVGnotEmpty(this.data[this.sup])){k=this.data[this.sup].toSVG();k.w+=y;k.r=Math.max(k.w,k.r)}if(this.SVGnotEmpty(this.data[this.sub])){n=this.data[this.sub].toSVG();n.w+=y;n.r=Math.max(n.w,n.r)}var C=a.TeX.sup_drop*l,A=a.TeX.sub_drop*l;var w=m.h-C,o=m.d+A,J=0,F;if(m.ic){m.w-=m.ic;J=1.3*m.ic+0.05}if(this.data[this.base]&&(this.data[this.base].type==="mi"||this.data[this.base].type==="mo")){if(this.data[this.base].data.join("").length===1&&m.scale===1&&!m.stretched&&!this.data[this.base].Get("largeop")){w=o=0}}var H=this.getValues("subscriptshift","superscriptshift");H.subscriptshift=(H.subscriptshift===""?0:a.length2em(H.subscriptshift,E));H.superscriptshift=(H.superscriptshift===""?0:a.length2em(H.superscriptshift,E));if(!k){if(n){o=Math.max(o,a.TeX.sub1*K,n.h-(4/5)*I,H.subscriptshift);B.Add(n,m.w,-o)}}else{if(!n){values=this.getValues("displaystyle","texprimestyle");F=a.TeX[(values.displaystyle?"sup1":(values.texprimestyle?"sup3":"sup2"))];w=Math.max(w,F*K,k.d+(1/4)*I,H.superscriptshift);B.Add(k,m.w+J,w)}else{o=Math.max(o,a.TeX.sub2*K);var x=a.TeX.rule_thickness*K;if((w-k.d)-(n.h-o)<3*x){o=3*x-w+k.d+n.h;C=(4/5)*I-(w-k.d);if(C>0){w+=C;o-=C}}B.Add(k,m.w+J,Math.max(w,H.superscriptshift));B.Add(n,m.w,-Math.max(o,H.subscriptshift))}}B.Clean();this.SVGhandleColor(B);this.SVGsaveData(B);return B}});g.mmultiscripts.Augment({toSVG:g.mbase.SVGautoload});g.mtable.Augment({toSVG:g.mbase.SVGautoload});g["annotation-xml"].Augment({toSVG:g.mbase.SVGautoload});g.math.Augment({SVG:i.Subclass({type:"svg",removeable:false}),toSVG:function(t,m){if(this.data[0]){this.SVGgetStyles();g.mbase.prototype.displayAlign=c.config.displayAlign;g.mbase.prototype.displayIndent=c.config.displayIndent;var q=i.G({stroke:"black",fill:"black","stroke-thickness":0,transform:"matrix(1 0 0 -1 0 0)"}).With({removeable:false});q.Add(this.data[0].toSVG(),0,0,true);q.Clean();this.SVGhandleColor(q);var s=this.SVG();s.element.setAttribute("xmlns:xlink",j);s.Add(q);s.Clean();this.SVGsaveData(s);var p=Math.max(-s.l,0),k=Math.max(s.r-s.w,0);var n=s.element.style;n.width=a.Ex(p+s.w+k);n.height=a.Ex(s.H+s.D);n.verticalAlign=a.Ex(-s.D-2*a.em);n.marginLeft=a.Ex(-p);n.marginRight=a.Ex(-k);s.element.setAttribute("viewBox",(-p)+" "+(-s.H)+" "+(p+s.w+k)+" "+(s.H+s.D));s.element.style.margin="1px 0px";if(s.H>s.h||s.D>s.d){var o=e.Element("span",{style:{display:"inline-block","white-space":"nowrap",padding:"1px 0px"},isMathJax:true},[["span",{style:{display:"inline-block",position:"relative",isMathJax:true,width:a.Ex(s.w),height:a.Ex(s.h+s.d),"vertical-align":a.Ex(-s.d)}}]]);o.firstChild.appendChild(s.element);s.element=o;n.verticalAlign="";n.position="absolute";n.bottom=a.Ex(s.d-s.D);n.left=0}t.appendChild(s.element);s.element=null;if(!this.isMultiline&&this.Get("display")==="block"){var u=this.getValues("indentalignfirst","indentshiftfirst","indentalign","indentshift");if(u.indentalignfirst!==g.INDENTALIGN.INDENTALIGN){u.indentalign=u.indentalignfirst}if(u.indentalign===g.INDENTALIGN.AUTO){u.indentalign=this.displayAlign}m.style.textAlign=u.indentalign;if(u.indentshiftfirst!==g.INDENTSHIFT.INDENTSHIFT){u.indentshift=u.indentshiftfirst}if(u.indentshift==="auto"){u.indentshift=this.displayIndent}if(u.indentshift&&u.indentalign!==g.INDENTALIGN.CENTER&&!s.hasIndent){t.style[{left:"marginLeft",right:"marginRight"}[u.indentalign]]=a.Ex(a.length2em(u.indentshift))}}}return t}});g.TeXAtom.Augment({toSVG:function(){this.SVGgetStyles();var k=this.SVG();this.SVGhandleSpace(k);if(this.data[0]!=null){var l=this.data[0].toSVG(),m=0;if(this.texClass===g.TEXCLASS.VCENTER){m=a.TeX.axis_height-(l.h+l.d)/2+l.d}k.Add(l,0,m);k.ic=l.ic}this.SVGhandleColor(k);this.SVGsaveData(k);return k}});c.Register.StartupHook("onLoad",function(){setTimeout(MathJax.Callback(["loadComplete",a,"jax.js"]),0)})});c.Register.StartupHook("End Cookie",function(){if(c.config.menuSettings.zoom!=="None"){h.Require("[MathJax]/extensions/MathZoom.js")}});if(!document.createElementNS){if(!document.namespaces.svg){document.namespaces.add("svg",b)}a.Augment({Element:function(k,l){var m=(typeof(k)==="string"?document.createElement("svg:"+k):k);m.isMathJax=true;if(l){for(var n in l){if(l.hasOwnProperty(n)){m.setAttribute(n,l[n].toString())}}}return m}})}})(MathJax.Ajax,MathJax.Hub,MathJax.HTML,MathJax.OutputJax.SVG); +(function(h,c,e,a){var g;var b="http://www.w3.org/2000/svg";var j="http://www.w3.org/1999/xlink";a.Augment({config:{styles:{".MathJax_SVG":{display:"inline","font-style":"normal","font-weight":"normal","line-height":"normal","font-size":"100%","font-size-adjust":"none","text-indent":0,"text-align":"left","text-transform":"none","letter-spacing":"normal","word-spacing":"normal","word-wrap":"normal","white-space":"nowrap","float":"none",direction:"ltr",border:0,padding:0,margin:0},".MathJax_SVG_Display":{position:"relative",display:"block",width:"100%"},".MathJax_SVG_Processing":{visibility:"hidden",position:"absolute",top:0,left:0,width:0,height:0,overflow:"hidden",display:"block"},".MathJax_SVG_Processed":{display:"none!important"},".MathJax_SVG_ExBox":{display:"block",overflow:"hidden",width:"1px",height:"60ex"},"#MathJax_SVG_Tooltip":{position:"absolute",left:0,top:0,width:"auto",height:"auto",display:"none"}}},hideProcessedMath:true,Config:function(){var k=c.config.menuSettings;if(k.scale){this.config.scale=k.scale}this.SUPER(arguments).Config.apply(this,arguments);this.fontInUse=this.config.font;this.fontDir+="/"+this.config.font;if(!this.require){this.require=[]}this.require.push(this.fontDir+"/fontdata.js");this.require.push(MathJax.OutputJax.extensionDir+"/MathEvents.js")},Startup:function(){EVENT=MathJax.Extension.MathEvents.Event;TOUCH=MathJax.Extension.MathEvents.Touch;HOVER=MathJax.Extension.MathEvents.Hover;this.ContextMenu=EVENT.ContextMenu;this.Mousedown=EVENT.AltContextMenu;this.Mouseover=HOVER.Mouseover;this.Mouseout=HOVER.Mouseout;this.Mousemove=HOVER.Mousemove;this.hiddenDiv=e.Element("div",{style:{visibility:"hidden",overflow:"hidden",position:"absolute",top:0,height:"1px",width:"auto",padding:0,border:0,margin:0,textAlign:"left",textIndent:0,textTransform:"none",lineHeight:"normal",letterSpacing:"normal",wordSpacing:"normal"}});if(!document.body.firstChild){document.body.appendChild(this.hiddenDiv)}else{document.body.insertBefore(this.hiddenDiv,document.body.firstChild)}this.hiddenDiv=e.addElement(this.hiddenDiv,"div",{id:"MathJax_SVG_Hidden"});var k=e.addElement(this.hiddenDiv,"div",{style:{width:"5in"}});this.pxPerInch=k.offsetWidth/5;this.hiddenDiv.removeChild(k);this.textSVG=this.Element("svg");d=this.addElement(this.addElement(this.hiddenDiv.parentNode,"svg"),"defs",{id:"MathJax_SVG_glyphs"});f={};this.ExSpan=e.Element("span",{style:{position:"absolute","font-size-adjust":"none"}},[["span",{className:"MathJax_SVG_ExBox"}]]);this.linebreakSpan=e.Element("span",null,[["hr",{style:{width:"auto",size:1,padding:0,border:0,margin:0}}]]);return h.Styles(this.config.styles,["InitializeSVG",this])},InitializeSVG:function(){document.body.appendChild(this.ExSpan);document.body.appendChild(this.linebreakSpan);this.defaultEx=this.ExSpan.firstChild.offsetHeight/60;this.defaultWidth=this.linebreakSpan.firstChild.offsetWidth;document.body.removeChild(this.linebreakSpan);document.body.removeChild(this.ExSpan)},preTranslate:function(o){var t=o.jax[this.id],u,r=t.length,z,s,A,n,y,l,x,q,k,w=false,v,B=this.config.linebreaks.automatic,p=this.config.linebreaks.width;if(B){w=(p.match(/^\s*(\d+(\.\d*)?%\s*)?container\s*$/)!=null);if(w){p=p.replace(/\s*container\s*/,"")}else{k=this.defaultWidth}if(p===""){p="100%"}}else{k=100000}for(u=0;u<r;u++){z=t[u];if(!z.parentNode){continue}s=z.previousSibling;if(s&&String(s.className).match(/^MathJax(_SVG)?(_Display)?( MathJax(_SVG)?_Processing)?$/)){s.parentNode.removeChild(s)}l=z.MathJax.elementJax;if(!l){continue}l.SVG={display:(l.root.Get("display")==="block")};A=n=e.Element("span",{style:{"font-size":this.config.scale+"%",display:"inline-block"},className:"MathJax_SVG",id:l.inputID+"-Frame",isMathJax:true,jaxID:this.id,oncontextmenu:EVENT.Menu,onmousedown:EVENT.Mousedown,onmouseover:EVENT.Mouseover,onmouseout:EVENT.Mouseout,onmousemove:EVENT.Mousemove,onclick:EVENT.Click,ondblclick:EVENT.DblClick});if(c.Browser.noContextMenu){A.ontouchstart=TOUCH.start;A.ontouchend=TOUCH.end}if(l.SVG.display){n=e.Element("div",{className:"MathJax_SVG_Display"});n.appendChild(A)}n.setAttribute("role","textbox");n.setAttribute("aria-readonly","true");n.className+=" MathJax_SVG_Processing";z.parentNode.insertBefore(n,z);z.parentNode.insertBefore(this.ExSpan.cloneNode(true),z);n.parentNode.insertBefore(this.linebreakSpan.cloneNode(true),n)}for(u=0;u<r;u++){z=t[u];if(!z.parentNode){continue}y=z.previousSibling;n=y.previousSibling;l=z.MathJax.elementJax;if(!l){continue}x=y.firstChild.offsetHeight/60;v=n.previousSibling.firstChild.offsetWidth;if(w){k=v}if(x===0||x==="NaN"){this.hiddenDiv.appendChild(n);l.SVG.isHidden=true;x=this.defaultEx;v=this.defaultWidth;if(w){k=this.defaultWidth}}l.SVG.ex=x;l.SVG.cwidth=v;l.SVG.em=q=x/a.TeX.x_height*1000;l.SVG.lineWidth=(B?this.length2em(p,1,k/q):1000000)}for(u=0;u<r;u++){z=t[u];if(!z.parentNode){continue}y=t[u].previousSibling;A=y.previousSibling;l=t[u].MathJax.elementJax;if(!l){continue}if(!l.SVG.isHidden){A=A.previousSibling}A.parentNode.removeChild(A);y.parentNode.removeChild(y)}o.SVGeqn=o.SVGlast=0;o.SVGi=-1;o.SVGchunk=this.config.EqnChunk;o.SVGdelay=false},Translate:function(l,p){if(!l.parentNode){return}if(p.SVGdelay){p.SVGdelay=false;c.RestartAfter(MathJax.Callback.Delay(this.config.EqnChunkDelay))}var k=l.MathJax.elementJax,o=k.root,m=document.getElementById(k.inputID+"-Frame"),q=(k.SVG.display?m.parentNode:m);this.em=g.mbase.prototype.em=k.SVG.em;this.ex=k.SVG.ex;this.linebreakWidth=k.SVG.lineWidth*1000;this.cwidth=k.SVG.cwidth;this.mathDiv=q;m.appendChild(this.textSVG);this.initSVG(o,m);o.setTeXclass();try{o.toSVG(m,q)}catch(n){if(n.restart){while(m.firstChild){m.removeChild(m.firstChild)}}throw n}m.removeChild(this.textSVG);if(k.SVG.isHidden){l.parentNode.insertBefore(q,l)}q.className=q.className.split(/ /)[0];if(this.hideProcessedMath){q.className+=" MathJax_SVG_Processed";if(l.MathJax.preview){k.SVG.preview=l.MathJax.preview;delete l.MathJax.preview}p.SVGeqn+=(p.i-p.SVGi);p.SVGi=p.i;if(p.SVGeqn>=p.SVGlast+p.SVGchunk){this.postTranslate(p);p.SVGchunk=Math.floor(p.SVGchunk*this.config.EqnChunkFactor);p.SVGdelay=true}}},postTranslate:function(q){var l=q.jax[this.id];if(!this.hideProcessedMath){return}for(var o=q.SVGlast,k=q.SVGeqn;o<k;o++){var n=l[o];if(n&&n.MathJax.elementJax){n.previousSibling.className=n.previousSibling.className.split(/ /)[0];var p=n.MathJax.elementJax.SVG;if(p.preview){p.preview.innerHTML="";n.MathJax.preview=p.preview;delete p.preview}}}q.SVGlast=q.SVGeqn},getJaxFromMath:function(k){if(k.parentNode.className==="MathJax_SVG_Display"){k=k.parentNode}return c.getJaxFor(k.nextSibling)},getHoverSpan:function(k,l){l.style.position="relative";return l.firstChild},getHoverBBox:function(k,l,m){var n=EVENT.getBBox(l.parentNode);n.h+=2;n.d-=2;return n},Zoom:function(l,s,q,k,p){s.className="MathJax_SVG";var u=s.appendChild(this.ExSpan.cloneNode(true));var o=u.firstChild.offsetHeight/60;this.em=g.mbase.prototype.em=o/a.TeX.x_height*1000;this.cwidth=0.85*a.defaultWidth;u.parentNode.removeChild(u);this.idPostfix="-zoom";l.root.toSVG(s,s);this.idPostfix="";s.style.position=q.style.position="absolute";var r=s.offsetWidth,n=s.offsetHeight,t=q.offsetHeight,m=q.offsetWidth;s.style.position=q.style.position="";return{Y:-EVENT.getBBox(s).h,mW:m,mH:t,zW:r,zH:n}},initSVG:function(l,k){},Remove:function(k){var l=document.getElementById(k.inputID+"-Frame");if(l){if(k.SVG.display){l=l.parentNode}l.parentNode.removeChild(l)}delete k.SVG},Em:function(k){if(Math.abs(k)<0.0006){return"0em"}return k.toFixed(3).replace(/\.?0+$/,"")+"em"},Ex:function(k){k=k/this.TeX.x_height;if(Math.abs(k)<0.0006){return"0ex"}return k.toFixed(3).replace(/\.?0+$/,"")+"ex"},Percent:function(k){return(100*k).toFixed(1).replace(/\.?0+$/,"")+"%"},length2em:function(q,l,o){if(typeof(q)!=="string"){q=q.toString()}if(q===""){return""}if(q===g.SIZE.NORMAL){return 1000}if(q===g.SIZE.BIG){return 2000}if(q===g.SIZE.SMALL){return 710}if(q==="infinity"){return a.BIGDIMEN}if(q.match(/mathspace$/)){return 1000*a.MATHSPACE[q]}var n=q.match(/^\s*([-+]?(?:\.\d+|\d+(?:\.\d*)?))?(pt|em|ex|mu|px|pc|in|mm|cm|%)?/);var k=parseFloat(n[1]||"1")*1000,p=n[2];if(o==null){o=1000}if(l==null){l=1}if(p==="em"){return k}if(p==="ex"){return k*a.TeX.x_height/1000}if(p==="%"){return k/100*o/1000}if(p==="px"){return k/a.em}if(p==="pt"){return k/10}if(p==="pc"){return k*1.2}if(p==="in"){return k*this.pxPerInch/a.em}if(p==="cm"){return k*this.pxPerInch/a.em/2.54}if(p==="mm"){return k*this.pxPerInch/a.em/25.4}if(p==="mu"){return k/18*l}return k*o/1000},thickness2em:function(l,k){var m=a.TeX.rule_thickness;if(l===g.LINETHICKNESS.MEDIUM){return m}if(l===g.LINETHICKNESS.THIN){return 0.67*m}if(l===g.LINETHICKNESS.THICK){return 1.67*m}return this.length2em(l,k,m)},getPadding:function(l){var n={top:0,right:0,bottom:0,left:0},k=false;for(var o in n){if(n.hasOwnProperty(o)){var m=l.style["padding"+o.charAt(0).toUpperCase()+o.substr(1)];if(m){n[o]=this.length2em(m);k=true}}}return(k?n:false)},getBorders:function(o){var m={top:0,right:0,bottom:0,left:0},l=false;for(var p in m){if(m.hasOwnProperty(p)){var k="border"+p.charAt(0).toUpperCase()+p.substr(1);var n=o.style[k+"Style"];if(n){l=true;m[p]=this.length2em(o.style[k+"Width"]);m[p+"Style"]=o.style[k+"Style"];m[p+"Color"]=o.style[k+"Color"];if(m[p+"Color"]==="initial"){m[p+"Color"]=""}}}}return(l?m:false)},Element:function(k,l){var m=(typeof(k)==="string"?document.createElementNS(b,k):k);m.isMathJax=true;if(l){for(var n in l){if(l.hasOwnProperty(n)){m.setAttribute(n,l[n].toString())}}}return m},addElement:function(l,k,m){return l.appendChild(this.Element(k,m))},TextNode:e.TextNode,addText:e.addText,ucMatch:e.ucMatch,HandleVariant:function(s,r,C){var v=i.G();var o,x,z,p,A,t,q,l,y,k;if(!s){s=this.FONTDATA.VARIANT[g.VARIANT.NORMAL]}if(s.forceFamily){C=i.TEXT(r,C,s.font);if(s.h!=null){C.h=s.h}if(s.d!=null){C.d=s.d}v.Add(C);C=""}A=s;for(t=0,q=C.length;t<q;t++){s=A;o=C.charCodeAt(t);z=C.charAt(t);if(o>=55296&&o<56319){t++;o=(((o-55296)<<10)+(C.charCodeAt(t)-56320))+65536;if(this.FONTDATA.RemapPlane1){var w=this.FONTDATA.RemapPlane1(o,s);o=w.n;s=w.variant}}else{k=this.FONTDATA.RANGES;for(l=0,y=k.length;l<y;l++){if(k[l].name==="alpha"&&s.noLowerCase){continue}x=s["offset"+k[l].offset];if(x&&o>=k[l].low&&o<=k[l].high){if(k[l].remap&&k[l].remap[o]){o=x+k[l].remap[o]}else{o=o-k[l].low+x;if(k[l].add){o+=k[l].add}}if(s["variant"+k[l].offset]){s=this.FONTDATA.VARIANT[s["variant"+k[l].offset]]}break}}}if(s.remap&&s.remap[o]){if(s.remap[o] instanceof Array){var B=s.remap[o];o=B[0];s=this.FONTDATA.VARIANT[B[1]]}else{if(typeof(s.remap[o])==="string"){C=s.remap[o]+C.substr(t+1);t=0;q=C.length;o=C.charCodeAt(0)}else{o=s.remap[o];if(s.remap.variant){s=this.FONTDATA.VARIANT[s.remap.variant]}}}}if(this.FONTDATA.REMAP[o]&&!s.noRemap){o=this.FONTDATA.REMAP[o];if(o instanceof Array){s=this.FONTDATA.VARIANT[o[1]];o=o[0]}if(typeof(o)==="string"){C=o+C.substr(t+1);t=0;q=C.length;o=o.charCodeAt(0)}}p=this.lookupChar(s,o);z=p[o];if(z){z=[r,p.id+"-"+o.toString(16).toUpperCase()].concat(z);v.Add(i.GLYPH.apply(i,z),v.w,0)}else{if(this.FONTDATA.DELIMITERS[o]){v.Add(this.createDelimiter(o,0,1,p),v.w,0)}else{if(o<=65535){z=String.fromCharCode(o)}else{x=o-65536;z=String.fromCharCode((x>>10)+55296)+String.fromCharCode((x&1023)+56320)}var u=i.TEXT(r,z,{"font-family":s.defaultFamily||a.config.undefinedFamily,"font-style":(s.italic?"italic":""),"font-weight":(s.bold?"bold":"")});if(s.h!=null){u.h=s.h}if(s.d!=null){u.d=s.d}z=i.G();z.Add(u);v.Add(z,v.w,0);c.signal.Post(["SVG Jax - unknown char",o,s])}}}if(C.length==1&&p.skew&&p.skew[o]){v.skew=p.skew[o]*1000}if(v.element.childNodes.length===1){v.element=v.element.firstChild;v.removeable=false;v.scale=r}return v},lookupChar:function(p,s){var o,k;if(!p.FONTS){var r=this.FONTDATA.FONTS;var q=(p.fonts||this.FONTDATA.VARIANT.normal.fonts);if(!(q instanceof Array)){q=[q]}if(p.fonts!=q){p.fonts=q}p.FONTS=[];for(o=0,k=q.length;o<k;o++){if(r[q[o]]){p.FONTS.push(r[q[o]])}}}for(o=0,k=p.FONTS.length;o<k;o++){var l=p.FONTS[o];if(typeof(l)==="string"){delete p.FONTS;this.loadFont(l)}if(l[s]){return l}else{this.findBlock(l,s)}}return{id:"unknown"}},findBlock:function(l,q){if(l.Ranges){for(var p=0,k=l.Ranges.length;p<k;p++){if(q<l.Ranges[p][0]){return}if(q<=l.Ranges[p][1]){var o=l.Ranges[p][2];for(var n=l.Ranges.length-1;n>=0;n--){if(l.Ranges[n][2]==o){l.Ranges.splice(n,1)}}this.loadFont(l.directory+"/"+o+".js")}}}},loadFont:function(k){c.RestartAfter(h.Require(this.fontDir+"/"+k))},createDelimiter:function(k,n,q,o){if(!q){q=1}var s=i.G();if(!k){s.Clean();delete s.element;s.w=s.r=this.TeX.nulldelimiterspace*q;return s}if(!(n instanceof Array)){n=[n,n]}var t=n[1];n=n[0];var l={alias:k};while(l.alias){k=l.alias;l=this.FONTDATA.DELIMITERS[k];if(!l){l={HW:[0,this.FONTDATA.VARIANT[g.VARIANT.NORMAL]]}}}if(l.load){c.RestartAfter(h.Require(this.fontDir+"/fontdata-"+l.load+".js"))}for(var r=0,p=l.HW.length;r<p;r++){if(l.HW[r][0]*q>=n-10-a.config.blacker||(r==p-1&&!l.stretch)){if(l.HW[r][2]){q*=l.HW[r][2]}if(l.HW[r][3]){k=l.HW[r][3]}return this.createChar(q,[k,l.HW[r][1]],o).With({stretched:true})}}if(l.stretch){this["extendDelimiter"+l.dir](s,t,l.stretch,q,o)}return s},createChar:function(s,q,n){var r="",p={fonts:[q[1]],noRemap:true};if(n&&n===g.VARIANT.BOLD){p.fonts=[q[1]+"-bold",q[1]]}if(typeof(q[1])!=="string"){p=q[1]}if(q[0] instanceof Array){for(var o=0,k=q[0].length;o<k;o++){r+=String.fromCharCode(q[0][o])}}else{r=String.fromCharCode(q[0])}var l=this.HandleVariant(p,s,r);if(q[2]){l.x=q[2]*1000}if(q[3]){l.y=q[3]*1000}if(q[5]){l.h+=q[5]*1000}if(q[6]){l.d+=q[6]*1000}return l},extendDelimiterV:function(r,A,m,o,n){var x=this.createChar(o,(m.top||m.ext),n);var u=this.createChar(o,(m.bot||m.ext),n);var q=x.h+x.d+u.h+u.d;var w=-x.h;r.Add(x,0,w);w-=x.d;if(m.mid){var z=this.createChar(o,m.mid,n);q+=z.h+z.d}if(A>q){var l=this.createChar(o,m.ext,n);var p=(m.mid?2:1),v=(A-q)/p,B=(v+100)/(l.h+l.d);while(p-->0){var t=a.Element("g",{transform:"translate("+l.y+","+(w-B*l.h+50+l.y)+") scale(1,"+B+")"});t.appendChild(l.element.cloneNode(false));r.element.appendChild(t);w-=v;if(m.mid&&p){r.Add(z,0,w-z.h);w-=(z.h+z.d)}}}else{if(m.mid){w+=(q-A)/2;r.Add(z,0,w-z.h);w+=-(z.h+z.d)+(q-A)/2}else{w+=(q-A)}}r.Add(u,0,w-u.h);r.Clean();r.scale=o;r.isMultiChar=true},extendDelimiterH:function(t,o,m,q,n){var p=this.createChar(q,(m.left||m.rep),n);var C=this.createChar(q,(m.right||m.rep),n);t.Add(p,-p.l,0);var B=(p.r-p.l)+(C.r-C.l),z=p.r-p.l;if(m.mid){var A=this.createChar(q,m.mid,n);B+=A.w}if(o>B){var y=this.createChar(q,m.rep,n),l=m.fuzz||0;var r=(m.mid?2:1),v=(o-B)/r,E=(v+l)/(y.r-y.l);while(r-->0){var u=a.Element("g",{transform:"translate("+(z-l/2-E*y.l+y.x)+","+y.y+") scale("+E+",1)"});u.appendChild(y.element.cloneNode(false));t.element.appendChild(u);z+=v;if(m.mid&&r){t.Add(A,z,0);z+=A.w}}}else{if(m.mid){var D=Math.min(B-o,p.w/2);z-=D/2;t.Add(A,z,0);z+=A.w-D/2}else{z-=(B-o)}}t.Add(C,z-C.l,0);t.Clean();t.scale=q;t.isMultiChar=true},MATHSPACE:{veryverythinmathspace:1/18,verythinmathspace:2/18,thinmathspace:3/18,mediummathspace:4/18,thickmathspace:5/18,verythickmathspace:6/18,veryverythickmathspace:7/18,negativeveryverythinmathspace:-1/18,negativeverythinmathspace:-2/18,negativethinmathspace:-3/18,negativemediummathspace:-4/18,negativethickmathspace:-5/18,negativeverythickmathspace:-6/18,negativeveryverythickmathspace:-7/18},TeX:{x_height:430.554,quad:1000,num1:676.508,num2:393.732,num3:443.73,denom1:685.951,denom2:344.841,sup1:412.892,sup2:362.892,sup3:288.888,sub1:150,sub2:247.217,sup_drop:386.108,sub_drop:50,delim1:2390,delim2:1000,axis_height:250,rule_thickness:60,big_op_spacing1:111.111,big_op_spacing2:166.666,big_op_spacing3:200,big_op_spacing4:600,big_op_spacing5:100,scriptspace:100,nulldelimiterspace:120,delimiterfactor:901,delimitershortfall:100,min_rule_thickness:1.25,min_root_space:1.5},BIGDIMEN:10000000,NBSP:"\u00A0"});var i=a.BBOX=MathJax.Object.Subclass({type:"g",removeable:true,Init:function(k){this.h=this.d=-a.BIGDIMEN;this.H=this.D=0;this.w=this.r=0;this.l=a.BIGDIMEN;this.x=this.y=0;this.scale=1;this.n=0;if(this.type){this.element=a.Element(this.type,k)}},With:function(k){return c.Insert(this,k)},Add:function(n,m,l,p,o){if(m){n.x+=m}if(l){n.y+=l}if(n.element){if(n.removeable&&n.element.childNodes.length===1&&n.n===1){var r=n.element.firstChild;if(r.nodeName==="use"||r.nodeName==="rect"){n.element=r;n.scale=n.childScale;var k=n.childX,q=n.childY;n.x+=k;n.y+=q;n.h-=q;n.d+=q;n.H-=q;n.D+=q;n.w-=k;n.r-=k;n.l+=k;n.removeable=false}}if(Math.abs(n.x)<1&&Math.abs(n.y)<1){n.remove=n.removeable}else{if(n.element.nodeName==="g"){if(!n.element.firstChild){n.remove=n.removeable}else{n.element.setAttribute("transform","translate("+Math.floor(n.x)+","+Math.floor(n.y)+")")}}else{if(n.element.nodeName==="line"||n.element.nodeName==="polygon"||n.element.nodeName==="path"||n.element.nodeName==="a"){n.element.setAttribute("transform","translate("+Math.floor(n.x)+","+Math.floor(n.y)+")")}else{n.element.setAttribute("x",Math.floor(n.x/n.scale));n.element.setAttribute("y",Math.floor(n.y/n.scale))}}}if(n.remove){this.n+=n.n;while(n.element.firstChild){if(o&&this.element.firstChild){this.element.insertBefore(n.element.firstChild,this.element.firstChild)}else{this.element.appendChild(n.element.firstChild)}}}else{if(o){this.element.insertBefore(n.element,this.element.firstChild)}else{this.element.appendChild(n.element)}}delete n.element}if(n.hasIndent){this.hasIndent=n.hasIndent}if(n.d-n.y>this.d){this.d=n.d-n.y;if(this.d>this.D){this.D=this.d}}if(n.y+n.h>this.h){this.h=n.y+n.h;if(this.h>this.H){this.H=this.h}}if(n.D-n.y>this.D){this.D=n.D-n.y}if(n.y+n.H>this.H){this.H=n.y+n.H}if(n.x+n.l<this.l){this.l=n.x+n.l}if(n.x+n.r>this.r){this.r=n.x+n.r}if(p||n.x+n.w+(n.X||0)>this.w){this.w=n.x+n.w+(n.X||0)}this.childScale=n.scale;this.childX=n.x;this.childY=n.y;this.n++;return n},Align:function(m,n,l,k){l=({left:l,center:(this.w-m.w)/2,right:this.w-m.w-l})[n]||0;this.Add(m,l,k)},Clean:function(){if(this.h===-a.BIGDIMEN){this.h=this.d=this.l=0}return this}});i.ROW=i.Subclass({Init:function(){this.SUPER(arguments).Init.call(this);this.svg=[];this.sh=this.sd=0},Check:function(l){var k=l.toSVG();this.svg.push(k);if(l.SVGcanStretch("Vertical")){k.mml=l}if(k.h>this.sh){this.sh=k.h}if(k.d>this.sd){this.sd=k.d}},Stretch:function(){for(var n=0,k=this.svg.length;n<k;n++){var l=this.svg[n];if(l.mml){l=l.mml.SVGstretchV(this.sh,this.sd)}if(l.ic){this.ic=l.ic}else{delete this.ic}this.Add(l,this.w,0,true)}delete this.svg}});i.RECT=i.Subclass({type:"rect",removeable:false,Init:function(l,n,k,m){if(m==null){m={stroke:"none"}}m.width=Math.floor(k);m.height=Math.floor(l+n);this.SUPER(arguments).Init.call(this,m);this.w=this.r=k;this.h=this.H=l+n;this.d=this.D=this.l=0;this.y=-n}});i.FRAME=i.Subclass({type:"rect",removeable:false,Init:function(n,q,k,m,p,l,o){if(o==null){o={}}o.fill="none";o["stroke-width"]=m.toFixed(2).replace(/\.?0+$/,"");o.width=Math.floor(k-m);o.height=Math.floor(n+q-m);o.transform="translate("+Math.floor(m/2)+","+Math.floor(-q+m/2)+")";if(p==="dashed"){o["stroke-dasharray"]=[Math.floor(6*a.em),Math.floor(6*a.em)].join(" ")}this.SUPER(arguments).Init.call(this,o);this.w=this.r=k;this.h=this.H=n;this.d=this.D=q;this.l=0}});i.HLINE=i.Subclass({type:"line",removeable:false,Init:function(l,p,r,o,q){if(q==null){q={}}if(o&&o!==""){q.stroke=o}q["stroke-width"]=p.toFixed(2).replace(/\.?0+$/,"");q.x1=0;q.y1=q.y2=p/2;q.x2=Math.floor(l);if(r==="dashed"){var s=Math.floor(l/(6*p)),k=Math.floor(l/(2*s+1));q["stroke-dasharray"]=k+" "+k}this.SUPER(arguments).Init.call(this,q);this.w=this.r=l;this.l=0;this.h=this.H=p;this.d=this.D=0}});i.VLINE=i.Subclass({type:"line",removeable:false,Init:function(p,o,r,l,q){if(q==null){q={}}if(l&&l!==""){q.stroke=l}q["stroke-width"]=o.toFixed(2).replace(/\.?0+$/,"");q.x1=q.x2=o/2;q.y1=0;q.y2=Math.floor(p);if(r==="dashed"){var s=Math.floor(p/(6*o)),k=Math.floor(p/(2*s+1));q["stroke-dasharray"]=k+" "+k}this.SUPER(arguments).Init.call(this,q);this.w=this.r=o;this.l=0;this.h=this.H=p;this.d=this.D=0}});i.TEXT=i.Subclass({type:"text",removeable:false,Init:function(n,m,k){if(!k){k={}}k.stroke="none";this.SUPER(arguments).Init.call(this,k);a.addText(this.element,m);a.textSVG.appendChild(this.element);var l=this.element.getBBox();a.textSVG.removeChild(this.element);n*=1000/a.em;this.element.setAttribute("transform","scale("+n+") matrix(1 0 0 -1 0 0)");this.w=this.r=l.width*n;this.l=0;this.h=this.H=-l.y*n;this.d=this.D=(l.height+l.y)*n}});i.G=i;i.NULL=i.Subclass({Init:function(){this.SUPER(arguments).Init.apply(this,arguments);this.Clean()}});var f,d;i.GLYPH=i.Subclass({type:"path",removeable:false,Init:function(q,m,u,v,x,s,k,n){var o,y=a.config.blacker;if(!f[m]){o={id:m,"stroke-width":y};if(n!==""){o.d="M"+n+"Z"}this.SUPER(arguments).Init.call(this,o);d.appendChild(this.element);f[m]=true}o={};if(q!==1){o.transform="scale("+q+")"}this.element=a.Element("use",o);this.element.setAttributeNS(j,"href","#"+m);this.h=(u+y)*q;this.d=(v+y)*q;this.w=(x+y/2)*q;this.l=(s+y/2)*q;this.r=(k+y/2)*q;this.H=Math.max(0,this.h);this.D=Math.max(0,this.d);this.x=this.y=0;this.scale=q}});c.Register.StartupHook("mml Jax Ready",function(){g=MathJax.ElementJax.mml;g.mbase.Augment({SVG:i,toSVG:function(){this.SVGgetStyles();var o=this.SVGgetVariant();var l=this.SVG();l.scale=this.SVGgetScale();this.SVGhandleSpace(l);for(var n=0,k=this.data.length;n<k;n++){if(this.data[n]){var q=l.Add(this.data[n].toSVG(o,l.scale),l.w,0,true);if(q.skew){l.skew=q.skew}}}l.Clean();var p=this.data.join("");if(l.skew&&p.length!==1){delete l.skew}if(l.r>l.w&&p.length===1&&!o.noIC){l.ic=l.r-l.w;l.w=l.r}this.SVGhandleColor(l);this.SVGsaveData(l);return l},SVGdataStretched:function(l,k,m){this.SVGdata={HW:k,D:m};if(m!=null){return this.data[l].SVGstretchV(k,m)}if(k!=null){return this.data[l].SVGstretchH(k)}return this.data[l].toSVG()},SVGsaveData:function(l){if(!this.SVGdata){this.SVGdata={}}this.SVGdata.w=l.w,this.SVGdata.x=l.x;if(l.X!=null){this.SVGdata.X=l.X}if(this["class"]){l.removeable=false;a.Element(l.element,{"class":this["class"]})}if(this.id){l.removeable=false;a.Element(l.element,{id:this.id})}if(this.href){var k=a.Element("a");k.setAttributeNS(j,"href",this.href);a.addElement(k,"rect",{width:l.w,height:l.h+l.d,y:-l.d,fill:"none",stroke:"none","pointer-events":"all"});if(l.type==="svg"){var n=l.element.firstChild;while(n.firstChild){k.appendChild(n.firstChild)}n.appendChild(k)}else{if(l.removeable&&l.element.nodeName==="g"){while(l.element.firstChild){k.appendChild(l.element.firstChild)}}else{k.appendChild(l.element)}l.element=k}l.removeable=false}if(a.config.addMMLclasses){l.removeable=false;l.element.setAttribute("className","mjx-svg-"+this.type)}var m=this.style;if(m){l.element.style.cssText=m;if(l.element.style.fontSize){l.element.style.fontSize=""}l.element.style.border=l.element.style.padding="";if(l.removeable){l.removeable=l.element.style.cssText===""}}},SVGgetStyles:function(){if(this.style){var k=e.Element("span");k.style.cssText=this.style;this.styles={border:a.getBorders(k),padding:a.getPadding(k)};if(k.style.fontSize){this.styles.fontSize=k.style.fontSize}if(k.style.color){this.styles.color=k.style.color}if(k.style.backgroundColor){this.styles.background=k.style.backgroundColor}if(k.style.fontStyle){this.styles.fontStyle=k.style.fontStyle}if(k.style.fontWeight){this.styles.fontWeight=k.style.fontWeight}if(k.style.fontFamily){this.styles.fontFamily=k.style.fontFamily}if(this.styles.fontWeight&&this.styles.fontWeight.match(/^\d+$/)){this.styles.fontWeight=(parseInt(this.styles.fontWeight)>600?"bold":"normal")}}},SVGhandleSpace:function(n){if(this.useMMLspacing){if(this.type!=="mo"){return}var m=this.getValues("scriptlevel","lspace","rspace");if(m.scriptlevel<=0||this.hasValue("lspace")||this.hasValue("rspace")){var l=this.SVGgetMu(n);m.lspace=Math.max(0,a.length2em(m.lspace,l));m.rspace=Math.max(0,a.length2em(m.rspace,l));var k=this,o=this.Parent();while(o&&o.isEmbellished()&&o.Core()===k){k=o;o=o.Parent()}if(m.lspace){n.x+=m.lspace}if(m.rspace){n.X=m.rspace}}}else{var p=this.texSpacing();if(p!==""){n.x+=a.length2em(p,this.SVGgetScale())/n.scale}}},SVGhandleColor:function(o){var w=this.getValues("mathcolor","color");if(this.styles&&this.styles.color&&!w.color){w.color=this.styles.color}if(w.color&&!this.mathcolor){w.mathcolor=w.color}if(w.mathcolor){a.Element(o.element,{fill:w.mathcolor,stroke:w.mathcolor});o.removeable=false}var s=(this.styles||{}).border,u=(this.styles||{}).padding,t=((s||{}).left||0),q=((u||{}).left||0),k;w.background=(this.mathbackground||this.background||(this.styles||{}).background||g.COLOR.TRANSPARENT);if(t+q){var l=i();for(k in o){if(o.hasOwnProperty(k)){l[k]=o[k]}}l.x=0;l.y=0;o.element=a.Element("g");o.removeable=true;o.Add(l,t+q,0)}if(u){o.w+=u.right;o.h+=u.top;o.d+=u.bottom}if(s){o.w+=s.right;o.h+=s.top;o.d+=s.bottom}if(w.background!==g.COLOR.TRANSPARENT){if(o.element.nodeName!=="g"&&o.element.nodeName!=="svg"){var p=a.Element("g");p.appendChild(o.element);o.element=p;o.removeable=true}o.Add(i.RECT(o.h,o.d,o.w,{fill:w.background,stroke:"none"}),0,0,false,true)}if(s){var v=5;var m={left:["V",o.h+o.d,-v,-o.d],right:["V",o.h+o.d,o.w-s.right+v,-o.d],top:["H",o.w,0,o.h-s.top+v],bottom:["H",o.w,0,-o.d-v]};for(k in m){if(m.hasOwnProperty(k)){if(s[k]){var r=m[k],n=i[r[0]+"LINE"];o.Add(n(r[1],s[k],s[k+"Style"],s[k+"Color"]),r[2],r[3])}}}}},SVGhandleVariant:function(k,m,l){return a.HandleVariant(k,m,l)},SVGgetVariant:function(){var k=this.getValues("mathvariant","fontfamily","fontweight","fontstyle");var l=k.mathvariant;if(this.variantForm){l="-TeX-variant"}k.hasVariant=this.Get("mathvariant",true);if(!k.hasVariant){k.family=k.fontfamily;k.weight=k.fontweight;k.style=k.fontstyle}if(this.styles){if(!k.style&&this.styles.fontStyle){k.style=this.styles.fontStyle}if(!k.weight&&this.styles.fontWeight){k.weight=this.styles.fontWeight}if(!k.family&&this.styles.fontFamily){k.family=this.styles.fontFamily}}if(k.family&&!k.hasVariant){if(!k.weight&&k.mathvariant.match(/bold/)){k.weight="bold"}if(!k.style&&k.mathvariant.match(/italic/)){k.style="italic"}l={forceFamily:true,font:{"font-family":k.family}};if(k.style){l.font["font-style"]=k.style}if(k.weight){l.font["font-weight"]=k.weight}return l}if(k.weight==="bold"){l={normal:g.VARIANT.BOLD,italic:g.VARIANT.BOLDITALIC,fraktur:g.VARIANT.BOLDFRAKTUR,script:g.VARIANT.BOLDSCRIPT,"sans-serif":g.VARIANT.BOLDSANSSERIF,"sans-serif-italic":g.VARIANT.SANSSERIFBOLDITALIC}[l]||l}else{if(k.weight==="normal"){l={bold:g.VARIANT.normal,"bold-italic":g.VARIANT.ITALIC,"bold-fraktur":g.VARIANT.FRAKTUR,"bold-script":g.VARIANT.SCRIPT,"bold-sans-serif":g.VARIANT.SANSSERIF,"sans-serif-bold-italic":g.VARIANT.SANSSERIFITALIC}[l]||l}}if(k.style==="italic"){l={normal:g.VARIANT.ITALIC,bold:g.VARIANT.BOLDITALIC,"sans-serif":g.VARIANT.SANSSERIFITALIC,"bold-sans-serif":g.VARIANT.SANSSERIFBOLDITALIC}[l]||l}else{if(k.style==="normal"){l={italic:g.VARIANT.NORMAL,"bold-italic":g.VARIANT.BOLD,"sans-serif-italic":g.VARIANT.SANSSERIF,"sans-serif-bold-italic":g.VARIANT.BOLDSANSSERIF}[l]||l}}return a.FONTDATA.VARIANT[l]},SVGgetScale:function(){var l=1,k=this.getValues("mathsize","scriptlevel","fontsize");if((this.styles||{}).fontSize&&!k.fontsize){k.fontsize=this.styles.fontSize}if(k.fontsize&&!this.mathsize){k.mathsize=k.fontsize}if(k.scriptlevel!==0){if(k.scriptlevel>2){k.scriptlevel=2}l=Math.pow(this.Get("scriptsizemultiplier"),k.scriptlevel);k.scriptminsize=a.length2em(this.Get("scriptminsize"))/1000;if(l<k.scriptminsize){l=k.scriptminsize}}l*=a.length2em(k.mathsize)/1000;return l},SVGgetMu:function(m){var k=1,l=this.getValues("scriptlevel","scriptsizemultiplier");if(m.scale&&m.scale!==1){k=1/m.scale}if(l.scriptlevel!==0){if(l.scriptlevel>2){l.scriptlevel=2}k=Math.sqrt(Math.pow(l.scriptsizemultiplier,l.scriptlevel))}return k},SVGnotEmpty:function(k){while(k){if((k.type!=="mrow"&&k.type!=="texatom")||k.data.length>1){return true}k=k.data[0]}return false},SVGcanStretch:function(k){if(this.isEmbellished()){return this.Core().SVGcanStretch(k)}return false},SVGstretchV:function(k,l){return this.toSVG(k,l)},SVGstretchH:function(k){return this.toSVG(k)},SVGlineBreaks:function(){return false}},{SVGautoload:function(){var k=a.autoloadDir+"/"+this.type+".js";c.RestartAfter(h.Require(k))},SVGautoloadFile:function(k){var l=a.autoloadDir+"/"+k+".js";c.RestartAfter(h.Require(l))}});g.chars.Augment({toSVG:function(l,o,k,m){var n=this.data.join("").replace(/[\u2061-\u2064]/g,"");if(k){n=k(n,m)}return this.SVGhandleVariant(l,o,n)}});g.entity.Augment({toSVG:function(k,l){return this.SVGhandleVariant(k,l,this.toString().replace(/[\u2061-\u2064]/g,""))}});g.mo.Augment({toSVG:function(){this.SVGgetStyles();var r=this.svg=this.SVG();this.SVGhandleSpace(r);if(this.data.length==0){r.Clean();this.SVGsaveData(r);return r}var n=this.SVGgetScale(),p=this.SVGgetVariant();var w=this.getValues("largeop","displaystyle");if(w.largeop){p=a.FONTDATA.VARIANT[w.displaystyle?"-largeOp":"-smallOp"]}var v=this.CoreParent(),o=(v&&v.isa(g.msubsup)&&this!==v.data[0]),k=(o?this.SVGremapChars:null);if(this.data.join("").length===1&&v&&v.isa(g.munderover)&&this.CoreText(v.data[v.base]).length===1){var s=v.data[v.over],u=v.data[v.under];if(s&&this===s.CoreMO()&&v.Get("accent")){k=a.FONTDATA.REMAPACCENT}else{if(u&&this===u.CoreMO()&&v.Get("accentunder")){k=a.FONTDATA.REMAPACCENTUNDER}}}for(var q=0,l=this.data.length;q<l;q++){if(this.data[q]){var y=this.data[q].toSVG(p,n,this.SVGremap,k),t=r.w;if(t===0&&-y.l>10*y.w){t+=-y.l}r.Add(y,t,0,true);if(y.skew){r.skew=y.skew}}}r.Clean();if(this.data.join("").length!==1){delete r.skew}if(w.largeop){r.y=(r.h-r.d)/2/n-a.TeX.axis_height;if(r.r>r.w){r.ic=r.r-r.w;r.w=r.r}}this.SVGhandleColor(r);this.SVGsaveData(r);return r},CoreParent:function(){var k=this;while(k&&k.isEmbellished()&&k.CoreMO()===this&&!k.isa(g.math)){k=k.Parent()}return k},CoreText:function(k){if(!k){return""}if(k.isEmbellished()){return k.CoreMO().data.join("")}while(k.isa(g.mrow)&&k.data.length===1&&k.data[0]){k=k.data[0]}if(!k.isToken){return""}else{return k.data.join("")}},SVGremapChars:{"*":"\u2217",'"':"\u2033","\u00B0":"\u2218","\u00B2":"2","\u00B3":"3","\u00B4":"\u2032","\u00B9":"1"},SVGremap:function(l,k){l=l.replace(/-/g,"\u2212");if(k){l=l.replace(/'/g,"\u2032").replace(/`/g,"\u2035");if(l.length===1){l=k[l]||l}}return l},SVGcanStretch:function(o){if(!this.Get("stretchy")){return false}var p=this.data.join("");if(p.length>1){return false}var l=this.CoreParent();if(l&&l.isa(g.munderover)&&this.CoreText(l.data[l.base]).length===1){var n=l.data[l.over],k=l.data[l.under];if(n&&this===n.CoreMO()&&l.Get("accent")){p=a.FONTDATA.REMAPACCENT[p]||p}else{if(k&&this===k.CoreMO()&&l.Get("accentunder")){p=a.FONTDATA.REMAPACCENTUNDER[p]||p}}}p=a.FONTDATA.DELIMITERS[p.charCodeAt(0)];var m=(p&&p.dir==o.substr(0,1));if(!m){delete this.svg}return m},SVGstretchV:function(p,q){var m=this.svg||this.toSVG();var l=this.getValues("symmetric","maxsize","minsize");var o=a.TeX.axis_height,k=this.SVGgetMu(m),n;if(l.symmetric){n=2*Math.max(p-o,q+o)}else{n=p+q}l.maxsize=a.length2em(l.maxsize,k,m.h+m.d);l.minsize=a.length2em(l.minsize,k,m.h+m.d);n=Math.max(l.minsize,Math.min(l.maxsize,n));m=a.createDelimiter(this.data.join("").charCodeAt(0),n,m.scale);if(l.symmetric){n=(m.h+m.d)/2+o}else{n=(m.h+m.d)*p/(p+q)}m.y=n-m.h;this.SVGhandleSpace(m);this.SVGhandleColor(m);delete this.svg;this.SVGsaveData(m);return m},SVGstretchH:function(l){var n=this.svg||this.toSVG(),k=this.SVGgetMu(n);var m=this.getValues("maxsize","minsize","mathvariant","fontweight");if((m.fontweight==="bold"||parseInt(m.fontweight)>=600)&&!this.Get("mathvariant",true)){m.mathvariant=g.VARIANT.BOLD}m.maxsize=a.length2em(m.maxsize,k,n.w);m.minsize=a.length2em(m.minsize,k,n.w);l=Math.max(m.minsize,Math.min(m.maxsize,l));n=a.createDelimiter(this.data.join("").charCodeAt(0),l,n.scale,m.mathvariant);this.SVGhandleSpace(n);this.SVGhandleColor(n);delete this.svg;this.SVGsaveData(n);return n}});g.mtext.Augment({toSVG:function(){this.SVGgetStyles();var k,m,l=this.SVGgetScale();if(this.Parent().type==="merror"){k=this.SVG();this.SVGhandleSpace(k);m=i.G();m.Add(i.TEXT(0.9*l,this.data.join(""),{fill:"#C00"}));k.Add(i.RECT(m.h+100,m.d+100,m.w+200,{fill:"#FF8",stroke:"#C00","stroke-width":50}),0,0);k.Add(m,150,0);k.H+=150;k.D+=50;k.Clean();this.SVGsaveData(k);return k}else{if(a.config.mtextFontInherit){k=this.SVG();this.SVGhandleSpace(k);k.Add(i.TEXT(l,this.data.join("")));k.Clean();this.SVGhandleColor(k);this.SVGsaveData(k);return k}else{return this.SUPER(arguments).toSVG.call(this)}}}});g.ms.Augment({toSVG:g.mbase.SVGautoload});g.mglyph.Augment({toSVG:g.mbase.SVGautoload});g.mspace.Augment({toSVG:function(){this.SVGgetStyles();var m=this.getValues("height","depth","width");m.mathbackground=this.mathbackground;if(this.background&&!this.mathbackground){m.mathbackground=this.background}var l=this.SVG(),k=this.SVGgetMu(l);l.h=a.length2em(m.height,k)/l.scale;l.d=a.length2em(m.depth,k)/l.scale;l.w=l.r=a.length2em(m.width,k)/l.scale;if(l.w<0){l.x=l.w;l.w=l.r=0}if(l.h<-l.d){l.d=-l.h}l.l=0;l.Clean();this.SVGhandleColor(l);this.SVGsaveData(l);return l}});g.mphantom.Augment({toSVG:function(k,m){this.SVGgetStyles();var l=this.SVG();if(this.data[0]!=null){this.SVGhandleSpace(l);l.Add(this.SVGdataStretched(0,k,m));l.Clean();while(l.element.firstChild){l.element.removeChild(l.element.firstChild)}}this.SVGhandleColor(l);this.SVGsaveData(l);if(l.removeable&&!l.element.firstChild){delete l.element}return l}});g.mpadded.Augment({toSVG:function(l,k){this.SVGgetStyles();var o=this.SVG();if(this.data[0]!=null){this.SVGhandleSpace(o);var m=this.SVGdataStretched(0,l,k),u=this.SVGgetMu(o);var t=this.getValues("height","depth","width","lspace","voffset"),r=0,q=0;if(t.lspace){r=this.SVGlength2em(m,t.lspace,u)}if(t.voffset){q=this.SVGlength2em(m,t.voffset,u)}var n=m.h,p=m.d,s=m.w;o.Add(m,r,q);o.Clean();o.h=n;o.d=p;o.w=s;o.removeable=false;if(t.height!==""){o.h=this.SVGlength2em(o,t.height,u,"h",0)}if(t.depth!==""){o.d=this.SVGlength2em(o,t.depth,u,"d",0)}if(t.width!==""){o.w=this.SVGlength2em(o,t.width,u,"w",0)}if(o.h>o.H){o.H=o.h}if(o.d>o.D){o.D=o.d}}this.SVGhandleColor(o);this.SVGsaveData(o);return o},SVGlength2em:function(o,r,l,s,k){if(k==null){k=-a.BIGDIMEN}var p=String(r).match(/width|height|depth/);var q=(p?o[p[0].charAt(0)]:(s?o[s]:0));var n=a.length2em(r,l,q);if(s&&String(r).match(/^\s*[-+]/)){return Math.max(k,o[s]+n)}else{return n}}});g.mrow.Augment({SVG:i.ROW,toSVG:function(){this.SVGgetStyles();var l=this.SVG();this.SVGhandleSpace(l);for(var n=0,k=this.data.length;n<k;n++){if(this.data[n]){l.Check(this.data[n])}}l.Stretch();l.Clean();if(this.SVGlineBreaks(l)){l=this.SVGmultiline(l)}this.SVGhandleColor(l);this.SVGsaveData(l);return l},SVGlineBreaks:function(k){if(!this.parent.linebreakContainer){return false}return(a.config.linebreaks.automatic&&k.w>a.linebreakWidth)||this.hasNewline()},SVGmultiline:function(k){g.mbase.SVGautoloadFile("multiline")},SVGstretchH:function(k){var l=this.data[this.core].SVGstretchH(k);this.SVGhandleColor(l);this.SVGsaveData(l);return l},SVGstretchV:function(l,m){var k=this.data[this.core].SVGstretchV(l,m);this.SVGhandleColor(k);this.SVGsaveData(k);return k}});g.mstyle.Augment({toSVG:function(){this.SVGgetStyles();var k=this.SVG();if(this.data[0]!=null){this.SVGhandleSpace(k);var l=k.Add(this.data[0].toSVG());k.Clean();if(l.ic){k.ic=l.ic}this.SVGhandleColor(k)}this.SVGsaveData(k);return k},SVGstretchH:function(k){return(this.data[0]!=null?this.data[0].SVGstretchH(k):i.NULL())},SVGstretchV:function(k,l){return(this.data[0]!=null?this.data[0].SVGstretchV(k,l):i.NULL())}});g.mfrac.Augment({toSVG:function(){this.SVGgetStyles();var w=this.SVG();this.SVGhandleSpace(w);var s=this.data[0].toSVG(),y=this.data[1].toSVG();var C=this.getValues("displaystyle","linethickness","numalign","denomalign","bevelled");var r=w.scale=this.SVGgetScale(),n=C.displaystyle;var x=a.TeX.axis_height*r;if(C.bevelled){var B=(n?400:150);var A=Math.max(s.h+s.d,y.h+y.d)+2*B;var F=a.createDelimiter(47,A);w.Add(s,0,(s.d-s.h)/2+x+B);w.Add(F,s.w-B/2,(F.d-F.h)/2+x);w.Add(y,s.w+F.w-B,(y.d-y.h)/2+x-B)}else{var o=Math.max(s.w,y.w);var E=a.thickness2em(C.linethickness,r),m,l,D,z;var k=a.TeX.min_rule_thickness/a.em*1000;if(n){D=a.TeX.num1;z=a.TeX.denom1}else{D=(E===0?a.TeX.num3:a.TeX.num2);z=a.TeX.denom2}D*=r;z*=r;if(E===0){m=Math.max((n?7:3)*a.TeX.rule_thickness,2*k);l=(D-s.d)-(y.h-z);if(l<m){D+=(m-l)/2;z+=(m-l)/2}w.w=o;E=0}else{m=Math.max((n?2:0)*k+E,E/2+1.5*k);l=(D-s.d)-(x+E/2);if(l<m){D+=m-l}l=(x-E/2)-(y.h-z);if(l<m){z+=m-l}w.Add(i.RECT(E/2,E/2,o+2*E),0,x)}w.Align(s,C.numalign,E,D);w.Align(y,C.denomalign,E,-z)}w.Clean();this.SVGhandleColor(w);this.SVGsaveData(w);return w},SVGcanStretch:function(k){return false},SVGhandleSpace:function(k){if(!this.texWithDelims){k.x=(this.useMMLspacing?0:a.length2em(this.texSpacing()||0))+120;k.X=120}}});g.msqrt.Augment({toSVG:function(){this.SVGgetStyles();var r=this.SVG();this.SVGhandleSpace(r);var m=this.data[0].toSVG(),s,o;var n=this.SVGgetScale();var w=a.TeX.rule_thickness*n,l,k,v,u=0;if(this.Get("displaystyle")){l=a.TeX.x_height*n}else{l=w}k=Math.max(w+l/4,1000*a.TeX.min_root_space/a.em);v=m.h+m.d+k+w;o=a.createDelimiter(8730,v,n);if(o.h+o.d>v){k=((o.h+o.d)-(v-w))/2}s=i.RECT(w,0,m.w);v=m.h+k+w;u=this.SVGaddRoot(r,o,u,o.h+o.d-v,n);r.Add(o,u,v-o.h);r.Add(s,u+o.w,v-s.h);r.Add(m,u+o.w,0);r.Clean();r.h+=w;r.H+=w;this.SVGhandleColor(r);this.SVGsaveData(r);return r},SVGaddRoot:function(l,m,k,o,n){return k}});g.mroot.Augment({toSVG:g.msqrt.prototype.toSVG,SVGaddRoot:function(n,l,q,o,k){var s=(l.isMultiChar?0.55:0.65)*l.w;if(this.data[1]){var p=this.data[1].toSVG();p.x=0;var m=this.SVGrootHeight(l.h+l.d,k,p)-o;var r=Math.min(p.w,p.r);q=Math.max(r,s);n.Add(p,q-r,m)}else{s=q}return q-s},SVGrootHeight:function(m,l,k){return 0.45*(m-900*l)+600*l+Math.max(0,k.d-75)}});g.mfenced.Augment({SVG:i.ROW,toSVG:function(){this.SVGgetStyles();var l=this.SVG();this.SVGhandleSpace(l);if(this.data.open){l.Check(this.data.open)}if(this.data[0]!=null){l.Check(this.data[0])}for(var n=1,k=this.data.length;n<k;n++){if(this.data[n]){if(this.data["sep"+n]){l.Check(this.data["sep"+n])}l.Check(this.data[n])}}if(this.data.close){l.Check(this.data.close)}l.Stretch();l.Clean();this.SVGhandleColor(l);this.SVGsaveData(l);return l}});g.menclose.Augment({toSVG:g.mbase.SVGautoload});g.maction.Augment({toSVG:g.mbase.SVGautoload});g.semantics.Augment({toSVG:function(){this.SVGgetStyles();var k=this.SVG();if(this.data[0]!=null){this.SVGhandleSpace(k);k.Add(this.data[0].toSVG());k.Clean()}else{k.Clean()}this.SVGsaveData(k);return k},SVGstretchH:function(k){return(this.data[0]!=null?this.data[0].SVGstretchH(k):i.NULL())},SVGstretchV:function(k,l){return(this.data[0]!=null?this.data[0].SVGstretchV(k,l):i.NULL())}});g.munderover.Augment({toSVG:function(F,C){this.SVGgetStyles();var l=this.getValues("displaystyle","accent","accentunder","align");if(!l.displaystyle&&this.data[this.base]!=null&&this.data[this.base].CoreMO().Get("movablelimits")){return g.msubsup.prototype.toSVG.call(this)}var E=this.SVG();this.SVGhandleSpace(E);var M=E.scale=this.SVGgetScale();var p=[],K=[],u,J,G,n=-a.BIGDIMEN,I=n;for(J=0,G=this.data.length;J<G;J++){if(this.data[J]!=null){if(J==this.base){p[J]=this.SVGdataStretched(J,F,C);K[J]=(C!=null||F==null)&&this.data[J].SVGcanStretch("Horizontal")}else{p[J]=this.data[J].toSVG();K[J]=this.data[J].SVGcanStretch("Horizontal")}if(p[J].w>I){I=p[J].w}if(!K[J]&&I>n){n=I}}}if(C==null&&F!=null){n=F}else{if(n==-a.BIGDIMEN){n=I}}for(J=I=0,G=this.data.length;J<G;J++){if(this.data[J]){if(K[J]){p[J]=this.data[J].SVGstretchH(n)}if(p[J].w>I){I=p[J].w}}}var B=a.TeX.rule_thickness;var o=p[this.base]||{w:0,h:0,d:0,H:0,D:0,l:0,r:0,scale:M};var s,q,w,v,r,A,H,L=0;if(o.ic){L=1.3*o.ic+0.05}for(J=0,G=this.data.length;J<G;J++){if(this.data[J]!=null){u=p[J];r=a.TeX.big_op_spacing5*M;var z=(J!=this.base&&l[this.ACCENTS[J]]);if(z&&u.w<=1){u.x=-u.l;p[J]=i.G().With({removeable:false});p[J].Add(u);p[J].Clean();p[J].w=-u.l;u=p[J]}A={left:0,center:(I-u.w)/2,right:I-u.w}[l.align];s=A;q=0;if(J==this.over){if(z){H=B*M;r=0;if(o.skew){s+=o.skew}}else{w=a.TeX.big_op_spacing1*M;v=a.TeX.big_op_spacing3*M;H=Math.max(w,v-Math.max(0,u.d))}H=Math.max(H,1500/a.em);s+=L/2;q=o.h+u.d+H;u.h+=r;if(u.h>u.H){u.H=u.h}}else{if(J==this.under){if(z){H=3*B*M;r=0}else{w=a.TeX.big_op_spacing2*M;v=a.TeX.big_op_spacing4*M;H=Math.max(w,v-u.h)}H=Math.max(H,1500/a.em);s-=L/2;q=-(o.d+u.h+H);u.d+=r;if(u.d>u.D){u.D=u.d}}}E.Add(u,s,q)}}E.Clean();this.SVGhandleColor(E);this.SVGsaveData(E);return E}});g.msubsup.Augment({toSVG:function(G,z){this.SVGgetStyles();var B=this.SVG();this.SVGhandleSpace(B);var K=B.scale=this.SVGgetScale(),E=this.SVGgetMu(B);var m=B.Add(this.SVGdataStretched(this.base,G,z));var l=(this.data[this.sup]||this.data[this.sub]||this).SVGgetScale();var I=a.TeX.x_height*K,y=a.TeX.scriptspace*K;var k,n;if(this.SVGnotEmpty(this.data[this.sup])){k=this.data[this.sup].toSVG();k.w+=y;k.r=Math.max(k.w,k.r)}if(this.SVGnotEmpty(this.data[this.sub])){n=this.data[this.sub].toSVG();n.w+=y;n.r=Math.max(n.w,n.r)}var C=a.TeX.sup_drop*l,A=a.TeX.sub_drop*l;var w=m.h-C,o=m.d+A,J=0,F;if(m.ic){m.w-=m.ic;J=1.3*m.ic+0.05}if(this.data[this.base]&&(this.data[this.base].type==="mi"||this.data[this.base].type==="mo")){if(this.data[this.base].data.join("").length===1&&m.scale===1&&!m.stretched&&!this.data[this.base].Get("largeop")){w=o=0}}var H=this.getValues("subscriptshift","superscriptshift");H.subscriptshift=(H.subscriptshift===""?0:a.length2em(H.subscriptshift,E));H.superscriptshift=(H.superscriptshift===""?0:a.length2em(H.superscriptshift,E));if(!k){if(n){o=Math.max(o,a.TeX.sub1*K,n.h-(4/5)*I,H.subscriptshift);B.Add(n,m.w,-o)}}else{if(!n){values=this.getValues("displaystyle","texprimestyle");F=a.TeX[(values.displaystyle?"sup1":(values.texprimestyle?"sup3":"sup2"))];w=Math.max(w,F*K,k.d+(1/4)*I,H.superscriptshift);B.Add(k,m.w+J,w)}else{o=Math.max(o,a.TeX.sub2*K);var x=a.TeX.rule_thickness*K;if((w-k.d)-(n.h-o)<3*x){o=3*x-w+k.d+n.h;C=(4/5)*I-(w-k.d);if(C>0){w+=C;o-=C}}B.Add(k,m.w+J,Math.max(w,H.superscriptshift));B.Add(n,m.w,-Math.max(o,H.subscriptshift))}}B.Clean();this.SVGhandleColor(B);this.SVGsaveData(B);return B}});g.mmultiscripts.Augment({toSVG:g.mbase.SVGautoload});g.mtable.Augment({toSVG:g.mbase.SVGautoload});g["annotation-xml"].Augment({toSVG:g.mbase.SVGautoload});g.math.Augment({SVG:i.Subclass({type:"svg",removeable:false}),toSVG:function(t,m){if(this.data[0]){this.SVGgetStyles();g.mbase.prototype.displayAlign=c.config.displayAlign;g.mbase.prototype.displayIndent=c.config.displayIndent;var q=i.G({stroke:"black",fill:"black","stroke-thickness":0,transform:"matrix(1 0 0 -1 0 0)"}).With({removeable:false});q.Add(this.data[0].toSVG(),0,0,true);q.Clean();this.SVGhandleColor(q);var s=this.SVG();s.element.setAttribute("xmlns:xlink",j);s.Add(q);s.Clean();this.SVGsaveData(s);var p=Math.max(-s.l,0),k=Math.max(s.r-s.w,0);var n=s.element.style;n.width=a.Ex(p+s.w+k);n.height=a.Ex(s.H+s.D);n.verticalAlign=a.Ex(-s.D-2*a.em);n.marginLeft=a.Ex(-p);n.marginRight=a.Ex(-k);s.element.setAttribute("viewBox",(-p)+" "+(-s.H)+" "+(p+s.w+k)+" "+(s.H+s.D));s.element.style.margin="1px 0px";if(s.H>s.h||s.D>s.d){var o=e.Element("span",{style:{display:"inline-block","white-space":"nowrap",padding:"1px 0px"},isMathJax:true},[["span",{style:{display:"inline-block",position:"relative",isMathJax:true,width:a.Ex(s.w),height:a.Ex(s.h+s.d),"vertical-align":a.Ex(-s.d)}}]]);o.firstChild.appendChild(s.element);s.element=o;n.verticalAlign="";n.position="absolute";n.bottom=a.Ex(s.d-s.D);n.left=0}t.appendChild(s.element);s.element=null;if(!this.isMultiline&&this.Get("display")==="block"){var u=this.getValues("indentalignfirst","indentshiftfirst","indentalign","indentshift");if(u.indentalignfirst!==g.INDENTALIGN.INDENTALIGN){u.indentalign=u.indentalignfirst}if(u.indentalign===g.INDENTALIGN.AUTO){u.indentalign=this.displayAlign}m.style.textAlign=u.indentalign;if(u.indentshiftfirst!==g.INDENTSHIFT.INDENTSHIFT){u.indentshift=u.indentshiftfirst}if(u.indentshift==="auto"){u.indentshift=this.displayIndent}if(u.indentshift&&u.indentalign!==g.INDENTALIGN.CENTER&&!s.hasIndent){t.style[{left:"marginLeft",right:"marginRight"}[u.indentalign]]=a.Ex(a.length2em(u.indentshift))}}}return t}});g.TeXAtom.Augment({toSVG:function(){this.SVGgetStyles();var k=this.SVG();this.SVGhandleSpace(k);if(this.data[0]!=null){var l=this.data[0].toSVG(),m=0;if(this.texClass===g.TEXCLASS.VCENTER){m=a.TeX.axis_height-(l.h+l.d)/2+l.d}k.Add(l,0,m);k.ic=l.ic}this.SVGhandleColor(k);this.SVGsaveData(k);return k}});c.Register.StartupHook("onLoad",function(){setTimeout(MathJax.Callback(["loadComplete",a,"jax.js"]),0)})});c.Register.StartupHook("End Cookie",function(){if(c.config.menuSettings.zoom!=="None"){h.Require("[MathJax]/extensions/MathZoom.js")}});if(!document.createElementNS){if(!document.namespaces.svg){document.namespaces.add("svg",b)}a.Augment({Element:function(k,l){var m=(typeof(k)==="string"?document.createElement("svg:"+k):k);m.isMathJax=true;if(l){for(var n in l){if(l.hasOwnProperty(n)){m.setAttribute(n,l[n].toString())}}}return m}})}})(MathJax.Ajax,MathJax.Hub,MathJax.HTML,MathJax.OutputJax.SVG); MathJax.Hub.Register.StartupHook("SVG Jax Ready",function(){var c="2.0.1";var a=MathJax.ElementJax.mml,d=MathJax.OutputJax.SVG,b=d.BBOX;a.mtable.Augment({toSVG:function(U){this.SVGgetStyles();var l=this.SVG();if(this.data.length===0){return l}var aF=this.getValues("columnalign","rowalign","columnspacing","rowspacing","columnwidth","equalcolumns","equalrows","columnlines","rowlines","frame","framespacing","align","useHeight","width","side","minlabelspacing");if(aF.width.match(/%$/)){l.width=aF.width=Math.floor(d.cwidth*parseFloat(aF.width)/100)+"px"}var aj=this.SVGgetScale(),r=this.SVGgetMu(l);var aD=-1;var u=[],B=[],h=[],K=[],E=[],aB,aA,t=-1,ay,q,at,N;var aH=d.FONTDATA.baselineskip*aj*aF.useHeight,V=d.FONTDATA.lineH*aj,ac=d.FONTDATA.lineD*aj;for(aB=0,ay=this.data.length;aB<ay;aB++){N=this.data[aB];at=(N.type==="mlabeledtr"?aD:0);K[aB]=[];u[aB]=B[aB]=0;for(aA=at,q=N.data.length+at;aA<q;aA++){if(h[aA]==null){if(aA>t){t=aA}E[aA]=b.G();h[aA]=-d.BIGDIMEN}K[aB][aA]=N.data[aA-at].toSVG();if(K[aB][aA].h>u[aB]){u[aB]=K[aB][aA].h}if(K[aB][aA].d>B[aB]){B[aB]=K[aB][aA].d}if(K[aB][aA].w>h[aA]){h[aA]=K[aB][aA].w}}}if(u[0]+B[0]){u[0]=Math.max(u[0],V)}if(u[K.length-1]+B[K.length-1]){B[K.length-1]=Math.max(B[K.length-1],ac)}var ai=aF.columnspacing.split(/ /),O=aF.rowspacing.split(/ /),ae=aF.columnalign.split(/ /),G=aF.rowalign.split(/ /),I=aF.columnlines.split(/ /),g=aF.rowlines.split(/ /),al=aF.columnwidth.split(/ /),ap=[];for(aB=0,ay=ai.length;aB<ay;aB++){ai[aB]=d.length2em(ai[aB],r)}for(aB=0,ay=O.length;aB<ay;aB++){O[aB]=d.length2em(O[aB],r)}while(ai.length<t){ai.push(ai[ai.length-1])}while(ae.length<=t){ae.push(ae[ae.length-1])}while(I.length<t){I.push(I[I.length-1])}while(al.length<=t){al.push(al[al.length-1])}while(O.length<K.length){O.push(O[O.length-1])}while(G.length<=K.length){G.push(G[G.length-1])}while(g.length<K.length){g.push(g[g.length-1])}if(E[aD]){ae[aD]=(aF.side.substr(0,1)==="l"?"left":"right");ai[aD]=-h[aD]}for(aB=0,ay=K.length;aB<ay;aB++){N=this.data[aB];ap[aB]=[];if(N.rowalign){G[aB]=N.rowalign}if(N.columnalign){ap[aB]=N.columnalign.split(/ /);while(ap[aB].length<=t){ap[aB].push(ap[aB][ap[aB].length-1])}}}if(aF.equalrows){var Q=Math.max.apply(Math,u),ak=Math.max.apply(Math,B);for(aB=0,ay=K.length;aB<ay;aB++){at=((Q+ak)-(u[aB]+B[aB]))/2;u[aB]+=at;B[aB]+=at}}var au=u[0]+B[K.length-1];for(aB=0,ay=K.length-1;aB<ay;aB++){au+=Math.max((u[aB]+B[aB]?aH:0),B[aB]+u[aB+1]+O[aB])}var aa=0,X=0,av,aE=au;if(aF.frame!=="none"||(aF.columnlines+aF.rowlines).match(/solid|dashed/)){aa=d.length2em(aF.framespacing.split(/[, ]+/)[0],r);X=d.length2em(aF.framespacing.split(/[, ]+/)[1],r);aE=au+2*X}var e,ar,ax="";if(typeof(aF.align)!=="string"){aF.align=String(aF.align)}if(aF.align.match(/(top|bottom|center|baseline|axis)( +(-?\d+))?/)){ax=RegExp.$3;aF.align=RegExp.$1}else{aF.align=this.defaults.align}if(ax!==""){ax=parseInt(ax);if(ax<0){ax=K.length+1+ax}if(ax<1){ax=1}else{if(ax>K.length){ax=K.length}}e=0;ar=-(au+X)+u[0];for(aB=0,ay=ax-1;aB<ay;aB++){var T=Math.max((u[aB]+B[aB]?aH:0),B[aB]+u[aB+1]+O[aB]);e+=T;ar+=T}}else{e=({top:-(u[0]+X),bottom:au+X-u[0],center:au/2-u[0],baseline:au/2-u[0],axis:au/2+d.TeX.axis_height*aj-u[0]})[aF.align];ar=({top:-(au+2*X),bottom:0,center:-(au/2+X),baseline:-(au/2+X),axis:d.TeX.axis_height*aj-au/2-X})[aF.align]}var am,aq=0,R=0,S=0,aw=0,aC=0,o=[],w=[],af=1;if(aF.equalcolumns&&aF.width!=="auto"){am=d.length2em(aF.width,r);for(aB=0,ay=Math.min(t+1,ai.length);aB<ay;aB++){am-=ai[aB]}am/=t+1;for(aB=0,ay=Math.min(t+1,al.length);aB<ay;aB++){h[aB]=am}}else{for(aB=0,ay=Math.min(t+1,al.length);aB<ay;aB++){if(al[aB]==="auto"){R+=h[aB]}else{if(al[aB]==="fit"){w[aC]=aB;aC++;R+=h[aB]}else{if(al[aB].match(/%$/)){o[aw]=aB;aw++;S+=h[aB];aq+=d.length2em(al[aB],r,1)}else{h[aB]=d.length2em(al[aB],r);R+=h[aB]}}}}if(aF.width==="auto"){if(aq>0.98){af=S/(R+S);am=R+S}else{am=R/(1-aq)}}else{am=d.length2em(aF.width,r);for(aB=0,ay=Math.min(t+1,ai.length);aB<ay;aB++){am-=ai[aB]}}for(aB=0,ay=o.length;aB<ay;aB++){h[o[aB]]=d.length2em(al[o[aB]],r,am*af);R+=h[o[aB]]}if(Math.abs(am-R)>0.01){if(aC&&am>R){am=(am-R)/aC;for(aB=0,ay=w.length;aB<ay;aB++){h[w[aB]]+=am}}else{am=am/R;for(aA=0;aA<=t;aA++){h[aA]*=am}}}if(aF.equalcolumns){var ab=Math.max.apply(Math,h);for(aA=0;aA<=t;aA++){h[aA]=ab}}}var an=e,k,az;at=(E[aD]?aD:0);for(aA=at;aA<=t;aA++){E[aA].w=h[aA];for(aB=0,ay=K.length;aB<ay;aB++){if(K[aB][aA]){at=(this.data[aB].type==="mlabeledtr"?aD:0);var ah=this.data[aB].data[aA-at];if(ah.SVGcanStretch("Horizontal")){K[aB][aA]=ah.SVGstretchH(h[aA])}else{if(ah.SVGcanStretch("Vertical")){var v=ah.CoreMO();var Z=v.symmetric;v.symmetric=false;K[aB][aA]=ah.SVGstretchV(u[aB],B[aB]);v.symmetric=Z}}az=ah.rowalign||this.data[aB].rowalign||G[aB];k=({top:u[aB]-K[aB][aA].h,bottom:K[aB][aA].d-B[aB],center:((u[aB]-B[aB])-(K[aB][aA].h-K[aB][aA].d))/2,baseline:0,axis:0})[az];az=(ah.columnalign||ap[aB][aA]||ae[aA]);E[aA].Align(K[aB][aA],az,0,an+k)}if(aB<K.length-1){an-=Math.max((u[aB]+B[aB]?aH:0),B[aB]+u[aB+1]+O[aB])}}an=e}var ad=1.5*d.em;var ao=aa-ad/2;for(aA=0;aA<=t;aA++){l.Add(E[aA],ao,0);ao+=h[aA]+ai[aA];if(I[aA]!=="none"&&aA<t&&aA!==aD){l.Add(b.VLINE(aE,ad,I[aA]),ao-ai[aA]/2,ar)}}l.w+=aa;l.d=-ar;l.h=aE+ar;av=l.w;if(aF.frame!=="none"){l.Add(b.HLINE(av,ad,aF.frame),0,ar+aE-ad);l.Add(b.HLINE(av,ad,aF.frame),0,ar);l.Add(b.VLINE(aE,ad,aF.frame),0,ar);l.Add(b.VLINE(aE,ad,aF.frame),av-ad,ar)}an=e-ad/2;for(aB=0,ay=K.length-1;aB<ay;aB++){k=Math.max(aH,B[aB]+u[aB+1]+O[aB]);if(g[aB]!=="none"){l.Add(b.HLINE(av,ad,g[aB]),0,an-B[aB]-(k-B[aB]-u[aB+1])/2)}an-=k}l.Clean();this.SVGhandleSpace(l);this.SVGhandleColor(l);if(E[aD]){var L=this.getValues("indentalignfirst","indentshiftfirst","indentalign","indentshift");if(L.indentalignfirst!==a.INDENTALIGN.INDENTALIGN){L.indentalign=L.indentalignfirst}if(L.indentalign===a.INDENTALIGN.AUTO){L.indentalign=this.displayAlign}if(L.indentshiftfirst!==a.INDENTSHIFT.INDENTSHIFT){L.indentshift=L.indentshiftfirst}if(L.indentshift==="auto"){L.indentshift=this.displayIndent}var ag=(L.indentshift?d.length2em(L.indentshift,r):0);var aG=d.length2em(aF.minlabelspacing,r);var z=l;l=this.SVG();if(L.indentalign===a.INDENTALIGN.CENTER){l.w=l.r=d.length2em(d.cwidth+"px");ag=0;l.hasIndent=true}else{if(ae[aD]!==L.indentalign){l.w=l.r=d.length2em(d.cwidth+"px")-ag-aG;ag=aG=0}else{l.w=l.r=z.w+ag;l.hasIndent=true}}l.Align(z,L.indentalign,ag,0);l.Align(E[aD],ae[aD],aG,0)}this.SVGsaveData(l);return l},SVGhandleSpace:function(e){if(!this.hasFrame&&!e.width){e.x=e.X=167}this.SUPER(arguments).SVGhandleSpace.call(this,e)}});a.mtd.Augment({toSVG:function(e,g){var f=this.svg=this.SVG();if(this.data[0]){f.Add(this.SVGdataStretched(0,e,g));f.Clean()}this.SVGhandleColor(f);this.SVGsaveData(f);return f}});MathJax.Hub.Startup.signal.Post("SVG mtable Ready");MathJax.Ajax.loadComplete(d.autoloadDir+"/mtable.js")}); diff --git a/config/TeX-AMS-MML_SVG.js b/config/TeX-AMS-MML_SVG.js index 0e4e1bf4b..7dffc471b 100644 --- a/config/TeX-AMS-MML_SVG.js +++ b/config/TeX-AMS-MML_SVG.js @@ -37,7 +37,7 @@ MathJax.InputJax.TeX=MathJax.InputJax({id:"TeX",version:"2.0.3",directory:MathJa MathJax.InputJax.MathML=MathJax.InputJax({id:"MathML",version:"2.0",directory:MathJax.InputJax.directory+"/MathML",extensionDir:MathJax.InputJax.extensionDir+"/MathML",entityDir:MathJax.InputJax.directory+"/MathML/entities",config:{useMathMLspacing:false}});MathJax.InputJax.MathML.Register("math/mml");MathJax.InputJax.MathML.loadComplete("config.js"); -MathJax.OutputJax.SVG=MathJax.OutputJax({id:"SVG",version:"2.0.3",directory:MathJax.OutputJax.directory+"/SVG",extensionDir:MathJax.OutputJax.extensionDir+"/SVG",autoloadDir:MathJax.OutputJax.directory+"/SVG/autoload",fontDir:MathJax.OutputJax.directory+"/SVG/fonts",config:{scale:100,minScaleAdjust:50,font:"TeX",blacker:10,mtextFontInherit:false,undefinedFamily:"STIXGeneral,'Arial Unicode MS',serif",addMMLclasses:false,EqnChunk:(MathJax.Hub.Browser.isMobile?10:50),EqnChunkFactor:1.5,EqnChunkDelay:100,linebreaks:{automatic:false,width:"container"},styles:{".MathJax_SVG_Display":{"text-align":"center",margin:"1em 0em"},"#MathJax_SVG_Tooltip":{"background-color":"InfoBackground",color:"InfoText",border:"1px solid black","box-shadow":"2px 2px 5px #AAAAAA","-webkit-box-shadow":"2px 2px 5px #AAAAAA","-moz-box-shadow":"2px 2px 5px #AAAAAA","-khtml-box-shadow":"2px 2px 5px #AAAAAA",padding:"3px 4px"}}}});if(!MathJax.Hub.config.delayJaxRegistration){MathJax.OutputJax.SVG.Register("jax/mml")}MathJax.OutputJax.SVG.loadComplete("config.js"); +MathJax.OutputJax.SVG=MathJax.OutputJax({id:"SVG",version:"2.0.4",directory:MathJax.OutputJax.directory+"/SVG",extensionDir:MathJax.OutputJax.extensionDir+"/SVG",autoloadDir:MathJax.OutputJax.directory+"/SVG/autoload",fontDir:MathJax.OutputJax.directory+"/SVG/fonts",config:{scale:100,minScaleAdjust:50,font:"TeX",blacker:10,mtextFontInherit:false,undefinedFamily:"STIXGeneral,'Arial Unicode MS',serif",addMMLclasses:false,EqnChunk:(MathJax.Hub.Browser.isMobile?10:50),EqnChunkFactor:1.5,EqnChunkDelay:100,linebreaks:{automatic:false,width:"container"},styles:{".MathJax_SVG_Display":{"text-align":"center",margin:"1em 0em"},"#MathJax_SVG_Tooltip":{"background-color":"InfoBackground",color:"InfoText",border:"1px solid black","box-shadow":"2px 2px 5px #AAAAAA","-webkit-box-shadow":"2px 2px 5px #AAAAAA","-moz-box-shadow":"2px 2px 5px #AAAAAA","-khtml-box-shadow":"2px 2px 5px #AAAAAA",padding:"3px 4px"}}}});if(!MathJax.Hub.config.delayJaxRegistration){MathJax.OutputJax.SVG.Register("jax/mml")}MathJax.OutputJax.SVG.loadComplete("config.js"); MathJax.Extension.tex2jax={version:"2.0",config:{inlineMath:[["\\(","\\)"]],displayMath:[["$$","$$"],["\\[","\\]"]],balanceBraces:true,skipTags:["script","noscript","style","textarea","pre","code"],ignoreClass:"tex2jax_ignore",processClass:"tex2jax_process",processEscapes:false,processEnvironments:true,processRefs:true,preview:"TeX"},PreProcess:function(a){if(!this.configured){this.config=MathJax.Hub.CombineConfig("tex2jax",this.config);if(this.config.Augment){MathJax.Hub.Insert(this,this.config.Augment)}if(typeof(this.config.previewTeX)!=="undefined"&&!this.config.previewTeX){this.config.preview="none"}this.configured=true}if(typeof(a)==="string"){a=document.getElementById(a)}if(!a){a=document.body}if(this.createPatterns()){this.scanElement(a,a.nextSibling)}},createPatterns:function(){var d=[],e=[],c,a,b=this.config;this.match={};for(c=0,a=b.inlineMath.length;c<a;c++){d.push(this.patternQuote(b.inlineMath[c][0]));this.match[b.inlineMath[c][0]]={mode:"",end:b.inlineMath[c][1],pattern:this.endPattern(b.inlineMath[c][1])}}for(c=0,a=b.displayMath.length;c<a;c++){d.push(this.patternQuote(b.displayMath[c][0]));this.match[b.displayMath[c][0]]={mode:"; mode=display",end:b.displayMath[c][1],pattern:this.endPattern(b.displayMath[c][1])}}if(d.length){e.push(d.sort(this.sortLength).join("|"))}if(b.processEnvironments){e.push("\\\\begin\\{([^}]*)\\}")}if(b.processEscapes){e.push("\\\\*\\\\\\$")}if(b.processRefs){e.push("\\\\(eq)?ref\\{[^}]*\\}")}this.start=new RegExp(e.join("|"),"g");this.skipTags=new RegExp("^("+b.skipTags.join("|")+")$","i");this.ignoreClass=new RegExp("(^| )("+b.ignoreClass+")( |$)");this.processClass=new RegExp("(^| )("+b.processClass+")( |$)");return(e.length>0)},patternQuote:function(a){return a.replace(/([\^$(){}+*?\-|\[\]\:\\])/g,"\\$1")},endPattern:function(a){return new RegExp(this.patternQuote(a)+"|\\\\.|[{}]","g")},sortLength:function(d,c){if(d.length!==c.length){return c.length-d.length}return(d==c?0:(d<c?-1:1))},scanElement:function(c,b,g){var a,e,d,f;while(c&&c!=b){if(c.nodeName.toLowerCase()==="#text"){if(!g){c=this.scanText(c)}}else{a=(typeof(c.className)==="undefined"?"":c.className);e=(typeof(c.tagName)==="undefined"?"":c.tagName);if(typeof(a)!=="string"){a=String(a)}f=this.processClass.exec(a);if(c.firstChild&&!a.match(/(^| )MathJax/)&&(f||!this.skipTags.exec(e))){d=(g||this.ignoreClass.exec(a))&&!f;this.scanElement(c.firstChild,b,d)}}if(c){c=c.nextSibling}}},scanText:function(b){if(b.nodeValue.replace(/\s+/,"")==""){return b}var a,c;this.search={start:true};this.pattern=this.start;while(b){this.pattern.lastIndex=0;while(b&&b.nodeName.toLowerCase()==="#text"&&(a=this.pattern.exec(b.nodeValue))){if(this.search.start){b=this.startMatch(a,b)}else{b=this.endMatch(a,b)}}if(this.search.matched){b=this.encloseMath(b)}if(b){do{c=b;b=b.nextSibling}while(b&&(b.nodeName.toLowerCase()==="br"||b.nodeName.toLowerCase()==="#comment"));if(!b||b.nodeName!=="#text"){return(this.search.close?this.prevEndMatch():c)}}}return b},startMatch:function(a,b){var f=this.match[a[0]];if(f!=null){this.search={end:f.end,mode:f.mode,pcount:0,open:b,olen:a[0].length,opos:this.pattern.lastIndex-a[0].length};this.switchPattern(f.pattern)}else{if(a[0].substr(0,6)==="\\begin"){this.search={end:"\\end{"+a[1]+"}",mode:"; mode=display",pcount:0,open:b,olen:0,opos:this.pattern.lastIndex-a[0].length,isBeginEnd:true};this.switchPattern(this.endPattern(this.search.end))}else{if(a[0].substr(0,4)==="\\ref"||a[0].substr(0,6)==="\\eqref"){this.search={mode:"",end:"",open:b,pcount:0,olen:0,opos:this.pattern.lastIndex-a[0].length};return this.endMatch([""],b)}else{var d=a[0].substr(0,a[0].length-1),g,c;if(d.length%2===0){c=[d.replace(/\\\\/g,"\\")];g=1}else{c=[d.substr(1).replace(/\\\\/g,"\\"),"$"];g=0}c=MathJax.HTML.Element("span",null,c);var e=MathJax.HTML.TextNode(b.nodeValue.substr(0,a.index));b.nodeValue=b.nodeValue.substr(a.index+a[0].length-g);b.parentNode.insertBefore(c,b);b.parentNode.insertBefore(e,c);this.pattern.lastIndex=g}}}return b},endMatch:function(a,c){var b=this.search;if(a[0]==b.end){if(!b.close||b.pcount===0){b.close=c;b.cpos=this.pattern.lastIndex;b.clen=(b.isBeginEnd?0:a[0].length)}if(b.pcount===0){b.matched=true;c=this.encloseMath(c);this.switchPattern(this.start)}}else{if(a[0]==="{"){b.pcount++}else{if(a[0]==="}"&&b.pcount){b.pcount--}}}return c},prevEndMatch:function(){this.search.matched=true;var a=this.encloseMath(this.search.close);this.switchPattern(this.start);return a},switchPattern:function(a){a.lastIndex=this.pattern.lastIndex;this.pattern=a;this.search.start=(a===this.start)},encloseMath:function(b){var a=this.search,f=a.close,e,c;if(a.cpos===f.length){f=f.nextSibling}else{f=f.splitText(a.cpos)}if(!f){e=f=MathJax.HTML.addText(a.close.parentNode,"")}a.close=f;c=(a.opos?a.open.splitText(a.opos):a.open);while(c.nextSibling&&c.nextSibling!==f){if(c.nextSibling.nodeValue!==null){if(c.nextSibling.nodeName==="#comment"){c.nodeValue+=c.nextSibling.nodeValue.replace(/^\[CDATA\[((.|\n|\r)*)\]\]$/,"$1")}else{c.nodeValue+=c.nextSibling.nodeValue}}else{if(this.msieNewlineBug){c.nodeValue+=(c.nextSibling.nodeName.toLowerCase()==="br"?"\n":" ")}else{c.nodeValue+=" "}}c.parentNode.removeChild(c.nextSibling)}var d=c.nodeValue.substr(a.olen,c.nodeValue.length-a.olen-a.clen);c.parentNode.removeChild(c);if(this.config.preview!=="none"){this.createPreview(a.mode,d)}c=this.createMathTag(a.mode,d);this.search={};this.pattern.lastIndex=0;if(e){e.parentNode.removeChild(e)}return c},insertNode:function(b){var a=this.search;a.close.parentNode.insertBefore(b,a.close)},createPreview:function(c,a){var b;if(this.config.preview==="TeX"){b=[this.filterPreview(a)]}else{if(this.config.preview instanceof Array){b=this.config.preview}}if(b){b=MathJax.HTML.Element("span",{className:MathJax.Hub.config.preRemoveClass},b);this.insertNode(b)}},createMathTag:function(c,b){var a=document.createElement("script");a.type="math/tex"+c;MathJax.HTML.setScript(a,b);this.insertNode(a);return a},filterPreview:function(a){return a},msieNewlineBug:(MathJax.Hub.Browser.isMSIE&&document.documentMode<9)};MathJax.Hub.Register.PreProcessor(["PreProcess",MathJax.Extension.tex2jax]);MathJax.Ajax.loadComplete("[MathJax]/extensions/tex2jax.js"); diff --git a/jax/output/SVG/config.js b/jax/output/SVG/config.js index 6b188d89c..fa47c4afe 100644 --- a/jax/output/SVG/config.js +++ b/jax/output/SVG/config.js @@ -12,5 +12,5 @@ * http://www.apache.org/licenses/LICENSE-2.0 */ -MathJax.OutputJax.SVG=MathJax.OutputJax({id:"SVG",version:"2.0.3",directory:MathJax.OutputJax.directory+"/SVG",extensionDir:MathJax.OutputJax.extensionDir+"/SVG",autoloadDir:MathJax.OutputJax.directory+"/SVG/autoload",fontDir:MathJax.OutputJax.directory+"/SVG/fonts",config:{scale:100,minScaleAdjust:50,font:"TeX",blacker:10,mtextFontInherit:false,undefinedFamily:"STIXGeneral,'Arial Unicode MS',serif",addMMLclasses:false,EqnChunk:(MathJax.Hub.Browser.isMobile?10:50),EqnChunkFactor:1.5,EqnChunkDelay:100,linebreaks:{automatic:false,width:"container"},styles:{".MathJax_SVG_Display":{"text-align":"center",margin:"1em 0em"},"#MathJax_SVG_Tooltip":{"background-color":"InfoBackground",color:"InfoText",border:"1px solid black","box-shadow":"2px 2px 5px #AAAAAA","-webkit-box-shadow":"2px 2px 5px #AAAAAA","-moz-box-shadow":"2px 2px 5px #AAAAAA","-khtml-box-shadow":"2px 2px 5px #AAAAAA",padding:"3px 4px"}}}});if(!MathJax.Hub.config.delayJaxRegistration){MathJax.OutputJax.SVG.Register("jax/mml")}MathJax.OutputJax.SVG.loadComplete("config.js"); +MathJax.OutputJax.SVG=MathJax.OutputJax({id:"SVG",version:"2.0.4",directory:MathJax.OutputJax.directory+"/SVG",extensionDir:MathJax.OutputJax.extensionDir+"/SVG",autoloadDir:MathJax.OutputJax.directory+"/SVG/autoload",fontDir:MathJax.OutputJax.directory+"/SVG/fonts",config:{scale:100,minScaleAdjust:50,font:"TeX",blacker:10,mtextFontInherit:false,undefinedFamily:"STIXGeneral,'Arial Unicode MS',serif",addMMLclasses:false,EqnChunk:(MathJax.Hub.Browser.isMobile?10:50),EqnChunkFactor:1.5,EqnChunkDelay:100,linebreaks:{automatic:false,width:"container"},styles:{".MathJax_SVG_Display":{"text-align":"center",margin:"1em 0em"},"#MathJax_SVG_Tooltip":{"background-color":"InfoBackground",color:"InfoText",border:"1px solid black","box-shadow":"2px 2px 5px #AAAAAA","-webkit-box-shadow":"2px 2px 5px #AAAAAA","-moz-box-shadow":"2px 2px 5px #AAAAAA","-khtml-box-shadow":"2px 2px 5px #AAAAAA",padding:"3px 4px"}}}});if(!MathJax.Hub.config.delayJaxRegistration){MathJax.OutputJax.SVG.Register("jax/mml")}MathJax.OutputJax.SVG.loadComplete("config.js"); diff --git a/jax/output/SVG/jax.js b/jax/output/SVG/jax.js index db3c5d4e1..e43c1e9c3 100644 --- a/jax/output/SVG/jax.js +++ b/jax/output/SVG/jax.js @@ -12,5 +12,5 @@ * http://www.apache.org/licenses/LICENSE-2.0 */ -(function(h,c,e,a){var g;var b="http://www.w3.org/2000/svg";var j="http://www.w3.org/1999/xlink";a.Augment({config:{styles:{".MathJax_SVG":{display:"inline","font-style":"normal","font-weight":"normal","line-height":"normal","font-size":"100%","font-size-adjust":"none","text-indent":0,"text-align":"left","text-transform":"none","letter-spacing":"normal","word-spacing":"normal","word-wrap":"normal","white-space":"nowrap","float":"none",direction:"ltr",border:0,padding:0,margin:0},".MathJax_SVG_Display":{position:"relative",display:"block",width:"100%"},".MathJax_SVG_Processing":{visibility:"hidden",position:"absolute",top:0,left:0,width:0,height:0,overflow:"hidden",display:"block"},".MathJax_SVG_Processed":{display:"none!important"},".MathJax_SVG_ExBox":{display:"block",overflow:"hidden",width:"1px",height:"60ex"},"#MathJax_SVG_Tooltip":{position:"absolute",left:0,top:0,width:"auto",height:"auto",display:"none"}}},hideProcessedMath:true,Config:function(){var k=c.config.menuSettings;if(k.scale){this.config.scale=k.scale}this.SUPER(arguments).Config.apply(this,arguments);this.fontInUse=this.config.font;this.fontDir+="/"+this.config.font;if(!this.require){this.require=[]}this.require.push(this.fontDir+"/fontdata.js");this.require.push(MathJax.OutputJax.extensionDir+"/MathEvents.js")},Startup:function(){EVENT=MathJax.Extension.MathEvents.Event;TOUCH=MathJax.Extension.MathEvents.Touch;HOVER=MathJax.Extension.MathEvents.Hover;this.ContextMenu=EVENT.ContextMenu;this.Mousedown=EVENT.AltContextMenu;this.Mouseover=HOVER.Mouseover;this.Mouseout=HOVER.Mouseout;this.Mousemove=HOVER.Mousemove;this.hiddenDiv=e.Element("div",{style:{visibility:"hidden",overflow:"hidden",position:"absolute",top:0,height:"1px",width:"auto",padding:0,border:0,margin:0,textAlign:"left",textIndent:0,textTransform:"none",lineHeight:"normal",letterSpacing:"normal",wordSpacing:"normal"}});if(!document.body.firstChild){document.body.appendChild(this.hiddenDiv)}else{document.body.insertBefore(this.hiddenDiv,document.body.firstChild)}this.hiddenDiv=e.addElement(this.hiddenDiv,"div",{id:"MathJax_SVG_Hidden"});var k=e.addElement(this.hiddenDiv,"div",{style:{width:"5in"}});this.pxPerInch=k.offsetWidth/5;this.hiddenDiv.removeChild(k);this.textSVG=this.Element("svg");d=this.addElement(this.addElement(this.hiddenDiv.parentNode,"svg"),"defs",{id:"MathJax_SVG_glyphs"});f={};this.ExSpan=e.Element("span",{style:{position:"absolute","font-size-adjust":"none"}},[["span",{className:"MathJax_SVG_ExBox"}]]);this.linebreakSpan=e.Element("span",null,[["hr",{style:{width:"auto",size:1,padding:0,border:0,margin:0}}]]);return h.Styles(this.config.styles,["InitializeSVG",this])},InitializeSVG:function(){document.body.appendChild(this.ExSpan);document.body.appendChild(this.linebreakSpan);this.defaultEx=this.ExSpan.firstChild.offsetHeight/60;this.defaultWidth=this.linebreakSpan.firstChild.offsetWidth;document.body.removeChild(this.linebreakSpan);document.body.removeChild(this.ExSpan)},preTranslate:function(o){var t=o.jax[this.id],u,r=t.length,z,s,A,n,y,l,x,q,k,w=false,v,B=this.config.linebreaks.automatic,p=this.config.linebreaks.width;if(B){w=(p.match(/^\s*(\d+(\.\d*)?%\s*)?container\s*$/)!=null);if(w){p=p.replace(/\s*container\s*/,"")}else{k=this.defaultWidth}if(p===""){p="100%"}}else{k=100000}for(u=0;u<r;u++){z=t[u];if(!z.parentNode){continue}s=z.previousSibling;if(s&&String(s.className).match(/^MathJax(_SVG)?(_Display)?( MathJax(_SVG)?_Processing)?$/)){s.parentNode.removeChild(s)}l=z.MathJax.elementJax;if(!l){continue}l.SVG={display:(l.root.Get("display")==="block")};A=n=e.Element("span",{style:{"font-size":this.scale+"%",display:"inline-block"},className:"MathJax_SVG",id:l.inputID+"-Frame",isMathJax:true,jaxID:this.id,oncontextmenu:EVENT.Menu,onmousedown:EVENT.Mousedown,onmouseover:EVENT.Mouseover,onmouseout:EVENT.Mouseout,onmousemove:EVENT.Mousemove,onclick:EVENT.Click,ondblclick:EVENT.DblClick});if(c.Browser.noContextMenu){A.ontouchstart=TOUCH.start;A.ontouchend=TOUCH.end}if(l.SVG.display){n=e.Element("div",{className:"MathJax_SVG_Display"});n.appendChild(A)}n.setAttribute("role","textbox");n.setAttribute("aria-readonly","true");n.className+=" MathJax_SVG_Processing";z.parentNode.insertBefore(n,z);z.parentNode.insertBefore(this.ExSpan.cloneNode(true),z);n.parentNode.insertBefore(this.linebreakSpan.cloneNode(true),n)}for(u=0;u<r;u++){z=t[u];if(!z.parentNode){continue}y=z.previousSibling;n=y.previousSibling;l=z.MathJax.elementJax;if(!l){continue}x=y.firstChild.offsetHeight/60;v=n.previousSibling.firstChild.offsetWidth;if(w){k=v}if(x===0||x==="NaN"){this.hiddenDiv.appendChild(n);l.SVG.isHidden=true;x=this.defaultEx;v=this.defaultWidth;if(w){k=this.defaultWidth}}l.SVG.ex=x;l.SVG.cwidth=v;l.SVG.em=q=x/a.TeX.x_height*1000;l.SVG.lineWidth=(B?this.length2em(p,1,k/q):1000000)}for(u=0;u<r;u++){z=t[u];if(!z.parentNode){continue}y=t[u].previousSibling;A=y.previousSibling;l=t[u].MathJax.elementJax;if(!l){continue}if(!l.SVG.isHidden){A=A.previousSibling}A.parentNode.removeChild(A);y.parentNode.removeChild(y)}o.SVGeqn=o.SVGlast=0;o.SVGi=-1;o.SVGchunk=this.config.EqnChunk;o.SVGdelay=false},Translate:function(l,p){if(!l.parentNode){return}if(p.SVGdelay){p.SVGdelay=false;c.RestartAfter(MathJax.Callback.Delay(this.config.EqnChunkDelay))}var k=l.MathJax.elementJax,o=k.root,m=document.getElementById(k.inputID+"-Frame"),q=(k.SVG.display?m.parentNode:m);this.em=g.mbase.prototype.em=k.SVG.em;this.ex=k.SVG.ex;this.linebreakWidth=k.SVG.lineWidth*1000;this.cwidth=k.SVG.cwidth;this.mathDiv=q;m.appendChild(this.textSVG);this.initSVG(o,m);o.setTeXclass();try{o.toSVG(m,q)}catch(n){if(n.restart){while(m.firstChild){m.removeChild(m.firstChild)}}throw n}m.removeChild(this.textSVG);if(k.SVG.isHidden){l.parentNode.insertBefore(q,l)}q.className=q.className.split(/ /)[0];if(this.hideProcessedMath){q.className+=" MathJax_SVG_Processed";if(l.MathJax.preview){k.SVG.preview=l.MathJax.preview;delete l.MathJax.preview}p.SVGeqn+=(p.i-p.SVGi);p.SVGi=p.i;if(p.SVGeqn>=p.SVGlast+p.SVGchunk){this.postTranslate(p);p.SVGchunk=Math.floor(p.SVGchunk*this.config.EqnChunkFactor);p.SVGdelay=true}}},postTranslate:function(q){var l=q.jax[this.id];if(!this.hideProcessedMath){return}for(var o=q.SVGlast,k=q.SVGeqn;o<k;o++){var n=l[o];if(n&&n.MathJax.elementJax){n.previousSibling.className=n.previousSibling.className.split(/ /)[0];var p=n.MathJax.elementJax.SVG;if(p.preview){p.preview.innerHTML="";n.MathJax.preview=p.preview;delete p.preview}}}q.SVGlast=q.SVGeqn},getJaxFromMath:function(k){if(k.parentNode.className==="MathJax_SVG_Display"){k=k.parentNode}return c.getJaxFor(k.nextSibling)},getHoverSpan:function(k,l){l.style.position="relative";return l.firstChild},getHoverBBox:function(k,l,m){var n=EVENT.getBBox(l.parentNode);n.h+=2;n.d-=2;return n},Zoom:function(l,s,q,k,p){s.className="MathJax_SVG";var u=s.appendChild(this.ExSpan.cloneNode(true));var o=u.firstChild.offsetHeight/60;this.em=g.mbase.prototype.em=o/a.TeX.x_height*1000;this.cwidth=0.85*a.defaultWidth;u.parentNode.removeChild(u);this.idPostfix="-zoom";l.root.toSVG(s,s);this.idPostfix="";s.style.position=q.style.position="absolute";var r=s.offsetWidth,n=s.offsetHeight,t=q.offsetHeight,m=q.offsetWidth;s.style.position=q.style.position="";return{Y:-EVENT.getBBox(s).h,mW:m,mH:t,zW:r,zH:n}},initSVG:function(l,k){},Remove:function(k){var l=document.getElementById(k.inputID+"-Frame");if(l){if(k.SVG.display){l=l.parentNode}l.parentNode.removeChild(l)}delete k.SVG},Em:function(k){if(Math.abs(k)<0.0006){return"0em"}return k.toFixed(3).replace(/\.?0+$/,"")+"em"},Ex:function(k){k=k/this.TeX.x_height;if(Math.abs(k)<0.0006){return"0ex"}return k.toFixed(3).replace(/\.?0+$/,"")+"ex"},Percent:function(k){return(100*k).toFixed(1).replace(/\.?0+$/,"")+"%"},length2em:function(q,l,o){if(typeof(q)!=="string"){q=q.toString()}if(q===""){return""}if(q===g.SIZE.NORMAL){return 1000}if(q===g.SIZE.BIG){return 2000}if(q===g.SIZE.SMALL){return 710}if(q==="infinity"){return a.BIGDIMEN}if(q.match(/mathspace$/)){return 1000*a.MATHSPACE[q]}var n=q.match(/^\s*([-+]?(?:\.\d+|\d+(?:\.\d*)?))?(pt|em|ex|mu|px|pc|in|mm|cm|%)?/);var k=parseFloat(n[1]||"1")*1000,p=n[2];if(o==null){o=1000}if(l==null){l=1}if(p==="em"){return k}if(p==="ex"){return k*a.TeX.x_height/1000}if(p==="%"){return k/100*o/1000}if(p==="px"){return k/a.em}if(p==="pt"){return k/10}if(p==="pc"){return k*1.2}if(p==="in"){return k*this.pxPerInch/a.em}if(p==="cm"){return k*this.pxPerInch/a.em/2.54}if(p==="mm"){return k*this.pxPerInch/a.em/25.4}if(p==="mu"){return k/18*l}return k*o/1000},thickness2em:function(l,k){var m=a.TeX.rule_thickness;if(l===g.LINETHICKNESS.MEDIUM){return m}if(l===g.LINETHICKNESS.THIN){return 0.67*m}if(l===g.LINETHICKNESS.THICK){return 1.67*m}return this.length2em(l,k,m)},getPadding:function(l){var n={top:0,right:0,bottom:0,left:0},k=false;for(var o in n){if(n.hasOwnProperty(o)){var m=l.style["padding"+o.charAt(0).toUpperCase()+o.substr(1)];if(m){n[o]=this.length2em(m);k=true}}}return(k?n:false)},getBorders:function(o){var m={top:0,right:0,bottom:0,left:0},l=false;for(var p in m){if(m.hasOwnProperty(p)){var k="border"+p.charAt(0).toUpperCase()+p.substr(1);var n=o.style[k+"Style"];if(n){l=true;m[p]=this.length2em(o.style[k+"Width"]);m[p+"Style"]=o.style[k+"Style"];m[p+"Color"]=o.style[k+"Color"];if(m[p+"Color"]==="initial"){m[p+"Color"]=""}}}}return(l?m:false)},Element:function(k,l){var m=(typeof(k)==="string"?document.createElementNS(b,k):k);m.isMathJax=true;if(l){for(var n in l){if(l.hasOwnProperty(n)){m.setAttribute(n,l[n].toString())}}}return m},addElement:function(l,k,m){return l.appendChild(this.Element(k,m))},TextNode:e.TextNode,addText:e.addText,ucMatch:e.ucMatch,HandleVariant:function(s,r,C){var v=i.G();var o,x,z,p,A,t,q,l,y,k;if(!s){s=this.FONTDATA.VARIANT[g.VARIANT.NORMAL]}if(s.forceFamily){C=i.TEXT(r,C,s.font);if(s.h!=null){C.h=s.h}if(s.d!=null){C.d=s.d}v.Add(C);C=""}A=s;for(t=0,q=C.length;t<q;t++){s=A;o=C.charCodeAt(t);z=C.charAt(t);if(o>=55296&&o<56319){t++;o=(((o-55296)<<10)+(C.charCodeAt(t)-56320))+65536;if(this.FONTDATA.RemapPlane1){var w=this.FONTDATA.RemapPlane1(o,s);o=w.n;s=w.variant}}else{k=this.FONTDATA.RANGES;for(l=0,y=k.length;l<y;l++){if(k[l].name==="alpha"&&s.noLowerCase){continue}x=s["offset"+k[l].offset];if(x&&o>=k[l].low&&o<=k[l].high){if(k[l].remap&&k[l].remap[o]){o=x+k[l].remap[o]}else{o=o-k[l].low+x;if(k[l].add){o+=k[l].add}}if(s["variant"+k[l].offset]){s=this.FONTDATA.VARIANT[s["variant"+k[l].offset]]}break}}}if(s.remap&&s.remap[o]){if(s.remap[o] instanceof Array){var B=s.remap[o];o=B[0];s=this.FONTDATA.VARIANT[B[1]]}else{if(typeof(s.remap[o])==="string"){C=s.remap[o]+C.substr(t+1);t=0;q=C.length;o=C.charCodeAt(0)}else{o=s.remap[o];if(s.remap.variant){s=this.FONTDATA.VARIANT[s.remap.variant]}}}}if(this.FONTDATA.REMAP[o]&&!s.noRemap){o=this.FONTDATA.REMAP[o];if(o instanceof Array){s=this.FONTDATA.VARIANT[o[1]];o=o[0]}if(typeof(o)==="string"){C=o+C.substr(t+1);t=0;q=C.length;o=o.charCodeAt(0)}}p=this.lookupChar(s,o);z=p[o];if(z){z=[r,p.id+"-"+o.toString(16).toUpperCase()].concat(z);v.Add(i.GLYPH.apply(i,z),v.w,0)}else{if(this.FONTDATA.DELIMITERS[o]){v.Add(this.createDelimiter(o,0,1,p),v.w,0)}else{if(o<=65535){z=String.fromCharCode(o)}else{x=o-65536;z=String.fromCharCode((x>>10)+55296)+String.fromCharCode((x&1023)+56320)}var u=i.TEXT(r,z,{"font-family":s.defaultFamily||a.config.undefinedFamily,"font-style":(s.italic?"italic":""),"font-weight":(s.bold?"bold":"")});if(s.h!=null){u.h=s.h}if(s.d!=null){u.d=s.d}z=i.G();z.Add(u);v.Add(z,v.w,0);c.signal.Post(["SVG Jax - unknown char",o,s])}}}if(C.length==1&&p.skew&&p.skew[o]){v.skew=p.skew[o]*1000}if(v.element.childNodes.length===1){v.element=v.element.firstChild;v.removeable=false;v.scale=r}return v},lookupChar:function(p,s){var o,k;if(!p.FONTS){var r=this.FONTDATA.FONTS;var q=(p.fonts||this.FONTDATA.VARIANT.normal.fonts);if(!(q instanceof Array)){q=[q]}if(p.fonts!=q){p.fonts=q}p.FONTS=[];for(o=0,k=q.length;o<k;o++){if(r[q[o]]){p.FONTS.push(r[q[o]])}}}for(o=0,k=p.FONTS.length;o<k;o++){var l=p.FONTS[o];if(typeof(l)==="string"){delete p.FONTS;this.loadFont(l)}if(l[s]){return l}else{this.findBlock(l,s)}}return{id:"unknown"}},findBlock:function(l,q){if(l.Ranges){for(var p=0,k=l.Ranges.length;p<k;p++){if(q<l.Ranges[p][0]){return}if(q<=l.Ranges[p][1]){var o=l.Ranges[p][2];for(var n=l.Ranges.length-1;n>=0;n--){if(l.Ranges[n][2]==o){l.Ranges.splice(n,1)}}this.loadFont(l.directory+"/"+o+".js")}}}},loadFont:function(k){c.RestartAfter(h.Require(this.fontDir+"/"+k))},createDelimiter:function(k,n,q,o){if(!q){q=1}var s=i.G();if(!k){s.Clean();delete s.element;s.w=s.r=this.TeX.nulldelimiterspace*q;return s}if(!(n instanceof Array)){n=[n,n]}var t=n[1];n=n[0];var l={alias:k};while(l.alias){k=l.alias;l=this.FONTDATA.DELIMITERS[k];if(!l){l={HW:[0,this.FONTDATA.VARIANT[g.VARIANT.NORMAL]]}}}if(l.load){c.RestartAfter(h.Require(this.fontDir+"/fontdata-"+l.load+".js"))}for(var r=0,p=l.HW.length;r<p;r++){if(l.HW[r][0]*q>=n-10-a.config.blacker||(r==p-1&&!l.stretch)){if(l.HW[r][2]){q*=l.HW[r][2]}if(l.HW[r][3]){k=l.HW[r][3]}return this.createChar(q,[k,l.HW[r][1]],o).With({stretched:true})}}if(l.stretch){this["extendDelimiter"+l.dir](s,t,l.stretch,q,o)}return s},createChar:function(s,q,n){var r="",p={fonts:[q[1]],noRemap:true};if(n&&n===g.VARIANT.BOLD){p.fonts=[q[1]+"-bold",q[1]]}if(typeof(q[1])!=="string"){p=q[1]}if(q[0] instanceof Array){for(var o=0,k=q[0].length;o<k;o++){r+=String.fromCharCode(q[0][o])}}else{r=String.fromCharCode(q[0])}var l=this.HandleVariant(p,s,r);if(q[2]){l.x=q[2]*1000}if(q[3]){l.y=q[3]*1000}if(q[5]){l.h+=q[5]*1000}if(q[6]){l.d+=q[6]*1000}return l},extendDelimiterV:function(r,A,m,o,n){var x=this.createChar(o,(m.top||m.ext),n);var u=this.createChar(o,(m.bot||m.ext),n);var q=x.h+x.d+u.h+u.d;var w=-x.h;r.Add(x,0,w);w-=x.d;if(m.mid){var z=this.createChar(o,m.mid,n);q+=z.h+z.d}if(A>q){var l=this.createChar(o,m.ext,n);var p=(m.mid?2:1),v=(A-q)/p,B=(v+100)/(l.h+l.d);while(p-->0){var t=a.Element("g",{transform:"translate("+l.y+","+(w-B*l.h+50+l.y)+") scale(1,"+B+")"});t.appendChild(l.element.cloneNode(false));r.element.appendChild(t);w-=v;if(m.mid&&p){r.Add(z,0,w-z.h);w-=(z.h+z.d)}}}else{if(m.mid){w+=(q-A)/2;r.Add(z,0,w-z.h);w+=-(z.h+z.d)+(q-A)/2}else{w+=(q-A)}}r.Add(u,0,w-u.h);r.Clean();r.scale=o;r.isMultiChar=true},extendDelimiterH:function(t,o,m,q,n){var p=this.createChar(q,(m.left||m.rep),n);var C=this.createChar(q,(m.right||m.rep),n);t.Add(p,-p.l,0);var B=(p.r-p.l)+(C.r-C.l),z=p.r-p.l;if(m.mid){var A=this.createChar(q,m.mid,n);B+=A.w}if(o>B){var y=this.createChar(q,m.rep,n),l=m.fuzz||0;var r=(m.mid?2:1),v=(o-B)/r,E=(v+l)/(y.r-y.l);while(r-->0){var u=a.Element("g",{transform:"translate("+(z-l/2-E*y.l+y.x)+","+y.y+") scale("+E+",1)"});u.appendChild(y.element.cloneNode(false));t.element.appendChild(u);z+=v;if(m.mid&&r){t.Add(A,z,0);z+=A.w}}}else{if(m.mid){var D=Math.min(B-o,p.w/2);z-=D/2;t.Add(A,z,0);z+=A.w-D/2}else{z-=(B-o)}}t.Add(C,z-C.l,0);t.Clean();t.scale=q;t.isMultiChar=true},MATHSPACE:{veryverythinmathspace:1/18,verythinmathspace:2/18,thinmathspace:3/18,mediummathspace:4/18,thickmathspace:5/18,verythickmathspace:6/18,veryverythickmathspace:7/18,negativeveryverythinmathspace:-1/18,negativeverythinmathspace:-2/18,negativethinmathspace:-3/18,negativemediummathspace:-4/18,negativethickmathspace:-5/18,negativeverythickmathspace:-6/18,negativeveryverythickmathspace:-7/18},TeX:{x_height:430.554,quad:1000,num1:676.508,num2:393.732,num3:443.73,denom1:685.951,denom2:344.841,sup1:412.892,sup2:362.892,sup3:288.888,sub1:150,sub2:247.217,sup_drop:386.108,sub_drop:50,delim1:2390,delim2:1000,axis_height:250,rule_thickness:60,big_op_spacing1:111.111,big_op_spacing2:166.666,big_op_spacing3:200,big_op_spacing4:600,big_op_spacing5:100,scriptspace:100,nulldelimiterspace:120,delimiterfactor:901,delimitershortfall:100,min_rule_thickness:1.25,min_root_space:1.5},BIGDIMEN:10000000,NBSP:"\u00A0"});var i=a.BBOX=MathJax.Object.Subclass({type:"g",removeable:true,Init:function(k){this.h=this.d=-a.BIGDIMEN;this.H=this.D=0;this.w=this.r=0;this.l=a.BIGDIMEN;this.x=this.y=0;this.scale=1;this.n=0;if(this.type){this.element=a.Element(this.type,k)}},With:function(k){return c.Insert(this,k)},Add:function(n,m,l,p,o){if(m){n.x+=m}if(l){n.y+=l}if(n.element){if(n.removeable&&n.element.childNodes.length===1&&n.n===1){var r=n.element.firstChild;if(r.nodeName==="use"||r.nodeName==="rect"){n.element=r;n.scale=n.childScale;var k=n.childX,q=n.childY;n.x+=k;n.y+=q;n.h-=q;n.d+=q;n.H-=q;n.D+=q;n.w-=k;n.r-=k;n.l+=k;n.removeable=false}}if(Math.abs(n.x)<1&&Math.abs(n.y)<1){n.remove=n.removeable}else{if(n.element.nodeName==="g"){if(!n.element.firstChild){n.remove=n.removeable}else{n.element.setAttribute("transform","translate("+Math.floor(n.x)+","+Math.floor(n.y)+")")}}else{if(n.element.nodeName==="line"||n.element.nodeName==="polygon"||n.element.nodeName==="path"||n.element.nodeName==="a"){n.element.setAttribute("transform","translate("+Math.floor(n.x)+","+Math.floor(n.y)+")")}else{n.element.setAttribute("x",Math.floor(n.x/n.scale));n.element.setAttribute("y",Math.floor(n.y/n.scale))}}}if(n.remove){this.n+=n.n;while(n.element.firstChild){if(o&&this.element.firstChild){this.element.insertBefore(n.element.firstChild,this.element.firstChild)}else{this.element.appendChild(n.element.firstChild)}}}else{if(o){this.element.insertBefore(n.element,this.element.firstChild)}else{this.element.appendChild(n.element)}}delete n.element}if(n.hasIndent){this.hasIndent=n.hasIndent}if(n.d-n.y>this.d){this.d=n.d-n.y;if(this.d>this.D){this.D=this.d}}if(n.y+n.h>this.h){this.h=n.y+n.h;if(this.h>this.H){this.H=this.h}}if(n.D-n.y>this.D){this.D=n.D-n.y}if(n.y+n.H>this.H){this.H=n.y+n.H}if(n.x+n.l<this.l){this.l=n.x+n.l}if(n.x+n.r>this.r){this.r=n.x+n.r}if(p||n.x+n.w+(n.X||0)>this.w){this.w=n.x+n.w+(n.X||0)}this.childScale=n.scale;this.childX=n.x;this.childY=n.y;this.n++;return n},Align:function(m,n,l,k){l=({left:l,center:(this.w-m.w)/2,right:this.w-m.w-l})[n]||0;this.Add(m,l,k)},Clean:function(){if(this.h===-a.BIGDIMEN){this.h=this.d=this.l=0}return this}});i.ROW=i.Subclass({Init:function(){this.SUPER(arguments).Init.call(this);this.svg=[];this.sh=this.sd=0},Check:function(l){var k=l.toSVG();this.svg.push(k);if(l.SVGcanStretch("Vertical")){k.mml=l}if(k.h>this.sh){this.sh=k.h}if(k.d>this.sd){this.sd=k.d}},Stretch:function(){for(var n=0,k=this.svg.length;n<k;n++){var l=this.svg[n];if(l.mml){l=l.mml.SVGstretchV(this.sh,this.sd)}if(l.ic){this.ic=l.ic}else{delete this.ic}this.Add(l,this.w,0,true)}delete this.svg}});i.RECT=i.Subclass({type:"rect",removeable:false,Init:function(l,n,k,m){if(m==null){m={stroke:"none"}}m.width=Math.floor(k);m.height=Math.floor(l+n);this.SUPER(arguments).Init.call(this,m);this.w=this.r=k;this.h=this.H=l+n;this.d=this.D=this.l=0;this.y=-n}});i.FRAME=i.Subclass({type:"rect",removeable:false,Init:function(n,q,k,m,p,l,o){if(o==null){o={}}o.fill="none";o["stroke-width"]=m.toFixed(2).replace(/\.?0+$/,"");o.width=Math.floor(k-m);o.height=Math.floor(n+q-m);o.transform="translate("+Math.floor(m/2)+","+Math.floor(-q+m/2)+")";if(p==="dashed"){o["stroke-dasharray"]=[Math.floor(6*a.em),Math.floor(6*a.em)].join(" ")}this.SUPER(arguments).Init.call(this,o);this.w=this.r=k;this.h=this.H=n;this.d=this.D=q;this.l=0}});i.HLINE=i.Subclass({type:"line",removeable:false,Init:function(l,p,r,o,q){if(q==null){q={}}if(o&&o!==""){q.stroke=o}q["stroke-width"]=p.toFixed(2).replace(/\.?0+$/,"");q.x1=0;q.y1=q.y2=p/2;q.x2=Math.floor(l);if(r==="dashed"){var s=Math.floor(l/(6*p)),k=Math.floor(l/(2*s+1));q["stroke-dasharray"]=k+" "+k}this.SUPER(arguments).Init.call(this,q);this.w=this.r=l;this.l=0;this.h=this.H=p;this.d=this.D=0}});i.VLINE=i.Subclass({type:"line",removeable:false,Init:function(p,o,r,l,q){if(q==null){q={}}if(l&&l!==""){q.stroke=l}q["stroke-width"]=o.toFixed(2).replace(/\.?0+$/,"");q.x1=q.x2=o/2;q.y1=0;q.y2=Math.floor(p);if(r==="dashed"){var s=Math.floor(p/(6*o)),k=Math.floor(p/(2*s+1));q["stroke-dasharray"]=k+" "+k}this.SUPER(arguments).Init.call(this,q);this.w=this.r=o;this.l=0;this.h=this.H=p;this.d=this.D=0}});i.TEXT=i.Subclass({type:"text",removeable:false,Init:function(n,m,k){if(!k){k={}}k.stroke="none";this.SUPER(arguments).Init.call(this,k);a.addText(this.element,m);a.textSVG.appendChild(this.element);var l=this.element.getBBox();a.textSVG.removeChild(this.element);n*=1000/a.em;this.element.setAttribute("transform","scale("+n+") matrix(1 0 0 -1 0 0)");this.w=this.r=l.width*n;this.l=0;this.h=this.H=-l.y*n;this.d=this.D=(l.height+l.y)*n}});i.G=i;i.NULL=i.Subclass({Init:function(){this.SUPER(arguments).Init.apply(this,arguments);this.Clean()}});var f,d;i.GLYPH=i.Subclass({type:"path",removeable:false,Init:function(q,m,u,v,x,s,k,n){var o,y=a.config.blacker;if(!f[m]){o={id:m,"stroke-width":y};if(n!==""){o.d="M"+n+"Z"}this.SUPER(arguments).Init.call(this,o);d.appendChild(this.element);f[m]=true}o={};if(q!==1){o.transform="scale("+q+")"}this.element=a.Element("use",o);this.element.setAttributeNS(j,"href","#"+m);this.h=(u+y)*q;this.d=(v+y)*q;this.w=(x+y/2)*q;this.l=(s+y/2)*q;this.r=(k+y/2)*q;this.H=Math.max(0,this.h);this.D=Math.max(0,this.d);this.x=this.y=0;this.scale=q}});c.Register.StartupHook("mml Jax Ready",function(){g=MathJax.ElementJax.mml;g.mbase.Augment({SVG:i,toSVG:function(){this.SVGgetStyles();var o=this.SVGgetVariant();var l=this.SVG();l.scale=this.SVGgetScale();this.SVGhandleSpace(l);for(var n=0,k=this.data.length;n<k;n++){if(this.data[n]){var q=l.Add(this.data[n].toSVG(o,l.scale),l.w,0,true);if(q.skew){l.skew=q.skew}}}l.Clean();var p=this.data.join("");if(l.skew&&p.length!==1){delete l.skew}if(l.r>l.w&&p.length===1&&!o.noIC){l.ic=l.r-l.w;l.w=l.r}this.SVGhandleColor(l);this.SVGsaveData(l);return l},SVGdataStretched:function(l,k,m){this.SVGdata={HW:k,D:m};if(m!=null){return this.data[l].SVGstretchV(k,m)}if(k!=null){return this.data[l].SVGstretchH(k)}return this.data[l].toSVG()},SVGsaveData:function(l){if(!this.SVGdata){this.SVGdata={}}this.SVGdata.w=l.w,this.SVGdata.x=l.x;if(l.X!=null){this.SVGdata.X=l.X}if(this["class"]){l.removeable=false;a.Element(l.element,{"class":this["class"]})}if(this.id){l.removeable=false;a.Element(l.element,{id:this.id})}if(this.href){var k=a.Element("a");k.setAttributeNS(j,"href",this.href);a.addElement(k,"rect",{width:l.w,height:l.h+l.d,y:-l.d,fill:"none",stroke:"none","pointer-events":"all"});if(l.type==="svg"){var n=l.element.firstChild;while(n.firstChild){k.appendChild(n.firstChild)}n.appendChild(k)}else{if(l.removeable&&l.element.nodeName==="g"){while(l.element.firstChild){k.appendChild(l.element.firstChild)}}else{k.appendChild(l.element)}l.element=k}l.removeable=false}if(a.config.addMMLclasses){l.removeable=false;l.element.setAttribute("className","mjx-svg-"+this.type)}var m=this.style;if(m){l.element.style.cssText=m;if(l.element.style.fontSize){l.element.style.fontSize=""}l.element.style.border=l.element.style.padding="";if(l.removeable){l.removeable=l.element.style.cssText===""}}},SVGgetStyles:function(){if(this.style){var k=e.Element("span");k.style.cssText=this.style;this.styles={border:a.getBorders(k),padding:a.getPadding(k)};if(k.style.fontSize){this.styles.fontSize=k.style.fontSize}if(k.style.color){this.styles.color=k.style.color}if(k.style.backgroundColor){this.styles.background=k.style.backgroundColor}if(k.style.fontStyle){this.styles.fontStyle=k.style.fontStyle}if(k.style.fontWeight){this.styles.fontWeight=k.style.fontWeight}if(k.style.fontFamily){this.styles.fontFamily=k.style.fontFamily}if(this.styles.fontWeight&&this.styles.fontWeight.match(/^\d+$/)){this.styles.fontWeight=(parseInt(this.styles.fontWeight)>600?"bold":"normal")}}},SVGhandleSpace:function(n){if(this.useMMLspacing){if(this.type!=="mo"){return}var m=this.getValues("scriptlevel","lspace","rspace");if(m.scriptlevel<=0||this.hasValue("lspace")||this.hasValue("rspace")){var l=this.SVGgetMu(n);m.lspace=Math.max(0,a.length2em(m.lspace,l));m.rspace=Math.max(0,a.length2em(m.rspace,l));var k=this,o=this.Parent();while(o&&o.isEmbellished()&&o.Core()===k){k=o;o=o.Parent()}if(m.lspace){n.x+=m.lspace}if(m.rspace){n.X=m.rspace}}}else{var p=this.texSpacing();if(p!==""){n.x+=a.length2em(p,this.SVGgetScale())/n.scale}}},SVGhandleColor:function(o){var w=this.getValues("mathcolor","color");if(this.styles&&this.styles.color&&!w.color){w.color=this.styles.color}if(w.color&&!this.mathcolor){w.mathcolor=w.color}if(w.mathcolor){a.Element(o.element,{fill:w.mathcolor,stroke:w.mathcolor});o.removeable=false}var s=(this.styles||{}).border,u=(this.styles||{}).padding,t=((s||{}).left||0),q=((u||{}).left||0),k;w.background=(this.mathbackground||this.background||(this.styles||{}).background||g.COLOR.TRANSPARENT);if(t+q){var l=i();for(k in o){if(o.hasOwnProperty(k)){l[k]=o[k]}}l.x=0;l.y=0;o.element=a.Element("g");o.removeable=true;o.Add(l,t+q,0)}if(u){o.w+=u.right;o.h+=u.top;o.d+=u.bottom}if(s){o.w+=s.right;o.h+=s.top;o.d+=s.bottom}if(w.background!==g.COLOR.TRANSPARENT){if(o.element.nodeName!=="g"&&o.element.nodeName!=="svg"){var p=a.Element("g");p.appendChild(o.element);o.element=p;o.removeable=true}o.Add(i.RECT(o.h,o.d,o.w,{fill:w.background,stroke:"none"}),0,0,false,true)}if(s){var v=5;var m={left:["V",o.h+o.d,-v,-o.d],right:["V",o.h+o.d,o.w-s.right+v,-o.d],top:["H",o.w,0,o.h-s.top+v],bottom:["H",o.w,0,-o.d-v]};for(k in m){if(m.hasOwnProperty(k)){if(s[k]){var r=m[k],n=i[r[0]+"LINE"];o.Add(n(r[1],s[k],s[k+"Style"],s[k+"Color"]),r[2],r[3])}}}}},SVGhandleVariant:function(k,m,l){return a.HandleVariant(k,m,l)},SVGgetVariant:function(){var k=this.getValues("mathvariant","fontfamily","fontweight","fontstyle");var l=k.mathvariant;if(this.variantForm){l="-TeX-variant"}k.hasVariant=this.Get("mathvariant",true);if(!k.hasVariant){k.family=k.fontfamily;k.weight=k.fontweight;k.style=k.fontstyle}if(this.styles){if(!k.style&&this.styles.fontStyle){k.style=this.styles.fontStyle}if(!k.weight&&this.styles.fontWeight){k.weight=this.styles.fontWeight}if(!k.family&&this.styles.fontFamily){k.family=this.styles.fontFamily}}if(k.family&&!k.hasVariant){if(!k.weight&&k.mathvariant.match(/bold/)){k.weight="bold"}if(!k.style&&k.mathvariant.match(/italic/)){k.style="italic"}l={forceFamily:true,font:{"font-family":k.family}};if(k.style){l.font["font-style"]=k.style}if(k.weight){l.font["font-weight"]=k.weight}return l}if(k.weight==="bold"){l={normal:g.VARIANT.BOLD,italic:g.VARIANT.BOLDITALIC,fraktur:g.VARIANT.BOLDFRAKTUR,script:g.VARIANT.BOLDSCRIPT,"sans-serif":g.VARIANT.BOLDSANSSERIF,"sans-serif-italic":g.VARIANT.SANSSERIFBOLDITALIC}[l]||l}else{if(k.weight==="normal"){l={bold:g.VARIANT.normal,"bold-italic":g.VARIANT.ITALIC,"bold-fraktur":g.VARIANT.FRAKTUR,"bold-script":g.VARIANT.SCRIPT,"bold-sans-serif":g.VARIANT.SANSSERIF,"sans-serif-bold-italic":g.VARIANT.SANSSERIFITALIC}[l]||l}}if(k.style==="italic"){l={normal:g.VARIANT.ITALIC,bold:g.VARIANT.BOLDITALIC,"sans-serif":g.VARIANT.SANSSERIFITALIC,"bold-sans-serif":g.VARIANT.SANSSERIFBOLDITALIC}[l]||l}else{if(k.style==="normal"){l={italic:g.VARIANT.NORMAL,"bold-italic":g.VARIANT.BOLD,"sans-serif-italic":g.VARIANT.SANSSERIF,"sans-serif-bold-italic":g.VARIANT.BOLDSANSSERIF}[l]||l}}return a.FONTDATA.VARIANT[l]},SVGgetScale:function(){var l=1,k=this.getValues("mathsize","scriptlevel","fontsize");if((this.styles||{}).fontSize&&!k.fontsize){k.fontsize=this.styles.fontSize}if(k.fontsize&&!this.mathsize){k.mathsize=k.fontsize}if(k.scriptlevel!==0){if(k.scriptlevel>2){k.scriptlevel=2}l=Math.pow(this.Get("scriptsizemultiplier"),k.scriptlevel);k.scriptminsize=a.length2em(this.Get("scriptminsize"))/1000;if(l<k.scriptminsize){l=k.scriptminsize}}l*=a.length2em(k.mathsize)/1000;return l},SVGgetMu:function(m){var k=1,l=this.getValues("scriptlevel","scriptsizemultiplier");if(m.scale&&m.scale!==1){k=1/m.scale}if(l.scriptlevel!==0){if(l.scriptlevel>2){l.scriptlevel=2}k=Math.sqrt(Math.pow(l.scriptsizemultiplier,l.scriptlevel))}return k},SVGnotEmpty:function(k){while(k){if((k.type!=="mrow"&&k.type!=="texatom")||k.data.length>1){return true}k=k.data[0]}return false},SVGcanStretch:function(k){if(this.isEmbellished()){return this.Core().SVGcanStretch(k)}return false},SVGstretchV:function(k,l){return this.toSVG(k,l)},SVGstretchH:function(k){return this.toSVG(k)},SVGlineBreaks:function(){return false}},{SVGautoload:function(){var k=a.autoloadDir+"/"+this.type+".js";c.RestartAfter(h.Require(k))},SVGautoloadFile:function(k){var l=a.autoloadDir+"/"+k+".js";c.RestartAfter(h.Require(l))}});g.chars.Augment({toSVG:function(l,o,k,m){var n=this.data.join("").replace(/[\u2061-\u2064]/g,"");if(k){n=k(n,m)}return this.SVGhandleVariant(l,o,n)}});g.entity.Augment({toSVG:function(k,l){return this.SVGhandleVariant(k,l,this.toString().replace(/[\u2061-\u2064]/g,""))}});g.mo.Augment({toSVG:function(){this.SVGgetStyles();var r=this.svg=this.SVG();this.SVGhandleSpace(r);if(this.data.length==0){r.Clean();this.SVGsaveData(r);return r}var n=this.SVGgetScale(),p=this.SVGgetVariant();var w=this.getValues("largeop","displaystyle");if(w.largeop){p=a.FONTDATA.VARIANT[w.displaystyle?"-largeOp":"-smallOp"]}var v=this.CoreParent(),o=(v&&v.isa(g.msubsup)&&this!==v.data[0]),k=(o?this.SVGremapChars:null);if(this.data.join("").length===1&&v&&v.isa(g.munderover)&&this.CoreText(v.data[v.base]).length===1){var s=v.data[v.over],u=v.data[v.under];if(s&&this===s.CoreMO()&&v.Get("accent")){k=a.FONTDATA.REMAPACCENT}else{if(u&&this===u.CoreMO()&&v.Get("accentunder")){k=a.FONTDATA.REMAPACCENTUNDER}}}for(var q=0,l=this.data.length;q<l;q++){if(this.data[q]){var y=this.data[q].toSVG(p,n,this.SVGremap,k),t=r.w;if(t===0&&-y.l>10*y.w){t+=-y.l}r.Add(y,t,0,true);if(y.skew){r.skew=y.skew}}}r.Clean();if(this.data.join("").length!==1){delete r.skew}if(w.largeop){r.y=(r.h-r.d)/2/n-a.TeX.axis_height;if(r.r>r.w){r.ic=r.r-r.w;r.w=r.r}}this.SVGhandleColor(r);this.SVGsaveData(r);return r},CoreParent:function(){var k=this;while(k&&k.isEmbellished()&&k.CoreMO()===this&&!k.isa(g.math)){k=k.Parent()}return k},CoreText:function(k){if(!k){return""}if(k.isEmbellished()){return k.CoreMO().data.join("")}while(k.isa(g.mrow)&&k.data.length===1&&k.data[0]){k=k.data[0]}if(!k.isToken){return""}else{return k.data.join("")}},SVGremapChars:{"*":"\u2217",'"':"\u2033","\u00B0":"\u2218","\u00B2":"2","\u00B3":"3","\u00B4":"\u2032","\u00B9":"1"},SVGremap:function(l,k){l=l.replace(/-/g,"\u2212");if(k){l=l.replace(/'/g,"\u2032").replace(/`/g,"\u2035");if(l.length===1){l=k[l]||l}}return l},SVGcanStretch:function(o){if(!this.Get("stretchy")){return false}var p=this.data.join("");if(p.length>1){return false}var l=this.CoreParent();if(l&&l.isa(g.munderover)&&this.CoreText(l.data[l.base]).length===1){var n=l.data[l.over],k=l.data[l.under];if(n&&this===n.CoreMO()&&l.Get("accent")){p=a.FONTDATA.REMAPACCENT[p]||p}else{if(k&&this===k.CoreMO()&&l.Get("accentunder")){p=a.FONTDATA.REMAPACCENTUNDER[p]||p}}}p=a.FONTDATA.DELIMITERS[p.charCodeAt(0)];var m=(p&&p.dir==o.substr(0,1));if(!m){delete this.svg}return m},SVGstretchV:function(p,q){var m=this.svg||this.toSVG();var l=this.getValues("symmetric","maxsize","minsize");var o=a.TeX.axis_height,k=this.SVGgetMu(m),n;if(l.symmetric){n=2*Math.max(p-o,q+o)}else{n=p+q}l.maxsize=a.length2em(l.maxsize,k,m.h+m.d);l.minsize=a.length2em(l.minsize,k,m.h+m.d);n=Math.max(l.minsize,Math.min(l.maxsize,n));m=a.createDelimiter(this.data.join("").charCodeAt(0),n,m.scale);if(l.symmetric){n=(m.h+m.d)/2+o}else{n=(m.h+m.d)*p/(p+q)}m.y=n-m.h;this.SVGhandleSpace(m);this.SVGhandleColor(m);delete this.svg;this.SVGsaveData(m);return m},SVGstretchH:function(l){var n=this.svg||this.toSVG(),k=this.SVGgetMu(n);var m=this.getValues("maxsize","minsize","mathvariant","fontweight");if((m.fontweight==="bold"||parseInt(m.fontweight)>=600)&&!this.Get("mathvariant",true)){m.mathvariant=g.VARIANT.BOLD}m.maxsize=a.length2em(m.maxsize,k,n.w);m.minsize=a.length2em(m.minsize,k,n.w);l=Math.max(m.minsize,Math.min(m.maxsize,l));n=a.createDelimiter(this.data.join("").charCodeAt(0),l,n.scale,m.mathvariant);this.SVGhandleSpace(n);this.SVGhandleColor(n);delete this.svg;this.SVGsaveData(n);return n}});g.mtext.Augment({toSVG:function(){this.SVGgetStyles();var k,m,l=this.SVGgetScale();if(this.Parent().type==="merror"){k=this.SVG();this.SVGhandleSpace(k);m=i.G();m.Add(i.TEXT(0.9*l,this.data.join(""),{fill:"#C00"}));k.Add(i.RECT(m.h+100,m.d+100,m.w+200,{fill:"#FF8",stroke:"#C00","stroke-width":50}),0,0);k.Add(m,150,0);k.H+=150;k.D+=50;k.Clean();this.SVGsaveData(k);return k}else{if(a.config.mtextFontInherit){k=this.SVG();this.SVGhandleSpace(k);k.Add(i.TEXT(l,this.data.join("")));k.Clean();this.SVGhandleColor(k);this.SVGsaveData(k);return k}else{return this.SUPER(arguments).toSVG.call(this)}}}});g.ms.Augment({toSVG:g.mbase.SVGautoload});g.mglyph.Augment({toSVG:g.mbase.SVGautoload});g.mspace.Augment({toSVG:function(){this.SVGgetStyles();var m=this.getValues("height","depth","width");m.mathbackground=this.mathbackground;if(this.background&&!this.mathbackground){m.mathbackground=this.background}var l=this.SVG(),k=this.SVGgetMu(l);l.h=a.length2em(m.height,k)/l.scale;l.d=a.length2em(m.depth,k)/l.scale;l.w=l.r=a.length2em(m.width,k)/l.scale;if(l.w<0){l.x=l.w;l.w=l.r=0}if(l.h<-l.d){l.d=-l.h}l.l=0;l.Clean();this.SVGhandleColor(l);this.SVGsaveData(l);return l}});g.mphantom.Augment({toSVG:function(k,m){this.SVGgetStyles();var l=this.SVG();if(this.data[0]!=null){this.SVGhandleSpace(l);l.Add(this.SVGdataStretched(0,k,m));l.Clean();while(l.element.firstChild){l.element.removeChild(l.element.firstChild)}}this.SVGhandleColor(l);this.SVGsaveData(l);if(l.removeable&&!l.element.firstChild){delete l.element}return l}});g.mpadded.Augment({toSVG:function(l,k){this.SVGgetStyles();var o=this.SVG();if(this.data[0]!=null){this.SVGhandleSpace(o);var m=this.SVGdataStretched(0,l,k),u=this.SVGgetMu(o);var t=this.getValues("height","depth","width","lspace","voffset"),r=0,q=0;if(t.lspace){r=this.SVGlength2em(m,t.lspace,u)}if(t.voffset){q=this.SVGlength2em(m,t.voffset,u)}var n=m.h,p=m.d,s=m.w;o.Add(m,r,q);o.Clean();o.h=n;o.d=p;o.w=s;o.removeable=false;if(t.height!==""){o.h=this.SVGlength2em(o,t.height,u,"h",0)}if(t.depth!==""){o.d=this.SVGlength2em(o,t.depth,u,"d",0)}if(t.width!==""){o.w=this.SVGlength2em(o,t.width,u,"w",0)}if(o.h>o.H){o.H=o.h}if(o.d>o.D){o.D=o.d}}this.SVGhandleColor(o);this.SVGsaveData(o);return o},SVGlength2em:function(o,r,l,s,k){if(k==null){k=-a.BIGDIMEN}var p=String(r).match(/width|height|depth/);var q=(p?o[p[0].charAt(0)]:(s?o[s]:0));var n=a.length2em(r,l,q);if(s&&String(r).match(/^\s*[-+]/)){return Math.max(k,o[s]+n)}else{return n}}});g.mrow.Augment({SVG:i.ROW,toSVG:function(){this.SVGgetStyles();var l=this.SVG();this.SVGhandleSpace(l);for(var n=0,k=this.data.length;n<k;n++){if(this.data[n]){l.Check(this.data[n])}}l.Stretch();l.Clean();if(this.SVGlineBreaks(l)){l=this.SVGmultiline(l)}this.SVGhandleColor(l);this.SVGsaveData(l);return l},SVGlineBreaks:function(k){if(!this.parent.linebreakContainer){return false}return(a.config.linebreaks.automatic&&k.w>a.linebreakWidth)||this.hasNewline()},SVGmultiline:function(k){g.mbase.SVGautoloadFile("multiline")},SVGstretchH:function(k){var l=this.data[this.core].SVGstretchH(k);this.SVGhandleColor(l);this.SVGsaveData(l);return l},SVGstretchV:function(l,m){var k=this.data[this.core].SVGstretchV(l,m);this.SVGhandleColor(k);this.SVGsaveData(k);return k}});g.mstyle.Augment({toSVG:function(){this.SVGgetStyles();var k=this.SVG();if(this.data[0]!=null){this.SVGhandleSpace(k);var l=k.Add(this.data[0].toSVG());k.Clean();if(l.ic){k.ic=l.ic}this.SVGhandleColor(k)}this.SVGsaveData(k);return k},SVGstretchH:function(k){return(this.data[0]!=null?this.data[0].SVGstretchH(k):i.NULL())},SVGstretchV:function(k,l){return(this.data[0]!=null?this.data[0].SVGstretchV(k,l):i.NULL())}});g.mfrac.Augment({toSVG:function(){this.SVGgetStyles();var w=this.SVG();this.SVGhandleSpace(w);var s=this.data[0].toSVG(),y=this.data[1].toSVG();var C=this.getValues("displaystyle","linethickness","numalign","denomalign","bevelled");var r=w.scale=this.SVGgetScale(),n=C.displaystyle;var x=a.TeX.axis_height*r;if(C.bevelled){var B=(n?400:150);var A=Math.max(s.h+s.d,y.h+y.d)+2*B;var F=a.createDelimiter(47,A);w.Add(s,0,(s.d-s.h)/2+x+B);w.Add(F,s.w-B/2,(F.d-F.h)/2+x);w.Add(y,s.w+F.w-B,(y.d-y.h)/2+x-B)}else{var o=Math.max(s.w,y.w);var E=a.thickness2em(C.linethickness,r),m,l,D,z;var k=a.TeX.min_rule_thickness/a.em*1000;if(n){D=a.TeX.num1;z=a.TeX.denom1}else{D=(E===0?a.TeX.num3:a.TeX.num2);z=a.TeX.denom2}D*=r;z*=r;if(E===0){m=Math.max((n?7:3)*a.TeX.rule_thickness,2*k);l=(D-s.d)-(y.h-z);if(l<m){D+=(m-l)/2;z+=(m-l)/2}w.w=o;E=0}else{m=Math.max((n?2:0)*k+E,E/2+1.5*k);l=(D-s.d)-(x+E/2);if(l<m){D+=m-l}l=(x-E/2)-(y.h-z);if(l<m){z+=m-l}w.Add(i.RECT(E/2,E/2,o+2*E),0,x)}w.Align(s,C.numalign,E,D);w.Align(y,C.denomalign,E,-z)}w.Clean();this.SVGhandleColor(w);this.SVGsaveData(w);return w},SVGcanStretch:function(k){return false},SVGhandleSpace:function(k){if(!this.texWithDelims){k.x=(this.useMMLspacing?0:a.length2em(this.texSpacing()||0))+120;k.X=120}}});g.msqrt.Augment({toSVG:function(){this.SVGgetStyles();var r=this.SVG();this.SVGhandleSpace(r);var m=this.data[0].toSVG(),s,o;var n=this.SVGgetScale();var w=a.TeX.rule_thickness*n,l,k,v,u=0;if(this.Get("displaystyle")){l=a.TeX.x_height*n}else{l=w}k=Math.max(w+l/4,1000*a.TeX.min_root_space/a.em);v=m.h+m.d+k+w;o=a.createDelimiter(8730,v,n);if(o.h+o.d>v){k=((o.h+o.d)-(v-w))/2}s=i.RECT(w,0,m.w);v=m.h+k+w;u=this.SVGaddRoot(r,o,u,o.h+o.d-v,n);r.Add(o,u,v-o.h);r.Add(s,u+o.w,v-s.h);r.Add(m,u+o.w,0);r.Clean();r.h+=w;r.H+=w;this.SVGhandleColor(r);this.SVGsaveData(r);return r},SVGaddRoot:function(l,m,k,o,n){return k}});g.mroot.Augment({toSVG:g.msqrt.prototype.toSVG,SVGaddRoot:function(n,l,q,o,k){var s=(l.isMultiChar?0.55:0.65)*l.w;if(this.data[1]){var p=this.data[1].toSVG();p.x=0;var m=this.SVGrootHeight(l.h+l.d,k,p)-o;var r=Math.min(p.w,p.r);q=Math.max(r,s);n.Add(p,q-r,m)}else{s=q}return q-s},SVGrootHeight:function(m,l,k){return 0.45*(m-900*l)+600*l+Math.max(0,k.d-75)}});g.mfenced.Augment({SVG:i.ROW,toSVG:function(){this.SVGgetStyles();var l=this.SVG();this.SVGhandleSpace(l);if(this.data.open){l.Check(this.data.open)}if(this.data[0]!=null){l.Check(this.data[0])}for(var n=1,k=this.data.length;n<k;n++){if(this.data[n]){if(this.data["sep"+n]){l.Check(this.data["sep"+n])}l.Check(this.data[n])}}if(this.data.close){l.Check(this.data.close)}l.Stretch();l.Clean();this.SVGhandleColor(l);this.SVGsaveData(l);return l}});g.menclose.Augment({toSVG:g.mbase.SVGautoload});g.maction.Augment({toSVG:g.mbase.SVGautoload});g.semantics.Augment({toSVG:function(){this.SVGgetStyles();var k=this.SVG();if(this.data[0]!=null){this.SVGhandleSpace(k);k.Add(this.data[0].toSVG());k.Clean()}else{k.Clean()}this.SVGsaveData(k);return k},SVGstretchH:function(k){return(this.data[0]!=null?this.data[0].SVGstretchH(k):i.NULL())},SVGstretchV:function(k,l){return(this.data[0]!=null?this.data[0].SVGstretchV(k,l):i.NULL())}});g.munderover.Augment({toSVG:function(F,C){this.SVGgetStyles();var l=this.getValues("displaystyle","accent","accentunder","align");if(!l.displaystyle&&this.data[this.base]!=null&&this.data[this.base].CoreMO().Get("movablelimits")){return g.msubsup.prototype.toSVG.call(this)}var E=this.SVG();this.SVGhandleSpace(E);var M=E.scale=this.SVGgetScale();var p=[],K=[],u,J,G,n=-a.BIGDIMEN,I=n;for(J=0,G=this.data.length;J<G;J++){if(this.data[J]!=null){if(J==this.base){p[J]=this.SVGdataStretched(J,F,C);K[J]=(C!=null||F==null)&&this.data[J].SVGcanStretch("Horizontal")}else{p[J]=this.data[J].toSVG();K[J]=this.data[J].SVGcanStretch("Horizontal")}if(p[J].w>I){I=p[J].w}if(!K[J]&&I>n){n=I}}}if(C==null&&F!=null){n=F}else{if(n==-a.BIGDIMEN){n=I}}for(J=I=0,G=this.data.length;J<G;J++){if(this.data[J]){if(K[J]){p[J]=this.data[J].SVGstretchH(n)}if(p[J].w>I){I=p[J].w}}}var B=a.TeX.rule_thickness;var o=p[this.base]||{w:0,h:0,d:0,H:0,D:0,l:0,r:0,scale:M};var s,q,w,v,r,A,H,L=0;if(o.ic){L=1.3*o.ic+0.05}for(J=0,G=this.data.length;J<G;J++){if(this.data[J]!=null){u=p[J];r=a.TeX.big_op_spacing5*M;var z=(J!=this.base&&l[this.ACCENTS[J]]);if(z&&u.w<=1){u.x=-u.l;p[J]=i.G().With({removeable:false});p[J].Add(u);p[J].Clean();p[J].w=-u.l;u=p[J]}A={left:0,center:(I-u.w)/2,right:I-u.w}[l.align];s=A;q=0;if(J==this.over){if(z){H=B*M;r=0;if(o.skew){s+=o.skew}}else{w=a.TeX.big_op_spacing1*M;v=a.TeX.big_op_spacing3*M;H=Math.max(w,v-Math.max(0,u.d))}H=Math.max(H,1500/a.em);s+=L/2;q=o.h+u.d+H;u.h+=r;if(u.h>u.H){u.H=u.h}}else{if(J==this.under){if(z){H=3*B*M;r=0}else{w=a.TeX.big_op_spacing2*M;v=a.TeX.big_op_spacing4*M;H=Math.max(w,v-u.h)}H=Math.max(H,1500/a.em);s-=L/2;q=-(o.d+u.h+H);u.d+=r;if(u.d>u.D){u.D=u.d}}}E.Add(u,s,q)}}E.Clean();this.SVGhandleColor(E);this.SVGsaveData(E);return E}});g.msubsup.Augment({toSVG:function(G,z){this.SVGgetStyles();var B=this.SVG();this.SVGhandleSpace(B);var K=B.scale=this.SVGgetScale(),E=this.SVGgetMu(B);var m=B.Add(this.SVGdataStretched(this.base,G,z));var l=(this.data[this.sup]||this.data[this.sub]||this).SVGgetScale();var I=a.TeX.x_height*K,y=a.TeX.scriptspace*K;var k,n;if(this.SVGnotEmpty(this.data[this.sup])){k=this.data[this.sup].toSVG();k.w+=y;k.r=Math.max(k.w,k.r)}if(this.SVGnotEmpty(this.data[this.sub])){n=this.data[this.sub].toSVG();n.w+=y;n.r=Math.max(n.w,n.r)}var C=a.TeX.sup_drop*l,A=a.TeX.sub_drop*l;var w=m.h-C,o=m.d+A,J=0,F;if(m.ic){m.w-=m.ic;J=1.3*m.ic+0.05}if(this.data[this.base]&&(this.data[this.base].type==="mi"||this.data[this.base].type==="mo")){if(this.data[this.base].data.join("").length===1&&m.scale===1&&!m.stretched&&!this.data[this.base].Get("largeop")){w=o=0}}var H=this.getValues("subscriptshift","superscriptshift");H.subscriptshift=(H.subscriptshift===""?0:a.length2em(H.subscriptshift,E));H.superscriptshift=(H.superscriptshift===""?0:a.length2em(H.superscriptshift,E));if(!k){if(n){o=Math.max(o,a.TeX.sub1*K,n.h-(4/5)*I,H.subscriptshift);B.Add(n,m.w,-o)}}else{if(!n){values=this.getValues("displaystyle","texprimestyle");F=a.TeX[(values.displaystyle?"sup1":(values.texprimestyle?"sup3":"sup2"))];w=Math.max(w,F*K,k.d+(1/4)*I,H.superscriptshift);B.Add(k,m.w+J,w)}else{o=Math.max(o,a.TeX.sub2*K);var x=a.TeX.rule_thickness*K;if((w-k.d)-(n.h-o)<3*x){o=3*x-w+k.d+n.h;C=(4/5)*I-(w-k.d);if(C>0){w+=C;o-=C}}B.Add(k,m.w+J,Math.max(w,H.superscriptshift));B.Add(n,m.w,-Math.max(o,H.subscriptshift))}}B.Clean();this.SVGhandleColor(B);this.SVGsaveData(B);return B}});g.mmultiscripts.Augment({toSVG:g.mbase.SVGautoload});g.mtable.Augment({toSVG:g.mbase.SVGautoload});g["annotation-xml"].Augment({toSVG:g.mbase.SVGautoload});g.math.Augment({SVG:i.Subclass({type:"svg",removeable:false}),toSVG:function(t,m){if(this.data[0]){this.SVGgetStyles();g.mbase.prototype.displayAlign=c.config.displayAlign;g.mbase.prototype.displayIndent=c.config.displayIndent;var q=i.G({stroke:"black",fill:"black","stroke-thickness":0,transform:"matrix(1 0 0 -1 0 0)"}).With({removeable:false});q.Add(this.data[0].toSVG(),0,0,true);q.Clean();this.SVGhandleColor(q);var s=this.SVG();s.element.setAttribute("xmlns:xlink",j);s.Add(q);s.Clean();this.SVGsaveData(s);var p=Math.max(-s.l,0),k=Math.max(s.r-s.w,0);var n=s.element.style;n.width=a.Ex(p+s.w+k);n.height=a.Ex(s.H+s.D);n.verticalAlign=a.Ex(-s.D-2*a.em);n.marginLeft=a.Ex(-p);n.marginRight=a.Ex(-k);s.element.setAttribute("viewBox",(-p)+" "+(-s.H)+" "+(p+s.w+k)+" "+(s.H+s.D));s.element.style.margin="1px 0px";if(s.H>s.h||s.D>s.d){var o=e.Element("span",{style:{display:"inline-block","white-space":"nowrap",padding:"1px 0px"},isMathJax:true},[["span",{style:{display:"inline-block",position:"relative",isMathJax:true,width:a.Ex(s.w),height:a.Ex(s.h+s.d),"vertical-align":a.Ex(-s.d)}}]]);o.firstChild.appendChild(s.element);s.element=o;n.verticalAlign="";n.position="absolute";n.bottom=a.Ex(s.d-s.D);n.left=0}t.appendChild(s.element);s.element=null;if(!this.isMultiline&&this.Get("display")==="block"){var u=this.getValues("indentalignfirst","indentshiftfirst","indentalign","indentshift");if(u.indentalignfirst!==g.INDENTALIGN.INDENTALIGN){u.indentalign=u.indentalignfirst}if(u.indentalign===g.INDENTALIGN.AUTO){u.indentalign=this.displayAlign}m.style.textAlign=u.indentalign;if(u.indentshiftfirst!==g.INDENTSHIFT.INDENTSHIFT){u.indentshift=u.indentshiftfirst}if(u.indentshift==="auto"){u.indentshift=this.displayIndent}if(u.indentshift&&u.indentalign!==g.INDENTALIGN.CENTER&&!s.hasIndent){t.style[{left:"marginLeft",right:"marginRight"}[u.indentalign]]=a.Ex(a.length2em(u.indentshift))}}}return t}});g.TeXAtom.Augment({toSVG:function(){this.SVGgetStyles();var k=this.SVG();this.SVGhandleSpace(k);if(this.data[0]!=null){var l=this.data[0].toSVG(),m=0;if(this.texClass===g.TEXCLASS.VCENTER){m=a.TeX.axis_height-(l.h+l.d)/2+l.d}k.Add(l,0,m);k.ic=l.ic}this.SVGhandleColor(k);this.SVGsaveData(k);return k}});c.Register.StartupHook("onLoad",function(){setTimeout(MathJax.Callback(["loadComplete",a,"jax.js"]),0)})});c.Register.StartupHook("End Cookie",function(){if(c.config.menuSettings.zoom!=="None"){h.Require("[MathJax]/extensions/MathZoom.js")}});if(!document.createElementNS){if(!document.namespaces.svg){document.namespaces.add("svg",b)}a.Augment({Element:function(k,l){var m=(typeof(k)==="string"?document.createElement("svg:"+k):k);m.isMathJax=true;if(l){for(var n in l){if(l.hasOwnProperty(n)){m.setAttribute(n,l[n].toString())}}}return m}})}})(MathJax.Ajax,MathJax.Hub,MathJax.HTML,MathJax.OutputJax.SVG); +(function(h,c,e,a){var g;var b="http://www.w3.org/2000/svg";var j="http://www.w3.org/1999/xlink";a.Augment({config:{styles:{".MathJax_SVG":{display:"inline","font-style":"normal","font-weight":"normal","line-height":"normal","font-size":"100%","font-size-adjust":"none","text-indent":0,"text-align":"left","text-transform":"none","letter-spacing":"normal","word-spacing":"normal","word-wrap":"normal","white-space":"nowrap","float":"none",direction:"ltr",border:0,padding:0,margin:0},".MathJax_SVG_Display":{position:"relative",display:"block",width:"100%"},".MathJax_SVG_Processing":{visibility:"hidden",position:"absolute",top:0,left:0,width:0,height:0,overflow:"hidden",display:"block"},".MathJax_SVG_Processed":{display:"none!important"},".MathJax_SVG_ExBox":{display:"block",overflow:"hidden",width:"1px",height:"60ex"},"#MathJax_SVG_Tooltip":{position:"absolute",left:0,top:0,width:"auto",height:"auto",display:"none"}}},hideProcessedMath:true,Config:function(){var k=c.config.menuSettings;if(k.scale){this.config.scale=k.scale}this.SUPER(arguments).Config.apply(this,arguments);this.fontInUse=this.config.font;this.fontDir+="/"+this.config.font;if(!this.require){this.require=[]}this.require.push(this.fontDir+"/fontdata.js");this.require.push(MathJax.OutputJax.extensionDir+"/MathEvents.js")},Startup:function(){EVENT=MathJax.Extension.MathEvents.Event;TOUCH=MathJax.Extension.MathEvents.Touch;HOVER=MathJax.Extension.MathEvents.Hover;this.ContextMenu=EVENT.ContextMenu;this.Mousedown=EVENT.AltContextMenu;this.Mouseover=HOVER.Mouseover;this.Mouseout=HOVER.Mouseout;this.Mousemove=HOVER.Mousemove;this.hiddenDiv=e.Element("div",{style:{visibility:"hidden",overflow:"hidden",position:"absolute",top:0,height:"1px",width:"auto",padding:0,border:0,margin:0,textAlign:"left",textIndent:0,textTransform:"none",lineHeight:"normal",letterSpacing:"normal",wordSpacing:"normal"}});if(!document.body.firstChild){document.body.appendChild(this.hiddenDiv)}else{document.body.insertBefore(this.hiddenDiv,document.body.firstChild)}this.hiddenDiv=e.addElement(this.hiddenDiv,"div",{id:"MathJax_SVG_Hidden"});var k=e.addElement(this.hiddenDiv,"div",{style:{width:"5in"}});this.pxPerInch=k.offsetWidth/5;this.hiddenDiv.removeChild(k);this.textSVG=this.Element("svg");d=this.addElement(this.addElement(this.hiddenDiv.parentNode,"svg"),"defs",{id:"MathJax_SVG_glyphs"});f={};this.ExSpan=e.Element("span",{style:{position:"absolute","font-size-adjust":"none"}},[["span",{className:"MathJax_SVG_ExBox"}]]);this.linebreakSpan=e.Element("span",null,[["hr",{style:{width:"auto",size:1,padding:0,border:0,margin:0}}]]);return h.Styles(this.config.styles,["InitializeSVG",this])},InitializeSVG:function(){document.body.appendChild(this.ExSpan);document.body.appendChild(this.linebreakSpan);this.defaultEx=this.ExSpan.firstChild.offsetHeight/60;this.defaultWidth=this.linebreakSpan.firstChild.offsetWidth;document.body.removeChild(this.linebreakSpan);document.body.removeChild(this.ExSpan)},preTranslate:function(o){var t=o.jax[this.id],u,r=t.length,z,s,A,n,y,l,x,q,k,w=false,v,B=this.config.linebreaks.automatic,p=this.config.linebreaks.width;if(B){w=(p.match(/^\s*(\d+(\.\d*)?%\s*)?container\s*$/)!=null);if(w){p=p.replace(/\s*container\s*/,"")}else{k=this.defaultWidth}if(p===""){p="100%"}}else{k=100000}for(u=0;u<r;u++){z=t[u];if(!z.parentNode){continue}s=z.previousSibling;if(s&&String(s.className).match(/^MathJax(_SVG)?(_Display)?( MathJax(_SVG)?_Processing)?$/)){s.parentNode.removeChild(s)}l=z.MathJax.elementJax;if(!l){continue}l.SVG={display:(l.root.Get("display")==="block")};A=n=e.Element("span",{style:{"font-size":this.config.scale+"%",display:"inline-block"},className:"MathJax_SVG",id:l.inputID+"-Frame",isMathJax:true,jaxID:this.id,oncontextmenu:EVENT.Menu,onmousedown:EVENT.Mousedown,onmouseover:EVENT.Mouseover,onmouseout:EVENT.Mouseout,onmousemove:EVENT.Mousemove,onclick:EVENT.Click,ondblclick:EVENT.DblClick});if(c.Browser.noContextMenu){A.ontouchstart=TOUCH.start;A.ontouchend=TOUCH.end}if(l.SVG.display){n=e.Element("div",{className:"MathJax_SVG_Display"});n.appendChild(A)}n.setAttribute("role","textbox");n.setAttribute("aria-readonly","true");n.className+=" MathJax_SVG_Processing";z.parentNode.insertBefore(n,z);z.parentNode.insertBefore(this.ExSpan.cloneNode(true),z);n.parentNode.insertBefore(this.linebreakSpan.cloneNode(true),n)}for(u=0;u<r;u++){z=t[u];if(!z.parentNode){continue}y=z.previousSibling;n=y.previousSibling;l=z.MathJax.elementJax;if(!l){continue}x=y.firstChild.offsetHeight/60;v=n.previousSibling.firstChild.offsetWidth;if(w){k=v}if(x===0||x==="NaN"){this.hiddenDiv.appendChild(n);l.SVG.isHidden=true;x=this.defaultEx;v=this.defaultWidth;if(w){k=this.defaultWidth}}l.SVG.ex=x;l.SVG.cwidth=v;l.SVG.em=q=x/a.TeX.x_height*1000;l.SVG.lineWidth=(B?this.length2em(p,1,k/q):1000000)}for(u=0;u<r;u++){z=t[u];if(!z.parentNode){continue}y=t[u].previousSibling;A=y.previousSibling;l=t[u].MathJax.elementJax;if(!l){continue}if(!l.SVG.isHidden){A=A.previousSibling}A.parentNode.removeChild(A);y.parentNode.removeChild(y)}o.SVGeqn=o.SVGlast=0;o.SVGi=-1;o.SVGchunk=this.config.EqnChunk;o.SVGdelay=false},Translate:function(l,p){if(!l.parentNode){return}if(p.SVGdelay){p.SVGdelay=false;c.RestartAfter(MathJax.Callback.Delay(this.config.EqnChunkDelay))}var k=l.MathJax.elementJax,o=k.root,m=document.getElementById(k.inputID+"-Frame"),q=(k.SVG.display?m.parentNode:m);this.em=g.mbase.prototype.em=k.SVG.em;this.ex=k.SVG.ex;this.linebreakWidth=k.SVG.lineWidth*1000;this.cwidth=k.SVG.cwidth;this.mathDiv=q;m.appendChild(this.textSVG);this.initSVG(o,m);o.setTeXclass();try{o.toSVG(m,q)}catch(n){if(n.restart){while(m.firstChild){m.removeChild(m.firstChild)}}throw n}m.removeChild(this.textSVG);if(k.SVG.isHidden){l.parentNode.insertBefore(q,l)}q.className=q.className.split(/ /)[0];if(this.hideProcessedMath){q.className+=" MathJax_SVG_Processed";if(l.MathJax.preview){k.SVG.preview=l.MathJax.preview;delete l.MathJax.preview}p.SVGeqn+=(p.i-p.SVGi);p.SVGi=p.i;if(p.SVGeqn>=p.SVGlast+p.SVGchunk){this.postTranslate(p);p.SVGchunk=Math.floor(p.SVGchunk*this.config.EqnChunkFactor);p.SVGdelay=true}}},postTranslate:function(q){var l=q.jax[this.id];if(!this.hideProcessedMath){return}for(var o=q.SVGlast,k=q.SVGeqn;o<k;o++){var n=l[o];if(n&&n.MathJax.elementJax){n.previousSibling.className=n.previousSibling.className.split(/ /)[0];var p=n.MathJax.elementJax.SVG;if(p.preview){p.preview.innerHTML="";n.MathJax.preview=p.preview;delete p.preview}}}q.SVGlast=q.SVGeqn},getJaxFromMath:function(k){if(k.parentNode.className==="MathJax_SVG_Display"){k=k.parentNode}return c.getJaxFor(k.nextSibling)},getHoverSpan:function(k,l){l.style.position="relative";return l.firstChild},getHoverBBox:function(k,l,m){var n=EVENT.getBBox(l.parentNode);n.h+=2;n.d-=2;return n},Zoom:function(l,s,q,k,p){s.className="MathJax_SVG";var u=s.appendChild(this.ExSpan.cloneNode(true));var o=u.firstChild.offsetHeight/60;this.em=g.mbase.prototype.em=o/a.TeX.x_height*1000;this.cwidth=0.85*a.defaultWidth;u.parentNode.removeChild(u);this.idPostfix="-zoom";l.root.toSVG(s,s);this.idPostfix="";s.style.position=q.style.position="absolute";var r=s.offsetWidth,n=s.offsetHeight,t=q.offsetHeight,m=q.offsetWidth;s.style.position=q.style.position="";return{Y:-EVENT.getBBox(s).h,mW:m,mH:t,zW:r,zH:n}},initSVG:function(l,k){},Remove:function(k){var l=document.getElementById(k.inputID+"-Frame");if(l){if(k.SVG.display){l=l.parentNode}l.parentNode.removeChild(l)}delete k.SVG},Em:function(k){if(Math.abs(k)<0.0006){return"0em"}return k.toFixed(3).replace(/\.?0+$/,"")+"em"},Ex:function(k){k=k/this.TeX.x_height;if(Math.abs(k)<0.0006){return"0ex"}return k.toFixed(3).replace(/\.?0+$/,"")+"ex"},Percent:function(k){return(100*k).toFixed(1).replace(/\.?0+$/,"")+"%"},length2em:function(q,l,o){if(typeof(q)!=="string"){q=q.toString()}if(q===""){return""}if(q===g.SIZE.NORMAL){return 1000}if(q===g.SIZE.BIG){return 2000}if(q===g.SIZE.SMALL){return 710}if(q==="infinity"){return a.BIGDIMEN}if(q.match(/mathspace$/)){return 1000*a.MATHSPACE[q]}var n=q.match(/^\s*([-+]?(?:\.\d+|\d+(?:\.\d*)?))?(pt|em|ex|mu|px|pc|in|mm|cm|%)?/);var k=parseFloat(n[1]||"1")*1000,p=n[2];if(o==null){o=1000}if(l==null){l=1}if(p==="em"){return k}if(p==="ex"){return k*a.TeX.x_height/1000}if(p==="%"){return k/100*o/1000}if(p==="px"){return k/a.em}if(p==="pt"){return k/10}if(p==="pc"){return k*1.2}if(p==="in"){return k*this.pxPerInch/a.em}if(p==="cm"){return k*this.pxPerInch/a.em/2.54}if(p==="mm"){return k*this.pxPerInch/a.em/25.4}if(p==="mu"){return k/18*l}return k*o/1000},thickness2em:function(l,k){var m=a.TeX.rule_thickness;if(l===g.LINETHICKNESS.MEDIUM){return m}if(l===g.LINETHICKNESS.THIN){return 0.67*m}if(l===g.LINETHICKNESS.THICK){return 1.67*m}return this.length2em(l,k,m)},getPadding:function(l){var n={top:0,right:0,bottom:0,left:0},k=false;for(var o in n){if(n.hasOwnProperty(o)){var m=l.style["padding"+o.charAt(0).toUpperCase()+o.substr(1)];if(m){n[o]=this.length2em(m);k=true}}}return(k?n:false)},getBorders:function(o){var m={top:0,right:0,bottom:0,left:0},l=false;for(var p in m){if(m.hasOwnProperty(p)){var k="border"+p.charAt(0).toUpperCase()+p.substr(1);var n=o.style[k+"Style"];if(n){l=true;m[p]=this.length2em(o.style[k+"Width"]);m[p+"Style"]=o.style[k+"Style"];m[p+"Color"]=o.style[k+"Color"];if(m[p+"Color"]==="initial"){m[p+"Color"]=""}}}}return(l?m:false)},Element:function(k,l){var m=(typeof(k)==="string"?document.createElementNS(b,k):k);m.isMathJax=true;if(l){for(var n in l){if(l.hasOwnProperty(n)){m.setAttribute(n,l[n].toString())}}}return m},addElement:function(l,k,m){return l.appendChild(this.Element(k,m))},TextNode:e.TextNode,addText:e.addText,ucMatch:e.ucMatch,HandleVariant:function(s,r,C){var v=i.G();var o,x,z,p,A,t,q,l,y,k;if(!s){s=this.FONTDATA.VARIANT[g.VARIANT.NORMAL]}if(s.forceFamily){C=i.TEXT(r,C,s.font);if(s.h!=null){C.h=s.h}if(s.d!=null){C.d=s.d}v.Add(C);C=""}A=s;for(t=0,q=C.length;t<q;t++){s=A;o=C.charCodeAt(t);z=C.charAt(t);if(o>=55296&&o<56319){t++;o=(((o-55296)<<10)+(C.charCodeAt(t)-56320))+65536;if(this.FONTDATA.RemapPlane1){var w=this.FONTDATA.RemapPlane1(o,s);o=w.n;s=w.variant}}else{k=this.FONTDATA.RANGES;for(l=0,y=k.length;l<y;l++){if(k[l].name==="alpha"&&s.noLowerCase){continue}x=s["offset"+k[l].offset];if(x&&o>=k[l].low&&o<=k[l].high){if(k[l].remap&&k[l].remap[o]){o=x+k[l].remap[o]}else{o=o-k[l].low+x;if(k[l].add){o+=k[l].add}}if(s["variant"+k[l].offset]){s=this.FONTDATA.VARIANT[s["variant"+k[l].offset]]}break}}}if(s.remap&&s.remap[o]){if(s.remap[o] instanceof Array){var B=s.remap[o];o=B[0];s=this.FONTDATA.VARIANT[B[1]]}else{if(typeof(s.remap[o])==="string"){C=s.remap[o]+C.substr(t+1);t=0;q=C.length;o=C.charCodeAt(0)}else{o=s.remap[o];if(s.remap.variant){s=this.FONTDATA.VARIANT[s.remap.variant]}}}}if(this.FONTDATA.REMAP[o]&&!s.noRemap){o=this.FONTDATA.REMAP[o];if(o instanceof Array){s=this.FONTDATA.VARIANT[o[1]];o=o[0]}if(typeof(o)==="string"){C=o+C.substr(t+1);t=0;q=C.length;o=o.charCodeAt(0)}}p=this.lookupChar(s,o);z=p[o];if(z){z=[r,p.id+"-"+o.toString(16).toUpperCase()].concat(z);v.Add(i.GLYPH.apply(i,z),v.w,0)}else{if(this.FONTDATA.DELIMITERS[o]){v.Add(this.createDelimiter(o,0,1,p),v.w,0)}else{if(o<=65535){z=String.fromCharCode(o)}else{x=o-65536;z=String.fromCharCode((x>>10)+55296)+String.fromCharCode((x&1023)+56320)}var u=i.TEXT(r,z,{"font-family":s.defaultFamily||a.config.undefinedFamily,"font-style":(s.italic?"italic":""),"font-weight":(s.bold?"bold":"")});if(s.h!=null){u.h=s.h}if(s.d!=null){u.d=s.d}z=i.G();z.Add(u);v.Add(z,v.w,0);c.signal.Post(["SVG Jax - unknown char",o,s])}}}if(C.length==1&&p.skew&&p.skew[o]){v.skew=p.skew[o]*1000}if(v.element.childNodes.length===1){v.element=v.element.firstChild;v.removeable=false;v.scale=r}return v},lookupChar:function(p,s){var o,k;if(!p.FONTS){var r=this.FONTDATA.FONTS;var q=(p.fonts||this.FONTDATA.VARIANT.normal.fonts);if(!(q instanceof Array)){q=[q]}if(p.fonts!=q){p.fonts=q}p.FONTS=[];for(o=0,k=q.length;o<k;o++){if(r[q[o]]){p.FONTS.push(r[q[o]])}}}for(o=0,k=p.FONTS.length;o<k;o++){var l=p.FONTS[o];if(typeof(l)==="string"){delete p.FONTS;this.loadFont(l)}if(l[s]){return l}else{this.findBlock(l,s)}}return{id:"unknown"}},findBlock:function(l,q){if(l.Ranges){for(var p=0,k=l.Ranges.length;p<k;p++){if(q<l.Ranges[p][0]){return}if(q<=l.Ranges[p][1]){var o=l.Ranges[p][2];for(var n=l.Ranges.length-1;n>=0;n--){if(l.Ranges[n][2]==o){l.Ranges.splice(n,1)}}this.loadFont(l.directory+"/"+o+".js")}}}},loadFont:function(k){c.RestartAfter(h.Require(this.fontDir+"/"+k))},createDelimiter:function(k,n,q,o){if(!q){q=1}var s=i.G();if(!k){s.Clean();delete s.element;s.w=s.r=this.TeX.nulldelimiterspace*q;return s}if(!(n instanceof Array)){n=[n,n]}var t=n[1];n=n[0];var l={alias:k};while(l.alias){k=l.alias;l=this.FONTDATA.DELIMITERS[k];if(!l){l={HW:[0,this.FONTDATA.VARIANT[g.VARIANT.NORMAL]]}}}if(l.load){c.RestartAfter(h.Require(this.fontDir+"/fontdata-"+l.load+".js"))}for(var r=0,p=l.HW.length;r<p;r++){if(l.HW[r][0]*q>=n-10-a.config.blacker||(r==p-1&&!l.stretch)){if(l.HW[r][2]){q*=l.HW[r][2]}if(l.HW[r][3]){k=l.HW[r][3]}return this.createChar(q,[k,l.HW[r][1]],o).With({stretched:true})}}if(l.stretch){this["extendDelimiter"+l.dir](s,t,l.stretch,q,o)}return s},createChar:function(s,q,n){var r="",p={fonts:[q[1]],noRemap:true};if(n&&n===g.VARIANT.BOLD){p.fonts=[q[1]+"-bold",q[1]]}if(typeof(q[1])!=="string"){p=q[1]}if(q[0] instanceof Array){for(var o=0,k=q[0].length;o<k;o++){r+=String.fromCharCode(q[0][o])}}else{r=String.fromCharCode(q[0])}var l=this.HandleVariant(p,s,r);if(q[2]){l.x=q[2]*1000}if(q[3]){l.y=q[3]*1000}if(q[5]){l.h+=q[5]*1000}if(q[6]){l.d+=q[6]*1000}return l},extendDelimiterV:function(r,A,m,o,n){var x=this.createChar(o,(m.top||m.ext),n);var u=this.createChar(o,(m.bot||m.ext),n);var q=x.h+x.d+u.h+u.d;var w=-x.h;r.Add(x,0,w);w-=x.d;if(m.mid){var z=this.createChar(o,m.mid,n);q+=z.h+z.d}if(A>q){var l=this.createChar(o,m.ext,n);var p=(m.mid?2:1),v=(A-q)/p,B=(v+100)/(l.h+l.d);while(p-->0){var t=a.Element("g",{transform:"translate("+l.y+","+(w-B*l.h+50+l.y)+") scale(1,"+B+")"});t.appendChild(l.element.cloneNode(false));r.element.appendChild(t);w-=v;if(m.mid&&p){r.Add(z,0,w-z.h);w-=(z.h+z.d)}}}else{if(m.mid){w+=(q-A)/2;r.Add(z,0,w-z.h);w+=-(z.h+z.d)+(q-A)/2}else{w+=(q-A)}}r.Add(u,0,w-u.h);r.Clean();r.scale=o;r.isMultiChar=true},extendDelimiterH:function(t,o,m,q,n){var p=this.createChar(q,(m.left||m.rep),n);var C=this.createChar(q,(m.right||m.rep),n);t.Add(p,-p.l,0);var B=(p.r-p.l)+(C.r-C.l),z=p.r-p.l;if(m.mid){var A=this.createChar(q,m.mid,n);B+=A.w}if(o>B){var y=this.createChar(q,m.rep,n),l=m.fuzz||0;var r=(m.mid?2:1),v=(o-B)/r,E=(v+l)/(y.r-y.l);while(r-->0){var u=a.Element("g",{transform:"translate("+(z-l/2-E*y.l+y.x)+","+y.y+") scale("+E+",1)"});u.appendChild(y.element.cloneNode(false));t.element.appendChild(u);z+=v;if(m.mid&&r){t.Add(A,z,0);z+=A.w}}}else{if(m.mid){var D=Math.min(B-o,p.w/2);z-=D/2;t.Add(A,z,0);z+=A.w-D/2}else{z-=(B-o)}}t.Add(C,z-C.l,0);t.Clean();t.scale=q;t.isMultiChar=true},MATHSPACE:{veryverythinmathspace:1/18,verythinmathspace:2/18,thinmathspace:3/18,mediummathspace:4/18,thickmathspace:5/18,verythickmathspace:6/18,veryverythickmathspace:7/18,negativeveryverythinmathspace:-1/18,negativeverythinmathspace:-2/18,negativethinmathspace:-3/18,negativemediummathspace:-4/18,negativethickmathspace:-5/18,negativeverythickmathspace:-6/18,negativeveryverythickmathspace:-7/18},TeX:{x_height:430.554,quad:1000,num1:676.508,num2:393.732,num3:443.73,denom1:685.951,denom2:344.841,sup1:412.892,sup2:362.892,sup3:288.888,sub1:150,sub2:247.217,sup_drop:386.108,sub_drop:50,delim1:2390,delim2:1000,axis_height:250,rule_thickness:60,big_op_spacing1:111.111,big_op_spacing2:166.666,big_op_spacing3:200,big_op_spacing4:600,big_op_spacing5:100,scriptspace:100,nulldelimiterspace:120,delimiterfactor:901,delimitershortfall:100,min_rule_thickness:1.25,min_root_space:1.5},BIGDIMEN:10000000,NBSP:"\u00A0"});var i=a.BBOX=MathJax.Object.Subclass({type:"g",removeable:true,Init:function(k){this.h=this.d=-a.BIGDIMEN;this.H=this.D=0;this.w=this.r=0;this.l=a.BIGDIMEN;this.x=this.y=0;this.scale=1;this.n=0;if(this.type){this.element=a.Element(this.type,k)}},With:function(k){return c.Insert(this,k)},Add:function(n,m,l,p,o){if(m){n.x+=m}if(l){n.y+=l}if(n.element){if(n.removeable&&n.element.childNodes.length===1&&n.n===1){var r=n.element.firstChild;if(r.nodeName==="use"||r.nodeName==="rect"){n.element=r;n.scale=n.childScale;var k=n.childX,q=n.childY;n.x+=k;n.y+=q;n.h-=q;n.d+=q;n.H-=q;n.D+=q;n.w-=k;n.r-=k;n.l+=k;n.removeable=false}}if(Math.abs(n.x)<1&&Math.abs(n.y)<1){n.remove=n.removeable}else{if(n.element.nodeName==="g"){if(!n.element.firstChild){n.remove=n.removeable}else{n.element.setAttribute("transform","translate("+Math.floor(n.x)+","+Math.floor(n.y)+")")}}else{if(n.element.nodeName==="line"||n.element.nodeName==="polygon"||n.element.nodeName==="path"||n.element.nodeName==="a"){n.element.setAttribute("transform","translate("+Math.floor(n.x)+","+Math.floor(n.y)+")")}else{n.element.setAttribute("x",Math.floor(n.x/n.scale));n.element.setAttribute("y",Math.floor(n.y/n.scale))}}}if(n.remove){this.n+=n.n;while(n.element.firstChild){if(o&&this.element.firstChild){this.element.insertBefore(n.element.firstChild,this.element.firstChild)}else{this.element.appendChild(n.element.firstChild)}}}else{if(o){this.element.insertBefore(n.element,this.element.firstChild)}else{this.element.appendChild(n.element)}}delete n.element}if(n.hasIndent){this.hasIndent=n.hasIndent}if(n.d-n.y>this.d){this.d=n.d-n.y;if(this.d>this.D){this.D=this.d}}if(n.y+n.h>this.h){this.h=n.y+n.h;if(this.h>this.H){this.H=this.h}}if(n.D-n.y>this.D){this.D=n.D-n.y}if(n.y+n.H>this.H){this.H=n.y+n.H}if(n.x+n.l<this.l){this.l=n.x+n.l}if(n.x+n.r>this.r){this.r=n.x+n.r}if(p||n.x+n.w+(n.X||0)>this.w){this.w=n.x+n.w+(n.X||0)}this.childScale=n.scale;this.childX=n.x;this.childY=n.y;this.n++;return n},Align:function(m,n,l,k){l=({left:l,center:(this.w-m.w)/2,right:this.w-m.w-l})[n]||0;this.Add(m,l,k)},Clean:function(){if(this.h===-a.BIGDIMEN){this.h=this.d=this.l=0}return this}});i.ROW=i.Subclass({Init:function(){this.SUPER(arguments).Init.call(this);this.svg=[];this.sh=this.sd=0},Check:function(l){var k=l.toSVG();this.svg.push(k);if(l.SVGcanStretch("Vertical")){k.mml=l}if(k.h>this.sh){this.sh=k.h}if(k.d>this.sd){this.sd=k.d}},Stretch:function(){for(var n=0,k=this.svg.length;n<k;n++){var l=this.svg[n];if(l.mml){l=l.mml.SVGstretchV(this.sh,this.sd)}if(l.ic){this.ic=l.ic}else{delete this.ic}this.Add(l,this.w,0,true)}delete this.svg}});i.RECT=i.Subclass({type:"rect",removeable:false,Init:function(l,n,k,m){if(m==null){m={stroke:"none"}}m.width=Math.floor(k);m.height=Math.floor(l+n);this.SUPER(arguments).Init.call(this,m);this.w=this.r=k;this.h=this.H=l+n;this.d=this.D=this.l=0;this.y=-n}});i.FRAME=i.Subclass({type:"rect",removeable:false,Init:function(n,q,k,m,p,l,o){if(o==null){o={}}o.fill="none";o["stroke-width"]=m.toFixed(2).replace(/\.?0+$/,"");o.width=Math.floor(k-m);o.height=Math.floor(n+q-m);o.transform="translate("+Math.floor(m/2)+","+Math.floor(-q+m/2)+")";if(p==="dashed"){o["stroke-dasharray"]=[Math.floor(6*a.em),Math.floor(6*a.em)].join(" ")}this.SUPER(arguments).Init.call(this,o);this.w=this.r=k;this.h=this.H=n;this.d=this.D=q;this.l=0}});i.HLINE=i.Subclass({type:"line",removeable:false,Init:function(l,p,r,o,q){if(q==null){q={}}if(o&&o!==""){q.stroke=o}q["stroke-width"]=p.toFixed(2).replace(/\.?0+$/,"");q.x1=0;q.y1=q.y2=p/2;q.x2=Math.floor(l);if(r==="dashed"){var s=Math.floor(l/(6*p)),k=Math.floor(l/(2*s+1));q["stroke-dasharray"]=k+" "+k}this.SUPER(arguments).Init.call(this,q);this.w=this.r=l;this.l=0;this.h=this.H=p;this.d=this.D=0}});i.VLINE=i.Subclass({type:"line",removeable:false,Init:function(p,o,r,l,q){if(q==null){q={}}if(l&&l!==""){q.stroke=l}q["stroke-width"]=o.toFixed(2).replace(/\.?0+$/,"");q.x1=q.x2=o/2;q.y1=0;q.y2=Math.floor(p);if(r==="dashed"){var s=Math.floor(p/(6*o)),k=Math.floor(p/(2*s+1));q["stroke-dasharray"]=k+" "+k}this.SUPER(arguments).Init.call(this,q);this.w=this.r=o;this.l=0;this.h=this.H=p;this.d=this.D=0}});i.TEXT=i.Subclass({type:"text",removeable:false,Init:function(n,m,k){if(!k){k={}}k.stroke="none";this.SUPER(arguments).Init.call(this,k);a.addText(this.element,m);a.textSVG.appendChild(this.element);var l=this.element.getBBox();a.textSVG.removeChild(this.element);n*=1000/a.em;this.element.setAttribute("transform","scale("+n+") matrix(1 0 0 -1 0 0)");this.w=this.r=l.width*n;this.l=0;this.h=this.H=-l.y*n;this.d=this.D=(l.height+l.y)*n}});i.G=i;i.NULL=i.Subclass({Init:function(){this.SUPER(arguments).Init.apply(this,arguments);this.Clean()}});var f,d;i.GLYPH=i.Subclass({type:"path",removeable:false,Init:function(q,m,u,v,x,s,k,n){var o,y=a.config.blacker;if(!f[m]){o={id:m,"stroke-width":y};if(n!==""){o.d="M"+n+"Z"}this.SUPER(arguments).Init.call(this,o);d.appendChild(this.element);f[m]=true}o={};if(q!==1){o.transform="scale("+q+")"}this.element=a.Element("use",o);this.element.setAttributeNS(j,"href","#"+m);this.h=(u+y)*q;this.d=(v+y)*q;this.w=(x+y/2)*q;this.l=(s+y/2)*q;this.r=(k+y/2)*q;this.H=Math.max(0,this.h);this.D=Math.max(0,this.d);this.x=this.y=0;this.scale=q}});c.Register.StartupHook("mml Jax Ready",function(){g=MathJax.ElementJax.mml;g.mbase.Augment({SVG:i,toSVG:function(){this.SVGgetStyles();var o=this.SVGgetVariant();var l=this.SVG();l.scale=this.SVGgetScale();this.SVGhandleSpace(l);for(var n=0,k=this.data.length;n<k;n++){if(this.data[n]){var q=l.Add(this.data[n].toSVG(o,l.scale),l.w,0,true);if(q.skew){l.skew=q.skew}}}l.Clean();var p=this.data.join("");if(l.skew&&p.length!==1){delete l.skew}if(l.r>l.w&&p.length===1&&!o.noIC){l.ic=l.r-l.w;l.w=l.r}this.SVGhandleColor(l);this.SVGsaveData(l);return l},SVGdataStretched:function(l,k,m){this.SVGdata={HW:k,D:m};if(m!=null){return this.data[l].SVGstretchV(k,m)}if(k!=null){return this.data[l].SVGstretchH(k)}return this.data[l].toSVG()},SVGsaveData:function(l){if(!this.SVGdata){this.SVGdata={}}this.SVGdata.w=l.w,this.SVGdata.x=l.x;if(l.X!=null){this.SVGdata.X=l.X}if(this["class"]){l.removeable=false;a.Element(l.element,{"class":this["class"]})}if(this.id){l.removeable=false;a.Element(l.element,{id:this.id})}if(this.href){var k=a.Element("a");k.setAttributeNS(j,"href",this.href);a.addElement(k,"rect",{width:l.w,height:l.h+l.d,y:-l.d,fill:"none",stroke:"none","pointer-events":"all"});if(l.type==="svg"){var n=l.element.firstChild;while(n.firstChild){k.appendChild(n.firstChild)}n.appendChild(k)}else{if(l.removeable&&l.element.nodeName==="g"){while(l.element.firstChild){k.appendChild(l.element.firstChild)}}else{k.appendChild(l.element)}l.element=k}l.removeable=false}if(a.config.addMMLclasses){l.removeable=false;l.element.setAttribute("className","mjx-svg-"+this.type)}var m=this.style;if(m){l.element.style.cssText=m;if(l.element.style.fontSize){l.element.style.fontSize=""}l.element.style.border=l.element.style.padding="";if(l.removeable){l.removeable=l.element.style.cssText===""}}},SVGgetStyles:function(){if(this.style){var k=e.Element("span");k.style.cssText=this.style;this.styles={border:a.getBorders(k),padding:a.getPadding(k)};if(k.style.fontSize){this.styles.fontSize=k.style.fontSize}if(k.style.color){this.styles.color=k.style.color}if(k.style.backgroundColor){this.styles.background=k.style.backgroundColor}if(k.style.fontStyle){this.styles.fontStyle=k.style.fontStyle}if(k.style.fontWeight){this.styles.fontWeight=k.style.fontWeight}if(k.style.fontFamily){this.styles.fontFamily=k.style.fontFamily}if(this.styles.fontWeight&&this.styles.fontWeight.match(/^\d+$/)){this.styles.fontWeight=(parseInt(this.styles.fontWeight)>600?"bold":"normal")}}},SVGhandleSpace:function(n){if(this.useMMLspacing){if(this.type!=="mo"){return}var m=this.getValues("scriptlevel","lspace","rspace");if(m.scriptlevel<=0||this.hasValue("lspace")||this.hasValue("rspace")){var l=this.SVGgetMu(n);m.lspace=Math.max(0,a.length2em(m.lspace,l));m.rspace=Math.max(0,a.length2em(m.rspace,l));var k=this,o=this.Parent();while(o&&o.isEmbellished()&&o.Core()===k){k=o;o=o.Parent()}if(m.lspace){n.x+=m.lspace}if(m.rspace){n.X=m.rspace}}}else{var p=this.texSpacing();if(p!==""){n.x+=a.length2em(p,this.SVGgetScale())/n.scale}}},SVGhandleColor:function(o){var w=this.getValues("mathcolor","color");if(this.styles&&this.styles.color&&!w.color){w.color=this.styles.color}if(w.color&&!this.mathcolor){w.mathcolor=w.color}if(w.mathcolor){a.Element(o.element,{fill:w.mathcolor,stroke:w.mathcolor});o.removeable=false}var s=(this.styles||{}).border,u=(this.styles||{}).padding,t=((s||{}).left||0),q=((u||{}).left||0),k;w.background=(this.mathbackground||this.background||(this.styles||{}).background||g.COLOR.TRANSPARENT);if(t+q){var l=i();for(k in o){if(o.hasOwnProperty(k)){l[k]=o[k]}}l.x=0;l.y=0;o.element=a.Element("g");o.removeable=true;o.Add(l,t+q,0)}if(u){o.w+=u.right;o.h+=u.top;o.d+=u.bottom}if(s){o.w+=s.right;o.h+=s.top;o.d+=s.bottom}if(w.background!==g.COLOR.TRANSPARENT){if(o.element.nodeName!=="g"&&o.element.nodeName!=="svg"){var p=a.Element("g");p.appendChild(o.element);o.element=p;o.removeable=true}o.Add(i.RECT(o.h,o.d,o.w,{fill:w.background,stroke:"none"}),0,0,false,true)}if(s){var v=5;var m={left:["V",o.h+o.d,-v,-o.d],right:["V",o.h+o.d,o.w-s.right+v,-o.d],top:["H",o.w,0,o.h-s.top+v],bottom:["H",o.w,0,-o.d-v]};for(k in m){if(m.hasOwnProperty(k)){if(s[k]){var r=m[k],n=i[r[0]+"LINE"];o.Add(n(r[1],s[k],s[k+"Style"],s[k+"Color"]),r[2],r[3])}}}}},SVGhandleVariant:function(k,m,l){return a.HandleVariant(k,m,l)},SVGgetVariant:function(){var k=this.getValues("mathvariant","fontfamily","fontweight","fontstyle");var l=k.mathvariant;if(this.variantForm){l="-TeX-variant"}k.hasVariant=this.Get("mathvariant",true);if(!k.hasVariant){k.family=k.fontfamily;k.weight=k.fontweight;k.style=k.fontstyle}if(this.styles){if(!k.style&&this.styles.fontStyle){k.style=this.styles.fontStyle}if(!k.weight&&this.styles.fontWeight){k.weight=this.styles.fontWeight}if(!k.family&&this.styles.fontFamily){k.family=this.styles.fontFamily}}if(k.family&&!k.hasVariant){if(!k.weight&&k.mathvariant.match(/bold/)){k.weight="bold"}if(!k.style&&k.mathvariant.match(/italic/)){k.style="italic"}l={forceFamily:true,font:{"font-family":k.family}};if(k.style){l.font["font-style"]=k.style}if(k.weight){l.font["font-weight"]=k.weight}return l}if(k.weight==="bold"){l={normal:g.VARIANT.BOLD,italic:g.VARIANT.BOLDITALIC,fraktur:g.VARIANT.BOLDFRAKTUR,script:g.VARIANT.BOLDSCRIPT,"sans-serif":g.VARIANT.BOLDSANSSERIF,"sans-serif-italic":g.VARIANT.SANSSERIFBOLDITALIC}[l]||l}else{if(k.weight==="normal"){l={bold:g.VARIANT.normal,"bold-italic":g.VARIANT.ITALIC,"bold-fraktur":g.VARIANT.FRAKTUR,"bold-script":g.VARIANT.SCRIPT,"bold-sans-serif":g.VARIANT.SANSSERIF,"sans-serif-bold-italic":g.VARIANT.SANSSERIFITALIC}[l]||l}}if(k.style==="italic"){l={normal:g.VARIANT.ITALIC,bold:g.VARIANT.BOLDITALIC,"sans-serif":g.VARIANT.SANSSERIFITALIC,"bold-sans-serif":g.VARIANT.SANSSERIFBOLDITALIC}[l]||l}else{if(k.style==="normal"){l={italic:g.VARIANT.NORMAL,"bold-italic":g.VARIANT.BOLD,"sans-serif-italic":g.VARIANT.SANSSERIF,"sans-serif-bold-italic":g.VARIANT.BOLDSANSSERIF}[l]||l}}return a.FONTDATA.VARIANT[l]},SVGgetScale:function(){var l=1,k=this.getValues("mathsize","scriptlevel","fontsize");if((this.styles||{}).fontSize&&!k.fontsize){k.fontsize=this.styles.fontSize}if(k.fontsize&&!this.mathsize){k.mathsize=k.fontsize}if(k.scriptlevel!==0){if(k.scriptlevel>2){k.scriptlevel=2}l=Math.pow(this.Get("scriptsizemultiplier"),k.scriptlevel);k.scriptminsize=a.length2em(this.Get("scriptminsize"))/1000;if(l<k.scriptminsize){l=k.scriptminsize}}l*=a.length2em(k.mathsize)/1000;return l},SVGgetMu:function(m){var k=1,l=this.getValues("scriptlevel","scriptsizemultiplier");if(m.scale&&m.scale!==1){k=1/m.scale}if(l.scriptlevel!==0){if(l.scriptlevel>2){l.scriptlevel=2}k=Math.sqrt(Math.pow(l.scriptsizemultiplier,l.scriptlevel))}return k},SVGnotEmpty:function(k){while(k){if((k.type!=="mrow"&&k.type!=="texatom")||k.data.length>1){return true}k=k.data[0]}return false},SVGcanStretch:function(k){if(this.isEmbellished()){return this.Core().SVGcanStretch(k)}return false},SVGstretchV:function(k,l){return this.toSVG(k,l)},SVGstretchH:function(k){return this.toSVG(k)},SVGlineBreaks:function(){return false}},{SVGautoload:function(){var k=a.autoloadDir+"/"+this.type+".js";c.RestartAfter(h.Require(k))},SVGautoloadFile:function(k){var l=a.autoloadDir+"/"+k+".js";c.RestartAfter(h.Require(l))}});g.chars.Augment({toSVG:function(l,o,k,m){var n=this.data.join("").replace(/[\u2061-\u2064]/g,"");if(k){n=k(n,m)}return this.SVGhandleVariant(l,o,n)}});g.entity.Augment({toSVG:function(k,l){return this.SVGhandleVariant(k,l,this.toString().replace(/[\u2061-\u2064]/g,""))}});g.mo.Augment({toSVG:function(){this.SVGgetStyles();var r=this.svg=this.SVG();this.SVGhandleSpace(r);if(this.data.length==0){r.Clean();this.SVGsaveData(r);return r}var n=this.SVGgetScale(),p=this.SVGgetVariant();var w=this.getValues("largeop","displaystyle");if(w.largeop){p=a.FONTDATA.VARIANT[w.displaystyle?"-largeOp":"-smallOp"]}var v=this.CoreParent(),o=(v&&v.isa(g.msubsup)&&this!==v.data[0]),k=(o?this.SVGremapChars:null);if(this.data.join("").length===1&&v&&v.isa(g.munderover)&&this.CoreText(v.data[v.base]).length===1){var s=v.data[v.over],u=v.data[v.under];if(s&&this===s.CoreMO()&&v.Get("accent")){k=a.FONTDATA.REMAPACCENT}else{if(u&&this===u.CoreMO()&&v.Get("accentunder")){k=a.FONTDATA.REMAPACCENTUNDER}}}for(var q=0,l=this.data.length;q<l;q++){if(this.data[q]){var y=this.data[q].toSVG(p,n,this.SVGremap,k),t=r.w;if(t===0&&-y.l>10*y.w){t+=-y.l}r.Add(y,t,0,true);if(y.skew){r.skew=y.skew}}}r.Clean();if(this.data.join("").length!==1){delete r.skew}if(w.largeop){r.y=(r.h-r.d)/2/n-a.TeX.axis_height;if(r.r>r.w){r.ic=r.r-r.w;r.w=r.r}}this.SVGhandleColor(r);this.SVGsaveData(r);return r},CoreParent:function(){var k=this;while(k&&k.isEmbellished()&&k.CoreMO()===this&&!k.isa(g.math)){k=k.Parent()}return k},CoreText:function(k){if(!k){return""}if(k.isEmbellished()){return k.CoreMO().data.join("")}while(k.isa(g.mrow)&&k.data.length===1&&k.data[0]){k=k.data[0]}if(!k.isToken){return""}else{return k.data.join("")}},SVGremapChars:{"*":"\u2217",'"':"\u2033","\u00B0":"\u2218","\u00B2":"2","\u00B3":"3","\u00B4":"\u2032","\u00B9":"1"},SVGremap:function(l,k){l=l.replace(/-/g,"\u2212");if(k){l=l.replace(/'/g,"\u2032").replace(/`/g,"\u2035");if(l.length===1){l=k[l]||l}}return l},SVGcanStretch:function(o){if(!this.Get("stretchy")){return false}var p=this.data.join("");if(p.length>1){return false}var l=this.CoreParent();if(l&&l.isa(g.munderover)&&this.CoreText(l.data[l.base]).length===1){var n=l.data[l.over],k=l.data[l.under];if(n&&this===n.CoreMO()&&l.Get("accent")){p=a.FONTDATA.REMAPACCENT[p]||p}else{if(k&&this===k.CoreMO()&&l.Get("accentunder")){p=a.FONTDATA.REMAPACCENTUNDER[p]||p}}}p=a.FONTDATA.DELIMITERS[p.charCodeAt(0)];var m=(p&&p.dir==o.substr(0,1));if(!m){delete this.svg}return m},SVGstretchV:function(p,q){var m=this.svg||this.toSVG();var l=this.getValues("symmetric","maxsize","minsize");var o=a.TeX.axis_height,k=this.SVGgetMu(m),n;if(l.symmetric){n=2*Math.max(p-o,q+o)}else{n=p+q}l.maxsize=a.length2em(l.maxsize,k,m.h+m.d);l.minsize=a.length2em(l.minsize,k,m.h+m.d);n=Math.max(l.minsize,Math.min(l.maxsize,n));m=a.createDelimiter(this.data.join("").charCodeAt(0),n,m.scale);if(l.symmetric){n=(m.h+m.d)/2+o}else{n=(m.h+m.d)*p/(p+q)}m.y=n-m.h;this.SVGhandleSpace(m);this.SVGhandleColor(m);delete this.svg;this.SVGsaveData(m);return m},SVGstretchH:function(l){var n=this.svg||this.toSVG(),k=this.SVGgetMu(n);var m=this.getValues("maxsize","minsize","mathvariant","fontweight");if((m.fontweight==="bold"||parseInt(m.fontweight)>=600)&&!this.Get("mathvariant",true)){m.mathvariant=g.VARIANT.BOLD}m.maxsize=a.length2em(m.maxsize,k,n.w);m.minsize=a.length2em(m.minsize,k,n.w);l=Math.max(m.minsize,Math.min(m.maxsize,l));n=a.createDelimiter(this.data.join("").charCodeAt(0),l,n.scale,m.mathvariant);this.SVGhandleSpace(n);this.SVGhandleColor(n);delete this.svg;this.SVGsaveData(n);return n}});g.mtext.Augment({toSVG:function(){this.SVGgetStyles();var k,m,l=this.SVGgetScale();if(this.Parent().type==="merror"){k=this.SVG();this.SVGhandleSpace(k);m=i.G();m.Add(i.TEXT(0.9*l,this.data.join(""),{fill:"#C00"}));k.Add(i.RECT(m.h+100,m.d+100,m.w+200,{fill:"#FF8",stroke:"#C00","stroke-width":50}),0,0);k.Add(m,150,0);k.H+=150;k.D+=50;k.Clean();this.SVGsaveData(k);return k}else{if(a.config.mtextFontInherit){k=this.SVG();this.SVGhandleSpace(k);k.Add(i.TEXT(l,this.data.join("")));k.Clean();this.SVGhandleColor(k);this.SVGsaveData(k);return k}else{return this.SUPER(arguments).toSVG.call(this)}}}});g.ms.Augment({toSVG:g.mbase.SVGautoload});g.mglyph.Augment({toSVG:g.mbase.SVGautoload});g.mspace.Augment({toSVG:function(){this.SVGgetStyles();var m=this.getValues("height","depth","width");m.mathbackground=this.mathbackground;if(this.background&&!this.mathbackground){m.mathbackground=this.background}var l=this.SVG(),k=this.SVGgetMu(l);l.h=a.length2em(m.height,k)/l.scale;l.d=a.length2em(m.depth,k)/l.scale;l.w=l.r=a.length2em(m.width,k)/l.scale;if(l.w<0){l.x=l.w;l.w=l.r=0}if(l.h<-l.d){l.d=-l.h}l.l=0;l.Clean();this.SVGhandleColor(l);this.SVGsaveData(l);return l}});g.mphantom.Augment({toSVG:function(k,m){this.SVGgetStyles();var l=this.SVG();if(this.data[0]!=null){this.SVGhandleSpace(l);l.Add(this.SVGdataStretched(0,k,m));l.Clean();while(l.element.firstChild){l.element.removeChild(l.element.firstChild)}}this.SVGhandleColor(l);this.SVGsaveData(l);if(l.removeable&&!l.element.firstChild){delete l.element}return l}});g.mpadded.Augment({toSVG:function(l,k){this.SVGgetStyles();var o=this.SVG();if(this.data[0]!=null){this.SVGhandleSpace(o);var m=this.SVGdataStretched(0,l,k),u=this.SVGgetMu(o);var t=this.getValues("height","depth","width","lspace","voffset"),r=0,q=0;if(t.lspace){r=this.SVGlength2em(m,t.lspace,u)}if(t.voffset){q=this.SVGlength2em(m,t.voffset,u)}var n=m.h,p=m.d,s=m.w;o.Add(m,r,q);o.Clean();o.h=n;o.d=p;o.w=s;o.removeable=false;if(t.height!==""){o.h=this.SVGlength2em(o,t.height,u,"h",0)}if(t.depth!==""){o.d=this.SVGlength2em(o,t.depth,u,"d",0)}if(t.width!==""){o.w=this.SVGlength2em(o,t.width,u,"w",0)}if(o.h>o.H){o.H=o.h}if(o.d>o.D){o.D=o.d}}this.SVGhandleColor(o);this.SVGsaveData(o);return o},SVGlength2em:function(o,r,l,s,k){if(k==null){k=-a.BIGDIMEN}var p=String(r).match(/width|height|depth/);var q=(p?o[p[0].charAt(0)]:(s?o[s]:0));var n=a.length2em(r,l,q);if(s&&String(r).match(/^\s*[-+]/)){return Math.max(k,o[s]+n)}else{return n}}});g.mrow.Augment({SVG:i.ROW,toSVG:function(){this.SVGgetStyles();var l=this.SVG();this.SVGhandleSpace(l);for(var n=0,k=this.data.length;n<k;n++){if(this.data[n]){l.Check(this.data[n])}}l.Stretch();l.Clean();if(this.SVGlineBreaks(l)){l=this.SVGmultiline(l)}this.SVGhandleColor(l);this.SVGsaveData(l);return l},SVGlineBreaks:function(k){if(!this.parent.linebreakContainer){return false}return(a.config.linebreaks.automatic&&k.w>a.linebreakWidth)||this.hasNewline()},SVGmultiline:function(k){g.mbase.SVGautoloadFile("multiline")},SVGstretchH:function(k){var l=this.data[this.core].SVGstretchH(k);this.SVGhandleColor(l);this.SVGsaveData(l);return l},SVGstretchV:function(l,m){var k=this.data[this.core].SVGstretchV(l,m);this.SVGhandleColor(k);this.SVGsaveData(k);return k}});g.mstyle.Augment({toSVG:function(){this.SVGgetStyles();var k=this.SVG();if(this.data[0]!=null){this.SVGhandleSpace(k);var l=k.Add(this.data[0].toSVG());k.Clean();if(l.ic){k.ic=l.ic}this.SVGhandleColor(k)}this.SVGsaveData(k);return k},SVGstretchH:function(k){return(this.data[0]!=null?this.data[0].SVGstretchH(k):i.NULL())},SVGstretchV:function(k,l){return(this.data[0]!=null?this.data[0].SVGstretchV(k,l):i.NULL())}});g.mfrac.Augment({toSVG:function(){this.SVGgetStyles();var w=this.SVG();this.SVGhandleSpace(w);var s=this.data[0].toSVG(),y=this.data[1].toSVG();var C=this.getValues("displaystyle","linethickness","numalign","denomalign","bevelled");var r=w.scale=this.SVGgetScale(),n=C.displaystyle;var x=a.TeX.axis_height*r;if(C.bevelled){var B=(n?400:150);var A=Math.max(s.h+s.d,y.h+y.d)+2*B;var F=a.createDelimiter(47,A);w.Add(s,0,(s.d-s.h)/2+x+B);w.Add(F,s.w-B/2,(F.d-F.h)/2+x);w.Add(y,s.w+F.w-B,(y.d-y.h)/2+x-B)}else{var o=Math.max(s.w,y.w);var E=a.thickness2em(C.linethickness,r),m,l,D,z;var k=a.TeX.min_rule_thickness/a.em*1000;if(n){D=a.TeX.num1;z=a.TeX.denom1}else{D=(E===0?a.TeX.num3:a.TeX.num2);z=a.TeX.denom2}D*=r;z*=r;if(E===0){m=Math.max((n?7:3)*a.TeX.rule_thickness,2*k);l=(D-s.d)-(y.h-z);if(l<m){D+=(m-l)/2;z+=(m-l)/2}w.w=o;E=0}else{m=Math.max((n?2:0)*k+E,E/2+1.5*k);l=(D-s.d)-(x+E/2);if(l<m){D+=m-l}l=(x-E/2)-(y.h-z);if(l<m){z+=m-l}w.Add(i.RECT(E/2,E/2,o+2*E),0,x)}w.Align(s,C.numalign,E,D);w.Align(y,C.denomalign,E,-z)}w.Clean();this.SVGhandleColor(w);this.SVGsaveData(w);return w},SVGcanStretch:function(k){return false},SVGhandleSpace:function(k){if(!this.texWithDelims){k.x=(this.useMMLspacing?0:a.length2em(this.texSpacing()||0))+120;k.X=120}}});g.msqrt.Augment({toSVG:function(){this.SVGgetStyles();var r=this.SVG();this.SVGhandleSpace(r);var m=this.data[0].toSVG(),s,o;var n=this.SVGgetScale();var w=a.TeX.rule_thickness*n,l,k,v,u=0;if(this.Get("displaystyle")){l=a.TeX.x_height*n}else{l=w}k=Math.max(w+l/4,1000*a.TeX.min_root_space/a.em);v=m.h+m.d+k+w;o=a.createDelimiter(8730,v,n);if(o.h+o.d>v){k=((o.h+o.d)-(v-w))/2}s=i.RECT(w,0,m.w);v=m.h+k+w;u=this.SVGaddRoot(r,o,u,o.h+o.d-v,n);r.Add(o,u,v-o.h);r.Add(s,u+o.w,v-s.h);r.Add(m,u+o.w,0);r.Clean();r.h+=w;r.H+=w;this.SVGhandleColor(r);this.SVGsaveData(r);return r},SVGaddRoot:function(l,m,k,o,n){return k}});g.mroot.Augment({toSVG:g.msqrt.prototype.toSVG,SVGaddRoot:function(n,l,q,o,k){var s=(l.isMultiChar?0.55:0.65)*l.w;if(this.data[1]){var p=this.data[1].toSVG();p.x=0;var m=this.SVGrootHeight(l.h+l.d,k,p)-o;var r=Math.min(p.w,p.r);q=Math.max(r,s);n.Add(p,q-r,m)}else{s=q}return q-s},SVGrootHeight:function(m,l,k){return 0.45*(m-900*l)+600*l+Math.max(0,k.d-75)}});g.mfenced.Augment({SVG:i.ROW,toSVG:function(){this.SVGgetStyles();var l=this.SVG();this.SVGhandleSpace(l);if(this.data.open){l.Check(this.data.open)}if(this.data[0]!=null){l.Check(this.data[0])}for(var n=1,k=this.data.length;n<k;n++){if(this.data[n]){if(this.data["sep"+n]){l.Check(this.data["sep"+n])}l.Check(this.data[n])}}if(this.data.close){l.Check(this.data.close)}l.Stretch();l.Clean();this.SVGhandleColor(l);this.SVGsaveData(l);return l}});g.menclose.Augment({toSVG:g.mbase.SVGautoload});g.maction.Augment({toSVG:g.mbase.SVGautoload});g.semantics.Augment({toSVG:function(){this.SVGgetStyles();var k=this.SVG();if(this.data[0]!=null){this.SVGhandleSpace(k);k.Add(this.data[0].toSVG());k.Clean()}else{k.Clean()}this.SVGsaveData(k);return k},SVGstretchH:function(k){return(this.data[0]!=null?this.data[0].SVGstretchH(k):i.NULL())},SVGstretchV:function(k,l){return(this.data[0]!=null?this.data[0].SVGstretchV(k,l):i.NULL())}});g.munderover.Augment({toSVG:function(F,C){this.SVGgetStyles();var l=this.getValues("displaystyle","accent","accentunder","align");if(!l.displaystyle&&this.data[this.base]!=null&&this.data[this.base].CoreMO().Get("movablelimits")){return g.msubsup.prototype.toSVG.call(this)}var E=this.SVG();this.SVGhandleSpace(E);var M=E.scale=this.SVGgetScale();var p=[],K=[],u,J,G,n=-a.BIGDIMEN,I=n;for(J=0,G=this.data.length;J<G;J++){if(this.data[J]!=null){if(J==this.base){p[J]=this.SVGdataStretched(J,F,C);K[J]=(C!=null||F==null)&&this.data[J].SVGcanStretch("Horizontal")}else{p[J]=this.data[J].toSVG();K[J]=this.data[J].SVGcanStretch("Horizontal")}if(p[J].w>I){I=p[J].w}if(!K[J]&&I>n){n=I}}}if(C==null&&F!=null){n=F}else{if(n==-a.BIGDIMEN){n=I}}for(J=I=0,G=this.data.length;J<G;J++){if(this.data[J]){if(K[J]){p[J]=this.data[J].SVGstretchH(n)}if(p[J].w>I){I=p[J].w}}}var B=a.TeX.rule_thickness;var o=p[this.base]||{w:0,h:0,d:0,H:0,D:0,l:0,r:0,scale:M};var s,q,w,v,r,A,H,L=0;if(o.ic){L=1.3*o.ic+0.05}for(J=0,G=this.data.length;J<G;J++){if(this.data[J]!=null){u=p[J];r=a.TeX.big_op_spacing5*M;var z=(J!=this.base&&l[this.ACCENTS[J]]);if(z&&u.w<=1){u.x=-u.l;p[J]=i.G().With({removeable:false});p[J].Add(u);p[J].Clean();p[J].w=-u.l;u=p[J]}A={left:0,center:(I-u.w)/2,right:I-u.w}[l.align];s=A;q=0;if(J==this.over){if(z){H=B*M;r=0;if(o.skew){s+=o.skew}}else{w=a.TeX.big_op_spacing1*M;v=a.TeX.big_op_spacing3*M;H=Math.max(w,v-Math.max(0,u.d))}H=Math.max(H,1500/a.em);s+=L/2;q=o.h+u.d+H;u.h+=r;if(u.h>u.H){u.H=u.h}}else{if(J==this.under){if(z){H=3*B*M;r=0}else{w=a.TeX.big_op_spacing2*M;v=a.TeX.big_op_spacing4*M;H=Math.max(w,v-u.h)}H=Math.max(H,1500/a.em);s-=L/2;q=-(o.d+u.h+H);u.d+=r;if(u.d>u.D){u.D=u.d}}}E.Add(u,s,q)}}E.Clean();this.SVGhandleColor(E);this.SVGsaveData(E);return E}});g.msubsup.Augment({toSVG:function(G,z){this.SVGgetStyles();var B=this.SVG();this.SVGhandleSpace(B);var K=B.scale=this.SVGgetScale(),E=this.SVGgetMu(B);var m=B.Add(this.SVGdataStretched(this.base,G,z));var l=(this.data[this.sup]||this.data[this.sub]||this).SVGgetScale();var I=a.TeX.x_height*K,y=a.TeX.scriptspace*K;var k,n;if(this.SVGnotEmpty(this.data[this.sup])){k=this.data[this.sup].toSVG();k.w+=y;k.r=Math.max(k.w,k.r)}if(this.SVGnotEmpty(this.data[this.sub])){n=this.data[this.sub].toSVG();n.w+=y;n.r=Math.max(n.w,n.r)}var C=a.TeX.sup_drop*l,A=a.TeX.sub_drop*l;var w=m.h-C,o=m.d+A,J=0,F;if(m.ic){m.w-=m.ic;J=1.3*m.ic+0.05}if(this.data[this.base]&&(this.data[this.base].type==="mi"||this.data[this.base].type==="mo")){if(this.data[this.base].data.join("").length===1&&m.scale===1&&!m.stretched&&!this.data[this.base].Get("largeop")){w=o=0}}var H=this.getValues("subscriptshift","superscriptshift");H.subscriptshift=(H.subscriptshift===""?0:a.length2em(H.subscriptshift,E));H.superscriptshift=(H.superscriptshift===""?0:a.length2em(H.superscriptshift,E));if(!k){if(n){o=Math.max(o,a.TeX.sub1*K,n.h-(4/5)*I,H.subscriptshift);B.Add(n,m.w,-o)}}else{if(!n){values=this.getValues("displaystyle","texprimestyle");F=a.TeX[(values.displaystyle?"sup1":(values.texprimestyle?"sup3":"sup2"))];w=Math.max(w,F*K,k.d+(1/4)*I,H.superscriptshift);B.Add(k,m.w+J,w)}else{o=Math.max(o,a.TeX.sub2*K);var x=a.TeX.rule_thickness*K;if((w-k.d)-(n.h-o)<3*x){o=3*x-w+k.d+n.h;C=(4/5)*I-(w-k.d);if(C>0){w+=C;o-=C}}B.Add(k,m.w+J,Math.max(w,H.superscriptshift));B.Add(n,m.w,-Math.max(o,H.subscriptshift))}}B.Clean();this.SVGhandleColor(B);this.SVGsaveData(B);return B}});g.mmultiscripts.Augment({toSVG:g.mbase.SVGautoload});g.mtable.Augment({toSVG:g.mbase.SVGautoload});g["annotation-xml"].Augment({toSVG:g.mbase.SVGautoload});g.math.Augment({SVG:i.Subclass({type:"svg",removeable:false}),toSVG:function(t,m){if(this.data[0]){this.SVGgetStyles();g.mbase.prototype.displayAlign=c.config.displayAlign;g.mbase.prototype.displayIndent=c.config.displayIndent;var q=i.G({stroke:"black",fill:"black","stroke-thickness":0,transform:"matrix(1 0 0 -1 0 0)"}).With({removeable:false});q.Add(this.data[0].toSVG(),0,0,true);q.Clean();this.SVGhandleColor(q);var s=this.SVG();s.element.setAttribute("xmlns:xlink",j);s.Add(q);s.Clean();this.SVGsaveData(s);var p=Math.max(-s.l,0),k=Math.max(s.r-s.w,0);var n=s.element.style;n.width=a.Ex(p+s.w+k);n.height=a.Ex(s.H+s.D);n.verticalAlign=a.Ex(-s.D-2*a.em);n.marginLeft=a.Ex(-p);n.marginRight=a.Ex(-k);s.element.setAttribute("viewBox",(-p)+" "+(-s.H)+" "+(p+s.w+k)+" "+(s.H+s.D));s.element.style.margin="1px 0px";if(s.H>s.h||s.D>s.d){var o=e.Element("span",{style:{display:"inline-block","white-space":"nowrap",padding:"1px 0px"},isMathJax:true},[["span",{style:{display:"inline-block",position:"relative",isMathJax:true,width:a.Ex(s.w),height:a.Ex(s.h+s.d),"vertical-align":a.Ex(-s.d)}}]]);o.firstChild.appendChild(s.element);s.element=o;n.verticalAlign="";n.position="absolute";n.bottom=a.Ex(s.d-s.D);n.left=0}t.appendChild(s.element);s.element=null;if(!this.isMultiline&&this.Get("display")==="block"){var u=this.getValues("indentalignfirst","indentshiftfirst","indentalign","indentshift");if(u.indentalignfirst!==g.INDENTALIGN.INDENTALIGN){u.indentalign=u.indentalignfirst}if(u.indentalign===g.INDENTALIGN.AUTO){u.indentalign=this.displayAlign}m.style.textAlign=u.indentalign;if(u.indentshiftfirst!==g.INDENTSHIFT.INDENTSHIFT){u.indentshift=u.indentshiftfirst}if(u.indentshift==="auto"){u.indentshift=this.displayIndent}if(u.indentshift&&u.indentalign!==g.INDENTALIGN.CENTER&&!s.hasIndent){t.style[{left:"marginLeft",right:"marginRight"}[u.indentalign]]=a.Ex(a.length2em(u.indentshift))}}}return t}});g.TeXAtom.Augment({toSVG:function(){this.SVGgetStyles();var k=this.SVG();this.SVGhandleSpace(k);if(this.data[0]!=null){var l=this.data[0].toSVG(),m=0;if(this.texClass===g.TEXCLASS.VCENTER){m=a.TeX.axis_height-(l.h+l.d)/2+l.d}k.Add(l,0,m);k.ic=l.ic}this.SVGhandleColor(k);this.SVGsaveData(k);return k}});c.Register.StartupHook("onLoad",function(){setTimeout(MathJax.Callback(["loadComplete",a,"jax.js"]),0)})});c.Register.StartupHook("End Cookie",function(){if(c.config.menuSettings.zoom!=="None"){h.Require("[MathJax]/extensions/MathZoom.js")}});if(!document.createElementNS){if(!document.namespaces.svg){document.namespaces.add("svg",b)}a.Augment({Element:function(k,l){var m=(typeof(k)==="string"?document.createElement("svg:"+k):k);m.isMathJax=true;if(l){for(var n in l){if(l.hasOwnProperty(n)){m.setAttribute(n,l[n].toString())}}}return m}})}})(MathJax.Ajax,MathJax.Hub,MathJax.HTML,MathJax.OutputJax.SVG); diff --git a/unpacked/jax/output/SVG/config.js b/unpacked/jax/output/SVG/config.js index 01882c6c9..143749ce6 100644 --- a/unpacked/jax/output/SVG/config.js +++ b/unpacked/jax/output/SVG/config.js @@ -24,7 +24,7 @@ MathJax.OutputJax.SVG = MathJax.OutputJax({ id: "SVG", - version: "2.0.3", + version: "2.0.4", directory: MathJax.OutputJax.directory + "/SVG", extensionDir: MathJax.OutputJax.extensionDir + "/SVG", autoloadDir: MathJax.OutputJax.directory + "/SVG/autoload", diff --git a/unpacked/jax/output/SVG/jax.js b/unpacked/jax/output/SVG/jax.js index 50d3d9317..5bb17fd77 100644 --- a/unpacked/jax/output/SVG/jax.js +++ b/unpacked/jax/output/SVG/jax.js @@ -179,7 +179,7 @@ jax = script.MathJax.elementJax; if (!jax) continue; jax.SVG = {display: (jax.root.Get("display") === "block")} span = div = HTML.Element("span",{ - style: {"font-size": this.scale+"%", display:"inline-block"}, + style: {"font-size": this.config.scale+"%", display:"inline-block"}, className:"MathJax_SVG", id:jax.inputID+"-Frame", isMathJax:true, jaxID:this.id, oncontextmenu:EVENT.Menu, onmousedown: EVENT.Mousedown, onmouseover:EVENT.Mouseover, onmouseout:EVENT.Mouseout, onmousemove:EVENT.Mousemove,