=1&&(f.type==="mn"||XHe(f))){var b=m.children[0];b instanceof Fi&&b.type==="mn"&&(b.children=[...f.children,...b.children],h.pop())}else if(f.type==="mi"&&f.children.length===1){var v=f.children[0];if(v instanceof hp&&v.text==="\u0338"&&(m.type==="mo"||m.type==="mi"||m.type==="mn")){var T=m.children[0];T instanceof hp&&T.text.length>0&&(T.text=T.text.slice(0,1)+"\u0338"+T.text.slice(1),h.pop())}}}h.push(m),f=m}return h},"buildExpression"),hL=i(function(t,a,o){return Mqe(Ow(t,a,o))},"buildExpressionRow"),$h=i(function(t,a){if(!t)return new Fi("mrow");if(Hye[t.type])return Hye[t.type](t,a);throw new Ui("Got group of unknown type: '"+t.type+"'")},"buildGroup");i(zsr,"buildMathML");T6n=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Usr=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Vsr=i(function(t,a){return a.size<2?t:T6n[t-1][a.size-1]},"sizeAtStyle"),Yye=class r{static{i(this,"Options")}constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||r.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=Usr[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var a={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(a,t),new r(a)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:Vsr(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:Usr[t-1]})}havingBaseStyle(t){t=t||this.style.text();var a=Vsr(r.BASESIZE,t);return this.size===a&&this.textSize===r.BASESIZE&&this.style===t?this:this.extend({style:t,size:a})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==r.BASESIZE?["sizing","reset-size"+this.size,"size"+r.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=a6n(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};Yye.BASESIZE=6;Aor=i(function(t){return new Yye({style:t.displayMode?Wo.DISPLAY:Wo.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},"optionsFromSettings"),Ror=i(function(t,a){if(a.displayMode){var o=["katex-display"];a.leqno&&o.push("leqno"),a.fleqn&&o.push("fleqn"),t=Di(o,[t])}return t},"displayWrap"),k6n=i(function(t,a,o){var l=Aor(o),h;if(o.output==="mathml")return zsr(t,a,l,o.displayMode,!0);if(o.output==="html"){var f=vqe(t,l);h=Di(["katex"],[f])}else{var p=zsr(t,a,l,o.displayMode,!1),m=vqe(t,l);h=Di(["katex"],[p,m])}return Ror(h,o)},"buildTree"),C6n=i(function(t,a,o){var l=Aor(o),h=vqe(t,l),f=Di(["katex"],[h]);return Ror(f,o)},"buildHTMLTree"),E6n={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",underbracket:"\u23B5",overbracket:"\u23B4",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},Zye=i(function(t){var a=new Fi("mo",[new hp(E6n[t.replace(/^\\/,"")])]);return a.setAttribute("stretchy","true"),a},"stretchyMathML"),S6n={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},A6n=new Set(["widehat","widecheck","widetilde","utilde"]),ebe=i(function(t,a){function o(){var p=4e5,m=t.label.slice(1);if(A6n.has(m)&&"base"in t){var b=t.base.type==="ordgroup"?t.base.body.length:1,v,T,C;if(b>5)m==="widehat"||m==="widecheck"?(v=420,p=2364,C=.42,T=m+"4"):(v=312,p=2340,C=.34,T="tilde4");else{var E=[1,1,2,2,3,3][b];m==="widehat"||m==="widecheck"?(p=[0,1062,2364,2364,2364][E],v=[0,239,300,360,420][E],C=[0,.24,.3,.3,.36,.42][E],T=m+E):(p=[0,600,1033,2339,2340][E],v=[0,260,286,306,312][E],C=[0,.26,.286,.3,.306,.34][E],T="tilde"+E)}var S=new OE(T),R=new J3([S],{width:"100%",height:Ki(C),viewBox:"0 0 "+p+" "+v,preserveAspectRatio:"none"});return{span:uL([],[R],a),minWidth:0,height:C}}else{var L=[],_=S6n[m];if(!_)throw new Error('No SVG data for "'+m+'".');var[M,I,F]=_,O=F/1e3,P=M.length,G,V;if(P===1){if(_.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+m+'".');G=["hide-tail"],V=[_[3]]}else if(P===2)G=["halfarrow-left","halfarrow-right"],V=["xMinYMin","xMaxYMin"];else if(P===3)G=["brace-left","brace-center","brace-right"],V=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
+ `+P+" children.");for(var Y=0;Y0&&(l.style.minWidth=Ki(h)),l},"stretchySvg"),R6n=i(function(t,a,o,l,h){var f,p=t.height+t.depth+o+l;if(/fbox|color|angl/.test(a)){if(f=Di(["stretchy",a],[],h),a==="fbox"){var m=h.color&&h.getColor();m&&(f.style.borderColor=m)}}else{var b=[];/^[bx]cancel$/.test(a)&&b.push(new Tee({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(a)&&b.push(new Tee({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var v=new J3(b,{width:"100%",height:Ki(p)});f=uL([],[v],h)}return f.height=p,f.style.height=Ki(p),f},"stretchyEnclose"),L6n={bin:1,close:1,inner:1,open:1,punct:1,rel:1},D6n={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};i(_6n,"isAtom");i(vl,"assertNodeType");i(tbe,"assertSymbolNodeType");i(rbe,"checkSymbolNodeType");Lor=i(r=>{if(r instanceof yb)return r;if(i6n(r)&&r.children.length===1)return Lor(r.children[0])},"getBaseSymbol"),Nqe=i((r,t)=>{var a,o,l;r&&r.type==="supsub"?(o=vl(r.base,"accent"),a=o.base,r.base=a,l=n6n(wu(r,t)),r.base=o):(o=vl(r,"accent"),a=o.base);var h=wu(a,t.havingCrampedStyle()),f=o.isShifty&&H6(a),p=0;if(f){var m,b;p=(m=(b=Lor(h))==null?void 0:b.skew)!=null?m:0}var v=o.label==="\\c",T=v?h.height+h.depth:Math.min(h.height,t.fontMetrics().xHeight),C;if(o.isStretchy)C=ebe(o,t),C=vu({positionType:"firstBaseline",children:[{type:"elem",elem:h},{type:"elem",elem:C,wrapperClasses:["svg-align"],wrapperStyle:p>0?{width:"calc(100% - "+Ki(2*p)+")",marginLeft:Ki(2*p)}:void 0}]});else{var E,S;o.label==="\\vec"?(E=kor("vec",t),S=Tor.vec[1]):(E=Jye({type:"textord",mode:o.mode,text:o.label},t,"textord"),E=r6n(E),E.italic=0,S=E.width,v&&(T+=E.depth)),C=Di(["accent-body"],[E]);var R=o.label==="\\textcircled";R&&(C.classes.push("accent-full"),T=h.height);var L=p;R||(L-=S/2),C.style.left=Ki(L),o.label==="\\textcircled"&&(C.style.top=".2em"),C=vu({positionType:"firstBaseline",children:[{type:"elem",elem:h},{type:"kern",size:-T},{type:"elem",elem:C}]})}var _=Di(["mord","accent"],[C],t);return l?(l.children[0]=_,l.height=Math.max(_.height,l.height),l.classes[0]="mord",l):_},"htmlBuilder$a"),Dor=i((r,t)=>{var a=r.isStretchy?Zye(r.label):new Fi("mo",[GT(r.label,r.mode)]),o=new Fi("mover",[$h(r.base,t),a]);return o.setAttribute("accent","true"),o},"mathmlBuilder$9"),M6n=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(r=>"\\"+r).join("|"));Ca({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:i((r,t)=>{var a=qye(t[0]),o=!M6n.test(r.funcName),l=!o||r.funcName==="\\widehat"||r.funcName==="\\widetilde"||r.funcName==="\\widecheck";return{type:"accent",mode:r.parser.mode,label:r.funcName,isStretchy:o,isShifty:l,base:a}},"handler"),htmlBuilder:Nqe,mathmlBuilder:Dor});Ca({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:i((r,t)=>{var a=t[0],o=r.parser.mode;return o==="math"&&(r.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+r.funcName+" works only in text mode"),o="text"),{type:"accent",mode:o,label:r.funcName,isStretchy:!1,isShifty:!0,base:a}},"handler"),htmlBuilder:Nqe,mathmlBuilder:Dor});Ca({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:i((r,t)=>{var{parser:a,funcName:o}=r,l=t[0];return{type:"accentUnder",mode:a.mode,label:o,base:l}},"handler"),htmlBuilder:i((r,t)=>{var a=wu(r.base,t),o=ebe(r,t),l=r.label==="\\utilde"?.12:0,h=vu({positionType:"top",positionData:a.height,children:[{type:"elem",elem:o,wrapperClasses:["svg-align"]},{type:"kern",size:l},{type:"elem",elem:a}]});return Di(["mord","accentunder"],[h],t)},"htmlBuilder"),mathmlBuilder:i((r,t)=>{var a=Zye(r.label),o=new Fi("munder",[$h(r.base,t),a]);return o.setAttribute("accentunder","true"),o},"mathmlBuilder")});Pye=i(r=>{var t=new Fi("mpadded",r?[r]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t},"paddedNode");Ca({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(r,t,a){var{parser:o,funcName:l}=r;return{type:"xArrow",mode:o.mode,label:l,body:t[0],below:a[0]}},htmlBuilder(r,t){var a=t.style,o=t.havingStyle(a.sup()),l=qj(wu(r.body,o,t),t),h=r.label.slice(0,2)==="\\x"?"x":"cd";l.classes.push(h+"-arrow-pad");var f;r.below&&(o=t.havingStyle(a.sub()),f=qj(wu(r.below,o,t),t),f.classes.push(h+"-arrow-pad"));var p=ebe(r,t),m=-t.fontMetrics().axisHeight+.5*p.height,b=-t.fontMetrics().axisHeight-.5*p.height-.111;(l.depth>.25||r.label==="\\xleftequilibrium")&&(b-=l.depth);var v;if(f){var T=-t.fontMetrics().axisHeight+f.height+.5*p.height+.111;v=vu({positionType:"individualShift",children:[{type:"elem",elem:l,shift:b},{type:"elem",elem:p,shift:m,wrapperClasses:["svg-align"]},{type:"elem",elem:f,shift:T}]})}else v=vu({positionType:"individualShift",children:[{type:"elem",elem:l,shift:b},{type:"elem",elem:p,shift:m,wrapperClasses:["svg-align"]}]});return Di(["mrel","x-arrow"],[v],t)},mathmlBuilder(r,t){var a=Zye(r.label);a.setAttribute("minsize",r.label.charAt(0)==="x"?"1.75em":"3.0em");var o;if(r.body){var l=Pye($h(r.body,t));if(r.below){var h=Pye($h(r.below,t));o=new Fi("munderover",[a,h,l])}else o=new Fi("mover",[a,l])}else if(r.below){var f=Pye($h(r.below,t));o=new Fi("munder",[a,f])}else o=Pye(),o=new Fi("mover",[a,o]);return o}});i(_or,"htmlBuilder$9");i(Mor,"mathmlBuilder$8");Ca({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(r,t){var{parser:a,funcName:o}=r,l=t[0];return{type:"mclass",mode:a.mode,mclass:"m"+o.slice(5),body:Ag(l),isCharacterBox:H6(l)}},htmlBuilder:_or,mathmlBuilder:Mor});nbe=i(r=>{var t=r.type==="ordgroup"&&r.body.length?r.body[0]:r;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"},"binrelClass");Ca({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(r,t){var{parser:a}=r;return{type:"mclass",mode:a.mode,mclass:nbe(t[0]),body:Ag(t[1]),isCharacterBox:H6(t[1])}}});Ca({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(r,t){var{parser:a,funcName:o}=r,l=t[1],h=t[0],f;o!=="\\stackrel"?f=nbe(l):f="mrel";var p={type:"op",mode:l.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:o!=="\\stackrel",body:Ag(l)},m={type:"supsub",mode:h.mode,base:p,sup:o==="\\underset"?null:h,sub:o==="\\underset"?h:null};return{type:"mclass",mode:a.mode,mclass:f,body:[m],isCharacterBox:H6(m)}},htmlBuilder:_or,mathmlBuilder:Mor});Ca({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(r,t){var{parser:a}=r;return{type:"pmb",mode:a.mode,mclass:nbe(t[0]),body:Ag(t[0])}},htmlBuilder(r,t){var a=p0(r.body,t,!0),o=Di([r.mclass],a,t);return o.style.textShadow="0.02em 0.01em 0.04px",o},mathmlBuilder(r,t){var a=Ow(r.body,t),o=new Fi("mstyle",a);return o.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),o}});I6n={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Hsr=i(()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),"newCell"),qsr=i(r=>r.type==="textord"&&r.text==="@","isStartOfArrow"),N6n=i((r,t)=>(r.type==="mathord"||r.type==="atom")&&r.text===t,"isLabelEnd");i(O6n,"cdArrow");i(P6n,"parseCD");Ca({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(r,t){var{parser:a,funcName:o}=r;return{type:"cdlabel",mode:a.mode,side:o.slice(4),label:t[0]}},htmlBuilder(r,t){var a=t.havingStyle(t.style.sup()),o=qj(wu(r.label,a,t),t);return o.classes.push("cd-label-"+r.side),o.style.bottom=Ki(.8-o.depth),o.height=0,o.depth=0,o},mathmlBuilder(r,t){var a=new Fi("mrow",[$h(r.label,t)]);return a=new Fi("mpadded",[a]),a.setAttribute("width","0"),r.side==="left"&&a.setAttribute("lspace","-1width"),a.setAttribute("voffset","0.7em"),a=new Fi("mstyle",[a]),a.setAttribute("displaystyle","false"),a.setAttribute("scriptlevel","1"),a}});Ca({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(r,t){var{parser:a}=r;return{type:"cdlabelparent",mode:a.mode,fragment:t[0]}},htmlBuilder(r,t){var a=qj(wu(r.fragment,t),t);return a.classes.push("cd-vert-arrow"),a},mathmlBuilder(r,t){return new Fi("mrow",[$h(r.fragment,t)])}});Ca({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(r,t){for(var{parser:a}=r,o=vl(t[0],"ordgroup"),l=o.body,h="",f=0;f=1114111)throw new Ui("\\@char with invalid code point "+h);return m<=65535?b=String.fromCharCode(m):(m-=65536,b=String.fromCharCode((m>>10)+55296,(m&1023)+56320)),{type:"textord",mode:a.mode,text:b}}});Ior=i((r,t)=>{var a=p0(r.body,t.withColor(r.color),!1);return W6(a)},"htmlBuilder$8"),Nor=i((r,t)=>{var a=Ow(r.body,t.withColor(r.color)),o=new Fi("mstyle",a);return o.setAttribute("mathcolor",r.color),o},"mathmlBuilder$7");Ca({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(r,t){var{parser:a}=r,o=vl(t[0],"color-token").color,l=t[1];return{type:"color",mode:a.mode,color:o,body:Ag(l)}},htmlBuilder:Ior,mathmlBuilder:Nor});Ca({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(r,t){var{parser:a,breakOnTokenText:o}=r,l=vl(t[0],"color-token").color;a.gullet.macros.set("\\current@color",l);var h=a.parseExpression(!0,o);return{type:"color",mode:a.mode,color:l,body:h}},htmlBuilder:Ior,mathmlBuilder:Nor});Ca({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(r,t,a){var{parser:o}=r,l=o.gullet.future().text==="["?o.parseSizeGroup(!0):null,h=!o.settings.displayMode||!o.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:o.mode,newLine:h,size:l&&vl(l,"size").value}},htmlBuilder(r,t){var a=Di(["mspace"],[],t);return r.newLine&&(a.classes.push("newline"),r.size&&(a.style.marginTop=Ki(_d(r.size,t)))),a},mathmlBuilder(r,t){var a=new Fi("mspace");return r.newLine&&(a.setAttribute("linebreak","newline"),r.size&&a.setAttribute("height",Ki(_d(r.size,t)))),a}});wqe={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Oor=i(r=>{var t=r.text;if(/^(?:[\\{}$^_]|EOF)$/.test(t))throw new Ui("Expected a control sequence",r);return t},"checkControlSequence"),B6n=i(r=>{var t=r.gullet.popToken();return t.text==="="&&(t=r.gullet.popToken(),t.text===" "&&(t=r.gullet.popToken())),t},"getRHS"),Por=i((r,t,a,o)=>{var l=r.gullet.macros.get(a.text);l==null&&(a.noexpand=!0,l={tokens:[a],numArgs:0,unexpandable:!r.gullet.isExpandable(a.text)}),r.gullet.macros.set(t,l,o)},"letCommand");Ca({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(r){var{parser:t,funcName:a}=r;t.consumeSpaces();var o=t.fetch();if(wqe[o.text])return(a==="\\global"||a==="\\\\globallong")&&(o.text=wqe[o.text]),vl(t.parseFunction(),"internal");throw new Ui("Invalid token after macro prefix",o)}});Ca({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:t,funcName:a}=r,o=t.gullet.popToken(),l=o.text;if(/^(?:[\\{}$^_]|EOF)$/.test(l))throw new Ui("Expected a control sequence",o);for(var h=0,f,p=[[]];t.gullet.future().text!=="{";)if(o=t.gullet.popToken(),o.text==="#"){if(t.gullet.future().text==="{"){f=t.gullet.future(),p[h].push("{");break}if(o=t.gullet.popToken(),!/^[1-9]$/.test(o.text))throw new Ui('Invalid argument number "'+o.text+'"');if(parseInt(o.text)!==h+1)throw new Ui('Argument number "'+o.text+'" out of order');h++,p.push([])}else{if(o.text==="EOF")throw new Ui("Expected a macro definition");p[h].push(o.text)}var{tokens:m}=t.gullet.consumeArg();return f&&m.unshift(f),(a==="\\edef"||a==="\\xdef")&&(m=t.gullet.expandTokens(m),m.reverse()),t.gullet.macros.set(l,{tokens:m,numArgs:h,delimiters:p},a===wqe[a]),{type:"internal",mode:t.mode}}});Ca({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:t,funcName:a}=r,o=Oor(t.gullet.popToken());t.gullet.consumeSpaces();var l=B6n(t);return Por(t,o,l,a==="\\\\globallet"),{type:"internal",mode:t.mode}}});Ca({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:t,funcName:a}=r,o=Oor(t.gullet.popToken()),l=t.gullet.popToken(),h=t.gullet.popToken();return Por(t,o,h,a==="\\\\globalfuture"),t.gullet.pushToken(h),t.gullet.pushToken(l),{type:"internal",mode:t.mode}}});bee=i(function(t,a,o){var l=Hf.math[t]&&Hf.math[t].replace,h=Lqe(l||t,a,o);if(!h)throw new Error("Unsupported symbol "+t+" and font size "+a+".");return h},"getMetrics"),Oqe=i(function(t,a,o,l){var h=o.havingBaseStyle(a),f=Di(l.concat(h.sizingClasses(o)),[t],o),p=h.sizeMultiplier/o.sizeMultiplier;return f.height*=p,f.depth*=p,f.maxFontSize=h.sizeMultiplier,f},"styleWrap"),Bor=i(function(t,a,o){var l=a.havingBaseStyle(o),h=(1-a.sizeMultiplier/l.sizeMultiplier)*a.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=Ki(h),t.height-=h,t.depth+=h},"centerSpan"),F6n=i(function(t,a,o,l,h,f){var p=gb(t,"Main-Regular",h,l),m=Oqe(p,a,l,f);return o&&Bor(m,l,a),m},"makeSmallDelim"),$6n=i(function(t,a,o,l){return gb(t,"Size"+a+"-Regular",o,l)},"mathrmSize"),For=i(function(t,a,o,l,h,f){var p=$6n(t,a,h,l),m=Oqe(Di(["delimsizing","size"+a],[p],l),Wo.TEXT,l,f);return o&&Bor(m,l,Wo.TEXT),m},"makeLargeDelim"),QHe=i(function(t,a,o){var l;a==="Size1-Regular"?l="delim-size1":l="delim-size4";var h=Di(["delimsizinginner",l],[Di([],[gb(t,a,o)])]);return{type:"elem",elem:h}},"makeGlyphSpan"),JHe=i(function(t,a,o){var l=NE["Size4-Regular"][t.charCodeAt(0)]?NE["Size4-Regular"][t.charCodeAt(0)][4]:NE["Size1-Regular"][t.charCodeAt(0)][4],h=new OE("inner",X5n(t,Math.round(1e3*a))),f=new J3([h],{width:Ki(l),height:Ki(a),style:"width:"+Ki(l),viewBox:"0 0 "+1e3*l+" "+Math.round(1e3*a),preserveAspectRatio:"xMinYMin"}),p=uL([],[f],o);return p.height=a,p.style.height=Ki(a),p.style.width=Ki(l),{type:"elem",elem:p}},"makeInner"),xqe=.008,Bye={type:"kern",size:-1*xqe},G6n=new Set(["|","\\lvert","\\rvert","\\vert"]),j6n=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),$or=i(function(t,a,o,l,h,f){var p,m,b,v,T="",C=0;p=b=v=t,m=null;var E="Size1-Regular";t==="\\uparrow"?b=v="\u23D0":t==="\\Uparrow"?b=v="\u2016":t==="\\downarrow"?p=b="\u23D0":t==="\\Downarrow"?p=b="\u2016":t==="\\updownarrow"?(p="\\uparrow",b="\u23D0",v="\\downarrow"):t==="\\Updownarrow"?(p="\\Uparrow",b="\u2016",v="\\Downarrow"):G6n.has(t)?(b="\u2223",T="vert",C=333):j6n.has(t)?(b="\u2225",T="doublevert",C=556):t==="["||t==="\\lbrack"?(p="\u23A1",b="\u23A2",v="\u23A3",E="Size4-Regular",T="lbrack",C=667):t==="]"||t==="\\rbrack"?(p="\u23A4",b="\u23A5",v="\u23A6",E="Size4-Regular",T="rbrack",C=667):t==="\\lfloor"||t==="\u230A"?(b=p="\u23A2",v="\u23A3",E="Size4-Regular",T="lfloor",C=667):t==="\\lceil"||t==="\u2308"?(p="\u23A1",b=v="\u23A2",E="Size4-Regular",T="lceil",C=667):t==="\\rfloor"||t==="\u230B"?(b=p="\u23A5",v="\u23A6",E="Size4-Regular",T="rfloor",C=667):t==="\\rceil"||t==="\u2309"?(p="\u23A4",b=v="\u23A5",E="Size4-Regular",T="rceil",C=667):t==="("||t==="\\lparen"?(p="\u239B",b="\u239C",v="\u239D",E="Size4-Regular",T="lparen",C=875):t===")"||t==="\\rparen"?(p="\u239E",b="\u239F",v="\u23A0",E="Size4-Regular",T="rparen",C=875):t==="\\{"||t==="\\lbrace"?(p="\u23A7",m="\u23A8",v="\u23A9",b="\u23AA",E="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(p="\u23AB",m="\u23AC",v="\u23AD",b="\u23AA",E="Size4-Regular"):t==="\\lgroup"||t==="\u27EE"?(p="\u23A7",v="\u23A9",b="\u23AA",E="Size4-Regular"):t==="\\rgroup"||t==="\u27EF"?(p="\u23AB",v="\u23AD",b="\u23AA",E="Size4-Regular"):t==="\\lmoustache"||t==="\u23B0"?(p="\u23A7",v="\u23AD",b="\u23AA",E="Size4-Regular"):(t==="\\rmoustache"||t==="\u23B1")&&(p="\u23AB",v="\u23A9",b="\u23AA",E="Size4-Regular");var S=bee(p,E,h),R=S.height+S.depth,L=bee(b,E,h),_=L.height+L.depth,M=bee(v,E,h),I=M.height+M.depth,F=0,O=1;if(m!==null){var P=bee(m,E,h);F=P.height+P.depth,O=2}var G=R+I+F,V=Math.max(0,Math.ceil((a-G)/(O*_))),Y=G+V*O*_,K=l.fontMetrics().axisHeight;o&&(K*=l.sizeMultiplier);var J=Y/2-K,H=[];if(T.length>0){var q=Y-R-I,Z=Math.round(Y*1e3),Q=Q5n(T,Math.round(q*1e3)),W=new OE(T,Q),te=Ki(C/1e3),z=Ki(Z/1e3),re=new J3([W],{width:te,height:z,viewBox:"0 0 "+C+" "+Z}),ae=uL([],[re],l);ae.height=Z/1e3,ae.style.width=te,ae.style.height=z,H.push({type:"elem",elem:ae})}else{if(H.push(QHe(v,E,h)),H.push(Bye),m===null){var le=Y-R-I+2*xqe;H.push(JHe(b,le,l))}else{var ce=(Y-R-I-F)/2+2*xqe;H.push(JHe(b,ce,l)),H.push(Bye),H.push(QHe(m,E,h)),H.push(Bye),H.push(JHe(b,ce,l))}H.push(Bye),H.push(QHe(p,E,h))}var de=l.havingBaseStyle(Wo.TEXT),be=vu({positionType:"bottom",positionData:J,children:H});return Oqe(Di(["delimsizing","mult"],[be],de),Wo.TEXT,l,f)},"makeStackedDelim"),ZHe=80,eqe=.08,tqe=i(function(t,a,o,l,h){var f=K5n(t,l,o),p=new OE(t,f),m=new J3([p],{width:"400em",height:Ki(a),viewBox:"0 0 400000 "+o,preserveAspectRatio:"xMinYMin slice"});return uL(["hide-tail"],[m],h)},"sqrtSvg"),z6n=i(function(t,a){var o=a.havingBaseSizing(),l=Vor("\\surd",t*o.sizeMultiplier,Uor,o),h=o.sizeMultiplier,f=Math.max(0,a.minRuleThickness-a.fontMetrics().sqrtRuleThickness),p,m,b,v,T;return l.type==="small"?(v=1e3+1e3*f+ZHe,t<1?h=1:t<1.4&&(h=.7),m=(1+f+eqe)/h,b=(1+f)/h,p=tqe("sqrtMain",m,v,f,a),p.style.minWidth="0.853em",T=.833/h):l.type==="large"?(v=(1e3+ZHe)*vee[l.size],b=(vee[l.size]+f)/h,m=(vee[l.size]+f+eqe)/h,p=tqe("sqrtSize"+l.size,m,v,f,a),p.style.minWidth="1.02em",T=1/h):(m=t+f+eqe,b=t+f,v=Math.floor(1e3*t+f)+ZHe,p=tqe("sqrtTall",m,v,f,a),p.style.minWidth="0.742em",T=1.056),p.height=b,p.style.height=Ki(m),{span:p,advanceWidth:T,ruleWidth:(a.fontMetrics().sqrtRuleThickness+f)*h}},"makeSqrtImage"),Gor=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"]),U6n=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"]),jor=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),vee=[0,1.2,1.8,2.4,3],zor=i(function(t,a,o,l,h){if(t==="<"||t==="\\lt"||t==="\u27E8"?t="\\langle":(t===">"||t==="\\gt"||t==="\u27E9")&&(t="\\rangle"),Gor.has(t)||jor.has(t))return For(t,a,!1,o,l,h);if(U6n.has(t))return $or(t,vee[a],!1,o,l,h);throw new Ui("Illegal delimiter: '"+t+"'")},"makeSizedDelim"),V6n=[{type:"small",style:Wo.SCRIPTSCRIPT},{type:"small",style:Wo.SCRIPT},{type:"small",style:Wo.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],H6n=[{type:"small",style:Wo.SCRIPTSCRIPT},{type:"small",style:Wo.SCRIPT},{type:"small",style:Wo.TEXT},{type:"stack"}],Uor=[{type:"small",style:Wo.SCRIPTSCRIPT},{type:"small",style:Wo.SCRIPT},{type:"small",style:Wo.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],q6n=i(function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";var a=t.type;throw new Error("Add support for delim type '"+a+"' here.")},"delimTypeToFont"),Vor=i(function(t,a,o,l){for(var h=Math.min(2,3-l.style.size),f=h;fa)return p}return o[o.length-1]},"traverseSequence"),Tqe=i(function(t,a,o,l,h,f){t==="<"||t==="\\lt"||t==="\u27E8"?t="\\langle":(t===">"||t==="\\gt"||t==="\u27E9")&&(t="\\rangle");var p;jor.has(t)?p=V6n:Gor.has(t)?p=Uor:p=H6n;var m=Vor(t,a,p,l);return m.type==="small"?F6n(t,m.style,o,l,h,f):m.type==="large"?For(t,m.size,o,l,h,f):$or(t,a,o,l,h,f)},"makeCustomSizedDelim"),rqe=i(function(t,a,o,l,h,f){var p=l.fontMetrics().axisHeight*l.sizeMultiplier,m=901,b=5/l.fontMetrics().ptPerEm,v=Math.max(a-p,o+p),T=Math.max(v/500*m,2*v-b);return Tqe(t,T,!0,l,h,f)},"makeLeftRightDelim"),Wsr={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},W6n=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);i(Ysr,"isMiddleDelimNode");i(ibe,"checkDelimiter");Ca({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:i((r,t)=>{var a=ibe(t[0],r);return{type:"delimsizing",mode:r.parser.mode,size:Wsr[r.funcName].size,mclass:Wsr[r.funcName].mclass,delim:a.text}},"handler"),htmlBuilder:i((r,t)=>r.delim==="."?Di([r.mclass]):zor(r.delim,r.size,t,r.mode,[r.mclass]),"htmlBuilder"),mathmlBuilder:i(r=>{var t=[];r.delim!=="."&&t.push(GT(r.delim,r.mode));var a=new Fi("mo",t);r.mclass==="mopen"||r.mclass==="mclose"?a.setAttribute("fence","true"):a.setAttribute("fence","false"),a.setAttribute("stretchy","true");var o=Ki(vee[r.size]);return a.setAttribute("minsize",o),a.setAttribute("maxsize",o),a},"mathmlBuilder")});i(Ksr,"assertParsed");Ca({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:i((r,t)=>{var a=r.parser.gullet.macros.get("\\current@color");if(a&&typeof a!="string")throw new Ui("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:r.parser.mode,delim:ibe(t[0],r).text,color:a}},"handler")});Ca({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:i((r,t)=>{var a=ibe(t[0],r),o=r.parser;++o.leftrightDepth;var l=o.parseExpression(!1);--o.leftrightDepth,o.expect("\\right",!1);var h=vl(o.parseFunction(),"leftright-right");return{type:"leftright",mode:o.mode,body:l,left:a.text,right:h.delim,rightColor:h.color}},"handler"),htmlBuilder:i((r,t)=>{Ksr(r);for(var a=p0(r.body,t,!0,["mopen","mclose"]),o=0,l=0,h=!1,f=0;f{Ksr(r);var a=Ow(r.body,t);if(r.left!=="."){var o=new Fi("mo",[GT(r.left,r.mode)]);o.setAttribute("fence","true"),a.unshift(o)}if(r.right!=="."){var l=new Fi("mo",[GT(r.right,r.mode)]);l.setAttribute("fence","true"),r.rightColor&&l.setAttribute("mathcolor",r.rightColor),a.push(l)}return Mqe(a)},"mathmlBuilder")});Ca({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:i((r,t)=>{var a=ibe(t[0],r);if(!r.parser.leftrightDepth)throw new Ui("\\middle without preceding \\left",a);return{type:"middle",mode:r.parser.mode,delim:a.text}},"handler"),htmlBuilder:i((r,t)=>{var a;return r.delim==="."?a=kee(t,[]):(a=zor(r.delim,1,t,r.mode,[]),a.isMiddle={delim:r.delim,options:t}),a},"htmlBuilder"),mathmlBuilder:i((r,t)=>{var a=r.delim==="\\vert"||r.delim==="|"?GT("|","text"):GT(r.delim,r.mode),o=new Fi("mo",[a]);return o.setAttribute("fence","true"),o.setAttribute("lspace","0.05em"),o.setAttribute("rspace","0.05em"),o},"mathmlBuilder")});abe=i((r,t)=>{var a=qj(wu(r.body,t),t),o=r.label.slice(1),l=t.sizeMultiplier,h,f,p=H6(r.body);if(o==="sout")h=Di(["stretchy","sout"]),h.height=t.fontMetrics().defaultRuleThickness/l,f=-.5*t.fontMetrics().xHeight;else if(o==="phase"){var m=_d({number:.6,unit:"pt"},t),b=_d({number:.35,unit:"ex"},t),v=t.havingBaseSizing();l=l/v.sizeMultiplier;var T=a.height+a.depth+m+b;a.style.paddingLeft=Ki(T/2+m);var C=Math.floor(1e3*T*l),E=W5n(C),S=new J3([new OE("phase",E)],{width:"400em",height:Ki(C/1e3),viewBox:"0 0 400000 "+C,preserveAspectRatio:"xMinYMin slice"});h=uL(["hide-tail"],[S],t),h.style.height=Ki(T),f=a.depth+m+b}else{/cancel/.test(o)?p||a.classes.push("cancel-pad"):o==="angl"?a.classes.push("anglpad"):a.classes.push("boxpad");var R,L,_=0;/box/.test(o)?(_=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),R=t.fontMetrics().fboxsep+(o==="colorbox"?0:_),L=R):o==="angl"?(_=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),R=4*_,L=Math.max(0,.25-a.depth)):(R=p?.2:0,L=R),h=R6n(a,o,R,L,t),/fbox|boxed|fcolorbox/.test(o)?(h.style.borderStyle="solid",h.style.borderWidth=Ki(_)):o==="angl"&&_!==.049&&(h.style.borderTopWidth=Ki(_),h.style.borderRightWidth=Ki(_)),f=a.depth+L,r.backgroundColor&&(h.style.backgroundColor=r.backgroundColor,r.borderColor&&(h.style.borderColor=r.borderColor))}var M;if(r.backgroundColor)M=vu({positionType:"individualShift",children:[{type:"elem",elem:h,shift:f},{type:"elem",elem:a,shift:0}]});else{var I=/cancel|phase/.test(o)?["svg-align"]:[];M=vu({positionType:"individualShift",children:[{type:"elem",elem:a,shift:0},{type:"elem",elem:h,shift:f,wrapperClasses:I}]})}return/cancel/.test(o)&&(M.height=a.height,M.depth=a.depth),/cancel/.test(o)&&!p?Di(["mord","cancel-lap"],[M],t):Di(["mord"],[M],t)},"htmlBuilder$7"),sbe=i((r,t)=>{var a,o=new Fi(r.label.includes("colorbox")?"mpadded":"menclose",[$h(r.body,t)]);switch(r.label){case"\\cancel":o.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":o.setAttribute("notation","downdiagonalstrike");break;case"\\phase":o.setAttribute("notation","phasorangle");break;case"\\sout":o.setAttribute("notation","horizontalstrike");break;case"\\fbox":o.setAttribute("notation","box");break;case"\\angl":o.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(a=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,o.setAttribute("width","+"+2*a+"pt"),o.setAttribute("height","+"+2*a+"pt"),o.setAttribute("lspace",a+"pt"),o.setAttribute("voffset",a+"pt"),r.label==="\\fcolorbox"){var l=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);o.setAttribute("style","border: "+Ki(l)+" solid "+r.borderColor)}break;case"\\xcancel":o.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return r.backgroundColor&&o.setAttribute("mathbackground",r.backgroundColor),o},"mathmlBuilder$6");Ca({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(r,t,a){var{parser:o,funcName:l}=r,h=vl(t[0],"color-token").color,f=t[1];return{type:"enclose",mode:o.mode,label:l,backgroundColor:h,body:f}},htmlBuilder:abe,mathmlBuilder:sbe});Ca({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(r,t,a){var{parser:o,funcName:l}=r,h=vl(t[0],"color-token").color,f=vl(t[1],"color-token").color,p=t[2];return{type:"enclose",mode:o.mode,label:l,backgroundColor:f,borderColor:h,body:p}},htmlBuilder:abe,mathmlBuilder:sbe});Ca({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(r,t){var{parser:a}=r;return{type:"enclose",mode:a.mode,label:"\\fbox",body:t[0]}}});Ca({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(r,t){var{parser:a,funcName:o}=r,l=t[0];return{type:"enclose",mode:a.mode,label:o,body:l}},htmlBuilder:abe,mathmlBuilder:sbe});Ca({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(r,t){var{parser:a,funcName:o}=r;a.mode==="math"&&a.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var l=t[0];return{type:"enclose",mode:a.mode,label:o,body:l}},htmlBuilder:abe,mathmlBuilder:sbe});Ca({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(r,t){var{parser:a}=r;return{type:"enclose",mode:a.mode,label:"\\angl",body:t[0]}}});Hor={};i(PE,"defineEnvironment");qor={};i(yt,"defineMacro");Wv=class r{static{i(this,"SourceLocation")}constructor(t,a,o){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=a,this.end=o}static range(t,a){return a?!t||!t.loc||!a.loc||t.loc.lexer!==a.loc.lexer?null:new r(t.loc.lexer,t.loc.start,a.loc.end):t&&t.loc}},Iw=class r{static{i(this,"Token")}constructor(t,a){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=a}range(t,a){return new r(a,Wv.range(this,t))}};i(Xsr,"getHLines");obe=i(r=>{var t=r.parser.settings;if(!t.displayMode)throw new Ui("{"+r.envName+"} can be used only in display mode.")},"validateAmsEnvironmentContext"),Y6n=new Set(["gather","gather*"]);i(Pqe,"getAutoTag");i(fL,"parseArray");i(Bqe,"dCellStyle");BE=i(function(t,a){var o,l,h=t.body.length,f=t.hLinesBeforeRow,p=0,m=new Array(h),b=[],v=Math.max(a.fontMetrics().arrayRuleWidth,a.minRuleThickness),T=1/a.fontMetrics().ptPerEm,C=5*T;if(t.colSeparationType&&t.colSeparationType==="small"){var E=a.havingStyle(Wo.SCRIPT).sizeMultiplier;C=.2778*(E/a.sizeMultiplier)}var S=t.colSeparationType==="CD"?_d({number:3,unit:"ex"},a):12*T,R=3*T,L=t.arraystretch*S,_=.7*L,M=.3*L,I=0;function F(se){for(var ke=0;ke0&&(I+=.25),b.push({pos:I,isDashed:se[ke]})}for(i(F,"setHLinePos"),F(f[0]),o=0;o0&&(J+=M,Gse))for(o=0;o=p)){var De=void 0;if(l>0||t.hskipBeforeAndAfter){var qe,Ue;De=(qe=(Ue=de)==null?void 0:Ue.pregap)!=null?qe:C,De!==0&&(Q=Di(["arraycolsep"],[]),Q.style.width=Ki(De),Z.push(Q))}var We=[];for(o=0;o0){for(var bt=Hj("hline",a,v),Me=Hj("hdashline",a,v),Fe=[{type:"elem",elem:ft,shift:0}];b.length>0;){var je=b.pop(),He=je.pos-H;je.isDashed?Fe.push({type:"elem",elem:Me,shift:He}):Fe.push({type:"elem",elem:bt,shift:He})}ft=vu({positionType:"individualShift",children:Fe})}if(te.length===0)return Di(["mord"],[ft],a);var nt=vu({positionType:"individualShift",children:te}),ze=Di(["tag"],[nt],a);return W6([ft,ze])},"htmlBuilder"),K6n={c:"center ",l:"left ",r:"right "},FE=i(function(t,a){for(var o=[],l=new Fi("mtd",[],["mtr-glue"]),h=new Fi("mtd",[],["mml-eqn-num"]),f=0;f0){var S=t.cols,R="",L=!1,_=0,M=S.length;S[0].type==="separator"&&(C+="top ",_=1),S[S.length-1].type==="separator"&&(C+="bottom ",M-=1);for(var I=_;I0?"left ":"",C+=Y[Y.length-1].length>0?"right ":"";for(var K=1;K0&&E&&(L=1),o[S]={type:"align",align:R,pregap:L,postgap:0}}return f.colSeparationType=E?"align":"alignat",f},"alignedHandler");PE({type:"array",names:["array","darray"],props:{numArgs:1},handler(r,t){var a=rbe(t[0]),o=a?[t[0]]:vl(t[0],"ordgroup").body,l=o.map(function(f){var p=tbe(f),m=p.text;if("lcr".includes(m))return{type:"align",align:m};if(m==="|")return{type:"separator",separator:"|"};if(m===":")return{type:"separator",separator:":"};throw new Ui("Unknown column alignment: "+m,f)}),h={cols:l,hskipBeforeAndAfter:!0,maxNumCols:l.length};return fL(r.parser,h,Bqe(r.envName))},htmlBuilder:BE,mathmlBuilder:FE});PE({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(r){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[r.envName.replace("*","")],a="c",o={hskipBeforeAndAfter:!1,cols:[{type:"align",align:a}]};if(r.envName.charAt(r.envName.length-1)==="*"){var l=r.parser;if(l.consumeSpaces(),l.fetch().text==="["){if(l.consume(),l.consumeSpaces(),a=l.fetch().text,!"lcr".includes(a))throw new Ui("Expected l or c or r",l.nextToken);l.consume(),l.consumeSpaces(),l.expect("]"),l.consume(),o.cols=[{type:"align",align:a}]}}var h=fL(r.parser,o,Bqe(r.envName)),f=Math.max(0,...h.body.map(p=>p.length));return h.cols=new Array(f).fill({type:"align",align:a}),t?{type:"leftright",mode:r.mode,body:[h],left:t[0],right:t[1],rightColor:void 0}:h},htmlBuilder:BE,mathmlBuilder:FE});PE({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(r){var t={arraystretch:.5},a=fL(r.parser,t,"script");return a.colSeparationType="small",a},htmlBuilder:BE,mathmlBuilder:FE});PE({type:"array",names:["subarray"],props:{numArgs:1},handler(r,t){var a=rbe(t[0]),o=a?[t[0]]:vl(t[0],"ordgroup").body,l=o.map(function(p){var m=tbe(p),b=m.text;if("lc".includes(b))return{type:"align",align:b};throw new Ui("Unknown column alignment: "+b,p)});if(l.length>1)throw new Ui("{subarray} can contain only one column");var h={cols:l,hskipBeforeAndAfter:!1,arraystretch:.5},f=fL(r.parser,h,"script");if(f.body.length>0&&f.body[0].length>1)throw new Ui("{subarray} can contain only one column");return f},htmlBuilder:BE,mathmlBuilder:FE});PE({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(r){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},a=fL(r.parser,t,Bqe(r.envName));return{type:"leftright",mode:r.mode,body:[a],left:r.envName.includes("r")?".":"\\{",right:r.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:BE,mathmlBuilder:FE});PE({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Wor,htmlBuilder:BE,mathmlBuilder:FE});PE({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(r){Y6n.has(r.envName)&&obe(r);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Pqe(r.envName),emptySingleRow:!0,leqno:r.parser.settings.leqno};return fL(r.parser,t,"display")},htmlBuilder:BE,mathmlBuilder:FE});PE({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Wor,htmlBuilder:BE,mathmlBuilder:FE});PE({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(r){obe(r);var t={autoTag:Pqe(r.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:r.parser.settings.leqno};return fL(r.parser,t,"display")},htmlBuilder:BE,mathmlBuilder:FE});PE({type:"array",names:["CD"],props:{numArgs:0},handler(r){return obe(r),P6n(r.parser)},htmlBuilder:BE,mathmlBuilder:FE});yt("\\nonumber","\\gdef\\@eqnsw{0}");yt("\\notag","\\nonumber");Ca({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(r,t){throw new Ui(r.funcName+" valid only within array environment")}});Qsr=Hor;Ca({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(r,t){var{parser:a,funcName:o}=r,l=t[0];if(l.type!=="ordgroup")throw new Ui("Invalid environment name",l);for(var h="",f=0;f{var a=r.font,o=t.withFont(a);return wu(r.body,o)},"htmlBuilder$5"),Kor=i((r,t)=>{var a=r.font,o=t.withFont(a);return $h(r.body,o)},"mathmlBuilder$4"),Jsr={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};Ca({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:i((r,t)=>{var{parser:a,funcName:o}=r,l=qye(t[0]),h=o;return h in Jsr&&(h=Jsr[h]),{type:"font",mode:a.mode,font:h.slice(1),body:l}},"handler"),htmlBuilder:Yor,mathmlBuilder:Kor});Ca({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:i((r,t)=>{var{parser:a}=r,o=t[0];return{type:"mclass",mode:a.mode,mclass:nbe(o),body:[{type:"font",mode:a.mode,font:"boldsymbol",body:o}],isCharacterBox:H6(o)}},"handler")});Ca({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:i((r,t)=>{var{parser:a,funcName:o,breakOnTokenText:l}=r,{mode:h}=a,f=a.parseExpression(!0,l);return{type:"font",mode:h,font:"math"+o.slice(1),body:{type:"ordgroup",mode:a.mode,body:f}}},"handler"),htmlBuilder:Yor,mathmlBuilder:Kor});X6n=i((r,t)=>{var a=t.style,o=a.fracNum(),l=a.fracDen(),h;h=t.havingStyle(o);var f=wu(r.numer,h,t);if(r.continued){var p=8.5/t.fontMetrics().ptPerEm,m=3.5/t.fontMetrics().ptPerEm;f.height=f.height0?S=3*C:S=7*C,R=t.fontMetrics().denom1):(T>0?(E=t.fontMetrics().num2,S=C):(E=t.fontMetrics().num3,S=3*C),R=t.fontMetrics().denom2);var L;if(v){var M=t.fontMetrics().axisHeight;E-f.depth-(M+.5*T){var a=new Fi("mfrac",[$h(r.numer,t),$h(r.denom,t)]);if(!r.hasBarLine)a.setAttribute("linethickness","0px");else if(r.barSize){var o=_d(r.barSize,t);a.setAttribute("linethickness",Ki(o))}if(r.leftDelim!=null||r.rightDelim!=null){var l=[];if(r.leftDelim!=null){var h=new Fi("mo",[new hp(r.leftDelim.replace("\\",""))]);h.setAttribute("fence","true"),l.push(h)}if(l.push(a),r.rightDelim!=null){var f=new Fi("mo",[new hp(r.rightDelim.replace("\\",""))]);f.setAttribute("fence","true"),l.push(f)}return Mqe(l)}return a},"mathmlBuilder$3"),Xor=i((r,t)=>{if(!t)return r;var a={type:"styling",mode:r.mode,style:t,body:[r]};return a},"wrapWithStyle");Ca({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:i((r,t)=>{var{parser:a,funcName:o}=r,l=t[0],h=t[1],f,p=null,m=null;switch(o){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":f=!0;break;case"\\\\atopfrac":f=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":f=!1,p="(",m=")";break;case"\\\\bracefrac":f=!1,p="\\{",m="\\}";break;case"\\\\brackfrac":f=!1,p="[",m="]";break;default:throw new Error("Unrecognized genfrac command")}var b=o==="\\cfrac",v=null;return b||o.startsWith("\\d")?v="display":o.startsWith("\\t")&&(v="text"),Xor({type:"genfrac",mode:a.mode,numer:l,denom:h,continued:b,hasBarLine:f,leftDelim:p,rightDelim:m,barSize:null},v)},"handler"),htmlBuilder:X6n,mathmlBuilder:Q6n});Ca({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(r){var{parser:t,funcName:a,token:o}=r,l;switch(a){case"\\over":l="\\frac";break;case"\\choose":l="\\binom";break;case"\\atop":l="\\\\atopfrac";break;case"\\brace":l="\\\\bracefrac";break;case"\\brack":l="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:l,token:o}}});Zsr=["display","text","script","scriptscript"],eor=i(function(t){var a=null;return t.length>0&&(a=t,a=a==="."?null:a),a},"delimFromValue");Ca({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(r,t){var{parser:a}=r,o=t[4],l=t[5],h=qye(t[0]),f=h.type==="atom"&&h.family==="open"?eor(h.text):null,p=qye(t[1]),m=p.type==="atom"&&p.family==="close"?eor(p.text):null,b=vl(t[2],"size"),v,T=null;b.isBlank?v=!0:(T=b.value,v=T.number>0);var C=null,E=t[3];if(E.type==="ordgroup"){if(E.body.length>0){var S=vl(E.body[0],"textord");C=Zsr[Number(S.text)]}}else E=vl(E,"textord"),C=Zsr[Number(E.text)];return Xor({type:"genfrac",mode:a.mode,numer:o,denom:l,continued:!1,hasBarLine:v,barSize:T,leftDelim:f,rightDelim:m},C)}});Ca({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(r,t){var{parser:a,funcName:o,token:l}=r;return{type:"infix",mode:a.mode,replaceWith:"\\\\abovefrac",size:vl(t[0],"size").value,token:l}}});Ca({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:i((r,t)=>{var{parser:a,funcName:o}=r,l=t[0],h=vl(t[1],"infix").size;if(!h)throw new Error("\\\\abovefrac expected size, but got "+String(h));var f=t[2],p=h.number>0;return{type:"genfrac",mode:a.mode,numer:l,denom:f,continued:!1,hasBarLine:p,barSize:h,leftDelim:null,rightDelim:null}},"handler")});Qor=i((r,t)=>{var a=t.style,o,l;r.type==="supsub"?(o=r.sup?wu(r.sup,t.havingStyle(a.sup()),t):wu(r.sub,t.havingStyle(a.sub()),t),l=vl(r.base,"horizBrace")):l=vl(r,"horizBrace");var h=wu(l.base,t.havingBaseStyle(Wo.DISPLAY)),f=ebe(l,t),p;if(l.isOver?p=vu({positionType:"firstBaseline",children:[{type:"elem",elem:h},{type:"kern",size:.1},{type:"elem",elem:f,wrapperClasses:["svg-align"]}]}):p=vu({positionType:"bottom",positionData:h.depth+.1+f.height,children:[{type:"elem",elem:f,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:h}]}),o){var m=Di(["minner",l.isOver?"mover":"munder"],[p],t);l.isOver?p=vu({positionType:"firstBaseline",children:[{type:"elem",elem:m},{type:"kern",size:.2},{type:"elem",elem:o}]}):p=vu({positionType:"bottom",positionData:m.depth+.2+o.height+o.depth,children:[{type:"elem",elem:o},{type:"kern",size:.2},{type:"elem",elem:m}]})}return Di(["minner",l.isOver?"mover":"munder"],[p],t)},"htmlBuilder$3"),J6n=i((r,t)=>{var a=Zye(r.label);return new Fi(r.isOver?"mover":"munder",[$h(r.base,t),a])},"mathmlBuilder$2");Ca({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(r,t){var{parser:a,funcName:o}=r;return{type:"horizBrace",mode:a.mode,label:o,isOver:o.includes("\\over"),base:t[0]}},htmlBuilder:Qor,mathmlBuilder:J6n});Ca({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:i((r,t)=>{var{parser:a}=r,o=t[1],l=vl(t[0],"url").url;return a.settings.isTrusted({command:"\\href",url:l})?{type:"href",mode:a.mode,href:l,body:Ag(o)}:a.formatUnsupportedCmd("\\href")},"handler"),htmlBuilder:i((r,t)=>{var a=p0(r.body,t,!1);return h6n(r.href,[],a,t)},"htmlBuilder"),mathmlBuilder:i((r,t)=>{var a=hL(r.body,t);return a instanceof Fi||(a=new Fi("mrow",[a])),a.setAttribute("href",r.href),a},"mathmlBuilder")});Ca({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:i((r,t)=>{var{parser:a}=r,o=vl(t[0],"url").url;if(!a.settings.isTrusted({command:"\\url",url:o}))return a.formatUnsupportedCmd("\\url");for(var l=[],h=0;h{var{parser:a,funcName:o,token:l}=r,h=vl(t[0],"raw").string,f=t[1];a.settings.strict&&a.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var p,m={};switch(o){case"\\htmlClass":m.class=h,p={command:"\\htmlClass",class:h};break;case"\\htmlId":m.id=h,p={command:"\\htmlId",id:h};break;case"\\htmlStyle":m.style=h,p={command:"\\htmlStyle",style:h};break;case"\\htmlData":{for(var b=h.split(","),v=0;v{var a=p0(r.body,t,!1),o=["enclosing"];r.attributes.class&&o.push(...r.attributes.class.trim().split(/\s+/));var l=Di(o,a,t);for(var h in r.attributes)h!=="class"&&r.attributes.hasOwnProperty(h)&&l.setAttribute(h,r.attributes[h]);return l},"htmlBuilder"),mathmlBuilder:i((r,t)=>hL(r.body,t),"mathmlBuilder")});Ca({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:i((r,t)=>{var{parser:a}=r;return{type:"htmlmathml",mode:a.mode,html:Ag(t[0]),mathml:Ag(t[1])}},"handler"),htmlBuilder:i((r,t)=>{var a=p0(r.html,t,!1);return W6(a)},"htmlBuilder"),mathmlBuilder:i((r,t)=>hL(r.mathml,t),"mathmlBuilder")});nqe=i(function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var a=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!a)throw new Ui("Invalid size: '"+t+"' in \\includegraphics");var o={number:+(a[1]+a[2]),unit:a[3]};if(!por(o))throw new Ui("Invalid unit: '"+o.unit+"' in \\includegraphics.");return o},"sizeData");Ca({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:i((r,t,a)=>{var{parser:o}=r,l={number:0,unit:"em"},h={number:.9,unit:"em"},f={number:0,unit:"em"},p="";if(a[0])for(var m=vl(a[0],"raw").string,b=m.split(","),v=0;v{var a=_d(r.height,t),o=0;r.totalheight.number>0&&(o=_d(r.totalheight,t)-a);var l=0;r.width.number>0&&(l=_d(r.width,t));var h={height:Ki(a+o)};l>0&&(h.width=Ki(l)),o>0&&(h.verticalAlign=Ki(-o));var f=new cqe(r.src,r.alt,h);return f.height=a,f.depth=o,f},"htmlBuilder"),mathmlBuilder:i((r,t)=>{var a=new Fi("mglyph",[]);a.setAttribute("alt",r.alt);var o=_d(r.height,t),l=0;if(r.totalheight.number>0&&(l=_d(r.totalheight,t)-o,a.setAttribute("valign",Ki(-l))),a.setAttribute("height",Ki(o+l)),r.width.number>0){var h=_d(r.width,t);a.setAttribute("width",Ki(h))}return a.setAttribute("src",r.src),a},"mathmlBuilder")});Ca({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(r,t){var{parser:a,funcName:o}=r,l=vl(t[0],"size");if(a.settings.strict){var h=o[1]==="m",f=l.value.unit==="mu";h?(f||a.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+o+" supports only mu units, "+("not "+l.value.unit+" units")),a.mode!=="math"&&a.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+o+" works only in math mode")):f&&a.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+o+" doesn't support mu units")}return{type:"kern",mode:a.mode,dimension:l.value}},htmlBuilder(r,t){return xor(r.dimension,t)},mathmlBuilder(r,t){var a=_d(r.dimension,t);return new Wye(a)}});Ca({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:i((r,t)=>{var{parser:a,funcName:o}=r,l=t[0];return{type:"lap",mode:a.mode,alignment:o.slice(5),body:l}},"handler"),htmlBuilder:i((r,t)=>{var a;r.alignment==="clap"?(a=Di([],[wu(r.body,t)]),a=Di(["inner"],[a],t)):a=Di(["inner"],[wu(r.body,t)]);var o=Di(["fix"],[]),l=Di([r.alignment],[a,o],t),h=Di(["strut"]);return h.style.height=Ki(l.height+l.depth),l.depth&&(h.style.verticalAlign=Ki(-l.depth)),l.children.unshift(h),l=Di(["thinbox"],[l],t),Di(["mord","vbox"],[l],t)},"htmlBuilder"),mathmlBuilder:i((r,t)=>{var a=new Fi("mpadded",[$h(r.body,t)]);if(r.alignment!=="rlap"){var o=r.alignment==="llap"?"-1":"-0.5";a.setAttribute("lspace",o+"width")}return a.setAttribute("width","0px"),a},"mathmlBuilder")});Ca({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(r,t){var{funcName:a,parser:o}=r,l=o.mode;o.switchMode("math");var h=a==="\\("?"\\)":"$",f=o.parseExpression(!1,h);return o.expect(h),o.switchMode(l),{type:"styling",mode:o.mode,style:"text",resetFont:!0,body:f}}});Ca({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(r,t){throw new Ui("Mismatched "+r.funcName)}});tor=i((r,t)=>{switch(t.style.size){case Wo.DISPLAY.size:return r.display;case Wo.TEXT.size:return r.text;case Wo.SCRIPT.size:return r.script;case Wo.SCRIPTSCRIPT.size:return r.scriptscript;default:return r.text}},"chooseMathStyle");Ca({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:i((r,t)=>{var{parser:a}=r;return{type:"mathchoice",mode:a.mode,display:Ag(t[0]),text:Ag(t[1]),script:Ag(t[2]),scriptscript:Ag(t[3])}},"handler"),htmlBuilder:i((r,t)=>{var a=tor(r,t),o=p0(a,t,!1);return W6(o)},"htmlBuilder"),mathmlBuilder:i((r,t)=>{var a=tor(r,t);return hL(a,t)},"mathmlBuilder")});Jor=i((r,t,a,o,l,h,f)=>{r=Di([],[r]);var p=a&&H6(a),m,b;if(t){var v=wu(t,o.havingStyle(l.sup()),o);b={elem:v,kern:Math.max(o.fontMetrics().bigOpSpacing1,o.fontMetrics().bigOpSpacing3-v.depth)}}if(a){var T=wu(a,o.havingStyle(l.sub()),o);m={elem:T,kern:Math.max(o.fontMetrics().bigOpSpacing2,o.fontMetrics().bigOpSpacing4-T.height)}}var C;if(b&&m){var E=o.fontMetrics().bigOpSpacing5+m.elem.height+m.elem.depth+m.kern+r.depth+f;C=vu({positionType:"bottom",positionData:E,children:[{type:"kern",size:o.fontMetrics().bigOpSpacing5},{type:"elem",elem:m.elem,marginLeft:Ki(-h)},{type:"kern",size:m.kern},{type:"elem",elem:r},{type:"kern",size:b.kern},{type:"elem",elem:b.elem,marginLeft:Ki(h)},{type:"kern",size:o.fontMetrics().bigOpSpacing5}]})}else if(m){var S=r.height-f;C=vu({positionType:"top",positionData:S,children:[{type:"kern",size:o.fontMetrics().bigOpSpacing5},{type:"elem",elem:m.elem,marginLeft:Ki(-h)},{type:"kern",size:m.kern},{type:"elem",elem:r}]})}else if(b){var R=r.depth+f;C=vu({positionType:"bottom",positionData:R,children:[{type:"elem",elem:r},{type:"kern",size:b.kern},{type:"elem",elem:b.elem,marginLeft:Ki(h)},{type:"kern",size:o.fontMetrics().bigOpSpacing5}]})}else return r;var L=[C];if(m&&h!==0&&!p){var _=Di(["mspace"],[],o);_.style.marginRight=Ki(h),L.unshift(_)}return Di(["mop","op-limits"],L,o)},"assembleSupSub"),Zor=new Set(["\\smallint"]),Yj=i((r,t)=>{var a,o,l=!1,h;r.type==="supsub"?(a=r.sup,o=r.sub,h=vl(r.base,"op"),l=!0):h=vl(r,"op");var f=t.style,p=!1;f.size===Wo.DISPLAY.size&&h.symbol&&!Zor.has(h.name)&&(p=!0);var m,b;if(h.symbol){var v=p?"Size2-Regular":"Size1-Regular",T="";if((h.name==="\\oiint"||h.name==="\\oiiint")&&(T=h.name.slice(1),h.name=T==="oiint"?"\\iint":"\\iiint"),m=gb(h.name,v,"math",t,["mop","op-symbol",p?"large-op":"small-op"]),b=m.italic,T.length>0){var C=kor(T+"Size"+(p?"2":"1"),t);m=vu({positionType:"individualShift",children:[{type:"elem",elem:m,shift:0},{type:"elem",elem:C,shift:p?.08:0}]}),h.name="\\"+T,m.classes.unshift("mop"),m.italic=b}}else if(h.body){var E=p0(h.body,t,!0);E.length===1&&E[0]instanceof yb?(m=E[0],m.classes[0]="mop"):m=Di(["mop"],E,t)}else{for(var S=[],R=1;R{var a;if(r.symbol)a=new Fi("mo",[GT(r.name,r.mode)]),Zor.has(r.name)&&a.setAttribute("largeop","false");else if(r.body)a=new Fi("mo",Ow(r.body,t));else{a=new Fi("mi",[new hp(r.name.slice(1))]);var o=new Fi("mo",[GT("\u2061","text")]);r.parentIsSupSub?a=new Fi("mrow",[a,o]):a=Sor([a,o])}return a},"mathmlBuilder$1"),Z6n={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};Ca({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:i((r,t)=>{var{parser:a,funcName:o}=r,l=o;return l.length===1&&(l=Z6n[l]),{type:"op",mode:a.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:l}},"handler"),htmlBuilder:Yj,mathmlBuilder:Eee});Ca({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:i((r,t)=>{var{parser:a}=r,o=t[0];return{type:"op",mode:a.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Ag(o)}},"handler"),htmlBuilder:Yj,mathmlBuilder:Eee});eAn={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};Ca({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(r){var{parser:t,funcName:a}=r;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:a}},htmlBuilder:Yj,mathmlBuilder:Eee});Ca({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(r){var{parser:t,funcName:a}=r;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:a}},htmlBuilder:Yj,mathmlBuilder:Eee});Ca({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0,allowedInArgument:!0},handler(r){var{parser:t,funcName:a}=r,o=a;return o.length===1&&(o=eAn[o]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:o}},htmlBuilder:Yj,mathmlBuilder:Eee});elr=i((r,t)=>{var a,o,l=!1,h;r.type==="supsub"?(a=r.sup,o=r.sub,h=vl(r.base,"operatorname"),l=!0):h=vl(r,"operatorname");var f;if(h.body.length>0){for(var p=h.body.map(T=>{var C="text"in T?T.text:void 0;return typeof C=="string"?{type:"textord",mode:T.mode,text:C}:T}),m=p0(p,t.withFont("mathrm"),!0),b=0;b{for(var a=Ow(r.body,t.withFont("mathrm")),o=!0,l=0;lv.toText()).join("");a=[new hp(p)]}var m=new Fi("mi",a);m.setAttribute("mathvariant","normal");var b=new Fi("mo",[GT("\u2061","text")]);return r.parentIsSupSub?new Fi("mrow",[m,b]):Sor([m,b])},"mathmlBuilder");Ca({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:i((r,t)=>{var{parser:a,funcName:o}=r,l=t[0];return{type:"operatorname",mode:a.mode,body:Ag(l),alwaysHandleSupSub:o==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},"handler"),htmlBuilder:elr,mathmlBuilder:tAn});yt("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");wN({type:"ordgroup",htmlBuilder(r,t){return r.semisimple?W6(p0(r.body,t,!1)):Di(["mord"],p0(r.body,t,!0),t)},mathmlBuilder(r,t){return hL(r.body,t,!0)}});Ca({type:"overline",names:["\\overline"],props:{numArgs:1},handler(r,t){var{parser:a}=r,o=t[0];return{type:"overline",mode:a.mode,body:o}},htmlBuilder(r,t){var a=wu(r.body,t.havingCrampedStyle()),o=Hj("overline-line",t),l=t.fontMetrics().defaultRuleThickness,h=vu({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:3*l},{type:"elem",elem:o},{type:"kern",size:l}]});return Di(["mord","overline"],[h],t)},mathmlBuilder(r,t){var a=new Fi("mo",[new hp("\u203E")]);a.setAttribute("stretchy","true");var o=new Fi("mover",[$h(r.body,t),a]);return o.setAttribute("accent","true"),o}});Ca({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:i((r,t)=>{var{parser:a}=r,o=t[0];return{type:"phantom",mode:a.mode,body:Ag(o)}},"handler"),htmlBuilder:i((r,t)=>{var a=p0(r.body,t.withPhantom(),!1);return W6(a)},"htmlBuilder"),mathmlBuilder:i((r,t)=>{var a=Ow(r.body,t);return new Fi("mphantom",a)},"mathmlBuilder")});yt("\\hphantom","\\smash{\\phantom{#1}}");Ca({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:i((r,t)=>{var{parser:a}=r,o=t[0];return{type:"vphantom",mode:a.mode,body:o}},"handler"),htmlBuilder:i((r,t)=>{var a=Di(["inner"],[wu(r.body,t.withPhantom())]),o=Di(["fix"],[]);return Di(["mord","rlap"],[a,o],t)},"htmlBuilder"),mathmlBuilder:i((r,t)=>{var a=Ow(Ag(r.body),t),o=new Fi("mphantom",a),l=new Fi("mpadded",[o]);return l.setAttribute("width","0px"),l},"mathmlBuilder")});Ca({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(r,t){var{parser:a}=r,o=vl(t[0],"size").value,l=t[1];return{type:"raisebox",mode:a.mode,dy:o,body:l}},htmlBuilder(r,t){var a=wu(r.body,t),o=_d(r.dy,t);return vu({positionType:"shift",positionData:-o,children:[{type:"elem",elem:a}]})},mathmlBuilder(r,t){var a=new Fi("mpadded",[$h(r.body,t)]),o=r.dy.number+r.dy.unit;return a.setAttribute("voffset",o),a}});Ca({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(r){var{parser:t}=r;return{type:"internal",mode:t.mode}}});Ca({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(r,t,a){var{parser:o}=r,l=a[0],h=vl(t[0],"size"),f=vl(t[1],"size");return{type:"rule",mode:o.mode,shift:l&&vl(l,"size").value,width:h.value,height:f.value}},htmlBuilder(r,t){var a=Di(["mord","rule"],[],t),o=_d(r.width,t),l=_d(r.height,t),h=r.shift?_d(r.shift,t):0;return a.style.borderRightWidth=Ki(o),a.style.borderTopWidth=Ki(l),a.style.bottom=Ki(h),a.width=o,a.height=l+h,a.depth=-h,a.maxFontSize=l*1.125*t.sizeMultiplier,a},mathmlBuilder(r,t){var a=_d(r.width,t),o=_d(r.height,t),l=r.shift?_d(r.shift,t):0,h=t.color&&t.getColor()||"black",f=new Fi("mspace");f.setAttribute("mathbackground",h),f.setAttribute("width",Ki(a)),f.setAttribute("height",Ki(o));var p=new Fi("mpadded",[f]);return l>=0?p.setAttribute("height",Ki(l)):(p.setAttribute("height",Ki(l)),p.setAttribute("depth",Ki(-l))),p.setAttribute("voffset",Ki(l)),p}});i(tlr,"sizingGroup");ror=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],rAn=i((r,t)=>{var a=t.havingSize(r.size);return tlr(r.body,a,t)},"htmlBuilder");Ca({type:"sizing",names:ror,props:{numArgs:0,allowedInText:!0},handler:i((r,t)=>{var{breakOnTokenText:a,funcName:o,parser:l}=r,h=l.parseExpression(!1,a);return{type:"sizing",mode:l.mode,size:ror.indexOf(o)+1,body:h}},"handler"),htmlBuilder:rAn,mathmlBuilder:i((r,t)=>{var a=t.havingSize(r.size),o=Ow(r.body,a),l=new Fi("mstyle",o);return l.setAttribute("mathsize",Ki(a.sizeMultiplier)),l},"mathmlBuilder")});Ca({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:i((r,t,a)=>{var{parser:o}=r,l=!1,h=!1,f=a[0]&&vl(a[0],"ordgroup");if(f)for(var p,m=0;m{var a=Di([],[wu(r.body,t)]);if(!r.smashHeight&&!r.smashDepth)return a;if(r.smashHeight&&(a.height=0),r.smashDepth&&(a.depth=0),r.smashHeight&&r.smashDepth)return Di(["mord","smash"],[a],t);if(a.children)for(var o=0;o{var a=new Fi("mpadded",[$h(r.body,t)]);return r.smashHeight&&a.setAttribute("height","0px"),r.smashDepth&&a.setAttribute("depth","0px"),a},"mathmlBuilder")});Ca({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(r,t,a){var{parser:o}=r,l=a[0],h=t[0];return{type:"sqrt",mode:o.mode,body:h,index:l}},htmlBuilder(r,t){var a=wu(r.body,t.havingCrampedStyle());a.height===0&&(a.height=t.fontMetrics().xHeight),a=qj(a,t);var o=t.fontMetrics(),l=o.defaultRuleThickness,h=l;t.style.ida.height+a.depth+f&&(f=(f+T-a.height-a.depth)/2);var C=m.height-a.height-f-b;a.style.paddingLeft=Ki(v);var E=vu({positionType:"firstBaseline",children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:-(a.height+C)},{type:"elem",elem:m},{type:"kern",size:b}]});if(r.index){var S=t.havingStyle(Wo.SCRIPTSCRIPT),R=wu(r.index,S,t),L=.6*(E.height-E.depth),_=vu({positionType:"shift",positionData:-L,children:[{type:"elem",elem:R}]}),M=Di(["root"],[_]);return Di(["mord","sqrt"],[M,E],t)}else return Di(["mord","sqrt"],[E],t)},mathmlBuilder(r,t){var{body:a,index:o}=r;return o?new Fi("mroot",[$h(a,t),$h(o,t)]):new Fi("msqrt",[$h(a,t)])}});kqe={display:Wo.DISPLAY,text:Wo.TEXT,script:Wo.SCRIPT,scriptscript:Wo.SCRIPTSCRIPT};i(nAn,"isStyleStr");Ca({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r,t){var{breakOnTokenText:a,funcName:o,parser:l}=r,h=l.parseExpression(!0,a),f=o.slice(1,o.length-5);if(!nAn(f))throw new Error("Unknown style: "+f);return{type:"styling",mode:l.mode,style:f,body:h}},htmlBuilder(r,t){var a=kqe[r.style],o=t.havingStyle(a);return r.resetFont&&(o=o.withFont("")),tlr(r.body,o,t)},mathmlBuilder(r,t){var a=kqe[r.style],o=t.havingStyle(a);r.resetFont&&(o=o.withFont(""));var l=Ow(r.body,o),h=new Fi("mstyle",l),f={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},p=f[r.style];return h.setAttribute("scriptlevel",p[0]),h.setAttribute("displaystyle",p[1]),h}});iAn=i(function(t,a){var o=t.base;if(o)if(o.type==="op"){var l=o.limits&&(a.style.size===Wo.DISPLAY.size||o.alwaysHandleSupSub);return l?Yj:null}else if(o.type==="operatorname"){var h=o.alwaysHandleSupSub&&(a.style.size===Wo.DISPLAY.size||o.limits);return h?elr:null}else{if(o.type==="accent")return H6(o.base)?Nqe:null;if(o.type==="horizBrace"){var f=!t.sub;return f===o.isOver?Qor:null}else return null}else return null},"htmlBuilderDelegate");wN({type:"supsub",htmlBuilder(r,t){var a=iAn(r,t);if(a)return a(r,t);var{base:o,sup:l,sub:h}=r,f=wu(o,t),p,m,b=t.fontMetrics(),v=0,T=0,C=o&&H6(o);if(l){var E=t.havingStyle(t.style.sup());p=wu(l,E,t),C||(v=f.height-E.fontMetrics().supDrop*E.sizeMultiplier/t.sizeMultiplier)}if(h){var S=t.havingStyle(t.style.sub());m=wu(h,S,t),C||(T=f.depth+S.fontMetrics().subDrop*S.sizeMultiplier/t.sizeMultiplier)}var R;t.style===Wo.DISPLAY?R=b.sup1:t.style.cramped?R=b.sup3:R=b.sup2;var L=t.sizeMultiplier,_=Ki(.5/b.ptPerEm/L),M=null;if(m){var I=r.base&&r.base.type==="op"&&r.base.name&&(r.base.name==="\\oiint"||r.base.name==="\\oiiint");if(f instanceof yb||I){var F;M=Ki(-((F=f.italic)!=null?F:0))}}var O;if(p&&m){v=Math.max(v,R,p.depth+.25*b.xHeight),T=Math.max(T,b.sub2);var P=b.defaultRuleThickness,G=4*P;if(v-p.depth-(m.height-T)0&&(v+=V,T-=V)}var Y=[{type:"elem",elem:m,shift:T,marginRight:_,marginLeft:M},{type:"elem",elem:p,shift:-v,marginRight:_}];O=vu({positionType:"individualShift",children:Y})}else if(m){T=Math.max(T,b.sub1,m.height-.8*b.xHeight);var K=[{type:"elem",elem:m,marginLeft:M,marginRight:_}];O=vu({positionType:"shift",positionData:T,children:K})}else if(p)v=Math.max(v,R,p.depth+.25*b.xHeight),O=vu({positionType:"shift",positionData:-v,children:[{type:"elem",elem:p,marginRight:_}]});else throw new Error("supsub must have either sup or sub.");var J=bqe(f,"right")||"mord";return Di([J],[f,Di(["msupsub"],[O])],t)},mathmlBuilder(r,t){var a=!1,o,l;r.base&&r.base.type==="horizBrace"&&(l=!!r.sup,l===r.base.isOver&&(a=!0,o=r.base.isOver)),r.base&&(r.base.type==="op"||r.base.type==="operatorname")&&(r.base.parentIsSupSub=!0);var h=[$h(r.base,t)];r.sub&&h.push($h(r.sub,t)),r.sup&&h.push($h(r.sup,t));var f;if(a)f=o?"mover":"munder";else if(r.sub)if(r.sup){var b=r.base;b&&b.type==="op"&&b.limits&&t.style===Wo.DISPLAY||b&&b.type==="operatorname"&&b.alwaysHandleSupSub&&(t.style===Wo.DISPLAY||b.limits)?f="munderover":f="msubsup"}else{var m=r.base;m&&m.type==="op"&&m.limits&&(t.style===Wo.DISPLAY||m.alwaysHandleSupSub)||m&&m.type==="operatorname"&&m.alwaysHandleSupSub&&(m.limits||t.style===Wo.DISPLAY)?f="munder":f="msub"}else{var p=r.base;p&&p.type==="op"&&p.limits&&(t.style===Wo.DISPLAY||p.alwaysHandleSupSub)||p&&p.type==="operatorname"&&p.alwaysHandleSupSub&&(p.limits||t.style===Wo.DISPLAY)?f="mover":f="msup"}return new Fi(f,h)}});wN({type:"atom",htmlBuilder(r,t){return Dqe(r.text,r.mode,t,["m"+r.family])},mathmlBuilder(r,t){var a=new Fi("mo",[GT(r.text,r.mode)]);if(r.family==="bin"){var o=Iqe(r,t);o==="bold-italic"&&a.setAttribute("mathvariant",o)}else r.family==="punct"?a.setAttribute("separator","true"):(r.family==="open"||r.family==="close")&&a.setAttribute("stretchy","false");return a}});rlr={mi:"italic",mn:"normal",mtext:"normal"};wN({type:"mathord",htmlBuilder(r,t){return Jye(r,t,"mathord")},mathmlBuilder(r,t){var a=new Fi("mi",[GT(r.text,r.mode,t)]),o=Iqe(r,t)||"italic";return o!==rlr[a.type]&&a.setAttribute("mathvariant",o),a}});wN({type:"textord",htmlBuilder(r,t){return Jye(r,t,"textord")},mathmlBuilder(r,t){var a=GT(r.text,r.mode,t),o=Iqe(r,t)||"normal",l;return r.mode==="text"?l=new Fi("mtext",[a]):/[0-9]/.test(r.text)?l=new Fi("mn",[a]):r.text==="\\prime"?l=new Fi("mo",[a]):l=new Fi("mi",[a]),o!==rlr[l.type]&&l.setAttribute("mathvariant",o),l}});iqe={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},aqe={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};wN({type:"spacing",htmlBuilder(r,t){if(aqe.hasOwnProperty(r.text)){var a=aqe[r.text].className||"";if(r.mode==="text"){var o=Jye(r,t,"textord");return o.classes.push(a),o}else return Di(["mspace",a],[Dqe(r.text,r.mode,t)],t)}else{if(iqe.hasOwnProperty(r.text))return Di(["mspace",iqe[r.text]],[],t);throw new Ui('Unknown type of space "'+r.text+'"')}},mathmlBuilder(r,t){var a;if(aqe.hasOwnProperty(r.text))a=new Fi("mtext",[new hp("\xA0")]);else{if(iqe.hasOwnProperty(r.text))return new Fi("mspace");throw new Ui('Unknown type of space "'+r.text+'"')}return a}});nor=i(()=>{var r=new Fi("mtd",[]);return r.setAttribute("width","50%"),r},"pad");wN({type:"tag",mathmlBuilder(r,t){var a=new Fi("mtable",[new Fi("mtr",[nor(),new Fi("mtd",[hL(r.body,t)]),nor(),new Fi("mtd",[hL(r.tag,t)])])]);return a.setAttribute("width","100%"),a}});ior={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},aor={"\\textbf":"textbf","\\textmd":"textmd"},aAn={"\\textit":"textit","\\textup":"textup"},sor=i((r,t)=>{var a=r.font;if(a){if(ior[a])return t.withTextFontFamily(ior[a]);if(aor[a])return t.withTextFontWeight(aor[a]);if(a==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(aAn[a])},"optionsWithFont");Ca({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(r,t){var{parser:a,funcName:o}=r,l=t[0];return{type:"text",mode:a.mode,body:Ag(l),font:o}},htmlBuilder(r,t){var a=sor(r,t),o=p0(r.body,a,!0);return Di(["mord","text"],o,a)},mathmlBuilder(r,t){var a=sor(r,t);return hL(r.body,a)}});Ca({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(r,t){var{parser:a}=r;return{type:"underline",mode:a.mode,body:t[0]}},htmlBuilder(r,t){var a=wu(r.body,t),o=Hj("underline-line",t),l=t.fontMetrics().defaultRuleThickness,h=vu({positionType:"top",positionData:a.height,children:[{type:"kern",size:l},{type:"elem",elem:o},{type:"kern",size:3*l},{type:"elem",elem:a}]});return Di(["mord","underline"],[h],t)},mathmlBuilder(r,t){var a=new Fi("mo",[new hp("\u203E")]);a.setAttribute("stretchy","true");var o=new Fi("munder",[$h(r.body,t),a]);return o.setAttribute("accentunder","true"),o}});Ca({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(r,t){var{parser:a}=r;return{type:"vcenter",mode:a.mode,body:t[0]}},htmlBuilder(r,t){var a=wu(r.body,t),o=t.fontMetrics().axisHeight,l=.5*(a.height-o-(a.depth+o));return vu({positionType:"shift",positionData:l,children:[{type:"elem",elem:a}]})},mathmlBuilder(r,t){var a=new Fi("mpadded",[$h(r.body,t)],["vcenter"]);return new Fi("mrow",[a])}});Ca({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(r,t,a){throw new Ui("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(r,t){for(var a=oor(r),o=[],l=t.havingStyle(t.style.text()),h=0;hr.body.replace(/ /g,r.star?"\u2423":"\xA0"),"makeVerb"),sL=Cor,nlr=`[ \r
+ ]`,sAn="\\\\[a-zA-Z@]+",oAn="\\\\[^\uD800-\uDFFF]",lAn="("+sAn+")"+nlr+"*",cAn=`\\\\(
|[ \r ]+
-?)[ \r ]*`,E7="[\u0300-\u036F]",SWe=new RegExp(E7+"+$"),wWe="("+KQ+"+)|"+(CWe+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(E7+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(E7+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+TWe)+("|"+bWe+")"),jw=class{static{s(this,"Lexer")}constructor(t,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=r,this.tokenRegex=new RegExp(wWe,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,r){this.catcodes[t]=r}lex(){var t=this.input,r=this.tokenRegex.lastIndex;if(r===t.length)return new Bo("EOF",new so(this,r,r));var n=this.tokenRegex.exec(t);if(n===null||n.index!==r)throw new Nt("Unexpected character: '"+t[r]+"'",new Bo(t[r],new so(this,r,r+1)));var i=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[i]===14){var a=t.indexOf(`
-`,this.tokenRegex.lastIndex);return a===-1?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=a+1,this.lex()}return new Bo(i,new so(this,r,this.tokenRegex.lastIndex))}},A7=class{static{s(this,"Namespace")}constructor(t,r){t===void 0&&(t={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new Nt("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var r in t)t.hasOwnProperty(r)&&(t[r]==null?delete this.current[r]:this.current[r]=t[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,r,n){if(n===void 0&&(n=!1),n){for(var i=0;i0&&(this.undefStack[this.undefStack.length-1][t]=r)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(t)&&(a[t]=this.current[t])}r==null?delete this.current[t]:this.current[t]=r}},kWe=FQ;ke("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});ke("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});ke("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});ke("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});ke("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return t[0].length===1&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});ke("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");ke("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});rQ={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};ke("\\char",function(e){var t=e.popToken(),r,n=0;if(t.text==="'")r=8,t=e.popToken();else if(t.text==='"')r=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")n=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new Nt("\\char` missing argument");n=t.text.charCodeAt(0)}else r=10;if(r){if(n=rQ[t.text],n==null||n>=r)throw new Nt("Invalid base-"+r+" digit "+t.text);for(var i;(i=rQ[e.future().text])!=null&&i{var i=e.consumeArg().tokens;if(i.length!==1)throw new Nt("\\newcommand's first argument must be a macro name");var a=i[0].text,o=e.isDefined(a);if(o&&!t)throw new Nt("\\newcommand{"+a+"} attempting to redefine "+(a+"; use \\renewcommand"));if(!o&&!r)throw new Nt("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");var l=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text==="["){for(var u="",h=e.expandNextToken();h.text!=="]"&&h.text!=="EOF";)u+=h.text,h=e.expandNextToken();if(!u.match(/^\s*[0-9]+\s*$/))throw new Nt("Invalid number of arguments: "+u);l=parseInt(u),i=e.consumeArg().tokens}return o&&n||e.macros.set(a,{tokens:i,numArgs:l}),""},"newcommand");ke("\\newcommand",e=>G7(e,!1,!0,!1));ke("\\renewcommand",e=>G7(e,!0,!1,!1));ke("\\providecommand",e=>G7(e,!0,!0,!0));ke("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(r=>r.text).join("")),""});ke("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(r=>r.text).join("")),""});ke("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),Rd[r],pi.math[r],pi.text[r]),""});ke("\\bgroup","{");ke("\\egroup","}");ke("~","\\nobreakspace");ke("\\lq","`");ke("\\rq","'");ke("\\aa","\\r a");ke("\\AA","\\r A");ke("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}");ke("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");ke("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}");ke("\u212C","\\mathscr{B}");ke("\u2130","\\mathscr{E}");ke("\u2131","\\mathscr{F}");ke("\u210B","\\mathscr{H}");ke("\u2110","\\mathscr{I}");ke("\u2112","\\mathscr{L}");ke("\u2133","\\mathscr{M}");ke("\u211B","\\mathscr{R}");ke("\u212D","\\mathfrak{C}");ke("\u210C","\\mathfrak{H}");ke("\u2128","\\mathfrak{Z}");ke("\\Bbbk","\\Bbb{k}");ke("\\llap","\\mathllap{\\textrm{#1}}");ke("\\rlap","\\mathrlap{\\textrm{#1}}");ke("\\clap","\\mathclap{\\textrm{#1}}");ke("\\mathstrut","\\vphantom{(}");ke("\\underbar","\\underline{\\text{#1}}");ke("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');ke("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}");ke("\\ne","\\neq");ke("\u2260","\\neq");ke("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}");ke("\u2209","\\notin");ke("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}");ke("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}");ke("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}");ke("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}");ke("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}");ke("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}");ke("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}");ke("\u27C2","\\perp");ke("\u203C","\\mathclose{!\\mkern-0.8mu!}");ke("\u220C","\\notni");ke("\u231C","\\ulcorner");ke("\u231D","\\urcorner");ke("\u231E","\\llcorner");ke("\u231F","\\lrcorner");ke("\xA9","\\copyright");ke("\xAE","\\textregistered");ke("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');ke("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');ke("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');ke("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');ke("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");ke("\u22EE","\\vdots");ke("\\varGamma","\\mathit{\\Gamma}");ke("\\varDelta","\\mathit{\\Delta}");ke("\\varTheta","\\mathit{\\Theta}");ke("\\varLambda","\\mathit{\\Lambda}");ke("\\varXi","\\mathit{\\Xi}");ke("\\varPi","\\mathit{\\Pi}");ke("\\varSigma","\\mathit{\\Sigma}");ke("\\varUpsilon","\\mathit{\\Upsilon}");ke("\\varPhi","\\mathit{\\Phi}");ke("\\varPsi","\\mathit{\\Psi}");ke("\\varOmega","\\mathit{\\Omega}");ke("\\substack","\\begin{subarray}{c}#1\\end{subarray}");ke("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");ke("\\boxed","\\fbox{$\\displaystyle{#1}$}");ke("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");ke("\\implies","\\DOTSB\\;\\Longrightarrow\\;");ke("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");ke("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");ke("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");nQ={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},EWe=new Set(["bin","rel"]);ke("\\dots",function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in nQ?t=nQ[r]:(r.slice(0,4)==="\\not"||r in pi.math&&EWe.has(pi.math[r].group))&&(t="\\dotsb"),t});z7={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};ke("\\dotso",function(e){var t=e.future().text;return t in z7?"\\ldots\\,":"\\ldots"});ke("\\dotsc",function(e){var t=e.future().text;return t in z7&&t!==","?"\\ldots\\,":"\\ldots"});ke("\\cdots",function(e){var t=e.future().text;return t in z7?"\\@cdots\\,":"\\@cdots"});ke("\\dotsb","\\cdots");ke("\\dotsm","\\cdots");ke("\\dotsi","\\!\\cdots");ke("\\dotsx","\\ldots\\,");ke("\\DOTSI","\\relax");ke("\\DOTSB","\\relax");ke("\\DOTSX","\\relax");ke("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");ke("\\,","\\tmspace+{3mu}{.1667em}");ke("\\thinspace","\\,");ke("\\>","\\mskip{4mu}");ke("\\:","\\tmspace+{4mu}{.2222em}");ke("\\medspace","\\:");ke("\\;","\\tmspace+{5mu}{.2777em}");ke("\\thickspace","\\;");ke("\\!","\\tmspace-{3mu}{.1667em}");ke("\\negthinspace","\\!");ke("\\negmedspace","\\tmspace-{4mu}{.2222em}");ke("\\negthickspace","\\tmspace-{5mu}{.277em}");ke("\\enspace","\\kern.5em ");ke("\\enskip","\\hskip.5em\\relax");ke("\\quad","\\hskip1em\\relax");ke("\\qquad","\\hskip2em\\relax");ke("\\tag","\\@ifstar\\tag@literal\\tag@paren");ke("\\tag@paren","\\tag@literal{({#1})}");ke("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Nt("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});ke("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");ke("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");ke("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");ke("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");ke("\\newline","\\\\\\relax");ke("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");ZQ=Ft(Bc["Main-Regular"][84][1]-.7*Bc["Main-Regular"][65][1]);ke("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+ZQ+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");ke("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+ZQ+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");ke("\\hspace","\\@ifstar\\@hspacer\\@hspace");ke("\\@hspace","\\hskip #1\\relax");ke("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");ke("\\ordinarycolon",":");ke("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");ke("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');ke("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');ke("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');ke("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');ke("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');ke("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');ke("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');ke("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');ke("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');ke("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');ke("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');ke("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');ke("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');ke("\u2237","\\dblcolon");ke("\u2239","\\eqcolon");ke("\u2254","\\coloneqq");ke("\u2255","\\eqqcolon");ke("\u2A74","\\Coloneqq");ke("\\ratio","\\vcentcolon");ke("\\coloncolon","\\dblcolon");ke("\\colonequals","\\coloneqq");ke("\\coloncolonequals","\\Coloneqq");ke("\\equalscolon","\\eqqcolon");ke("\\equalscoloncolon","\\Eqqcolon");ke("\\colonminus","\\coloneq");ke("\\coloncolonminus","\\Coloneq");ke("\\minuscolon","\\eqcolon");ke("\\minuscoloncolon","\\Eqcolon");ke("\\coloncolonapprox","\\Colonapprox");ke("\\coloncolonsim","\\Colonsim");ke("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ke("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");ke("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ke("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");ke("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");ke("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");ke("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");ke("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");ke("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");ke("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");ke("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");ke("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");ke("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");ke("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}");ke("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}");ke("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}");ke("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}");ke("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}");ke("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}");ke("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}");ke("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}");ke("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}");ke("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}");ke("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}");ke("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}");ke("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}");ke("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}");ke("\\imath","\\html@mathml{\\@imath}{\u0131}");ke("\\jmath","\\html@mathml{\\@jmath}{\u0237}");ke("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}");ke("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}");ke("\u27E6","\\llbracket");ke("\u27E7","\\rrbracket");ke("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}");ke("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}");ke("\u2983","\\lBrace");ke("\u2984","\\rBrace");ke("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}");ke("\u29B5","\\minuso");ke("\\darr","\\downarrow");ke("\\dArr","\\Downarrow");ke("\\Darr","\\Downarrow");ke("\\lang","\\langle");ke("\\rang","\\rangle");ke("\\uarr","\\uparrow");ke("\\uArr","\\Uparrow");ke("\\Uarr","\\Uparrow");ke("\\N","\\mathbb{N}");ke("\\R","\\mathbb{R}");ke("\\Z","\\mathbb{Z}");ke("\\alef","\\aleph");ke("\\alefsym","\\aleph");ke("\\Alpha","\\mathrm{A}");ke("\\Beta","\\mathrm{B}");ke("\\bull","\\bullet");ke("\\Chi","\\mathrm{X}");ke("\\clubs","\\clubsuit");ke("\\cnums","\\mathbb{C}");ke("\\Complex","\\mathbb{C}");ke("\\Dagger","\\ddagger");ke("\\diamonds","\\diamondsuit");ke("\\empty","\\emptyset");ke("\\Epsilon","\\mathrm{E}");ke("\\Eta","\\mathrm{H}");ke("\\exist","\\exists");ke("\\harr","\\leftrightarrow");ke("\\hArr","\\Leftrightarrow");ke("\\Harr","\\Leftrightarrow");ke("\\hearts","\\heartsuit");ke("\\image","\\Im");ke("\\infin","\\infty");ke("\\Iota","\\mathrm{I}");ke("\\isin","\\in");ke("\\Kappa","\\mathrm{K}");ke("\\larr","\\leftarrow");ke("\\lArr","\\Leftarrow");ke("\\Larr","\\Leftarrow");ke("\\lrarr","\\leftrightarrow");ke("\\lrArr","\\Leftrightarrow");ke("\\Lrarr","\\Leftrightarrow");ke("\\Mu","\\mathrm{M}");ke("\\natnums","\\mathbb{N}");ke("\\Nu","\\mathrm{N}");ke("\\Omicron","\\mathrm{O}");ke("\\plusmn","\\pm");ke("\\rarr","\\rightarrow");ke("\\rArr","\\Rightarrow");ke("\\Rarr","\\Rightarrow");ke("\\real","\\Re");ke("\\reals","\\mathbb{R}");ke("\\Reals","\\mathbb{R}");ke("\\Rho","\\mathrm{P}");ke("\\sdot","\\cdot");ke("\\sect","\\S");ke("\\spades","\\spadesuit");ke("\\sub","\\subset");ke("\\sube","\\subseteq");ke("\\supe","\\supseteq");ke("\\Tau","\\mathrm{T}");ke("\\thetasym","\\vartheta");ke("\\weierp","\\wp");ke("\\Zeta","\\mathrm{Z}");ke("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");ke("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");ke("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");ke("\\bra","\\mathinner{\\langle{#1}|}");ke("\\ket","\\mathinner{|{#1}\\rangle}");ke("\\braket","\\mathinner{\\langle{#1}\\rangle}");ke("\\Bra","\\left\\langle#1\\right|");ke("\\Ket","\\left|#1\\right\\rangle");QQ=s(e=>t=>{var r=t.consumeArg().tokens,n=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get("|"),l=t.macros.get("\\|");t.macros.beginGroup();var u=s(f=>p=>{e&&(p.macros.set("|",o),i.length&&p.macros.set("\\|",l));var m=f;if(!f&&i.length){var g=p.future();g.text==="|"&&(p.popToken(),m=!0)}return{tokens:m?i:n,numArgs:0}},"midMacro");t.macros.set("|",u(!1)),i.length&&t.macros.set("\\|",u(!0));var h=t.consumeArg().tokens,d=t.expandTokens([...a,...h,...r]);return t.macros.endGroup(),{tokens:d.reverse(),numArgs:0}},"braketHelper");ke("\\bra@ket",QQ(!1));ke("\\bra@set",QQ(!0));ke("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");ke("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");ke("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");ke("\\angln","{\\angl n}");ke("\\blue","\\textcolor{##6495ed}{#1}");ke("\\orange","\\textcolor{##ffa500}{#1}");ke("\\pink","\\textcolor{##ff00af}{#1}");ke("\\red","\\textcolor{##df0030}{#1}");ke("\\green","\\textcolor{##28ae7b}{#1}");ke("\\gray","\\textcolor{gray}{#1}");ke("\\purple","\\textcolor{##9d38bd}{#1}");ke("\\blueA","\\textcolor{##ccfaff}{#1}");ke("\\blueB","\\textcolor{##80f6ff}{#1}");ke("\\blueC","\\textcolor{##63d9ea}{#1}");ke("\\blueD","\\textcolor{##11accd}{#1}");ke("\\blueE","\\textcolor{##0c7f99}{#1}");ke("\\tealA","\\textcolor{##94fff5}{#1}");ke("\\tealB","\\textcolor{##26edd5}{#1}");ke("\\tealC","\\textcolor{##01d1c1}{#1}");ke("\\tealD","\\textcolor{##01a995}{#1}");ke("\\tealE","\\textcolor{##208170}{#1}");ke("\\greenA","\\textcolor{##b6ffb0}{#1}");ke("\\greenB","\\textcolor{##8af281}{#1}");ke("\\greenC","\\textcolor{##74cf70}{#1}");ke("\\greenD","\\textcolor{##1fab54}{#1}");ke("\\greenE","\\textcolor{##0d923f}{#1}");ke("\\goldA","\\textcolor{##ffd0a9}{#1}");ke("\\goldB","\\textcolor{##ffbb71}{#1}");ke("\\goldC","\\textcolor{##ff9c39}{#1}");ke("\\goldD","\\textcolor{##e07d10}{#1}");ke("\\goldE","\\textcolor{##a75a05}{#1}");ke("\\redA","\\textcolor{##fca9a9}{#1}");ke("\\redB","\\textcolor{##ff8482}{#1}");ke("\\redC","\\textcolor{##f9685d}{#1}");ke("\\redD","\\textcolor{##e84d39}{#1}");ke("\\redE","\\textcolor{##bc2612}{#1}");ke("\\maroonA","\\textcolor{##ffbde0}{#1}");ke("\\maroonB","\\textcolor{##ff92c6}{#1}");ke("\\maroonC","\\textcolor{##ed5fa6}{#1}");ke("\\maroonD","\\textcolor{##ca337c}{#1}");ke("\\maroonE","\\textcolor{##9e034e}{#1}");ke("\\purpleA","\\textcolor{##ddd7ff}{#1}");ke("\\purpleB","\\textcolor{##c6b9fc}{#1}");ke("\\purpleC","\\textcolor{##aa87ff}{#1}");ke("\\purpleD","\\textcolor{##7854ab}{#1}");ke("\\purpleE","\\textcolor{##543b78}{#1}");ke("\\mintA","\\textcolor{##f5f9e8}{#1}");ke("\\mintB","\\textcolor{##edf2df}{#1}");ke("\\mintC","\\textcolor{##e0e5cc}{#1}");ke("\\grayA","\\textcolor{##f6f7f7}{#1}");ke("\\grayB","\\textcolor{##f0f1f2}{#1}");ke("\\grayC","\\textcolor{##e3e5e6}{#1}");ke("\\grayD","\\textcolor{##d6d8da}{#1}");ke("\\grayE","\\textcolor{##babec2}{#1}");ke("\\grayF","\\textcolor{##888d93}{#1}");ke("\\grayG","\\textcolor{##626569}{#1}");ke("\\grayH","\\textcolor{##3b3e40}{#1}");ke("\\grayI","\\textcolor{##21242c}{#1}");ke("\\kaBlue","\\textcolor{##314453}{#1}");ke("\\kaGreen","\\textcolor{##71B307}{#1}");JQ={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},R7=class{static{s(this,"MacroExpander")}constructor(t,r,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=r,this.expansionCount=0,this.feed(t),this.macros=new A7(kWe,r.macros),this.mode=n,this.stack=[]}feed(t){this.lexer=new jw(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var r,n,i;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:i,end:n}=this.consumeArg(["]"])}else({tokens:i,start:r,end:n}=this.consumeArg());return this.pushToken(new Bo("EOF",n.loc)),this.pushTokens(i),new Bo("",so.range(r,n))}consumeSpaces(){for(;;){var t=this.future();if(t.text===" ")this.stack.pop();else break}}consumeArg(t){var r=[],n=t&&t.length>0;n||this.consumeSpaces();var i=this.future(),a,o=0,l=0;do{if(a=this.popToken(),r.push(a),a.text==="{")++o;else if(a.text==="}"){if(--o,o===-1)throw new Nt("Extra }",a)}else if(a.text==="EOF")throw new Nt("Unexpected end of input in a macro argument, expected '"+(t&&n?t[l]:"}")+"'",a);if(t&&n)if((o===0||o===1&&t[l]==="{")&&a.text===t[l]){if(++l,l===t.length){r.splice(-l,l);break}}else l=0}while(o!==0||n);return i.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:i,end:a}}consumeArgs(t,r){if(r){if(r.length!==t+1)throw new Nt("The length of delimiters doesn't match the number of args!");for(var n=r[0],i=0;ithis.settings.maxExpand)throw new Nt("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var r=this.popToken(),n=r.text,i=r.noexpand?null:this._getExpansion(n);if(i==null||t&&i.unexpandable){if(t&&i==null&&n[0]==="\\"&&!this.isDefined(n))throw new Nt("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var a=i.tokens,o=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){a=a.slice();for(var l=a.length-1;l>=0;--l){var u=a[l];if(u.text==="#"){if(l===0)throw new Nt("Incomplete placeholder at end of macro body",u);if(u=a[--l],u.text==="#")a.splice(l+1,1);else if(/^[1-9]$/.test(u.text))a.splice(l,2,...o[+u.text-1]);else throw new Nt("Not a valid argument number",u)}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}}expandMacro(t){return this.macros.has(t)?this.expandTokens([new Bo(t)]):void 0}expandTokens(t){var r=[],n=this.stack.length;for(this.pushTokens(t);this.stack.length>n;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),r.push(i)}return this.countExpansion(r.length),r}expandMacroAsText(t){var r=this.expandMacro(t);return r&&r.map(n=>n.text).join("")}_getExpansion(t){var r=this.macros.get(t);if(r==null)return r;if(t.length===1){var n=this.lexer.catcodes[t];if(n!=null&&n!==13)return}var i=typeof r=="function"?r(this):r;if(typeof i=="string"){var a=0;if(i.includes("#"))for(var o=i.replace(/##/g,"");o.includes("#"+(a+1));)++a;for(var l=new jw(i,this.settings),u=[],h=l.lex();h.text!=="EOF";)u.push(h),h=l.lex();u.reverse();var d={tokens:u,numArgs:a};return d}return i}isDefined(t){return this.macros.has(t)||Rd.hasOwnProperty(t)||pi.math.hasOwnProperty(t)||pi.text.hasOwnProperty(t)||JQ.hasOwnProperty(t)}isExpandable(t){var r=this.macros.get(t);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:Rd.hasOwnProperty(t)&&!Rd[t].primitive}},iQ=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Bw=Object.freeze({"\u208A":"+","\u208B":"-","\u208C":"=","\u208D":"(","\u208E":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1D62":"i","\u2C7C":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209A":"p","\u1D63":"r","\u209B":"s","\u209C":"t","\u1D64":"u","\u1D65":"v","\u2093":"x","\u1D66":"\u03B2","\u1D67":"\u03B3","\u1D68":"\u03C1","\u1D69":"\u03D5","\u1D6A":"\u03C7","\u207A":"+","\u207B":"-","\u207C":"=","\u207D":"(","\u207E":")","\u2070":"0","\xB9":"1","\xB2":"2","\xB3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1D2C":"A","\u1D2E":"B","\u1D30":"D","\u1D31":"E","\u1D33":"G","\u1D34":"H","\u1D35":"I","\u1D36":"J","\u1D37":"K","\u1D38":"L","\u1D39":"M","\u1D3A":"N","\u1D3C":"O","\u1D3E":"P","\u1D3F":"R","\u1D40":"T","\u1D41":"U","\u2C7D":"V","\u1D42":"W","\u1D43":"a","\u1D47":"b","\u1D9C":"c","\u1D48":"d","\u1D49":"e","\u1DA0":"f","\u1D4D":"g",\u02B0:"h","\u2071":"i",\u02B2:"j","\u1D4F":"k",\u02E1:"l","\u1D50":"m",\u207F:"n","\u1D52":"o","\u1D56":"p",\u02B3:"r",\u02E2:"s","\u1D57":"t","\u1D58":"u","\u1D5B":"v",\u02B7:"w",\u02E3:"x",\u02B8:"y","\u1DBB":"z","\u1D5D":"\u03B2","\u1D5E":"\u03B3","\u1D5F":"\u03B4","\u1D60":"\u03D5","\u1D61":"\u03C7","\u1DBF":"\u03B8"}),l7={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"},"\u0327":{text:"\\c"}},aQ={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u1E09:"c\u0327\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u00E7:"c\u0327",\u010F:"d\u030C",\u1E0B:"d\u0307",\u1E11:"d\u0327",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u1E1D:"e\u0327\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u0229:"e\u0327",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u0123:"g\u0327",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u1E29:"h\u0327",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u0137:"k\u0327",\u013A:"l\u0301",\u013E:"l\u030C",\u013C:"l\u0327",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u0146:"n\u0327",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u0157:"r\u0327",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u015F:"s\u0327",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u0163:"t\u0327",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u1E08:"C\u0327\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u00C7:"C\u0327",\u010E:"D\u030C",\u1E0A:"D\u0307",\u1E10:"D\u0327",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u1E1C:"E\u0327\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u0228:"E\u0327",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u0122:"G\u0327",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u1E28:"H\u0327",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0136:"K\u0327",\u0139:"L\u0301",\u013D:"L\u030C",\u013B:"L\u0327",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u0145:"N\u0327",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u0156:"R\u0327",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u015E:"S\u0327",\u0164:"T\u030C",\u1E6A:"T\u0307",\u0162:"T\u0327",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"},Xw=class e{static{s(this,"Parser")}constructor(t,r){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new R7(t,r,this.mode),this.settings=r,this.leftrightDepth=0,this.nextToken=null}expect(t,r){if(r===void 0&&(r=!0),this.fetch().text!==t)throw new Nt("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var r=this.nextToken;this.consume(),this.gullet.pushToken(new Bo("}")),this.gullet.pushTokens(t);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(t,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(e.endOfExpression.has(i.text)||r&&i.text===r||t&&Rd[i.text]&&Rd[i.text].infix)break;var a=this.parseAtom(r);if(a){if(a.type==="internal")continue}else break;n.push(a)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(t){for(var r=-1,n,i=0;i=128)this.settings.strict&&(sQ(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),t)),o={type:"textord",mode:"text",loc:so.range(t),text:r};else return null;if(this.consume(),a)for(var d=0;d{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),ao.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}var Up,RWe,_We,uJ,lJ,xr,DWe,IWe,MWe,NWe,hJ,eb,PWe,OWe,Vc,q7,BWe,$We,cJ,lk,si,Yp,FWe,J0,Tt,Yr=F(()=>{"use strict";q0();br();Up=/
/gi,RWe=s(e=>e?hJ(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),_We=(()=>{let e=!1;return()=>{e||(LWe(),e=!0)}})();s(LWe,"setupDompurifyHooks");uJ=s(e=>(_We(),ao.sanitize(e)),"removeScript"),lJ=s((e,t)=>{if(ai(t)){let r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=uJ(e):r!=="loose"&&(e=hJ(e),e=e.replace(//g,">"),e=e.replace(/=/g,"="),e=NWe(e))}return e},"sanitizeMore"),xr=s((e,t)=>e&&(t.dompurifyConfig?e=ao.sanitize(lJ(e,t),t.dompurifyConfig).toString():e=ao.sanitize(lJ(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),DWe=s((e,t)=>typeof e=="string"?xr(e,t):e.flat().map(r=>xr(r,t)),"sanitizeTextOrArray"),IWe=s(e=>Up.test(e),"hasBreaks"),MWe=s(e=>e.split(Up),"splitBreaks"),NWe=s(e=>e.replace(/#br#/g,"
"),"placeholderToBreak"),hJ=s(e=>e.replace(Up,"#br#"),"breakToPlaceholder"),eb=s(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),PWe=s(function(...e){let t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),OWe=s(function(...e){let t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Vc=s(function(e){let t=e.split(/(,)/),r=[];for(let n=0;n0&&n+1Math.max(0,e.split(t).length-1),"countOccurrence"),BWe=s((e,t)=>{let r=q7(e,"~"),n=q7(t,"~");return r===1&&n===1},"shouldCombineSets"),$We=s(e=>{let t=q7(e,"~"),r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);let n=[...e],i=n.indexOf("~"),a=n.lastIndexOf("~");for(;i!==-1&&a!==-1&&i!==a;)n[i]="<",n[a]=">",i=n.indexOf("~"),a=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),cJ=s(()=>window.MathMLElement!==void 0,"isMathMLSupported"),lk=/\$\$(.*?)\$\$/g,si=s(e=>(e.match(lk)?.length??0)>0,"hasKatex"),Yp=s(async(e,t)=>{let r=document.createElement("div");r.innerHTML=await J0(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);let i={width:r.clientWidth,height:r.clientHeight};return r.remove(),i},"calculateMathMLDimensions"),FWe=s(async(e,t)=>{if(!si(e))return e;if(!(cJ()||t.legacyMathML||t.forceLegacyMathML))return e.replace(lk,"MathML is unsupported in this environment.");{let{default:r}=await Promise.resolve().then(()=>(oJ(),sJ)),n=t.forceLegacyMathML||!cJ()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Up).map(i=>si(i)?`${i}
`:`${i}
`).join("").replace(lk,(i,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(//g,""))}return e.replace(lk,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.")},"renderKatexUnsanitized"),J0=s(async(e,t)=>xr(await FWe(e,t),t),"renderKatexSanitized"),Tt={getRows:RWe,sanitizeText:xr,sanitizeTextOrArray:DWe,hasBreaks:IWe,splitBreaks:MWe,lineBreakRegex:Up,removeScript:uJ,getUrl:eb,evaluate:Aa,getMax:PWe,getMin:OWe}});var U7,H7,dJ,ey,fJ,pJ,ps,Hl=F(()=>{"use strict";eK();br();Yr();St();U7={body:'?',height:80,width:80},H7=new Map,dJ=new Map,ey=s(e=>{for(let t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(se.debug("Registering icon pack:",t.name),"loader"in t)dJ.set(t.name,t.loader);else if("icons"in t)H7.set(t.name,t.icons);else throw se.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),fJ=s(async(e,t)=>{let r=hD(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);let n=r.prefix||t;if(!n)throw new Error(`Icon name must contain a prefix: ${e}`);let i=H7.get(n);if(!i){let o=dJ.get(n);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{i={...await o(),prefix:n},H7.set(n,i)}catch(l){throw se.error(l),new Error(`Failed to load icon set: ${r.prefix}`)}}let a=fD(i,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),pJ=s(async e=>{try{return await fJ(e),!0}catch{return!1}},"isIconAvailable"),ps=s(async(e,t,r)=>{let n;try{n=await fJ(e,t?.fallbackPrefix)}catch(o){se.error(o),n=U7}let i=mD(n,t),a=yD(gD(i.body),{...i.attributes,...r});return xr(a,Lt())},"getIconSVG")});function ck(e){for(var t=[],r=1;r{"use strict";s(ck,"dedent")});var uk,jp,mJ,hk=F(()=>{"use strict";uk=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,jp=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,mJ=/\s*%%.*\n/gm});var ty,j7=F(()=>{"use strict";ty=class extends Error{static{s(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}}});var ch,ry,tb,X7,gJ,Xp=F(()=>{"use strict";St();hk();j7();ch={},ry=s(function(e,t){e=e.replace(uk,"").replace(jp,"").replace(mJ,`
-`);for(let[r,{detector:n}]of Object.entries(ch))if(n(e,t))return r;throw new ty(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),tb=s((...e)=>{for(let{id:t,detector:r,loader:n}of e)X7(t,r,n)},"registerLazyLoadedDiagrams"),X7=s((e,t,r)=>{ch[e]&&se.warn(`Detector with key ${e} already exists. Overwriting.`),ch[e]={detector:t,loader:r},se.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),gJ=s(e=>ch[e].loader,"getDiagramLoader")});var rb,yJ,K7=F(()=>{"use strict";rb=(function(){var e=s(function(ue,le,he,Te){for(he=he||{},Te=ue.length;Te--;he[ue[Te]]=le);return he},"o"),t=[1,24],r=[1,25],n=[1,26],i=[1,27],a=[1,28],o=[1,63],l=[1,64],u=[1,65],h=[1,66],d=[1,67],f=[1,68],p=[1,69],m=[1,29],g=[1,30],y=[1,31],v=[1,32],x=[1,33],b=[1,34],T=[1,35],w=[1,36],C=[1,37],S=[1,38],k=[1,39],R=[1,40],M=[1,41],P=[1,42],N=[1,43],_=[1,44],A=[1,45],I=[1,46],D=[1,47],L=[1,48],B=[1,50],O=[1,51],$=[1,52],W=[1,53],V=[1,54],z=[1,55],H=[1,56],K=[1,57],J=[1,58],ne=[1,59],Z=[1,60],pe=[14,42],te=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],fe=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ce=[1,82],de=[1,83],Ee=[1,84],we=[1,85],Fe=[12,14,42],Ye=[12,14,33,42],He=[12,14,33,42,76,77,79,80],ye=[12,33],Be=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ie={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:s(function(le,he,Te,oe,G,X,ee){var q=X.length-1;switch(G){case 3:oe.setDirection("TB");break;case 4:oe.setDirection("BT");break;case 5:oe.setDirection("RL");break;case 6:oe.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:oe.setC4Type(X[q-3]);break;case 19:oe.setTitle(X[q].substring(6)),this.$=X[q].substring(6);break;case 20:oe.setAccDescription(X[q].substring(15)),this.$=X[q].substring(15);break;case 21:this.$=X[q].trim(),oe.setTitle(this.$);break;case 22:case 23:this.$=X[q].trim(),oe.setAccDescription(this.$);break;case 28:X[q].splice(2,0,"ENTERPRISE"),oe.addPersonOrSystemBoundary(...X[q]),this.$=X[q];break;case 29:X[q].splice(2,0,"SYSTEM"),oe.addPersonOrSystemBoundary(...X[q]),this.$=X[q];break;case 30:oe.addPersonOrSystemBoundary(...X[q]),this.$=X[q];break;case 31:X[q].splice(2,0,"CONTAINER"),oe.addContainerBoundary(...X[q]),this.$=X[q];break;case 32:oe.addDeploymentNode("node",...X[q]),this.$=X[q];break;case 33:oe.addDeploymentNode("nodeL",...X[q]),this.$=X[q];break;case 34:oe.addDeploymentNode("nodeR",...X[q]),this.$=X[q];break;case 35:oe.popBoundaryParseStack();break;case 39:oe.addPersonOrSystem("person",...X[q]),this.$=X[q];break;case 40:oe.addPersonOrSystem("external_person",...X[q]),this.$=X[q];break;case 41:oe.addPersonOrSystem("system",...X[q]),this.$=X[q];break;case 42:oe.addPersonOrSystem("system_db",...X[q]),this.$=X[q];break;case 43:oe.addPersonOrSystem("system_queue",...X[q]),this.$=X[q];break;case 44:oe.addPersonOrSystem("external_system",...X[q]),this.$=X[q];break;case 45:oe.addPersonOrSystem("external_system_db",...X[q]),this.$=X[q];break;case 46:oe.addPersonOrSystem("external_system_queue",...X[q]),this.$=X[q];break;case 47:oe.addContainer("container",...X[q]),this.$=X[q];break;case 48:oe.addContainer("container_db",...X[q]),this.$=X[q];break;case 49:oe.addContainer("container_queue",...X[q]),this.$=X[q];break;case 50:oe.addContainer("external_container",...X[q]),this.$=X[q];break;case 51:oe.addContainer("external_container_db",...X[q]),this.$=X[q];break;case 52:oe.addContainer("external_container_queue",...X[q]),this.$=X[q];break;case 53:oe.addComponent("component",...X[q]),this.$=X[q];break;case 54:oe.addComponent("component_db",...X[q]),this.$=X[q];break;case 55:oe.addComponent("component_queue",...X[q]),this.$=X[q];break;case 56:oe.addComponent("external_component",...X[q]),this.$=X[q];break;case 57:oe.addComponent("external_component_db",...X[q]),this.$=X[q];break;case 58:oe.addComponent("external_component_queue",...X[q]),this.$=X[q];break;case 60:oe.addRel("rel",...X[q]),this.$=X[q];break;case 61:oe.addRel("birel",...X[q]),this.$=X[q];break;case 62:oe.addRel("rel_u",...X[q]),this.$=X[q];break;case 63:oe.addRel("rel_d",...X[q]),this.$=X[q];break;case 64:oe.addRel("rel_l",...X[q]),this.$=X[q];break;case 65:oe.addRel("rel_r",...X[q]),this.$=X[q];break;case 66:oe.addRel("rel_b",...X[q]),this.$=X[q];break;case 67:X[q].splice(0,1),oe.addRel("rel",...X[q]),this.$=X[q];break;case 68:oe.updateElStyle("update_el_style",...X[q]),this.$=X[q];break;case 69:oe.updateRelStyle("update_rel_style",...X[q]),this.$=X[q];break;case 70:oe.updateLayoutConfig("update_layout_config",...X[q]),this.$=X[q];break;case 71:this.$=[X[q]];break;case 72:X[q].unshift(X[q-1]),this.$=X[q];break;case 73:case 75:this.$=X[q].trim();break;case 74:let ie={};ie[X[q-1].trim()]=X[q].trim(),this.$=ie;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:d,40:f,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:T,51:w,52:C,53:S,54:k,55:R,56:M,57:P,58:N,59:_,60:A,61:I,62:D,63:L,64:B,65:O,66:$,67:W,68:V,69:z,70:H,71:K,72:J,73:ne,74:Z},{13:70,19:20,20:21,21:22,22:t,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:d,40:f,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:T,51:w,52:C,53:S,54:k,55:R,56:M,57:P,58:N,59:_,60:A,61:I,62:D,63:L,64:B,65:O,66:$,67:W,68:V,69:z,70:H,71:K,72:J,73:ne,74:Z},{13:71,19:20,20:21,21:22,22:t,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:d,40:f,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:T,51:w,52:C,53:S,54:k,55:R,56:M,57:P,58:N,59:_,60:A,61:I,62:D,63:L,64:B,65:O,66:$,67:W,68:V,69:z,70:H,71:K,72:J,73:ne,74:Z},{13:72,19:20,20:21,21:22,22:t,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:d,40:f,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:T,51:w,52:C,53:S,54:k,55:R,56:M,57:P,58:N,59:_,60:A,61:I,62:D,63:L,64:B,65:O,66:$,67:W,68:V,69:z,70:H,71:K,72:J,73:ne,74:Z},{13:73,19:20,20:21,21:22,22:t,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:d,40:f,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:T,51:w,52:C,53:S,54:k,55:R,56:M,57:P,58:N,59:_,60:A,61:I,62:D,63:L,64:B,65:O,66:$,67:W,68:V,69:z,70:H,71:K,72:J,73:ne,74:Z},{14:[1,74]},e(pe,[2,13],{43:23,29:49,30:61,32:62,20:75,34:o,36:l,37:u,38:h,39:d,40:f,41:p,44:m,45:g,46:y,47:v,48:x,49:b,50:T,51:w,52:C,53:S,54:k,55:R,56:M,57:P,58:N,59:_,60:A,61:I,62:D,63:L,64:B,65:O,66:$,67:W,68:V,69:z,70:H,71:K,72:J,73:ne,74:Z}),e(pe,[2,14]),e(te,[2,16],{12:[1,76]}),e(pe,[2,36],{12:[1,77]}),e(fe,[2,19]),e(fe,[2,20]),{25:[1,78]},{27:[1,79]},e(fe,[2,23]),{35:80,75:81,76:ce,77:de,79:Ee,80:we},{35:86,75:81,76:ce,77:de,79:Ee,80:we},{35:87,75:81,76:ce,77:de,79:Ee,80:we},{35:88,75:81,76:ce,77:de,79:Ee,80:we},{35:89,75:81,76:ce,77:de,79:Ee,80:we},{35:90,75:81,76:ce,77:de,79:Ee,80:we},{35:91,75:81,76:ce,77:de,79:Ee,80:we},{35:92,75:81,76:ce,77:de,79:Ee,80:we},{35:93,75:81,76:ce,77:de,79:Ee,80:we},{35:94,75:81,76:ce,77:de,79:Ee,80:we},{35:95,75:81,76:ce,77:de,79:Ee,80:we},{35:96,75:81,76:ce,77:de,79:Ee,80:we},{35:97,75:81,76:ce,77:de,79:Ee,80:we},{35:98,75:81,76:ce,77:de,79:Ee,80:we},{35:99,75:81,76:ce,77:de,79:Ee,80:we},{35:100,75:81,76:ce,77:de,79:Ee,80:we},{35:101,75:81,76:ce,77:de,79:Ee,80:we},{35:102,75:81,76:ce,77:de,79:Ee,80:we},{35:103,75:81,76:ce,77:de,79:Ee,80:we},{35:104,75:81,76:ce,77:de,79:Ee,80:we},e(Fe,[2,59]),{35:105,75:81,76:ce,77:de,79:Ee,80:we},{35:106,75:81,76:ce,77:de,79:Ee,80:we},{35:107,75:81,76:ce,77:de,79:Ee,80:we},{35:108,75:81,76:ce,77:de,79:Ee,80:we},{35:109,75:81,76:ce,77:de,79:Ee,80:we},{35:110,75:81,76:ce,77:de,79:Ee,80:we},{35:111,75:81,76:ce,77:de,79:Ee,80:we},{35:112,75:81,76:ce,77:de,79:Ee,80:we},{35:113,75:81,76:ce,77:de,79:Ee,80:we},{35:114,75:81,76:ce,77:de,79:Ee,80:we},{35:115,75:81,76:ce,77:de,79:Ee,80:we},{20:116,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:d,40:f,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:T,51:w,52:C,53:S,54:k,55:R,56:M,57:P,58:N,59:_,60:A,61:I,62:D,63:L,64:B,65:O,66:$,67:W,68:V,69:z,70:H,71:K,72:J,73:ne,74:Z},{12:[1,118],33:[1,117]},{35:119,75:81,76:ce,77:de,79:Ee,80:we},{35:120,75:81,76:ce,77:de,79:Ee,80:we},{35:121,75:81,76:ce,77:de,79:Ee,80:we},{35:122,75:81,76:ce,77:de,79:Ee,80:we},{35:123,75:81,76:ce,77:de,79:Ee,80:we},{35:124,75:81,76:ce,77:de,79:Ee,80:we},{35:125,75:81,76:ce,77:de,79:Ee,80:we},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(pe,[2,15]),e(te,[2,17],{21:22,19:130,22:t,23:r,24:n,26:i,28:a}),e(pe,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:r,24:n,26:i,28:a,34:o,36:l,37:u,38:h,39:d,40:f,41:p,44:m,45:g,46:y,47:v,48:x,49:b,50:T,51:w,52:C,53:S,54:k,55:R,56:M,57:P,58:N,59:_,60:A,61:I,62:D,63:L,64:B,65:O,66:$,67:W,68:V,69:z,70:H,71:K,72:J,73:ne,74:Z}),e(fe,[2,21]),e(fe,[2,22]),e(Fe,[2,39]),e(Ye,[2,71],{75:81,35:132,76:ce,77:de,79:Ee,80:we}),e(He,[2,73]),{78:[1,133]},e(He,[2,75]),e(He,[2,76]),e(Fe,[2,40]),e(Fe,[2,41]),e(Fe,[2,42]),e(Fe,[2,43]),e(Fe,[2,44]),e(Fe,[2,45]),e(Fe,[2,46]),e(Fe,[2,47]),e(Fe,[2,48]),e(Fe,[2,49]),e(Fe,[2,50]),e(Fe,[2,51]),e(Fe,[2,52]),e(Fe,[2,53]),e(Fe,[2,54]),e(Fe,[2,55]),e(Fe,[2,56]),e(Fe,[2,57]),e(Fe,[2,58]),e(Fe,[2,60]),e(Fe,[2,61]),e(Fe,[2,62]),e(Fe,[2,63]),e(Fe,[2,64]),e(Fe,[2,65]),e(Fe,[2,66]),e(Fe,[2,67]),e(Fe,[2,68]),e(Fe,[2,69]),e(Fe,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(ye,[2,28]),e(ye,[2,29]),e(ye,[2,30]),e(ye,[2,31]),e(ye,[2,32]),e(ye,[2,33]),e(ye,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(te,[2,18]),e(pe,[2,38]),e(Ye,[2,72]),e(He,[2,74]),e(Fe,[2,24]),e(Fe,[2,35]),e(Be,[2,25]),e(Be,[2,26],{12:[1,138]}),e(Be,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:s(function(le,he){if(he.recoverable)this.trace(le);else{var Te=new Error(le);throw Te.hash=he,Te}},"parseError"),parse:s(function(le){var he=this,Te=[0],oe=[],G=[null],X=[],ee=this.table,q="",ie=0,j=0,U=0,Y=2,Ae=1,me=X.slice.call(arguments,1),Se=Object.create(this.lexer),Ce={yy:{}};for(var Me in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Me)&&(Ce.yy[Me]=this.yy[Me]);Se.setInput(le,Ce.yy),Ce.yy.lexer=Se,Ce.yy.parser=this,typeof Se.yylloc>"u"&&(Se.yylloc={});var _e=Se.yylloc;X.push(_e);var ze=Se.options&&Se.options.ranges;typeof Ce.yy.parseError=="function"?this.parseError=Ce.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Le(Ke){Te.length=Te.length-2*Ke,G.length=G.length-Ke,X.length=X.length-Ke}s(Le,"popStack");function qe(){var Ke;return Ke=oe.pop()||Se.lex()||Ae,typeof Ke!="number"&&(Ke instanceof Array&&(oe=Ke,Ke=oe.pop()),Ke=he.symbols_[Ke]||Ke),Ke}s(qe,"lex");for(var ve,lt,Oe,mt,At,Gt,Ct={},Rt,gt,be,ct;;){if(Oe=Te[Te.length-1],this.defaultActions[Oe]?mt=this.defaultActions[Oe]:((ve===null||typeof ve>"u")&&(ve=qe()),mt=ee[Oe]&&ee[Oe][ve]),typeof mt>"u"||!mt.length||!mt[0]){var xt="";ct=[];for(Rt in ee[Oe])this.terminals_[Rt]&&Rt>Y&&ct.push("'"+this.terminals_[Rt]+"'");Se.showPosition?xt="Parse error on line "+(ie+1)+`:
-`+Se.showPosition()+`
-Expecting `+ct.join(", ")+", got '"+(this.terminals_[ve]||ve)+"'":xt="Parse error on line "+(ie+1)+": Unexpected "+(ve==Ae?"end of input":"'"+(this.terminals_[ve]||ve)+"'"),this.parseError(xt,{text:Se.match,token:this.terminals_[ve]||ve,line:Se.yylineno,loc:_e,expected:ct})}if(mt[0]instanceof Array&&mt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Oe+", token: "+ve);switch(mt[0]){case 1:Te.push(ve),G.push(Se.yytext),X.push(Se.yylloc),Te.push(mt[1]),ve=null,lt?(ve=lt,lt=null):(j=Se.yyleng,q=Se.yytext,ie=Se.yylineno,_e=Se.yylloc,U>0&&U--);break;case 2:if(gt=this.productions_[mt[1]][1],Ct.$=G[G.length-gt],Ct._$={first_line:X[X.length-(gt||1)].first_line,last_line:X[X.length-1].last_line,first_column:X[X.length-(gt||1)].first_column,last_column:X[X.length-1].last_column},ze&&(Ct._$.range=[X[X.length-(gt||1)].range[0],X[X.length-1].range[1]]),Gt=this.performAction.apply(Ct,[q,j,ie,Ce.yy,mt[1],G,X].concat(me)),typeof Gt<"u")return Gt;gt&&(Te=Te.slice(0,-1*gt*2),G=G.slice(0,-1*gt),X=X.slice(0,-1*gt)),Te.push(this.productions_[mt[1]][0]),G.push(Ct.$),X.push(Ct._$),be=ee[Te[Te.length-2]][Te[Te.length-1]],Te.push(be);break;case 3:return!0}}return!0},"parse")},Ne=(function(){var ue={EOF:1,parseError:s(function(he,Te){if(this.yy.parser)this.yy.parser.parseError(he,Te);else throw new Error(he)},"parseError"),setInput:s(function(le,he){return this.yy=he||this.yy||{},this._input=le,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var le=this._input[0];this.yytext+=le,this.yyleng++,this.offset++,this.match+=le,this.matched+=le;var he=le.match(/(?:\r\n?|\n).*/g);return he?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),le},"input"),unput:s(function(le){var he=le.length,Te=le.split(/(?:\r\n?|\n)/g);this._input=le+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-he),this.offset-=he;var oe=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Te.length-1&&(this.yylineno-=Te.length-1);var G=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Te?(Te.length===oe.length?this.yylloc.first_column:0)+oe[oe.length-Te.length].length-Te[0].length:this.yylloc.first_column-he},this.options.ranges&&(this.yylloc.range=[G[0],G[0]+this.yyleng-he]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
-`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(le){this.unput(this.match.slice(le))},"less"),pastInput:s(function(){var le=this.matched.substr(0,this.matched.length-this.match.length);return(le.length>20?"...":"")+le.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var le=this.match;return le.length<20&&(le+=this._input.substr(0,20-le.length)),(le.substr(0,20)+(le.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var le=this.pastInput(),he=new Array(le.length+1).join("-");return le+this.upcomingInput()+`
-`+he+"^"},"showPosition"),test_match:s(function(le,he){var Te,oe,G;if(this.options.backtrack_lexer&&(G={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(G.yylloc.range=this.yylloc.range.slice(0))),oe=le[0].match(/(?:\r\n?|\n).*/g),oe&&(this.yylineno+=oe.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:oe?oe[oe.length-1].length-oe[oe.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+le[0].length},this.yytext+=le[0],this.match+=le[0],this.matches=le,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(le[0].length),this.matched+=le[0],Te=this.performAction.call(this,this.yy,this,he,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Te)return Te;if(this._backtrack){for(var X in G)this[X]=G[X];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var le,he,Te,oe;this._more||(this.yytext="",this.match="");for(var G=this._currentRules(),X=0;Xhe[0].length)){if(he=Te,oe=X,this.options.backtrack_lexer){if(le=this.test_match(Te,G[X]),le!==!1)return le;if(this._backtrack){he=!1;continue}else return!1}else if(!this.options.flex)break}return he?(le=this.test_match(he,G[oe]),le!==!1?le:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
-`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var he=this.next();return he||this.lex()},"lex"),begin:s(function(he){this.conditionStack.push(he)},"begin"),popState:s(function(){var he=this.conditionStack.length-1;return he>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(he){return he=this.conditionStack.length-1-Math.abs(he||0),he>=0?this.conditionStack[he]:"INITIAL"},"topState"),pushState:s(function(he){this.begin(he)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:s(function(he,Te,oe,G){var X=G;switch(oe){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),26;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;break;case 23:return this.begin("person"),44;break;case 24:return this.begin("system_ext_queue"),51;break;case 25:return this.begin("system_ext_db"),50;break;case 26:return this.begin("system_ext"),49;break;case 27:return this.begin("system_queue"),48;break;case 28:return this.begin("system_db"),47;break;case 29:return this.begin("system"),46;break;case 30:return this.begin("boundary"),37;break;case 31:return this.begin("enterprise_boundary"),34;break;case 32:return this.begin("system_boundary"),36;break;case 33:return this.begin("container_ext_queue"),57;break;case 34:return this.begin("container_ext_db"),56;break;case 35:return this.begin("container_ext"),55;break;case 36:return this.begin("container_queue"),54;break;case 37:return this.begin("container_db"),53;break;case 38:return this.begin("container"),52;break;case 39:return this.begin("container_boundary"),38;break;case 40:return this.begin("component_ext_queue"),63;break;case 41:return this.begin("component_ext_db"),62;break;case 42:return this.begin("component_ext"),61;break;case 43:return this.begin("component_queue"),60;break;case 44:return this.begin("component_db"),59;break;case 45:return this.begin("component"),58;break;case 46:return this.begin("node"),39;break;case 47:return this.begin("node"),39;break;case 48:return this.begin("node_l"),40;break;case 49:return this.begin("node_r"),41;break;case 50:return this.begin("rel"),64;break;case 51:return this.begin("birel"),65;break;case 52:return this.begin("rel_u"),66;break;case 53:return this.begin("rel_u"),66;break;case 54:return this.begin("rel_d"),67;break;case 55:return this.begin("rel_d"),67;break;case 56:return this.begin("rel_l"),68;break;case 57:return this.begin("rel_l"),68;break;case 58:return this.begin("rel_r"),69;break;case 59:return this.begin("rel_r"),69;break;case 60:return this.begin("rel_b"),70;break;case 61:return this.begin("rel_index"),71;break;case 62:return this.begin("update_el_style"),72;break;case 63:return this.begin("update_rel_style"),73;break;case 64:return this.begin("update_layout_config"),74;break;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";break;case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";break;case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[65,66,67,68],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return ue})();Ie.lexer=Ne;function re(){this.yy={}}return s(re,"Parser"),re.prototype=Ie,Ie.Parser=re,new re})();rb.parser=rb;yJ=rb});var GWe,zWe,jr,ml,Vn=F(()=>{"use strict";St();GWe=s(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),zWe=s(function(e,t,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${t}px;`)):(n.set("height",e),n.set("width",t)),n},"calculateSvgSizeAttrs"),jr=s(function(e,t,r,n){let i=zWe(t,r,n);GWe(e,i)},"configureSvgSize"),ml=s(function(e,t,r,n){let i=t.node().getBBox(),a=i.width,o=i.height;se.info(`SVG bounds: ${a}x${o}`,i);let l=0,u=0;se.info(`Graph bounds: ${l}x${u}`,e),l=a+r*2,u=o+r*2,se.info(`Calculated bounds: ${l}x${u}`),jr(t,u,l,n);let h=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox")});function Z7(e){return[...e.cssRules].map(t=>t.cssText).join(`
-`)}var dk,VWe,vJ,xJ,Q7=F(()=>{"use strict";St();dk={};s(Z7,"cssStyleSheetToString");VWe=s((e,t,r,n)=>{let i="";return e in dk&&dk[e]?i=dk[e]({...r,svgId:n}):se.warn(`No theme found for ${e}`),`& {
- font-family: ${r.fontFamily};
- font-size: ${r.fontSize};
- fill: ${r.textColor}
+?)[ \r ]*`,Cqe="[\u0300-\u036F]",uAn=new RegExp(Cqe+"+$"),hAn="("+nlr+"+)|"+(cAn+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(Cqe+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Cqe+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+lAn)+("|"+oAn+")"),Kye=class{static{i(this,"Lexer")}constructor(t,a){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=a,this.tokenRegex=new RegExp(hAn,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,a){this.catcodes[t]=a}lex(){var t=this.input,a=this.tokenRegex.lastIndex;if(a===t.length)return new Iw("EOF",new Wv(this,a,a));var o=this.tokenRegex.exec(t);if(o===null||o.index!==a)throw new Ui("Unexpected character: '"+t[a]+"'",new Iw(t[a],new Wv(this,a,a+1)));var l=o[6]||o[3]||(o[2]?"\\ ":" ");if(this.catcodes[l]===14){var h=t.indexOf(`
+`,this.tokenRegex.lastIndex);return h===-1?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=h+1,this.lex()}return new Iw(l,new Wv(this,a,this.tokenRegex.lastIndex))}},Eqe=class{static{i(this,"Namespace")}constructor(t,a){t===void 0&&(t={}),a===void 0&&(a={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=a,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new Ui("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var a in t)t.hasOwnProperty(a)&&(t[a]==null?delete this.current[a]:this.current[a]=t[a])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,a,o){if(o===void 0&&(o=!1),o){for(var l=0;l0&&(this.undefStack[this.undefStack.length-1][t]=a)}else{var h=this.undefStack[this.undefStack.length-1];h&&!h.hasOwnProperty(t)&&(h[t]=this.current[t])}a==null?delete this.current[t]:this.current[t]=a}},fAn=qor;yt("\\noexpand",function(r){var t=r.popToken();return r.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});yt("\\expandafter",function(r){var t=r.popToken();return r.expandOnce(!0),{tokens:[t],numArgs:0}});yt("\\@firstoftwo",function(r){var t=r.consumeArgs(2);return{tokens:t[0],numArgs:0}});yt("\\@secondoftwo",function(r){var t=r.consumeArgs(2);return{tokens:t[1],numArgs:0}});yt("\\@ifnextchar",function(r){var t=r.consumeArgs(3);r.consumeSpaces();var a=r.future();return t[0].length===1&&t[0][0].text===a.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});yt("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");yt("\\TextOrMath",function(r){var t=r.consumeArgs(2);return r.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});lor={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};yt("\\char",function(r){var t=r.popToken(),a,o=0;if(t.text==="'")a=8,t=r.popToken();else if(t.text==='"')a=16,t=r.popToken();else if(t.text==="`")if(t=r.popToken(),t.text[0]==="\\")o=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new Ui("\\char` missing argument");o=t.text.charCodeAt(0)}else a=10;if(a){if(o=lor[t.text],o==null||o>=a)throw new Ui("Invalid base-"+a+" digit "+t.text);for(var l;(l=lor[r.future().text])!=null&&l{var l=r.consumeArg().tokens;if(l.length!==1)throw new Ui("\\newcommand's first argument must be a macro name");var h=l[0].text,f=r.isDefined(h);if(f&&!t)throw new Ui("\\newcommand{"+h+"} attempting to redefine "+(h+"; use \\renewcommand"));if(!f&&!a)throw new Ui("\\renewcommand{"+h+"} when command "+h+" does not yet exist; use \\newcommand");var p=0;if(l=r.consumeArg().tokens,l.length===1&&l[0].text==="["){for(var m="",b=r.expandNextToken();b.text!=="]"&&b.text!=="EOF";)m+=b.text,b=r.expandNextToken();if(!m.match(/^\s*[0-9]+\s*$/))throw new Ui("Invalid number of arguments: "+m);p=parseInt(m),l=r.consumeArg().tokens}return f&&o||r.macros.set(h,{tokens:l,numArgs:p}),""},"newcommand");yt("\\newcommand",r=>Fqe(r,!1,!0,!1));yt("\\renewcommand",r=>Fqe(r,!0,!1,!1));yt("\\providecommand",r=>Fqe(r,!0,!0,!0));yt("\\message",r=>{var t=r.consumeArgs(1)[0];return console.log(t.reverse().map(a=>a.text).join("")),""});yt("\\errmessage",r=>{var t=r.consumeArgs(1)[0];return console.error(t.reverse().map(a=>a.text).join("")),""});yt("\\show",r=>{var t=r.popToken(),a=t.text;return console.log(t,r.macros.get(a),sL[a],Hf.math[a],Hf.text[a]),""});yt("\\bgroup","{");yt("\\egroup","}");yt("~","\\nobreakspace");yt("\\lq","`");yt("\\rq","'");yt("\\aa","\\r a");yt("\\AA","\\r A");yt("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}");yt("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");yt("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}");yt("\u212C","\\mathscr{B}");yt("\u2130","\\mathscr{E}");yt("\u2131","\\mathscr{F}");yt("\u210B","\\mathscr{H}");yt("\u2110","\\mathscr{I}");yt("\u2112","\\mathscr{L}");yt("\u2133","\\mathscr{M}");yt("\u211B","\\mathscr{R}");yt("\u212D","\\mathfrak{C}");yt("\u210C","\\mathfrak{H}");yt("\u2128","\\mathfrak{Z}");yt("\\Bbbk","\\Bbb{k}");yt("\\llap","\\mathllap{\\textrm{#1}}");yt("\\rlap","\\mathrlap{\\textrm{#1}}");yt("\\clap","\\mathclap{\\textrm{#1}}");yt("\\mathstrut","\\vphantom{(}");yt("\\underbar","\\underline{\\text{#1}}");yt("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');yt("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}");yt("\\ne","\\neq");yt("\u2260","\\neq");yt("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}");yt("\u2209","\\notin");yt("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}");yt("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}");yt("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}");yt("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}");yt("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}");yt("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}");yt("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}");yt("\u27C2","\\perp");yt("\u203C","\\mathclose{!\\mkern-0.8mu!}");yt("\u220C","\\notni");yt("\u231C","\\ulcorner");yt("\u231D","\\urcorner");yt("\u231E","\\llcorner");yt("\u231F","\\lrcorner");yt("\xA9","\\copyright");yt("\xAE","\\textregistered");yt("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');yt("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');yt("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');yt("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');yt("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");yt("\u22EE","\\vdots");yt("\\varGamma","\\mathit{\\Gamma}");yt("\\varDelta","\\mathit{\\Delta}");yt("\\varTheta","\\mathit{\\Theta}");yt("\\varLambda","\\mathit{\\Lambda}");yt("\\varXi","\\mathit{\\Xi}");yt("\\varPi","\\mathit{\\Pi}");yt("\\varSigma","\\mathit{\\Sigma}");yt("\\varUpsilon","\\mathit{\\Upsilon}");yt("\\varPhi","\\mathit{\\Phi}");yt("\\varPsi","\\mathit{\\Psi}");yt("\\varOmega","\\mathit{\\Omega}");yt("\\substack","\\begin{subarray}{c}#1\\end{subarray}");yt("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");yt("\\boxed","\\fbox{$\\displaystyle{#1}$}");yt("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");yt("\\implies","\\DOTSB\\;\\Longrightarrow\\;");yt("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");yt("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");yt("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");cor={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},dAn=new Set(["bin","rel"]);yt("\\dots",function(r){var t="\\dotso",a=r.expandAfterFuture().text;return a in cor?t=cor[a]:(a.slice(0,4)==="\\not"||a in Hf.math&&dAn.has(Hf.math[a].group))&&(t="\\dotsb"),t});$qe={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};yt("\\dotso",function(r){var t=r.future().text;return t in $qe?"\\ldots\\,":"\\ldots"});yt("\\dotsc",function(r){var t=r.future().text;return t in $qe&&t!==","?"\\ldots\\,":"\\ldots"});yt("\\cdots",function(r){var t=r.future().text;return t in $qe?"\\@cdots\\,":"\\@cdots"});yt("\\dotsb","\\cdots");yt("\\dotsm","\\cdots");yt("\\dotsi","\\!\\cdots");yt("\\dotsx","\\ldots\\,");yt("\\DOTSI","\\relax");yt("\\DOTSB","\\relax");yt("\\DOTSX","\\relax");yt("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");yt("\\,","\\tmspace+{3mu}{.1667em}");yt("\\thinspace","\\,");yt("\\>","\\mskip{4mu}");yt("\\:","\\tmspace+{4mu}{.2222em}");yt("\\medspace","\\:");yt("\\;","\\tmspace+{5mu}{.2777em}");yt("\\thickspace","\\;");yt("\\!","\\tmspace-{3mu}{.1667em}");yt("\\negthinspace","\\!");yt("\\negmedspace","\\tmspace-{4mu}{.2222em}");yt("\\negthickspace","\\tmspace-{5mu}{.277em}");yt("\\enspace","\\kern.5em ");yt("\\enskip","\\hskip.5em\\relax");yt("\\quad","\\hskip1em\\relax");yt("\\qquad","\\hskip2em\\relax");yt("\\tag","\\@ifstar\\tag@literal\\tag@paren");yt("\\tag@paren","\\tag@literal{({#1})}");yt("\\tag@literal",r=>{if(r.macros.get("\\df@tag"))throw new Ui("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});yt("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");yt("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");yt("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");yt("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");yt("\\newline","\\\\\\relax");yt("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");ilr=Ki(NE["Main-Regular"][84][1]-.7*NE["Main-Regular"][65][1]);yt("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+ilr+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");yt("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+ilr+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");yt("\\hspace","\\@ifstar\\@hspacer\\@hspace");yt("\\@hspace","\\hskip #1\\relax");yt("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");yt("\\ordinarycolon",":");yt("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");yt("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');yt("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');yt("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');yt("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');yt("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');yt("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');yt("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');yt("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');yt("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');yt("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');yt("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');yt("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');yt("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');yt("\u2237","\\dblcolon");yt("\u2239","\\eqcolon");yt("\u2254","\\coloneqq");yt("\u2255","\\eqqcolon");yt("\u2A74","\\Coloneqq");yt("\\ratio","\\vcentcolon");yt("\\coloncolon","\\dblcolon");yt("\\colonequals","\\coloneqq");yt("\\coloncolonequals","\\Coloneqq");yt("\\equalscolon","\\eqqcolon");yt("\\equalscoloncolon","\\Eqqcolon");yt("\\colonminus","\\coloneq");yt("\\coloncolonminus","\\Coloneq");yt("\\minuscolon","\\eqcolon");yt("\\minuscoloncolon","\\Eqcolon");yt("\\coloncolonapprox","\\Colonapprox");yt("\\coloncolonsim","\\Colonsim");yt("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");yt("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");yt("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");yt("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");yt("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");yt("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");yt("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");yt("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");yt("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");yt("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");yt("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");yt("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");yt("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");yt("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}");yt("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}");yt("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}");yt("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}");yt("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}");yt("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}");yt("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}");yt("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}");yt("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}");yt("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}");yt("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}");yt("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}");yt("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}");yt("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}");yt("\\imath","\\html@mathml{\\@imath}{\u0131}");yt("\\jmath","\\html@mathml{\\@jmath}{\u0237}");yt("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}");yt("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}");yt("\u27E6","\\llbracket");yt("\u27E7","\\rrbracket");yt("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}");yt("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}");yt("\u2983","\\lBrace");yt("\u2984","\\rBrace");yt("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}");yt("\u29B5","\\minuso");yt("\\darr","\\downarrow");yt("\\dArr","\\Downarrow");yt("\\Darr","\\Downarrow");yt("\\lang","\\langle");yt("\\rang","\\rangle");yt("\\uarr","\\uparrow");yt("\\uArr","\\Uparrow");yt("\\Uarr","\\Uparrow");yt("\\N","\\mathbb{N}");yt("\\R","\\mathbb{R}");yt("\\Z","\\mathbb{Z}");yt("\\alef","\\aleph");yt("\\alefsym","\\aleph");yt("\\Alpha","\\mathrm{A}");yt("\\Beta","\\mathrm{B}");yt("\\bull","\\bullet");yt("\\Chi","\\mathrm{X}");yt("\\clubs","\\clubsuit");yt("\\cnums","\\mathbb{C}");yt("\\Complex","\\mathbb{C}");yt("\\Dagger","\\ddagger");yt("\\diamonds","\\diamondsuit");yt("\\empty","\\emptyset");yt("\\Epsilon","\\mathrm{E}");yt("\\Eta","\\mathrm{H}");yt("\\exist","\\exists");yt("\\harr","\\leftrightarrow");yt("\\hArr","\\Leftrightarrow");yt("\\Harr","\\Leftrightarrow");yt("\\hearts","\\heartsuit");yt("\\image","\\Im");yt("\\infin","\\infty");yt("\\Iota","\\mathrm{I}");yt("\\isin","\\in");yt("\\Kappa","\\mathrm{K}");yt("\\larr","\\leftarrow");yt("\\lArr","\\Leftarrow");yt("\\Larr","\\Leftarrow");yt("\\lrarr","\\leftrightarrow");yt("\\lrArr","\\Leftrightarrow");yt("\\Lrarr","\\Leftrightarrow");yt("\\Mu","\\mathrm{M}");yt("\\natnums","\\mathbb{N}");yt("\\Nu","\\mathrm{N}");yt("\\Omicron","\\mathrm{O}");yt("\\plusmn","\\pm");yt("\\rarr","\\rightarrow");yt("\\rArr","\\Rightarrow");yt("\\Rarr","\\Rightarrow");yt("\\real","\\Re");yt("\\reals","\\mathbb{R}");yt("\\Reals","\\mathbb{R}");yt("\\Rho","\\mathrm{P}");yt("\\sdot","\\cdot");yt("\\sect","\\S");yt("\\spades","\\spadesuit");yt("\\sub","\\subset");yt("\\sube","\\subseteq");yt("\\supe","\\supseteq");yt("\\Tau","\\mathrm{T}");yt("\\thetasym","\\vartheta");yt("\\weierp","\\wp");yt("\\Zeta","\\mathrm{Z}");yt("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");yt("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");yt("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");yt("\\bra","\\mathinner{\\langle{#1}|}");yt("\\ket","\\mathinner{|{#1}\\rangle}");yt("\\braket","\\mathinner{\\langle{#1}\\rangle}");yt("\\Bra","\\left\\langle#1\\right|");yt("\\Ket","\\left|#1\\right\\rangle");alr=i(r=>t=>{var a=t.consumeArg().tokens,o=t.consumeArg().tokens,l=t.consumeArg().tokens,h=t.consumeArg().tokens,f=t.macros.get("|"),p=t.macros.get("\\|");t.macros.beginGroup();var m=i(T=>C=>{r&&(C.macros.set("|",f),l.length&&C.macros.set("\\|",p));var E=T;if(!T&&l.length){var S=C.future();S.text==="|"&&(C.popToken(),E=!0)}return{tokens:E?l:o,numArgs:0}},"midMacro");t.macros.set("|",m(!1)),l.length&&t.macros.set("\\|",m(!0));var b=t.consumeArg().tokens,v=t.expandTokens([...h,...b,...a]);return t.macros.endGroup(),{tokens:v.reverse(),numArgs:0}},"braketHelper");yt("\\bra@ket",alr(!1));yt("\\bra@set",alr(!0));yt("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");yt("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");yt("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");yt("\\angln","{\\angl n}");yt("\\blue","\\textcolor{##6495ed}{#1}");yt("\\orange","\\textcolor{##ffa500}{#1}");yt("\\pink","\\textcolor{##ff00af}{#1}");yt("\\red","\\textcolor{##df0030}{#1}");yt("\\green","\\textcolor{##28ae7b}{#1}");yt("\\gray","\\textcolor{gray}{#1}");yt("\\purple","\\textcolor{##9d38bd}{#1}");yt("\\blueA","\\textcolor{##ccfaff}{#1}");yt("\\blueB","\\textcolor{##80f6ff}{#1}");yt("\\blueC","\\textcolor{##63d9ea}{#1}");yt("\\blueD","\\textcolor{##11accd}{#1}");yt("\\blueE","\\textcolor{##0c7f99}{#1}");yt("\\tealA","\\textcolor{##94fff5}{#1}");yt("\\tealB","\\textcolor{##26edd5}{#1}");yt("\\tealC","\\textcolor{##01d1c1}{#1}");yt("\\tealD","\\textcolor{##01a995}{#1}");yt("\\tealE","\\textcolor{##208170}{#1}");yt("\\greenA","\\textcolor{##b6ffb0}{#1}");yt("\\greenB","\\textcolor{##8af281}{#1}");yt("\\greenC","\\textcolor{##74cf70}{#1}");yt("\\greenD","\\textcolor{##1fab54}{#1}");yt("\\greenE","\\textcolor{##0d923f}{#1}");yt("\\goldA","\\textcolor{##ffd0a9}{#1}");yt("\\goldB","\\textcolor{##ffbb71}{#1}");yt("\\goldC","\\textcolor{##ff9c39}{#1}");yt("\\goldD","\\textcolor{##e07d10}{#1}");yt("\\goldE","\\textcolor{##a75a05}{#1}");yt("\\redA","\\textcolor{##fca9a9}{#1}");yt("\\redB","\\textcolor{##ff8482}{#1}");yt("\\redC","\\textcolor{##f9685d}{#1}");yt("\\redD","\\textcolor{##e84d39}{#1}");yt("\\redE","\\textcolor{##bc2612}{#1}");yt("\\maroonA","\\textcolor{##ffbde0}{#1}");yt("\\maroonB","\\textcolor{##ff92c6}{#1}");yt("\\maroonC","\\textcolor{##ed5fa6}{#1}");yt("\\maroonD","\\textcolor{##ca337c}{#1}");yt("\\maroonE","\\textcolor{##9e034e}{#1}");yt("\\purpleA","\\textcolor{##ddd7ff}{#1}");yt("\\purpleB","\\textcolor{##c6b9fc}{#1}");yt("\\purpleC","\\textcolor{##aa87ff}{#1}");yt("\\purpleD","\\textcolor{##7854ab}{#1}");yt("\\purpleE","\\textcolor{##543b78}{#1}");yt("\\mintA","\\textcolor{##f5f9e8}{#1}");yt("\\mintB","\\textcolor{##edf2df}{#1}");yt("\\mintC","\\textcolor{##e0e5cc}{#1}");yt("\\grayA","\\textcolor{##f6f7f7}{#1}");yt("\\grayB","\\textcolor{##f0f1f2}{#1}");yt("\\grayC","\\textcolor{##e3e5e6}{#1}");yt("\\grayD","\\textcolor{##d6d8da}{#1}");yt("\\grayE","\\textcolor{##babec2}{#1}");yt("\\grayF","\\textcolor{##888d93}{#1}");yt("\\grayG","\\textcolor{##626569}{#1}");yt("\\grayH","\\textcolor{##3b3e40}{#1}");yt("\\grayI","\\textcolor{##21242c}{#1}");yt("\\kaBlue","\\textcolor{##314453}{#1}");yt("\\kaGreen","\\textcolor{##71B307}{#1}");slr={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Sqe=class{static{i(this,"MacroExpander")}constructor(t,a,o){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=a,this.expansionCount=0,this.feed(t),this.macros=new Eqe(fAn,a.macros),this.mode=o,this.stack=[]}feed(t){this.lexer=new Kye(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var a,o,l;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;a=this.popToken(),{tokens:l,end:o}=this.consumeArg(["]"])}else({tokens:l,start:a,end:o}=this.consumeArg());return this.pushToken(new Iw("EOF",o.loc)),this.pushTokens(l),new Iw("",Wv.range(a,o))}consumeSpaces(){for(;;){var t=this.future();if(t.text===" ")this.stack.pop();else break}}consumeArg(t){var a=[],o=t&&t.length>0;o||this.consumeSpaces();var l=this.future(),h,f=0,p=0;do{if(h=this.popToken(),a.push(h),h.text==="{")++f;else if(h.text==="}"){if(--f,f===-1)throw new Ui("Extra }",h)}else if(h.text==="EOF")throw new Ui("Unexpected end of input in a macro argument, expected '"+(t&&o?t[p]:"}")+"'",h);if(t&&o)if((f===0||f===1&&t[p]==="{")&&h.text===t[p]){if(++p,p===t.length){a.splice(-p,p);break}}else p=0}while(f!==0||o);return l.text==="{"&&a[a.length-1].text==="}"&&(a.pop(),a.shift()),a.reverse(),{tokens:a,start:l,end:h}}consumeArgs(t,a){if(a){if(a.length!==t+1)throw new Ui("The length of delimiters doesn't match the number of args!");for(var o=a[0],l=0;lthis.settings.maxExpand)throw new Ui("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var a=this.popToken(),o=a.text,l=a.noexpand?null:this._getExpansion(o);if(l==null||t&&l.unexpandable){if(t&&l==null&&o[0]==="\\"&&!this.isDefined(o))throw new Ui("Undefined control sequence: "+o);return this.pushToken(a),!1}this.countExpansion(1);var h=l.tokens,f=this.consumeArgs(l.numArgs,l.delimiters);if(l.numArgs){h=h.slice();for(var p=h.length-1;p>=0;--p){var m=h[p];if(m.text==="#"){if(p===0)throw new Ui("Incomplete placeholder at end of macro body",m);if(m=h[--p],m.text==="#")h.splice(p+1,1);else if(/^[1-9]$/.test(m.text))h.splice(p,2,...f[+m.text-1]);else throw new Ui("Not a valid argument number",m)}}}return this.pushTokens(h),h.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}}expandMacro(t){return this.macros.has(t)?this.expandTokens([new Iw(t)]):void 0}expandTokens(t){var a=[],o=this.stack.length;for(this.pushTokens(t);this.stack.length>o;)if(this.expandOnce(!0)===!1){var l=this.stack.pop();l.treatAsRelax&&(l.noexpand=!1,l.treatAsRelax=!1),a.push(l)}return this.countExpansion(a.length),a}expandMacroAsText(t){var a=this.expandMacro(t);return a&&a.map(o=>o.text).join("")}_getExpansion(t){var a=this.macros.get(t);if(a==null)return a;if(t.length===1){var o=this.lexer.catcodes[t];if(o!=null&&o!==13)return}var l=typeof a=="function"?a(this):a;if(typeof l=="string"){var h=0;if(l.includes("#"))for(var f=l.replace(/##/g,"");f.includes("#"+(h+1));)++h;for(var p=new Kye(l,this.settings),m=[],b=p.lex();b.text!=="EOF";)m.push(b),b=p.lex();m.reverse();var v={tokens:m,numArgs:h};return v}return l}isDefined(t){return this.macros.has(t)||sL.hasOwnProperty(t)||Hf.math.hasOwnProperty(t)||Hf.text.hasOwnProperty(t)||slr.hasOwnProperty(t)}isExpandable(t){var a=this.macros.get(t);return a!=null?typeof a=="string"||typeof a=="function"||!a.unexpandable:sL.hasOwnProperty(t)&&!sL[t].primitive}},uor=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Fye=Object.freeze({"\u208A":"+","\u208B":"-","\u208C":"=","\u208D":"(","\u208E":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1D62":"i","\u2C7C":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209A":"p","\u1D63":"r","\u209B":"s","\u209C":"t","\u1D64":"u","\u1D65":"v","\u2093":"x","\u1D66":"\u03B2","\u1D67":"\u03B3","\u1D68":"\u03C1","\u1D69":"\u03D5","\u1D6A":"\u03C7","\u207A":"+","\u207B":"-","\u207C":"=","\u207D":"(","\u207E":")","\u2070":"0","\xB9":"1","\xB2":"2","\xB3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1D2C":"A","\u1D2E":"B","\u1D30":"D","\u1D31":"E","\u1D33":"G","\u1D34":"H","\u1D35":"I","\u1D36":"J","\u1D37":"K","\u1D38":"L","\u1D39":"M","\u1D3A":"N","\u1D3C":"O","\u1D3E":"P","\u1D3F":"R","\u1D40":"T","\u1D41":"U","\u2C7D":"V","\u1D42":"W","\u1D43":"a","\u1D47":"b","\u1D9C":"c","\u1D48":"d","\u1D49":"e","\u1DA0":"f","\u1D4D":"g",\u02B0:"h","\u2071":"i",\u02B2:"j","\u1D4F":"k",\u02E1:"l","\u1D50":"m",\u207F:"n","\u1D52":"o","\u1D56":"p",\u02B3:"r",\u02E2:"s","\u1D57":"t","\u1D58":"u","\u1D5B":"v",\u02B7:"w",\u02E3:"x",\u02B8:"y","\u1DBB":"z","\u1D5D":"\u03B2","\u1D5E":"\u03B3","\u1D5F":"\u03B4","\u1D60":"\u03D5","\u1D61":"\u03C7","\u1DBF":"\u03B8"}),sqe={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"},"\u0327":{text:"\\c"}},hor={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u1E09:"c\u0327\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u00E7:"c\u0327",\u010F:"d\u030C",\u1E0B:"d\u0307",\u1E11:"d\u0327",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u1E1D:"e\u0327\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u0229:"e\u0327",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u0123:"g\u0327",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u1E29:"h\u0327",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u0137:"k\u0327",\u013A:"l\u0301",\u013E:"l\u030C",\u013C:"l\u0327",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u0146:"n\u0327",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u0157:"r\u0327",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u015F:"s\u0327",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u0163:"t\u0327",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u1E08:"C\u0327\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u00C7:"C\u0327",\u010E:"D\u030C",\u1E0A:"D\u0307",\u1E10:"D\u0327",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u1E1C:"E\u0327\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u0228:"E\u0327",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u0122:"G\u0327",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u1E28:"H\u0327",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0136:"K\u0327",\u0139:"L\u0301",\u013D:"L\u030C",\u013B:"L\u0327",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u0145:"N\u0327",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u0156:"R\u0327",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u015E:"S\u0327",\u0164:"T\u030C",\u1E6A:"T\u0307",\u0162:"T\u0327",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"},Xye=class r{static{i(this,"Parser")}constructor(t,a){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Sqe(t,a,this.mode),this.settings=a,this.leftrightDepth=0,this.nextToken=null}expect(t,a){if(a===void 0&&(a=!0),this.fetch().text!==t)throw new Ui("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());a&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var a=this.nextToken;this.consume(),this.gullet.pushToken(new Iw("}")),this.gullet.pushTokens(t);var o=this.parseExpression(!1);return this.expect("}"),this.nextToken=a,o}parseExpression(t,a){for(var o=[];;){this.mode==="math"&&this.consumeSpaces();var l=this.fetch();if(r.endOfExpression.has(l.text)||a&&l.text===a||t&&sL[l.text]&&sL[l.text].infix)break;var h=this.parseAtom(a);if(h){if(h.type==="internal")continue}else break;o.push(h)}return this.mode==="text"&&this.formLigatures(o),this.handleInfixNodes(o)}handleInfixNodes(t){for(var a=-1,o,l=0;l=128)this.settings.strict&&(dor(a.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+a[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+a[0]+'"'+(" ("+a.charCodeAt(0)+")"),t)),f={type:"textord",mode:"text",loc:Wv.range(t),text:a};else return null;if(this.consume(),h)for(var v=0;v{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(r,t.getAttribute("target")??"")}),Z1.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(r)&&(t.setAttribute("target",t.getAttribute(r)??""),t.removeAttribute(r),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}var xN,gAn,mAn,yAn,ylr,glr,Ns,vAn,wAn,xAn,TAn,blr,Uqe,kAn,CAn,$E,zqe,EAn,SAn,mlr,cbe,bf,TN,AAn,Kj,Wn,rl=ie(()=>{"use strict";yN();Qs();xN=/<\/?br\s*\/?>/gi,gAn=new RegExp(xN.source,"i"),mAn=i(r=>r?blr(r).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),yAn=(()=>{let r=!1;return()=>{r||(bAn(),r=!0)}})();i(bAn,"setupDompurifyHooks");ylr=i(r=>(yAn(),Z1.sanitize(r)),"removeScript"),glr=i((r,t)=>{if(Fh(t)){let a=t.securityLevel;a==="antiscript"||a==="strict"||a==="sandbox"?r=ylr(r):a!=="loose"&&(r=blr(r),r=r.replace(/