discourse_math_bundle 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/discourse_math_bundle/version.rb +7 -0
- data/lib/discourse_math_bundle.rb +55 -0
- data/vendor/assets/katex/contrib/copy-tex.min.js +1 -0
- data/vendor/assets/katex/contrib/mhchem.min.js +1 -0
- data/vendor/assets/katex/fonts/KaTeX_AMS-Regular.woff +0 -0
- data/vendor/assets/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Main-Bold.woff +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Main-Italic.woff +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Main-Regular.woff +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Math-Italic.woff +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
- data/vendor/assets/katex/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- data/vendor/assets/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- data/vendor/assets/katex/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- data/vendor/assets/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- data/vendor/assets/katex/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- data/vendor/assets/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Script-Regular.woff +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Size1-Regular.woff +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Size2-Regular.woff +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Size3-Regular.woff +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Size4-Regular.woff +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- data/vendor/assets/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- data/vendor/assets/katex/katex.min.css +1 -0
- data/vendor/assets/katex/katex.min.js +1 -0
- data/vendor/assets/mathjax/a11y/assistive-mml.js +1 -0
- data/vendor/assets/mathjax/a11y/complexity.js +1 -0
- data/vendor/assets/mathjax/a11y/explorer.js +1 -0
- data/vendor/assets/mathjax/a11y/semantic-enrich.js +1 -0
- data/vendor/assets/mathjax/a11y/speech.js +1 -0
- data/vendor/assets/mathjax/a11y/sre.js +1 -0
- data/vendor/assets/mathjax/adaptors/jsdom.js +1 -0
- data/vendor/assets/mathjax/adaptors/linkedom.js +1 -0
- data/vendor/assets/mathjax/adaptors/liteDOM.js +1 -0
- data/vendor/assets/mathjax/core.js +1 -0
- data/vendor/assets/mathjax/input/asciimath.js +1 -0
- data/vendor/assets/mathjax/input/mml/entities.js +1 -0
- data/vendor/assets/mathjax/input/mml/extensions/mml3.js +1 -0
- data/vendor/assets/mathjax/input/mml/extensions/mml3.sef.json +1 -0
- data/vendor/assets/mathjax/input/mml.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/action.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/ams.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/amscd.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/autoload.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/bbm.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/bboldx.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/bbox.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/begingroup.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/boldsymbol.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/braket.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/bussproofs.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/cancel.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/cases.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/centernot.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/color.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/colortbl.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/colorv2.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/configmacros.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/dsfont.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/empheq.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/enclose.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/extpfeil.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/gensymb.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/html.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/mathtools.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/mhchem.js +34 -0
- data/vendor/assets/mathjax/input/tex/extensions/newcommand.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/noerrors.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/noundefined.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/physics.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/require.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/setoptions.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/tagformat.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/texhtml.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/textcomp.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/textmacros.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/unicode.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/units.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/upgreek.js +1 -0
- data/vendor/assets/mathjax/input/tex/extensions/verb.js +1 -0
- data/vendor/assets/mathjax/input/tex-base.js +1 -0
- data/vendor/assets/mathjax/input/tex.js +1 -0
- data/vendor/assets/mathjax/loader.js +1 -0
- data/vendor/assets/mathjax/mml-chtml-nofont.js +1 -0
- data/vendor/assets/mathjax/mml-chtml.js +1 -0
- data/vendor/assets/mathjax/mml-svg-nofont.js +1 -0
- data/vendor/assets/mathjax/mml-svg.js +1 -0
- data/vendor/assets/mathjax/output/chtml.js +1 -0
- data/vendor/assets/mathjax/output/svg.js +1 -0
- data/vendor/assets/mathjax/sre/mathmaps/af.json +146 -0
- data/vendor/assets/mathjax/sre/mathmaps/base.json +137 -0
- data/vendor/assets/mathjax/sre/mathmaps/ca.json +140 -0
- data/vendor/assets/mathjax/sre/mathmaps/da.json +140 -0
- data/vendor/assets/mathjax/sre/mathmaps/de.json +146 -0
- data/vendor/assets/mathjax/sre/mathmaps/en.json +158 -0
- data/vendor/assets/mathjax/sre/mathmaps/es.json +140 -0
- data/vendor/assets/mathjax/sre/mathmaps/euro.json +32 -0
- data/vendor/assets/mathjax/sre/mathmaps/fr.json +146 -0
- data/vendor/assets/mathjax/sre/mathmaps/hi.json +146 -0
- data/vendor/assets/mathjax/sre/mathmaps/it.json +146 -0
- data/vendor/assets/mathjax/sre/mathmaps/ko.json +146 -0
- data/vendor/assets/mathjax/sre/mathmaps/nb.json +146 -0
- data/vendor/assets/mathjax/sre/mathmaps/nemeth.json +125 -0
- data/vendor/assets/mathjax/sre/mathmaps/nn.json +146 -0
- data/vendor/assets/mathjax/sre/mathmaps/sv.json +146 -0
- data/vendor/assets/mathjax/sre/require.d.mts +1 -0
- data/vendor/assets/mathjax/sre/require.mjs +2 -0
- data/vendor/assets/mathjax/sre/speech-worker.js +1 -0
- data/vendor/assets/mathjax/startup.js +1 -0
- data/vendor/assets/mathjax/tex-chtml-nofont.js +1 -0
- data/vendor/assets/mathjax/tex-chtml.js +1 -0
- data/vendor/assets/mathjax/tex-mml-chtml-nofont.js +1 -0
- data/vendor/assets/mathjax/tex-mml-chtml.js +1 -0
- data/vendor/assets/mathjax/tex-mml-svg-nofont.js +1 -0
- data/vendor/assets/mathjax/tex-mml-svg.js +1 -0
- data/vendor/assets/mathjax/tex-svg-nofont.js +1 -0
- data/vendor/assets/mathjax/tex-svg.js +1 -0
- data/vendor/assets/mathjax/ui/lazy.js +1 -0
- data/vendor/assets/mathjax/ui/menu.js +1 -0
- data/vendor/assets/mathjax/ui/safe.js +1 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-ab.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-abi.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-ai.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-ar.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-arl.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-b-a.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-b.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-bi.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-br.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-brd.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-brk.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-c.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-cb.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-ch.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-chb.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-chbi.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-chi.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-cy.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-cyb.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-cybi.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-cyi.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-cyss.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-cyssb.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-cyssbi.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-cyssi.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-ds.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-dv.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-em.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-f.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-fb.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-gk.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-gkb.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-gkbi.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-gki.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-gkss.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-gkssb.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-gkssbi.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-gkssi.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-he.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-heb.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-hebi.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-hei.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-i.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-lb.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-li.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-lib.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-lo.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-lr.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-lt.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-m.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-mar.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-mi.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-ml.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-mm.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-msh.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-mx.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-n.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-ob.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-os.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-ph.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-phb.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-phbi.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-phi.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-phss.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-phssb.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-phssbi.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-phssi.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-pu.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-pub.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-pubi.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-pui.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-rb.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-s.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-s3.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-s4.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-s5.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-s6.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-s7.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-sb.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-sh.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-shb.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-shbi.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-shi.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-so.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-ss.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-ssb.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-ssbi.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-ssbix.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-ssbx.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-ssi.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-ssix.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-sslb.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-ssli.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-sslib.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-sslr.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-ssx.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-sy.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-syb.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-sybi.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-syi.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-u-a.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-u.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-v.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-vx.woff2 +0 -0
- data/vendor/assets/mathjax/woff-v2/mjx-ncm-zero.woff2 +0 -0
- metadata +304 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";var t={d:(e,r)=>{for(var s in r)t.o(r,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:r[s]})}};t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var e={};t.r(e),t.d(e,{FindTeX:()=>K});var r={};t.r(r),t.d(r,{default:()=>V});var s={};t.r(s),t.d(s,{TexConstant:()=>W});var i={};t.r(i),t.d(i,{default:()=>rt});var n={};t.r(n),t.d(n,{ConfigurationType:()=>st,HandlerType:()=>it});var a={};t.r(a),t.d(a,{UnitUtil:()=>at});var o={};t.r(o),t.d(o,{default:()=>ot});var c={};t.r(c),t.d(c,{default:()=>lt});var l={};t.r(l),t.d(l,{BaseItem:()=>ut,MmlStack:()=>ht});var h={};t.r(h),t.d(h,{default:()=>dt});var u={};t.r(u),t.d(u,{default:()=>ft});var d={};t.r(d),t.d(d,{NodeFactory:()=>bt});var m={};t.r(m),t.d(m,{KeyValueDef:()=>kt,KeyValueTypes:()=>vt,ParseUtil:()=>wt});var p={};t.r(p),t.d(p,{ColumnParser:()=>Mt});var g={};t.r(g),t.d(g,{default:()=>Et});var f={};t.r(f),t.d(f,{AbstractTags:()=>It,AllTags:()=>Nt,Label:()=>St,NoTags:()=>Lt,TagInfo:()=>Ct,TagsFactory:()=>Bt});var b={};t.r(b),t.d(b,{Macro:()=>Gt,Token:()=>Dt});var y={};t.r(y),t.d(y,{AbstractParseMap:()=>Kt,AbstractTokenMap:()=>_t,CharacterMap:()=>Ht,CommandMap:()=>qt,DelimiterMap:()=>Xt,EnvironmentMap:()=>$t,MacroMap:()=>zt,RegExpMap:()=>jt,parseResult:()=>Ut});var A={};t.r(A),t.d(A,{MapHandler:()=>Zt,SubHandler:()=>Yt,SubHandlers:()=>Qt});var k={};t.r(k),t.d(k,{Configuration:()=>te,ConfigurationHandler:()=>re,ParserConfiguration:()=>se});var v={};t.r(v),t.d(v,{ArrayItem:()=>Ee,BeginItem:()=>ye,BreakItem:()=>be,CellItem:()=>Pe,CloseItem:()=>le,DotsItem:()=>Oe,EndItem:()=>Ae,EqnArrayItem:()=>Se,EquationItem:()=>Ie,FnItem:()=>we,LeftItem:()=>pe,Middle:()=>ge,MmlItem:()=>Te,MstyleItem:()=>Ce,NonscriptItem:()=>xe,NotItem:()=>Me,NullItem:()=>he,OpenItem:()=>ce,OverItem:()=>me,PositionItem:()=>ve,PrimeItem:()=>ue,RightItem:()=>fe,StartItem:()=>ae,StopItem:()=>oe,StyleItem:()=>ke,SubsupItem:()=>de});var P={};t.r(P),t.d(P,{default:()=>_e,splitAlignArray:()=>De});var T={};t.r(T),t.d(T,{default:()=>He});var w={};t.r(w),t.d(w,{BaseConfiguration:()=>Qe,BaseTags:()=>Ye,Other:()=>Ze});var M={};t.r(M),t.d(M,{TeX:()=>tr});const x=("undefined"!=typeof window?window:t.g).MathJax._.components.global,O=(x.GLOBAL,x.isObject,x.combineConfig,x.combineDefaults,x.combineWithMathJax),E=(x.MathJax,MathJax._.core.InputJax.AbstractInputJax),S=MathJax._.util.Options,C=(S.isObject,S.APPEND,S.REMOVE,S.OPTIONS,S.Expandable,S.expandable,S.makeArray,S.keys,S.copy,S.insert),I=S.defaultOptions,L=S.userOptions,N=(S.selectOptions,S.selectOptionsFromKeys,S.separateOptions),F=S.lookup,R=MathJax._.core.FindMath.AbstractFindMath,B=MathJax._.util.string,D=B.sortLength,G=B.quotePattern,U=(B.unicodeChars,B.unicodeString,B.isPercent,B.split,B.replaceUnicode),_=(B.toEntity,MathJax._.core.MathItem),j=_.protoItem;_.AbstractMathItem,_.STATE,_.newState;class K extends R{constructor(t){super(t),this.getPatterns()}getPatterns(){const t=this.options,e=[],r=[],s=[];this.end={},this.env=this.sub=0;let i=1;t.inlineMath.forEach((t=>this.addPattern(e,t,!1))),t.displayMath.forEach((t=>this.addPattern(e,t,!0))),e.length&&r.push(e.sort(D).join("|")),t.processEnvironments&&(r.push("\\\\begin\\s*\\{([^}]*)\\}"),this.env=i,i++),t.processEscapes&&s.push("\\\\([\\\\$])"),t.processRefs&&s.push("(\\\\(?:eq)?ref\\s*\\{[^}]*\\})"),s.length&&(r.push("("+s.join("|")+")"),this.sub=i),this.start=new RegExp(r.join("|"),"g"),this.hasPatterns=r.length>0}addPattern(t,e,r){const[s,i]=e;t.push(G(s)),this.end[s]=[i,r,this.endPattern(i)]}endPattern(t,e){return new RegExp((e||G(t))+"|\\\\(?:[a-zA-Z]|.)|[{}]","g")}findEnd(t,e,r,s){const[i,n,a]=s,o=a.lastIndex=r.index+r[0].length;let c,l=0;for(;c=a.exec(t);){if((c[1]||c[0])===i&&0===l)return j(r[0],t.substring(o,c.index),c[0],e,r.index,c.index+c[0].length,n);"{"===c[0]?l++:"}"===c[0]&&l&&l--}return null}findMathInString(t,e,r){let s,i;for(this.start.lastIndex=0;s=this.start.exec(r);){if(void 0!==s[this.env]&&this.env){const t="\\\\end\\s*(\\{"+G(s[this.env])+"\\})";i=this.findEnd(r,e,s,["{"+s[this.env]+"}",!0,this.endPattern(null,t)]),i&&(i.math=i.open+i.math+i.close,i.open=i.close="")}else if(void 0!==s[this.sub]&&this.sub){const t=s[this.sub],r=s.index+s[this.sub].length;i=2===t.length?j("\\",t.substring(1),"",e,s.index,r):j("",t,"",e,s.index,r,!1)}else i=this.findEnd(r,e,s,this.end[s[0]]);i&&(t.push(i),this.start.lastIndex=i.end.n)}}findMath(t){const e=[];if(this.hasPatterns)for(let r=0,s=t.length;r<s;r++)this.findMathInString(e,r,t[r]);return e}}K.OPTIONS={inlineMath:[["\\(","\\)"]],displayMath:[["$$","$$"],["\\[","\\]"]],processEscapes:!0,processEnvironments:!0,processRefs:!0};const H=MathJax._.core.MmlTree.MmlNode,X=H.TEXCLASS,z=(H.TEXCLASSNAMES,H.MATHVARIANTS,H.indentAttributes,H.AbstractMmlNode),q=(H.AbstractMmlTokenNode,H.AbstractMmlLayoutNode,H.AbstractMmlBaseNode,H.AbstractMmlEmptyNode),$=(H.TextNode,H.XMLNode,MathJax._.core.MmlTree.MmlNodes.mo.MmlMo),J={attrs:new Set(["autoOP","fnOP","movesupsub","subsupOK","texprimestyle","useHeight","variantForm","withDelims","mathaccent","open","close"]),createEntity:t=>String.fromCodePoint(parseInt(t,16)),getChildren:t=>t.childNodes,getText:t=>t.getText(),appendChildren(t,e){for(const r of e)t.appendChild(r)},setAttribute(t,e,r){t.attributes.set(e,r)},setProperty(t,e,r){t.setProperty(e,r)},setProperties(t,e){for(const r of Object.keys(e)){const s=e[r];"texClass"===r?(t.texClass=s,t.setProperty(r,s)):"movablelimits"===r?(t.setProperty("movablelimits",s),(t.isKind("mo")||t.isKind("mstyle"))&&t.attributes.set("movablelimits",s)):"inferred"===r||(J.attrs.has(r)?t.setProperty(r,s):t.attributes.set(r,s))}},getProperty:(t,e)=>t.getProperty(e),getAttribute:(t,e)=>t.attributes.get(e),removeAttribute(t,e){t.attributes.unset(e)},removeProperties(t,...e){t.removeProperty(...e)},getChildAt:(t,e)=>t.childNodes[e],setChild(t,e,r){t.childNodes[e]=r,r&&(r.parent=t)},copyChildren(t,e){const r=t.childNodes;for(let t=0;t<r.length;t++)this.setChild(e,t,r[t])},copyAttributes(t,e){e.attributes=t.attributes;for(const[r,s]of Object.entries(t.getAllProperties()))e.setProperty(r,s)},isType:(t,e)=>t.isKind(e),isEmbellished:t=>t.isEmbellished,getTexClass:t=>t.texClass,getCoreMO:t=>t.coreMO(),isNode:t=>t instanceof z||t instanceof q,isInferred:t=>t.isInferred,getForm(t){if(!t.isKind("mo"))return null;const e=t,r=e.getForms();for(const t of r){const r=this.getOp(e,t);if(r)return r}return null},getOp:(t,e="infix")=>$.OPTABLE[e][t.getText()]||null,getMoAttribute(t,e){var r,s;if(!t.attributes.isSet(e))for(const i of["infix","postfix","prefix"]){const n=null===(s=null===(r=this.getOp(t,i))||void 0===r?void 0:r[3])||void 0===s?void 0:s[e];if(void 0!==n)return n}return t.attributes.get(e)}},V=J,W={Variant:{NORMAL:"normal",BOLD:"bold",ITALIC:"italic",BOLDITALIC:"bold-italic",DOUBLESTRUCK:"double-struck",FRAKTUR:"fraktur",BOLDFRAKTUR:"bold-fraktur",SCRIPT:"script",BOLDSCRIPT:"bold-script",SANSSERIF:"sans-serif",BOLDSANSSERIF:"bold-sans-serif",SANSSERIFITALIC:"sans-serif-italic",SANSSERIFBOLDITALIC:"sans-serif-bold-italic",MONOSPACE:"monospace",INITIAL:"inital",TAILED:"tailed",LOOPED:"looped",STRETCHED:"stretched",CALLIGRAPHIC:"-tex-calligraphic",BOLDCALLIGRAPHIC:"-tex-bold-calligraphic",OLDSTYLE:"-tex-oldstyle",BOLDOLDSTYLE:"-tex-bold-oldstyle",MATHITALIC:"-tex-mathit"},Form:{PREFIX:"prefix",INFIX:"infix",POSTFIX:"postfix"},LineBreak:{AUTO:"auto",NEWLINE:"newline",NOBREAK:"nobreak",GOODBREAK:"goodbreak",BADBREAK:"badbreak"},LineBreakStyle:{BEFORE:"before",AFTER:"after",DUPLICATE:"duplicate",INFIXLINBREAKSTYLE:"infixlinebreakstyle"},IndentAlign:{LEFT:"left",CENTER:"center",RIGHT:"right",AUTO:"auto",ID:"id",INDENTALIGN:"indentalign"},IndentShift:{INDENTSHIFT:"indentshift"},LineThickness:{THIN:"thin",MEDIUM:"medium",THICK:"thick"},Notation:{LONGDIV:"longdiv",ACTUARIAL:"actuarial",PHASORANGLE:"phasorangle",RADICAL:"radical",BOX:"box",ROUNDEDBOX:"roundedbox",CIRCLE:"circle",LEFT:"left",RIGHT:"right",TOP:"top",BOTTOM:"bottom",UPDIAGONALSTRIKE:"updiagonalstrike",DOWNDIAGONALSTRIKE:"downdiagonalstrike",VERTICALSTRIKE:"verticalstrike",HORIZONTALSTRIKE:"horizontalstrike",NORTHEASTARROW:"northeastarrow",MADRUWB:"madruwb",UPDIAGONALARROW:"updiagonalarrow"},Align:{TOP:"top",BOTTOM:"bottom",CENTER:"center",BASELINE:"baseline",AXIS:"axis",LEFT:"left",RIGHT:"right"},Lines:{NONE:"none",SOLID:"solid",DASHED:"dashed"},Side:{LEFT:"left",RIGHT:"right",LEFTOVERLAP:"leftoverlap",RIGHTOVERLAP:"rightoverlap"},Width:{AUTO:"auto",FIT:"fit"},Actiontype:{TOGGLE:"toggle",STATUSLINE:"statusline",TOOLTIP:"tooltip",INPUT:"input"},Overflow:{LINBREAK:"linebreak",SCROLL:"scroll",ELIDE:"elide",TRUNCATE:"truncate",SCALE:"scale"},Unit:{EM:"em",EX:"ex",PX:"px",IN:"in",CM:"cm",MM:"mm",PT:"pt",PC:"pc"},Attr:{LATEX:"data-latex",LATEXITEM:"data-latex-item"}};function Z(t,e,r){const s=e.attributes,i=r.attributes;t.forEach((t=>{const e=i.getExplicit(t);null!=e&&s.set(t,e)}))}function Y(t,e){const r=(t,e)=>t.getExplicitNames().filter((r=>r!==e&&("stretchy"!==r||t.getExplicit("stretchy"))&&"data-latex"!==r&&"data-latex-item"!==r)),s=t.attributes,i=e.attributes,n=r(s,"lspace"),a=r(i,"rspace");if(n.length!==a.length)return!1;for(const t of n)if(s.getExplicit(t)!==i.getExplicit(t))return!1;return!0}function Q(t,e,r){const s=[];for(const i of t.getList("m"+e+r)){const n=i.childNodes;if(n[i[e]]&&n[i[r]])continue;const a=i.parent,o=n[i[e]]?t.nodeFactory.create("node","m"+e,[n[i.base],n[i[e]]]):t.nodeFactory.create("node","m"+r,[n[i.base],n[i[r]]]);V.copyAttributes(i,o),a.replaceChild(o,i),s.push(i)}t.removeFromList("m"+e+r,s)}function tt(t,e,r){const s=[];for(const i of t.getList(e)){if(i.attributes.get("displaystyle"))continue;const e=i.childNodes[i.base],n=e.coreMO();if(e.getProperty("movablelimits")&&!n.attributes.hasExplicit("movablelimits")){const e=t.nodeFactory.create("node",r,i.childNodes);V.copyAttributes(i,e),i.parent.replaceChild(e,i),s.push(i)}}t.removeFromList(e,s)}const et={cleanStretchy(t){var e;const r=t.data;for(const t of r.getList("fixStretchy"))if(V.getProperty(t,"fixStretchy")){const r=V.getForm(t);(null===(e=null==r?void 0:r[3])||void 0===e?void 0:e.stretchy)&&V.setAttribute(t,"stretchy",!1),V.removeProperties(t,"fixStretchy")}},cleanAttributes(t){t.data.root.walkTree((t=>{const e=new Set((t.getProperty("keep-attrs")||"").split(/ /)),r=t.attributes;r.unset(W.Attr.LATEXITEM);for(const s of r.getExplicitNames())e.has(s)||r.get(s)!==t.attributes.getInherited(s)||r.unset(s)}))},combineRelations(t){const e=[];for(const r of t.data.getList("mo")){if(r.getProperty("relationsCombined")||!r.parent||r.parent&&!V.isType(r.parent,"mrow")||V.getTexClass(r)!==X.REL)continue;let t;const s=r.parent.childNodes,i=s.indexOf(r)+1,n=V.getProperty(r,"variantForm");for(;i<s.length&&(t=s[i])&&V.isType(t,"mo")&&V.getTexClass(t)===X.REL;){if(n!==V.getProperty(t,"variantForm")||!Y(r,t)){r.attributes.hasExplicit("rspace")||V.setAttribute(r,"rspace","0pt"),t.attributes.hasExplicit("lspace")||V.setAttribute(t,"lspace","0pt");break}V.appendChildren(r,V.getChildren(t)),Z(["stretchy","rspace"],r,t);for(const e of t.getPropertyNames())r.setProperty(e,t.getProperty(e));t.attributes.get("data-latex")&&r.attributes.set("data-latex",r.attributes.get("data-latex")+t.attributes.get("data-latex")),s.splice(i,1),e.push(t),t.parent=null,t.setProperty("relationsCombined",!0),r.setProperty("texClass",X.REL)}r.attributes.setInherited("form",r.getForms()[0])}t.data.removeFromList("mo",e)},cleanSubSup(t){const e=t.data;e.error||(Q(e,"sub","sup"),Q(e,"under","over"))},moveLimits(t){const e=t.data;tt(e,"munderover","msubsup"),tt(e,"munder","msub"),tt(e,"mover","msup")},setInherited(t){t.data.root.setInheritedAttributes({},t.math.display,0,!1)},checkScriptlevel(t){const e=t.data,r=[];for(const t of e.getList("mstyle")){if(1!==t.childNodes[0].childNodes.length)continue;const e=t.attributes;for(const t of["displaystyle","scriptlevel"])e.getExplicit(t)===e.getInherited(t)&&e.unset(t);const s=e.getExplicitNames();if(0===s.filter((t=>"data-latex"!==t.substring(0,10))).length){const i=t.childNodes[0].childNodes[0];s.forEach((t=>i.attributes.set(t,e.get(t)))),t.parent.replaceChild(i,t),r.push(t)}}e.removeFromList("mstyle",r)}},rt=et;var st,it;!function(t){t.HANDLER="handler",t.FALLBACK="fallback",t.ITEMS="items",t.TAGS="tags",t.OPTIONS="options",t.NODES="nodes",t.PREPROCESSORS="preprocessors",t.POSTPROCESSORS="postprocessors",t.INIT="init",t.CONFIG="config",t.PRIORITY="priority",t.PARSER="parser"}(st||(st={})),function(t){t.DELIMITER="delimiter",t.MACRO="macro",t.CHARACTER="character",t.ENVIRONMENT="environment"}(it||(it={}));const nt=7.2;const at={UNIT_CASES:new class{constructor(t){this.num="([-+]?([.,]\\d+|\\d+([.,]\\d*)?))",this.unit="",this.dimenEnd=/./,this.dimenRest=/./,this.map=new Map(t),this.updateDimen()}updateDimen(){this.unit=`(${Array.from(this.map.keys()).join("|")})`,this.dimenEnd=RegExp("^\\s*"+this.num+"\\s*"+this.unit+"\\s*$"),this.dimenRest=RegExp("^\\s*"+this.num+"\\s*"+this.unit+" ?")}set(t,e){return this.map.set(t,e),this.updateDimen(),this}get(t){return this.map.get(t)||this.map.get("pt")}delete(t){return!!this.map.delete(t)&&(this.updateDimen(),!0)}}([["em",1],["ex",.43],["pt",.1],["pc",1.2],["px",.1],["in",nt],["cm",nt/2.54],["mm",nt/25.4],["mu",1/18]]),matchDimen(t,e=!1){const r=t.match(e?at.UNIT_CASES.dimenRest:at.UNIT_CASES.dimenEnd);return r?function([t,e,r]){return"mu"!==e?[t,e,r]:[at.em(at.UNIT_CASES.get(e)*parseFloat(t)).slice(0,-2),"em",r]}([r[1].replace(/,/,"."),r[4],r[0].length]):[null,null,0]},dimen2em(t){const[e,r]=at.matchDimen(t),s=parseFloat(e||"1");return at.UNIT_CASES.get(r)*s},em:t=>Math.abs(t)<6e-4?"0em":t.toFixed(3).replace(/\.?0+$/,"")+"em",trimSpaces(t){if("string"!=typeof t)return t;let e=t.trim();return e.match(/\\$/)&&t.match(/ $/)&&(e+=" "),e}};class ot{constructor(t,e,r){this._factory=t,this._env=e,this.global={},this.stack=[],this.global={isInner:r},this.stack=[this._factory.create("start",this.global)],e&&(this.stack[0].env=e),this.env=this.stack[0].env}set env(t){this._env=t}get env(){return this._env}Push(...t){for(const e of t){if(!e)continue;const t=V.isNode(e)?this._factory.create("mml",e):e;t.global=this.global;const[r,s]=this.stack.length?this.Top().checkItem(t):[null,!0];s&&(r?(this.Pop(),this.Push(...r)):(t.isKind("null")||this.stack.push(t),t.env?(t.copyEnv&&Object.assign(t.env,this.env),this.env=t.env):t.env=this.env))}}Pop(){const t=this.stack.pop();return t.isOpen||delete t.env,this.env=this.stack.length?this.Top().env:{},t}Top(t=1){return this.stack.length<t?null:this.stack[this.stack.length-t]}Prev(t){const e=this.Top();return t?e.First:e.Pop()}get height(){return this.stack.length}toString(){return"stack[\n "+this.stack.join("\n ")+"\n]"}}class ct{static processString(t,e){const r=t.split(ct.pattern);for(let t=1,s=r.length;t<s;t+=2){let s=r[t].charAt(0);if(s>="0"&&s<="9")r[t]=e[parseInt(r[t],10)-1],"number"==typeof r[t]&&(r[t]=r[t].toString());else if("{"===s)if(s=r[t].substring(1),s>="0"&&s<="9")r[t]=e[parseInt(r[t].substring(1,r[t].length-1),10)-1],"number"==typeof r[t]&&(r[t]=r[t].toString());else{r[t].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/)&&(r[t]="%"+r[t])}}return r.join("")}constructor(t,e,...r){this.id=t,this.message=ct.processString(e,r)}}ct.pattern=/%(\d+|\{\d+\}|\{[a-z]+:%\d+(?:\|(?:%\{\d+\}|%.|[^}])*)+\}|.)/g;const lt=ct;class ht{constructor(t){this._nodes=t,this.startStr="",this.startI=0,this.stopI=0}get nodes(){return this._nodes}Push(...t){this._nodes.push(...t)}Pop(){return this._nodes.pop()}get First(){return this._nodes[this.Size()-1]}set First(t){this._nodes[this.Size()-1]=t}get Last(){return this._nodes[0]}set Last(t){this._nodes[0]=t}Peek(t){return null==t&&(t=1),this._nodes.slice(this.Size()-t)}Size(){return this._nodes.length}Clear(){this._nodes=[]}toMml(t=!0,e){return 1!==this._nodes.length||e?this.create("node",t?"inferredMrow":"mrow",this._nodes,{}):this.First}create(t,...e){return this.factory.configuration.nodeFactory.create(t,...e)}}class ut extends ht{constructor(t,...e){super(e),this.factory=t,this.global={},this._properties={},this.isOpen&&(this._env={})}get kind(){return"base"}get env(){return this._env}set env(t){this._env=t}get copyEnv(){return!0}getProperty(t){return this._properties[t]}setProperty(t,e){return this._properties[t]=e,this}get isOpen(){return!1}get isClose(){return!1}get isFinal(){return!1}isKind(t){return t===this.kind}checkItem(t){if(t.isKind("over")&&this.isOpen&&(t.setProperty("num",this.toMml(!1)),this.Clear()),t.isKind("cell")&&this.isOpen){if(t.getProperty("linebreak"))return ut.fail;throw new lt("Misplaced","Misplaced %1",t.getName())}if(t.isClose&&this.getErrors(t.kind)){const[e,r]=this.getErrors(t.kind);throw new lt(e,r,t.getName())}return t.isFinal?(this.Push(t.First),ut.fail):ut.success}clearEnv(){for(const t of Object.keys(this.env))delete this.env[t]}setProperties(t){return Object.assign(this._properties,t),this}getName(){return this.getProperty("name")}toString(){return this.kind+"["+this.nodes.join("; ")+"]"}getErrors(t){return this.constructor.errors[t]||ut.errors[t]}addLatexItem(t,e=""){const r=this.startStr.slice(this.startI,this.stopI);if(r){const s=e?e+r:r;t.attributes.set(W.Attr.LATEXITEM,s),"}"!==s&&t.attributes.set(W.Attr.LATEX,s)}}}ut.fail=[null,!1],ut.success=[null,!0],ut.errors={end:["MissingBeginExtraEnd","Missing \\begin{%1} or extra \\end{%1}"],close:["ExtraCloseMissingOpen","Extra close brace or missing open brace"],right:["MissingLeftExtraRight","Missing \\left or extra \\right"],middle:["ExtraMiddle","Extra \\middle"]};class dt{constructor(t,e,r){this._string=t,this.configuration=r,this.macroCount=0,this.i=0,this.currentCS="",this.saveI=0;const s=Object.hasOwn(e,"isInner"),i=e.isInner;let n;if(delete e.isInner,e){n={};for(const t of Object.keys(e))n[t]=e[t]}this.configuration.pushParser(this),this.stack=new ot(this.itemFactory,n,!s||i),this.Parse(),this.Push(this.itemFactory.create("stop")),this.stack.env=n}get options(){return this.configuration.options}get itemFactory(){return this.configuration.itemFactory}get tags(){return this.configuration.tags}set string(t){this._string=t}get string(){return this._string}parse(t,e){const r=this.saveI;this.saveI=this.i-("character"===t&&"&"!==e[1]?1:0);const s=this.configuration.handlers.get(t).parse(e);return"macro"!==t&&this.updateResult(e[1],r),this.saveI=r,s}lookup(t,e){return this.configuration.handlers.get(t).lookup(e)}contains(t,e){return this.configuration.handlers.get(t).contains(e)}toString(){let t="";for(const e of Array.from(this.configuration.handlers.keys()))t+=e+": "+this.configuration.handlers.get(e)+"\n";return t}Parse(){let t;for(;this.i<this.string.length;)t=this.getCodePoint(),this.i+=t.length,this.parse(it.CHARACTER,[this,t])}Push(t){t instanceof ut&&(t.startI=this.saveI,t.stopI=this.i,t.startStr=this.string),t instanceof z&&t.isInferred?this.PushAll(t.childNodes):this.stack.Push(t)}PushAll(t){for(const e of t)this.stack.Push(e)}mml(){if(!this.stack.Top().isKind("mml"))return null;const t=this.stack.Top().First;this.configuration.popParser();const e=this.trimTex(this.string);return e&&t.attributes.set(W.Attr.LATEX,e),t}convertDelimiter(t){var e;const r=this.lookup(it.DELIMITER,t);return null!==(e=null==r?void 0:r.char)&&void 0!==e?e:null}getCodePoint(){const t=this.string.codePointAt(this.i);return void 0===t?"":String.fromCodePoint(t)}nextIsSpace(){return!!this.string.charAt(this.i).match(/\s/)}GetNext(){for(;this.nextIsSpace();)this.i++;return this.getCodePoint()}GetCS(){const t=this.string.slice(this.i).match(/^(([a-z]+) ?|[\uD800-\uDBFF].|.)/i);return t?(this.i+=t[0].length,t[2]||t[1]):(this.i++," ")}GetArgument(t,e=!1){switch(this.GetNext()){case"":if(!e)throw new lt("MissingArgFor","Missing argument for %1",this.currentCS);return null;case"}":if(!e)throw new lt("ExtraCloseMissingOpen","Extra close brace or missing open brace");return null;case"\\":return this.i++,"\\"+this.GetCS();case"{":{const t=++this.i;let e=1;for(;this.i<this.string.length;)switch(this.string.charAt(this.i++)){case"\\":this.i++;break;case"{":e++;break;case"}":if(0===--e)return this.string.slice(t,this.i-1)}throw new lt("MissingCloseBrace","Missing close brace")}}const r=this.getCodePoint();return this.i+=r.length,r}GetBrackets(t,e,r=!1){if("["!==this.GetNext())return e;const s=++this.i;let i=0,n=0;for(;this.i<this.string.length;)switch(this.string.charAt(this.i++)){case"{":i++;break;case"\\":this.i++;break;case"}":if(i--<=0)throw new lt("ExtraCloseLooking","Extra close brace while looking for %1","']'");break;case"[":0===i&&n++;break;case"]":if(0===i){if(!r||0===n)return this.string.slice(s,this.i-1);n--}}throw new lt("MissingCloseBracket","Could not find closing ']' for argument to %1",this.currentCS)}GetDelimiter(t,e=!1){let r=this.GetNext();if(this.i+=r.length,this.i<=this.string.length&&("\\"===r?r+=this.GetCS():"{"===r&&e&&(this.i--,r=this.GetArgument(t).trim()),this.contains(it.DELIMITER,r)))return this.convertDelimiter(r);throw new lt("MissingOrUnrecognizedDelim","Missing or unrecognized delimiter for %1",this.currentCS)}GetDimen(t){if("{"===this.GetNext()){const e=this.GetArgument(t),[r,s]=at.matchDimen(e);if(r)return r+s}else{const t=this.string.slice(this.i),[e,r,s]=at.matchDimen(t,!0);if(e)return this.i+=s,e+r}throw new lt("MissingDimOrUnits","Missing dimension or its units for %1",this.currentCS)}GetUpTo(t,e){for(;this.nextIsSpace();)this.i++;const r=this.i;let s=0;for(;this.i<this.string.length;){const t=this.i;let i=this.GetNext();switch(this.i+=i.length,i){case"\\":i+=this.GetCS();break;case"{":s++;break;case"}":if(0===s)throw new lt("ExtraCloseLooking","Extra close brace while looking for %1",e);s--}if(0===s&&i===e)return this.string.slice(r,t)}throw new lt("TokenNotFoundForCommand","Could not find %1 for %2",e,this.currentCS)}ParseArg(t){return new dt(this.GetArgument(t),this.stack.env,this.configuration).mml()}ParseUpTo(t,e){return new dt(this.GetUpTo(t,e),this.stack.env,this.configuration).mml()}GetDelimiterArg(t){const e=at.trimSpaces(this.GetArgument(t));if(""===e)return null;if(this.contains(it.DELIMITER,e))return e;throw new lt("MissingOrUnrecognizedDelim","Missing or unrecognized delimiter for %1",this.currentCS)}GetStar(){const t="*"===this.GetNext();return t&&this.i++,t}create(t,...e){const r=this.configuration.nodeFactory.create(t,...e);return r.isToken&&r.attributes.hasExplicit("mathvariant")&&"-"===r.attributes.get("mathvariant").charAt(0)&&r.setProperty("ignore-variant",!0),r}trimTex(t){return t.trim()+(t.match(/(?:^|[^\\])(?:\\\\)*\\\s+$/)?" ":"")}updateResult(t,e){const r=this.stack.Prev(!0);if(!r)return;const s=W.Attr.LATEX,i=r.attributes.get(s),n=r.attributes.get(W.Attr.LATEXITEM);if(void 0!==n)return void(i||("}"===t||"}"===n?this.composeBraces(r):r.attributes.set(s,n)));e=e<this.saveI?this.saveI:e;const a=this.trimTex(e!==this.i?this.string.slice(e,this.i):t);if(a&&a!==i&&("\\"!==t||"\\"!==a)){if("_"===a||"^"===a)r.setProperty("sub-sup",a);else{switch(r.getProperty("sub-sup")){case"^":if(r.childNodes[2]&&("}"===a?this.composeBraces(r.childNodes[2]):r.childNodes[2].attributes.hasExplicit(s)||r.childNodes[2].attributes.set(s,a)),r.childNodes[1]){const t=r.childNodes[1].attributes.get(s);this.composeLatex(r,`_${t}^`,0,2)}else this.composeLatex(r,"^",0,2);return;case"_":if(r.childNodes[1]&&("}"===a?this.composeBraces(r.childNodes[1]):r.childNodes[1].attributes.hasExplicit(s)||r.childNodes[1].attributes.set(s,a)),r.childNodes[2]){const t=r.childNodes[2].attributes.get(s);this.composeLatex(r,`^${t}_`,0,1)}else this.composeLatex(r,"_",0,1);return}if("}"===a)return void this.composeBraces(r)}r.attributes.set(s,a)}}composeLatex(t,e,r,s){if(!t.childNodes[r]||!t.childNodes[s])return;const i=W.Attr.LATEX,n=(t.childNodes[r].attributes.get(i)||"")+e+t.childNodes[s].attributes.get(i);t.attributes.set(i,n)}composeBraces(t){const e=this.composeBracedContent(t);t.attributes.set(W.Attr.LATEX,`{${e}}`)}composeBracedContent(t){var e,r;const s=(null===(e=t.childNodes[0])||void 0===e?void 0:e.childNodes)||[];let i="";for(const t of s){const e=(null===(r=null==t?void 0:t.attributes)||void 0===r?void 0:r.get(W.Attr.LATEX))||"";e&&(i+=i&&i.match(/[a-zA-Z]$/)&&e.match(/^[a-zA-Z]/)?" "+e:e)}return i}}const mt=MathJax._.core.Tree.Factory.AbstractFactory;class pt extends ut{}class gt extends mt{constructor(){super(...arguments),this.defaultKind="dummy",this.configuration=null}}gt.DefaultStackItems={[pt.prototype.kind]:pt};const ft=gt;class bt{constructor(){this.mmlFactory=null,this.factory={node:bt.createNode,token:bt.createToken,text:bt.createText,error:bt.createError}}static createNode(t,e,r=[],s={},i){const n=t.mmlFactory.create(e);return n.setChildren(r),i&&n.appendChild(i),V.setProperties(n,s),n}static createToken(t,e,r={},s=""){const i=t.create("text",s);return t.create("node",e,[],r,i)}static createText(t,e){return null==e?null:t.mmlFactory.create("text").setText(e)}static createError(t,e){const r=t.create("text",e),s=t.create("node","mtext",[],{},r);return t.create("node","merror",[s],{"data-mjx-error":e})}setMmlFactory(t){this.mmlFactory=t}set(t,e){this.factory[t]=e}setCreators(t){for(const e in t)this.set(e,t[e])}create(t,...e){const r=(this.factory[t]||this.factory.node)(this,e[0],...e.slice(1));return"node"===t&&this.configuration.addNode(e[0],r),r}get(t){return this.factory[t]}}const yt=MathJax._.util.Entities,At=(yt.options,yt.entities);yt.add,yt.remove,yt.translate,yt.numeric;class kt{static oneof(...t){return new this("string",(e=>t.includes(e)),(t=>t))}constructor(t,e,r){this.name=t,this.verify=e,this.convert=r}}const vt={boolean:new kt("boolean",(t=>"true"===t||"false"===t),(t=>"true"===t)),number:new kt("number",(t=>!!t.match(/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[-+]?\d+)?$/)),(t=>parseFloat(t))),integer:new kt("integer",(t=>!!t.match(/^[-+]?\d+$/)),(t=>parseInt(t))),string:new kt("string",(t=>!0),(t=>t)),dimen:new kt("dimen",(t=>null!==at.matchDimen(t)[0]),(t=>t))};function Pt(t,e){if(0===e)return t.replace(/^\s+/,"").replace(/([^\\\s]|^)((?:\\\\)*(?:\\\s)?)?\s+$/,"$1$2");for(;e>0;)t=t.trim().slice(1,-1),e--;return t}function Tt(t,e,r=!1,s=!1){const i=t.length;let n=0,a="",o=0,c=0,l=!0;for(;o<i;){const s=t[o++];switch(s){case"\\":a+=s+(t[o++]||""),l=!1;continue;case" ":break;case"{":l&&c++,n++;break;case"}":if(!n)throw new lt("ExtraCloseMissingOpen","Extra close brace or missing open brace");n--,l=!1;break;default:if(!n&&e.includes(s))return[Pt(a,r?Math.min(1,c):c),s,t.slice(o)];c>n&&(c=n),l=!1}a+=s}if(n)throw new lt("ExtraOpenMissingClose","Extra open brace or missing close brace");return s&&c?["","",Pt(a,1)]:[Pt(a,r?Math.min(1,c):c),"",t.slice(o)]}const wt={cols:(...t)=>t.map((t=>at.em(t))).join(" "),fenced(t,e,r,s,i="",n=""){const a=t.nodeFactory,o=a.create("node","mrow",[],{open:e,close:s,texClass:X.INNER});let c;if(i)c=new dt("\\"+i+"l"+e,t.parser.stack.env,t).mml();else{const t=a.create("text",e);c=a.create("node","mo",[],{fence:!0,stretchy:!0,symmetric:!0,texClass:X.OPEN},t)}if(V.appendChildren(o,[c,r]),i)c=new dt("\\"+i+"r"+s,t.parser.stack.env,t).mml();else{const t=a.create("text",s);c=a.create("node","mo",[],{fence:!0,stretchy:!0,symmetric:!0,texClass:X.CLOSE},t)}return n&&c.attributes.set("mathcolor",n),V.appendChildren(o,[c]),o},fixedFence(t,e,r,s){const i=t.nodeFactory.create("node","mrow",[],{open:e,close:s,texClass:X.ORD});return e&&V.appendChildren(i,[wt.mathPalette(t,e,"l")]),V.isType(r,"mrow")?V.appendChildren(i,V.getChildren(r)):V.appendChildren(i,[r]),s&&V.appendChildren(i,[wt.mathPalette(t,s,"r")]),i},mathPalette(t,e,r){"{"!==e&&"}"!==e||(e="\\"+e);const s="{\\big"+r+" "+e+"}";return new dt("\\mathchoice"+("{\\bigg"+r+" "+e+"}")+s+s+s,{},t).mml()},fixInitialMO(t,e){for(let r=0,s=e.length;r<s;r++){const s=e[r];if(s&&!V.isType(s,"mspace")&&(!V.isType(s,"TeXAtom")||V.getChildren(s)[0]&&V.getChildren(V.getChildren(s)[0]).length)){if(V.isEmbellished(s)||V.isType(s,"TeXAtom")&&V.getTexClass(s)===X.REL){const r=t.nodeFactory.create("node","mi");e.unshift(r)}break}}},internalMath(t,e,r,s){if(e=e.replace(/ +/g," "),t.configuration.options.internalMath)return t.configuration.options.internalMath(t,e,r,s);const i=s||t.stack.env.font,n=i?{mathvariant:i}:{};let a,o,c=[],l=0,h=0,u="",d=0;if(e.match(/\\?[${}\\]|\\\(|\\(?:eq)?ref\s*\{|\\U/)){for(;l<e.length;)if(a=e.charAt(l++),"$"===a)"$"===u&&0===d?(o=t.create("node","TeXAtom",[new dt(e.slice(h,l-1),{},t.configuration).mml()]),c.push(o),u="",h=l):""===u&&(h<l-1&&c.push(wt.internalText(t,e.slice(h,l-1),n)),u="$",h=l);else if("{"===a&&""!==u)d++;else if("}"===a)if("}"===u&&0===d){const r=new dt(e.slice(h,l),{},t.configuration).mml();o=t.create("node","TeXAtom",[r],n),c.push(o),u="",h=l}else""!==u&&d&&d--;else if("\\"===a)if(""===u&&e.substring(l).match(/^(eq)?ref\s*\{/)){const r=RegExp["$&"].length;h<l-1&&c.push(wt.internalText(t,e.slice(h,l-1),n)),u="}",h=l-1,l+=r}else if(a=e.charAt(l++),"("===a&&""===u)h<l-2&&c.push(wt.internalText(t,e.slice(h,l-2),n)),u=")",h=l;else if(")"===a&&")"===u&&0===d)o=t.create("node","TeXAtom",[new dt(e.slice(h,l-2),{},t.configuration).mml()]),c.push(o),u="",h=l;else if(a.match(/[${}\\]/)&&""===u)l--,e=e.substring(0,l-1)+e.substring(l);else if("U"===a){const t=e.substring(l).match(/^\s*(?:([0-9A-F])|\{\s*([0-9A-F]+)\s*\})/);if(!t)throw new lt("BadRawUnicode","Argument to %1 must a hexadecimal number with 1 to 6 digits","\\U");const r=String.fromCodePoint(parseInt(t[1]||t[2],16));e=e.substring(0,l-2)+r+e.substring(l+t[0].length),l=l-2+r.length}if(""!==u)throw new lt("MathNotTerminated","Math mode is not properly terminated")}return h<e.length&&c.push(wt.internalText(t,e.slice(h),n)),null!=r?c=[t.create("node","mstyle",c,{displaystyle:!1,scriptlevel:r})]:c.length>1&&(c=[t.create("node","mrow",c)]),c},internalText(t,e,r){e=e.replace(/\n+/g," ").replace(/^ +/,At.nbsp).replace(/ +$/,At.nbsp);const s=t.create("text",e);return t.create("node","mtext",[],r,s)},underOver(t,e,r,s,i){if(wt.checkMovableLimits(e),V.isType(e,"munderover")&&V.isEmbellished(e)){V.setProperties(V.getCoreMO(e),{lspace:0,rspace:0});const r=t.create("node","mo",[],{rspace:0});e=t.create("node","mrow",[r,e])}const n=t.create("node","munderover",[e]);V.setChild(n,"over"===s?n.over:n.under,r);let a=n;return i&&(a=t.create("node","TeXAtom",[t.create("node","mstyle",[n],{displaystyle:!0,scriptlevel:0})],{texClass:X.OP,movesupsub:!0})),V.setProperty(a,"subsupOK",!0),a},checkMovableLimits(t){const e=V.isType(t,"mo")?V.getForm(t):null;(V.getProperty(t,"movablelimits")||e&&e[3]&&e[3].movablelimits)&&V.setProperties(t,{movablelimits:!1})},setArrayAlign:(t,e,r)=>(r||(e=at.trimSpaces(e||"")),"t"===e?t.arraydef.align="baseline 1":"b"===e?t.arraydef.align="baseline -1":"c"===e?t.arraydef.align="axis":e&&(r?(r.string=`[${e}]`+r.string.slice(r.i),r.i=0):t.arraydef.align=e),t),substituteArgs(t,e,r){let s="",i="",n=0;for(;n<r.length;){let a=r.charAt(n++);if("\\"===a)s+=a+r.charAt(n++);else if("#"===a)if(a=r.charAt(n++),"#"===a)s+=a;else{if(!a.match(/[1-9]/)||parseInt(a,10)>e.length)throw new lt("IllegalMacroParam","Illegal macro parameter reference");i=wt.addArgs(t,wt.addArgs(t,i,s),e[parseInt(a,10)-1]),s=""}else s+=a}return wt.addArgs(t,i,s)},addArgs(t,e,r){if(r.match(/^[a-z]/i)&&e.match(/(^|[^\\])(\\\\)*\\[a-z]+$/i)&&(e+=" "),e.length+r.length>t.configuration.options.maxBuffer)throw new lt("MaxBufferSize","MathJax internal buffer size exceeded; is there a recursive macro call?");return e+r},checkMaxMacros(t,e=!0){if(!(++t.macroCount<=t.configuration.options.maxMacros))throw e?new lt("MaxMacroSub1","MathJax maximum macro substitution count exceeded; is here a recursive macro call?"):new lt("MaxMacroSub2","MathJax maximum substitution count exceeded; is there a recursive latex environment?")},checkEqnEnv(t,e=!0){const r=t.stack.Top(),s=r.First;if(!(r.getProperty("nestable")&&e&&!s||r.getProperty("nestStart"))&&(!r.isKind("start")||s))throw new lt("ErroneousNestingEq","Erroneous nesting of equation structures")},copyNode(t,e){const r=t.copy(),s=e.configuration;return r.walkTree((t=>{s.addNode(t.kind,t);const e=(t.getProperty("in-lists")||"").split(/,/);for(const r of e)r&&s.addNode(r,t)})),r},mmlFilterAttribute:(t,e,r)=>r,getFontDef(t){const e=t.stack.env.font;return e?{mathvariant:e}:{}},keyvalOptions(t,e=null,r=!1,s=!1){const i=function(t,e=!1){const r={};let s,i,n,a=t,o=!0;for(;a;)[i,s,a]=Tt(a,["=",","],e,o),o=!1,"="===s?([n,s,a]=Tt(a,[","],e),n="false"===n||"true"===n?JSON.parse(n):n,r[i]=n):i&&(r[i]=!0);return r}(t,s);if(e)for(const t of Object.keys(i))if(Object.hasOwn(e,t)){if(e[t]instanceof kt){const r=e[t],s=String(i[t]);if(!r.verify(s))throw new lt("InvalidValue","Value for key '%1' is not of the expected type",t);i[t]=r.convert(s)}}else{if(r)throw new lt("InvalidOption","Invalid option: %1",t);delete i[t]}return i},isLatinOrGreekChar:t=>!!t.normalize("NFD").match(/[a-zA-Z\u0370-\u03F0]/)};class Mt{constructor(){this.columnHandler={l:t=>t.calign[t.j++]="left",c:t=>t.calign[t.j++]="center",r:t=>t.calign[t.j++]="right",p:t=>this.getColumn(t,"top"),m:t=>this.getColumn(t,"middle"),b:t=>this.getColumn(t,"bottom"),w:t=>this.getColumn(t,"top",""),W:t=>this.getColumn(t,"top",""),"|":t=>this.addRule(t,"solid"),":":t=>this.addRule(t,"dashed"),">":t=>t.cstart[t.j]=(t.cstart[t.j]||"")+this.getBraces(t),"<":t=>t.cend[t.j-1]=(t.cend[t.j-1]||"")+this.getBraces(t),"@":t=>this.addAt(t,this.getBraces(t)),"!":t=>this.addBang(t,this.getBraces(t)),"*":t=>this.repeat(t),P:t=>this.macroColumn(t,">{$}p{#1}<{$}",1),M:t=>this.macroColumn(t,">{$}m{#1}<{$}",1),B:t=>this.macroColumn(t,">{$}b{#1}<{$}",1)," ":t=>{}},this.MAXCOLUMNS=1e4}process(t,e,r){const s={parser:t,template:e,i:0,j:0,c:"",cwidth:[],calign:[],cspace:[],clines:[],cstart:r.cstart,cend:r.cend,ralign:r.ralign,cextra:r.cextra};let i=0;for(;s.i<s.template.length;){if(i++>this.MAXCOLUMNS)throw new lt("MaxColumns","Too many column specifiers (perhaps looping column definitions?)");const t=s.template.codePointAt(s.i),e=s.c=String.fromCodePoint(t);if(s.i+=e.length,!Object.hasOwn(this.columnHandler,e))throw new lt("BadPreamToken","Illegal pream-token (%1)",e);this.columnHandler[e](s)}this.setColumnAlign(s,r),this.setColumnWidths(s,r),this.setColumnSpacing(s,r),this.setColumnLines(s,r),this.setPadding(s,r)}setColumnAlign(t,e){e.arraydef.columnalign=t.calign.join(" ")}setColumnWidths(t,e){if(!t.cwidth.length)return;const r=[...t.cwidth];r.length<t.calign.length&&r.push("auto"),e.arraydef.columnwidth=r.map((t=>t||"auto")).join(" ")}setColumnSpacing(t,e){if(!t.cspace.length)return;const r=[...t.cspace];r.length<t.calign.length&&r.push("1em"),e.arraydef.columnspacing=r.slice(1).map((t=>t||"1em")).join(" ")}setColumnLines(t,e){if(!t.clines.length)return;const r=[...t.clines];r[0]&&e.frame.push(["left",r[0]]),r.length>t.calign.length?e.frame.push(["right",r.pop()]):r.length<t.calign.length&&r.push("none"),r.length>1&&(e.arraydef.columnlines=r.slice(1).map((t=>t||"none")).join(" "))}setPadding(t,e){if(!t.cextra[0]&&!t.cextra[t.calign.length-1])return;const r=t.calign.length-1,s=t.cspace,i=t.cextra[r]?s[r]:null;e.arraydef["data-array-padding"]=`${s[0]||".5em"} ${i||".5em"}`}getColumn(t,e,r="left"){t.calign[t.j]=r||this.getAlign(t),t.cwidth[t.j]=this.getDimen(t),t.ralign[t.j]=[e,t.cwidth[t.j],t.calign[t.j]],t.j++}getDimen(t){const e=this.getBraces(t);if(!at.matchDimen(e)[0])throw new lt("MissingColumnDimOrUnits","Missing dimension or its units for %1 column declaration",t.c);return e}getAlign(t){const e=this.getBraces(t);return F(e.toLowerCase(),{l:"left",c:"center",r:"right"},"")}getBraces(t){for(;" "===t.template[t.i];)t.i++;if(t.i>=t.template.length)throw new lt("MissingArgForColumn","Missing argument for %1 column declaration",t.c);if("{"!==t.template[t.i])return t.template[t.i++];const e=++t.i;let r=1;for(;t.i<t.template.length;)switch(t.template.charAt(t.i++)){case"\\":t.i++;break;case"{":r++;break;case"}":if(0===--r)return t.template.slice(e,t.i-1)}throw new lt("MissingCloseBrace","Missing close brace")}macroColumn(t,e,r){const s=[];for(;r>0&&r--;)s.push(this.getBraces(t));t.template=wt.substituteArgs(t.parser,s,e)+t.template.slice(t.i),t.i=0}addRule(t,e){t.clines[t.j]&&this.addAt(t,"\\,"),t.clines[t.j]=e,"0"===t.cspace[t.j]&&(t.cstart[t.j]="\\hspace{.5em}")}addAt(t,e){const{cstart:r,cspace:s,j:i}=t;t.cextra[i]=!0,t.calign[i]="center",t.clines[i]&&(".5em"===s[i]?r[i-1]+="\\hspace{.25em}":s[i]||(t.cend[i-1]=(t.cend[i-1]||"")+"\\hspace{.5em}")),r[i]=e,s[i]="0",s[++t.j]="0"}addBang(t,e){const{cstart:r,cspace:s,j:i}=t;t.cextra[i]=!0,t.calign[i]="center",r[i]=("0"===s[i]&&t.clines[i]?"\\hspace{.25em}":"")+e,s[i]||(s[i]=".5em"),s[++t.j]=".5em"}repeat(t){const e=this.getBraces(t),r=this.getBraces(t),s=parseInt(e);if(String(s)!==e)throw new lt("ColArgNotNum","First argument to %1 column specifier must be a number","*");t.template=new Array(s).fill(r).join("")+t.template.substring(t.i),t.i=0}}const xt=W.Variant;class Ot{constructor(t,e=[]){this.options={},this.columnParser=new Mt,this.packageData=new Map,this.parsers=[],this.root=null,this.nodeLists={},this.error=!1,this.handlers=t.handlers,this.nodeFactory=new bt,this.nodeFactory.configuration=this,this.nodeFactory.setCreators(t.nodes),this.itemFactory=new ft(t.items),this.itemFactory.configuration=this,I(this.options,...e),I(this.options,t.options),this.mathStyle=Ot.getVariant.get(this.options.mathStyle)||Ot.getVariant.get("TeX")}pushParser(t){this.parsers.unshift(t)}popParser(){this.parsers.shift()}get parser(){return this.parsers[0]}clear(){this.parsers=[],this.root=null,this.nodeLists={},this.error=!1,this.tags.resetTag()}addNode(t,e){let r=this.nodeLists[t];if(r||(r=this.nodeLists[t]=[]),r.push(e),e.kind!==t){const r=V.getProperty(e,"in-lists")||"",s=(r?r.split(/,/):[]).concat(t).join(",");V.setProperty(e,"in-lists",s)}}getList(t){const e=this.nodeLists[t]||[],r=[];for(const t of e)this.inTree(t)&&r.push(t);return this.nodeLists[t]=r,r}removeFromList(t,e){const r=this.nodeLists[t]||[];for(const t of e){const e=r.indexOf(t);e>=0&&r.splice(e,1)}}inTree(t){for(;t&&t!==this.root;)t=t.parent;return!!t}}Ot.getVariant=new Map([["TeX",(t,e)=>e&&t.match(/^[\u0391-\u03A9\u03F4]/)?xt.NORMAL:""],["ISO",t=>xt.ITALIC],["French",t=>t.normalize("NFD").match(/^[a-z]/)?xt.ITALIC:xt.NORMAL],["upright",t=>xt.NORMAL]]);const Et=Ot;class St{constructor(t="???",e=""){this.tag=t,this.id=e}}class Ct{constructor(t="",e=!1,r=!1,s=null,i="",n="",a=!1,o=""){this.env=t,this.taggable=e,this.defaultTags=r,this.tag=s,this.tagId=i,this.tagFormat=n,this.noTag=a,this.labelId=o}}class It{constructor(){this.counter=0,this.allCounter=0,this.configuration=null,this.ids={},this.allIds={},this.labels={},this.allLabels={},this.redo=!1,this.refUpdate=!1,this.currentTag=new Ct,this.history=[],this.stack=[],this.enTag=function(t,e){const r=this.configuration.nodeFactory,s=r.create("node","mtd",[t]),i=r.create("node","mlabeledtr",[e,s]);return r.create("node","mtable",[i],{side:this.configuration.options.tagSide,minlabelspacing:this.configuration.options.tagIndent,displaystyle:!0})}}start(t,e,r){this.currentTag&&this.stack.push(this.currentTag);const s=this.label;this.currentTag=new Ct(t,e,r),this.label=s}get env(){return this.currentTag.env}end(){this.history.push(this.currentTag);const t=this.label;this.currentTag=this.stack.pop(),t&&!this.label&&(this.label=t)}tag(t,e){this.currentTag.tag=t,this.currentTag.tagFormat=e?t:this.formatTag(t),this.currentTag.noTag=!1}notag(){this.tag("",!0),this.currentTag.noTag=!0}get noTag(){return this.currentTag.noTag}set label(t){this.currentTag.labelId=t}get label(){return this.currentTag.labelId}formatUrl(t,e){return e+"#"+encodeURIComponent(t)}formatTag(t){return["(",t,")"]}formatRef(t){return this.formatTag(t)}formatId(t){return"mjx-eqn:"+t.replace(/\s/g,"_")}formatNumber(t){return t.toString()}autoTag(){null==this.currentTag.tag&&(this.counter++,this.tag(this.formatNumber(this.counter),!1))}clearTag(){this.tag(null,!0),this.currentTag.tagId=""}getTag(t=!1){if(t)return this.autoTag(),this.makeTag();const e=this.currentTag;return e.taggable&&!e.noTag&&(e.defaultTags&&this.autoTag(),e.tag)?this.makeTag():null}resetTag(){this.history=[],this.redo=!1,this.refUpdate=!1,this.clearTag()}reset(t=0){this.resetTag(),this.counter=this.allCounter=t,this.allLabels={},this.allIds={},this.label=""}startEquation(t){this.history=[],this.stack=[],this.clearTag(),this.currentTag=new Ct("",void 0,void 0),this.labels={},this.ids={},this.counter=this.allCounter,this.redo=!1;const e=t.inputData.recompile;e&&(this.refUpdate=!0,this.counter=e.counter)}finishEquation(t){this.redo&&(t.inputData.recompile={state:t.state(),counter:this.allCounter}),this.refUpdate||(this.allCounter=this.counter),Object.assign(this.allIds,this.ids),Object.assign(this.allLabels,this.labels)}finalize(t,e){if(!e.display||this.currentTag.env||null==this.currentTag.tag)return t;const r=this.makeTag();return this.enTag(t,r)}makeId(){this.currentTag.tagId=this.formatId(this.configuration.options.useLabelIds&&this.label||this.currentTag.tag)}makeTag(){var t;this.makeId(),this.label&&(this.labels[this.label]=new St(this.currentTag.tag,this.currentTag.tagId),this.label="");const e=this.currentTag.tagFormat,r=Array.isArray(e)?e:(null===(t=e.match(/^(\(|\[|\{)(.*)(\}|\]|\))$/))||void 0===t?void 0:t.slice(1))||[e],s=new dt(r.map((t=>t?`\\text{${t}}`:"")).join(""),{},this.configuration).mml();return this.configuration.nodeFactory.create("node","mtd",[s],{id:this.currentTag.tagId,rowalign:this.configuration.options.tagAlign})}}class Lt extends It{autoTag(){}getTag(){return this.currentTag.tag?super.getTag():null}}class Nt extends It{finalize(t,e){if(!e.display||this.history.find((function(t){return t.taggable})))return t;const r=this.getTag(!0);return this.enTag(t,r)}}const Ft=new Map([["none",Lt],["all",Nt]]);let Rt="none";const Bt={OPTIONS:{tags:Rt,tagSide:"right",tagIndent:"0.8em",useLabelIds:!0,ignoreDuplicateLabels:!1,tagAlign:"baseline"},add(t,e){Ft.set(t,e)},addTags(t){for(const e of Object.keys(t))Bt.add(e,t[e])},create(t){const e=Ft.get(t)||Ft.get(Rt);if(!e)throw Error("Unknown tags class");return new e},setDefault(t){Rt=t},getDefault:()=>Bt.create(Rt)};class Dt{constructor(t,e,r){this._token=t,this._char=e,this._attributes=r}get token(){return this._token}get char(){return this._char}get attributes(){return this._attributes}}class Gt{constructor(t,e,r=[]){this._token=t,this._func=e,this._args=r}get token(){return this._token}get func(){return this._func}get args(){return this._args}}function Ut(t){return void 0===t||t}class _t{constructor(t,e){this._name=t,this._parser=e,Zt.register(this)}get name(){return this._name}parserFor(t){return this.contains(t)?this.parser:null}parse([t,e]){const r=this.parserFor(e),s=this.lookup(e);return r&&s?Ut(r(t,s)):null}set parser(t){this._parser=t}get parser(){return this._parser}}class jt extends _t{constructor(t,e,r){super(t,e),this._regExp=r}contains(t){return this._regExp.test(t)}lookup(t){return this.contains(t)?t:null}}class Kt extends _t{constructor(){super(...arguments),this.map=new Map}lookup(t){return this.map.get(t)}contains(t){return this.map.has(t)}add(t,e){this.map.set(t,e)}remove(t){this.map.delete(t)}}class Ht extends Kt{constructor(t,e,r){super(t,e);for(const t of Object.keys(r)){const e=r[t],[s,i]="string"==typeof e?[e,null]:e,n=new Dt(t,s,i);this.add(t,n)}}}class Xt extends Ht{parse([t,e]){return super.parse([t,"\\"+e])}}class zt extends Kt{constructor(t,e,r={}){super(t,null);const s=t=>"string"==typeof t?r[t]:t;for(const[t,r]of Object.entries(e)){let e,i;Array.isArray(r)?(e=s(r[0]),i=r.slice(1)):(e=s(r),i=[]);const n=new Gt(t,e,i);this.add(t,n)}}parserFor(t){const e=this.lookup(t);return e?e.func:null}parse([t,e]){const r=this.lookup(e),s=this.parserFor(e);return r&&s?Ut(s(t,r.token,...r.args)):null}}class qt extends zt{parse([t,e]){const r=this.lookup(e),s=this.parserFor(e);if(!r||!s)return null;const i=t.currentCS;t.currentCS="\\"+e;const n=s(t,"\\"+r.token,...r.args);return t.currentCS=i,Ut(n)}}class $t extends zt{constructor(t,e,r,s={}){super(t,r,s),this.parser=e}parse([t,e]){const r=this.lookup(e),s=this.parserFor(e);return r&&s?Ut(this.parser(t,r.token,s,r.args)):null}}const Jt=MathJax._.util.PrioritizedList.PrioritizedList,Vt=MathJax._.util.FunctionList.FunctionList,Wt=new Map,Zt={register(t){Wt.set(t.name,t)},getMap:t=>Wt.get(t)};class Yt{constructor(){this._configuration=new Jt,this._fallback=new Vt}add(t,e,r=Jt.DEFAULTPRIORITY){for(const e of t.slice().reverse()){const t=Zt.getMap(e);if(!t)return void this.warn(`Configuration '${e}' not found! Omitted.`);this._configuration.add(t,r)}e&&this._fallback.add(e,r)}remove(t,e=null){for(const e of t){const t=this.retrieve(e);t&&this._configuration.remove(t)}e&&this._fallback.remove(e)}parse(t){for(const{item:e}of this._configuration){const r=e.parse(t);if(r===Yt.FALLBACK)break;if(r)return r}const[e,r]=t;Array.from(this._fallback)[0].item(e,r)}lookup(t){const e=this.applicable(t);return e?e.lookup(t):null}contains(t){const e=this.applicable(t);return!(!e||e instanceof Ht&&null===e.lookup(t).char)}toString(){const t=[];for(const{item:e}of this._configuration)t.push(e.name);return t.join(", ")}applicable(t){for(const{item:e}of this._configuration)if(e.contains(t))return e;return null}retrieve(t){for(const{item:e}of this._configuration)if(e.name===t)return e;return null}warn(t){console.log("TexParser Warning: "+t)}}Yt.FALLBACK=Symbol("fallback");class Qt{constructor(){this.map=new Map}add(t,e,r=Jt.DEFAULTPRIORITY){for(const s of Object.keys(t)){const i=s;let n=this.get(i);n||(n=new Yt,this.set(i,n)),n.add(t[i],e[i],r)}}remove(t,e){for(const r of Object.keys(t)){const s=this.get(r);s&&s.remove(t[r],e[r])}}set(t,e){this.map.set(t,e)}get(t){return this.map.get(t)}retrieve(t){for(const e of this.map.values()){const r=e.retrieve(t);if(r)return r}return null}keys(){return this.map.keys()}}class te{static makeProcessor(t,e){return Array.isArray(t)?t:[t,e]}static _create(t,e={}){var r;const s=null!==(r=e.priority)&&void 0!==r?r:Jt.DEFAULTPRIORITY,i=e.init?this.makeProcessor(e.init,s):null,n=e.config?this.makeProcessor(e.config,s):null,a=(e.preprocessors||[]).map((t=>this.makeProcessor(t,s))),o=(e.postprocessors||[]).map((t=>this.makeProcessor(t,s))),c=e.parser||"tex";return new te(t,e[st.HANDLER]||{},e[st.FALLBACK]||{},e[st.ITEMS]||{},e[st.TAGS]||{},e[st.OPTIONS]||{},e[st.NODES]||{},a,o,i,n,s,c)}static create(t,e={}){const r=te._create(t,e);return re.set(t,r),r}static local(t={}){return te._create("",t)}constructor(t,e={},r={},s={},i={},n={},a={},o=[],c=[],l=null,h=null,u,d){this.name=t,this.handler=e,this.fallback=r,this.items=s,this.tags=i,this.options=n,this.nodes=a,this.preprocessors=o,this.postprocessors=c,this.initMethod=l,this.configMethod=h,this.priority=u,this.parser=d,this.handler=Object.assign({[it.CHARACTER]:[],[it.DELIMITER]:[],[it.MACRO]:[],[it.ENVIRONMENT]:[]},e)}get init(){return this.initMethod?this.initMethod[0]:null}get config(){return this.configMethod?this.configMethod[0]:null}}const ee=new Map,re={set(t,e){ee.set(t,e)},get:t=>ee.get(t),keys:()=>ee.keys()};class se{constructor(t,e=["tex"]){this.initMethod=new Vt,this.configMethod=new Vt,this.configurations=new Jt,this.parsers=[],this.handlers=new Qt,this.items={},this.tags={},this.options={},this.nodes={},this.parsers=e;for(const e of t.slice().reverse())this.addPackage(e);for(const{item:t,priority:e}of this.configurations)this.append(t,e)}init(){this.initMethod.execute(this)}config(t){this.configMethod.execute(this,t);for(const e of this.configurations)this.addFilters(t,e.item)}addPackage(t){const e="string"==typeof t?t:t[0],r=this.getPackage(e);r&&this.configurations.add(r,"string"==typeof t?r.priority:t[1])}add(t,e,r={}){const s=this.getPackage(t);this.append(s),this.configurations.add(s,s.priority),this.init();const i=e.parseOptions;i.nodeFactory.setCreators(s.nodes);for(const t of Object.keys(s.items))i.itemFactory.setNodeClass(t,s.items[t]);Bt.addTags(s.tags),I(i.options,s.options),L(i.options,r),this.addFilters(e,s),s.config&&s.config(this,e)}getPackage(t){const e=re.get(t);if(e&&!this.parsers.includes(e.parser))throw Error(`Package '${t}' doesn't target the proper parser`);return e||this.warn(`Package '${t}' not found. Omitted.`),e}append(t,e){e=e||t.priority,t.initMethod&&this.initMethod.add(t.initMethod[0],t.initMethod[1]),t.configMethod&&this.configMethod.add(t.configMethod[0],t.configMethod[1]),this.handlers.add(t.handler,t.fallback,e),Object.assign(this.items,t.items),Object.assign(this.tags,t.tags),I(this.options,t.options),Object.assign(this.nodes,t.nodes)}addFilters(t,e){for(const[r,s]of e.preprocessors)t.preFilters.add(r,s);for(const[r,s]of e.postprocessors)t.postFilters.add(r,s)}warn(t){console.warn("MathJax Warning: "+t)}}const ie=MathJax._.util.Styles,ne=ie.TRBL;ie.WSC,ie.Styles;class ae extends ut{constructor(t,e){super(t),this.global=e}get kind(){return"start"}get isOpen(){return!0}checkItem(t){if(t.isKind("stop")){let t=this.toMml();return this.global.isInner||(t=this.factory.configuration.tags.finalize(t,this.env)),[[this.factory.create("mml",t)],!0]}return super.checkItem(t)}}class oe extends ut{get kind(){return"stop"}get isClose(){return!0}}class ce extends ut{get kind(){return"open"}get isOpen(){return!0}checkItem(t){if(t.isKind("close")){const e=this.toMml(),r=this.create("node","TeXAtom",[e]);return t.addLatexItem(r),[[this.factory.create("mml",r)],!0]}return super.checkItem(t)}}ce.errors=Object.assign(Object.create(ut.errors),{stop:["ExtraOpenMissingClose","Extra open brace or missing close brace"]});class le extends ut{get kind(){return"close"}get isClose(){return!0}}class he extends ut{get kind(){return"null"}}class ue extends ut{get kind(){return"prime"}checkItem(t){const[e,r]=this.Peek(2),s=(V.isType(e,"msubsup")||V.isType(e,"msup"))&&!V.getChildAt(e,e.sup),i=(V.isType(e,"munderover")||V.isType(e,"mover"))&&!V.getChildAt(e,e.over)&&!V.getProperty(e,"subsupOK");if(!s&&!i){return[[this.create("node",e.getProperty("movesupsub")?"mover":"msup",[e,r]),t],!0]}const n=s?e.sup:e.over;return V.setChild(e,n,r),[[e,t],!0]}}class de extends ut{get kind(){return"subsup"}checkItem(t){if(t.isKind("open")||t.isKind("left"))return ut.success;const e=this.First,r=this.getProperty("position");if(t.isKind("mml")){if(this.getProperty("primes"))if(2!==r)V.setChild(e,2,this.getProperty("primes"));else{V.setProperty(this.getProperty("primes"),"variantForm",!0);const e=this.create("node","mrow",[this.getProperty("primes"),t.First]);t.First=e}V.setChild(e,r,t.First),null!=this.getProperty("movesupsub")&&V.setProperty(e,"movesupsub",this.getProperty("movesupsub"));return[[this.factory.create("mml",e)],!0]}super.checkItem(t);const s=this.getErrors(["","sub","sup"][r]);throw new lt(s[0],s[1],...s.splice(2))}}de.errors=Object.assign(Object.create(ut.errors),{stop:["MissingScript","Missing superscript or subscript argument"],sup:["MissingOpenForSup","Missing open brace for superscript"],sub:["MissingOpenForSub","Missing open brace for subscript"]});class me extends ut{constructor(t){super(t),this.setProperty("name","\\over")}get kind(){return"over"}get isClose(){return!0}checkItem(t){if(t.isKind("over"))throw new lt("AmbiguousUseOf","Ambiguous use of %1",t.getName());if(t.isClose){let e=this.create("node","mfrac",[this.getProperty("num"),this.toMml(!1)]);return null!=this.getProperty("thickness")&&V.setAttribute(e,"linethickness",this.getProperty("thickness")),(this.getProperty("ldelim")||this.getProperty("rdelim"))&&(V.setProperty(e,"withDelims",!0),e=wt.fixedFence(this.factory.configuration,this.getProperty("ldelim"),e,this.getProperty("rdelim"))),e.attributes.set(W.Attr.LATEXITEM,this.getProperty("name")),[[this.factory.create("mml",e),t],!0]}return super.checkItem(t)}toString(){return"over["+this.getProperty("num")+" / "+this.nodes.join("; ")+"]"}}class pe extends ut{constructor(t,e){super(t),this.setProperty("delim",e)}get kind(){return"left"}get isOpen(){return!0}checkItem(t){if(t.isKind("right")){const e=wt.fenced(this.factory.configuration,this.getProperty("delim"),this.toMml(),t.getProperty("delim"),"",t.getProperty("color")),r=e.childNodes[0],s=e.childNodes[e.childNodes.length-1],i=this.factory.create("mml",e);return this.addLatexItem(r,"\\left"),t.addLatexItem(s,"\\right"),i.Peek()[0].attributes.set(W.Attr.LATEXITEM,"\\left"+t.startStr.slice(this.startI,t.stopI)),[[i],!0]}if(t.isKind("middle")){const e={stretchy:!0};t.getProperty("color")&&(e.mathcolor=t.getProperty("color"));const r=this.create("token","mo",e,t.getProperty("delim"));return t.addLatexItem(r,"\\middle"),this.Push(this.create("node","TeXAtom",[],{texClass:X.CLOSE}),r,this.create("node","TeXAtom",[],{texClass:X.OPEN})),this.env={},[[this],!0]}return super.checkItem(t)}}pe.errors=Object.assign(Object.create(ut.errors),{stop:["ExtraLeftMissingRight","Extra \\left or missing \\right"]});class ge extends ut{constructor(t,e,r){super(t),this.setProperty("delim",e),r&&this.setProperty("color",r)}get kind(){return"middle"}get isClose(){return!0}}class fe extends ut{constructor(t,e,r){super(t),this.setProperty("delim",e),r&&this.setProperty("color",r)}get kind(){return"right"}get isClose(){return!0}}class be extends ut{get kind(){return"break"}constructor(t,e,r){super(t),this.setProperty("linebreak",e),this.setProperty("insert",r)}checkItem(t){var e,r;const s=this.getProperty("linebreak");if(t.isKind("mml")){const i=t.First;if(i.isKind("mo")){if("after"!==((null===(r=null===(e=V.getOp(i))||void 0===e?void 0:e[3])||void 0===r?void 0:r.linebreakstyle)||V.getAttribute(i,"linebreakstyle")))return V.setAttribute(i,"linebreak",s),[[t],!0];if(!this.getProperty("insert"))return[[t],!0]}}const i=this.create("token","mspace",{linebreak:s});return[[this.factory.create("mml",i),t],!0]}}class ye extends ut{get kind(){return"begin"}get isOpen(){return!0}checkItem(t){if(t.isKind("end")){if(t.getName()!==this.getName())throw new lt("EnvBadEnd","\\begin{%1} ended with \\end{%2}",this.getName(),t.getName());const e=this.toMml();return t.addLatexItem(e),[[this.factory.create("mml",e)],!0]}if(t.isKind("stop"))throw new lt("EnvMissingEnd","Missing \\end{%1}",this.getName());return super.checkItem(t)}}class Ae extends ut{get kind(){return"end"}get isClose(){return!0}}class ke extends ut{get kind(){return"style"}checkItem(t){if(!t.isClose)return super.checkItem(t);const e=this.create("node","mstyle",this.nodes,this.getProperty("styles"));return[[this.factory.create("mml",e),t],!0]}}class ve extends ut{get kind(){return"position"}checkItem(t){if(t.isClose)throw new lt("MissingBoxFor","Missing box for %1",this.getName());if(t.isFinal){let e=t.toMml();switch(this.getProperty("move")){case"vertical":return e=this.create("node","mpadded",[e],{height:this.getProperty("dh"),depth:this.getProperty("dd"),voffset:this.getProperty("dh")}),[[this.factory.create("mml",e)],!0];case"horizontal":return[[this.factory.create("mml",this.getProperty("left")),t,this.factory.create("mml",this.getProperty("right"))],!0]}}return super.checkItem(t)}}class Pe extends ut{get kind(){return"cell"}get isClose(){return!0}}class Te extends ut{get isFinal(){return!0}get kind(){return"mml"}}class we extends ut{get kind(){return"fn"}checkItem(t){const e=this.First;if(e){if(t.isOpen)return ut.success;if(!t.isKind("fn")){let r=t.First;if(!t.isKind("mml")||!r)return[[e,t],!0];if(V.isType(r,"mstyle")&&r.childNodes.length&&V.isType(r.childNodes[0].childNodes[0],"mspace")||V.isType(r,"mspace"))return[[e,t],!0];V.isEmbellished(r)&&(r=V.getCoreMO(r));const s=V.getForm(r);if(null!=s&&[0,0,1,1,0,1,1,0,0,0][s[2]])return[[e,t],!0]}if(e.isKind("TeXAtom")&&0===e.childNodes[0].childNodes.length)return[[e,t],!0];return[[e,this.create("token","mo",{texClass:X.NONE},At.ApplyFunction),t],!0]}return super.checkItem(t)}}class Me extends ut{constructor(){super(...arguments),this.remap=Zt.getMap("not_remap")}get kind(){return"not"}checkItem(t){let e,r,s;if(t.isKind("open")||t.isKind("left"))return ut.success;if(t.isKind("mml")&&(V.isType(t.First,"mo")||V.isType(t.First,"mi")||V.isType(t.First,"mtext"))&&(e=t.First,r=V.getText(e),1===r.length&&!V.getProperty(e,"movesupsub")&&1===V.getChildren(e).length))return this.remap.contains(r)?(s=this.create("text",this.remap.lookup(r).char),V.setChild(e,0,s)):(s=this.create("text","\u0338"),V.appendChildren(e,[s])),[[t],!0];s=this.create("text","\u29f8");const i=this.create("node","mtext",[],{},s),n=this.create("node","mpadded",[i],{width:0});return e=this.create("node","TeXAtom",[n],{texClass:X.REL}),[[e,t],!0]}}class xe extends ut{get kind(){return"nonscript"}checkItem(t){if(t.isKind("mml")&&1===t.Size()){let e=t.First;if(e.isKind("mstyle")&&e.notParent&&(e=V.getChildren(V.getChildren(e)[0])[0]),e.isKind("mspace")){if(e!==t.First){const e=this.create("node","mrow",[t.Pop()]);t.Push(e)}this.factory.configuration.addNode("nonscript",t.First)}}return[[t],!0]}}class Oe extends ut{get kind(){return"dots"}checkItem(t){if(t.isKind("open")||t.isKind("left"))return ut.success;let e=this.getProperty("ldots");const r=t.First;if(t.isKind("mml")&&V.isEmbellished(r)){const t=V.getTexClass(V.getCoreMO(r));t!==X.BIN&&t!==X.REL||(e=this.getProperty("cdots"))}return[[e,t],!0]}}class Ee extends ut{constructor(){super(...arguments),this.table=[],this.row=[],this.frame=[],this.hfill=[],this.arraydef={},this.cstart=[],this.cend=[],this.cextra=[],this.atEnd=!1,this.ralign=[],this.breakAlign={cell:"",row:"",table:""},this.templateSubs=0}get kind(){return"array"}get isOpen(){return!0}get copyEnv(){return!1}checkItem(t){if(t.isClose&&!t.isKind("over")){if(t.getProperty("isEntry"))return this.EndEntry(),this.clearEnv(),this.StartEntry(),ut.fail;if(t.getProperty("isCR"))return this.EndEntry(),this.EndRow(),this.clearEnv(),this.StartEntry(),ut.fail;this.EndTable(),this.clearEnv();const e=this.factory.create("mml",this.createMml());if(this.getProperty("requireClose")){if(t.isKind("close"))return[[e],!0];throw new lt("MissingCloseBrace","Missing close brace")}return[[e,t],!0]}return super.checkItem(t)}createMml(){const t=this.arraydef.scriptlevel;delete this.arraydef.scriptlevel;let e=this.create("node","mtable",this.table,this.arraydef);return t&&e.setProperty("smallmatrix",!0),this.breakAlign.table&&V.setAttribute(e,"data-break-align",this.breakAlign.table),this.getProperty("arrayPadding")&&(V.setAttribute(e,"data-frame-styles",""),V.setAttribute(e,"framespacing",this.getProperty("arrayPadding"))),e=this.handleFrame(e),void 0!==t&&(e=this.create("node","mstyle",[e],{scriptlevel:t})),(this.getProperty("open")||this.getProperty("close"))&&(e=wt.fenced(this.factory.configuration,this.getProperty("open"),e,this.getProperty("close"))),e}handleFrame(t){if(!this.frame.length)return t;const e=new Map(this.frame),r=this.frame.reduce(((t,[,e])=>e===t?e:""),this.frame[0][1]);if(r){if(4===this.frame.length)return V.setAttribute(t,"frame",r),V.removeAttribute(t,"data-frame-styles"),t;if("solid"===r)return V.setAttribute(t,"data-frame-styles",""),t=this.create("node","menclose",[t],{notation:Array.from(e.keys()).join(" "),"data-padding":0})}const s=ne.map((t=>e.get(t)||"none")).join(" ");return V.setAttribute(t,"data-frame-styles",s),t}StartEntry(){const t=this.row.length;let e=this.cstart[t],r=this.cend[t];const s=this.ralign[t],i=this.cextra;if(!(e||r||s||i[t]||i[t+1]))return;let[n,a,o,c]=this.getEntry();if(!i[t]||this.atEnd&&!i[t+1]||(e+="&"),"&"!==o&&(c=!!a.trim()||!!(t||o&&"\\end"!==o.substring(0,4)),i[t+1]&&!i[t]&&(r=(r||"")+"&",this.atEnd=!0)),!c&&!n)return;const l=this.parser;if(c&&(e&&(a=wt.addArgs(l,e,a)),r&&(a=wt.addArgs(l,a,r)),s&&(a="\\text{"+a.trim()+"}"),(e||r||s)&&++this.templateSubs>l.configuration.options.maxTemplateSubtitutions))throw new lt("MaxTemplateSubs","Maximum template substitutions exceeded; is there an invalid use of \\\\ in the template?");n&&(a=wt.addArgs(l,n,a)),l.string=wt.addArgs(l,a,l.string),l.i=0}getEntry(){const t=this.parser,e=/^([^]*?)([&{}]|\\\\|\\(?:begin|end)\s*\{array\}|\\cr|\\)/;let r,s=0,i=0,n=t.i;const a=["","","",!1];for(;null!==(r=t.string.slice(n).match(e));)switch(n+=r[0].length,r[2]){case"\\":n++;break;case"{":s++;break;case"}":if(!s)return a;s--;break;case"\\begin{array}":s||i++;break;case"\\end{array}":if(!s&&i){i--;break}default:{if(s||i)continue;n-=r[2].length;let e=t.string.slice(t.i,n).trim();const a=e.match(/^(?:\s*\\(?:h(?:dash)?line|hfil{1,3}|rowcolor\s*\{.*?\}))+/);return a&&(e=e.slice(a[0].length)),t.string=t.string.slice(n),t.i=0,[(null==a?void 0:a[0])||"",e,r[2],!0]}}return a}EndEntry(){const t=this.create("node","mtd",this.nodes);this.hfill.length&&(0===this.hfill[0]&&V.setAttribute(t,"columnalign","right"),this.hfill[this.hfill.length-1]===this.Size()&&V.setAttribute(t,"columnalign",V.getAttribute(t,"columnalign")?"center":"left"));const e=this.ralign[this.row.length];if(e){const[r,s,i]=e,n=this.create("node","mpadded",t.childNodes[0].childNodes,{width:s,"data-overflow":"auto","data-align":i,"data-vertical-align":r});n.setProperty("vbox",r),t.childNodes[0].childNodes=[],t.appendChild(n)}else this.breakAlign.cell&&V.setAttribute(t,"data-vertical-align",this.breakAlign.cell);this.breakAlign.cell="",this.row.push(t),this.Clear(),this.hfill=[]}EndRow(){let t="mtr";this.getProperty("isNumbered")&&3===this.row.length?(this.row.unshift(this.row.pop()),t="mlabeledtr"):this.getProperty("isLabeled")&&(t="mlabeledtr",this.setProperty("isLabeled",!1));const e=this.create("node",t,this.row);this.breakAlign.row&&(V.setAttribute(e,"data-break-align",this.breakAlign.row),this.breakAlign.row=""),this.addLatexItem(e),this.table.push(e),this.row=[],this.atEnd=!1}EndTable(){(this.Size()||this.row.length)&&(this.EndEntry(),this.EndRow()),this.checkLines()}checkLines(){if(this.arraydef.rowlines){const t=this.arraydef.rowlines.split(/ /);t.length===this.table.length?(this.frame.push(["bottom",t.pop()]),t.length?this.arraydef.rowlines=t.join(" "):delete this.arraydef.rowlines):t.length<this.table.length-1&&(this.arraydef.rowlines+=" none")}if(this.getProperty("rowspacing")){const t=this.arraydef.rowspacing.split(/ /);for(;t.length<this.table.length;)t.push(this.getProperty("rowspacing")+"em");this.arraydef.rowspacing=t.join(" ")}}addRowSpacing(t){if(this.arraydef.rowspacing){const e=this.arraydef.rowspacing.split(/ /);if(!this.getProperty("rowspacing")){const t=at.dimen2em(e[0]);this.setProperty("rowspacing",t)}const r=this.getProperty("rowspacing");for(;e.length<this.table.length;)e.push(at.em(r));e[this.table.length-1]=at.em(Math.max(0,r+at.dimen2em(t))),this.arraydef.rowspacing=e.join(" ")}}}class Se extends Ee{constructor(t,...e){super(t),this.maxrow=0,this.factory.configuration.tags.start(e[0],e[2],e[1])}get kind(){return"eqnarray"}EndEntry(){const t=this.arraydef.columnalign.split(/ /);"right"!==(this.row.length&&t.length?t[this.row.length%t.length]:"right")&&wt.fixInitialMO(this.factory.configuration,this.nodes),super.EndEntry()}EndRow(){this.row.length>this.maxrow&&(this.maxrow=this.row.length);const t=this.factory.configuration.tags.getTag();t&&(this.row=[t].concat(this.row),this.setProperty("isLabeled",!0)),this.factory.configuration.tags.clearTag(),super.EndRow()}EndTable(){super.EndTable(),this.factory.configuration.tags.end(),this.extendArray("columnalign",this.maxrow),this.extendArray("columnwidth",this.maxrow),this.extendArray("columnspacing",this.maxrow-1),this.extendArray("data-break-align",this.maxrow),this.addIndentshift()}extendArray(t,e){if(!this.arraydef[t])return;const r=this.arraydef[t].split(/ /),s=[...r];if(s.length>1){for(;s.length<e;)s.push(...r);this.arraydef[t]=s.slice(0,e).join(" ")}}addIndentshift(){const t=this.arraydef.columnalign.split(/ /);let e="";for(const r of t.keys()){if("left"===t[r]&&r>0){const t="center"===e?".7em":"2em";for(const e of this.table){const s=e.childNodes[e.isKind("mlabeledtr")?r+1:r];if(s){const e=this.create("node","mstyle",s.childNodes[0].childNodes,{indentshift:t});s.childNodes[0].childNodes=[],s.appendChild(e)}}}e=t[r]}}}class Ce extends ye{get kind(){return"mstyle"}constructor(t,e,r){super(t),this.attrList=e,this.setProperty("name",r)}checkItem(t){if(t.isKind("end")&&t.getName()===this.getName()){return[[this.create("node","mstyle",[this.toMml()],this.attrList)],!0]}return super.checkItem(t)}}class Ie extends ut{constructor(t,...e){super(t),this.factory.configuration.tags.start("equation",!0,e[0])}get kind(){return"equation"}get isOpen(){return!0}checkItem(t){if(t.isKind("end")){const e=this.toMml(),r=this.factory.configuration.tags.getTag();return this.factory.configuration.tags.end(),[[r?this.factory.configuration.tags.enTag(e,r):e,t],!0]}if(t.isKind("stop"))throw new lt("EnvMissingEnd","Missing \\end{%1}",this.getName());return super.checkItem(t)}}const Le=MathJax._.util.lengths,Ne=(Le.BIGDIMEN,Le.UNITS,Le.RELUNITS,Le.MATHSPACE),Fe=(Le.length2em,Le.percent,Le.em),Re=(Le.px,1.2/.85),Be={fontfamily:1,fontsize:1,fontweight:1,fontstyle:1,color:1,background:1,id:1,class:1,href:1,style:1};function De(t,e=1/0){const r=t.replace(/\s+/g,"").split("").map((t=>{const e={t:"top",b:"bottom",m:"middle",c:"center"}[t];if(!e)throw new lt("BadBreakAlign","Invalid alignment character: %1",t);return e}));if(r.length>e)throw new lt("TooManyAligns","Too many alignment characters: %1",t);return 1===e?r[0]:r.join(" ")}function Ge(t,e){const r=t.stack.env,s=r.inRoot;r.inRoot=!0;const i=new dt(e,r,t.configuration);let n=i.mml();const a=i.stack.global;if(a.leftRoot||a.upRoot){const e={};a.leftRoot&&(e.width=a.leftRoot),a.upRoot&&(e.voffset=a.upRoot,e.height=a.upRoot),n=t.create("node","mpadded",[n],e)}return r.inRoot=s,n}const Ue={Open(t,e){t.Push(t.itemFactory.create("open"))},Close(t,e){t.Push(t.itemFactory.create("close"))},Bar(t,e){t.Push(t.create("token","mo",{stretchy:!1,texClass:X.ORD},e))},Tilde(t,e){t.Push(t.create("token","mtext",{},At.nbsp))},Space(t,e){},Superscript(t,e){let r,s;t.GetNext().match(/\d/)&&(t.string=t.string.substring(0,t.i+1)+" "+t.string.substring(t.i+1));const i=t.stack.Top();i.isKind("prime")?([s,r]=i.Peek(2),t.stack.Pop()):(s=t.stack.Prev(),s||(s=t.create("token","mi",{},"")));const n=V.getProperty(s,"movesupsub");let a=V.isType(s,"msubsup")?s.sup:s.over;if(V.isType(s,"msubsup")&&!V.isType(s,"msup")&&V.getChildAt(s,s.sup)||V.isType(s,"munderover")&&!V.isType(s,"mover")&&V.getChildAt(s,s.over)&&!V.getProperty(s,"subsupOK"))throw new lt("DoubleExponent","Double exponent: use braces to clarify");V.isType(s,"msubsup")&&!V.isType(s,"msup")||(n?((!V.isType(s,"munderover")||V.isType(s,"mover")||V.getChildAt(s,s.over))&&(s=t.create("node","munderover",[s],{movesupsub:!0})),a=s.over):(s=t.create("node","msubsup",[s]),a=s.sup)),t.Push(t.itemFactory.create("subsup",s).setProperties({position:a,primes:r,movesupsub:n}))},Subscript(t,e){let r,s;t.GetNext().match(/\d/)&&(t.string=t.string.substring(0,t.i+1)+" "+t.string.substring(t.i+1));const i=t.stack.Top();i.isKind("prime")?([s,r]=i.Peek(2),t.stack.Pop()):(s=t.stack.Prev(),s||(s=t.create("token","mi",{},"")));const n=V.getProperty(s,"movesupsub");let a=V.isType(s,"msubsup")?s.sub:s.under;if(V.isType(s,"msubsup")&&!V.isType(s,"msup")&&V.getChildAt(s,s.sub)||V.isType(s,"munderover")&&!V.isType(s,"mover")&&V.getChildAt(s,s.under)&&!V.getProperty(s,"subsupOK"))throw new lt("DoubleSubscripts","Double subscripts: use braces to clarify");V.isType(s,"msubsup")&&!V.isType(s,"msup")||(n?((!V.isType(s,"munderover")||V.isType(s,"mover")||V.getChildAt(s,s.under))&&(s=t.create("node","munderover",[s],{movesupsub:!0})),a=s.under):(s=t.create("node","msubsup",[s]),a=s.sub)),t.Push(t.itemFactory.create("subsup",s).setProperties({position:a,primes:r,movesupsub:n}))},Prime(t,e){let r=t.stack.Prev();if(r||(r=t.create("token","mi")),V.isType(r,"msubsup")&&!V.isType(r,"msup")&&V.getChildAt(r,r.sup)||V.isType(r,"munderover")&&!V.isType(r,"mover")&&V.getChildAt(r,r.over)&&!V.getProperty(r,"subsupOK"))throw new lt("DoubleExponentPrime","Prime causes double exponent: use braces to clarify");let s="";t.i--;do{s+=At.prime,t.i++,e=t.GetNext()}while("'"===e||e===At.rsquo);s=["","\u2032","\u2033","\u2034","\u2057"][s.length]||s;const i=t.create("token","mo",{variantForm:!0},s);t.Push(t.itemFactory.create("prime",r,i))},Comment(t,e){for(;t.i<t.string.length&&"\n"!==t.string.charAt(t.i);)t.i++},Hash(t,e){throw new lt("CantUseHash1","You can't use 'macro parameter character #' in math mode")},MathFont(t,e,r,s=""){const i=t.GetArgument(e),n=new dt(i,Object.assign(Object.assign({multiLetterIdentifiers:t.options.identifierPattern},t.stack.env),{font:r,italicFont:s,noAutoOP:!0}),t.configuration).mml();t.Push(t.create("node","TeXAtom",[n]))},SetFont(t,e,r){t.stack.env.font=r,t.Push(t.itemFactory.create("null"))},SetStyle(t,e,r,s,i){t.stack.env.style=r,t.stack.env.level=i,t.Push(t.itemFactory.create("style").setProperty("styles",{displaystyle:s,scriptlevel:i}))},SetSize(t,e,r){t.stack.env.size=r,t.Push(t.itemFactory.create("style").setProperty("styles",{mathsize:Fe(r)}))},Spacer(t,e,r){const s=t.create("node","mspace",[],{width:Fe(r)}),i=t.create("node","mstyle",[s],{scriptlevel:0});t.Push(i)},DiscretionaryTimes(t,e){t.Push(t.create("token","mo",{linebreakmultchar:"\xd7"},"\u2062"))},AllowBreak(t,e){t.Push(t.create("token","mspace"))},Break(t,e){t.Push(t.create("token","mspace",{linebreak:W.LineBreak.NEWLINE}))},Linebreak(t,e,r){let s=!0;const i=t.stack.Prev(!0);if(i&&i.isKind("mo")){V.getMoAttribute(i,"linebreakstyle")!==W.LineBreakStyle.BEFORE&&(i.attributes.set("linebreak",r),s=!1)}t.Push(t.itemFactory.create("break",r,s))},LeftRight(t,e){const r=e.substring(1);t.Push(t.itemFactory.create(r,t.GetDelimiter(e),t.stack.env.color))},NamedFn(t,e,r){r||(r=e.substring(1));const s=t.create("token","mi",{texClass:X.OP},r);t.Push(t.itemFactory.create("fn",s))},NamedOp(t,e,r){r||(r=e.substring(1)),r=r.replace(/ /,"\u2006");const s=t.create("token","mo",{movablelimits:!0,movesupsub:!0,form:W.Form.PREFIX,texClass:X.OP},r);t.Push(s)},Limits(t,e,r){let s=t.stack.Prev(!0);if(!s||V.getTexClass(V.getCoreMO(s))!==X.OP&&null==V.getProperty(s,"movesupsub"))throw new lt("MisplacedLimits","%1 is allowed only on operators",t.currentCS);const i=t.stack.Top();let n;V.isType(s,"munderover")&&!r?(n=t.create("node","msubsup"),V.copyChildren(s,n),s=i.Last=n):V.isType(s,"msubsup")&&r&&(n=t.create("node","munderover"),V.copyChildren(s,n),s=i.Last=n),V.setProperty(s,"movesupsub",!!r),V.setProperties(V.getCoreMO(s),{movablelimits:!1}),((V.isType(s,"mo")?V.getMoAttribute(s,"movableLimits"):V.getAttribute(s,"movablelimits"))||V.getProperty(s,"movablelimits"))&&V.setProperties(s,{movablelimits:!1})},Over(t,e,r,s){const i=t.itemFactory.create("over").setProperty("name",t.currentCS);r||s?(i.setProperty("ldelim",r),i.setProperty("rdelim",s)):e.match(/withdelims$/)&&(i.setProperty("ldelim",t.GetDelimiter(e)),i.setProperty("rdelim",t.GetDelimiter(e))),e.match(/^\\above/)?i.setProperty("thickness",t.GetDimen(e)):(e.match(/^\\atop/)||r||s)&&i.setProperty("thickness",0),t.Push(i)},Frac(t,e){const r=t.ParseArg(e),s=t.ParseArg(e),i=t.create("node","mfrac",[r,s]);t.Push(i)},Sqrt(t,e){const r=t.GetBrackets(e);let s=t.GetArgument(e);"\\frac"===s&&(s+="{"+t.GetArgument(s)+"}{"+t.GetArgument(s)+"}");let i=new dt(s,t.stack.env,t.configuration).mml();i=r?t.create("node","mroot",[i,Ge(t,r)]):t.create("node","msqrt",[i]),t.Push(i)},Root(t,e){const r=t.GetUpTo(e,"\\of"),s=t.ParseArg(e),i=t.create("node","mroot",[s,Ge(t,r)]);t.Push(i)},MoveRoot(t,e,r){if(!t.stack.env.inRoot)throw new lt("MisplacedMoveRoot","%1 can appear only within a root",t.currentCS);if(t.stack.global[r])throw new lt("MultipleMoveRoot","Multiple use of %1",t.currentCS);let s=t.GetArgument(e);if(!s.match(/-?[0-9]+/))throw new lt("IntegerArg","The argument to %1 must be an integer",t.currentCS);s=parseInt(s,10)/15+"em","-"!==s.substring(0,1)&&(s="+"+s),t.stack.global[r]=s},Accent(t,e,r,s){const i=t.ParseArg(e),n=Object.assign(Object.assign({},wt.getFontDef(t)),{accent:!0,mathaccent:void 0===s||s}),a=V.createEntity(r),o=t.create("token","mo",n,a);V.setAttribute(o,"stretchy",!!s);const c=V.isEmbellished(i)?V.getCoreMO(i):i;(V.isType(c,"mo")||V.getProperty(c,"movablelimits"))&&V.setProperties(c,{movablelimits:!1});const l=t.create("node","munderover");V.setChild(l,0,i),V.setChild(l,1,null),V.setChild(l,2,o);const h=t.create("node","TeXAtom",[l]);t.Push(h)},UnderOver(t,e,r,s){const i=V.createEntity(r),n=t.create("token","mo",{stretchy:!0,accent:!0},i);i.match($.mathaccentsWithWidth)&&n.setProperty("mathaccent",!1);const a="o"===e.charAt(1)?"over":"under",o=t.ParseArg(e);t.Push(wt.underOver(t,o,n,a,s))},Overset(t,e){const r=t.ParseArg(e),s=t.ParseArg(e),i=r.coreMO(),n=i.isKind("mo")&&!0===V.getMoAttribute(i,"accent");wt.checkMovableLimits(s);const a=t.create("node","mover",[s,r],{accent:n});t.Push(a)},Underset(t,e){const r=t.ParseArg(e),s=t.ParseArg(e),i=r.coreMO(),n=i.isKind("mo")&&!0===V.getMoAttribute(i,"accent");wt.checkMovableLimits(s);const a=t.create("node","munder",[s,r],{accentunder:n});t.Push(a)},Overunderset(t,e){const r=t.ParseArg(e),s=t.ParseArg(e),i=t.ParseArg(e),n=r.coreMO(),a=s.coreMO(),o=n.isKind("mo")&&!0===V.getMoAttribute(n,"accent"),c=a.isKind("mo")&&!0===V.getMoAttribute(a,"accent");wt.checkMovableLimits(i);const l=t.create("node","munderover",[i,s,r],{accent:o,accentunder:c});t.Push(l)},TeXAtom(t,e,r){const s={texClass:r};let i,n;if(r===X.OP){s.movesupsub=s.movablelimits=!0;const r=t.GetArgument(e),a=r.match(/^\s*\\rm\s+([a-zA-Z0-9 ]+)$/);if(a)s.mathvariant=W.Variant.NORMAL,n=t.create("token","mi",s,a[1]);else{const e=new dt(r,t.stack.env,t.configuration).mml();n=t.create("node","TeXAtom",[e],s)}i=t.itemFactory.create("fn",n)}else i=t.create("node","TeXAtom",[t.ParseArg(e)],s);t.Push(i)},VBox(t,e,r){const s=new dt(t.GetArgument(e),t.stack.env,t.configuration),i={"data-vertical-align":r,texClass:X.ORD};s.stack.env.hsize&&(i.width=s.stack.env.hsize,i["data-overflow"]="linebreak");const n=t.create("node","mpadded",[s.mml()],i);n.setProperty("vbox",r),t.Push(n)},Hsize(t,e){"="===t.GetNext()&&t.i++,t.stack.env.hsize=t.GetDimen(e),t.Push(t.itemFactory.create("null"))},ParBox(t,e){const r=t.GetBrackets(e,"c"),s=t.GetDimen(e),i=wt.internalMath(t,t.GetArgument(e)),n=De(r,1),a=t.create("node","mpadded",i,{width:s,"data-overflow":"linebreak","data-vertical-align":n});a.setProperty("vbox",n),t.Push(a)},BreakAlign(t,e){const r=t.stack.Top();if(!(r instanceof Ee))throw new lt("BreakNotInArray","%1 must be used in an alignment environment",t.currentCS);switch(t.GetArgument(e).trim()){case"c":if(r.First)throw new lt("BreakFirstInEntry","%1 must be at the beginning of an alignment entry",t.currentCS+"{c}");r.breakAlign.cell=De(t.GetArgument(e),1);break;case"r":if(r.row.length||r.First)throw new lt("BreakFirstInRow","%1 must be at the beginning of an alignment row",t.currentCS+"{r}");r.breakAlign.row=De(t.GetArgument(e));break;case"t":if(r.table.length||r.row.length||r.First)throw new lt("BreakFirstInTable","%1 must be at the beginning of an alignment",t.currentCS+"{t}");r.breakAlign.table=De(t.GetArgument(e));break;default:throw new lt("BreakType","First argument to %1 must be one of c, r, or t",t.currentCS)}},MmlToken(t,e){const r=t.GetArgument(e);let s=t.GetBrackets(e,"").replace(/^\s+/,"");const i=t.GetArgument(e),n={},a=[];let o;try{o=t.create("node",r)}catch(t){o=null}if(!o||!o.isToken)throw new lt("NotMathMLToken","%1 is not a token element",r);for(;""!==s;){const e=s.match(/^([a-z]+)\s*=\s*('[^'\n]*'|"[^"\n]*"|[^ ,\n]*)[\s\n]*,?[\s\n]*/i);if(!e)throw new lt("InvalidMathMLAttr","Invalid MathML attribute: %1",s.split(/[\s\n=]/)[0]);if(!o.attributes.hasDefault(e[1])&&!Be[e[1]])throw new lt("UnknownAttrForElement","%1 is not a recognized attribute for %2",e[1],r);let i=wt.mmlFilterAttribute(t,e[1],e[2].replace(/^(['"])(.*)\1$/,"$2"));i&&("true"===i.toLowerCase()?i=!0:"false"===i.toLowerCase()&&(i=!1),n[e[1]]=i,a.push(e[1])),s=s.substring(e[0].length)}a.length&&o.setProperty("keep-attrs",a.join(" "));const c=t.create("text",U(i));o.appendChild(c),V.setProperties(o,n),t.Push(o)},Strut(t,e){const r=t.create("node","mrow"),s=t.create("node","mpadded",[r],{height:"8.6pt",depth:"3pt",width:0});t.Push(s)},Phantom(t,e,r,s){let i=t.create("node","mphantom",[t.ParseArg(e)]);(r||s)&&(i=t.create("node","mpadded",[i]),s&&(V.setAttribute(i,"height",0),V.setAttribute(i,"depth",0)),r&&V.setAttribute(i,"width",0));const n=t.create("node","TeXAtom",[i]);t.Push(n)},Smash(t,e){const r=at.trimSpaces(t.GetBrackets(e,"")),s=t.create("node","mpadded",[t.ParseArg(e)]);switch(r){case"b":V.setAttribute(s,"depth",0);break;case"t":V.setAttribute(s,"height",0);break;default:V.setAttribute(s,"height",0),V.setAttribute(s,"depth",0)}const i=t.create("node","TeXAtom",[s]);t.Push(i)},Lap(t,e){const r=t.create("node","mpadded",[t.ParseArg(e)],{width:0});"\\llap"===e&&V.setAttribute(r,"lspace","-1width");const s=t.create("node","TeXAtom",[r]);t.Push(s)},RaiseLower(t,e){let r=t.GetDimen(e);const s=t.itemFactory.create("position").setProperties({name:t.currentCS,move:"vertical"});"-"===r.charAt(0)&&(r=r.slice(1),e="raise"===e.substring(1)?"\\lower":"\\raise"),"\\lower"===e?(s.setProperty("dh","-"+r),s.setProperty("dd","+"+r)):(s.setProperty("dh","+"+r),s.setProperty("dd","-"+r)),t.Push(s)},MoveLeftRight(t,e){let r=t.GetDimen(e),s="-"===r.charAt(0)?r.slice(1):"-"+r;if("\\moveleft"===e){const t=r;r=s,s=t}t.Push(t.itemFactory.create("position").setProperties({name:t.currentCS,move:"horizontal",left:t.create("node","mspace",[],{width:r}),right:t.create("node","mspace",[],{width:s})}))},Hskip(t,e,r=!1){const s=t.create("node","mspace",[],{width:t.GetDimen(e)});r&&V.setAttribute(s,"linebreak","nobreak"),t.Push(s)},Nonscript(t,e){t.Push(t.itemFactory.create("nonscript"))},Rule(t,e,r){const s={width:t.GetDimen(e),height:t.GetDimen(e),depth:t.GetDimen(e)};"blank"!==r&&(s.mathbackground=t.stack.env.color||"black");const i=t.create("node","mspace",[],s);t.Push(i)},rule(t,e){const r=t.GetBrackets(e),s=t.GetDimen(e),i=t.GetDimen(e);let n=t.create("node","mspace",[],{width:s,height:i,mathbackground:t.stack.env.color||"black"});r&&(n=t.create("node","mpadded",[n],{voffset:r}),r.match(/^-/)?(V.setAttribute(n,"height",r),V.setAttribute(n,"depth","+"+r.substring(1))):V.setAttribute(n,"height","+"+r)),t.Push(n)},MakeBig(t,e,r,s){const i=String(s*=Re).replace(/(\.\d\d\d).+/,"$1")+"em",n=t.GetDelimiter(e,!0),a=t.create("token","mo",{minsize:i,maxsize:i,fence:!0,stretchy:!0,symmetric:!0},n),o=t.create("node","TeXAtom",[a],{texClass:r});t.Push(o)},BuildRel(t,e){const r=t.ParseUpTo(e,"\\over"),s=t.ParseArg(e),i=t.create("node","munderover");V.setChild(i,0,s),V.setChild(i,1,null),V.setChild(i,2,r);const n=t.create("node","TeXAtom",[i],{texClass:X.REL});t.Push(n)},HBox(t,e,r,s){t.PushAll(wt.internalMath(t,t.GetArgument(e),r,s))},FBox(t,e){const r=wt.internalMath(t,t.GetArgument(e)),s=t.create("node","menclose",r,{notation:"box"});t.Push(s)},FrameBox(t,e){const r=t.GetBrackets(e),s=t.GetBrackets(e)||"c";let i=wt.internalMath(t,t.GetArgument(e));r&&(i=[t.create("node","mpadded",i,{width:r,"data-align":F(s,{l:"left",r:"right"},"center")})]);const n=t.create("node","TeXAtom",[t.create("node","menclose",i,{notation:"box"})],{texClass:X.ORD});t.Push(n)},MakeBox(t,e){const r=t.GetBrackets(e),s=t.GetBrackets(e,"c"),i=t.create("node","mpadded",wt.internalMath(t,t.GetArgument(e)));r&&V.setAttribute(i,"width",r);const n=F(s.toLowerCase(),{c:"center",r:"right"},"");n&&V.setAttribute(i,"data-align",n),s.toLowerCase()!==s&&V.setAttribute(i,"data-overflow","linebreak"),t.Push(i)},Not(t,e){t.Push(t.itemFactory.create("not"))},Dots(t,e){const r=V.createEntity("2026"),s=V.createEntity("22EF"),i=t.create("token","mo",{stretchy:!1},r),n=t.create("token","mo",{stretchy:!1},s);t.Push(t.itemFactory.create("dots").setProperties({ldots:i,cdots:n}))},Matrix(t,e,r,s,i,n,a,o,c,l){const h=t.GetNext();if(""===h)throw new lt("MissingArgFor","Missing argument for %1",t.currentCS);"{"===h?t.i++:(t.string=h+"}"+t.string.slice(t.i+1),t.i=0);const u=t.itemFactory.create("array").setProperty("requireClose",!0);!r&&i||u.setProperty("arrayPadding",".2em .125em"),u.arraydef={rowspacing:a||"4pt",columnspacing:n||"1em"},c&&u.setProperty("isCases",!0),l&&(u.setProperty("isNumbered",!0),u.arraydef.side=l),(r||s)&&(u.setProperty("open",r),u.setProperty("close",s)),"D"===o&&(u.arraydef.displaystyle=!0),null!=i&&(u.arraydef.columnalign=i),t.Push(u)},Entry(t,e){t.Push(t.itemFactory.create("cell").setProperties({isEntry:!0,name:e}));const r=t.stack.Top(),s=r.getProperty("casesEnv");if(!r.getProperty("isCases")&&!s)return;const i=t.string;let n=0,a=-1,o=t.i,c=i.length;const l=s?new RegExp(`^\\\\end\\s*\\{${s.replace(/\*/,"\\*")}\\}`):null;for(;o<c;){const e=i.charAt(o);if("{"===e)n++,o++;else if("}"===e)0===n?c=0:(n--,0===n&&a<0&&(a=o-t.i),o++);else{if("&"===e&&0===n)throw new lt("ExtraAlignTab","Extra alignment tab in \\cases text");if("\\"===e){const t=i.substring(o);t.match(/^((\\cr)[^a-zA-Z]|\\\\)/)||l&&t.match(l)?c=0:o+=2}else o++}}const h=i.substring(t.i,o);if(!h.match(/^\s*\\text[^a-zA-Z]/)||a!==h.replace(/\s+$/,"").length-1){const e=wt.internalMath(t,at.trimSpaces(h),0);t.PushAll(e),t.i=o}},Cr(t,e){t.Push(t.itemFactory.create("cell").setProperties({isCR:!0,name:e}))},CrLaTeX(t,e,r=!1){let s;if(!r&&("*"===t.string.charAt(t.i)&&t.i++,"["===t.string.charAt(t.i))){const r=t.GetBrackets(e,""),[i,n]=at.matchDimen(r);if(r&&!i)throw new lt("BracketMustBeDimension","Bracket argument to %1 must be a dimension",t.currentCS);s=i+n}t.Push(t.itemFactory.create("cell").setProperties({isCR:!0,name:e,linebreak:!0}));const i=t.stack.Top();let n;i instanceof Ee?s&&i.addRowSpacing(s):(n=t.create("node","mspace",[],{linebreak:W.LineBreak.NEWLINE}),s&&V.setAttribute(n,"data-lineleading",s),t.Push(n))},HLine(t,e,r){null==r&&(r="solid");const s=t.stack.Top();if(!(s instanceof Ee)||s.Size())throw new lt("Misplaced","Misplaced %1",t.currentCS);if(s.table.length){const t=s.arraydef.rowlines?s.arraydef.rowlines.split(/ /):[];for(;t.length<s.table.length;)t.push("none");t[s.table.length-1]=r,s.arraydef.rowlines=t.join(" ")}else s.frame.push(["top",r])},HFill(t,e){const r=t.stack.Top();if(!(r instanceof Ee))throw new lt("UnsupportedHFill","Unsupported use of %1",t.currentCS);r.hfill.push(r.Size())},NewColumnType(t,e){const r=t.GetArgument(e),s=t.GetBrackets(e,"0"),i=t.GetArgument(e);if(1!==r.length)throw new lt("BadColumnName","Column specifier must be exactly one character: %1",r);if(!s.match(/^\d+$/))throw new lt("PositiveIntegerArg","Argument to %1 must be a positive integer",s);const n=t.configuration.columnParser;n.columnHandler[r]=t=>n.macroColumn(t,i,parseInt(s)),t.Push(t.itemFactory.create("null"))},BeginEnd(t,e){const r=t.GetArgument(e);if(r.match(/\\/))throw new lt("InvalidEnv","Invalid environment name '%1'",r);const s=t.configuration.handlers.get(it.ENVIRONMENT).lookup(r);if(s&&"\\end"===e){if(!s.args[0]){const e=t.itemFactory.create("end").setProperty("name",r);return void t.Push(e)}t.stack.env.closing=r}wt.checkMaxMacros(t,!1),t.parse(it.ENVIRONMENT,[t,r])},Array(t,e,r,s,i,n,a,o,c){i||(i=t.GetArgument("\\begin{"+e.getName()+"}"));const l=t.itemFactory.create("array");return"array"===e.getName()&&l.setProperty("arrayPadding",".5em .125em"),l.parser=t,l.arraydef={columnspacing:n||"1em",rowspacing:a||"4pt"},t.configuration.columnParser.process(t,i,l),r&&l.setProperty("open",t.convertDelimiter(r)),s&&l.setProperty("close",t.convertDelimiter(s)),"'"===(o||"").charAt(1)&&(l.arraydef["data-cramped"]=!0,o=o.charAt(0)),"D"===o?l.arraydef.displaystyle=!0:o&&(l.arraydef.displaystyle=!1),l.arraydef.scriptlevel="S"===o?1:0,c&&(l.arraydef.useHeight=!1),t.Push(e),l.StartEntry(),l},AlignedArray(t,e,r=""){const s=t.GetBrackets("\\begin{"+e.getName()+"}"),i=Ue.Array(t,e,null,null,null,null,null,r);return wt.setArrayAlign(i,s)},IndentAlign(t,e){const r=`\\begin{${e.getName()}}`,s=t.GetBrackets(r,""),i=t.GetBrackets(r,""),n=t.GetBrackets(r,"");if(s&&!at.matchDimen(s)[0]||i&&!at.matchDimen(i)[0]||n&&!at.matchDimen(n)[0])throw new lt("BracketMustBeDimension","Bracket argument to %1 must be a dimension",r);const a=t.GetArgument(r);if(a&&!a.match(/^([lcr]{1,3})?$/))throw new lt("BadAlignment","Alignment must be one to three copies of l, c, or r");const o=[...a].map((t=>({l:"left",c:"center",r:"right"}[t])));1===o.length&&o.push(o[0]);const c={};for(const[t,e]of[["indentshiftfirst",s],["indentshift",i||s],["indentshiftlast",n],["indentalignfirst",o[0]],["indentalign",o[1]],["indentalignlast",o[2]]])e&&(c[t]=e);t.Push(t.itemFactory.create("mstyle",c,e.getName()))},Equation:(t,e,r,s=!0)=>(t.configuration.mathItem.display=s,t.stack.env.display=s,wt.checkEqnEnv(t),t.Push(e),t.itemFactory.create("equation",r).setProperty("name",e.getName())),EqnArray(t,e,r,s,i,n,a){const o=e.getName(),c="gather"===o||"gather*"===o;s&&wt.checkEqnEnv(t,!c),t.Push(e),i=(i=i.replace(/[^clr]/g,"").split("").join(" ")).replace(/l/g,"left").replace(/r/g,"right").replace(/c/g,"center"),n=De(n);const l=t.itemFactory.create("eqnarray",o,r,s,t.stack.global);return l.arraydef={displaystyle:!0,columnalign:i,columnspacing:a||"1em",rowspacing:"3pt","data-break-align":n,side:t.options.tagSide,minlabelspacing:t.options.tagIndent},c&&l.setProperty("nestable",!0),l},HandleNoTag(t,e){t.tags.notag()},HandleLabel(t,e){const r=t.GetArgument(e);if(""!==r&&!t.tags.refUpdate){if(t.tags.label)throw new lt("MultipleCommand","Multiple %1",t.currentCS);if(t.tags.label=r,(t.tags.allLabels[r]||t.tags.labels[r])&&!t.options.ignoreDuplicateLabels)throw new lt("MultipleLabel","Label '%1' multiply defined",r);t.tags.labels[r]=new St}},HandleRef(t,e,r){const s=t.GetArgument(e);let i=t.tags.allLabels[s]||t.tags.labels[s];i||(t.tags.refUpdate||(t.tags.redo=!0),i=new St);let n=i.tag;r&&(n=t.tags.formatRef(n));const a=t.create("node","mrow",wt.internalMath(t,Array.isArray(n)?n.join(""):n),{href:t.tags.formatUrl(i.id,t.options.baseURL),class:"MathJax_ref"});t.Push(a)},Macro(t,e,r,s,i){if(s){const n=[];if(null!=i){const r=t.GetBrackets(e);n.push(null==r?i:r)}for(let r=n.length;r<s;r++)n.push(t.GetArgument(e));r=wt.substituteArgs(t,n,r)}t.string=wt.addArgs(t,r,t.string.slice(t.i)),t.i=0,wt.checkMaxMacros(t)},MathChoice(t,e){const r=t.ParseArg(e),s=t.ParseArg(e),i=t.ParseArg(e),n=t.ParseArg(e);t.Push(t.create("node","MathChoice",[r,s,i,n]))}},_e=Ue,je=W.Variant,Ke={variable(t,e){var r;const s=wt.getFontDef(t),i=t.stack.env;if(i.multiLetterIdentifiers&&""!==i.font&&(e=(null===(r=t.string.substring(t.i-1).match(i.multiLetterIdentifiers))||void 0===r?void 0:r[0])||e,t.i+=e.length-1,s.mathvariant===je.NORMAL&&i.noAutoOP&&e.length>1&&(s.autoOP=!1)),!s.mathvariant&&wt.isLatinOrGreekChar(e)){const r=t.configuration.mathStyle(e);r&&(s.mathvariant=r)}const n=t.create("token","mi",s,e);t.Push(n)},digit(t,e){const r=t.configuration.options.numberPattern,s=t.string.slice(t.i-1).match(r);if(!s)return!1;const i=wt.getFontDef(t),n=t.create("token","mn",i,s[0].replace(/[{}]/g,""));return t.i+=s[0].length-1,t.Push(n),!0},controlSequence(t,e){const r=t.GetCS();t.parse(it.MACRO,[t,r])},lcGreek(t,e){const r={mathvariant:t.configuration.mathStyle(e.char)||je.ITALIC},s=t.create("token","mi",r,e.char);t.Push(s)},ucGreek(t,e){const r={mathvariant:t.stack.env.font||t.configuration.mathStyle(e.char,!0)||je.NORMAL},s=t.create("token","mi",r,e.char);t.Push(s)},mathchar0mi(t,e){const r=e.attributes||{mathvariant:je.ITALIC},s=t.create("token","mi",r,e.char);t.Push(s)},mathchar0mo(t,e){const r=e.attributes||{};r.stretchy=!1;const s=t.create("token","mo",r,e.char);V.setProperty(s,"fixStretchy",!0),t.configuration.addNode("fixStretchy",s),t.Push(s)},mathchar7(t,e){const r=e.attributes||{mathvariant:je.NORMAL};t.stack.env.font&&(r.mathvariant=t.stack.env.font);const s=t.create("token","mi",r,e.char);t.Push(s)},delimiter(t,e){let r=e.attributes||{};r=Object.assign({fence:!1,stretchy:!1},r);const s=t.create("token","mo",r,e.char);t.Push(s)},environment(t,e,r,s){const i=t.itemFactory.create("begin").setProperty("name",e);t.Push(r(t,i,...s.slice(1)))}},He=Ke,Xe=Fe(Ne.thickmathspace),ze=W.Variant;new jt("letter",He.variable,/[a-z]/i),new jt("digit",He.digit,/[0-9.,]/),new jt("command",He.controlSequence,/^\\/),new zt("special",{"{":_e.Open,"}":_e.Close,"~":_e.Tilde,"^":_e.Superscript,_:_e.Subscript,"|":_e.Bar," ":_e.Space,"\t":_e.Space,"\r":_e.Space,"\n":_e.Space,"'":_e.Prime,"%":_e.Comment,"&":_e.Entry,"#":_e.Hash,"\xa0":_e.Space,"\u2019":_e.Prime}),new Ht("lcGreek",He.lcGreek,{alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03f5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03d5",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",varepsilon:"\u03b5",vartheta:"\u03d1",varpi:"\u03d6",varrho:"\u03f1",varsigma:"\u03c2",varphi:"\u03c6"}),new Ht("ucGreek",He.ucGreek,{Gamma:"\u0393",Delta:"\u0394",Theta:"\u0398",Lambda:"\u039b",Xi:"\u039e",Pi:"\u03a0",Sigma:"\u03a3",Upsilon:"\u03a5",Phi:"\u03a6",Psi:"\u03a8",Omega:"\u03a9"}),new Ht("mathchar0mi",He.mathchar0mi,{AA:"\u212b",S:["\xa7",{mathvariant:ze.NORMAL}],aleph:["\u2135",{mathvariant:ze.NORMAL}],hbar:["\u210f",{variantForm:!0}],imath:"\u0131",jmath:"\u0237",ell:"\u2113",wp:["\u2118",{mathvariant:ze.NORMAL}],Re:["\u211c",{mathvariant:ze.NORMAL}],Im:["\u2111",{mathvariant:ze.NORMAL}],partial:["\u2202",{mathvariant:ze.ITALIC}],infty:["\u221e",{mathvariant:ze.NORMAL}],prime:["\u2032",{variantForm:!0}],emptyset:["\u2205",{mathvariant:ze.NORMAL}],nabla:["\u2207",{mathvariant:ze.NORMAL}],top:["\u22a4",{mathvariant:ze.NORMAL}],bot:["\u22a5",{mathvariant:ze.NORMAL}],angle:["\u2220",{mathvariant:ze.NORMAL}],triangle:["\u25b3",{mathvariant:ze.NORMAL}],backslash:["\\",{mathvariant:ze.NORMAL}],forall:["\u2200",{mathvariant:ze.NORMAL}],exists:["\u2203",{mathvariant:ze.NORMAL}],neg:["\xac",{mathvariant:ze.NORMAL}],lnot:["\xac",{mathvariant:ze.NORMAL}],flat:["\u266d",{mathvariant:ze.NORMAL}],natural:["\u266e",{mathvariant:ze.NORMAL}],sharp:["\u266f",{mathvariant:ze.NORMAL}],clubsuit:["\u2663",{mathvariant:ze.NORMAL}],diamondsuit:["\u2662",{mathvariant:ze.NORMAL}],heartsuit:["\u2661",{mathvariant:ze.NORMAL}],spadesuit:["\u2660",{mathvariant:ze.NORMAL}]}),new Ht("mathchar0mo",He.mathchar0mo,{surd:"\u221a",coprod:["\u2210",{movesupsub:!0}],bigvee:["\u22c1",{movesupsub:!0}],bigwedge:["\u22c0",{movesupsub:!0}],biguplus:["\u2a04",{movesupsub:!0}],bigcap:["\u22c2",{movesupsub:!0}],bigcup:["\u22c3",{movesupsub:!0}],int:"\u222b",intop:["\u222b",{movesupsub:!0,movablelimits:!0}],iint:"\u222c",iiint:"\u222d",prod:["\u220f",{movesupsub:!0}],sum:["\u2211",{movesupsub:!0}],bigotimes:["\u2a02",{movesupsub:!0}],bigoplus:["\u2a01",{movesupsub:!0}],bigodot:["\u2a00",{movesupsub:!0}],oint:"\u222e",ointop:["\u222e",{movesupsub:!0,movablelimits:!0}],oiint:"\u222f",oiiint:"\u2230",bigsqcup:["\u2a06",{movesupsub:!0}],smallint:["\u222b",{largeop:!1}],triangleleft:"\u25c3",triangleright:"\u25b9",bigtriangleup:"\u25b3",bigtriangledown:"\u25bd",wedge:"\u2227",land:"\u2227",vee:"\u2228",lor:"\u2228",cap:"\u2229",cup:"\u222a",ddagger:"\u2021",dagger:"\u2020",sqcap:"\u2293",sqcup:"\u2294",uplus:"\u228e",amalg:"\u2a3f",diamond:"\u22c4",bullet:"\u2219",wr:"\u2240",div:"\xf7",odot:["\u2299",{largeop:!1}],oslash:["\u2298",{largeop:!1}],otimes:["\u2297",{largeop:!1}],ominus:["\u2296",{largeop:!1}],oplus:["\u2295",{largeop:!1}],mp:"\u2213",pm:"\xb1",circ:"\u2218",bigcirc:"\u25ef",setminus:"\u2216",cdot:"\u22c5",ast:"\u2217",times:"\xd7",star:"\u22c6",propto:"\u221d",sqsubseteq:"\u2291",sqsupseteq:"\u2292",parallel:"\u2225",mid:"\u2223",dashv:"\u22a3",vdash:"\u22a2",leq:"\u2264",le:"\u2264",geq:"\u2265",ge:"\u2265",lt:"<",gt:">",succ:"\u227b",prec:"\u227a",approx:"\u2248",succeq:"\u2ab0",preceq:"\u2aaf",supset:"\u2283",subset:"\u2282",supseteq:"\u2287",subseteq:"\u2286",in:"\u2208",ni:"\u220b",notin:"\u2209",owns:"\u220b",gg:"\u226b",ll:"\u226a",sim:"\u223c",simeq:"\u2243",perp:"\u27c2",equiv:"\u2261",asymp:"\u224d",smile:"\u2323",frown:"\u2322",ne:"\u2260",neq:"\u2260",cong:"\u2245",doteq:"\u2250",bowtie:"\u22c8",models:"\u22a7",notChar:"\u29f8",Leftrightarrow:"\u21d4",Leftarrow:"\u21d0",Rightarrow:"\u21d2",leftrightarrow:"\u2194",leftarrow:"\u2190",gets:"\u2190",rightarrow:"\u2192",to:["\u2192",{accent:!1}],mapsto:"\u21a6",leftharpoonup:"\u21bc",leftharpoondown:"\u21bd",rightharpoonup:"\u21c0",rightharpoondown:"\u21c1",nearrow:"\u2197",searrow:"\u2198",nwarrow:"\u2196",swarrow:"\u2199",rightleftharpoons:"\u21cc",hookrightarrow:"\u21aa",hookleftarrow:"\u21a9",longleftarrow:"\u27f5",Longleftarrow:"\u27f8",longrightarrow:"\u27f6",Longrightarrow:"\u27f9",Longleftrightarrow:"\u27fa",longleftrightarrow:"\u27f7",longmapsto:"\u27fc",ldots:"\u2026",cdots:"\u22ef",vdots:"\u22ee",ddots:"\u22f1",iddots:"\u22f0",dotsc:"\u2026",dotsb:"\u22ef",dotsm:"\u22ef",dotsi:"\u22ef",dotso:"\u2026",ldotp:[".",{texClass:X.PUNCT}],cdotp:["\u22c5",{texClass:X.PUNCT}],colon:[":",{texClass:X.PUNCT}]}),new Ht("mathchar7",He.mathchar7,{_:"_","#":"#",$:"$","%":"%","&":"&",And:"&"}),new Xt("delimiter",He.delimiter,{"(":"(",")":")","[":"[","]":"]","<":"\u27e8",">":"\u27e9","\\lt":"\u27e8","\\gt":"\u27e9","/":"/","|":["|",{texClass:X.ORD}],".":"","\\lmoustache":"\u23b0","\\rmoustache":"\u23b1","\\lgroup":"\u27ee","\\rgroup":"\u27ef","\\arrowvert":"\u23d0","\\Arrowvert":"\u2016","\\bracevert":"\u23aa","\\Vert":["\u2016",{texClass:X.ORD}],"\\|":["\u2016",{texClass:X.ORD}],"\\vert":["|",{texClass:X.ORD}],"\\uparrow":"\u2191","\\downarrow":"\u2193","\\updownarrow":"\u2195","\\Uparrow":"\u21d1","\\Downarrow":"\u21d3","\\Updownarrow":"\u21d5","\\backslash":"\\","\\rangle":"\u27e9","\\langle":"\u27e8","\\rbrace":"}","\\lbrace":"{","\\}":"}","\\{":"{","\\rceil":"\u2309","\\lceil":"\u2308","\\rfloor":"\u230b","\\lfloor":"\u230a","\\lbrack":"[","\\rbrack":"]"}),new qt("macros",{displaystyle:[_e.SetStyle,"D",!0,0],textstyle:[_e.SetStyle,"T",!1,0],scriptstyle:[_e.SetStyle,"S",!1,1],scriptscriptstyle:[_e.SetStyle,"SS",!1,2],rm:[_e.SetFont,ze.NORMAL],mit:[_e.SetFont,ze.ITALIC],oldstyle:[_e.SetFont,ze.OLDSTYLE],cal:[_e.SetFont,ze.CALLIGRAPHIC],it:[_e.SetFont,ze.MATHITALIC],bf:[_e.SetFont,ze.BOLD],sf:[_e.SetFont,ze.SANSSERIF],tt:[_e.SetFont,ze.MONOSPACE],frak:[_e.MathFont,ze.FRAKTUR],Bbb:[_e.MathFont,ze.DOUBLESTRUCK],mathrm:[_e.MathFont,ze.NORMAL],mathup:[_e.MathFont,ze.NORMAL],mathnormal:[_e.MathFont,""],mathbf:[_e.MathFont,ze.BOLD],mathbfup:[_e.MathFont,ze.BOLD],mathit:[_e.MathFont,ze.MATHITALIC],mathbfit:[_e.MathFont,ze.BOLDITALIC],mathbb:[_e.MathFont,ze.DOUBLESTRUCK],mathfrak:[_e.MathFont,ze.FRAKTUR],mathbffrak:[_e.MathFont,ze.BOLDFRAKTUR],mathscr:[_e.MathFont,ze.SCRIPT],mathbfscr:[_e.MathFont,ze.BOLDSCRIPT],mathsf:[_e.MathFont,ze.SANSSERIF],mathsfup:[_e.MathFont,ze.SANSSERIF],mathbfsf:[_e.MathFont,ze.BOLDSANSSERIF],mathbfsfup:[_e.MathFont,ze.BOLDSANSSERIF],mathsfit:[_e.MathFont,ze.SANSSERIFITALIC],mathbfsfit:[_e.MathFont,ze.SANSSERIFBOLDITALIC],mathtt:[_e.MathFont,ze.MONOSPACE],mathcal:[_e.MathFont,ze.CALLIGRAPHIC],mathbfcal:[_e.MathFont,ze.BOLDCALLIGRAPHIC],symrm:[_e.MathFont,ze.NORMAL],symup:[_e.MathFont,ze.NORMAL],symnormal:[_e.MathFont,""],symbf:[_e.MathFont,ze.BOLD,ze.BOLDITALIC],symbfup:[_e.MathFont,ze.BOLD],symit:[_e.MathFont,ze.ITALIC],symbfit:[_e.MathFont,ze.BOLDITALIC],symbb:[_e.MathFont,ze.DOUBLESTRUCK],symfrak:[_e.MathFont,ze.FRAKTUR],symbffrak:[_e.MathFont,ze.BOLDFRAKTUR],symscr:[_e.MathFont,ze.SCRIPT],symbfscr:[_e.MathFont,ze.BOLDSCRIPT],symsf:[_e.MathFont,ze.SANSSERIF,ze.SANSSERIFITALIC],symsfup:[_e.MathFont,ze.SANSSERIF],symbfsf:[_e.MathFont,ze.BOLDSANSSERIF],symbfsfup:[_e.MathFont,ze.BOLDSANSSERIF],symsfit:[_e.MathFont,ze.SANSSERIFITALIC],symbfsfit:[_e.MathFont,ze.SANSSERIFBOLDITALIC],symtt:[_e.MathFont,ze.MONOSPACE],symcal:[_e.MathFont,ze.CALLIGRAPHIC],symbfcal:[_e.MathFont,ze.BOLDCALLIGRAPHIC],textrm:[_e.HBox,null,ze.NORMAL],textup:[_e.HBox,null,ze.NORMAL],textnormal:[_e.HBox],textit:[_e.HBox,null,ze.ITALIC],textbf:[_e.HBox,null,ze.BOLD],textsf:[_e.HBox,null,ze.SANSSERIF],texttt:[_e.HBox,null,ze.MONOSPACE],tiny:[_e.SetSize,.5],Tiny:[_e.SetSize,.6],scriptsize:[_e.SetSize,.7],small:[_e.SetSize,.85],normalsize:[_e.SetSize,1],large:[_e.SetSize,1.2],Large:[_e.SetSize,1.44],LARGE:[_e.SetSize,1.73],huge:[_e.SetSize,2.07],Huge:[_e.SetSize,2.49],arcsin:_e.NamedFn,arccos:_e.NamedFn,arctan:_e.NamedFn,arg:_e.NamedFn,cos:_e.NamedFn,cosh:_e.NamedFn,cot:_e.NamedFn,coth:_e.NamedFn,csc:_e.NamedFn,deg:_e.NamedFn,det:_e.NamedOp,dim:_e.NamedFn,exp:_e.NamedFn,gcd:_e.NamedOp,hom:_e.NamedFn,inf:_e.NamedOp,ker:_e.NamedFn,lg:_e.NamedFn,lim:_e.NamedOp,liminf:[_e.NamedOp,"lim inf"],limsup:[_e.NamedOp,"lim sup"],ln:_e.NamedFn,log:_e.NamedFn,max:_e.NamedOp,min:_e.NamedOp,Pr:_e.NamedOp,sec:_e.NamedFn,sin:_e.NamedFn,sinh:_e.NamedFn,sup:_e.NamedOp,tan:_e.NamedFn,tanh:_e.NamedFn,limits:[_e.Limits,!0],nolimits:[_e.Limits,!1],overline:[_e.UnderOver,"2015"],underline:[_e.UnderOver,"2015"],overbrace:[_e.UnderOver,"23DE",!0],underbrace:[_e.UnderOver,"23DF",!0],overparen:[_e.UnderOver,"23DC"],underparen:[_e.UnderOver,"23DD"],overrightarrow:[_e.UnderOver,"2192"],underrightarrow:[_e.UnderOver,"2192"],overleftarrow:[_e.UnderOver,"2190"],underleftarrow:[_e.UnderOver,"2190"],overleftrightarrow:[_e.UnderOver,"2194"],underleftrightarrow:[_e.UnderOver,"2194"],overset:_e.Overset,underset:_e.Underset,overunderset:_e.Overunderset,stackrel:[_e.Macro,"\\mathrel{\\mathop{#2}\\limits^{#1}}",2],stackbin:[_e.Macro,"\\mathbin{\\mathop{#2}\\limits^{#1}}",2],over:_e.Over,overwithdelims:_e.Over,atop:_e.Over,atopwithdelims:_e.Over,above:_e.Over,abovewithdelims:_e.Over,brace:[_e.Over,"{","}"],brack:[_e.Over,"[","]"],choose:[_e.Over,"(",")"],frac:_e.Frac,sqrt:_e.Sqrt,root:_e.Root,uproot:[_e.MoveRoot,"upRoot"],leftroot:[_e.MoveRoot,"leftRoot"],left:_e.LeftRight,right:_e.LeftRight,middle:_e.LeftRight,llap:_e.Lap,rlap:_e.Lap,raise:_e.RaiseLower,lower:_e.RaiseLower,moveleft:_e.MoveLeftRight,moveright:_e.MoveLeftRight,",":[_e.Spacer,Ne.thinmathspace],":":[_e.Spacer,Ne.mediummathspace],">":[_e.Spacer,Ne.mediummathspace],";":[_e.Spacer,Ne.thickmathspace],"!":[_e.Spacer,Ne.negativethinmathspace],enspace:[_e.Spacer,.5],quad:[_e.Spacer,1],qquad:[_e.Spacer,2],thinspace:[_e.Spacer,Ne.thinmathspace],negthinspace:[_e.Spacer,Ne.negativethinmathspace],"*":_e.DiscretionaryTimes,allowbreak:_e.AllowBreak,goodbreak:[_e.Linebreak,W.LineBreak.GOODBREAK],badbreak:[_e.Linebreak,W.LineBreak.BADBREAK],nobreak:[_e.Linebreak,W.LineBreak.NOBREAK],break:_e.Break,hskip:_e.Hskip,hspace:_e.Hskip,kern:[_e.Hskip,!0],mskip:_e.Hskip,mspace:_e.Hskip,mkern:[_e.Hskip,!0],rule:_e.rule,Rule:[_e.Rule],Space:[_e.Rule,"blank"],nonscript:_e.Nonscript,big:[_e.MakeBig,X.ORD,.85],Big:[_e.MakeBig,X.ORD,1.15],bigg:[_e.MakeBig,X.ORD,1.45],Bigg:[_e.MakeBig,X.ORD,1.75],bigl:[_e.MakeBig,X.OPEN,.85],Bigl:[_e.MakeBig,X.OPEN,1.15],biggl:[_e.MakeBig,X.OPEN,1.45],Biggl:[_e.MakeBig,X.OPEN,1.75],bigr:[_e.MakeBig,X.CLOSE,.85],Bigr:[_e.MakeBig,X.CLOSE,1.15],biggr:[_e.MakeBig,X.CLOSE,1.45],Biggr:[_e.MakeBig,X.CLOSE,1.75],bigm:[_e.MakeBig,X.REL,.85],Bigm:[_e.MakeBig,X.REL,1.15],biggm:[_e.MakeBig,X.REL,1.45],Biggm:[_e.MakeBig,X.REL,1.75],mathord:[_e.TeXAtom,X.ORD],mathop:[_e.TeXAtom,X.OP],mathopen:[_e.TeXAtom,X.OPEN],mathclose:[_e.TeXAtom,X.CLOSE],mathbin:[_e.TeXAtom,X.BIN],mathrel:[_e.TeXAtom,X.REL],mathpunct:[_e.TeXAtom,X.PUNCT],mathinner:[_e.TeXAtom,X.INNER],vtop:[_e.VBox,"top"],vcenter:[_e.VBox,"center"],vbox:[_e.VBox,"bottom"],hsize:_e.Hsize,parbox:_e.ParBox,breakAlign:_e.BreakAlign,buildrel:_e.BuildRel,hbox:[_e.HBox,0],text:_e.HBox,mbox:[_e.HBox,0],fbox:_e.FBox,boxed:[_e.Macro,"\\fbox{$\\displaystyle{#1}$}",1],framebox:_e.FrameBox,makebox:_e.MakeBox,strut:_e.Strut,mathstrut:[_e.Macro,"\\vphantom{(}"],phantom:_e.Phantom,vphantom:[_e.Phantom,1,0],hphantom:[_e.Phantom,0,1],smash:_e.Smash,acute:[_e.Accent,"00B4"],grave:[_e.Accent,"0060"],ddot:[_e.Accent,"00A8"],dddot:[_e.Accent,"20DB"],ddddot:[_e.Accent,"20DC"],tilde:[_e.Accent,"007E"],bar:[_e.Accent,"00AF"],breve:[_e.Accent,"02D8"],check:[_e.Accent,"02C7"],hat:[_e.Accent,"005E"],vec:[_e.Accent,"2192",!1],dot:[_e.Accent,"02D9"],widetilde:[_e.Accent,"007E",!0],widehat:[_e.Accent,"005E",!0],matrix:_e.Matrix,array:_e.Matrix,pmatrix:[_e.Matrix,"(",")"],cases:[_e.Matrix,"{","","left left",null,".2em",null,!0],eqalign:[_e.Matrix,null,null,"right left",Xe,".5em","D"],displaylines:[_e.Matrix,null,null,"center",null,".5em","D"],cr:_e.Cr,"\\":_e.CrLaTeX,newline:[_e.CrLaTeX,!0],hline:_e.HLine,hdashline:[_e.HLine,"dashed"],eqalignno:[_e.Matrix,null,null,"right left",Xe,".5em","D",null,"right"],leqalignno:[_e.Matrix,null,null,"right left",Xe,".5em","D",null,"left"],hfill:_e.HFill,hfil:_e.HFill,hfilll:_e.HFill,bmod:[_e.Macro,`\\mmlToken{mo}[lspace="${Xe}" rspace="${Xe}"]{mod}`],pmod:[_e.Macro,"\\pod{\\mmlToken{mi}{mod}\\kern 6mu #1}",1],mod:[_e.Macro,"\\mathchoice{\\kern18mu}{\\kern12mu}{\\kern12mu}{\\kern12mu}\\mmlToken{mi}{mod}\\,\\,#1",1],pod:[_e.Macro,"\\mathchoice{\\kern18mu}{\\kern8mu}{\\kern8mu}{\\kern8mu}(#1)",1],iff:[_e.Macro,"\\;\\Longleftrightarrow\\;"],skew:[_e.Macro,"{{#2{#3\\mkern#1mu}\\mkern-#1mu}{}}",3],pmb:[_e.Macro,"\\rlap{#1}\\kern1px{#1}",1],TeX:[_e.Macro,"T\\kern-.14em\\lower.5ex{E}\\kern-.115em X"],LaTeX:[_e.Macro,"L\\kern-.325em\\raise.21em{\\scriptstyle{A}}\\kern-.17em\\TeX"],not:_e.Not,dots:_e.Dots,space:_e.Tilde,"\xa0":_e.Tilde," ":_e.Tilde,begin:_e.BeginEnd,end:_e.BeginEnd,label:_e.HandleLabel,ref:_e.HandleRef,nonumber:_e.HandleNoTag,newcolumntype:_e.NewColumnType,mathchoice:_e.MathChoice,mmlToken:_e.MmlToken}),new $t("environment",He.environment,{displaymath:[_e.Equation,null,!1],math:[_e.Equation,null,!1,!1],array:[_e.AlignedArray],darray:[_e.AlignedArray,null,"D"],equation:[_e.Equation,null,!0],eqnarray:[_e.EqnArray,null,!0,!0,"rcl","bmt",wt.cols(0,Ne.thickmathspace),".5em"],indentalign:[_e.IndentAlign]}),new Ht("not_remap",null,{"\u2190":"\u219a","\u2192":"\u219b","\u2194":"\u21ae","\u21d0":"\u21cd","\u21d2":"\u21cf","\u21d4":"\u21ce","\u2208":"\u2209","\u220b":"\u220c","\u2223":"\u2224","\u2225":"\u2226","\u223c":"\u2241","~":"\u2241","\u2243":"\u2244","\u2245":"\u2247","\u2248":"\u2249","\u224d":"\u226d","=":"\u2260","\u2261":"\u2262","<":"\u226e",">":"\u226f","\u2264":"\u2270","\u2265":"\u2271","\u2272":"\u2274","\u2273":"\u2275","\u2276":"\u2278","\u2277":"\u2279","\u227a":"\u2280","\u227b":"\u2281","\u2282":"\u2284","\u2283":"\u2285","\u2286":"\u2288","\u2287":"\u2289","\u22a2":"\u22ac","\u22a8":"\u22ad","\u22a9":"\u22ae","\u22ab":"\u22af","\u227c":"\u22e0","\u227d":"\u22e1","\u2291":"\u22e2","\u2292":"\u22e3","\u22b2":"\u22ea","\u22b3":"\u22eb","\u22b4":"\u22ec","\u22b5":"\u22ed","\u2203":"\u2204"});const qe=MathJax._.core.MmlTree.OperatorDictionary,$e=(qe.OPDEF,qe.MO,qe.RANGES,qe.getRange),Je=(qe.MMLSPACING,qe.OPTABLE,MathJax._.util.context),Ve=(Je.hasWindow,Je.context),We=W.Variant;function Ze(t,e){const r=t.stack.env.font,s=t.stack.env.italicFont,i=r?{mathvariant:r}:{},n=Zt.getMap("remap").lookup(e),a=$e(e),o=a[3],c=t.create("token",o,i,n?n.char:e),l=wt.isLatinOrGreekChar(e)?t.configuration.mathStyle(e,!0)||s:"",h=a[4]||(r&&l===We.NORMAL?"":l);h&&c.attributes.set("mathvariant",h),"mo"===o&&(V.setProperty(c,"fixStretchy",!0),t.configuration.addNode("fixStretchy",c)),t.Push(c)}new Ht("remap",null,{"-":"\u2212","*":"\u2217","`":"\u2018"});class Ye extends It{}const Qe=te.create("base",{[st.CONFIG]:function(t,e){const r=e.parseOptions.options;r.digits&&(r.numberPattern=r.digits),new jt("digit",He.digit,r.initialDigit),new jt("letter",He.variable,r.initialLetter);t.handlers.get(it.CHARACTER).add(["letter","digit"],null,4)},[st.HANDLER]:{[it.CHARACTER]:["command","special"],[it.DELIMITER]:["delimiter"],[it.MACRO]:["delimiter","macros","lcGreek","ucGreek","mathchar0mi","mathchar0mo","mathchar7"],[it.ENVIRONMENT]:["environment"]},[st.FALLBACK]:{[it.CHARACTER]:Ze,[it.MACRO]:function(t,e){throw new lt("UndefinedControlSequence","Undefined control sequence %1","\\"+e)},[it.ENVIRONMENT]:function(t,e){throw new lt("UnknownEnv","Unknown environment '%1'",e)}},[st.ITEMS]:{[ae.prototype.kind]:ae,[oe.prototype.kind]:oe,[ce.prototype.kind]:ce,[le.prototype.kind]:le,[he.prototype.kind]:he,[ue.prototype.kind]:ue,[de.prototype.kind]:de,[me.prototype.kind]:me,[pe.prototype.kind]:pe,[ge.prototype.kind]:ge,[fe.prototype.kind]:fe,[be.prototype.kind]:be,[ye.prototype.kind]:ye,[Ae.prototype.kind]:Ae,[ke.prototype.kind]:ke,[ve.prototype.kind]:ve,[Pe.prototype.kind]:Pe,[Te.prototype.kind]:Te,[we.prototype.kind]:we,[Me.prototype.kind]:Me,[xe.prototype.kind]:xe,[Oe.prototype.kind]:Oe,[Ee.prototype.kind]:Ee,[Se.prototype.kind]:Se,[Ie.prototype.kind]:Ie,[Ce.prototype.kind]:Ce},[st.OPTIONS]:{maxMacros:1e3,digits:"",numberPattern:/^(?:[0-9]+(?:\{,\}[0-9]{3})*(?:\.[0-9]*)?|\.[0-9]+)/,initialDigit:/[0-9.,]/,identifierPattern:/^[a-zA-Z]+/,initialLetter:/[a-zA-Z]/,baseURL:Ve.document&&0!==Ve.document.getElementsByTagName("base").length?String(Ve.document.location).replace(/#.*$/,""):""},[st.TAGS]:{base:Ye},[st.POSTPROCESSORS]:[[function({data:t}){for(const e of t.getList("nonscript"))if(e.attributes.get("scriptlevel")>0){const r=e.parent;if(r.childNodes.splice(r.childIndex(e),1),t.removeFromList(e.kind,[e]),e.isKind("mrow")){const r=e.childNodes[0];t.removeFromList("mstyle",[r]),t.removeFromList("mspace",r.childNodes[0].childNodes)}}else e.isKind("mrow")&&(e.parent.replaceChild(e.childNodes[0],e),t.removeFromList("mrow",[e]))},-4]]});class tr extends E{static configure(t){const e=new se(t,["tex"]);return e.init(),e}static tags(t,e){Bt.addTags(e.tags),Bt.setDefault(t.options.tags),t.tags=Bt.getDefault(),t.tags.configuration=t}constructor(t={}){const[e,r,s]=N(t,tr.OPTIONS,K.OPTIONS);super(r),this.findTeX=this.options.FindTeX||new K(s);const i=this.options.packages,n=this.configuration=tr.configure(i),a=this._parseOptions=new Et(n,[this.options,Bt.OPTIONS]);L(a.options,e),n.config(this),tr.tags(a,n),this.postFilters.addList([[rt.cleanSubSup,-7],[rt.setInherited,-6],[rt.checkScriptlevel,-5],[rt.moveLimits,-4],[rt.cleanStretchy,-3],[rt.cleanAttributes,-2],[rt.combineRelations,-1]])}setMmlFactory(t){super.setMmlFactory(t),this._parseOptions.nodeFactory.setMmlFactory(t)}get parseOptions(){return this._parseOptions}reset(t=0){this.parseOptions.tags.reset(t)}compile(t,e){let r,s;this.parseOptions.clear(),this.parseOptions.mathItem=t,this.executeFilters(this.preFilters,t,e,this.parseOptions),this.latex=t.math,this.parseOptions.tags.startEquation(t);try{s=new dt(this.latex,{display:t.display,isInner:!1},this.parseOptions),r=s.mml()}catch(t){if(!(t instanceof lt))throw t;this.parseOptions.error=!0,r=this.options.formatError(this,t)}return r=this.parseOptions.nodeFactory.create("node","math",[r]),r.attributes.set(W.Attr.LATEX,this.latex),t.display&&V.setAttribute(r,"display","block"),this.parseOptions.tags.finishEquation(t),this.parseOptions.root=r,this.executeFilters(this.postFilters,t,e,this.parseOptions),s&&s.stack.env.hsize&&(V.setAttribute(r,"maxwidth",s.stack.env.hsize),V.setAttribute(r,"overflow","linebreak")),this.mathNode=this.parseOptions.root,this.mathNode}findMath(t){return this.findTeX.findMath(t)}formatError(t){const e=t.message.replace(/\n.*/,"");return this.parseOptions.nodeFactory.create("error",e,t.id,this.latex)}}tr.NAME="TeX",tr.OPTIONS=Object.assign(Object.assign({},E.OPTIONS),{FindTeX:null,packages:["base"],maxBuffer:5120,maxTemplateSubtitutions:1e4,mathStyle:"TeX",formatError:(t,e)=>t.formatError(e)}),MathJax.loader&&MathJax.loader.checkVersion("input/tex-base","4.1.0","input"),O({_:{input:{tex_ts:M,tex:{ColumnParser:p,Configuration:k,FilterUtil:i,FindTeX:e,HandlerTypes:n,MapHandler:A,NodeFactory:d,NodeUtil:r,ParseMethods:T,ParseOptions:g,ParseUtil:m,Stack:o,StackItem:l,StackItemFactory:u,Tags:f,TexConstants:s,TexError:c,TexParser:h,Token:b,TokenMap:y,UnitUtil:a,base:{BaseConfiguration:w,BaseItems:v,BaseMethods:P}}}}}),function(t=[],e=!0){if(MathJax.startup){e&&(MathJax.startup.registerConstructor("tex",MathJax._.input.tex_ts.TeX),MathJax.startup.useInput("tex")),MathJax.config.tex||(MathJax.config.tex={});let r=MathJax.config.tex.packages;MathJax.config.tex.packages=t,r&&(Array.isArray(r)&&(r={"[+]":r.filter((e=>!t.includes(e)))}),C(MathJax.config.tex,{packages:r}))}}(["base"])})();
|