@marimo-team/islands 0.25.1-dev4 → 0.25.1-dev40

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 (274) hide show
  1. package/dist/{ConnectedDataExplorerComponent-KVhjDMSe.js → ConnectedDataExplorerComponent-CwMXfDQR.js} +3 -3
  2. package/dist/{ErrorBoundary-pV36lYEK.js → ErrorBoundary-CAJO-M56.js} +1 -1
  3. package/dist/{ImageComparisonComponent-Dlm5aWnH.js → ImageComparisonComponent-Cpfz30OZ.js} +51 -52
  4. package/dist/{abnfDiagram-VCTEODGH-CpN0FRda.js → abnfDiagram-VCTEODGH-AFhOQTt8.js} +3 -3
  5. package/dist/{architectureDiagram-5GKGNRK7-DDyj5SRB.js → architectureDiagram-5GKGNRK7-BngksAAQ.js} +5 -5
  6. package/dist/{blockDiagram-I7D4REHJ-BbXEXJRu.js → blockDiagram-I7D4REHJ-CvBmppdy.js} +9 -9
  7. package/dist/{c4Diagram-7LVT6UL2-DcLsbQmR.js → c4Diagram-7LVT6UL2-EceL4_jH.js} +7 -7
  8. package/dist/{cells-B5-y5EY3.js → cells-Cv93oav_.js} +3 -3
  9. package/dist/{channel-B5XnTarr.js → channel-z7HZXHwv.js} +1 -1
  10. package/dist/{chat-ui-HJZsTl7o.js → chat-ui-DLSF8a04.js} +4 -4
  11. package/dist/{chunk-4HAMMTFA-D2qv8E0X.js → chunk-4HAMMTFA-BPTTOOC5.js} +5 -5
  12. package/dist/{chunk-75Z2AOVW-5_HsvXwr.js → chunk-75Z2AOVW-C4AOleKf.js} +1 -1
  13. package/dist/{chunk-DU6HZSFF-BUgAHvnM.js → chunk-DU6HZSFF-1TwWR6gh.js} +1 -1
  14. package/dist/{chunk-F27PBJKO-DHmYWZXr.js → chunk-F27PBJKO-DMI1PBe4.js} +1 -1
  15. package/dist/{chunk-GMAD6QVW-Czynz8aA.js → chunk-GMAD6QVW-vStrMz2P.js} +3 -3
  16. package/dist/{chunk-GVQU2GXP-yQEdulRS.js → chunk-GVQU2GXP-2HwWgs4u.js} +2 -2
  17. package/dist/{chunk-IMKFNOWR-BfwTebD0.js → chunk-IMKFNOWR-UOVZuZVn.js} +5 -5
  18. package/dist/{chunk-L3NEJ4N5-DwRWnDDK.js → chunk-L3NEJ4N5-RhC7i0I2.js} +5 -5
  19. package/dist/{chunk-OSK3NFVY-BBKU_Ign.js → chunk-OSK3NFVY-CZV09N-U.js} +6 -6
  20. package/dist/{chunk-P2QGCYS3-C0iGU29N.js → chunk-P2QGCYS3-0TAWai9C.js} +1 -1
  21. package/dist/{chunk-POPQ4Y6H-BCbS3Ozc.js → chunk-POPQ4Y6H-Cc3_56GX.js} +1 -1
  22. package/dist/{chunk-PWAF6VOD-CTFCL0jI.js → chunk-PWAF6VOD-lNxB9k8z.js} +1 -1
  23. package/dist/{chunk-SHT3W25Y-BspJEJ5H.js → chunk-SHT3W25Y-CrEPyWy1.js} +7 -7
  24. package/dist/{chunk-SVP7TREG-DX3rFNTe.js → chunk-SVP7TREG-uIyyySp6.js} +2 -2
  25. package/dist/{chunk-TICWLB2K-fVF7Uujg.js → chunk-TICWLB2K-DdXM3eg6.js} +5 -5
  26. package/dist/classDiagram-ZZMXUADV-BiATbBE4.js +30 -0
  27. package/dist/classDiagram-v2-VYDZK3BY-JnH97GYw.js +30 -0
  28. package/dist/{code-visibility-CgZS2a3W.js → code-visibility-XU9RAJNV.js} +2 -2
  29. package/dist/{common-DnMDPPaW.js → common-C0fbrgB8.js} +13 -13
  30. package/dist/{cynefinDiagram-5FMLGOSQ-CFQrqzSX.js → cynefinDiagram-5FMLGOSQ-zknaAsGy.js} +3 -3
  31. package/dist/{dagre-GXQ25YYZ-xHNAUTyG.js → dagre-GXQ25YYZ-BhMOoMGJ.js} +10 -10
  32. package/dist/{data-grid-overlay-editor-hHYgD_Sm.js → data-grid-overlay-editor-BnhbJgoq.js} +1 -1
  33. package/dist/{diagram-S7CK7UJ4-Bt1rPbAx.js → diagram-S7CK7UJ4-V5-Z-EDY.js} +4 -4
  34. package/dist/{diagram-UQ7AKVKN-D1sq5FoZ.js → diagram-UQ7AKVKN-qw8AjDal.js} +3 -3
  35. package/dist/{diagram-VSXAHHWV-BKpmG23x.js → diagram-VSXAHHWV-CR7BJygZ.js} +2 -2
  36. package/dist/{diagram-VX7I27RA-BMwGFVD6.js → diagram-VX7I27RA-DfuqFb1E.js} +5 -5
  37. package/dist/{diagram-Z3DM3KII--KLDR9Pl.js → diagram-Z3DM3KII-DpWwlYZB.js} +3 -3
  38. package/dist/{dist-BaHjhkpZ.js → dist-CcyKTBTF.js} +1 -1
  39. package/dist/{ebnfDiagram-PWID7BFC-WnG4cvSQ.js → ebnfDiagram-PWID7BFC-C20OnNMZ.js} +3 -3
  40. package/dist/{erDiagram-RLTQ6QDP-DhzKiYHc.js → erDiagram-RLTQ6QDP-DBXLWO9v.js} +12 -12
  41. package/dist/{error-entries-Bkbpx0T0.js → error-entries-DLl0XqoW.js} +1 -1
  42. package/dist/{feedback-button-CvKssdG_.js → feedback-button-B0QSkbSp.js} +4 -4
  43. package/dist/flowDiagram-HODETNUW-DL52nMkt.js +16 -0
  44. package/dist/{formats-C8rLgZT9.js → formats-Cl_67ghI.js} +1 -1
  45. package/dist/{ganttDiagram-EL5Y4UJY-DbzEBLbl.js → ganttDiagram-EL5Y4UJY-cRRaDt88.js} +2 -2
  46. package/dist/{gitGraphDiagram-WWUBYQGX-BMf0iKi1.js → gitGraphDiagram-WWUBYQGX-Pox5k9-Y.js} +2 -2
  47. package/dist/{glide-data-editor-Ohetlgag.js → glide-data-editor-ymIQdwrb.js} +3 -3
  48. package/dist/{globals-CPNNcOJI.js → globals-B0S3-e_D.js} +1 -1
  49. package/dist/{html-to-image-BAgJOlSW.js → html-to-image-CGVgroef.js} +2 -2
  50. package/dist/{infoDiagram-27XIBGKW-BagtCX_5.js → infoDiagram-27XIBGKW-ntpxMfrq.js} +2 -2
  51. package/dist/{ishikawaDiagram-5VMMS53U-DByDehYy.js → ishikawaDiagram-5VMMS53U-BllIlHE5.js} +3 -3
  52. package/dist/{journeyDiagram-3NMN7TZE-D2LcKDUO.js → journeyDiagram-3NMN7TZE-EPJDPlt0.js} +2 -2
  53. package/dist/{kanban-definition-UXKFOSKX-BxwkbBI_.js → kanban-definition-UXKFOSKX-GYtNMjtS.js} +9 -9
  54. package/dist/{katex-C6D4cX_N.js → katex-BNCmKUol.js} +983 -1120
  55. package/dist/{loader-D2W4oM-3.js → loader-DEZSzvma.js} +253 -248
  56. package/dist/main.js +72 -69
  57. package/dist/{mermaid-DPNuhemn.js → mermaid-Dnzoxjt1.js} +49 -49
  58. package/dist/{mhchem-DWCF06w9.js → mhchem-BEc7A1or.js} +1 -1
  59. package/dist/{mindmap-definition-YA3MSWOX-Cgvojw3y.js → mindmap-definition-YA3MSWOX-Cth76xgH.js} +11 -11
  60. package/dist/{number-overlay-editor-CHWg5gGO.js → number-overlay-editor-DB3HJDI1.js} +1 -1
  61. package/dist/{pegDiagram-XKGWAZYB-DahHhYyN.js → pegDiagram-XKGWAZYB-Cu4uOXii.js} +3 -3
  62. package/dist/{pieDiagram-E7YTZNPT-CCtX0oCK.js → pieDiagram-E7YTZNPT-Bh3eDa9s.js} +3 -3
  63. package/dist/{process-output-zDX4jbhd.js → process-output-CGfg-JmZ.js} +2 -2
  64. package/dist/{quadrantDiagram-AXDQQJYC-DftINo6g.js → quadrantDiagram-AXDQQJYC--kqzFC3w.js} +1 -1
  65. package/dist/{railroadDiagram-O6MQD6OU-Du5NsPUb.js → railroadDiagram-O6MQD6OU-DG-M6Rnc.js} +3 -3
  66. package/dist/{react-vega-5AcMW8gG.js → react-vega-ewj7q_U5.js} +1 -1
  67. package/dist/{requirementDiagram-BXWQKSXE-0pmmxL6_.js → requirementDiagram-BXWQKSXE-DCwsThh0.js} +11 -11
  68. package/dist/{reveal-component-BujcZI2B.js → reveal-component-CfTzIkA2.js} +3 -3
  69. package/dist/{sankeyDiagram-P5KCCOFB-CDKR5TJH.js → sankeyDiagram-P5KCCOFB-BdzhT0BM.js} +1 -1
  70. package/dist/{sequenceDiagram-WJ2MYXX4-DB-ChWwU.js → sequenceDiagram-WJ2MYXX4-CbXB1_PU.js} +4 -4
  71. package/dist/{stateDiagram-D77RDMKH-orN6AwMx.js → stateDiagram-D77RDMKH-A-Zf3Sb2.js} +13 -13
  72. package/dist/stateDiagram-v2-MP3YSRHH-D9YMnUGx.js +30 -0
  73. package/dist/style.css +1 -1
  74. package/dist/{swimlanes-42K2YHIH-BkSDcqDT.js → swimlanes-42K2YHIH-B_pMf0J4.js} +10 -10
  75. package/dist/swimlanesDiagram-VR7AAH4N-Ctgy-yGP.js +30 -0
  76. package/dist/{timeline-definition-24CTP7MA-BuqJUIRZ.js → timeline-definition-24CTP7MA-DTXFjTTM.js} +3 -3
  77. package/dist/{vega-component-CNf5gcrm.js → vega-component-tFOzgarw.js} +4 -4
  78. package/dist/{vega-embed-container-CbnTccZi.js → vega-embed-container-sSR5hAsy.js} +2 -2
  79. package/dist/{vega-loader.browser-D95WfUcj.js → vega-loader.browser-DNST6uVf.js} +2 -2
  80. package/dist/{vennDiagram-4TSXK5OY-CTUlJ2PK.js → vennDiagram-4TSXK5OY-BPHjZo0R.js} +3 -3
  81. package/dist/{wardleyDiagram-VM6X3IG4-3evLUb0M.js → wardleyDiagram-VM6X3IG4-6fTLYBuD.js} +3 -3
  82. package/dist/{xychartDiagram-S5SC5T6Z-DL2E3K8-.js → xychartDiagram-S5SC5T6Z-BYjwjrzE.js} +5 -5
  83. package/package.json +1 -2
  84. package/src/__mocks__/common.ts +3 -3
  85. package/src/__tests__/CellStatus.test.tsx +1 -1
  86. package/src/__tests__/setup.ts +7 -7
  87. package/src/components/app-config/ai-config.tsx +2 -0
  88. package/src/components/app-config/optional-features.tsx +1 -1
  89. package/src/components/chat/chat-panel.tsx +19 -8
  90. package/src/components/data-table/charts/__tests__/chart-panel.test.tsx +286 -0
  91. package/src/components/data-table/charts/charts.tsx +26 -13
  92. package/src/components/data-table/column-summary/chart-spec-model.tsx +4 -4
  93. package/src/components/dependency-graph/elements.ts +2 -2
  94. package/src/components/editor/__tests__/package-alert.test.tsx +140 -0
  95. package/src/components/editor/actions/__tests__/pair-with-agent.test.tsx +107 -0
  96. package/src/components/editor/actions/pair-with-agent.tsx +119 -0
  97. package/src/components/editor/actions/useNotebookActions.tsx +2 -1
  98. package/src/components/editor/ai/add-cell-with-ai.tsx +2 -0
  99. package/src/components/editor/ai/staged-cell-submission.ts +2 -2
  100. package/src/components/editor/ai/transport/chat-transport.tsx +1 -1
  101. package/src/components/editor/chrome/components/contribute-snippet-button.tsx +6 -1
  102. package/src/components/editor/connections/database/as-code.ts +44 -44
  103. package/src/components/editor/connections/storage/as-code.ts +3 -3
  104. package/src/components/editor/file-tree/requesting-tree.tsx +16 -13
  105. package/src/components/editor/navigation/clipboard.ts +2 -2
  106. package/src/components/editor/notebook-cell.tsx +2 -2
  107. package/src/components/editor/output/MarimoTracebackOutput.tsx +1 -1
  108. package/src/components/editor/output/VideoOutput.tsx +1 -1
  109. package/src/components/editor/output/ansi-reduce.ts +21 -17
  110. package/src/components/editor/output/console/ConsoleOutput.tsx +3 -3
  111. package/src/components/editor/output/console/__tests__/ConsoleOutput.test.tsx +59 -0
  112. package/src/components/editor/output/console/text-rendering.tsx +3 -1
  113. package/src/components/editor/package-alert.tsx +20 -7
  114. package/src/components/home/components.tsx +1 -0
  115. package/src/components/pages/run-page.tsx +1 -0
  116. package/src/components/slides/__tests__/minimap-actions.test.tsx +7 -7
  117. package/src/components/slides/__tests__/minimap.test.ts +12 -12
  118. package/src/components/slides/__tests__/slide-scroll-hint.test.tsx +8 -8
  119. package/src/components/static-html/share-modal.tsx +2 -1
  120. package/src/components/static-html/static-banner.tsx +2 -2
  121. package/src/components/ui/links.tsx +6 -1
  122. package/src/components/ui/typography.tsx +16 -8
  123. package/src/core/ai/context/__tests__/registry.test.ts +31 -28
  124. package/src/core/ai/context/providers/cell-output.ts +8 -8
  125. package/src/core/ai/context/providers/datasource.ts +10 -7
  126. package/src/core/ai/context/providers/error.ts +7 -7
  127. package/src/core/ai/context/providers/file.ts +8 -8
  128. package/src/core/ai/context/providers/tables.ts +7 -7
  129. package/src/core/ai/context/providers/variable.ts +7 -7
  130. package/src/core/ai/context/registry.ts +18 -18
  131. package/src/core/ai/ids/ids.ts +5 -5
  132. package/src/core/ai/model-registry.ts +12 -9
  133. package/src/core/ai/staged-cells.ts +6 -6
  134. package/src/core/ai/tools/base.ts +6 -6
  135. package/src/core/ai/tools/edit-notebook-tool.ts +6 -6
  136. package/src/core/ai/tools/registry.ts +4 -4
  137. package/src/core/ai/tools/run-cells-tool.ts +7 -7
  138. package/src/core/ai/tools/sample-tool.ts +6 -6
  139. package/src/core/cells/__tests__/cells.test.ts +27 -0
  140. package/src/core/cells/cells.ts +2 -1
  141. package/src/core/codemirror/cells/debugger-decorations.ts +13 -7
  142. package/src/core/codemirror/cells/line-timing-decorations.ts +9 -9
  143. package/src/core/codemirror/cells/traceback-decorations.ts +7 -4
  144. package/src/core/codemirror/code-lens/extension.ts +13 -13
  145. package/src/core/codemirror/copilot/__tests__/language-server.test.ts +6 -6
  146. package/src/core/codemirror/copilot/__tests__/transport.test.ts +12 -12
  147. package/src/core/codemirror/copilot/language-server.ts +13 -13
  148. package/src/core/codemirror/copilot/transport.ts +1 -1
  149. package/src/core/codemirror/find-replace/search-highlight.ts +5 -5
  150. package/src/core/codemirror/go-to-definition/underline.ts +3 -3
  151. package/src/core/codemirror/keymaps/vim.ts +3 -3
  152. package/src/core/codemirror/language/languages/markdown.ts +8 -8
  153. package/src/core/codemirror/language/languages/python.ts +7 -7
  154. package/src/core/codemirror/language/languages/sql/completion-builder.ts +5 -5
  155. package/src/core/codemirror/language/languages/sql/completion-store.ts +4 -4
  156. package/src/core/codemirror/language/languages/sql/sql.ts +21 -21
  157. package/src/core/codemirror/lsp/__tests__/transports.test.ts +10 -10
  158. package/src/core/codemirror/lsp/federated-lsp.ts +29 -27
  159. package/src/core/codemirror/lsp/notebook-lsp.ts +21 -21
  160. package/src/core/codemirror/misc/__tests__/dnd.test.ts +10 -10
  161. package/src/core/codemirror/misc/__tests__/paste.test.ts +7 -4
  162. package/src/core/codemirror/reactive-references/extension.ts +3 -3
  163. package/src/core/codemirror/rtc/loro/awareness.ts +12 -12
  164. package/src/core/codemirror/rtc/loro/sync.ts +5 -5
  165. package/src/core/codemirror/vim/cursor-visibility.ts +3 -3
  166. package/src/core/dom/ui-element.ts +5 -5
  167. package/src/core/dom/uiregistry.ts +10 -10
  168. package/src/core/hotkeys/hotkeys.ts +9 -9
  169. package/src/core/islands/__tests__/bridge.test.ts +4 -4
  170. package/src/core/islands/__tests__/test-utils.tsx +4 -4
  171. package/src/core/islands/bridge.ts +85 -82
  172. package/src/core/islands/components/web-components.tsx +7 -7
  173. package/src/core/islands/worker/__tests__/controller.test.ts +1 -1
  174. package/src/core/islands/worker/controller.ts +6 -3
  175. package/src/core/islands/worker-factory.ts +2 -2
  176. package/src/core/kernel/RuntimeState.ts +4 -4
  177. package/src/core/lsp/__tests__/transport.test.ts +19 -19
  178. package/src/core/lsp/transport.ts +5 -5
  179. package/src/core/network/CachingRequestRegistry.ts +2 -2
  180. package/src/core/network/DeferredRequestRegistry.ts +4 -4
  181. package/src/core/runtime/runtime.ts +25 -20
  182. package/src/core/static/virtual-file-tracker.ts +5 -5
  183. package/src/core/wasm/__tests__/bridge.test.ts +2 -2
  184. package/src/core/wasm/bridge.ts +130 -126
  185. package/src/core/wasm/router.ts +5 -5
  186. package/src/core/wasm/store.ts +4 -4
  187. package/src/core/wasm/worker/bootstrap.ts +8 -5
  188. package/src/core/wasm/worker/message-buffer.ts +3 -3
  189. package/src/core/websocket/transports/__tests__/ws.test.ts +8 -8
  190. package/src/core/websocket/transports/basic.ts +15 -8
  191. package/src/core/websocket/transports/sse.ts +7 -7
  192. package/src/core/websocket/transports/transport.ts +3 -3
  193. package/src/core/websocket/transports/ws.ts +9 -7
  194. package/src/css/globals.css +18 -21
  195. package/src/css/katex.min.css +260 -241
  196. package/src/hooks/__tests__/useOverflowDetection.test.tsx +5 -5
  197. package/src/hooks/__tests__/useResizeObserver.test.tsx +12 -12
  198. package/src/plugins/core/registerReactComponent.tsx +5 -5
  199. package/src/plugins/core/sidebar-element.tsx +2 -2
  200. package/src/plugins/impl/ButtonPlugin.tsx +3 -3
  201. package/src/plugins/impl/CheckboxPlugin.tsx +3 -3
  202. package/src/plugins/impl/CodeEditorPlugin.tsx +3 -3
  203. package/src/plugins/impl/DatePickerPlugin.tsx +3 -3
  204. package/src/plugins/impl/DateRangePlugin.tsx +3 -3
  205. package/src/plugins/impl/DateTimePickerPlugin.tsx +3 -3
  206. package/src/plugins/impl/DictPlugin.tsx +3 -3
  207. package/src/plugins/impl/DropdownPlugin.tsx +3 -3
  208. package/src/plugins/impl/FileUploadPlugin.tsx +3 -3
  209. package/src/plugins/impl/MatrixPlugin.tsx +4 -4
  210. package/src/plugins/impl/MicrophonePlugin.tsx +3 -3
  211. package/src/plugins/impl/MultiselectPlugin.tsx +3 -3
  212. package/src/plugins/impl/NumberPlugin.tsx +3 -3
  213. package/src/plugins/impl/RadioPlugin.tsx +9 -5
  214. package/src/plugins/impl/RangeSliderPlugin.tsx +3 -3
  215. package/src/plugins/impl/RefreshPlugin.tsx +3 -3
  216. package/src/plugins/impl/SliderPlugin.tsx +3 -3
  217. package/src/plugins/impl/SwitchPlugin.tsx +3 -3
  218. package/src/plugins/impl/TabsPlugin.tsx +3 -3
  219. package/src/plugins/impl/TextAreaPlugin.tsx +3 -3
  220. package/src/plugins/impl/TextInputPlugin.tsx +3 -3
  221. package/src/plugins/impl/__tests__/MatrixPlugin.test.tsx +2 -2
  222. package/src/plugins/impl/anywidget/model.ts +10 -10
  223. package/src/plugins/impl/anywidget/registry.ts +12 -9
  224. package/src/plugins/impl/anywidget/runtime.ts +11 -9
  225. package/src/plugins/impl/anywidget/widget-binding.ts +6 -6
  226. package/src/plugins/impl/image-comparison/ImageComparisonComponent.tsx +7 -6
  227. package/src/plugins/impl/matplotlib/MatplotlibPlugin.tsx +3 -3
  228. package/src/plugins/impl/matplotlib/__tests__/matplotlib-renderer.test.ts +2 -2
  229. package/src/plugins/impl/matplotlib/matplotlib-renderer.ts +2 -2
  230. package/src/plugins/impl/mpl-interactive/mpl-websocket-shim.ts +10 -10
  231. package/src/plugins/impl/panel/utils.ts +5 -5
  232. package/src/plugins/impl/plotly/PlotlyPlugin.tsx +3 -3
  233. package/src/plugins/impl/vega/VegaPlugin.tsx +3 -3
  234. package/src/plugins/impl/vega/__tests__/use-vega-container-remeasure.test.ts +7 -7
  235. package/src/plugins/impl/vega/__tests__/utils.test.ts +16 -1
  236. package/src/plugins/impl/vega/__tests__/vega.test.ts +37 -0
  237. package/src/plugins/impl/vega/loader.ts +23 -1
  238. package/src/plugins/impl/vega/utils.ts +5 -4
  239. package/src/plugins/layout/AccordionPlugin.tsx +3 -3
  240. package/src/plugins/layout/CalloutPlugin.tsx +3 -3
  241. package/src/plugins/layout/ImageComparisonPlugin.tsx +5 -3
  242. package/src/plugins/layout/JsonOutputPlugin.tsx +3 -3
  243. package/src/plugins/layout/MimeRenderPlugin.tsx +3 -3
  244. package/src/plugins/layout/NavigationMenuPlugin.tsx +3 -3
  245. package/src/plugins/layout/OutlinePlugin.tsx +3 -3
  246. package/src/plugins/layout/ProgressPlugin.tsx +3 -3
  247. package/src/plugins/layout/RoutesPlugin.tsx +6 -8
  248. package/src/plugins/layout/StatPlugin.tsx +3 -3
  249. package/src/plugins/layout/TexPlugin.tsx +3 -3
  250. package/src/plugins/layout/carousel/CarouselPlugin.tsx +4 -4
  251. package/src/plugins/layout/mermaid/MermaidPlugin.tsx +3 -3
  252. package/src/utils/Deferred.ts +6 -6
  253. package/src/utils/async-capture-tracker.ts +10 -7
  254. package/src/utils/errors.ts +5 -5
  255. package/src/utils/id-tree.tsx +83 -80
  256. package/src/utils/lru.ts +1 -1
  257. package/src/utils/multi-map.ts +14 -12
  258. package/src/utils/paths.ts +6 -6
  259. package/src/utils/pluralize.ts +3 -3
  260. package/src/utils/progress.ts +6 -6
  261. package/src/utils/python-poet/poet.ts +14 -14
  262. package/src/utils/routes.ts +4 -2
  263. package/src/utils/semaphore.ts +6 -6
  264. package/src/utils/storage/storage.ts +6 -6
  265. package/src/utils/storage/typed.ts +16 -12
  266. package/src/utils/time.ts +9 -9
  267. package/src/utils/timed-cache.ts +4 -4
  268. package/src/utils/tracer.ts +9 -6
  269. package/dist/classDiagram-ZZMXUADV-Fe-V14Sc.js +0 -30
  270. package/dist/classDiagram-v2-VYDZK3BY-xTDg7lOs.js +0 -30
  271. package/dist/flowDiagram-HODETNUW-6dMdB8pR.js +0 -16
  272. package/dist/katex-DFBiSucW.js +0 -21840
  273. package/dist/stateDiagram-v2-MP3YSRHH-o05_rJN8.js +0 -30
  274. package/dist/swimlanesDiagram-VR7AAH4N-D_nFQfRc.js +0 -30
@@ -1,20 +1,20 @@
1
1
  import { r as e } from "./rolldown-runtime-Cb76FRpK.js";
