MathJax.Hub.Register.StartupHook("SVG Jax Ready",function(){var d="2.7.9",s=MathJax.ElementJax.mml,n=MathJax.OutputJax.SVG,p,o,i,r=n.config.tooltip=MathJax.Hub.Insert({delayPost:600,delayClear:600,offsetX:10,offsetY:5},n.config.tooltip||{});s.maction.Augment({SVGtooltip:MathJax.HTML.addElement(document.body,"div",{id:"MathJax_SVG_Tooltip"}),toSVG:function(e,t){this.SVGgetStyles();var a=this.SVG(),h=this.selected();return h.type=="null"?(this.SVGsaveData(a),a):(a.Add(this.SVGdataStretched(this.Get("selection")-1,e,t)),a.removeable=!1,this.SVGhandleHitBox(a),this.SVGhandleSpace(a),this.SVGhandleColor(a),this.SVGsaveData(a),a)},SVGhandleHitBox:function(e){var t=n.Element("rect",{width:e.w,height:e.h+e.d,y:-e.d,fill:"none","pointer-events":"all"});e.element.insertBefore(t,e.element.firstChild);var a=this.Get("actiontype");this.SVGaction[a]&&this.SVGaction[a].call(this,e,e.element,this.Get("selection"))},SVGstretchH:s.mbase.prototype.SVGstretchH,SVGstretchV:s.mbase.prototype.SVGstretchV,SVGaction:{toggle:function(e,t,a){this.selection=a,n.Element(t,{cursor:"pointer"}),t.onclick=MathJax.Callback(["SVGclick",this])},statusline:function(e,t,a){t.onmouseover=MathJax.Callback(["SVGsetStatus",this]),t.onmouseout=MathJax.Callback(["SVGclearStatus",this]),t.onmouseover.autoReset=t.onmouseout.autoReset=!0},tooltip:function(e,t,a){t.onmouseover=MathJax.Callback(["SVGtooltipOver",this]),t.onmouseout=MathJax.Callback(["SVGtooltipOut",this]),t.onmouseover.autoReset=t.onmouseout.autoReset=!0}},SVGclick:function(e){this.selection++,this.selection>this.data.length&&(this.selection=1);for(var t=this;t.type!=="math";)t=t.inherit;var a=MathJax.Hub.getJaxFor(t.inputID);return a.Update(),MathJax.Extension.MathEvents.Event.False(e)},SVGsetStatus:function(e){this.messageID=MathJax.Message.Set(this.data[1]&&this.data[1].isToken?this.data[1].data.join(""):this.data[1].toString())},SVGclearStatus:function(e){this.messageID&&MathJax.Message.Clear(this.messageID,0),delete this.messageID},SVGtooltipOver:function(e){e||(e=window.event),i&&(clearTimeout(i),i=null),o&&clearTimeout(o);var t=e.pageX,a=e.pageY;t==null&&(t=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,a=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);var h=MathJax.Callback(["SVGtooltipPost",this,t+r.offsetX,a+r.offsetY]);o=setTimeout(h,r.delayPost)},SVGtooltipOut:function(e){o&&(clearTimeout(o),o=null),i&&clearTimeout(i);var t=MathJax.Callback(["SVGtooltipClear",this,80]);i=setTimeout(t,r.delayClear)},SVGtooltipPost:function(e,t){o=null,i&&(clearTimeout(i),i=null);var a=this.SVGtooltip;if(a.style.display="block",a.style.opacity="",this!==p){a.style.left=e+"px",a.style.top=t+"px",a.innerHTML="";for(var h=MathJax.HTML.addElement(a,"span"),l=this;l.type!=="math";)l=l.inherit;var c=MathJax.Hub.getJaxFor(l.inputID);this.em=s.mbase.prototype.em=c.SVG.em,this.ex=c.SVG.ex,this.linebreakWidth=c.SVG.lineWidth,this.cwidth=c.SVG.cwidth;var u=this.data[1];l=s.math(u);try{l.toSVG(h,a)}catch(S){if(this.SetData(1,u),a.style.display="none",!S.restart)throw S;MathJax.Callback.After(["SVGtooltipPost",this,e,t],S.restart);return}this.SetData(1,u),p=this}},SVGtooltipClear:function(e){var t=this.SVGtooltip;e<=0?(t.style.display="none",t.style.opacity="",i=null):(t.style.opacity=e/100,i=setTimeout(MathJax.Callback(["SVGtooltipClear",this,e-20]),50))}}),MathJax.Hub.Startup.signal.Post("SVG maction Ready"),MathJax.Ajax.loadComplete(n.autoloadDir+"/maction.js")});
