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.
Files changed (248) hide show
  1. checksums.yaml +7 -0
  2. data/lib/discourse_math_bundle/version.rb +7 -0
  3. data/lib/discourse_math_bundle.rb +55 -0
  4. data/vendor/assets/katex/contrib/copy-tex.min.js +1 -0
  5. data/vendor/assets/katex/contrib/mhchem.min.js +1 -0
  6. data/vendor/assets/katex/fonts/KaTeX_AMS-Regular.woff +0 -0
  7. data/vendor/assets/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  8. data/vendor/assets/katex/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
  9. data/vendor/assets/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  10. data/vendor/assets/katex/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
  11. data/vendor/assets/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  12. data/vendor/assets/katex/fonts/KaTeX_Fraktur-Bold.woff +0 -0
  13. data/vendor/assets/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  14. data/vendor/assets/katex/fonts/KaTeX_Fraktur-Regular.woff +0 -0
  15. data/vendor/assets/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  16. data/vendor/assets/katex/fonts/KaTeX_Main-Bold.woff +0 -0
  17. data/vendor/assets/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
  18. data/vendor/assets/katex/fonts/KaTeX_Main-BoldItalic.woff +0 -0
  19. data/vendor/assets/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  20. data/vendor/assets/katex/fonts/KaTeX_Main-Italic.woff +0 -0
  21. data/vendor/assets/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
  22. data/vendor/assets/katex/fonts/KaTeX_Main-Regular.woff +0 -0
  23. data/vendor/assets/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
  24. data/vendor/assets/katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
  25. data/vendor/assets/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  26. data/vendor/assets/katex/fonts/KaTeX_Math-Italic.woff +0 -0
  27. data/vendor/assets/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
  28. data/vendor/assets/katex/fonts/KaTeX_SansSerif-Bold.woff +0 -0
  29. data/vendor/assets/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  30. data/vendor/assets/katex/fonts/KaTeX_SansSerif-Italic.woff +0 -0
  31. data/vendor/assets/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  32. data/vendor/assets/katex/fonts/KaTeX_SansSerif-Regular.woff +0 -0
  33. data/vendor/assets/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  34. data/vendor/assets/katex/fonts/KaTeX_Script-Regular.woff +0 -0
  35. data/vendor/assets/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
  36. data/vendor/assets/katex/fonts/KaTeX_Size1-Regular.woff +0 -0
  37. data/vendor/assets/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  38. data/vendor/assets/katex/fonts/KaTeX_Size2-Regular.woff +0 -0
  39. data/vendor/assets/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  40. data/vendor/assets/katex/fonts/KaTeX_Size3-Regular.woff +0 -0
  41. data/vendor/assets/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  42. data/vendor/assets/katex/fonts/KaTeX_Size4-Regular.woff +0 -0
  43. data/vendor/assets/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  44. data/vendor/assets/katex/fonts/KaTeX_Typewriter-Regular.woff +0 -0
  45. data/vendor/assets/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  46. data/vendor/assets/katex/katex.min.css +1 -0
  47. data/vendor/assets/katex/katex.min.js +1 -0
  48. data/vendor/assets/mathjax/a11y/assistive-mml.js +1 -0
  49. data/vendor/assets/mathjax/a11y/complexity.js +1 -0
  50. data/vendor/assets/mathjax/a11y/explorer.js +1 -0
  51. data/vendor/assets/mathjax/a11y/semantic-enrich.js +1 -0
  52. data/vendor/assets/mathjax/a11y/speech.js +1 -0
  53. data/vendor/assets/mathjax/a11y/sre.js +1 -0
  54. data/vendor/assets/mathjax/adaptors/jsdom.js +1 -0
  55. data/vendor/assets/mathjax/adaptors/linkedom.js +1 -0
  56. data/vendor/assets/mathjax/adaptors/liteDOM.js +1 -0
  57. data/vendor/assets/mathjax/core.js +1 -0
  58. data/vendor/assets/mathjax/input/asciimath.js +1 -0
  59. data/vendor/assets/mathjax/input/mml/entities.js +1 -0
  60. data/vendor/assets/mathjax/input/mml/extensions/mml3.js +1 -0
  61. data/vendor/assets/mathjax/input/mml/extensions/mml3.sef.json +1 -0
  62. data/vendor/assets/mathjax/input/mml.js +1 -0
  63. data/vendor/assets/mathjax/input/tex/extensions/action.js +1 -0
  64. data/vendor/assets/mathjax/input/tex/extensions/ams.js +1 -0
  65. data/vendor/assets/mathjax/input/tex/extensions/amscd.js +1 -0
  66. data/vendor/assets/mathjax/input/tex/extensions/autoload.js +1 -0
  67. data/vendor/assets/mathjax/input/tex/extensions/bbm.js +1 -0
  68. data/vendor/assets/mathjax/input/tex/extensions/bboldx.js +1 -0
  69. data/vendor/assets/mathjax/input/tex/extensions/bbox.js +1 -0
  70. data/vendor/assets/mathjax/input/tex/extensions/begingroup.js +1 -0
  71. data/vendor/assets/mathjax/input/tex/extensions/boldsymbol.js +1 -0
  72. data/vendor/assets/mathjax/input/tex/extensions/braket.js +1 -0
  73. data/vendor/assets/mathjax/input/tex/extensions/bussproofs.js +1 -0
  74. data/vendor/assets/mathjax/input/tex/extensions/cancel.js +1 -0
  75. data/vendor/assets/mathjax/input/tex/extensions/cases.js +1 -0
  76. data/vendor/assets/mathjax/input/tex/extensions/centernot.js +1 -0
  77. data/vendor/assets/mathjax/input/tex/extensions/color.js +1 -0
  78. data/vendor/assets/mathjax/input/tex/extensions/colortbl.js +1 -0
  79. data/vendor/assets/mathjax/input/tex/extensions/colorv2.js +1 -0
  80. data/vendor/assets/mathjax/input/tex/extensions/configmacros.js +1 -0
  81. data/vendor/assets/mathjax/input/tex/extensions/dsfont.js +1 -0
  82. data/vendor/assets/mathjax/input/tex/extensions/empheq.js +1 -0
  83. data/vendor/assets/mathjax/input/tex/extensions/enclose.js +1 -0
  84. data/vendor/assets/mathjax/input/tex/extensions/extpfeil.js +1 -0
  85. data/vendor/assets/mathjax/input/tex/extensions/gensymb.js +1 -0
  86. data/vendor/assets/mathjax/input/tex/extensions/html.js +1 -0
  87. data/vendor/assets/mathjax/input/tex/extensions/mathtools.js +1 -0
  88. data/vendor/assets/mathjax/input/tex/extensions/mhchem.js +34 -0
  89. data/vendor/assets/mathjax/input/tex/extensions/newcommand.js +1 -0
  90. data/vendor/assets/mathjax/input/tex/extensions/noerrors.js +1 -0
  91. data/vendor/assets/mathjax/input/tex/extensions/noundefined.js +1 -0
  92. data/vendor/assets/mathjax/input/tex/extensions/physics.js +1 -0
  93. data/vendor/assets/mathjax/input/tex/extensions/require.js +1 -0
  94. data/vendor/assets/mathjax/input/tex/extensions/setoptions.js +1 -0
  95. data/vendor/assets/mathjax/input/tex/extensions/tagformat.js +1 -0
  96. data/vendor/assets/mathjax/input/tex/extensions/texhtml.js +1 -0
  97. data/vendor/assets/mathjax/input/tex/extensions/textcomp.js +1 -0
  98. data/vendor/assets/mathjax/input/tex/extensions/textmacros.js +1 -0
  99. data/vendor/assets/mathjax/input/tex/extensions/unicode.js +1 -0
  100. data/vendor/assets/mathjax/input/tex/extensions/units.js +1 -0
  101. data/vendor/assets/mathjax/input/tex/extensions/upgreek.js +1 -0
  102. data/vendor/assets/mathjax/input/tex/extensions/verb.js +1 -0
  103. data/vendor/assets/mathjax/input/tex-base.js +1 -0
  104. data/vendor/assets/mathjax/input/tex.js +1 -0
  105. data/vendor/assets/mathjax/loader.js +1 -0
  106. data/vendor/assets/mathjax/mml-chtml-nofont.js +1 -0
  107. data/vendor/assets/mathjax/mml-chtml.js +1 -0
  108. data/vendor/assets/mathjax/mml-svg-nofont.js +1 -0
  109. data/vendor/assets/mathjax/mml-svg.js +1 -0
  110. data/vendor/assets/mathjax/output/chtml.js +1 -0
  111. data/vendor/assets/mathjax/output/svg.js +1 -0
  112. data/vendor/assets/mathjax/sre/mathmaps/af.json +146 -0
  113. data/vendor/assets/mathjax/sre/mathmaps/base.json +137 -0
  114. data/vendor/assets/mathjax/sre/mathmaps/ca.json +140 -0
  115. data/vendor/assets/mathjax/sre/mathmaps/da.json +140 -0
  116. data/vendor/assets/mathjax/sre/mathmaps/de.json +146 -0
  117. data/vendor/assets/mathjax/sre/mathmaps/en.json +158 -0
  118. data/vendor/assets/mathjax/sre/mathmaps/es.json +140 -0
  119. data/vendor/assets/mathjax/sre/mathmaps/euro.json +32 -0
  120. data/vendor/assets/mathjax/sre/mathmaps/fr.json +146 -0
  121. data/vendor/assets/mathjax/sre/mathmaps/hi.json +146 -0
  122. data/vendor/assets/mathjax/sre/mathmaps/it.json +146 -0
  123. data/vendor/assets/mathjax/sre/mathmaps/ko.json +146 -0
  124. data/vendor/assets/mathjax/sre/mathmaps/nb.json +146 -0
  125. data/vendor/assets/mathjax/sre/mathmaps/nemeth.json +125 -0
  126. data/vendor/assets/mathjax/sre/mathmaps/nn.json +146 -0
  127. data/vendor/assets/mathjax/sre/mathmaps/sv.json +146 -0
  128. data/vendor/assets/mathjax/sre/require.d.mts +1 -0
  129. data/vendor/assets/mathjax/sre/require.mjs +2 -0
  130. data/vendor/assets/mathjax/sre/speech-worker.js +1 -0
  131. data/vendor/assets/mathjax/startup.js +1 -0
  132. data/vendor/assets/mathjax/tex-chtml-nofont.js +1 -0
  133. data/vendor/assets/mathjax/tex-chtml.js +1 -0
  134. data/vendor/assets/mathjax/tex-mml-chtml-nofont.js +1 -0
  135. data/vendor/assets/mathjax/tex-mml-chtml.js +1 -0
  136. data/vendor/assets/mathjax/tex-mml-svg-nofont.js +1 -0
  137. data/vendor/assets/mathjax/tex-mml-svg.js +1 -0
  138. data/vendor/assets/mathjax/tex-svg-nofont.js +1 -0
  139. data/vendor/assets/mathjax/tex-svg.js +1 -0
  140. data/vendor/assets/mathjax/ui/lazy.js +1 -0
  141. data/vendor/assets/mathjax/ui/menu.js +1 -0
  142. data/vendor/assets/mathjax/ui/safe.js +1 -0
  143. data/vendor/assets/mathjax/woff-v2/mjx-ncm-ab.woff2 +0 -0
  144. data/vendor/assets/mathjax/woff-v2/mjx-ncm-abi.woff2 +0 -0
  145. data/vendor/assets/mathjax/woff-v2/mjx-ncm-ai.woff2 +0 -0
  146. data/vendor/assets/mathjax/woff-v2/mjx-ncm-ar.woff2 +0 -0
  147. data/vendor/assets/mathjax/woff-v2/mjx-ncm-arl.woff2 +0 -0
  148. data/vendor/assets/mathjax/woff-v2/mjx-ncm-b-a.woff2 +0 -0
  149. data/vendor/assets/mathjax/woff-v2/mjx-ncm-b.woff2 +0 -0
  150. data/vendor/assets/mathjax/woff-v2/mjx-ncm-bi.woff2 +0 -0
  151. data/vendor/assets/mathjax/woff-v2/mjx-ncm-br.woff2 +0 -0
  152. data/vendor/assets/mathjax/woff-v2/mjx-ncm-brd.woff2 +0 -0
  153. data/vendor/assets/mathjax/woff-v2/mjx-ncm-brk.woff2 +0 -0
  154. data/vendor/assets/mathjax/woff-v2/mjx-ncm-c.woff2 +0 -0
  155. data/vendor/assets/mathjax/woff-v2/mjx-ncm-cb.woff2 +0 -0
  156. data/vendor/assets/mathjax/woff-v2/mjx-ncm-ch.woff2 +0 -0
  157. data/vendor/assets/mathjax/woff-v2/mjx-ncm-chb.woff2 +0 -0
  158. data/vendor/assets/mathjax/woff-v2/mjx-ncm-chbi.woff2 +0 -0
  159. data/vendor/assets/mathjax/woff-v2/mjx-ncm-chi.woff2 +0 -0
  160. data/vendor/assets/mathjax/woff-v2/mjx-ncm-cy.woff2 +0 -0
  161. data/vendor/assets/mathjax/woff-v2/mjx-ncm-cyb.woff2 +0 -0
  162. data/vendor/assets/mathjax/woff-v2/mjx-ncm-cybi.woff2 +0 -0
  163. data/vendor/assets/mathjax/woff-v2/mjx-ncm-cyi.woff2 +0 -0
  164. data/vendor/assets/mathjax/woff-v2/mjx-ncm-cyss.woff2 +0 -0
  165. data/vendor/assets/mathjax/woff-v2/mjx-ncm-cyssb.woff2 +0 -0
  166. data/vendor/assets/mathjax/woff-v2/mjx-ncm-cyssbi.woff2 +0 -0
  167. data/vendor/assets/mathjax/woff-v2/mjx-ncm-cyssi.woff2 +0 -0
  168. data/vendor/assets/mathjax/woff-v2/mjx-ncm-ds.woff2 +0 -0
  169. data/vendor/assets/mathjax/woff-v2/mjx-ncm-dv.woff2 +0 -0
  170. data/vendor/assets/mathjax/woff-v2/mjx-ncm-em.woff2 +0 -0
  171. data/vendor/assets/mathjax/woff-v2/mjx-ncm-f.woff2 +0 -0
  172. data/vendor/assets/mathjax/woff-v2/mjx-ncm-fb.woff2 +0 -0
  173. data/vendor/assets/mathjax/woff-v2/mjx-ncm-gk.woff2 +0 -0
  174. data/vendor/assets/mathjax/woff-v2/mjx-ncm-gkb.woff2 +0 -0
  175. data/vendor/assets/mathjax/woff-v2/mjx-ncm-gkbi.woff2 +0 -0
  176. data/vendor/assets/mathjax/woff-v2/mjx-ncm-gki.woff2 +0 -0
  177. data/vendor/assets/mathjax/woff-v2/mjx-ncm-gkss.woff2 +0 -0
  178. data/vendor/assets/mathjax/woff-v2/mjx-ncm-gkssb.woff2 +0 -0
  179. data/vendor/assets/mathjax/woff-v2/mjx-ncm-gkssbi.woff2 +0 -0
  180. data/vendor/assets/mathjax/woff-v2/mjx-ncm-gkssi.woff2 +0 -0
  181. data/vendor/assets/mathjax/woff-v2/mjx-ncm-he.woff2 +0 -0
  182. data/vendor/assets/mathjax/woff-v2/mjx-ncm-heb.woff2 +0 -0
  183. data/vendor/assets/mathjax/woff-v2/mjx-ncm-hebi.woff2 +0 -0
  184. data/vendor/assets/mathjax/woff-v2/mjx-ncm-hei.woff2 +0 -0
  185. data/vendor/assets/mathjax/woff-v2/mjx-ncm-i.woff2 +0 -0
  186. data/vendor/assets/mathjax/woff-v2/mjx-ncm-lb.woff2 +0 -0
  187. data/vendor/assets/mathjax/woff-v2/mjx-ncm-li.woff2 +0 -0
  188. data/vendor/assets/mathjax/woff-v2/mjx-ncm-lib.woff2 +0 -0
  189. data/vendor/assets/mathjax/woff-v2/mjx-ncm-lo.woff2 +0 -0
  190. data/vendor/assets/mathjax/woff-v2/mjx-ncm-lr.woff2 +0 -0
  191. data/vendor/assets/mathjax/woff-v2/mjx-ncm-lt.woff2 +0 -0
  192. data/vendor/assets/mathjax/woff-v2/mjx-ncm-m.woff2 +0 -0
  193. data/vendor/assets/mathjax/woff-v2/mjx-ncm-mar.woff2 +0 -0
  194. data/vendor/assets/mathjax/woff-v2/mjx-ncm-mi.woff2 +0 -0
  195. data/vendor/assets/mathjax/woff-v2/mjx-ncm-ml.woff2 +0 -0
  196. data/vendor/assets/mathjax/woff-v2/mjx-ncm-mm.woff2 +0 -0
  197. data/vendor/assets/mathjax/woff-v2/mjx-ncm-msh.woff2 +0 -0
  198. data/vendor/assets/mathjax/woff-v2/mjx-ncm-mx.woff2 +0 -0
  199. data/vendor/assets/mathjax/woff-v2/mjx-ncm-n.woff2 +0 -0
  200. data/vendor/assets/mathjax/woff-v2/mjx-ncm-ob.woff2 +0 -0
  201. data/vendor/assets/mathjax/woff-v2/mjx-ncm-os.woff2 +0 -0
  202. data/vendor/assets/mathjax/woff-v2/mjx-ncm-ph.woff2 +0 -0
  203. data/vendor/assets/mathjax/woff-v2/mjx-ncm-phb.woff2 +0 -0
  204. data/vendor/assets/mathjax/woff-v2/mjx-ncm-phbi.woff2 +0 -0
  205. data/vendor/assets/mathjax/woff-v2/mjx-ncm-phi.woff2 +0 -0
  206. data/vendor/assets/mathjax/woff-v2/mjx-ncm-phss.woff2 +0 -0
  207. data/vendor/assets/mathjax/woff-v2/mjx-ncm-phssb.woff2 +0 -0
  208. data/vendor/assets/mathjax/woff-v2/mjx-ncm-phssbi.woff2 +0 -0
  209. data/vendor/assets/mathjax/woff-v2/mjx-ncm-phssi.woff2 +0 -0
  210. data/vendor/assets/mathjax/woff-v2/mjx-ncm-pu.woff2 +0 -0
  211. data/vendor/assets/mathjax/woff-v2/mjx-ncm-pub.woff2 +0 -0
  212. data/vendor/assets/mathjax/woff-v2/mjx-ncm-pubi.woff2 +0 -0
  213. data/vendor/assets/mathjax/woff-v2/mjx-ncm-pui.woff2 +0 -0
  214. data/vendor/assets/mathjax/woff-v2/mjx-ncm-rb.woff2 +0 -0
  215. data/vendor/assets/mathjax/woff-v2/mjx-ncm-s.woff2 +0 -0
  216. data/vendor/assets/mathjax/woff-v2/mjx-ncm-s3.woff2 +0 -0
  217. data/vendor/assets/mathjax/woff-v2/mjx-ncm-s4.woff2 +0 -0
  218. data/vendor/assets/mathjax/woff-v2/mjx-ncm-s5.woff2 +0 -0
  219. data/vendor/assets/mathjax/woff-v2/mjx-ncm-s6.woff2 +0 -0
  220. data/vendor/assets/mathjax/woff-v2/mjx-ncm-s7.woff2 +0 -0
  221. data/vendor/assets/mathjax/woff-v2/mjx-ncm-sb.woff2 +0 -0
  222. data/vendor/assets/mathjax/woff-v2/mjx-ncm-sh.woff2 +0 -0
  223. data/vendor/assets/mathjax/woff-v2/mjx-ncm-shb.woff2 +0 -0
  224. data/vendor/assets/mathjax/woff-v2/mjx-ncm-shbi.woff2 +0 -0
  225. data/vendor/assets/mathjax/woff-v2/mjx-ncm-shi.woff2 +0 -0
  226. data/vendor/assets/mathjax/woff-v2/mjx-ncm-so.woff2 +0 -0
  227. data/vendor/assets/mathjax/woff-v2/mjx-ncm-ss.woff2 +0 -0
  228. data/vendor/assets/mathjax/woff-v2/mjx-ncm-ssb.woff2 +0 -0
  229. data/vendor/assets/mathjax/woff-v2/mjx-ncm-ssbi.woff2 +0 -0
  230. data/vendor/assets/mathjax/woff-v2/mjx-ncm-ssbix.woff2 +0 -0
  231. data/vendor/assets/mathjax/woff-v2/mjx-ncm-ssbx.woff2 +0 -0
  232. data/vendor/assets/mathjax/woff-v2/mjx-ncm-ssi.woff2 +0 -0
  233. data/vendor/assets/mathjax/woff-v2/mjx-ncm-ssix.woff2 +0 -0
  234. data/vendor/assets/mathjax/woff-v2/mjx-ncm-sslb.woff2 +0 -0
  235. data/vendor/assets/mathjax/woff-v2/mjx-ncm-ssli.woff2 +0 -0
  236. data/vendor/assets/mathjax/woff-v2/mjx-ncm-sslib.woff2 +0 -0
  237. data/vendor/assets/mathjax/woff-v2/mjx-ncm-sslr.woff2 +0 -0
  238. data/vendor/assets/mathjax/woff-v2/mjx-ncm-ssx.woff2 +0 -0
  239. data/vendor/assets/mathjax/woff-v2/mjx-ncm-sy.woff2 +0 -0
  240. data/vendor/assets/mathjax/woff-v2/mjx-ncm-syb.woff2 +0 -0
  241. data/vendor/assets/mathjax/woff-v2/mjx-ncm-sybi.woff2 +0 -0
  242. data/vendor/assets/mathjax/woff-v2/mjx-ncm-syi.woff2 +0 -0
  243. data/vendor/assets/mathjax/woff-v2/mjx-ncm-u-a.woff2 +0 -0
  244. data/vendor/assets/mathjax/woff-v2/mjx-ncm-u.woff2 +0 -0
  245. data/vendor/assets/mathjax/woff-v2/mjx-ncm-v.woff2 +0 -0
  246. data/vendor/assets/mathjax/woff-v2/mjx-ncm-vx.woff2 +0 -0
  247. data/vendor/assets/mathjax/woff-v2/mjx-ncm-zero.woff2 +0 -0
  248. 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:()=>st});var r={};t.r(r),t.d(r,{default:()=>ht});var s={};t.r(s),t.d(s,{TexConstant:()=>mt});var n={};t.r(n),t.d(n,{default:()=>bt});var i={};t.r(i),t.d(i,{ConfigurationType:()=>At,HandlerType:()=>yt});var a={};t.r(a),t.d(a,{UnitUtil:()=>kt});var o={};t.r(o),t.d(o,{default:()=>wt});var c={};t.r(c),t.d(c,{default:()=>xt});var l={};t.r(l),t.d(l,{BaseItem:()=>Tt,MmlStack:()=>Pt});var h={};t.r(h),t.d(h,{default:()=>Ct});var m={};t.r(m),t.d(m,{default:()=>It});var d={};t.r(d),t.d(d,{NodeFactory:()=>Nt});var u={};t.r(u),t.d(u,{KeyValueDef:()=>Rt,KeyValueTypes:()=>Dt,ParseUtil:()=>qt});var g={};t.r(g),t.d(g,{ColumnParser:()=>_t});var p={};t.r(p),t.d(p,{default:()=>Ut});var f={};t.r(f),t.d(f,{AbstractTags:()=>Xt,AllTags:()=>Vt,Label:()=>Kt,NoTags:()=>$t,TagInfo:()=>zt,TagsFactory:()=>Yt});var b={};t.r(b),t.d(b,{Macro:()=>Zt,Token:()=>Qt});var A={};t.r(A),t.d(A,{AbstractParseMap:()=>se,AbstractTokenMap:()=>ee,CharacterMap:()=>ne,CommandMap:()=>oe,DelimiterMap:()=>ie,EnvironmentMap:()=>ce,MacroMap:()=>ae,RegExpMap:()=>re,parseResult:()=>te});var y={};t.r(y),t.d(y,{MapHandler:()=>de,SubHandler:()=>ue,SubHandlers:()=>ge});var v={};t.r(v),t.d(v,{Configuration:()=>pe,ConfigurationHandler:()=>be,ParserConfiguration:()=>Ae});var k={};t.r(k),t.d(k,{ArrayItem:()=>Ue,BeginItem:()=>Le,BreakItem:()=>Ne,CellItem:()=>Be,CloseItem:()=>xe,DotsItem:()=>je,EndItem:()=>Fe,EqnArrayItem:()=>Ke,EquationItem:()=>Xe,FnItem:()=>qe,LeftItem:()=>Se,Middle:()=>Oe,MmlItem:()=>Ge,MstyleItem:()=>ze,NonscriptItem:()=>He,NotItem:()=>_e,NullItem:()=>Pe,OpenItem:()=>Me,OverItem:()=>Ee,PositionItem:()=>De,PrimeItem:()=>Te,RightItem:()=>Ie,StartItem:()=>ke,StopItem:()=>we,StyleItem:()=>Re,SubsupItem:()=>Ce});var w={};t.r(w),t.d(w,{default:()=>er,splitAlignArray:()=>Qe});var M={};t.r(M),t.d(M,{default:()=>nr});var x={};t.r(x),t.d(x,{BaseConfiguration:()=>gr,BaseTags:()=>ur,Other:()=>dr});var P={};t.r(P),t.d(P,{TeX:()=>pr});var T={};t.r(T),t.d(T,{FlalignItem:()=>br,MultlineItem:()=>fr});var C={};t.r(C),t.d(C,{NewcommandPriority:()=>yr,NewcommandTables:()=>Ar,NewcommandUtil:()=>vr});var E={};t.r(E),t.d(E,{AmsMethods:()=>Mr});var S={};t.r(S),t.d(S,{BeginEnvItem:()=>xr});var O={};t.r(O),t.d(O,{default:()=>Tr});var I={};t.r(I),t.d(I,{NewcommandConfig:()=>Cr,NewcommandConfiguration:()=>Er});var N={};t.r(N),t.d(N,{AmsConfiguration:()=>Or,AmsTags:()=>Sr});var L={};t.r(L),t.d(L,{RequireConfiguration:()=>zr,RequireLoad:()=>jr,RequireMethods:()=>Ur,options:()=>Kr});var F={};t.r(F),t.d(F,{AutoloadConfiguration:()=>Jr});var R={};t.r(R),t.d(R,{ConfigMacrosConfiguration:()=>ts});var D={};t.r(D),t.d(D,{NoUndefinedConfiguration:()=>es});var B={};t.r(B),t.d(B,{TextParser:()=>rs});var G={};t.r(G),t.d(G,{TextMacrosMethods:()=>is});var q={};t.r(q),t.d(q,{TextBaseConfiguration:()=>os,TextMacrosConfiguration:()=>ls});const _=("undefined"!=typeof window?window:t.g).MathJax._.components.global,H=(_.GLOBAL,_.isObject,_.combineConfig,_.combineDefaults,_.combineWithMathJax),j=(_.MathJax,MathJax._.core.InputJax.AbstractInputJax),U=MathJax._.util.Options,K=(U.isObject,U.APPEND,U.REMOVE,U.OPTIONS,U.Expandable,U.expandable),z=(U.makeArray,U.keys,U.copy,U.insert),X=U.defaultOptions,$=U.userOptions,V=(U.selectOptions,U.selectOptionsFromKeys,U.separateOptions),J=U.lookup,W=MathJax._.core.FindMath.AbstractFindMath,Y=MathJax._.util.string,Q=Y.sortLength,Z=Y.quotePattern,tt=(Y.unicodeChars,Y.unicodeString,Y.isPercent,Y.split,Y.replaceUnicode),et=(Y.toEntity,MathJax._.core.MathItem),rt=et.protoItem;et.AbstractMathItem,et.STATE,et.newState;class st extends W{constructor(t){super(t),this.getPatterns()}getPatterns(){const t=this.options,e=[],r=[],s=[];this.end={},this.env=this.sub=0;let n=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(Q).join("|")),t.processEnvironments&&(r.push("\\\\begin\\s*\\{([^}]*)\\}"),this.env=n,n++),t.processEscapes&&s.push("\\\\([\\\\$])"),t.processRefs&&s.push("(\\\\(?:eq)?ref\\s*\\{[^}]*\\})"),s.length&&(r.push("("+s.join("|")+")"),this.sub=n),this.start=new RegExp(r.join("|"),"g"),this.hasPatterns=r.length>0}addPattern(t,e,r){const[s,n]=e;t.push(Z(s)),this.end[s]=[n,r,this.endPattern(n)]}endPattern(t,e){return new RegExp((e||Z(t))+"|\\\\(?:[a-zA-Z]|.)|[{}]","g")}findEnd(t,e,r,s){const[n,i,a]=s,o=a.lastIndex=r.index+r[0].length;let c,l=0;for(;c=a.exec(t);){if((c[1]||c[0])===n&&0===l)return rt(r[0],t.substring(o,c.index),c[0],e,r.index,c.index+c[0].length,i);"{"===c[0]?l++:"}"===c[0]&&l&&l--}return null}findMathInString(t,e,r){let s,n;for(this.start.lastIndex=0;s=this.start.exec(r);){if(void 0!==s[this.env]&&this.env){const t="\\\\end\\s*(\\{"+Z(s[this.env])+"\\})";n=this.findEnd(r,e,s,["{"+s[this.env]+"}",!0,this.endPattern(null,t)]),n&&(n.math=n.open+n.math+n.close,n.open=n.close="")}else if(void 0!==s[this.sub]&&this.sub){const t=s[this.sub],r=s.index+s[this.sub].length;n=2===t.length?rt("\\",t.substring(1),"",e,s.index,r):rt("",t,"",e,s.index,r,!1)}else n=this.findEnd(r,e,s,this.end[s[0]]);n&&(t.push(n),this.start.lastIndex=n.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}}st.OPTIONS={inlineMath:[["\\(","\\)"]],displayMath:[["$$","$$"],["\\[","\\]"]],processEscapes:!0,processEnvironments:!0,processRefs:!0};const nt=MathJax._.core.MmlTree.MmlNode,it=nt.TEXCLASS,at=(nt.TEXCLASSNAMES,nt.MATHVARIANTS,nt.indentAttributes,nt.AbstractMmlNode),ot=(nt.AbstractMmlTokenNode,nt.AbstractMmlLayoutNode,nt.AbstractMmlBaseNode,nt.AbstractMmlEmptyNode),ct=(nt.TextNode,nt.XMLNode,MathJax._.core.MmlTree.MmlNodes.mo.MmlMo),lt={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||(lt.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 at||t instanceof ot,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")=>ct.OPTABLE[e][t.getText()]||null,getMoAttribute(t,e){var r,s;if(!t.attributes.isSet(e))for(const n of["infix","postfix","prefix"]){const i=null===(s=null===(r=this.getOp(t,n))||void 0===r?void 0:r[3])||void 0===s?void 0:s[e];if(void 0!==i)return i}return t.attributes.get(e)}},ht=lt,mt={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 dt(t,e,r){const s=e.attributes,n=r.attributes;t.forEach((t=>{const e=n.getExplicit(t);null!=e&&s.set(t,e)}))}function ut(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,n=e.attributes,i=r(s,"lspace"),a=r(n,"rspace");if(i.length!==a.length)return!1;for(const t of i)if(s.getExplicit(t)!==n.getExplicit(t))return!1;return!0}function gt(t,e,r){const s=[];for(const n of t.getList("m"+e+r)){const i=n.childNodes;if(i[n[e]]&&i[n[r]])continue;const a=n.parent,o=i[n[e]]?t.nodeFactory.create("node","m"+e,[i[n.base],i[n[e]]]):t.nodeFactory.create("node","m"+r,[i[n.base],i[n[r]]]);ht.copyAttributes(n,o),a.replaceChild(o,n),s.push(n)}t.removeFromList("m"+e+r,s)}function pt(t,e,r){const s=[];for(const n of t.getList(e)){if(n.attributes.get("displaystyle"))continue;const e=n.childNodes[n.base],i=e.coreMO();if(e.getProperty("movablelimits")&&!i.attributes.hasExplicit("movablelimits")){const e=t.nodeFactory.create("node",r,n.childNodes);ht.copyAttributes(n,e),n.parent.replaceChild(e,n),s.push(n)}}t.removeFromList(e,s)}const ft={cleanStretchy(t){var e;const r=t.data;for(const t of r.getList("fixStretchy"))if(ht.getProperty(t,"fixStretchy")){const r=ht.getForm(t);(null===(e=null==r?void 0:r[3])||void 0===e?void 0:e.stretchy)&&ht.setAttribute(t,"stretchy",!1),ht.removeProperties(t,"fixStretchy")}},cleanAttributes(t){t.data.root.walkTree((t=>{const e=new Set((t.getProperty("keep-attrs")||"").split(/ /)),r=t.attributes;r.unset(mt.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&&!ht.isType(r.parent,"mrow")||ht.getTexClass(r)!==it.REL)continue;let t;const s=r.parent.childNodes,n=s.indexOf(r)+1,i=ht.getProperty(r,"variantForm");for(;n<s.length&&(t=s[n])&&ht.isType(t,"mo")&&ht.getTexClass(t)===it.REL;){if(i!==ht.getProperty(t,"variantForm")||!ut(r,t)){r.attributes.hasExplicit("rspace")||ht.setAttribute(r,"rspace","0pt"),t.attributes.hasExplicit("lspace")||ht.setAttribute(t,"lspace","0pt");break}ht.appendChildren(r,ht.getChildren(t)),dt(["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(n,1),e.push(t),t.parent=null,t.setProperty("relationsCombined",!0),r.setProperty("texClass",it.REL)}r.attributes.setInherited("form",r.getForms()[0])}t.data.removeFromList("mo",e)},cleanSubSup(t){const e=t.data;e.error||(gt(e,"sub","sup"),gt(e,"under","over"))},moveLimits(t){const e=t.data;pt(e,"munderover","msubsup"),pt(e,"munder","msub"),pt(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 n=t.childNodes[0].childNodes[0];s.forEach((t=>n.attributes.set(t,e.get(t)))),t.parent.replaceChild(n,t),r.push(t)}}e.removeFromList("mstyle",r)}},bt=ft;var At,yt;!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"}(At||(At={})),function(t){t.DELIMITER="delimiter",t.MACRO="macro",t.CHARACTER="character",t.ENVIRONMENT="environment"}(yt||(yt={}));const vt=7.2;const kt={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",vt],["cm",vt/2.54],["mm",vt/25.4],["mu",1/18]]),matchDimen(t,e=!1){const r=t.match(e?kt.UNIT_CASES.dimenRest:kt.UNIT_CASES.dimenEnd);return r?function([t,e,r]){return"mu"!==e?[t,e,r]:[kt.em(kt.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]=kt.matchDimen(t),s=parseFloat(e||"1");return kt.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 wt{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=ht.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 Mt{static processString(t,e){const r=t.split(Mt.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=Mt.processString(e,r)}}Mt.pattern=/%(\d+|\{\d+\}|\{[a-z]+:%\d+(?:\|(?:%\{\d+\}|%.|[^}])*)+\}|.)/g;const xt=Mt;class Pt{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 Tt extends Pt{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 Tt.fail;throw new xt("Misplaced","Misplaced %1",t.getName())}if(t.isClose&&this.getErrors(t.kind)){const[e,r]=this.getErrors(t.kind);throw new xt(e,r,t.getName())}return t.isFinal?(this.Push(t.First),Tt.fail):Tt.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]||Tt.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(mt.Attr.LATEXITEM,s),"}"!==s&&t.attributes.set(mt.Attr.LATEX,s)}}}Tt.fail=[null,!1],Tt.success=[null,!0],Tt.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 Ct{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"),n=e.isInner;let i;if(delete e.isInner,e){i={};for(const t of Object.keys(e))i[t]=e[t]}this.configuration.pushParser(this),this.stack=new wt(this.itemFactory,i,!s||n),this.Parse(),this.Push(this.itemFactory.create("stop")),this.stack.env=i}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(yt.CHARACTER,[this,t])}Push(t){t instanceof Tt&&(t.startI=this.saveI,t.stopI=this.i,t.startStr=this.string),t instanceof at&&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(mt.Attr.LATEX,e),t}convertDelimiter(t){var e;const r=this.lookup(yt.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 xt("MissingArgFor","Missing argument for %1",this.currentCS);return null;case"}":if(!e)throw new xt("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 xt("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 n=0,i=0;for(;this.i<this.string.length;)switch(this.string.charAt(this.i++)){case"{":n++;break;case"\\":this.i++;break;case"}":if(n--<=0)throw new xt("ExtraCloseLooking","Extra close brace while looking for %1","']'");break;case"[":0===n&&i++;break;case"]":if(0===n){if(!r||0===i)return this.string.slice(s,this.i-1);i--}}throw new xt("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(yt.DELIMITER,r)))return this.convertDelimiter(r);throw new xt("MissingOrUnrecognizedDelim","Missing or unrecognized delimiter for %1",this.currentCS)}GetDimen(t){if("{"===this.GetNext()){const e=this.GetArgument(t),[r,s]=kt.matchDimen(e);if(r)return r+s}else{const t=this.string.slice(this.i),[e,r,s]=kt.matchDimen(t,!0);if(e)return this.i+=s,e+r}throw new xt("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 n=this.GetNext();switch(this.i+=n.length,n){case"\\":n+=this.GetCS();break;case"{":s++;break;case"}":if(0===s)throw new xt("ExtraCloseLooking","Extra close brace while looking for %1",e);s--}if(0===s&&n===e)return this.string.slice(r,t)}throw new xt("TokenNotFoundForCommand","Could not find %1 for %2",e,this.currentCS)}ParseArg(t){return new Ct(this.GetArgument(t),this.stack.env,this.configuration).mml()}ParseUpTo(t,e){return new Ct(this.GetUpTo(t,e),this.stack.env,this.configuration).mml()}GetDelimiterArg(t){const e=kt.trimSpaces(this.GetArgument(t));if(""===e)return null;if(this.contains(yt.DELIMITER,e))return e;throw new xt("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=mt.Attr.LATEX,n=r.attributes.get(s),i=r.attributes.get(mt.Attr.LATEXITEM);if(void 0!==i)return void(n||("}"===t||"}"===i?this.composeBraces(r):r.attributes.set(s,i)));e=e<this.saveI?this.saveI:e;const a=this.trimTex(e!==this.i?this.string.slice(e,this.i):t);if(a&&a!==n&&("\\"!==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 n=mt.Attr.LATEX,i=(t.childNodes[r].attributes.get(n)||"")+e+t.childNodes[s].attributes.get(n);t.attributes.set(n,i)}composeBraces(t){const e=this.composeBracedContent(t);t.attributes.set(mt.Attr.LATEX,`{${e}}`)}composeBracedContent(t){var e,r;const s=(null===(e=t.childNodes[0])||void 0===e?void 0:e.childNodes)||[];let n="";for(const t of s){const e=(null===(r=null==t?void 0:t.attributes)||void 0===r?void 0:r.get(mt.Attr.LATEX))||"";e&&(n+=n&&n.match(/[a-zA-Z]$/)&&e.match(/^[a-zA-Z]/)?" "+e:e)}return n}}const Et=MathJax._.core.Tree.Factory.AbstractFactory;class St extends Tt{}class Ot extends Et{constructor(){super(...arguments),this.defaultKind="dummy",this.configuration=null}}Ot.DefaultStackItems={[St.prototype.kind]:St};const It=Ot;class Nt{constructor(){this.mmlFactory=null,this.factory={node:Nt.createNode,token:Nt.createToken,text:Nt.createText,error:Nt.createError}}static createNode(t,e,r=[],s={},n){const i=t.mmlFactory.create(e);return i.setChildren(r),n&&i.appendChild(n),ht.setProperties(i,s),i}static createToken(t,e,r={},s=""){const n=t.create("text",s);return t.create("node",e,[],r,n)}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 Lt=MathJax._.util.Entities,Ft=(Lt.options,Lt.entities);Lt.add,Lt.remove,Lt.translate,Lt.numeric;class Rt{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 Dt={boolean:new Rt("boolean",(t=>"true"===t||"false"===t),(t=>"true"===t)),number:new Rt("number",(t=>!!t.match(/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[-+]?\d+)?$/)),(t=>parseFloat(t))),integer:new Rt("integer",(t=>!!t.match(/^[-+]?\d+$/)),(t=>parseInt(t))),string:new Rt("string",(t=>!0),(t=>t)),dimen:new Rt("dimen",(t=>null!==kt.matchDimen(t)[0]),(t=>t))};function Bt(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 Gt(t,e,r=!1,s=!1){const n=t.length;let i=0,a="",o=0,c=0,l=!0;for(;o<n;){const s=t[o++];switch(s){case"\\":a+=s+(t[o++]||""),l=!1;continue;case" ":break;case"{":l&&c++,i++;break;case"}":if(!i)throw new xt("ExtraCloseMissingOpen","Extra close brace or missing open brace");i--,l=!1;break;default:if(!i&&e.includes(s))return[Bt(a,r?Math.min(1,c):c),s,t.slice(o)];c>i&&(c=i),l=!1}a+=s}if(i)throw new xt("ExtraOpenMissingClose","Extra open brace or missing close brace");return s&&c?["","",Bt(a,1)]:[Bt(a,r?Math.min(1,c):c),"",t.slice(o)]}const qt={cols:(...t)=>t.map((t=>kt.em(t))).join(" "),fenced(t,e,r,s,n="",i=""){const a=t.nodeFactory,o=a.create("node","mrow",[],{open:e,close:s,texClass:it.INNER});let c;if(n)c=new Ct("\\"+n+"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:it.OPEN},t)}if(ht.appendChildren(o,[c,r]),n)c=new Ct("\\"+n+"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:it.CLOSE},t)}return i&&c.attributes.set("mathcolor",i),ht.appendChildren(o,[c]),o},fixedFence(t,e,r,s){const n=t.nodeFactory.create("node","mrow",[],{open:e,close:s,texClass:it.ORD});return e&&ht.appendChildren(n,[qt.mathPalette(t,e,"l")]),ht.isType(r,"mrow")?ht.appendChildren(n,ht.getChildren(r)):ht.appendChildren(n,[r]),s&&ht.appendChildren(n,[qt.mathPalette(t,s,"r")]),n},mathPalette(t,e,r){"{"!==e&&"}"!==e||(e="\\"+e);const s="{\\big"+r+" "+e+"}";return new Ct("\\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&&!ht.isType(s,"mspace")&&(!ht.isType(s,"TeXAtom")||ht.getChildren(s)[0]&&ht.getChildren(ht.getChildren(s)[0]).length)){if(ht.isEmbellished(s)||ht.isType(s,"TeXAtom")&&ht.getTexClass(s)===it.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 n=s||t.stack.env.font,i=n?{mathvariant:n}:{};let a,o,c=[],l=0,h=0,m="",d=0;if(e.match(/\\?[${}\\]|\\\(|\\(?:eq)?ref\s*\{|\\U/)){for(;l<e.length;)if(a=e.charAt(l++),"$"===a)"$"===m&&0===d?(o=t.create("node","TeXAtom",[new Ct(e.slice(h,l-1),{},t.configuration).mml()]),c.push(o),m="",h=l):""===m&&(h<l-1&&c.push(qt.internalText(t,e.slice(h,l-1),i)),m="$",h=l);else if("{"===a&&""!==m)d++;else if("}"===a)if("}"===m&&0===d){const r=new Ct(e.slice(h,l),{},t.configuration).mml();o=t.create("node","TeXAtom",[r],i),c.push(o),m="",h=l}else""!==m&&d&&d--;else if("\\"===a)if(""===m&&e.substring(l).match(/^(eq)?ref\s*\{/)){const r=RegExp["$&"].length;h<l-1&&c.push(qt.internalText(t,e.slice(h,l-1),i)),m="}",h=l-1,l+=r}else if(a=e.charAt(l++),"("===a&&""===m)h<l-2&&c.push(qt.internalText(t,e.slice(h,l-2),i)),m=")",h=l;else if(")"===a&&")"===m&&0===d)o=t.create("node","TeXAtom",[new Ct(e.slice(h,l-2),{},t.configuration).mml()]),c.push(o),m="",h=l;else if(a.match(/[${}\\]/)&&""===m)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 xt("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(""!==m)throw new xt("MathNotTerminated","Math mode is not properly terminated")}return h<e.length&&c.push(qt.internalText(t,e.slice(h),i)),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(/^ +/,Ft.nbsp).replace(/ +$/,Ft.nbsp);const s=t.create("text",e);return t.create("node","mtext",[],r,s)},underOver(t,e,r,s,n){if(qt.checkMovableLimits(e),ht.isType(e,"munderover")&&ht.isEmbellished(e)){ht.setProperties(ht.getCoreMO(e),{lspace:0,rspace:0});const r=t.create("node","mo",[],{rspace:0});e=t.create("node","mrow",[r,e])}const i=t.create("node","munderover",[e]);ht.setChild(i,"over"===s?i.over:i.under,r);let a=i;return n&&(a=t.create("node","TeXAtom",[t.create("node","mstyle",[i],{displaystyle:!0,scriptlevel:0})],{texClass:it.OP,movesupsub:!0})),ht.setProperty(a,"subsupOK",!0),a},checkMovableLimits(t){const e=ht.isType(t,"mo")?ht.getForm(t):null;(ht.getProperty(t,"movablelimits")||e&&e[3]&&e[3].movablelimits)&&ht.setProperties(t,{movablelimits:!1})},setArrayAlign:(t,e,r)=>(r||(e=kt.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="",n="",i=0;for(;i<r.length;){let a=r.charAt(i++);if("\\"===a)s+=a+r.charAt(i++);else if("#"===a)if(a=r.charAt(i++),"#"===a)s+=a;else{if(!a.match(/[1-9]/)||parseInt(a,10)>e.length)throw new xt("IllegalMacroParam","Illegal macro parameter reference");n=qt.addArgs(t,qt.addArgs(t,n,s),e[parseInt(a,10)-1]),s=""}else s+=a}return qt.addArgs(t,n,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 xt("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 xt("MaxMacroSub1","MathJax maximum macro substitution count exceeded; is here a recursive macro call?"):new xt("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 xt("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 n=function(t,e=!1){const r={};let s,n,i,a=t,o=!0;for(;a;)[n,s,a]=Gt(a,["=",","],e,o),o=!1,"="===s?([i,s,a]=Gt(a,[","],e),i="false"===i||"true"===i?JSON.parse(i):i,r[n]=i):n&&(r[n]=!0);return r}(t,s);if(e)for(const t of Object.keys(n))if(Object.hasOwn(e,t)){if(e[t]instanceof Rt){const r=e[t],s=String(n[t]);if(!r.verify(s))throw new xt("InvalidValue","Value for key '%1' is not of the expected type",t);n[t]=r.convert(s)}}else{if(r)throw new xt("InvalidOption","Invalid option: %1",t);delete n[t]}return n},isLatinOrGreekChar:t=>!!t.normalize("NFD").match(/[a-zA-Z\u0370-\u03F0]/)};class _t{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 n=0;for(;s.i<s.template.length;){if(n++>this.MAXCOLUMNS)throw new xt("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 xt("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,n=t.cextra[r]?s[r]:null;e.arraydef["data-array-padding"]=`${s[0]||".5em"} ${n||".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(!kt.matchDimen(e)[0])throw new xt("MissingColumnDimOrUnits","Missing dimension or its units for %1 column declaration",t.c);return e}getAlign(t){const e=this.getBraces(t);return J(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 xt("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 xt("MissingCloseBrace","Missing close brace")}macroColumn(t,e,r){const s=[];for(;r>0&&r--;)s.push(this.getBraces(t));t.template=qt.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:n}=t;t.cextra[n]=!0,t.calign[n]="center",t.clines[n]&&(".5em"===s[n]?r[n-1]+="\\hspace{.25em}":s[n]||(t.cend[n-1]=(t.cend[n-1]||"")+"\\hspace{.5em}")),r[n]=e,s[n]="0",s[++t.j]="0"}addBang(t,e){const{cstart:r,cspace:s,j:n}=t;t.cextra[n]=!0,t.calign[n]="center",r[n]=("0"===s[n]&&t.clines[n]?"\\hspace{.25em}":"")+e,s[n]||(s[n]=".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 xt("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 Ht=mt.Variant;class jt{constructor(t,e=[]){this.options={},this.columnParser=new _t,this.packageData=new Map,this.parsers=[],this.root=null,this.nodeLists={},this.error=!1,this.handlers=t.handlers,this.nodeFactory=new Nt,this.nodeFactory.configuration=this,this.nodeFactory.setCreators(t.nodes),this.itemFactory=new It(t.items),this.itemFactory.configuration=this,X(this.options,...e),X(this.options,t.options),this.mathStyle=jt.getVariant.get(this.options.mathStyle)||jt.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=ht.getProperty(e,"in-lists")||"",s=(r?r.split(/,/):[]).concat(t).join(",");ht.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}}jt.getVariant=new Map([["TeX",(t,e)=>e&&t.match(/^[\u0391-\u03A9\u03F4]/)?Ht.NORMAL:""],["ISO",t=>Ht.ITALIC],["French",t=>t.normalize("NFD").match(/^[a-z]/)?Ht.ITALIC:Ht.NORMAL],["upright",t=>Ht.NORMAL]]);const Ut=jt;class Kt{constructor(t="???",e=""){this.tag=t,this.id=e}}class zt{constructor(t="",e=!1,r=!1,s=null,n="",i="",a=!1,o=""){this.env=t,this.taggable=e,this.defaultTags=r,this.tag=s,this.tagId=n,this.tagFormat=i,this.noTag=a,this.labelId=o}}class Xt{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 zt,this.history=[],this.stack=[],this.enTag=function(t,e){const r=this.configuration.nodeFactory,s=r.create("node","mtd",[t]),n=r.create("node","mlabeledtr",[e,s]);return r.create("node","mtable",[n],{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 zt(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 zt("",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 Kt(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 Ct(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 $t extends Xt{autoTag(){}getTag(){return this.currentTag.tag?super.getTag():null}}class Vt extends Xt{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 Jt=new Map([["none",$t],["all",Vt]]);let Wt="none";const Yt={OPTIONS:{tags:Wt,tagSide:"right",tagIndent:"0.8em",useLabelIds:!0,ignoreDuplicateLabels:!1,tagAlign:"baseline"},add(t,e){Jt.set(t,e)},addTags(t){for(const e of Object.keys(t))Yt.add(e,t[e])},create(t){const e=Jt.get(t)||Jt.get(Wt);if(!e)throw Error("Unknown tags class");return new e},setDefault(t){Wt=t},getDefault:()=>Yt.create(Wt)};class Qt{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 Zt{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 te(t){return void 0===t||t}class ee{constructor(t,e){this._name=t,this._parser=e,de.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?te(r(t,s)):null}set parser(t){this._parser=t}get parser(){return this._parser}}class re extends ee{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 se extends ee{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 ne extends se{constructor(t,e,r){super(t,e);for(const t of Object.keys(r)){const e=r[t],[s,n]="string"==typeof e?[e,null]:e,i=new Qt(t,s,n);this.add(t,i)}}}class ie extends ne{parse([t,e]){return super.parse([t,"\\"+e])}}class ae extends se{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,n;Array.isArray(r)?(e=s(r[0]),n=r.slice(1)):(e=s(r),n=[]);const i=new Zt(t,e,n);this.add(t,i)}}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?te(s(t,r.token,...r.args)):null}}class oe extends ae{parse([t,e]){const r=this.lookup(e),s=this.parserFor(e);if(!r||!s)return null;const n=t.currentCS;t.currentCS="\\"+e;const i=s(t,"\\"+r.token,...r.args);return t.currentCS=n,te(i)}}class ce extends ae{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?te(this.parser(t,r.token,s,r.args)):null}}const le=MathJax._.util.PrioritizedList.PrioritizedList,he=MathJax._.util.FunctionList.FunctionList,me=new Map,de={register(t){me.set(t.name,t)},getMap:t=>me.get(t)};class ue{constructor(){this._configuration=new le,this._fallback=new he}add(t,e,r=le.DEFAULTPRIORITY){for(const e of t.slice().reverse()){const t=de.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===ue.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 ne&&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)}}ue.FALLBACK=Symbol("fallback");class ge{constructor(){this.map=new Map}add(t,e,r=le.DEFAULTPRIORITY){for(const s of Object.keys(t)){const n=s;let i=this.get(n);i||(i=new ue,this.set(n,i)),i.add(t[n],e[n],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 pe{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:le.DEFAULTPRIORITY,n=e.init?this.makeProcessor(e.init,s):null,i=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 pe(t,e[At.HANDLER]||{},e[At.FALLBACK]||{},e[At.ITEMS]||{},e[At.TAGS]||{},e[At.OPTIONS]||{},e[At.NODES]||{},a,o,n,i,s,c)}static create(t,e={}){const r=pe._create(t,e);return be.set(t,r),r}static local(t={}){return pe._create("",t)}constructor(t,e={},r={},s={},n={},i={},a={},o=[],c=[],l=null,h=null,m,d){this.name=t,this.handler=e,this.fallback=r,this.items=s,this.tags=n,this.options=i,this.nodes=a,this.preprocessors=o,this.postprocessors=c,this.initMethod=l,this.configMethod=h,this.priority=m,this.parser=d,this.handler=Object.assign({[yt.CHARACTER]:[],[yt.DELIMITER]:[],[yt.MACRO]:[],[yt.ENVIRONMENT]:[]},e)}get init(){return this.initMethod?this.initMethod[0]:null}get config(){return this.configMethod?this.configMethod[0]:null}}const fe=new Map,be={set(t,e){fe.set(t,e)},get:t=>fe.get(t),keys:()=>fe.keys()};class Ae{constructor(t,e=["tex"]){this.initMethod=new he,this.configMethod=new he,this.configurations=new le,this.parsers=[],this.handlers=new ge,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 n=e.parseOptions;n.nodeFactory.setCreators(s.nodes);for(const t of Object.keys(s.items))n.itemFactory.setNodeClass(t,s.items[t]);Yt.addTags(s.tags),X(n.options,s.options),$(n.options,r),this.addFilters(e,s),s.config&&s.config(this,e)}getPackage(t){const e=be.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),X(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 ye=MathJax._.util.Styles,ve=ye.TRBL;ye.WSC,ye.Styles;class ke extends Tt{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 we extends Tt{get kind(){return"stop"}get isClose(){return!0}}class Me extends Tt{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)}}Me.errors=Object.assign(Object.create(Tt.errors),{stop:["ExtraOpenMissingClose","Extra open brace or missing close brace"]});class xe extends Tt{get kind(){return"close"}get isClose(){return!0}}class Pe extends Tt{get kind(){return"null"}}class Te extends Tt{get kind(){return"prime"}checkItem(t){const[e,r]=this.Peek(2),s=(ht.isType(e,"msubsup")||ht.isType(e,"msup"))&&!ht.getChildAt(e,e.sup),n=(ht.isType(e,"munderover")||ht.isType(e,"mover"))&&!ht.getChildAt(e,e.over)&&!ht.getProperty(e,"subsupOK");if(!s&&!n){return[[this.create("node",e.getProperty("movesupsub")?"mover":"msup",[e,r]),t],!0]}const i=s?e.sup:e.over;return ht.setChild(e,i,r),[[e,t],!0]}}class Ce extends Tt{get kind(){return"subsup"}checkItem(t){if(t.isKind("open")||t.isKind("left"))return Tt.success;const e=this.First,r=this.getProperty("position");if(t.isKind("mml")){if(this.getProperty("primes"))if(2!==r)ht.setChild(e,2,this.getProperty("primes"));else{ht.setProperty(this.getProperty("primes"),"variantForm",!0);const e=this.create("node","mrow",[this.getProperty("primes"),t.First]);t.First=e}ht.setChild(e,r,t.First),null!=this.getProperty("movesupsub")&&ht.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 xt(s[0],s[1],...s.splice(2))}}Ce.errors=Object.assign(Object.create(Tt.errors),{stop:["MissingScript","Missing superscript or subscript argument"],sup:["MissingOpenForSup","Missing open brace for superscript"],sub:["MissingOpenForSub","Missing open brace for subscript"]});class Ee extends Tt{constructor(t){super(t),this.setProperty("name","\\over")}get kind(){return"over"}get isClose(){return!0}checkItem(t){if(t.isKind("over"))throw new xt("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")&&ht.setAttribute(e,"linethickness",this.getProperty("thickness")),(this.getProperty("ldelim")||this.getProperty("rdelim"))&&(ht.setProperty(e,"withDelims",!0),e=qt.fixedFence(this.factory.configuration,this.getProperty("ldelim"),e,this.getProperty("rdelim"))),e.attributes.set(mt.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 Se extends Tt{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=qt.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],n=this.factory.create("mml",e);return this.addLatexItem(r,"\\left"),t.addLatexItem(s,"\\right"),n.Peek()[0].attributes.set(mt.Attr.LATEXITEM,"\\left"+t.startStr.slice(this.startI,t.stopI)),[[n],!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:it.CLOSE}),r,this.create("node","TeXAtom",[],{texClass:it.OPEN})),this.env={},[[this],!0]}return super.checkItem(t)}}Se.errors=Object.assign(Object.create(Tt.errors),{stop:["ExtraLeftMissingRight","Extra \\left or missing \\right"]});class Oe extends Tt{constructor(t,e,r){super(t),this.setProperty("delim",e),r&&this.setProperty("color",r)}get kind(){return"middle"}get isClose(){return!0}}class Ie extends Tt{constructor(t,e,r){super(t),this.setProperty("delim",e),r&&this.setProperty("color",r)}get kind(){return"right"}get isClose(){return!0}}class Ne extends Tt{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 n=t.First;if(n.isKind("mo")){if("after"!==((null===(r=null===(e=ht.getOp(n))||void 0===e?void 0:e[3])||void 0===r?void 0:r.linebreakstyle)||ht.getAttribute(n,"linebreakstyle")))return ht.setAttribute(n,"linebreak",s),[[t],!0];if(!this.getProperty("insert"))return[[t],!0]}}const n=this.create("token","mspace",{linebreak:s});return[[this.factory.create("mml",n),t],!0]}}class Le extends Tt{get kind(){return"begin"}get isOpen(){return!0}checkItem(t){if(t.isKind("end")){if(t.getName()!==this.getName())throw new xt("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 xt("EnvMissingEnd","Missing \\end{%1}",this.getName());return super.checkItem(t)}}class Fe extends Tt{get kind(){return"end"}get isClose(){return!0}}class Re extends Tt{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 De extends Tt{get kind(){return"position"}checkItem(t){if(t.isClose)throw new xt("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 Be extends Tt{get kind(){return"cell"}get isClose(){return!0}}class Ge extends Tt{get isFinal(){return!0}get kind(){return"mml"}}class qe extends Tt{get kind(){return"fn"}checkItem(t){const e=this.First;if(e){if(t.isOpen)return Tt.success;if(!t.isKind("fn")){let r=t.First;if(!t.isKind("mml")||!r)return[[e,t],!0];if(ht.isType(r,"mstyle")&&r.childNodes.length&&ht.isType(r.childNodes[0].childNodes[0],"mspace")||ht.isType(r,"mspace"))return[[e,t],!0];ht.isEmbellished(r)&&(r=ht.getCoreMO(r));const s=ht.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:it.NONE},Ft.ApplyFunction),t],!0]}return super.checkItem(t)}}class _e extends Tt{constructor(){super(...arguments),this.remap=de.getMap("not_remap")}get kind(){return"not"}checkItem(t){let e,r,s;if(t.isKind("open")||t.isKind("left"))return Tt.success;if(t.isKind("mml")&&(ht.isType(t.First,"mo")||ht.isType(t.First,"mi")||ht.isType(t.First,"mtext"))&&(e=t.First,r=ht.getText(e),1===r.length&&!ht.getProperty(e,"movesupsub")&&1===ht.getChildren(e).length))return this.remap.contains(r)?(s=this.create("text",this.remap.lookup(r).char),ht.setChild(e,0,s)):(s=this.create("text","\u0338"),ht.appendChildren(e,[s])),[[t],!0];s=this.create("text","\u29f8");const n=this.create("node","mtext",[],{},s),i=this.create("node","mpadded",[n],{width:0});return e=this.create("node","TeXAtom",[i],{texClass:it.REL}),[[e,t],!0]}}class He extends Tt{get kind(){return"nonscript"}checkItem(t){if(t.isKind("mml")&&1===t.Size()){let e=t.First;if(e.isKind("mstyle")&&e.notParent&&(e=ht.getChildren(ht.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 je extends Tt{get kind(){return"dots"}checkItem(t){if(t.isKind("open")||t.isKind("left"))return Tt.success;let e=this.getProperty("ldots");const r=t.First;if(t.isKind("mml")&&ht.isEmbellished(r)){const t=ht.getTexClass(ht.getCoreMO(r));t!==it.BIN&&t!==it.REL||(e=this.getProperty("cdots"))}return[[e,t],!0]}}class Ue extends Tt{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(),Tt.fail;if(t.getProperty("isCR"))return this.EndEntry(),this.EndRow(),this.clearEnv(),this.StartEntry(),Tt.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 xt("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&&ht.setAttribute(e,"data-break-align",this.breakAlign.table),this.getProperty("arrayPadding")&&(ht.setAttribute(e,"data-frame-styles",""),ht.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=qt.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 ht.setAttribute(t,"frame",r),ht.removeAttribute(t,"data-frame-styles"),t;if("solid"===r)return ht.setAttribute(t,"data-frame-styles",""),t=this.create("node","menclose",[t],{notation:Array.from(e.keys()).join(" "),"data-padding":0})}const s=ve.map((t=>e.get(t)||"none")).join(" ");return ht.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],n=this.cextra;if(!(e||r||s||n[t]||n[t+1]))return;let[i,a,o,c]=this.getEntry();if(!n[t]||this.atEnd&&!n[t+1]||(e+="&"),"&"!==o&&(c=!!a.trim()||!!(t||o&&"\\end"!==o.substring(0,4)),n[t+1]&&!n[t]&&(r=(r||"")+"&",this.atEnd=!0)),!c&&!i)return;const l=this.parser;if(c&&(e&&(a=qt.addArgs(l,e,a)),r&&(a=qt.addArgs(l,a,r)),s&&(a="\\text{"+a.trim()+"}"),(e||r||s)&&++this.templateSubs>l.configuration.options.maxTemplateSubtitutions))throw new xt("MaxTemplateSubs","Maximum template substitutions exceeded; is there an invalid use of \\\\ in the template?");i&&(a=qt.addArgs(l,i,a)),l.string=qt.addArgs(l,a,l.string),l.i=0}getEntry(){const t=this.parser,e=/^([^]*?)([&{}]|\\\\|\\(?:begin|end)\s*\{array\}|\\cr|\\)/;let r,s=0,n=0,i=t.i;const a=["","","",!1];for(;null!==(r=t.string.slice(i).match(e));)switch(i+=r[0].length,r[2]){case"\\":i++;break;case"{":s++;break;case"}":if(!s)return a;s--;break;case"\\begin{array}":s||n++;break;case"\\end{array}":if(!s&&n){n--;break}default:{if(s||n)continue;i-=r[2].length;let e=t.string.slice(t.i,i).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(i),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]&&ht.setAttribute(t,"columnalign","right"),this.hfill[this.hfill.length-1]===this.Size()&&ht.setAttribute(t,"columnalign",ht.getAttribute(t,"columnalign")?"center":"left"));const e=this.ralign[this.row.length];if(e){const[r,s,n]=e,i=this.create("node","mpadded",t.childNodes[0].childNodes,{width:s,"data-overflow":"auto","data-align":n,"data-vertical-align":r});i.setProperty("vbox",r),t.childNodes[0].childNodes=[],t.appendChild(i)}else this.breakAlign.cell&&ht.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&&(ht.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=kt.dimen2em(e[0]);this.setProperty("rowspacing",t)}const r=this.getProperty("rowspacing");for(;e.length<this.table.length;)e.push(kt.em(r));e[this.table.length-1]=kt.em(Math.max(0,r+kt.dimen2em(t))),this.arraydef.rowspacing=e.join(" ")}}}class Ke extends Ue{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")&&qt.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 ze extends Le{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 Xe extends Tt{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 xt("EnvMissingEnd","Missing \\end{%1}",this.getName());return super.checkItem(t)}}const $e=MathJax._.util.lengths,Ve=($e.BIGDIMEN,$e.UNITS,$e.RELUNITS,$e.MATHSPACE),Je=($e.length2em,$e.percent,$e.em),We=($e.px,1.2/.85),Ye={fontfamily:1,fontsize:1,fontweight:1,fontstyle:1,color:1,background:1,id:1,class:1,href:1,style:1};function Qe(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 xt("BadBreakAlign","Invalid alignment character: %1",t);return e}));if(r.length>e)throw new xt("TooManyAligns","Too many alignment characters: %1",t);return 1===e?r[0]:r.join(" ")}function Ze(t,e){const r=t.stack.env,s=r.inRoot;r.inRoot=!0;const n=new Ct(e,r,t.configuration);let i=n.mml();const a=n.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),i=t.create("node","mpadded",[i],e)}return r.inRoot=s,i}const tr={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:it.ORD},e))},Tilde(t,e){t.Push(t.create("token","mtext",{},Ft.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 n=t.stack.Top();n.isKind("prime")?([s,r]=n.Peek(2),t.stack.Pop()):(s=t.stack.Prev(),s||(s=t.create("token","mi",{},"")));const i=ht.getProperty(s,"movesupsub");let a=ht.isType(s,"msubsup")?s.sup:s.over;if(ht.isType(s,"msubsup")&&!ht.isType(s,"msup")&&ht.getChildAt(s,s.sup)||ht.isType(s,"munderover")&&!ht.isType(s,"mover")&&ht.getChildAt(s,s.over)&&!ht.getProperty(s,"subsupOK"))throw new xt("DoubleExponent","Double exponent: use braces to clarify");ht.isType(s,"msubsup")&&!ht.isType(s,"msup")||(i?((!ht.isType(s,"munderover")||ht.isType(s,"mover")||ht.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:i}))},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 n=t.stack.Top();n.isKind("prime")?([s,r]=n.Peek(2),t.stack.Pop()):(s=t.stack.Prev(),s||(s=t.create("token","mi",{},"")));const i=ht.getProperty(s,"movesupsub");let a=ht.isType(s,"msubsup")?s.sub:s.under;if(ht.isType(s,"msubsup")&&!ht.isType(s,"msup")&&ht.getChildAt(s,s.sub)||ht.isType(s,"munderover")&&!ht.isType(s,"mover")&&ht.getChildAt(s,s.under)&&!ht.getProperty(s,"subsupOK"))throw new xt("DoubleSubscripts","Double subscripts: use braces to clarify");ht.isType(s,"msubsup")&&!ht.isType(s,"msup")||(i?((!ht.isType(s,"munderover")||ht.isType(s,"mover")||ht.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:i}))},Prime(t,e){let r=t.stack.Prev();if(r||(r=t.create("token","mi")),ht.isType(r,"msubsup")&&!ht.isType(r,"msup")&&ht.getChildAt(r,r.sup)||ht.isType(r,"munderover")&&!ht.isType(r,"mover")&&ht.getChildAt(r,r.over)&&!ht.getProperty(r,"subsupOK"))throw new xt("DoubleExponentPrime","Prime causes double exponent: use braces to clarify");let s="";t.i--;do{s+=Ft.prime,t.i++,e=t.GetNext()}while("'"===e||e===Ft.rsquo);s=["","\u2032","\u2033","\u2034","\u2057"][s.length]||s;const n=t.create("token","mo",{variantForm:!0},s);t.Push(t.itemFactory.create("prime",r,n))},Comment(t,e){for(;t.i<t.string.length&&"\n"!==t.string.charAt(t.i);)t.i++},Hash(t,e){throw new xt("CantUseHash1","You can't use 'macro parameter character #' in math mode")},MathFont(t,e,r,s=""){const n=t.GetArgument(e),i=new Ct(n,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",[i]))},SetFont(t,e,r){t.stack.env.font=r,t.Push(t.itemFactory.create("null"))},SetStyle(t,e,r,s,n){t.stack.env.style=r,t.stack.env.level=n,t.Push(t.itemFactory.create("style").setProperty("styles",{displaystyle:s,scriptlevel:n}))},SetSize(t,e,r){t.stack.env.size=r,t.Push(t.itemFactory.create("style").setProperty("styles",{mathsize:Je(r)}))},Spacer(t,e,r){const s=t.create("node","mspace",[],{width:Je(r)}),n=t.create("node","mstyle",[s],{scriptlevel:0});t.Push(n)},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:mt.LineBreak.NEWLINE}))},Linebreak(t,e,r){let s=!0;const n=t.stack.Prev(!0);if(n&&n.isKind("mo")){ht.getMoAttribute(n,"linebreakstyle")!==mt.LineBreakStyle.BEFORE&&(n.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:it.OP},r);t.Push(t.itemFactory.create("fn",s))},NamedOp(t,e,r){r||(r=e.substring(1)),r=r.replace(/&thinsp;/,"\u2006");const s=t.create("token","mo",{movablelimits:!0,movesupsub:!0,form:mt.Form.PREFIX,texClass:it.OP},r);t.Push(s)},Limits(t,e,r){let s=t.stack.Prev(!0);if(!s||ht.getTexClass(ht.getCoreMO(s))!==it.OP&&null==ht.getProperty(s,"movesupsub"))throw new xt("MisplacedLimits","%1 is allowed only on operators",t.currentCS);const n=t.stack.Top();let i;ht.isType(s,"munderover")&&!r?(i=t.create("node","msubsup"),ht.copyChildren(s,i),s=n.Last=i):ht.isType(s,"msubsup")&&r&&(i=t.create("node","munderover"),ht.copyChildren(s,i),s=n.Last=i),ht.setProperty(s,"movesupsub",!!r),ht.setProperties(ht.getCoreMO(s),{movablelimits:!1}),((ht.isType(s,"mo")?ht.getMoAttribute(s,"movableLimits"):ht.getAttribute(s,"movablelimits"))||ht.getProperty(s,"movablelimits"))&&ht.setProperties(s,{movablelimits:!1})},Over(t,e,r,s){const n=t.itemFactory.create("over").setProperty("name",t.currentCS);r||s?(n.setProperty("ldelim",r),n.setProperty("rdelim",s)):e.match(/withdelims$/)&&(n.setProperty("ldelim",t.GetDelimiter(e)),n.setProperty("rdelim",t.GetDelimiter(e))),e.match(/^\\above/)?n.setProperty("thickness",t.GetDimen(e)):(e.match(/^\\atop/)||r||s)&&n.setProperty("thickness",0),t.Push(n)},Frac(t,e){const r=t.ParseArg(e),s=t.ParseArg(e),n=t.create("node","mfrac",[r,s]);t.Push(n)},Sqrt(t,e){const r=t.GetBrackets(e);let s=t.GetArgument(e);"\\frac"===s&&(s+="{"+t.GetArgument(s)+"}{"+t.GetArgument(s)+"}");let n=new Ct(s,t.stack.env,t.configuration).mml();n=r?t.create("node","mroot",[n,Ze(t,r)]):t.create("node","msqrt",[n]),t.Push(n)},Root(t,e){const r=t.GetUpTo(e,"\\of"),s=t.ParseArg(e),n=t.create("node","mroot",[s,Ze(t,r)]);t.Push(n)},MoveRoot(t,e,r){if(!t.stack.env.inRoot)throw new xt("MisplacedMoveRoot","%1 can appear only within a root",t.currentCS);if(t.stack.global[r])throw new xt("MultipleMoveRoot","Multiple use of %1",t.currentCS);let s=t.GetArgument(e);if(!s.match(/-?[0-9]+/))throw new xt("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 n=t.ParseArg(e),i=Object.assign(Object.assign({},qt.getFontDef(t)),{accent:!0,mathaccent:void 0===s||s}),a=ht.createEntity(r),o=t.create("token","mo",i,a);ht.setAttribute(o,"stretchy",!!s);const c=ht.isEmbellished(n)?ht.getCoreMO(n):n;(ht.isType(c,"mo")||ht.getProperty(c,"movablelimits"))&&ht.setProperties(c,{movablelimits:!1});const l=t.create("node","munderover");ht.setChild(l,0,n),ht.setChild(l,1,null),ht.setChild(l,2,o);const h=t.create("node","TeXAtom",[l]);t.Push(h)},UnderOver(t,e,r,s){const n=ht.createEntity(r),i=t.create("token","mo",{stretchy:!0,accent:!0},n);n.match(ct.mathaccentsWithWidth)&&i.setProperty("mathaccent",!1);const a="o"===e.charAt(1)?"over":"under",o=t.ParseArg(e);t.Push(qt.underOver(t,o,i,a,s))},Overset(t,e){const r=t.ParseArg(e),s=t.ParseArg(e),n=r.coreMO(),i=n.isKind("mo")&&!0===ht.getMoAttribute(n,"accent");qt.checkMovableLimits(s);const a=t.create("node","mover",[s,r],{accent:i});t.Push(a)},Underset(t,e){const r=t.ParseArg(e),s=t.ParseArg(e),n=r.coreMO(),i=n.isKind("mo")&&!0===ht.getMoAttribute(n,"accent");qt.checkMovableLimits(s);const a=t.create("node","munder",[s,r],{accentunder:i});t.Push(a)},Overunderset(t,e){const r=t.ParseArg(e),s=t.ParseArg(e),n=t.ParseArg(e),i=r.coreMO(),a=s.coreMO(),o=i.isKind("mo")&&!0===ht.getMoAttribute(i,"accent"),c=a.isKind("mo")&&!0===ht.getMoAttribute(a,"accent");qt.checkMovableLimits(n);const l=t.create("node","munderover",[n,s,r],{accent:o,accentunder:c});t.Push(l)},TeXAtom(t,e,r){const s={texClass:r};let n,i;if(r===it.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=mt.Variant.NORMAL,i=t.create("token","mi",s,a[1]);else{const e=new Ct(r,t.stack.env,t.configuration).mml();i=t.create("node","TeXAtom",[e],s)}n=t.itemFactory.create("fn",i)}else n=t.create("node","TeXAtom",[t.ParseArg(e)],s);t.Push(n)},VBox(t,e,r){const s=new Ct(t.GetArgument(e),t.stack.env,t.configuration),n={"data-vertical-align":r,texClass:it.ORD};s.stack.env.hsize&&(n.width=s.stack.env.hsize,n["data-overflow"]="linebreak");const i=t.create("node","mpadded",[s.mml()],n);i.setProperty("vbox",r),t.Push(i)},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),n=qt.internalMath(t,t.GetArgument(e)),i=Qe(r,1),a=t.create("node","mpadded",n,{width:s,"data-overflow":"linebreak","data-vertical-align":i});a.setProperty("vbox",i),t.Push(a)},BreakAlign(t,e){const r=t.stack.Top();if(!(r instanceof Ue))throw new xt("BreakNotInArray","%1 must be used in an alignment environment",t.currentCS);switch(t.GetArgument(e).trim()){case"c":if(r.First)throw new xt("BreakFirstInEntry","%1 must be at the beginning of an alignment entry",t.currentCS+"{c}");r.breakAlign.cell=Qe(t.GetArgument(e),1);break;case"r":if(r.row.length||r.First)throw new xt("BreakFirstInRow","%1 must be at the beginning of an alignment row",t.currentCS+"{r}");r.breakAlign.row=Qe(t.GetArgument(e));break;case"t":if(r.table.length||r.row.length||r.First)throw new xt("BreakFirstInTable","%1 must be at the beginning of an alignment",t.currentCS+"{t}");r.breakAlign.table=Qe(t.GetArgument(e));break;default:throw new xt("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 n=t.GetArgument(e),i={},a=[];let o;try{o=t.create("node",r)}catch(t){o=null}if(!o||!o.isToken)throw new xt("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 xt("InvalidMathMLAttr","Invalid MathML attribute: %1",s.split(/[\s\n=]/)[0]);if(!o.attributes.hasDefault(e[1])&&!Ye[e[1]])throw new xt("UnknownAttrForElement","%1 is not a recognized attribute for %2",e[1],r);let n=qt.mmlFilterAttribute(t,e[1],e[2].replace(/^(['"])(.*)\1$/,"$2"));n&&("true"===n.toLowerCase()?n=!0:"false"===n.toLowerCase()&&(n=!1),i[e[1]]=n,a.push(e[1])),s=s.substring(e[0].length)}a.length&&o.setProperty("keep-attrs",a.join(" "));const c=t.create("text",tt(n));o.appendChild(c),ht.setProperties(o,i),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 n=t.create("node","mphantom",[t.ParseArg(e)]);(r||s)&&(n=t.create("node","mpadded",[n]),s&&(ht.setAttribute(n,"height",0),ht.setAttribute(n,"depth",0)),r&&ht.setAttribute(n,"width",0));const i=t.create("node","TeXAtom",[n]);t.Push(i)},Smash(t,e){const r=kt.trimSpaces(t.GetBrackets(e,"")),s=t.create("node","mpadded",[t.ParseArg(e)]);switch(r){case"b":ht.setAttribute(s,"depth",0);break;case"t":ht.setAttribute(s,"height",0);break;default:ht.setAttribute(s,"height",0),ht.setAttribute(s,"depth",0)}const n=t.create("node","TeXAtom",[s]);t.Push(n)},Lap(t,e){const r=t.create("node","mpadded",[t.ParseArg(e)],{width:0});"\\llap"===e&&ht.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&&ht.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 n=t.create("node","mspace",[],s);t.Push(n)},rule(t,e){const r=t.GetBrackets(e),s=t.GetDimen(e),n=t.GetDimen(e);let i=t.create("node","mspace",[],{width:s,height:n,mathbackground:t.stack.env.color||"black"});r&&(i=t.create("node","mpadded",[i],{voffset:r}),r.match(/^-/)?(ht.setAttribute(i,"height",r),ht.setAttribute(i,"depth","+"+r.substring(1))):ht.setAttribute(i,"height","+"+r)),t.Push(i)},MakeBig(t,e,r,s){const n=String(s*=We).replace(/(\.\d\d\d).+/,"$1")+"em",i=t.GetDelimiter(e,!0),a=t.create("token","mo",{minsize:n,maxsize:n,fence:!0,stretchy:!0,symmetric:!0},i),o=t.create("node","TeXAtom",[a],{texClass:r});t.Push(o)},BuildRel(t,e){const r=t.ParseUpTo(e,"\\over"),s=t.ParseArg(e),n=t.create("node","munderover");ht.setChild(n,0,s),ht.setChild(n,1,null),ht.setChild(n,2,r);const i=t.create("node","TeXAtom",[n],{texClass:it.REL});t.Push(i)},HBox(t,e,r,s){t.PushAll(qt.internalMath(t,t.GetArgument(e),r,s))},FBox(t,e){const r=qt.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 n=qt.internalMath(t,t.GetArgument(e));r&&(n=[t.create("node","mpadded",n,{width:r,"data-align":J(s,{l:"left",r:"right"},"center")})]);const i=t.create("node","TeXAtom",[t.create("node","menclose",n,{notation:"box"})],{texClass:it.ORD});t.Push(i)},MakeBox(t,e){const r=t.GetBrackets(e),s=t.GetBrackets(e,"c"),n=t.create("node","mpadded",qt.internalMath(t,t.GetArgument(e)));r&&ht.setAttribute(n,"width",r);const i=J(s.toLowerCase(),{c:"center",r:"right"},"");i&&ht.setAttribute(n,"data-align",i),s.toLowerCase()!==s&&ht.setAttribute(n,"data-overflow","linebreak"),t.Push(n)},Not(t,e){t.Push(t.itemFactory.create("not"))},Dots(t,e){const r=ht.createEntity("2026"),s=ht.createEntity("22EF"),n=t.create("token","mo",{stretchy:!1},r),i=t.create("token","mo",{stretchy:!1},s);t.Push(t.itemFactory.create("dots").setProperties({ldots:n,cdots:i}))},Matrix(t,e,r,s,n,i,a,o,c,l){const h=t.GetNext();if(""===h)throw new xt("MissingArgFor","Missing argument for %1",t.currentCS);"{"===h?t.i++:(t.string=h+"}"+t.string.slice(t.i+1),t.i=0);const m=t.itemFactory.create("array").setProperty("requireClose",!0);!r&&n||m.setProperty("arrayPadding",".2em .125em"),m.arraydef={rowspacing:a||"4pt",columnspacing:i||"1em"},c&&m.setProperty("isCases",!0),l&&(m.setProperty("isNumbered",!0),m.arraydef.side=l),(r||s)&&(m.setProperty("open",r),m.setProperty("close",s)),"D"===o&&(m.arraydef.displaystyle=!0),null!=n&&(m.arraydef.columnalign=n),t.Push(m)},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 n=t.string;let i=0,a=-1,o=t.i,c=n.length;const l=s?new RegExp(`^\\\\end\\s*\\{${s.replace(/\*/,"\\*")}\\}`):null;for(;o<c;){const e=n.charAt(o);if("{"===e)i++,o++;else if("}"===e)0===i?c=0:(i--,0===i&&a<0&&(a=o-t.i),o++);else{if("&"===e&&0===i)throw new xt("ExtraAlignTab","Extra alignment tab in \\cases text");if("\\"===e){const t=n.substring(o);t.match(/^((\\cr)[^a-zA-Z]|\\\\)/)||l&&t.match(l)?c=0:o+=2}else o++}}const h=n.substring(t.i,o);if(!h.match(/^\s*\\text[^a-zA-Z]/)||a!==h.replace(/\s+$/,"").length-1){const e=qt.internalMath(t,kt.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,""),[n,i]=kt.matchDimen(r);if(r&&!n)throw new xt("BracketMustBeDimension","Bracket argument to %1 must be a dimension",t.currentCS);s=n+i}t.Push(t.itemFactory.create("cell").setProperties({isCR:!0,name:e,linebreak:!0}));const n=t.stack.Top();let i;n instanceof Ue?s&&n.addRowSpacing(s):(i=t.create("node","mspace",[],{linebreak:mt.LineBreak.NEWLINE}),s&&ht.setAttribute(i,"data-lineleading",s),t.Push(i))},HLine(t,e,r){null==r&&(r="solid");const s=t.stack.Top();if(!(s instanceof Ue)||s.Size())throw new xt("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 Ue))throw new xt("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"),n=t.GetArgument(e);if(1!==r.length)throw new xt("BadColumnName","Column specifier must be exactly one character: %1",r);if(!s.match(/^\d+$/))throw new xt("PositiveIntegerArg","Argument to %1 must be a positive integer",s);const i=t.configuration.columnParser;i.columnHandler[r]=t=>i.macroColumn(t,n,parseInt(s)),t.Push(t.itemFactory.create("null"))},BeginEnd(t,e){const r=t.GetArgument(e);if(r.match(/\\/))throw new xt("InvalidEnv","Invalid environment name '%1'",r);const s=t.configuration.handlers.get(yt.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}qt.checkMaxMacros(t,!1),t.parse(yt.ENVIRONMENT,[t,r])},Array(t,e,r,s,n,i,a,o,c){n||(n=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:i||"1em",rowspacing:a||"4pt"},t.configuration.columnParser.process(t,n,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()+"}"),n=tr.Array(t,e,null,null,null,null,null,r);return qt.setArrayAlign(n,s)},IndentAlign(t,e){const r=`\\begin{${e.getName()}}`,s=t.GetBrackets(r,""),n=t.GetBrackets(r,""),i=t.GetBrackets(r,"");if(s&&!kt.matchDimen(s)[0]||n&&!kt.matchDimen(n)[0]||i&&!kt.matchDimen(i)[0])throw new xt("BracketMustBeDimension","Bracket argument to %1 must be a dimension",r);const a=t.GetArgument(r);if(a&&!a.match(/^([lcr]{1,3})?$/))throw new xt("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",n||s],["indentshiftlast",i],["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,qt.checkEqnEnv(t),t.Push(e),t.itemFactory.create("equation",r).setProperty("name",e.getName())),EqnArray(t,e,r,s,n,i,a){const o=e.getName(),c="gather"===o||"gather*"===o;s&&qt.checkEqnEnv(t,!c),t.Push(e),n=(n=n.replace(/[^clr]/g,"").split("").join(" ")).replace(/l/g,"left").replace(/r/g,"right").replace(/c/g,"center"),i=Qe(i);const l=t.itemFactory.create("eqnarray",o,r,s,t.stack.global);return l.arraydef={displaystyle:!0,columnalign:n,columnspacing:a||"1em",rowspacing:"3pt","data-break-align":i,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 xt("MultipleCommand","Multiple %1",t.currentCS);if(t.tags.label=r,(t.tags.allLabels[r]||t.tags.labels[r])&&!t.options.ignoreDuplicateLabels)throw new xt("MultipleLabel","Label '%1' multiply defined",r);t.tags.labels[r]=new Kt}},HandleRef(t,e,r){const s=t.GetArgument(e);let n=t.tags.allLabels[s]||t.tags.labels[s];n||(t.tags.refUpdate||(t.tags.redo=!0),n=new Kt);let i=n.tag;r&&(i=t.tags.formatRef(i));const a=t.create("node","mrow",qt.internalMath(t,Array.isArray(i)?i.join(""):i),{href:t.tags.formatUrl(n.id,t.options.baseURL),class:"MathJax_ref"});t.Push(a)},Macro(t,e,r,s,n){if(s){const i=[];if(null!=n){const r=t.GetBrackets(e);i.push(null==r?n:r)}for(let r=i.length;r<s;r++)i.push(t.GetArgument(e));r=qt.substituteArgs(t,i,r)}t.string=qt.addArgs(t,r,t.string.slice(t.i)),t.i=0,qt.checkMaxMacros(t)},MathChoice(t,e){const r=t.ParseArg(e),s=t.ParseArg(e),n=t.ParseArg(e),i=t.ParseArg(e);t.Push(t.create("node","MathChoice",[r,s,n,i]))}},er=tr,rr=mt.Variant,sr={variable(t,e){var r;const s=qt.getFontDef(t),n=t.stack.env;if(n.multiLetterIdentifiers&&""!==n.font&&(e=(null===(r=t.string.substring(t.i-1).match(n.multiLetterIdentifiers))||void 0===r?void 0:r[0])||e,t.i+=e.length-1,s.mathvariant===rr.NORMAL&&n.noAutoOP&&e.length>1&&(s.autoOP=!1)),!s.mathvariant&&qt.isLatinOrGreekChar(e)){const r=t.configuration.mathStyle(e);r&&(s.mathvariant=r)}const i=t.create("token","mi",s,e);t.Push(i)},digit(t,e){const r=t.configuration.options.numberPattern,s=t.string.slice(t.i-1).match(r);if(!s)return!1;const n=qt.getFontDef(t),i=t.create("token","mn",n,s[0].replace(/[{}]/g,""));return t.i+=s[0].length-1,t.Push(i),!0},controlSequence(t,e){const r=t.GetCS();t.parse(yt.MACRO,[t,r])},lcGreek(t,e){const r={mathvariant:t.configuration.mathStyle(e.char)||rr.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)||rr.NORMAL},s=t.create("token","mi",r,e.char);t.Push(s)},mathchar0mi(t,e){const r=e.attributes||{mathvariant:rr.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);ht.setProperty(s,"fixStretchy",!0),t.configuration.addNode("fixStretchy",s),t.Push(s)},mathchar7(t,e){const r=e.attributes||{mathvariant:rr.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 n=t.itemFactory.create("begin").setProperty("name",e);t.Push(r(t,n,...s.slice(1)))}},nr=sr,ir=Je(Ve.thickmathspace),ar=mt.Variant;new re("letter",nr.variable,/[a-z]/i),new re("digit",nr.digit,/[0-9.,]/),new re("command",nr.controlSequence,/^\\/),new ae("special",{"{":er.Open,"}":er.Close,"~":er.Tilde,"^":er.Superscript,_:er.Subscript,"|":er.Bar," ":er.Space,"\t":er.Space,"\r":er.Space,"\n":er.Space,"'":er.Prime,"%":er.Comment,"&":er.Entry,"#":er.Hash,"\xa0":er.Space,"\u2019":er.Prime}),new ne("lcGreek",nr.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 ne("ucGreek",nr.ucGreek,{Gamma:"\u0393",Delta:"\u0394",Theta:"\u0398",Lambda:"\u039b",Xi:"\u039e",Pi:"\u03a0",Sigma:"\u03a3",Upsilon:"\u03a5",Phi:"\u03a6",Psi:"\u03a8",Omega:"\u03a9"}),new ne("mathchar0mi",nr.mathchar0mi,{AA:"\u212b",S:["\xa7",{mathvariant:ar.NORMAL}],aleph:["\u2135",{mathvariant:ar.NORMAL}],hbar:["\u210f",{variantForm:!0}],imath:"\u0131",jmath:"\u0237",ell:"\u2113",wp:["\u2118",{mathvariant:ar.NORMAL}],Re:["\u211c",{mathvariant:ar.NORMAL}],Im:["\u2111",{mathvariant:ar.NORMAL}],partial:["\u2202",{mathvariant:ar.ITALIC}],infty:["\u221e",{mathvariant:ar.NORMAL}],prime:["\u2032",{variantForm:!0}],emptyset:["\u2205",{mathvariant:ar.NORMAL}],nabla:["\u2207",{mathvariant:ar.NORMAL}],top:["\u22a4",{mathvariant:ar.NORMAL}],bot:["\u22a5",{mathvariant:ar.NORMAL}],angle:["\u2220",{mathvariant:ar.NORMAL}],triangle:["\u25b3",{mathvariant:ar.NORMAL}],backslash:["\\",{mathvariant:ar.NORMAL}],forall:["\u2200",{mathvariant:ar.NORMAL}],exists:["\u2203",{mathvariant:ar.NORMAL}],neg:["\xac",{mathvariant:ar.NORMAL}],lnot:["\xac",{mathvariant:ar.NORMAL}],flat:["\u266d",{mathvariant:ar.NORMAL}],natural:["\u266e",{mathvariant:ar.NORMAL}],sharp:["\u266f",{mathvariant:ar.NORMAL}],clubsuit:["\u2663",{mathvariant:ar.NORMAL}],diamondsuit:["\u2662",{mathvariant:ar.NORMAL}],heartsuit:["\u2661",{mathvariant:ar.NORMAL}],spadesuit:["\u2660",{mathvariant:ar.NORMAL}]}),new ne("mathchar0mo",nr.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:it.PUNCT}],cdotp:["\u22c5",{texClass:it.PUNCT}],colon:[":",{texClass:it.PUNCT}]}),new ne("mathchar7",nr.mathchar7,{_:"_","#":"#",$:"$","%":"%","&":"&",And:"&"}),new ie("delimiter",nr.delimiter,{"(":"(",")":")","[":"[","]":"]","<":"\u27e8",">":"\u27e9","\\lt":"\u27e8","\\gt":"\u27e9","/":"/","|":["|",{texClass:it.ORD}],".":"","\\lmoustache":"\u23b0","\\rmoustache":"\u23b1","\\lgroup":"\u27ee","\\rgroup":"\u27ef","\\arrowvert":"\u23d0","\\Arrowvert":"\u2016","\\bracevert":"\u23aa","\\Vert":["\u2016",{texClass:it.ORD}],"\\|":["\u2016",{texClass:it.ORD}],"\\vert":["|",{texClass:it.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 oe("macros",{displaystyle:[er.SetStyle,"D",!0,0],textstyle:[er.SetStyle,"T",!1,0],scriptstyle:[er.SetStyle,"S",!1,1],scriptscriptstyle:[er.SetStyle,"SS",!1,2],rm:[er.SetFont,ar.NORMAL],mit:[er.SetFont,ar.ITALIC],oldstyle:[er.SetFont,ar.OLDSTYLE],cal:[er.SetFont,ar.CALLIGRAPHIC],it:[er.SetFont,ar.MATHITALIC],bf:[er.SetFont,ar.BOLD],sf:[er.SetFont,ar.SANSSERIF],tt:[er.SetFont,ar.MONOSPACE],frak:[er.MathFont,ar.FRAKTUR],Bbb:[er.MathFont,ar.DOUBLESTRUCK],mathrm:[er.MathFont,ar.NORMAL],mathup:[er.MathFont,ar.NORMAL],mathnormal:[er.MathFont,""],mathbf:[er.MathFont,ar.BOLD],mathbfup:[er.MathFont,ar.BOLD],mathit:[er.MathFont,ar.MATHITALIC],mathbfit:[er.MathFont,ar.BOLDITALIC],mathbb:[er.MathFont,ar.DOUBLESTRUCK],mathfrak:[er.MathFont,ar.FRAKTUR],mathbffrak:[er.MathFont,ar.BOLDFRAKTUR],mathscr:[er.MathFont,ar.SCRIPT],mathbfscr:[er.MathFont,ar.BOLDSCRIPT],mathsf:[er.MathFont,ar.SANSSERIF],mathsfup:[er.MathFont,ar.SANSSERIF],mathbfsf:[er.MathFont,ar.BOLDSANSSERIF],mathbfsfup:[er.MathFont,ar.BOLDSANSSERIF],mathsfit:[er.MathFont,ar.SANSSERIFITALIC],mathbfsfit:[er.MathFont,ar.SANSSERIFBOLDITALIC],mathtt:[er.MathFont,ar.MONOSPACE],mathcal:[er.MathFont,ar.CALLIGRAPHIC],mathbfcal:[er.MathFont,ar.BOLDCALLIGRAPHIC],symrm:[er.MathFont,ar.NORMAL],symup:[er.MathFont,ar.NORMAL],symnormal:[er.MathFont,""],symbf:[er.MathFont,ar.BOLD,ar.BOLDITALIC],symbfup:[er.MathFont,ar.BOLD],symit:[er.MathFont,ar.ITALIC],symbfit:[er.MathFont,ar.BOLDITALIC],symbb:[er.MathFont,ar.DOUBLESTRUCK],symfrak:[er.MathFont,ar.FRAKTUR],symbffrak:[er.MathFont,ar.BOLDFRAKTUR],symscr:[er.MathFont,ar.SCRIPT],symbfscr:[er.MathFont,ar.BOLDSCRIPT],symsf:[er.MathFont,ar.SANSSERIF,ar.SANSSERIFITALIC],symsfup:[er.MathFont,ar.SANSSERIF],symbfsf:[er.MathFont,ar.BOLDSANSSERIF],symbfsfup:[er.MathFont,ar.BOLDSANSSERIF],symsfit:[er.MathFont,ar.SANSSERIFITALIC],symbfsfit:[er.MathFont,ar.SANSSERIFBOLDITALIC],symtt:[er.MathFont,ar.MONOSPACE],symcal:[er.MathFont,ar.CALLIGRAPHIC],symbfcal:[er.MathFont,ar.BOLDCALLIGRAPHIC],textrm:[er.HBox,null,ar.NORMAL],textup:[er.HBox,null,ar.NORMAL],textnormal:[er.HBox],textit:[er.HBox,null,ar.ITALIC],textbf:[er.HBox,null,ar.BOLD],textsf:[er.HBox,null,ar.SANSSERIF],texttt:[er.HBox,null,ar.MONOSPACE],tiny:[er.SetSize,.5],Tiny:[er.SetSize,.6],scriptsize:[er.SetSize,.7],small:[er.SetSize,.85],normalsize:[er.SetSize,1],large:[er.SetSize,1.2],Large:[er.SetSize,1.44],LARGE:[er.SetSize,1.73],huge:[er.SetSize,2.07],Huge:[er.SetSize,2.49],arcsin:er.NamedFn,arccos:er.NamedFn,arctan:er.NamedFn,arg:er.NamedFn,cos:er.NamedFn,cosh:er.NamedFn,cot:er.NamedFn,coth:er.NamedFn,csc:er.NamedFn,deg:er.NamedFn,det:er.NamedOp,dim:er.NamedFn,exp:er.NamedFn,gcd:er.NamedOp,hom:er.NamedFn,inf:er.NamedOp,ker:er.NamedFn,lg:er.NamedFn,lim:er.NamedOp,liminf:[er.NamedOp,"lim&thinsp;inf"],limsup:[er.NamedOp,"lim&thinsp;sup"],ln:er.NamedFn,log:er.NamedFn,max:er.NamedOp,min:er.NamedOp,Pr:er.NamedOp,sec:er.NamedFn,sin:er.NamedFn,sinh:er.NamedFn,sup:er.NamedOp,tan:er.NamedFn,tanh:er.NamedFn,limits:[er.Limits,!0],nolimits:[er.Limits,!1],overline:[er.UnderOver,"2015"],underline:[er.UnderOver,"2015"],overbrace:[er.UnderOver,"23DE",!0],underbrace:[er.UnderOver,"23DF",!0],overparen:[er.UnderOver,"23DC"],underparen:[er.UnderOver,"23DD"],overrightarrow:[er.UnderOver,"2192"],underrightarrow:[er.UnderOver,"2192"],overleftarrow:[er.UnderOver,"2190"],underleftarrow:[er.UnderOver,"2190"],overleftrightarrow:[er.UnderOver,"2194"],underleftrightarrow:[er.UnderOver,"2194"],overset:er.Overset,underset:er.Underset,overunderset:er.Overunderset,stackrel:[er.Macro,"\\mathrel{\\mathop{#2}\\limits^{#1}}",2],stackbin:[er.Macro,"\\mathbin{\\mathop{#2}\\limits^{#1}}",2],over:er.Over,overwithdelims:er.Over,atop:er.Over,atopwithdelims:er.Over,above:er.Over,abovewithdelims:er.Over,brace:[er.Over,"{","}"],brack:[er.Over,"[","]"],choose:[er.Over,"(",")"],frac:er.Frac,sqrt:er.Sqrt,root:er.Root,uproot:[er.MoveRoot,"upRoot"],leftroot:[er.MoveRoot,"leftRoot"],left:er.LeftRight,right:er.LeftRight,middle:er.LeftRight,llap:er.Lap,rlap:er.Lap,raise:er.RaiseLower,lower:er.RaiseLower,moveleft:er.MoveLeftRight,moveright:er.MoveLeftRight,",":[er.Spacer,Ve.thinmathspace],":":[er.Spacer,Ve.mediummathspace],">":[er.Spacer,Ve.mediummathspace],";":[er.Spacer,Ve.thickmathspace],"!":[er.Spacer,Ve.negativethinmathspace],enspace:[er.Spacer,.5],quad:[er.Spacer,1],qquad:[er.Spacer,2],thinspace:[er.Spacer,Ve.thinmathspace],negthinspace:[er.Spacer,Ve.negativethinmathspace],"*":er.DiscretionaryTimes,allowbreak:er.AllowBreak,goodbreak:[er.Linebreak,mt.LineBreak.GOODBREAK],badbreak:[er.Linebreak,mt.LineBreak.BADBREAK],nobreak:[er.Linebreak,mt.LineBreak.NOBREAK],break:er.Break,hskip:er.Hskip,hspace:er.Hskip,kern:[er.Hskip,!0],mskip:er.Hskip,mspace:er.Hskip,mkern:[er.Hskip,!0],rule:er.rule,Rule:[er.Rule],Space:[er.Rule,"blank"],nonscript:er.Nonscript,big:[er.MakeBig,it.ORD,.85],Big:[er.MakeBig,it.ORD,1.15],bigg:[er.MakeBig,it.ORD,1.45],Bigg:[er.MakeBig,it.ORD,1.75],bigl:[er.MakeBig,it.OPEN,.85],Bigl:[er.MakeBig,it.OPEN,1.15],biggl:[er.MakeBig,it.OPEN,1.45],Biggl:[er.MakeBig,it.OPEN,1.75],bigr:[er.MakeBig,it.CLOSE,.85],Bigr:[er.MakeBig,it.CLOSE,1.15],biggr:[er.MakeBig,it.CLOSE,1.45],Biggr:[er.MakeBig,it.CLOSE,1.75],bigm:[er.MakeBig,it.REL,.85],Bigm:[er.MakeBig,it.REL,1.15],biggm:[er.MakeBig,it.REL,1.45],Biggm:[er.MakeBig,it.REL,1.75],mathord:[er.TeXAtom,it.ORD],mathop:[er.TeXAtom,it.OP],mathopen:[er.TeXAtom,it.OPEN],mathclose:[er.TeXAtom,it.CLOSE],mathbin:[er.TeXAtom,it.BIN],mathrel:[er.TeXAtom,it.REL],mathpunct:[er.TeXAtom,it.PUNCT],mathinner:[er.TeXAtom,it.INNER],vtop:[er.VBox,"top"],vcenter:[er.VBox,"center"],vbox:[er.VBox,"bottom"],hsize:er.Hsize,parbox:er.ParBox,breakAlign:er.BreakAlign,buildrel:er.BuildRel,hbox:[er.HBox,0],text:er.HBox,mbox:[er.HBox,0],fbox:er.FBox,boxed:[er.Macro,"\\fbox{$\\displaystyle{#1}$}",1],framebox:er.FrameBox,makebox:er.MakeBox,strut:er.Strut,mathstrut:[er.Macro,"\\vphantom{(}"],phantom:er.Phantom,vphantom:[er.Phantom,1,0],hphantom:[er.Phantom,0,1],smash:er.Smash,acute:[er.Accent,"00B4"],grave:[er.Accent,"0060"],ddot:[er.Accent,"00A8"],dddot:[er.Accent,"20DB"],ddddot:[er.Accent,"20DC"],tilde:[er.Accent,"007E"],bar:[er.Accent,"00AF"],breve:[er.Accent,"02D8"],check:[er.Accent,"02C7"],hat:[er.Accent,"005E"],vec:[er.Accent,"2192",!1],dot:[er.Accent,"02D9"],widetilde:[er.Accent,"007E",!0],widehat:[er.Accent,"005E",!0],matrix:er.Matrix,array:er.Matrix,pmatrix:[er.Matrix,"(",")"],cases:[er.Matrix,"{","","left left",null,".2em",null,!0],eqalign:[er.Matrix,null,null,"right left",ir,".5em","D"],displaylines:[er.Matrix,null,null,"center",null,".5em","D"],cr:er.Cr,"\\":er.CrLaTeX,newline:[er.CrLaTeX,!0],hline:er.HLine,hdashline:[er.HLine,"dashed"],eqalignno:[er.Matrix,null,null,"right left",ir,".5em","D",null,"right"],leqalignno:[er.Matrix,null,null,"right left",ir,".5em","D",null,"left"],hfill:er.HFill,hfil:er.HFill,hfilll:er.HFill,bmod:[er.Macro,`\\mmlToken{mo}[lspace="${ir}" rspace="${ir}"]{mod}`],pmod:[er.Macro,"\\pod{\\mmlToken{mi}{mod}\\kern 6mu #1}",1],mod:[er.Macro,"\\mathchoice{\\kern18mu}{\\kern12mu}{\\kern12mu}{\\kern12mu}\\mmlToken{mi}{mod}\\,\\,#1",1],pod:[er.Macro,"\\mathchoice{\\kern18mu}{\\kern8mu}{\\kern8mu}{\\kern8mu}(#1)",1],iff:[er.Macro,"\\;\\Longleftrightarrow\\;"],skew:[er.Macro,"{{#2{#3\\mkern#1mu}\\mkern-#1mu}{}}",3],pmb:[er.Macro,"\\rlap{#1}\\kern1px{#1}",1],TeX:[er.Macro,"T\\kern-.14em\\lower.5ex{E}\\kern-.115em X"],LaTeX:[er.Macro,"L\\kern-.325em\\raise.21em{\\scriptstyle{A}}\\kern-.17em\\TeX"],not:er.Not,dots:er.Dots,space:er.Tilde,"\xa0":er.Tilde," ":er.Tilde,begin:er.BeginEnd,end:er.BeginEnd,label:er.HandleLabel,ref:er.HandleRef,nonumber:er.HandleNoTag,newcolumntype:er.NewColumnType,mathchoice:er.MathChoice,mmlToken:er.MmlToken}),new ce("environment",nr.environment,{displaymath:[er.Equation,null,!1],math:[er.Equation,null,!1,!1],array:[er.AlignedArray],darray:[er.AlignedArray,null,"D"],equation:[er.Equation,null,!0],eqnarray:[er.EqnArray,null,!0,!0,"rcl","bmt",qt.cols(0,Ve.thickmathspace),".5em"],indentalign:[er.IndentAlign]}),new ne("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 or=MathJax._.core.MmlTree.OperatorDictionary,cr=(or.OPDEF,or.MO,or.RANGES,or.getRange),lr=(or.MMLSPACING,or.OPTABLE,MathJax._.util.context),hr=(lr.hasWindow,lr.context),mr=mt.Variant;function dr(t,e){const r=t.stack.env.font,s=t.stack.env.italicFont,n=r?{mathvariant:r}:{},i=de.getMap("remap").lookup(e),a=cr(e),o=a[3],c=t.create("token",o,n,i?i.char:e),l=qt.isLatinOrGreekChar(e)?t.configuration.mathStyle(e,!0)||s:"",h=a[4]||(r&&l===mr.NORMAL?"":l);h&&c.attributes.set("mathvariant",h),"mo"===o&&(ht.setProperty(c,"fixStretchy",!0),t.configuration.addNode("fixStretchy",c)),t.Push(c)}new ne("remap",null,{"-":"\u2212","*":"\u2217","`":"\u2018"});class ur extends Xt{}const gr=pe.create("base",{[At.CONFIG]:function(t,e){const r=e.parseOptions.options;r.digits&&(r.numberPattern=r.digits),new re("digit",nr.digit,r.initialDigit),new re("letter",nr.variable,r.initialLetter);t.handlers.get(yt.CHARACTER).add(["letter","digit"],null,4)},[At.HANDLER]:{[yt.CHARACTER]:["command","special"],[yt.DELIMITER]:["delimiter"],[yt.MACRO]:["delimiter","macros","lcGreek","ucGreek","mathchar0mi","mathchar0mo","mathchar7"],[yt.ENVIRONMENT]:["environment"]},[At.FALLBACK]:{[yt.CHARACTER]:dr,[yt.MACRO]:function(t,e){throw new xt("UndefinedControlSequence","Undefined control sequence %1","\\"+e)},[yt.ENVIRONMENT]:function(t,e){throw new xt("UnknownEnv","Unknown environment '%1'",e)}},[At.ITEMS]:{[ke.prototype.kind]:ke,[we.prototype.kind]:we,[Me.prototype.kind]:Me,[xe.prototype.kind]:xe,[Pe.prototype.kind]:Pe,[Te.prototype.kind]:Te,[Ce.prototype.kind]:Ce,[Ee.prototype.kind]:Ee,[Se.prototype.kind]:Se,[Oe.prototype.kind]:Oe,[Ie.prototype.kind]:Ie,[Ne.prototype.kind]:Ne,[Le.prototype.kind]:Le,[Fe.prototype.kind]:Fe,[Re.prototype.kind]:Re,[De.prototype.kind]:De,[Be.prototype.kind]:Be,[Ge.prototype.kind]:Ge,[qe.prototype.kind]:qe,[_e.prototype.kind]:_e,[He.prototype.kind]:He,[je.prototype.kind]:je,[Ue.prototype.kind]:Ue,[Ke.prototype.kind]:Ke,[Xe.prototype.kind]:Xe,[ze.prototype.kind]:ze},[At.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:hr.document&&0!==hr.document.getElementsByTagName("base").length?String(hr.document.location).replace(/#.*$/,""):""},[At.TAGS]:{base:ur},[At.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 pr extends j{static configure(t){const e=new Ae(t,["tex"]);return e.init(),e}static tags(t,e){Yt.addTags(e.tags),Yt.setDefault(t.options.tags),t.tags=Yt.getDefault(),t.tags.configuration=t}constructor(t={}){const[e,r,s]=V(t,pr.OPTIONS,st.OPTIONS);super(r),this.findTeX=this.options.FindTeX||new st(s);const n=this.options.packages,i=this.configuration=pr.configure(n),a=this._parseOptions=new Ut(i,[this.options,Yt.OPTIONS]);$(a.options,e),i.config(this),pr.tags(a,i),this.postFilters.addList([[bt.cleanSubSup,-7],[bt.setInherited,-6],[bt.checkScriptlevel,-5],[bt.moveLimits,-4],[bt.cleanStretchy,-3],[bt.cleanAttributes,-2],[bt.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 Ct(this.latex,{display:t.display,isInner:!1},this.parseOptions),r=s.mml()}catch(t){if(!(t instanceof xt))throw t;this.parseOptions.error=!0,r=this.options.formatError(this,t)}return r=this.parseOptions.nodeFactory.create("node","math",[r]),r.attributes.set(mt.Attr.LATEX,this.latex),t.display&&ht.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&&(ht.setAttribute(r,"maxwidth",s.stack.env.hsize),ht.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)}}pr.NAME="TeX",pr.OPTIONS=Object.assign(Object.assign({},j.OPTIONS),{FindTeX:null,packages:["base"],maxBuffer:5120,maxTemplateSubtitutions:1e4,mathStyle:"TeX",formatError:(t,e)=>t.formatError(e)});class fr extends Ue{constructor(t,...e){super(t),this.factory.configuration.tags.start("multline",!0,e[0])}get kind(){return"multline"}EndEntry(){this.table.length&&qt.fixInitialMO(this.factory.configuration,this.nodes);const t=this.getProperty("shove"),e=this.create("node","mtd",this.nodes,t?{columnalign:t}:{});this.setProperty("shove",null),this.row.push(e),this.Clear()}EndRow(){if(1!==this.row.length)throw new xt("MultlineRowsOneCol","The rows within the %1 environment must have exactly one column","multline");const t=this.create("node","mtr",this.row);this.table.push(t),this.row=[]}EndTable(){if(super.EndTable(),this.table.length){const t=this.table.length-1;let e=-1;ht.getAttribute(ht.getChildren(this.table[0])[0],"columnalign")||ht.setAttribute(ht.getChildren(this.table[0])[0],"columnalign",mt.Align.LEFT),ht.getAttribute(ht.getChildren(this.table[t])[0],"columnalign")||ht.setAttribute(ht.getChildren(this.table[t])[0],"columnalign",mt.Align.RIGHT);const r=this.factory.configuration.tags.getTag();if(r){e=this.arraydef.side===mt.Align.LEFT?0:this.table.length-1;const t=this.table[e],s=this.create("node","mlabeledtr",[r].concat(ht.getChildren(t)));ht.copyAttributes(t,s),this.table[e]=s}}this.factory.configuration.tags.end()}}class br extends Ke{get kind(){return"flalign"}constructor(t,e,r,s,n){super(t),this.name=e,this.numbered=r,this.padded=s,this.center=n,this.factory.configuration.tags.start(e,r,r)}EndEntry(){super.EndEntry();const t=this.getProperty("xalignat");if(t&&this.row.length>t)throw new xt("XalignOverflow","Extra %1 in row of %2","&",this.name)}EndRow(){let t;const e=this.row,r=this.getProperty("xalignat");for(;e.length<r;)e.push(this.create("node","mtd"));for(this.row=[],this.padded&&this.row.push(this.create("node","mtd"));t=e.shift();)this.row.push(t),t=e.shift(),t&&this.row.push(t),(e.length||this.padded)&&this.row.push(this.create("node","mtd"));this.row.length>this.maxrow&&(this.maxrow=this.row.length),super.EndRow();const s=this.table[this.table.length-1];if(this.getProperty("zeroWidthLabel")&&s.isKind("mlabeledtr")){const t=ht.getChildren(s)[0],e=this.factory.configuration.options.tagSide,r=Object.assign({width:0},"right"===e?{lspace:"-1width"}:{}),n=this.create("node","mpadded",ht.getChildren(t),r);t.setChildren([n])}}EndTable(){if(super.EndTable(),this.center&&this.maxrow<=2){delete this.arraydef.width,delete this.global.indentalign}}}var Ar;!function(t){t.NEW_DELIMITER="new-Delimiter",t.NEW_COMMAND="new-Command",t.NEW_ENVIRONMENT="new-Environment"}(Ar||(Ar={}));const yr=-100,vr={GetCSname(t,e){if("\\"!==t.GetNext())throw new xt("MissingCS","%1 must be followed by a control sequence",e);const r=kt.trimSpaces(t.GetArgument(e)).substring(1);return this.checkProtectedMacros(t,r),r},GetCsNameArgument(t,e){let r=kt.trimSpaces(t.GetArgument(e));if("\\"===r.charAt(0)&&(r=r.substring(1)),!r.match(/^(.|[a-z]+)$/i))throw new xt("IllegalControlSequenceName","Illegal control sequence name for %1",e);return this.checkProtectedMacros(t,r),r},GetArgCount(t,e){let r=t.GetBrackets(e);if(r&&(r=kt.trimSpaces(r),!r.match(/^[0-9]+$/)))throw new xt("IllegalParamNumber","Illegal number of parameters specified in %1",e);return r},GetTemplate(t,e,r){let s=t.GetNext();const n=[];let i=0,a=t.i;for(;t.i<t.string.length;){if(s=t.GetNext(),"#"===s){if(a!==t.i&&(n[i]=t.string.substring(a,t.i)),s=t.string.charAt(++t.i),!s.match(/^[1-9]$/))throw new xt("CantUseHash2","Illegal use of # in template for %1",r);if(parseInt(s)!==++i)throw new xt("SequentialParam","Parameters for %1 must be numbered sequentially",r);a=t.i+1}else if("{"===s)return a!==t.i&&(n[i]=t.string.substring(a,t.i)),n.length>0?[i.toString()].concat(n):i;t.i++}throw new xt("MissingReplacementString","Missing replacement string for definition of %1",e)},GetParameter(t,e,r){if(null==r)return t.GetArgument(e);let s=t.i,n=0,i=!1;for(;t.i<t.string.length;){const a=t.string.charAt(t.i);if("{"===a)i=t.i===s,t.GetArgument(e),n=t.i-s;else{if(this.MatchParam(t,r))return i&&(s++,n-=2),t.string.substring(s,s+n);if("\\"===a){t.i++,n++,i=!1;const e=t.string.substring(t.i).match(/[a-z]+|./i);e&&(t.i+=e[0].length,n=t.i-s)}else t.i++,n++,i=!1}}throw new xt("RunawayArgument","Runaway argument for %1?",e)},MatchParam:(t,e)=>t.string.substring(t.i,t.i+e.length)!==e||e.match(/\\[a-z]+$/i)&&t.string.charAt(t.i+e.length).match(/[a-z]/i)?0:(t.i+=e.length,1),checkGlobal:(t,e,r)=>t.stack.env.isGlobal?t.configuration.packageData.get("begingroup").stack.checkGlobal(e,r):r.map((e=>t.configuration.handlers.retrieve(e))),checkProtectedMacros(t,e){var r;if(null===(r=t.options.protectedMacros)||void 0===r?void 0:r.includes(e))throw new xt("ProtectedMacro","The control sequence %1 can't be redefined",`\\${e}`)},addDelimiter(t,e,r,s){const n=e.substring(1);this.checkProtectedMacros(t,n);const[i,a]=vr.checkGlobal(t,[n,e],[Ar.NEW_COMMAND,Ar.NEW_DELIMITER]);n!==e&&i.remove(n),a.add(e,new Qt(e,r,s)),delete t.stack.env.isGlobal},addMacro(t,e,r,s,n=""){this.checkProtectedMacros(t,e);const i=vr.checkGlobal(t,[e],[Ar.NEW_COMMAND])[0];this.undefineDelimiter(t,"\\"+e),i.add(e,new Zt(n||e,r,s)),delete t.stack.env.isGlobal},addEnvironment(t,e,r,s){vr.checkGlobal(t,[e],[Ar.NEW_ENVIRONMENT])[0].add(e,new Zt(e,r,s)),delete t.stack.env.isGlobal},undefineMacro(t,e){const r=vr.checkGlobal(t,[e],[Ar.NEW_COMMAND])[0];r.remove(e),t.configuration.handlers.get(yt.MACRO).applicable(e)&&(r.add(e,new Zt(e,(()=>ue.FALLBACK),[])),this.undefineDelimiter(t,"\\"+e)),delete t.stack.env.isGlobal},undefineDelimiter(t,e){const r=vr.checkGlobal(t,[e],[Ar.NEW_DELIMITER])[0];r.remove(e),t.configuration.handlers.get(yt.DELIMITER).applicable(e)&&r.add(e,new Qt(e,null,{})),delete t.stack.env.isGlobal}};function kr(t){if(!t||t.isInferred&&0===t.childNodes.length)return[null,null];if(t.isKind("msubsup")&&wr(t))return[t,null];const e=ht.getChildAt(t,0);return t.isInferred&&e&&wr(e)?(t.childNodes.splice(0,1),[e,t]):[null,t]}function wr(t){const e=t.childNodes[0];return e&&e.isKind("mi")&&""===e.getText()}const Mr={AmsEqnArray(t,e,r,s,n,i,a,o){const c=t.GetBrackets("\\begin{"+e.getName()+"}"),l=er.EqnArray(t,e,r,s,n,i,a,o);return qt.setArrayAlign(l,c,t)},AlignAt(t,e,r,s){const n=e.getName();let i,a="",o="";const c=[];s||(i=t.GetBrackets("\\begin{"+n+"}"));const l=t.GetArgument("\\begin{"+n+"}");if(l.match(/[^0-9]/))throw new xt("PositiveIntegerArg","Argument to %1 must be a positive integer","\\begin{"+n+"}");let h=parseInt(l,10);for(;h>0;)a+="rl",o+="bt",c.push("0em 0em"),h--;const m=c.join(" ");if(s)return Mr.EqnArray(t,e,r,s,a,o,m);const d=Mr.EqnArray(t,e,r,s,a,o,m);return qt.setArrayAlign(d,i,t)},Multline(t,e,r){qt.checkEqnEnv(t),t.Push(e);const s=t.options.ams.multlineIndent,n=t.itemFactory.create("multline",r,t.stack);return n.arraydef={displaystyle:!0,rowspacing:".5em",columnspacing:"100%",width:t.options.ams.multlineWidth,side:t.options.tagSide,minlabelspacing:t.options.tagIndent,"data-array-padding":`${s} ${s}`,"data-width-includes-label":!0},n},XalignAt(t,e,r,s){const n=t.GetArgument("\\begin{"+e.getName()+"}");if(n.match(/[^0-9]/))throw new xt("PositiveIntegerArg","Argument to %1 must be a positive integer","\\begin{"+e.getName()+"}");const i=s?"crl":"rlc",a=s?"mbt":"btm",o=s?"fit auto auto":"auto auto fit",c=Mr.FlalignArray(t,e,r,s,!1,i,a,o,!0);return c.setProperty("xalignat",2*parseInt(n)),c},FlalignArray(t,e,r,s,n,i,a,o,c=!1){qt.checkEqnEnv(t),t.Push(e),i=i.split("").join(" ").replace(/r/g,"right").replace(/l/g,"left").replace(/c/g,"center"),a=Qe(a);const l=t.itemFactory.create("flalign",e.getName(),r,s,n,t.stack);return l.arraydef={width:"100%",displaystyle:!0,columnalign:i,columnspacing:"0em",columnwidth:o,rowspacing:"3pt","data-break-align":a,side:t.options.tagSide,minlabelspacing:c?"0":t.options.tagIndent,"data-width-includes-label":!0},l.setProperty("zeroWidthLabel",c),l},HandleDeclareOp(t,e){const r=t.GetStar()?"*":"",s=vr.GetCsNameArgument(t,e),n=t.GetArgument(e);vr.addMacro(t,s,Mr.Macro,[`\\operatorname${r}{${n}}`]),t.Push(t.itemFactory.create("null"))},HandleOperatorName(t,e){const r=t.GetStar(),s=kt.trimSpaces(t.GetArgument(e));let n=new Ct(s,Object.assign(Object.assign({},t.stack.env),{font:mt.Variant.NORMAL,multiLetterIdentifiers:t.options.ams.operatornamePattern,operatorLetters:!0,noAutoOP:!0}),t.configuration).mml();if(n.isKind("mi")?n.removeProperty("autoOP"):n=t.create("node","TeXAtom",[n]),ht.setProperties(n,{movesupsub:r,movablelimits:!0,texClass:it.OP}),!r){const e=t.GetNext(),r=t.i;"\\"===e&&++t.i&&"limits"!==t.GetCS()&&(t.i=r)}t.Push(t.itemFactory.create("fn",n))},SideSet(t,e){const[r,s]=kr(t.ParseArg(e)),[n,i]=kr(t.ParseArg(e)),a=t.ParseArg(e);let o=a;r&&(s?r.replaceChild(t.create("node","mphantom",[t.create("node","mpadded",[qt.copyNode(a,t)],{width:0})]),ht.getChildAt(r,0)):(o=t.create("node","mmultiscripts",[a]),n&&ht.appendChildren(o,[ht.getChildAt(n,1)||t.create("node","none"),ht.getChildAt(n,2)||t.create("node","none")]),ht.setProperty(o,"scriptalign","left"),ht.appendChildren(o,[t.create("node","mprescripts"),ht.getChildAt(r,1)||t.create("node","none"),ht.getChildAt(r,2)||t.create("node","none")]))),n&&o===a&&(n.replaceChild(a,ht.getChildAt(n,0)),o=n);const c=t.create("node","TeXAtom",[],{texClass:it.OP,movesupsub:!0,movablelimits:!0});s&&(r&&c.appendChild(r),c.appendChild(s)),c.appendChild(o),i&&c.appendChild(i),t.Push(c)},operatorLetter:(t,e)=>!!t.stack.env.operatorLetters&&nr.variable(t,e),MultiIntegral(t,e,r){let s=t.GetNext();if("\\"===s){const n=t.i;s=t.GetArgument(e),t.i=n,"\\limits"===s&&(r="\\!\\!\\mathop{\\,\\,"+r+"}")}t.string=r+" "+t.string.slice(t.i),t.i=0},xArrow(t,e,r,s,n,i=0){const a={width:"+"+kt.em((s+n)/18),lspace:kt.em(s/18)},o=t.GetBrackets(e),c=t.ParseArg(e),l=t.create("node","mspace",[],{depth:".2em"});let h=t.create("token","mo",{stretchy:!0,texClass:it.ORD},String.fromCodePoint(r));i&&h.attributes.set("minsize",kt.em(i)),h=t.create("node","mstyle",[h],{scriptlevel:0});const m=t.create("node","munderover",[h]);let d=t.create("node","mpadded",[c,l],a);if(ht.setAttribute(d,"voffset","-.2em"),ht.setAttribute(d,"height","-.2em"),ht.setChild(m,m.over,d),o){const e=new Ct(o,t.stack.env,t.configuration).mml(),r=t.create("node","mspace",[],{height:".75em"});d=t.create("node","mpadded",[e,r],a),ht.setAttribute(d,"voffset",".15em"),ht.setAttribute(d,"depth","-.15em"),ht.setChild(m,m.under,d)}ht.setProperty(m,"subsupOK",!0),t.Push(t.create("node","TeXAtom",[t.create("node","TeXAtom",[],{texClass:it.NONE}),m],{texClass:it.REL}))},HandleShove(t,e,r){const s=t.stack.Top();if("multline"!==s.kind)throw new xt("CommandOnlyAllowedInEnv","%1 only allowed in %2 environment",t.currentCS,"multline");if(s.Size())throw new xt("CommandAtTheBeginingOfLine","%1 must come at the beginning of the line",t.currentCS);s.setProperty("shove",r)},CFrac(t,e){let r=kt.trimSpaces(t.GetBrackets(e,""));const s=t.GetArgument(e),n=t.GetArgument(e),i={l:mt.Align.LEFT,r:mt.Align.RIGHT,"":""},a=new Ct("\\strut\\textstyle{"+s+"}",t.stack.env,t.configuration).mml(),o=new Ct("\\strut\\textstyle{"+n+"}",t.stack.env,t.configuration).mml(),c=t.create("node","mfrac",[a,o]);if(r=i[r],null==r)throw new xt("IllegalAlign","Illegal alignment specified in %1",t.currentCS);r&&ht.setProperties(c,{numalign:r,denomalign:r}),t.Push(c)},Genfrac(t,e,r,s,n,i){null==r&&(r=t.GetDelimiterArg(e)),null==s&&(s=t.GetDelimiterArg(e)),null==n&&(n=t.GetArgument(e)),null==i&&(i=kt.trimSpaces(t.GetArgument(e)));const a=t.ParseArg(e),o=t.ParseArg(e);let c=t.create("node","mfrac",[a,o]);if(""!==n&&ht.setAttribute(c,"linethickness",n),(r||s)&&(ht.setProperty(c,"withDelims",!0),c=qt.fixedFence(t.configuration,r,c,s)),""!==i){const e=parseInt(i,10),r=["D","T","S","SS"][e];if(null==r)throw new xt("BadMathStyleFor","Bad math style for %1",t.currentCS);c=t.create("node","mstyle",[c]),"D"===r?ht.setProperties(c,{displaystyle:!0,scriptlevel:0}):ht.setProperties(c,{displaystyle:!1,scriptlevel:e-1})}t.Push(c)},HandleTag(t,e){if(!t.tags.currentTag.taggable&&t.tags.env)throw new xt("CommandNotAllowedInEnv","%1 not allowed in %2 environment",t.currentCS,t.tags.env);if(t.tags.currentTag.tag)throw new xt("MultipleCommand","Multiple %1",t.currentCS);const r=t.GetStar(),s=kt.trimSpaces(t.GetArgument(e));t.tags.tag(s,r),t.Push(t.itemFactory.create("null"))},HandleNoTag:er.HandleNoTag,HandleRef:er.HandleRef,Macro:er.Macro,Accent:er.Accent,Tilde:er.Tilde,Array:er.Array,Spacer:er.Spacer,NamedOp:er.NamedOp,EqnArray:er.EqnArray,Equation:er.Equation};new ne("AMSmath-mathchar0mo",nr.mathchar0mo,{iiiint:["\u2a0c",{texClass:it.OP}]}),new re("AMSmath-operatorLetter",Mr.operatorLetter,/[-*]/i),new oe("AMSmath-macros",{mathring:[Mr.Accent,"02DA"],nobreakspace:Mr.Tilde,negmedspace:[Mr.Spacer,Ve.negativemediummathspace],negthickspace:[Mr.Spacer,Ve.negativethickmathspace],idotsint:[Mr.MultiIntegral,"\\int\\cdots\\int"],dddot:[Mr.Accent,"20DB"],ddddot:[Mr.Accent,"20DC"],sideset:Mr.SideSet,boxed:[Mr.Macro,"\\fbox{$\\displaystyle{#1}$}",1],tag:Mr.HandleTag,notag:Mr.HandleNoTag,eqref:[Mr.HandleRef,!0],substack:[Mr.Macro,"\\begin{subarray}{c}#1\\end{subarray}",1],injlim:[Mr.NamedOp,"inj&thinsp;lim"],projlim:[Mr.NamedOp,"proj&thinsp;lim"],varliminf:[Mr.Macro,"\\mathop{\\underline{\\mmlToken{mi}{lim}}}"],varlimsup:[Mr.Macro,"\\mathop{\\overline{\\mmlToken{mi}{lim}}}"],varinjlim:[Mr.Macro,"\\mathop{\\underrightarrow{\\mmlToken{mi}{lim}}}"],varprojlim:[Mr.Macro,"\\mathop{\\underleftarrow{\\mmlToken{mi}{lim}}}"],DeclareMathOperator:Mr.HandleDeclareOp,operatorname:Mr.HandleOperatorName,genfrac:Mr.Genfrac,frac:[Mr.Genfrac,"","","",""],tfrac:[Mr.Genfrac,"","","","1"],dfrac:[Mr.Genfrac,"","","","0"],binom:[Mr.Genfrac,"(",")","0",""],tbinom:[Mr.Genfrac,"(",")","0","1"],dbinom:[Mr.Genfrac,"(",")","0","0"],cfrac:Mr.CFrac,shoveleft:[Mr.HandleShove,mt.Align.LEFT],shoveright:[Mr.HandleShove,mt.Align.RIGHT],xrightarrow:[Mr.xArrow,8594,5,10],xleftarrow:[Mr.xArrow,8592,10,5]}),new ce("AMSmath-environment",nr.environment,{"equation*":[Mr.Equation,null,!1],"eqnarray*":[Mr.EqnArray,null,!1,!0,"rcl","bmt",qt.cols(0,Ve.thickmathspace),".5em"],align:[Mr.EqnArray,null,!0,!0,"rl","bt",qt.cols(0,2)],"align*":[Mr.EqnArray,null,!1,!0,"rl","bt",qt.cols(0,2)],multline:[Mr.Multline,null,!0],"multline*":[Mr.Multline,null,!1],split:[Mr.EqnArray,null,!1,!1,"rl","bt",qt.cols(0)],gather:[Mr.EqnArray,null,!0,!0,"c","m"],"gather*":[Mr.EqnArray,null,!1,!0,"c","m"],alignat:[Mr.AlignAt,null,!0,!0],"alignat*":[Mr.AlignAt,null,!1,!0],alignedat:[Mr.AlignAt,null,!1,!1],aligned:[Mr.AmsEqnArray,null,null,null,"rl","bt",qt.cols(0,2),".5em","D"],gathered:[Mr.AmsEqnArray,null,null,null,"c","m",null,".5em","D"],xalignat:[Mr.XalignAt,null,!0,!0],"xalignat*":[Mr.XalignAt,null,!1,!0],xxalignat:[Mr.XalignAt,null,!1,!1],flalign:[Mr.FlalignArray,null,!0,!1,!0,"rlc","btm","auto auto fit"],"flalign*":[Mr.FlalignArray,null,!1,!1,!0,"rlc","btm","auto auto fit"],subarray:[Mr.Array,null,null,null,null,qt.cols(0),"0.1em","S",!0],smallmatrix:[Mr.Array,null,null,null,"c",qt.cols(1/3),".2em","S",!0],matrix:[Mr.Array,null,null,null,"c"],pmatrix:[Mr.Array,null,"(",")","c"],bmatrix:[Mr.Array,null,"[","]","c"],Bmatrix:[Mr.Array,null,"\\{","\\}","c"],vmatrix:[Mr.Array,null,"\\vert","\\vert","c"],Vmatrix:[Mr.Array,null,"\\Vert","\\Vert","c"],cases:[Mr.Array,null,"\\{",".","ll",null,".2em","T"]}),new ie("AMSmath-delimiter",nr.delimiter,{"\\lvert":["|",{texClass:it.OPEN}],"\\rvert":["|",{texClass:it.CLOSE}],"\\lVert":["\u2016",{texClass:it.OPEN}],"\\rVert":["\u2016",{texClass:it.CLOSE}]}),new ne("AMSsymbols-mathchar0mi",nr.mathchar0mi,{digamma:"\u03dd",varkappa:"\u03f0",varGamma:["\u0393",{mathvariant:mt.Variant.ITALIC}],varDelta:["\u0394",{mathvariant:mt.Variant.ITALIC}],varTheta:["\u0398",{mathvariant:mt.Variant.ITALIC}],varLambda:["\u039b",{mathvariant:mt.Variant.ITALIC}],varXi:["\u039e",{mathvariant:mt.Variant.ITALIC}],varPi:["\u03a0",{mathvariant:mt.Variant.ITALIC}],varSigma:["\u03a3",{mathvariant:mt.Variant.ITALIC}],varUpsilon:["\u03a5",{mathvariant:mt.Variant.ITALIC}],varPhi:["\u03a6",{mathvariant:mt.Variant.ITALIC}],varPsi:["\u03a8",{mathvariant:mt.Variant.ITALIC}],varOmega:["\u03a9",{mathvariant:mt.Variant.ITALIC}],beth:"\u2136",gimel:"\u2137",daleth:"\u2138",backprime:["\u2035",{variantForm:!0}],hslash:"\u210f",varnothing:["\u2205",{variantForm:!0}],blacktriangle:"\u25b4",triangledown:["\u25bd",{variantForm:!0}],blacktriangledown:"\u25be",square:"\u25fb",Box:"\u25fb",blacksquare:"\u25fc",lozenge:"\u25ca",Diamond:"\u25ca",blacklozenge:"\u29eb",circledS:["\u24c8",{mathvariant:mt.Variant.NORMAL}],bigstar:"\u2605",sphericalangle:"\u2222",measuredangle:"\u2221",nexists:"\u2204",complement:"\u2201",mho:"\u2127",eth:["\xf0",{mathvariant:mt.Variant.NORMAL}],Finv:"\u2132",diagup:"\u2571",Game:"\u2141",diagdown:"\u2572",Bbbk:["k",{mathvariant:mt.Variant.DOUBLESTRUCK}],yen:"\xa5",circledR:"\xae",checkmark:"\u2713",maltese:"\u2720"}),new ne("AMSsymbols-mathchar0mo",nr.mathchar0mo,{dotplus:"\u2214",ltimes:"\u22c9",smallsetminus:["\u2216",{variantForm:!0}],rtimes:"\u22ca",Cap:"\u22d2",doublecap:"\u22d2",leftthreetimes:"\u22cb",Cup:"\u22d3",doublecup:"\u22d3",rightthreetimes:"\u22cc",barwedge:"\u22bc",curlywedge:"\u22cf",veebar:"\u22bb",curlyvee:"\u22ce",doublebarwedge:"\u2a5e",boxminus:"\u229f",circleddash:"\u229d",boxtimes:"\u22a0",circledast:"\u229b",boxdot:"\u22a1",circledcirc:"\u229a",boxplus:"\u229e",centerdot:["\u22c5",{variantForm:!0}],divideontimes:"\u22c7",intercal:"\u22ba",leqq:"\u2266",geqq:"\u2267",leqslant:"\u2a7d",geqslant:"\u2a7e",eqslantless:"\u2a95",eqslantgtr:"\u2a96",lesssim:"\u2272",gtrsim:"\u2273",lessapprox:"\u2a85",gtrapprox:"\u2a86",approxeq:"\u224a",lessdot:"\u22d6",gtrdot:"\u22d7",lll:"\u22d8",llless:"\u22d8",ggg:"\u22d9",gggtr:"\u22d9",lessgtr:"\u2276",gtrless:"\u2277",lesseqgtr:"\u22da",gtreqless:"\u22db",lesseqqgtr:"\u2a8b",gtreqqless:"\u2a8c",doteqdot:"\u2251",Doteq:"\u2251",eqcirc:"\u2256",risingdotseq:"\u2253",circeq:"\u2257",fallingdotseq:"\u2252",triangleq:"\u225c",backsim:"\u223d",thicksim:["\u223c",{variantForm:!0}],backsimeq:"\u22cd",thickapprox:["\u2248",{variantForm:!0}],subseteqq:"\u2ac5",supseteqq:"\u2ac6",Subset:"\u22d0",Supset:"\u22d1",sqsubset:"\u228f",sqsupset:"\u2290",preccurlyeq:"\u227c",succcurlyeq:"\u227d",curlyeqprec:"\u22de",curlyeqsucc:"\u22df",precsim:"\u227e",succsim:"\u227f",precapprox:"\u2ab7",succapprox:"\u2ab8",vartriangleleft:"\u22b2",lhd:"\u22b2",vartriangleright:"\u22b3",rhd:"\u22b3",trianglelefteq:"\u22b4",unlhd:"\u22b4",trianglerighteq:"\u22b5",unrhd:"\u22b5",vDash:"\u22a8",Vdash:"\u22a9",Vvdash:"\u22aa",smallsmile:["\u2323",{variantForm:!0}],shortmid:["\u2223",{variantForm:!0}],smallfrown:["\u2322",{variantForm:!0}],shortparallel:["\u2225",{variantForm:!0}],bumpeq:"\u224f",between:"\u226c",Bumpeq:"\u224e",pitchfork:"\u22d4",varpropto:["\u221d",{variantForm:!0}],backepsilon:"\u220d",blacktriangleleft:"\u25c2",blacktriangleright:"\u25b8",therefore:"\u2234",because:"\u2235",eqsim:"\u2242",vartriangle:["\u25b3",{variantForm:!0}],Join:"\u22c8",nless:"\u226e",ngtr:"\u226f",nleq:"\u2270",ngeq:"\u2271",nleqslant:["\u2a87",{variantForm:!0}],ngeqslant:["\u2a88",{variantForm:!0}],nleqq:["\u2270",{variantForm:!0}],ngeqq:["\u2271",{variantForm:!0}],lneq:"\u2a87",gneq:"\u2a88",lneqq:"\u2268",gneqq:"\u2269",lvertneqq:["\u2268",{variantForm:!0}],gvertneqq:["\u2269",{variantForm:!0}],lnsim:"\u22e6",gnsim:"\u22e7",lnapprox:"\u2a89",gnapprox:"\u2a8a",nprec:"\u2280",nsucc:"\u2281",npreceq:["\u22e0",{variantForm:!0}],nsucceq:["\u22e1",{variantForm:!0}],precneqq:"\u2ab5",succneqq:"\u2ab6",precnsim:"\u22e8",succnsim:"\u22e9",precnapprox:"\u2ab9",succnapprox:"\u2aba",nsim:"\u2241",ncong:"\u2247",nshortmid:["\u2224",{variantForm:!0}],nshortparallel:["\u2226",{variantForm:!0}],nmid:"\u2224",nparallel:"\u2226",nvdash:"\u22ac",nvDash:"\u22ad",nVdash:"\u22ae",nVDash:"\u22af",ntriangleleft:"\u22ea",ntriangleright:"\u22eb",ntrianglelefteq:"\u22ec",ntrianglerighteq:"\u22ed",nsubseteq:"\u2288",nsupseteq:"\u2289",nsubseteqq:["\u2288",{variantForm:!0}],nsupseteqq:["\u2289",{variantForm:!0}],subsetneq:"\u228a",supsetneq:"\u228b",varsubsetneq:["\u228a",{variantForm:!0}],varsupsetneq:["\u228b",{variantForm:!0}],subsetneqq:"\u2acb",supsetneqq:"\u2acc",varsubsetneqq:["\u2acb",{variantForm:!0}],varsupsetneqq:["\u2acc",{variantForm:!0}],leftleftarrows:"\u21c7",rightrightarrows:"\u21c9",leftrightarrows:"\u21c6",rightleftarrows:"\u21c4",Lleftarrow:"\u21da",Rrightarrow:"\u21db",twoheadleftarrow:"\u219e",twoheadrightarrow:"\u21a0",leftarrowtail:"\u21a2",rightarrowtail:"\u21a3",looparrowleft:"\u21ab",looparrowright:"\u21ac",leftrightharpoons:"\u21cb",rightleftharpoons:["\u21cc",{variantForm:!0}],curvearrowleft:"\u21b6",curvearrowright:"\u21b7",circlearrowleft:"\u21ba",circlearrowright:"\u21bb",Lsh:"\u21b0",Rsh:"\u21b1",upuparrows:"\u21c8",downdownarrows:"\u21ca",upharpoonleft:"\u21bf",upharpoonright:"\u21be",downharpoonleft:"\u21c3",restriction:"\u21be",multimap:"\u22b8",downharpoonright:"\u21c2",leftrightsquigarrow:"\u21ad",rightsquigarrow:"\u21dd",leadsto:"\u21dd",dashrightarrow:"\u21e2",dashleftarrow:"\u21e0",nleftarrow:"\u219a",nrightarrow:"\u219b",nLeftarrow:"\u21cd",nRightarrow:"\u21cf",nleftrightarrow:"\u21ae",nLeftrightarrow:"\u21ce"}),new ie("AMSsymbols-delimiter",nr.delimiter,{"\\ulcorner":"\u231c","\\urcorner":"\u231d","\\llcorner":"\u231e","\\lrcorner":"\u231f"}),new oe("AMSsymbols-macros",{implies:[Mr.Macro,"\\;\\Longrightarrow\\;"],impliedby:[Mr.Macro,"\\;\\Longleftarrow\\;"]});class xr extends Tt{get kind(){return"beginEnv"}get isOpen(){return!0}checkItem(t){if(t.isKind("end")){if(t.getName()!==this.getName())throw new xt("EnvBadEnd","\\begin{%1} ended with \\end{%2}",this.getName(),t.getName());return[[this.factory.create("mml",this.toMml())],!0]}if(t.isKind("stop"))throw new xt("EnvMissingEnd","Missing \\end{%1}",this.getName());return super.checkItem(t)}}const Pr={NewCommand(t,e){const r=vr.GetCsNameArgument(t,e),s=vr.GetArgCount(t,e),n=t.GetBrackets(e),i=t.GetArgument(e);vr.addMacro(t,r,Pr.Macro,[i,s,n]),t.Push(t.itemFactory.create("null"))},NewEnvironment(t,e){const r=kt.trimSpaces(t.GetArgument(e)),s=vr.GetArgCount(t,e),n=t.GetBrackets(e),i=t.GetArgument(e),a=t.GetArgument(e);vr.addEnvironment(t,r,Pr.BeginEnv,[!0,i,a,s,n]),t.Push(t.itemFactory.create("null"))},MacroDef(t,e){const r=vr.GetCSname(t,e),s=vr.GetTemplate(t,e,"\\"+r),n=t.GetArgument(e);s instanceof Array?vr.addMacro(t,r,Pr.MacroWithTemplate,[n].concat(s)):vr.addMacro(t,r,Pr.Macro,[n,s]),t.Push(t.itemFactory.create("null"))},Let(t,e){const r=vr.GetCSname(t,e);let s=t.GetNext();"="===s&&(t.i++,s=t.GetNext());const n=t.configuration.handlers;if(t.Push(t.itemFactory.create("null")),"\\"===s){if(r===(e=vr.GetCSname(t,e)))return;const s=n.get(yt.MACRO).applicable(e);if(s instanceof ae){const n=s.lookup(e);return void vr.addMacro(t,r,n.func,n.args,n.token)}if(s instanceof ne&&!(s instanceof ie)){const n=s.lookup(e),i=t=>s.parser(t,n);return void vr.addMacro(t,r,i,[r,n.char])}const i=n.get(yt.DELIMITER).lookup("\\"+e);return i?void vr.addDelimiter(t,"\\"+r,i.char,i.attributes):(vr.checkProtectedMacros(t,r),vr.undefineMacro(t,r),void vr.undefineDelimiter(t,"\\"+r))}t.i++;const i=n.get(yt.DELIMITER).lookup(s);i?vr.addDelimiter(t,"\\"+r,i.char,i.attributes):vr.addMacro(t,r,Pr.Macro,[s])},MacroWithTemplate(t,e,r,s,...n){const i=parseInt(s,10);if(n.length){const s=[];if(t.GetNext(),n[0]&&!vr.MatchParam(t,n[0]))throw new xt("MismatchUseDef","Use of %1 doesn't match its definition",e);if(i){for(let r=0;r<i;r++)s.push(vr.GetParameter(t,e,n[r+1]));r=qt.substituteArgs(t,s,r)}}t.string=qt.addArgs(t,r,t.string.slice(t.i)),t.i=0,qt.checkMaxMacros(t)},BeginEnv(t,e,r,s,n,i){const a=e.getName();if(t.stack.env.closing===a){delete t.stack.env.closing;if(t.stack.global.beginEnv&&(t.stack.global.beginEnv--,s)){const e=t.string.slice(t.i);t.string=qt.addArgs(t,t.string.substring(0,t.i),s),t.Parse(),t.string=e,t.i=0}return t.itemFactory.create("end").setProperty("name",a)}if(n){const e=[];if(null!=i){const r=t.GetBrackets(`\\begin{${a}}`);e.push(null==r?i:r)}for(let r=e.length;r<n;r++)e.push(t.GetArgument(`\\begin{${a}}`));r=qt.substituteArgs(t,e,r),s=qt.substituteArgs(t,[],s)}return t.string=qt.addArgs(t,r,t.string.slice(t.i)),t.i=0,t.stack.global.beginEnv=(t.stack.global.beginEnv||0)+1,t.itemFactory.create("beginEnv").setProperty("name",a)},Macro:er.Macro},Tr=Pr;function Cr(t,e){e.parseOptions.packageData.has("newcommand")||(e.parseOptions.packageData.set("newcommand",{}),new ie(Ar.NEW_DELIMITER,nr.delimiter,{}),new oe(Ar.NEW_COMMAND,{}),new ce(Ar.NEW_ENVIRONMENT,nr.environment,{}),e.parseOptions.handlers.add({[yt.CHARACTER]:[],[yt.DELIMITER]:[Ar.NEW_DELIMITER],[yt.MACRO]:[Ar.NEW_DELIMITER,Ar.NEW_COMMAND],[yt.ENVIRONMENT]:[Ar.NEW_ENVIRONMENT]},{},yr))}new oe("Newcommand-macros",{newcommand:Tr.NewCommand,renewcommand:Tr.NewCommand,newenvironment:Tr.NewEnvironment,renewenvironment:Tr.NewEnvironment,def:Tr.MacroDef,let:Tr.Let});const Er=pe.create("newcommand",{[At.HANDLER]:{macro:["Newcommand-macros"]},[At.ITEMS]:{[xr.prototype.kind]:xr},[At.OPTIONS]:{maxMacros:1e3,protectedMacros:["begingroupSandbox"]},[At.CONFIG]:Cr});class Sr extends Xt{}const Or=pe.create("ams",{[At.HANDLER]:{[yt.CHARACTER]:["AMSmath-operatorLetter"],[yt.DELIMITER]:["AMSsymbols-delimiter","AMSmath-delimiter"],[yt.MACRO]:["AMSsymbols-mathchar0mi","AMSsymbols-mathchar0mo","AMSsymbols-delimiter","AMSsymbols-macros","AMSmath-mathchar0mo","AMSmath-macros","AMSmath-delimiter"],[yt.ENVIRONMENT]:["AMSmath-environment"]},[At.ITEMS]:{[fr.prototype.kind]:fr,[br.prototype.kind]:br},[At.TAGS]:{ams:Sr},[At.OPTIONS]:{multlineWidth:"",ams:{operatornamePattern:/^[-*a-zA-Z0-9]+/,multlineWidth:"100%",multlineIndent:"1em"}},[At.CONFIG]:Cr}),Ir=("undefined"!=typeof window?window:t.g).MathJax._.components.startup,Nr=(Ir.Startup,Ir.MathJax),Lr=(Ir.CONFIG,MathJax._.components.package),Fr=(Lr.PackageError,Lr.Package),Rr=("undefined"!=typeof window?window:t.g).MathJax._.components.loader,Dr=(Rr.PathFilters,Rr.Loader),Br=(Rr.MathJax,Rr.CONFIG),Gr=MathJax._.mathjax.mathjax,qr=Nr.config;function _r(t,e){const r=t.parseOptions.options.require,s=t.parseOptions.packageData.get("require").required,n=e.substring(r.prefix.length);if(!s.includes(n)){s.push(n);const r=function(t,e=[]){const r=t.parseOptions.options.require.prefix,s=[];for(const n of e)if(n.substring(0,r.length)===r)try{_r(t,n)}catch(t){if(!t.retry)throw t;s.push(t.retry)}return s.length?Promise.all(s):null}(t,Br.dependencies[e]);r?Gr.retryAfter(r.then((()=>Hr(t,e,n)))):Hr(t,e,n)}}function Hr(t,e,r){const s=be.get(r);if(s){let n=qr[e]||{};s.options&&1===Object.keys(s.options).length&&s.options[r]&&(n={[r]:n}),t.configuration.add(r,t,n);const i=t.parseOptions.packageData.get("require").configured;s.preprocessors.length&&!i.has(r)&&(i.set(r,!0),Gr.retryAfter(Promise.resolve()))}}function jr(t,e){var r,s;const n=t.options.require,i=n.allow,a=("["===e.substring(0,1)?"":n.prefix)+e;if(!(Object.hasOwn(i,a)?i[a]:Object.hasOwn(i,e)?i[e]:n.defaultAllow))throw new xt("BadRequire",'Extension "%1" is not allowed to be loaded',a);const o=Fr.packages.get(a);if(o||Gr.retryAfter(Dr.load(a).catch((t=>{}))),o.hasFailed)throw new xt("RequireFail",'Extension "%1" failed to load',e);const c=null===(r=Br[a])||void 0===r?void 0:r.rendererExtensions,l=null===(s=Nr.startup.document)||void 0===s?void 0:s.menu;c&&l&&l.addRequiredExtensions(c),_r(t.configuration.packageData.get("require").jax,a)}const Ur={Require(t,e){const r=t.GetArgument(e);if(r.match(/[^_a-zA-Z0-9]/)||""===r)throw new xt("BadPackageName","Argument for %1 is not a valid package name",e);jr(t,r),t.Push(t.itemFactory.create("null"))}},Kr={require:{allow:K({base:!1,autoload:!1,configmacros:!1,tagformat:!1,setoptions:!1,texhtml:!1}),defaultAllow:!0,prefix:"tex"}};new oe("require",{require:Ur.Require});const zr=pe.create("require",{[At.HANDLER]:{[yt.MACRO]:["require"]},[At.CONFIG]:function(t,e){e.parseOptions.packageData.set("require",{jax:e,required:[...e.options.packages],configured:new Map});const r=e.parseOptions.options.require,s=r.prefix;if(s.match(/[^_a-zA-Z0-9]/))throw Error("Illegal characters used in \\require prefix");Br.paths[s]||(Br.paths[s]="[mathjax]/input/tex/extensions"),r.prefix="["+s+"]/"},[At.OPTIONS]:Kr});function Xr(t,e,r,s){if(Fr.packages.has(t.options.require.prefix+r)){const n=t.options.autoload[r],[i,a]=2===n.length&&Array.isArray(n[0])?n:[n,[]];for(const t of i)$r.remove(t);for(const t of a)Vr.remove(t);t.string=(s?e+" ":"\\begin{"+e.slice(1)+"}")+t.string.slice(t.i),t.i=0}jr(t,r)}const $r=new oe("autoload-macros",{}),Vr=new oe("autoload-environments",{}),Jr=pe.create("autoload",{[At.HANDLER]:{[yt.MACRO]:["autoload-macros"],[yt.ENVIRONMENT]:["autoload-environments"]},[At.OPTIONS]:{autoload:K({action:["toggle","mathtip","texttip"],amscd:[[],["CD"]],bbox:["bbox"],boldsymbol:["boldsymbol"],braket:["bra","ket","braket","set","Bra","Ket","Braket","Set","ketbra","Ketbra"],bussproofs:[[],["prooftree"]],cancel:["cancel","bcancel","xcancel","cancelto"],color:["color","definecolor","textcolor","colorbox","fcolorbox"],enclose:["enclose"],extpfeil:["xtwoheadrightarrow","xtwoheadleftarrow","xmapsto","xlongequal","xtofrom","Newextarrow"],html:["data","href","class","style","cssId"],mhchem:["ce","pu"],newcommand:["newcommand","renewcommand","newenvironment","renewenvironment","def","let"],unicode:["unicode","U","char"],verb:["verb"]})},[At.CONFIG]:function(t,e){const r=e.parseOptions,s=r.handlers.get(yt.MACRO),n=r.handlers.get(yt.ENVIRONMENT),i=r.options.autoload;r.packageData.set("autoload",{Autoload:Xr});for(const t of Object.keys(i)){const e=i[t],[r,a]=2===e.length&&Array.isArray(e[0])?e:[e,[]];for(const e of r)s.lookup(e)&&"color"!==e||$r.add(e,new Zt(e,Xr,[t,!0]));for(const e of a)n.lookup(e)||Vr.add(e,new Zt(e,Xr,[t,!1]))}r.packageData.get("require")||zr.config(t,e)},[At.INIT]:function(t){t.options.require||X(t.options,zr.options)},[At.PRIORITY]:10}),Wr="configmacros-map",Yr="configmacros-active-map",Qr="configmacros-env-map";function Zr(t,e,r){const s=r.parseOptions.handlers.retrieve(e),n=r.parseOptions.options[t];for(const t of Object.keys(n)){const e="string"==typeof n[t]?[n[t]]:n[t],r=Array.isArray(e[2])?new Zt(t,Tr.MacroWithTemplate,e.slice(0,2).concat(e[2])):new Zt(t,Tr.Macro,e);s.add(t,r)}}const ts=pe.create("configmacros",{[At.INIT]:function(t){new ae(Yr,{}),new oe(Wr,{}),new ce(Qr,nr.environment,{}),t.append(pe.local({handler:{[yt.CHARACTER]:[Yr],[yt.MACRO]:[Wr],[yt.ENVIRONMENT]:[Qr]},priority:3}))},[At.CONFIG]:function(t,e){!function(t){Zr("active",Yr,t)}(e),function(t){Zr("macros",Wr,t)}(e),function(t){const e=t.parseOptions.handlers.retrieve(Qr),r=t.parseOptions.options.environments;for(const t of Object.keys(r))e.add(t,new Zt(t,Tr.BeginEnv,[!0].concat(r[t])))}(e)},[At.ITEMS]:{[xr.prototype.kind]:xr},[At.OPTIONS]:{active:K({}),macros:K({}),environments:K({})}});const es=pe.create("noundefined",{[At.FALLBACK]:{[yt.MACRO]:function(t,e){const r=t.create("text","\\"+e),s=t.options.noundefined,n={};for(const t of["color","background","size"])s[t]&&(n["math"+t]=s[t]);t.Push(t.create("node","mtext",[],n,r))}},[At.OPTIONS]:{noundefined:{color:"red",background:"",size:""}},[At.PRIORITY]:3});class rs extends Ct{get texParser(){return this.configuration.packageData.get("textmacros").texParser}get tags(){return this.texParser.tags}constructor(t,e,r,s){super(t,e,r),this.level=s}mml(){return this.copyLists(),this.configuration.popParser(),null!=this.level?this.create("node","mstyle",this.nodes,{displaystyle:!1,scriptlevel:this.level}):1===this.nodes.length?this.nodes[0]:this.create("node","mrow",this.nodes)}copyLists(){const t=this.texParser.configuration;for(const[e,r]of Object.entries(this.configuration.nodeLists))for(const s of r)t.addNode(e,s);this.configuration.nodeLists={}}Parse(){this.text="",this.nodes=[],this.envStack=[],super.Parse()}saveText(){if(this.text){const t=this.stack.env.mathvariant,e=qt.internalText(this,this.text,t?{mathvariant:t}:{});this.text="",this.Push(e)}}Push(t){if(this.text&&this.saveText(),t instanceof we)return super.Push(t);t instanceof Re?this.stack.env.mathcolor=this.stack.env.color:t instanceof at&&(this.addAttributes(t),this.nodes.push(t))}PushMath(t){const e=this.stack.env;for(const r of["mathsize","mathcolor"])e[r]&&!t.attributes.hasExplicit(r)&&(t.isToken||t.isKind("mstyle")||(t=this.create("node","mstyle",[t])),ht.setAttribute(t,r,e[r]));t.isInferred&&(t=this.create("node","mrow",t.childNodes)),t.isKind("TeXAtom")||(t=this.create("node","TeXAtom",[t])),this.nodes.push(t)}addAttributes(t){const e=this.stack.env;if(t.isToken)for(const r of["mathsize","mathcolor","mathvariant"])e[r]&&!t.attributes.hasExplicit(r)&&ht.setAttribute(t,r,e[r])}ParseTextArg(t,e){const r=this.GetArgument(t);return e=Object.assign(Object.assign({},this.stack.env),e),new rs(r,e,this.configuration).mml()}ParseArg(t){return new rs(this.GetArgument(t),this.stack.env,this.configuration).mml()}Error(t,e,...r){throw new xt(t,e,...r)}}const ss=MathJax._.util.Retries,ns=(ss.handleRetriesFor,ss.retryAfter),is={Comment(t,e){for(;t.i<t.string.length&&"\n"!==t.string.charAt(t.i);)t.i++;t.i++},Math(t,e){t.saveText();const r=t.i;let s,n,i=0;for(;n=t.GetNext();)switch(s=t.i++,n){case"\\":")"===t.GetCS()&&(n="\\(");case"$":if(0===i&&e===n){const e=t.texParser.configuration,n=new Ct(t.string.substring(r,s),t.stack.env,e).mml();return void t.PushMath(n)}break;case"{":i++;break;case"}":0===i&&t.Error("ExtraCloseMissingOpen","Extra close brace or missing open brace"),i--}t.Error("MathNotTerminated","Math mode is not properly terminated")},MathModeOnly(t,e){t.Error("MathModeOnly","'%1' allowed only in math mode",e)},Misplaced(t,e){t.Error("Misplaced","Misplaced '%1'",e)},OpenBrace(t,e){const r=t.stack.env;t.envStack.push(r),t.stack.env=Object.assign({},r)},CloseBrace(t,e){t.envStack.length?(t.saveText(),t.stack.env=t.envStack.pop()):t.Error("ExtraCloseMissingOpen","Extra close brace or missing open brace")},OpenQuote(t,e){t.string.charAt(t.i)===e?(t.text+="\u201c",t.i++):t.text+="\u2018"},CloseQuote(t,e){t.string.charAt(t.i)===e?(t.text+="\u201d",t.i++):t.text+="\u2019"},Tilde(t,e){t.text+="\xa0"},Space(t,e){t.text+=" ",t.GetNext()},SelfQuote(t,e){t.text+=e.substring(1)},Insert(t,e,r){t.text+=r},Accent(t,e,r){const s=t.ParseArg(e),n=t.create("token","mo",{},r);t.addAttributes(n),t.Push(t.create("node","mover",[s,n]))},Emph(t,e){const r="-tex-mathit"===t.stack.env.mathvariant?"normal":"-tex-mathit";t.Push(t.ParseTextArg(e,{mathvariant:r}))},TextFont(t,e,r){t.saveText(),t.Push(t.ParseTextArg(e,{mathvariant:r}))},SetFont(t,e,r){t.saveText(),t.stack.env.mathvariant=r},SetSize(t,e,r){t.saveText(),t.stack.env.mathsize=r},CheckAutoload(t,e){const r=t.configuration.packageData.get("autoload"),s=t.texParser;e=e.slice(1);const n=s.lookup(yt.MACRO,e);if(!n||r&&n._func===r.Autoload){if(s.parse(yt.MACRO,[s,e]),!n)return;ns(Promise.resolve())}s.parse(yt.MACRO,[t,e])},Macro:er.Macro,Spacer:er.Spacer,Hskip:er.Hskip,rule:er.rule,Rule:er.Rule,HandleRef:er.HandleRef,UnderOver:er.UnderOver,Lap:er.Lap,Phantom:er.Phantom,Smash:er.Smash,MmlToken:er.MmlToken},as=mt.Variant;new ae("text-special",{$:is.Math,"%":is.Comment,"^":is.MathModeOnly,_:is.MathModeOnly,"&":is.Misplaced,"#":is.Misplaced,"~":is.Tilde," ":is.Space,"\t":is.Space,"\r":is.Space,"\n":is.Space,"\xa0":is.Tilde,"{":is.OpenBrace,"}":is.CloseBrace,"`":is.OpenQuote,"'":is.CloseQuote}),new oe("text-macros",{"(":is.Math,$:is.SelfQuote,_:is.SelfQuote,"%":is.SelfQuote,"{":is.SelfQuote,"}":is.SelfQuote," ":is.SelfQuote,"&":is.SelfQuote,"#":is.SelfQuote,"\\":[is.Macro,"$\\\\$"],"'":[is.Accent,"\xb4"],"\u2019":[is.Accent,"\xb4"],"`":[is.Accent,"`"],"\u2018":[is.Accent,"`"],"^":[is.Accent,"^"],'"':[is.Accent,"\xa8"],"~":[is.Accent,"~"],"=":[is.Accent,"\xaf"],".":[is.Accent,"\u02d9"],u:[is.Accent,"\u02d8"],v:[is.Accent,"\u02c7"],emph:is.Emph,rm:[is.SetFont,as.NORMAL],mit:[is.SetFont,as.ITALIC],oldstyle:[is.SetFont,as.OLDSTYLE],cal:[is.SetFont,as.CALLIGRAPHIC],it:[is.SetFont,"-tex-mathit"],bf:[is.SetFont,as.BOLD],sf:[is.SetFont,as.SANSSERIF],tt:[is.SetFont,as.MONOSPACE],frak:[is.TextFont,as.FRAKTUR],Bbb:[is.TextFont,as.DOUBLESTRUCK],tiny:[is.SetSize,.5],Tiny:[is.SetSize,.6],scriptsize:[is.SetSize,.7],small:[is.SetSize,.85],normalsize:[is.SetSize,1],large:[is.SetSize,1.2],Large:[is.SetSize,1.44],LARGE:[is.SetSize,1.73],huge:[is.SetSize,2.07],Huge:[is.SetSize,2.49],textnormal:[is.Macro,"{\\rm #1}",1],textup:[is.Macro,"{\\rm #1}",1],textrm:[is.Macro,"{\\rm #1}",1],textit:[is.Macro,"{\\it #1}",1],textbf:[is.Macro,"{\\bf #1}",1],textsf:[is.Macro,"{\\sf #1}",1],texttt:[is.Macro,"{\\tt #1}",1],dagger:[is.Insert,"\u2020"],ddagger:[is.Insert,"\u2021"],S:[is.Insert,"\xa7"],AA:[is.Insert,"\u212b"],ldots:[is.Insert,"\u2026"],vdots:[is.Insert,"\u22ee"],",":[is.Spacer,Ve.thinmathspace],":":[is.Spacer,Ve.mediummathspace],">":[is.Spacer,Ve.mediummathspace],";":[is.Spacer,Ve.thickmathspace],"!":[is.Spacer,Ve.negativethinmathspace],enspace:[is.Spacer,.5],quad:[is.Spacer,1],qquad:[is.Spacer,2],thinspace:[is.Spacer,Ve.thinmathspace],negthinspace:[is.Spacer,Ve.negativethinmathspace],hskip:is.Hskip,hspace:is.Hskip,kern:is.Hskip,mskip:is.Hskip,mspace:is.Hskip,mkern:is.Hskip,rule:is.rule,Rule:[is.Rule],Space:[is.Rule,"blank"],color:is.CheckAutoload,textcolor:is.CheckAutoload,colorbox:is.CheckAutoload,fcolorbox:is.CheckAutoload,href:is.CheckAutoload,style:is.CheckAutoload,class:is.CheckAutoload,data:is.CheckAutoload,cssId:is.CheckAutoload,unicode:is.CheckAutoload,U:is.CheckAutoload,char:is.CheckAutoload,ref:[is.HandleRef,!1],eqref:[is.HandleRef,!0],underline:[is.UnderOver,"2015"],llap:is.Lap,rlap:is.Lap,phantom:is.Phantom,vphantom:[is.Phantom,1,0],hphantom:[is.Phantom,0,1],smash:is.Smash,mmlToken:is.MmlToken});const os=pe.create("text-base",{[At.PARSER]:"text",[At.PRIORITY]:1,[At.HANDLER]:{[yt.CHARACTER]:["command","text-special"],[yt.MACRO]:["text-macros"]},[At.FALLBACK]:{[yt.CHARACTER]:(t,e)=>{t.text+=e},[yt.MACRO]:(t,e)=>{const r=t.texParser,s=r.lookup(yt.MACRO,e);s&&s._func!==is.Macro&&t.Error("MathMacro","%1 is only supported in math mode","\\"+e),r.parse(yt.MACRO,[t,e])}},[At.ITEMS]:{[ke.prototype.kind]:ke,[we.prototype.kind]:we,[Ge.prototype.kind]:Ge,[Re.prototype.kind]:Re}});function cs(t,e,r,s){const n=t.configuration.packageData.get("textmacros");return t instanceof rs||(n.texParser=t),n.parseOptions.clear(),[new rs(e,s?{mathvariant:s}:{},n.parseOptions,r).mml()]}const ls=pe.create("textmacros",{[At.PRIORITY]:1,[At.CONFIG]:(t,e)=>{const r=new Ae(e.parseOptions.options.textmacros.packages,["tex","text"]);r.init();const s=new Ut(r,[]);s.options=e.parseOptions.options,r.config(e),Yt.addTags(r.tags),s.tags=Yt.getDefault(),s.tags.configuration=s,s.packageData=e.parseOptions.packageData,s.packageData.set("textmacros",{textConf:r,parseOptions:s,jax:e,texParser:null}),s.options.internalMath=cs},[At.PREPROCESSORS]:[t=>{const e=t.data.packageData.get("textmacros");e.parseOptions.nodeFactory.setMmlFactory(e.jax.mmlFactory)}],[At.OPTIONS]:{textmacros:{packages:["text-base"]}}});MathJax.loader&&MathJax.loader.checkVersion("input/tex","4.1.0","input"),H({_:{input:{tex_ts:P,tex:{ColumnParser:g,Configuration:v,FilterUtil:n,FindTeX:e,HandlerTypes:i,MapHandler:y,NodeFactory:d,NodeUtil:r,ParseMethods:M,ParseOptions:p,ParseUtil:u,Stack:o,StackItem:l,StackItemFactory:m,Tags:f,TexConstants:s,TexError:c,TexParser:h,Token:b,TokenMap:A,UnitUtil:a,ams:{AmsConfiguration:N,AmsItems:T,AmsMethods:E},autoload:{AutoloadConfiguration:F},base:{BaseConfiguration:x,BaseItems:k,BaseMethods:w},configmacros:{ConfigMacrosConfiguration:R},newcommand:{NewcommandConfiguration:I,NewcommandItems:S,NewcommandMethods:O,NewcommandUtil:C},noundefined:{NoUndefinedConfiguration:D},require:{RequireConfiguration:L},textmacros:{TextMacrosConfiguration:q,TextMacrosMethods:G,TextParser:B}}}}}),Dr.preLoaded("input/tex-base","[tex]/ams","[tex]/newcommand","[tex]/textmacros","[tex]/noundefined","[tex]/require","[tex]/autoload","[tex]/configmacros"),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)))}),z(MathJax.config.tex,{packages:r}))}}(["base","ams","newcommand","textmacros","noundefined","require","autoload","configmacros"])})();
@@ -0,0 +1 @@
1
+ (()=>{"use strict";var e={d:(t,n)=>{for(var s in n)e.o(n,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:n[s]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var t={};e.r(t),e.d(t,{Package:()=>x,PackageError:()=>p});var n={};e.r(n),e.d(n,{CONFIG:()=>L,Loader:()=>v,MathJax:()=>w,PathFilters:()=>g});const s="4.1.0",o={},a="undefined"!=typeof window?window:void 0!==e.g?e.g:"undefined"!=typeof globalThis?globalThis:o;function i(e){return"object"==typeof e&&null!==e}function r(e,t,n=!1){var s;for(const o of Object.keys(t))"__esModule"!==o&&e[o]!==t[o]&&null!==t[o]&&void 0!==t[o]&&(i(e[o])&&i(t[o])?r(e[o],t[o],n||"_"===o):n&&(null===(s=Object.getOwnPropertyDescriptor(e,o))||void 0===s?void 0:s.get)||(e[o]=t[o]));return e}function d(e,t,n){e[t]||(e[t]={}),e=e[t];for(const t of Object.keys(n))i(e[t])&&i(n[t])?d(e,t,n[t]):null==e[t]&&null!=n[t]&&(e[t]=n[t]);return e}function c(e){return r(h,e)}void 0!==a.MathJax&&a.MathJax.constructor==={}.constructor||(a.MathJax={}),a.MathJax.version||(a.MathJax={version:s,_:{},config:a.MathJax});const h=a.MathJax,l="undefined"!=typeof window,u={window:l?window:null,document:l?window.document:null,os:(()=>{if(l&&window.navigator){const e=window.navigator.appVersion,t=[["Win","Windows"],["Mac","MacOS"],["X11","Unix"],["Linux","Unix"]];for(const[n,s]of t)if(e.includes(n))return s;if(window.navigator.userAgent.includes("Android"))return"Unix"}else if("undefined"!=typeof process)return{linux:"Unix",android:"Unix",aix:"Unix",freebsd:"Unix",netbsd:"Unix",openbsd:"Unix",sunos:"Unix",darwin:"MacOS",win32:"Windows",cygwin:"Windows"}[process.platform]||process.platform;return"unknown"})(),path:e=>e};"Windows"===u.os&&(u.path=e=>e.match(/^[/\\]?[a-zA-Z]:[/\\]/)?e.replace(/\\/g,"/").replace(/^\//,""):e);class p extends Error{constructor(e,t){super(e),this.package=t}}class x{get canLoad(){return 0===this.dependencyCount&&!this.noLoad&&!this.isLoading&&!this.hasFailed}static loadPromise(e){const t=L[e]||{},n=t.extraLoads?v.load(...t.extraLoads):Promise.resolve(),s=t.checkReady||(()=>Promise.resolve());return n.then((()=>s()))}static resolvePath(e,t=!0){const n={name:e,original:e,addExtension:t};return v.pathFilters.execute(n),n.name}static loadAll(){for(const e of this.packages.values())e.canLoad&&e.load()}constructor(e,t=!1){this.isLoaded=!1,this.result={},this.isLoading=!1,this.hasFailed=!1,this.dependents=[],this.dependencies=[],this.dependencyCount=0,this.provided=[],this.name=e,this.noLoad=t,x.packages.set(e,this),this.promise=this.makePromise(this.makeDependencies())}makeDependencies(){const e=[],t=x.packages,n=this.noLoad,s=this.name,o=[];Object.hasOwn(L.dependencies,s)?o.push(...L.dependencies[s]):"core"!==s&&o.push("core");for(const s of o){const o=t.get(s)||new x(s,n);this.dependencies.includes(o)||(o.addDependent(this,n),this.dependencies.push(o),o.isLoaded||(this.dependencyCount++,e.push(o.promise)))}return e}makePromise(e){let t=new Promise(((e,t)=>{this.resolve=e,this.reject=t}));const n=L[this.name]||{};return n.ready&&(t=t.then((e=>n.ready(this.name)))),e.length&&(e.push(t),t=Promise.all(e).then((e=>e.join(", ")))),n.failed&&t.catch((e=>n.failed(new p(e,this.name)))),t}load(){if(!this.isLoaded&&!this.isLoading&&!this.noLoad){this.isLoading=!0;const e=x.resolvePath(this.name);L.require?this.loadCustom(e):this.loadScript(e)}}loadCustom(e){try{const t=L.require(e);t instanceof Promise?t.then((e=>this.result=e)).then((()=>this.checkLoad())).catch((t=>this.failed("Can't load \""+e+'"\n'+t.message.trim()))):(this.result=t,this.checkLoad())}catch(e){this.failed(e.message)}}loadScript(e){const t=u.document.createElement("script");t.src=e,t.charset="UTF-8",t.onload=e=>this.checkLoad(),t.onerror=t=>this.failed("Can't load \""+e+'"'),u.document.head.appendChild(t)}loaded(){this.isLoaded=!0,this.isLoading=!1;for(const e of this.dependents)e.requirementSatisfied();for(const e of this.provided)e.loaded();this.resolve(this.name)}failed(e){this.hasFailed=!0,this.isLoading=!1,this.reject(new p(e,this.name))}checkLoad(){x.loadPromise(this.name).then((()=>this.loaded())).catch((e=>this.failed(e)))}requirementSatisfied(){this.dependencyCount&&(this.dependencyCount--,this.canLoad&&this.load())}provides(e=[]){for(const t of e){let e=x.packages.get(t);e||(L.dependencies[t]||(L.dependencies[t]=[]),L.dependencies[t].push(t),e=new x(t,!0),e.isLoading=!0),this.provided.push(e)}}addDependent(e,t){this.dependents.push(e),t||this.checkNoLoad()}checkNoLoad(){if(this.noLoad){this.noLoad=!1;for(const e of this.dependencies)e.checkNoLoad()}}}x.packages=new Map;class m{constructor(){this.items=[],this.items=[]}[Symbol.iterator](){let e=0;const t=this.items;return{next:()=>({value:t[e++],done:e>t.length})}}add(e,t=m.DEFAULTPRIORITY){let n=this.items.length;do{n--}while(n>=0&&t<this.items[n].priority);return this.items.splice(n+1,0,{item:e,priority:t}),e}remove(e){let t=this.items.length;do{t--}while(t>=0&&this.items[t].item!==e);return t>=0&&this.items.splice(t,1),this}}m.DEFAULTPRIORITY=5;const f=h.config||{};var b=function(e,t,n,s){return new(n||(n=Promise))((function(o,a){function i(e){try{d(s.next(e))}catch(e){a(e)}}function r(e){try{d(s.throw(e))}catch(e){a(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,r)}d((s=s.apply(e,t||[])).next())}))};const g={source:e=>(Object.hasOwn(L.source,e.name)&&(e.name=L.source[e.name]),!0),normalize:e=>{const t=e.name;return t.match(/^(?:[a-z]+:\/)?\/|[a-z]:[/\\]|\[/i)||(e.name="[mathjax]/"+t.replace(/^\.\//,"")),!0},prefix:e=>{let t;for(;(t=e.name.match(/^\[([^\]]*)\]/))&&Object.hasOwn(L.paths,t[1]);)e.name=L.paths[t[1]]+e.name.substring(t[0].length);return!0},addExtension:e=>(e.addExtension&&!e.name.match(/\.[^/]+$/)&&(e.name+=".js"),!0)},y=h.version,v={versions:new Map,nestedLoads:[],ready(...e){0===e.length&&(e=Array.from(x.packages.keys()));const t=[];for(const n of e){const e=x.packages.get(n)||new x(n,!0);t.push(e.promise)}return Promise.all(t)},load(...e){if(0===e.length)return Promise.resolve([]);let t=[];this.nestedLoads.unshift(t);const n=Promise.resolve().then((()=>b(this,void 0,void 0,(function*(){const n=[];for(const t of e){let e=x.packages.get(t);e||(e=new x(t),e.provides(L.provides[t])),e.checkNoLoad(),n.push(e.promise.then((()=>(L.versionWarnings&&e.isLoaded&&!v.versions.has(x.resolvePath(t))&&console.warn(`No version information available for component ${t}`),e.result))))}x.loadAll();const s=yield Promise.all(n);for(;t.length;){const e=Promise.all(t);t=this.nestedLoads[this.nestedLoads.indexOf(t)]=[],yield e}return this.nestedLoads.splice(this.nestedLoads.indexOf(t),1),s}))));return this.nestedLoads.slice(1).forEach((e=>e.push(n))),n},preLoaded(...e){for(const t of e){let e=x.packages.get(t);e||(e=new x(t,!0),e.provides(L.provides[t])),e.loaded()}},addPackageData(e,t){let n=L[e];n||(n=L[e]={});for(const[e,s]of Object.entries(t))if(Array.isArray(s)){n[e]||(n[e]=[]);const t=new Set([...n[e],...s]);n[e]=[...t]}else n[e]=s},defaultReady(){void 0!==w.startup&&w.config.startup.ready()},getRoot(){if(u.document){const e=u.document.currentScript||u.document.getElementById("MathJax-script");if(e&&e instanceof HTMLScriptElement)return e.src.replace(/\/[^/]*$/,"")}return f?.loader?.paths?.mathjax||f?.__dirname||"/"},checkVersion(e,t,n){return this.saveVersion(e),!(!L.versionWarnings||t===y)&&(console.warn(`Component ${e} uses ${t} of MathJax; version in use is ${y}`),!0)},saveVersion(e){v.versions.set(x.resolvePath(e),y)},pathFilters:new class extends m{constructor(e=null){super(),e&&this.addList(e)}addList(e){for(const t of e)Array.isArray(t)?this.add(t[0],t[1]):this.add(t)}execute(...e){for(const t of this){if(!1===t.item(...e))return!1}return!0}asyncExecute(...e){let t=-1;const n=this.items;return new Promise(((s,o)=>{!function a(){for(;++t<n.length;){const i=n[t].item(...e);if(i instanceof Promise)return void i.then(a).catch((e=>o(e)));if(!1===i)return void s(!1)}s(!0)}()}))}}};v.pathFilters.add(g.source,0),v.pathFilters.add(g.normalize,10),v.pathFilters.add(g.prefix,20),v.pathFilters.add(g.addExtension,30);const w=h;if(void 0===w.loader){d(w.config,"loader",{paths:{mathjax:v.getRoot(),fonts:u.window?"https://cdn.jsdelivr.net/npm/@mathjax":"@mathjax"},source:{},dependencies:{},provides:{},load:[],ready:v.defaultReady.bind(v),failed:e=>console.log(`MathJax(${e.package||"?"}): ${e.message}`),require:null,pathFilters:[],versionWarnings:!0}),c({loader:v});for(const e of w.config.loader.pathFilters)Array.isArray(e)?v.pathFilters.add(e[0],e[1]):v.pathFilters.add(e)}const L=w.config.loader;MathJax.loader&&MathJax.loader.checkVersion("loader",s,"loader"),c({_:{components:{loader:n,package:t}}});d(MathJax.config.loader,"dependencies",{"a11y/semantic-enrich":["input/mml","a11y/sre"],"a11y/speech":["a11y/semantic-enrich"],"a11y/complexity":["a11y/semantic-enrich"],"a11y/explorer":["a11y/speech"],"[mml]/mml3":["input/mml"],"[tex]/action":["input/tex-base"],"[tex]/ams":["input/tex-base","[tex]/newcommand"],"[tex]/amscd":["input/tex-base"],"[tex]/autoload":["input/tex-base","[tex]/require"],"[tex]/bbm":["input/tex-base"],"[tex]/bboldx":["input/tex-base","[tex]/textmacros"],"[tex]/bbox":["input/tex-base"],"[tex]/begingroup":["input/tex-base","[tex]/newcommand"],"[tex]/boldsymbol":["input/tex-base"],"[tex]/braket":["input/tex-base"],"[tex]/bussproofs":["input/tex-base"],"[tex]/cancel":["input/tex-base","[tex]/enclose"],"[tex]/cases":["[tex]/empheq"],"[tex]/centernot":["input/tex-base"],"[tex]/color":["input/tex-base"],"[tex]/colortbl":["input/tex-base","[tex]/color"],"[tex]/colorv2":["input/tex-base"],"[tex]/configmacros":["input/tex-base","[tex]/newcommand"],"[tex]/dsfont":["input/tex-base"],"[tex]/empheq":["input/tex-base","[tex]/ams"],"[tex]/enclose":["input/tex-base"],"[tex]/extpfeil":["input/tex-base","[tex]/newcommand","[tex]/ams"],"[tex]/gensymb":["input/tex-base"],"[tex]/html":["input/tex-base"],"[tex]/mathtools":["input/tex-base","[tex]/newcommand","[tex]/ams","[tex]/boldsymbol"],"[tex]/mhchem":["input/tex-base","[tex]/ams"],"[tex]/newcommand":["input/tex-base"],"[tex]/noerrors":["input/tex-base"],"[tex]/noundefined":["input/tex-base"],"[tex]/physics":["input/tex-base"],"[tex]/require":["input/tex-base"],"[tex]/setoptions":["input/tex-base"],"[tex]/tagformat":["input/tex-base"],"[tex]/texhtml":["input/tex-base"],"[tex]/textcomp":["input/tex-base","[tex]/textmacros"],"[tex]/textmacros":["input/tex-base"],"[tex]/unicode":["input/tex-base"],"[tex]/units":["input/tex-base"],"[tex]/upgreek":["input/tex-base"],"[tex]/verb":["input/tex-base"],"ui/menu":["a11y/sre"]}),d(MathJax.config.loader,"paths",{tex:"[mathjax]/input/tex/extensions",mml:"[mathjax]/input/mml/extensions",sre:"[mathjax]/sre",mathmaps:"[sre]/mathmaps"}),d(MathJax.config.loader,"provides",{startup:["loader"],"input/tex":["input/tex-base","[tex]/ams","[tex]/newcommand","[tex]/textmacros","[tex]/noundefined","[tex]/require","[tex]/autoload","[tex]/configmacros"]}),v.load(...L.load).then((()=>L.ready())).catch(((e,t)=>L.failed(e,t)))})();