2
- //#region ../node_modules/.pnpm/katex@0.16.47/node_modules/katex/dist/katex.mjs
2
+ //#region ../node_modules/.pnpm/katex@0.18.5/node_modules/katex/dist/katex.mjs
3
3
  var t = /* @__PURE__ */ e({
4
4
  ParseError: () => n,
5
5
  SETTINGS_SCHEMA: () => f,
6
6
  __defineFunction: () => J,
7
7
  __defineMacro: () => $,
8
8
  __defineSymbol: () => M,
9
- __domTree: () => ka,
10
- __parse: () => wa,
11
- __renderToDomTree: () => Ea,
12
- __renderToHTMLTree: () => Da,
9
+ __domTree: () => Oa,
10
+ __parse: () => Ca,
11
+ __renderToDomTree: () => Ta,
12
+ __renderToHTMLTree: () => Ea,
13
13
  __setFontMetrics: () => qe,
14
- default: () => Aa,
15
- render: () => Sa,
16
- renderToString: () => Ca,
17
- version: () => Oa
14
+ default: () => ka,
15
+ render: () => xa,
16
+ renderToString: () => Sa,
17
+ version: () => Da
18
18
  }), n = class e extends Error {
19
19
  constructor(t, n) {
20
20
  var r = "KaTeX parse error: " + t, i, a, o = n && n.loc;
@@ -145,11 +145,11 @@ function p(e) {
145
145
  }
146
146
  }
147
147
  function m(e) {
148
- return e.default === void 0 ? p(Array.isArray(e.type) ? e.type[0] : e.type) : e.default;
148
+ return Object.prototype.hasOwnProperty.call(e, "default") && e.default !== void 0 ? e.default : p(Array.isArray(e.type) ? e.type[0] : e.type);
149
149
  }
150
150
  function h(e, t, n, r) {
151
- var i = n[t];
152
- e[t] = i === void 0 ? m(r) : r.processor ? r.processor(i) : i;
151
+ var i = Object.prototype.hasOwnProperty.call(n, t) ? n[t] : void 0, a = Object.prototype.hasOwnProperty.call(r, "processor") ? r.processor : void 0;
152
+ e[t] = i === void 0 ? m(r) : a ? a(i) : i;
153
153
  }
154
154
  var g = class {
155
155
  constructor(e) {
@@ -15228,7 +15228,7 @@ function Xe(e) {
15228
15228
  var t = e >= 5 ? 0 : e >= 3 ? 1 : 2;
15229
15229
  if (!Ye[t]) {
15230
15230
  var n = Ye[t] = { cssEmPerMu: Ge.quad[t] / 18 };
15231
- for (var r in Ge) Ge.hasOwnProperty(r) && (n[r] = Ge[r][t]);
15231
+ for (var r of Object.keys(Ge)) n[r] = Ge[r][t];
15232
15232
  }
15233
15233
  return Ye[t];
15234
15234
  }
@@ -15399,8 +15399,8 @@ var vt = {
15399
15399
  fontName: "Main-Bold",
15400
15400
  fontClass: "mathbf"
15401
15401
  };
15402
- }, Lt = function(e, t, n) {
15403
- var r = e.mode, i = e.text, a = ["mord"], { font: o, fontFamily: s, fontWeight: c, fontShape: l } = t, u = r === "math" || r === "text" && !!o, d = u ? o : s, f = "", p = "";
15402
+ }, Lt = function(e, t) {
15403
+ var n = e.type === "mathord" ? "mathord" : "textord", r = e.mode, i = e.text, a = ["mord"], o = t.font, s = t.fontFamily, c = t.fontWeight, l = t.fontShape, u = r === "math" || r === "text" && !!o, d = u ? o : s, f = "", p = "";
15404
15404
  if (i.charCodeAt(0) === 55349) {
15405
15405
  var m = Mt(i);
15406
15406
  f = m.font, p = m[r + "Class"];
@@ -15417,7 +15417,7 @@ var vt = {
15417
15417
  l
15418
15418
  ]);
15419
15419
  if (Nt(i, h, r).metrics) return Pt(i, h, r, t, a.concat(g));
15420
- if (nt.hasOwnProperty(i) && h.slice(0, 10) === "Typewriter") {
15420
+ if (Object.prototype.hasOwnProperty.call(nt, i) && h.slice(0, 10) === "Typewriter") {
15421
15421
  for (var v = [], y = 0; y < i.length; y++) v.push(Pt(i[y], h, r, t, a.concat(g)));
15422
15422
  return Wt(v);
15423
15423
  }
@@ -15500,34 +15500,34 @@ var vt = {
15500
15500
  depth: c
15501
15501
  };
15502
15502
  }, K = function(e, t) {
15503
- for (var { children: n, depth: r } = Kt(e), i = 0, a = 0; a < n.length; a++) {
15504
- var o = n[a];
15505
- if (o.type === "elem") {
15506
- var s = o.elem;
15507
- i = Math.max(i, s.maxFontSize, s.height);
15503
+ for (var n = Kt(e), r = n.children, i = n.depth, a = 0, o = 0; o < r.length; o++) {
15504
+ var s = r[o];
15505
+ if (s.type === "elem") {
15506
+ var c = s.elem;
15507
+ a = Math.max(a, c.maxFontSize, c.height);
15508
15508
  }
15509
15509
  }
15510
- i += 2;
15511
- var c = G(["pstrut"], []);
15512
- c.style.height = A(i);
15513
- for (var l = [], u = r, d = r, f = r, p = 0; p < n.length; p++) {
15514
- var m = n[p];
15515
- if (m.type === "kern") f += m.size;
15510
+ a += 2;
15511
+ var l = G(["pstrut"], []);
15512
+ l.style.height = A(a);
15513
+ for (var u = [], d = i, f = i, p = i, m = 0; m < r.length; m++) {
15514
+ var h = r[m];
15515
+ if (h.type === "kern") p += h.size;
15516
15516
  else {
15517
- var h = m.elem, g = m.wrapperClasses || [], _ = m.wrapperStyle || {}, v = G(g, [c, h], void 0, _);
15518
- v.style.top = A(-i - f - h.depth), m.marginLeft && (v.style.marginLeft = m.marginLeft), m.marginRight && (v.style.marginRight = m.marginRight), l.push(v), f += h.height + h.depth;
15517
+ var g = h.elem, _ = h.wrapperClasses || [], v = h.wrapperStyle || {}, y = G(_, [l, g], void 0, v);
15518
+ y.style.top = A(-a - p - g.depth), h.marginLeft && (y.style.marginLeft = h.marginLeft), h.marginRight && (y.style.marginRight = h.marginRight), u.push(y), p += g.height + g.depth;
15519
15519
  }
15520
- u = Math.min(u, f), d = Math.max(d, f);
15521
- }
15522
- var y = G(["vlist"], l);
15523
- y.style.height = A(d);
15524
- var b;
15525
- if (u < 0) {
15526
- var x = G(["vlist"], [G([], [])]);
15527
- x.style.height = A(-u), b = [G(["vlist-r"], [y, G(["vlist-s"], [new Le("​")])]), G(["vlist-r"], [x])];
15528
- } else b = [G(["vlist-r"], [y])];
15529
- var S = G(["vlist-t"], b);
15530
- return b.length === 2 && S.classes.push("vlist-t2"), S.height = d, S.depth = -u, S;
15520
+ d = Math.min(d, p), f = Math.max(f, p);
15521
+ }
15522
+ var b = G(["vlist"], u);
15523
+ b.style.height = A(f);
15524
+ var x;
15525
+ if (d < 0) {
15526
+ var S = G(["vlist"], [G([], [])]);
15527
+ S.style.height = A(-d), x = [G(["vlist-r"], [b, G(["vlist-s"], [new Le("​")])]), G(["vlist-r"], [S])];
15528
+ } else x = [G(["vlist-r"], [b])];
15529
+ var C = G(["vlist-t"], x);
15530
+ return x.length === 2 && C.classes.push("vlist-t2"), C.height = f, C.depth = -d, C;
15531
15531
  }, qt = (e, t) => {
15532
15532
  var n = G(["mspace"], [], t), r = k(e, t);
15533
15533
  return n.style.marginRight = A(r), n;
@@ -15625,14 +15625,14 @@ var vt = {
15625
15625
  .659
15626
15626
  ]
15627
15627
  }, Zt = function(e, t) {
15628
- var [n, r, i] = Xt[e], a = Vt(["overlay"], [new Re([new ze(n)], {
15629
- width: A(r),
15630
- height: A(i),
15631
- style: "width:" + A(r),
15632
- viewBox: "0 0 " + 1e3 * r + " " + 1e3 * i,
15628
+ var n = Xt[e], r = n[0], i = n[1], a = n[2], o = Vt(["katex-overlay"], [new Re([new ze(r)], {
15629
+ width: A(i),
15630
+ height: A(a),
15631
+ style: "width:" + A(i),
15632
+ viewBox: "0 0 " + 1e3 * i + " " + 1e3 * a,
15633
15633
  preserveAspectRatio: "xMinYMin"
15634
15634
  })], t);
15635
- return a.height = i, a.style.height = A(i), a.style.width = A(r), a;
15635
+ return o.height = a, o.style.height = A(a), o.style.width = A(i), o;
15636
15636
  }, q = {
15637
15637
  number: 3,
15638
15638
  unit: "mu"
@@ -15706,32 +15706,12 @@ var vt = {
15706
15706
  minner: { mop: q }
15707
15707
  }, nn = {}, rn = {}, an = {};
15708
15708
  function J(e) {
15709
- for (var { type: t, names: n, props: r, handler: i, htmlBuilder: a, mathmlBuilder: o } = e, s = {
15710
- type: t,
15711
- numArgs: r.numArgs,
15712
- argTypes: r.argTypes,
15713
- allowedInArgument: !!r.allowedInArgument,
15714
- allowedInText: !!r.allowedInText,
15715
- allowedInMath: r.allowedInMath === void 0 || r.allowedInMath,
15716
- numOptionalArgs: r.numOptionalArgs || 0,
15717
- infix: !!r.infix,
15718
- primitive: !!r.primitive,
15719
- handler: i
15720
- }, c = 0; c < n.length; ++c) nn[n[c]] = s;
15721
- t && (a && (rn[t] = a), o && (an[t] = o));
15709
+ for (var t = e.type, n = e.names, r = e.htmlBuilder, i = e.mathmlBuilder, a = 0; a < n.length; ++a) nn[n[a]] = e;
15710
+ t && (r && (rn[t] = r), i && (an[t] = i));
15722
15711
  }
15723
15712
  function on(e) {
15724
- var { type: t, htmlBuilder: n, mathmlBuilder: r } = e;
15725
- J({
15726
- type: t,
15727
- names: [],
15728
- props: { numArgs: 0 },
15729
- handler() {
15730
- throw Error("Should never be called.");
15731
- },
15732
- htmlBuilder: n,
15733
- mathmlBuilder: r
15734
- });
15713
+ var t = e.type, n = e.htmlBuilder, r = e.mathmlBuilder;
15714
+ n && (rn[t] = n), r && (an[t] = r);
15735
15715
  }
15736
15716
  var sn = function(e) {
15737
15717
  return e.type === "ordgroup" && e.body.length === 1 ? e.body[0] : e;
@@ -15799,7 +15779,7 @@ var sn = function(e) {
15799
15779
  var l = t(o, n.node);
15800
15780
  l && (n.insertAfter ? n.insertAfter(l) : (e.unshift(l), a++));
15801
15781
  }
15802
- c ? n.node = o : i && o.hasClass("newline") && (n.node = G(["leftmost"])), n.insertAfter = ((t) => (n) => {
15782
+ c ? n.node = o : i && o.hasClass("katex-newline") && (n.node = G(["leftmost"])), n.insertAfter = ((t) => (n) => {
15803
15783
  e.splice(t + 1, 0, n), a++;
15804
15784
  })(a);
15805
15785
  }
@@ -15835,21 +15815,21 @@ var sn = function(e) {
15835
15815
  throw new n("Got group of unknown type: '" + e.type + "'");
15836
15816
  };
15837
15817
  function yn(e, t) {
15838
- var n = G(["base"], e, t), r = G(["strut"]);
15818
+ var n = G(["katex-base"], e, t), r = G(["katex-strut"]);
15839
15819
  return r.style.height = A(n.height + n.depth), n.depth && (r.style.verticalAlign = A(-n.depth)), n.children.unshift(r), n;
15840
15820
  }
15841
15821
  function bn(e, t) {
15842
15822
  var n = null;
15843
15823
  e.length === 1 && e[0].type === "tag" && (n = e[0].tag, e = e[0].body);
15844
15824
  var r = pn(e, t, "root"), i;
15845
- r.length === 2 && r[1].hasClass("tag") && (i = r.pop());
15825
+ r.length === 2 && r[1].hasClass("katex-tag") && (i = r.pop());
15846
15826
  for (var a = [], o = [], s = 0; s < r.length; s++) if (o.push(r[s]), r[s].hasClass("mbin") || r[s].hasClass("mrel") || r[s].hasClass("allowbreak")) {
15847
- for (var c = !1; s < r.length - 1 && r[s + 1].hasClass("mspace") && !r[s + 1].hasClass("newline");) s++, o.push(r[s]), r[s].hasClass("nobreak") && (c = !0);
15827
+ for (var c = !1; s < r.length - 1 && r[s + 1].hasClass("mspace") && !r[s + 1].hasClass("katex-newline");) s++, o.push(r[s]), r[s].hasClass("nobreak") && (c = !0);
15848
15828
  c || (a.push(yn(o, t)), o = []);
15849
- } else r[s].hasClass("newline") && (o.pop(), o.length > 0 && (a.push(yn(o, t)), o = []), a.push(r[s]));
15829
+ } else r[s].hasClass("katex-newline") && (o.pop(), o.length > 0 && (a.push(yn(o, t)), o = []), a.push(r[s]));
15850
15830
  o.length > 0 && a.push(yn(o, t));
15851
15831
  var l;
15852
- n ? (l = yn(pn(n, t, !0), t), l.classes = ["tag"], a.push(l)) : i && a.push(i);
15832
+ n ? (l = yn(pn(n, t, !0), t), l.classes = ["katex-tag"], a.push(l)) : i && a.push(i);
15853
15833
  var u = G(["katex-html"], a);
15854
15834
  if (u.setAttribute("aria-hidden", "true"), l) {
15855
15835
  var d = l.children[0];
@@ -15872,19 +15852,25 @@ var X = class {
15872
15852
  }
15873
15853
  toNode() {
15874
15854
  var e = document.createElementNS("http://www.w3.org/1998/Math/MathML", this.type);
15875
- for (var t in this.attributes) Object.prototype.hasOwnProperty.call(this.attributes, t) && e.setAttribute(t, this.attributes[t]);
15855
+ for (var t of Object.entries(this.attributes)) {
15856
+ var n = t[0], r = t[1];
15857
+ e.setAttribute(n, r);
15858
+ }
15876
15859
  this.classes.length > 0 && (e.className = De(this.classes));
15877
- for (var n = 0; n < this.children.length; n++) if (this.children[n] instanceof Sn && this.children[n + 1] instanceof Sn) {
15878
- for (var r = this.children[n].toText() + this.children[++n].toText(); this.children[n + 1] instanceof Sn;) r += this.children[++n].toText();
15879
- e.appendChild(new Sn(r).toNode());
15880
- } else e.appendChild(this.children[n].toNode());
15860
+ for (var i = 0; i < this.children.length; i++) if (this.children[i] instanceof Sn && this.children[i + 1] instanceof Sn) {
15861
+ for (var a = this.children[i].toText() + this.children[++i].toText(); this.children[i + 1] instanceof Sn;) a += this.children[++i].toText();
15862
+ e.appendChild(new Sn(a).toNode());
15863
+ } else e.appendChild(this.children[i].toNode());
15881
15864
  return e;
15882
15865
  }
15883
15866
  toMarkup() {
15884
15867
  var e = "<" + this.type;
15885
- for (var t in this.attributes) Object.prototype.hasOwnProperty.call(this.attributes, t) && (e += " " + t + "=\"", e += s(this.attributes[t]), e += "\"");
15868
+ for (var t of Object.entries(this.attributes)) {
15869
+ var n = t[0], r = t[1];
15870
+ e += " " + n + "=\"", e += s(r), e += "\"";
15871
+ }
15886
15872
  this.classes.length > 0 && (e += " class =\"" + s(De(this.classes)) + "\""), e += ">";
15887
- for (var n = 0; n < this.children.length; n++) e += this.children[n].toMarkup();
15873
+ for (var i = 0; i < this.children.length; i++) e += this.children[i].toMarkup();
15888
15874
  return e += "</" + this.type + ">", e;
15889
15875
  }
15890
15876
  toText() {
@@ -15919,7 +15905,8 @@ var X = class {
15919
15905
  return this.character ? this.character : " ";
15920
15906
  }
15921
15907
  }, wn = /* @__PURE__ */ new Set(["\\imath", "\\jmath"]), Tn = /* @__PURE__ */ new Set(["mrow", "mtable"]), En = function(e, t, n) {
15922
- return j[t][e] && j[t][e].replace && e.charCodeAt(0) !== 55349 && !(nt.hasOwnProperty(e) && n && (n.fontFamily && n.fontFamily.slice(4, 6) === "tt" || n.font && n.font.slice(4, 6) === "tt")) && (e = j[t][e].replace), new Sn(e);
15908
+ var r, i;
15909
+ return j[t][e] && j[t][e].replace && e.charCodeAt(0) !== 55349 && !(Object.prototype.hasOwnProperty.call(nt, e) && ((n == null || (r = n.fontFamily) == null ? void 0 : r.slice(4, 6)) === "tt" || (n == null || (i = n.font) == null ? void 0 : i.slice(4, 6)) === "tt")) && (e = j[t][e].replace), new Sn(e);
15923
15910
  }, Dn = function(e) {
15924
15911
  return e.length === 1 ? e[0] : new X("mrow", e);
15925
15912
  }, On = {
@@ -16176,14 +16163,14 @@ var Pn = [
16176
16163
  }
16177
16164
  sizingClasses(e) {
16178
16165
  return e.size === this.size ? [] : [
16179
- "sizing",
16166
+ "katex-sizing",
16180
16167
  "reset-size" + e.size,
16181
16168
  "size" + this.size
16182
16169
  ];
16183
16170
  }
16184
16171
  baseSizingClasses() {
16185
16172
  return this.size === e.BASESIZE ? [] : [
16186
- "sizing",
16173
+ "katex-sizing",
16187
16174
  "reset-size" + this.size,
16188
16175
  "size" + e.BASESIZE
16189
16176
  ];
@@ -16574,7 +16561,7 @@ var Rn = function(e) {
16574
16561
  }
16575
16562
  var l = [], u = Wn[r];
16576
16563
  if (!u) throw Error("No SVG data for \"" + r + "\".");
16577
- var [d, f, p] = u, m = p / 1e3, h = d.length, g, _;
16564
+ var d = u[0], f = u[1], p = u[2], m = p / 1e3, h = d.length, g, _;
16578
16565
  if (h === 1) {
16579
16566
  if (u.length !== 4) throw Error("Expected 4-tuple for single-path SVG data \"" + r + "\".");
16580
16567
  g = ["hide-tail"], _ = [u[3]];
@@ -16604,17 +16591,17 @@ var Rn = function(e) {
16604
16591
  b.style.height = A(m), l.push(b);
16605
16592
  }
16606
16593
  return {
16607
- span: G(["stretchy"], l, t),
16594
+ span: G(["katex-stretchy"], l, t),
16608
16595
  minWidth: f,
16609
16596
  height: m
16610
16597
  };
16611
16598
  }
16612
- var { span: r, minWidth: i, height: a } = n();
16613
- return r.height = a, r.style.height = A(a), i > 0 && (r.style.minWidth = A(i)), r;
16599
+ var r = n(), i = r.span, a = r.minWidth, o = r.height;
16600
+ return i.height = o, i.style.height = A(o), a > 0 && (i.style.minWidth = A(a)), i;
16614
16601
  }, qn = function(e, t, n, r, i) {
16615
16602
  var a, o = e.height + e.depth + n + r;
16616
16603
  if (/fbox|color|angl/.test(t)) {
16617
- if (a = G(["stretchy", t], [], i), t === "fbox") {
16604
+ if (a = G(["katex-stretchy", t], [], i), t === "fbox") {
16618
16605
  var s = i.color && i.getColor();
16619
16606
  s && (a.style.borderColor = s);
16620
16607
  }
@@ -16638,43 +16625,50 @@ var Rn = function(e) {
16638
16625
  })], i);
16639
16626
  }
16640
16627
  return a.height = o, a.style.height = A(o), a;
16641
- }, Jn = {
16642
- bin: 1,
16643
- close: 1,
16644
- inner: 1,
16645
- open: 1,
16646
- punct: 1,
16647
- rel: 1
16648
- }, Yn = {
16649
- "accent-token": 1,
16650
- mathord: 1,
16651
- "op-token": 1,
16652
- spacing: 1,
16653
- textord: 1
16654
- };
16655
- function Xn(e) {
16656
- return e in Jn;
16628
+ }, Jn = [
16629
+ "bin",
16630
+ "close",
16631
+ "inner",
16632
+ "open",
16633
+ "punct",
16634
+ "rel"
16635
+ ], Yn = [
16636
+ "accent-token",
16637
+ "mathord",
16638
+ "op-token",
16639
+ "spacing",
16640
+ "textord"
16641
+ ], Xn = new Set(Jn), Zn = new Set(Yn);
16642
+ function Qn(e) {
16643
+ return Xn.has(e);
16657
16644
  }
16658
16645
  function Q(e, t) {
16659
16646
  if (!e || e.type !== t) throw Error("Expected node of type " + t + ", but got " + (e ? "node of type " + e.type : String(e)));
16660
16647
  return e;
16661
16648
  }
16662
- function Zn(e) {
16663
- var t = Qn(e);
16649
+ function $n(e) {
16650
+ var t = er(e);
16664
16651
  if (!t) throw Error("Expected node of symbol group type, but got " + (e ? "node of type " + e.type : String(e)));
16665
16652
  return t;
16666
16653
  }
16667
- function Qn(e) {
16668
- return e && (e.type === "atom" || Yn.hasOwnProperty(e.type)) ? e : null;
16654
+ function er(e) {
16655
+ return e.type === "atom" || Zn.has(e.type) ? e : null;
16669
16656
  }
16670
- var $n = (e) => {
16657
+ function tr(e, t, r) {
16658
+ var i = "";
16659
+ for (var a of e.body) if (a.type === "textord") i += a.text;
16660
+ else if (r && a.type === "spacing" && a.text === " ") i += " ";
16661
+ else throw new n(t, e);
16662
+ return i;
16663
+ }
16664
+ var nr = (e) => {
16671
16665
  if (e instanceof Le) return e;
16672
- if (Ue(e) && e.children.length === 1) return $n(e.children[0]);
16673
- }, er = (e, t) => {
16666
+ if (Ue(e) && e.children.length === 1) return nr(e.children[0]);
16667
+ }, rr = (e, t) => {
16674
16668
  var n, r, i;
16675
16669
  e && e.type === "supsub" ? (r = Q(e.base, "accent"), n = r.base, e.base = n, i = He(Y(e, t)), e.base = r) : (r = Q(e, "accent"), n = r.base);
16676
16670
  var a = Y(n, t.havingCrampedStyle()), o = r.isShifty && u(n), s = 0;
16677
- o && (s = $n(a)?.skew ?? 0);
16671
+ o && (s = nr(a)?.skew ?? 0);
16678
16672
  var c = r.label === "\\c", l = c ? a.height + a.depth : Math.min(a.height, t.fontMetrics().xHeight), d;
16679
16673
  if (r.isStretchy) d = Kn(r, t), d = K({
16680
16674
  positionType: "firstBaseline",
@@ -16697,7 +16691,7 @@ var $n = (e) => {
16697
16691
  type: "textord",
16698
16692
  mode: r.mode,
16699
16693
  text: r.label
16700
- }, t, "textord"), f = Ve(f), f.italic = 0, p = f.width, c && (l += f.depth)), d = G(["accent-body"], [f]);
16694
+ }, t), f = Ve(f), f.italic = 0, p = f.width, c && (l += f.depth)), d = G(["accent-body"], [f]);
16701
16695
  var m = r.label === "\\textcircled";
16702
16696
  m && (d.classes.push("accent-full"), l = a.height);
16703
16697
  var h = s;
@@ -16719,12 +16713,12 @@ var $n = (e) => {
16719
16713
  ]
16720
16714
  });
16721
16715
  }
16722
- var g = G(["mord", "accent"], [d], t);
16716
+ var g = G(["mord", "katex-accent"], [d], t);
16723
16717
  return i ? (i.children[0] = g, i.height = Math.max(g.height, i.height), i.classes[0] = "mord", i) : g;
16724
- }, tr = (e, t) => {
16718
+ }, ir = (e, t) => {
16725
16719
  var n = e.isStretchy ? Un(e.label) : new X("mo", [En(e.label, e.mode)]), r = new X("mover", [Z(e.base, t), n]);
16726
16720
  return r.setAttribute("accent", "true"), r;
16727
- }, nr = new RegExp([
16721
+ }, ar = new RegExp([
16728
16722
  "\\acute",
16729
16723
  "\\grave",
16730
16724
  "\\ddot",
@@ -16763,9 +16757,9 @@ J({
16763
16757
  "\\overleftharpoon",
16764
16758
  "\\overrightharpoon"
16765
16759
  ],
16766
- props: { numArgs: 1 },
16760
+ numArgs: 1,
16767
16761
  handler: (e, t) => {
16768
- var n = sn(t[0]), r = !nr.test(e.funcName), i = !r || e.funcName === "\\widehat" || e.funcName === "\\widetilde" || e.funcName === "\\widecheck";
16762
+ var n = sn(t[0]), r = !ar.test(e.funcName), i = !r || e.funcName === "\\widehat" || e.funcName === "\\widetilde" || e.funcName === "\\widecheck";
16769
16763
  return {
16770
16764
  type: "accent",
16771
16765
  mode: e.parser.mode,
@@ -16775,8 +16769,8 @@ J({
16775
16769
  base: n
16776
16770
  };
16777
16771
  },
16778
- htmlBuilder: er,
16779
- mathmlBuilder: tr
16772
+ htmlBuilder: rr,
16773
+ mathmlBuilder: ir
16780
16774
  }), J({
16781
16775
  type: "accent",
16782
16776
  names: [
@@ -16794,12 +16788,10 @@ J({
16794
16788
  "\\v",
16795
16789
  "\\textcircled"
16796
16790
  ],
16797
- props: {
16798
- numArgs: 1,
16799
- allowedInText: !0,
16800
- allowedInMath: !0,
16801
- argTypes: ["primitive"]
16802
- },
16791
+ numArgs: 1,
16792
+ allowedInText: !0,
16793
+ allowedInMath: !0,
16794
+ argTypes: ["primitive"],
16803
16795
  handler: (e, t) => {
16804
16796
  var n = t[0], r = e.parser.mode;
16805
16797
  return r === "math" && (e.parser.settings.reportNonstrict("mathVsTextAccents", "LaTeX's accent " + e.funcName + " works only in text mode"), r = "text"), {
@@ -16810,9 +16802,7 @@ J({
16810
16802
  isShifty: !0,
16811
16803
  base: n
16812
16804
  };
16813
- },
16814
- htmlBuilder: er,
16815
- mathmlBuilder: tr
16805
+ }
16816
16806
  }), J({
16817
16807
  type: "accentUnder",
16818
16808
  names: [
@@ -16823,9 +16813,9 @@ J({
16823
16813
  "\\underlinesegment",
16824
16814
  "\\utilde"
16825
16815
  ],
16826
- props: { numArgs: 1 },
16816
+ numArgs: 1,
16827
16817
  handler: (e, t) => {
16828
- var { parser: n, funcName: r } = e, i = t[0];
16818
+ var n = e.parser, r = e.funcName, i = t[0];
16829
16819
  return {
16830
16820
  type: "accentUnder",
16831
16821
  mode: n.mode,
@@ -16860,7 +16850,7 @@ J({
16860
16850
  return r.setAttribute("accentunder", "true"), r;
16861
16851
  }
16862
16852
  });
16863
- var rr = (e) => {
16853
+ var or = (e) => {
16864
16854
  var t = new X("mpadded", e ? [e] : []);
16865
16855
  return t.setAttribute("width", "+0.6em"), t.setAttribute("lspace", "0.3em"), t;
16866
16856
  };
@@ -16893,12 +16883,10 @@ J({
16893
16883
  "\\\\cdleftarrow",
16894
16884
  "\\\\cdlongequal"
16895
16885
  ],
16896
- props: {
16897
- numArgs: 1,
16898
- numOptionalArgs: 1
16899
- },
16886
+ numArgs: 1,
16887
+ numOptionalArgs: 1,
16900
16888
  handler(e, t, n) {
16901
- var { parser: r, funcName: i } = e;
16889
+ var r = e.parser, i = e.funcName;
16902
16890
  return {
16903
16891
  type: "xArrow",
16904
16892
  mode: r.mode,
@@ -16958,23 +16946,23 @@ J({
16958
16946
  n.setAttribute("minsize", e.label.charAt(0) === "x" ? "1.75em" : "3.0em");
16959
16947
  var r;
16960
16948
  if (e.body) {
16961
- var i = rr(Z(e.body, t));
16949
+ var i = or(Z(e.body, t));
16962
16950
  r = e.below ? new X("munderover", [
16963
16951
  n,
16964
- rr(Z(e.below, t)),
16952
+ or(Z(e.below, t)),
16965
16953
  i
16966
16954
  ]) : new X("mover", [n, i]);
16967
- } else e.below ? r = new X("munder", [n, rr(Z(e.below, t))]) : (r = rr(), r = new X("mover", [n, r]));
16955
+ } else e.below ? r = new X("munder", [n, or(Z(e.below, t))]) : (r = or(), r = new X("mover", [n, r]));
16968
16956
  return r;
16969
16957
  }
16970
16958
  });
16971
- function ir(e, t) {
16959
+ function sr(e, t) {
16972
16960
  var n = pn(e.body, t, !0);
16973
16961
  return G([e.mclass], n, t);
16974
16962
  }
16975
- function ar(e, t) {
16963
+ function cr(e, t) {
16976
16964
  var n, r = jn(e.body, t);
16977
- return e.mclass === "minner" ? n = new X("mpadded", r) : e.mclass === "mord" ? e.isCharacterBox ? (n = r[0], n.type = "mi") : n = new X("mi", r) : (e.isCharacterBox ? (n = r[0], n.type = "mo") : n = new X("mo", r), e.mclass === "mbin" ? (n.attributes.lspace = "0.22em", n.attributes.rspace = "0.22em") : e.mclass === "mpunct" ? (n.attributes.lspace = "0em", n.attributes.rspace = "0.17em") : e.mclass === "mopen" || e.mclass === "mclose" ? (n.attributes.lspace = "0em", n.attributes.rspace = "0em") : e.mclass === "minner" && (n.attributes.lspace = "0.0556em", n.attributes.width = "+0.1111em")), n;
16965
+ return e.mclass === "minner" ? n = new X("mpadded", r) : e.mclass === "mord" ? e.isCharacterBox ? (n = r[0], n.type = "mi") : n = new X("mi", r) : (e.isCharacterBox ? (n = r[0], n.type = "mo") : n = new X("mo", r), e.mclass === "mbin" ? (n.attributes.lspace = "0.22em", n.attributes.rspace = "0.22em") : e.mclass === "mpunct" ? (n.attributes.lspace = "0em", n.attributes.rspace = "0.17em") : (e.mclass === "mopen" || e.mclass === "mclose") && (n.attributes.lspace = "0em", n.attributes.rspace = "0em")), n;
16978
16966
  }
16979
16967
  J({
16980
16968
  type: "mclass",
@@ -16987,12 +16975,10 @@ J({
16987
16975
  "\\mathpunct",
16988
16976
  "\\mathinner"
16989
16977
  ],
16990
- props: {
16991
- numArgs: 1,
16992
- primitive: !0
16993
- },
16978
+ numArgs: 1,
16979
+ primitive: !0,
16994
16980
  handler(e, t) {
16995
- var { parser: n, funcName: r } = e, i = t[0];
16981
+ var n = e.parser, r = e.funcName, i = t[0];
16996
16982
  return {
16997
16983
  type: "mclass",
16998
16984
  mode: n.mode,
@@ -17001,23 +16987,22 @@ J({
17001
16987
  isCharacterBox: u(i)
17002
16988
  };
17003
16989
  },
17004
- htmlBuilder: ir,
17005
- mathmlBuilder: ar
16990
+ htmlBuilder: sr,
16991
+ mathmlBuilder: cr
17006
16992
  });
17007
- var or = (e) => {
16993
+ var lr = (e) => {
17008
16994
  var t = e.type === "ordgroup" && e.body.length ? e.body[0] : e;
17009
16995
  return t.type === "atom" && (t.family === "bin" || t.family === "rel") ? "m" + t.family : "mord";
17010
16996
  };
17011
16997
  J({
17012
16998
  type: "mclass",
17013
16999
  names: ["\\@binrel"],
17014
- props: { numArgs: 2 },
17000
+ numArgs: 2,
17015
17001
  handler(e, t) {
17016
- var { parser: n } = e;
17017
17002
  return {
17018
17003
  type: "mclass",
17019
- mode: n.mode,
17020
- mclass: or(t[0]),
17004
+ mode: e.parser.mode,
17005
+ mclass: lr(t[0]),
17021
17006
  body: cn(t[1]),
17022
17007
  isCharacterBox: u(t[1])
17023
17008
  };
@@ -17029,9 +17014,9 @@ J({
17029
17014
  "\\overset",
17030
17015
  "\\underset"
17031
17016
  ],
17032
- props: { numArgs: 2 },
17017
+ numArgs: 2,
17033
17018
  handler(e, t) {
17034
- var { parser: n, funcName: r } = e, i = t[1], a = t[0], o = r === "\\stackrel" ? "mrel" : or(i), s = {
17019
+ var n = e.parser, r = e.funcName, i = t[1], a = t[0], o = r === "\\stackrel" ? "mrel" : lr(i), s = {
17035
17020
  type: "op",
17036
17021
  mode: i.mode,
17037
17022
  limits: !0,
@@ -17040,12 +17025,16 @@ J({
17040
17025
  symbol: !1,
17041
17026
  suppressBaseShift: r !== "\\stackrel",
17042
17027
  body: cn(i)
17043
- }, c = {
17028
+ }, c = r === "\\underset" ? {
17044
17029
  type: "supsub",
17045
17030
  mode: a.mode,
17046
17031
  base: s,
17047
- sup: r === "\\underset" ? null : a,
17048
- sub: r === "\\underset" ? a : null
17032
+ sub: a
17033
+ } : {
17034
+ type: "supsub",
17035
+ mode: a.mode,
17036
+ base: s,
17037
+ sup: a
17049
17038
  };
17050
17039
  return {
17051
17040
  type: "mclass",
@@ -17054,22 +17043,17 @@ J({
17054
17043
  body: [c],
17055
17044
  isCharacterBox: u(c)
17056
17045
  };
17057
- },
17058
- htmlBuilder: ir,
17059
- mathmlBuilder: ar
17046
+ }
17060
17047
  }), J({
17061
17048
  type: "pmb",
17062
17049
  names: ["\\pmb"],
17063
- props: {
17064
- numArgs: 1,
17065
- allowedInText: !0
17066
- },
17050
+ numArgs: 1,
17051
+ allowedInText: !0,
17067
17052
  handler(e, t) {
17068
- var { parser: n } = e;
17069
17053
  return {
17070
17054
  type: "pmb",
17071
- mode: n.mode,
17072
- mclass: or(t[0]),
17055
+ mode: e.parser.mode,
17056
+ mclass: lr(t[0]),
17073
17057
  body: cn(t[0])
17074
17058
  };
17075
17059
  },
@@ -17082,7 +17066,7 @@ J({
17082
17066
  return n.setAttribute("style", "text-shadow: 0.02em 0.01em 0.04px"), n;
17083
17067
  }
17084
17068
  });
17085
- var sr = {
17069
+ var ur = {
17086
17070
  ">": "\\\\cdrightarrow",
17087
17071
  "<": "\\\\cdleftarrow",
17088
17072
  "=": "\\\\cdlongequal",
@@ -17090,15 +17074,15 @@ var sr = {
17090
17074
  V: "\\downarrow",
17091
17075
  "|": "\\Vert",
17092
17076
  ".": "no arrow"
17093
- }, cr = () => ({
17077
+ }, dr = () => ({
17094
17078
  type: "styling",
17095
17079
  body: [],
17096
17080
  mode: "math",
17097
17081
  style: "display",
17098
17082
  resetFont: !0
17099
- }), lr = (e) => e.type === "textord" && e.text === "@", ur = (e, t) => (e.type === "mathord" || e.type === "atom") && e.text === t;
17100
- function dr(e, t, n) {
17101
- var r = sr[e];
17083
+ }), fr = (e) => e.type === "textord" && e.text === "@", pr = (e, t) => (e.type === "mathord" || e.type === "atom") && e.text === t;
17084
+ function mr(e, t, n) {
17085
+ var r = ur[e];
17102
17086
  switch (r) {
17103
17087
  case "\\\\cdrightarrow":
17104
17088
  case "\\\\cdleftarrow": return n.callFunction(r, [t[0]], [t[1]]);
@@ -17132,7 +17116,7 @@ function dr(e, t, n) {
17132
17116
  };
17133
17117
  }
17134
17118
  }
17135
- function fr(e) {
17119
+ function hr(e) {
17136
17120
  var t = [];
17137
17121
  for (e.gullet.beginGroup(), e.gullet.macros.set("\\cr", "\\\\\\relax"), e.gullet.beginGroup();;) {
17138
17122
  t.push(e.parseExpression(!1, "\\\\")), e.gullet.endGroup(), e.gullet.beginGroup();
@@ -17144,10 +17128,10 @@ function fr(e) {
17144
17128
  } else throw new n("Expected \\\\ or \\cr or \\end", e.nextToken);
17145
17129
  }
17146
17130
  for (var i = [], a = [i], o = 0; o < t.length; o++) {
17147
- for (var s = t[o], c = cr(), l = 0; l < s.length; l++) if (!lr(s[l])) c.body.push(s[l]);
17131
+ for (var s = t[o], c = dr(), l = 0; l < s.length; l++) if (!fr(s[l])) c.body.push(s[l]);
17148
17132
  else {
17149
17133
  i.push(c), l += 1;
17150
- var u = Zn(s[l]).text, d = [, ,];
17134
+ var u = $n(s[l]).text, d = [, ,];
17151
17135
  if (d[0] = {
17152
17136
  type: "ordgroup",
17153
17137
  mode: "math",
@@ -17159,11 +17143,11 @@ function fr(e) {
17159
17143
  }, !"=|.".includes(u)) {
17160
17144
  if ("<>AV".includes(u)) for (var f = 0; f < 2; f++) {
17161
17145
  for (var p = !0, m = l + 1; m < s.length; m++) {
17162
- if (ur(s[m], u)) {
17146
+ if (pr(s[m], u)) {
17163
17147
  p = !1, l = m;
17164
17148
  break;
17165
17149
  }
17166
- if (lr(s[m])) throw new n("Missing a " + u + " character to complete a CD arrow.", s[m]);
17150
+ if (fr(s[m])) throw new n("Missing a " + u + " character to complete a CD arrow.", s[m]);
17167
17151
  d[f].body.push(s[m]);
17168
17152
  }
17169
17153
  if (p) throw new n("Missing a " + u + " character to complete a CD arrow.", s[l]);
@@ -17172,12 +17156,12 @@ function fr(e) {
17172
17156
  }
17173
17157
  var h = {
17174
17158
  type: "styling",
17175
- body: [dr(u, d, e)],
17159
+ body: [mr(u, d, e)],
17176
17160
  mode: "math",
17177
17161
  style: "display",
17178
17162
  resetFont: !0
17179
17163
  };
17180
- i.push(h), c = cr();
17164
+ i.push(h), c = dr();
17181
17165
  }
17182
17166
  o % 2 == 0 ? i.push(c) : i.shift(), i = [], a.push(i);
17183
17167
  }
@@ -17201,9 +17185,9 @@ function fr(e) {
17201
17185
  J({
17202
17186
  type: "cdlabel",
17203
17187
  names: ["\\\\cdleft", "\\\\cdright"],
17204
- props: { numArgs: 1 },
17188
+ numArgs: 1,
17205
17189
  handler(e, t) {
17206
- var { parser: n, funcName: r } = e;
17190
+ var n = e.parser, r = e.funcName;
17207
17191
  return {
17208
17192
  type: "cdlabel",
17209
17193
  mode: n.mode,
@@ -17222,12 +17206,11 @@ J({
17222
17206
  }), J({
17223
17207
  type: "cdlabelparent",
17224
17208
  names: ["\\\\cdparent"],
17225
- props: { numArgs: 1 },
17209
+ numArgs: 1,
17226
17210
  handler(e, t) {
17227
- var { parser: n } = e;
17228
17211
  return {
17229
17212
  type: "cdlabelparent",
17230
- mode: n.mode,
17213
+ mode: e.parser.mode,
17231
17214
  fragment: t[0]
17232
17215
  };
17233
17216
  },
@@ -17241,39 +17224,26 @@ J({
17241
17224
  }), J({
17242
17225
  type: "textord",
17243
17226
  names: ["\\@char"],
17244
- props: {
17245
- numArgs: 1,
17246
- allowedInText: !0
17247
- },
17227
+ numArgs: 1,
17228
+ allowedInText: !0,
17248
17229
  handler(e, t) {
17249
- for (var { parser: r } = e, i = Q(t[0], "ordgroup").body, a = "", o = 0; o < i.length; o++) {
17250
- var s = Q(i[o], "textord");
17251
- a += s.text;
17252
- }
17253
- var c = parseInt(a), l;
17254
- if (isNaN(c)) throw new n("\\@char has non-numeric argument " + a);
17255
- if (c < 0 || c >= 1114111) throw new n("\\@char with invalid code point " + a);
17256
- return c <= 65535 ? l = String.fromCharCode(c) : (c -= 65536, l = String.fromCharCode((c >> 10) + 55296, (c & 1023) + 56320)), {
17230
+ var r = e.parser, i = tr(Q(t[0], "ordgroup"), "\\@char has non-numeric argument"), a = parseInt(i), o;
17231
+ if (isNaN(a)) throw new n("\\@char has non-numeric argument " + i);
17232
+ if (a < 0 || a > 1114111) throw new n("\\@char with invalid code point " + i);
17233
+ return a <= 65535 ? o = String.fromCharCode(a) : (a -= 65536, o = String.fromCharCode((a >> 10) + 55296, (a & 1023) + 56320)), {
17257
17234
  type: "textord",
17258
17235
  mode: r.mode,
17259
- text: l
17236
+ text: o
17260
17237
  };
17261
17238
  }
17262
- });
17263
- var pr = (e, t) => Wt(pn(e.body, t.withColor(e.color), !1)), mr = (e, t) => {
17264
- var n = new X("mstyle", jn(e.body, t.withColor(e.color)));
17265
- return n.setAttribute("mathcolor", e.color), n;
17266
- };
17267
- J({
17239
+ }), J({
17268
17240
  type: "color",
17269
17241
  names: ["\\textcolor"],
17270
- props: {
17271
- numArgs: 2,
17272
- allowedInText: !0,
17273
- argTypes: ["color", "original"]
17274
- },
17242
+ numArgs: 2,
17243
+ allowedInText: !0,
17244
+ argTypes: ["color", "original"],
17275
17245
  handler(e, t) {
17276
- var { parser: n } = e, r = Q(t[0], "color-token").color, i = t[1];
17246
+ var n = e.parser, r = Q(t[0], "color-token").color, i = t[1];
17277
17247
  return {
17278
17248
  type: "color",
17279
17249
  mode: n.mode,
@@ -17281,18 +17251,19 @@ J({
17281
17251
  body: cn(i)
17282
17252
  };
17283
17253
  },
17284
- htmlBuilder: pr,
17285
- mathmlBuilder: mr
17254
+ htmlBuilder: (e, t) => Wt(pn(e.body, t.withColor(e.color), !1)),
17255
+ mathmlBuilder: (e, t) => {
17256
+ var n = new X("mstyle", jn(e.body, t.withColor(e.color)));
17257
+ return n.setAttribute("mathcolor", e.color), n;
17258
+ }
17286
17259
  }), J({
17287
17260
  type: "color",
17288
17261
  names: ["\\color"],
17289
- props: {
17290
- numArgs: 1,
17291
- allowedInText: !0,
17292
- argTypes: ["color"]
17293
- },
17262
+ numArgs: 1,
17263
+ allowedInText: !0,
17264
+ argTypes: ["color"],
17294
17265
  handler(e, t) {
17295
- var { parser: n, breakOnTokenText: r } = e, i = Q(t[0], "color-token").color;
17266
+ var n = e.parser, r = e.breakOnTokenText, i = Q(t[0], "color-token").color;
17296
17267
  n.gullet.macros.set("\\current@color", i);
17297
17268
  var a = n.parseExpression(!0, r);
17298
17269
  return {
@@ -17301,19 +17272,15 @@ J({
17301
17272
  color: i,
17302
17273
  body: a
17303
17274
  };
17304
- },
17305
- htmlBuilder: pr,
17306
- mathmlBuilder: mr
17275
+ }
17307
17276
  }), J({
17308
17277
  type: "cr",
17309
17278
  names: ["\\\\"],
17310
- props: {
17311
- numArgs: 0,
17312
- numOptionalArgs: 0,
17313
- allowedInText: !0
17314
- },
17279
+ numArgs: 0,
17280
+ numOptionalArgs: 0,
17281
+ allowedInText: !0,
17315
17282
  handler(e, t, n) {
17316
- var { parser: r } = e, i = r.gullet.future().text === "[" ? r.parseSizeGroup(!0) : null, a = !r.settings.displayMode || !r.settings.useStrictBehavior("newLineInDisplayMode", "In LaTeX, \\\\ or \\newline does nothing in display mode");
17283
+ var r = e.parser, i = r.gullet.future().text === "[" ? r.parseSizeGroup(!0) : null, a = !r.settings.displayMode || !r.settings.useStrictBehavior("newLineInDisplayMode", "In LaTeX, \\\\ or \\newline does nothing in display mode");
17317
17284
  return {
17318
17285
  type: "cr",
17319
17286
  mode: r.mode,
@@ -17323,14 +17290,14 @@ J({
17323
17290
  },
17324
17291
  htmlBuilder(e, t) {
17325
17292
  var n = G(["mspace"], [], t);
17326
- return e.newLine && (n.classes.push("newline"), e.size && (n.style.marginTop = A(k(e.size, t)))), n;
17293
+ return e.newLine && (n.classes.push("katex-newline"), e.size && (n.style.marginTop = A(k(e.size, t)))), n;
17327
17294
  },
17328
17295
  mathmlBuilder(e, t) {
17329
17296
  var n = new X("mspace");
17330
17297
  return e.newLine && (n.setAttribute("linebreak", "newline"), e.size && n.setAttribute("height", A(k(e.size, t)))), n;
17331
17298
  }
17332
17299
  });
17333
- var hr = {
17300
+ var gr = {
17334
17301
  "\\global": "\\global",
17335
17302
  "\\long": "\\\\globallong",
17336
17303
  "\\\\globallong": "\\\\globallong",
@@ -17340,14 +17307,14 @@ var hr = {
17340
17307
  "\\xdef": "\\xdef",
17341
17308
  "\\let": "\\\\globallet",
17342
17309
  "\\futurelet": "\\\\globalfuture"
17343
- }, gr = (e) => {
17310
+ }, _r = (e) => {
17344
17311
  var t = e.text;
17345
17312
  if (/^(?:[\\{}$&#^_]|EOF)$/.test(t)) throw new n("Expected a control sequence", e);
17346
17313
  return t;
17347
- }, _r = (e) => {
17314
+ }, vr = (e) => {
17348
17315
  var t = e.gullet.popToken();
17349
17316
  return t.text === "=" && (t = e.gullet.popToken(), t.text === " " && (t = e.gullet.popToken())), t;
17350
- }, vr = (e, t, n, r) => {
17317
+ }, yr = (e, t, n, r) => {
17351
17318
  var i = e.gullet.macros.get(n.text);
17352
17319
  i ??= (n.noexpand = !0, {
17353
17320
  tokens: [n],
@@ -17362,15 +17329,13 @@ J({
17362
17329
  "\\long",
17363
17330
  "\\\\globallong"
17364
17331
  ],
17365
- props: {
17366
- numArgs: 0,
17367
- allowedInText: !0
17368
- },
17332
+ numArgs: 0,
17333
+ allowedInText: !0,
17369
17334
  handler(e) {
17370
- var { parser: t, funcName: r } = e;
17335
+ var t = e.parser, r = e.funcName;
17371
17336
  t.consumeSpaces();
17372
17337
  var i = t.fetch();
17373
- if (hr[i.text]) return (r === "\\global" || r === "\\\\globallong") && (i.text = hr[i.text]), Q(t.parseFunction(), "internal");
17338
+ if (gr[i.text]) return (r === "\\global" || r === "\\\\globallong") && (i.text = gr[i.text]), Q(t.parseFunction(), "internal");
17374
17339
  throw new n("Invalid token after macro prefix", i);
17375
17340
  }
17376
17341
  }), J({
@@ -17381,13 +17346,11 @@ J({
17381
17346
  "\\edef",
17382
17347
  "\\xdef"
17383
17348
  ],
17384
- props: {
17385
- numArgs: 0,
17386
- allowedInText: !0,
17387
- primitive: !0
17388
- },
17349
+ numArgs: 0,
17350
+ allowedInText: !0,
17351
+ primitive: !0,
17389
17352
  handler(e) {
17390
- var { parser: t, funcName: r } = e, i = t.gullet.popToken(), a = i.text;
17353
+ var t = e.parser, r = e.funcName, i = t.gullet.popToken(), a = i.text;
17391
17354
  if (/^(?:[\\{}$&#^_]|EOF)$/.test(a)) throw new n("Expected a control sequence", i);
17392
17355
  for (var o = 0, s, c = [[]]; t.gullet.future().text !== "{";) if (i = t.gullet.popToken(), i.text === "#") {
17393
17356
  if (t.gullet.future().text === "{") {
@@ -17399,12 +17362,12 @@ J({
17399
17362
  o++, c.push([]);
17400
17363
  } else if (i.text === "EOF") throw new n("Expected a macro definition");
17401
17364
  else c[o].push(i.text);
17402
- var { tokens: l } = t.gullet.consumeArg();
17365
+ var l = t.gullet.consumeArg().tokens;
17403
17366
  return s && l.unshift(s), (r === "\\edef" || r === "\\xdef") && (l = t.gullet.expandTokens(l), l.reverse()), t.gullet.macros.set(a, {
17404
17367
  tokens: l,
17405
17368
  numArgs: o,
17406
17369
  delimiters: c
17407
- }, r === hr[r]), {
17370
+ }, r === gr[r]), {
17408
17371
  type: "internal",
17409
17372
  mode: t.mode
17410
17373
  };
@@ -17412,14 +17375,12 @@ J({
17412
17375
  }), J({
17413
17376
  type: "internal",
17414
17377
  names: ["\\let", "\\\\globallet"],
17415
- props: {
17416
- numArgs: 0,
17417
- allowedInText: !0,
17418
- primitive: !0
17419
- },
17378
+ numArgs: 0,
17379
+ allowedInText: !0,
17380
+ primitive: !0,
17420
17381
  handler(e) {
17421
- var { parser: t, funcName: n } = e, r = gr(t.gullet.popToken());
17422
- return t.gullet.consumeSpaces(), vr(t, r, _r(t), n === "\\\\globallet"), {
17382
+ var t = e.parser, n = e.funcName, r = _r(t.gullet.popToken());
17383
+ return t.gullet.consumeSpaces(), yr(t, r, vr(t), n === "\\\\globallet"), {
17423
17384
  type: "internal",
17424
17385
  mode: t.mode
17425
17386
  };
@@ -17427,43 +17388,41 @@ J({
17427
17388
  }), J({
17428
17389
  type: "internal",
17429
17390
  names: ["\\futurelet", "\\\\globalfuture"],
17430
- props: {
17431
- numArgs: 0,
17432
- allowedInText: !0,
17433
- primitive: !0
17434
- },
17391
+ numArgs: 0,
17392
+ allowedInText: !0,
17393
+ primitive: !0,
17435
17394
  handler(e) {
17436
- var { parser: t, funcName: n } = e, r = gr(t.gullet.popToken()), i = t.gullet.popToken(), a = t.gullet.popToken();
17437
- return vr(t, r, a, n === "\\\\globalfuture"), t.gullet.pushToken(a), t.gullet.pushToken(i), {
17395
+ var t = e.parser, n = e.funcName, r = _r(t.gullet.popToken()), i = t.gullet.popToken(), a = t.gullet.popToken();
17396
+ return yr(t, r, a, n === "\\\\globalfuture"), t.gullet.pushToken(a), t.gullet.pushToken(i), {
17438
17397
  type: "internal",
17439
17398
  mode: t.mode
17440
17399
  };
17441
17400
  }
17442
17401
  });
17443
- var yr = function(e, t, n) {
17402
+ var br = function(e, t, n) {
17444
17403
  var r = Je(j.math[e] && j.math[e].replace || e, t, n);
17445
17404
  if (!r) throw Error("Unsupported symbol " + e + " and font size " + t + ".");
17446
17405
  return r;
17447
- }, br = function(e, t, n, r) {
17406
+ }, xr = function(e, t, n, r) {
17448
17407
  var i = n.havingBaseStyle(t), a = G(r.concat(i.sizingClasses(n)), [e], n), o = i.sizeMultiplier / n.sizeMultiplier;
17449
17408
  return a.height *= o, a.depth *= o, a.maxFontSize = i.sizeMultiplier, a;
17450
- }, xr = function(e, t, n) {
17409
+ }, Sr = function(e, t, n) {
17451
17410
  var r = t.havingBaseStyle(n), i = (1 - t.sizeMultiplier / r.sizeMultiplier) * t.fontMetrics().axisHeight;
17452
17411
  e.classes.push("delimcenter"), e.style.top = A(i), e.height -= i, e.depth += i;
17453
- }, Sr = function(e, t, n, r, i, a) {
17454
- var o = br(Pt(e, "Main-Regular", i, r), t, r, a);
17455
- return n && xr(o, r, t), o;
17456
- }, Cr = function(e, t, n, r) {
17412
+ }, Cr = function(e, t, n, r, i, a) {
17413
+ var o = xr(Pt(e, "Main-Regular", i, r), t, r, a);
17414
+ return n && Sr(o, r, t), o;
17415
+ }, wr = function(e, t, n, r) {
17457
17416
  return Pt(e, "Size" + t + "-Regular", n, r);
17458
- }, wr = function(e, t, n, r, i, a) {
17459
- var o = Cr(e, t, i, r), s = br(G(["delimsizing", "size" + t], [o], r), D.TEXT, r, a);
17460
- return n && xr(s, r, D.TEXT), s;
17461
- }, Tr = function(e, t, n) {
17417
+ }, Tr = function(e, t, n, r, i, a) {
17418
+ var o = wr(e, t, i, r), s = xr(G(["delimsizing", "size" + t], [o], r), D.TEXT, r, a);
17419
+ return n && Sr(s, r, D.TEXT), s;
17420
+ }, Er = function(e, t, n) {
17462
17421
  return {
17463
17422
  type: "elem",
17464
17423
  elem: G(["delimsizinginner", t === "Size1-Regular" ? "delim-size1" : "delim-size4"], [G([], [Pt(e, t, n)])])
17465
17424
  };
17466
- }, Er = function(e, t, n) {
17425
+ }, Dr = function(e, t, n) {
17467
17426
  var r = We["Size4-Regular"][e.charCodeAt(0)] ? We["Size4-Regular"][e.charCodeAt(0)][4] : We["Size1-Regular"][e.charCodeAt(0)][4], i = Vt([], [new Re([new ze("inner", ye(e, Math.round(1e3 * t)))], {
17468
17427
  width: A(r),
17469
17428
  height: A(t),
@@ -17475,27 +17434,27 @@ var yr = function(e, t, n) {
17475
17434
  type: "elem",
17476
17435
  elem: i
17477
17436
  };
17478
- }, Dr = .008, Or = {
17437
+ }, Or = .008, kr = {
17479
17438
  type: "kern",
17480
- size: -1 * Dr
17481
- }, kr = /* @__PURE__ */ new Set([
17439
+ size: -1 * Or
17440
+ }, Ar = /* @__PURE__ */ new Set([
17482
17441
  "|",
17483
17442
  "\\lvert",
17484
17443
  "\\rvert",
17485
17444
  "\\vert"
17486
- ]), Ar = /* @__PURE__ */ new Set([
17445
+ ]), jr = /* @__PURE__ */ new Set([
17487
17446
  "\\|",
17488
17447
  "\\lVert",
17489
17448
  "\\rVert",
17490
17449
  "\\Vert"
17491
- ]), jr = function(e, t, n, r, i, a) {
17450
+ ]), Mr = function(e, t, n, r, i, a) {
17492
17451
  var o, s, c, l, u = "", d = 0;
17493
17452
  o = c = l = e, s = null;
17494
17453
  var f = "Size1-Regular";
17495
- e === "\\uparrow" ? c = l = "⏐" : e === "\\Uparrow" ? c = l = "‖" : e === "\\downarrow" ? o = c = "⏐" : e === "\\Downarrow" ? o = c = "‖" : e === "\\updownarrow" ? (o = "\\uparrow", c = "⏐", l = "\\downarrow") : e === "\\Updownarrow" ? (o = "\\Uparrow", c = "‖", l = "\\Downarrow") : kr.has(e) ? (c = "∣", u = "vert", d = 333) : Ar.has(e) ? (c = "∥", u = "doublevert", d = 556) : e === "[" || e === "\\lbrack" ? (o = "⎡", c = "⎢", l = "⎣", f = "Size4-Regular", u = "lbrack", d = 667) : e === "]" || e === "\\rbrack" ? (o = "⎤", c = "⎥", l = "⎦", f = "Size4-Regular", u = "rbrack", d = 667) : e === "\\lfloor" || e === "⌊" ? (c = o = "⎢", l = "⎣", f = "Size4-Regular", u = "lfloor", d = 667) : e === "\\lceil" || e === "⌈" ? (o = "⎡", c = l = "⎢", f = "Size4-Regular", u = "lceil", d = 667) : e === "\\rfloor" || e === "⌋" ? (c = o = "⎥", l = "⎦", f = "Size4-Regular", u = "rfloor", d = 667) : e === "\\rceil" || e === "⌉" ? (o = "⎤", c = l = "⎥", f = "Size4-Regular", u = "rceil", d = 667) : e === "(" || e === "\\lparen" ? (o = "⎛", c = "⎜", l = "⎝", f = "Size4-Regular", u = "lparen", d = 875) : e === ")" || e === "\\rparen" ? (o = "⎞", c = "⎟", l = "⎠", f = "Size4-Regular", u = "rparen", d = 875) : e === "\\{" || e === "\\lbrace" ? (o = "⎧", s = "⎨", l = "⎩", c = "⎪", f = "Size4-Regular") : e === "\\}" || e === "\\rbrace" ? (o = "⎫", s = "⎬", l = "⎭", c = "⎪", f = "Size4-Regular") : e === "\\lgroup" || e === "⟮" ? (o = "⎧", l = "⎩", c = "⎪", f = "Size4-Regular") : e === "\\rgroup" || e === "⟯" ? (o = "⎫", l = "⎭", c = "⎪", f = "Size4-Regular") : e === "\\lmoustache" || e === "⎰" ? (o = "⎧", l = "⎭", c = "⎪", f = "Size4-Regular") : (e === "\\rmoustache" || e === "⎱") && (o = "⎫", l = "⎩", c = "⎪", f = "Size4-Regular");
17496
- var p = yr(o, f, i), m = p.height + p.depth, h = yr(c, f, i), g = h.height + h.depth, _ = yr(l, f, i), v = _.height + _.depth, y = 0, b = 1;
17454
+ e === "\\uparrow" ? c = l = "⏐" : e === "\\Uparrow" ? c = l = "‖" : e === "\\downarrow" ? o = c = "⏐" : e === "\\Downarrow" ? o = c = "‖" : e === "\\updownarrow" ? (o = "\\uparrow", c = "⏐", l = "\\downarrow") : e === "\\Updownarrow" ? (o = "\\Uparrow", c = "‖", l = "\\Downarrow") : Ar.has(e) ? (c = "∣", u = "vert", d = 333) : jr.has(e) ? (c = "∥", u = "doublevert", d = 556) : e === "[" || e === "\\lbrack" ? (o = "⎡", c = "⎢", l = "⎣", f = "Size4-Regular", u = "lbrack", d = 667) : e === "]" || e === "\\rbrack" ? (o = "⎤", c = "⎥", l = "⎦", f = "Size4-Regular", u = "rbrack", d = 667) : e === "\\lfloor" || e === "⌊" ? (c = o = "⎢", l = "⎣", f = "Size4-Regular", u = "lfloor", d = 667) : e === "\\lceil" || e === "⌈" ? (o = "⎡", c = l = "⎢", f = "Size4-Regular", u = "lceil", d = 667) : e === "\\rfloor" || e === "⌋" ? (c = o = "⎥", l = "⎦", f = "Size4-Regular", u = "rfloor", d = 667) : e === "\\rceil" || e === "⌉" ? (o = "⎤", c = l = "⎥", f = "Size4-Regular", u = "rceil", d = 667) : e === "(" || e === "\\lparen" ? (o = "⎛", c = "⎜", l = "⎝", f = "Size4-Regular", u = "lparen", d = 875) : e === ")" || e === "\\rparen" ? (o = "⎞", c = "⎟", l = "⎠", f = "Size4-Regular", u = "rparen", d = 875) : e === "\\{" || e === "\\lbrace" ? (o = "⎧", s = "⎨", l = "⎩", c = "⎪", f = "Size4-Regular") : e === "\\}" || e === "\\rbrace" ? (o = "⎫", s = "⎬", l = "⎭", c = "⎪", f = "Size4-Regular") : e === "\\lgroup" || e === "⟮" ? (o = "⎧", l = "⎩", c = "⎪", f = "Size4-Regular") : e === "\\rgroup" || e === "⟯" ? (o = "⎫", l = "⎭", c = "⎪", f = "Size4-Regular") : e === "\\lmoustache" || e === "⎰" ? (o = "⎧", l = "⎭", c = "⎪", f = "Size4-Regular") : (e === "\\rmoustache" || e === "⎱") && (o = "⎫", l = "⎩", c = "⎪", f = "Size4-Regular");
17455
+ var p = br(o, f, i), m = p.height + p.depth, h = br(c, f, i), g = h.height + h.depth, _ = br(l, f, i), v = _.height + _.depth, y = 0, b = 1;
17497
17456
  if (s !== null) {
17498
- var x = yr(s, f, i);
17457
+ var x = br(s, f, i);
17499
17458
  y = x.height + x.depth, b = 2;
17500
17459
  }
17501
17460
  var S = m + v + y, C = S + Math.max(0, Math.ceil((t - S) / (b * g))) * b * g, w = r.fontMetrics().axisHeight;
@@ -17512,36 +17471,36 @@ var yr = function(e, t, n) {
17512
17471
  elem: oe
17513
17472
  });
17514
17473
  } else {
17515
- if (E.push(Tr(l, f, i)), E.push(Or), s === null) {
17516
- var se = C - m - v + 2 * Dr;
17517
- E.push(Er(c, se, r));
17474
+ if (E.push(Er(l, f, i)), E.push(kr), s === null) {
17475
+ var se = C - m - v + 2 * Or;
17476
+ E.push(Dr(c, se, r));
17518
17477
  } else {
17519
- var ce = (C - m - v - y) / 2 + 2 * Dr;
17520
- E.push(Er(c, ce, r)), E.push(Or), E.push(Tr(s, f, i)), E.push(Or), E.push(Er(c, ce, r));
17478
+ var ce = (C - m - v - y) / 2 + 2 * Or;
17479
+ E.push(Dr(c, ce, r)), E.push(kr), E.push(Er(s, f, i)), E.push(kr), E.push(Dr(c, ce, r));
17521
17480
  }
17522
- E.push(Or), E.push(Tr(o, f, i));
17481
+ E.push(kr), E.push(Er(o, f, i));
17523
17482
  }
17524
17483
  var le = r.havingBaseStyle(D.TEXT);
17525
- return br(G(["delimsizing", "mult"], [K({
17484
+ return xr(G(["delimsizing", "mult"], [K({
17526
17485
  positionType: "bottom",
17527
17486
  positionData: T,
17528
17487
  children: E
17529
17488
  })], le), D.TEXT, r, a);
17530
- }, Mr = 80, Nr = .08, Pr = function(e, t, n, r, i) {
17489
+ }, Nr = 80, Pr = .08, Fr = function(e, t, n, r, i) {
17531
17490
  return Vt(["hide-tail"], [new Re([new ze(e, ve(e, r, n))], {
17532
17491
  width: "400em",
17533
17492
  height: A(t),
17534
17493
  viewBox: "0 0 400000 " + n,
17535
17494
  preserveAspectRatio: "xMinYMin slice"
17536
17495
  })], i);
17537
- }, Fr = function(e, t) {
17538
- var n = t.havingBaseSizing(), r = Gr("\\surd", e * n.sizeMultiplier, Ur, n), i = n.sizeMultiplier, a = Math.max(0, t.minRuleThickness - t.fontMetrics().sqrtRuleThickness), o, s, c, l, u;
17539
- return r.type === "small" ? (l = 1e3 + 1e3 * a + Mr, e < 1 ? i = 1 : e < 1.4 && (i = .7), s = (1 + a + Nr) / i, c = (1 + a) / i, o = Pr("sqrtMain", s, l, a, t), o.style.minWidth = "0.853em", u = .833 / i) : r.type === "large" ? (l = (1e3 + Mr) * zr[r.size], c = (zr[r.size] + a) / i, s = (zr[r.size] + a + Nr) / i, o = Pr("sqrtSize" + r.size, s, l, a, t), o.style.minWidth = "1.02em", u = 1 / i) : (s = e + a + Nr, c = e + a, l = Math.floor(1e3 * e + a) + Mr, o = Pr("sqrtTall", s, l, a, t), o.style.minWidth = "0.742em", u = 1.056), o.height = c, o.style.height = A(s), {
17496
+ }, Ir = function(e, t) {
17497
+ var n = t.havingBaseSizing(), r = Kr("\\surd", e * n.sizeMultiplier, Wr, n), i = n.sizeMultiplier, a = Math.max(0, t.minRuleThickness - t.fontMetrics().sqrtRuleThickness), o, s, c, l, u;
17498
+ return r.type === "small" ? (l = 1e3 + 1e3 * a + Nr, e < 1 ? i = 1 : e < 1.4 && (i = .7), s = (1 + a + Pr) / i, c = (1 + a) / i, o = Fr("sqrtMain", s, l, a, t), o.style.minWidth = "0.853em", u = .833 / i) : r.type === "large" ? (l = (1e3 + Nr) * Br[r.size], c = (Br[r.size] + a) / i, s = (Br[r.size] + a + Pr) / i, o = Fr("sqrtSize" + r.size, s, l, a, t), o.style.minWidth = "1.02em", u = 1 / i) : (s = e + a + Pr, c = e + a, l = Math.floor(1e3 * e + a) + Nr, o = Fr("sqrtTall", s, l, a, t), o.style.minWidth = "0.742em", u = 1.056), o.height = c, o.style.height = A(s), {
17540
17499
  span: o,
17541
17500
  advanceWidth: u,
17542
17501
  ruleWidth: (t.fontMetrics().sqrtRuleThickness + a) * i
17543
17502
  };
17544
- }, Ir = /* @__PURE__ */ new Set([
17503
+ }, Lr = /* @__PURE__ */ new Set([
17545
17504
  "(",
17546
17505
  "\\lparen",
17547
17506
  ")",
@@ -17563,7 +17522,7 @@ var yr = function(e, t, n) {
17563
17522
  "⌈",
17564
17523
  "⌉",
17565
17524
  "\\surd"
17566
- ]), Lr = /* @__PURE__ */ new Set([
17525
+ ]), Rr = /* @__PURE__ */ new Set([
17567
17526
  "\\uparrow",
17568
17527
  "\\downarrow",
17569
17528
  "\\updownarrow",
@@ -17586,7 +17545,7 @@ var yr = function(e, t, n) {
17586
17545
  "\\rmoustache",
17587
17546
  "⎰",
17588
17547
  "⎱"
17589
- ]), Rr = /* @__PURE__ */ new Set([
17548
+ ]), zr = /* @__PURE__ */ new Set([
17590
17549
  "<",
17591
17550
  ">",
17592
17551
  "\\langle",
@@ -17595,17 +17554,17 @@ var yr = function(e, t, n) {
17595
17554
  "\\backslash",
17596
17555
  "\\lt",
17597
17556
  "\\gt"
17598
- ]), zr = [
17557
+ ]), Br = [
17599
17558
  0,
17600
17559
  1.2,
17601
17560
  1.8,
17602
17561
  2.4,
17603
17562
  3
17604
- ], Br = function(e, t, r, i, a) {
17605
- if (e === "<" || e === "\\lt" || e === "⟨" ? e = "\\langle" : (e === ">" || e === "\\gt" || e === "⟩") && (e = "\\rangle"), Ir.has(e) || Rr.has(e)) return wr(e, t, !1, r, i, a);
17606
- if (Lr.has(e)) return jr(e, zr[t], !1, r, i, a);
17563
+ ], Vr = function(e, t, r, i, a) {
17564
+ if (e === "<" || e === "\\lt" || e === "⟨" ? e = "\\langle" : (e === ">" || e === "\\gt" || e === "⟩") && (e = "\\rangle"), Lr.has(e) || zr.has(e)) return Tr(e, t, !1, r, i, a);
17565
+ if (Rr.has(e)) return Mr(e, Br[t], !1, r, i, a);
17607
17566
  throw new n("Illegal delimiter: '" + e + "'");
17608
- }, Vr = [
17567
+ }, Hr = [
17609
17568
  {
17610
17569
  type: "small",
17611
17570
  style: D.SCRIPTSCRIPT
@@ -17634,7 +17593,7 @@ var yr = function(e, t, n) {
17634
17593
  type: "large",
17635
17594
  size: 4
17636
17595
  }
17637
- ], Hr = [
17596
+ ], Ur = [
17638
17597
  {
17639
17598
  type: "small",
17640
17599
  style: D.SCRIPTSCRIPT
@@ -17648,7 +17607,7 @@ var yr = function(e, t, n) {
17648
17607
  style: D.TEXT
17649
17608
  },
17650
17609
  { type: "stack" }
17651
- ], Ur = [
17610
+ ], Wr = [
17652
17611
  {
17653
17612
  type: "small",
17654
17613
  style: D.SCRIPTSCRIPT
@@ -17678,17 +17637,17 @@ var yr = function(e, t, n) {
17678
17637
  size: 4
17679
17638
  },
17680
17639
  { type: "stack" }
17681
- ], Wr = function(e) {
17640
+ ], Gr = function(e) {
17682
17641
  if (e.type === "small") return "Main-Regular";
17683
17642
  if (e.type === "large") return "Size" + e.size + "-Regular";
17684
17643
  if (e.type === "stack") return "Size4-Regular";
17685
17644
  var t = e.type;
17686
17645
  throw Error("Add support for delim type '" + t + "' here.");
17687
- }, Gr = function(e, t, n, r) {
17646
+ }, Kr = function(e, t, n, r) {
17688
17647
  for (var i = Math.min(2, 3 - r.style.size); i < n.length; i++) {
17689
17648
  var a = n[i];
17690
17649
  if (a.type === "stack") break;
17691
- var o = yr(e, Wr(a), "math"), s = o.height + o.depth;
17650
+ var o = br(e, Gr(a), "math"), s = o.height + o.depth;
17692
17651
  if (a.type === "small") {
17693
17652
  var c = r.havingBaseStyle(a.style);
17694
17653
  s *= c.sizeMultiplier;
@@ -17696,14 +17655,14 @@ var yr = function(e, t, n) {
17696
17655
  if (s > t) return a;
17697
17656
  }
17698
17657
  return n[n.length - 1];
17699
- }, Kr = function(e, t, n, r, i, a) {
17700
- e === "<" || e === "\\lt" || e === "⟨" ? e = "\\langle" : (e === ">" || e === "\\gt" || e === "⟩") && (e = "\\rangle");
17701
- var o = Rr.has(e) ? Vr : Ir.has(e) ? Ur : Hr, s = Gr(e, t, o, r);
17702
- return s.type === "small" ? Sr(e, s.style, n, r, i, a) : s.type === "large" ? wr(e, s.size, n, r, i, a) : jr(e, t, n, r, i, a);
17703
17658
  }, qr = function(e, t, n, r, i, a) {
17659
+ e === "<" || e === "\\lt" || e === "⟨" ? e = "\\langle" : (e === ">" || e === "\\gt" || e === "⟩") && (e = "\\rangle");
17660
+ var o = zr.has(e) ? Hr : Lr.has(e) ? Wr : Ur, s = Kr(e, t, o, r);
17661
+ return s.type === "small" ? Cr(e, s.style, n, r, i, a) : s.type === "large" ? Tr(e, s.size, n, r, i, a) : Mr(e, t, n, r, i, a);
17662
+ }, Jr = function(e, t, n, r, i, a) {
17704
17663
  var o = r.fontMetrics().axisHeight * r.sizeMultiplier, s = 901, c = 5 / r.fontMetrics().ptPerEm, l = Math.max(t - o, n + o);
17705
- return Kr(e, Math.max(l / 500 * s, 2 * l - c), !0, r, i, a);
17706
- }, Jr = {
17664
+ return qr(e, Math.max(l / 500 * s, 2 * l - c), !0, r, i, a);
17665
+ }, Yr = {
17707
17666
  "\\bigl": {
17708
17667
  mclass: "mopen",
17709
17668
  size: 1
@@ -17768,13 +17727,13 @@ var yr = function(e, t, n) {
17768
17727
  mclass: "mord",
17769
17728
  size: 4
17770
17729
  }
17771
- }, Yr = /* @__PURE__ */ new Set(/* @__PURE__ */ "(,\\lparen,),\\rparen,[,\\lbrack,],\\rbrack,\\{,\\lbrace,\\},\\rbrace,\\lfloor,\\rfloor,⌊,⌋,\\lceil,\\rceil,⌈,⌉,<,>,\\langle,⟨,\\rangle,⟩,\\lt,\\gt,\\lvert,\\rvert,\\lVert,\\rVert,\\lgroup,\\rgroup,⟮,⟯,\\lmoustache,\\rmoustache,⎰,⎱,/,\\backslash,|,\\vert,\\|,\\Vert,\\uparrow,\\Uparrow,\\downarrow,\\Downarrow,\\updownarrow,\\Updownarrow,.".split(","));
17772
- function Xr(e) {
17730
+ }, Xr = /* @__PURE__ */ new Set(/* @__PURE__ */ "(,\\lparen,),\\rparen,[,\\lbrack,],\\rbrack,\\{,\\lbrace,\\},\\rbrace,\\lfloor,\\rfloor,⌊,⌋,\\lceil,\\rceil,⌈,⌉,<,>,\\langle,⟨,\\rangle,⟩,\\lt,\\gt,\\lvert,\\rvert,\\lVert,\\rVert,\\lgroup,\\rgroup,⟮,⟯,\\lmoustache,\\rmoustache,⎰,⎱,/,\\backslash,|,\\vert,\\|,\\Vert,\\uparrow,\\Uparrow,\\downarrow,\\Downarrow,\\updownarrow,\\Updownarrow,.".split(","));
17731
+ function Zr(e) {
17773
17732
  return "isMiddle" in e;
17774
17733
  }
17775
- function Zr(e, t) {
17776
- var r = Qn(e);
17777
- if (r && Yr.has(r.text)) return r;
17734
+ function Qr(e, t) {
17735
+ var r = er(e);
17736
+ if (r && Xr.has(r.text)) return r;
17778
17737
  throw r ? new n("Invalid delimiter '" + r.text + "' after '" + t.funcName + "'", e) : new n("Invalid delimiter type '" + e.type + "'", e);
17779
17738
  }
17780
17739
  J({
@@ -17797,59 +17756,53 @@ J({
17797
17756
  "\\bigg",
17798
17757
  "\\Bigg"
17799
17758
  ],
17800
- props: {
17801
- numArgs: 1,
17802
- argTypes: ["primitive"]
17803
- },
17759
+ numArgs: 1,
17760
+ argTypes: ["primitive"],
17804
17761
  handler: (e, t) => {
17805
- var n = Zr(t[0], e);
17762
+ var n = Qr(sn(t[0]), e);
17806
17763
  return {
17807
17764
  type: "delimsizing",
17808
17765
  mode: e.parser.mode,
17809
- size: Jr[e.funcName].size,
17810
- mclass: Jr[e.funcName].mclass,
17766
+ size: Yr[e.funcName].size,
17767
+ mclass: Yr[e.funcName].mclass,
17811
17768
  delim: n.text
17812
17769
  };
17813
17770
  },
17814
- htmlBuilder: (e, t) => e.delim === "." ? G([e.mclass]) : Br(e.delim, e.size, t, e.mode, [e.mclass]),
17771
+ htmlBuilder: (e, t) => e.delim === "." ? G([e.mclass]) : Vr(e.delim, e.size, t, e.mode, [e.mclass]),
17815
17772
  mathmlBuilder: (e) => {
17816
17773
  var t = [];
17817
17774
  e.delim !== "." && t.push(En(e.delim, e.mode));
17818
17775
  var n = new X("mo", t);
17819
17776
  e.mclass === "mopen" || e.mclass === "mclose" ? n.setAttribute("fence", "true") : n.setAttribute("fence", "false"), n.setAttribute("stretchy", "true");
17820
- var r = A(zr[e.size]);
17777
+ var r = A(Br[e.size]);
17821
17778
  return n.setAttribute("minsize", r), n.setAttribute("maxsize", r), n;
17822
17779
  }
17823
17780
  });
17824
- function Qr(e) {
17781
+ function $r(e) {
17825
17782
  if (!e.body) throw Error("Bug: The leftright ParseNode wasn't fully parsed.");
17826
17783
  }
17827
17784
  J({
17828
17785
  type: "leftright-right",
17829
17786
  names: ["\\right"],
17830
- props: {
17831
- numArgs: 1,
17832
- primitive: !0
17833
- },
17787
+ numArgs: 1,
17788
+ primitive: !0,
17834
17789
  handler: (e, t) => {
17835
17790
  var r = e.parser.gullet.macros.get("\\current@color");
17836
17791
  if (r && typeof r != "string") throw new n("\\current@color set to non-string in \\right");
17837
17792
  return {
17838
17793
  type: "leftright-right",
17839
17794
  mode: e.parser.mode,
17840
- delim: Zr(t[0], e).text,
17795
+ delim: Qr(t[0], e).text,
17841
17796
  color: r
17842
17797
  };
17843
17798
  }
17844
17799
  }), J({
17845
17800
  type: "leftright",
17846
17801
  names: ["\\left"],
17847
- props: {
17848
- numArgs: 1,
17849
- primitive: !0
17850
- },
17802
+ numArgs: 1,
17803
+ primitive: !0,
17851
17804
  handler: (e, t) => {
17852
- var n = Zr(t[0], e), r = e.parser;
17805
+ var n = Qr(t[0], e), r = e.parser;
17853
17806
  ++r.leftrightDepth;
17854
17807
  var i = r.parseExpression(!1);
17855
17808
  --r.leftrightDepth, r.expect("\\right", !1);
@@ -17864,30 +17817,30 @@ J({
17864
17817
  };
17865
17818
  },
17866
17819
  htmlBuilder: (e, t) => {
17867
- Qr(e);
17820
+ $r(e);
17868
17821
  for (var n = pn(e.body, t, !0, ["mopen", "mclose"]), r = 0, i = 0, a = !1, o = 0; o < n.length; o++) {
17869
17822
  var s = n[o];
17870
- Xr(s) ? a = !0 : (r = Math.max(n[o].height, r), i = Math.max(n[o].depth, i));
17823
+ Zr(s) ? a = !0 : (r = Math.max(n[o].height, r), i = Math.max(n[o].depth, i));
17871
17824
  }
17872
17825
  r *= t.sizeMultiplier, i *= t.sizeMultiplier;
17873
- var c = e.left === "." ? vn(t, ["mopen"]) : qr(e.left, r, i, t, e.mode, ["mopen"]);
17826
+ var c = e.left === "." ? vn(t, ["mopen"]) : Jr(e.left, r, i, t, e.mode, ["mopen"]);
17874
17827
  if (n.unshift(c), a) for (var l = 1; l < n.length; l++) {
17875
17828
  var u = n[l];
17876
- if (Xr(u)) {
17829
+ if (Zr(u)) {
17877
17830
  var d = u.isMiddle;
17878
- n[l] = qr(d.delim, r, i, d.options, e.mode, []);
17831
+ n[l] = Jr(d.delim, r, i, d.options, e.mode, []);
17879
17832
  }
17880
17833
  }
17881
17834
  var f;
17882
17835
  if (e.right === ".") f = vn(t, ["mclose"]);
17883
17836
  else {
17884
17837
  var p = e.rightColor ? t.withColor(e.rightColor) : t;
17885
- f = qr(e.right, r, i, p, e.mode, ["mclose"]);
17838
+ f = Jr(e.right, r, i, p, e.mode, ["mclose"]);
17886
17839
  }
17887
17840
  return n.push(f), G(["minner"], n, t);
17888
17841
  },
17889
17842
  mathmlBuilder: (e, t) => {
17890
- Qr(e);
17843
+ $r(e);
17891
17844
  var n = jn(e.body, t);
17892
17845
  if (e.left !== ".") {
17893
17846
  var r = new X("mo", [En(e.left, e.mode)]);
@@ -17902,12 +17855,10 @@ J({
17902
17855
  }), J({
17903
17856
  type: "middle",
17904
17857
  names: ["\\middle"],
17905
- props: {
17906
- numArgs: 1,
17907
- primitive: !0
17908
- },
17858
+ numArgs: 1,
17859
+ primitive: !0,
17909
17860
  handler: (e, t) => {
17910
- var r = Zr(t[0], e);
17861
+ var r = Qr(t[0], e);
17911
17862
  if (!e.parser.leftrightDepth) throw new n("\\middle without preceding \\left", r);
17912
17863
  return {
17913
17864
  type: "middle",
@@ -17917,7 +17868,7 @@ J({
17917
17868
  },
17918
17869
  htmlBuilder: (e, t) => {
17919
17870
  var n;
17920
- return e.delim === "." ? n = vn(t, []) : (n = Br(e.delim, 1, t, e.mode, []), n.isMiddle = {
17871
+ return e.delim === "." ? n = vn(t, []) : (n = Vr(e.delim, 1, t, e.mode, []), n.isMiddle = {
17921
17872
  delim: e.delim,
17922
17873
  options: t
17923
17874
  }), n;
@@ -17926,105 +17877,14 @@ J({
17926
17877
  var n = new X("mo", [e.delim === "\\vert" || e.delim === "|" ? En("|", "text") : En(e.delim, e.mode)]);
17927
17878
  return n.setAttribute("fence", "true"), n.setAttribute("lspace", "0.05em"), n.setAttribute("rspace", "0.05em"), n;
17928
17879
  }
17929
- });
17930
- var $r = (e, t) => {
17931
- var n = Gt(Y(e.body, t), t), r = e.label.slice(1), i = t.sizeMultiplier, a, o, s = u(e.body);
17932
- if (r === "sout") a = G(["stretchy", "sout"]), a.height = t.fontMetrics().defaultRuleThickness / i, o = -.5 * t.fontMetrics().xHeight;
17933
- else if (r === "phase") {
17934
- var c = k({
17935
- number: .6,
17936
- unit: "pt"
17937
- }, t), l = k({
17938
- number: .35,
17939
- unit: "ex"
17940
- }, t), d = t.havingBaseSizing();
17941
- i /= d.sizeMultiplier;
17942
- var f = n.height + n.depth + c + l;
17943
- n.style.paddingLeft = A(f / 2 + c);
17944
- var p = Math.floor(1e3 * f * i);
17945
- a = Vt(["hide-tail"], [new Re([new ze("phase", ge(p))], {
17946
- width: "400em",
17947
- height: A(p / 1e3),
17948
- viewBox: "0 0 400000 " + p,
17949
- preserveAspectRatio: "xMinYMin slice"
17950
- })], t), a.style.height = A(f), o = n.depth + c + l;
17951
- } else {
17952
- /cancel/.test(r) ? s || n.classes.push("cancel-pad") : r === "angl" ? n.classes.push("anglpad") : n.classes.push("boxpad");
17953
- var m, h, g = 0;
17954
- /box/.test(r) ? (g = Math.max(t.fontMetrics().fboxrule, t.minRuleThickness), m = t.fontMetrics().fboxsep + (r === "colorbox" ? 0 : g), h = m) : r === "angl" ? (g = Math.max(t.fontMetrics().defaultRuleThickness, t.minRuleThickness), m = 4 * g, h = Math.max(0, .25 - n.depth)) : (m = s ? .2 : 0, h = m), a = qn(n, r, m, h, t), /fbox|boxed|fcolorbox/.test(r) ? (a.style.borderStyle = "solid", a.style.borderWidth = A(g)) : r === "angl" && g !== .049 && (a.style.borderTopWidth = A(g), a.style.borderRightWidth = A(g)), o = n.depth + h, e.backgroundColor && (a.style.backgroundColor = e.backgroundColor, e.borderColor && (a.style.borderColor = e.borderColor));
17955
- }
17956
- var _;
17957
- if (e.backgroundColor) _ = K({
17958
- positionType: "individualShift",
17959
- children: [{
17960
- type: "elem",
17961
- elem: a,
17962
- shift: o
17963
- }, {
17964
- type: "elem",
17965
- elem: n,
17966
- shift: 0
17967
- }]
17968
- });
17969
- else {
17970
- var v = /cancel|phase/.test(r) ? ["svg-align"] : [];
17971
- _ = K({
17972
- positionType: "individualShift",
17973
- children: [{
17974
- type: "elem",
17975
- elem: n,
17976
- shift: 0
17977
- }, {
17978
- type: "elem",
17979
- elem: a,
17980
- shift: o,
17981
- wrapperClasses: v
17982
- }]
17983
- });
17984
- }
17985
- return /cancel/.test(r) && (_.height = n.height, _.depth = n.depth), /cancel/.test(r) && !s ? G(["mord", "cancel-lap"], [_], t) : G(["mord"], [_], t);
17986
- }, ei = (e, t) => {
17987
- var n, r = new X(e.label.includes("colorbox") ? "mpadded" : "menclose", [Z(e.body, t)]);
17988
- switch (e.label) {
17989
- case "\\cancel":
17990
- r.setAttribute("notation", "updiagonalstrike");
17991
- break;
17992
- case "\\bcancel":
17993
- r.setAttribute("notation", "downdiagonalstrike");
17994
- break;
17995
- case "\\phase":
17996
- r.setAttribute("notation", "phasorangle");
17997
- break;
17998
- case "\\sout":
17999
- r.setAttribute("notation", "horizontalstrike");
18000
- break;
18001
- case "\\fbox":
18002
- r.setAttribute("notation", "box");
18003
- break;
18004
- case "\\angl":
18005
- r.setAttribute("notation", "actuarial");
18006
- break;
18007
- case "\\fcolorbox":
18008
- case "\\colorbox":
18009
- if (n = t.fontMetrics().fboxsep * t.fontMetrics().ptPerEm, r.setAttribute("width", "+" + 2 * n + "pt"), r.setAttribute("height", "+" + 2 * n + "pt"), r.setAttribute("lspace", n + "pt"), r.setAttribute("voffset", n + "pt"), e.label === "\\fcolorbox") {
18010
- var i = Math.max(t.fontMetrics().fboxrule, t.minRuleThickness);
18011
- r.setAttribute("style", "border: " + A(i) + " solid " + e.borderColor);
18012
- }
18013
- break;
18014
- case "\\xcancel": r.setAttribute("notation", "updiagonalstrike downdiagonalstrike");
18015
- }
18016
- return e.backgroundColor && r.setAttribute("mathbackground", e.backgroundColor), r;
18017
- };
18018
- J({
17880
+ }), J({
18019
17881
  type: "enclose",
18020
17882
  names: ["\\colorbox"],
18021
- props: {
18022
- numArgs: 2,
18023
- allowedInText: !0,
18024
- argTypes: ["color", "hbox"]
18025
- },
17883
+ numArgs: 2,
17884
+ allowedInText: !0,
17885
+ argTypes: ["color", "hbox"],
18026
17886
  handler(e, t, n) {
18027
- var { parser: r, funcName: i } = e, a = Q(t[0], "color-token").color, o = t[1];
17887
+ var r = e.parser, i = e.funcName, a = Q(t[0], "color-token").color, o = t[1];
18028
17888
  return {
18029
17889
  type: "enclose",
18030
17890
  mode: r.mode,
@@ -18033,22 +17893,107 @@ J({
18033
17893
  body: o
18034
17894
  };
18035
17895
  },
18036
- htmlBuilder: $r,
18037
- mathmlBuilder: ei
17896
+ htmlBuilder: (e, t) => {
17897
+ var n = Gt(Y(e.body, t), t), r = e.label.slice(1), i = t.sizeMultiplier, a, o, s = u(e.body);
17898
+ if (r === "sout") a = G(["katex-stretchy", "katex-sout"]), a.height = t.fontMetrics().defaultRuleThickness / i, o = -.5 * t.fontMetrics().xHeight;
17899
+ else if (r === "phase") {
17900
+ var c = k({
17901
+ number: .6,
17902
+ unit: "pt"
17903
+ }, t), l = k({
17904
+ number: .35,
17905
+ unit: "ex"
17906
+ }, t), d = t.havingBaseSizing();
17907
+ i /= d.sizeMultiplier;
17908
+ var f = n.height + n.depth + c + l;
17909
+ n.style.paddingLeft = A(f / 2 + c);
17910
+ var p = Math.floor(1e3 * f * i);
17911
+ a = Vt(["hide-tail"], [new Re([new ze("phase", ge(p))], {
17912
+ width: "400em",
17913
+ height: A(p / 1e3),
17914
+ viewBox: "0 0 400000 " + p,
17915
+ preserveAspectRatio: "xMinYMin slice"
17916
+ })], t), a.style.height = A(f), o = n.depth + c + l;
17917
+ } else {
17918
+ /cancel/.test(r) ? s || n.classes.push("cancel-pad") : r === "angl" ? n.classes.push("anglpad") : n.classes.push("boxpad");
17919
+ var m, h, g = 0;
17920
+ /box/.test(r) ? (g = Math.max(t.fontMetrics().fboxrule, t.minRuleThickness), m = t.fontMetrics().fboxsep + (r === "colorbox" ? 0 : g), h = m) : r === "angl" ? (g = Math.max(t.fontMetrics().defaultRuleThickness, t.minRuleThickness), m = 4 * g, h = Math.max(0, .25 - n.depth)) : (m = s ? .2 : 0, h = m), a = qn(n, r, m, h, t), /fbox|boxed|fcolorbox/.test(r) ? (a.style.borderStyle = "solid", a.style.borderWidth = A(g)) : r === "angl" && g !== .049 && (a.style.borderTopWidth = A(g), a.style.borderRightWidth = A(g)), o = n.depth + h, e.backgroundColor && (a.style.backgroundColor = e.backgroundColor, e.borderColor && (a.style.borderColor = e.borderColor));
17921
+ }
17922
+ var _;
17923
+ if (e.backgroundColor) _ = K({
17924
+ positionType: "individualShift",
17925
+ children: [{
17926
+ type: "elem",
17927
+ elem: a,
17928
+ shift: o
17929
+ }, {
17930
+ type: "elem",
17931
+ elem: n,
17932
+ shift: 0
17933
+ }]
17934
+ });
17935
+ else {
17936
+ var v = /cancel|phase/.test(r) ? ["svg-align"] : [];
17937
+ _ = K({
17938
+ positionType: "individualShift",
17939
+ children: [{
17940
+ type: "elem",
17941
+ elem: n,
17942
+ shift: 0
17943
+ }, {
17944
+ type: "elem",
17945
+ elem: a,
17946
+ shift: o,
17947
+ wrapperClasses: v
17948
+ }]
17949
+ });
17950
+ }
17951
+ return /cancel/.test(r) && (_.height = n.height, _.depth = n.depth), /cancel/.test(r) && !s ? G(["mord", "cancel-lap"], [_], t) : G(["mord"], [_], t);
17952
+ },
17953
+ mathmlBuilder: (e, t) => {
17954
+ var n, r = new X(e.label.includes("colorbox") ? "mpadded" : "menclose", [Z(e.body, t)]);
17955
+ switch (e.label) {
17956
+ case "\\cancel":
17957
+ r.setAttribute("notation", "updiagonalstrike");
17958
+ break;
17959
+ case "\\bcancel":
17960
+ r.setAttribute("notation", "downdiagonalstrike");
17961
+ break;
17962
+ case "\\phase":
17963
+ r.setAttribute("notation", "phasorangle");
17964
+ break;
17965
+ case "\\sout":
17966
+ r.setAttribute("notation", "horizontalstrike");
17967
+ break;
17968
+ case "\\fbox":
17969
+ r.setAttribute("notation", "box");
17970
+ break;
17971
+ case "\\angl":
17972
+ r.setAttribute("notation", "actuarial");
17973
+ break;
17974
+ case "\\fcolorbox":
17975
+ case "\\colorbox":
17976
+ if (n = t.fontMetrics().fboxsep * t.fontMetrics().ptPerEm, r.setAttribute("width", "+" + 2 * n + "pt"), r.setAttribute("height", "+" + 2 * n + "pt"), r.setAttribute("lspace", n + "pt"), r.setAttribute("voffset", n + "pt"), e.label === "\\fcolorbox") {
17977
+ var i = Math.max(t.fontMetrics().fboxrule, t.minRuleThickness);
17978
+ r.setAttribute("style", "border: " + A(i) + " solid " + e.borderColor);
17979
+ }
17980
+ break;
17981
+ case "\\xcancel": r.setAttribute("notation", "updiagonalstrike downdiagonalstrike");
17982
+ }
17983
+ return e.backgroundColor && r.setAttribute("mathbackground", e.backgroundColor), r;
17984
+ }
18038
17985
  }), J({
18039
17986
  type: "enclose",
18040
17987
  names: ["\\fcolorbox"],
18041
- props: {
18042
- numArgs: 3,
18043
- allowedInText: !0,
18044
- argTypes: [
18045
- "color",
18046
- "color",
18047
- "hbox"
18048
- ]
18049
- },
17988
+ numArgs: 3,
17989
+ allowedInText: !0,
17990
+ argTypes: [
17991
+ "color",
17992
+ "color",
17993
+ "hbox"
17994
+ ],
18050
17995
  handler(e, t, n) {
18051
- var { parser: r, funcName: i } = e, a = Q(t[0], "color-token").color, o = Q(t[1], "color-token").color, s = t[2];
17996
+ var r = e.parser, i = e.funcName, a = Q(t[0], "color-token").color, o = Q(t[1], "color-token").color, s = t[2];
18052
17997
  return {
18053
17998
  type: "enclose",
18054
17999
  mode: r.mode,
@@ -18057,22 +18002,17 @@ J({
18057
18002
  borderColor: a,
18058
18003
  body: s
18059
18004
  };
18060
- },
18061
- htmlBuilder: $r,
18062
- mathmlBuilder: ei
18005
+ }
18063
18006
  }), J({
18064
18007
  type: "enclose",
18065
18008
  names: ["\\fbox"],
18066
- props: {
18067
- numArgs: 1,
18068
- argTypes: ["hbox"],
18069
- allowedInText: !0
18070
- },
18009
+ numArgs: 1,
18010
+ argTypes: ["hbox"],
18011
+ allowedInText: !0,
18071
18012
  handler(e, t) {
18072
- var { parser: n } = e;
18073
18013
  return {
18074
18014
  type: "enclose",
18075
- mode: n.mode,
18015
+ mode: e.parser.mode,
18076
18016
  label: "\\fbox",
18077
18017
  body: t[0]
18078
18018
  };
@@ -18085,27 +18025,23 @@ J({
18085
18025
  "\\xcancel",
18086
18026
  "\\phase"
18087
18027
  ],
18088
- props: { numArgs: 1 },
18028
+ numArgs: 1,
18089
18029
  handler(e, t) {
18090
- var { parser: n, funcName: r } = e, i = t[0];
18030
+ var n = e.parser, r = e.funcName, i = t[0];
18091
18031
  return {
18092
18032
  type: "enclose",
18093
18033
  mode: n.mode,
18094
18034
  label: r,
18095
18035
  body: i
18096
18036
  };
18097
- },
18098
- htmlBuilder: $r,
18099
- mathmlBuilder: ei
18037
+ }
18100
18038
  }), J({
18101
18039
  type: "enclose",
18102
18040
  names: ["\\sout"],
18103
- props: {
18104
- numArgs: 1,
18105
- allowedInText: !0
18106
- },
18041
+ numArgs: 1,
18042
+ allowedInText: !0,
18107
18043
  handler(e, t) {
18108
- var { parser: n, funcName: r } = e;
18044
+ var n = e.parser, r = e.funcName;
18109
18045
  n.mode === "math" && n.settings.reportNonstrict("mathVsSout", "LaTeX's \\sout works only in text mode");
18110
18046
  var i = t[0];
18111
18047
  return {
@@ -18114,72 +18050,67 @@ J({
18114
18050
  label: r,
18115
18051
  body: i
18116
18052
  };
18117
- },
18118
- htmlBuilder: $r,
18119
- mathmlBuilder: ei
18053
+ }
18120
18054
  }), J({
18121
18055
  type: "enclose",
18122
18056
  names: ["\\angl"],
18123
- props: {
18124
- numArgs: 1,
18125
- argTypes: ["hbox"],
18126
- allowedInText: !1
18127
- },
18057
+ numArgs: 1,
18058
+ argTypes: ["hbox"],
18059
+ allowedInText: !1,
18128
18060
  handler(e, t) {
18129
- var { parser: n } = e;
18130
18061
  return {
18131
18062
  type: "enclose",
18132
- mode: n.mode,
18063
+ mode: e.parser.mode,
18133
18064
  label: "\\angl",
18134
18065
  body: t[0]
18135
18066
  };
18136
18067
  }
18137
18068
  });
18138
- var ti = {};
18139
- function ni(e) {
18140
- for (var { type: t, names: n, props: r, handler: i, htmlBuilder: a, mathmlBuilder: o } = e, s = {
18069
+ var ei = {};
18070
+ function ti(e) {
18071
+ for (var t = e.type, n = e.names, r = e.props, i = e.handler, a = e.htmlBuilder, o = e.mathmlBuilder, s = {
18141
18072
  type: t,
18142
18073
  numArgs: r.numArgs || 0,
18143
18074
  allowedInText: !1,
18144
18075
  numOptionalArgs: 0,
18145
18076
  handler: i
18146
- }, c = 0; c < n.length; ++c) ti[n[c]] = s;
18077
+ }, c = 0; c < n.length; ++c) ei[n[c]] = s;
18147
18078
  a && (rn[t] = a), o && (an[t] = o);
18148
18079
  }
18149
- var ri = {};
18080
+ var ni = {};
18150
18081
  function $(e, t) {
18151
- ri[e] = t;
18082
+ ni[e] = t;
18152
18083
  }
18153
- var ii = class e {
18084
+ var ri = class e {
18154
18085
  constructor(e, t, n) {
18155
18086
  this.lexer = void 0, this.start = void 0, this.end = void 0, this.lexer = e, this.start = t, this.end = n;
18156
18087
  }
18157
18088
  static range(t, n) {
18158
18089
  return n ? !t || !t.loc || !n.loc || t.loc.lexer !== n.loc.lexer ? null : new e(t.loc.lexer, t.loc.start, n.loc.end) : t && t.loc;
18159
18090
  }
18160
- }, ai = class e {
18091
+ }, ii = class e {
18161
18092
  constructor(e, t) {
18162
18093
  this.text = void 0, this.loc = void 0, this.noexpand = void 0, this.treatAsRelax = void 0, this.text = e, this.loc = t;
18163
18094
  }
18164
18095
  range(t, n) {
18165
- return new e(n, ii.range(this, t));
18096
+ return new e(n, ri.range(this, t));
18166
18097
  }
18167
18098
  };
18168
- function oi(e) {
18099
+ function ai(e) {
18169
18100
  var t = [];
18170
18101
  e.consumeSpaces();
18171
18102
  var n = e.fetch().text;
18172
18103
  for (n === "\\relax" && (e.consume(), e.consumeSpaces(), n = e.fetch().text); n === "\\hline" || n === "\\hdashline";) e.consume(), t.push(n === "\\hdashline"), e.consumeSpaces(), n = e.fetch().text;
18173
18104
  return t;
18174
18105
  }
18175
- var si = (e) => {
18106
+ var oi = (e) => {
18176
18107
  if (!e.parser.settings.displayMode) throw new n("{" + e.envName + "} can be used only in display mode.");
18177
- }, ci = /* @__PURE__ */ new Set(["gather", "gather*"]);
18178
- function li(e) {
18108
+ }, si = /* @__PURE__ */ new Set(["gather", "gather*"]);
18109
+ function ci(e) {
18179
18110
  if (!e.includes("ed")) return !e.includes("*");
18180
18111
  }
18181
- function ui(e, t, r) {
18182
- var { hskipBeforeAndAfter: i, addJot: a, cols: o, arraystretch: s, colSeparationType: c, autoTag: l, singleRow: u, emptySingleRow: d, maxNumCols: f, leqno: p } = t;
18112
+ function li(e, t, r) {
18113
+ var i = t.hskipBeforeAndAfter, a = t.addJot, o = t.cols, s = t.arraystretch, c = t.colSeparationType, l = t.autoTag, u = t.singleRow, d = t.emptySingleRow, f = t.maxNumCols, p = t.leqno;
18183
18114
  if (e.gullet.beginGroup(), u || e.gullet.macros.set("\\cr", "\\\\\\relax"), !s) {
18184
18115
  var m = e.gullet.expandMacroAsText("\\arraystretch");
18185
18116
  if (m == null) s = 1;
@@ -18191,9 +18122,9 @@ function ui(e, t, r) {
18191
18122
  l && e.gullet.macros.set("\\@eqnsw", "1", !0);
18192
18123
  }
18193
18124
  function x() {
18194
- y && (e.gullet.macros.get("\\df@tag") ? (y.push(e.subparse([new ai("\\df@tag")])), e.gullet.macros.set("\\df@tag", void 0, !0)) : y.push(!!l && e.gullet.macros.get("\\@eqnsw") === "1"));
18125
+ y && (e.gullet.macros.get("\\df@tag") ? (y.push(e.subparse([new ii("\\df@tag")])), e.gullet.macros.set("\\df@tag", void 0, !0)) : y.push(!!l && e.gullet.macros.get("\\@eqnsw") === "1"));
18195
18126
  }
18196
- for (b(), v.push(oi(e));;) {
18127
+ for (b(), v.push(ai(e));;) {
18197
18128
  var S = e.parseExpression(!1, u ? "\\end" : "\\\\");
18198
18129
  e.gullet.endGroup(), e.gullet.beginGroup();
18199
18130
  var C = {
@@ -18221,7 +18152,7 @@ function ui(e, t, r) {
18221
18152
  } else if (w === "\\\\") {
18222
18153
  e.consume();
18223
18154
  var T = void 0;
18224
- e.gullet.future().text !== " " && (T = e.parseSizeGroup(!0)), _.push(T ? T.value : null), x(), v.push(oi(e)), h = [], g.push(h), b();
18155
+ e.gullet.future().text !== " " && (T = e.parseSizeGroup(!0)), _.push(T ? T.value : null), x(), v.push(ai(e)), h = [], g.push(h), b();
18225
18156
  } else throw new n("Expected & or \\\\ or \\cr or \\end", e.nextToken);
18226
18157
  }
18227
18158
  return e.gullet.endGroup(), e.gullet.endGroup(), {
@@ -18239,10 +18170,10 @@ function ui(e, t, r) {
18239
18170
  leqno: p
18240
18171
  };
18241
18172
  }
18242
- function di(e) {
18173
+ function ui(e) {
18243
18174
  return e.slice(0, 1) === "d" ? "display" : "text";
18244
18175
  }
18245
- var fi = function(e, t) {
18176
+ var di = function(e, t) {
18246
18177
  var r, i, a = e.body.length, o = e.hLinesBeforeRow, s = 0, c = Array(a), l = [], u = Math.max(t.fontMetrics().arrayRuleWidth, t.minRuleThickness), d = 1 / t.fontMetrics().ptPerEm, f = 5 * d;
18247
18178
  e.colSeparationType && e.colSeparationType === "small" && (f = .2778 * (t.havingStyle(D.SCRIPT).sizeMultiplier / t.sizeMultiplier));
18248
18179
  var p = e.colSeparationType === "CD" ? k({
@@ -18315,7 +18246,7 @@ var fi = function(e, t) {
18315
18246
  }
18316
18247
  var Se = G(["mtable"], ne);
18317
18248
  if (l.length > 0) {
18318
- for (var Ce = Ht("hline", t, u), we = Ht("hdashline", t, u), Te = [{
18249
+ for (var Ce = Ht("katex-hline", t, u), we = Ht("katex-hdashline", t, u), Te = [{
18319
18250
  type: "elem",
18320
18251
  elem: Se,
18321
18252
  shift: 0
@@ -18337,16 +18268,16 @@ var fi = function(e, t) {
18337
18268
  });
18338
18269
  }
18339
18270
  if (ae.length === 0) return G(["mord"], [Se], t);
18340
- var Oe = G(["tag"], [K({
18271
+ var Oe = G(["katex-tag"], [K({
18341
18272
  positionType: "individualShift",
18342
18273
  children: ae
18343
18274
  })], t);
18344
18275
  return Wt([Se, Oe]);
18345
- }, pi = {
18276
+ }, fi = {
18346
18277
  c: "center ",
18347
18278
  l: "left ",
18348
18279
  r: "right "
18349
- }, mi = function(e, t) {
18280
+ }, pi = function(e, t) {
18350
18281
  for (var n = [], r = new X("mtd", [], ["mtr-glue"]), i = new X("mtd", [], ["mml-eqn-num"]), a = 0; a < e.body.length; a++) {
18351
18282
  for (var o = e.body[a], s = [], c = 0; c < o.length; c++) s.push(new X("mtd", [Z(o[c], t)]));
18352
18283
  e.tags && e.tags[a] && (s.unshift(r), s.push(r), e.leqno ? s.unshift(i) : s.push(i)), n.push(new X("mtr", s));
@@ -18359,7 +18290,7 @@ var fi = function(e, t) {
18359
18290
  p[0].type === "separator" && (d += "top ", g = 1), p[p.length - 1].type === "separator" && (d += "bottom ", --_);
18360
18291
  for (var v = g; v < _; v++) {
18361
18292
  var y = p[v];
18362
- y.type === "align" ? (f += pi[y.align], h && (m += "none "), h = !0) : y.type === "separator" && (h &&= (m += y.separator === "|" ? "solid " : "dashed ", !1));
18293
+ y.type === "align" ? (f += fi[y.align], h && (m += "none "), h = !0) : y.type === "separator" && (h &&= (m += y.separator === "|" ? "solid " : "dashed ", !1));
18363
18294
  }
18364
18295
  l.setAttribute("columnalign", f.trim()), /[sd]/.test(m) && l.setAttribute("columnlines", m.trim());
18365
18296
  }
@@ -18371,55 +18302,53 @@ var fi = function(e, t) {
18371
18302
  d += w[0].length > 0 ? "left " : "", d += w[w.length - 1].length > 0 ? "right " : "";
18372
18303
  for (var T = 1; T < w.length - 1; T++) C += w[T].length === 0 ? "none " : w[T][0] ? "dashed " : "solid ";
18373
18304
  return /[sd]/.test(C) && l.setAttribute("rowlines", C.trim()), d !== "" && (l = new X("menclose", [l]), l.setAttribute("notation", d.trim())), e.arraystretch && e.arraystretch < 1 && (l = new X("mstyle", [l]), l.setAttribute("scriptlevel", "1")), l;
18374
- }, hi = function(e, t) {
18375
- e.envName.includes("ed") || si(e);
18376
- var r = [], i = e.envName.includes("at") ? "alignat" : "align", a = e.envName === "split", o = ui(e.parser, {
18305
+ }, mi = function(e, t) {
18306
+ e.envName.includes("ed") || oi(e);
18307
+ var r = [], i = e.envName === "split", a = li(e.parser, {
18377
18308
  cols: r,
18378
18309
  addJot: !0,
18379
- autoTag: a ? void 0 : li(e.envName),
18310
+ autoTag: i ? void 0 : ci(e.envName),
18380
18311
  emptySingleRow: !0,
18381
- colSeparationType: i,
18382
- maxNumCols: a ? 2 : void 0,
18312
+ colSeparationType: e.envName.includes("at") ? "alignat" : "align",
18313
+ maxNumCols: i ? 2 : void 0,
18383
18314
  leqno: e.parser.settings.leqno
18384
- }, "display"), s = 0, c = 0, l = {
18315
+ }, "display"), o = 0, s = 0, c = {
18385
18316
  type: "ordgroup",
18386
18317
  mode: e.mode,
18387
18318
  body: []
18388
18319
  };
18389
18320
  if (t[0] && t[0].type === "ordgroup") {
18390
- for (var u = "", d = 0; d < t[0].body.length; d++) {
18391
- var f = Q(t[0].body[d], "textord");
18392
- u += f.text;
18393
- }
18394
- s = Number(u), c = s * 2;
18395
- }
18396
- var p = !c;
18397
- o.body.forEach(function(e) {
18398
- for (var t = 1; t < e.length; t += 2) Q(Q(e[t], "styling").body[0], "ordgroup").body.unshift(l);
18399
- if (p) c < e.length && (c = e.length);
18321
+ var l = "Number of columns should be a positive integer", u = tr(t[0], l);
18322
+ if (!/^[0-9]+$/.test(u) || Number(u) < 1) throw new n(l, t[0]);
18323
+ o = Number(u), s = o * 2;
18324
+ }
18325
+ var d = !s;
18326
+ a.body.forEach(function(e) {
18327
+ for (var t = 1; t < e.length; t += 2) Q(Q(e[t], "styling").body[0], "ordgroup").body.unshift(c);
18328
+ if (d) s < e.length && (s = e.length);
18400
18329
  else {
18401
18330
  var r = e.length / 2;
18402
- if (s < r) throw new n("Too many math in a row: " + ("expected " + s + ", but got " + r), e[0]);
18331
+ if (o < r) throw new n("Too many math in a row: " + ("expected " + o + ", but got " + r), e[0]);
18403
18332
  }
18404
18333
  });
18405
- for (var m = 0; m < c; ++m) {
18406
- var h = "r", g = 0;
18407
- m % 2 == 1 ? h = "l" : m > 0 && p && (g = 1), r[m] = {
18334
+ for (var f = 0; f < s; ++f) {
18335
+ var p = "r", m = 0;
18336
+ f % 2 == 1 ? p = "l" : f > 0 && d && (m = 1), r[f] = {
18408
18337
  type: "align",
18409
- align: h,
18410
- pregap: g,
18338
+ align: p,
18339
+ pregap: m,
18411
18340
  postgap: 0
18412
18341
  };
18413
18342
  }
18414
- return o.colSeparationType = p ? "align" : "alignat", o;
18343
+ return a.colSeparationType = d ? "align" : "alignat", a;
18415
18344
  };
18416
- ni({
18345
+ ti({
18417
18346
  type: "array",
18418
18347
  names: ["array", "darray"],
18419
18348
  props: { numArgs: 1 },
18420
18349
  handler(e, t) {
18421
- var r = (Qn(t[0]) ? [t[0]] : Q(t[0], "ordgroup").body).map(function(e) {
18422
- var t = Zn(e).text;
18350
+ var r = (er(t[0]) ? [t[0]] : Q(t[0], "ordgroup").body).map(function(e) {
18351
+ var t = $n(e).text;
18423
18352
  if ("lcr".includes(t)) return {
18424
18353
  type: "align",
18425
18354
  align: t
@@ -18438,11 +18367,11 @@ ni({
18438
18367
  hskipBeforeAndAfter: !0,
18439
18368
  maxNumCols: r.length
18440
18369
  };
18441
- return ui(e.parser, i, di(e.envName));
18370
+ return li(e.parser, i, ui(e.envName));
18442
18371
  },
18443
- htmlBuilder: fi,
18444
- mathmlBuilder: mi
18445
- }), ni({
18372
+ htmlBuilder: di,
18373
+ mathmlBuilder: pi
18374
+ }), ti({
18446
18375
  type: "array",
18447
18376
  names: [
18448
18377
  "matrix",
@@ -18484,7 +18413,7 @@ ni({
18484
18413
  }];
18485
18414
  }
18486
18415
  }
18487
- var o = ui(e.parser, i, di(e.envName)), s = Math.max(0, ...o.body.map((e) => e.length));
18416
+ var o = li(e.parser, i, ui(e.envName)), s = Math.max(0, ...o.body.map((e) => e.length));
18488
18417
  return o.cols = Array(s).fill({
18489
18418
  type: "align",
18490
18419
  align: r
@@ -18497,25 +18426,25 @@ ni({
18497
18426
  rightColor: void 0
18498
18427
  } : o;
18499
18428
  },
18500
- htmlBuilder: fi,
18501
- mathmlBuilder: mi
18502
- }), ni({
18429
+ htmlBuilder: di,
18430
+ mathmlBuilder: pi
18431
+ }), ti({
18503
18432
  type: "array",
18504
18433
  names: ["smallmatrix"],
18505
18434
  props: { numArgs: 0 },
18506
18435
  handler(e) {
18507
- var t = ui(e.parser, { arraystretch: .5 }, "script");
18436
+ var t = li(e.parser, { arraystretch: .5 }, "script");
18508
18437
  return t.colSeparationType = "small", t;
18509
18438
  },
18510
- htmlBuilder: fi,
18511
- mathmlBuilder: mi
18512
- }), ni({
18439
+ htmlBuilder: di,
18440
+ mathmlBuilder: pi
18441
+ }), ti({
18513
18442
  type: "array",
18514
18443
  names: ["subarray"],
18515
18444
  props: { numArgs: 1 },
18516
18445
  handler(e, t) {
18517
- var r = (Qn(t[0]) ? [t[0]] : Q(t[0], "ordgroup").body).map(function(e) {
18518
- var t = Zn(e).text;
18446
+ var r = (er(t[0]) ? [t[0]] : Q(t[0], "ordgroup").body).map(function(e) {
18447
+ var t = $n(e).text;
18519
18448
  if ("lc".includes(t)) return {
18520
18449
  type: "align",
18521
18450
  align: t
@@ -18527,13 +18456,13 @@ ni({
18527
18456
  cols: r,
18528
18457
  hskipBeforeAndAfter: !1,
18529
18458
  arraystretch: .5
18530
- }, a = ui(e.parser, i, "script");
18459
+ }, a = li(e.parser, i, "script");
18531
18460
  if (a.body.length > 0 && a.body[0].length > 1) throw new n("{subarray} can contain only one column");
18532
18461
  return a;
18533
18462
  },
18534
- htmlBuilder: fi,
18535
- mathmlBuilder: mi
18536
- }), ni({
18463
+ htmlBuilder: di,
18464
+ mathmlBuilder: pi
18465
+ }), ti({
18537
18466
  type: "array",
18538
18467
  names: [
18539
18468
  "cases",
@@ -18543,7 +18472,7 @@ ni({
18543
18472
  ],
18544
18473
  props: { numArgs: 0 },
18545
18474
  handler(e) {
18546
- var t = ui(e.parser, {
18475
+ var t = li(e.parser, {
18547
18476
  arraystretch: 1.2,
18548
18477
  cols: [{
18549
18478
  type: "align",
@@ -18556,7 +18485,7 @@ ni({
18556
18485
  pregap: 0,
18557
18486
  postgap: 0
18558
18487
  }]
18559
- }, di(e.envName));
18488
+ }, ui(e.envName));
18560
18489
  return {
18561
18490
  type: "leftright",
18562
18491
  mode: e.mode,
@@ -18566,9 +18495,9 @@ ni({
18566
18495
  rightColor: void 0
18567
18496
  };
18568
18497
  },
18569
- htmlBuilder: fi,
18570
- mathmlBuilder: mi
18571
- }), ni({
18498
+ htmlBuilder: di,
18499
+ mathmlBuilder: pi
18500
+ }), ti({
18572
18501
  type: "array",
18573
18502
  names: [
18574
18503
  "align",
@@ -18577,10 +18506,10 @@ ni({
18577
18506
  "split"
18578
18507
  ],
18579
18508
  props: { numArgs: 0 },
18580
- handler: hi,
18581
- htmlBuilder: fi,
18582
- mathmlBuilder: mi
18583
- }), ni({
18509
+ handler: mi,
18510
+ htmlBuilder: di,
18511
+ mathmlBuilder: pi
18512
+ }), ti({
18584
18513
  type: "array",
18585
18514
  names: [
18586
18515
  "gathered",
@@ -18589,7 +18518,7 @@ ni({
18589
18518
  ],
18590
18519
  props: { numArgs: 0 },
18591
18520
  handler(e) {
18592
- ci.has(e.envName) && si(e);
18521
+ si.has(e.envName) && oi(e);
18593
18522
  var t = {
18594
18523
  cols: [{
18595
18524
  type: "align",
@@ -18597,15 +18526,15 @@ ni({
18597
18526
  }],
18598
18527
  addJot: !0,
18599
18528
  colSeparationType: "gather",
18600
- autoTag: li(e.envName),
18529
+ autoTag: ci(e.envName),
18601
18530
  emptySingleRow: !0,
18602
18531
  leqno: e.parser.settings.leqno
18603
18532
  };
18604
- return ui(e.parser, t, "display");
18533
+ return li(e.parser, t, "display");
18605
18534
  },
18606
- htmlBuilder: fi,
18607
- mathmlBuilder: mi
18608
- }), ni({
18535
+ htmlBuilder: di,
18536
+ mathmlBuilder: pi
18537
+ }), ti({
18609
18538
  type: "array",
18610
18539
  names: [
18611
18540
  "alignat",
@@ -18613,66 +18542,62 @@ ni({
18613
18542
  "alignedat"
18614
18543
  ],
18615
18544
  props: { numArgs: 1 },
18616
- handler: hi,
18617
- htmlBuilder: fi,
18618
- mathmlBuilder: mi
18619
- }), ni({
18545
+ handler: mi,
18546
+ htmlBuilder: di,
18547
+ mathmlBuilder: pi
18548
+ }), ti({
18620
18549
  type: "array",
18621
18550
  names: ["equation", "equation*"],
18622
18551
  props: { numArgs: 0 },
18623
18552
  handler(e) {
18624
- si(e);
18553
+ oi(e);
18625
18554
  var t = {
18626
- autoTag: li(e.envName),
18555
+ autoTag: ci(e.envName),
18627
18556
  emptySingleRow: !0,
18628
18557
  singleRow: !0,
18629
18558
  maxNumCols: 1,
18630
18559
  leqno: e.parser.settings.leqno
18631
18560
  };
18632
- return ui(e.parser, t, "display");
18561
+ return li(e.parser, t, "display");
18633
18562
  },
18634
- htmlBuilder: fi,
18635
- mathmlBuilder: mi
18636
- }), ni({
18563
+ htmlBuilder: di,
18564
+ mathmlBuilder: pi
18565
+ }), ti({
18637
18566
  type: "array",
18638
18567
  names: ["CD"],
18639
18568
  props: { numArgs: 0 },
18640
18569
  handler(e) {
18641
- return si(e), fr(e.parser);
18570
+ return oi(e), hr(e.parser);
18642
18571
  },
18643
- htmlBuilder: fi,
18644
- mathmlBuilder: mi
18572
+ htmlBuilder: di,
18573
+ mathmlBuilder: pi
18645
18574
  }), $("\\nonumber", "\\gdef\\@eqnsw{0}"), $("\\notag", "\\nonumber"), J({
18646
18575
  type: "text",
18647
18576
  names: ["\\hline", "\\hdashline"],
18648
- props: {
18649
- numArgs: 0,
18650
- allowedInText: !0,
18651
- allowedInMath: !0
18652
- },
18577
+ numArgs: 0,
18578
+ allowedInText: !0,
18579
+ allowedInMath: !0,
18653
18580
  handler(e, t) {
18654
18581
  throw new n(e.funcName + " valid only within array environment");
18655
18582
  }
18656
18583
  });
18657
- var gi = ti;
18584
+ var hi = ei;
18658
18585
  J({
18659
18586
  type: "environment",
18660
18587
  names: ["\\begin", "\\end"],
18661
- props: {
18662
- numArgs: 1,
18663
- argTypes: ["text"]
18664
- },
18588
+ numArgs: 1,
18589
+ argTypes: ["text"],
18665
18590
  handler(e, t) {
18666
- var { parser: r, funcName: i } = e, a = t[0];
18591
+ var r = e.parser, i = e.funcName, a = t[0];
18667
18592
  if (a.type !== "ordgroup") throw new n("Invalid environment name", a);
18668
- for (var o = "", s = 0; s < a.body.length; ++s) o += Q(a.body[s], "textord").text;
18593
+ var o = tr(a, "Environment name should contain only text characters and spaces", !0);
18669
18594
  if (i === "\\begin") {
18670
- if (!gi.hasOwnProperty(o)) throw new n("No such environment: " + o, a);
18671
- var c = gi[o], { args: l, optArgs: u } = r.parseArguments("\\begin{" + o + "}", c), d = {
18595
+ if (!Object.prototype.hasOwnProperty.call(hi, o)) throw new n("No such environment: " + o, a);
18596
+ var s = hi[o], c = r.parseArguments("\\begin{" + o + "}", s), l = c.args, u = c.optArgs, d = {
18672
18597
  mode: r.mode,
18673
18598
  envName: o,
18674
18599
  parser: r
18675
- }, f = c.handler(d, l, u);
18600
+ }, f = s.handler(d, l, u);
18676
18601
  r.expect("\\end", !1);
18677
18602
  var p = r.nextToken, m = Q(r.parseFunction(), "environment");
18678
18603
  if (m.name !== o) throw new n("Mismatch: \\begin{" + o + "} matched by \\end{" + m.name + "}", p);
@@ -18686,13 +18611,13 @@ J({
18686
18611
  };
18687
18612
  }
18688
18613
  });
18689
- var _i = (e, t) => {
18614
+ var gi = (e, t) => {
18690
18615
  var n = e.font, r = t.withFont(n);
18691
18616
  return Y(e.body, r);
18692
- }, vi = (e, t) => {
18617
+ }, _i = (e, t) => {
18693
18618
  var n = e.font, r = t.withFont(n);
18694
18619
  return Z(e.body, r);
18695
- }, yi = {
18620
+ }, vi = {
18696
18621
  "\\Bbb": "\\mathbb",
18697
18622
  "\\bold": "\\mathbf",
18698
18623
  "\\frak": "\\mathfrak"
@@ -18715,31 +18640,29 @@ J({
18715
18640
  "\\bold",
18716
18641
  "\\frak"
18717
18642
  ],
18718
- props: {
18719
- numArgs: 1,
18720
- allowedInArgument: !0
18721
- },
18643
+ numArgs: 1,
18644
+ allowedInArgument: !0,
18722
18645
  handler: (e, t) => {
18723
- var { parser: n, funcName: r } = e, i = sn(t[0]), a = r;
18724
- return a in yi && (a = yi[a]), {
18646
+ var n = e.parser, r = e.funcName, i = sn(t[0]), a = r in vi ? vi[r] : r;
18647
+ return {
18725
18648
  type: "font",
18726
18649
  mode: n.mode,
18727
18650
  font: a.slice(1),
18728
18651
  body: i
18729
18652
  };
18730
18653
  },
18731
- htmlBuilder: _i,
18732
- mathmlBuilder: vi
18654
+ htmlBuilder: gi,
18655
+ mathmlBuilder: _i
18733
18656
  }), J({
18734
18657
  type: "mclass",
18735
18658
  names: ["\\boldsymbol", "\\bm"],
18736
- props: { numArgs: 1 },
18659
+ numArgs: 1,
18737
18660
  handler: (e, t) => {
18738
- var { parser: n } = e, r = t[0];
18661
+ var n = e.parser, r = t[0];
18739
18662
  return {
18740
18663
  type: "mclass",
18741
18664
  mode: n.mode,
18742
- mclass: or(r),
18665
+ mclass: lr(r),
18743
18666
  body: [{
18744
18667
  type: "font",
18745
18668
  mode: n.mode,
@@ -18759,12 +18682,10 @@ J({
18759
18682
  "\\it",
18760
18683
  "\\cal"
18761
18684
  ],
18762
- props: {
18763
- numArgs: 0,
18764
- allowedInText: !0
18765
- },
18685
+ numArgs: 0,
18686
+ allowedInText: !0,
18766
18687
  handler: (e, t) => {
18767
- var { parser: n, funcName: r, breakOnTokenText: i } = e, { mode: a } = n, o = n.parseExpression(!0, i);
18688
+ var n = e.parser, r = e.funcName, i = e.breakOnTokenText, a = n.mode, o = n.parseExpression(!0, i);
18768
18689
  return {
18769
18690
  type: "font",
18770
18691
  mode: a,
@@ -18775,11 +18696,9 @@ J({
18775
18696
  body: o
18776
18697
  }
18777
18698
  };
18778
- },
18779
- htmlBuilder: _i,
18780
- mathmlBuilder: vi
18699
+ }
18781
18700
  });
18782
- var bi = (e, t) => {
18701
+ var yi = (e, t) => {
18783
18702
  var n = t.style, r = n.fracNum(), i = n.fracDen(), a = t.havingStyle(r), o = Y(e.numer, a, t);
18784
18703
  if (e.continued) {
18785
18704
  var s = 8.5 / t.fontMetrics().ptPerEm, c = 3.5 / t.fontMetrics().ptPerEm;
@@ -18831,13 +18750,13 @@ var bi = (e, t) => {
18831
18750
  });
18832
18751
  }
18833
18752
  a = t.havingStyle(n), g.height *= a.sizeMultiplier / t.sizeMultiplier, g.depth *= a.sizeMultiplier / t.sizeMultiplier;
18834
- var b = n.size === D.DISPLAY.size ? t.fontMetrics().delim1 : n.size === D.SCRIPTSCRIPT.size ? t.havingStyle(D.SCRIPT).fontMetrics().delim2 : t.fontMetrics().delim2, x = e.leftDelim == null ? vn(t, ["mopen"]) : Kr(e.leftDelim, b, !0, t.havingStyle(n), e.mode, ["mopen"]), S = e.continued ? G([]) : e.rightDelim == null ? vn(t, ["mclose"]) : Kr(e.rightDelim, b, !0, t.havingStyle(n), e.mode, ["mclose"]);
18753
+ var b = n.size === D.DISPLAY.size ? t.fontMetrics().delim1 : n.size === D.SCRIPTSCRIPT.size ? t.havingStyle(D.SCRIPT).fontMetrics().delim2 : t.fontMetrics().delim2, x = e.leftDelim == null ? vn(t, ["mopen"]) : qr(e.leftDelim, b, !0, t.havingStyle(n), e.mode, ["mopen"]), S = e.continued ? G([]) : e.rightDelim == null ? vn(t, ["mclose"]) : qr(e.rightDelim, b, !0, t.havingStyle(n), e.mode, ["mclose"]);
18835
18754
  return G(["mord"].concat(a.sizingClasses(t)), [
18836
18755
  x,
18837
18756
  G(["mfrac"], [g]),
18838
18757
  S
18839
18758
  ], t);
18840
- }, xi = (e, t) => {
18759
+ }, bi = (e, t) => {
18841
18760
  var n = new X("mfrac", [Z(e.numer, t), Z(e.denom, t)]);
18842
18761
  if (!e.hasBarLine) n.setAttribute("linethickness", "0px");
18843
18762
  else if (e.barSize) {
@@ -18857,7 +18776,7 @@ var bi = (e, t) => {
18857
18776
  return Dn(i);
18858
18777
  }
18859
18778
  return n;
18860
- }, Si = (e, t) => t ? {
18779
+ }, xi = (e, t) => t ? {
18861
18780
  type: "styling",
18862
18781
  mode: e.mode,
18863
18782
  style: t,
@@ -18877,12 +18796,10 @@ J({
18877
18796
  "\\\\bracefrac",
18878
18797
  "\\\\brackfrac"
18879
18798
  ],
18880
- props: {
18881
- numArgs: 2,
18882
- allowedInArgument: !0
18883
- },
18799
+ numArgs: 2,
18800
+ allowedInArgument: !0,
18884
18801
  handler: (e, t) => {
18885
- var { parser: n, funcName: r } = e, i = t[0], a = t[1], o, s = null, c = null;
18802
+ var n = e.parser, r = e.funcName, i = t[0], a = t[1], o, s = null, c = null;
18886
18803
  switch (r) {
18887
18804
  case "\\cfrac":
18888
18805
  case "\\dfrac":
@@ -18907,7 +18824,7 @@ J({
18907
18824
  default: throw Error("Unrecognized genfrac command");
18908
18825
  }
18909
18826
  var l = r === "\\cfrac", u = null;
18910
- return l || r.startsWith("\\d") ? u = "display" : r.startsWith("\\t") && (u = "text"), Si({
18827
+ return l || r.startsWith("\\d") ? u = "display" : r.startsWith("\\t") && (u = "text"), xi({
18911
18828
  type: "genfrac",
18912
18829
  mode: n.mode,
18913
18830
  numer: i,
@@ -18919,8 +18836,8 @@ J({
18919
18836
  barSize: null
18920
18837
  }, u);
18921
18838
  },
18922
- htmlBuilder: bi,
18923
- mathmlBuilder: xi
18839
+ htmlBuilder: yi,
18840
+ mathmlBuilder: bi
18924
18841
  }), J({
18925
18842
  type: "infix",
18926
18843
  names: [
@@ -18930,12 +18847,10 @@ J({
18930
18847
  "\\brace",
18931
18848
  "\\brack"
18932
18849
  ],
18933
- props: {
18934
- numArgs: 0,
18935
- infix: !0
18936
- },
18850
+ numArgs: 0,
18851
+ infix: !0,
18937
18852
  handler(e) {
18938
- var { parser: t, funcName: n, token: r } = e, i;
18853
+ var t = e.parser, n = e.funcName, r = e.token, i;
18939
18854
  switch (n) {
18940
18855
  case "\\over":
18941
18856
  i = "\\frac";
@@ -18962,41 +18877,39 @@ J({
18962
18877
  };
18963
18878
  }
18964
18879
  });
18965
- var Ci = [
18880
+ var Si = [
18966
18881
  "display",
18967
18882
  "text",
18968
18883
  "script",
18969
18884
  "scriptscript"
18970
- ], wi = function(e) {
18885
+ ], Ci = function(e) {
18971
18886
  var t = null;
18972
18887
  return e.length > 0 && (t = e, t = t === "." ? null : t), t;
18973
18888
  };
18974
18889
  J({
18975
18890
  type: "genfrac",
18976
18891
  names: ["\\genfrac"],
18977
- props: {
18978
- numArgs: 6,
18979
- allowedInArgument: !0,
18980
- argTypes: [
18981
- "math",
18982
- "math",
18983
- "size",
18984
- "text",
18985
- "math",
18986
- "math"
18987
- ]
18988
- },
18892
+ numArgs: 6,
18893
+ allowedInArgument: !0,
18894
+ argTypes: [
18895
+ "math",
18896
+ "math",
18897
+ "size",
18898
+ "text",
18899
+ "math",
18900
+ "math"
18901
+ ],
18989
18902
  handler(e, t) {
18990
- var { parser: n } = e, r = t[4], i = t[5], a = sn(t[0]), o = a.type === "atom" && a.family === "open" ? wi(a.text) : null, s = sn(t[1]), c = s.type === "atom" && s.family === "close" ? wi(s.text) : null, l = Q(t[2], "size"), u, d = null;
18903
+ var n = e.parser, r = t[4], i = t[5], a = sn(t[0]), o = a.type === "atom" && a.family === "open" ? Ci(a.text) : null, s = sn(t[1]), c = s.type === "atom" && s.family === "close" ? Ci(s.text) : null, l = Q(t[2], "size"), u, d = null;
18991
18904
  l.isBlank ? u = !0 : (d = l.value, u = d.number > 0);
18992
18905
  var f = null, p = t[3];
18993
18906
  if (p.type === "ordgroup") {
18994
18907
  if (p.body.length > 0) {
18995
18908
  var m = Q(p.body[0], "textord");
18996
- f = Ci[Number(m.text)];
18909
+ f = Si[Number(m.text)];
18997
18910
  }
18998
- } else p = Q(p, "textord"), f = Ci[Number(p.text)];
18999
- return Si({
18911
+ } else p = Q(p, "textord"), f = Si[Number(p.text)];
18912
+ return xi({
19000
18913
  type: "genfrac",
19001
18914
  mode: n.mode,
19002
18915
  numer: r,
@@ -19011,50 +18924,50 @@ J({
19011
18924
  }), J({
19012
18925
  type: "infix",
19013
18926
  names: ["\\above"],
19014
- props: {
19015
- numArgs: 1,
19016
- argTypes: ["size"],
19017
- infix: !0
19018
- },
18927
+ numArgs: 1,
18928
+ argTypes: ["size"],
18929
+ infix: !0,
19019
18930
  handler(e, t) {
19020
- var { parser: n, funcName: r, token: i } = e;
18931
+ var n = e.parser;
18932
+ e.funcName;
18933
+ var r = e.token;
19021
18934
  return {
19022
18935
  type: "infix",
19023
18936
  mode: n.mode,
19024
18937
  replaceWith: "\\\\abovefrac",
19025
18938
  size: Q(t[0], "size").value,
19026
- token: i
18939
+ token: r
19027
18940
  };
19028
18941
  }
19029
18942
  }), J({
19030
18943
  type: "genfrac",
19031
18944
  names: ["\\\\abovefrac"],
19032
- props: {
19033
- numArgs: 3,
19034
- argTypes: [
19035
- "math",
19036
- "size",
19037
- "math"
19038
- ]
19039
- },
18945
+ numArgs: 3,
18946
+ argTypes: [
18947
+ "math",
18948
+ "size",
18949
+ "math"
18950
+ ],
19040
18951
  handler: (e, t) => {
19041
- var { parser: n, funcName: r } = e, i = t[0], a = Q(t[1], "infix").size;
19042
- if (!a) throw Error("\\\\abovefrac expected size, but got " + String(a));
19043
- var o = t[2], s = a.number > 0;
18952
+ var n = e.parser;
18953
+ e.funcName;
18954
+ var r = t[0], i = Q(t[1], "infix").size;
18955
+ if (!i) throw Error("\\\\abovefrac expected size, but got " + String(i));
18956
+ var a = t[2], o = i.number > 0;
19044
18957
  return {
19045
18958
  type: "genfrac",
19046
18959
  mode: n.mode,
19047
- numer: i,
19048
- denom: o,
18960
+ numer: r,
18961
+ denom: a,
19049
18962
  continued: !1,
19050
- hasBarLine: s,
19051
- barSize: a,
18963
+ hasBarLine: o,
18964
+ barSize: i,
19052
18965
  leftDelim: null,
19053
18966
  rightDelim: null
19054
18967
  };
19055
18968
  }
19056
18969
  });
19057
- var Ti = (e, t) => {
18970
+ var wi = (e, t) => {
19058
18971
  var n = t.style, r, i;
19059
18972
  e.type === "supsub" ? (r = e.sup ? Y(e.sup, t.havingStyle(n.sup()), t) : Y(e.sub, t.havingStyle(n.sub()), t), i = Q(e.base, "horizBrace")) : i = Q(e, "horizBrace");
19060
18973
  var a = Y(i.base, t.havingBaseStyle(D.DISPLAY)), o = Kn(i, t), s = i.isOver ? K({
@@ -19140,9 +19053,9 @@ J({
19140
19053
  "\\overbracket",
19141
19054
  "\\underbracket"
19142
19055
  ],
19143
- props: { numArgs: 1 },
19056
+ numArgs: 1,
19144
19057
  handler(e, t) {
19145
- var { parser: n, funcName: r } = e;
19058
+ var n = e.parser, r = e.funcName;
19146
19059
  return {
19147
19060
  type: "horizBrace",
19148
19061
  mode: n.mode,
@@ -19151,7 +19064,7 @@ J({
19151
19064
  base: t[0]
19152
19065
  };
19153
19066
  },
19154
- htmlBuilder: Ti,
19067
+ htmlBuilder: wi,
19155
19068
  mathmlBuilder: (e, t) => {
19156
19069
  var n = Un(e.label);
19157
19070
  return new X(e.isOver ? "mover" : "munder", [Z(e.base, t), n]);
@@ -19159,13 +19072,11 @@ J({
19159
19072
  }), J({
19160
19073
  type: "href",
19161
19074
  names: ["\\href"],
19162
- props: {
19163
- numArgs: 2,
19164
- argTypes: ["url", "original"],
19165
- allowedInText: !0
19166
- },
19075
+ numArgs: 2,
19076
+ argTypes: ["url", "original"],
19077
+ allowedInText: !0,
19167
19078
  handler: (e, t) => {
19168
- var { parser: n } = e, r = t[1], i = Q(t[0], "url").url;
19079
+ var n = e.parser, r = t[1], i = Q(t[0], "url").url;
19169
19080
  return n.settings.isTrusted({
19170
19081
  command: "\\href",
19171
19082
  url: i
@@ -19187,13 +19098,11 @@ J({
19187
19098
  }), J({
19188
19099
  type: "href",
19189
19100
  names: ["\\url"],
19190
- props: {
19191
- numArgs: 1,
19192
- argTypes: ["url"],
19193
- allowedInText: !0
19194
- },
19101
+ numArgs: 1,
19102
+ argTypes: ["url"],
19103
+ allowedInText: !0,
19195
19104
  handler: (e, t) => {
19196
- var { parser: n } = e, r = Q(t[0], "url").url;
19105
+ var n = e.parser, r = Q(t[0], "url").url;
19197
19106
  if (!n.settings.isTrusted({
19198
19107
  command: "\\url",
19199
19108
  url: r
@@ -19222,17 +19131,14 @@ J({
19222
19131
  }), J({
19223
19132
  type: "hbox",
19224
19133
  names: ["\\hbox"],
19225
- props: {
19226
- numArgs: 1,
19227
- argTypes: ["text"],
19228
- allowedInText: !0,
19229
- primitive: !0
19230
- },
19134
+ numArgs: 1,
19135
+ argTypes: ["text"],
19136
+ allowedInText: !0,
19137
+ primitive: !0,
19231
19138
  handler(e, t) {
19232
- var { parser: n } = e;
19233
19139
  return {
19234
19140
  type: "hbox",
19235
- mode: n.mode,
19141
+ mode: e.parser.mode,
19236
19142
  body: cn(t[0])
19237
19143
  };
19238
19144
  },
@@ -19250,84 +19156,84 @@ J({
19250
19156
  "\\htmlStyle",
19251
19157
  "\\htmlData"
19252
19158
  ],
19253
- props: {
19254
- numArgs: 2,
19255
- argTypes: ["raw", "original"],
19256
- allowedInText: !0
19257
- },
19159
+ numArgs: 2,
19160
+ argTypes: ["raw", "original"],
19161
+ allowedInText: !0,
19258
19162
  handler: (e, t) => {
19259
- var { parser: r, funcName: i, token: a } = e, o = Q(t[0], "raw").string, s = t[1];
19163
+ var r = e.parser, i = e.funcName;
19164
+ e.token;
19165
+ var a = Q(t[0], "raw").string, o = t[1];
19260
19166
  r.settings.strict && r.settings.reportNonstrict("htmlExtension", "HTML extension is disabled on strict mode");
19261
- var c, l = {};
19167
+ var s, c = {};
19262
19168
  switch (i) {
19263
19169
  case "\\htmlClass":
19264
- l.class = o, c = {
19170
+ c.class = a, s = {
19265
19171
  command: "\\htmlClass",
19266
- class: o
19172
+ class: a
19267
19173
  };
19268
19174
  break;
19269
19175
  case "\\htmlId":
19270
- l.id = o, c = {
19176
+ c.id = a, s = {
19271
19177
  command: "\\htmlId",
19272
- id: o
19178
+ id: a
19273
19179
  };
19274
19180
  break;
19275
19181
  case "\\htmlStyle":
19276
- l.style = o, c = {
19182
+ c.style = a, s = {
19277
19183
  command: "\\htmlStyle",
19278
- style: o
19184
+ style: a
19279
19185
  };
19280
19186
  break;
19281
19187
  case "\\htmlData":
19282
- for (var u = o.split(","), d = 0; d < u.length; d++) {
19283
- var f = u[d], p = f.indexOf("=");
19284
- if (p < 0) throw new n("\\htmlData key/value '" + f + "' missing equals sign");
19285
- var m = f.slice(0, p), h = f.slice(p + 1);
19286
- l["data-" + m.trim()] = h;
19188
+ for (var l = "{,}", u = [], d = "", f = 0; f < a.length; f++) a.startsWith(l, f) ? (d += ",", f += l.length - 1) : a[f] === "," ? (u.push(d), d = "") : d += a[f];
19189
+ u.push(d);
19190
+ for (var p = 0; p < u.length; p++) {
19191
+ var m = u[p], h = m.indexOf("=");
19192
+ if (h < 0) throw new n("\\htmlData key/value '" + m + "' missing equals sign");
19193
+ var g = m.slice(0, h), _ = m.slice(h + 1);
19194
+ c["data-" + g.trim()] = _;
19287
19195
  }
19288
- c = {
19196
+ s = {
19289
19197
  command: "\\htmlData",
19290
- attributes: l
19198
+ attributes: c
19291
19199
  };
19292
19200
  break;
19293
19201
  default: throw Error("Unrecognized html command");
19294
19202
  }
19295
- return r.settings.isTrusted(c) ? {
19203
+ return r.settings.isTrusted(s) ? {
19296
19204
  type: "html",
19297
19205
  mode: r.mode,
19298
- attributes: l,
19299
- body: cn(s)
19206
+ attributes: c,
19207
+ body: cn(o)
19300
19208
  } : r.formatUnsupportedCmd(i);
19301
19209
  },
19302
19210
  htmlBuilder: (e, t) => {
19303
19211
  var n = pn(e.body, t, !1), r = ["enclosing"];
19304
19212
  e.attributes.class && r.push(...e.attributes.class.trim().split(/\s+/));
19305
19213
  var i = G(r, n, t);
19306
- for (var a in e.attributes) a !== "class" && e.attributes.hasOwnProperty(a) && i.setAttribute(a, e.attributes[a]);
19214
+ for (var a of Object.entries(e.attributes)) {
19215
+ var o = a[0], s = a[1];
19216
+ o !== "class" && i.setAttribute(o, s);
19217
+ }
19307
19218
  return i;
19308
19219
  },
19309
19220
  mathmlBuilder: (e, t) => Mn(e.body, t)
19310
19221
  }), J({
19311
19222
  type: "htmlmathml",
19312
19223
  names: ["\\html@mathml"],
19313
- props: {
19314
- numArgs: 2,
19315
- allowedInArgument: !0,
19316
- allowedInText: !0
19317
- },
19318
- handler: (e, t) => {
19319
- var { parser: n } = e;
19320
- return {
19321
- type: "htmlmathml",
19322
- mode: n.mode,
19323
- html: cn(t[0]),
19324
- mathml: cn(t[1])
19325
- };
19326
- },
19224
+ numArgs: 2,
19225
+ allowedInArgument: !0,
19226
+ allowedInText: !0,
19227
+ handler: (e, t) => ({
19228
+ type: "htmlmathml",
19229
+ mode: e.parser.mode,
19230
+ html: cn(t[0]),
19231
+ mathml: cn(t[1])
19232
+ }),
19327
19233
  htmlBuilder: (e, t) => Wt(pn(e.html, t, !1)),
19328
19234
  mathmlBuilder: (e, t) => Mn(e.mathml, t)
19329
19235
  });
19330
- var Ei = function(e) {
19236
+ var Ti = function(e) {
19331
19237
  if (/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e)) return {
19332
19238
  number: +e,
19333
19239
  unit: "bp"
@@ -19344,14 +19250,12 @@ var Ei = function(e) {
19344
19250
  J({
19345
19251
  type: "includegraphics",
19346
19252
  names: ["\\includegraphics"],
19347
- props: {
19348
- numArgs: 1,
19349
- numOptionalArgs: 1,
19350
- argTypes: ["raw", "url"],
19351
- allowedInText: !1
19352
- },
19253
+ numArgs: 1,
19254
+ numOptionalArgs: 1,
19255
+ argTypes: ["raw", "url"],
19256
+ allowedInText: !1,
19353
19257
  handler: (e, t, r) => {
19354
- var { parser: i } = e, a = {
19258
+ var i = e.parser, a = {
19355
19259
  number: 0,
19356
19260
  unit: "em"
19357
19261
  }, o = {
@@ -19370,13 +19274,13 @@ J({
19370
19274
  c = f;
19371
19275
  break;
19372
19276
  case "width":
19373
- a = Ei(f);
19277
+ a = Ti(f);
19374
19278
  break;
19375
19279
  case "height":
19376
- o = Ei(f);
19280
+ o = Ti(f);
19377
19281
  break;
19378
19282
  case "totalheight":
19379
- s = Ei(f);
19283
+ s = Ti(f);
19380
19284
  break;
19381
19285
  default: throw new n("Invalid key: '" + d[0] + "' in \\includegraphics.");
19382
19286
  }
@@ -19424,14 +19328,12 @@ J({
19424
19328
  "\\hskip",
19425
19329
  "\\mskip"
19426
19330
  ],
19427
- props: {
19428
- numArgs: 1,
19429
- argTypes: ["size"],
19430
- primitive: !0,
19431
- allowedInText: !0
19432
- },
19331
+ numArgs: 1,
19332
+ argTypes: ["size"],
19333
+ primitive: !0,
19334
+ allowedInText: !0,
19433
19335
  handler(e, t) {
19434
- var { parser: n, funcName: r } = e, i = Q(t[0], "size");
19336
+ var n = e.parser, r = e.funcName, i = Q(t[0], "size");
19435
19337
  if (n.settings.strict) {
19436
19338
  var a = r[1] === "m", o = i.value.unit === "mu";
19437
19339
  a ? (o || n.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + r + " supports only mu units, " + ("not " + i.value.unit + " units")), n.mode !== "math" && n.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + r + " works only in math mode")) : o && n.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + r + " doesn't support mu units");
@@ -19455,12 +19357,10 @@ J({
19455
19357
  "\\mathrlap",
19456
19358
  "\\mathclap"
19457
19359
  ],
19458
- props: {
19459
- numArgs: 1,
19460
- allowedInText: !0
19461
- },
19360
+ numArgs: 1,
19361
+ allowedInText: !0,
19462
19362
  handler: (e, t) => {
19463
- var { parser: n, funcName: r } = e, i = t[0];
19363
+ var n = e.parser, r = e.funcName, i = t[0];
19464
19364
  return {
19465
19365
  type: "lap",
19466
19366
  mode: n.mode,
@@ -19470,9 +19370,9 @@ J({
19470
19370
  },
19471
19371
  htmlBuilder: (e, t) => {
19472
19372
  var n;
19473
- e.alignment === "clap" ? (n = G([], [Y(e.body, t)]), n = G(["inner"], [n], t)) : n = G(["inner"], [Y(e.body, t)]);
19474
- var r = G(["fix"], []), i = G([e.alignment], [n, r], t), a = G(["strut"]);
19475
- return a.style.height = A(i.height + i.depth), i.depth && (a.style.verticalAlign = A(-i.depth)), i.children.unshift(a), i = G(["thinbox"], [i], t), G(["mord", "vbox"], [i], t);
19373
+ e.alignment === "clap" ? (n = G([], [Y(e.body, t)]), n = G(["katex-inner"], [n], t)) : n = G(["katex-inner"], [Y(e.body, t)]);
19374
+ var r = G(["katex-fix"], []), i = G([e.alignment], [n, r], t), a = G(["katex-strut"]);
19375
+ return a.style.height = A(i.height + i.depth), i.depth && (a.style.verticalAlign = A(-i.depth)), i.children.unshift(a), i = G(["katex-thinbox"], [i], t), G(["mord", "katex-vbox"], [i], t);
19476
19376
  },
19477
19377
  mathmlBuilder: (e, t) => {
19478
19378
  var n = new X("mpadded", [Z(e.body, t)]);
@@ -19485,13 +19385,11 @@ J({
19485
19385
  }), J({
19486
19386
  type: "styling",
19487
19387
  names: ["\\(", "$"],
19488
- props: {
19489
- numArgs: 0,
19490
- allowedInText: !0,
19491
- allowedInMath: !1
19492
- },
19388
+ numArgs: 0,
19389
+ allowedInText: !0,
19390
+ allowedInMath: !1,
19493
19391
  handler(e, t) {
19494
- var { funcName: n, parser: r } = e, i = r.mode;
19392
+ var n = e.funcName, r = e.parser, i = r.mode;
19495
19393
  r.switchMode("math");
19496
19394
  var a = n === "\\(" ? "\\)" : "$", o = r.parseExpression(!1, a);
19497
19395
  return r.expect(a), r.switchMode(i), {
@@ -19505,16 +19403,14 @@ J({
19505
19403
  }), J({
19506
19404
  type: "text",
19507
19405
  names: ["\\)", "\\]"],
19508
- props: {
19509
- numArgs: 0,
19510
- allowedInText: !0,
19511
- allowedInMath: !1
19512
- },
19406
+ numArgs: 0,
19407
+ allowedInText: !0,
19408
+ allowedInMath: !1,
19513
19409
  handler(e, t) {
19514
19410
  throw new n("Mismatched " + e.funcName);
19515
19411
  }
19516
19412
  });
19517
- var Di = (e, t) => {
19413
+ var Ei = (e, t) => {
19518
19414
  switch (t.style.size) {
19519
19415
  case D.DISPLAY.size: return e.display;
19520
19416
  case D.TEXT.size: return e.text;
@@ -19526,25 +19422,20 @@ var Di = (e, t) => {
19526
19422
  J({
19527
19423
  type: "mathchoice",
19528
19424
  names: ["\\mathchoice"],
19529
- props: {
19530
- numArgs: 4,
19531
- primitive: !0
19532
- },
19533
- handler: (e, t) => {
19534
- var { parser: n } = e;
19535
- return {
19536
- type: "mathchoice",
19537
- mode: n.mode,
19538
- display: cn(t[0]),
19539
- text: cn(t[1]),
19540
- script: cn(t[2]),
19541
- scriptscript: cn(t[3])
19542
- };
19543
- },
19544
- htmlBuilder: (e, t) => Wt(pn(Di(e, t), t, !1)),
19545
- mathmlBuilder: (e, t) => Mn(Di(e, t), t)
19425
+ numArgs: 4,
19426
+ primitive: !0,
19427
+ handler: (e, t) => ({
19428
+ type: "mathchoice",
19429
+ mode: e.parser.mode,
19430
+ display: cn(t[0]),
19431
+ text: cn(t[1]),
19432
+ script: cn(t[2]),
19433
+ scriptscript: cn(t[3])
19434
+ }),
19435
+ htmlBuilder: (e, t) => Wt(pn(Ei(e, t), t, !1)),
19436
+ mathmlBuilder: (e, t) => Mn(Ei(e, t), t)
19546
19437
  });
19547
- var Oi = (e, t, n, r, i, a, o) => {
19438
+ var Di = (e, t, n, r, i, a, o) => {
19548
19439
  e = G([], [e]);
19549
19440
  var s = n && u(n), c, l;
19550
19441
  if (t) {
@@ -19651,11 +19542,11 @@ var Oi = (e, t, n, r, i, a, o) => {
19651
19542
  h.style.marginRight = A(a), m.unshift(h);
19652
19543
  }
19653
19544
  return G(["mop", "op-limits"], m, r);
19654
- }, ki = /* @__PURE__ */ new Set(["\\smallint"]), Ai = (e, t) => {
19545
+ }, Oi = /* @__PURE__ */ new Set(["\\smallint"]), ki = (e, t) => {
19655
19546
  var n, r, i = !1, a;
19656
19547
  e.type === "supsub" ? (n = e.sup, r = e.sub, a = Q(e.base, "op"), i = !0) : a = Q(e, "op");
19657
19548
  var o = t.style, s = !1;
19658
- o.size === D.DISPLAY.size && a.symbol && !ki.has(a.name) && (s = !0);
19549
+ o.size === D.DISPLAY.size && a.symbol && !Oi.has(a.name) && (s = !0);
19659
19550
  var c, l;
19660
19551
  if (a.symbol) {
19661
19552
  var u = s ? "Size2-Regular" : "Size1-Regular", d = "";
@@ -19686,10 +19577,10 @@ var Oi = (e, t, n, r, i, a, o) => {
19686
19577
  c = G(["mop"], m, t);
19687
19578
  }
19688
19579
  var g = 0, _ = 0;
19689
- return (c instanceof Le || a.name === "\\oiint" || a.name === "\\oiiint") && !a.suppressBaseShift && (g = (c.height - c.depth) / 2 - t.fontMetrics().axisHeight, _ = c.italic ?? 0), i ? Oi(c, n, r, t, o, _, g) : (g && (c.style.position = "relative", c.style.top = A(g)), c);
19690
- }, ji = (e, t) => {
19580
+ return (c instanceof Le || a.name === "\\oiint" || a.name === "\\oiiint") && !a.suppressBaseShift && (g = (c.height - c.depth) / 2 - t.fontMetrics().axisHeight, _ = c.italic ?? 0), i ? Di(c, n, r, t, o, _, g) : (g && (c.style.position = "relative", c.style.top = A(g)), c);
19581
+ }, Ai = (e, t) => {
19691
19582
  var n;
19692
- if (e.symbol) n = new X("mo", [En(e.name, e.mode)]), ki.has(e.name) && n.setAttribute("largeop", "false");
19583
+ if (e.symbol) n = new X("mo", [En(e.name, e.mode)]), Oi.has(e.name) && n.setAttribute("largeop", "false");
19693
19584
  else if (e.body) n = new X("mo", jn(e.body, t));
19694
19585
  else {
19695
19586
  n = new X("mi", [new Sn(e.name.slice(1))]);
@@ -19697,7 +19588,7 @@ var Oi = (e, t, n, r, i, a, o) => {
19697
19588
  n = e.parentIsSupSub ? new X("mrow", [n, r]) : xn([n, r]);
19698
19589
  }
19699
19590
  return n;
19700
- }, Mi = {
19591
+ }, ji = {
19701
19592
  "∏": "\\prod",
19702
19593
  "∐": "\\coprod",
19703
19594
  "∑": "\\sum",
@@ -19714,29 +19605,27 @@ var Oi = (e, t, n, r, i, a, o) => {
19714
19605
  J({
19715
19606
  type: "op",
19716
19607
  names: /* @__PURE__ */ "\\coprod.\\bigvee.\\bigwedge.\\biguplus.\\bigcap.\\bigcup.\\intop.\\prod.\\sum.\\bigotimes.\\bigoplus.\\bigodot.\\bigsqcup.\\smallint.∏.∐.∑.⋀.⋁.⋂.⋃.⨀.⨁.⨂.⨄.⨆".split("."),
19717
- props: { numArgs: 0 },
19608
+ numArgs: 0,
19718
19609
  handler: (e, t) => {
19719
- var { parser: n, funcName: r } = e, i = r;
19720
- return i.length === 1 && (i = Mi[i]), {
19610
+ var n = e.parser, r = e.funcName;
19611
+ return r.length === 1 && (r = ji[r]), {
19721
19612
  type: "op",
19722
19613
  mode: n.mode,
19723
19614
  limits: !0,
19724
19615
  parentIsSupSub: !1,
19725
19616
  symbol: !0,
19726
- name: i
19617
+ name: r
19727
19618
  };
19728
19619
  },
19729
- htmlBuilder: Ai,
19730
- mathmlBuilder: ji
19620
+ htmlBuilder: ki,
19621
+ mathmlBuilder: Ai
19731
19622
  }), J({
19732
19623
  type: "op",
19733
19624
  names: ["\\mathop"],
19734
- props: {
19735
- numArgs: 1,
19736
- primitive: !0
19737
- },
19625
+ numArgs: 1,
19626
+ primitive: !0,
19738
19627
  handler: (e, t) => {
19739
- var { parser: n } = e, r = t[0];
19628
+ var n = e.parser, r = t[0];
19740
19629
  return {
19741
19630
  type: "op",
19742
19631
  mode: n.mode,
@@ -19745,11 +19634,9 @@ J({
19745
19634
  symbol: !1,
19746
19635
  body: cn(r)
19747
19636
  };
19748
- },
19749
- htmlBuilder: Ai,
19750
- mathmlBuilder: ji
19637
+ }
19751
19638
  });
19752
- var Ni = {
19639
+ var Mi = {
19753
19640
  "∫": "\\int",
19754
19641
  "∬": "\\iint",
19755
19642
  "∭": "\\iiint",
@@ -19760,9 +19647,9 @@ var Ni = {
19760
19647
  J({
19761
19648
  type: "op",
19762
19649
  names: /* @__PURE__ */ "\\arcsin.\\arccos.\\arctan.\\arctg.\\arcctg.\\arg.\\ch.\\cos.\\cosec.\\cosh.\\cot.\\cotg.\\coth.\\csc.\\ctg.\\cth.\\deg.\\dim.\\exp.\\hom.\\ker.\\lg.\\ln.\\log.\\sec.\\sin.\\sinh.\\sh.\\tan.\\tanh.\\tg.\\th".split("."),
19763
- props: { numArgs: 0 },
19650
+ numArgs: 0,
19764
19651
  handler(e) {
19765
- var { parser: t, funcName: n } = e;
19652
+ var t = e.parser, n = e.funcName;
19766
19653
  return {
19767
19654
  type: "op",
19768
19655
  mode: t.mode,
@@ -19771,9 +19658,7 @@ J({
19771
19658
  symbol: !1,
19772
19659
  name: n
19773
19660
  };
19774
- },
19775
- htmlBuilder: Ai,
19776
- mathmlBuilder: ji
19661
+ }
19777
19662
  }), J({
19778
19663
  type: "op",
19779
19664
  names: [
@@ -19786,9 +19671,9 @@ J({
19786
19671
  "\\Pr",
19787
19672
  "\\sup"
19788
19673
  ],
19789
- props: { numArgs: 0 },
19674
+ numArgs: 0,
19790
19675
  handler(e) {
19791
- var { parser: t, funcName: n } = e;
19676
+ var t = e.parser, n = e.funcName;
19792
19677
  return {
19793
19678
  type: "op",
19794
19679
  mode: t.mode,
@@ -19797,9 +19682,7 @@ J({
19797
19682
  symbol: !1,
19798
19683
  name: n
19799
19684
  };
19800
- },
19801
- htmlBuilder: Ai,
19802
- mathmlBuilder: ji
19685
+ }
19803
19686
  }), J({
19804
19687
  type: "op",
19805
19688
  names: [
@@ -19816,25 +19699,21 @@ J({
19816
19699
  "∯",
19817
19700
  "∰"
19818
19701
  ],
19819
- props: {
19820
- numArgs: 0,
19821
- allowedInArgument: !0
19822
- },
19702
+ numArgs: 0,
19703
+ allowedInArgument: !0,
19823
19704
  handler(e) {
19824
- var { parser: t, funcName: n } = e, r = n;
19825
- return r.length === 1 && (r = Ni[r]), {
19705
+ var t = e.parser, n = e.funcName;
19706
+ return n.length === 1 && (n = Mi[n]), {
19826
19707
  type: "op",
19827
19708
  mode: t.mode,
19828
19709
  limits: !1,
19829
19710
  parentIsSupSub: !1,
19830
19711
  symbol: !0,
19831
- name: r
19712
+ name: n
19832
19713
  };
19833
- },
19834
- htmlBuilder: Ai,
19835
- mathmlBuilder: ji
19714
+ }
19836
19715
  });
19837
- var Pi = (e, t) => {
19716
+ var Ni = (e, t) => {
19838
19717
  var n, r, i = !1, a;
19839
19718
  e.type === "supsub" ? (n = e.sup, r = e.sub, a = Q(e.base, "operatorname"), i = !0) : a = Q(e, "operatorname");
19840
19719
  var o;
@@ -19852,14 +19731,14 @@ var Pi = (e, t) => {
19852
19731
  }
19853
19732
  o = G(["mop"], s, t);
19854
19733
  } else o = G(["mop"], [], t);
19855
- return i ? Oi(o, n, r, t, t.style, 0, 0) : o;
19734
+ return i ? Di(o, n, r, t, t.style, 0, 0) : o;
19856
19735
  };
19857
19736
  J({
19858
19737
  type: "operatorname",
19859
19738
  names: ["\\operatorname@", "\\operatornamewithlimits"],
19860
- props: { numArgs: 1 },
19739
+ numArgs: 1,
19861
19740
  handler: (e, t) => {
19862
- var { parser: n, funcName: r } = e, i = t[0];
19741
+ var n = e.parser, r = e.funcName, i = t[0];
19863
19742
  return {
19864
19743
  type: "operatorname",
19865
19744
  mode: n.mode,
@@ -19869,7 +19748,7 @@ J({
19869
19748
  parentIsSupSub: !1
19870
19749
  };
19871
19750
  },
19872
- htmlBuilder: Pi,
19751
+ htmlBuilder: Ni,
19873
19752
  mathmlBuilder: (e, t) => {
19874
19753
  for (var n = jn(e.body, t.withFont("mathrm")), r = !0, i = 0; i < n.length; i++) {
19875
19754
  var a = n[i];
@@ -19905,9 +19784,9 @@ J({
19905
19784
  }), J({
19906
19785
  type: "overline",
19907
19786
  names: ["\\overline"],
19908
- props: { numArgs: 1 },
19787
+ numArgs: 1,
19909
19788
  handler(e, t) {
19910
- var { parser: n } = e, r = t[0];
19789
+ var n = e.parser, r = t[0];
19911
19790
  return {
19912
19791
  type: "overline",
19913
19792
  mode: n.mode,
@@ -19916,7 +19795,7 @@ J({
19916
19795
  },
19917
19796
  htmlBuilder(e, t) {
19918
19797
  var n = Y(e.body, t.havingCrampedStyle()), r = Ht("overline-line", t), i = t.fontMetrics().defaultRuleThickness;
19919
- return G(["mord", "overline"], [K({
19798
+ return G(["mord", "katex-overline"], [K({
19920
19799
  positionType: "firstBaseline",
19921
19800
  children: [
19922
19801
  {
@@ -19947,12 +19826,10 @@ J({
19947
19826
  }), J({
19948
19827
  type: "phantom",
19949
19828
  names: ["\\phantom"],
19950
- props: {
19951
- numArgs: 1,
19952
- allowedInText: !0
19953
- },
19829
+ numArgs: 1,
19830
+ allowedInText: !0,
19954
19831
  handler: (e, t) => {
19955
- var { parser: n } = e, r = t[0];
19832
+ var n = e.parser, r = t[0];
19956
19833
  return {
19957
19834
  type: "phantom",
19958
19835
  mode: n.mode,
@@ -19964,19 +19841,17 @@ J({
19964
19841
  }), $("\\hphantom", "\\smash{\\phantom{#1}}"), J({
19965
19842
  type: "vphantom",
19966
19843
  names: ["\\vphantom"],
19967
- props: {
19968
- numArgs: 1,
19969
- allowedInText: !0
19970
- },
19844
+ numArgs: 1,
19845
+ allowedInText: !0,
19971
19846
  handler: (e, t) => {
19972
- var { parser: n } = e, r = t[0];
19847
+ var n = e.parser, r = t[0];
19973
19848
  return {
19974
19849
  type: "vphantom",
19975
19850
  mode: n.mode,
19976
19851
  body: r
19977
19852
  };
19978
19853
  },
19979
- htmlBuilder: (e, t) => G(["mord", "rlap"], [G(["inner"], [Y(e.body, t.withPhantom())]), G(["fix"], [])], t),
19854
+ htmlBuilder: (e, t) => G(["mord", "rlap"], [G(["katex-inner"], [Y(e.body, t.withPhantom())]), G(["katex-fix"], [])], t),
19980
19855
  mathmlBuilder: (e, t) => {
19981
19856
  var n = new X("mpadded", [new X("mphantom", jn(cn(e.body), t))]);
19982
19857
  return n.setAttribute("width", "0px"), n;
@@ -19984,13 +19859,11 @@ J({
19984
19859
  }), J({
19985
19860
  type: "raisebox",
19986
19861
  names: ["\\raisebox"],
19987
- props: {
19988
- numArgs: 2,
19989
- argTypes: ["size", "hbox"],
19990
- allowedInText: !0
19991
- },
19862
+ numArgs: 2,
19863
+ argTypes: ["size", "hbox"],
19864
+ allowedInText: !0,
19992
19865
  handler(e, t) {
19993
- var { parser: n } = e, r = Q(t[0], "size").value, i = t[1];
19866
+ var n = e.parser, r = Q(t[0], "size").value, i = t[1];
19994
19867
  return {
19995
19868
  type: "raisebox",
19996
19869
  mode: n.mode,
@@ -20016,34 +19889,29 @@ J({
20016
19889
  }), J({
20017
19890
  type: "internal",
20018
19891
  names: ["\\relax"],
20019
- props: {
20020
- numArgs: 0,
20021
- allowedInText: !0,
20022
- allowedInArgument: !0
20023
- },
19892
+ numArgs: 0,
19893
+ allowedInText: !0,
19894
+ allowedInArgument: !0,
20024
19895
  handler(e) {
20025
- var { parser: t } = e;
20026
19896
  return {
20027
19897
  type: "internal",
20028
- mode: t.mode
19898
+ mode: e.parser.mode
20029
19899
  };
20030
19900
  }
20031
19901
  }), J({
20032
19902
  type: "rule",
20033
19903
  names: ["\\rule"],
20034
- props: {
20035
- numArgs: 2,
20036
- numOptionalArgs: 1,
20037
- allowedInText: !0,
20038
- allowedInMath: !0,
20039
- argTypes: [
20040
- "size",
20041
- "size",
20042
- "size"
20043
- ]
20044
- },
19904
+ numArgs: 2,
19905
+ numOptionalArgs: 1,
19906
+ allowedInText: !0,
19907
+ allowedInMath: !0,
19908
+ argTypes: [
19909
+ "size",
19910
+ "size",
19911
+ "size"
19912
+ ],
20045
19913
  handler(e, t, n) {
20046
- var { parser: r } = e, i = n[0], a = Q(t[0], "size"), o = Q(t[1], "size");
19914
+ var r = e.parser, i = n[0], a = Q(t[0], "size"), o = Q(t[1], "size");
20047
19915
  return {
20048
19916
  type: "rule",
20049
19917
  mode: r.mode,
@@ -20053,7 +19921,7 @@ J({
20053
19921
  };
20054
19922
  },
20055
19923
  htmlBuilder(e, t) {
20056
- var n = G(["mord", "rule"], [], t), r = k(e.width, t), i = k(e.height, t), a = e.shift ? k(e.shift, t) : 0;
19924
+ var n = G(["mord", "katex-rule"], [], t), r = k(e.width, t), i = k(e.height, t), a = e.shift ? k(e.shift, t) : 0;
20057
19925
  return n.style.borderRightWidth = A(r), n.style.borderTopWidth = A(i), n.style.bottom = A(a), n.width = r, n.height = i + a, n.depth = -a, n.maxFontSize = i * 1.125 * t.sizeMultiplier, n;
20058
19926
  },
20059
19927
  mathmlBuilder(e, t) {
@@ -20063,14 +19931,14 @@ J({
20063
19931
  return i >= 0 ? s.setAttribute("height", A(i)) : (s.setAttribute("height", A(i)), s.setAttribute("depth", A(-i))), s.setAttribute("voffset", A(i)), s;
20064
19932
  }
20065
19933
  });
20066
- function Fi(e, t, n) {
19934
+ function Pi(e, t, n) {
20067
19935
  for (var r = pn(e, t, !1), i = t.sizeMultiplier / n.sizeMultiplier, a = 0; a < r.length; a++) {
20068
- var o = r[a].classes.indexOf("sizing");
19936
+ var o = r[a].classes.indexOf("katex-sizing");
20069
19937
  o < 0 ? Array.prototype.push.apply(r[a].classes, t.sizingClasses(n)) : r[a].classes[o + 1] === "reset-size" + t.size && (r[a].classes[o + 1] = "reset-size" + n.size), r[a].height *= i, r[a].depth *= i;
20070
19938
  }
20071
19939
  return Wt(r);
20072
19940
  }
20073
- var Ii = [
19941
+ var Fi = [
20074
19942
  "\\tiny",
20075
19943
  "\\sixptsize",
20076
19944
  "\\scriptsize",
@@ -20085,23 +19953,21 @@ var Ii = [
20085
19953
  ];
20086
19954
  J({
20087
19955
  type: "sizing",
20088
- names: Ii,
20089
- props: {
20090
- numArgs: 0,
20091
- allowedInText: !0
20092
- },
19956
+ names: Fi,
19957
+ numArgs: 0,
19958
+ allowedInText: !0,
20093
19959
  handler: (e, t) => {
20094
- var { breakOnTokenText: n, funcName: r, parser: i } = e, a = i.parseExpression(!1, n);
19960
+ var n = e.breakOnTokenText, r = e.funcName, i = e.parser, a = i.parseExpression(!1, n);
20095
19961
  return {
20096
19962
  type: "sizing",
20097
19963
  mode: i.mode,
20098
- size: Ii.indexOf(r) + 1,
19964
+ size: Fi.indexOf(r) + 1,
20099
19965
  body: a
20100
19966
  };
20101
19967
  },
20102
19968
  htmlBuilder: (e, t) => {
20103
19969
  var n = t.havingSize(e.size);
20104
- return Fi(e.body, n, t);
19970
+ return Pi(e.body, n, t);
20105
19971
  },
20106
19972
  mathmlBuilder: (e, t) => {
20107
19973
  var n = t.havingSize(e.size), r = new X("mstyle", jn(e.body, n));
@@ -20110,16 +19976,14 @@ J({
20110
19976
  }), J({
20111
19977
  type: "smash",
20112
19978
  names: ["\\smash"],
20113
- props: {
20114
- numArgs: 1,
20115
- numOptionalArgs: 1,
20116
- allowedInText: !0
20117
- },
19979
+ numArgs: 1,
19980
+ numOptionalArgs: 1,
19981
+ allowedInText: !0,
20118
19982
  handler: (e, t, n) => {
20119
- var { parser: r } = e, i = !1, a = !1, o = n[0] && Q(n[0], "ordgroup");
19983
+ var r = e.parser, i = !1, a = !1, o = n[0] && Q(n[0], "ordgroup");
20120
19984
  if (o) for (var s, c = 0; c < o.body.length; ++c) {
20121
19985
  var l = o.body[c];
20122
- if (s = Zn(l).text, s === "t") i = !0;
19986
+ if (s = $n(l).text, s === "t") i = !0;
20123
19987
  else if (s === "b") a = !0;
20124
19988
  else {
20125
19989
  i = !1, a = !1;
@@ -20139,7 +20003,7 @@ J({
20139
20003
  htmlBuilder: (e, t) => {
20140
20004
  var n = G([], [Y(e.body, t)]);
20141
20005
  if (!e.smashHeight && !e.smashDepth) return n;
20142
- if (e.smashHeight && (n.height = 0), e.smashDepth && (n.depth = 0), e.smashHeight && e.smashDepth) return G(["mord", "smash"], [n], t);
20006
+ if (e.smashHeight && (n.height = 0), e.smashDepth && (n.depth = 0), e.smashHeight && e.smashDepth) return G(["mord", "katex-smash"], [n], t);
20143
20007
  if (n.children) for (var r = 0; r < n.children.length; r++) e.smashHeight && (n.children[r].height = 0), e.smashDepth && (n.children[r].depth = 0);
20144
20008
  return G(["mord"], [K({
20145
20009
  positionType: "firstBaseline",
@@ -20156,12 +20020,10 @@ J({
20156
20020
  }), J({
20157
20021
  type: "sqrt",
20158
20022
  names: ["\\sqrt"],
20159
- props: {
20160
- numArgs: 1,
20161
- numOptionalArgs: 1
20162
- },
20023
+ numArgs: 1,
20024
+ numOptionalArgs: 1,
20163
20025
  handler(e, t, n) {
20164
- var { parser: r } = e, i = n[0], a = t[0];
20026
+ var r = e.parser, i = n[0], a = t[0];
20165
20027
  return {
20166
20028
  type: "sqrt",
20167
20029
  mode: r.mode,
@@ -20174,11 +20036,11 @@ J({
20174
20036
  n.height === 0 && (n.height = t.fontMetrics().xHeight), n = Gt(n, t);
20175
20037
  var r = t.fontMetrics().defaultRuleThickness, i = r;
20176
20038
  t.style.id < D.TEXT.id && (i = t.fontMetrics().xHeight);
20177
- var a = r + i / 4, { span: o, ruleWidth: s, advanceWidth: c } = Fr(n.height + n.depth + a + r, t), l = o.height - s;
20178
- l > n.height + n.depth + a && (a = (a + l - n.height - n.depth) / 2);
20179
- var u = o.height - n.height - a - s;
20180
- n.style.paddingLeft = A(c);
20181
- var d = K({
20039
+ var a = r + i / 4, o = Ir(n.height + n.depth + a + r, t), s = o.span, c = o.ruleWidth, l = o.advanceWidth, u = s.height - c;
20040
+ u > n.height + n.depth + a && (a = (a + u - n.height - n.depth) / 2);
20041
+ var d = s.height - n.height - a - c;
20042
+ n.style.paddingLeft = A(l);
20043
+ var f = K({
20182
20044
  positionType: "firstBaseline",
20183
20045
  children: [
20184
20046
  {
@@ -20188,44 +20050,44 @@ J({
20188
20050
  },
20189
20051
  {
20190
20052
  type: "kern",
20191
- size: -(n.height + u)
20053
+ size: -(n.height + d)
20192
20054
  },
20193
20055
  {
20194
20056
  type: "elem",
20195
- elem: o
20057
+ elem: s
20196
20058
  },
20197
20059
  {
20198
20060
  type: "kern",
20199
- size: s
20061
+ size: c
20200
20062
  }
20201
20063
  ]
20202
20064
  });
20203
20065
  if (e.index) {
20204
- var f = t.havingStyle(D.SCRIPTSCRIPT), p = Y(e.index, f, t);
20205
- return G(["mord", "sqrt"], [G(["root"], [K({
20066
+ var p = t.havingStyle(D.SCRIPTSCRIPT), m = Y(e.index, p, t);
20067
+ return G(["mord", "sqrt"], [G(["katex-root"], [K({
20206
20068
  positionType: "shift",
20207
- positionData: -(.6 * (d.height - d.depth)),
20069
+ positionData: -(.6 * (f.height - f.depth)),
20208
20070
  children: [{
20209
20071
  type: "elem",
20210
- elem: p
20072
+ elem: m
20211
20073
  }]
20212
- })]), d], t);
20074
+ })]), f], t);
20213
20075
  }
20214
- return G(["mord", "sqrt"], [d], t);
20076
+ return G(["mord", "sqrt"], [f], t);
20215
20077
  },
20216
20078
  mathmlBuilder(e, t) {
20217
- var { body: n, index: r } = e;
20079
+ var n = e.body, r = e.index;
20218
20080
  return r ? new X("mroot", [Z(n, t), Z(r, t)]) : new X("msqrt", [Z(n, t)]);
20219
20081
  }
20220
20082
  });
20221
- var Li = {
20083
+ var Ii = {
20222
20084
  display: D.DISPLAY,
20223
20085
  text: D.TEXT,
20224
20086
  script: D.SCRIPT,
20225
20087
  scriptscript: D.SCRIPTSCRIPT
20226
20088
  };
20227
- function Ri(e) {
20228
- return e in Li;
20089
+ function Li(e) {
20090
+ return e in Ii;
20229
20091
  }
20230
20092
  J({
20231
20093
  type: "styling",
@@ -20235,14 +20097,12 @@ J({
20235
20097
  "\\scriptstyle",
20236
20098
  "\\scriptscriptstyle"
20237
20099
  ],
20238
- props: {
20239
- numArgs: 0,
20240
- allowedInText: !0,
20241
- primitive: !0
20242
- },
20100
+ numArgs: 0,
20101
+ allowedInText: !0,
20102
+ primitive: !0,
20243
20103
  handler(e, t) {
20244
- var { breakOnTokenText: n, funcName: r, parser: i } = e, a = i.parseExpression(!0, n), o = r.slice(1, r.length - 5);
20245
- if (!Ri(o)) throw Error("Unknown style: " + o);
20104
+ var n = e.breakOnTokenText, r = e.funcName, i = e.parser, a = i.parseExpression(!0, n), o = r.slice(1, r.length - 5);
20105
+ if (!Li(o)) throw Error("Unknown style: " + o);
20246
20106
  return {
20247
20107
  type: "styling",
20248
20108
  mode: i.mode,
@@ -20251,11 +20111,11 @@ J({
20251
20111
  };
20252
20112
  },
20253
20113
  htmlBuilder(e, t) {
20254
- var n = Li[e.style], r = t.havingStyle(n);
20255
- return e.resetFont && (r = r.withFont("")), Fi(e.body, r, t);
20114
+ var n = Ii[e.style], r = t.havingStyle(n);
20115
+ return e.resetFont && (r = r.withFont("")), Pi(e.body, r, t);
20256
20116
  },
20257
20117
  mathmlBuilder(e, t) {
20258
- var n = Li[e.style], r = t.havingStyle(n);
20118
+ var n = Ii[e.style], r = t.havingStyle(n);
20259
20119
  e.resetFont && (r = r.withFont(""));
20260
20120
  var i = new X("mstyle", jn(e.body, r)), a = {
20261
20121
  display: ["0", "true"],
@@ -20266,16 +20126,16 @@ J({
20266
20126
  return i.setAttribute("scriptlevel", a[0]), i.setAttribute("displaystyle", a[1]), i;
20267
20127
  }
20268
20128
  });
20269
- var zi = function(e, t) {
20129
+ var Ri = function(e, t) {
20270
20130
  var n = e.base;
20271
- return n ? n.type === "op" ? n.limits && (t.style.size === D.DISPLAY.size || n.alwaysHandleSupSub) ? Ai : null : n.type === "operatorname" ? n.alwaysHandleSupSub && (t.style.size === D.DISPLAY.size || n.limits) ? Pi : null : n.type === "accent" ? u(n.base) ? er : null : n.type === "horizBrace" && !e.sub === n.isOver ? Ti : null : null;
20131
+ return n ? n.type === "op" ? n.limits && (t.style.size === D.DISPLAY.size || n.alwaysHandleSupSub) ? ki : null : n.type === "operatorname" ? n.alwaysHandleSupSub && (t.style.size === D.DISPLAY.size || n.limits) ? Ni : null : n.type === "accent" ? u(n.base) ? rr : null : n.type === "horizBrace" && !e.sub === n.isOver ? wi : null : null;
20272
20132
  };
20273
20133
  on({
20274
20134
  type: "supsub",
20275
20135
  htmlBuilder(e, t) {
20276
- var n = zi(e, t);
20136
+ var n = Ri(e, t);
20277
20137
  if (n) return n(e, t);
20278
- var { base: r, sup: i, sub: a } = e, o = Y(r, t), s, c, l = t.fontMetrics(), d = 0, f = 0, p = r && u(r);
20138
+ var r = e.base, i = e.sup, a = e.sub, o = Y(r, t), s, c, l = t.fontMetrics(), d = 0, f = 0, p = r && u(r);
20279
20139
  if (i) {
20280
20140
  var m = t.havingStyle(t.style.sup());
20281
20141
  s = Y(i, m, t), p || (d = o.height - m.fontMetrics().supDrop * m.sizeMultiplier / t.sizeMultiplier);
@@ -20368,7 +20228,7 @@ on({
20368
20228
  return n;
20369
20229
  }
20370
20230
  });
20371
- var Bi = {
20231
+ var zi = {
20372
20232
  mi: "italic",
20373
20233
  mn: "normal",
20374
20234
  mtext: "normal"
@@ -20376,55 +20236,53 @@ var Bi = {
20376
20236
  on({
20377
20237
  type: "mathord",
20378
20238
  htmlBuilder(e, t) {
20379
- return Lt(e, t, "mathord");
20239
+ return Lt(e, t);
20380
20240
  },
20381
20241
  mathmlBuilder(e, t) {
20382
20242
  var n = new X("mi", [En(e.text, e.mode, t)]), r = kn(e, t) || "italic";
20383
- return r !== Bi[n.type] && n.setAttribute("mathvariant", r), n;
20243
+ return r !== zi[n.type] && n.setAttribute("mathvariant", r), n;
20384
20244
  }
20385
20245
  }), on({
20386
20246
  type: "textord",
20387
20247
  htmlBuilder(e, t) {
20388
- return Lt(e, t, "textord");
20248
+ return Lt(e, t);
20389
20249
  },
20390
20250
  mathmlBuilder(e, t) {
20391
20251
  var n = En(e.text, e.mode, t), r = kn(e, t) || "normal", i = e.mode === "text" ? new X("mtext", [n]) : /[0-9]/.test(e.text) ? new X("mn", [n]) : e.text === "\\prime" ? new X("mo", [n]) : new X("mi", [n]);
20392
- return r !== Bi[i.type] && i.setAttribute("mathvariant", r), i;
20252
+ return r !== zi[i.type] && i.setAttribute("mathvariant", r), i;
20393
20253
  }
20394
20254
  });
20395
- var Vi = {
20396
- "\\nobreak": "nobreak",
20397
- "\\allowbreak": "allowbreak"
20398
- }, Hi = {
20399
- " ": {},
20400
- "\\ ": {},
20401
- "~": { className: "nobreak" },
20402
- "\\space": {},
20403
- "\\nobreakspace": { className: "nobreak" }
20404
- };
20255
+ var Bi = /* @__PURE__ */ new Map([["\\nobreak", "nobreak"], ["\\allowbreak", "allowbreak"]]), Vi = /* @__PURE__ */ new Map([
20256
+ [" ", {}],
20257
+ ["\\ ", {}],
20258
+ ["~", { className: "nobreak" }],
20259
+ ["\\space", {}],
20260
+ ["\\nobreakspace", { className: "nobreak" }]
20261
+ ]);
20405
20262
  on({
20406
20263
  type: "spacing",
20407
20264
  htmlBuilder(e, t) {
20408
- if (Hi.hasOwnProperty(e.text)) {
20409
- var r = Hi[e.text].className || "";
20265
+ var r = Vi.get(e.text), i = Bi.get(e.text);
20266
+ if (r) {
20267
+ var a = r.className || "";
20410
20268
  if (e.mode === "text") {
20411
- var i = Lt(e, t, "textord");
20412
- return i.classes.push(r), i;
20269
+ var o = Lt(e, t);
20270
+ return o.classes.push(a), o;
20413
20271
  }
20414
- return G(["mspace", r], [Ft(e.text, e.mode, t)], t);
20272
+ return G(["mspace", a], [Ft(e.text, e.mode, t)], t);
20415
20273
  }
20416
- if (Vi.hasOwnProperty(e.text)) return G(["mspace", Vi[e.text]], [], t);
20274
+ if (i) return G(["mspace", i], [], t);
20417
20275
  throw new n("Unknown type of space \"" + e.text + "\"");
20418
20276
  },
20419
20277
  mathmlBuilder(e, t) {
20420
20278
  var r;
20421
- if (Hi.hasOwnProperty(e.text)) r = new X("mtext", [new Sn("\xA0")]);
20422
- else if (Vi.hasOwnProperty(e.text)) return new X("mspace");
20279
+ if (Vi.has(e.text)) r = new X("mtext", [new Sn("\xA0")]);
20280
+ else if (Bi.has(e.text)) return new X("mspace");
20423
20281
  else throw new n("Unknown type of space \"" + e.text + "\"");
20424
20282
  return r;
20425
20283
  }
20426
20284
  });
20427
- var Ui = () => {
20285
+ var Hi = () => {
20428
20286
  var e = new X("mtd", []);
20429
20287
  return e.setAttribute("width", "50%"), e;
20430
20288
  };
@@ -20432,29 +20290,29 @@ on({
20432
20290
  type: "tag",
20433
20291
  mathmlBuilder(e, t) {
20434
20292
  var n = new X("mtable", [new X("mtr", [
20435
- Ui(),
20293
+ Hi(),
20436
20294
  new X("mtd", [Mn(e.body, t)]),
20437
- Ui(),
20295
+ Hi(),
20438
20296
  new X("mtd", [Mn(e.tag, t)])
20439
20297
  ])]);
20440
20298
  return n.setAttribute("width", "100%"), n;
20441
20299
  }
20442
20300
  });
20443
- var Wi = {
20301
+ var Ui = {
20444
20302
  "\\text": void 0,
20445
20303
  "\\textrm": "textrm",
20446
20304
  "\\textsf": "textsf",
20447
20305
  "\\texttt": "texttt",
20448
20306
  "\\textnormal": "textrm"
20449
- }, Gi = {
20307
+ }, Wi = {
20450
20308
  "\\textbf": "textbf",
20451
20309
  "\\textmd": "textmd"
20452
- }, Ki = {
20310
+ }, Gi = {
20453
20311
  "\\textit": "textit",
20454
20312
  "\\textup": "textup"
20455
- }, qi = (e, t) => {
20313
+ }, Ki = (e, t) => {
20456
20314
  var n = e.font;
20457
- return n ? Wi[n] ? t.withTextFontFamily(Wi[n]) : Gi[n] ? t.withTextFontWeight(Gi[n]) : n === "\\emph" ? t.fontShape === "textit" ? t.withTextFontShape("textup") : t.withTextFontShape("textit") : t.withTextFontShape(Ki[n]) : t;
20315
+ return n ? Ui[n] ? t.withTextFontFamily(Ui[n]) : Wi[n] ? t.withTextFontWeight(Wi[n]) : n === "\\emph" ? t.fontShape === "textit" ? t.withTextFontShape("textup") : t.withTextFontShape("textit") : t.withTextFontShape(Gi[n]) : t;
20458
20316
  };
20459
20317
  J({
20460
20318
  type: "text",
@@ -20470,14 +20328,12 @@ J({
20470
20328
  "\\textup",
20471
20329
  "\\emph"
20472
20330
  ],
20473
- props: {
20474
- numArgs: 1,
20475
- argTypes: ["text"],
20476
- allowedInArgument: !0,
20477
- allowedInText: !0
20478
- },
20331
+ numArgs: 1,
20332
+ argTypes: ["text"],
20333
+ allowedInArgument: !0,
20334
+ allowedInText: !0,
20479
20335
  handler(e, t) {
20480
- var { parser: n, funcName: r } = e, i = t[0];
20336
+ var n = e.parser, r = e.funcName, i = t[0];
20481
20337
  return {
20482
20338
  type: "text",
20483
20339
  mode: n.mode,
@@ -20486,31 +20342,28 @@ J({
20486
20342
  };
20487
20343
  },
20488
20344
  htmlBuilder(e, t) {
20489
- var n = qi(e, t);
20345
+ var n = Ki(e, t);
20490
20346
  return G(["mord", "text"], pn(e.body, n, !0), n);
20491
20347
  },
20492
20348
  mathmlBuilder(e, t) {
20493
- var n = qi(e, t);
20349
+ var n = Ki(e, t);
20494
20350
  return Mn(e.body, n);
20495
20351
  }
20496
20352
  }), J({
20497
20353
  type: "underline",
20498
20354
  names: ["\\underline"],
20499
- props: {
20500
- numArgs: 1,
20501
- allowedInText: !0
20502
- },
20355
+ numArgs: 1,
20356
+ allowedInText: !0,
20503
20357
  handler(e, t) {
20504
- var { parser: n } = e;
20505
20358
  return {
20506
20359
  type: "underline",
20507
- mode: n.mode,
20360
+ mode: e.parser.mode,
20508
20361
  body: t[0]
20509
20362
  };
20510
20363
  },
20511
20364
  htmlBuilder(e, t) {
20512
20365
  var n = Y(e.body, t), r = Ht("underline-line", t), i = t.fontMetrics().defaultRuleThickness;
20513
- return G(["mord", "underline"], [K({
20366
+ return G(["mord", "katex-underline"], [K({
20514
20367
  positionType: "top",
20515
20368
  positionData: n.height,
20516
20369
  children: [
@@ -20542,16 +20395,13 @@ J({
20542
20395
  }), J({
20543
20396
  type: "vcenter",
20544
20397
  names: ["\\vcenter"],
20545
- props: {
20546
- numArgs: 1,
20547
- argTypes: ["original"],
20548
- allowedInText: !1
20549
- },
20398
+ numArgs: 1,
20399
+ argTypes: ["original"],
20400
+ allowedInText: !1,
20550
20401
  handler(e, t) {
20551
- var { parser: n } = e;
20552
20402
  return {
20553
20403
  type: "vcenter",
20554
- mode: n.mode,
20404
+ mode: e.parser.mode,
20555
20405
  body: t[0]
20556
20406
  };
20557
20407
  },
@@ -20572,28 +20422,26 @@ J({
20572
20422
  }), J({
20573
20423
  type: "verb",
20574
20424
  names: ["\\verb"],
20575
- props: {
20576
- numArgs: 0,
20577
- allowedInText: !0
20578
- },
20425
+ numArgs: 0,
20426
+ allowedInText: !0,
20579
20427
  handler(e, t, r) {
20580
20428
  throw new n("\\verb ended by end of line instead of matching delimiter");
20581
20429
  },
20582
20430
  htmlBuilder(e, t) {
20583
- for (var n = Ji(e), r = [], i = t.havingStyle(t.style.text()), a = 0; a < n.length; a++) {
20431
+ for (var n = qi(e), r = [], i = t.havingStyle(t.style.text()), a = 0; a < n.length; a++) {
20584
20432
  var o = n[a];
20585
20433
  o === "~" && (o = "\\textasciitilde"), r.push(Pt(o, "Typewriter-Regular", e.mode, i, ["mord", "texttt"]));
20586
20434
  }
20587
20435
  return G(["mord", "text"].concat(i.sizingClasses(t)), zt(r), i);
20588
20436
  },
20589
20437
  mathmlBuilder(e, t) {
20590
- var n = new X("mtext", [new Sn(Ji(e))]);
20438
+ var n = new X("mtext", [new Sn(qi(e))]);
20591
20439
  return n.setAttribute("mathvariant", "monospace"), n;
20592
20440
  }
20593
20441
  });
20594
- var Ji = (e) => e.body.replace(/ /g, e.star ? "␣" : "\xA0"), Yi = nn, Xi = "[ \r\n ]", Zi = "\\\\[a-zA-Z@]+", Qi = "\\\\[^\ud800-\udfff]", $i = "(" + Zi + ")" + Xi + "*", ea = "\\\\(\n|[ \r ]+\n?)[ \r ]*", ta = "[̀-ͯ]", na = RegExp(ta + "+$"), ra = "(" + Xi + "+)|" + (ea + "|") + "([!-\\[\\]-‧‪-퟿豈-￿]" + (ta + "*") + "|[\ud800-\udbff][\udc00-\udfff]" + (ta + "*") + "|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5" + ("|" + $i) + ("|" + Qi + ")"), ia = class {
20442
+ var qi = (e) => e.body.replace(/ /g, e.star ? "␣" : "\xA0"), Ji = nn, Yi = "[ \r\n ]", Xi = "\\\\[a-zA-Z@]+", Zi = "\\\\[^\ud800-\udfff]", Qi = "(" + Xi + ")" + Yi + "*", $i = "\\\\(\n|[ \r ]+\n?)[ \r ]*", ea = "[̀-ͯ]", ta = RegExp(ea + "+$"), na = "(" + Yi + "+)|" + ($i + "|") + "([!-\\[\\]-‧‪-퟿豈-￿]" + (ea + "*") + "|[\ud800-\udbff][\udc00-\udfff]" + (ea + "*") + "|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5" + ("|" + Qi) + ("|" + Zi + ")"), ra = class {
20595
20443
  constructor(e, t) {
20596
- this.input = void 0, this.settings = void 0, this.tokenRegex = void 0, this.catcodes = void 0, this.input = e, this.settings = t, this.tokenRegex = new RegExp(ra, "g"), this.catcodes = {
20444
+ this.input = void 0, this.settings = void 0, this.tokenRegex = void 0, this.catcodes = void 0, this.input = e, this.settings = t, this.tokenRegex = new RegExp(na, "g"), this.catcodes = {
20597
20445
  "%": 14,
20598
20446
  "~": 13
20599
20447
  };
@@ -20603,17 +20451,17 @@ var Ji = (e) => e.body.replace(/ /g, e.star ? "␣" : "\xA0"), Yi = nn, Xi = "[
20603
20451
  }
20604
20452
  lex() {
20605
20453
  var e = this.input, t = this.tokenRegex.lastIndex;
20606
- if (t === e.length) return new ai("EOF", new ii(this, t, t));
20454
+ if (t === e.length) return new ii("EOF", new ri(this, t, t));
20607
20455
  var r = this.tokenRegex.exec(e);
20608
- if (r === null || r.index !== t) throw new n("Unexpected character: '" + e[t] + "'", new ai(e[t], new ii(this, t, t + 1)));
20456
+ if (r === null || r.index !== t) throw new n("Unexpected character: '" + e[t] + "'", new ii(e[t], new ri(this, t, t + 1)));
20609
20457
  var i = r[6] || r[3] || (r[2] ? "\\ " : " ");
20610
20458
  if (this.catcodes[i] === 14) {
20611
20459
  var a = e.indexOf("\n", this.tokenRegex.lastIndex);
20612
20460
  return a === -1 ? (this.tokenRegex.lastIndex = e.length, this.settings.reportNonstrict("commentAtEnd", "% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")) : this.tokenRegex.lastIndex = a + 1, this.lex();
20613
20461
  }
20614
- return new ai(i, new ii(this, t, this.tokenRegex.lastIndex));
20462
+ return new ii(i, new ri(this, t, this.tokenRegex.lastIndex));
20615
20463
  }
20616
- }, aa = class {
20464
+ }, ia = class {
20617
20465
  constructor(e, t) {
20618
20466
  e === void 0 && (e = {}), t === void 0 && (t = {}), this.current = void 0, this.builtins = void 0, this.undefStack = void 0, this.current = t, this.builtins = e, this.undefStack = [];
20619
20467
  }
@@ -20623,16 +20471,17 @@ var Ji = (e) => e.body.replace(/ /g, e.star ? "␣" : "\xA0"), Yi = nn, Xi = "[
20623
20471
  endGroup() {
20624
20472
  if (this.undefStack.length === 0) throw new n("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");
20625
20473
  var e = this.undefStack.pop();
20626
- for (var t in e) e.hasOwnProperty(t) && (e[t] == null ? delete this.current[t] : this.current[t] = e[t]);
20474
+ for (var t of Object.keys(e)) e[t] === void 0 ? delete this.current[t] : this.current[t] = e[t];
20627
20475
  }
20628
20476
  endGroups() {
20629
20477
  for (; this.undefStack.length > 0;) this.endGroup();
20630
20478
  }
20631
20479
  has(e) {
20632
- return this.current.hasOwnProperty(e) || this.builtins.hasOwnProperty(e);
20480
+ return Object.prototype.hasOwnProperty.call(this.current, e) || Object.prototype.hasOwnProperty.call(this.builtins, e);
20633
20481
  }
20634
20482
  get(e) {
20635
- return this.current.hasOwnProperty(e) ? this.current[e] : this.builtins[e];
20483
+ if (Object.prototype.hasOwnProperty.call(this.current, e)) return this.current[e];
20484
+ if (Object.prototype.hasOwnProperty.call(this.builtins, e)) return this.builtins[e];
20636
20485
  }
20637
20486
  set(e, t, n) {
20638
20487
  if (n === void 0 && (n = !1), n) {
@@ -20640,11 +20489,11 @@ var Ji = (e) => e.body.replace(/ /g, e.star ? "␣" : "\xA0"), Yi = nn, Xi = "[
20640
20489
  this.undefStack.length > 0 && (this.undefStack[this.undefStack.length - 1][e] = t);
20641
20490
  } else {
20642
20491
  var i = this.undefStack[this.undefStack.length - 1];
20643
- i && !i.hasOwnProperty(e) && (i[e] = this.current[e]);
20492
+ i && !Object.prototype.hasOwnProperty.call(i, e) && (i[e] = Object.prototype.hasOwnProperty.call(this.current, e) ? this.current[e] : void 0);
20644
20493
  }
20645
20494
  t == null ? delete this.current[e] : this.current[e] = t;
20646
20495
  }
20647
- }, oa = ri;
20496
+ }, aa = ni;
20648
20497
  $("\\noexpand", function(e) {
20649
20498
  var t = e.popToken();
20650
20499
  return e.isExpandable(t.text) && (t.noexpand = !0, t.treatAsRelax = !0), {
@@ -20688,7 +20537,7 @@ $("\\noexpand", function(e) {
20688
20537
  numArgs: 0
20689
20538
  };
20690
20539
  });
20691
- var sa = {
20540
+ var oa = {
20692
20541
  0: 0,
20693
20542
  1: 1,
20694
20543
  2: 2,
@@ -20722,12 +20571,12 @@ $("\\char", function(e) {
20722
20571
  else i = t.text.charCodeAt(0);
20723
20572
  } else r = 10;
20724
20573
  if (r) {
20725
- if (i = sa[t.text], i == null || i >= r) throw new n("Invalid base-" + r + " digit " + t.text);
20726
- for (var a; (a = sa[e.future().text]) != null && a < r;) i *= r, i += a, e.popToken();
20574
+ if (i = oa[t.text], i == null || i >= r) throw new n("Invalid base-" + r + " digit " + t.text);
20575
+ for (var a; (a = oa[e.future().text]) != null && a < r;) i *= r, i += a, e.popToken();
20727
20576
  }
20728
20577
  return "\\@char{" + i + "}";
20729
20578
  });
20730
- var ca = (e, t, r, i) => {
20579
+ var sa = (e, t, r, i) => {
20731
20580
  var a = e.consumeArg().tokens;
20732
20581
  if (a.length !== 1) throw new n("\\newcommand's first argument must be a macro name");
20733
20582
  var o = a[0].text, s = e.isDefined(o);
@@ -20744,7 +20593,7 @@ var ca = (e, t, r, i) => {
20744
20593
  numArgs: c
20745
20594
  }), "";
20746
20595
  };
20747
- $("\\newcommand", (e) => ca(e, !1, !0, !1)), $("\\renewcommand", (e) => ca(e, !0, !1, !1)), $("\\providecommand", (e) => ca(e, !0, !0, !0)), $("\\message", (e) => {
20596
+ $("\\newcommand", (e) => sa(e, !1, !0, !1)), $("\\renewcommand", (e) => sa(e, !0, !1, !1)), $("\\providecommand", (e) => sa(e, !0, !0, !0)), $("\\message", (e) => {
20748
20597
  var t = e.consumeArgs(1)[0];
20749
20598
  return console.log(t.reverse().map((e) => e.text).join("")), "";
20750
20599
  }), $("\\errmessage", (e) => {
@@ -20752,9 +20601,9 @@ $("\\newcommand", (e) => ca(e, !1, !0, !1)), $("\\renewcommand", (e) => ca(e, !0
20752
20601
  return console.error(t.reverse().map((e) => e.text).join("")), "";
20753
20602
  }), $("\\show", (e) => {
20754
20603
  var t = e.popToken(), n = t.text;
20755
- return console.log(t, e.macros.get(n), Yi[n], j.math[n], j.text[n]), "";
20604
+ return console.log(t, e.macros.get(n), Ji[n], j.math[n], j.text[n]), "";
20756
20605
  }), $("\\bgroup", "{"), $("\\egroup", "}"), $("~", "\\nobreakspace"), $("\\lq", "`"), $("\\rq", "'"), $("\\aa", "\\r a"), $("\\AA", "\\r A"), $("\\textcopyright", "\\html@mathml{\\textcircled{c}}{\\char`©}"), $("\\copyright", "\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"), $("\\textregistered", "\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"), $("ℬ", "\\mathscr{B}"), $("ℰ", "\\mathscr{E}"), $("ℱ", "\\mathscr{F}"), $("ℋ", "\\mathscr{H}"), $("ℐ", "\\mathscr{I}"), $("ℒ", "\\mathscr{L}"), $("ℳ", "\\mathscr{M}"), $("ℛ", "\\mathscr{R}"), $("ℭ", "\\mathfrak{C}"), $("ℌ", "\\mathfrak{H}"), $("ℨ", "\\mathfrak{Z}"), $("\\Bbbk", "\\Bbb{k}"), $("\\llap", "\\mathllap{\\textrm{#1}}"), $("\\rlap", "\\mathrlap{\\textrm{#1}}"), $("\\clap", "\\mathclap{\\textrm{#1}}"), $("\\mathstrut", "\\vphantom{(}"), $("\\underbar", "\\underline{\\text{#1}}"), $("\\not", "\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char\"338}"), $("\\neq", "\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"), $("\\ne", "\\neq"), $("≠", "\\neq"), $("\\notin", "\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"), $("∉", "\\notin"), $("≘", "\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"), $("≙", "\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"), $("≚", "\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"), $("≛", "\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"), $("≝", "\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"), $("≞", "\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"), $("≟", "\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"), $("⟂", "\\perp"), $("‼", "\\mathclose{!\\mkern-0.8mu!}"), $("∌", "\\notni"), $("⌜", "\\ulcorner"), $("⌝", "\\urcorner"), $("⌞", "\\llcorner"), $("⌟", "\\lrcorner"), $("©", "\\copyright"), $("®", "\\textregistered"), $("\\ulcorner", "\\html@mathml{\\@ulcorner}{\\mathop{\\char\"231c}}"), $("\\urcorner", "\\html@mathml{\\@urcorner}{\\mathop{\\char\"231d}}"), $("\\llcorner", "\\html@mathml{\\@llcorner}{\\mathop{\\char\"231e}}"), $("\\lrcorner", "\\html@mathml{\\@lrcorner}{\\mathop{\\char\"231f}}"), $("\\vdots", "{\\varvdots\\rule{0pt}{15pt}}"), $("⋮", "\\vdots"), $("\\varGamma", "\\mathit{\\Gamma}"), $("\\varDelta", "\\mathit{\\Delta}"), $("\\varTheta", "\\mathit{\\Theta}"), $("\\varLambda", "\\mathit{\\Lambda}"), $("\\varXi", "\\mathit{\\Xi}"), $("\\varPi", "\\mathit{\\Pi}"), $("\\varSigma", "\\mathit{\\Sigma}"), $("\\varUpsilon", "\\mathit{\\Upsilon}"), $("\\varPhi", "\\mathit{\\Phi}"), $("\\varPsi", "\\mathit{\\Psi}"), $("\\varOmega", "\\mathit{\\Omega}"), $("\\substack", "\\begin{subarray}{c}#1\\end{subarray}"), $("\\colon", "\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"), $("\\boxed", "\\fbox{$\\displaystyle{#1}$}"), $("\\iff", "\\DOTSB\\;\\Longleftrightarrow\\;"), $("\\implies", "\\DOTSB\\;\\Longrightarrow\\;"), $("\\impliedby", "\\DOTSB\\;\\Longleftarrow\\;"), $("\\dddot", "{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"), $("\\ddddot", "{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");
20757
- var la = {
20606
+ var ca = {
20758
20607
  ",": "\\dotsc",
20759
20608
  "\\not": "\\dotsb",
20760
20609
  "+": "\\dotsb",
@@ -20802,12 +20651,12 @@ var la = {
20802
20651
  "\\iiiint": "\\dotsi",
20803
20652
  "\\idotsint": "\\dotsi",
20804
20653
  "\\DOTSX": "\\dotsx"
20805
- }, ua = /* @__PURE__ */ new Set(["bin", "rel"]);
20654
+ }, la = /* @__PURE__ */ new Set(["bin", "rel"]);
20806
20655
  $("\\dots", function(e) {
20807
20656
  var t = "\\dotso", n = e.expandAfterFuture().text;
20808
- return n in la ? t = la[n] : (n.slice(0, 4) === "\\not" || n in j.math && ua.has(j.math[n].group)) && (t = "\\dotsb"), t;
20657
+ return n in ca ? t = ca[n] : (n.slice(0, 4) === "\\not" || n in j.math && la.has(j.math[n].group)) && (t = "\\dotsb"), t;
20809
20658
  });
20810
- var da = {
20659
+ var ua = {
20811
20660
  ")": !0,
20812
20661
  "]": !0,
20813
20662
  "\\rbrack": !0,
@@ -20829,19 +20678,19 @@ var da = {
20829
20678
  ",": !0
20830
20679
  };
20831
20680
  $("\\dotso", function(e) {
20832
- return e.future().text in da ? "\\ldots\\," : "\\ldots";
20681
+ return e.future().text in ua ? "\\ldots\\," : "\\ldots";
20833
20682
  }), $("\\dotsc", function(e) {
20834
20683
  var t = e.future().text;
20835
- return t in da && t !== "," ? "\\ldots\\," : "\\ldots";
20684
+ return t in ua && t !== "," ? "\\ldots\\," : "\\ldots";
20836
20685
  }), $("\\cdots", function(e) {
20837
- return e.future().text in da ? "\\@cdots\\," : "\\@cdots";
20686
+ return e.future().text in ua ? "\\@cdots\\," : "\\@cdots";
20838
20687
  }), $("\\dotsb", "\\cdots"), $("\\dotsm", "\\cdots"), $("\\dotsi", "\\!\\cdots"), $("\\dotsx", "\\ldots\\,"), $("\\DOTSI", "\\relax"), $("\\DOTSB", "\\relax"), $("\\DOTSX", "\\relax"), $("\\tmspace", "\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"), $("\\,", "\\tmspace+{3mu}{.1667em}"), $("\\thinspace", "\\,"), $("\\>", "\\mskip{4mu}"), $("\\:", "\\tmspace+{4mu}{.2222em}"), $("\\medspace", "\\:"), $("\\;", "\\tmspace+{5mu}{.2777em}"), $("\\thickspace", "\\;"), $("\\!", "\\tmspace-{3mu}{.1667em}"), $("\\negthinspace", "\\!"), $("\\negmedspace", "\\tmspace-{4mu}{.2222em}"), $("\\negthickspace", "\\tmspace-{5mu}{.277em}"), $("\\enspace", "\\kern.5em "), $("\\enskip", "\\hskip.5em\\relax"), $("\\quad", "\\hskip1em\\relax"), $("\\qquad", "\\hskip2em\\relax"), $("\\tag", "\\@ifstar\\tag@literal\\tag@paren"), $("\\tag@paren", "\\tag@literal{({#1})}"), $("\\tag@literal", (e) => {
20839
20688
  if (e.macros.get("\\df@tag")) throw new n("Multiple \\tag");
20840
20689
  return "\\gdef\\df@tag{\\text{#1}}";
20841
20690
  }), $("\\bmod", "\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"), $("\\pod", "\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"), $("\\pmod", "\\pod{{\\rm mod}\\mkern6mu#1}"), $("\\mod", "\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"), $("\\newline", "\\\\\\relax"), $("\\TeX", "\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");
20842
- var fa = A(We["Main-Regular"][84][1] - .7 * We["Main-Regular"][65][1]);
20843
- $("\\LaTeX", "\\textrm{\\html@mathml{" + ("L\\kern-.36em\\raisebox{" + fa + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{LaTeX}}"), $("\\KaTeX", "\\textrm{\\html@mathml{" + ("K\\kern-.17em\\raisebox{" + fa + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{KaTeX}}"), $("\\hspace", "\\@ifstar\\@hspacer\\@hspace"), $("\\@hspace", "\\hskip #1\\relax"), $("\\@hspacer", "\\rule{0pt}{0pt}\\hskip #1\\relax"), $("\\ordinarycolon", ":"), $("\\vcentcolon", "\\mathrel{\\mathop\\ordinarycolon}"), $("\\dblcolon", "\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char\"2237}}"), $("\\coloneqq", "\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char\"2254}}"), $("\\Coloneqq", "\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char\"2237\\char\"3d}}"), $("\\coloneq", "\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char\"3a\\char\"2212}}"), $("\\Coloneq", "\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char\"2237\\char\"2212}}"), $("\\eqqcolon", "\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char\"2255}}"), $("\\Eqqcolon", "\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char\"3d\\char\"2237}}"), $("\\eqcolon", "\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char\"2239}}"), $("\\Eqcolon", "\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char\"2212\\char\"2237}}"), $("\\colonapprox", "\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char\"3a\\char\"2248}}"), $("\\Colonapprox", "\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char\"2237\\char\"2248}}"), $("\\colonsim", "\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char\"3a\\char\"223c}}"), $("\\Colonsim", "\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char\"2237\\char\"223c}}"), $("∷", "\\dblcolon"), $("∹", "\\eqcolon"), $("≔", "\\coloneqq"), $("≕", "\\eqqcolon"), $("⩴", "\\Coloneqq"), $("\\ratio", "\\vcentcolon"), $("\\coloncolon", "\\dblcolon"), $("\\colonequals", "\\coloneqq"), $("\\coloncolonequals", "\\Coloneqq"), $("\\equalscolon", "\\eqqcolon"), $("\\equalscoloncolon", "\\Eqqcolon"), $("\\colonminus", "\\coloneq"), $("\\coloncolonminus", "\\Coloneq"), $("\\minuscolon", "\\eqcolon"), $("\\minuscoloncolon", "\\Eqcolon"), $("\\coloncolonapprox", "\\Colonapprox"), $("\\coloncolonsim", "\\Colonsim"), $("\\simcolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"), $("\\simcoloncolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"), $("\\approxcolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"), $("\\approxcoloncolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"), $("\\notni", "\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"), $("\\limsup", "\\DOTSB\\operatorname*{lim\\,sup}"), $("\\liminf", "\\DOTSB\\operatorname*{lim\\,inf}"), $("\\injlim", "\\DOTSB\\operatorname*{inj\\,lim}"), $("\\projlim", "\\DOTSB\\operatorname*{proj\\,lim}"), $("\\varlimsup", "\\DOTSB\\operatorname*{\\overline{lim}}"), $("\\varliminf", "\\DOTSB\\operatorname*{\\underline{lim}}"), $("\\varinjlim", "\\DOTSB\\operatorname*{\\underrightarrow{lim}}"), $("\\varprojlim", "\\DOTSB\\operatorname*{\\underleftarrow{lim}}"), $("\\gvertneqq", "\\html@mathml{\\@gvertneqq}{≩}"), $("\\lvertneqq", "\\html@mathml{\\@lvertneqq}{≨}"), $("\\ngeqq", "\\html@mathml{\\@ngeqq}{≱}"), $("\\ngeqslant", "\\html@mathml{\\@ngeqslant}{≱}"), $("\\nleqq", "\\html@mathml{\\@nleqq}{≰}"), $("\\nleqslant", "\\html@mathml{\\@nleqslant}{≰}"), $("\\nshortmid", "\\html@mathml{\\@nshortmid}{∤}"), $("\\nshortparallel", "\\html@mathml{\\@nshortparallel}{∦}"), $("\\nsubseteqq", "\\html@mathml{\\@nsubseteqq}{⊈}"), $("\\nsupseteqq", "\\html@mathml{\\@nsupseteqq}{⊉}"), $("\\varsubsetneq", "\\html@mathml{\\@varsubsetneq}{⊊}"), $("\\varsubsetneqq", "\\html@mathml{\\@varsubsetneqq}{⫋}"), $("\\varsupsetneq", "\\html@mathml{\\@varsupsetneq}{⊋}"), $("\\varsupsetneqq", "\\html@mathml{\\@varsupsetneqq}{⫌}"), $("\\imath", "\\html@mathml{\\@imath}{ı}"), $("\\jmath", "\\html@mathml{\\@jmath}{ȷ}"), $("\\llbracket", "\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"), $("\\rrbracket", "\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"), $("⟦", "\\llbracket"), $("⟧", "\\rrbracket"), $("\\lBrace", "\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"), $("\\rBrace", "\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"), $("⦃", "\\lBrace"), $("⦄", "\\rBrace"), $("\\minuso", "\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"), $("⦵", "\\minuso"), $("\\darr", "\\downarrow"), $("\\dArr", "\\Downarrow"), $("\\Darr", "\\Downarrow"), $("\\lang", "\\langle"), $("\\rang", "\\rangle"), $("\\uarr", "\\uparrow"), $("\\uArr", "\\Uparrow"), $("\\Uarr", "\\Uparrow"), $("\\N", "\\mathbb{N}"), $("\\R", "\\mathbb{R}"), $("\\Z", "\\mathbb{Z}"), $("\\alef", "\\aleph"), $("\\alefsym", "\\aleph"), $("\\Alpha", "\\mathrm{A}"), $("\\Beta", "\\mathrm{B}"), $("\\bull", "\\bullet"), $("\\Chi", "\\mathrm{X}"), $("\\clubs", "\\clubsuit"), $("\\cnums", "\\mathbb{C}"), $("\\Complex", "\\mathbb{C}"), $("\\Dagger", "\\ddagger"), $("\\diamonds", "\\diamondsuit"), $("\\empty", "\\emptyset"), $("\\Epsilon", "\\mathrm{E}"), $("\\Eta", "\\mathrm{H}"), $("\\exist", "\\exists"), $("\\harr", "\\leftrightarrow"), $("\\hArr", "\\Leftrightarrow"), $("\\Harr", "\\Leftrightarrow"), $("\\hearts", "\\heartsuit"), $("\\image", "\\Im"), $("\\infin", "\\infty"), $("\\Iota", "\\mathrm{I}"), $("\\isin", "\\in"), $("\\Kappa", "\\mathrm{K}"), $("\\larr", "\\leftarrow"), $("\\lArr", "\\Leftarrow"), $("\\Larr", "\\Leftarrow"), $("\\lrarr", "\\leftrightarrow"), $("\\lrArr", "\\Leftrightarrow"), $("\\Lrarr", "\\Leftrightarrow"), $("\\Mu", "\\mathrm{M}"), $("\\natnums", "\\mathbb{N}"), $("\\Nu", "\\mathrm{N}"), $("\\Omicron", "\\mathrm{O}"), $("\\plusmn", "\\pm"), $("\\rarr", "\\rightarrow"), $("\\rArr", "\\Rightarrow"), $("\\Rarr", "\\Rightarrow"), $("\\real", "\\Re"), $("\\reals", "\\mathbb{R}"), $("\\Reals", "\\mathbb{R}"), $("\\Rho", "\\mathrm{P}"), $("\\sdot", "\\cdot"), $("\\sect", "\\S"), $("\\spades", "\\spadesuit"), $("\\sub", "\\subset"), $("\\sube", "\\subseteq"), $("\\supe", "\\supseteq"), $("\\Tau", "\\mathrm{T}"), $("\\thetasym", "\\vartheta"), $("\\weierp", "\\wp"), $("\\Zeta", "\\mathrm{Z}"), $("\\argmin", "\\DOTSB\\operatorname*{arg\\,min}"), $("\\argmax", "\\DOTSB\\operatorname*{arg\\,max}"), $("\\plim", "\\DOTSB\\mathop{\\operatorname{plim}}\\limits"), $("\\bra", "\\mathinner{\\langle{#1}|}"), $("\\ket", "\\mathinner{|{#1}\\rangle}"), $("\\braket", "\\mathinner{\\langle{#1}\\rangle}"), $("\\Bra", "\\left\\langle#1\\right|"), $("\\Ket", "\\left|#1\\right\\rangle");
20844
- var pa = (e) => (t) => {
20691
+ var da = A(We["Main-Regular"][84][1] - .7 * We["Main-Regular"][65][1]);
20692
+ $("\\LaTeX", "\\textrm{\\html@mathml{" + ("L\\kern-.36em\\raisebox{" + da + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{LaTeX}}"), $("\\KaTeX", "\\textrm{\\html@mathml{" + ("K\\kern-.17em\\raisebox{" + da + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{KaTeX}}"), $("\\hspace", "\\@ifstar\\@hspacer\\@hspace"), $("\\@hspace", "\\hskip #1\\relax"), $("\\@hspacer", "\\rule{0pt}{0pt}\\hskip #1\\relax"), $("\\ordinarycolon", ":"), $("\\vcentcolon", "\\mathrel{\\mathop\\ordinarycolon}"), $("\\dblcolon", "\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char\"2237}}"), $("\\coloneqq", "\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char\"2254}}"), $("\\Coloneqq", "\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char\"2237\\char\"3d}}"), $("\\coloneq", "\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char\"3a\\char\"2212}}"), $("\\Coloneq", "\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char\"2237\\char\"2212}}"), $("\\eqqcolon", "\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char\"2255}}"), $("\\Eqqcolon", "\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char\"3d\\char\"2237}}"), $("\\eqcolon", "\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char\"2239}}"), $("\\Eqcolon", "\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char\"2212\\char\"2237}}"), $("\\colonapprox", "\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char\"3a\\char\"2248}}"), $("\\Colonapprox", "\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char\"2237\\char\"2248}}"), $("\\colonsim", "\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char\"3a\\char\"223c}}"), $("\\Colonsim", "\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char\"2237\\char\"223c}}"), $("∷", "\\dblcolon"), $("∹", "\\eqcolon"), $("≔", "\\coloneqq"), $("≕", "\\eqqcolon"), $("⩴", "\\Coloneqq"), $("\\ratio", "\\vcentcolon"), $("\\coloncolon", "\\dblcolon"), $("\\colonequals", "\\coloneqq"), $("\\coloncolonequals", "\\Coloneqq"), $("\\equalscolon", "\\eqqcolon"), $("\\equalscoloncolon", "\\Eqqcolon"), $("\\colonminus", "\\coloneq"), $("\\coloncolonminus", "\\Coloneq"), $("\\minuscolon", "\\eqcolon"), $("\\minuscoloncolon", "\\Eqcolon"), $("\\coloncolonapprox", "\\Colonapprox"), $("\\coloncolonsim", "\\Colonsim"), $("\\simcolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"), $("\\simcoloncolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"), $("\\approxcolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"), $("\\approxcoloncolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"), $("\\notni", "\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"), $("\\limsup", "\\DOTSB\\operatorname*{lim\\,sup}"), $("\\liminf", "\\DOTSB\\operatorname*{lim\\,inf}"), $("\\injlim", "\\DOTSB\\operatorname*{inj\\,lim}"), $("\\projlim", "\\DOTSB\\operatorname*{proj\\,lim}"), $("\\varlimsup", "\\DOTSB\\operatorname*{\\overline{lim}}"), $("\\varliminf", "\\DOTSB\\operatorname*{\\underline{lim}}"), $("\\varinjlim", "\\DOTSB\\operatorname*{\\underrightarrow{lim}}"), $("\\varprojlim", "\\DOTSB\\operatorname*{\\underleftarrow{lim}}"), $("\\gvertneqq", "\\html@mathml{\\@gvertneqq}{≩}"), $("\\lvertneqq", "\\html@mathml{\\@lvertneqq}{≨}"), $("\\ngeqq", "\\html@mathml{\\@ngeqq}{≱}"), $("\\ngeqslant", "\\html@mathml{\\@ngeqslant}{≱}"), $("\\nleqq", "\\html@mathml{\\@nleqq}{≰}"), $("\\nleqslant", "\\html@mathml{\\@nleqslant}{≰}"), $("\\nshortmid", "\\html@mathml{\\@nshortmid}{∤}"), $("\\nshortparallel", "\\html@mathml{\\@nshortparallel}{∦}"), $("\\nsubseteqq", "\\html@mathml{\\@nsubseteqq}{⊈}"), $("\\nsupseteqq", "\\html@mathml{\\@nsupseteqq}{⊉}"), $("\\varsubsetneq", "\\html@mathml{\\@varsubsetneq}{⊊}"), $("\\varsubsetneqq", "\\html@mathml{\\@varsubsetneqq}{⫋}"), $("\\varsupsetneq", "\\html@mathml{\\@varsupsetneq}{⊋}"), $("\\varsupsetneqq", "\\html@mathml{\\@varsupsetneqq}{⫌}"), $("\\imath", "\\html@mathml{\\@imath}{ı}"), $("\\jmath", "\\html@mathml{\\@jmath}{ȷ}"), $("\\llbracket", "\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"), $("\\rrbracket", "\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"), $("⟦", "\\llbracket"), $("⟧", "\\rrbracket"), $("\\lBrace", "\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"), $("\\rBrace", "\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"), $("⦃", "\\lBrace"), $("⦄", "\\rBrace"), $("\\minuso", "\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"), $("⦵", "\\minuso"), $("\\darr", "\\downarrow"), $("\\dArr", "\\Downarrow"), $("\\Darr", "\\Downarrow"), $("\\lang", "\\langle"), $("\\rang", "\\rangle"), $("\\uarr", "\\uparrow"), $("\\uArr", "\\Uparrow"), $("\\Uarr", "\\Uparrow"), $("\\N", "\\mathbb{N}"), $("\\R", "\\mathbb{R}"), $("\\Z", "\\mathbb{Z}"), $("\\alef", "\\aleph"), $("\\alefsym", "\\aleph"), $("\\Alpha", "\\mathrm{A}"), $("\\Beta", "\\mathrm{B}"), $("\\bull", "\\bullet"), $("\\Chi", "\\mathrm{X}"), $("\\clubs", "\\clubsuit"), $("\\cnums", "\\mathbb{C}"), $("\\Complex", "\\mathbb{C}"), $("\\Dagger", "\\ddagger"), $("\\diamonds", "\\diamondsuit"), $("\\empty", "\\emptyset"), $("\\Epsilon", "\\mathrm{E}"), $("\\Eta", "\\mathrm{H}"), $("\\exist", "\\exists"), $("\\harr", "\\leftrightarrow"), $("\\hArr", "\\Leftrightarrow"), $("\\Harr", "\\Leftrightarrow"), $("\\hearts", "\\heartsuit"), $("\\image", "\\Im"), $("\\infin", "\\infty"), $("\\Iota", "\\mathrm{I}"), $("\\isin", "\\in"), $("\\Kappa", "\\mathrm{K}"), $("\\larr", "\\leftarrow"), $("\\lArr", "\\Leftarrow"), $("\\Larr", "\\Leftarrow"), $("\\lrarr", "\\leftrightarrow"), $("\\lrArr", "\\Leftrightarrow"), $("\\Lrarr", "\\Leftrightarrow"), $("\\Mu", "\\mathrm{M}"), $("\\natnums", "\\mathbb{N}"), $("\\Nu", "\\mathrm{N}"), $("\\Omicron", "\\mathrm{O}"), $("\\plusmn", "\\pm"), $("\\rarr", "\\rightarrow"), $("\\rArr", "\\Rightarrow"), $("\\Rarr", "\\Rightarrow"), $("\\real", "\\Re"), $("\\reals", "\\mathbb{R}"), $("\\Reals", "\\mathbb{R}"), $("\\Rho", "\\mathrm{P}"), $("\\sdot", "\\cdot"), $("\\sect", "\\S"), $("\\spades", "\\spadesuit"), $("\\sub", "\\subset"), $("\\sube", "\\subseteq"), $("\\supe", "\\supseteq"), $("\\Tau", "\\mathrm{T}"), $("\\thetasym", "\\vartheta"), $("\\weierp", "\\wp"), $("\\Zeta", "\\mathrm{Z}"), $("\\argmin", "\\DOTSB\\operatorname*{arg\\,min}"), $("\\argmax", "\\DOTSB\\operatorname*{arg\\,max}"), $("\\plim", "\\DOTSB\\mathop{\\operatorname{plim}}\\limits"), $("\\bra", "\\mathinner{\\langle{#1}|}"), $("\\ket", "\\mathinner{|{#1}\\rangle}"), $("\\braket", "\\mathinner{\\langle{#1}\\rangle}"), $("\\Bra", "\\left\\langle#1\\right|"), $("\\Ket", "\\left|#1\\right\\rangle");
20693
+ var fa = (e) => (t) => {
20845
20694
  var n = t.consumeArg().tokens, r = t.consumeArg().tokens, i = t.consumeArg().tokens, a = t.consumeArg().tokens, o = t.macros.get("|"), s = t.macros.get("\\|");
20846
20695
  t.macros.beginGroup();
20847
20696
  var c = (t) => (n) => {
@@ -20863,18 +20712,18 @@ var pa = (e) => (t) => {
20863
20712
  numArgs: 0
20864
20713
  };
20865
20714
  };
20866
- $("\\bra@ket", pa(!1)), $("\\bra@set", pa(!0)), $("\\Braket", "\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"), $("\\Set", "\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"), $("\\set", "\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"), $("\\angln", "{\\angl n}"), $("\\blue", "\\textcolor{##6495ed}{#1}"), $("\\orange", "\\textcolor{##ffa500}{#1}"), $("\\pink", "\\textcolor{##ff00af}{#1}"), $("\\red", "\\textcolor{##df0030}{#1}"), $("\\green", "\\textcolor{##28ae7b}{#1}"), $("\\gray", "\\textcolor{gray}{#1}"), $("\\purple", "\\textcolor{##9d38bd}{#1}"), $("\\blueA", "\\textcolor{##ccfaff}{#1}"), $("\\blueB", "\\textcolor{##80f6ff}{#1}"), $("\\blueC", "\\textcolor{##63d9ea}{#1}"), $("\\blueD", "\\textcolor{##11accd}{#1}"), $("\\blueE", "\\textcolor{##0c7f99}{#1}"), $("\\tealA", "\\textcolor{##94fff5}{#1}"), $("\\tealB", "\\textcolor{##26edd5}{#1}"), $("\\tealC", "\\textcolor{##01d1c1}{#1}"), $("\\tealD", "\\textcolor{##01a995}{#1}"), $("\\tealE", "\\textcolor{##208170}{#1}"), $("\\greenA", "\\textcolor{##b6ffb0}{#1}"), $("\\greenB", "\\textcolor{##8af281}{#1}"), $("\\greenC", "\\textcolor{##74cf70}{#1}"), $("\\greenD", "\\textcolor{##1fab54}{#1}"), $("\\greenE", "\\textcolor{##0d923f}{#1}"), $("\\goldA", "\\textcolor{##ffd0a9}{#1}"), $("\\goldB", "\\textcolor{##ffbb71}{#1}"), $("\\goldC", "\\textcolor{##ff9c39}{#1}"), $("\\goldD", "\\textcolor{##e07d10}{#1}"), $("\\goldE", "\\textcolor{##a75a05}{#1}"), $("\\redA", "\\textcolor{##fca9a9}{#1}"), $("\\redB", "\\textcolor{##ff8482}{#1}"), $("\\redC", "\\textcolor{##f9685d}{#1}"), $("\\redD", "\\textcolor{##e84d39}{#1}"), $("\\redE", "\\textcolor{##bc2612}{#1}"), $("\\maroonA", "\\textcolor{##ffbde0}{#1}"), $("\\maroonB", "\\textcolor{##ff92c6}{#1}"), $("\\maroonC", "\\textcolor{##ed5fa6}{#1}"), $("\\maroonD", "\\textcolor{##ca337c}{#1}"), $("\\maroonE", "\\textcolor{##9e034e}{#1}"), $("\\purpleA", "\\textcolor{##ddd7ff}{#1}"), $("\\purpleB", "\\textcolor{##c6b9fc}{#1}"), $("\\purpleC", "\\textcolor{##aa87ff}{#1}"), $("\\purpleD", "\\textcolor{##7854ab}{#1}"), $("\\purpleE", "\\textcolor{##543b78}{#1}"), $("\\mintA", "\\textcolor{##f5f9e8}{#1}"), $("\\mintB", "\\textcolor{##edf2df}{#1}"), $("\\mintC", "\\textcolor{##e0e5cc}{#1}"), $("\\grayA", "\\textcolor{##f6f7f7}{#1}"), $("\\grayB", "\\textcolor{##f0f1f2}{#1}"), $("\\grayC", "\\textcolor{##e3e5e6}{#1}"), $("\\grayD", "\\textcolor{##d6d8da}{#1}"), $("\\grayE", "\\textcolor{##babec2}{#1}"), $("\\grayF", "\\textcolor{##888d93}{#1}"), $("\\grayG", "\\textcolor{##626569}{#1}"), $("\\grayH", "\\textcolor{##3b3e40}{#1}"), $("\\grayI", "\\textcolor{##21242c}{#1}"), $("\\kaBlue", "\\textcolor{##314453}{#1}"), $("\\kaGreen", "\\textcolor{##71B307}{#1}");
20867
- var ma = {
20715
+ $("\\bra@ket", fa(!1)), $("\\bra@set", fa(!0)), $("\\Braket", "\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"), $("\\Set", "\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"), $("\\set", "\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"), $("\\angln", "{\\angl n}"), $("\\blue", "\\textcolor{##6495ed}{#1}"), $("\\orange", "\\textcolor{##ffa500}{#1}"), $("\\pink", "\\textcolor{##ff00af}{#1}"), $("\\red", "\\textcolor{##df0030}{#1}"), $("\\green", "\\textcolor{##28ae7b}{#1}"), $("\\gray", "\\textcolor{gray}{#1}"), $("\\purple", "\\textcolor{##9d38bd}{#1}"), $("\\blueA", "\\textcolor{##ccfaff}{#1}"), $("\\blueB", "\\textcolor{##80f6ff}{#1}"), $("\\blueC", "\\textcolor{##63d9ea}{#1}"), $("\\blueD", "\\textcolor{##11accd}{#1}"), $("\\blueE", "\\textcolor{##0c7f99}{#1}"), $("\\tealA", "\\textcolor{##94fff5}{#1}"), $("\\tealB", "\\textcolor{##26edd5}{#1}"), $("\\tealC", "\\textcolor{##01d1c1}{#1}"), $("\\tealD", "\\textcolor{##01a995}{#1}"), $("\\tealE", "\\textcolor{##208170}{#1}"), $("\\greenA", "\\textcolor{##b6ffb0}{#1}"), $("\\greenB", "\\textcolor{##8af281}{#1}"), $("\\greenC", "\\textcolor{##74cf70}{#1}"), $("\\greenD", "\\textcolor{##1fab54}{#1}"), $("\\greenE", "\\textcolor{##0d923f}{#1}"), $("\\goldA", "\\textcolor{##ffd0a9}{#1}"), $("\\goldB", "\\textcolor{##ffbb71}{#1}"), $("\\goldC", "\\textcolor{##ff9c39}{#1}"), $("\\goldD", "\\textcolor{##e07d10}{#1}"), $("\\goldE", "\\textcolor{##a75a05}{#1}"), $("\\redA", "\\textcolor{##fca9a9}{#1}"), $("\\redB", "\\textcolor{##ff8482}{#1}"), $("\\redC", "\\textcolor{##f9685d}{#1}"), $("\\redD", "\\textcolor{##e84d39}{#1}"), $("\\redE", "\\textcolor{##bc2612}{#1}"), $("\\maroonA", "\\textcolor{##ffbde0}{#1}"), $("\\maroonB", "\\textcolor{##ff92c6}{#1}"), $("\\maroonC", "\\textcolor{##ed5fa6}{#1}"), $("\\maroonD", "\\textcolor{##ca337c}{#1}"), $("\\maroonE", "\\textcolor{##9e034e}{#1}"), $("\\purpleA", "\\textcolor{##ddd7ff}{#1}"), $("\\purpleB", "\\textcolor{##c6b9fc}{#1}"), $("\\purpleC", "\\textcolor{##aa87ff}{#1}"), $("\\purpleD", "\\textcolor{##7854ab}{#1}"), $("\\purpleE", "\\textcolor{##543b78}{#1}"), $("\\mintA", "\\textcolor{##f5f9e8}{#1}"), $("\\mintB", "\\textcolor{##edf2df}{#1}"), $("\\mintC", "\\textcolor{##e0e5cc}{#1}"), $("\\grayA", "\\textcolor{##f6f7f7}{#1}"), $("\\grayB", "\\textcolor{##f0f1f2}{#1}"), $("\\grayC", "\\textcolor{##e3e5e6}{#1}"), $("\\grayD", "\\textcolor{##d6d8da}{#1}"), $("\\grayE", "\\textcolor{##babec2}{#1}"), $("\\grayF", "\\textcolor{##888d93}{#1}"), $("\\grayG", "\\textcolor{##626569}{#1}"), $("\\grayH", "\\textcolor{##3b3e40}{#1}"), $("\\grayI", "\\textcolor{##21242c}{#1}"), $("\\kaBlue", "\\textcolor{##314453}{#1}"), $("\\kaGreen", "\\textcolor{##71B307}{#1}");
20716
+ var pa = {
20868
20717
  "^": !0,
20869
20718
  _: !0,
20870
20719
  "\\limits": !0,
20871
20720
  "\\nolimits": !0
20872
- }, ha = class {
20721
+ }, ma = class {
20873
20722
  constructor(e, t, n) {
20874
- this.settings = void 0, this.expansionCount = void 0, this.lexer = void 0, this.macros = void 0, this.stack = void 0, this.mode = void 0, this.settings = t, this.expansionCount = 0, this.feed(e), this.macros = new aa(oa, t.macros), this.mode = n, this.stack = [];
20723
+ this.settings = void 0, this.expansionCount = void 0, this.lexer = void 0, this.macros = void 0, this.stack = void 0, this.mode = void 0, this.settings = t, this.expansionCount = 0, this.feed(e), this.macros = new ia(aa, t.macros), this.mode = n, this.stack = [];
20875
20724
  }
20876
20725
  feed(e) {
20877
- this.lexer = new ia(e, this.settings);
20726
+ this.lexer = new ra(e, this.settings);
20878
20727
  }
20879
20728
  switchMode(e) {
20880
20729
  this.mode = e;
@@ -20904,9 +20753,14 @@ var ma = {
20904
20753
  var t, n, r;
20905
20754
  if (e) {
20906
20755
  if (this.consumeSpaces(), this.future().text !== "[") return null;
20907
- t = this.popToken(), {tokens: r, end: n} = this.consumeArg(["]"]);
20908
- } else ({tokens: r, start: t, end: n} = this.consumeArg());
20909
- return this.pushToken(new ai("EOF", n.loc)), this.pushTokens(r), new ai("", ii.range(t, n));
20756
+ t = this.popToken();
20757
+ var i = this.consumeArg(["]"]);
20758
+ r = i.tokens, n = i.end;
20759
+ } else {
20760
+ var a = this.consumeArg();
20761
+ r = a.tokens, t = a.start, n = a.end;
20762
+ }
20763
+ return this.pushToken(new ii("EOF", n.loc)), this.pushTokens(r), new ii("", ri.range(t, n));
20910
20764
  }
20911
20765
  consumeSpaces() {
20912
20766
  for (; this.future().text === " ";) this.stack.pop();
@@ -20981,7 +20835,7 @@ var ma = {
20981
20835
  }
20982
20836
  }
20983
20837
  expandMacro(e) {
20984
- return this.macros.has(e) ? this.expandTokens([new ai(e)]) : void 0;
20838
+ return this.macros.has(e) ? this.expandTokens([new ii(e)]) : void 0;
20985
20839
  }
20986
20840
  expandTokens(e) {
20987
20841
  var t = [], n = this.stack.length;
@@ -21006,7 +20860,7 @@ var ma = {
21006
20860
  if (typeof r == "string") {
21007
20861
  var i = 0;
21008
20862
  if (r.includes("#")) for (var a = r.replace(/##/g, ""); a.includes("#" + (i + 1));) ++i;
21009
- for (var o = new ia(r, this.settings), s = [], c = o.lex(); c.text !== "EOF";) s.push(c), c = o.lex();
20863
+ for (var o = new ra(r, this.settings), s = [], c = o.lex(); c.text !== "EOF";) s.push(c), c = o.lex();
21010
20864
  return s.reverse(), {
21011
20865
  tokens: s,
21012
20866
  numArgs: i
@@ -21015,13 +20869,13 @@ var ma = {
21015
20869
  return r;
21016
20870
  }
21017
20871
  isDefined(e) {
21018
- return this.macros.has(e) || Yi.hasOwnProperty(e) || j.math.hasOwnProperty(e) || j.text.hasOwnProperty(e) || ma.hasOwnProperty(e);
20872
+ return this.macros.has(e) || Object.prototype.hasOwnProperty.call(Ji, e) || Object.prototype.hasOwnProperty.call(j.math, e) || Object.prototype.hasOwnProperty.call(j.text, e) || Object.prototype.hasOwnProperty.call(pa, e);
21019
20873
  }
21020
20874
  isExpandable(e) {
21021
20875
  var t = this.macros.get(e);
21022
- return t == null ? Yi.hasOwnProperty(e) && !Yi[e].primitive : typeof t == "string" || typeof t == "function" || !t.unexpandable;
20876
+ return t == null ? Object.prototype.hasOwnProperty.call(Ji, e) && !Ji[e].primitive : typeof t == "string" || typeof t == "function" || !t.unexpandable;
21023
20877
  }
21024
- }, ga = /^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/, _a = Object.freeze({
20878
+ }, ha = /^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/, ga = Object.freeze({
21025
20879
  "₊": "+",
21026
20880
  "₋": "-",
21027
20881
  "₌": "=",
@@ -21124,7 +20978,7 @@ var ma = {
21124
20978
  ᵠ: "ϕ",
21125
20979
  ᵡ: "χ",
21126
20980
  ᶿ: "θ"
21127
- }), va = {
20981
+ }), _a = {
21128
20982
  "́": {
21129
20983
  text: "\\'",
21130
20984
  math: "\\acute"
@@ -21167,7 +21021,7 @@ var ma = {
21167
21021
  },
21168
21022
  "̋": { text: "\\H" },
21169
21023
  "̧": { text: "\\c" }
21170
- }, ya = {
21024
+ }, va = {
21171
21025
  á: "á",
21172
21026
  à: "à",
21173
21027
  ä: "ä",
@@ -21512,9 +21366,9 @@ var ma = {
21512
21366
  Ῠ: "Ῠ",
21513
21367
  Ώ: "Ώ",
21514
21368
  Ὼ: "Ὼ"
21515
- }, ba = class e {
21369
+ }, ya = class e {
21516
21370
  constructor(e, t) {
21517
- this.mode = void 0, this.gullet = void 0, this.settings = void 0, this.leftrightDepth = void 0, this.nextToken = void 0, this.mode = "math", this.gullet = new ha(e, t, this.mode), this.settings = t, this.leftrightDepth = 0, this.nextToken = null;
21371
+ this.mode = void 0, this.gullet = void 0, this.settings = void 0, this.leftrightDepth = void 0, this.nextToken = void 0, this.mode = "math", this.gullet = new ma(e, t, this.mode), this.settings = t, this.leftrightDepth = 0, this.nextToken = null;
21518
21372
  }
21519
21373
  expect(e, t) {
21520
21374
  if (t === void 0 && (t = !0), this.fetch().text !== e) throw new n("Expected '" + e + "', got '" + this.fetch().text + "'", this.fetch());
@@ -21540,7 +21394,7 @@ var ma = {
21540
21394
  }
21541
21395
  subparse(e) {
21542
21396
  var t = this.nextToken;
21543
- this.consume(), this.gullet.pushToken(new ai("}")), this.gullet.pushTokens(e);
21397
+ this.consume(), this.gullet.pushToken(new ii("}")), this.gullet.pushTokens(e);
21544
21398
  var n = this.parseExpression(!1);
21545
21399
  return this.expect("}"), this.nextToken = t, n;
21546
21400
  }
@@ -21548,7 +21402,7 @@ var ma = {
21548
21402
  for (var r = [];;) {
21549
21403
  this.mode === "math" && this.consumeSpaces();
21550
21404
  var i = this.fetch();
21551
- if (e.endOfExpression.has(i.text) || n && i.text === n || t && Yi[i.text] && Yi[i.text].infix) break;
21405
+ if (e.endOfExpression.has(i.text) || n && i.text === n || t && Ji[i.text] && Ji[i.text].infix) break;
21552
21406
  var a = this.parseAtom(n);
21553
21407
  if (!a) break;
21554
21408
  a.type !== "internal" && r.push(a);
@@ -21639,12 +21493,12 @@ var ma = {
21639
21493
  mode: this.mode,
21640
21494
  body: s
21641
21495
  };
21642
- } else if (_a[a.text]) {
21643
- var c = ga.test(a.text), l = [];
21644
- for (l.push(new ai(_a[a.text])), this.consume();;) {
21496
+ } else if (ga[a.text]) {
21497
+ var c = ha.test(a.text), l = [];
21498
+ for (l.push(new ii(ga[a.text])), this.consume();;) {
21645
21499
  var u = this.fetch().text;
21646
- if (!_a[u] || ga.test(u) !== c) break;
21647
- l.unshift(new ai(_a[u])), this.consume();
21500
+ if (!ga[u] || ha.test(u) !== c) break;
21501
+ l.unshift(new ii(ga[u])), this.consume();
21648
21502
  }
21649
21503
  var d = this.subparse(l);
21650
21504
  c ? i = {
@@ -21658,22 +21512,32 @@ var ma = {
21658
21512
  };
21659
21513
  } else break;
21660
21514
  }
21661
- return r || i ? {
21515
+ return r && i ? {
21662
21516
  type: "supsub",
21663
21517
  mode: this.mode,
21664
21518
  base: t,
21665
21519
  sup: r,
21666
21520
  sub: i
21521
+ } : r ? {
21522
+ type: "supsub",
21523
+ mode: this.mode,
21524
+ base: t,
21525
+ sup: r
21526
+ } : i ? {
21527
+ type: "supsub",
21528
+ mode: this.mode,
21529
+ base: t,
21530
+ sub: i
21667
21531
  } : t;
21668
21532
  }
21669
21533
  parseFunction(e, t) {
21670
- var r = this.fetch(), i = r.text, a = Yi[i];
21534
+ var r = this.fetch(), i = r.text, a = Ji[i];
21671
21535
  if (!a) return null;
21672
21536
  if (this.consume(), t && t !== "atom" && !a.allowedInArgument) throw new n("Got function '" + i + "' with no arguments" + (t ? " as " + t : ""), r);
21673
21537
  if (this.mode === "text" && !a.allowedInText) throw new n("Can't use function '" + i + "' in text mode", r);
21674
21538
  if (this.mode === "math" && a.allowedInMath === !1) throw new n("Can't use function '" + i + "' in math mode", r);
21675
- var { args: o, optArgs: s } = this.parseArguments(i, a);
21676
- return this.callFunction(i, o, s, r, e);
21539
+ var o = this.parseArguments(i, a), s = o.args, c = o.optArgs;
21540
+ return this.callFunction(i, s, c, r, e);
21677
21541
  }
21678
21542
  callFunction(e, t, r, i, a) {
21679
21543
  var o = {
@@ -21681,27 +21545,27 @@ var ma = {
21681
21545
  parser: this,
21682
21546
  token: i,
21683
21547
  breakOnTokenText: a
21684
- }, s = Yi[e];
21548
+ }, s = Ji[e];
21685
21549
  if (s && s.handler) return s.handler(o, t, r);
21686
21550
  throw new n("No function handler for " + e);
21687
21551
  }
21688
21552
  parseArguments(e, t) {
21689
- var r = t.numArgs + t.numOptionalArgs;
21690
- if (r === 0) return {
21553
+ var r = t.numOptionalArgs ?? 0, i = t.numArgs + r;
21554
+ if (i === 0) return {
21691
21555
  args: [],
21692
21556
  optArgs: []
21693
21557
  };
21694
- for (var i = [], a = [], o = 0; o < r; o++) {
21695
- var s = t.argTypes && t.argTypes[o], c = o < t.numOptionalArgs;
21696
- ("primitive" in t && t.primitive && s == null || t.type === "sqrt" && o === 1 && a[0] == null) && (s = "primitive");
21697
- var l = this.parseGroupOfType("argument to '" + e + "'", s, c);
21698
- if (c) a.push(l);
21699
- else if (l != null) i.push(l);
21558
+ for (var a = [], o = [], s = 0; s < i; s++) {
21559
+ var c = t.argTypes?.[s], l = s < r;
21560
+ ("primitive" in t && t.primitive && c == null || t.type === "sqrt" && s === 1 && o[0] == null) && (c = "primitive");
21561
+ var u = this.parseGroupOfType("argument to '" + e + "'", c, l);
21562
+ if (l) o.push(u);
21563
+ else if (u != null) a.push(u);
21700
21564
  else throw new n("Null argument, please report this as a bug");
21701
21565
  }
21702
21566
  return {
21703
- args: i,
21704
- optArgs: a
21567
+ args: a,
21568
+ optArgs: o
21705
21569
  };
21706
21570
  }
21707
21571
  parseGroupOfType(e, t, r) {
@@ -21721,7 +21585,7 @@ var ma = {
21721
21585
  resetFont: !0
21722
21586
  };
21723
21587
  case "raw":
21724
- var a = this.parseStringGroup("raw", r);
21588
+ var a = this.parseStringGroup(r);
21725
21589
  return a == null ? null : {
21726
21590
  type: "raw",
21727
21591
  mode: "text",
@@ -21733,7 +21597,6 @@ var ma = {
21733
21597
  if (o == null) throw new n("Expected group as " + e, this.fetch());
21734
21598
  return o;
21735
21599
  case "original":
21736
- case null:
21737
21600
  case void 0: return this.parseArgumentGroup(r);
21738
21601
  default: throw new n("Unknown group type as " + e, this.fetch());
21739
21602
  }
@@ -21741,11 +21604,11 @@ var ma = {
21741
21604
  consumeSpaces() {
21742
21605
  for (; this.fetch().text === " ";) this.consume();
21743
21606
  }
21744
- parseStringGroup(e, t) {
21745
- var n = this.gullet.scanArgument(t);
21746
- if (n == null) return null;
21747
- for (var r = "", i; (i = this.fetch()).text !== "EOF";) r += i.text, this.consume();
21748
- return this.consume(), n.text = r, n;
21607
+ parseStringGroup(e) {
21608
+ var t = this.gullet.scanArgument(e);
21609
+ if (t == null) return null;
21610
+ for (var n = "", r; (r = this.fetch()).text !== "EOF";) n += r.text, this.consume();
21611
+ return this.consume(), t.text = n, t;
21749
21612
  }
21750
21613
  parseRegexGroup(e, t) {
21751
21614
  for (var r = this.fetch(), i = r, a = "", o; (o = this.fetch()).text !== "EOF" && e.test(a + o.text);) i = o, a += i.text, this.consume();
@@ -21753,7 +21616,7 @@ var ma = {
21753
21616
  return r.range(i, a);
21754
21617
  }
21755
21618
  parseColorGroup(e) {
21756
- var t = this.parseStringGroup("color", e);
21619
+ var t = this.parseStringGroup(e);
21757
21620
  if (t == null) return null;
21758
21621
  var r = /^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);
21759
21622
  if (!r) throw new n("Invalid color: '" + t.text + "'", t);
@@ -21766,7 +21629,7 @@ var ma = {
21766
21629
  }
21767
21630
  parseSizeGroup(e) {
21768
21631
  var t, r = !1;
21769
- if (this.gullet.consumeSpaces(), t = !e && this.gullet.future().text !== "{" ? this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/, "size") : this.parseStringGroup("size", e), !t) return null;
21632
+ if (this.gullet.consumeSpaces(), t = !e && this.gullet.future().text !== "{" ? this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/, "size") : this.parseStringGroup(e), !t) return null;
21770
21633
  !e && t.text.length === 0 && (t.text = "0pt", r = !0);
21771
21634
  var i = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);
21772
21635
  if (!i) throw new n("Invalid size: '" + t.text + "'", t);
@@ -21784,7 +21647,7 @@ var ma = {
21784
21647
  }
21785
21648
  parseUrlGroup(e) {
21786
21649
  this.gullet.lexer.setCatcode("%", 13), this.gullet.lexer.setCatcode("~", 12);
21787
- var t = this.parseStringGroup("url", e);
21650
+ var t = this.parseStringGroup(e);
21788
21651
  if (this.gullet.lexer.setCatcode("%", 14), this.gullet.lexer.setCatcode("~", 13), t == null) return null;
21789
21652
  var n = t.text.replace(/\\([#$%&~_^{}])/g, "$1");
21790
21653
  return {
@@ -21818,11 +21681,11 @@ var ma = {
21818
21681
  this.expect(o), this.gullet.endGroup(), a = {
21819
21682
  type: "ordgroup",
21820
21683
  mode: this.mode,
21821
- loc: ii.range(r, c),
21684
+ loc: ri.range(r, c),
21822
21685
  body: s,
21823
21686
  semisimple: i === "\\begingroup" || void 0
21824
21687
  };
21825
- } else if (a = this.parseFunction(t, e) || this.parseSymbol(), a == null && i[0] === "\\" && !ma.hasOwnProperty(i)) {
21688
+ } else if (a = this.parseFunction(t, e) || this.parseSymbol(), a == null && i[0] === "\\" && !Object.prototype.hasOwnProperty.call(pa, i)) {
21826
21689
  if (this.settings.throwOnError) throw new n("Undefined control sequence: " + i, r);
21827
21690
  a = this.formatUnsupportedCmd(i), this.consume();
21828
21691
  }
@@ -21839,19 +21702,19 @@ var ma = {
21839
21702
  n + 1 < t && o && o.type === "textord" && o.text === "-" ? (e.splice(n, 3, {
21840
21703
  type: "textord",
21841
21704
  mode: "text",
21842
- loc: ii.range(r, o),
21705
+ loc: ri.range(r, o),
21843
21706
  text: "---"
21844
21707
  }), t -= 2) : (e.splice(n, 2, {
21845
21708
  type: "textord",
21846
21709
  mode: "text",
21847
- loc: ii.range(r, a),
21710
+ loc: ri.range(r, a),
21848
21711
  text: "--"
21849
21712
  }), --t);
21850
21713
  }
21851
21714
  (i === "'" || i === "`") && a.text === i && (e.splice(n, 2, {
21852
21715
  type: "textord",
21853
21716
  mode: "text",
21854
- loc: ii.range(r, a),
21717
+ loc: ri.range(r, a),
21855
21718
  text: i + i
21856
21719
  }), --t);
21857
21720
  }
@@ -21871,14 +21734,14 @@ var ma = {
21871
21734
  star: i
21872
21735
  };
21873
21736
  }
21874
- ya.hasOwnProperty(t[0]) && !j[this.mode][t[0]] && (this.settings.strict && this.mode === "math" && this.settings.reportNonstrict("unicodeTextInMathMode", "Accented Unicode text character \"" + t[0] + "\" used in math mode", e), t = ya[t[0]] + t.slice(1));
21875
- var a = na.exec(t);
21737
+ Object.prototype.hasOwnProperty.call(va, t[0]) && !j[this.mode][t[0]] && (this.settings.strict && this.mode === "math" && this.settings.reportNonstrict("unicodeTextInMathMode", "Accented Unicode text character \"" + t[0] + "\" used in math mode", e), t = va[t[0]] + t.slice(1));
21738
+ var a = ta.exec(t);
21876
21739
  a && (t = t.substring(0, a.index), t === "i" ? t = "ı" : t === "j" && (t = "ȷ"));
21877
21740
  var o;
21878
21741
  if (j[this.mode][t]) {
21879
21742
  this.settings.strict && this.mode === "math" && ht.includes(t) && this.settings.reportNonstrict("unicodeTextInMathMode", "Latin-1/Unicode text character \"" + t[0] + "\" used in math mode", e);
21880
- var s = j[this.mode][t].group, c = ii.range(e);
21881
- o = Xn(s) ? {
21743
+ var s = j[this.mode][t].group, c = ri.range(e);
21744
+ o = Qn(s) ? {
21882
21745
  type: "atom",
21883
21746
  mode: this.mode,
21884
21747
  family: s,
@@ -21893,19 +21756,19 @@ var ma = {
21893
21756
  } else if (t.charCodeAt(0) >= 128) this.settings.strict && (le(t.charCodeAt(0)) ? this.mode === "math" && this.settings.reportNonstrict("unicodeTextInMathMode", "Unicode text character \"" + t[0] + "\" used in math mode", e) : this.settings.reportNonstrict("unknownSymbol", "Unrecognized Unicode character \"" + t[0] + "\"" + (" (" + t.charCodeAt(0) + ")"), e)), o = {
21894
21757
  type: "textord",
21895
21758
  mode: "text",
21896
- loc: ii.range(e),
21759
+ loc: ri.range(e),
21897
21760
  text: t
21898
21761
  };
21899
21762
  else return null;
21900
21763
  if (this.consume(), a) for (var l = 0; l < a[0].length; l++) {
21901
21764
  var u = a[0][l];
21902
- if (!va[u]) throw new n("Unknown accent ' " + u + "'", e);
21903
- var d = va[u][this.mode] || va[u].text;
21765
+ if (!_a[u]) throw new n("Unknown accent ' " + u + "'", e);
21766
+ var d = _a[u][this.mode] || _a[u].text;
21904
21767
  if (!d) throw new n("Accent " + u + " unsupported in " + this.mode + " mode", e);
21905
21768
  o = {
21906
21769
  type: "accent",
21907
21770
  mode: this.mode,
21908
- loc: ii.range(e),
21771
+ loc: ri.range(e),
21909
21772
  label: d,
21910
21773
  isStretchy: !1,
21911
21774
  isShifty: !0,
@@ -21915,16 +21778,16 @@ var ma = {
21915
21778
  return o;
21916
21779
  }
21917
21780
  };
21918
- ba.endOfExpression = /* @__PURE__ */ new Set([
21781
+ ya.endOfExpression = /* @__PURE__ */ new Set([
21919
21782
  "}",
21920
21783
  "\\endgroup",
21921
21784
  "\\end",
21922
21785
  "\\right",
21923
21786
  "&"
21924
21787
  ]);
21925
- var xa = function(e, t) {
21788
+ var ba = function(e, t) {
21926
21789
  if (!(typeof e == "string" || e instanceof String)) throw TypeError("KaTeX can only parse string typed expression");
21927
- var r = new ba(e, t);
21790
+ var r = new ya(e, t);
21928
21791
  delete r.gullet.macros.current["\\df@tag"];
21929
21792
  var i = r.parse();
21930
21793
  if (delete r.gullet.macros.current["\\current@color"], delete r.gullet.macros.current["\\color"], r.gullet.macros.get("\\df@tag")) {
@@ -21933,61 +21796,61 @@ var xa = function(e, t) {
21933
21796
  type: "tag",
21934
21797
  mode: "text",
21935
21798
  body: i,
21936
- tag: r.subparse([new ai("\\df@tag")])
21799
+ tag: r.subparse([new ii("\\df@tag")])
21937
21800
  }];
21938
21801
  }
21939
21802
  return i;
21940
- }, Sa = function(e, t, n) {
21803
+ }, xa = function(e, t, n) {
21941
21804
  t.textContent = "";
21942
- var r = Ea(e, n).toNode();
21805
+ var r = Ta(e, n).toNode();
21943
21806
  t.appendChild(r);
21944
21807
  };
21945
- typeof document < "u" && document.compatMode !== "CSS1Compat" && (typeof console < "u" && console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."), Sa = function() {
21808
+ typeof document < "u" && document.compatMode !== "CSS1Compat" && (typeof console < "u" && console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."), xa = function() {
21946
21809
  throw new n("KaTeX doesn't work in quirks mode.");
21947
21810
  });
21948
- var Ca = function(e, t) {
21949
- return Ea(e, t).toMarkup();
21950
- }, wa = function(e, t) {
21951
- return xa(e, new g(t));
21952
- }, Ta = function(e, t, r) {
21811
+ var Sa = function(e, t) {
21812
+ return Ta(e, t).toMarkup();
21813
+ }, Ca = function(e, t) {
21814
+ return ba(e, new g(t));
21815
+ }, wa = function(e, t, r) {
21953
21816
  if (r.throwOnError || !(e instanceof n)) throw e;
21954
21817
  var i = G(["katex-error"], [new Le(t)]);
21955
21818
  return i.setAttribute("title", e.toString()), i.setAttribute("style", "color:" + r.errorColor), i;
21956
- }, Ea = function(e, t) {
21819
+ }, Ta = function(e, t) {
21957
21820
  var n = new g(t);
21958
21821
  try {
21959
- return Bn(xa(e, n), e, n);
21822
+ return Bn(ba(e, n), e, n);
21960
21823
  } catch (t) {
21961
- return Ta(t, e, n);
21824
+ return wa(t, e, n);
21962
21825
  }
21963
- }, Da = function(e, t) {
21826
+ }, Ea = function(e, t) {
21964
21827
  var n = new g(t);
21965
21828
  try {
21966
- return Vn(xa(e, n), e, n);
21829
+ return Vn(ba(e, n), e, n);
21967
21830
  } catch (t) {
21968
- return Ta(t, e, n);
21831
+ return wa(t, e, n);
21969
21832
  }
21970
- }, Oa = "0.16.47", ka = {
21833
+ }, Da = "0.18.5", Oa = {
21971
21834
  Span: Ne,
21972
21835
  Anchor: Pe,
21973
21836
  SymbolNode: Le,
21974
21837
  SvgNode: Re,
21975
21838
  PathNode: ze,
21976
21839
  LineNode: Be
21977
- }, Aa = {
21978
- version: Oa,
21979
- render: Sa,
21980
- renderToString: Ca,
21840
+ }, ka = {
21841
+ version: Da,
21842
+ render: xa,
21843
+ renderToString: Sa,
21981
21844
  ParseError: n,
21982
21845
  SETTINGS_SCHEMA: f,
21983
- __parse: wa,
21984
- __renderToDomTree: Ea,
21985
- __renderToHTMLTree: Da,
21846
+ __parse: Ca,
21847
+ __renderToDomTree: Ta,
21848
+ __renderToHTMLTree: Ea,
21986
21849
  __setFontMetrics: qe,
21987
21850
  __defineSymbol: M,
21988
21851
  __defineFunction: J,
21989
21852
  __defineMacro: $,
21990
- __domTree: ka
21853
+ __domTree: Oa
21991
21854
  };
21992
21855
  //#endregion
21993
- export { t as n, Aa as t };
21856
+ export { t as n, ka as t };