scope-agent-workbench 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/LICENSE +21 -0
  3. package/README.md +174 -2
  4. package/README.zh-CN.md +175 -0
  5. package/bin/scope.mjs +111 -0
  6. package/bridge/account-quotas.mjs +881 -0
  7. package/bridge/agent-email-relay.mjs +160 -0
  8. package/bridge/app-server-client.mjs +2522 -0
  9. package/bridge/app-server-websocket-transport.mjs +219 -0
  10. package/bridge/archive/routes.mjs +19 -0
  11. package/bridge/archive/service.mjs +130 -0
  12. package/bridge/archive/thread-lifecycle.mjs +52 -0
  13. package/bridge/attachment-store.mjs +184 -0
  14. package/bridge/auth-profile-failover.mjs +58 -0
  15. package/bridge/auth-profile-manager.mjs +215 -0
  16. package/bridge/capacity-recovery.mjs +90 -0
  17. package/bridge/codex-upgrade.mjs +150 -0
  18. package/bridge/deployment-profile.mjs +64 -0
  19. package/bridge/email-notifier.mjs +616 -0
  20. package/bridge/gpu-usage-history.mjs +322 -0
  21. package/bridge/host-session-restart.mjs +35 -0
  22. package/bridge/http.mjs +69 -0
  23. package/bridge/idle-sessions.mjs +185 -0
  24. package/bridge/inventory-scanner.mjs +517 -0
  25. package/bridge/local/dialogue.mjs +150 -0
  26. package/bridge/local/directories.mjs +40 -0
  27. package/bridge/local/executable.mjs +29 -0
  28. package/bridge/local/history.mjs +21 -0
  29. package/bridge/local/python-probe.mjs +35 -0
  30. package/bridge/local/runtime.mjs +188 -0
  31. package/bridge/local/transport.mjs +70 -0
  32. package/bridge/maintenance/install-command.mjs +141 -0
  33. package/bridge/maintenance/routes.mjs +21 -0
  34. package/bridge/maintenance/service.mjs +175 -0
  35. package/bridge/model-catalog.mjs +21 -0
  36. package/bridge/persistent-home-guard.mjs +6 -0
  37. package/bridge/plugins/aliyun-dlc/index.mjs +47 -0
  38. package/bridge/plugins/aliyun-dlc/manifest.mjs +12 -0
  39. package/bridge/plugins/aliyun-dlc/monitor.mjs +236 -0
  40. package/bridge/plugins/aliyun-dlc/probe.mjs +701 -0
  41. package/bridge/plugins/config-store.mjs +35 -0
  42. package/bridge/plugins/external.mjs +87 -0
  43. package/bridge/plugins/package.mjs +96 -0
  44. package/bridge/plugins/registry.mjs +37 -0
  45. package/bridge/plugins/routes.mjs +27 -0
  46. package/bridge/private-gateway.mjs +371 -0
  47. package/bridge/private-start.mjs +22 -0
  48. package/bridge/probes/app-server-handoff-probe.mjs +89 -0
  49. package/bridge/probes/app-server-writer-probe.mjs +72 -0
  50. package/bridge/probes/assistant-search-probe.mjs +323 -0
  51. package/bridge/probes/dialogue-probe.mjs +464 -0
  52. package/bridge/probes/history-probe.mjs +347 -0
  53. package/bridge/probes/index.mjs +15 -0
  54. package/bridge/probes/new-session-preflight.mjs +16 -0
  55. package/bridge/probes/profile-cancel-probe.mjs +19 -0
  56. package/bridge/probes/profile-delete-probe.mjs +28 -0
  57. package/bridge/probes/profile-list-probe.mjs +117 -0
  58. package/bridge/probes/profile-write-probe.mjs +111 -0
  59. package/bridge/probes/raw-context-probe.mjs +53 -0
  60. package/bridge/probes/remote-probe.mjs +636 -0
  61. package/bridge/probes/submission-probe.mjs +2 -0
  62. package/bridge/probes/takeover-probe.mjs +328 -0
  63. package/bridge/probes/vscode-open-preflight.mjs +23 -0
  64. package/bridge/profile-capacity-policy.mjs +14 -0
  65. package/bridge/providers/acp-forms.py +49 -0
  66. package/bridge/providers/antigravity-interactive.mjs +14 -0
  67. package/bridge/providers/antigravity-interactive.py +349 -0
  68. package/bridge/providers/claude-capabilities.py +52 -0
  69. package/bridge/providers/claude-interactive.mjs +14 -0
  70. package/bridge/providers/claude-interactive.py +341 -0
  71. package/bridge/providers/cli-command.mjs +103 -0
  72. package/bridge/providers/codex-workbench.mjs +164 -0
  73. package/bridge/providers/conversation-routes.mjs +28 -0
  74. package/bridge/providers/conversations.mjs +231 -0
  75. package/bridge/providers/native-commands.mjs +48 -0
  76. package/bridge/providers/native-commands.py +38 -0
  77. package/bridge/providers/native-models.mjs +129 -0
  78. package/bridge/providers/native-session-state.mjs +14 -0
  79. package/bridge/providers/native-session-state.py +96 -0
  80. package/bridge/providers/remote-cli.mjs +75 -0
  81. package/bridge/providers/remote-job.py +130 -0
  82. package/bridge/remote-app-server-command.mjs +203 -0
  83. package/bridge/remote-bootstrap/routes.mjs +51 -0
  84. package/bridge/remote-bootstrap/scope-protocol.mjs +125 -0
  85. package/bridge/remote-bootstrap/service.mjs +597 -0
  86. package/bridge/remote-bootstrap/tunnels.mjs +347 -0
  87. package/bridge/remote-directory-listing.mjs +148 -0
  88. package/bridge/remote-images.mjs +140 -0
  89. package/bridge/remote-profile-home.mjs +39 -0
  90. package/bridge/remote-rollout-locks.mjs +31 -0
  91. package/bridge/remote-videos.mjs +129 -0
  92. package/bridge/research/insights.mjs +522 -0
  93. package/bridge/research/scan-host.mjs +18 -0
  94. package/bridge/rollout-summary.mjs +159 -0
  95. package/bridge/routes/accounts.mjs +326 -0
  96. package/bridge/routes/dialogue.mjs +120 -0
  97. package/bridge/routes/email.mjs +50 -0
  98. package/bridge/routes/management.mjs +291 -0
  99. package/bridge/routes/models.mjs +312 -0
  100. package/bridge/routes/runtime.mjs +82 -0
  101. package/bridge/routes/session-commands.mjs +12 -0
  102. package/bridge/routes/session-delivery.mjs +328 -0
  103. package/bridge/routes/session-lifecycle.mjs +839 -0
  104. package/bridge/routes/system.mjs +289 -0
  105. package/bridge/server.mjs +3332 -0
  106. package/bridge/session-attachments.mjs +150 -0
  107. package/bridge/session-cache-archive.mjs +22 -0
  108. package/bridge/session-catalog/agy-history.py +249 -0
  109. package/bridge/session-catalog/catalog.mjs +93 -0
  110. package/bridge/session-catalog/probe.py +331 -0
  111. package/bridge/session-catalog/routes.mjs +28 -0
  112. package/bridge/session-profiles.mjs +115 -0
  113. package/bridge/shared-start.mjs +22 -0
  114. package/bridge/start.mjs +205 -0
  115. package/bridge/state-persistence.mjs +397 -0
  116. package/bridge/submissions/settings.mjs +50 -0
  117. package/bridge/terminal-gateway.mjs +171 -0
  118. package/bridge/tmux-delivery.mjs +390 -0
  119. package/bridge/tmux-session-control.mjs +29 -0
  120. package/bridge/transport/ssh-command.mjs +119 -0
  121. package/bridge/ui-server.mjs +257 -0
  122. package/bridge/vscode-opener.mjs +157 -0
  123. package/bridge/web-terminal.mjs +52 -0
  124. package/bridge/workbench/conversation-routes.mjs +31 -0
  125. package/bridge/workbench/directory-probe.mjs +41 -0
  126. package/bridge/workbench/directory-routes.mjs +112 -0
  127. package/bridge/workbench/manager-context.mjs +51 -0
  128. package/bridge/workbench/routes.mjs +40 -0
  129. package/bridge/workbench/scheduler.mjs +131 -0
  130. package/bridge/workbench/service.mjs +301 -0
  131. package/bridge/workbench/store.mjs +64 -0
  132. package/bridge/workbench/task-archive.mjs +46 -0
  133. package/dist/client/.assetsignore +2 -0
  134. package/dist/client/.vite/manifest.json +366 -0
  135. package/dist/client/_headers +3 -0
  136. package/dist/client/agents/LICENSE.lobe-icons +21 -0
  137. package/dist/client/agents/README.md +14 -0
  138. package/dist/client/agents/antigravity.svg +39 -0
  139. package/dist/client/agents/claude.svg +1 -0
  140. package/dist/client/agents/codex.svg +1 -0
  141. package/dist/client/agents/dsh.svg +4 -0
  142. package/dist/client/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  143. package/dist/client/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  144. package/dist/client/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  145. package/dist/client/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  146. package/dist/client/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  147. package/dist/client/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  148. package/dist/client/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  149. package/dist/client/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  150. package/dist/client/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  151. package/dist/client/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  152. package/dist/client/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  153. package/dist/client/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  154. package/dist/client/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  155. package/dist/client/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  156. package/dist/client/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  157. package/dist/client/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  158. package/dist/client/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  159. package/dist/client/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  160. package/dist/client/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  161. package/dist/client/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  162. package/dist/client/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  163. package/dist/client/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  164. package/dist/client/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  165. package/dist/client/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  166. package/dist/client/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  167. package/dist/client/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  168. package/dist/client/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  169. package/dist/client/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  170. package/dist/client/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  171. package/dist/client/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  172. package/dist/client/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  173. package/dist/client/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  174. package/dist/client/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  175. package/dist/client/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  176. package/dist/client/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  177. package/dist/client/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  178. package/dist/client/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  179. package/dist/client/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  180. package/dist/client/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  181. package/dist/client/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  182. package/dist/client/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  183. package/dist/client/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  184. package/dist/client/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  185. package/dist/client/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  186. package/dist/client/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  187. package/dist/client/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  188. package/dist/client/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  189. package/dist/client/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  190. package/dist/client/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  191. package/dist/client/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  192. package/dist/client/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  193. package/dist/client/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  194. package/dist/client/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  195. package/dist/client/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  196. package/dist/client/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  197. package/dist/client/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  198. package/dist/client/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  199. package/dist/client/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  200. package/dist/client/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  201. package/dist/client/assets/_vinext_fonts/geist-8ac0455e797f/geist-001175b1.woff2 +0 -0
  202. package/dist/client/assets/_vinext_fonts/geist-8ac0455e797f/geist-52306abf.woff2 +0 -0
  203. package/dist/client/assets/_vinext_fonts/geist-8ac0455e797f/geist-875ccdd4.woff2 +0 -0
  204. package/dist/client/assets/_vinext_fonts/geist-8ac0455e797f/geist-98bbbccb.woff2 +0 -0
  205. package/dist/client/assets/_vinext_fonts/geist-8ac0455e797f/geist-ff2310f5.woff2 +0 -0
  206. package/dist/client/assets/_vinext_fonts/geist-mono-00e989178794/geist-mono-013b2f2f.woff2 +0 -0
  207. package/dist/client/assets/_vinext_fonts/geist-mono-00e989178794/geist-mono-0638449e.woff2 +0 -0
  208. package/dist/client/assets/_vinext_fonts/geist-mono-00e989178794/geist-mono-44745446.woff2 +0 -0
  209. package/dist/client/assets/_vinext_fonts/geist-mono-00e989178794/geist-mono-44e03052.woff2 +0 -0
  210. package/dist/client/assets/_vinext_fonts/geist-mono-00e989178794/geist-mono-971fb274.woff2 +0 -0
  211. package/dist/client/assets/_vinext_fonts/geist-mono-00e989178794/geist-mono-f6b33328.woff2 +0 -0
  212. package/dist/client/assets/addon-fit-BZbxZs2G.js +1 -0
  213. package/dist/client/assets/framework-CXnKph_e.js +9 -0
  214. package/dist/client/assets/index-CNnP2Ses.css +2 -0
  215. package/dist/client/assets/index-Enu1x0PS.js +3 -0
  216. package/dist/client/assets/layout-segment-context-CmJzExWq.js +1 -0
  217. package/dist/client/assets/page-COBv6VWj.css +1 -0
  218. package/dist/client/assets/page-DVjU6VG_.js +550 -0
  219. package/dist/client/assets/rolldown-runtime-S-ySWqyJ.js +1 -0
  220. package/dist/client/assets/xterm-BBgU7shl.js +36 -0
  221. package/dist/client/favicon.svg +6 -0
  222. package/dist/client/file.svg +1 -0
  223. package/dist/client/globe.svg +1 -0
  224. package/dist/client/og.png +0 -0
  225. package/dist/client/scope-logo.svg +11 -0
  226. package/dist/client/window.svg +1 -0
  227. package/dist/server/.vite/manifest.json +14 -0
  228. package/dist/server/__vite_rsc_assets_manifest.js +49 -0
  229. package/dist/server/assets/index-CNnP2Ses.css +2 -0
  230. package/dist/server/image-config.json +1 -0
  231. package/dist/server/index.js +15201 -0
  232. package/dist/server/ssr/__vite_rsc_assets_manifest.js +49 -0
  233. package/dist/server/ssr/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  234. package/dist/server/ssr/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  235. package/dist/server/ssr/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  236. package/dist/server/ssr/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  237. package/dist/server/ssr/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  238. package/dist/server/ssr/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  239. package/dist/server/ssr/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  240. package/dist/server/ssr/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  241. package/dist/server/ssr/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  242. package/dist/server/ssr/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  243. package/dist/server/ssr/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  244. package/dist/server/ssr/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  245. package/dist/server/ssr/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  246. package/dist/server/ssr/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  247. package/dist/server/ssr/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  248. package/dist/server/ssr/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  249. package/dist/server/ssr/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  250. package/dist/server/ssr/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  251. package/dist/server/ssr/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  252. package/dist/server/ssr/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  253. package/dist/server/ssr/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  254. package/dist/server/ssr/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  255. package/dist/server/ssr/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  256. package/dist/server/ssr/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  257. package/dist/server/ssr/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  258. package/dist/server/ssr/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  259. package/dist/server/ssr/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  260. package/dist/server/ssr/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  261. package/dist/server/ssr/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  262. package/dist/server/ssr/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  263. package/dist/server/ssr/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  264. package/dist/server/ssr/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  265. package/dist/server/ssr/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  266. package/dist/server/ssr/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  267. package/dist/server/ssr/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  268. package/dist/server/ssr/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  269. package/dist/server/ssr/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  270. package/dist/server/ssr/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  271. package/dist/server/ssr/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  272. package/dist/server/ssr/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  273. package/dist/server/ssr/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  274. package/dist/server/ssr/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  275. package/dist/server/ssr/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  276. package/dist/server/ssr/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  277. package/dist/server/ssr/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  278. package/dist/server/ssr/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  279. package/dist/server/ssr/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  280. package/dist/server/ssr/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  281. package/dist/server/ssr/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  282. package/dist/server/ssr/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  283. package/dist/server/ssr/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  284. package/dist/server/ssr/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  285. package/dist/server/ssr/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  286. package/dist/server/ssr/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  287. package/dist/server/ssr/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  288. package/dist/server/ssr/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  289. package/dist/server/ssr/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  290. package/dist/server/ssr/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  291. package/dist/server/ssr/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  292. package/dist/server/ssr/assets/addon-fit-C09Jj0_f.js +42 -0
  293. package/dist/server/ssr/assets/error-boundary-Dd2ZYXA8.js +277 -0
  294. package/dist/server/ssr/assets/layout-segment-context-HV_Mvyzf.js +37 -0
  295. package/dist/server/ssr/assets/page-COBv6VWj.css +1 -0
  296. package/dist/server/ssr/assets/page-CYYyCnKD.js +102541 -0
  297. package/dist/server/ssr/assets/xterm-DgzE4ZZ1.js +10232 -0
  298. package/dist/server/ssr/index.js +11840 -0
  299. package/dist/server/ssr/vinext-server.json +1 -0
  300. package/dist/server/vinext-externals.json +1 -0
  301. package/dist/server/vinext-server.json +1 -0
  302. package/dist/server/wrangler.json +1 -0
  303. package/examples/agents/global-agreements.example.md +10 -0
  304. package/examples/agents/research-project.example.md +10 -0
  305. package/examples/agents-media-previews.md +22 -0
  306. package/examples/deployment.example.json +6 -0
  307. package/examples/leak-denylist.example.json +10 -0
  308. package/examples/plugins/hello/index.mjs +4 -0
  309. package/examples/plugins/hello/scope-plugin.json +13 -0
  310. package/examples/workbench.config.json +44 -0
  311. package/lib/account-quota.d.ts +42 -0
  312. package/lib/account-quota.js +121 -0
  313. package/lib/browser-snapshot-cache.js +61 -0
  314. package/lib/conversation-location.js +26 -0
  315. package/lib/conversation.js +62 -0
  316. package/lib/dialogue-refresh.js +14 -0
  317. package/lib/execution-host.js +22 -0
  318. package/lib/formula-preview.js +48 -0
  319. package/lib/i18n.tsx +81 -0
  320. package/lib/incremental-snapshot.js +324 -0
  321. package/lib/manager-plan.js +37 -0
  322. package/lib/markdown-images.js +22 -0
  323. package/lib/markdown-math.js +151 -0
  324. package/lib/markdown-url.js +13 -0
  325. package/lib/model-effort.js +13 -0
  326. package/lib/native-history.d.ts +32 -0
  327. package/lib/native-history.js +94 -0
  328. package/lib/overview-delta.js +41 -0
  329. package/lib/project-view.js +86 -0
  330. package/lib/projects.js +74 -0
  331. package/lib/remote-links.js +95 -0
  332. package/lib/runtime-config.js +70 -0
  333. package/lib/session-activity.js +34 -0
  334. package/lib/session-cache-guard.js +52 -0
  335. package/lib/session-filters.js +38 -0
  336. package/lib/ssh-config.js +26 -0
  337. package/lib/stable-order.js +39 -0
  338. package/lib/workbench-config.js +172 -0
  339. package/package.json +105 -4
  340. package/scripts/agent-email-relay.mjs +104 -0
  341. package/scripts/benchmark-bridge.mjs +38 -0
  342. package/scripts/cli-integration-smoke.mjs +64 -0
  343. package/scripts/email-notification-cli.mjs +28 -0
  344. package/scripts/enable-private-access.ps1 +109 -0
  345. package/scripts/export-opensource.mjs +112 -0
  346. package/scripts/fixtures/media/convergence.png +0 -0
  347. package/scripts/fixtures/media/rollout_demo.mp4 +0 -0
  348. package/scripts/fixtures/native-conversations.mjs +307 -0
  349. package/scripts/fixtures/workbench-conversations.mjs +352 -0
  350. package/scripts/install-remote-server.sh +67 -0
  351. package/scripts/lib/export-directory.mjs +38 -0
  352. package/scripts/lib/secret-scanner.mjs +139 -0
  353. package/scripts/plugin-cli.mjs +19 -0
  354. package/scripts/preview-workbench.mjs +669 -0
  355. package/scripts/probe-antigravity-acp.mjs +35 -0
  356. package/scripts/remote-bootstrap-cli.mjs +52 -0
  357. package/scripts/remote-email-tool.py +383 -0
@@ -0,0 +1,550 @@
1
+ import{n as e,r as t,t as n}from"./rolldown-runtime-S-ySWqyJ.js";import{i as r,r as i}from"./framework-CXnKph_e.js";import{t as a}from"./index-Enu1x0PS.js";var o=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),s=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),c=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),l=e=>{let t=c(e);return t.charAt(0).toUpperCase()+t.slice(1)},u={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},d=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},f=t(r(),1),p=(0,f.createContext)({}),m=()=>(0,f.useContext)(p),h=(0,f.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:s,...c},l)=>{let{size:p=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,color:_=`currentColor`,className:v=``}=m()??{},y=r??g?Number(n??h)*24/Number(t??p):n??h;return(0,f.createElement)(`svg`,{ref:l,...u,width:t??p??u.width,height:t??p??u.height,stroke:e??_,strokeWidth:y,className:o(`lucide`,v,i),...!a&&!d(c)&&{"aria-hidden":`true`},...c},[...s.map(([e,t])=>(0,f.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),g=(e,t)=>{let n=(0,f.forwardRef)(({className:n,...r},i)=>(0,f.createElement)(h,{ref:i,iconNode:t,className:o(`lucide-${s(l(e))}`,`lucide-${e}`,n),...r}));return n.displayName=l(e),n},_=g(`archive-restore`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h2`,key:`tvwodi`}],[`path`,{d:`M20 8v11a2 2 0 0 1-2 2h-2`,key:`1gkqxj`}],[`path`,{d:`m9 15 3-3 3 3`,key:`1pd0qc`}],[`path`,{d:`M12 12v9`,key:`192myk`}]]),v=g(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),y=g(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),b=g(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),x=g(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),S=g(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),C=g(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),w=g(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),T=g(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),E=g(`chart-column`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]]),ee=g(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),te=g(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),D=g(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),ne=g(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),re=g(`circle-arrow-up`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 12-4-4-4 4`,key:`177agl`}],[`path`,{d:`M12 16V8`,key:`1sbj14`}]]),ie=g(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),ae=g(`circle-dot`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}]]),oe=g(`circle-pause`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`10`,x2:`10`,y1:`15`,y2:`9`,key:`c1nkhi`}],[`line`,{x1:`14`,x2:`14`,y1:`15`,y2:`9`,key:`h65svq`}]]),se=g(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]),ce=g(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),le=g(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),ue=g(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),de=g(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),fe=g(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),pe=g(`folder-plus`,[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),me=g(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),he=g(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),ge=g(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),_e=g(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),ve=g(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),ye=g(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),be=g(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),xe=g(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),Se=g(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),Ce=g(`message-square-text`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M7 11h10`,key:`1twpyw`}],[`path`,{d:`M7 15h6`,key:`d9of3u`}],[`path`,{d:`M7 7h8`,key:`af5zfr`}]]),we=g(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),Te=g(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]),Ee=g(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),De=g(`package-plus`,[[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`path`,{d:`M16 17h6`,key:`1ook5g`}],[`path`,{d:`M19 14v6`,key:`1ckrd5`}],[`path`,{d:`M21 10.535V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l1.675-.955`,key:`28k6lz`}],[`path`,{d:`M3.29 7 12 12l8.71-5`,key:`19ckod`}],[`path`,{d:`m7.5 4.27 8.997 5.148`,key:`9yrvtv`}]]),Oe=g(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),ke=g(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),Ae=g(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),je=g(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),Me=g(`pin-off`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89`,key:`znwnzq`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11`,key:`c9qhm2`}]]),Ne=g(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]),Pe=g(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Fe=g(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),Ie=g(`rocket`,[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]),Le=g(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),Re=g(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),ze=g(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),Be=g(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Ve=g(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),He=g(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),Ue=g(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),We=g(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Ge=g(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),Ke=g(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),qe=g(`sliders-vertical`,[[`path`,{d:`M10 8h4`,key:`1sr2af`}],[`path`,{d:`M12 21v-9`,key:`17s77i`}],[`path`,{d:`M12 8V3`,key:`13r4qs`}],[`path`,{d:`M17 16h4`,key:`h1uq16`}],[`path`,{d:`M19 12V3`,key:`o1uvq1`}],[`path`,{d:`M19 21v-5`,key:`qua636`}],[`path`,{d:`M3 14h4`,key:`bcjad9`}],[`path`,{d:`M5 10V3`,key:`cb8scm`}],[`path`,{d:`M5 21v-7`,key:`1w1uti`}]]),Je=g(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),Ye=g(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),Xe=g(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),Ze=g(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Qe=g(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),$e=g(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),et=g(`user-round`,[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]]),tt=g(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),nt=g(`wifi`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]),rt=g(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),it=g(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),O=i();function at(e){return e===`light`?{background:`#ffffff`,foreground:`#303030`,cursor:`#555555`,selectionBackground:`#d8e3ec`}:{background:`#202020`,foreground:`#ececea`,cursor:`#ececea`,selectionBackground:`#454545`}}function ot(e,t,n,r){let i=new URLSearchParams({host:e.host,cwd:e.cwd,mode:t,cols:String(n),rows:String(r)});return t===`tmux`&&e.tmuxSession&&i.set(`tmux`,e.tmuxSession),[`localhost`,`127.0.0.1`,`::1`].includes(window.location.hostname)?`ws://127.0.0.1:4815/terminal?${i}`:`${window.location.protocol===`https:`?`wss:`:`ws:`}//${window.location.host}/scope-api/terminal?${i}`}function st({target:e,uiTheme:t,active:n,mode:r}){let i=(0,f.useRef)(null),o=(0,f.useRef)(null),s=(0,f.useRef)(null),c=(0,f.useRef)(null),l=(0,f.useRef)(t),u=(0,f.useRef)(n),[d,p]=(0,f.useState)(0),[m,h]=(0,f.useState)(`connecting`),g=e.host,_=e.cwd,v=e.tmuxSession,y=r===`tmux`&&v?`tmux`:`shell`;return(0,f.useEffect)(()=>{l.current=t,o.current&&(o.current.options.theme=at(t))},[t]),(0,f.useEffect)(()=>{if(u.current=n,!n)return;let e=requestAnimationFrame(()=>{c.current?.fit(),o.current?.focus()});return()=>cancelAnimationFrame(e)},[n]),(0,f.useEffect)(()=>{let e=!1,t=null,n=null,r=0,d=i.current;if(!d)return;async function f(){let[{Terminal:f},{FitAddon:p}]=await Promise.all([a(()=>import(`./xterm-BBgU7shl.js`),[]),a(()=>import(`./addon-fit-BZbxZs2G.js`),[])]);if(e||!i.current)return;let m=new f({cursorBlink:!0,cursorStyle:`bar`,convertEol:!1,fontFamily:`"Cascadia Code", "JetBrains Mono", "SFMono-Regular", Consolas, monospace`,fontSize:13,lineHeight:1.2,scrollback:1e4,allowProposedApi:!1,theme:at(l.current)}),b=new p;m.loadAddon(b),m.open(i.current),c.current=b,u.current&&(b.fit(),m.focus()),o.current=m,m.writeln(`\x1b[38;5;110mSCOPE\x1b[0m connecting to ${g}…`);let x=new WebSocket(ot({host:g,cwd:_,tmuxSession:v},y,m.cols,m.rows));s.current=x,x.addEventListener(`open`,()=>{e||(h(`connected`),n=m.onData(e=>{x.readyState===WebSocket.OPEN&&x.send(JSON.stringify({type:`input`,data:e}))}))}),x.addEventListener(`message`,t=>{if(!(e||typeof t.data!=`string`))try{let e=JSON.parse(t.data);e.type===`output`&&e.data?m.write(e.data):e.type===`error`?(h(`error`),m.writeln(`\r\n\x1b[31m${e.message||`SSH terminal error`}\x1b[0m`)):e.type===`exit`&&(h(e.code===0?`closed`:`error`),m.writeln(`\r\n\x1b[38;5;244mSSH connection closed (code ${e.code??`?`})\x1b[0m`))}catch{m.write(t.data)}}),x.addEventListener(`close`,()=>{e||h(e=>e===`error`?e:`closed`)}),x.addEventListener(`error`,()=>{e||h(`error`)}),t=new ResizeObserver(()=>{window.cancelAnimationFrame(r),r=window.requestAnimationFrame(()=>{if(!(e||!u.current||!d?.clientWidth||!d?.clientHeight))try{b.fit()}catch{}})}),t.observe(i.current)}return h(`connecting`),f().catch(t=>{e||(h(`error`),o.current?.writeln(`\r\n\x1b[31m无法初始化网页终端:${String(t)}\x1b[0m`))}),()=>{e=!0,window.cancelAnimationFrame(r),t?.disconnect(),n?.dispose(),s.current?.close(1e3,`terminal panel closed`),s.current=null,o.current?.dispose(),o.current=null,c.current=null,d.replaceChildren()}},[y,d,_,g,v]),(0,O.jsxs)(`section`,{className:`ssh-terminal-session`,hidden:!n,children:[(0,O.jsxs)(`header`,{children:[(0,O.jsxs)(`div`,{className:`ssh-terminal-title`,children:[(0,O.jsx)(Je,{size:15}),(0,O.jsx)(`strong`,{children:e.host}),(0,O.jsx)(`span`,{title:e.cwd,children:e.cwd||`~`}),(0,O.jsx)(`i`,{className:`terminal-status is-${m}`,children:m===`connecting`?`连接中`:m===`connected`?`已连接`:m===`error`?`连接错误`:`已断开`})]}),(0,O.jsx)(`div`,{className:`ssh-terminal-actions`,children:(0,O.jsx)(`button`,{type:`button`,"aria-label":`重新连接 SSH 终端`,title:`重新连接`,onClick:()=>p(e=>e+1),children:(0,O.jsx)(Fe,{size:14})})})]}),(0,O.jsx)(`div`,{className:`ssh-terminal-canvas`,ref:i})]})}function ct({target:e,uiTheme:t,onClose:n}){let[r,i]=(0,f.useState)(()=>({request:e,tabs:[{id:1,target:e,mode:`shell`}],activeId:1,nextId:2})),[a,o]=(0,f.useState)(!1);r.request!==e&&i({...r,request:e,activeId:r.nextId,nextId:r.nextId+1,tabs:[...r.tabs,{id:r.nextId,target:e,mode:`shell`}]});let s=r.tabs.find(e=>e.id===r.activeId);function c(e=`shell`){i(t=>({...t,activeId:t.nextId,nextId:t.nextId+1,tabs:[...t.tabs,{id:t.nextId,target:s.target,mode:e}]}))}function l(e){if(r.tabs.length===1){n();return}i(t=>{let n=t.tabs.findIndex(t=>t.id===e),r=t.tabs.filter(t=>t.id!==e);return{...t,tabs:r,activeId:t.activeId===e?r[Math.min(n,r.length-1)].id:t.activeId}})}return(0,O.jsxs)(`section`,{className:`ssh-terminal-panel ${a?`is-maximized`:``}`,"aria-label":`SSH 终端`,children:[(0,O.jsxs)(`header`,{children:[(0,O.jsx)(`div`,{className:`terminal-tab-strip`,role:`tablist`,"aria-label":`终端标签`,children:r.tabs.map((e,t)=>(0,O.jsxs)(`div`,{className:`terminal-tab ${e.id===r.activeId?`is-active`:``}`,children:[(0,O.jsxs)(`button`,{type:`button`,role:`tab`,id:`terminal-tab-${e.id}`,"aria-controls":`terminal-pane-${e.id}`,"aria-selected":e.id===r.activeId,tabIndex:e.id===r.activeId?0:-1,title:`${e.target.host} · ${e.target.cwd||`~`}`,onClick:()=>i(t=>({...t,activeId:e.id})),onKeyDown:n=>{if(n.key===`Delete`){n.preventDefault(),l(e.id);return}let a=n.key===`ArrowRight`?(t+1)%r.tabs.length:n.key===`ArrowLeft`?(t+r.tabs.length-1)%r.tabs.length:n.key===`Home`?0:n.key===`End`?r.tabs.length-1:-1;a<0||(n.preventDefault(),i(e=>({...e,activeId:r.tabs[a].id})))},children:[(0,O.jsx)(Je,{size:13}),(0,O.jsxs)(`span`,{children:[e.mode===`tmux`?`tmux`:`终端`,` `,e.id]})]}),(0,O.jsx)(`button`,{type:`button`,className:`terminal-tab-close`,"aria-label":`关闭终端 ${e.id}`,onClick:()=>l(e.id),children:(0,O.jsx)(it,{size:12})})]},e.id))}),(0,O.jsxs)(`div`,{className:`ssh-terminal-actions`,children:[(0,O.jsx)(`button`,{type:`button`,"aria-label":`新建终端`,title:`新建终端(当前主机与目录)`,onClick:()=>c(),children:(0,O.jsx)(Pe,{size:16})}),s.target.tmuxSession&&(0,O.jsx)(`button`,{type:`button`,className:`terminal-attach`,title:`在新标签附着 ${s.target.tmuxSession}`,onClick:()=>c(`tmux`),children:`tmux`}),(0,O.jsx)(`button`,{type:`button`,"aria-label":a?`恢复终端高度`:`最大化终端`,onClick:()=>o(e=>!e),children:(0,O.jsx)(Se,{size:14})}),(0,O.jsx)(`button`,{type:`button`,"aria-label":`关闭全部终端`,title:`关闭全部终端`,onClick:n,children:(0,O.jsx)(it,{size:15})})]})]}),r.tabs.map(e=>(0,O.jsx)(`div`,{className:`terminal-tab-pane`,id:`terminal-pane-${e.id}`,role:`tabpanel`,"aria-labelledby":`terminal-tab-${e.id}`,hidden:e.id!==r.activeId,children:(0,O.jsx)(st,{target:e.target,uiTheme:t,active:e.id===r.activeId,mode:e.mode})},e.id))]})}function lt({size:e=24}){return(0,O.jsxs)(`svg`,{width:e,height:e,viewBox:`0 0 32 32`,fill:`none`,"aria-hidden":`true`,children:[(0,O.jsx)(`path`,{d:`M12 4H9a5 5 0 0 0-5 5v3m16-8h3a5 5 0 0 1 5 5v3M4 20v3a5 5 0 0 0 5 5h3m8 0h3a5 5 0 0 0 5-5v-3`,stroke:`currentColor`,strokeWidth:`2.3`,strokeLinecap:`round`}),(0,O.jsx)(`path`,{d:`m11 11 10 5-10 5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,O.jsx)(`circle`,{cx:`11`,cy:`11`,r:`2.6`,fill:`currentColor`}),(0,O.jsx)(`circle`,{cx:`21`,cy:`16`,r:`2.6`,fill:`currentColor`}),(0,O.jsx)(`circle`,{cx:`11`,cy:`21`,r:`2.6`,fill:`currentColor`})]})}function ut(){window.dispatchEvent(new Event(`scope:reconnect`))}function dt({theme:e,copied:t,onCopy:n}){return(0,O.jsxs)(`main`,{className:`bridge-gate connection-page`,"data-ui-theme":e,children:[(0,O.jsx)(`header`,{className:`gate-topbar`,children:(0,O.jsxs)(`div`,{className:`scope-wordmark`,children:[(0,O.jsx)(lt,{size:28}),(0,O.jsx)(`strong`,{children:`SCOPE`}),(0,O.jsx)(`em`,{children:`跨项目工作台`})]})}),(0,O.jsx)(`div`,{className:`connection-page-body`,children:(0,O.jsxs)(`section`,{className:`connection-card`,"aria-label":`连接 SCOPE`,children:[(0,O.jsx)(`div`,{className:`connection-symbol`,children:(0,O.jsx)(lt,{size:36})}),(0,O.jsx)(`h1`,{children:`正在连接工作台`}),(0,O.jsx)(`p`,{children:`暂时无法连接 SCOPE 服务。连接恢复后,项目与会话会自动显示。`}),(0,O.jsxs)(`div`,{className:`connection-progress`,role:`status`,children:[(0,O.jsx)(be,{size:15,className:`is-spinning`}),`正在自动重连`]}),(0,O.jsxs)(`button`,{type:`button`,className:`connection-retry`,onClick:ut,children:[(0,O.jsx)(Fe,{size:15}),`立即重试`]}),(0,O.jsxs)(`details`,{className:`connection-help`,children:[(0,O.jsx)(`summary`,{children:`服务尚未启动?`}),(0,O.jsx)(`p`,{children:`在运行 SCOPE 的电脑上,进入项目目录后执行:`}),(0,O.jsxs)(`div`,{className:`connection-command`,children:[(0,O.jsx)(`code`,{children:`npm run scope`}),(0,O.jsx)(`button`,{type:`button`,"aria-label":`复制启动命令`,onClick:n,children:t?(0,O.jsx)(ee,{size:16}):(0,O.jsx)(ce,{size:16})})]}),(0,O.jsx)(`p`,{children:`从其他设备访问时,请检查服务地址与网络连接。`})]})]})})]})}function ft(){return(0,O.jsxs)(`div`,{className:`connection-reconnect-notice`,role:`status`,children:[(0,O.jsx)(be,{size:14,className:`is-spinning`}),(0,O.jsx)(`span`,{children:`连接暂时中断,正在重连 · 当前显示上次同步内容`}),(0,O.jsx)(`button`,{type:`button`,onClick:ut,children:`立即重试`})]})}function pt(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function mt(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var ht=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,gt=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_t={};function vt(e,t){return((t||_t).jsx?gt:ht).test(e)}var yt=/[ \t\n\f\r]/g;function bt(e){return typeof e==`object`?e.type===`text`?xt(e.value):!1:xt(e)}function xt(e){return e.replace(yt,``)===``}var St=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};St.prototype.normal={},St.prototype.property={},St.prototype.space=void 0;function Ct(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new St(n,r,t)}function wt(e){return e.toLowerCase()}var Tt=class{constructor(e,t){this.attribute=t,this.property=e}};Tt.prototype.attribute=``,Tt.prototype.booleanish=!1,Tt.prototype.boolean=!1,Tt.prototype.commaOrSpaceSeparated=!1,Tt.prototype.commaSeparated=!1,Tt.prototype.defined=!1,Tt.prototype.mustUseProperty=!1,Tt.prototype.number=!1,Tt.prototype.overloadedBoolean=!1,Tt.prototype.property=``,Tt.prototype.spaceSeparated=!1,Tt.prototype.space=void 0;var Et=e({boolean:()=>Ot,booleanish:()=>kt,commaOrSpaceSeparated:()=>Nt,commaSeparated:()=>Mt,number:()=>k,overloadedBoolean:()=>At,spaceSeparated:()=>jt}),Dt=0,Ot=Pt(),kt=Pt(),At=Pt(),k=Pt(),jt=Pt(),Mt=Pt(),Nt=Pt();function Pt(){return 2**++Dt}var Ft=Object.keys(Et),It=class extends Tt{constructor(e,t,n,r){let i=-1;if(super(e,t),Lt(this,`space`,r),typeof n==`number`)for(;++i<Ft.length;){let e=Ft[i];Lt(this,Ft[i],(n&Et[e])===Et[e])}}};It.prototype.defined=!0;function Lt(e,t,n){n&&(e[t]=n)}function Rt(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new It(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[wt(r)]=r,n[wt(a.attribute)]=r}return new St(t,n,e.space)}var zt=Rt({properties:{ariaActiveDescendant:null,ariaAtomic:kt,ariaAutoComplete:null,ariaBusy:kt,ariaChecked:kt,ariaColCount:k,ariaColIndex:k,ariaColSpan:k,ariaControls:jt,ariaCurrent:null,ariaDescribedBy:jt,ariaDetails:null,ariaDisabled:kt,ariaDropEffect:jt,ariaErrorMessage:null,ariaExpanded:kt,ariaFlowTo:jt,ariaGrabbed:kt,ariaHasPopup:null,ariaHidden:kt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:jt,ariaLevel:k,ariaLive:null,ariaModal:kt,ariaMultiLine:kt,ariaMultiSelectable:kt,ariaOrientation:null,ariaOwns:jt,ariaPlaceholder:null,ariaPosInSet:k,ariaPressed:kt,ariaReadOnly:kt,ariaRelevant:null,ariaRequired:kt,ariaRoleDescription:jt,ariaRowCount:k,ariaRowIndex:k,ariaRowSpan:k,ariaSelected:kt,ariaSetSize:k,ariaSort:null,ariaValueMax:k,ariaValueMin:k,ariaValueNow:k,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Bt(e,t){return t in e?e[t]:t}function Vt(e,t){return Bt(e,t.toLowerCase())}var Ht=Rt({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Mt,acceptCharset:jt,accessKey:jt,action:null,allow:null,allowFullScreen:Ot,allowPaymentRequest:Ot,allowUserMedia:Ot,alpha:Ot,alt:null,as:null,async:Ot,autoCapitalize:null,autoComplete:jt,autoFocus:Ot,autoPlay:Ot,blocking:jt,capture:null,charSet:null,checked:Ot,cite:null,className:jt,closedBy:null,colorSpace:null,cols:k,colSpan:k,command:null,commandFor:null,content:null,contentEditable:kt,controls:Ot,controlsList:jt,coords:k|Mt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ot,defer:Ot,dir:null,dirName:null,disabled:Ot,download:At,draggable:kt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ot,formTarget:null,headers:jt,height:k,hidden:At,high:k,href:null,hrefLang:null,htmlFor:jt,httpEquiv:jt,id:null,imageSizes:null,imageSrcSet:null,inert:Ot,inputMode:null,integrity:null,is:null,isMap:Ot,itemId:null,itemProp:jt,itemRef:jt,itemScope:Ot,itemType:jt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ot,low:k,manifest:null,max:null,maxLength:k,media:null,method:null,min:null,minLength:k,multiple:Ot,muted:Ot,name:null,nonce:null,noModule:Ot,noValidate:Ot,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ot,optimum:k,pattern:null,ping:jt,placeholder:null,playsInline:Ot,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ot,referrerPolicy:null,rel:jt,required:Ot,reversed:Ot,rows:k,rowSpan:k,sandbox:jt,scope:null,scoped:Ot,seamless:Ot,selected:Ot,shadowRootClonable:Ot,shadowRootCustomElementRegistry:Ot,shadowRootDelegatesFocus:Ot,shadowRootMode:null,shadowRootSerializable:Ot,shape:null,size:k,sizes:null,slot:null,span:k,spellCheck:kt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:k,step:null,style:null,tabIndex:k,target:null,title:null,translate:null,type:null,typeMustMatch:Ot,useMap:null,value:kt,width:k,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:jt,axis:null,background:null,bgColor:null,border:k,borderColor:null,bottomMargin:k,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ot,declare:Ot,event:null,face:null,frame:null,frameBorder:null,hSpace:k,leftMargin:k,link:null,longDesc:null,lowSrc:null,marginHeight:k,marginWidth:k,noResize:Ot,noHref:Ot,noShade:Ot,noWrap:Ot,object:null,profile:null,prompt:null,rev:null,rightMargin:k,rules:null,scheme:null,scrolling:kt,standby:null,summary:null,text:null,topMargin:k,valueType:null,version:null,vAlign:null,vLink:null,vSpace:k,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ot,disablePictureInPicture:Ot,disableRemotePlayback:Ot,exportParts:Mt,part:jt,prefix:null,property:null,results:k,security:null,unselectable:null},space:`html`,transform:Vt}),Ut=Rt({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Nt,accentHeight:k,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:k,amplitude:k,arabicForm:null,ascent:k,attributeName:null,attributeType:null,azimuth:k,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:k,by:null,calcMode:null,capHeight:k,className:jt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:k,diffuseConstant:k,direction:null,display:null,dur:null,divisor:k,dominantBaseline:null,download:Ot,dx:null,dy:null,edgeMode:null,editable:null,elevation:k,enableBackground:null,end:null,event:null,exponent:k,externalResourcesRequired:null,fill:null,fillOpacity:k,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Mt,g2:Mt,glyphName:Mt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:k,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:k,horizOriginX:k,horizOriginY:k,id:null,ideographic:k,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:k,k,k1:k,k2:k,k3:k,k4:k,kernelMatrix:Nt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:k,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:k,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:k,overlineThickness:k,paintOrder:null,panose1:null,path:null,pathLength:k,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:jt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:k,pointsAtY:k,pointsAtZ:k,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Nt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Nt,rev:Nt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Nt,requiredFeatures:Nt,requiredFonts:Nt,requiredFormats:Nt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:k,specularExponent:k,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:k,strikethroughThickness:k,string:null,stroke:null,strokeDashArray:Nt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:k,strokeOpacity:k,strokeWidth:null,style:null,surfaceScale:k,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Nt,tabIndex:k,tableValues:null,target:null,targetX:k,targetY:k,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Nt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:k,underlineThickness:k,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:k,values:null,vAlphabetic:k,vMathematical:k,vectorEffect:null,vHanging:k,vIdeographic:k,version:null,vertAdvY:k,vertOriginX:k,vertOriginY:k,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:k,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Bt}),Wt=Rt({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Gt=Rt({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Vt}),Kt=Rt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),qt={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},Jt=/[A-Z]/g,Yt=/-[a-z]/g,Xt=/^data[-\w.:]+$/i;function Zt(e,t){let n=wt(t),r=t,i=Tt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Xt.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Yt,$t);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Yt.test(e)){let n=e.replace(Jt,Qt);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=It}return new i(r,t)}function Qt(e){return`-`+e.toLowerCase()}function $t(e){return e.charAt(1).toUpperCase()}var en=Ct([zt,Ht,Wt,Gt,Kt],`html`),tn=Ct([zt,Ut,Wt,Gt,Kt],`svg`);function nn(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function rn(e){return e.join(` `).trim()}var an=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
2
+ `,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function ee(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),ee()}function _(e){return e?e.replace(l,p):p}t.exports=g})),on=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(an());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),sn=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),cn=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(on()),r=sn();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),ln=dn(`end`),un=dn(`start`);function dn(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function fn(e){let t=un(e),n=ln(e);if(t&&n)return{start:t,end:n}}function pn(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?hn(e.position):`start`in e||`end`in e?hn(e):`line`in e||`column`in e?mn(e):``}function mn(e){return gn(e&&e.line)+`:`+gn(e&&e.column)}function hn(e){return mn(e&&e.start)+`-`+mn(e&&e.end)}function gn(e){return e&&typeof e==`number`?e:1}var _n=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=pn(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};_n.prototype.file=``,_n.prototype.name=``,_n.prototype.reason=``,_n.prototype.message=``,_n.prototype.stack=``,_n.prototype.column=void 0,_n.prototype.line=void 0,_n.prototype.ancestors=void 0,_n.prototype.cause=void 0,_n.prototype.fatal=void 0,_n.prototype.place=void 0,_n.prototype.ruleId=void 0,_n.prototype.source=void 0;var vn=t(cn(),1),yn={}.hasOwnProperty,bn=new Map,xn=/[A-Z]/g,Sn=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Cn=new Set([`td`,`th`]),wn=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Tn(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=In(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Fn(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?tn:en,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=En(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function En(e,t,n){if(t.type===`element`)return Dn(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return On(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return An(e,t,n);if(t.type===`mdxjsEsm`)return kn(e,t);if(t.type===`root`)return jn(e,t,n);if(t.type===`text`)return Mn(e,t)}function Dn(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=tn,e.schema=i),e.ancestors.push(t);let a=Hn(e,t.tagName,!1),o=Ln(e,t),s=zn(e,t);return Sn.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!bt(e):!0})),Nn(e,o,a,t),Pn(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function On(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Un(e,t.position)}function kn(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Un(e,t.position)}function An(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=tn,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Hn(e,t.name,!0),o=Rn(e,t),s=zn(e,t);return Nn(e,o,a,t),Pn(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function jn(e,t,n){let r={};return Pn(r,zn(e,t)),e.create(t,e.Fragment,r,n)}function Mn(e,t){return t.value}function Nn(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Pn(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Fn(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function In(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=un(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Ln(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&yn.call(t.properties,i)){let a=Bn(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Cn.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Rn(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Un(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Un(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function zn(e,t){let n=[],r=-1,i=e.passKeys?new Map:bn;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=En(e,a,o);s!==void 0&&n.push(s)}return n}function Bn(e,t,n){let r=Zt(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?mt(n):rn(n)),r.property===`style`){let t=typeof n==`object`?n:Vn(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Wn(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?qt[r.property]||r.property:r.attribute,n]}}function Vn(e,t){try{return(0,vn.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new _n("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=wn+`#cannot-parse-style-attribute`,r}}function Hn(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=vt(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=vt(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return yn.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Un(e)}function Un(e,t){let n=new _n("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=wn+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Wn(e){let t={},n;for(n in e)yn.call(e,n)&&(t[Gn(n)]=e[n]);return t}function Gn(e){let t=e.replace(xn,Kn);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Kn(e){return`-`+e.toLowerCase()}var qn={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},Jn={};function Yn(e,t){let n=t||Jn;return Xn(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function Xn(e,t,n){if(Qn(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Zn(e.children,t,n)}return Array.isArray(e)?Zn(e,t,n):``}function Zn(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Xn(e[i],t,n);return r.join(``)}function Qn(e){return!!(e&&typeof e==`object`)}var $n=document.createElement(`i`);function er(e){let t=`&`+e+`;`;$n.innerHTML=t;let n=$n.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function tr(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function nr(e,t){return e.length>0?(tr(e,e.length,0,t),e):t}var rr={}.hasOwnProperty;function ir(e){let t={},n=-1;for(;++n<e.length;)ar(t,e[n]);return t}function ar(e,t){let n;for(n in t){let r=(rr.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){rr.call(r,a)||(r[a]=[]);let e=i[a];or(r[a],Array.isArray(e)?e:e?[e]:[])}}}function or(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);tr(e,0,0,r)}function sr(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function cr(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var lr=xr(/[A-Za-z]/),ur=xr(/[\dA-Za-z]/),dr=xr(/[#-'*+\--9=?A-Z^-~]/);function fr(e){return e!==null&&(e<32||e===127)}var pr=xr(/\d/),mr=xr(/[\dA-Fa-f]/),hr=xr(/[!-/:-@[-`{-~]/);function gr(e){return e!==null&&e<-2}function _r(e){return e!==null&&(e<0||e===32)}function vr(e){return e===-2||e===-1||e===32}var yr=xr(/\p{P}|\p{S}/u),br=xr(/\s/);function xr(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Sr(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&ur(e.charCodeAt(n+1))&&ur(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Cr(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return vr(r)?(e.enter(n),s(r)):t(r)}function s(r){return vr(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var wr={tokenize:Tr};function Tr(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Cr(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return gr(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Er={tokenize:Or},Dr={tokenize:kr};function Or(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return tr(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Dr,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Dr,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return gr(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;tr(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function kr(e,t,n){return Cr(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Ar(e){if(e===null||_r(e)||br(e))return 1;if(yr(e))return 2}function jr(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Mr={name:`attention`,resolveAll:Nr,tokenize:Pr};function Nr(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Fr(d,-c),Fr(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=nr(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=nr(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=nr(l,jr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=nr(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=nr(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,tr(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Pr(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ar(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Ar(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Fr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Ir={name:`autolink`,tokenize:Lr};function Lr(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return lr(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||ur(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||ur(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||fr(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):dr(t)?(e.consume(t),l):n(t)}function u(e){return ur(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||ur(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Rr={partial:!0,tokenize:zr};function zr(e,t,n){return r;function r(t){return vr(t)?Cr(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||gr(e)?t(e):n(e)}}var Br={continuation:{tokenize:Hr},exit:Ur,name:`blockQuote`,tokenize:Vr};function Vr(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return vr(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Hr(e,t,n){let r=this;return i;function i(t){return vr(t)?Cr(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Br,t,n)(r)}}function Ur(e){e.exit(`blockQuote`)}var Wr={name:`characterEscape`,tokenize:Gr};function Gr(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return hr(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Kr={name:`characterReference`,tokenize:qr};function qr(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=ur,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=mr,u):(e.enter(`characterReferenceValue`),a=7,o=pr,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===ur&&!er(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Jr={partial:!0,tokenize:Zr},Yr={concrete:!0,name:`codeFenced`,tokenize:Xr};function Xr(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),vr(t)?Cr(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||gr(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Jr,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||gr(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):vr(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),Cr(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||gr(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||gr(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&vr(t)?Cr(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||gr(t)?e.check(Jr,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||gr(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),vr(t)?Cr(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),vr(t)?Cr(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||gr(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Zr(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Qr={name:`codeIndented`,tokenize:ei},$r={partial:!0,tokenize:ti};function ei(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),Cr(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):gr(t)?e.attempt($r,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||gr(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function ti(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):gr(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):Cr(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):gr(e)?i(e):n(e)}}var ni={name:`codeText`,previous:ii,resolve:ri,tokenize:ai};function ri(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function ii(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function ai(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):gr(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||gr(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var oi=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&si(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),si(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),si(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);si(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);si(this.left,t.reverse())}}};function si(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function ci(e){let t={},n=-1,r,i,a,o,s,c,l,u=new oi(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,li(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return tr(e,0,1/0,u.slice(0)),!l}function li(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var ui={resolve:fi,tokenize:pi},di={partial:!0,tokenize:mi};function fi(e){return ci(e),e}function pi(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):gr(t)?e.check(di,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function mi(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Cr(e,a,`linePrefix`)}function a(i){if(i===null||gr(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function hi(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||fr(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||gr(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||_r(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||fr(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function gi(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):gr(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||gr(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!vr(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function _i(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):gr(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Cr(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||gr(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function vi(e,t){let n;return r;function r(i){return gr(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):vr(i)?Cr(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var yi={name:`definition`,tokenize:xi},bi={partial:!0,tokenize:Si};function xi(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return gi.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=cr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return _r(t)?vi(e,l)(t):l(t)}function l(t){return hi(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(bi,d,d)(t)}function d(t){return vr(t)?Cr(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||gr(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Si(e,t,n){return r;function r(t){return _r(t)?vi(e,i)(t):n(t)}function i(t){return _i(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return vr(t)?Cr(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||gr(e)?t(e):n(e)}}var Ci={name:`hardBreakEscape`,tokenize:wi};function wi(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return gr(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Ti={name:`headingAtx`,resolve:Ei,tokenize:Di};function Ei(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},tr(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Di(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||_r(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||gr(n)?(e.exit(`atxHeading`),t(n)):vr(n)?Cr(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||_r(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Oi=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),ki=[`pre`,`script`,`style`,`textarea`],Ai={concrete:!0,name:`htmlFlow`,resolveTo:Ni,tokenize:Pi},ji={partial:!0,tokenize:Ii},Mi={partial:!0,tokenize:Fi};function Ni(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Pi(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:ce):lr(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):lr(a)?(e.consume(a),i=4,r.interrupt?t:ce):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:ce):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:te:m):n(i)}function h(t){return lr(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||_r(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&ki.includes(l)?(i=1,r.interrupt?t(s):te(s)):Oi.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):te(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||ur(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:te):n(i)}function v(t){return vr(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||lr(t)?(e.consume(t),b):vr(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||ur(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):vr(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):vr(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||gr(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||_r(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||vr(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),ee):n(t)}function ee(t){return t===null||gr(t)?te(t):vr(t)?(e.consume(t),ee):n(t)}function te(t){return t===45&&i===2?(e.consume(t),ie):t===60&&i===1?(e.consume(t),ae):t===62&&i===4?(e.consume(t),le):t===63&&i===3?(e.consume(t),ce):t===93&&i===5?(e.consume(t),se):gr(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(ji,ue,D)(t)):t===null||gr(t)?(e.exit(`htmlFlowData`),D(t)):(e.consume(t),te)}function D(t){return e.check(Mi,ne,ue)(t)}function ne(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),re}function re(t){return t===null||gr(t)?D(t):(e.enter(`htmlFlowData`),te(t))}function ie(t){return t===45?(e.consume(t),ce):te(t)}function ae(t){return t===47?(e.consume(t),o=``,oe):te(t)}function oe(t){if(t===62){let n=o.toLowerCase();return ki.includes(n)?(e.consume(t),le):te(t)}return lr(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),oe):te(t)}function se(t){return t===93?(e.consume(t),ce):te(t)}function ce(t){return t===62?(e.consume(t),le):t===45&&i===2?(e.consume(t),ce):te(t)}function le(t){return t===null||gr(t)?(e.exit(`htmlFlowData`),ue(t)):(e.consume(t),le)}function ue(n){return e.exit(`htmlFlow`),t(n)}}function Fi(e,t,n){let r=this;return i;function i(t){return gr(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Ii(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Rr,t,n)}}var Li={name:`htmlText`,tokenize:Ri};function Ri(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):lr(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):lr(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):gr(t)?(o=d,ae(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ie(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):gr(t)?(o=h,ae(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ie(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ie(t):gr(t)?(o=v,ae(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):gr(t)?(o=y,ae(t)):(e.consume(t),y)}function b(e){return e===62?ie(e):y(e)}function x(t){return lr(t)?(e.consume(t),S):n(t)}function S(t){return t===45||ur(t)?(e.consume(t),S):C(t)}function C(t){return gr(t)?(o=C,ae(t)):vr(t)?(e.consume(t),C):ie(t)}function w(t){return t===45||ur(t)?(e.consume(t),w):t===47||t===62||_r(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),ie):t===58||t===95||lr(t)?(e.consume(t),E):gr(t)?(o=T,ae(t)):vr(t)?(e.consume(t),T):ie(t)}function E(t){return t===45||t===46||t===58||t===95||ur(t)?(e.consume(t),E):ee(t)}function ee(t){return t===61?(e.consume(t),te):gr(t)?(o=ee,ae(t)):vr(t)?(e.consume(t),ee):T(t)}function te(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,D):gr(t)?(o=te,ae(t)):vr(t)?(e.consume(t),te):(e.consume(t),ne)}function D(t){return t===i?(e.consume(t),i=void 0,re):t===null?n(t):gr(t)?(o=D,ae(t)):(e.consume(t),D)}function ne(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||_r(t)?T(t):(e.consume(t),ne)}function re(e){return e===47||e===62||_r(e)?T(e):n(e)}function ie(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function ae(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),oe}function oe(t){return vr(t)?Cr(e,se,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):se(t)}function se(t){return e.enter(`htmlTextData`),o(t)}}var zi={name:`labelEnd`,resolveAll:Ui,resolveTo:Wi,tokenize:Gi},Bi={tokenize:Ki},Vi={tokenize:qi},Hi={tokenize:Ji};function Ui(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&tr(e,0,e.length,n),e}function Wi(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=nr(s,e.slice(a+1,a+r+3)),s=nr(s,[[`enter`,u,t]]),s=nr(s,jr(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=nr(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=nr(s,e.slice(o+1)),s=nr(s,[[`exit`,c,t]]),tr(e,a,e.length,s),e}function Gi(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(cr(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Bi,u,o?u:d)(t):t===91?e.attempt(Vi,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Hi,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Ki(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return _r(t)?vi(e,a)(t):a(t)}function a(t){return t===41?u(t):hi(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return _r(t)?vi(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?_i(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return _r(t)?vi(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function qi(e,t,n){let r=this;return i;function i(t){return gi.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(cr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Ji(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Yi={name:`labelStartImage`,resolveAll:zi.resolveAll,tokenize:Xi};function Xi(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Zi={name:`labelStartLink`,resolveAll:zi.resolveAll,tokenize:Qi};function Qi(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var $i={name:`lineEnding`,tokenize:ea};function ea(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Cr(e,t,`linePrefix`)}}var ta={name:`thematicBreak`,tokenize:na};function na(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||gr(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),vr(t)?Cr(e,s,`whitespace`)(t):s(t))}}var ra={continuation:{tokenize:sa},exit:la,name:`list`,tokenize:oa},ia={partial:!0,tokenize:ua},aa={partial:!0,tokenize:ca};function oa(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:pr(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(ta,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return pr(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Rr,r.interrupt?n:u,e.attempt(ia,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return vr(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function sa(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Rr,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Cr(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!vr(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(aa,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Cr(e,e.attempt(ra,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function ca(e,t,n){let r=this;return Cr(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function la(e){e.exit(this.containerState.type)}function ua(e,t,n){let r=this;return Cr(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!vr(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var da={name:`setextUnderline`,resolveTo:fa,tokenize:pa};function fa(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function pa(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),vr(t)?Cr(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||gr(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var ma={tokenize:ha};function ha(e){let t=this,n=e.attempt(Rr,r,e.attempt(this.parser.constructs.flowInitial,i,Cr(e,e.attempt(this.parser.constructs.flow,i,e.attempt(ui,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var ga={resolveAll:ba()},_a=ya(`string`),va=ya(`text`);function ya(e){return{resolveAll:ba(e===`text`?xa:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function ba(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function xa(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Sa=e({attentionMarkers:()=>Aa,contentInitial:()=>wa,disable:()=>ja,document:()=>Ca,flow:()=>Ea,flowInitial:()=>Ta,insideSpan:()=>ka,string:()=>Da,text:()=>Oa}),Ca={42:ra,43:ra,45:ra,48:ra,49:ra,50:ra,51:ra,52:ra,53:ra,54:ra,55:ra,56:ra,57:ra,62:Br},wa={91:yi},Ta={[-2]:Qr,[-1]:Qr,32:Qr},Ea={35:Ti,42:ta,45:[da,ta],60:Ai,61:da,95:ta,96:Yr,126:Yr},Da={38:Kr,92:Wr},Oa={[-5]:$i,[-4]:$i,[-3]:$i,33:Yi,38:Kr,42:Mr,60:[Ir,Li],91:Zi,92:[Ci,Wr],93:zi,95:Mr,96:ni},ka={null:[Mr,ga]},Aa={null:[42,95]},ja={null:[]};function Ma(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=nr(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=jr(a,l.events,l),l.events):[]}function f(e,t){return Pa(p(e),t)}function p(e){return Na(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){gr(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&tr(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Na(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Pa(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
3
+ `;break;case-3:o=`\r
4
+ `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Fa(e){let t={constructs:ir([Sa,...(e||{}).extensions||[]]),content:n(wr),defined:[],document:n(Er),flow:n(ma),lazy:{},string:n(_a),text:n(va)};return t;function n(e){return n;function n(n){return Ma(t,e,n)}}}function Ia(e){for(;!ci(e););return e}var La=/[\0\t\n\r]/g;function Ra(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(La.lastIndex=u,c=La.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var za=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ba(e){return e.replace(za,Va)}function Va(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return sr(n.slice(t?2:1),t?16:10)}return er(n)||e}var Ha={}.hasOwnProperty;function Ua(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Wa(n)(Ia(Fa(n).document().write(Ra()(e,t,!0))))}function Wa(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(De),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(Ce),blockQuote:a(ve),characterEscape:T,characterReference:T,codeFenced:a(ye),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ye,o),codeText:a(be,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(xe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(Se),hardBreakEscape:a(we),hardBreakTrailing:a(we),htmlFlow:a(Te,o),htmlFlowData:T,htmlText:a(Te,o),htmlTextData:T,image:a(Ee),label:o,link:a(De),listItem:a(ke),listItemValue:f,listOrdered:a(Oe,d),listUnordered:a(Oe),paragraph:a(Ae),reference:de,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(Ce),strong:a(je),thematicBreak:a(Ne)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:_e,autolinkProtocol:ge,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:pe,characterReferenceMarkerNumeric:pe,characterReferenceValue:me,characterReference:he,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(re),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(te),hardBreakTrailing:c(te),htmlFlow:c(D),htmlFlowData:E,htmlText:c(ne),htmlTextData:E,image:c(ae),label:se,labelText:oe,lineEnding:ee,link:c(ie),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:fe,resourceDestinationString:ce,resourceTitleString:le,resource:ue,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};Ka(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];Ha.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||Ja).call(a,void 0,e[0])}for(r.position={start:Ga(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Ga(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Ga(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Ja).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+pn({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Ga(e.end)}function u(){return Yn(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=cr(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Me(),n.position={start:Ga(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Ga(e.end)}function ee(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Ga(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function te(){this.data.atHardBreak=!0}function D(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ie(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ae(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function oe(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Ba(t),n.identifier=cr(t).toLowerCase()}function se(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function ce(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function le(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ue(){this.data.inReference=void 0}function de(){this.data.referenceType=`collapsed`}function fe(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=cr(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function pe(e){this.data.characterReferenceType=e.type}function me(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=sr(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=er(t);let i=this.stack[this.stack.length-1];i.value+=r}function he(e){let t=this.stack.pop();t.position.end=Ga(e.end)}function ge(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function _e(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ve(){return{type:`blockquote`,children:[]}}function ye(){return{type:`code`,lang:null,meta:null,value:``}}function be(){return{type:`inlineCode`,value:``}}function xe(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function Se(){return{type:`emphasis`,children:[]}}function Ce(){return{type:`heading`,depth:0,children:[]}}function we(){return{type:`break`}}function Te(){return{type:`html`,value:``}}function Ee(){return{type:`image`,title:null,url:``,alt:null}}function De(){return{type:`link`,title:null,url:``,children:[]}}function Oe(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ke(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Ae(){return{type:`paragraph`,children:[]}}function je(){return{type:`strong`,children:[]}}function Me(){return{type:`text`,value:``}}function Ne(){return{type:`thematicBreak`}}}function Ga(e){return{line:e.line,column:e.column,offset:e.offset}}function Ka(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Ka(e,r):qa(e,r)}}function qa(e,t){let n;for(n in t)if(Ha.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Ja(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+pn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+pn({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+pn({start:t.start,end:t.end})+`) is still open`)}function Ya(e){let t=this;t.parser=n;function n(n){return Ua(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Xa(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Za(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
5
+ `}]}function Qa(e,t){let n=t.value?t.value+`
6
+ `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function $a(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function eo(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function to(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Sr(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function no(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ro(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function io(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function ao(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return io(e,t);let i={src:Sr(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function oo(e,t){let n={src:Sr(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function so(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function co(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return io(e,t);let i={href:Sr(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function lo(e,t){let n={href:Sr(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function uo(e,t,n){let r=e.all(t),i=n?fo(n):po(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
7
+ `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
8
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function fo(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=po(n[r])}return t}function po(e){return e.spread??e.children.length>1}function mo(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function ho(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function go(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function _o(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vo(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=un(t.children[1]),o=ln(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function yo(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function bo(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var xo=9,So=32;function Co(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(wo(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(wo(t.slice(i),i>0,!1)),a.join(``)}function wo(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===xo||t===So;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===xo||t===So;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function To(e,t){let n={type:`text`,value:Co(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Eo(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Do={blockquote:Xa,break:Za,code:Qa,delete:$a,emphasis:eo,footnoteReference:to,heading:no,html:ro,imageReference:ao,image:oo,inlineCode:so,linkReference:co,link:lo,listItem:uo,list:mo,paragraph:ho,root:go,strong:_o,table:vo,tableCell:bo,tableRow:yo,text:To,thematicBreak:Eo,toml:Oo,yaml:Oo,definition:Oo,footnoteDefinition:Oo};function Oo(){}var ko=typeof self==`object`?self:globalThis,Ao=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new ko[e](t)},jo=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof ko[e]==`function`?Ao(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(Ao(a,o),i)};return r},Mo=e=>jo(new Map,e)(0),No=``,{toString:Po}={},{keys:Fo}=Object,Io=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Po.call(e).slice(8,-1);switch(n){case`Array`:return[1,No];case`Object`:return[2,No];case`Date`:return[3,No];case`RegExp`:return[4,No];case`Map`:return[5,No];case`Set`:return[6,No];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},Lo=([e,t])=>e===0&&(t===`function`||t===`symbol`),Ro=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=Io(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of Fo(r))(e||!Lo(Io(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,isNaN(r.getTime())?No:r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(Lo(Io(n))||Lo(Io(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Lo(Io(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},zo=(e,{json:t,lossy:n}={})=>{let r=[];return Ro(!(t||n),!!t,new Map,r)(e),r},Bo=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Mo(zo(e,t)):structuredClone(e):(e,t)=>Mo(zo(e,t));function Vo(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Ho(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Uo(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||Vo,r=e.options.footnoteBackLabel||Ho,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=Sr(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...Bo(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
9
+ `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
10
+ `}]}}var Wo=(function(e){if(e==null)return Yo;if(typeof e==`function`)return Jo(e);if(typeof e==`object`)return Array.isArray(e)?Go(e):Ko(e);if(typeof e==`string`)return qo(e);throw Error(`Expected function, string, or object as test`)});function Go(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Wo(e[n]);return Jo(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Ko(e){let t=e;return Jo(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function qo(e){return Jo(t);function t(t){return t&&t.type===e}}function Jo(e){return t;function t(t,n,r){return!!(Xo(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Yo(){return!0}function Xo(e){return typeof e==`object`&&!!e&&`type`in e}function Zo(e){return e}var Qo=[],$o=`skip`;function es(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=Wo(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+Zo(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=Qo,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=ts(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function ts(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?Qo:[e]}function ns(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),es(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var rs={}.hasOwnProperty,is={};function as(e,t){let n=t||is,r=new Map,i=new Map,a={all:s,applyData:ss,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Do,...n.handlers},one:o,options:n,patch:os,wrap:ls};return ns(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(rs.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=Bo(n);return r.children=a.all(e),r}return Bo(e)}return(a.options.unknownHandler||cs)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=us(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=us(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function os(e,t){e.position&&(t.position=fn(e))}function ss(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,Bo(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function cs(e,t){let n=t.data||{},r=`value`in t&&!(rs.call(n,`hProperties`)||rs.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ls(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
11
+ `});++r<e.length;)r&&n.push({type:`text`,value:`
12
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
13
+ `}),n}function us(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ds(e,t){let n=as(e,t),r=n.one(e,void 0),i=Uo(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
14
+ `},i)),a}function fs(e,t){return e&&`run`in e?async function(n,r){let i=ds(n,{file:r,...t});await e.run(i,r)}:function(n,r){return ds(n,{file:r,...e||t})}}function ps(e){if(e)throw e}var ms=n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function hs(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function gs(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?_s(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function _s(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var vs={basename:ys,dirname:bs,extname:xs,join:Ss,sep:`/`};function ys(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);Ts(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function bs(e){if(Ts(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function xs(e){Ts(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function Ss(...e){let t=-1,n;for(;++t<e.length;)Ts(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Cs(n)}function Cs(e){Ts(e);let t=e.codePointAt(0)===47,n=ws(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function ws(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Ts(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Es={cwd:Ds};function Ds(){return`/`}function Os(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function ks(e){if(typeof e==`string`)e=new URL(e);else if(!Os(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return As(e)}function As(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var js=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Ms=class{constructor(e){let t;t=e?Os(e)?{path:e}:typeof e==`string`||Is(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Es.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<js.length;){let e=js[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)js.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?vs.basename(this.path):void 0}set basename(e){Ps(e,`basename`),Ns(e,`basename`),this.path=vs.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?vs.dirname(this.path):void 0}set dirname(e){Fs(this.basename,`dirname`),this.path=vs.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?vs.extname(this.path):void 0}set extname(e){if(Ns(e,`extname`),Fs(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=vs.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Os(e)&&(e=ks(e)),Ps(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?vs.basename(this.path,this.extname):void 0}set stem(e){Ps(e,`stem`),Ns(e,`stem`),this.path=vs.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new _n(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Ns(e,t){if(e&&e.includes(vs.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+vs.sep+"`")}function Ps(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Fs(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Is(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Ls=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Rs=t(ms(),1),zs={}.hasOwnProperty,Bs=new class e extends Ls{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=gs()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Rs.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Us(`data`,this.frozen),this.namespace[e]=t,this):zs.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Us(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Ks(e),n=this.parser||this.Parser;return Vs(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Vs(`process`,this.parser||this.Parser),Hs(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Ks(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Js(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Vs(`processSync`,this.parser||this.Parser),Hs(`processSync`,this.compiler||this.Compiler),this.process(e,r),Gs(`processSync`,`process`,t),n;function r(e,r){t=!0,ps(e),n=r}}run(e,t,n){Ws(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Ks(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Gs(`runSync`,`run`,n),r;function i(e,t){ps(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Ks(t),r=this.compiler||this.Compiler;return Hs(`stringify`,r),Ws(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Us(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,Rs.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];hs(o)&&hs(r)&&(r=(0,Rs.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Vs(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Hs(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Us(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ws(e){if(!hs(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Gs(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ks(e){return qs(e)?e:new Ms(e)}function qs(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Js(e){return typeof e==`string`||Ys(e)}function Ys(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Xs=[],Zs={allowDangerousHtml:!0},Qs=/^(https?|ircs?|mailto|xmpp)$/i,$s=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function ec(e){let t=tc(e),n=nc(e);return rc(t.runSync(t.parse(n),n),e)}function tc(e){let t=e.rehypePlugins||Xs,n=e.remarkPlugins||Xs,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Zs}:Zs;return Bs().use(Ya).use(n).use(fs,r).use(t)}function nc(e){let t=e.children||``,n=new Ms;return typeof t==`string`?n.value=t:``+t,n}function rc(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||ic;for(let e of $s)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return ns(e,l),Tn(e,{Fragment:O.Fragment,components:i,ignoreInvalidStyle:!0,jsx:O.jsx,jsxs:O.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in qn)if(Object.hasOwn(qn,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=qn[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function ic(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Qs.test(e.slice(0,t))?e:``}var ac=`scope:locale`,oc=`scope:locale-change`,sc=`zh-CN`;function cc(){try{let e=window.localStorage.getItem(ac);if(e===`en`||e===`zh-CN`)return e}catch{}return sc}function lc(e){return window.addEventListener(`storage`,e),window.addEventListener(oc,e),()=>{window.removeEventListener(`storage`,e),window.removeEventListener(oc,e)}}var uc=(0,f.createContext)({locale:`zh-CN`,setLocale:()=>{},toggleLocale:()=>{},tr:e=>e});function dc({children:e}){let t=(0,f.useSyncExternalStore)(lc,cc,()=>`zh-CN`);function n(e){sc=e;try{window.localStorage.setItem(ac,e)}catch{}window.dispatchEvent(new Event(oc))}function r(){n(t===`zh-CN`?`en`:`zh-CN`)}return(0,O.jsx)(uc.Provider,{value:{locale:t,setLocale:n,toggleLocale:r,tr:(e,n)=>t===`en`?n:e},children:e})}function fc(){return(0,f.useContext)(uc)}var A=class e extends Error{constructor(t,n){var r=`KaTeX parse error: `+t,i,a,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;var c=s.slice(i,a).replace(/[^]/g,`$&̲`),l=i>15?`…`+s.slice(i-15,i):s.slice(0,i),u=a+15<s.length?s.slice(a,a+15)+`…`:s.slice(a);r+=l+c+u}super(r),this.name=`ParseError`,this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,e.prototype),this.position=i,i!=null&&a!=null&&(this.length=a-i),this.rawMessage=t}},pc=/([A-Z])/g,mc=e=>e.replace(pc,`-$1`).toLowerCase(),hc={"&":`&amp;`,">":`&gt;`,"<":`&lt;`,'"':`&quot;`,"'":`&#x27;`},gc=/[&><"']/g,_c=e=>String(e).replace(gc,e=>hc[e]),vc=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?vc(e.body[0]):e:e.type===`font`?vc(e.body):e,yc=new Set([`mathord`,`textord`,`atom`]),bc=e=>yc.has(vc(e).type),xc=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},Sc={displayMode:{type:`boolean`,description:`Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.`,cli:`-d, --display-mode`},output:{type:{enum:[`htmlAndMathml`,`html`,`mathml`]},description:`Determines the markup language of the output.`,cli:`-F, --format <type>`},leqno:{type:`boolean`,description:`Render display math in leqno style (left-justified tags).`},fleqn:{type:`boolean`,description:`Render display math flush left.`},throwOnError:{type:`boolean`,default:!0,cli:`-t, --no-throw-on-error`,cliDescription:`Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.`},errorColor:{type:`string`,default:`#cc0000`,cli:`-c, --error-color <color>`,cliDescription:`A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.`,cliProcessor:e=>`#`+e},macros:{type:`object`,cli:`-m, --macro <def>`,cliDescription:`Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).`,cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness <size>`,cliProcessor:parseFloat},colorIsTextColor:{type:`boolean`,description:`Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.`,cli:`-b, --color-is-text-color`},strict:{type:[{enum:[`warn`,`ignore`,`error`]},`boolean`,`function`],description:`Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.`,cli:`-S, --strict`,cliDefault:!1},trust:{type:[`boolean`,`function`],description:`Trust the input, enabling all HTML features such as \\url.`,cli:`-T, --trust`},maxSize:{type:`number`,default:1/0,description:`If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large`,processor:e=>Math.max(0,e),cli:`-s, --max-size <n>`,cliProcessor:parseInt},maxExpand:{type:`number`,default:1e3,description:`Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.`,processor:e=>Math.max(0,e),cli:`-e, --max-expand <n>`,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}};function Cc(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function wc(e){return e.default===void 0?Cc(Array.isArray(e.type)?e.type[0]:e.type):e.default}function Tc(e,t,n,r){var i=n[t];e[t]=i===void 0?wc(r):r.processor?r.processor(i):i}var Ec=class{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e||={};for(var t of Object.keys(Sc)){var n=Sc[t];n&&Tc(this,t,e,n)}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r==`function`&&(r=r(e,t,n)),!(!r||r===`ignore`)){if(r===!0||r===`error`)throw new A(`LaTeX-incompatible input and strict mode is set to 'error': `+(t+` [`+e+`]`),n);r===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){var t=xc(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},Dc=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return Ic[Lc[this.id]]}sub(){return Ic[Rc[this.id]]}fracNum(){return Ic[zc[this.id]]}fracDen(){return Ic[Bc[this.id]]}cramp(){return Ic[Vc[this.id]]}text(){return Ic[Hc[this.id]]}isTight(){return this.size>=2}},Oc=0,kc=1,Ac=2,jc=3,Mc=4,Nc=5,Pc=6,Fc=7,Ic=[new Dc(Oc,0,!1),new Dc(kc,0,!0),new Dc(Ac,1,!1),new Dc(jc,1,!0),new Dc(Mc,2,!1),new Dc(Nc,2,!0),new Dc(Pc,3,!1),new Dc(Fc,3,!0)],Lc=[Mc,Nc,Mc,Nc,Pc,Fc,Pc,Fc],Rc=[Nc,Nc,Nc,Nc,Fc,Fc,Fc,Fc],zc=[Ac,jc,Mc,Nc,Pc,Fc,Pc,Fc],Bc=[jc,jc,Nc,Nc,Fc,Fc,Fc,Fc],Vc=[kc,kc,jc,jc,Nc,Nc,Fc,Fc],Hc=[Oc,kc,Ac,jc,Ac,jc,Ac,jc],Uc={DISPLAY:Ic[Oc],TEXT:Ic[Ac],SCRIPT:Ic[Mc],SCRIPTSCRIPT:Ic[Pc]},Wc=[{name:`latin`,blocks:[[256,591],[768,879]]},{name:`cyrillic`,blocks:[[1024,1279]]},{name:`armenian`,blocks:[[1328,1423]]},{name:`brahmic`,blocks:[[2304,4255]]},{name:`georgian`,blocks:[[4256,4351]]},{name:`cjk`,blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:`hangul`,blocks:[[44032,55215]]}];function Gc(e){for(var t=0;t<Wc.length;t++)for(var n=Wc[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}var Kc=[];Wc.forEach(e=>e.blocks.forEach(e=>Kc.push(...e)));function qc(e){for(var t=0;t<Kc.length;t+=2)if(e>=Kc[t]&&e<=Kc[t+1])return!0;return!1}var Jc=e=>e+` `+e,Yc=80,Xc=function(e,t){return`M95,`+(622+e+t)+`
15
+ c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
16
+ c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
17
+ c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
18
+ s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
19
+ c69,-144,104.5,-217.7,106.5,-221
20
+ l`+e/2.075+` -`+e+`
21
+ c5.3,-9.3,12,-14,20,-14
22
+ H400000v`+(40+e)+`H845.2724
23
+ s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
24
+ c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
25
+ M`+(834+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},Zc=function(e,t){return`M263,`+(601+e+t)+`c0.7,0,18,39.7,52,119
26
+ c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
27
+ c340,-704.7,510.7,-1060.3,512,-1067
28
+ l`+e/2.084+` -`+e+`
29
+ c4.7,-7.3,11,-11,19,-11
30
+ H40000v`+(40+e)+`H1012.3
31
+ s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
32
+ c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
33
+ s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
34
+ c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
35
+ M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},Qc=function(e,t){return`M983 `+(10+e+t)+`
36
+ l`+e/3.13+` -`+e+`
37
+ c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
38
+ H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
39
+ s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
40
+ c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
41
+ c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
42
+ c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
43
+ c53.7,-170.3,84.5,-266.8,92.5,-289.5z
44
+ M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},$c=function(e,t){return`M424,`+(2398+e+t)+`
45
+ c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
46
+ c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
47
+ s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
48
+ s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
49
+ l`+e/4.223+` -`+e+`c4,-6.7,10,-10,18,-10 H400000
50
+ v`+(40+e)+`H1014.6
51
+ s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
52
+ c-2,6,-10,9,-24,9
53
+ c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+` `+t+`
54
+ h400000v`+(40+e)+`h-400000z`},el=function(e,t){return`M473,`+(2713+e+t)+`
55
+ c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+` -`+e+`
56
+ c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
57
+ s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
58
+ c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
59
+ c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
60
+ s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
61
+ 606zM`+(1001+e)+` `+t+`h400000v`+(40+e)+`H1017.7z`},tl=function(e){var t=e/2;return`M400000 `+e+` H0 L`+t+` 0 l65 45 L145 `+(e-80)+` H400000z`},nl=function(e,t,n){var r=n-54-t-e;return`M702 `+(e+t)+`H400000`+(40+e)+`
62
+ H742v`+r+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
63
+ h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
64
+ c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
65
+ 219 661 l218 661zM702 `+t+`H400000v`+(40+e)+`H742z`},rl=function(e,t,n){t=1e3*t;var r=``;switch(e){case`sqrtMain`:r=Xc(t,Yc);break;case`sqrtSize1`:r=Zc(t,Yc);break;case`sqrtSize2`:r=Qc(t,Yc);break;case`sqrtSize3`:r=$c(t,Yc);break;case`sqrtSize4`:r=el(t,Yc);break;case`sqrtTall`:r=nl(t,Yc,n)}return r},il=function(e,t){switch(e){case`⎜`:return Jc(`M291 0 H417 V`+t+` H291z`);case`∣`:return Jc(`M145 0 H188 V`+t+` H145z`);case`∥`:return Jc(`M145 0 H188 V`+t+` H145z`)+Jc(`M367 0 H410 V`+t+` H367z`);case`⎟`:return Jc(`M457 0 H583 V`+t+` H457z`);case`⎢`:return Jc(`M319 0 H403 V`+t+` H319z`);case`⎥`:return Jc(`M263 0 H347 V`+t+` H263z`);case`⎪`:return Jc(`M384 0 H504 V`+t+` H384z`);case`⏐`:return Jc(`M312 0 H355 V`+t+` H312z`);case`‖`:return Jc(`M257 0 H300 V`+t+` H257z`)+Jc(`M478 0 H521 V`+t+` H478z`);default:return``}},al={doubleleftarrow:`M262 157
66
+ l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
67
+ 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
68
+ 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
69
+ c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
70
+ 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
71
+ -86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
72
+ -2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
73
+ m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
74
+ -10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
75
+ 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
76
+ -33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
77
+ -17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
78
+ -13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
79
+ c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
80
+ -107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
81
+ 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
82
+ -5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
83
+ c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
84
+ 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
85
+ 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
86
+ l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
87
+ -45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
88
+ 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
89
+ 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
90
+ 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
91
+ -331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
92
+ H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
93
+ 435 0h399565z`,leftgroupunder:`M400000 262
94
+ H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
95
+ 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
96
+ -3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
97
+ -18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
98
+ -196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
99
+ 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
100
+ -4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
101
+ -10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
102
+ m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
103
+ 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
104
+ 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
105
+ -152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
106
+ 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
107
+ -2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
108
+ v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
109
+ -83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
110
+ -68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
111
+ 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:Jc(`M40 281 V428 H0 V94 H40 V241 H400000 v40z`),leftbracketunder:Jc(`M0 0 h120 V290 H399995 v120 H0z`),leftbracketover:Jc(`M0 440 h120 V150 H399995 v-120 H0z`),leftmapsto:Jc(`M40 281 V448H0V74H40V241H400000v40z`),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
112
+ -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
113
+ c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
114
+ 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:Jc(`M0 50 h400000 v40H0z m0 194h40000v40H0z`),midbrace:`M200428 334
115
+ c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
116
+ -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
117
+ 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
118
+ 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
119
+ c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
120
+ 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
121
+ 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
122
+ -5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
123
+ -320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
124
+ m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
125
+ 60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
126
+ -451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
127
+ m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
128
+ c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
129
+ -480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
130
+ m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
131
+ 85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
132
+ -707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
133
+ m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
134
+ c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
135
+ -16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
136
+ 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
137
+ 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
138
+ -40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
139
+ -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
140
+ 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
141
+ -6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
142
+ s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
143
+ c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
144
+ 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
145
+ -174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
146
+ 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
147
+ 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
148
+ -3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
149
+ -10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
150
+ 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
151
+ -18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
152
+ 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
153
+ m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
154
+ 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
155
+ -7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
156
+ -27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
157
+ 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
158
+ 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
159
+ -64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
160
+ m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
161
+ 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
162
+ -13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
163
+ 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:Jc(`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`),rightbracketunder:Jc(`M399995 0 h-120 V290 H0 v120 H400000z`),rightbracketover:Jc(`M399995 440 h-120 V150 H0 v-120 H399995z`),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
164
+ 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
165
+ -52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
166
+ -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
167
+ 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
168
+ -70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
169
+ -40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
170
+ -37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
171
+ 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
172
+ c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
173
+ 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
174
+ 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
175
+ -19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
176
+ 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
177
+ -2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
178
+ 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
179
+ 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
180
+ -68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
181
+ -8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
182
+ 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
183
+ c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
184
+ 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
185
+ -11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
186
+ 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
187
+ 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
188
+ -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
189
+ -11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
190
+ 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
191
+ 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
192
+ -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
193
+ 3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
194
+ 10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
195
+ -1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
196
+ -7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
197
+ H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
198
+ c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
199
+ c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
200
+ -11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
201
+ -11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
202
+ -11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
203
+ -5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
204
+ -11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
205
+ -11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
206
+ -11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
207
+ c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
208
+ c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
209
+ s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
210
+ 121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
211
+ s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
212
+ c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
213
+ M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
214
+ -27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
215
+ 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
216
+ -84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
217
+ -119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
218
+ -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
219
+ 151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
220
+ c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
221
+ c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
222
+ c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
223
+ c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
224
+ M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
225
+ c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
226
+ -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
227
+ c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
228
+ M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
229
+ c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
230
+ 1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
231
+ -152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
232
+ M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
233
+ c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
234
+ -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
235
+ c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
236
+ M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},ol=function(e,t){switch(e){case`lbrack`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v1759 v84 h347 v-84
237
+ H403z M403 1759 V0 H319 V1759 v`+t+` v1759 v84 h84z`;case`rbrack`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v1759 H0 v84 H347z
238
+ M347 1759 V0 H263 V1759 v`+t+` v1759 h84z`;case`vert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
239
+ c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
240
+ c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z`;case`doublevert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
241
+ c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
242
+ c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z
243
+ M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
244
+ c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
245
+ c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+` v585 h43z`;case`lfloor`:return`M319 602 V0 H403 V602 v`+t+` v1715 h263 v84 H319z
246
+ MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`rfloor`:return`M319 602 V0 H403 V602 v`+t+` v1799 H0 v-84 H319z
247
+ MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`lceil`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v602 h84z
248
+ M403 1759 V0 H319 V1759 v`+t+` v602 h84z`;case`rceil`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v602 h84z
249
+ M347 1759 V0 h-84 V1759 v`+t+` v602 h84z`;case`lparen`:return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
250
+ c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
251
+ -36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
252
+ 949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
253
+ c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
254
+ -544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
255
+ l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
256
+ -210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case`rparen`:return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
257
+ 63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
258
+ c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+`
259
+ c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
260
+ c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
261
+ c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
262
+ c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
263
+ l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
264
+ -470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error(`Unknown stretchy delimiter.`)}};function sl(e){return`toText`in e}var cl=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e=``,t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map(e=>{if(sl(e))return e.toText();throw Error(`Expected MathDomNode with toText, got `+e.constructor.name)}).join(``)}},ll={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},ul={ex:!0,em:!0,mu:!0},dl=function(e){return typeof e!=`string`&&(e=e.unit),e in ll||e in ul||e===`ex`},fl=function(e,t){var n;if(e.unit in ll)n=ll[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit===`mu`)n=t.fontMetrics().cssEmPerMu;else{var r=t.style.isTight()?t.havingStyle(t.style.text()):t;if(e.unit===`ex`)n=r.fontMetrics().xHeight;else if(e.unit===`em`)n=r.fontMetrics().quad;else throw new A(`Invalid unit: '`+e.unit+`'`);r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},j=function(e){return+e.toFixed(4)+`em`},pl=function(e){return e.filter(e=>e).join(` `)},ml=function(e){var t=``;for(var n of Object.keys(e)){var r=e[n];r!==void 0&&(t+=mc(n)+`:`+r+`;`)}return t},hl=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push(`mtight`);var r=t.getColor();r&&(this.style.color=r)}},gl=function(e){var t=document.createElement(e);t.className=pl(this.classes),Object.assign(t.style,this.style);for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t},_l=/[\s"'>/=\x00-\x1f]/,vl=function(e){var t=`<`+e;this.classes.length&&(t+=` class="`+_c(pl(this.classes))+`"`);var n=ml(this.style);n&&(t+=` style="`+_c(n)+`"`);for(var r of Object.keys(this.attributes)){if(_l.test(r))throw new A(`Invalid attribute name '`+r+`'`);t+=` `+r+`="`+_c(this.attributes[r])+`"`}t+=`>`;for(var i=0;i<this.children.length;i++)t+=this.children[i].toMarkup();return t+=`</`+e+`>`,t},yl=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,hl.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return gl.call(this,`span`)}toMarkup(){return vl.call(this,`span`)}},bl=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,hl.call(this,t,r),this.children=n||[],this.setAttribute(`href`,e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return gl.call(this,`a`)}toMarkup(){return vl.call(this,`a`)}},xl=class{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=[`mord`],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement(`img`);return e.src=this.src,e.alt=this.alt,e.className=`mord`,Object.assign(e.style,this.style),e}toMarkup(){var e=`<img src="`+_c(this.src)+`"`+(` alt="`+_c(this.alt)+`"`),t=ml(this.style);return t&&(e+=` style="`+_c(t)+`"`),e+=`'/>`,e}},Sl={î:`ı̂`,ï:`ı̈`,í:`ı́`,ì:`ı̀`},Cl=class{constructor(e,t,n,r,i,a,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var c=Gc(this.text.charCodeAt(0));c&&this.classes.push(c+`_fallback`),/[îïíì]/.test(this.text)&&(this.text=Sl[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;return this.italic>0&&(t=document.createElement(`span`),t.style.marginRight=j(this.italic)),this.classes.length>0&&(t||=document.createElement(`span`),t.className=pl(this.classes)),Object.keys(this.style).length>0&&(t||=document.createElement(`span`),Object.assign(t.style,this.style)),t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t=`<span`;this.classes.length&&(e=!0,t+=` class="`,t+=_c(pl(this.classes)),t+=`"`);var n=``;this.italic>0&&(n+=`margin-right:`+j(this.italic)+`;`),n+=ml(this.style),n&&(e=!0,t+=` style="`+_c(n)+`"`);var r=_c(this.text);return e?(t+=`>`,t+=r,t+=`</span>`,t):r}},wl=class{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e=`<svg xmlns="http://www.w3.org/2000/svg"`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+_c(this.attributes[t])+`"`;e+=`>`;for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+=`</svg>`,e}},Tl=class{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return this.alternate?e.setAttribute(`d`,this.alternate):e.setAttribute(`d`,al[this.pathName]),e}toMarkup(){return this.alternate?`<path d="`+_c(this.alternate)+`"/>`:`<path d="`+_c(al[this.pathName])+`"/>`}},El=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`line`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e=`<line`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+_c(this.attributes[t])+`"`;return e+=`/>`,e}};function Dl(e){if(e instanceof Cl)return e;throw Error(`Expected symbolNode but got `+String(e)+`.`)}function Ol(e){if(e instanceof yl)return e;throw Error(`Expected span<HtmlDomNode> but got `+String(e)+`.`)}var kl=e=>e instanceof yl||e instanceof bl||e instanceof cl,Al={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},jl={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Ml={Å:`A`,Ð:`D`,Þ:`o`,å:`a`,ð:`d`,þ:`o`,А:`A`,Б:`B`,В:`B`,Г:`F`,Д:`A`,Е:`E`,Ж:`K`,З:`3`,И:`N`,Й:`N`,К:`K`,Л:`N`,М:`M`,Н:`H`,О:`O`,П:`N`,Р:`P`,С:`C`,Т:`T`,У:`y`,Ф:`O`,Х:`X`,Ц:`U`,Ч:`h`,Ш:`W`,Щ:`W`,Ъ:`B`,Ы:`X`,Ь:`B`,Э:`3`,Ю:`X`,Я:`R`,а:`a`,б:`b`,в:`a`,г:`r`,д:`y`,е:`e`,ж:`m`,з:`e`,и:`n`,й:`n`,к:`n`,л:`n`,м:`m`,н:`n`,о:`o`,п:`n`,р:`p`,с:`c`,т:`o`,у:`y`,ф:`b`,х:`x`,ц:`n`,ч:`n`,ш:`w`,щ:`w`,ъ:`a`,ы:`m`,ь:`a`,э:`e`,ю:`m`,я:`r`};function Nl(e,t){Al[e]=t}function Pl(e,t,n){if(!Al[t])throw Error(`Font metrics not found for font: `+t+`.`);var r=e.charCodeAt(0),i=Al[t][r];if(!i&&e[0]in Ml&&(r=Ml[e[0]].charCodeAt(0),i=Al[t][r]),!i&&n===`text`&&qc(r)&&(i=Al[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var Fl={};function Il(e){var t=e>=5?0:e>=3?1:2;if(!Fl[t]){var n=Fl[t]={cssEmPerMu:jl.quad[t]/18};for(var r of Object.keys(jl))n[r]=jl[r][t]}return Fl[t]}var Ll={math:{},text:{}};function M(e,t,n,r,i,a){Ll[e][i]={font:t,group:n,replace:r},a&&r&&(Ll[e][r]=Ll[e][i])}var N=`math`,P=`text`,F=`main`,I=`ams`,Rl=`accent-token`,zl=`bin`,Bl=`close`,Vl=`inner`,Hl=`mathord`,Ul=`op-token`,Wl=`open`,Gl=`punct`,L=`rel`,Kl=`spacing`,R=`textord`;M(N,F,L,`≡`,`\\equiv`,!0),M(N,F,L,`≺`,`\\prec`,!0),M(N,F,L,`≻`,`\\succ`,!0),M(N,F,L,`∼`,`\\sim`,!0),M(N,F,L,`⊥`,`\\perp`),M(N,F,L,`⪯`,`\\preceq`,!0),M(N,F,L,`⪰`,`\\succeq`,!0),M(N,F,L,`≃`,`\\simeq`,!0),M(N,F,L,`∣`,`\\mid`,!0),M(N,F,L,`≪`,`\\ll`,!0),M(N,F,L,`≫`,`\\gg`,!0),M(N,F,L,`≍`,`\\asymp`,!0),M(N,F,L,`∥`,`\\parallel`),M(N,F,L,`⋈`,`\\bowtie`,!0),M(N,F,L,`⌣`,`\\smile`,!0),M(N,F,L,`⊑`,`\\sqsubseteq`,!0),M(N,F,L,`⊒`,`\\sqsupseteq`,!0),M(N,F,L,`≐`,`\\doteq`,!0),M(N,F,L,`⌢`,`\\frown`,!0),M(N,F,L,`∋`,`\\ni`,!0),M(N,F,L,`∝`,`\\propto`,!0),M(N,F,L,`⊢`,`\\vdash`,!0),M(N,F,L,`⊣`,`\\dashv`,!0),M(N,F,L,`∋`,`\\owns`),M(N,F,Gl,`.`,`\\ldotp`),M(N,F,Gl,`⋅`,`\\cdotp`),M(N,F,Gl,`⋅`,`·`),M(P,F,R,`⋅`,`·`),M(N,F,R,`#`,`\\#`),M(P,F,R,`#`,`\\#`),M(N,F,R,`&`,`\\&`),M(P,F,R,`&`,`\\&`),M(N,F,R,`ℵ`,`\\aleph`,!0),M(N,F,R,`∀`,`\\forall`,!0),M(N,F,R,`ℏ`,`\\hbar`,!0),M(N,F,R,`∃`,`\\exists`,!0),M(N,F,R,`∇`,`\\nabla`,!0),M(N,F,R,`♭`,`\\flat`,!0),M(N,F,R,`ℓ`,`\\ell`,!0),M(N,F,R,`♮`,`\\natural`,!0),M(N,F,R,`♣`,`\\clubsuit`,!0),M(N,F,R,`℘`,`\\wp`,!0),M(N,F,R,`♯`,`\\sharp`,!0),M(N,F,R,`♢`,`\\diamondsuit`,!0),M(N,F,R,`ℜ`,`\\Re`,!0),M(N,F,R,`♡`,`\\heartsuit`,!0),M(N,F,R,`ℑ`,`\\Im`,!0),M(N,F,R,`♠`,`\\spadesuit`,!0),M(N,F,R,`§`,`\\S`,!0),M(P,F,R,`§`,`\\S`),M(N,F,R,`¶`,`\\P`,!0),M(P,F,R,`¶`,`\\P`),M(N,F,R,`†`,`\\dag`),M(P,F,R,`†`,`\\dag`),M(P,F,R,`†`,`\\textdagger`),M(N,F,R,`‡`,`\\ddag`),M(P,F,R,`‡`,`\\ddag`),M(P,F,R,`‡`,`\\textdaggerdbl`),M(N,F,Bl,`⎱`,`\\rmoustache`,!0),M(N,F,Wl,`⎰`,`\\lmoustache`,!0),M(N,F,Bl,`⟯`,`\\rgroup`,!0),M(N,F,Wl,`⟮`,`\\lgroup`,!0),M(N,F,zl,`∓`,`\\mp`,!0),M(N,F,zl,`⊖`,`\\ominus`,!0),M(N,F,zl,`⊎`,`\\uplus`,!0),M(N,F,zl,`⊓`,`\\sqcap`,!0),M(N,F,zl,`∗`,`\\ast`),M(N,F,zl,`⊔`,`\\sqcup`,!0),M(N,F,zl,`◯`,`\\bigcirc`,!0),M(N,F,zl,`∙`,`\\bullet`,!0),M(N,F,zl,`‡`,`\\ddagger`),M(N,F,zl,`≀`,`\\wr`,!0),M(N,F,zl,`⨿`,`\\amalg`),M(N,F,zl,`&`,`\\And`),M(N,F,L,`⟵`,`\\longleftarrow`,!0),M(N,F,L,`⇐`,`\\Leftarrow`,!0),M(N,F,L,`⟸`,`\\Longleftarrow`,!0),M(N,F,L,`⟶`,`\\longrightarrow`,!0),M(N,F,L,`⇒`,`\\Rightarrow`,!0),M(N,F,L,`⟹`,`\\Longrightarrow`,!0),M(N,F,L,`↔`,`\\leftrightarrow`,!0),M(N,F,L,`⟷`,`\\longleftrightarrow`,!0),M(N,F,L,`⇔`,`\\Leftrightarrow`,!0),M(N,F,L,`⟺`,`\\Longleftrightarrow`,!0),M(N,F,L,`↦`,`\\mapsto`,!0),M(N,F,L,`⟼`,`\\longmapsto`,!0),M(N,F,L,`↗`,`\\nearrow`,!0),M(N,F,L,`↩`,`\\hookleftarrow`,!0),M(N,F,L,`↪`,`\\hookrightarrow`,!0),M(N,F,L,`↘`,`\\searrow`,!0),M(N,F,L,`↼`,`\\leftharpoonup`,!0),M(N,F,L,`⇀`,`\\rightharpoonup`,!0),M(N,F,L,`↙`,`\\swarrow`,!0),M(N,F,L,`↽`,`\\leftharpoondown`,!0),M(N,F,L,`⇁`,`\\rightharpoondown`,!0),M(N,F,L,`↖`,`\\nwarrow`,!0),M(N,F,L,`⇌`,`\\rightleftharpoons`,!0),M(N,I,L,`≮`,`\\nless`,!0),M(N,I,L,``,`\\@nleqslant`),M(N,I,L,``,`\\@nleqq`),M(N,I,L,`⪇`,`\\lneq`,!0),M(N,I,L,`≨`,`\\lneqq`,!0),M(N,I,L,``,`\\@lvertneqq`),M(N,I,L,`⋦`,`\\lnsim`,!0),M(N,I,L,`⪉`,`\\lnapprox`,!0),M(N,I,L,`⊀`,`\\nprec`,!0),M(N,I,L,`⋠`,`\\npreceq`,!0),M(N,I,L,`⋨`,`\\precnsim`,!0),M(N,I,L,`⪹`,`\\precnapprox`,!0),M(N,I,L,`≁`,`\\nsim`,!0),M(N,I,L,``,`\\@nshortmid`),M(N,I,L,`∤`,`\\nmid`,!0),M(N,I,L,`⊬`,`\\nvdash`,!0),M(N,I,L,`⊭`,`\\nvDash`,!0),M(N,I,L,`⋪`,`\\ntriangleleft`),M(N,I,L,`⋬`,`\\ntrianglelefteq`,!0),M(N,I,L,`⊊`,`\\subsetneq`,!0),M(N,I,L,``,`\\@varsubsetneq`),M(N,I,L,`⫋`,`\\subsetneqq`,!0),M(N,I,L,``,`\\@varsubsetneqq`),M(N,I,L,`≯`,`\\ngtr`,!0),M(N,I,L,``,`\\@ngeqslant`),M(N,I,L,``,`\\@ngeqq`),M(N,I,L,`⪈`,`\\gneq`,!0),M(N,I,L,`≩`,`\\gneqq`,!0),M(N,I,L,``,`\\@gvertneqq`),M(N,I,L,`⋧`,`\\gnsim`,!0),M(N,I,L,`⪊`,`\\gnapprox`,!0),M(N,I,L,`⊁`,`\\nsucc`,!0),M(N,I,L,`⋡`,`\\nsucceq`,!0),M(N,I,L,`⋩`,`\\succnsim`,!0),M(N,I,L,`⪺`,`\\succnapprox`,!0),M(N,I,L,`≆`,`\\ncong`,!0),M(N,I,L,``,`\\@nshortparallel`),M(N,I,L,`∦`,`\\nparallel`,!0),M(N,I,L,`⊯`,`\\nVDash`,!0),M(N,I,L,`⋫`,`\\ntriangleright`),M(N,I,L,`⋭`,`\\ntrianglerighteq`,!0),M(N,I,L,``,`\\@nsupseteqq`),M(N,I,L,`⊋`,`\\supsetneq`,!0),M(N,I,L,``,`\\@varsupsetneq`),M(N,I,L,`⫌`,`\\supsetneqq`,!0),M(N,I,L,``,`\\@varsupsetneqq`),M(N,I,L,`⊮`,`\\nVdash`,!0),M(N,I,L,`⪵`,`\\precneqq`,!0),M(N,I,L,`⪶`,`\\succneqq`,!0),M(N,I,L,``,`\\@nsubseteqq`),M(N,I,zl,`⊴`,`\\unlhd`),M(N,I,zl,`⊵`,`\\unrhd`),M(N,I,L,`↚`,`\\nleftarrow`,!0),M(N,I,L,`↛`,`\\nrightarrow`,!0),M(N,I,L,`⇍`,`\\nLeftarrow`,!0),M(N,I,L,`⇏`,`\\nRightarrow`,!0),M(N,I,L,`↮`,`\\nleftrightarrow`,!0),M(N,I,L,`⇎`,`\\nLeftrightarrow`,!0),M(N,I,L,`△`,`\\vartriangle`),M(N,I,R,`ℏ`,`\\hslash`),M(N,I,R,`▽`,`\\triangledown`),M(N,I,R,`◊`,`\\lozenge`),M(N,I,R,`Ⓢ`,`\\circledS`),M(N,I,R,`®`,`\\circledR`),M(P,I,R,`®`,`\\circledR`),M(N,I,R,`∡`,`\\measuredangle`,!0),M(N,I,R,`∄`,`\\nexists`),M(N,I,R,`℧`,`\\mho`),M(N,I,R,`Ⅎ`,`\\Finv`,!0),M(N,I,R,`⅁`,`\\Game`,!0),M(N,I,R,`‵`,`\\backprime`),M(N,I,R,`▲`,`\\blacktriangle`),M(N,I,R,`▼`,`\\blacktriangledown`),M(N,I,R,`■`,`\\blacksquare`),M(N,I,R,`⧫`,`\\blacklozenge`),M(N,I,R,`★`,`\\bigstar`),M(N,I,R,`∢`,`\\sphericalangle`,!0),M(N,I,R,`∁`,`\\complement`,!0),M(N,I,R,`ð`,`\\eth`,!0),M(P,F,R,`ð`,`ð`),M(N,I,R,`╱`,`\\diagup`),M(N,I,R,`╲`,`\\diagdown`),M(N,I,R,`□`,`\\square`),M(N,I,R,`□`,`\\Box`),M(N,I,R,`◊`,`\\Diamond`),M(N,I,R,`¥`,`\\yen`,!0),M(P,I,R,`¥`,`\\yen`,!0),M(N,I,R,`✓`,`\\checkmark`,!0),M(P,I,R,`✓`,`\\checkmark`),M(N,I,R,`ℶ`,`\\beth`,!0),M(N,I,R,`ℸ`,`\\daleth`,!0),M(N,I,R,`ℷ`,`\\gimel`,!0),M(N,I,R,`ϝ`,`\\digamma`,!0),M(N,I,R,`ϰ`,`\\varkappa`),M(N,I,Wl,`┌`,`\\@ulcorner`,!0),M(N,I,Bl,`┐`,`\\@urcorner`,!0),M(N,I,Wl,`└`,`\\@llcorner`,!0),M(N,I,Bl,`┘`,`\\@lrcorner`,!0),M(N,I,L,`≦`,`\\leqq`,!0),M(N,I,L,`⩽`,`\\leqslant`,!0),M(N,I,L,`⪕`,`\\eqslantless`,!0),M(N,I,L,`≲`,`\\lesssim`,!0),M(N,I,L,`⪅`,`\\lessapprox`,!0),M(N,I,L,`≊`,`\\approxeq`,!0),M(N,I,zl,`⋖`,`\\lessdot`),M(N,I,L,`⋘`,`\\lll`,!0),M(N,I,L,`≶`,`\\lessgtr`,!0),M(N,I,L,`⋚`,`\\lesseqgtr`,!0),M(N,I,L,`⪋`,`\\lesseqqgtr`,!0),M(N,I,L,`≑`,`\\doteqdot`),M(N,I,L,`≓`,`\\risingdotseq`,!0),M(N,I,L,`≒`,`\\fallingdotseq`,!0),M(N,I,L,`∽`,`\\backsim`,!0),M(N,I,L,`⋍`,`\\backsimeq`,!0),M(N,I,L,`⫅`,`\\subseteqq`,!0),M(N,I,L,`⋐`,`\\Subset`,!0),M(N,I,L,`⊏`,`\\sqsubset`,!0),M(N,I,L,`≼`,`\\preccurlyeq`,!0),M(N,I,L,`⋞`,`\\curlyeqprec`,!0),M(N,I,L,`≾`,`\\precsim`,!0),M(N,I,L,`⪷`,`\\precapprox`,!0),M(N,I,L,`⊲`,`\\vartriangleleft`),M(N,I,L,`⊴`,`\\trianglelefteq`),M(N,I,L,`⊨`,`\\vDash`,!0),M(N,I,L,`⊪`,`\\Vvdash`,!0),M(N,I,L,`⌣`,`\\smallsmile`),M(N,I,L,`⌢`,`\\smallfrown`),M(N,I,L,`≏`,`\\bumpeq`,!0),M(N,I,L,`≎`,`\\Bumpeq`,!0),M(N,I,L,`≧`,`\\geqq`,!0),M(N,I,L,`⩾`,`\\geqslant`,!0),M(N,I,L,`⪖`,`\\eqslantgtr`,!0),M(N,I,L,`≳`,`\\gtrsim`,!0),M(N,I,L,`⪆`,`\\gtrapprox`,!0),M(N,I,zl,`⋗`,`\\gtrdot`),M(N,I,L,`⋙`,`\\ggg`,!0),M(N,I,L,`≷`,`\\gtrless`,!0),M(N,I,L,`⋛`,`\\gtreqless`,!0),M(N,I,L,`⪌`,`\\gtreqqless`,!0),M(N,I,L,`≖`,`\\eqcirc`,!0),M(N,I,L,`≗`,`\\circeq`,!0),M(N,I,L,`≜`,`\\triangleq`,!0),M(N,I,L,`∼`,`\\thicksim`),M(N,I,L,`≈`,`\\thickapprox`),M(N,I,L,`⫆`,`\\supseteqq`,!0),M(N,I,L,`⋑`,`\\Supset`,!0),M(N,I,L,`⊐`,`\\sqsupset`,!0),M(N,I,L,`≽`,`\\succcurlyeq`,!0),M(N,I,L,`⋟`,`\\curlyeqsucc`,!0),M(N,I,L,`≿`,`\\succsim`,!0),M(N,I,L,`⪸`,`\\succapprox`,!0),M(N,I,L,`⊳`,`\\vartriangleright`),M(N,I,L,`⊵`,`\\trianglerighteq`),M(N,I,L,`⊩`,`\\Vdash`,!0),M(N,I,L,`∣`,`\\shortmid`),M(N,I,L,`∥`,`\\shortparallel`),M(N,I,L,`≬`,`\\between`,!0),M(N,I,L,`⋔`,`\\pitchfork`,!0),M(N,I,L,`∝`,`\\varpropto`),M(N,I,L,`◀`,`\\blacktriangleleft`),M(N,I,L,`∴`,`\\therefore`,!0),M(N,I,L,`∍`,`\\backepsilon`),M(N,I,L,`▶`,`\\blacktriangleright`),M(N,I,L,`∵`,`\\because`,!0),M(N,I,L,`⋘`,`\\llless`),M(N,I,L,`⋙`,`\\gggtr`),M(N,I,zl,`⊲`,`\\lhd`),M(N,I,zl,`⊳`,`\\rhd`),M(N,I,L,`≂`,`\\eqsim`,!0),M(N,F,L,`⋈`,`\\Join`),M(N,I,L,`≑`,`\\Doteq`,!0),M(N,I,zl,`∔`,`\\dotplus`,!0),M(N,I,zl,`∖`,`\\smallsetminus`),M(N,I,zl,`⋒`,`\\Cap`,!0),M(N,I,zl,`⋓`,`\\Cup`,!0),M(N,I,zl,`⩞`,`\\doublebarwedge`,!0),M(N,I,zl,`⊟`,`\\boxminus`,!0),M(N,I,zl,`⊞`,`\\boxplus`,!0),M(N,I,zl,`⋇`,`\\divideontimes`,!0),M(N,I,zl,`⋉`,`\\ltimes`,!0),M(N,I,zl,`⋊`,`\\rtimes`,!0),M(N,I,zl,`⋋`,`\\leftthreetimes`,!0),M(N,I,zl,`⋌`,`\\rightthreetimes`,!0),M(N,I,zl,`⋏`,`\\curlywedge`,!0),M(N,I,zl,`⋎`,`\\curlyvee`,!0),M(N,I,zl,`⊝`,`\\circleddash`,!0),M(N,I,zl,`⊛`,`\\circledast`,!0),M(N,I,zl,`⋅`,`\\centerdot`),M(N,I,zl,`⊺`,`\\intercal`,!0),M(N,I,zl,`⋒`,`\\doublecap`),M(N,I,zl,`⋓`,`\\doublecup`),M(N,I,zl,`⊠`,`\\boxtimes`,!0),M(N,I,L,`⇢`,`\\dashrightarrow`,!0),M(N,I,L,`⇠`,`\\dashleftarrow`,!0),M(N,I,L,`⇇`,`\\leftleftarrows`,!0),M(N,I,L,`⇆`,`\\leftrightarrows`,!0),M(N,I,L,`⇚`,`\\Lleftarrow`,!0),M(N,I,L,`↞`,`\\twoheadleftarrow`,!0),M(N,I,L,`↢`,`\\leftarrowtail`,!0),M(N,I,L,`↫`,`\\looparrowleft`,!0),M(N,I,L,`⇋`,`\\leftrightharpoons`,!0),M(N,I,L,`↶`,`\\curvearrowleft`,!0),M(N,I,L,`↺`,`\\circlearrowleft`,!0),M(N,I,L,`↰`,`\\Lsh`,!0),M(N,I,L,`⇈`,`\\upuparrows`,!0),M(N,I,L,`↿`,`\\upharpoonleft`,!0),M(N,I,L,`⇃`,`\\downharpoonleft`,!0),M(N,F,L,`⊶`,`\\origof`,!0),M(N,F,L,`⊷`,`\\imageof`,!0),M(N,I,L,`⊸`,`\\multimap`,!0),M(N,I,L,`↭`,`\\leftrightsquigarrow`,!0),M(N,I,L,`⇉`,`\\rightrightarrows`,!0),M(N,I,L,`⇄`,`\\rightleftarrows`,!0),M(N,I,L,`↠`,`\\twoheadrightarrow`,!0),M(N,I,L,`↣`,`\\rightarrowtail`,!0),M(N,I,L,`↬`,`\\looparrowright`,!0),M(N,I,L,`↷`,`\\curvearrowright`,!0),M(N,I,L,`↻`,`\\circlearrowright`,!0),M(N,I,L,`↱`,`\\Rsh`,!0),M(N,I,L,`⇊`,`\\downdownarrows`,!0),M(N,I,L,`↾`,`\\upharpoonright`,!0),M(N,I,L,`⇂`,`\\downharpoonright`,!0),M(N,I,L,`⇝`,`\\rightsquigarrow`,!0),M(N,I,L,`⇝`,`\\leadsto`),M(N,I,L,`⇛`,`\\Rrightarrow`,!0),M(N,I,L,`↾`,`\\restriction`),M(N,F,R,`‘`,"`"),M(N,F,R,`$`,`\\$`),M(P,F,R,`$`,`\\$`),M(P,F,R,`$`,`\\textdollar`),M(N,F,R,`%`,`\\%`),M(P,F,R,`%`,`\\%`),M(N,F,R,`_`,`\\_`),M(P,F,R,`_`,`\\_`),M(P,F,R,`_`,`\\textunderscore`),M(N,F,R,`∠`,`\\angle`,!0),M(N,F,R,`∞`,`\\infty`,!0),M(N,F,R,`′`,`\\prime`),M(N,F,R,`△`,`\\triangle`),M(N,F,R,`Γ`,`\\Gamma`,!0),M(N,F,R,`Δ`,`\\Delta`,!0),M(N,F,R,`Θ`,`\\Theta`,!0),M(N,F,R,`Λ`,`\\Lambda`,!0),M(N,F,R,`Ξ`,`\\Xi`,!0),M(N,F,R,`Π`,`\\Pi`,!0),M(N,F,R,`Σ`,`\\Sigma`,!0),M(N,F,R,`Υ`,`\\Upsilon`,!0),M(N,F,R,`Φ`,`\\Phi`,!0),M(N,F,R,`Ψ`,`\\Psi`,!0),M(N,F,R,`Ω`,`\\Omega`,!0),M(N,F,R,`A`,`Α`),M(N,F,R,`B`,`Β`),M(N,F,R,`E`,`Ε`),M(N,F,R,`Z`,`Ζ`),M(N,F,R,`H`,`Η`),M(N,F,R,`I`,`Ι`),M(N,F,R,`K`,`Κ`),M(N,F,R,`M`,`Μ`),M(N,F,R,`N`,`Ν`),M(N,F,R,`O`,`Ο`),M(N,F,R,`P`,`Ρ`),M(N,F,R,`T`,`Τ`),M(N,F,R,`X`,`Χ`),M(N,F,R,`¬`,`\\neg`,!0),M(N,F,R,`¬`,`\\lnot`),M(N,F,R,`⊤`,`\\top`),M(N,F,R,`⊥`,`\\bot`),M(N,F,R,`∅`,`\\emptyset`),M(N,I,R,`∅`,`\\varnothing`),M(N,F,Hl,`α`,`\\alpha`,!0),M(N,F,Hl,`β`,`\\beta`,!0),M(N,F,Hl,`γ`,`\\gamma`,!0),M(N,F,Hl,`δ`,`\\delta`,!0),M(N,F,Hl,`ϵ`,`\\epsilon`,!0),M(N,F,Hl,`ζ`,`\\zeta`,!0),M(N,F,Hl,`η`,`\\eta`,!0),M(N,F,Hl,`θ`,`\\theta`,!0),M(N,F,Hl,`ι`,`\\iota`,!0),M(N,F,Hl,`κ`,`\\kappa`,!0),M(N,F,Hl,`λ`,`\\lambda`,!0),M(N,F,Hl,`μ`,`\\mu`,!0),M(N,F,Hl,`ν`,`\\nu`,!0),M(N,F,Hl,`ξ`,`\\xi`,!0),M(N,F,Hl,`ο`,`\\omicron`,!0),M(N,F,Hl,`π`,`\\pi`,!0),M(N,F,Hl,`ρ`,`\\rho`,!0),M(N,F,Hl,`σ`,`\\sigma`,!0),M(N,F,Hl,`τ`,`\\tau`,!0),M(N,F,Hl,`υ`,`\\upsilon`,!0),M(N,F,Hl,`ϕ`,`\\phi`,!0),M(N,F,Hl,`χ`,`\\chi`,!0),M(N,F,Hl,`ψ`,`\\psi`,!0),M(N,F,Hl,`ω`,`\\omega`,!0),M(N,F,Hl,`ε`,`\\varepsilon`,!0),M(N,F,Hl,`ϑ`,`\\vartheta`,!0),M(N,F,Hl,`ϖ`,`\\varpi`,!0),M(N,F,Hl,`ϱ`,`\\varrho`,!0),M(N,F,Hl,`ς`,`\\varsigma`,!0),M(N,F,Hl,`φ`,`\\varphi`,!0),M(N,F,zl,`∗`,`*`,!0),M(N,F,zl,`+`,`+`),M(N,F,zl,`−`,`-`,!0),M(N,F,zl,`⋅`,`\\cdot`,!0),M(N,F,zl,`∘`,`\\circ`,!0),M(N,F,zl,`÷`,`\\div`,!0),M(N,F,zl,`±`,`\\pm`,!0),M(N,F,zl,`×`,`\\times`,!0),M(N,F,zl,`∩`,`\\cap`,!0),M(N,F,zl,`∪`,`\\cup`,!0),M(N,F,zl,`∖`,`\\setminus`,!0),M(N,F,zl,`∧`,`\\land`),M(N,F,zl,`∨`,`\\lor`),M(N,F,zl,`∧`,`\\wedge`,!0),M(N,F,zl,`∨`,`\\vee`,!0),M(N,F,R,`√`,`\\surd`),M(N,F,Wl,`⟨`,`\\langle`,!0),M(N,F,Wl,`∣`,`\\lvert`),M(N,F,Wl,`∥`,`\\lVert`),M(N,F,Bl,`?`,`?`),M(N,F,Bl,`!`,`!`),M(N,F,Bl,`⟩`,`\\rangle`,!0),M(N,F,Bl,`∣`,`\\rvert`),M(N,F,Bl,`∥`,`\\rVert`),M(N,F,L,`=`,`=`),M(N,F,L,`:`,`:`),M(N,F,L,`≈`,`\\approx`,!0),M(N,F,L,`≅`,`\\cong`,!0),M(N,F,L,`≥`,`\\ge`),M(N,F,L,`≥`,`\\geq`,!0),M(N,F,L,`←`,`\\gets`),M(N,F,L,`>`,`\\gt`,!0),M(N,F,L,`∈`,`\\in`,!0),M(N,F,L,``,`\\@not`),M(N,F,L,`⊂`,`\\subset`,!0),M(N,F,L,`⊃`,`\\supset`,!0),M(N,F,L,`⊆`,`\\subseteq`,!0),M(N,F,L,`⊇`,`\\supseteq`,!0),M(N,I,L,`⊈`,`\\nsubseteq`,!0),M(N,I,L,`⊉`,`\\nsupseteq`,!0),M(N,F,L,`⊨`,`\\models`),M(N,F,L,`←`,`\\leftarrow`,!0),M(N,F,L,`≤`,`\\le`),M(N,F,L,`≤`,`\\leq`,!0),M(N,F,L,`<`,`\\lt`,!0),M(N,F,L,`→`,`\\rightarrow`,!0),M(N,F,L,`→`,`\\to`),M(N,I,L,`≱`,`\\ngeq`,!0),M(N,I,L,`≰`,`\\nleq`,!0),M(N,F,Kl,`\xA0`,`\\ `),M(N,F,Kl,`\xA0`,`\\space`),M(N,F,Kl,`\xA0`,`\\nobreakspace`),M(P,F,Kl,`\xA0`,`\\ `),M(P,F,Kl,`\xA0`,` `),M(P,F,Kl,`\xA0`,`\\space`),M(P,F,Kl,`\xA0`,`\\nobreakspace`),M(N,F,Kl,``,`\\nobreak`),M(N,F,Kl,``,`\\allowbreak`),M(N,F,Gl,`,`,`,`),M(N,F,Gl,`;`,`;`),M(N,I,zl,`⊼`,`\\barwedge`,!0),M(N,I,zl,`⊻`,`\\veebar`,!0),M(N,F,zl,`⊙`,`\\odot`,!0),M(N,F,zl,`⊕`,`\\oplus`,!0),M(N,F,zl,`⊗`,`\\otimes`,!0),M(N,F,R,`∂`,`\\partial`,!0),M(N,F,zl,`⊘`,`\\oslash`,!0),M(N,I,zl,`⊚`,`\\circledcirc`,!0),M(N,I,zl,`⊡`,`\\boxdot`,!0),M(N,F,zl,`△`,`\\bigtriangleup`),M(N,F,zl,`▽`,`\\bigtriangledown`),M(N,F,zl,`†`,`\\dagger`),M(N,F,zl,`⋄`,`\\diamond`),M(N,F,zl,`⋆`,`\\star`),M(N,F,zl,`◃`,`\\triangleleft`),M(N,F,zl,`▹`,`\\triangleright`),M(N,F,Wl,`{`,`\\{`),M(P,F,R,`{`,`\\{`),M(P,F,R,`{`,`\\textbraceleft`),M(N,F,Bl,`}`,`\\}`),M(P,F,R,`}`,`\\}`),M(P,F,R,`}`,`\\textbraceright`),M(N,F,Wl,`{`,`\\lbrace`),M(N,F,Bl,`}`,`\\rbrace`),M(N,F,Wl,`[`,`\\lbrack`,!0),M(P,F,R,`[`,`\\lbrack`,!0),M(N,F,Bl,`]`,`\\rbrack`,!0),M(P,F,R,`]`,`\\rbrack`,!0),M(N,F,Wl,`(`,`\\lparen`,!0),M(N,F,Bl,`)`,`\\rparen`,!0),M(P,F,R,`<`,`\\textless`,!0),M(P,F,R,`>`,`\\textgreater`,!0),M(N,F,Wl,`⌊`,`\\lfloor`,!0),M(N,F,Bl,`⌋`,`\\rfloor`,!0),M(N,F,Wl,`⌈`,`\\lceil`,!0),M(N,F,Bl,`⌉`,`\\rceil`,!0),M(N,F,R,`\\`,`\\backslash`),M(N,F,R,`∣`,`|`),M(N,F,R,`∣`,`\\vert`),M(P,F,R,`|`,`\\textbar`,!0),M(N,F,R,`∥`,`\\|`),M(N,F,R,`∥`,`\\Vert`),M(P,F,R,`∥`,`\\textbardbl`),M(P,F,R,`~`,`\\textasciitilde`),M(P,F,R,`\\`,`\\textbackslash`),M(P,F,R,`^`,`\\textasciicircum`),M(N,F,L,`↑`,`\\uparrow`,!0),M(N,F,L,`⇑`,`\\Uparrow`,!0),M(N,F,L,`↓`,`\\downarrow`,!0),M(N,F,L,`⇓`,`\\Downarrow`,!0),M(N,F,L,`↕`,`\\updownarrow`,!0),M(N,F,L,`⇕`,`\\Updownarrow`,!0),M(N,F,Ul,`∐`,`\\coprod`),M(N,F,Ul,`⋁`,`\\bigvee`),M(N,F,Ul,`⋀`,`\\bigwedge`),M(N,F,Ul,`⨄`,`\\biguplus`),M(N,F,Ul,`⋂`,`\\bigcap`),M(N,F,Ul,`⋃`,`\\bigcup`),M(N,F,Ul,`∫`,`\\int`),M(N,F,Ul,`∫`,`\\intop`),M(N,F,Ul,`∬`,`\\iint`),M(N,F,Ul,`∭`,`\\iiint`),M(N,F,Ul,`∏`,`\\prod`),M(N,F,Ul,`∑`,`\\sum`),M(N,F,Ul,`⨂`,`\\bigotimes`),M(N,F,Ul,`⨁`,`\\bigoplus`),M(N,F,Ul,`⨀`,`\\bigodot`),M(N,F,Ul,`∮`,`\\oint`),M(N,F,Ul,`∯`,`\\oiint`),M(N,F,Ul,`∰`,`\\oiiint`),M(N,F,Ul,`⨆`,`\\bigsqcup`),M(N,F,Ul,`∫`,`\\smallint`),M(P,F,Vl,`…`,`\\textellipsis`),M(N,F,Vl,`…`,`\\mathellipsis`),M(P,F,Vl,`…`,`\\ldots`,!0),M(N,F,Vl,`…`,`\\ldots`,!0),M(N,F,Vl,`⋯`,`\\@cdots`,!0),M(N,F,Vl,`⋱`,`\\ddots`,!0),M(N,F,R,`⋮`,`\\varvdots`),M(P,F,R,`⋮`,`\\varvdots`),M(N,F,Rl,`ˊ`,`\\acute`),M(N,F,Rl,`ˋ`,`\\grave`),M(N,F,Rl,`¨`,`\\ddot`),M(N,F,Rl,`~`,`\\tilde`),M(N,F,Rl,`ˉ`,`\\bar`),M(N,F,Rl,`˘`,`\\breve`),M(N,F,Rl,`ˇ`,`\\check`),M(N,F,Rl,`^`,`\\hat`),M(N,F,Rl,`⃗`,`\\vec`),M(N,F,Rl,`˙`,`\\dot`),M(N,F,Rl,`˚`,`\\mathring`),M(N,F,Hl,``,`\\@imath`),M(N,F,Hl,``,`\\@jmath`),M(N,F,R,`ı`,`ı`),M(N,F,R,`ȷ`,`ȷ`),M(P,F,R,`ı`,`\\i`,!0),M(P,F,R,`ȷ`,`\\j`,!0),M(P,F,R,`ß`,`\\ss`,!0),M(P,F,R,`æ`,`\\ae`,!0),M(P,F,R,`œ`,`\\oe`,!0),M(P,F,R,`ø`,`\\o`,!0),M(P,F,R,`Æ`,`\\AE`,!0),M(P,F,R,`Œ`,`\\OE`,!0),M(P,F,R,`Ø`,`\\O`,!0),M(P,F,Rl,`ˊ`,`\\'`),M(P,F,Rl,`ˋ`,"\\`"),M(P,F,Rl,`ˆ`,`\\^`),M(P,F,Rl,`˜`,`\\~`),M(P,F,Rl,`ˉ`,`\\=`),M(P,F,Rl,`˘`,`\\u`),M(P,F,Rl,`˙`,`\\.`),M(P,F,Rl,`¸`,`\\c`),M(P,F,Rl,`˚`,`\\r`),M(P,F,Rl,`ˇ`,`\\v`),M(P,F,Rl,`¨`,`\\"`),M(P,F,Rl,`˝`,`\\H`),M(P,F,Rl,`◯`,`\\textcircled`);var ql={"--":!0,"---":!0,"``":!0,"''":!0};M(P,F,R,`–`,`--`,!0),M(P,F,R,`–`,`\\textendash`),M(P,F,R,`—`,`---`,!0),M(P,F,R,`—`,`\\textemdash`),M(P,F,R,`‘`,"`",!0),M(P,F,R,`‘`,`\\textquoteleft`),M(P,F,R,`’`,`'`,!0),M(P,F,R,`’`,`\\textquoteright`),M(P,F,R,`“`,"``",!0),M(P,F,R,`“`,`\\textquotedblleft`),M(P,F,R,`”`,`''`,!0),M(P,F,R,`”`,`\\textquotedblright`),M(N,F,R,`°`,`\\degree`,!0),M(P,F,R,`°`,`\\degree`),M(P,F,R,`°`,`\\textdegree`,!0),M(N,F,R,`£`,`\\pounds`),M(N,F,R,`£`,`\\mathsterling`,!0),M(P,F,R,`£`,`\\pounds`),M(P,F,R,`£`,`\\textsterling`,!0),M(N,I,R,`✠`,`\\maltese`),M(P,I,R,`✠`,`\\maltese`);for(var Jl=`0123456789/@."`,Yl=0;Yl<Jl.length;Yl++){var Xl=Jl.charAt(Yl);M(N,F,R,Xl,Xl)}for(var Zl=`0123456789!@*()-=+";:?/.,`,Ql=0;Ql<Zl.length;Ql++){var $l=Zl.charAt(Ql);M(P,F,R,$l,$l)}for(var eu=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,tu=0;tu<eu.length;tu++){var nu=eu.charAt(tu);M(N,F,Hl,nu,nu),M(P,F,R,nu,nu)}M(N,I,R,`C`,`ℂ`),M(P,I,R,`C`,`ℂ`),M(N,I,R,`H`,`ℍ`),M(P,I,R,`H`,`ℍ`),M(N,I,R,`N`,`ℕ`),M(P,I,R,`N`,`ℕ`),M(N,I,R,`P`,`ℙ`),M(P,I,R,`P`,`ℙ`),M(N,I,R,`Q`,`ℚ`),M(P,I,R,`Q`,`ℚ`),M(N,I,R,`R`,`ℝ`),M(P,I,R,`R`,`ℝ`),M(N,I,R,`Z`,`ℤ`),M(P,I,R,`Z`,`ℤ`),M(N,F,Hl,`h`,`ℎ`),M(P,F,Hl,`h`,`ℎ`);for(var ru,iu=0;iu<eu.length;iu++){var au=eu.charAt(iu);ru=String.fromCharCode(55349,56320+iu),M(N,F,Hl,au,ru),M(P,F,R,au,ru),ru=String.fromCharCode(55349,56372+iu),M(N,F,Hl,au,ru),M(P,F,R,au,ru),ru=String.fromCharCode(55349,56424+iu),M(N,F,Hl,au,ru),M(P,F,R,au,ru),ru=String.fromCharCode(55349,56580+iu),M(N,F,Hl,au,ru),M(P,F,R,au,ru),ru=String.fromCharCode(55349,56684+iu),M(N,F,Hl,au,ru),M(P,F,R,au,ru),ru=String.fromCharCode(55349,56736+iu),M(N,F,Hl,au,ru),M(P,F,R,au,ru),ru=String.fromCharCode(55349,56788+iu),M(N,F,Hl,au,ru),M(P,F,R,au,ru),ru=String.fromCharCode(55349,56840+iu),M(N,F,Hl,au,ru),M(P,F,R,au,ru),ru=String.fromCharCode(55349,56944+iu),M(N,F,Hl,au,ru),M(P,F,R,au,ru),iu<26&&(ru=String.fromCharCode(55349,56632+iu),M(N,F,Hl,au,ru),M(P,F,R,au,ru),ru=String.fromCharCode(55349,56476+iu),M(N,F,Hl,au,ru),M(P,F,R,au,ru))}ru=String.fromCharCode(55349,56668),M(N,F,Hl,`k`,ru),M(P,F,R,`k`,ru);for(var ou=0;ou<10;ou++){var su=ou.toString();ru=String.fromCharCode(55349,57294+ou),M(N,F,Hl,su,ru),M(P,F,R,su,ru),ru=String.fromCharCode(55349,57314+ou),M(N,F,Hl,su,ru),M(P,F,R,su,ru),ru=String.fromCharCode(55349,57324+ou),M(N,F,Hl,su,ru),M(P,F,R,su,ru),ru=String.fromCharCode(55349,57334+ou),M(N,F,Hl,su,ru),M(P,F,R,su,ru)}for(var cu=`ÐÞþ`,lu=0;lu<cu.length;lu++){var uu=cu.charAt(lu);M(N,F,Hl,uu,uu),M(P,F,R,uu,uu)}var du={mathClass:`mathbf`,textClass:`textbf`,font:`Main-Bold`},fu={mathClass:`mathnormal`,textClass:`textit`,font:`Math-Italic`},pu={mathClass:`boldsymbol`,textClass:`boldsymbol`,font:`Main-BoldItalic`},mu={mathClass:`mathscr`,textClass:`textscr`,font:`Script-Regular`},hu={mathClass:``,textClass:``,font:``},gu={mathClass:`mathfrak`,textClass:`textfrak`,font:`Fraktur-Regular`},_u={mathClass:`mathbb`,textClass:`textbb`,font:`AMS-Regular`},vu={mathClass:`mathboldfrak`,textClass:`textboldfrak`,font:`Fraktur-Regular`},yu={mathClass:`mathsf`,textClass:`textsf`,font:`SansSerif-Regular`},bu={mathClass:`mathboldsf`,textClass:`textboldsf`,font:`SansSerif-Bold`},xu={mathClass:`mathitsf`,textClass:`textitsf`,font:`SansSerif-Italic`},Su={mathClass:`mathtt`,textClass:`texttt`,font:`Typewriter-Regular`},Cu=[du,du,fu,fu,pu,pu,mu,hu,hu,hu,gu,gu,_u,_u,vu,vu,yu,yu,bu,bu,xu,xu,hu,hu,Su,Su],wu=[du,hu,yu,bu,Su],Tu=e=>{var t=e.charCodeAt(0),n=e.charCodeAt(1),r=(t-55296)*1024+(n-56320)+65536;if(119808<=r&&r<120484)return Cu[Math.floor((r-119808)/26)];if(120782<=r&&r<=120831)return wu[Math.floor((r-120782)/10)];if(r===120485||r===120486)return Cu[0];if(120486<r&&r<120782)return hu;throw new A(`Unsupported character: `+e)},Eu=function(e,t,n){if(Ll[n][e]){var r=Ll[n][e].replace;r&&(e=r)}return{value:e,metrics:Pl(e,t,n)}},Du=function(e,t,n,r,i){var a=Eu(e,t,n),o=a.metrics;e=a.value;var s;if(o){var c=o.italic;(n===`text`||r&&r.font===`mathit`)&&(c=0),s=new Cl(e,o.height,o.depth,c,o.skew,o.width,i)}else typeof console<`u`&&console.warn(`No character metrics `+(`for '`+e+`' in style '`+t+`' and mode '`+n+`'`)),s=new Cl(e,0,0,0,0,0,i);if(r){s.maxFontSize=r.sizeMultiplier,r.style.isTight()&&s.classes.push(`mtight`);var l=r.getColor();l&&(s.style.color=l)}return s},Ou=function(e,t,n,r){return r===void 0&&(r=[]),n.font===`boldsymbol`&&Eu(e,`Main-Bold`,t).metrics?Du(e,`Main-Bold`,t,n,r.concat([`mathbf`])):e===`\\`||Ll[t][e].font===`main`?Du(e,`Main-Regular`,t,n,r):Du(e,`AMS-Regular`,t,n,r.concat([`amsrm`]))},ku=function(e,t,n){return n!==`textord`&&Eu(e,`Math-BoldItalic`,t).metrics?{fontName:`Math-BoldItalic`,fontClass:`boldsymbol`}:{fontName:`Main-Bold`,fontClass:`mathbf`}},Au=function(e,t){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=``;if(i.charCodeAt(0)===55349){var m=Tu(i);f=m.font,p=m[r+`Class`]}if(f)return Du(i,f,r,t,a.concat(p));if(d){var h,g;if(d===`boldsymbol`){var _=ku(i,r,n);h=_.fontName,g=[_.fontClass]}else u?(h=Uu[o].fontName,g=[o]):(h=Hu(s,c,l),g=[s,c,l]);if(Eu(i,h,r).metrics)return Du(i,h,r,t,a.concat(g));if(Object.prototype.hasOwnProperty.call(ql,i)&&h.slice(0,10)===`Typewriter`){for(var v=[],y=0;y<i.length;y++)v.push(Du(i[y],h,r,t,a.concat(g)));return Lu(v)}}if(n===`mathord`)return Du(i,`Math-Italic`,r,t,a.concat([`mathnormal`]));if(n===`textord`){var b=Ll[r][i]&&Ll[r][i].font;if(b===`ams`)return Du(i,Hu(`amsrm`,c,l),r,t,a.concat(`amsrm`,c,l));if(b===`main`||!b)return Du(i,Hu(`textrm`,c,l),r,t,a.concat(c,l));var x=Hu(b,c,l);return Du(i,x,r,t,a.concat(x,c,l))}else throw Error(`unexpected type: `+n+` in makeOrd`)},ju=(e,t)=>{if(pl(e.classes)!==pl(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass(`mathnormal`))return!1;if(e.classes.length===1){var n=e.classes[0];if(n===`mbin`||n===`mord`)return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},Mu=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof Cl&&r instanceof Cl&&ju(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e},Nu=function(e){for(var t=0,n=0,r=0,i=0;i<e.children.length;i++){var a=e.children[i];a.height>t&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},z=function(e,t,n,r){var i=new yl(e,t,n,r);return Nu(i),i},Pu=(e,t,n,r)=>new yl(e,t,n,r),Fu=function(e,t,n){var r=z([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=j(r.height),r.maxFontSize=1,r},Iu=function(e,t,n,r){var i=new bl(e,t,n,r);return Nu(i),i},Lu=function(e){var t=new cl(e);return Nu(t),t},Ru=function(e,t){return e instanceof cl?z([],[e],t):e},zu=function(e){if(e.positionType===`individualShift`){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,a=1;a<t.length;a++){var o=-t[a].shift-i-t[a].elem.depth,s=o-(t[a-1].elem.height+t[a-1].elem.depth);i+=o,n.push({type:`kern`,size:s}),n.push(t[a])}return{children:n,depth:r}}var c;if(e.positionType===`top`){for(var l=e.positionData,u=0;u<e.children.length;u++){var d=e.children[u];l-=d.type===`kern`?d.size:d.elem.height+d.elem.depth}c=l}else if(e.positionType===`bottom`)c=-e.positionData;else{var f=e.children[0];if(f.type!==`elem`)throw Error(`First child must have type "elem".`);if(e.positionType===`shift`)c=-f.elem.depth-e.positionData;else if(e.positionType===`firstBaseline`)c=-f.elem.depth;else throw Error(`Invalid positionType `+e.positionType+`.`)}return{children:e.children,depth:c}},Bu=function(e,t){for(var n=zu(e),r=n.children,i=n.depth,a=0,o=0;o<r.length;o++){var s=r[o];if(s.type===`elem`){var c=s.elem;a=Math.max(a,c.maxFontSize,c.height)}}a+=2;var l=z([`pstrut`],[]);l.style.height=j(a);for(var u=[],d=i,f=i,p=i,m=0;m<r.length;m++){var h=r[m];if(h.type===`kern`)p+=h.size;else{var g=h.elem,_=h.wrapperClasses||[],v=h.wrapperStyle||{},y=z(_,[l,g],void 0,v);y.style.top=j(-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}d=Math.min(d,p),f=Math.max(f,p)}var b=z([`vlist`],u);b.style.height=j(f);var x;if(d<0){var S=z([`vlist`],[z([],[])]);S.style.height=j(-d),x=[z([`vlist-r`],[b,z([`vlist-s`],[new Cl(`​`)])]),z([`vlist-r`],[S])]}else x=[z([`vlist-r`],[b])];var C=z([`vlist-t`],x);return x.length===2&&C.classes.push(`vlist-t2`),C.height=f,C.depth=-d,C},Vu=(e,t)=>{var n=z([`mspace`],[],t),r=fl(e,t);return n.style.marginRight=j(r),n},Hu=(e,t,n)=>{var r,i;switch(e){case`amsrm`:r=`AMS`;break;case`textrm`:r=`Main`;break;case`textsf`:r=`SansSerif`;break;case`texttt`:r=`Typewriter`;break;default:r=e}return i=t===`textbf`&&n===`textit`?`BoldItalic`:t===`textbf`?`Bold`:n===`textit`?`Italic`:`Regular`,r+`-`+i},Uu={mathbf:{variant:`bold`,fontName:`Main-Bold`},mathrm:{variant:`normal`,fontName:`Main-Regular`},textit:{variant:`italic`,fontName:`Main-Italic`},mathit:{variant:`italic`,fontName:`Main-Italic`},mathnormal:{variant:`italic`,fontName:`Math-Italic`},mathsfit:{variant:`sans-serif-italic`,fontName:`SansSerif-Italic`},mathbb:{variant:`double-struck`,fontName:`AMS-Regular`},mathcal:{variant:`script`,fontName:`Caligraphic-Regular`},mathfrak:{variant:`fraktur`,fontName:`Fraktur-Regular`},mathscr:{variant:`script`,fontName:`Script-Regular`},mathsf:{variant:`sans-serif`,fontName:`SansSerif-Regular`},mathtt:{variant:`monospace`,fontName:`Typewriter-Regular`}},Wu={vec:[`vec`,.471,.714],oiintSize1:[`oiintSize1`,.957,.499],oiintSize2:[`oiintSize2`,1.472,.659],oiiintSize1:[`oiiintSize1`,1.304,.499],oiiintSize2:[`oiiintSize2`,1.98,.659]},Gu=function(e,t){var n=Wu[e],r=n[0],i=n[1],a=n[2],o=Pu([`katex-overlay`],[new wl([new Tl(r)],{width:j(i),height:j(a),style:`width:`+j(i),viewBox:`0 0 `+1e3*i+` `+1e3*a,preserveAspectRatio:`xMinYMin`})],t);return o.height=a,o.style.height=j(a),o.style.width=j(i),o},Ku={number:3,unit:`mu`},qu={number:4,unit:`mu`},Ju={number:5,unit:`mu`},Yu={mord:{mop:Ku,mbin:qu,mrel:Ju,minner:Ku},mop:{mord:Ku,mop:Ku,mrel:Ju,minner:Ku},mbin:{mord:qu,mop:qu,mopen:qu,minner:qu},mrel:{mord:Ju,mop:Ju,mopen:Ju,minner:Ju},mopen:{},mclose:{mop:Ku,mbin:qu,mrel:Ju,minner:Ku},mpunct:{mord:Ku,mop:Ku,mrel:Ju,mopen:Ku,mclose:Ku,mpunct:Ku,minner:Ku},minner:{mord:Ku,mop:Ku,mbin:qu,mrel:Ju,mopen:Ku,mpunct:Ku,minner:Ku}},Xu={mord:{mop:Ku},mop:{mord:Ku,mop:Ku},mbin:{},mrel:{},mopen:{},mclose:{mop:Ku},mpunct:{},minner:{mop:Ku}},Zu={},Qu={},$u={};function ed(e){for(var t=e.type,n=e.names,r=e.htmlBuilder,i=e.mathmlBuilder,a=0;a<n.length;++a)Zu[n[a]]=e;t&&(r&&(Qu[t]=r),i&&($u[t]=i))}function td(e){var t=e.type,n=e.htmlBuilder,r=e.mathmlBuilder;n&&(Qu[t]=n),r&&($u[t]=r)}var nd=function(e){return e.type===`ordgroup`&&e.body.length===1?e.body[0]:e},rd=function(e){return e.type===`ordgroup`?e.body:[e]},id=new Set([`leftmost`,`mbin`,`mopen`,`mrel`,`mop`,`mpunct`]),ad=new Set([`rightmost`,`mrel`,`mclose`,`mpunct`]),od={display:Uc.DISPLAY,text:Uc.TEXT,script:Uc.SCRIPT,scriptscript:Uc.SCRIPTSCRIPT},sd={mord:`mord`,mop:`mop`,mbin:`mbin`,mrel:`mrel`,mopen:`mopen`,mclose:`mclose`,mpunct:`mpunct`,minner:`minner`},cd=function(e,t,n,r){r===void 0&&(r=[null,null]);for(var i=[],a=0;a<e.length;a++){var o=md(e[a],t);if(o instanceof cl){var s=o.children;i.push(...s)}else i.push(o)}if(Mu(i),!n)return i;var c=t;if(e.length===1){var l=e[0];l.type===`sizing`?c=t.havingSize(l.size):l.type===`styling`&&(c=t.havingStyle(od[l.style]))}var u=z([r[0]||`leftmost`],[],t),d=z([r[1]||`rightmost`],[],t),f=n===`root`;return ld(i,(e,t)=>{var n=t.classes[0],r=e.classes[0];n===`mbin`&&ad.has(r)?t.classes[0]=`mord`:r===`mbin`&&id.has(n)&&(e.classes[0]=`mord`)},{node:u},d,f),ld(i,(e,t)=>{var n=fd(t),r=fd(e),i=n&&r?e.hasClass(`mtight`)?Xu[n]?.[r]:Yu[n]?.[r]:null;if(i)return Vu(i,c)},{node:u},d,f),i},ld=function(e,t,n,r,i){r&&e.push(r);for(var a=0;a<e.length;a++){var o=e[a],s=ud(o);if(s){ld(s.children,t,n,null,i);continue}var c=!o.hasClass(`mspace`);if(c){var l=t(o,n.node);l&&(n.insertAfter?n.insertAfter(l):(e.unshift(l),a++))}c?n.node=o:i&&o.hasClass(`katex-newline`)&&(n.node=z([`leftmost`])),n.insertAfter=(t=>n=>{e.splice(t+1,0,n),a++})(a)}r&&e.pop()},ud=function(e){return e instanceof cl||e instanceof bl||e instanceof yl&&e.hasClass(`enclosing`)?e:null},dd=function(e,t){var n=ud(e);if(n){var r=n.children;if(r.length){if(t===`right`)return dd(r[r.length-1],`right`);if(t===`left`)return dd(r[0],`left`)}}return e},fd=function(e,t){return e?(t&&(e=dd(e,t)),sd[e.classes[0]]||null):null},pd=function(e,t){var n=[`nulldelimiter`].concat(e.baseSizingClasses());return z(t.concat(n))},md=function(e,t,n){if(!e)return z();if(Qu[e.type]){var r=Qu[e.type](e,t);if(n&&t.size!==n.size){r=z(t.sizingClasses(n),[r],t);var i=t.sizeMultiplier/n.sizeMultiplier;r.height*=i,r.depth*=i}return r}else throw new A(`Got group of unknown type: '`+e.type+`'`)};function hd(e,t){var n=z([`katex-base`],e,t),r=z([`katex-strut`]);return r.style.height=j(n.height+n.depth),n.depth&&(r.style.verticalAlign=j(-n.depth)),n.children.unshift(r),n}function gd(e,t){var n=null;e.length===1&&e[0].type===`tag`&&(n=e[0].tag,e=e[0].body);var r=cd(e,t,`root`),i;r.length===2&&r[1].hasClass(`katex-tag`)&&(i=r.pop());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`)){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);c||(a.push(hd(o,t)),o=[])}else r[s].hasClass(`katex-newline`)&&(o.pop(),o.length>0&&(a.push(hd(o,t)),o=[]),a.push(r[s]));o.length>0&&a.push(hd(o,t));var l;n?(l=hd(cd(n,t,!0),t),l.classes=[`katex-tag`],a.push(l)):i&&a.push(i);var u=z([`katex-html`],a);if(u.setAttribute(`aria-hidden`,`true`),l){var d=l.children[0];d.style.height=j(u.height+u.depth),u.depth&&(d.style.verticalAlign=j(-u.depth))}return u}function _d(e){return new cl(e)}var B=class{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,this.type);for(var t of Object.entries(this.attributes)){var n=t[0],r=t[1];e.setAttribute(n,r)}this.classes.length>0&&(e.className=pl(this.classes));for(var i=0;i<this.children.length;i++)if(this.children[i]instanceof vd&&this.children[i+1]instanceof vd){for(var a=this.children[i].toText()+this.children[++i].toText();this.children[i+1]instanceof vd;)a+=this.children[++i].toText();e.appendChild(new vd(a).toNode())}else e.appendChild(this.children[i].toNode());return e}toMarkup(){var e=`<`+this.type;for(var t of Object.entries(this.attributes)){var n=t[0],r=t[1];e+=` `+n+`="`,e+=_c(r),e+=`"`}this.classes.length>0&&(e+=` class ="`+_c(pl(this.classes))+`"`),e+=`>`;for(var i=0;i<this.children.length;i++)e+=this.children[i].toMarkup();return e+=`</`+this.type+`>`,e}toText(){return this.children.map(e=>e.toText()).join(``)}},vd=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return _c(this.toText())}toText(){return this.text}},yd=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character=` `:e>=.1666&&e<=.1667?this.character=` `:e>=.2222&&e<=.2223?this.character=` `:e>=.2777&&e<=.2778?this.character=`  `:e>=-.05556&&e<=-.05555?this.character=` ⁣`:e>=-.1667&&e<=-.1666?this.character=` ⁣`:e>=-.2223&&e<=-.2222?this.character=` ⁣`:e>=-.2778&&e<=-.2777?this.character=` ⁣`:this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`mspace`);return e.setAttribute(`width`,j(this.width)),e}toMarkup(){return this.character?`<mtext>`+this.character+`</mtext>`:`<mspace width="`+j(this.width)+`"/>`}toText(){return this.character?this.character:` `}},bd=new Set([`\\imath`,`\\jmath`]),xd=new Set([`mrow`,`mtable`]),Sd=function(e,t,n){var r,i;return Ll[t][e]&&Ll[t][e].replace&&e.charCodeAt(0)!==55349&&!(Object.prototype.hasOwnProperty.call(ql,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=Ll[t][e].replace),new vd(e)},Cd=function(e){return e.length===1?e[0]:new B(`mrow`,e)},wd={mathit:`italic`,boldsymbol:e=>e.type===`textord`?`bold`:`bold-italic`,mathbf:`bold`,mathbb:`double-struck`,mathsfit:`sans-serif-italic`,mathfrak:`fraktur`,mathscr:`script`,mathcal:`script`,mathsf:`sans-serif`,mathtt:`monospace`},Td=(e,t)=>{if(e.mode===`text`){if(t.fontFamily===`texttt`)return`monospace`;if(t.fontFamily===`textsf`)return t.fontShape===`textit`&&t.fontWeight===`textbf`?`sans-serif-bold-italic`:t.fontShape===`textit`?`sans-serif-italic`:t.fontWeight===`textbf`?`bold-sans-serif`:`sans-serif`;if(t.fontShape===`textit`&&t.fontWeight===`textbf`)return`bold-italic`;if(t.fontShape===`textit`)return`italic`;if(t.fontWeight===`textbf`)return`bold`}var n=t.font;if(!n||n===`mathnormal`)return null;var r=e.mode,i=wd[n];if(i)return typeof i==`function`?i(e):i;var a=e.text;if(bd.has(a))return null;if(Ll[r][a]){var o=Ll[r][a].replace;o&&(a=o)}var s=Uu[n].fontName;return Pl(a,s,r)?Uu[n].variant:null};function Ed(e){if(!e)return!1;if(e.type===`mi`&&e.children.length===1){var t=e.children[0];return t instanceof vd&&t.text===`.`}else if(e.type===`mo`&&e.children.length===1&&e.getAttribute(`separator`)===`true`&&e.getAttribute(`lspace`)===`0em`&&e.getAttribute(`rspace`)===`0em`){var n=e.children[0];return n instanceof vd&&n.text===`,`}else return!1}var Dd=function(e,t,n){if(e.length===1){var r=kd(e[0],t);return n&&r instanceof B&&r.type===`mo`&&(r.setAttribute(`lspace`,`0em`),r.setAttribute(`rspace`,`0em`)),[r]}for(var i=[],a,o=0;o<e.length;o++){var s=kd(e[o],t);if(s instanceof B&&a instanceof B){if(s.type===`mtext`&&a.type===`mtext`&&s.getAttribute(`mathvariant`)===a.getAttribute(`mathvariant`)){a.children.push(...s.children);continue}else if(s.type===`mn`&&a.type===`mn`){a.children.push(...s.children);continue}else if(Ed(s)&&a.type===`mn`){a.children.push(...s.children);continue}else if(s.type===`mn`&&Ed(a))s.children=[...a.children,...s.children],i.pop();else if((s.type===`msup`||s.type===`msub`)&&s.children.length>=1&&(a.type===`mn`||Ed(a))){var c=s.children[0];c instanceof B&&c.type===`mn`&&(c.children=[...a.children,...c.children],i.pop())}else if(a.type===`mi`&&a.children.length===1){var l=a.children[0];if(l instanceof vd&&l.text===`̸`&&(s.type===`mo`||s.type===`mi`||s.type===`mn`)){var u=s.children[0];u instanceof vd&&u.text.length>0&&(u.text=u.text.slice(0,1)+`̸`+u.text.slice(1),i.pop())}}}i.push(s),a=s}return i},Od=function(e,t,n){return Cd(Dd(e,t,n))},kd=function(e,t){if(!e)return new B(`mrow`);if($u[e.type])return $u[e.type](e,t);throw new A(`Got group of unknown type: '`+e.type+`'`)};function Ad(e,t,n,r,i){var a=Dd(e,n),o=a.length===1&&a[0]instanceof B&&xd.has(a[0].type)?a[0]:new B(`mrow`,a),s=new B(`annotation`,[new vd(t)]);s.setAttribute(`encoding`,`application/x-tex`);var c=new B(`math`,[new B(`semantics`,[o,s])]);return c.setAttribute(`xmlns`,`http://www.w3.org/1998/Math/MathML`),r&&c.setAttribute(`display`,`block`),z([i?`katex`:`katex-mathml`],[c])}var jd=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Md=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Nd=function(e,t){return t.size<2?e:jd[e-1][t.size-1]},Pd=class e{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||``,this.fontFamily=t.fontFamily||``,this.fontWeight=t.fontWeight||``,this.fontShape=t.fontShape||``,this.sizeMultiplier=Md[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(n,t),new e(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Nd(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Md[e-1]})}havingBaseStyle(t){t||=this.style.text();var n=Nd(e.BASESIZE,t);return this.size===n&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:``})}withTextFontWeight(e){return this.extend({fontWeight:e,font:``})}withTextFontShape(e){return this.extend({fontShape:e,font:``})}sizingClasses(e){return e.size===this.size?[]:[`katex-sizing`,`reset-size`+e.size,`size`+this.size]}baseSizingClasses(){return this.size===e.BASESIZE?[]:[`katex-sizing`,`reset-size`+this.size,`size`+e.BASESIZE]}fontMetrics(){return this._fontMetrics||=Il(this.size),this._fontMetrics}getColor(){return this.phantom?`transparent`:this.color}};Pd.BASESIZE=6;var Fd=function(e){return new Pd({style:e.displayMode?Uc.DISPLAY:Uc.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Id=function(e,t){if(t.displayMode){var n=[`katex-display`];t.leqno&&n.push(`leqno`),t.fleqn&&n.push(`fleqn`),e=z(n,[e])}return e},Ld=function(e,t,n){var r=Fd(n),i;return n.output===`mathml`?Ad(e,t,r,n.displayMode,!0):(i=n.output===`html`?z([`katex`],[gd(e,r)]):z([`katex`],[Ad(e,t,r,n.displayMode,!1),gd(e,r)]),Id(i,n))},Rd=function(e,t,n){return Id(z([`katex`],[gd(e,Fd(n))]),n)},zd={widehat:`^`,widecheck:`ˇ`,widetilde:`~`,utilde:`~`,overleftarrow:`←`,underleftarrow:`←`,xleftarrow:`←`,overrightarrow:`→`,underrightarrow:`→`,xrightarrow:`→`,underbrace:`⏟`,overbrace:`⏞`,underbracket:`⎵`,overbracket:`⎴`,overgroup:`⏠`,undergroup:`⏡`,overleftrightarrow:`↔`,underleftrightarrow:`↔`,xleftrightarrow:`↔`,Overrightarrow:`⇒`,xRightarrow:`⇒`,overleftharpoon:`↼`,xleftharpoonup:`↼`,overrightharpoon:`⇀`,xrightharpoonup:`⇀`,xLeftarrow:`⇐`,xLeftrightarrow:`⇔`,xhookleftarrow:`↩`,xhookrightarrow:`↪`,xmapsto:`↦`,xrightharpoondown:`⇁`,xleftharpoondown:`↽`,xrightleftharpoons:`⇌`,xleftrightharpoons:`⇋`,xtwoheadleftarrow:`↞`,xtwoheadrightarrow:`↠`,xlongequal:`=`,xtofrom:`⇄`,xrightleftarrows:`⇄`,xrightequilibrium:`⇌`,xleftequilibrium:`⇋`,"\\cdrightarrow":`→`,"\\cdleftarrow":`←`,"\\cdlongequal":`=`},Bd=function(e){var t=new B(`mo`,[new vd(zd[e.replace(/^\\/,``)])]);return t.setAttribute(`stretchy`,`true`),t},Vd={overrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],overleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],underrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],underleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],xrightarrow:[[`rightarrow`],1.469,522,`xMaxYMin`],"\\cdrightarrow":[[`rightarrow`],3,522,`xMaxYMin`],xleftarrow:[[`leftarrow`],1.469,522,`xMinYMin`],"\\cdleftarrow":[[`leftarrow`],3,522,`xMinYMin`],Overrightarrow:[[`doublerightarrow`],.888,560,`xMaxYMin`],xRightarrow:[[`doublerightarrow`],1.526,560,`xMaxYMin`],xLeftarrow:[[`doubleleftarrow`],1.526,560,`xMinYMin`],overleftharpoon:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoonup:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoondown:[[`leftharpoondown`],.888,522,`xMinYMin`],overrightharpoon:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoonup:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoondown:[[`rightharpoondown`],.888,522,`xMaxYMin`],xlongequal:[[`longequal`],.888,334,`xMinYMin`],"\\cdlongequal":[[`longequal`],3,334,`xMinYMin`],xtwoheadleftarrow:[[`twoheadleftarrow`],.888,334,`xMinYMin`],xtwoheadrightarrow:[[`twoheadrightarrow`],.888,334,`xMaxYMin`],overleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],overbrace:[[`leftbrace`,`midbrace`,`rightbrace`],1.6,548],underbrace:[[`leftbraceunder`,`midbraceunder`,`rightbraceunder`],1.6,548],underleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],xleftrightarrow:[[`leftarrow`,`rightarrow`],1.75,522],xLeftrightarrow:[[`doubleleftarrow`,`doublerightarrow`],1.75,560],xrightleftharpoons:[[`leftharpoondownplus`,`rightharpoonplus`],1.75,716],xleftrightharpoons:[[`leftharpoonplus`,`rightharpoondownplus`],1.75,716],xhookleftarrow:[[`leftarrow`,`righthook`],1.08,522],xhookrightarrow:[[`lefthook`,`rightarrow`],1.08,522],overlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],underlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],overbracket:[[`leftbracketover`,`rightbracketover`],1.6,440],underbracket:[[`leftbracketunder`,`rightbracketunder`],1.6,410],overgroup:[[`leftgroup`,`rightgroup`],.888,342],undergroup:[[`leftgroupunder`,`rightgroupunder`],.888,342],xmapsto:[[`leftmapsto`,`rightarrow`],1.5,522],xtofrom:[[`leftToFrom`,`rightToFrom`],1.75,528],xrightleftarrows:[[`baraboveleftarrow`,`rightarrowabovebar`],1.75,901],xrightequilibrium:[[`baraboveshortleftharpoon`,`rightharpoonaboveshortbar`],1.75,716],xleftequilibrium:[[`shortbaraboveleftharpoon`,`shortrightharpoonabovebar`],1.75,716]},Hd=new Set([`widehat`,`widecheck`,`widetilde`,`utilde`]),Ud=function(e,t){function n(){var n=4e5,r=e.label.slice(1);if(Hd.has(r)&&`base`in e){var i=e.base.type===`ordgroup`?e.base.body.length:1,a,o,s;if(i>5)r===`widehat`||r===`widecheck`?(a=420,n=2364,s=.42,o=r+`4`):(a=312,n=2340,s=.34,o=`tilde4`);else{var c=[1,1,2,2,3,3][i];r===`widehat`||r===`widecheck`?(n=[0,1062,2364,2364,2364][c],a=[0,239,300,360,420][c],s=[0,.24,.3,.3,.36,.42][c],o=r+c):(n=[0,600,1033,2339,2340][c],a=[0,260,286,306,312][c],s=[0,.26,.286,.3,.306,.34][c],o=`tilde`+c)}return{span:Pu([],[new wl([new Tl(o)],{width:`100%`,height:j(s),viewBox:`0 0 `+n+` `+a,preserveAspectRatio:`none`})],t),minWidth:0,height:s}}else{var l=[],u=Vd[r];if(!u)throw Error(`No SVG data for "`+r+`".`);var d=u[0],f=u[1],p=u[2],m=p/1e3,h=d.length,g,_;if(h===1){if(u.length!==4)throw Error(`Expected 4-tuple for single-path SVG data "`+r+`".`);g=[`hide-tail`],_=[u[3]]}else if(h===2)g=[`halfarrow-left`,`halfarrow-right`],_=[`xMinYMin`,`xMaxYMin`];else if(h===3)g=[`brace-left`,`brace-center`,`brace-right`],_=[`xMinYMin`,`xMidYMin`,`xMaxYMin`];else throw Error(`Correct katexImagesData or update code here to support
265
+ `+h+` children.`);for(var v=0;v<h;v++){var y=new wl([new Tl(d[v])],{width:`400em`,height:j(m),viewBox:`0 0 `+n+` `+p,preserveAspectRatio:_[v]+` slice`}),b=Pu([g[v]],[y],t);if(h===1)return{span:b,minWidth:f,height:m};b.style.height=j(m),l.push(b)}return{span:z([`katex-stretchy`],l,t),minWidth:f,height:m}}}var r=n(),i=r.span,a=r.minWidth,o=r.height;return i.height=o,i.style.height=j(o),a>0&&(i.style.minWidth=j(a)),i},Wd=function(e,t,n,r,i){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=z([`katex-stretchy`,t],[],i),t===`fbox`){var s=i.color&&i.getColor();s&&(a.style.borderColor=s)}}else{var c=[];/^[bx]cancel$/.test(t)&&c.push(new El({x1:`0`,y1:`0`,x2:`100%`,y2:`100%`,"stroke-width":`0.046em`})),/^x?cancel$/.test(t)&&c.push(new El({x1:`0`,y1:`100%`,x2:`100%`,y2:`0`,"stroke-width":`0.046em`})),a=Pu([],[new wl(c,{width:`100%`,height:j(o)})],i)}return a.height=o,a.style.height=j(o),a},Gd=[`bin`,`close`,`inner`,`open`,`punct`,`rel`],Kd=[`accent-token`,`mathord`,`op-token`,`spacing`,`textord`],qd=new Set(Gd),Jd=new Set(Kd);function Yd(e){return qd.has(e)}function Xd(e,t){if(!e||e.type!==t)throw Error(`Expected node of type `+t+`, but got `+(e?`node of type `+e.type:String(e)));return e}function Zd(e){var t=Qd(e);if(!t)throw Error(`Expected node of symbol group type, but got `+(e?`node of type `+e.type:String(e)));return t}function Qd(e){return e.type===`atom`||Jd.has(e.type)?e:null}var $d=e=>{if(e instanceof Cl)return e;if(kl(e)&&e.children.length===1)return $d(e.children[0])},ef=(e,t)=>{var n,r,i;e&&e.type===`supsub`?(r=Xd(e.base,`accent`),n=r.base,e.base=n,i=Ol(md(e,t)),e.base=r):(r=Xd(e,`accent`),n=r.base);var a=md(n,t.havingCrampedStyle()),o=r.isShifty&&bc(n),s=0;o&&(s=$d(a)?.skew??0);var c=r.label===`\\c`,l=c?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),u;if(r.isStretchy)u=Ud(r,t),u=Bu({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`elem`,elem:u,wrapperClasses:[`svg-align`],wrapperStyle:s>0?{width:`calc(100% - `+j(2*s)+`)`,marginLeft:j(2*s)}:void 0}]});else{var d,f;r.label===`\\vec`?(d=Gu(`vec`,t),f=Wu.vec[1]):(d=Au({type:`textord`,mode:r.mode,text:r.label},t),d=Dl(d),d.italic=0,f=d.width,c&&(l+=d.depth)),u=z([`accent-body`],[d]);var p=r.label===`\\textcircled`;p&&(u.classes.push(`accent-full`),l=a.height);var m=s;p||(m-=f/2),u.style.left=j(m),r.label===`\\textcircled`&&(u.style.top=`.2em`),u=Bu({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:-l},{type:`elem`,elem:u}]})}var h=z([`mord`,`katex-accent`],[u],t);return i?(i.children[0]=h,i.height=Math.max(h.height,i.height),i.classes[0]=`mord`,i):h},tf=(e,t)=>{var n=e.isStretchy?Bd(e.label):new B(`mo`,[Sd(e.label,e.mode)]),r=new B(`mover`,[kd(e.base,t),n]);return r.setAttribute(`accent`,`true`),r},nf=new RegExp([`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`].map(e=>`\\`+e).join(`|`));ed({type:`accent`,names:[`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`,`\\widecheck`,`\\widehat`,`\\widetilde`,`\\overrightarrow`,`\\overleftarrow`,`\\Overrightarrow`,`\\overleftrightarrow`,`\\overgroup`,`\\overlinesegment`,`\\overleftharpoon`,`\\overrightharpoon`],numArgs:1,handler:(e,t)=>{var n=nd(t[0]),r=!nf.test(e.funcName),i=!r||e.funcName===`\\widehat`||e.funcName===`\\widetilde`||e.funcName===`\\widecheck`;return{type:`accent`,mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:ef,mathmlBuilder:tf}),ed({type:`accent`,names:[`\\'`,"\\`",`\\^`,`\\~`,`\\=`,`\\u`,`\\.`,`\\"`,`\\c`,`\\r`,`\\H`,`\\v`,`\\textcircled`],numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`primitive`],handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r===`math`&&(e.parser.settings.reportNonstrict(`mathVsTextAccents`,`LaTeX's accent `+e.funcName+` works only in text mode`),r=`text`),{type:`accent`,mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}}}),ed({type:`accentUnder`,names:[`\\underleftarrow`,`\\underrightarrow`,`\\underleftrightarrow`,`\\undergroup`,`\\underlinesegment`,`\\utilde`],numArgs:1,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0];return{type:`accentUnder`,mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=md(e.base,t),r=Ud(e,t),i=e.label===`\\utilde`?.12:0;return z([`mord`,`accentunder`],[Bu({positionType:`top`,positionData:n.height,children:[{type:`elem`,elem:r,wrapperClasses:[`svg-align`]},{type:`kern`,size:i},{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=Bd(e.label),r=new B(`munder`,[kd(e.base,t),n]);return r.setAttribute(`accentunder`,`true`),r}});var rf=e=>{var t=new B(`mpadded`,e?[e]:[]);return t.setAttribute(`width`,`+0.6em`),t.setAttribute(`lspace`,`0.3em`),t};ed({type:`xArrow`,names:[`\\xleftarrow`,`\\xrightarrow`,`\\xLeftarrow`,`\\xRightarrow`,`\\xleftrightarrow`,`\\xLeftrightarrow`,`\\xhookleftarrow`,`\\xhookrightarrow`,`\\xmapsto`,`\\xrightharpoondown`,`\\xrightharpoonup`,`\\xleftharpoondown`,`\\xleftharpoonup`,`\\xrightleftharpoons`,`\\xleftrightharpoons`,`\\xlongequal`,`\\xtwoheadrightarrow`,`\\xtwoheadleftarrow`,`\\xtofrom`,`\\xrightleftarrows`,`\\xrightequilibrium`,`\\xleftequilibrium`,`\\\\cdrightarrow`,`\\\\cdleftarrow`,`\\\\cdlongequal`],numArgs:1,numOptionalArgs:1,handler(e,t,n){var r=e.parser,i=e.funcName;return{type:`xArrow`,mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=Ru(md(e.body,r,t),t),a=e.label.slice(0,2)===`\\x`?`x`:`cd`;i.classes.push(a+`-arrow-pad`);var o;e.below&&(r=t.havingStyle(n.sub()),o=Ru(md(e.below,r,t),t),o.classes.push(a+`-arrow-pad`));var s=Ud(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,l=-t.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||e.label===`\\xleftequilibrium`)&&(l-=i.depth);var u;if(o){var d=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111;u=Bu({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]},{type:`elem`,elem:o,shift:d}]})}else u=Bu({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]}]});return z([`mrel`,`x-arrow`],[u],t)},mathmlBuilder(e,t){var n=Bd(e.label);n.setAttribute(`minsize`,e.label.charAt(0)===`x`?`1.75em`:`3.0em`);var r;if(e.body){var i=rf(kd(e.body,t));r=e.below?new B(`munderover`,[n,rf(kd(e.below,t)),i]):new B(`mover`,[n,i])}else e.below?r=new B(`munder`,[n,rf(kd(e.below,t))]):(r=rf(),r=new B(`mover`,[n,r]));return r}});function af(e,t){var n=cd(e.body,t,!0);return z([e.mclass],n,t)}function of(e,t){var n,r=Dd(e.body,t);return e.mclass===`minner`?n=new B(`mpadded`,r):e.mclass===`mord`?e.isCharacterBox?(n=r[0],n.type=`mi`):n=new B(`mi`,r):(e.isCharacterBox?(n=r[0],n.type=`mo`):n=new B(`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}ed({type:`mclass`,names:[`\\mathord`,`\\mathbin`,`\\mathrel`,`\\mathopen`,`\\mathclose`,`\\mathpunct`,`\\mathinner`],numArgs:1,primitive:!0,handler(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:`mclass`,mode:n.mode,mclass:`m`+r.slice(5),body:rd(i),isCharacterBox:bc(i)}},htmlBuilder:af,mathmlBuilder:of});var sf=e=>{var t=e.type===`ordgroup`&&e.body.length?e.body[0]:e;return t.type===`atom`&&(t.family===`bin`||t.family===`rel`)?`m`+t.family:`mord`};ed({type:`mclass`,names:[`\\@binrel`],numArgs:2,handler(e,t){return{type:`mclass`,mode:e.parser.mode,mclass:sf(t[0]),body:rd(t[1]),isCharacterBox:bc(t[1])}}}),ed({type:`mclass`,names:[`\\stackrel`,`\\overset`,`\\underset`],numArgs:2,handler(e,t){var n=e.parser,r=e.funcName,i=t[1],a=t[0],o=r===`\\stackrel`?`mrel`:sf(i),s={type:`op`,mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!==`\\stackrel`,body:rd(i)},c=r===`\\underset`?{type:`supsub`,mode:a.mode,base:s,sub:a}:{type:`supsub`,mode:a.mode,base:s,sup:a};return{type:`mclass`,mode:n.mode,mclass:o,body:[c],isCharacterBox:bc(c)}}}),ed({type:`pmb`,names:[`\\pmb`],numArgs:1,allowedInText:!0,handler(e,t){return{type:`pmb`,mode:e.parser.mode,mclass:sf(t[0]),body:rd(t[0])}},htmlBuilder(e,t){var n=cd(e.body,t,!0),r=z([e.mclass],n,t);return r.style.textShadow=`0.02em 0.01em 0.04px`,r},mathmlBuilder(e,t){var n=new B(`mstyle`,Dd(e.body,t));return n.setAttribute(`style`,`text-shadow: 0.02em 0.01em 0.04px`),n}});var cf={">":`\\\\cdrightarrow`,"<":`\\\\cdleftarrow`,"=":`\\\\cdlongequal`,A:`\\uparrow`,V:`\\downarrow`,"|":`\\Vert`,".":`no arrow`},lf=()=>({type:`styling`,body:[],mode:`math`,style:`display`,resetFont:!0}),uf=e=>e.type===`textord`&&e.text===`@`,df=(e,t)=>(e.type===`mathord`||e.type===`atom`)&&e.text===t;function ff(e,t,n){var r=cf[e];switch(r){case`\\\\cdrightarrow`:case`\\\\cdleftarrow`:return n.callFunction(r,[t[0]],[t[1]]);case`\\uparrow`:case`\\downarrow`:var i=n.callFunction(`\\\\cdleft`,[t[0]],[]),a={type:`atom`,text:r,mode:`math`,family:`rel`},o={type:`ordgroup`,mode:`math`,body:[i,n.callFunction(`\\Big`,[a],[]),n.callFunction(`\\\\cdright`,[t[1]],[])]};return n.callFunction(`\\\\cdparent`,[o],[]);case`\\\\cdlongequal`:return n.callFunction(`\\\\cdlongequal`,[],[]);case`\\Vert`:return n.callFunction(`\\Big`,[{type:`textord`,text:`\\Vert`,mode:`math`}],[]);default:return{type:`textord`,text:` `,mode:`math`}}}function pf(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set(`\\cr`,`\\\\\\relax`),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,`\\\\`)),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n===`&`||n===`\\\\`)e.consume();else if(n===`\\end`){t[t.length-1].length===0&&t.pop();break}else throw new A(`Expected \\\\ or \\cr or \\end`,e.nextToken)}for(var r=[],i=[r],a=0;a<t.length;a++){for(var o=t[a],s=lf(),c=0;c<o.length;c++)if(!uf(o[c]))s.body.push(o[c]);else{r.push(s),c+=1;var l=Zd(o[c]).text,u=[,,];if(u[0]={type:`ordgroup`,mode:`math`,body:[]},u[1]={type:`ordgroup`,mode:`math`,body:[]},!`=|.`.includes(l))if(`<>AV`.includes(l))for(var d=0;d<2;d++){for(var f=!0,p=c+1;p<o.length;p++){if(df(o[p],l)){f=!1,c=p;break}if(uf(o[p]))throw new A(`Missing a `+l+` character to complete a CD arrow.`,o[p]);u[d].body.push(o[p])}if(f)throw new A(`Missing a `+l+` character to complete a CD arrow.`,o[c])}else throw new A(`Expected one of "<>AV=|." after @`,o[c]);var m={type:`styling`,body:[ff(l,u,e)],mode:`math`,style:`display`,resetFont:!0};r.push(m),s=lf()}a%2==0?r.push(s):r.shift(),r=[],i.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:`math`,body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:Array(i[0].length).fill({type:`align`,align:`c`,pregap:.25,postgap:.25}),colSeparationType:`CD`,hLinesBeforeRow:Array(i.length+1).fill([])}}ed({type:`cdlabel`,names:[`\\\\cdleft`,`\\\\cdright`],numArgs:1,handler(e,t){var n=e.parser,r=e.funcName;return{type:`cdlabel`,mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=Ru(md(e.label,n,t),t);return r.classes.push(`cd-label-`+e.side),r.style.bottom=j(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new B(`mrow`,[kd(e.label,t)]);return n=new B(`mpadded`,[n]),n.setAttribute(`width`,`0`),e.side===`left`&&n.setAttribute(`lspace`,`-1width`),n.setAttribute(`voffset`,`0.7em`),n=new B(`mstyle`,[n]),n.setAttribute(`displaystyle`,`false`),n.setAttribute(`scriptlevel`,`1`),n}}),ed({type:`cdlabelparent`,names:[`\\\\cdparent`],numArgs:1,handler(e,t){return{type:`cdlabelparent`,mode:e.parser.mode,fragment:t[0]}},htmlBuilder(e,t){var n=Ru(md(e.fragment,t),t);return n.classes.push(`cd-vert-arrow`),n},mathmlBuilder(e,t){return new B(`mrow`,[kd(e.fragment,t)])}}),ed({type:`textord`,names:[`\\@char`],numArgs:1,allowedInText:!0,handler(e,t){for(var n=e.parser,r=Xd(t[0],`ordgroup`).body,i=``,a=0;a<r.length;a++){var o=Xd(r[a],`textord`);i+=o.text}var s=parseInt(i),c;if(isNaN(s))throw new A(`\\@char has non-numeric argument `+i);if(s<0||s>=1114111)throw new A(`\\@char with invalid code point `+i);return s<=65535?c=String.fromCharCode(s):(s-=65536,c=String.fromCharCode((s>>10)+55296,(s&1023)+56320)),{type:`textord`,mode:n.mode,text:c}}}),ed({type:`color`,names:[`\\textcolor`],numArgs:2,allowedInText:!0,argTypes:[`color`,`original`],handler(e,t){var n=e.parser,r=Xd(t[0],`color-token`).color,i=t[1];return{type:`color`,mode:n.mode,color:r,body:rd(i)}},htmlBuilder:(e,t)=>Lu(cd(e.body,t.withColor(e.color),!1)),mathmlBuilder:(e,t)=>{var n=new B(`mstyle`,Dd(e.body,t.withColor(e.color)));return n.setAttribute(`mathcolor`,e.color),n}}),ed({type:`color`,names:[`\\color`],numArgs:1,allowedInText:!0,argTypes:[`color`],handler(e,t){var n=e.parser,r=e.breakOnTokenText,i=Xd(t[0],`color-token`).color;n.gullet.macros.set(`\\current@color`,i);var a=n.parseExpression(!0,r);return{type:`color`,mode:n.mode,color:i,body:a}}}),ed({type:`cr`,names:[`\\\\`],numArgs:0,numOptionalArgs:0,allowedInText:!0,handler(e,t,n){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`);return{type:`cr`,mode:r.mode,newLine:a,size:i&&Xd(i,`size`).value}},htmlBuilder(e,t){var n=z([`mspace`],[],t);return e.newLine&&(n.classes.push(`katex-newline`),e.size&&(n.style.marginTop=j(fl(e.size,t)))),n},mathmlBuilder(e,t){var n=new B(`mspace`);return e.newLine&&(n.setAttribute(`linebreak`,`newline`),e.size&&n.setAttribute(`height`,j(fl(e.size,t)))),n}});var mf={"\\global":`\\global`,"\\long":`\\\\globallong`,"\\\\globallong":`\\\\globallong`,"\\def":`\\gdef`,"\\gdef":`\\gdef`,"\\edef":`\\xdef`,"\\xdef":`\\xdef`,"\\let":`\\\\globallet`,"\\futurelet":`\\\\globalfuture`},hf=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new A(`Expected a control sequence`,e);return t},gf=e=>{var t=e.gullet.popToken();return t.text===`=`&&(t=e.gullet.popToken(),t.text===` `&&(t=e.gullet.popToken())),t},_f=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i??=(n.noexpand=!0,{tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};ed({type:`internal`,names:[`\\global`,`\\long`,`\\\\globallong`],numArgs:0,allowedInText:!0,handler(e){var t=e.parser,n=e.funcName;t.consumeSpaces();var r=t.fetch();if(mf[r.text])return(n===`\\global`||n===`\\\\globallong`)&&(r.text=mf[r.text]),Xd(t.parseFunction(),`internal`);throw new A(`Invalid token after macro prefix`,r)}}),ed({type:`internal`,names:[`\\def`,`\\gdef`,`\\edef`,`\\xdef`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var t=e.parser,n=e.funcName,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new A(`Expected a control sequence`,r);for(var a=0,o,s=[[]];t.gullet.future().text!==`{`;)if(r=t.gullet.popToken(),r.text===`#`){if(t.gullet.future().text===`{`){o=t.gullet.future(),s[a].push(`{`);break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new A(`Invalid argument number "`+r.text+`"`);if(parseInt(r.text)!==a+1)throw new A(`Argument number "`+r.text+`" out of order`);a++,s.push([])}else if(r.text===`EOF`)throw new A(`Expected a macro definition`);else s[a].push(r.text);var c=t.gullet.consumeArg().tokens;return o&&c.unshift(o),(n===`\\edef`||n===`\\xdef`)&&(c=t.gullet.expandTokens(c),c.reverse()),t.gullet.macros.set(i,{tokens:c,numArgs:a,delimiters:s},n===mf[n]),{type:`internal`,mode:t.mode}}}),ed({type:`internal`,names:[`\\let`,`\\\\globallet`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var t=e.parser,n=e.funcName,r=hf(t.gullet.popToken());return t.gullet.consumeSpaces(),_f(t,r,gf(t),n===`\\\\globallet`),{type:`internal`,mode:t.mode}}}),ed({type:`internal`,names:[`\\futurelet`,`\\\\globalfuture`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var t=e.parser,n=e.funcName,r=hf(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return _f(t,r,a,n===`\\\\globalfuture`),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:`internal`,mode:t.mode}}});var vf=function(e,t,n){var r=Pl(Ll.math[e]&&Ll.math[e].replace||e,t,n);if(!r)throw Error(`Unsupported symbol `+e+` and font size `+t+`.`);return r},yf=function(e,t,n,r){var i=n.havingBaseStyle(t),a=z(r.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},bf=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push(`delimcenter`),e.style.top=j(i),e.height-=i,e.depth+=i},xf=function(e,t,n,r,i,a){var o=yf(Du(e,`Main-Regular`,i,r),t,r,a);return n&&bf(o,r,t),o},Sf=function(e,t,n,r){return Du(e,`Size`+t+`-Regular`,n,r)},Cf=function(e,t,n,r,i,a){var o=Sf(e,t,i,r),s=yf(z([`delimsizing`,`size`+t],[o],r),Uc.TEXT,r,a);return n&&bf(s,r,Uc.TEXT),s},wf=function(e,t,n){return{type:`elem`,elem:z([`delimsizinginner`,t===`Size1-Regular`?`delim-size1`:`delim-size4`],[z([],[Du(e,t,n)])])}},Tf=function(e,t,n){var r=Al[`Size4-Regular`][e.charCodeAt(0)]?Al[`Size4-Regular`][e.charCodeAt(0)][4]:Al[`Size1-Regular`][e.charCodeAt(0)][4],i=Pu([],[new wl([new Tl(`inner`,il(e,Math.round(1e3*t)))],{width:j(r),height:j(t),style:`width:`+j(r),viewBox:`0 0 `+1e3*r+` `+Math.round(1e3*t),preserveAspectRatio:`xMinYMin`})],n);return i.height=t,i.style.height=j(t),i.style.width=j(r),{type:`elem`,elem:i}},Ef=.008,Df={type:`kern`,size:-1*Ef},Of=new Set([`|`,`\\lvert`,`\\rvert`,`\\vert`]),kf=new Set([`\\|`,`\\lVert`,`\\rVert`,`\\Vert`]),Af=function(e,t,n,r,i,a){var o,s,c,l,u=``,d=0;o=c=l=e,s=null;var f=`Size1-Regular`;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`):Of.has(e)?(c=`∣`,u=`vert`,d=333):kf.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`);var p=vf(o,f,i),m=p.height+p.depth,h=vf(c,f,i),g=h.height+h.depth,_=vf(l,f,i),v=_.height+_.depth,y=0,b=1;if(s!==null){var x=vf(s,f,i);y=x.height+x.depth,b=2}var S=m+v+y,C=S+Math.max(0,Math.ceil((t-S)/(b*g)))*b*g,w=r.fontMetrics().axisHeight;n&&(w*=r.sizeMultiplier);var T=C/2-w,E=[];if(u.length>0){var ee=C-m-v,te=Math.round(C*1e3),D=ol(u,Math.round(ee*1e3)),ne=new Tl(u,D),re=j(d/1e3),ie=j(te/1e3),ae=Pu([],[new wl([ne],{width:re,height:ie,viewBox:`0 0 `+d+` `+te})],r);ae.height=te/1e3,ae.style.width=re,ae.style.height=ie,E.push({type:`elem`,elem:ae})}else{if(E.push(wf(l,f,i)),E.push(Df),s===null){var oe=C-m-v+2*Ef;E.push(Tf(c,oe,r))}else{var se=(C-m-v-y)/2+2*Ef;E.push(Tf(c,se,r)),E.push(Df),E.push(wf(s,f,i)),E.push(Df),E.push(Tf(c,se,r))}E.push(Df),E.push(wf(o,f,i))}var ce=r.havingBaseStyle(Uc.TEXT);return yf(z([`delimsizing`,`mult`],[Bu({positionType:`bottom`,positionData:T,children:E})],ce),Uc.TEXT,r,a)},jf=80,Mf=.08,Nf=function(e,t,n,r,i){return Pu([`hide-tail`],[new wl([new Tl(e,rl(e,r,n))],{width:`400em`,height:j(t),viewBox:`0 0 400000 `+n,preserveAspectRatio:`xMinYMin slice`})],i)},Pf=function(e,t){var n=t.havingBaseSizing(),r=Wf(`\\surd`,e*n.sizeMultiplier,Hf,n),i=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,s,c,l,u;return r.type===`small`?(l=1e3+1e3*a+jf,e<1?i=1:e<1.4&&(i=.7),s=(1+a+Mf)/i,c=(1+a)/i,o=Nf(`sqrtMain`,s,l,a,t),o.style.minWidth=`0.853em`,u=.833/i):r.type===`large`?(l=(1e3+jf)*Rf[r.size],c=(Rf[r.size]+a)/i,s=(Rf[r.size]+a+Mf)/i,o=Nf(`sqrtSize`+r.size,s,l,a,t),o.style.minWidth=`1.02em`,u=1/i):(s=e+a+Mf,c=e+a,l=Math.floor(1e3*e+a)+jf,o=Nf(`sqrtTall`,s,l,a,t),o.style.minWidth=`0.742em`,u=1.056),o.height=c,o.style.height=j(s),{span:o,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},Ff=new Set([`(`,`\\lparen`,`)`,`\\rparen`,`[`,`\\lbrack`,`]`,`\\rbrack`,`\\{`,`\\lbrace`,`\\}`,`\\rbrace`,`\\lfloor`,`\\rfloor`,`⌊`,`⌋`,`\\lceil`,`\\rceil`,`⌈`,`⌉`,`\\surd`]),If=new Set([`\\uparrow`,`\\downarrow`,`\\updownarrow`,`\\Uparrow`,`\\Downarrow`,`\\Updownarrow`,`|`,`\\|`,`\\vert`,`\\Vert`,`\\lvert`,`\\rvert`,`\\lVert`,`\\rVert`,`\\lgroup`,`\\rgroup`,`⟮`,`⟯`,`\\lmoustache`,`\\rmoustache`,`⎰`,`⎱`]),Lf=new Set([`<`,`>`,`\\langle`,`\\rangle`,`/`,`\\backslash`,`\\lt`,`\\gt`]),Rf=[0,1.2,1.8,2.4,3],zf=function(e,t,n,r,i){if(e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`),Ff.has(e)||Lf.has(e))return Cf(e,t,!1,n,r,i);if(If.has(e))return Af(e,Rf[t],!1,n,r,i);throw new A(`Illegal delimiter: '`+e+`'`)},Bf=[{type:`small`,style:Uc.SCRIPTSCRIPT},{type:`small`,style:Uc.SCRIPT},{type:`small`,style:Uc.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4}],Vf=[{type:`small`,style:Uc.SCRIPTSCRIPT},{type:`small`,style:Uc.SCRIPT},{type:`small`,style:Uc.TEXT},{type:`stack`}],Hf=[{type:`small`,style:Uc.SCRIPTSCRIPT},{type:`small`,style:Uc.SCRIPT},{type:`small`,style:Uc.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4},{type:`stack`}],Uf=function(e){if(e.type===`small`)return`Main-Regular`;if(e.type===`large`)return`Size`+e.size+`-Regular`;if(e.type===`stack`)return`Size4-Regular`;var t=e.type;throw Error(`Add support for delim type '`+t+`' here.`)},Wf=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);i<n.length;i++){var a=n[i];if(a.type===`stack`)break;var o=vf(e,Uf(a),`math`),s=o.height+o.depth;if(a.type===`small`){var c=r.havingBaseStyle(a.style);s*=c.sizeMultiplier}if(s>t)return a}return n[n.length-1]},Gf=function(e,t,n,r,i,a){e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`);var o=Lf.has(e)?Bf:Ff.has(e)?Hf:Vf,s=Wf(e,t,o,r);return s.type===`small`?xf(e,s.style,n,r,i,a):s.type===`large`?Cf(e,s.size,n,r,i,a):Af(e,t,n,r,i,a)},Kf=function(e,t,n,r,i,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=901,c=5/r.fontMetrics().ptPerEm,l=Math.max(t-o,n+o);return Gf(e,Math.max(l/500*s,2*l-c),!0,r,i,a)},qf={"\\bigl":{mclass:`mopen`,size:1},"\\Bigl":{mclass:`mopen`,size:2},"\\biggl":{mclass:`mopen`,size:3},"\\Biggl":{mclass:`mopen`,size:4},"\\bigr":{mclass:`mclose`,size:1},"\\Bigr":{mclass:`mclose`,size:2},"\\biggr":{mclass:`mclose`,size:3},"\\Biggr":{mclass:`mclose`,size:4},"\\bigm":{mclass:`mrel`,size:1},"\\Bigm":{mclass:`mrel`,size:2},"\\biggm":{mclass:`mrel`,size:3},"\\Biggm":{mclass:`mrel`,size:4},"\\big":{mclass:`mord`,size:1},"\\Big":{mclass:`mord`,size:2},"\\bigg":{mclass:`mord`,size:3},"\\Bigg":{mclass:`mord`,size:4}},Jf=new Set(`(,\\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(`,`));function Yf(e){return`isMiddle`in e}function Xf(e,t){var n=Qd(e);if(n&&Jf.has(n.text))return n;throw n?new A(`Invalid delimiter '`+n.text+`' after '`+t.funcName+`'`,e):new A(`Invalid delimiter type '`+e.type+`'`,e)}ed({type:`delimsizing`,names:[`\\bigl`,`\\Bigl`,`\\biggl`,`\\Biggl`,`\\bigr`,`\\Bigr`,`\\biggr`,`\\Biggr`,`\\bigm`,`\\Bigm`,`\\biggm`,`\\Biggm`,`\\big`,`\\Big`,`\\bigg`,`\\Bigg`],numArgs:1,argTypes:[`primitive`],handler:(e,t)=>{var n=Xf(t[0],e);return{type:`delimsizing`,mode:e.parser.mode,size:qf[e.funcName].size,mclass:qf[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim===`.`?z([e.mclass]):zf(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!==`.`&&t.push(Sd(e.delim,e.mode));var n=new B(`mo`,t);e.mclass===`mopen`||e.mclass===`mclose`?n.setAttribute(`fence`,`true`):n.setAttribute(`fence`,`false`),n.setAttribute(`stretchy`,`true`);var r=j(Rf[e.size]);return n.setAttribute(`minsize`,r),n.setAttribute(`maxsize`,r),n}});function Zf(e){if(!e.body)throw Error(`Bug: The leftright ParseNode wasn't fully parsed.`)}ed({type:`leftright-right`,names:[`\\right`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser.gullet.macros.get(`\\current@color`);if(n&&typeof n!=`string`)throw new A(`\\current@color set to non-string in \\right`);return{type:`leftright-right`,mode:e.parser.mode,delim:Xf(t[0],e).text,color:n}}}),ed({type:`leftright`,names:[`\\left`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=Xf(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect(`\\right`,!1);var a=Xd(r.parseFunction(),`leftright-right`);return{type:`leftright`,mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{Zf(e);for(var n=cd(e.body,t,!0,[`mopen`,`mclose`]),r=0,i=0,a=!1,o=0;o<n.length;o++){var s=n[o];Yf(s)?a=!0:(r=Math.max(n[o].height,r),i=Math.max(n[o].depth,i))}r*=t.sizeMultiplier,i*=t.sizeMultiplier;var c=e.left===`.`?pd(t,[`mopen`]):Kf(e.left,r,i,t,e.mode,[`mopen`]);if(n.unshift(c),a)for(var l=1;l<n.length;l++){var u=n[l];if(Yf(u)){var d=u.isMiddle;n[l]=Kf(d.delim,r,i,d.options,e.mode,[])}}var f;if(e.right===`.`)f=pd(t,[`mclose`]);else{var p=e.rightColor?t.withColor(e.rightColor):t;f=Kf(e.right,r,i,p,e.mode,[`mclose`])}return n.push(f),z([`minner`],n,t)},mathmlBuilder:(e,t)=>{Zf(e);var n=Dd(e.body,t);if(e.left!==`.`){var r=new B(`mo`,[Sd(e.left,e.mode)]);r.setAttribute(`fence`,`true`),n.unshift(r)}if(e.right!==`.`){var i=new B(`mo`,[Sd(e.right,e.mode)]);i.setAttribute(`fence`,`true`),e.rightColor&&i.setAttribute(`mathcolor`,e.rightColor),n.push(i)}return Cd(n)}}),ed({type:`middle`,names:[`\\middle`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=Xf(t[0],e);if(!e.parser.leftrightDepth)throw new A(`\\middle without preceding \\left`,n);return{type:`middle`,mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return e.delim===`.`?n=pd(t,[]):(n=zf(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{var n=new B(`mo`,[e.delim===`\\vert`||e.delim===`|`?Sd(`|`,`text`):Sd(e.delim,e.mode)]);return n.setAttribute(`fence`,`true`),n.setAttribute(`lspace`,`0.05em`),n.setAttribute(`rspace`,`0.05em`),n}}),ed({type:`enclose`,names:[`\\colorbox`],numArgs:2,allowedInText:!0,argTypes:[`color`,`hbox`],handler(e,t,n){var r=e.parser,i=e.funcName,a=Xd(t[0],`color-token`).color,o=t[1];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:(e,t)=>{var n=Ru(md(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,o,s=bc(e.body);if(r===`sout`)a=z([`katex-stretchy`,`katex-sout`]),a.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r===`phase`){var c=fl({number:.6,unit:`pt`},t),l=fl({number:.35,unit:`ex`},t),u=t.havingBaseSizing();i/=u.sizeMultiplier;var d=n.height+n.depth+c+l;n.style.paddingLeft=j(d/2+c);var f=Math.floor(1e3*d*i);a=Pu([`hide-tail`],[new wl([new Tl(`phase`,tl(f))],{width:`400em`,height:j(f/1e3),viewBox:`0 0 400000 `+f,preserveAspectRatio:`xMinYMin slice`})],t),a.style.height=j(d),o=n.depth+c+l}else{/cancel/.test(r)?s||n.classes.push(`cancel-pad`):r===`angl`?n.classes.push(`anglpad`):n.classes.push(`boxpad`);var p,m,h=0;/box/.test(r)?(h=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),p=t.fontMetrics().fboxsep+(r===`colorbox`?0:h),m=p):r===`angl`?(h=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),p=4*h,m=Math.max(0,.25-n.depth)):(p=s?.2:0,m=p),a=Wd(n,r,p,m,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle=`solid`,a.style.borderWidth=j(h)):r===`angl`&&h!==.049&&(a.style.borderTopWidth=j(h),a.style.borderRightWidth=j(h)),o=n.depth+m,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var g;if(e.backgroundColor)g=Bu({positionType:`individualShift`,children:[{type:`elem`,elem:a,shift:o},{type:`elem`,elem:n,shift:0}]});else{var _=/cancel|phase/.test(r)?[`svg-align`]:[];g=Bu({positionType:`individualShift`,children:[{type:`elem`,elem:n,shift:0},{type:`elem`,elem:a,shift:o,wrapperClasses:_}]})}return/cancel/.test(r)&&(g.height=n.height,g.depth=n.depth),/cancel/.test(r)&&!s?z([`mord`,`cancel-lap`],[g],t):z([`mord`],[g],t)},mathmlBuilder:(e,t)=>{var n,r=new B(e.label.includes(`colorbox`)?`mpadded`:`menclose`,[kd(e.body,t)]);switch(e.label){case`\\cancel`:r.setAttribute(`notation`,`updiagonalstrike`);break;case`\\bcancel`:r.setAttribute(`notation`,`downdiagonalstrike`);break;case`\\phase`:r.setAttribute(`notation`,`phasorangle`);break;case`\\sout`:r.setAttribute(`notation`,`horizontalstrike`);break;case`\\fbox`:r.setAttribute(`notation`,`box`);break;case`\\angl`:r.setAttribute(`notation`,`actuarial`);break;case`\\fcolorbox`:case`\\colorbox`: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`){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute(`style`,`border: `+j(i)+` solid `+e.borderColor)}break;case`\\xcancel`:r.setAttribute(`notation`,`updiagonalstrike downdiagonalstrike`);break}return e.backgroundColor&&r.setAttribute(`mathbackground`,e.backgroundColor),r}}),ed({type:`enclose`,names:[`\\fcolorbox`],numArgs:3,allowedInText:!0,argTypes:[`color`,`color`,`hbox`],handler(e,t,n){var r=e.parser,i=e.funcName,a=Xd(t[0],`color-token`).color,o=Xd(t[1],`color-token`).color,s=t[2];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}}}),ed({type:`enclose`,names:[`\\fbox`],numArgs:1,argTypes:[`hbox`],allowedInText:!0,handler(e,t){return{type:`enclose`,mode:e.parser.mode,label:`\\fbox`,body:t[0]}}}),ed({type:`enclose`,names:[`\\cancel`,`\\bcancel`,`\\xcancel`,`\\phase`],numArgs:1,handler(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}}}),ed({type:`enclose`,names:[`\\sout`],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser,r=e.funcName;n.mode===`math`&&n.settings.reportNonstrict(`mathVsSout`,`LaTeX's \\sout works only in text mode`);var i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}}}),ed({type:`enclose`,names:[`\\angl`],numArgs:1,argTypes:[`hbox`],allowedInText:!1,handler(e,t){return{type:`enclose`,mode:e.parser.mode,label:`\\angl`,body:t[0]}}});var Qf={};function $f(e){for(var t=e.type,n=e.names,r=e.props,i=e.handler,a=e.htmlBuilder,o=e.mathmlBuilder,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},c=0;c<n.length;++c)Qf[n[c]]=s;a&&(Qu[t]=a),o&&($u[t]=o)}var ep={};function V(e,t){ep[e]=t}var tp=class e{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(t,n){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}},np=class e{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(t,n){return new e(n,tp.range(this,t))}};function rp(e){var t=[];e.consumeSpaces();var n=e.fetch().text;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;return t}var ip=e=>{if(!e.parser.settings.displayMode)throw new A(`{`+e.envName+`} can be used only in display mode.`)},ap=new Set([`gather`,`gather*`]);function op(e){if(!e.includes(`ed`))return!e.includes(`*`)}function sp(e,t,n){var r=t.hskipBeforeAndAfter,i=t.addJot,a=t.cols,o=t.arraystretch,s=t.colSeparationType,c=t.autoTag,l=t.singleRow,u=t.emptySingleRow,d=t.maxNumCols,f=t.leqno;if(e.gullet.beginGroup(),l||e.gullet.macros.set(`\\cr`,`\\\\\\relax`),!o){var p=e.gullet.expandMacroAsText(`\\arraystretch`);if(p==null)o=1;else if(o=parseFloat(p),!o||o<0)throw new A(`Invalid \\arraystretch: `+p)}e.gullet.beginGroup();var m=[],h=[m],g=[],_=[],v=c==null?void 0:[];function y(){c&&e.gullet.macros.set(`\\@eqnsw`,`1`,!0)}function b(){v&&(e.gullet.macros.get(`\\df@tag`)?(v.push(e.subparse([new np(`\\df@tag`)])),e.gullet.macros.set(`\\df@tag`,void 0,!0)):v.push(!!c&&e.gullet.macros.get(`\\@eqnsw`)===`1`))}for(y(),_.push(rp(e));;){var x=e.parseExpression(!1,l?`\\end`:`\\\\`);e.gullet.endGroup(),e.gullet.beginGroup();var S={type:`ordgroup`,mode:e.mode,body:x};n&&(S={type:`styling`,mode:e.mode,style:n,resetFont:!0,body:[S]}),m.push(S);var C=e.fetch().text;if(C===`&`){if(d&&m.length===d){if(l||s)throw new A(`Too many tab characters: &`,e.nextToken);e.settings.reportNonstrict(`textEnv`,`Too few columns specified in the {array} column argument.`)}e.consume()}else if(C===`\\end`){b(),m.length===1&&S.type===`styling`&&S.body.length===1&&S.body[0].type===`ordgroup`&&S.body[0].body.length===0&&(h.length>1||!u)&&h.pop(),_.length<h.length+1&&_.push([]);break}else if(C===`\\\\`){e.consume();var w=void 0;e.gullet.future().text!==` `&&(w=e.parseSizeGroup(!0)),g.push(w?w.value:null),b(),_.push(rp(e)),m=[],h.push(m),y()}else throw new A(`Expected & or \\\\ or \\cr or \\end`,e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:e.mode,addJot:i,arraystretch:o,body:h,cols:a,rowGaps:g,hskipBeforeAndAfter:r,hLinesBeforeRow:_,colSeparationType:s,tags:v,leqno:f}}function cp(e){return e.slice(0,1)===`d`?`display`:`text`}var lp=function(e,t){var n,r,i=e.body.length,a=e.hLinesBeforeRow,o=0,s=Array(i),c=[],l=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),u=1/t.fontMetrics().ptPerEm,d=5*u;e.colSeparationType&&e.colSeparationType===`small`&&(d=.2778*(t.havingStyle(Uc.SCRIPT).sizeMultiplier/t.sizeMultiplier));var f=e.colSeparationType===`CD`?fl({number:3,unit:`ex`},t):12*u,p=3*u,m=e.arraystretch*f,h=.7*m,g=.3*m,_=0;function v(e){for(var t=0;t<e.length;++t)t>0&&(_+=.25),c.push({pos:_,isDashed:e[t]})}for(v(a[0]),n=0;n<e.body.length;++n){var y=e.body[n],b=h,x=g;o<y.length&&(o=y.length);var S={cells:Array(y.length),height:0,depth:0,pos:0};for(r=0;r<y.length;++r){var C=md(y[r],t);x<C.depth&&(x=C.depth),b<C.height&&(b=C.height),S.cells[r]=C}var w=e.rowGaps[n],T=0;w&&(T=fl(w,t),T>0&&(T+=g,x<T&&(x=T),T=0)),e.addJot&&n<e.body.length-1&&(x+=p),S.height=b,S.depth=x,_+=b,S.pos=_,_+=x+T,s[n]=S,v(a[n+1])}var E=_/2+t.fontMetrics().axisHeight,ee=e.cols||[],te=[],D,ne,re=[];if(e.tags&&e.tags.some(e=>e))for(n=0;n<i;++n){var ie=s[n],ae=ie.pos-E,oe=e.tags[n],se=void 0;se=oe===!0?z([`eqn-num`],[],t):oe===!1?z([],[],t):z([],cd(oe,t,!0),t),se.depth=ie.depth,se.height=ie.height,re.push({type:`elem`,elem:se,shift:ae})}for(r=0,ne=0;r<o||ne<ee.length;++r,++ne){for(var ce=ee[ne],le=!0;(ue=ce)?.type===`separator`;){var ue;if(le||(D=z([`arraycolsep`],[]),D.style.width=j(t.fontMetrics().doubleRuleSep),te.push(D)),ce.separator===`|`||ce.separator===`:`){var de=ce.separator===`|`?`solid`:`dashed`,fe=z([`vertical-separator`],[],t);fe.style.height=j(_),fe.style.borderRightWidth=j(l),fe.style.borderRightStyle=de,fe.style.margin=`0 `+j(-l/2);var pe=_-E;pe&&(fe.style.verticalAlign=j(-pe)),te.push(fe)}else throw new A(`Invalid separator type: `+ce.separator);ne++,ce=ee[ne],le=!1}if(!(r>=o)){var me=void 0;(r>0||e.hskipBeforeAndAfter)&&(me=ce?.pregap??d,me!==0&&(D=z([`arraycolsep`],[]),D.style.width=j(me),te.push(D)));var he=[];for(n=0;n<i;++n){var ge=s[n],_e=ge.cells[r];if(_e){var ve=ge.pos-E;_e.depth=ge.depth,_e.height=ge.height,he.push({type:`elem`,elem:_e,shift:ve})}}var ye=Bu({positionType:`individualShift`,children:he}),be=z([`col-align-`+(ce?.align||`c`)],[ye]);te.push(be),(r<o-1||e.hskipBeforeAndAfter)&&(me=ce?.postgap??d,me!==0&&(D=z([`arraycolsep`],[]),D.style.width=j(me),te.push(D)))}}var xe=z([`mtable`],te);if(c.length>0){for(var Se=Fu(`katex-hline`,t,l),Ce=Fu(`katex-hdashline`,t,l),we=[{type:`elem`,elem:xe,shift:0}];c.length>0;){var Te=c.pop(),Ee=Te.pos-E;Te.isDashed?we.push({type:`elem`,elem:Ce,shift:Ee}):we.push({type:`elem`,elem:Se,shift:Ee})}xe=Bu({positionType:`individualShift`,children:we})}if(re.length===0)return z([`mord`],[xe],t);var De=z([`katex-tag`],[Bu({positionType:`individualShift`,children:re})],t);return Lu([xe,De])},up={c:`center `,l:`left `,r:`right `},dp=function(e,t){for(var n=[],r=new B(`mtd`,[],[`mtr-glue`]),i=new B(`mtd`,[],[`mml-eqn-num`]),a=0;a<e.body.length;a++){for(var o=e.body[a],s=[],c=0;c<o.length;c++)s.push(new B(`mtd`,[kd(o[c],t)]));e.tags&&e.tags[a]&&(s.unshift(r),s.push(r),e.leqno?s.unshift(i):s.push(i)),n.push(new B(`mtr`,s))}var l=new B(`mtable`,n),u=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);l.setAttribute(`rowspacing`,j(u));var d=``,f=``;if(e.cols&&e.cols.length>0){var p=e.cols,m=``,h=!1,g=0,_=p.length;p[0].type===`separator`&&(d+=`top `,g=1),p[p.length-1].type===`separator`&&(d+=`bottom `,--_);for(var v=g;v<_;v++){var y=p[v];y.type===`align`?(f+=up[y.align],h&&(m+=`none `),h=!0):y.type===`separator`&&(h&&=(m+=y.separator===`|`?`solid `:`dashed `,!1))}l.setAttribute(`columnalign`,f.trim()),/[sd]/.test(m)&&l.setAttribute(`columnlines`,m.trim())}if(e.colSeparationType===`align`){for(var b=e.cols||[],x=``,S=1;S<b.length;S++)x+=S%2?`0em `:`1em `;l.setAttribute(`columnspacing`,x.trim())}else e.colSeparationType===`alignat`||e.colSeparationType===`gather`?l.setAttribute(`columnspacing`,`0em`):e.colSeparationType===`small`?l.setAttribute(`columnspacing`,`0.2778em`):e.colSeparationType===`CD`?l.setAttribute(`columnspacing`,`0.5em`):l.setAttribute(`columnspacing`,`1em`);var C=``,w=e.hLinesBeforeRow;d+=w[0].length>0?`left `:``,d+=w[w.length-1].length>0?`right `:``;for(var T=1;T<w.length-1;T++)C+=w[T].length===0?`none `:w[T][0]?`dashed `:`solid `;return/[sd]/.test(C)&&l.setAttribute(`rowlines`,C.trim()),d!==``&&(l=new B(`menclose`,[l]),l.setAttribute(`notation`,d.trim())),e.arraystretch&&e.arraystretch<1&&(l=new B(`mstyle`,[l]),l.setAttribute(`scriptlevel`,`1`)),l},fp=function(e,t){e.envName.includes(`ed`)||ip(e);var n=[],r=e.envName===`split`,i=sp(e.parser,{cols:n,addJot:!0,autoTag:r?void 0:op(e.envName),emptySingleRow:!0,colSeparationType:e.envName.includes(`at`)?`alignat`:`align`,maxNumCols:r?2:void 0,leqno:e.parser.settings.leqno},`display`),a=0,o=0,s={type:`ordgroup`,mode:e.mode,body:[]};if(t[0]&&t[0].type===`ordgroup`){for(var c=``,l=0;l<t[0].body.length;l++){var u=Xd(t[0].body[l],`textord`);c+=u.text}a=Number(c),o=a*2}var d=!o;i.body.forEach(function(e){for(var t=1;t<e.length;t+=2)Xd(Xd(e[t],`styling`).body[0],`ordgroup`).body.unshift(s);if(d)o<e.length&&(o=e.length);else{var n=e.length/2;if(a<n)throw new A(`Too many math in a row: `+(`expected `+a+`, but got `+n),e[0])}});for(var f=0;f<o;++f){var p=`r`,m=0;f%2==1?p=`l`:f>0&&d&&(m=1),n[f]={type:`align`,align:p,pregap:m,postgap:0}}return i.colSeparationType=d?`align`:`alignat`,i};$f({type:`array`,names:[`array`,`darray`],props:{numArgs:1},handler(e,t){var n=(Qd(t[0])?[t[0]]:Xd(t[0],`ordgroup`).body).map(function(e){var t=Zd(e).text;if(`lcr`.includes(t))return{type:`align`,align:t};if(t===`|`)return{type:`separator`,separator:`|`};if(t===`:`)return{type:`separator`,separator:`:`};throw new A(`Unknown column alignment: `+t,e)}),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return sp(e.parser,r,cp(e.envName))},htmlBuilder:lp,mathmlBuilder:dp}),$f({type:`array`,names:[`matrix`,`pmatrix`,`bmatrix`,`Bmatrix`,`vmatrix`,`Vmatrix`,`matrix*`,`pmatrix*`,`bmatrix*`,`Bmatrix*`,`vmatrix*`,`Vmatrix*`],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:[`(`,`)`],bmatrix:[`[`,`]`],Bmatrix:[`\\{`,`\\}`],vmatrix:[`|`,`|`],Vmatrix:[`\\Vert`,`\\Vert`]}[e.envName.replace(`*`,``)],n=`c`,r={hskipBeforeAndAfter:!1,cols:[{type:`align`,align:n}]};if(e.envName.charAt(e.envName.length-1)===`*`){var i=e.parser;if(i.consumeSpaces(),i.fetch().text===`[`){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,!`lcr`.includes(n))throw new A(`Expected l or c or r`,i.nextToken);i.consume(),i.consumeSpaces(),i.expect(`]`),i.consume(),r.cols=[{type:`align`,align:n}]}}var a=sp(e.parser,r,cp(e.envName)),o=Math.max(0,...a.body.map(e=>e.length));return a.cols=Array(o).fill({type:`align`,align:n}),t?{type:`leftright`,mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:lp,mathmlBuilder:dp}),$f({type:`array`,names:[`smallmatrix`],props:{numArgs:0},handler(e){var t=sp(e.parser,{arraystretch:.5},`script`);return t.colSeparationType=`small`,t},htmlBuilder:lp,mathmlBuilder:dp}),$f({type:`array`,names:[`subarray`],props:{numArgs:1},handler(e,t){var n=(Qd(t[0])?[t[0]]:Xd(t[0],`ordgroup`).body).map(function(e){var t=Zd(e).text;if(`lc`.includes(t))return{type:`align`,align:t};throw new A(`Unknown column alignment: `+t,e)});if(n.length>1)throw new A(`{subarray} can contain only one column`);var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5},i=sp(e.parser,r,`script`);if(i.body.length>0&&i.body[0].length>1)throw new A(`{subarray} can contain only one column`);return i},htmlBuilder:lp,mathmlBuilder:dp}),$f({type:`array`,names:[`cases`,`dcases`,`rcases`,`drcases`],props:{numArgs:0},handler(e){var t=sp(e.parser,{arraystretch:1.2,cols:[{type:`align`,align:`l`,pregap:0,postgap:1},{type:`align`,align:`l`,pregap:0,postgap:0}]},cp(e.envName));return{type:`leftright`,mode:e.mode,body:[t],left:e.envName.includes(`r`)?`.`:`\\{`,right:e.envName.includes(`r`)?`\\}`:`.`,rightColor:void 0}},htmlBuilder:lp,mathmlBuilder:dp}),$f({type:`array`,names:[`align`,`align*`,`aligned`,`split`],props:{numArgs:0},handler:fp,htmlBuilder:lp,mathmlBuilder:dp}),$f({type:`array`,names:[`gathered`,`gather`,`gather*`],props:{numArgs:0},handler(e){ap.has(e.envName)&&ip(e);var t={cols:[{type:`align`,align:`c`}],addJot:!0,colSeparationType:`gather`,autoTag:op(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return sp(e.parser,t,`display`)},htmlBuilder:lp,mathmlBuilder:dp}),$f({type:`array`,names:[`alignat`,`alignat*`,`alignedat`],props:{numArgs:1},handler:fp,htmlBuilder:lp,mathmlBuilder:dp}),$f({type:`array`,names:[`equation`,`equation*`],props:{numArgs:0},handler(e){ip(e);var t={autoTag:op(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return sp(e.parser,t,`display`)},htmlBuilder:lp,mathmlBuilder:dp}),$f({type:`array`,names:[`CD`],props:{numArgs:0},handler(e){return ip(e),pf(e.parser)},htmlBuilder:lp,mathmlBuilder:dp}),V(`\\nonumber`,`\\gdef\\@eqnsw{0}`),V(`\\notag`,`\\nonumber`),ed({type:`text`,names:[`\\hline`,`\\hdashline`],numArgs:0,allowedInText:!0,allowedInMath:!0,handler(e,t){throw new A(e.funcName+` valid only within array environment`)}});var pp=Qf;ed({type:`environment`,names:[`\\begin`,`\\end`],numArgs:1,argTypes:[`text`],handler(e,t){var n=e.parser,r=e.funcName,i=t[0];if(i.type!==`ordgroup`)throw new A(`Invalid environment name`,i);for(var a=``,o=0;o<i.body.length;++o)a+=Xd(i.body[o],`textord`).text;if(r===`\\begin`){if(!Object.prototype.hasOwnProperty.call(pp,a))throw new A(`No such environment: `+a,i);var s=pp[a],c=n.parseArguments(`\\begin{`+a+`}`,s),l=c.args,u=c.optArgs,d={mode:n.mode,envName:a,parser:n},f=s.handler(d,l,u);n.expect(`\\end`,!1);var p=n.nextToken,m=Xd(n.parseFunction(),`environment`);if(m.name!==a)throw new A(`Mismatch: \\begin{`+a+`} matched by \\end{`+m.name+`}`,p);return f}return{type:`environment`,mode:n.mode,name:a,nameGroup:i}}});var mp=(e,t)=>{var n=e.font,r=t.withFont(n);return md(e.body,r)},hp=(e,t)=>{var n=e.font,r=t.withFont(n);return kd(e.body,r)},gp={"\\Bbb":`\\mathbb`,"\\bold":`\\mathbf`,"\\frak":`\\mathfrak`};ed({type:`font`,names:[`\\mathrm`,`\\mathit`,`\\mathbf`,`\\mathnormal`,`\\mathsfit`,`\\mathbb`,`\\mathcal`,`\\mathfrak`,`\\mathscr`,`\\mathsf`,`\\mathtt`,`\\Bbb`,`\\bold`,`\\frak`],numArgs:1,allowedInArgument:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=nd(t[0]),a=r in gp?gp[r]:r;return{type:`font`,mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:mp,mathmlBuilder:hp}),ed({type:`mclass`,names:[`\\boldsymbol`,`\\bm`],numArgs:1,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`mclass`,mode:n.mode,mclass:sf(r),body:[{type:`font`,mode:n.mode,font:`boldsymbol`,body:r}],isCharacterBox:bc(r)}}}),ed({type:`font`,names:[`\\rm`,`\\sf`,`\\tt`,`\\bf`,`\\it`,`\\cal`],numArgs:0,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=e.breakOnTokenText,a=n.mode,o=n.parseExpression(!0,i);return{type:`font`,mode:a,font:`math`+r.slice(1),body:{type:`ordgroup`,mode:n.mode,body:o}}}});var _p=(e,t)=>{var n=t.style,r=n.fracNum(),i=n.fracDen(),a=t.havingStyle(r),o=md(e.numer,a,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,c=3.5/t.fontMetrics().ptPerEm;o.height=o.height<s?s:o.height,o.depth=o.depth<c?c:o.depth}a=t.havingStyle(i);var l=md(e.denom,a,t),u,d,f;e.hasBarLine?(e.barSize?(d=fl(e.barSize,t),u=Fu(`frac-line`,t,d)):u=Fu(`frac-line`,t),d=u.height,f=u.height):(u=null,d=0,f=t.fontMetrics().defaultRuleThickness);var p,m,h;n.size===Uc.DISPLAY.size?(p=t.fontMetrics().num1,m=d>0?3*f:7*f,h=t.fontMetrics().denom1):(d>0?(p=t.fontMetrics().num2,m=f):(p=t.fontMetrics().num3,m=3*f),h=t.fontMetrics().denom2);var g;if(u){var _=t.fontMetrics().axisHeight;p-o.depth-(_+.5*d)<m&&(p+=m-(p-o.depth-(_+.5*d))),_-.5*d-(l.height-h)<m&&(h+=m-(_-.5*d-(l.height-h)));var v=-(_-.5*d);g=Bu({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:u,shift:v},{type:`elem`,elem:o,shift:-p}]})}else{var y=p-o.depth-(l.height-h);y<m&&(p+=.5*(m-y),h+=.5*(m-y)),g=Bu({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:o,shift:-p}]})}a=t.havingStyle(n),g.height*=a.sizeMultiplier/t.sizeMultiplier,g.depth*=a.sizeMultiplier/t.sizeMultiplier;var b=n.size===Uc.DISPLAY.size?t.fontMetrics().delim1:n.size===Uc.SCRIPTSCRIPT.size?t.havingStyle(Uc.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,x=e.leftDelim==null?pd(t,[`mopen`]):Gf(e.leftDelim,b,!0,t.havingStyle(n),e.mode,[`mopen`]),S=e.continued?z([]):e.rightDelim==null?pd(t,[`mclose`]):Gf(e.rightDelim,b,!0,t.havingStyle(n),e.mode,[`mclose`]);return z([`mord`].concat(a.sizingClasses(t)),[x,z([`mfrac`],[g]),S],t)},vp=(e,t)=>{var n=new B(`mfrac`,[kd(e.numer,t),kd(e.denom,t)]);if(!e.hasBarLine)n.setAttribute(`linethickness`,`0px`);else if(e.barSize){var r=fl(e.barSize,t);n.setAttribute(`linethickness`,j(r))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var a=new B(`mo`,[new vd(e.leftDelim.replace(`\\`,``))]);a.setAttribute(`fence`,`true`),i.push(a)}if(i.push(n),e.rightDelim!=null){var o=new B(`mo`,[new vd(e.rightDelim.replace(`\\`,``))]);o.setAttribute(`fence`,`true`),i.push(o)}return Cd(i)}return n},yp=(e,t)=>t?{type:`styling`,mode:e.mode,style:t,body:[e]}:e;ed({type:`genfrac`,names:[`\\cfrac`,`\\dfrac`,`\\frac`,`\\tfrac`,`\\dbinom`,`\\binom`,`\\tbinom`,`\\\\atopfrac`,`\\\\bracefrac`,`\\\\brackfrac`],numArgs:2,allowedInArgument:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0],a=t[1],o,s=null,c=null;switch(r){case`\\cfrac`:case`\\dfrac`:case`\\frac`:case`\\tfrac`:o=!0;break;case`\\\\atopfrac`:o=!1;break;case`\\dbinom`:case`\\binom`:case`\\tbinom`:o=!1,s=`(`,c=`)`;break;case`\\\\bracefrac`:o=!1,s=`\\{`,c=`\\}`;break;case`\\\\brackfrac`:o=!1,s=`[`,c=`]`;break;default:throw Error(`Unrecognized genfrac command`)}var l=r===`\\cfrac`,u=null;return l||r.startsWith(`\\d`)?u=`display`:r.startsWith(`\\t`)&&(u=`text`),yp({type:`genfrac`,mode:n.mode,numer:i,denom:a,continued:l,hasBarLine:o,leftDelim:s,rightDelim:c,barSize:null},u)},htmlBuilder:_p,mathmlBuilder:vp}),ed({type:`infix`,names:[`\\over`,`\\choose`,`\\atop`,`\\brace`,`\\brack`],numArgs:0,infix:!0,handler(e){var t=e.parser,n=e.funcName,r=e.token,i;switch(n){case`\\over`:i=`\\frac`;break;case`\\choose`:i=`\\binom`;break;case`\\atop`:i=`\\\\atopfrac`;break;case`\\brace`:i=`\\\\bracefrac`;break;case`\\brack`:i=`\\\\brackfrac`;break;default:throw Error(`Unrecognized infix genfrac command`)}return{type:`infix`,mode:t.mode,replaceWith:i,token:r}}});var bp=[`display`,`text`,`script`,`scriptscript`],xp=function(e){var t=null;return e.length>0&&(t=e,t=t===`.`?null:t),t};ed({type:`genfrac`,names:[`\\genfrac`],numArgs:6,allowedInArgument:!0,argTypes:[`math`,`math`,`size`,`text`,`math`,`math`],handler(e,t){var n=e.parser,r=t[4],i=t[5],a=nd(t[0]),o=a.type===`atom`&&a.family===`open`?xp(a.text):null,s=nd(t[1]),c=s.type===`atom`&&s.family===`close`?xp(s.text):null,l=Xd(t[2],`size`),u,d=null;l.isBlank?u=!0:(d=l.value,u=d.number>0);var f=null,p=t[3];if(p.type===`ordgroup`){if(p.body.length>0){var m=Xd(p.body[0],`textord`);f=bp[Number(m.text)]}}else p=Xd(p,`textord`),f=bp[Number(p.text)];return yp({type:`genfrac`,mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:o,rightDelim:c},f)}}),ed({type:`infix`,names:[`\\above`],numArgs:1,argTypes:[`size`],infix:!0,handler(e,t){var n=e.parser;e.funcName;var r=e.token;return{type:`infix`,mode:n.mode,replaceWith:`\\\\abovefrac`,size:Xd(t[0],`size`).value,token:r}}}),ed({type:`genfrac`,names:[`\\\\abovefrac`],numArgs:3,argTypes:[`math`,`size`,`math`],handler:(e,t)=>{var n=e.parser;e.funcName;var r=t[0],i=Xd(t[1],`infix`).size;if(!i)throw Error(`\\\\abovefrac expected size, but got `+String(i));var a=t[2],o=i.number>0;return{type:`genfrac`,mode:n.mode,numer:r,denom:a,continued:!1,hasBarLine:o,barSize:i,leftDelim:null,rightDelim:null}}});var Sp=(e,t)=>{var n=t.style,r,i;e.type===`supsub`?(r=e.sup?md(e.sup,t.havingStyle(n.sup()),t):md(e.sub,t.havingStyle(n.sub()),t),i=Xd(e.base,`horizBrace`)):i=Xd(e,`horizBrace`);var a=md(i.base,t.havingBaseStyle(Uc.DISPLAY)),o=Ud(i,t),s=i.isOver?Bu({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:.1},{type:`elem`,elem:o,wrapperClasses:[`svg-align`]}]}):Bu({positionType:`bottom`,positionData:a.depth+.1+o.height,children:[{type:`elem`,elem:o,wrapperClasses:[`svg-align`]},{type:`kern`,size:.1},{type:`elem`,elem:a}]});if(r){var c=z([`minner`,i.isOver?`mover`:`munder`],[s],t);s=i.isOver?Bu({positionType:`firstBaseline`,children:[{type:`elem`,elem:c},{type:`kern`,size:.2},{type:`elem`,elem:r}]}):Bu({positionType:`bottom`,positionData:c.depth+.2+r.height+r.depth,children:[{type:`elem`,elem:r},{type:`kern`,size:.2},{type:`elem`,elem:c}]})}return z([`minner`,i.isOver?`mover`:`munder`],[s],t)};ed({type:`horizBrace`,names:[`\\overbrace`,`\\underbrace`,`\\overbracket`,`\\underbracket`],numArgs:1,handler(e,t){var n=e.parser,r=e.funcName;return{type:`horizBrace`,mode:n.mode,label:r,isOver:r.includes(`\\over`),base:t[0]}},htmlBuilder:Sp,mathmlBuilder:(e,t)=>{var n=Bd(e.label);return new B(e.isOver?`mover`:`munder`,[kd(e.base,t),n])}}),ed({type:`href`,names:[`\\href`],numArgs:2,argTypes:[`url`,`original`],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[1],i=Xd(t[0],`url`).url;return n.settings.isTrusted({command:`\\href`,url:i})?{type:`href`,mode:n.mode,href:i,body:rd(r)}:n.formatUnsupportedCmd(`\\href`)},htmlBuilder:(e,t)=>{var n=cd(e.body,t,!1);return Iu(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=Od(e.body,t);return n instanceof B||(n=new B(`mrow`,[n])),n.setAttribute(`href`,e.href),n}}),ed({type:`href`,names:[`\\url`],numArgs:1,argTypes:[`url`],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=Xd(t[0],`url`).url;if(!n.settings.isTrusted({command:`\\url`,url:r}))return n.formatUnsupportedCmd(`\\url`);for(var i=[],a=0;a<r.length;a++){var o=r[a];o===`~`&&(o=`\\textasciitilde`),i.push({type:`textord`,mode:`text`,text:o})}var s={type:`text`,mode:n.mode,font:`\\texttt`,body:i};return{type:`href`,mode:n.mode,href:r,body:rd(s)}}}),ed({type:`hbox`,names:[`\\hbox`],numArgs:1,argTypes:[`text`],allowedInText:!0,primitive:!0,handler(e,t){return{type:`hbox`,mode:e.parser.mode,body:rd(t[0])}},htmlBuilder(e,t){return Lu(cd(e.body,t.withFont(``),!1))},mathmlBuilder(e,t){return new B(`mrow`,Dd(e.body,t.withFont(``)))}}),ed({type:`html`,names:[`\\htmlClass`,`\\htmlId`,`\\htmlStyle`,`\\htmlData`],numArgs:2,argTypes:[`raw`,`original`],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName;e.token;var i=Xd(t[0],`raw`).string,a=t[1];n.settings.strict&&n.settings.reportNonstrict(`htmlExtension`,`HTML extension is disabled on strict mode`);var o,s={};switch(r){case`\\htmlClass`:s.class=i,o={command:`\\htmlClass`,class:i};break;case`\\htmlId`:s.id=i,o={command:`\\htmlId`,id:i};break;case`\\htmlStyle`:s.style=i,o={command:`\\htmlStyle`,style:i};break;case`\\htmlData`:for(var c=`{,}`,l=[],u=``,d=0;d<i.length;d++)i.startsWith(c,d)?(u+=`,`,d+=c.length-1):i[d]===`,`?(l.push(u),u=``):u+=i[d];l.push(u);for(var f=0;f<l.length;f++){var p=l[f],m=p.indexOf(`=`);if(m<0)throw new A(`\\htmlData key/value '`+p+`' missing equals sign`);var h=p.slice(0,m),g=p.slice(m+1);s[`data-`+h.trim()]=g}o={command:`\\htmlData`,attributes:s};break;default:throw Error(`Unrecognized html command`)}return n.settings.isTrusted(o)?{type:`html`,mode:n.mode,attributes:s,body:rd(a)}:n.formatUnsupportedCmd(r)},htmlBuilder:(e,t)=>{var n=cd(e.body,t,!1),r=[`enclosing`];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=z(r,n,t);for(var a of Object.entries(e.attributes)){var o=a[0],s=a[1];o!==`class`&&i.setAttribute(o,s)}return i},mathmlBuilder:(e,t)=>Od(e.body,t)}),ed({type:`htmlmathml`,names:[`\\html@mathml`],numArgs:2,allowedInArgument:!0,allowedInText:!0,handler:(e,t)=>({type:`htmlmathml`,mode:e.parser.mode,html:rd(t[0]),mathml:rd(t[1])}),htmlBuilder:(e,t)=>Lu(cd(e.html,t,!1)),mathmlBuilder:(e,t)=>Od(e.mathml,t)});var Cp=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:`bp`};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new A(`Invalid size: '`+e+`' in \\includegraphics`);var n={number:+(t[1]+t[2]),unit:t[3]};if(!dl(n))throw new A(`Invalid unit: '`+n.unit+`' in \\includegraphics.`);return n};ed({type:`includegraphics`,names:[`\\includegraphics`],numArgs:1,numOptionalArgs:1,argTypes:[`raw`,`url`],allowedInText:!1,handler:(e,t,n)=>{var r=e.parser,i={number:0,unit:`em`},a={number:.9,unit:`em`},o={number:0,unit:`em`},s=``;if(n[0])for(var c=Xd(n[0],`raw`).string.split(`,`),l=0;l<c.length;l++){var u=c[l].split(`=`);if(u.length===2){var d=u[1].trim();switch(u[0].trim()){case`alt`:s=d;break;case`width`:i=Cp(d);break;case`height`:a=Cp(d);break;case`totalheight`:o=Cp(d);break;default:throw new A(`Invalid key: '`+u[0]+`' in \\includegraphics.`)}}}var f=Xd(t[0],`url`).url;return s===``&&(s=f,s=s.replace(/^.*[\\/]/,``),s=s.substring(0,s.lastIndexOf(`.`))),r.settings.isTrusted({command:`\\includegraphics`,url:f})?{type:`includegraphics`,mode:r.mode,alt:s,width:i,height:a,totalheight:o,src:f}:r.formatUnsupportedCmd(`\\includegraphics`)},htmlBuilder:(e,t)=>{var n=fl(e.height,t),r=0;e.totalheight.number>0&&(r=fl(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=fl(e.width,t));var a={height:j(n+r)};i>0&&(a.width=j(i)),r>0&&(a.verticalAlign=j(-r));var o=new xl(e.src,e.alt,a);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new B(`mglyph`,[]);n.setAttribute(`alt`,e.alt);var r=fl(e.height,t),i=0;if(e.totalheight.number>0&&(i=fl(e.totalheight,t)-r,n.setAttribute(`valign`,j(-i))),n.setAttribute(`height`,j(r+i)),e.width.number>0){var a=fl(e.width,t);n.setAttribute(`width`,j(a))}return n.setAttribute(`src`,e.src),n}}),ed({type:`kern`,names:[`\\kern`,`\\mkern`,`\\hskip`,`\\mskip`],numArgs:1,argTypes:[`size`],primitive:!0,allowedInText:!0,handler(e,t){var n=e.parser,r=e.funcName,i=Xd(t[0],`size`);if(n.settings.strict){var a=r[1]===`m`,o=i.value.unit===`mu`;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`)}return{type:`kern`,mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return Vu(e.dimension,t)},mathmlBuilder(e,t){return new yd(fl(e.dimension,t))}}),ed({type:`lap`,names:[`\\mathllap`,`\\mathrlap`,`\\mathclap`],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0];return{type:`lap`,mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment===`clap`?(n=z([],[md(e.body,t)]),n=z([`katex-inner`],[n],t)):n=z([`katex-inner`],[md(e.body,t)]);var r=z([`katex-fix`],[]),i=z([e.alignment],[n,r],t),a=z([`katex-strut`]);return a.style.height=j(i.height+i.depth),i.depth&&(a.style.verticalAlign=j(-i.depth)),i.children.unshift(a),i=z([`katex-thinbox`],[i],t),z([`mord`,`katex-vbox`],[i],t)},mathmlBuilder:(e,t)=>{var n=new B(`mpadded`,[kd(e.body,t)]);if(e.alignment!==`rlap`){var r=e.alignment===`llap`?`-1`:`-0.5`;n.setAttribute(`lspace`,r+`width`)}return n.setAttribute(`width`,`0px`),n}}),ed({type:`styling`,names:[`\\(`,`$`],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){var n=e.funcName,r=e.parser,i=r.mode;r.switchMode(`math`);var a=n===`\\(`?`\\)`:`$`,o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:`styling`,mode:r.mode,style:`text`,resetFont:!0,body:o}}}),ed({type:`text`,names:[`\\)`,`\\]`],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){throw new A(`Mismatched `+e.funcName)}});var wp=(e,t)=>{switch(t.style.size){case Uc.DISPLAY.size:return e.display;case Uc.TEXT.size:return e.text;case Uc.SCRIPT.size:return e.script;case Uc.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};ed({type:`mathchoice`,names:[`\\mathchoice`],numArgs:4,primitive:!0,handler:(e,t)=>({type:`mathchoice`,mode:e.parser.mode,display:rd(t[0]),text:rd(t[1]),script:rd(t[2]),scriptscript:rd(t[3])}),htmlBuilder:(e,t)=>Lu(cd(wp(e,t),t,!1)),mathmlBuilder:(e,t)=>Od(wp(e,t),t)});var Tp=(e,t,n,r,i,a,o)=>{e=z([],[e]);var s=n&&bc(n),c,l;if(t){var u=md(t,r.havingStyle(i.sup()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=md(n,r.havingStyle(i.sub()),r);c={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}var f;if(l&&c)f=Bu({positionType:`bottom`,positionData:r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:j(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:j(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else if(c)f=Bu({positionType:`top`,positionData:e.height-o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:j(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e}]});else if(l)f=Bu({positionType:`bottom`,positionData:e.depth+o,children:[{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:j(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else return e;var p=[f];if(c&&a!==0&&!s){var m=z([`mspace`],[],r);m.style.marginRight=j(a),p.unshift(m)}return z([`mop`,`op-limits`],p,r)},Ep=new Set([`\\smallint`]),Dp=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=Xd(e.base,`op`),i=!0):a=Xd(e,`op`);var o=t.style,s=!1;o.size===Uc.DISPLAY.size&&a.symbol&&!Ep.has(a.name)&&(s=!0);var c,l;if(a.symbol){var u=s?`Size2-Regular`:`Size1-Regular`,d=``;if((a.name===`\\oiint`||a.name===`\\oiiint`)&&(d=a.name.slice(1),a.name=d===`oiint`?`\\iint`:`\\iiint`),c=Du(a.name,u,`math`,t,[`mop`,`op-symbol`,s?`large-op`:`small-op`]),l=c.italic,d.length>0){var f=Gu(d+`Size`+(s?`2`:`1`),t);c=Bu({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:0},{type:`elem`,elem:f,shift:s?.08:0}]}),a.name=`\\`+d,c.classes.unshift(`mop`),c.italic=l}}else if(a.body){var p=cd(a.body,t,!0);p.length===1&&p[0]instanceof Cl?(c=p[0],c.classes[0]=`mop`):c=z([`mop`],p,t)}else{for(var m=[],h=1;h<a.name.length;h++)m.push(Ou(a.name[h],a.mode,t));c=z([`mop`],m,t)}var g=0,_=0;return(c instanceof Cl||a.name===`\\oiint`||a.name===`\\oiiint`)&&!a.suppressBaseShift&&(g=(c.height-c.depth)/2-t.fontMetrics().axisHeight,_=c.italic??0),i?Tp(c,n,r,t,o,_,g):(g&&(c.style.position=`relative`,c.style.top=j(g)),c)},Op=(e,t)=>{var n;if(e.symbol)n=new B(`mo`,[Sd(e.name,e.mode)]),Ep.has(e.name)&&n.setAttribute(`largeop`,`false`);else if(e.body)n=new B(`mo`,Dd(e.body,t));else{n=new B(`mi`,[new vd(e.name.slice(1))]);var r=new B(`mo`,[Sd(`⁡`,`text`)]);n=e.parentIsSupSub?new B(`mrow`,[n,r]):_d([n,r])}return n},kp={"∏":`\\prod`,"∐":`\\coprod`,"∑":`\\sum`,"⋀":`\\bigwedge`,"⋁":`\\bigvee`,"⋂":`\\bigcap`,"⋃":`\\bigcup`,"⨀":`\\bigodot`,"⨁":`\\bigoplus`,"⨂":`\\bigotimes`,"⨄":`\\biguplus`,"⨆":`\\bigsqcup`};ed({type:`op`,names:`\\coprod.\\bigvee.\\bigwedge.\\biguplus.\\bigcap.\\bigcup.\\intop.\\prod.\\sum.\\bigotimes.\\bigoplus.\\bigodot.\\bigsqcup.\\smallint.∏.∐.∑.⋀.⋁.⋂.⋃.⨀.⨁.⨂.⨄.⨆`.split(`.`),numArgs:0,handler:(e,t)=>{var n=e.parser,r=e.funcName;return r.length===1&&(r=kp[r]),{type:`op`,mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Dp,mathmlBuilder:Op}),ed({type:`op`,names:[`\\mathop`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`op`,mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:rd(r)}}});var Ap={"∫":`\\int`,"∬":`\\iint`,"∭":`\\iiint`,"∮":`\\oint`,"∯":`\\oiint`,"∰":`\\oiiint`};ed({type:`op`,names:`\\arcsin.\\arccos.\\arctan.\\arctg.\\arcctg.\\arg.\\ch.\\cos.\\cosec.\\cosh.\\cot.\\cotg.\\coth.\\csc.\\ctg.\\cth.\\deg.\\dim.\\exp.\\hom.\\ker.\\lg.\\ln.\\log.\\sec.\\sin.\\sinh.\\sh.\\tan.\\tanh.\\tg.\\th`.split(`.`),numArgs:0,handler(e){var t=e.parser,n=e.funcName;return{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}}}),ed({type:`op`,names:[`\\det`,`\\gcd`,`\\inf`,`\\lim`,`\\max`,`\\min`,`\\Pr`,`\\sup`],numArgs:0,handler(e){var t=e.parser,n=e.funcName;return{type:`op`,mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}}}),ed({type:`op`,names:[`\\int`,`\\iint`,`\\iiint`,`\\oint`,`\\oiint`,`\\oiiint`,`∫`,`∬`,`∭`,`∮`,`∯`,`∰`],numArgs:0,allowedInArgument:!0,handler(e){var t=e.parser,n=e.funcName;return n.length===1&&(n=Ap[n]),{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}}});var jp=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=Xd(e.base,`operatorname`),i=!0):a=Xd(e,`operatorname`);var o;if(a.body.length>0){for(var s=cd(a.body.map(e=>{var t=`text`in e?e.text:void 0;return typeof t==`string`?{type:`textord`,mode:e.mode,text:t}:e}),t.withFont(`mathrm`),!0),c=0;c<s.length;c++){var l=s[c];l instanceof Cl&&(l.text=l.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`))}o=z([`mop`],s,t)}else o=z([`mop`],[],t);return i?Tp(o,n,r,t,t.style,0,0):o};ed({type:`operatorname`,names:[`\\operatorname@`,`\\operatornamewithlimits`],numArgs:1,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0];return{type:`operatorname`,mode:n.mode,body:rd(i),alwaysHandleSupSub:r===`\\operatornamewithlimits`,limits:!1,parentIsSupSub:!1}},htmlBuilder:jp,mathmlBuilder:(e,t)=>{for(var n=Dd(e.body,t.withFont(`mathrm`)),r=!0,i=0;i<n.length;i++){var a=n[i];if(!(a instanceof yd))if(a instanceof B)switch(a.type){case`mi`:case`mn`:case`mspace`:case`mtext`:break;case`mo`:var o=a.children[0];a.children.length===1&&o instanceof vd?o.text=o.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`):r=!1;break;default:r=!1}else r=!1}r&&(n=[new vd(n.map(e=>e.toText()).join(``))]);var s=new B(`mi`,n);s.setAttribute(`mathvariant`,`normal`);var c=new B(`mo`,[Sd(`⁡`,`text`)]);return e.parentIsSupSub?new B(`mrow`,[s,c]):_d([s,c])}}),V(`\\operatorname`,`\\@ifstar\\operatornamewithlimits\\operatorname@`),td({type:`ordgroup`,htmlBuilder(e,t){return e.semisimple?Lu(cd(e.body,t,!1)):z([`mord`],cd(e.body,t,!0),t)},mathmlBuilder(e,t){return Od(e.body,t,!0)}}),ed({type:`overline`,names:[`\\overline`],numArgs:1,handler(e,t){var n=e.parser,r=t[0];return{type:`overline`,mode:n.mode,body:r}},htmlBuilder(e,t){var n=md(e.body,t.havingCrampedStyle()),r=Fu(`overline-line`,t),i=t.fontMetrics().defaultRuleThickness;return z([`mord`,`katex-overline`],[Bu({positionType:`firstBaseline`,children:[{type:`elem`,elem:n},{type:`kern`,size:3*i},{type:`elem`,elem:r},{type:`kern`,size:i}]})],t)},mathmlBuilder(e,t){var n=new B(`mo`,[new vd(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new B(`mover`,[kd(e.body,t),n]);return r.setAttribute(`accent`,`true`),r}}),ed({type:`phantom`,names:[`\\phantom`],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`phantom`,mode:n.mode,body:rd(r)}},htmlBuilder:(e,t)=>Lu(cd(e.body,t.withPhantom(),!1)),mathmlBuilder:(e,t)=>new B(`mphantom`,Dd(e.body,t))}),V(`\\hphantom`,`\\smash{\\phantom{#1}}`),ed({type:`vphantom`,names:[`\\vphantom`],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`vphantom`,mode:n.mode,body:r}},htmlBuilder:(e,t)=>z([`mord`,`rlap`],[z([`katex-inner`],[md(e.body,t.withPhantom())]),z([`katex-fix`],[])],t),mathmlBuilder:(e,t)=>{var n=new B(`mpadded`,[new B(`mphantom`,Dd(rd(e.body),t))]);return n.setAttribute(`width`,`0px`),n}}),ed({type:`raisebox`,names:[`\\raisebox`],numArgs:2,argTypes:[`size`,`hbox`],allowedInText:!0,handler(e,t){var n=e.parser,r=Xd(t[0],`size`).value,i=t[1];return{type:`raisebox`,mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=md(e.body,t);return Bu({positionType:`shift`,positionData:-fl(e.dy,t),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){var n=new B(`mpadded`,[kd(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute(`voffset`,r),n}}),ed({type:`internal`,names:[`\\relax`],numArgs:0,allowedInText:!0,allowedInArgument:!0,handler(e){return{type:`internal`,mode:e.parser.mode}}}),ed({type:`rule`,names:[`\\rule`],numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`size`,`size`,`size`],handler(e,t,n){var r=e.parser,i=n[0],a=Xd(t[0],`size`),o=Xd(t[1],`size`);return{type:`rule`,mode:r.mode,shift:i&&Xd(i,`size`).value,width:a.value,height:o.value}},htmlBuilder(e,t){var n=z([`mord`,`katex-rule`],[],t),r=fl(e.width,t),i=fl(e.height,t),a=e.shift?fl(e.shift,t):0;return n.style.borderRightWidth=j(r),n.style.borderTopWidth=j(i),n.style.bottom=j(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=fl(e.width,t),r=fl(e.height,t),i=e.shift?fl(e.shift,t):0,a=t.color&&t.getColor()||`black`,o=new B(`mspace`);o.setAttribute(`mathbackground`,a),o.setAttribute(`width`,j(n)),o.setAttribute(`height`,j(r));var s=new B(`mpadded`,[o]);return i>=0?s.setAttribute(`height`,j(i)):(s.setAttribute(`height`,j(i)),s.setAttribute(`depth`,j(-i))),s.setAttribute(`voffset`,j(i)),s}});function Mp(e,t,n){for(var r=cd(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,a=0;a<r.length;a++){var o=r[a].classes.indexOf(`katex-sizing`);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}return Lu(r)}var Np=[`\\tiny`,`\\sixptsize`,`\\scriptsize`,`\\footnotesize`,`\\small`,`\\normalsize`,`\\large`,`\\Large`,`\\LARGE`,`\\huge`,`\\Huge`];ed({type:`sizing`,names:Np,numArgs:0,allowedInText:!0,handler:(e,t)=>{var n=e.breakOnTokenText,r=e.funcName,i=e.parser,a=i.parseExpression(!1,n);return{type:`sizing`,mode:i.mode,size:Np.indexOf(r)+1,body:a}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return Mp(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=new B(`mstyle`,Dd(e.body,n));return r.setAttribute(`mathsize`,j(n.sizeMultiplier)),r}}),ed({type:`smash`,names:[`\\smash`],numArgs:1,numOptionalArgs:1,allowedInText:!0,handler:(e,t,n)=>{var r=e.parser,i=!1,a=!1,o=n[0]&&Xd(n[0],`ordgroup`);if(o)for(var s,c=0;c<o.body.length;++c){var l=o.body[c];if(s=Zd(l).text,s===`t`)i=!0;else if(s===`b`)a=!0;else{i=!1,a=!1;break}}else i=!0,a=!0;var u=t[0];return{type:`smash`,mode:r.mode,body:u,smashHeight:i,smashDepth:a}},htmlBuilder:(e,t)=>{var n=z([],[md(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return z([`mord`,`katex-smash`],[n],t);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);return z([`mord`],[Bu({positionType:`firstBaseline`,children:[{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=new B(`mpadded`,[kd(e.body,t)]);return e.smashHeight&&n.setAttribute(`height`,`0px`),e.smashDepth&&n.setAttribute(`depth`,`0px`),n}}),ed({type:`sqrt`,names:[`\\sqrt`],numArgs:1,numOptionalArgs:1,handler(e,t,n){var r=e.parser,i=n[0],a=t[0];return{type:`sqrt`,mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=md(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=Ru(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.id<Uc.TEXT.id&&(i=t.fontMetrics().xHeight);var a=r+i/4,o=Pf(n.height+n.depth+a+r,t),s=o.span,c=o.ruleWidth,l=o.advanceWidth,u=s.height-c;u>n.height+n.depth+a&&(a=(a+u-n.height-n.depth)/2);var d=s.height-n.height-a-c;n.style.paddingLeft=j(l);var f=Bu({positionType:`firstBaseline`,children:[{type:`elem`,elem:n,wrapperClasses:[`svg-align`]},{type:`kern`,size:-(n.height+d)},{type:`elem`,elem:s},{type:`kern`,size:c}]});if(e.index){var p=t.havingStyle(Uc.SCRIPTSCRIPT),m=md(e.index,p,t);return z([`mord`,`sqrt`],[z([`katex-root`],[Bu({positionType:`shift`,positionData:-(.6*(f.height-f.depth)),children:[{type:`elem`,elem:m}]})]),f],t)}else return z([`mord`,`sqrt`],[f],t)},mathmlBuilder(e,t){var n=e.body,r=e.index;return r?new B(`mroot`,[kd(n,t),kd(r,t)]):new B(`msqrt`,[kd(n,t)])}});var Pp={display:Uc.DISPLAY,text:Uc.TEXT,script:Uc.SCRIPT,scriptscript:Uc.SCRIPTSCRIPT};function Fp(e){return e in Pp}ed({type:`styling`,names:[`\\displaystyle`,`\\textstyle`,`\\scriptstyle`,`\\scriptscriptstyle`],numArgs:0,allowedInText:!0,primitive:!0,handler(e,t){var n=e.breakOnTokenText,r=e.funcName,i=e.parser,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);if(!Fp(o))throw Error(`Unknown style: `+o);return{type:`styling`,mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var n=Pp[e.style],r=t.havingStyle(n);return e.resetFont&&(r=r.withFont(``)),Mp(e.body,r,t)},mathmlBuilder(e,t){var n=Pp[e.style],r=t.havingStyle(n);e.resetFont&&(r=r.withFont(``));var i=new B(`mstyle`,Dd(e.body,r)),a={display:[`0`,`true`],text:[`0`,`false`],script:[`1`,`false`],scriptscript:[`2`,`false`]}[e.style];return i.setAttribute(`scriptlevel`,a[0]),i.setAttribute(`displaystyle`,a[1]),i}});var Ip=function(e,t){var n=e.base;return n?n.type===`op`?n.limits&&(t.style.size===Uc.DISPLAY.size||n.alwaysHandleSupSub)?Dp:null:n.type===`operatorname`?n.alwaysHandleSupSub&&(t.style.size===Uc.DISPLAY.size||n.limits)?jp:null:n.type===`accent`?bc(n.base)?ef:null:n.type===`horizBrace`&&!e.sub===n.isOver?Sp:null:null};td({type:`supsub`,htmlBuilder(e,t){var n=Ip(e,t);if(n)return n(e,t);var r=e.base,i=e.sup,a=e.sub,o=md(r,t),s,c,l=t.fontMetrics(),u=0,d=0,f=r&&bc(r);if(i){var p=t.havingStyle(t.style.sup());s=md(i,p,t),f||(u=o.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(a){var m=t.havingStyle(t.style.sub());c=md(a,m,t),f||(d=o.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}var h=t.style===Uc.DISPLAY?l.sup1:t.style.cramped?l.sup3:l.sup2,g=t.sizeMultiplier,_=j(.5/l.ptPerEm/g),v=null;if(c){var y=e.base&&e.base.type===`op`&&e.base.name&&(e.base.name===`\\oiint`||e.base.name===`\\oiiint`);(o instanceof Cl||y)&&(v=j(-(o.italic??0)))}var b;if(s&&c){u=Math.max(u,h,s.depth+.25*l.xHeight),d=Math.max(d,l.sub2);var x=4*l.defaultRuleThickness;if(u-s.depth-(c.height-d)<x){d=x-(u-s.depth)+c.height;var S=.8*l.xHeight-(u-s.depth);S>0&&(u+=S,d-=S)}b=Bu({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:d,marginRight:_,marginLeft:v},{type:`elem`,elem:s,shift:-u,marginRight:_}]})}else if(c)d=Math.max(d,l.sub1,c.height-.8*l.xHeight),b=Bu({positionType:`shift`,positionData:d,children:[{type:`elem`,elem:c,marginLeft:v,marginRight:_}]});else if(s)u=Math.max(u,h,s.depth+.25*l.xHeight),b=Bu({positionType:`shift`,positionData:-u,children:[{type:`elem`,elem:s,marginRight:_}]});else throw Error(`supsub must have either sup or sub.`);return z([fd(o,`right`)||`mord`],[o,z([`msupsub`],[b])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type===`horizBrace`&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type===`op`||e.base.type===`operatorname`)&&(e.base.parentIsSupSub=!0);var a=[kd(e.base,t)];e.sub&&a.push(kd(e.sub,t)),e.sup&&a.push(kd(e.sup,t));var o;if(n)o=r?`mover`:`munder`;else if(!e.sub){var s=e.base;o=s&&s.type===`op`&&s.limits&&(t.style===Uc.DISPLAY||s.alwaysHandleSupSub)||s&&s.type===`operatorname`&&s.alwaysHandleSupSub&&(s.limits||t.style===Uc.DISPLAY)?`mover`:`msup`}else if(e.sup){var c=e.base;o=c&&c.type===`op`&&c.limits&&t.style===Uc.DISPLAY||c&&c.type===`operatorname`&&c.alwaysHandleSupSub&&(t.style===Uc.DISPLAY||c.limits)?`munderover`:`msubsup`}else{var l=e.base;o=l&&l.type===`op`&&l.limits&&(t.style===Uc.DISPLAY||l.alwaysHandleSupSub)||l&&l.type===`operatorname`&&l.alwaysHandleSupSub&&(l.limits||t.style===Uc.DISPLAY)?`munder`:`msub`}return new B(o,a)}}),td({type:`atom`,htmlBuilder(e,t){return Ou(e.text,e.mode,t,[`m`+e.family])},mathmlBuilder(e,t){var n=new B(`mo`,[Sd(e.text,e.mode)]);if(e.family===`bin`){var r=Td(e,t);r===`bold-italic`&&n.setAttribute(`mathvariant`,r)}else e.family===`punct`?n.setAttribute(`separator`,`true`):(e.family===`open`||e.family===`close`)&&n.setAttribute(`stretchy`,`false`);return n}});var Lp={mi:`italic`,mn:`normal`,mtext:`normal`};td({type:`mathord`,htmlBuilder(e,t){return Au(e,t)},mathmlBuilder(e,t){var n=new B(`mi`,[Sd(e.text,e.mode,t)]),r=Td(e,t)||`italic`;return r!==Lp[n.type]&&n.setAttribute(`mathvariant`,r),n}}),td({type:`textord`,htmlBuilder(e,t){return Au(e,t)},mathmlBuilder(e,t){var n=Sd(e.text,e.mode,t),r=Td(e,t)||`normal`,i=e.mode===`text`?new B(`mtext`,[n]):/[0-9]/.test(e.text)?new B(`mn`,[n]):e.text===`\\prime`?new B(`mo`,[n]):new B(`mi`,[n]);return r!==Lp[i.type]&&i.setAttribute(`mathvariant`,r),i}});var Rp=new Map([[`\\nobreak`,`nobreak`],[`\\allowbreak`,`allowbreak`]]),zp=new Map([[` `,{}],[`\\ `,{}],[`~`,{className:`nobreak`}],[`\\space`,{}],[`\\nobreakspace`,{className:`nobreak`}]]);td({type:`spacing`,htmlBuilder(e,t){var n=zp.get(e.text),r=Rp.get(e.text);if(n){var i=n.className||``;if(e.mode===`text`){var a=Au(e,t);return a.classes.push(i),a}else return z([`mspace`,i],[Ou(e.text,e.mode,t)],t)}else if(r)return z([`mspace`,r],[],t);else throw new A(`Unknown type of space "`+e.text+`"`)},mathmlBuilder(e,t){var n;if(zp.has(e.text))n=new B(`mtext`,[new vd(`\xA0`)]);else if(Rp.has(e.text))return new B(`mspace`);else throw new A(`Unknown type of space "`+e.text+`"`);return n}});var Bp=()=>{var e=new B(`mtd`,[]);return e.setAttribute(`width`,`50%`),e};td({type:`tag`,mathmlBuilder(e,t){var n=new B(`mtable`,[new B(`mtr`,[Bp(),new B(`mtd`,[Od(e.body,t)]),Bp(),new B(`mtd`,[Od(e.tag,t)])])]);return n.setAttribute(`width`,`100%`),n}});var Vp={"\\text":void 0,"\\textrm":`textrm`,"\\textsf":`textsf`,"\\texttt":`texttt`,"\\textnormal":`textrm`},Hp={"\\textbf":`textbf`,"\\textmd":`textmd`},Up={"\\textit":`textit`,"\\textup":`textup`},Wp=(e,t)=>{var n=e.font;return n?Vp[n]?t.withTextFontFamily(Vp[n]):Hp[n]?t.withTextFontWeight(Hp[n]):n===`\\emph`?t.fontShape===`textit`?t.withTextFontShape(`textup`):t.withTextFontShape(`textit`):t.withTextFontShape(Up[n]):t};ed({type:`text`,names:[`\\text`,`\\textrm`,`\\textsf`,`\\texttt`,`\\textnormal`,`\\textbf`,`\\textmd`,`\\textit`,`\\textup`,`\\emph`],numArgs:1,argTypes:[`text`],allowedInArgument:!0,allowedInText:!0,handler(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:`text`,mode:n.mode,body:rd(i),font:r}},htmlBuilder(e,t){var n=Wp(e,t);return z([`mord`,`text`],cd(e.body,n,!0),n)},mathmlBuilder(e,t){var n=Wp(e,t);return Od(e.body,n)}}),ed({type:`underline`,names:[`\\underline`],numArgs:1,allowedInText:!0,handler(e,t){return{type:`underline`,mode:e.parser.mode,body:t[0]}},htmlBuilder(e,t){var n=md(e.body,t),r=Fu(`underline-line`,t),i=t.fontMetrics().defaultRuleThickness;return z([`mord`,`katex-underline`],[Bu({positionType:`top`,positionData:n.height,children:[{type:`kern`,size:i},{type:`elem`,elem:r},{type:`kern`,size:3*i},{type:`elem`,elem:n}]})],t)},mathmlBuilder(e,t){var n=new B(`mo`,[new vd(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new B(`munder`,[kd(e.body,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),ed({type:`vcenter`,names:[`\\vcenter`],numArgs:1,argTypes:[`original`],allowedInText:!1,handler(e,t){return{type:`vcenter`,mode:e.parser.mode,body:t[0]}},htmlBuilder(e,t){var n=md(e.body,t),r=t.fontMetrics().axisHeight;return Bu({positionType:`shift`,positionData:.5*(n.height-r-(n.depth+r)),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){return new B(`mrow`,[new B(`mpadded`,[kd(e.body,t)],[`vcenter`])])}}),ed({type:`verb`,names:[`\\verb`],numArgs:0,allowedInText:!0,handler(e,t,n){throw new A(`\\verb ended by end of line instead of matching delimiter`)},htmlBuilder(e,t){for(var n=Gp(e),r=[],i=t.havingStyle(t.style.text()),a=0;a<n.length;a++){var o=n[a];o===`~`&&(o=`\\textasciitilde`),r.push(Du(o,`Typewriter-Regular`,e.mode,i,[`mord`,`texttt`]))}return z([`mord`,`text`].concat(i.sizingClasses(t)),Mu(r),i)},mathmlBuilder(e,t){var n=new B(`mtext`,[new vd(Gp(e))]);return n.setAttribute(`mathvariant`,`monospace`),n}});var Gp=e=>e.body.replace(/ /g,e.star?`␣`:`\xA0`),Kp=Zu,qp=`[ \r
266
+ ]`,Jp=`\\\\[a-zA-Z@]+`,Yp=`\\\\[^\ud800-\udfff]`,Xp=`(`+Jp+`)`+qp+`*`,Zp=`\\\\(
267
+ |[ \r ]+
268
+ ?)[ \r ]*`,Qp=`[̀-ͯ]`,$p=RegExp(Qp+`+$`),em=`(`+qp+`+)|`+(Zp+`|`)+`([!-\\[\\]-‧‪-퟿豈-￿]`+(Qp+`*`)+`|[\ud800-\udbff][\udc00-\udfff]`+(Qp+`*`)+`|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5`+(`|`+Xp)+(`|`+Yp+`)`),tm=class{constructor(e,t){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(em,`g`),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new np(`EOF`,new tp(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new A(`Unexpected character: '`+e[t]+`'`,new np(e[t],new tp(this,t,t+1)));var r=n[6]||n[3]||(n[2]?`\\ `:` `);if(this.catcodes[r]===14){var i=e.indexOf(`
269
+ `,this.tokenRegex.lastIndex);return i===-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=i+1,this.lex()}return new np(r,new tp(this,t,this.tokenRegex.lastIndex))}},nm=class{constructor(e,t){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=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new A(`Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug`);var e=this.undefStack.pop();for(var t of Object.keys(e))e[t]===void 0?delete this.current[t]:this.current[t]=e[t]}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return Object.prototype.hasOwnProperty.call(this.current,e)||Object.prototype.hasOwnProperty.call(this.builtins,e)}get(e){return Object.prototype.hasOwnProperty.call(this.current,e)?this.current[e]:this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!Object.prototype.hasOwnProperty.call(i,e)&&(i[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}},rm=ep;V(`\\noexpand`,function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),V(`\\expandafter`,function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),V(`\\@firstoftwo`,function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),V(`\\@secondoftwo`,function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),V(`\\@ifnextchar`,function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),V(`\\@ifstar`,`\\@ifnextchar *{\\@firstoftwo{#1}}`),V(`\\TextOrMath`,function(e){var t=e.consumeArgs(2);return e.mode===`text`?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var im={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};V(`\\char`,function(e){var t=e.popToken(),n,r=0;if(t.text===`'`)n=8,t=e.popToken();else if(t.text===`"`)n=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]===`\\`)r=t.text.charCodeAt(1);else if(t.text===`EOF`)throw new A("\\char` missing argument");else r=t.text.charCodeAt(0);else n=10;if(n){if(r=im[t.text],r==null||r>=n)throw new A(`Invalid base-`+n+` digit `+t.text);for(var i;(i=im[e.future().text])!=null&&i<n;)r*=n,r+=i,e.popToken()}return`\\@char{`+r+`}`});var am=(e,t,n,r)=>{var i=e.consumeArg().tokens;if(i.length!==1)throw new A(`\\newcommand's first argument must be a macro name`);var a=i[0].text,o=e.isDefined(a);if(o&&!t)throw new A(`\\newcommand{`+a+`} attempting to redefine `+(a+`; use \\renewcommand`));if(!o&&!n)throw new A(`\\renewcommand{`+a+`} when command `+a+` does not yet exist; use \\newcommand`);var s=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text===`[`){for(var c=``,l=e.expandNextToken();l.text!==`]`&&l.text!==`EOF`;)c+=l.text,l=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new A(`Invalid number of arguments: `+c);s=parseInt(c),i=e.consumeArg().tokens}return o&&r||e.macros.set(a,{tokens:i,numArgs:s}),``};V(`\\newcommand`,e=>am(e,!1,!0,!1)),V(`\\renewcommand`,e=>am(e,!0,!1,!1)),V(`\\providecommand`,e=>am(e,!0,!0,!0)),V(`\\message`,e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join(``)),``}),V(`\\errmessage`,e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join(``)),``}),V(`\\show`,e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),Kp[n],Ll.math[n],Ll.text[n]),``}),V(`\\bgroup`,`{`),V(`\\egroup`,`}`),V(`~`,`\\nobreakspace`),V(`\\lq`,"`"),V(`\\rq`,`'`),V(`\\aa`,`\\r a`),V(`\\AA`,`\\r A`),V(`\\textcopyright`,"\\html@mathml{\\textcircled{c}}{\\char`©}"),V(`\\copyright`,`\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}`),V(`\\textregistered`,"\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),V(`ℬ`,`\\mathscr{B}`),V(`ℰ`,`\\mathscr{E}`),V(`ℱ`,`\\mathscr{F}`),V(`ℋ`,`\\mathscr{H}`),V(`ℐ`,`\\mathscr{I}`),V(`ℒ`,`\\mathscr{L}`),V(`ℳ`,`\\mathscr{M}`),V(`ℛ`,`\\mathscr{R}`),V(`ℭ`,`\\mathfrak{C}`),V(`ℌ`,`\\mathfrak{H}`),V(`ℨ`,`\\mathfrak{Z}`),V(`\\Bbbk`,`\\Bbb{k}`),V(`\\llap`,`\\mathllap{\\textrm{#1}}`),V(`\\rlap`,`\\mathrlap{\\textrm{#1}}`),V(`\\clap`,`\\mathclap{\\textrm{#1}}`),V(`\\mathstrut`,`\\vphantom{(}`),V(`\\underbar`,`\\underline{\\text{#1}}`),V(`\\not`,`\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}`),V(`\\neq`,"\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),V(`\\ne`,`\\neq`),V(`≠`,`\\neq`),V(`\\notin`,"\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),V(`∉`,`\\notin`),V(`≘`,"\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),V(`≙`,"\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),V(`≚`,"\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),V(`≛`,"\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),V(`≝`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),V(`≞`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),V(`≟`,"\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),V(`⟂`,`\\perp`),V(`‼`,`\\mathclose{!\\mkern-0.8mu!}`),V(`∌`,`\\notni`),V(`⌜`,`\\ulcorner`),V(`⌝`,`\\urcorner`),V(`⌞`,`\\llcorner`),V(`⌟`,`\\lrcorner`),V(`©`,`\\copyright`),V(`®`,`\\textregistered`),V(`\\ulcorner`,`\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}`),V(`\\urcorner`,`\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}`),V(`\\llcorner`,`\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}`),V(`\\lrcorner`,`\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}`),V(`\\vdots`,`{\\varvdots\\rule{0pt}{15pt}}`),V(`⋮`,`\\vdots`),V(`\\varGamma`,`\\mathit{\\Gamma}`),V(`\\varDelta`,`\\mathit{\\Delta}`),V(`\\varTheta`,`\\mathit{\\Theta}`),V(`\\varLambda`,`\\mathit{\\Lambda}`),V(`\\varXi`,`\\mathit{\\Xi}`),V(`\\varPi`,`\\mathit{\\Pi}`),V(`\\varSigma`,`\\mathit{\\Sigma}`),V(`\\varUpsilon`,`\\mathit{\\Upsilon}`),V(`\\varPhi`,`\\mathit{\\Phi}`),V(`\\varPsi`,`\\mathit{\\Psi}`),V(`\\varOmega`,`\\mathit{\\Omega}`),V(`\\substack`,`\\begin{subarray}{c}#1\\end{subarray}`),V(`\\colon`,`\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax`),V(`\\boxed`,`\\fbox{$\\displaystyle{#1}$}`),V(`\\iff`,`\\DOTSB\\;\\Longleftrightarrow\\;`),V(`\\implies`,`\\DOTSB\\;\\Longrightarrow\\;`),V(`\\impliedby`,`\\DOTSB\\;\\Longleftarrow\\;`),V(`\\dddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}`),V(`\\ddddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}`);var om={",":`\\dotsc`,"\\not":`\\dotsb`,"+":`\\dotsb`,"=":`\\dotsb`,"<":`\\dotsb`,">":`\\dotsb`,"-":`\\dotsb`,"*":`\\dotsb`,":":`\\dotsb`,"\\DOTSB":`\\dotsb`,"\\coprod":`\\dotsb`,"\\bigvee":`\\dotsb`,"\\bigwedge":`\\dotsb`,"\\biguplus":`\\dotsb`,"\\bigcap":`\\dotsb`,"\\bigcup":`\\dotsb`,"\\prod":`\\dotsb`,"\\sum":`\\dotsb`,"\\bigotimes":`\\dotsb`,"\\bigoplus":`\\dotsb`,"\\bigodot":`\\dotsb`,"\\bigsqcup":`\\dotsb`,"\\And":`\\dotsb`,"\\longrightarrow":`\\dotsb`,"\\Longrightarrow":`\\dotsb`,"\\longleftarrow":`\\dotsb`,"\\Longleftarrow":`\\dotsb`,"\\longleftrightarrow":`\\dotsb`,"\\Longleftrightarrow":`\\dotsb`,"\\mapsto":`\\dotsb`,"\\longmapsto":`\\dotsb`,"\\hookrightarrow":`\\dotsb`,"\\doteq":`\\dotsb`,"\\mathbin":`\\dotsb`,"\\mathrel":`\\dotsb`,"\\relbar":`\\dotsb`,"\\Relbar":`\\dotsb`,"\\xrightarrow":`\\dotsb`,"\\xleftarrow":`\\dotsb`,"\\DOTSI":`\\dotsi`,"\\int":`\\dotsi`,"\\oint":`\\dotsi`,"\\iint":`\\dotsi`,"\\iiint":`\\dotsi`,"\\iiiint":`\\dotsi`,"\\idotsint":`\\dotsi`,"\\DOTSX":`\\dotsx`},sm=new Set([`bin`,`rel`]);V(`\\dots`,function(e){var t=`\\dotso`,n=e.expandAfterFuture().text;return n in om?t=om[n]:(n.slice(0,4)===`\\not`||n in Ll.math&&sm.has(Ll.math[n].group))&&(t=`\\dotsb`),t});var cm={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};V(`\\dotso`,function(e){return e.future().text in cm?`\\ldots\\,`:`\\ldots`}),V(`\\dotsc`,function(e){var t=e.future().text;return t in cm&&t!==`,`?`\\ldots\\,`:`\\ldots`}),V(`\\cdots`,function(e){return e.future().text in cm?`\\@cdots\\,`:`\\@cdots`}),V(`\\dotsb`,`\\cdots`),V(`\\dotsm`,`\\cdots`),V(`\\dotsi`,`\\!\\cdots`),V(`\\dotsx`,`\\ldots\\,`),V(`\\DOTSI`,`\\relax`),V(`\\DOTSB`,`\\relax`),V(`\\DOTSX`,`\\relax`),V(`\\tmspace`,`\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax`),V(`\\,`,`\\tmspace+{3mu}{.1667em}`),V(`\\thinspace`,`\\,`),V(`\\>`,`\\mskip{4mu}`),V(`\\:`,`\\tmspace+{4mu}{.2222em}`),V(`\\medspace`,`\\:`),V(`\\;`,`\\tmspace+{5mu}{.2777em}`),V(`\\thickspace`,`\\;`),V(`\\!`,`\\tmspace-{3mu}{.1667em}`),V(`\\negthinspace`,`\\!`),V(`\\negmedspace`,`\\tmspace-{4mu}{.2222em}`),V(`\\negthickspace`,`\\tmspace-{5mu}{.277em}`),V(`\\enspace`,`\\kern.5em `),V(`\\enskip`,`\\hskip.5em\\relax`),V(`\\quad`,`\\hskip1em\\relax`),V(`\\qquad`,`\\hskip2em\\relax`),V(`\\tag`,`\\@ifstar\\tag@literal\\tag@paren`),V(`\\tag@paren`,`\\tag@literal{({#1})}`),V(`\\tag@literal`,e=>{if(e.macros.get(`\\df@tag`))throw new A(`Multiple \\tag`);return`\\gdef\\df@tag{\\text{#1}}`}),V(`\\bmod`,`\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}`),V(`\\pod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)`),V(`\\pmod`,`\\pod{{\\rm mod}\\mkern6mu#1}`),V(`\\mod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1`),V(`\\newline`,`\\\\\\relax`),V(`\\TeX`,`\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}`);var lm=j(Al[`Main-Regular`][84][1]-.7*Al[`Main-Regular`][65][1]);V(`\\LaTeX`,`\\textrm{\\html@mathml{`+(`L\\kern-.36em\\raisebox{`+lm+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{LaTeX}}`),V(`\\KaTeX`,`\\textrm{\\html@mathml{`+(`K\\kern-.17em\\raisebox{`+lm+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{KaTeX}}`),V(`\\hspace`,`\\@ifstar\\@hspacer\\@hspace`),V(`\\@hspace`,`\\hskip #1\\relax`),V(`\\@hspacer`,`\\rule{0pt}{0pt}\\hskip #1\\relax`),V(`\\ordinarycolon`,`:`),V(`\\vcentcolon`,`\\mathrel{\\mathop\\ordinarycolon}`),V(`\\dblcolon`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}`),V(`\\coloneqq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}`),V(`\\Coloneqq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}`),V(`\\coloneq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}`),V(`\\Coloneq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}`),V(`\\eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}`),V(`\\Eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}`),V(`\\eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}`),V(`\\Eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}`),V(`\\colonapprox`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}`),V(`\\Colonapprox`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}`),V(`\\colonsim`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}`),V(`\\Colonsim`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}`),V(`∷`,`\\dblcolon`),V(`∹`,`\\eqcolon`),V(`≔`,`\\coloneqq`),V(`≕`,`\\eqqcolon`),V(`⩴`,`\\Coloneqq`),V(`\\ratio`,`\\vcentcolon`),V(`\\coloncolon`,`\\dblcolon`),V(`\\colonequals`,`\\coloneqq`),V(`\\coloncolonequals`,`\\Coloneqq`),V(`\\equalscolon`,`\\eqqcolon`),V(`\\equalscoloncolon`,`\\Eqqcolon`),V(`\\colonminus`,`\\coloneq`),V(`\\coloncolonminus`,`\\Coloneq`),V(`\\minuscolon`,`\\eqcolon`),V(`\\minuscoloncolon`,`\\Eqcolon`),V(`\\coloncolonapprox`,`\\Colonapprox`),V(`\\coloncolonsim`,`\\Colonsim`),V(`\\simcolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),V(`\\simcoloncolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}`),V(`\\approxcolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),V(`\\approxcoloncolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}`),V(`\\notni`,"\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),V(`\\limsup`,`\\DOTSB\\operatorname*{lim\\,sup}`),V(`\\liminf`,`\\DOTSB\\operatorname*{lim\\,inf}`),V(`\\injlim`,`\\DOTSB\\operatorname*{inj\\,lim}`),V(`\\projlim`,`\\DOTSB\\operatorname*{proj\\,lim}`),V(`\\varlimsup`,`\\DOTSB\\operatorname*{\\overline{lim}}`),V(`\\varliminf`,`\\DOTSB\\operatorname*{\\underline{lim}}`),V(`\\varinjlim`,`\\DOTSB\\operatorname*{\\underrightarrow{lim}}`),V(`\\varprojlim`,`\\DOTSB\\operatorname*{\\underleftarrow{lim}}`),V(`\\gvertneqq`,`\\html@mathml{\\@gvertneqq}{≩}`),V(`\\lvertneqq`,`\\html@mathml{\\@lvertneqq}{≨}`),V(`\\ngeqq`,`\\html@mathml{\\@ngeqq}{≱}`),V(`\\ngeqslant`,`\\html@mathml{\\@ngeqslant}{≱}`),V(`\\nleqq`,`\\html@mathml{\\@nleqq}{≰}`),V(`\\nleqslant`,`\\html@mathml{\\@nleqslant}{≰}`),V(`\\nshortmid`,`\\html@mathml{\\@nshortmid}{∤}`),V(`\\nshortparallel`,`\\html@mathml{\\@nshortparallel}{∦}`),V(`\\nsubseteqq`,`\\html@mathml{\\@nsubseteqq}{⊈}`),V(`\\nsupseteqq`,`\\html@mathml{\\@nsupseteqq}{⊉}`),V(`\\varsubsetneq`,`\\html@mathml{\\@varsubsetneq}{⊊}`),V(`\\varsubsetneqq`,`\\html@mathml{\\@varsubsetneqq}{⫋}`),V(`\\varsupsetneq`,`\\html@mathml{\\@varsupsetneq}{⊋}`),V(`\\varsupsetneqq`,`\\html@mathml{\\@varsupsetneqq}{⫌}`),V(`\\imath`,`\\html@mathml{\\@imath}{ı}`),V(`\\jmath`,`\\html@mathml{\\@jmath}{ȷ}`),V(`\\llbracket`,"\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),V(`\\rrbracket`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),V(`⟦`,`\\llbracket`),V(`⟧`,`\\rrbracket`),V(`\\lBrace`,"\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),V(`\\rBrace`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),V(`⦃`,`\\lBrace`),V(`⦄`,`\\rBrace`),V(`\\minuso`,"\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),V(`⦵`,`\\minuso`),V(`\\darr`,`\\downarrow`),V(`\\dArr`,`\\Downarrow`),V(`\\Darr`,`\\Downarrow`),V(`\\lang`,`\\langle`),V(`\\rang`,`\\rangle`),V(`\\uarr`,`\\uparrow`),V(`\\uArr`,`\\Uparrow`),V(`\\Uarr`,`\\Uparrow`),V(`\\N`,`\\mathbb{N}`),V(`\\R`,`\\mathbb{R}`),V(`\\Z`,`\\mathbb{Z}`),V(`\\alef`,`\\aleph`),V(`\\alefsym`,`\\aleph`),V(`\\Alpha`,`\\mathrm{A}`),V(`\\Beta`,`\\mathrm{B}`),V(`\\bull`,`\\bullet`),V(`\\Chi`,`\\mathrm{X}`),V(`\\clubs`,`\\clubsuit`),V(`\\cnums`,`\\mathbb{C}`),V(`\\Complex`,`\\mathbb{C}`),V(`\\Dagger`,`\\ddagger`),V(`\\diamonds`,`\\diamondsuit`),V(`\\empty`,`\\emptyset`),V(`\\Epsilon`,`\\mathrm{E}`),V(`\\Eta`,`\\mathrm{H}`),V(`\\exist`,`\\exists`),V(`\\harr`,`\\leftrightarrow`),V(`\\hArr`,`\\Leftrightarrow`),V(`\\Harr`,`\\Leftrightarrow`),V(`\\hearts`,`\\heartsuit`),V(`\\image`,`\\Im`),V(`\\infin`,`\\infty`),V(`\\Iota`,`\\mathrm{I}`),V(`\\isin`,`\\in`),V(`\\Kappa`,`\\mathrm{K}`),V(`\\larr`,`\\leftarrow`),V(`\\lArr`,`\\Leftarrow`),V(`\\Larr`,`\\Leftarrow`),V(`\\lrarr`,`\\leftrightarrow`),V(`\\lrArr`,`\\Leftrightarrow`),V(`\\Lrarr`,`\\Leftrightarrow`),V(`\\Mu`,`\\mathrm{M}`),V(`\\natnums`,`\\mathbb{N}`),V(`\\Nu`,`\\mathrm{N}`),V(`\\Omicron`,`\\mathrm{O}`),V(`\\plusmn`,`\\pm`),V(`\\rarr`,`\\rightarrow`),V(`\\rArr`,`\\Rightarrow`),V(`\\Rarr`,`\\Rightarrow`),V(`\\real`,`\\Re`),V(`\\reals`,`\\mathbb{R}`),V(`\\Reals`,`\\mathbb{R}`),V(`\\Rho`,`\\mathrm{P}`),V(`\\sdot`,`\\cdot`),V(`\\sect`,`\\S`),V(`\\spades`,`\\spadesuit`),V(`\\sub`,`\\subset`),V(`\\sube`,`\\subseteq`),V(`\\supe`,`\\supseteq`),V(`\\Tau`,`\\mathrm{T}`),V(`\\thetasym`,`\\vartheta`),V(`\\weierp`,`\\wp`),V(`\\Zeta`,`\\mathrm{Z}`),V(`\\argmin`,`\\DOTSB\\operatorname*{arg\\,min}`),V(`\\argmax`,`\\DOTSB\\operatorname*{arg\\,max}`),V(`\\plim`,`\\DOTSB\\mathop{\\operatorname{plim}}\\limits`),V(`\\bra`,`\\mathinner{\\langle{#1}|}`),V(`\\ket`,`\\mathinner{|{#1}\\rangle}`),V(`\\braket`,`\\mathinner{\\langle{#1}\\rangle}`),V(`\\Bra`,`\\left\\langle#1\\right|`),V(`\\Ket`,`\\left|#1\\right\\rangle`);var um=e=>t=>{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(`\\|`);t.macros.beginGroup();var c=t=>n=>{e&&(n.macros.set(`|`,o),i.length&&n.macros.set(`\\|`,s));var a=t;return!t&&i.length&&n.future().text===`|`&&(n.popToken(),a=!0),{tokens:a?i:r,numArgs:0}};t.macros.set(`|`,c(!1)),i.length&&t.macros.set(`\\|`,c(!0));var l=t.consumeArg().tokens,u=t.expandTokens([...a,...l,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};V(`\\bra@ket`,um(!1)),V(`\\bra@set`,um(!0)),V(`\\Braket`,`\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}`),V(`\\Set`,`\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}`),V(`\\set`,`\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}`),V(`\\angln`,`{\\angl n}`),V(`\\blue`,`\\textcolor{##6495ed}{#1}`),V(`\\orange`,`\\textcolor{##ffa500}{#1}`),V(`\\pink`,`\\textcolor{##ff00af}{#1}`),V(`\\red`,`\\textcolor{##df0030}{#1}`),V(`\\green`,`\\textcolor{##28ae7b}{#1}`),V(`\\gray`,`\\textcolor{gray}{#1}`),V(`\\purple`,`\\textcolor{##9d38bd}{#1}`),V(`\\blueA`,`\\textcolor{##ccfaff}{#1}`),V(`\\blueB`,`\\textcolor{##80f6ff}{#1}`),V(`\\blueC`,`\\textcolor{##63d9ea}{#1}`),V(`\\blueD`,`\\textcolor{##11accd}{#1}`),V(`\\blueE`,`\\textcolor{##0c7f99}{#1}`),V(`\\tealA`,`\\textcolor{##94fff5}{#1}`),V(`\\tealB`,`\\textcolor{##26edd5}{#1}`),V(`\\tealC`,`\\textcolor{##01d1c1}{#1}`),V(`\\tealD`,`\\textcolor{##01a995}{#1}`),V(`\\tealE`,`\\textcolor{##208170}{#1}`),V(`\\greenA`,`\\textcolor{##b6ffb0}{#1}`),V(`\\greenB`,`\\textcolor{##8af281}{#1}`),V(`\\greenC`,`\\textcolor{##74cf70}{#1}`),V(`\\greenD`,`\\textcolor{##1fab54}{#1}`),V(`\\greenE`,`\\textcolor{##0d923f}{#1}`),V(`\\goldA`,`\\textcolor{##ffd0a9}{#1}`),V(`\\goldB`,`\\textcolor{##ffbb71}{#1}`),V(`\\goldC`,`\\textcolor{##ff9c39}{#1}`),V(`\\goldD`,`\\textcolor{##e07d10}{#1}`),V(`\\goldE`,`\\textcolor{##a75a05}{#1}`),V(`\\redA`,`\\textcolor{##fca9a9}{#1}`),V(`\\redB`,`\\textcolor{##ff8482}{#1}`),V(`\\redC`,`\\textcolor{##f9685d}{#1}`),V(`\\redD`,`\\textcolor{##e84d39}{#1}`),V(`\\redE`,`\\textcolor{##bc2612}{#1}`),V(`\\maroonA`,`\\textcolor{##ffbde0}{#1}`),V(`\\maroonB`,`\\textcolor{##ff92c6}{#1}`),V(`\\maroonC`,`\\textcolor{##ed5fa6}{#1}`),V(`\\maroonD`,`\\textcolor{##ca337c}{#1}`),V(`\\maroonE`,`\\textcolor{##9e034e}{#1}`),V(`\\purpleA`,`\\textcolor{##ddd7ff}{#1}`),V(`\\purpleB`,`\\textcolor{##c6b9fc}{#1}`),V(`\\purpleC`,`\\textcolor{##aa87ff}{#1}`),V(`\\purpleD`,`\\textcolor{##7854ab}{#1}`),V(`\\purpleE`,`\\textcolor{##543b78}{#1}`),V(`\\mintA`,`\\textcolor{##f5f9e8}{#1}`),V(`\\mintB`,`\\textcolor{##edf2df}{#1}`),V(`\\mintC`,`\\textcolor{##e0e5cc}{#1}`),V(`\\grayA`,`\\textcolor{##f6f7f7}{#1}`),V(`\\grayB`,`\\textcolor{##f0f1f2}{#1}`),V(`\\grayC`,`\\textcolor{##e3e5e6}{#1}`),V(`\\grayD`,`\\textcolor{##d6d8da}{#1}`),V(`\\grayE`,`\\textcolor{##babec2}{#1}`),V(`\\grayF`,`\\textcolor{##888d93}{#1}`),V(`\\grayG`,`\\textcolor{##626569}{#1}`),V(`\\grayH`,`\\textcolor{##3b3e40}{#1}`),V(`\\grayI`,`\\textcolor{##21242c}{#1}`),V(`\\kaBlue`,`\\textcolor{##314453}{#1}`),V(`\\kaGreen`,`\\textcolor{##71B307}{#1}`);var dm={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},fm=class{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new nm(rm,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new tm(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!==`[`)return null;t=this.popToken();var i=this.consumeArg([`]`]);r=i.tokens,n=i.end}else{var a=this.consumeArg();r=a.tokens,t=a.start,n=a.end}return this.pushToken(new np(`EOF`,n.loc)),this.pushTokens(r),new np(``,tp.range(t,n))}consumeSpaces(){for(;this.future().text===` `;)this.stack.pop()}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r=this.future(),i,a=0,o=0;do{if(i=this.popToken(),t.push(i),i.text===`{`)++a;else if(i.text===`}`){if(--a,a===-1)throw new A(`Extra }`,i)}else if(i.text===`EOF`)throw new A(`Unexpected end of input in a macro argument, expected '`+(e&&n?e[o]:`}`)+`'`,i);if(e&&n)if((a===0||a===1&&e[o]===`{`)&&i.text===e[o]){if(++o,o===e.length){t.splice(-o,o);break}}else o=0}while(a!==0||n);return r.text===`{`&&t[t.length-1].text===`}`&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:i}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new A(`The length of delimiters doesn't match the number of args!`);for(var n=t[0],r=0;r<n.length;r++){var i=this.popToken();if(n[r]!==i.text)throw new A(`Use of the macro doesn't match its definition`,i)}}for(var a=[],o=0;o<e;o++)a.push(this.consumeArg(t&&t[o+1]).tokens);return a}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new A(`Too many expansions: infinite loop or need to increase maxExpand setting`)}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]===`\\`&&!this.isDefined(n))throw new A(`Undefined control sequence: `+n);return this.pushToken(t),!1}this.countExpansion(1);var i=r.tokens,a=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var s=i[o];if(s.text===`#`){if(o===0)throw new A(`Incomplete placeholder at end of macro body`,s);if(s=i[--o],s.text===`#`)i.splice(o+1,1);else if(/^[1-9]$/.test(s.text))i.splice(o,2,...a[s.text-1]);else throw new A(`Not a valid argument number`,s)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text=`\\relax`),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new np(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&=(r.noexpand=!1,!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(e=>e.text).join(``)}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t==`function`?t(this):t;if(typeof r==`string`){var i=0;if(r.includes(`#`))for(var a=r.replace(/##/g,``);a.includes(`#`+(i+1));)++i;for(var o=new tm(r,this.settings),s=[],c=o.lex();c.text!==`EOF`;)s.push(c),c=o.lex();return s.reverse(),{tokens:s,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||Object.prototype.hasOwnProperty.call(Kp,e)||Object.prototype.hasOwnProperty.call(Ll.math,e)||Object.prototype.hasOwnProperty.call(Ll.text,e)||Object.prototype.hasOwnProperty.call(dm,e)}isExpandable(e){var t=this.macros.get(e);return t==null?Object.prototype.hasOwnProperty.call(Kp,e)&&!Kp[e].primitive:typeof t==`string`||typeof t==`function`||!t.unexpandable}},pm=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,mm=Object.freeze({"₊":`+`,"₋":`-`,"₌":`=`,"₍":`(`,"₎":`)`,"₀":`0`,"₁":`1`,"₂":`2`,"₃":`3`,"₄":`4`,"₅":`5`,"₆":`6`,"₇":`7`,"₈":`8`,"₉":`9`,ₐ:`a`,ₑ:`e`,ₕ:`h`,ᵢ:`i`,ⱼ:`j`,ₖ:`k`,ₗ:`l`,ₘ:`m`,ₙ:`n`,ₒ:`o`,ₚ:`p`,ᵣ:`r`,ₛ:`s`,ₜ:`t`,ᵤ:`u`,ᵥ:`v`,ₓ:`x`,ᵦ:`β`,ᵧ:`γ`,ᵨ:`ρ`,ᵩ:`ϕ`,ᵪ:`χ`,"⁺":`+`,"⁻":`-`,"⁼":`=`,"⁽":`(`,"⁾":`)`,"⁰":`0`,"¹":`1`,"²":`2`,"³":`3`,"⁴":`4`,"⁵":`5`,"⁶":`6`,"⁷":`7`,"⁸":`8`,"⁹":`9`,ᴬ:`A`,ᴮ:`B`,ᴰ:`D`,ᴱ:`E`,ᴳ:`G`,ᴴ:`H`,ᴵ:`I`,ᴶ:`J`,ᴷ:`K`,ᴸ:`L`,ᴹ:`M`,ᴺ:`N`,ᴼ:`O`,ᴾ:`P`,ᴿ:`R`,ᵀ:`T`,ᵁ:`U`,ⱽ:`V`,ᵂ:`W`,ᵃ:`a`,ᵇ:`b`,ᶜ:`c`,ᵈ:`d`,ᵉ:`e`,ᶠ:`f`,ᵍ:`g`,ʰ:`h`,ⁱ:`i`,ʲ:`j`,ᵏ:`k`,ˡ:`l`,ᵐ:`m`,ⁿ:`n`,ᵒ:`o`,ᵖ:`p`,ʳ:`r`,ˢ:`s`,ᵗ:`t`,ᵘ:`u`,ᵛ:`v`,ʷ:`w`,ˣ:`x`,ʸ:`y`,ᶻ:`z`,ᵝ:`β`,ᵞ:`γ`,ᵟ:`δ`,ᵠ:`ϕ`,ᵡ:`χ`,ᶿ:`θ`}),hm={"́":{text:`\\'`,math:`\\acute`},"̀":{text:"\\`",math:`\\grave`},"̈":{text:`\\"`,math:`\\ddot`},"̃":{text:`\\~`,math:`\\tilde`},"̄":{text:`\\=`,math:`\\bar`},"̆":{text:`\\u`,math:`\\breve`},"̌":{text:`\\v`,math:`\\check`},"̂":{text:`\\^`,math:`\\hat`},"̇":{text:`\\.`,math:`\\dot`},"̊":{text:`\\r`,math:`\\mathring`},"̋":{text:`\\H`},"̧":{text:`\\c`}},gm={á:`á`,à:`à`,ä:`ä`,ǟ:`ǟ`,ã:`ã`,ā:`ā`,ă:`ă`,ắ:`ắ`,ằ:`ằ`,ẵ:`ẵ`,ǎ:`ǎ`,â:`â`,ấ:`ấ`,ầ:`ầ`,ẫ:`ẫ`,ȧ:`ȧ`,ǡ:`ǡ`,å:`å`,ǻ:`ǻ`,ḃ:`ḃ`,ć:`ć`,ḉ:`ḉ`,č:`č`,ĉ:`ĉ`,ċ:`ċ`,ç:`ç`,ď:`ď`,ḋ:`ḋ`,ḑ:`ḑ`,é:`é`,è:`è`,ë:`ë`,ẽ:`ẽ`,ē:`ē`,ḗ:`ḗ`,ḕ:`ḕ`,ĕ:`ĕ`,ḝ:`ḝ`,ě:`ě`,ê:`ê`,ế:`ế`,ề:`ề`,ễ:`ễ`,ė:`ė`,ȩ:`ȩ`,ḟ:`ḟ`,ǵ:`ǵ`,ḡ:`ḡ`,ğ:`ğ`,ǧ:`ǧ`,ĝ:`ĝ`,ġ:`ġ`,ģ:`ģ`,ḧ:`ḧ`,ȟ:`ȟ`,ĥ:`ĥ`,ḣ:`ḣ`,ḩ:`ḩ`,í:`í`,ì:`ì`,ï:`ï`,ḯ:`ḯ`,ĩ:`ĩ`,ī:`ī`,ĭ:`ĭ`,ǐ:`ǐ`,î:`î`,ǰ:`ǰ`,ĵ:`ĵ`,ḱ:`ḱ`,ǩ:`ǩ`,ķ:`ķ`,ĺ:`ĺ`,ľ:`ľ`,ļ:`ļ`,ḿ:`ḿ`,ṁ:`ṁ`,ń:`ń`,ǹ:`ǹ`,ñ:`ñ`,ň:`ň`,ṅ:`ṅ`,ņ:`ņ`,ó:`ó`,ò:`ò`,ö:`ö`,ȫ:`ȫ`,õ:`õ`,ṍ:`ṍ`,ṏ:`ṏ`,ȭ:`ȭ`,ō:`ō`,ṓ:`ṓ`,ṑ:`ṑ`,ŏ:`ŏ`,ǒ:`ǒ`,ô:`ô`,ố:`ố`,ồ:`ồ`,ỗ:`ỗ`,ȯ:`ȯ`,ȱ:`ȱ`,ő:`ő`,ṕ:`ṕ`,ṗ:`ṗ`,ŕ:`ŕ`,ř:`ř`,ṙ:`ṙ`,ŗ:`ŗ`,ś:`ś`,ṥ:`ṥ`,š:`š`,ṧ:`ṧ`,ŝ:`ŝ`,ṡ:`ṡ`,ş:`ş`,ẗ:`ẗ`,ť:`ť`,ṫ:`ṫ`,ţ:`ţ`,ú:`ú`,ù:`ù`,ü:`ü`,ǘ:`ǘ`,ǜ:`ǜ`,ǖ:`ǖ`,ǚ:`ǚ`,ũ:`ũ`,ṹ:`ṹ`,ū:`ū`,ṻ:`ṻ`,ŭ:`ŭ`,ǔ:`ǔ`,û:`û`,ů:`ů`,ű:`ű`,ṽ:`ṽ`,ẃ:`ẃ`,ẁ:`ẁ`,ẅ:`ẅ`,ŵ:`ŵ`,ẇ:`ẇ`,ẘ:`ẘ`,ẍ:`ẍ`,ẋ:`ẋ`,ý:`ý`,ỳ:`ỳ`,ÿ:`ÿ`,ỹ:`ỹ`,ȳ:`ȳ`,ŷ:`ŷ`,ẏ:`ẏ`,ẙ:`ẙ`,ź:`ź`,ž:`ž`,ẑ:`ẑ`,ż:`ż`,Á:`Á`,À:`À`,Ä:`Ä`,Ǟ:`Ǟ`,Ã:`Ã`,Ā:`Ā`,Ă:`Ă`,Ắ:`Ắ`,Ằ:`Ằ`,Ẵ:`Ẵ`,Ǎ:`Ǎ`,Â:`Â`,Ấ:`Ấ`,Ầ:`Ầ`,Ẫ:`Ẫ`,Ȧ:`Ȧ`,Ǡ:`Ǡ`,Å:`Å`,Ǻ:`Ǻ`,Ḃ:`Ḃ`,Ć:`Ć`,Ḉ:`Ḉ`,Č:`Č`,Ĉ:`Ĉ`,Ċ:`Ċ`,Ç:`Ç`,Ď:`Ď`,Ḋ:`Ḋ`,Ḑ:`Ḑ`,É:`É`,È:`È`,Ë:`Ë`,Ẽ:`Ẽ`,Ē:`Ē`,Ḗ:`Ḗ`,Ḕ:`Ḕ`,Ĕ:`Ĕ`,Ḝ:`Ḝ`,Ě:`Ě`,Ê:`Ê`,Ế:`Ế`,Ề:`Ề`,Ễ:`Ễ`,Ė:`Ė`,Ȩ:`Ȩ`,Ḟ:`Ḟ`,Ǵ:`Ǵ`,Ḡ:`Ḡ`,Ğ:`Ğ`,Ǧ:`Ǧ`,Ĝ:`Ĝ`,Ġ:`Ġ`,Ģ:`Ģ`,Ḧ:`Ḧ`,Ȟ:`Ȟ`,Ĥ:`Ĥ`,Ḣ:`Ḣ`,Ḩ:`Ḩ`,Í:`Í`,Ì:`Ì`,Ï:`Ï`,Ḯ:`Ḯ`,Ĩ:`Ĩ`,Ī:`Ī`,Ĭ:`Ĭ`,Ǐ:`Ǐ`,Î:`Î`,İ:`İ`,Ĵ:`Ĵ`,Ḱ:`Ḱ`,Ǩ:`Ǩ`,Ķ:`Ķ`,Ĺ:`Ĺ`,Ľ:`Ľ`,Ļ:`Ļ`,Ḿ:`Ḿ`,Ṁ:`Ṁ`,Ń:`Ń`,Ǹ:`Ǹ`,Ñ:`Ñ`,Ň:`Ň`,Ṅ:`Ṅ`,Ņ:`Ņ`,Ó:`Ó`,Ò:`Ò`,Ö:`Ö`,Ȫ:`Ȫ`,Õ:`Õ`,Ṍ:`Ṍ`,Ṏ:`Ṏ`,Ȭ:`Ȭ`,Ō:`Ō`,Ṓ:`Ṓ`,Ṑ:`Ṑ`,Ŏ:`Ŏ`,Ǒ:`Ǒ`,Ô:`Ô`,Ố:`Ố`,Ồ:`Ồ`,Ỗ:`Ỗ`,Ȯ:`Ȯ`,Ȱ:`Ȱ`,Ő:`Ő`,Ṕ:`Ṕ`,Ṗ:`Ṗ`,Ŕ:`Ŕ`,Ř:`Ř`,Ṙ:`Ṙ`,Ŗ:`Ŗ`,Ś:`Ś`,Ṥ:`Ṥ`,Š:`Š`,Ṧ:`Ṧ`,Ŝ:`Ŝ`,Ṡ:`Ṡ`,Ş:`Ş`,Ť:`Ť`,Ṫ:`Ṫ`,Ţ:`Ţ`,Ú:`Ú`,Ù:`Ù`,Ü:`Ü`,Ǘ:`Ǘ`,Ǜ:`Ǜ`,Ǖ:`Ǖ`,Ǚ:`Ǚ`,Ũ:`Ũ`,Ṹ:`Ṹ`,Ū:`Ū`,Ṻ:`Ṻ`,Ŭ:`Ŭ`,Ǔ:`Ǔ`,Û:`Û`,Ů:`Ů`,Ű:`Ű`,Ṽ:`Ṽ`,Ẃ:`Ẃ`,Ẁ:`Ẁ`,Ẅ:`Ẅ`,Ŵ:`Ŵ`,Ẇ:`Ẇ`,Ẍ:`Ẍ`,Ẋ:`Ẋ`,Ý:`Ý`,Ỳ:`Ỳ`,Ÿ:`Ÿ`,Ỹ:`Ỹ`,Ȳ:`Ȳ`,Ŷ:`Ŷ`,Ẏ:`Ẏ`,Ź:`Ź`,Ž:`Ž`,Ẑ:`Ẑ`,Ż:`Ż`,ά:`ά`,ὰ:`ὰ`,ᾱ:`ᾱ`,ᾰ:`ᾰ`,έ:`έ`,ὲ:`ὲ`,ή:`ή`,ὴ:`ὴ`,ί:`ί`,ὶ:`ὶ`,ϊ:`ϊ`,ΐ:`ΐ`,ῒ:`ῒ`,ῑ:`ῑ`,ῐ:`ῐ`,ό:`ό`,ὸ:`ὸ`,ύ:`ύ`,ὺ:`ὺ`,ϋ:`ϋ`,ΰ:`ΰ`,ῢ:`ῢ`,ῡ:`ῡ`,ῠ:`ῠ`,ώ:`ώ`,ὼ:`ὼ`,Ύ:`Ύ`,Ὺ:`Ὺ`,Ϋ:`Ϋ`,Ῡ:`Ῡ`,Ῠ:`Ῠ`,Ώ:`Ώ`,Ὼ:`Ὼ`},_m=class e{constructor(e,t){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 fm(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new A(`Expected '`+e+`', got '`+this.fetch().text+`'`,this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken??=this.gullet.expandNextToken(),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set(`\\color`,`\\textcolor`);try{var e=this.parseExpression(!1);return this.expect(`EOF`),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new np(`}`)),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect(`}`),this.nextToken=t,n}parseExpression(t,n){for(var r=[];;){this.mode===`math`&&this.consumeSpaces();var i=this.fetch();if(e.endOfExpression.has(i.text)||n&&i.text===n||t&&Kp[i.text]&&Kp[i.text].infix)break;var a=this.parseAtom(n);if(!a)break;a.type!==`internal`&&r.push(a)}return this.mode===`text`&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t=-1,n,r=0;r<e.length;r++){var i=e[r];if(i.type===`infix`){if(t!==-1)throw new A(`only one infix operator per group`,i.token);t=r,n=i.replaceWith}}if(t!==-1&&n){var a,o,s=e.slice(0,t),c=e.slice(t+1);return a=s.length===1&&s[0].type===`ordgroup`?s[0]:{type:`ordgroup`,mode:this.mode,body:s},o=c.length===1&&c[0].type===`ordgroup`?c[0]:{type:`ordgroup`,mode:this.mode,body:c},[n===`\\\\abovefrac`?this.callFunction(n,[a,e[t],o],[]):this.callFunction(n,[a,o],[])]}else return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r;do r=this.parseGroup(e);while(r?.type===`internal`);if(!r)throw new A(`Expected group after '`+n+`'`,t);return r}formatUnsupportedCmd(e){for(var t=[],n=0;n<e.length;n++)t.push({type:`textord`,mode:`text`,text:e[n]});var r={type:`text`,mode:this.mode,body:t};return{type:`color`,mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){var t=this.parseGroup(`atom`,e);if(t?.type===`internal`||this.mode===`text`)return t;for(var n,r;;){this.consumeSpaces();var i=this.fetch();if(i.text===`\\limits`||i.text===`\\nolimits`){if(t&&t.type===`op`)t.limits=i.text===`\\limits`,t.alwaysHandleSupSub=!0;else if(t&&t.type===`operatorname`)t.alwaysHandleSupSub&&(t.limits=i.text===`\\limits`);else throw new A(`Limit controls must follow a math operator`,i);this.consume()}else if(i.text===`^`){if(n)throw new A(`Double superscript`,i);n=this.handleSupSubscript(`superscript`)}else if(i.text===`_`){if(r)throw new A(`Double subscript`,i);r=this.handleSupSubscript(`subscript`)}else if(i.text===`'`){if(n)throw new A(`Double superscript`,i);var a={type:`textord`,mode:this.mode,text:`\\prime`},o=[a];for(this.consume();this.fetch().text===`'`;)o.push(a),this.consume();this.fetch().text===`^`&&o.push(this.handleSupSubscript(`superscript`)),n={type:`ordgroup`,mode:this.mode,body:o}}else if(mm[i.text]){var s=pm.test(i.text),c=[];for(c.push(new np(mm[i.text])),this.consume();;){var l=this.fetch().text;if(!mm[l]||pm.test(l)!==s)break;c.unshift(new np(mm[l])),this.consume()}var u=this.subparse(c);s?r={type:`ordgroup`,mode:`math`,body:u}:n={type:`ordgroup`,mode:`math`,body:u}}else break}return n&&r?{type:`supsub`,mode:this.mode,base:t,sup:n,sub:r}:n?{type:`supsub`,mode:this.mode,base:t,sup:n}:r?{type:`supsub`,mode:this.mode,base:t,sub:r}:t}parseFunction(e,t){var n=this.fetch(),r=n.text,i=Kp[r];if(!i)return null;if(this.consume(),t&&t!==`atom`&&!i.allowedInArgument)throw new A(`Got function '`+r+`' with no arguments`+(t?` as `+t:``),n);if(this.mode===`text`&&!i.allowedInText)throw new A(`Can't use function '`+r+`' in text mode`,n);if(this.mode===`math`&&i.allowedInMath===!1)throw new A(`Can't use function '`+r+`' in math mode`,n);var a=this.parseArguments(r,i),o=a.args,s=a.optArgs;return this.callFunction(r,o,s,n,e)}callFunction(e,t,n,r,i){var a={funcName:e,parser:this,token:r,breakOnTokenText:i},o=Kp[e];if(o&&o.handler)return o.handler(a,t,n);throw new A(`No function handler for `+e)}parseArguments(e,t){var n=t.numOptionalArgs??0,r=t.numArgs+n;if(r===0)return{args:[],optArgs:[]};for(var i=[],a=[],o=0;o<r;o++){var s=t.argTypes?.[o],c=o<n;(`primitive`in t&&t.primitive&&s==null||t.type===`sqrt`&&o===1&&a[0]==null)&&(s=`primitive`);var l=this.parseGroupOfType(`argument to '`+e+`'`,s,c);if(c)a.push(l);else if(l!=null)i.push(l);else throw new A(`Null argument, please report this as a bug`)}return{args:i,optArgs:a}}parseGroupOfType(e,t,n){switch(t){case`color`:return this.parseColorGroup(n);case`size`:return this.parseSizeGroup(n);case`url`:return this.parseUrlGroup(n);case`math`:case`text`:return this.parseArgumentGroup(n,t);case`hbox`:var r=this.parseArgumentGroup(n,`text`);return r==null?null:{type:`styling`,mode:r.mode,body:[r],style:`text`,resetFont:!0};case`raw`:var i=this.parseStringGroup(n);return i==null?null:{type:`raw`,mode:`text`,string:i.text};case`primitive`:if(n)throw new A(`A primitive argument cannot be optional`);var a=this.parseGroup(e);if(a==null)throw new A(`Expected group as `+e,this.fetch());return a;case`original`:case void 0:return this.parseArgumentGroup(n);default:throw new A(`Unknown group type as `+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===` `;)this.consume()}parseStringGroup(e){var t=this.gullet.scanArgument(e);if(t==null)return null;for(var n=``,r;(r=this.fetch()).text!==`EOF`;)n+=r.text,this.consume();return this.consume(),t.text=n,t}parseRegexGroup(e,t){for(var n=this.fetch(),r=n,i=``,a;(a=this.fetch()).text!==`EOF`&&e.test(i+a.text);)r=a,i+=r.text,this.consume();if(i===``)throw new A(`Invalid `+t+`: '`+n.text+`'`,n);return n.range(r,i)}parseColorGroup(e){var t=this.parseStringGroup(e);if(t==null)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new A(`Invalid color: '`+t.text+`'`,t);var r=n[0];return/^[0-9a-f]{6}$/i.test(r)&&(r=`#`+r),{type:`color-token`,mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;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;!e&&t.text.length===0&&(t.text=`0pt`,n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new A(`Invalid size: '`+t.text+`'`,t);var i={number:+(r[1]+r[2]),unit:r[3]};if(!dl(i))throw new A(`Invalid unit: '`+i.unit+`'`,t);return{type:`size`,mode:this.mode,value:i,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode(`%`,13),this.gullet.lexer.setCatcode(`~`,12);var t=this.parseStringGroup(e);if(this.gullet.lexer.setCatcode(`%`,14),this.gullet.lexer.setCatcode(`~`,13),t==null)return null;var n=t.text.replace(/\\([#$%&~_^{}])/g,`$1`);return{type:`url`,mode:this.mode,url:n}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(n==null)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var i=this.parseExpression(!1,`EOF`);this.expect(`EOF`),this.gullet.endGroup();var a={type:`ordgroup`,mode:this.mode,loc:n.loc,body:i};return t&&this.switchMode(r),a}parseGroup(e,t){var n=this.fetch(),r=n.text,i;if(r===`{`||r===`\\begingroup`){this.consume();var a=r===`{`?`}`:`\\endgroup`;this.gullet.beginGroup();var o=this.parseExpression(!1,a),s=this.fetch();this.expect(a),this.gullet.endGroup(),i={type:`ordgroup`,mode:this.mode,loc:tp.range(n,s),body:o,semisimple:r===`\\begingroup`||void 0}}else if(i=this.parseFunction(t,e)||this.parseSymbol(),i==null&&r[0]===`\\`&&!Object.prototype.hasOwnProperty.call(dm,r)){if(this.settings.throwOnError)throw new A(`Undefined control sequence: `+r,n);i=this.formatUnsupportedCmd(r),this.consume()}return i}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n];if(r.type===`textord`){var i=r.text,a=e[n+1];if(!(!a||a.type!==`textord`)){if(i===`-`&&a.text===`-`){var o=e[n+2];n+1<t&&o&&o.type===`textord`&&o.text===`-`?(e.splice(n,3,{type:`textord`,mode:`text`,loc:tp.range(r,o),text:`---`}),t-=2):(e.splice(n,2,{type:`textord`,mode:`text`,loc:tp.range(r,a),text:`--`}),--t)}(i===`'`||i==="`")&&a.text===i&&(e.splice(n,2,{type:`textord`,mode:`text`,loc:tp.range(r,a),text:i+i}),--t)}}}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r=n.charAt(0)===`*`;if(r&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new A(`\\verb assertion failed --
270
+ please report what input caused this bug`);return n=n.slice(1,-1),{type:`verb`,mode:`text`,body:n,star:r}}Object.prototype.hasOwnProperty.call(gm,t[0])&&!Ll[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=gm[t[0]]+t.slice(1));var i=$p.exec(t);i&&(t=t.substring(0,i.index),t===`i`?t=`ı`:t===`j`&&(t=`ȷ`));var a;if(Ll[this.mode][t]){this.settings.strict&&this.mode===`math`&&cu.includes(t)&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Latin-1/Unicode text character "`+t[0]+`" used in math mode`,e);var o=Ll[this.mode][t].group,s=tp.range(e);a=Yd(o)?{type:`atom`,mode:this.mode,family:o,loc:s,text:t}:{type:o,mode:this.mode,loc:s,text:t}}else if(t.charCodeAt(0)>=128)this.settings.strict&&(qc(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)),a={type:`textord`,mode:`text`,loc:tp.range(e),text:t};else return null;if(this.consume(),i)for(var c=0;c<i[0].length;c++){var l=i[0][c];if(!hm[l])throw new A(`Unknown accent ' `+l+`'`,e);var u=hm[l][this.mode]||hm[l].text;if(!u)throw new A(`Accent `+l+` unsupported in `+this.mode+` mode`,e);a={type:`accent`,mode:this.mode,loc:tp.range(e),label:u,isStretchy:!1,isShifty:!0,base:a}}return a}};_m.endOfExpression=new Set([`}`,`\\endgroup`,`\\end`,`\\right`,`&`]);var vm=function(e,t){if(!(typeof e==`string`||e instanceof String))throw TypeError(`KaTeX can only parse string typed expression`);var n=new _m(e,t);delete n.gullet.macros.current[`\\df@tag`];var r=n.parse();if(delete n.gullet.macros.current[`\\current@color`],delete n.gullet.macros.current[`\\color`],n.gullet.macros.get(`\\df@tag`)){if(!t.displayMode)throw new A(`\\tag works only in display equations`);r=[{type:`tag`,mode:`text`,body:r,tag:n.subparse([new np(`\\df@tag`)])}]}return r},ym=function(e,t,n){t.textContent=``;var r=Cm(e,n).toNode();t.appendChild(r)};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.`),ym=function(){throw new A(`KaTeX doesn't work in quirks mode.`)});var bm=function(e,t){return Cm(e,t).toMarkup()},xm=function(e,t){return vm(e,new Ec(t))},Sm=function(e,t,n){if(n.throwOnError||!(e instanceof A))throw e;var r=z([`katex-error`],[new Cl(t)]);return r.setAttribute(`title`,e.toString()),r.setAttribute(`style`,`color:`+n.errorColor),r},Cm=function(e,t){var n=new Ec(t);try{return Ld(vm(e,n),e,n)}catch(t){return Sm(t,e,n)}},wm={version:`0.18.1`,render:ym,renderToString:bm,ParseError:A,SETTINGS_SCHEMA:Sc,__parse:xm,__renderToDomTree:Cm,__renderToHTMLTree:function(e,t){var n=new Ec(t);try{return Rd(vm(e,n),e,n)}catch(t){return Sm(t,e,n)}},__setFontMetrics:Nl,__defineSymbol:M,__defineFunction:ed,__defineMacro:V,__domTree:{Span:yl,Anchor:bl,SymbolNode:Cl,SvgNode:wl,PathNode:Tl,LineNode:El}},Tm={trust:!1,strict:`ignore`,maxExpand:300,maxSize:20,throwOnError:!0};function Em(e){if(!e||e.length>1500||/[\n;`]|[A-Za-z]:\\|(?:https?|file):/.test(e)||/\\(?:cite\w*|[cCvV]?ref|label|section|subsection|caption|paragraph)\b/.test(e))return!1;let t=e.replace(/\\(?:text\w*|operatorname|mathrm)\{[^{}]*\}/g,``).replace(/\\[A-Za-z]+/g,``);return/[A-Za-z]{3,}\s+[A-Za-z]{2,}\b|[\u4e00-\u9fff]{2,}/.test(t)?!1:/^\\[([]/.test(e)||/\\[A-Za-z]+/.test(e)&&/[=^_{}]|\\(?:pi|alpha|beta|gamma|delta|epsilon|varepsilon|theta|lambda|mu|sigma|Delta|Omega|infty)\b/.test(e)?!0:/^[A-Za-z]\s*=\s*[-+]?\d+(?:\.\d+)?$/.test(e)}function Dm(e){let t=e.trim().replace(/^%[^\n]*(?:\n|$)/gm,``).trim();for(let[e,n]of[[`$$`,`$$`],[`\\[`,`\\]`],[`\\(`,`\\)`],[`$`,`$`]])if(t.startsWith(e)&&t.endsWith(n)){t=t.slice(e.length,-n.length).trim();break}return t=t.replace(/\\begin\{(equation\*?|displaymath)\}([\s\S]*?)\\end\{\1\}/g,`$2`),t.replace(/\\(begin|end)\{(?:align\*?|split)\}/g,`\\$1{aligned}`).trim()}function Om(e,t=!1){if(e.length>2e4)return{html:``,missing:[],error:`公式过长,请查看源码`};let n=Dm(e);if(!n||/\\(?:documentclass|usepackage|input|include|includegraphics|href|url|html\w*)\b/.test(n))return{html:``,missing:[],error:`此内容包含文档或非公式命令,请查看源码`};let r={},i=[];for(let e=0;e<=20;e++)try{return{html:wm.renderToString(n,{...Tm,displayMode:t,macros:{...r}}),missing:i,error:``}}catch(t){let n=/Undefined control sequence:\s*(\\[A-Za-z]+)/.exec(t.message)?.[1];if(!n||i.includes(n)||e===20)return{html:``,missing:i,error:`公式语法或命令暂不支持,请查看源码`};i.push(n),r[n]=`\\text{\\textbackslash ${n.slice(1)}}`}return{html:``,missing:i,error:`公式暂无法预览`}}function km({source:e}){let{locale:t,tr:n}=fc(),[r,i]=(0,f.useState)(!1),a=(0,f.useMemo)(()=>Om(e,!0),[e]),o=t===`en`?`, `:`、`;return(0,O.jsxs)(`div`,{className:`formula-code-block`,children:[(0,O.jsxs)(`div`,{className:`formula-toolbar`,children:[(0,O.jsx)(`span`,{children:n(`公式`,`Math`)}),a.html&&(0,O.jsx)(`button`,{type:`button`,onClick:()=>i(e=>!e),"aria-pressed":r,children:r?n(`显示公式`,`Preview`):n(`查看源码`,`Source`)})]}),r||!a.html?(0,O.jsx)(`pre`,{children:(0,O.jsx)(`code`,{children:e})}):(0,O.jsx)(`div`,{className:`formula-preview`,dangerouslySetInnerHTML:{__html:a.html}}),a.error&&(0,O.jsx)(`small`,{className:`formula-note`,children:a.error}),!!a.missing.length&&(0,O.jsxs)(`small`,{className:`formula-note`,children:[n(`未提供宏定义,保留原名:`,`Undefined macros kept as-is: `),a.missing.join(o)]})]})}function Am({source:e}){let{locale:t,tr:n}=fc(),r=(0,f.useMemo)(()=>Om(e),[e]);if(!r.html)return(0,O.jsx)(`code`,{children:e});let i=t===`en`?`, `:`、`;return(0,O.jsx)(`span`,{className:`inline-formula-code`,title:`${e}${r.missing.length?n(`(未定义命令保留原名:${r.missing.join(i)})`,` (undefined macros kept: ${r.missing.join(i)})`):``}`,dangerouslySetInnerHTML:{__html:r.html}})}var jm=/[#.]/g;function Mm(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){jm.lastIndex=i;let e=jm.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function Nm(e,t,n){let r=n?zm(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=Mm(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,Pm(i))a.unshift(i);else for(let[t,n]of Object.entries(i))Fm(e,o.properties,t,n)}for(let e of a)Im(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function Pm(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function Fm(e,t,n,r){let i=Zt(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?nn(r):i.commaSeparated?pt(r):i.commaOrSpaceSeparated?nn(pt(r).join(` `)):Lm(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?Rm(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(Lm(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Im(e,t){if(t!=null)if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)Im(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?Im(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function Lm(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||wt(n)===wt(t)))return!0}return n}function Rm(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function zm(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var Bm=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`),Vm=Nm(en,`div`),Hm=Nm(tn,`g`,Bm),Um={html:`http://www.w3.org/1999/xhtml`,mathml:`http://www.w3.org/1998/Math/MathML`,svg:`http://www.w3.org/2000/svg`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function Wm(e,t){return Gm(e,t||{})||{type:`root`,children:[]}}function Gm(e,t){let n=Km(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function Km(e,t){switch(e.nodeType){case 1:return Zm(e,t);case 3:return Ym(e);case 8:return Xm(e);case 9:return qm(e,t);case 10:return Jm();case 11:return qm(e,t);default:return}}function qm(e,t){return{type:`root`,children:Qm(e,t)}}function Jm(){return{type:`doctype`}}function Ym(e){return{type:`text`,value:e.nodeValue||``}}function Xm(e){return{type:`comment`,value:e.nodeValue||``}}function Zm(e,t){let n=e.namespaceURI,r=n===Um.svg?Hm:Vm,i=n===Um.html?e.tagName.toLowerCase():e.tagName,a=n===Um.html&&i===`template`?e.content:e,o=e.getAttributeNames(),s={},c=-1;for(;++c<o.length;)s[o[c]]=e.getAttribute(o[c])||``;return r(i,s,Qm(a,t))}function Qm(e,t){let n=e.childNodes,r=[],i=-1;for(;++i<n.length;){let e=Gm(n[i],t);e!==void 0&&r.push(e)}return r}var $m=new DOMParser;function eh(e,t){return Wm(t?.fragment?th(e):$m.parseFromString(e,`text/html`))}function th(e){let t=document.createElement(`template`);return t.innerHTML=e,t.content}var nh=(function(e,t,n){let r=Wo(n);if(!e||!e.type||!e.children)throw Error(`Expected parent node`);if(typeof t==`number`){if(t<0||t===1/0)throw Error(`Expected positive finite number as index`)}else if(t=e.children.indexOf(t),t<0)throw Error(`Expected child node or index`);for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]}),rh=(function(e){if(e==null)return sh;if(typeof e==`string`)return ah(e);if(typeof e==`object`)return ih(e);if(typeof e==`function`)return oh(e);throw Error("Expected function, string, or array as `test`")});function ih(e){let t=[],n=-1;for(;++n<e.length;)t[n]=rh(e[n]);return oh(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function ah(e){return oh(t);function t(t){return t.tagName===e}}function oh(e){return t;function t(t,n,r){return!!(ch(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function sh(e){return!!(e&&typeof e==`object`&&`type`in e&&e.type===`element`&&`tagName`in e&&typeof e.tagName==`string`)}function ch(e){return typeof e==`object`&&!!e&&`type`in e&&`tagName`in e}var lh=/\n/g,uh=/[\t ]+/g,dh=rh(`br`),fh=rh(Th),ph=rh(`p`),mh=rh(`tr`),hh=rh([`datalist`,`head`,`noembed`,`noframes`,`noscript`,`rp`,`script`,`style`,`template`,`title`,wh,Eh]),gh=rh(`address.article.aside.blockquote.body.caption.center.dd.dialog.dir.dl.dt.div.figure.figcaption.footer.form,.h1.h2.h3.h4.h5.h6.header.hgroup.hr.html.legend.li.listing.main.menu.nav.ol.p.plaintext.pre.section.ul.xmp`.split(`.`));function _h(e,t){let n=t||{},r=`children`in e?e.children:[],i=gh(e),a=Ch(e,{whitespace:n.whitespace||`normal`,breakBefore:!1,breakAfter:!1}),o=[];(e.type===`text`||e.type===`comment`)&&o.push(...bh(e,{whitespace:a,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<r.length;)o.push(...vh(r[s],e,{whitespace:a,breakBefore:s?void 0:i,breakAfter:s<r.length-1?dh(r[s+1]):i}));let c=[],l;for(s=-1;++s<o.length;){let e=o[s];typeof e==`number`?l!==void 0&&e>l&&(l=e):e&&(l!==void 0&&l>-1&&c.push(`
271
+ `.repeat(l)||` `),l=-1,c.push(e))}return c.join(``)}function vh(e,t,n){return e.type===`element`?yh(e,t,n):e.type===`text`?n.whitespace===`normal`?bh(e,n):xh(e):[]}function yh(e,t,n){let r=Ch(e,n),i=e.children||[],a=-1,o=[];if(hh(e))return o;let s,c;for(dh(e)||mh(e)&&nh(t,e,mh)?c=`
272
+ `:ph(e)?(s=2,c=2):gh(e)&&(s=1,c=1);++a<i.length;)o=o.concat(vh(i[a],e,{whitespace:r,breakBefore:a?void 0:s,breakAfter:a<i.length-1?dh(i[a+1]):c}));return fh(e)&&nh(t,e,fh)&&o.push(` `),s&&o.unshift(s),c&&o.push(c),o}function bh(e,t){let n=String(e.value),r=[],i=[],a=0;for(;a<=n.length;){lh.lastIndex=a;let e=lh.exec(n),i=e&&`index`in e?e.index:n.length;r.push(Sh(n.slice(a,i).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,``),a===0?t.breakBefore:!0,i===n.length?t.breakAfter:!0)),a=i+1}let o=-1,s;for(;++o<r.length;)r[o].charCodeAt(r[o].length-1)===8203||o<r.length-1&&r[o+1].charCodeAt(0)===8203?(i.push(r[o]),s=void 0):r[o]?(typeof s==`number`&&i.push(s),i.push(r[o]),s=0):(o===0||o===r.length-1)&&i.push(0);return i}function xh(e){return[String(e.value)]}function Sh(e,t,n){let r=[],i=0,a;for(;i<e.length;){uh.lastIndex=i;let n=uh.exec(e);a=n?n.index:e.length,!i&&!a&&n&&!t&&r.push(``),i!==a&&r.push(e.slice(i,a)),i=n?a+n[0].length:a}return i!==a&&!n&&r.push(``),r.join(` `)}function Ch(e,t){if(e.type===`element`){let n=e.properties||{};switch(e.tagName){case`listing`:case`plaintext`:case`xmp`:return`pre`;case`nobr`:return`nowrap`;case`pre`:return n.wrap?`pre-wrap`:`pre`;case`td`:case`th`:return n.noWrap?`nowrap`:t.whitespace;case`textarea`:return`pre-wrap`;default:}}return t.whitespace}function wh(e){return!!(e.properties||{}).hidden}function Th(e){return e.tagName===`td`||e.tagName===`th`}function Eh(e){return e.tagName===`dialog`&&!(e.properties||{}).open}var H=class e extends Error{constructor(t,n){var r=`KaTeX parse error: `+t,i,a,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;var c=s.slice(i,a).replace(/[^]/g,`$&̲`),l=i>15?`…`+s.slice(i-15,i):s.slice(0,i),u=a+15<s.length?s.slice(a,a+15)+`…`:s.slice(a);r+=l+c+u}super(r),this.name=`ParseError`,this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,e.prototype),this.position=i,i!=null&&a!=null&&(this.length=a-i),this.rawMessage=t}},Dh=/([A-Z])/g,Oh=e=>e.replace(Dh,`-$1`).toLowerCase(),kh={"&":`&amp;`,">":`&gt;`,"<":`&lt;`,'"':`&quot;`,"'":`&#x27;`},Ah=/[&><"']/g,jh=e=>String(e).replace(Ah,e=>kh[e]),Mh=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?Mh(e.body[0]):e:e.type===`font`?Mh(e.body):e,Nh=new Set([`mathord`,`textord`,`atom`]),Ph=e=>Nh.has(Mh(e).type),Fh=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},Ih={displayMode:{type:`boolean`,description:`Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.`,cli:`-d, --display-mode`},output:{type:{enum:[`htmlAndMathml`,`html`,`mathml`]},description:`Determines the markup language of the output.`,cli:`-F, --format <type>`},leqno:{type:`boolean`,description:`Render display math in leqno style (left-justified tags).`},fleqn:{type:`boolean`,description:`Render display math flush left.`},throwOnError:{type:`boolean`,default:!0,cli:`-t, --no-throw-on-error`,cliDescription:`Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.`},errorColor:{type:`string`,default:`#cc0000`,cli:`-c, --error-color <color>`,cliDescription:`A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.`,cliProcessor:e=>`#`+e},macros:{type:`object`,cli:`-m, --macro <def>`,cliDescription:`Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).`,cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness <size>`,cliProcessor:parseFloat},colorIsTextColor:{type:`boolean`,description:`Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.`,cli:`-b, --color-is-text-color`},strict:{type:[{enum:[`warn`,`ignore`,`error`]},`boolean`,`function`],description:`Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.`,cli:`-S, --strict`,cliDefault:!1},trust:{type:[`boolean`,`function`],description:`Trust the input, enabling all HTML features such as \\url.`,cli:`-T, --trust`},maxSize:{type:`number`,default:1/0,description:`If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large`,processor:e=>Math.max(0,e),cli:`-s, --max-size <n>`,cliProcessor:parseInt},maxExpand:{type:`number`,default:1e3,description:`Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.`,processor:e=>Math.max(0,e),cli:`-e, --max-expand <n>`,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}};function Lh(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function Rh(e){return e.default===void 0?Lh(Array.isArray(e.type)?e.type[0]:e.type):e.default}function zh(e,t,n,r){var i=n[t];e[t]=i===void 0?Rh(r):r.processor?r.processor(i):i}var Bh=class{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e||={};for(var t of Object.keys(Ih)){var n=Ih[t];n&&zh(this,t,e,n)}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r==`function`&&(r=r(e,t,n)),!(!r||r===`ignore`)){if(r===!0||r===`error`)throw new H(`LaTeX-incompatible input and strict mode is set to 'error': `+(t+` [`+e+`]`),n);r===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){var t=Fh(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},Vh=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return Xh[Zh[this.id]]}sub(){return Xh[Qh[this.id]]}fracNum(){return Xh[$h[this.id]]}fracDen(){return Xh[eg[this.id]]}cramp(){return Xh[tg[this.id]]}text(){return Xh[ng[this.id]]}isTight(){return this.size>=2}},Hh=0,Uh=1,Wh=2,Gh=3,Kh=4,qh=5,Jh=6,Yh=7,Xh=[new Vh(Hh,0,!1),new Vh(Uh,0,!0),new Vh(Wh,1,!1),new Vh(Gh,1,!0),new Vh(Kh,2,!1),new Vh(qh,2,!0),new Vh(Jh,3,!1),new Vh(Yh,3,!0)],Zh=[Kh,qh,Kh,qh,Jh,Yh,Jh,Yh],Qh=[qh,qh,qh,qh,Yh,Yh,Yh,Yh],$h=[Wh,Gh,Kh,qh,Jh,Yh,Jh,Yh],eg=[Gh,Gh,qh,qh,Yh,Yh,Yh,Yh],tg=[Uh,Uh,Gh,Gh,qh,qh,Yh,Yh],ng=[Hh,Uh,Wh,Gh,Wh,Gh,Wh,Gh],rg={DISPLAY:Xh[Hh],TEXT:Xh[Wh],SCRIPT:Xh[Kh],SCRIPTSCRIPT:Xh[Jh]},ig=[{name:`latin`,blocks:[[256,591],[768,879]]},{name:`cyrillic`,blocks:[[1024,1279]]},{name:`armenian`,blocks:[[1328,1423]]},{name:`brahmic`,blocks:[[2304,4255]]},{name:`georgian`,blocks:[[4256,4351]]},{name:`cjk`,blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:`hangul`,blocks:[[44032,55215]]}];function ag(e){for(var t=0;t<ig.length;t++)for(var n=ig[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}var og=[];ig.forEach(e=>e.blocks.forEach(e=>og.push(...e)));function sg(e){for(var t=0;t<og.length;t+=2)if(e>=og[t]&&e<=og[t+1])return!0;return!1}var cg=e=>e+` `+e,lg=80,ug=function(e,t){return`M95,`+(622+e+t)+`
273
+ c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
274
+ c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
275
+ c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
276
+ s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
277
+ c69,-144,104.5,-217.7,106.5,-221
278
+ l`+e/2.075+` -`+e+`
279
+ c5.3,-9.3,12,-14,20,-14
280
+ H400000v`+(40+e)+`H845.2724
281
+ s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
282
+ c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
283
+ M`+(834+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},dg=function(e,t){return`M263,`+(601+e+t)+`c0.7,0,18,39.7,52,119
284
+ c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
285
+ c340,-704.7,510.7,-1060.3,512,-1067
286
+ l`+e/2.084+` -`+e+`
287
+ c4.7,-7.3,11,-11,19,-11
288
+ H40000v`+(40+e)+`H1012.3
289
+ s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
290
+ c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
291
+ s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
292
+ c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
293
+ M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},fg=function(e,t){return`M983 `+(10+e+t)+`
294
+ l`+e/3.13+` -`+e+`
295
+ c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
296
+ H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
297
+ s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
298
+ c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
299
+ c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
300
+ c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
301
+ c53.7,-170.3,84.5,-266.8,92.5,-289.5z
302
+ M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},pg=function(e,t){return`M424,`+(2398+e+t)+`
303
+ c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
304
+ c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
305
+ s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
306
+ s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
307
+ l`+e/4.223+` -`+e+`c4,-6.7,10,-10,18,-10 H400000
308
+ v`+(40+e)+`H1014.6
309
+ s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
310
+ c-2,6,-10,9,-24,9
311
+ c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+` `+t+`
312
+ h400000v`+(40+e)+`h-400000z`},mg=function(e,t){return`M473,`+(2713+e+t)+`
313
+ c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+` -`+e+`
314
+ c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
315
+ s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
316
+ c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
317
+ c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
318
+ s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
319
+ 606zM`+(1001+e)+` `+t+`h400000v`+(40+e)+`H1017.7z`},hg=function(e){var t=e/2;return`M400000 `+e+` H0 L`+t+` 0 l65 45 L145 `+(e-80)+` H400000z`},gg=function(e,t,n){var r=n-54-t-e;return`M702 `+(e+t)+`H400000`+(40+e)+`
320
+ H742v`+r+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
321
+ h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
322
+ c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
323
+ 219 661 l218 661zM702 `+t+`H400000v`+(40+e)+`H742z`},_g=function(e,t,n){t=1e3*t;var r=``;switch(e){case`sqrtMain`:r=ug(t,lg);break;case`sqrtSize1`:r=dg(t,lg);break;case`sqrtSize2`:r=fg(t,lg);break;case`sqrtSize3`:r=pg(t,lg);break;case`sqrtSize4`:r=mg(t,lg);break;case`sqrtTall`:r=gg(t,lg,n)}return r},vg=function(e,t){switch(e){case`⎜`:return cg(`M291 0 H417 V`+t+` H291z`);case`∣`:return cg(`M145 0 H188 V`+t+` H145z`);case`∥`:return cg(`M145 0 H188 V`+t+` H145z`)+cg(`M367 0 H410 V`+t+` H367z`);case`⎟`:return cg(`M457 0 H583 V`+t+` H457z`);case`⎢`:return cg(`M319 0 H403 V`+t+` H319z`);case`⎥`:return cg(`M263 0 H347 V`+t+` H263z`);case`⎪`:return cg(`M384 0 H504 V`+t+` H384z`);case`⏐`:return cg(`M312 0 H355 V`+t+` H312z`);case`‖`:return cg(`M257 0 H300 V`+t+` H257z`)+cg(`M478 0 H521 V`+t+` H478z`);default:return``}},yg={doubleleftarrow:`M262 157
324
+ l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
325
+ 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
326
+ 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
327
+ c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
328
+ 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
329
+ -86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
330
+ -2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
331
+ m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
332
+ -10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
333
+ 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
334
+ -33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
335
+ -17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
336
+ -13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
337
+ c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
338
+ -107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
339
+ 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
340
+ -5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
341
+ c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
342
+ 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
343
+ 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
344
+ l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
345
+ -45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
346
+ 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
347
+ 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
348
+ 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
349
+ -331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
350
+ H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
351
+ 435 0h399565z`,leftgroupunder:`M400000 262
352
+ H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
353
+ 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
354
+ -3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
355
+ -18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
356
+ -196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
357
+ 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
358
+ -4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
359
+ -10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
360
+ m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
361
+ 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
362
+ 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
363
+ -152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
364
+ 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
365
+ -2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
366
+ v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
367
+ -83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
368
+ -68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
369
+ 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:cg(`M40 281 V428 H0 V94 H40 V241 H400000 v40z`),leftbracketunder:cg(`M0 0 h120 V290 H399995 v120 H0z`),leftbracketover:cg(`M0 440 h120 V150 H399995 v-120 H0z`),leftmapsto:cg(`M40 281 V448H0V74H40V241H400000v40z`),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
370
+ -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
371
+ c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
372
+ 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:cg(`M0 50 h400000 v40H0z m0 194h40000v40H0z`),midbrace:`M200428 334
373
+ c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
374
+ -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
375
+ 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
376
+ 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
377
+ c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
378
+ 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
379
+ 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
380
+ -5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
381
+ -320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
382
+ m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
383
+ 60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
384
+ -451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
385
+ m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
386
+ c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
387
+ -480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
388
+ m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
389
+ 85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
390
+ -707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
391
+ m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
392
+ c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
393
+ -16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
394
+ 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
395
+ 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
396
+ -40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
397
+ -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
398
+ 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
399
+ -6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
400
+ s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
401
+ c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
402
+ 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
403
+ -174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
404
+ 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
405
+ 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
406
+ -3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
407
+ -10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
408
+ 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
409
+ -18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
410
+ 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
411
+ m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
412
+ 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
413
+ -7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
414
+ -27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
415
+ 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
416
+ 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
417
+ -64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
418
+ m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
419
+ 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
420
+ -13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
421
+ 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:cg(`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`),rightbracketunder:cg(`M399995 0 h-120 V290 H0 v120 H400000z`),rightbracketover:cg(`M399995 440 h-120 V150 H0 v-120 H399995z`),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
422
+ 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
423
+ -52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
424
+ -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
425
+ 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
426
+ -70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
427
+ -40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
428
+ -37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
429
+ 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
430
+ c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
431
+ 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
432
+ 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
433
+ -19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
434
+ 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
435
+ -2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
436
+ 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
437
+ 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
438
+ -68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
439
+ -8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
440
+ 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
441
+ c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
442
+ 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
443
+ -11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
444
+ 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
445
+ 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
446
+ -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
447
+ -11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
448
+ 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
449
+ 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
450
+ -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
451
+ 3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
452
+ 10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
453
+ -1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
454
+ -7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
455
+ H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
456
+ c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
457
+ c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
458
+ -11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
459
+ -11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
460
+ -11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
461
+ -5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
462
+ -11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
463
+ -11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
464
+ -11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
465
+ c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
466
+ c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
467
+ s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
468
+ 121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
469
+ s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
470
+ c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
471
+ M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
472
+ -27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
473
+ 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
474
+ -84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
475
+ -119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
476
+ -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
477
+ 151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
478
+ c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
479
+ c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
480
+ c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
481
+ c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
482
+ M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
483
+ c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
484
+ -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
485
+ c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
486
+ M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
487
+ c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
488
+ 1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
489
+ -152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
490
+ M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
491
+ c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
492
+ -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
493
+ c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
494
+ M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},bg=function(e,t){switch(e){case`lbrack`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v1759 v84 h347 v-84
495
+ H403z M403 1759 V0 H319 V1759 v`+t+` v1759 v84 h84z`;case`rbrack`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v1759 H0 v84 H347z
496
+ M347 1759 V0 H263 V1759 v`+t+` v1759 h84z`;case`vert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
497
+ c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
498
+ c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z`;case`doublevert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
499
+ c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
500
+ c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z
501
+ M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
502
+ c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
503
+ c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+` v585 h43z`;case`lfloor`:return`M319 602 V0 H403 V602 v`+t+` v1715 h263 v84 H319z
504
+ MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`rfloor`:return`M319 602 V0 H403 V602 v`+t+` v1799 H0 v-84 H319z
505
+ MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`lceil`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v602 h84z
506
+ M403 1759 V0 H319 V1759 v`+t+` v602 h84z`;case`rceil`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v602 h84z
507
+ M347 1759 V0 h-84 V1759 v`+t+` v602 h84z`;case`lparen`:return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
508
+ c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
509
+ -36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
510
+ 949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
511
+ c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
512
+ -544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
513
+ l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
514
+ -210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case`rparen`:return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
515
+ 63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
516
+ c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+`
517
+ c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
518
+ c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
519
+ c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
520
+ c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
521
+ l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
522
+ -470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error(`Unknown stretchy delimiter.`)}};function xg(e){return`toText`in e}var Sg=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e=``,t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map(e=>{if(xg(e))return e.toText();throw Error(`Expected MathDomNode with toText, got `+e.constructor.name)}).join(``)}},Cg={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},wg={ex:!0,em:!0,mu:!0},Tg=function(e){return typeof e!=`string`&&(e=e.unit),e in Cg||e in wg||e===`ex`},Eg=function(e,t){var n;if(e.unit in Cg)n=Cg[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit===`mu`)n=t.fontMetrics().cssEmPerMu;else{var r=t.style.isTight()?t.havingStyle(t.style.text()):t;if(e.unit===`ex`)n=r.fontMetrics().xHeight;else if(e.unit===`em`)n=r.fontMetrics().quad;else throw new H(`Invalid unit: '`+e.unit+`'`);r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},U=function(e){return+e.toFixed(4)+`em`},Dg=function(e){return e.filter(e=>e).join(` `)},Og=function(e){var t=``;for(var n of Object.keys(e)){var r=e[n];r!==void 0&&(t+=Oh(n)+`:`+r+`;`)}return t},kg=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push(`mtight`);var r=t.getColor();r&&(this.style.color=r)}},Ag=function(e){var t=document.createElement(e);t.className=Dg(this.classes),Object.assign(t.style,this.style);for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t},jg=/[\s"'>/=\x00-\x1f]/,Mg=function(e){var t=`<`+e;this.classes.length&&(t+=` class="`+jh(Dg(this.classes))+`"`);var n=Og(this.style);n&&(t+=` style="`+jh(n)+`"`);for(var r of Object.keys(this.attributes)){if(jg.test(r))throw new H(`Invalid attribute name '`+r+`'`);t+=` `+r+`="`+jh(this.attributes[r])+`"`}t+=`>`;for(var i=0;i<this.children.length;i++)t+=this.children[i].toMarkup();return t+=`</`+e+`>`,t},Ng=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,kg.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Ag.call(this,`span`)}toMarkup(){return Mg.call(this,`span`)}},Pg=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,kg.call(this,t,r),this.children=n||[],this.setAttribute(`href`,e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Ag.call(this,`a`)}toMarkup(){return Mg.call(this,`a`)}},Fg=class{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=[`mord`],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement(`img`);return e.src=this.src,e.alt=this.alt,e.className=`mord`,Object.assign(e.style,this.style),e}toMarkup(){var e=`<img src="`+jh(this.src)+`"`+(` alt="`+jh(this.alt)+`"`),t=Og(this.style);return t&&(e+=` style="`+jh(t)+`"`),e+=`'/>`,e}},Ig={î:`ı̂`,ï:`ı̈`,í:`ı́`,ì:`ı̀`},Lg=class{constructor(e,t,n,r,i,a,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var c=ag(this.text.charCodeAt(0));c&&this.classes.push(c+`_fallback`),/[îïíì]/.test(this.text)&&(this.text=Ig[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;return this.italic>0&&(t=document.createElement(`span`),t.style.marginRight=U(this.italic)),this.classes.length>0&&(t||=document.createElement(`span`),t.className=Dg(this.classes)),Object.keys(this.style).length>0&&(t||=document.createElement(`span`),Object.assign(t.style,this.style)),t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t=`<span`;this.classes.length&&(e=!0,t+=` class="`,t+=jh(Dg(this.classes)),t+=`"`);var n=``;this.italic>0&&(n+=`margin-right:`+U(this.italic)+`;`),n+=Og(this.style),n&&(e=!0,t+=` style="`+jh(n)+`"`);var r=jh(this.text);return e?(t+=`>`,t+=r,t+=`</span>`,t):r}},Rg=class{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e=`<svg xmlns="http://www.w3.org/2000/svg"`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+jh(this.attributes[t])+`"`;e+=`>`;for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+=`</svg>`,e}},zg=class{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return this.alternate?e.setAttribute(`d`,this.alternate):e.setAttribute(`d`,yg[this.pathName]),e}toMarkup(){return this.alternate?`<path d="`+jh(this.alternate)+`"/>`:`<path d="`+jh(yg[this.pathName])+`"/>`}},Bg=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`line`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e=`<line`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+jh(this.attributes[t])+`"`;return e+=`/>`,e}};function Vg(e){if(e instanceof Lg)return e;throw Error(`Expected symbolNode but got `+String(e)+`.`)}function Hg(e){if(e instanceof Ng)return e;throw Error(`Expected span<HtmlDomNode> but got `+String(e)+`.`)}var Ug=e=>e instanceof Ng||e instanceof Pg||e instanceof Sg,Wg={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Gg={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Kg={Å:`A`,Ð:`D`,Þ:`o`,å:`a`,ð:`d`,þ:`o`,А:`A`,Б:`B`,В:`B`,Г:`F`,Д:`A`,Е:`E`,Ж:`K`,З:`3`,И:`N`,Й:`N`,К:`K`,Л:`N`,М:`M`,Н:`H`,О:`O`,П:`N`,Р:`P`,С:`C`,Т:`T`,У:`y`,Ф:`O`,Х:`X`,Ц:`U`,Ч:`h`,Ш:`W`,Щ:`W`,Ъ:`B`,Ы:`X`,Ь:`B`,Э:`3`,Ю:`X`,Я:`R`,а:`a`,б:`b`,в:`a`,г:`r`,д:`y`,е:`e`,ж:`m`,з:`e`,и:`n`,й:`n`,к:`n`,л:`n`,м:`m`,н:`n`,о:`o`,п:`n`,р:`p`,с:`c`,т:`o`,у:`y`,ф:`b`,х:`x`,ц:`n`,ч:`n`,ш:`w`,щ:`w`,ъ:`a`,ы:`m`,ь:`a`,э:`e`,ю:`m`,я:`r`};function qg(e,t){Wg[e]=t}function Jg(e,t,n){if(!Wg[t])throw Error(`Font metrics not found for font: `+t+`.`);var r=e.charCodeAt(0),i=Wg[t][r];if(!i&&e[0]in Kg&&(r=Kg[e[0]].charCodeAt(0),i=Wg[t][r]),!i&&n===`text`&&sg(r)&&(i=Wg[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var Yg={};function Xg(e){var t=e>=5?0:e>=3?1:2;if(!Yg[t]){var n=Yg[t]={cssEmPerMu:Gg.quad[t]/18};for(var r in Gg)Gg.hasOwnProperty(r)&&(n[r]=Gg[r][t])}return Yg[t]}var Zg={math:{},text:{}};function W(e,t,n,r,i,a){Zg[e][i]={font:t,group:n,replace:r},a&&r&&(Zg[e][r]=Zg[e][i])}var G=`math`,K=`text`,q=`main`,J=`ams`,Qg=`accent-token`,$g=`bin`,e_=`close`,t_=`inner`,n_=`mathord`,r_=`op-token`,i_=`open`,a_=`punct`,Y=`rel`,o_=`spacing`,X=`textord`;W(G,q,Y,`≡`,`\\equiv`,!0),W(G,q,Y,`≺`,`\\prec`,!0),W(G,q,Y,`≻`,`\\succ`,!0),W(G,q,Y,`∼`,`\\sim`,!0),W(G,q,Y,`⊥`,`\\perp`),W(G,q,Y,`⪯`,`\\preceq`,!0),W(G,q,Y,`⪰`,`\\succeq`,!0),W(G,q,Y,`≃`,`\\simeq`,!0),W(G,q,Y,`∣`,`\\mid`,!0),W(G,q,Y,`≪`,`\\ll`,!0),W(G,q,Y,`≫`,`\\gg`,!0),W(G,q,Y,`≍`,`\\asymp`,!0),W(G,q,Y,`∥`,`\\parallel`),W(G,q,Y,`⋈`,`\\bowtie`,!0),W(G,q,Y,`⌣`,`\\smile`,!0),W(G,q,Y,`⊑`,`\\sqsubseteq`,!0),W(G,q,Y,`⊒`,`\\sqsupseteq`,!0),W(G,q,Y,`≐`,`\\doteq`,!0),W(G,q,Y,`⌢`,`\\frown`,!0),W(G,q,Y,`∋`,`\\ni`,!0),W(G,q,Y,`∝`,`\\propto`,!0),W(G,q,Y,`⊢`,`\\vdash`,!0),W(G,q,Y,`⊣`,`\\dashv`,!0),W(G,q,Y,`∋`,`\\owns`),W(G,q,a_,`.`,`\\ldotp`),W(G,q,a_,`⋅`,`\\cdotp`),W(G,q,a_,`⋅`,`·`),W(K,q,X,`⋅`,`·`),W(G,q,X,`#`,`\\#`),W(K,q,X,`#`,`\\#`),W(G,q,X,`&`,`\\&`),W(K,q,X,`&`,`\\&`),W(G,q,X,`ℵ`,`\\aleph`,!0),W(G,q,X,`∀`,`\\forall`,!0),W(G,q,X,`ℏ`,`\\hbar`,!0),W(G,q,X,`∃`,`\\exists`,!0),W(G,q,X,`∇`,`\\nabla`,!0),W(G,q,X,`♭`,`\\flat`,!0),W(G,q,X,`ℓ`,`\\ell`,!0),W(G,q,X,`♮`,`\\natural`,!0),W(G,q,X,`♣`,`\\clubsuit`,!0),W(G,q,X,`℘`,`\\wp`,!0),W(G,q,X,`♯`,`\\sharp`,!0),W(G,q,X,`♢`,`\\diamondsuit`,!0),W(G,q,X,`ℜ`,`\\Re`,!0),W(G,q,X,`♡`,`\\heartsuit`,!0),W(G,q,X,`ℑ`,`\\Im`,!0),W(G,q,X,`♠`,`\\spadesuit`,!0),W(G,q,X,`§`,`\\S`,!0),W(K,q,X,`§`,`\\S`),W(G,q,X,`¶`,`\\P`,!0),W(K,q,X,`¶`,`\\P`),W(G,q,X,`†`,`\\dag`),W(K,q,X,`†`,`\\dag`),W(K,q,X,`†`,`\\textdagger`),W(G,q,X,`‡`,`\\ddag`),W(K,q,X,`‡`,`\\ddag`),W(K,q,X,`‡`,`\\textdaggerdbl`),W(G,q,e_,`⎱`,`\\rmoustache`,!0),W(G,q,i_,`⎰`,`\\lmoustache`,!0),W(G,q,e_,`⟯`,`\\rgroup`,!0),W(G,q,i_,`⟮`,`\\lgroup`,!0),W(G,q,$g,`∓`,`\\mp`,!0),W(G,q,$g,`⊖`,`\\ominus`,!0),W(G,q,$g,`⊎`,`\\uplus`,!0),W(G,q,$g,`⊓`,`\\sqcap`,!0),W(G,q,$g,`∗`,`\\ast`),W(G,q,$g,`⊔`,`\\sqcup`,!0),W(G,q,$g,`◯`,`\\bigcirc`,!0),W(G,q,$g,`∙`,`\\bullet`,!0),W(G,q,$g,`‡`,`\\ddagger`),W(G,q,$g,`≀`,`\\wr`,!0),W(G,q,$g,`⨿`,`\\amalg`),W(G,q,$g,`&`,`\\And`),W(G,q,Y,`⟵`,`\\longleftarrow`,!0),W(G,q,Y,`⇐`,`\\Leftarrow`,!0),W(G,q,Y,`⟸`,`\\Longleftarrow`,!0),W(G,q,Y,`⟶`,`\\longrightarrow`,!0),W(G,q,Y,`⇒`,`\\Rightarrow`,!0),W(G,q,Y,`⟹`,`\\Longrightarrow`,!0),W(G,q,Y,`↔`,`\\leftrightarrow`,!0),W(G,q,Y,`⟷`,`\\longleftrightarrow`,!0),W(G,q,Y,`⇔`,`\\Leftrightarrow`,!0),W(G,q,Y,`⟺`,`\\Longleftrightarrow`,!0),W(G,q,Y,`↦`,`\\mapsto`,!0),W(G,q,Y,`⟼`,`\\longmapsto`,!0),W(G,q,Y,`↗`,`\\nearrow`,!0),W(G,q,Y,`↩`,`\\hookleftarrow`,!0),W(G,q,Y,`↪`,`\\hookrightarrow`,!0),W(G,q,Y,`↘`,`\\searrow`,!0),W(G,q,Y,`↼`,`\\leftharpoonup`,!0),W(G,q,Y,`⇀`,`\\rightharpoonup`,!0),W(G,q,Y,`↙`,`\\swarrow`,!0),W(G,q,Y,`↽`,`\\leftharpoondown`,!0),W(G,q,Y,`⇁`,`\\rightharpoondown`,!0),W(G,q,Y,`↖`,`\\nwarrow`,!0),W(G,q,Y,`⇌`,`\\rightleftharpoons`,!0),W(G,J,Y,`≮`,`\\nless`,!0),W(G,J,Y,``,`\\@nleqslant`),W(G,J,Y,``,`\\@nleqq`),W(G,J,Y,`⪇`,`\\lneq`,!0),W(G,J,Y,`≨`,`\\lneqq`,!0),W(G,J,Y,``,`\\@lvertneqq`),W(G,J,Y,`⋦`,`\\lnsim`,!0),W(G,J,Y,`⪉`,`\\lnapprox`,!0),W(G,J,Y,`⊀`,`\\nprec`,!0),W(G,J,Y,`⋠`,`\\npreceq`,!0),W(G,J,Y,`⋨`,`\\precnsim`,!0),W(G,J,Y,`⪹`,`\\precnapprox`,!0),W(G,J,Y,`≁`,`\\nsim`,!0),W(G,J,Y,``,`\\@nshortmid`),W(G,J,Y,`∤`,`\\nmid`,!0),W(G,J,Y,`⊬`,`\\nvdash`,!0),W(G,J,Y,`⊭`,`\\nvDash`,!0),W(G,J,Y,`⋪`,`\\ntriangleleft`),W(G,J,Y,`⋬`,`\\ntrianglelefteq`,!0),W(G,J,Y,`⊊`,`\\subsetneq`,!0),W(G,J,Y,``,`\\@varsubsetneq`),W(G,J,Y,`⫋`,`\\subsetneqq`,!0),W(G,J,Y,``,`\\@varsubsetneqq`),W(G,J,Y,`≯`,`\\ngtr`,!0),W(G,J,Y,``,`\\@ngeqslant`),W(G,J,Y,``,`\\@ngeqq`),W(G,J,Y,`⪈`,`\\gneq`,!0),W(G,J,Y,`≩`,`\\gneqq`,!0),W(G,J,Y,``,`\\@gvertneqq`),W(G,J,Y,`⋧`,`\\gnsim`,!0),W(G,J,Y,`⪊`,`\\gnapprox`,!0),W(G,J,Y,`⊁`,`\\nsucc`,!0),W(G,J,Y,`⋡`,`\\nsucceq`,!0),W(G,J,Y,`⋩`,`\\succnsim`,!0),W(G,J,Y,`⪺`,`\\succnapprox`,!0),W(G,J,Y,`≆`,`\\ncong`,!0),W(G,J,Y,``,`\\@nshortparallel`),W(G,J,Y,`∦`,`\\nparallel`,!0),W(G,J,Y,`⊯`,`\\nVDash`,!0),W(G,J,Y,`⋫`,`\\ntriangleright`),W(G,J,Y,`⋭`,`\\ntrianglerighteq`,!0),W(G,J,Y,``,`\\@nsupseteqq`),W(G,J,Y,`⊋`,`\\supsetneq`,!0),W(G,J,Y,``,`\\@varsupsetneq`),W(G,J,Y,`⫌`,`\\supsetneqq`,!0),W(G,J,Y,``,`\\@varsupsetneqq`),W(G,J,Y,`⊮`,`\\nVdash`,!0),W(G,J,Y,`⪵`,`\\precneqq`,!0),W(G,J,Y,`⪶`,`\\succneqq`,!0),W(G,J,Y,``,`\\@nsubseteqq`),W(G,J,$g,`⊴`,`\\unlhd`),W(G,J,$g,`⊵`,`\\unrhd`),W(G,J,Y,`↚`,`\\nleftarrow`,!0),W(G,J,Y,`↛`,`\\nrightarrow`,!0),W(G,J,Y,`⇍`,`\\nLeftarrow`,!0),W(G,J,Y,`⇏`,`\\nRightarrow`,!0),W(G,J,Y,`↮`,`\\nleftrightarrow`,!0),W(G,J,Y,`⇎`,`\\nLeftrightarrow`,!0),W(G,J,Y,`△`,`\\vartriangle`),W(G,J,X,`ℏ`,`\\hslash`),W(G,J,X,`▽`,`\\triangledown`),W(G,J,X,`◊`,`\\lozenge`),W(G,J,X,`Ⓢ`,`\\circledS`),W(G,J,X,`®`,`\\circledR`),W(K,J,X,`®`,`\\circledR`),W(G,J,X,`∡`,`\\measuredangle`,!0),W(G,J,X,`∄`,`\\nexists`),W(G,J,X,`℧`,`\\mho`),W(G,J,X,`Ⅎ`,`\\Finv`,!0),W(G,J,X,`⅁`,`\\Game`,!0),W(G,J,X,`‵`,`\\backprime`),W(G,J,X,`▲`,`\\blacktriangle`),W(G,J,X,`▼`,`\\blacktriangledown`),W(G,J,X,`■`,`\\blacksquare`),W(G,J,X,`⧫`,`\\blacklozenge`),W(G,J,X,`★`,`\\bigstar`),W(G,J,X,`∢`,`\\sphericalangle`,!0),W(G,J,X,`∁`,`\\complement`,!0),W(G,J,X,`ð`,`\\eth`,!0),W(K,q,X,`ð`,`ð`),W(G,J,X,`╱`,`\\diagup`),W(G,J,X,`╲`,`\\diagdown`),W(G,J,X,`□`,`\\square`),W(G,J,X,`□`,`\\Box`),W(G,J,X,`◊`,`\\Diamond`),W(G,J,X,`¥`,`\\yen`,!0),W(K,J,X,`¥`,`\\yen`,!0),W(G,J,X,`✓`,`\\checkmark`,!0),W(K,J,X,`✓`,`\\checkmark`),W(G,J,X,`ℶ`,`\\beth`,!0),W(G,J,X,`ℸ`,`\\daleth`,!0),W(G,J,X,`ℷ`,`\\gimel`,!0),W(G,J,X,`ϝ`,`\\digamma`,!0),W(G,J,X,`ϰ`,`\\varkappa`),W(G,J,i_,`┌`,`\\@ulcorner`,!0),W(G,J,e_,`┐`,`\\@urcorner`,!0),W(G,J,i_,`└`,`\\@llcorner`,!0),W(G,J,e_,`┘`,`\\@lrcorner`,!0),W(G,J,Y,`≦`,`\\leqq`,!0),W(G,J,Y,`⩽`,`\\leqslant`,!0),W(G,J,Y,`⪕`,`\\eqslantless`,!0),W(G,J,Y,`≲`,`\\lesssim`,!0),W(G,J,Y,`⪅`,`\\lessapprox`,!0),W(G,J,Y,`≊`,`\\approxeq`,!0),W(G,J,$g,`⋖`,`\\lessdot`),W(G,J,Y,`⋘`,`\\lll`,!0),W(G,J,Y,`≶`,`\\lessgtr`,!0),W(G,J,Y,`⋚`,`\\lesseqgtr`,!0),W(G,J,Y,`⪋`,`\\lesseqqgtr`,!0),W(G,J,Y,`≑`,`\\doteqdot`),W(G,J,Y,`≓`,`\\risingdotseq`,!0),W(G,J,Y,`≒`,`\\fallingdotseq`,!0),W(G,J,Y,`∽`,`\\backsim`,!0),W(G,J,Y,`⋍`,`\\backsimeq`,!0),W(G,J,Y,`⫅`,`\\subseteqq`,!0),W(G,J,Y,`⋐`,`\\Subset`,!0),W(G,J,Y,`⊏`,`\\sqsubset`,!0),W(G,J,Y,`≼`,`\\preccurlyeq`,!0),W(G,J,Y,`⋞`,`\\curlyeqprec`,!0),W(G,J,Y,`≾`,`\\precsim`,!0),W(G,J,Y,`⪷`,`\\precapprox`,!0),W(G,J,Y,`⊲`,`\\vartriangleleft`),W(G,J,Y,`⊴`,`\\trianglelefteq`),W(G,J,Y,`⊨`,`\\vDash`,!0),W(G,J,Y,`⊪`,`\\Vvdash`,!0),W(G,J,Y,`⌣`,`\\smallsmile`),W(G,J,Y,`⌢`,`\\smallfrown`),W(G,J,Y,`≏`,`\\bumpeq`,!0),W(G,J,Y,`≎`,`\\Bumpeq`,!0),W(G,J,Y,`≧`,`\\geqq`,!0),W(G,J,Y,`⩾`,`\\geqslant`,!0),W(G,J,Y,`⪖`,`\\eqslantgtr`,!0),W(G,J,Y,`≳`,`\\gtrsim`,!0),W(G,J,Y,`⪆`,`\\gtrapprox`,!0),W(G,J,$g,`⋗`,`\\gtrdot`),W(G,J,Y,`⋙`,`\\ggg`,!0),W(G,J,Y,`≷`,`\\gtrless`,!0),W(G,J,Y,`⋛`,`\\gtreqless`,!0),W(G,J,Y,`⪌`,`\\gtreqqless`,!0),W(G,J,Y,`≖`,`\\eqcirc`,!0),W(G,J,Y,`≗`,`\\circeq`,!0),W(G,J,Y,`≜`,`\\triangleq`,!0),W(G,J,Y,`∼`,`\\thicksim`),W(G,J,Y,`≈`,`\\thickapprox`),W(G,J,Y,`⫆`,`\\supseteqq`,!0),W(G,J,Y,`⋑`,`\\Supset`,!0),W(G,J,Y,`⊐`,`\\sqsupset`,!0),W(G,J,Y,`≽`,`\\succcurlyeq`,!0),W(G,J,Y,`⋟`,`\\curlyeqsucc`,!0),W(G,J,Y,`≿`,`\\succsim`,!0),W(G,J,Y,`⪸`,`\\succapprox`,!0),W(G,J,Y,`⊳`,`\\vartriangleright`),W(G,J,Y,`⊵`,`\\trianglerighteq`),W(G,J,Y,`⊩`,`\\Vdash`,!0),W(G,J,Y,`∣`,`\\shortmid`),W(G,J,Y,`∥`,`\\shortparallel`),W(G,J,Y,`≬`,`\\between`,!0),W(G,J,Y,`⋔`,`\\pitchfork`,!0),W(G,J,Y,`∝`,`\\varpropto`),W(G,J,Y,`◀`,`\\blacktriangleleft`),W(G,J,Y,`∴`,`\\therefore`,!0),W(G,J,Y,`∍`,`\\backepsilon`),W(G,J,Y,`▶`,`\\blacktriangleright`),W(G,J,Y,`∵`,`\\because`,!0),W(G,J,Y,`⋘`,`\\llless`),W(G,J,Y,`⋙`,`\\gggtr`),W(G,J,$g,`⊲`,`\\lhd`),W(G,J,$g,`⊳`,`\\rhd`),W(G,J,Y,`≂`,`\\eqsim`,!0),W(G,q,Y,`⋈`,`\\Join`),W(G,J,Y,`≑`,`\\Doteq`,!0),W(G,J,$g,`∔`,`\\dotplus`,!0),W(G,J,$g,`∖`,`\\smallsetminus`),W(G,J,$g,`⋒`,`\\Cap`,!0),W(G,J,$g,`⋓`,`\\Cup`,!0),W(G,J,$g,`⩞`,`\\doublebarwedge`,!0),W(G,J,$g,`⊟`,`\\boxminus`,!0),W(G,J,$g,`⊞`,`\\boxplus`,!0),W(G,J,$g,`⋇`,`\\divideontimes`,!0),W(G,J,$g,`⋉`,`\\ltimes`,!0),W(G,J,$g,`⋊`,`\\rtimes`,!0),W(G,J,$g,`⋋`,`\\leftthreetimes`,!0),W(G,J,$g,`⋌`,`\\rightthreetimes`,!0),W(G,J,$g,`⋏`,`\\curlywedge`,!0),W(G,J,$g,`⋎`,`\\curlyvee`,!0),W(G,J,$g,`⊝`,`\\circleddash`,!0),W(G,J,$g,`⊛`,`\\circledast`,!0),W(G,J,$g,`⋅`,`\\centerdot`),W(G,J,$g,`⊺`,`\\intercal`,!0),W(G,J,$g,`⋒`,`\\doublecap`),W(G,J,$g,`⋓`,`\\doublecup`),W(G,J,$g,`⊠`,`\\boxtimes`,!0),W(G,J,Y,`⇢`,`\\dashrightarrow`,!0),W(G,J,Y,`⇠`,`\\dashleftarrow`,!0),W(G,J,Y,`⇇`,`\\leftleftarrows`,!0),W(G,J,Y,`⇆`,`\\leftrightarrows`,!0),W(G,J,Y,`⇚`,`\\Lleftarrow`,!0),W(G,J,Y,`↞`,`\\twoheadleftarrow`,!0),W(G,J,Y,`↢`,`\\leftarrowtail`,!0),W(G,J,Y,`↫`,`\\looparrowleft`,!0),W(G,J,Y,`⇋`,`\\leftrightharpoons`,!0),W(G,J,Y,`↶`,`\\curvearrowleft`,!0),W(G,J,Y,`↺`,`\\circlearrowleft`,!0),W(G,J,Y,`↰`,`\\Lsh`,!0),W(G,J,Y,`⇈`,`\\upuparrows`,!0),W(G,J,Y,`↿`,`\\upharpoonleft`,!0),W(G,J,Y,`⇃`,`\\downharpoonleft`,!0),W(G,q,Y,`⊶`,`\\origof`,!0),W(G,q,Y,`⊷`,`\\imageof`,!0),W(G,J,Y,`⊸`,`\\multimap`,!0),W(G,J,Y,`↭`,`\\leftrightsquigarrow`,!0),W(G,J,Y,`⇉`,`\\rightrightarrows`,!0),W(G,J,Y,`⇄`,`\\rightleftarrows`,!0),W(G,J,Y,`↠`,`\\twoheadrightarrow`,!0),W(G,J,Y,`↣`,`\\rightarrowtail`,!0),W(G,J,Y,`↬`,`\\looparrowright`,!0),W(G,J,Y,`↷`,`\\curvearrowright`,!0),W(G,J,Y,`↻`,`\\circlearrowright`,!0),W(G,J,Y,`↱`,`\\Rsh`,!0),W(G,J,Y,`⇊`,`\\downdownarrows`,!0),W(G,J,Y,`↾`,`\\upharpoonright`,!0),W(G,J,Y,`⇂`,`\\downharpoonright`,!0),W(G,J,Y,`⇝`,`\\rightsquigarrow`,!0),W(G,J,Y,`⇝`,`\\leadsto`),W(G,J,Y,`⇛`,`\\Rrightarrow`,!0),W(G,J,Y,`↾`,`\\restriction`),W(G,q,X,`‘`,"`"),W(G,q,X,`$`,`\\$`),W(K,q,X,`$`,`\\$`),W(K,q,X,`$`,`\\textdollar`),W(G,q,X,`%`,`\\%`),W(K,q,X,`%`,`\\%`),W(G,q,X,`_`,`\\_`),W(K,q,X,`_`,`\\_`),W(K,q,X,`_`,`\\textunderscore`),W(G,q,X,`∠`,`\\angle`,!0),W(G,q,X,`∞`,`\\infty`,!0),W(G,q,X,`′`,`\\prime`),W(G,q,X,`△`,`\\triangle`),W(G,q,X,`Γ`,`\\Gamma`,!0),W(G,q,X,`Δ`,`\\Delta`,!0),W(G,q,X,`Θ`,`\\Theta`,!0),W(G,q,X,`Λ`,`\\Lambda`,!0),W(G,q,X,`Ξ`,`\\Xi`,!0),W(G,q,X,`Π`,`\\Pi`,!0),W(G,q,X,`Σ`,`\\Sigma`,!0),W(G,q,X,`Υ`,`\\Upsilon`,!0),W(G,q,X,`Φ`,`\\Phi`,!0),W(G,q,X,`Ψ`,`\\Psi`,!0),W(G,q,X,`Ω`,`\\Omega`,!0),W(G,q,X,`A`,`Α`),W(G,q,X,`B`,`Β`),W(G,q,X,`E`,`Ε`),W(G,q,X,`Z`,`Ζ`),W(G,q,X,`H`,`Η`),W(G,q,X,`I`,`Ι`),W(G,q,X,`K`,`Κ`),W(G,q,X,`M`,`Μ`),W(G,q,X,`N`,`Ν`),W(G,q,X,`O`,`Ο`),W(G,q,X,`P`,`Ρ`),W(G,q,X,`T`,`Τ`),W(G,q,X,`X`,`Χ`),W(G,q,X,`¬`,`\\neg`,!0),W(G,q,X,`¬`,`\\lnot`),W(G,q,X,`⊤`,`\\top`),W(G,q,X,`⊥`,`\\bot`),W(G,q,X,`∅`,`\\emptyset`),W(G,J,X,`∅`,`\\varnothing`),W(G,q,n_,`α`,`\\alpha`,!0),W(G,q,n_,`β`,`\\beta`,!0),W(G,q,n_,`γ`,`\\gamma`,!0),W(G,q,n_,`δ`,`\\delta`,!0),W(G,q,n_,`ϵ`,`\\epsilon`,!0),W(G,q,n_,`ζ`,`\\zeta`,!0),W(G,q,n_,`η`,`\\eta`,!0),W(G,q,n_,`θ`,`\\theta`,!0),W(G,q,n_,`ι`,`\\iota`,!0),W(G,q,n_,`κ`,`\\kappa`,!0),W(G,q,n_,`λ`,`\\lambda`,!0),W(G,q,n_,`μ`,`\\mu`,!0),W(G,q,n_,`ν`,`\\nu`,!0),W(G,q,n_,`ξ`,`\\xi`,!0),W(G,q,n_,`ο`,`\\omicron`,!0),W(G,q,n_,`π`,`\\pi`,!0),W(G,q,n_,`ρ`,`\\rho`,!0),W(G,q,n_,`σ`,`\\sigma`,!0),W(G,q,n_,`τ`,`\\tau`,!0),W(G,q,n_,`υ`,`\\upsilon`,!0),W(G,q,n_,`ϕ`,`\\phi`,!0),W(G,q,n_,`χ`,`\\chi`,!0),W(G,q,n_,`ψ`,`\\psi`,!0),W(G,q,n_,`ω`,`\\omega`,!0),W(G,q,n_,`ε`,`\\varepsilon`,!0),W(G,q,n_,`ϑ`,`\\vartheta`,!0),W(G,q,n_,`ϖ`,`\\varpi`,!0),W(G,q,n_,`ϱ`,`\\varrho`,!0),W(G,q,n_,`ς`,`\\varsigma`,!0),W(G,q,n_,`φ`,`\\varphi`,!0),W(G,q,$g,`∗`,`*`,!0),W(G,q,$g,`+`,`+`),W(G,q,$g,`−`,`-`,!0),W(G,q,$g,`⋅`,`\\cdot`,!0),W(G,q,$g,`∘`,`\\circ`,!0),W(G,q,$g,`÷`,`\\div`,!0),W(G,q,$g,`±`,`\\pm`,!0),W(G,q,$g,`×`,`\\times`,!0),W(G,q,$g,`∩`,`\\cap`,!0),W(G,q,$g,`∪`,`\\cup`,!0),W(G,q,$g,`∖`,`\\setminus`,!0),W(G,q,$g,`∧`,`\\land`),W(G,q,$g,`∨`,`\\lor`),W(G,q,$g,`∧`,`\\wedge`,!0),W(G,q,$g,`∨`,`\\vee`,!0),W(G,q,X,`√`,`\\surd`),W(G,q,i_,`⟨`,`\\langle`,!0),W(G,q,i_,`∣`,`\\lvert`),W(G,q,i_,`∥`,`\\lVert`),W(G,q,e_,`?`,`?`),W(G,q,e_,`!`,`!`),W(G,q,e_,`⟩`,`\\rangle`,!0),W(G,q,e_,`∣`,`\\rvert`),W(G,q,e_,`∥`,`\\rVert`),W(G,q,Y,`=`,`=`),W(G,q,Y,`:`,`:`),W(G,q,Y,`≈`,`\\approx`,!0),W(G,q,Y,`≅`,`\\cong`,!0),W(G,q,Y,`≥`,`\\ge`),W(G,q,Y,`≥`,`\\geq`,!0),W(G,q,Y,`←`,`\\gets`),W(G,q,Y,`>`,`\\gt`,!0),W(G,q,Y,`∈`,`\\in`,!0),W(G,q,Y,``,`\\@not`),W(G,q,Y,`⊂`,`\\subset`,!0),W(G,q,Y,`⊃`,`\\supset`,!0),W(G,q,Y,`⊆`,`\\subseteq`,!0),W(G,q,Y,`⊇`,`\\supseteq`,!0),W(G,J,Y,`⊈`,`\\nsubseteq`,!0),W(G,J,Y,`⊉`,`\\nsupseteq`,!0),W(G,q,Y,`⊨`,`\\models`),W(G,q,Y,`←`,`\\leftarrow`,!0),W(G,q,Y,`≤`,`\\le`),W(G,q,Y,`≤`,`\\leq`,!0),W(G,q,Y,`<`,`\\lt`,!0),W(G,q,Y,`→`,`\\rightarrow`,!0),W(G,q,Y,`→`,`\\to`),W(G,J,Y,`≱`,`\\ngeq`,!0),W(G,J,Y,`≰`,`\\nleq`,!0),W(G,q,o_,`\xA0`,`\\ `),W(G,q,o_,`\xA0`,`\\space`),W(G,q,o_,`\xA0`,`\\nobreakspace`),W(K,q,o_,`\xA0`,`\\ `),W(K,q,o_,`\xA0`,` `),W(K,q,o_,`\xA0`,`\\space`),W(K,q,o_,`\xA0`,`\\nobreakspace`),W(G,q,o_,``,`\\nobreak`),W(G,q,o_,``,`\\allowbreak`),W(G,q,a_,`,`,`,`),W(G,q,a_,`;`,`;`),W(G,J,$g,`⊼`,`\\barwedge`,!0),W(G,J,$g,`⊻`,`\\veebar`,!0),W(G,q,$g,`⊙`,`\\odot`,!0),W(G,q,$g,`⊕`,`\\oplus`,!0),W(G,q,$g,`⊗`,`\\otimes`,!0),W(G,q,X,`∂`,`\\partial`,!0),W(G,q,$g,`⊘`,`\\oslash`,!0),W(G,J,$g,`⊚`,`\\circledcirc`,!0),W(G,J,$g,`⊡`,`\\boxdot`,!0),W(G,q,$g,`△`,`\\bigtriangleup`),W(G,q,$g,`▽`,`\\bigtriangledown`),W(G,q,$g,`†`,`\\dagger`),W(G,q,$g,`⋄`,`\\diamond`),W(G,q,$g,`⋆`,`\\star`),W(G,q,$g,`◃`,`\\triangleleft`),W(G,q,$g,`▹`,`\\triangleright`),W(G,q,i_,`{`,`\\{`),W(K,q,X,`{`,`\\{`),W(K,q,X,`{`,`\\textbraceleft`),W(G,q,e_,`}`,`\\}`),W(K,q,X,`}`,`\\}`),W(K,q,X,`}`,`\\textbraceright`),W(G,q,i_,`{`,`\\lbrace`),W(G,q,e_,`}`,`\\rbrace`),W(G,q,i_,`[`,`\\lbrack`,!0),W(K,q,X,`[`,`\\lbrack`,!0),W(G,q,e_,`]`,`\\rbrack`,!0),W(K,q,X,`]`,`\\rbrack`,!0),W(G,q,i_,`(`,`\\lparen`,!0),W(G,q,e_,`)`,`\\rparen`,!0),W(K,q,X,`<`,`\\textless`,!0),W(K,q,X,`>`,`\\textgreater`,!0),W(G,q,i_,`⌊`,`\\lfloor`,!0),W(G,q,e_,`⌋`,`\\rfloor`,!0),W(G,q,i_,`⌈`,`\\lceil`,!0),W(G,q,e_,`⌉`,`\\rceil`,!0),W(G,q,X,`\\`,`\\backslash`),W(G,q,X,`∣`,`|`),W(G,q,X,`∣`,`\\vert`),W(K,q,X,`|`,`\\textbar`,!0),W(G,q,X,`∥`,`\\|`),W(G,q,X,`∥`,`\\Vert`),W(K,q,X,`∥`,`\\textbardbl`),W(K,q,X,`~`,`\\textasciitilde`),W(K,q,X,`\\`,`\\textbackslash`),W(K,q,X,`^`,`\\textasciicircum`),W(G,q,Y,`↑`,`\\uparrow`,!0),W(G,q,Y,`⇑`,`\\Uparrow`,!0),W(G,q,Y,`↓`,`\\downarrow`,!0),W(G,q,Y,`⇓`,`\\Downarrow`,!0),W(G,q,Y,`↕`,`\\updownarrow`,!0),W(G,q,Y,`⇕`,`\\Updownarrow`,!0),W(G,q,r_,`∐`,`\\coprod`),W(G,q,r_,`⋁`,`\\bigvee`),W(G,q,r_,`⋀`,`\\bigwedge`),W(G,q,r_,`⨄`,`\\biguplus`),W(G,q,r_,`⋂`,`\\bigcap`),W(G,q,r_,`⋃`,`\\bigcup`),W(G,q,r_,`∫`,`\\int`),W(G,q,r_,`∫`,`\\intop`),W(G,q,r_,`∬`,`\\iint`),W(G,q,r_,`∭`,`\\iiint`),W(G,q,r_,`∏`,`\\prod`),W(G,q,r_,`∑`,`\\sum`),W(G,q,r_,`⨂`,`\\bigotimes`),W(G,q,r_,`⨁`,`\\bigoplus`),W(G,q,r_,`⨀`,`\\bigodot`),W(G,q,r_,`∮`,`\\oint`),W(G,q,r_,`∯`,`\\oiint`),W(G,q,r_,`∰`,`\\oiiint`),W(G,q,r_,`⨆`,`\\bigsqcup`),W(G,q,r_,`∫`,`\\smallint`),W(K,q,t_,`…`,`\\textellipsis`),W(G,q,t_,`…`,`\\mathellipsis`),W(K,q,t_,`…`,`\\ldots`,!0),W(G,q,t_,`…`,`\\ldots`,!0),W(G,q,t_,`⋯`,`\\@cdots`,!0),W(G,q,t_,`⋱`,`\\ddots`,!0),W(G,q,X,`⋮`,`\\varvdots`),W(K,q,X,`⋮`,`\\varvdots`),W(G,q,Qg,`ˊ`,`\\acute`),W(G,q,Qg,`ˋ`,`\\grave`),W(G,q,Qg,`¨`,`\\ddot`),W(G,q,Qg,`~`,`\\tilde`),W(G,q,Qg,`ˉ`,`\\bar`),W(G,q,Qg,`˘`,`\\breve`),W(G,q,Qg,`ˇ`,`\\check`),W(G,q,Qg,`^`,`\\hat`),W(G,q,Qg,`⃗`,`\\vec`),W(G,q,Qg,`˙`,`\\dot`),W(G,q,Qg,`˚`,`\\mathring`),W(G,q,n_,``,`\\@imath`),W(G,q,n_,``,`\\@jmath`),W(G,q,X,`ı`,`ı`),W(G,q,X,`ȷ`,`ȷ`),W(K,q,X,`ı`,`\\i`,!0),W(K,q,X,`ȷ`,`\\j`,!0),W(K,q,X,`ß`,`\\ss`,!0),W(K,q,X,`æ`,`\\ae`,!0),W(K,q,X,`œ`,`\\oe`,!0),W(K,q,X,`ø`,`\\o`,!0),W(K,q,X,`Æ`,`\\AE`,!0),W(K,q,X,`Œ`,`\\OE`,!0),W(K,q,X,`Ø`,`\\O`,!0),W(K,q,Qg,`ˊ`,`\\'`),W(K,q,Qg,`ˋ`,"\\`"),W(K,q,Qg,`ˆ`,`\\^`),W(K,q,Qg,`˜`,`\\~`),W(K,q,Qg,`ˉ`,`\\=`),W(K,q,Qg,`˘`,`\\u`),W(K,q,Qg,`˙`,`\\.`),W(K,q,Qg,`¸`,`\\c`),W(K,q,Qg,`˚`,`\\r`),W(K,q,Qg,`ˇ`,`\\v`),W(K,q,Qg,`¨`,`\\"`),W(K,q,Qg,`˝`,`\\H`),W(K,q,Qg,`◯`,`\\textcircled`);var s_={"--":!0,"---":!0,"``":!0,"''":!0};W(K,q,X,`–`,`--`,!0),W(K,q,X,`–`,`\\textendash`),W(K,q,X,`—`,`---`,!0),W(K,q,X,`—`,`\\textemdash`),W(K,q,X,`‘`,"`",!0),W(K,q,X,`‘`,`\\textquoteleft`),W(K,q,X,`’`,`'`,!0),W(K,q,X,`’`,`\\textquoteright`),W(K,q,X,`“`,"``",!0),W(K,q,X,`“`,`\\textquotedblleft`),W(K,q,X,`”`,`''`,!0),W(K,q,X,`”`,`\\textquotedblright`),W(G,q,X,`°`,`\\degree`,!0),W(K,q,X,`°`,`\\degree`),W(K,q,X,`°`,`\\textdegree`,!0),W(G,q,X,`£`,`\\pounds`),W(G,q,X,`£`,`\\mathsterling`,!0),W(K,q,X,`£`,`\\pounds`),W(K,q,X,`£`,`\\textsterling`,!0),W(G,J,X,`✠`,`\\maltese`),W(K,J,X,`✠`,`\\maltese`);for(var c_=`0123456789/@."`,l_=0;l_<c_.length;l_++){var u_=c_.charAt(l_);W(G,q,X,u_,u_)}for(var d_=`0123456789!@*()-=+";:?/.,`,f_=0;f_<d_.length;f_++){var p_=d_.charAt(f_);W(K,q,X,p_,p_)}for(var m_=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,h_=0;h_<m_.length;h_++){var g_=m_.charAt(h_);W(G,q,n_,g_,g_),W(K,q,X,g_,g_)}W(G,J,X,`C`,`ℂ`),W(K,J,X,`C`,`ℂ`),W(G,J,X,`H`,`ℍ`),W(K,J,X,`H`,`ℍ`),W(G,J,X,`N`,`ℕ`),W(K,J,X,`N`,`ℕ`),W(G,J,X,`P`,`ℙ`),W(K,J,X,`P`,`ℙ`),W(G,J,X,`Q`,`ℚ`),W(K,J,X,`Q`,`ℚ`),W(G,J,X,`R`,`ℝ`),W(K,J,X,`R`,`ℝ`),W(G,J,X,`Z`,`ℤ`),W(K,J,X,`Z`,`ℤ`),W(G,q,n_,`h`,`ℎ`),W(K,q,n_,`h`,`ℎ`);for(var __,v_=0;v_<m_.length;v_++){var y_=m_.charAt(v_);__=String.fromCharCode(55349,56320+v_),W(G,q,n_,y_,__),W(K,q,X,y_,__),__=String.fromCharCode(55349,56372+v_),W(G,q,n_,y_,__),W(K,q,X,y_,__),__=String.fromCharCode(55349,56424+v_),W(G,q,n_,y_,__),W(K,q,X,y_,__),__=String.fromCharCode(55349,56580+v_),W(G,q,n_,y_,__),W(K,q,X,y_,__),__=String.fromCharCode(55349,56684+v_),W(G,q,n_,y_,__),W(K,q,X,y_,__),__=String.fromCharCode(55349,56736+v_),W(G,q,n_,y_,__),W(K,q,X,y_,__),__=String.fromCharCode(55349,56788+v_),W(G,q,n_,y_,__),W(K,q,X,y_,__),__=String.fromCharCode(55349,56840+v_),W(G,q,n_,y_,__),W(K,q,X,y_,__),__=String.fromCharCode(55349,56944+v_),W(G,q,n_,y_,__),W(K,q,X,y_,__),v_<26&&(__=String.fromCharCode(55349,56632+v_),W(G,q,n_,y_,__),W(K,q,X,y_,__),__=String.fromCharCode(55349,56476+v_),W(G,q,n_,y_,__),W(K,q,X,y_,__))}__=String.fromCharCode(55349,56668),W(G,q,n_,`k`,__),W(K,q,X,`k`,__);for(var b_=0;b_<10;b_++){var x_=b_.toString();__=String.fromCharCode(55349,57294+b_),W(G,q,n_,x_,__),W(K,q,X,x_,__),__=String.fromCharCode(55349,57314+b_),W(G,q,n_,x_,__),W(K,q,X,x_,__),__=String.fromCharCode(55349,57324+b_),W(G,q,n_,x_,__),W(K,q,X,x_,__),__=String.fromCharCode(55349,57334+b_),W(G,q,n_,x_,__),W(K,q,X,x_,__)}for(var S_=`ÐÞþ`,C_=0;C_<S_.length;C_++){var w_=S_.charAt(C_);W(G,q,n_,w_,w_),W(K,q,X,w_,w_)}var T_={mathClass:`mathbf`,textClass:`textbf`,font:`Main-Bold`},E_={mathClass:`mathnormal`,textClass:`textit`,font:`Math-Italic`},D_={mathClass:`boldsymbol`,textClass:`boldsymbol`,font:`Main-BoldItalic`},O_={mathClass:`mathscr`,textClass:`textscr`,font:`Script-Regular`},k_={mathClass:``,textClass:``,font:``},A_={mathClass:`mathfrak`,textClass:`textfrak`,font:`Fraktur-Regular`},j_={mathClass:`mathbb`,textClass:`textbb`,font:`AMS-Regular`},M_={mathClass:`mathboldfrak`,textClass:`textboldfrak`,font:`Fraktur-Regular`},N_={mathClass:`mathsf`,textClass:`textsf`,font:`SansSerif-Regular`},P_={mathClass:`mathboldsf`,textClass:`textboldsf`,font:`SansSerif-Bold`},F_={mathClass:`mathitsf`,textClass:`textitsf`,font:`SansSerif-Italic`},I_={mathClass:`mathtt`,textClass:`texttt`,font:`Typewriter-Regular`},L_=[T_,T_,E_,E_,D_,D_,O_,k_,k_,k_,A_,A_,j_,j_,M_,M_,N_,N_,P_,P_,F_,F_,k_,k_,I_,I_],R_=[T_,k_,N_,P_,I_],z_=e=>{var t=e.charCodeAt(0),n=e.charCodeAt(1),r=(t-55296)*1024+(n-56320)+65536;if(119808<=r&&r<120484)return L_[Math.floor((r-119808)/26)];if(120782<=r&&r<=120831)return R_[Math.floor((r-120782)/10)];if(r===120485||r===120486)return L_[0];if(120486<r&&r<120782)return k_;throw new H(`Unsupported character: `+e)},B_=function(e,t,n){if(Zg[n][e]){var r=Zg[n][e].replace;r&&(e=r)}return{value:e,metrics:Jg(e,t,n)}},V_=function(e,t,n,r,i){var a=B_(e,t,n),o=a.metrics;e=a.value;var s;if(o){var c=o.italic;(n===`text`||r&&r.font===`mathit`)&&(c=0),s=new Lg(e,o.height,o.depth,c,o.skew,o.width,i)}else typeof console<`u`&&console.warn(`No character metrics `+(`for '`+e+`' in style '`+t+`' and mode '`+n+`'`)),s=new Lg(e,0,0,0,0,0,i);if(r){s.maxFontSize=r.sizeMultiplier,r.style.isTight()&&s.classes.push(`mtight`);var l=r.getColor();l&&(s.style.color=l)}return s},H_=function(e,t,n,r){return r===void 0&&(r=[]),n.font===`boldsymbol`&&B_(e,`Main-Bold`,t).metrics?V_(e,`Main-Bold`,t,n,r.concat([`mathbf`])):e===`\\`||Zg[t][e].font===`main`?V_(e,`Main-Regular`,t,n,r):V_(e,`AMS-Regular`,t,n,r.concat([`amsrm`]))},U_=function(e,t,n){return n!==`textord`&&B_(e,`Math-BoldItalic`,t).metrics?{fontName:`Math-BoldItalic`,fontClass:`boldsymbol`}:{fontName:`Main-Bold`,fontClass:`mathbf`}},W_=function(e,t,n){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=``;if(i.charCodeAt(0)===55349){var m=z_(i);f=m.font,p=m[r+`Class`]}if(f)return V_(i,f,r,t,a.concat(p));if(d){var h,g;if(d===`boldsymbol`){var _=U_(i,r,n);h=_.fontName,g=[_.fontClass]}else u?(h=rv[o].fontName,g=[o]):(h=nv(s,c,l),g=[s,c,l]);if(B_(i,h,r).metrics)return V_(i,h,r,t,a.concat(g));if(s_.hasOwnProperty(i)&&h.slice(0,10)===`Typewriter`){for(var v=[],y=0;y<i.length;y++)v.push(V_(i[y],h,r,t,a.concat(g)));return Z_(v)}}if(n===`mathord`)return V_(i,`Math-Italic`,r,t,a.concat([`mathnormal`]));if(n===`textord`){var b=Zg[r][i]&&Zg[r][i].font;if(b===`ams`)return V_(i,nv(`amsrm`,c,l),r,t,a.concat(`amsrm`,c,l));if(b===`main`||!b)return V_(i,nv(`textrm`,c,l),r,t,a.concat(c,l));var x=nv(b,c,l);return V_(i,x,r,t,a.concat(x,c,l))}else throw Error(`unexpected type: `+n+` in makeOrd`)},G_=(e,t)=>{if(Dg(e.classes)!==Dg(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass(`mathnormal`))return!1;if(e.classes.length===1){var n=e.classes[0];if(n===`mbin`||n===`mord`)return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},K_=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof Lg&&r instanceof Lg&&G_(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e},q_=function(e){for(var t=0,n=0,r=0,i=0;i<e.children.length;i++){var a=e.children[i];a.height>t&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},Z=function(e,t,n,r){var i=new Ng(e,t,n,r);return q_(i),i},J_=(e,t,n,r)=>new Ng(e,t,n,r),Y_=function(e,t,n){var r=Z([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=U(r.height),r.maxFontSize=1,r},X_=function(e,t,n,r){var i=new Pg(e,t,n,r);return q_(i),i},Z_=function(e){var t=new Sg(e);return q_(t),t},Q_=function(e,t){return e instanceof Sg?Z([],[e],t):e},$_=function(e){if(e.positionType===`individualShift`){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,a=1;a<t.length;a++){var o=-t[a].shift-i-t[a].elem.depth,s=o-(t[a-1].elem.height+t[a-1].elem.depth);i+=o,n.push({type:`kern`,size:s}),n.push(t[a])}return{children:n,depth:r}}var c;if(e.positionType===`top`){for(var l=e.positionData,u=0;u<e.children.length;u++){var d=e.children[u];l-=d.type===`kern`?d.size:d.elem.height+d.elem.depth}c=l}else if(e.positionType===`bottom`)c=-e.positionData;else{var f=e.children[0];if(f.type!==`elem`)throw Error(`First child must have type "elem".`);if(e.positionType===`shift`)c=-f.elem.depth-e.positionData;else if(e.positionType===`firstBaseline`)c=-f.elem.depth;else throw Error(`Invalid positionType `+e.positionType+`.`)}return{children:e.children,depth:c}},ev=function(e,t){for(var{children:n,depth:r}=$_(e),i=0,a=0;a<n.length;a++){var o=n[a];if(o.type===`elem`){var s=o.elem;i=Math.max(i,s.maxFontSize,s.height)}}i+=2;var c=Z([`pstrut`],[]);c.style.height=U(i);for(var l=[],u=r,d=r,f=r,p=0;p<n.length;p++){var m=n[p];if(m.type===`kern`)f+=m.size;else{var h=m.elem,g=m.wrapperClasses||[],_=m.wrapperStyle||{},v=Z(g,[c,h],void 0,_);v.style.top=U(-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}u=Math.min(u,f),d=Math.max(d,f)}var y=Z([`vlist`],l);y.style.height=U(d);var b;if(u<0){var x=Z([`vlist`],[Z([],[])]);x.style.height=U(-u),b=[Z([`vlist-r`],[y,Z([`vlist-s`],[new Lg(`​`)])]),Z([`vlist-r`],[x])]}else b=[Z([`vlist-r`],[y])];var S=Z([`vlist-t`],b);return b.length===2&&S.classes.push(`vlist-t2`),S.height=d,S.depth=-u,S},tv=(e,t)=>{var n=Z([`mspace`],[],t),r=Eg(e,t);return n.style.marginRight=U(r),n},nv=(e,t,n)=>{var r,i;switch(e){case`amsrm`:r=`AMS`;break;case`textrm`:r=`Main`;break;case`textsf`:r=`SansSerif`;break;case`texttt`:r=`Typewriter`;break;default:r=e}return i=t===`textbf`&&n===`textit`?`BoldItalic`:t===`textbf`?`Bold`:n===`textit`?`Italic`:`Regular`,r+`-`+i},rv={mathbf:{variant:`bold`,fontName:`Main-Bold`},mathrm:{variant:`normal`,fontName:`Main-Regular`},textit:{variant:`italic`,fontName:`Main-Italic`},mathit:{variant:`italic`,fontName:`Main-Italic`},mathnormal:{variant:`italic`,fontName:`Math-Italic`},mathsfit:{variant:`sans-serif-italic`,fontName:`SansSerif-Italic`},mathbb:{variant:`double-struck`,fontName:`AMS-Regular`},mathcal:{variant:`script`,fontName:`Caligraphic-Regular`},mathfrak:{variant:`fraktur`,fontName:`Fraktur-Regular`},mathscr:{variant:`script`,fontName:`Script-Regular`},mathsf:{variant:`sans-serif`,fontName:`SansSerif-Regular`},mathtt:{variant:`monospace`,fontName:`Typewriter-Regular`}},iv={vec:[`vec`,.471,.714],oiintSize1:[`oiintSize1`,.957,.499],oiintSize2:[`oiintSize2`,1.472,.659],oiiintSize1:[`oiiintSize1`,1.304,.499],oiiintSize2:[`oiiintSize2`,1.98,.659]},av=function(e,t){var[n,r,i]=iv[e],a=J_([`overlay`],[new Rg([new zg(n)],{width:U(r),height:U(i),style:`width:`+U(r),viewBox:`0 0 `+1e3*r+` `+1e3*i,preserveAspectRatio:`xMinYMin`})],t);return a.height=i,a.style.height=U(i),a.style.width=U(r),a},ov={number:3,unit:`mu`},sv={number:4,unit:`mu`},cv={number:5,unit:`mu`},lv={mord:{mop:ov,mbin:sv,mrel:cv,minner:ov},mop:{mord:ov,mop:ov,mrel:cv,minner:ov},mbin:{mord:sv,mop:sv,mopen:sv,minner:sv},mrel:{mord:cv,mop:cv,mopen:cv,minner:cv},mopen:{},mclose:{mop:ov,mbin:sv,mrel:cv,minner:ov},mpunct:{mord:ov,mop:ov,mrel:cv,mopen:ov,mclose:ov,mpunct:ov,minner:ov},minner:{mord:ov,mop:ov,mbin:sv,mrel:cv,mopen:ov,mpunct:ov,minner:ov}},uv={mord:{mop:ov},mop:{mord:ov,mop:ov},mbin:{},mrel:{},mopen:{},mclose:{mop:ov},mpunct:{},minner:{mop:ov}},dv={},fv={},pv={};function mv(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},c=0;c<n.length;++c)dv[n[c]]=s;t&&(a&&(fv[t]=a),o&&(pv[t]=o))}function hv(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;mv({type:t,names:[],props:{numArgs:0},handler(){throw Error(`Should never be called.`)},htmlBuilder:n,mathmlBuilder:r})}var gv=function(e){return e.type===`ordgroup`&&e.body.length===1?e.body[0]:e},_v=function(e){return e.type===`ordgroup`?e.body:[e]},vv=new Set([`leftmost`,`mbin`,`mopen`,`mrel`,`mop`,`mpunct`]),yv=new Set([`rightmost`,`mrel`,`mclose`,`mpunct`]),bv={display:rg.DISPLAY,text:rg.TEXT,script:rg.SCRIPT,scriptscript:rg.SCRIPTSCRIPT},xv={mord:`mord`,mop:`mop`,mbin:`mbin`,mrel:`mrel`,mopen:`mopen`,mclose:`mclose`,mpunct:`mpunct`,minner:`minner`},Sv=function(e,t,n,r){r===void 0&&(r=[null,null]);for(var i=[],a=0;a<e.length;a++){var o=Ov(e[a],t);if(o instanceof Sg){var s=o.children;i.push(...s)}else i.push(o)}if(K_(i),!n)return i;var c=t;if(e.length===1){var l=e[0];l.type===`sizing`?c=t.havingSize(l.size):l.type===`styling`&&(c=t.havingStyle(bv[l.style]))}var u=Z([r[0]||`leftmost`],[],t),d=Z([r[1]||`rightmost`],[],t),f=n===`root`;return Cv(i,(e,t)=>{var n=t.classes[0],r=e.classes[0];n===`mbin`&&yv.has(r)?t.classes[0]=`mord`:r===`mbin`&&vv.has(n)&&(e.classes[0]=`mord`)},{node:u},d,f),Cv(i,(e,t)=>{var n=Ev(t),r=Ev(e),i=n&&r?e.hasClass(`mtight`)?uv[n]?.[r]:lv[n]?.[r]:null;if(i)return tv(i,c)},{node:u},d,f),i},Cv=function(e,t,n,r,i){r&&e.push(r);for(var a=0;a<e.length;a++){var o=e[a],s=wv(o);if(s){Cv(s.children,t,n,null,i);continue}var c=!o.hasClass(`mspace`);if(c){var l=t(o,n.node);l&&(n.insertAfter?n.insertAfter(l):(e.unshift(l),a++))}c?n.node=o:i&&o.hasClass(`newline`)&&(n.node=Z([`leftmost`])),n.insertAfter=(t=>n=>{e.splice(t+1,0,n),a++})(a)}r&&e.pop()},wv=function(e){return e instanceof Sg||e instanceof Pg||e instanceof Ng&&e.hasClass(`enclosing`)?e:null},Tv=function(e,t){var n=wv(e);if(n){var r=n.children;if(r.length){if(t===`right`)return Tv(r[r.length-1],`right`);if(t===`left`)return Tv(r[0],`left`)}}return e},Ev=function(e,t){return e?(t&&(e=Tv(e,t)),xv[e.classes[0]]||null):null},Dv=function(e,t){var n=[`nulldelimiter`].concat(e.baseSizingClasses());return Z(t.concat(n))},Ov=function(e,t,n){if(!e)return Z();if(fv[e.type]){var r=fv[e.type](e,t);if(n&&t.size!==n.size){r=Z(t.sizingClasses(n),[r],t);var i=t.sizeMultiplier/n.sizeMultiplier;r.height*=i,r.depth*=i}return r}else throw new H(`Got group of unknown type: '`+e.type+`'`)};function kv(e,t){var n=Z([`base`],e,t),r=Z([`strut`]);return r.style.height=U(n.height+n.depth),n.depth&&(r.style.verticalAlign=U(-n.depth)),n.children.unshift(r),n}function Av(e,t){var n=null;e.length===1&&e[0].type===`tag`&&(n=e[0].tag,e=e[0].body);var r=Sv(e,t,`root`),i;r.length===2&&r[1].hasClass(`tag`)&&(i=r.pop());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`)){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);c||(a.push(kv(o,t)),o=[])}else r[s].hasClass(`newline`)&&(o.pop(),o.length>0&&(a.push(kv(o,t)),o=[]),a.push(r[s]));o.length>0&&a.push(kv(o,t));var l;n?(l=kv(Sv(n,t,!0),t),l.classes=[`tag`],a.push(l)):i&&a.push(i);var u=Z([`katex-html`],a);if(u.setAttribute(`aria-hidden`,`true`),l){var d=l.children[0];d.style.height=U(u.height+u.depth),u.depth&&(d.style.verticalAlign=U(-u.depth))}return u}function jv(e){return new Sg(e)}var Q=class{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=Dg(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof Mv&&this.children[n+1]instanceof Mv){for(var r=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof Mv;)r+=this.children[++n].toText();e.appendChild(new Mv(r).toNode())}else e.appendChild(this.children[n].toNode());return e}toMarkup(){var e=`<`+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=` `+t+`="`,e+=jh(this.attributes[t]),e+=`"`);this.classes.length>0&&(e+=` class ="`+jh(Dg(this.classes))+`"`),e+=`>`;for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+=`</`+this.type+`>`,e}toText(){return this.children.map(e=>e.toText()).join(``)}},Mv=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return jh(this.toText())}toText(){return this.text}},Nv=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character=` `:e>=.1666&&e<=.1667?this.character=` `:e>=.2222&&e<=.2223?this.character=` `:e>=.2777&&e<=.2778?this.character=`  `:e>=-.05556&&e<=-.05555?this.character=` ⁣`:e>=-.1667&&e<=-.1666?this.character=` ⁣`:e>=-.2223&&e<=-.2222?this.character=` ⁣`:e>=-.2778&&e<=-.2777?this.character=` ⁣`:this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`mspace`);return e.setAttribute(`width`,U(this.width)),e}toMarkup(){return this.character?`<mtext>`+this.character+`</mtext>`:`<mspace width="`+U(this.width)+`"/>`}toText(){return this.character?this.character:` `}},Pv=new Set([`\\imath`,`\\jmath`]),Fv=new Set([`mrow`,`mtable`]),Iv=function(e,t,n){return Zg[t][e]&&Zg[t][e].replace&&e.charCodeAt(0)!==55349&&!(s_.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)===`tt`||n.font&&n.font.slice(4,6)===`tt`))&&(e=Zg[t][e].replace),new Mv(e)},Lv=function(e){return e.length===1?e[0]:new Q(`mrow`,e)},Rv={mathit:`italic`,boldsymbol:e=>e.type===`textord`?`bold`:`bold-italic`,mathbf:`bold`,mathbb:`double-struck`,mathsfit:`sans-serif-italic`,mathfrak:`fraktur`,mathscr:`script`,mathcal:`script`,mathsf:`sans-serif`,mathtt:`monospace`},zv=(e,t)=>{if(e.mode===`text`){if(t.fontFamily===`texttt`)return`monospace`;if(t.fontFamily===`textsf`)return t.fontShape===`textit`&&t.fontWeight===`textbf`?`sans-serif-bold-italic`:t.fontShape===`textit`?`sans-serif-italic`:t.fontWeight===`textbf`?`bold-sans-serif`:`sans-serif`;if(t.fontShape===`textit`&&t.fontWeight===`textbf`)return`bold-italic`;if(t.fontShape===`textit`)return`italic`;if(t.fontWeight===`textbf`)return`bold`}var n=t.font;if(!n||n===`mathnormal`)return null;var r=e.mode,i=Rv[n];if(i)return typeof i==`function`?i(e):i;var a=e.text;if(Pv.has(a))return null;if(Zg[r][a]){var o=Zg[r][a].replace;o&&(a=o)}var s=rv[n].fontName;return Jg(a,s,r)?rv[n].variant:null};function Bv(e){if(!e)return!1;if(e.type===`mi`&&e.children.length===1){var t=e.children[0];return t instanceof Mv&&t.text===`.`}else if(e.type===`mo`&&e.children.length===1&&e.getAttribute(`separator`)===`true`&&e.getAttribute(`lspace`)===`0em`&&e.getAttribute(`rspace`)===`0em`){var n=e.children[0];return n instanceof Mv&&n.text===`,`}else return!1}var Vv=function(e,t,n){if(e.length===1){var r=Uv(e[0],t);return n&&r instanceof Q&&r.type===`mo`&&(r.setAttribute(`lspace`,`0em`),r.setAttribute(`rspace`,`0em`)),[r]}for(var i=[],a,o=0;o<e.length;o++){var s=Uv(e[o],t);if(s instanceof Q&&a instanceof Q){if(s.type===`mtext`&&a.type===`mtext`&&s.getAttribute(`mathvariant`)===a.getAttribute(`mathvariant`)){a.children.push(...s.children);continue}else if(s.type===`mn`&&a.type===`mn`){a.children.push(...s.children);continue}else if(Bv(s)&&a.type===`mn`){a.children.push(...s.children);continue}else if(s.type===`mn`&&Bv(a))s.children=[...a.children,...s.children],i.pop();else if((s.type===`msup`||s.type===`msub`)&&s.children.length>=1&&(a.type===`mn`||Bv(a))){var c=s.children[0];c instanceof Q&&c.type===`mn`&&(c.children=[...a.children,...c.children],i.pop())}else if(a.type===`mi`&&a.children.length===1){var l=a.children[0];if(l instanceof Mv&&l.text===`̸`&&(s.type===`mo`||s.type===`mi`||s.type===`mn`)){var u=s.children[0];u instanceof Mv&&u.text.length>0&&(u.text=u.text.slice(0,1)+`̸`+u.text.slice(1),i.pop())}}}i.push(s),a=s}return i},Hv=function(e,t,n){return Lv(Vv(e,t,n))},Uv=function(e,t){if(!e)return new Q(`mrow`);if(pv[e.type])return pv[e.type](e,t);throw new H(`Got group of unknown type: '`+e.type+`'`)};function Wv(e,t,n,r,i){var a=Vv(e,n),o=a.length===1&&a[0]instanceof Q&&Fv.has(a[0].type)?a[0]:new Q(`mrow`,a),s=new Q(`annotation`,[new Mv(t)]);s.setAttribute(`encoding`,`application/x-tex`);var c=new Q(`math`,[new Q(`semantics`,[o,s])]);return c.setAttribute(`xmlns`,`http://www.w3.org/1998/Math/MathML`),r&&c.setAttribute(`display`,`block`),Z([i?`katex`:`katex-mathml`],[c])}var Gv=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Kv=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],qv=function(e,t){return t.size<2?e:Gv[e-1][t.size-1]},Jv=class e{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||``,this.fontFamily=t.fontFamily||``,this.fontWeight=t.fontWeight||``,this.fontShape=t.fontShape||``,this.sizeMultiplier=Kv[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(n,t),new e(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:qv(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Kv[e-1]})}havingBaseStyle(t){t||=this.style.text();var n=qv(e.BASESIZE,t);return this.size===n&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:``})}withTextFontWeight(e){return this.extend({fontWeight:e,font:``})}withTextFontShape(e){return this.extend({fontShape:e,font:``})}sizingClasses(e){return e.size===this.size?[]:[`sizing`,`reset-size`+e.size,`size`+this.size]}baseSizingClasses(){return this.size===e.BASESIZE?[]:[`sizing`,`reset-size`+this.size,`size`+e.BASESIZE]}fontMetrics(){return this._fontMetrics||=Xg(this.size),this._fontMetrics}getColor(){return this.phantom?`transparent`:this.color}};Jv.BASESIZE=6;var Yv=function(e){return new Jv({style:e.displayMode?rg.DISPLAY:rg.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Xv=function(e,t){if(t.displayMode){var n=[`katex-display`];t.leqno&&n.push(`leqno`),t.fleqn&&n.push(`fleqn`),e=Z(n,[e])}return e},Zv=function(e,t,n){var r=Yv(n),i;return n.output===`mathml`?Wv(e,t,r,n.displayMode,!0):(i=n.output===`html`?Z([`katex`],[Av(e,r)]):Z([`katex`],[Wv(e,t,r,n.displayMode,!1),Av(e,r)]),Xv(i,n))},Qv=function(e,t,n){return Xv(Z([`katex`],[Av(e,Yv(n))]),n)},$v={widehat:`^`,widecheck:`ˇ`,widetilde:`~`,utilde:`~`,overleftarrow:`←`,underleftarrow:`←`,xleftarrow:`←`,overrightarrow:`→`,underrightarrow:`→`,xrightarrow:`→`,underbrace:`⏟`,overbrace:`⏞`,underbracket:`⎵`,overbracket:`⎴`,overgroup:`⏠`,undergroup:`⏡`,overleftrightarrow:`↔`,underleftrightarrow:`↔`,xleftrightarrow:`↔`,Overrightarrow:`⇒`,xRightarrow:`⇒`,overleftharpoon:`↼`,xleftharpoonup:`↼`,overrightharpoon:`⇀`,xrightharpoonup:`⇀`,xLeftarrow:`⇐`,xLeftrightarrow:`⇔`,xhookleftarrow:`↩`,xhookrightarrow:`↪`,xmapsto:`↦`,xrightharpoondown:`⇁`,xleftharpoondown:`↽`,xrightleftharpoons:`⇌`,xleftrightharpoons:`⇋`,xtwoheadleftarrow:`↞`,xtwoheadrightarrow:`↠`,xlongequal:`=`,xtofrom:`⇄`,xrightleftarrows:`⇄`,xrightequilibrium:`⇌`,xleftequilibrium:`⇋`,"\\cdrightarrow":`→`,"\\cdleftarrow":`←`,"\\cdlongequal":`=`},ey=function(e){var t=new Q(`mo`,[new Mv($v[e.replace(/^\\/,``)])]);return t.setAttribute(`stretchy`,`true`),t},ty={overrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],overleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],underrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],underleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],xrightarrow:[[`rightarrow`],1.469,522,`xMaxYMin`],"\\cdrightarrow":[[`rightarrow`],3,522,`xMaxYMin`],xleftarrow:[[`leftarrow`],1.469,522,`xMinYMin`],"\\cdleftarrow":[[`leftarrow`],3,522,`xMinYMin`],Overrightarrow:[[`doublerightarrow`],.888,560,`xMaxYMin`],xRightarrow:[[`doublerightarrow`],1.526,560,`xMaxYMin`],xLeftarrow:[[`doubleleftarrow`],1.526,560,`xMinYMin`],overleftharpoon:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoonup:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoondown:[[`leftharpoondown`],.888,522,`xMinYMin`],overrightharpoon:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoonup:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoondown:[[`rightharpoondown`],.888,522,`xMaxYMin`],xlongequal:[[`longequal`],.888,334,`xMinYMin`],"\\cdlongequal":[[`longequal`],3,334,`xMinYMin`],xtwoheadleftarrow:[[`twoheadleftarrow`],.888,334,`xMinYMin`],xtwoheadrightarrow:[[`twoheadrightarrow`],.888,334,`xMaxYMin`],overleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],overbrace:[[`leftbrace`,`midbrace`,`rightbrace`],1.6,548],underbrace:[[`leftbraceunder`,`midbraceunder`,`rightbraceunder`],1.6,548],underleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],xleftrightarrow:[[`leftarrow`,`rightarrow`],1.75,522],xLeftrightarrow:[[`doubleleftarrow`,`doublerightarrow`],1.75,560],xrightleftharpoons:[[`leftharpoondownplus`,`rightharpoonplus`],1.75,716],xleftrightharpoons:[[`leftharpoonplus`,`rightharpoondownplus`],1.75,716],xhookleftarrow:[[`leftarrow`,`righthook`],1.08,522],xhookrightarrow:[[`lefthook`,`rightarrow`],1.08,522],overlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],underlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],overbracket:[[`leftbracketover`,`rightbracketover`],1.6,440],underbracket:[[`leftbracketunder`,`rightbracketunder`],1.6,410],overgroup:[[`leftgroup`,`rightgroup`],.888,342],undergroup:[[`leftgroupunder`,`rightgroupunder`],.888,342],xmapsto:[[`leftmapsto`,`rightarrow`],1.5,522],xtofrom:[[`leftToFrom`,`rightToFrom`],1.75,528],xrightleftarrows:[[`baraboveleftarrow`,`rightarrowabovebar`],1.75,901],xrightequilibrium:[[`baraboveshortleftharpoon`,`rightharpoonaboveshortbar`],1.75,716],xleftequilibrium:[[`shortbaraboveleftharpoon`,`shortrightharpoonabovebar`],1.75,716]},ny=new Set([`widehat`,`widecheck`,`widetilde`,`utilde`]),ry=function(e,t){function n(){var n=4e5,r=e.label.slice(1);if(ny.has(r)&&`base`in e){var i=e.base.type===`ordgroup`?e.base.body.length:1,a,o,s;if(i>5)r===`widehat`||r===`widecheck`?(a=420,n=2364,s=.42,o=r+`4`):(a=312,n=2340,s=.34,o=`tilde4`);else{var c=[1,1,2,2,3,3][i];r===`widehat`||r===`widecheck`?(n=[0,1062,2364,2364,2364][c],a=[0,239,300,360,420][c],s=[0,.24,.3,.3,.36,.42][c],o=r+c):(n=[0,600,1033,2339,2340][c],a=[0,260,286,306,312][c],s=[0,.26,.286,.3,.306,.34][c],o=`tilde`+c)}return{span:J_([],[new Rg([new zg(o)],{width:`100%`,height:U(s),viewBox:`0 0 `+n+` `+a,preserveAspectRatio:`none`})],t),minWidth:0,height:s}}else{var l=[],u=ty[r];if(!u)throw Error(`No SVG data for "`+r+`".`);var[d,f,p]=u,m=p/1e3,h=d.length,g,_;if(h===1){if(u.length!==4)throw Error(`Expected 4-tuple for single-path SVG data "`+r+`".`);g=[`hide-tail`],_=[u[3]]}else if(h===2)g=[`halfarrow-left`,`halfarrow-right`],_=[`xMinYMin`,`xMaxYMin`];else if(h===3)g=[`brace-left`,`brace-center`,`brace-right`],_=[`xMinYMin`,`xMidYMin`,`xMaxYMin`];else throw Error(`Correct katexImagesData or update code here to support
523
+ `+h+` children.`);for(var v=0;v<h;v++){var y=new Rg([new zg(d[v])],{width:`400em`,height:U(m),viewBox:`0 0 `+n+` `+p,preserveAspectRatio:_[v]+` slice`}),b=J_([g[v]],[y],t);if(h===1)return{span:b,minWidth:f,height:m};b.style.height=U(m),l.push(b)}return{span:Z([`stretchy`],l,t),minWidth:f,height:m}}}var{span:r,minWidth:i,height:a}=n();return r.height=a,r.style.height=U(a),i>0&&(r.style.minWidth=U(i)),r},iy=function(e,t,n,r,i){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=Z([`stretchy`,t],[],i),t===`fbox`){var s=i.color&&i.getColor();s&&(a.style.borderColor=s)}}else{var c=[];/^[bx]cancel$/.test(t)&&c.push(new Bg({x1:`0`,y1:`0`,x2:`100%`,y2:`100%`,"stroke-width":`0.046em`})),/^x?cancel$/.test(t)&&c.push(new Bg({x1:`0`,y1:`100%`,x2:`100%`,y2:`0`,"stroke-width":`0.046em`})),a=J_([],[new Rg(c,{width:`100%`,height:U(o)})],i)}return a.height=o,a.style.height=U(o),a},ay={bin:1,close:1,inner:1,open:1,punct:1,rel:1},oy={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function sy(e){return e in ay}function cy(e,t){if(!e||e.type!==t)throw Error(`Expected node of type `+t+`, but got `+(e?`node of type `+e.type:String(e)));return e}function ly(e){var t=uy(e);if(!t)throw Error(`Expected node of symbol group type, but got `+(e?`node of type `+e.type:String(e)));return t}function uy(e){return e&&(e.type===`atom`||oy.hasOwnProperty(e.type))?e:null}var dy=e=>{if(e instanceof Lg)return e;if(Ug(e)&&e.children.length===1)return dy(e.children[0])},fy=(e,t)=>{var n,r,i;e&&e.type===`supsub`?(r=cy(e.base,`accent`),n=r.base,e.base=n,i=Hg(Ov(e,t)),e.base=r):(r=cy(e,`accent`),n=r.base);var a=Ov(n,t.havingCrampedStyle()),o=r.isShifty&&Ph(n),s=0;o&&(s=dy(a)?.skew??0);var c=r.label===`\\c`,l=c?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),u;if(r.isStretchy)u=ry(r,t),u=ev({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`elem`,elem:u,wrapperClasses:[`svg-align`],wrapperStyle:s>0?{width:`calc(100% - `+U(2*s)+`)`,marginLeft:U(2*s)}:void 0}]});else{var d,f;r.label===`\\vec`?(d=av(`vec`,t),f=iv.vec[1]):(d=W_({type:`textord`,mode:r.mode,text:r.label},t,`textord`),d=Vg(d),d.italic=0,f=d.width,c&&(l+=d.depth)),u=Z([`accent-body`],[d]);var p=r.label===`\\textcircled`;p&&(u.classes.push(`accent-full`),l=a.height);var m=s;p||(m-=f/2),u.style.left=U(m),r.label===`\\textcircled`&&(u.style.top=`.2em`),u=ev({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:-l},{type:`elem`,elem:u}]})}var h=Z([`mord`,`accent`],[u],t);return i?(i.children[0]=h,i.height=Math.max(h.height,i.height),i.classes[0]=`mord`,i):h},py=(e,t)=>{var n=e.isStretchy?ey(e.label):new Q(`mo`,[Iv(e.label,e.mode)]),r=new Q(`mover`,[Uv(e.base,t),n]);return r.setAttribute(`accent`,`true`),r},my=new RegExp([`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`].map(e=>`\\`+e).join(`|`));mv({type:`accent`,names:[`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`,`\\widecheck`,`\\widehat`,`\\widetilde`,`\\overrightarrow`,`\\overleftarrow`,`\\Overrightarrow`,`\\overleftrightarrow`,`\\overgroup`,`\\overlinesegment`,`\\overleftharpoon`,`\\overrightharpoon`],props:{numArgs:1},handler:(e,t)=>{var n=gv(t[0]),r=!my.test(e.funcName),i=!r||e.funcName===`\\widehat`||e.funcName===`\\widetilde`||e.funcName===`\\widecheck`;return{type:`accent`,mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:fy,mathmlBuilder:py}),mv({type:`accent`,names:[`\\'`,"\\`",`\\^`,`\\~`,`\\=`,`\\u`,`\\.`,`\\"`,`\\c`,`\\r`,`\\H`,`\\v`,`\\textcircled`],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`primitive`]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r===`math`&&(e.parser.settings.reportNonstrict(`mathVsTextAccents`,`LaTeX's accent `+e.funcName+` works only in text mode`),r=`text`),{type:`accent`,mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:fy,mathmlBuilder:py}),mv({type:`accentUnder`,names:[`\\underleftarrow`,`\\underrightarrow`,`\\underleftrightarrow`,`\\undergroup`,`\\underlinesegment`,`\\utilde`],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`accentUnder`,mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=Ov(e.base,t),r=ry(e,t),i=e.label===`\\utilde`?.12:0;return Z([`mord`,`accentunder`],[ev({positionType:`top`,positionData:n.height,children:[{type:`elem`,elem:r,wrapperClasses:[`svg-align`]},{type:`kern`,size:i},{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=ey(e.label),r=new Q(`munder`,[Uv(e.base,t),n]);return r.setAttribute(`accentunder`,`true`),r}});var hy=e=>{var t=new Q(`mpadded`,e?[e]:[]);return t.setAttribute(`width`,`+0.6em`),t.setAttribute(`lspace`,`0.3em`),t};mv({type:`xArrow`,names:[`\\xleftarrow`,`\\xrightarrow`,`\\xLeftarrow`,`\\xRightarrow`,`\\xleftrightarrow`,`\\xLeftrightarrow`,`\\xhookleftarrow`,`\\xhookrightarrow`,`\\xmapsto`,`\\xrightharpoondown`,`\\xrightharpoonup`,`\\xleftharpoondown`,`\\xleftharpoonup`,`\\xrightleftharpoons`,`\\xleftrightharpoons`,`\\xlongequal`,`\\xtwoheadrightarrow`,`\\xtwoheadleftarrow`,`\\xtofrom`,`\\xrightleftarrows`,`\\xrightequilibrium`,`\\xleftequilibrium`,`\\\\cdrightarrow`,`\\\\cdleftarrow`,`\\\\cdlongequal`],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:i}=e;return{type:`xArrow`,mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=Q_(Ov(e.body,r,t),t),a=e.label.slice(0,2)===`\\x`?`x`:`cd`;i.classes.push(a+`-arrow-pad`);var o;e.below&&(r=t.havingStyle(n.sub()),o=Q_(Ov(e.below,r,t),t),o.classes.push(a+`-arrow-pad`));var s=ry(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,l=-t.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||e.label===`\\xleftequilibrium`)&&(l-=i.depth);var u;if(o){var d=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111;u=ev({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]},{type:`elem`,elem:o,shift:d}]})}else u=ev({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]}]});return Z([`mrel`,`x-arrow`],[u],t)},mathmlBuilder(e,t){var n=ey(e.label);n.setAttribute(`minsize`,e.label.charAt(0)===`x`?`1.75em`:`3.0em`);var r;if(e.body){var i=hy(Uv(e.body,t));r=e.below?new Q(`munderover`,[n,hy(Uv(e.below,t)),i]):new Q(`mover`,[n,i])}else e.below?r=new Q(`munder`,[n,hy(Uv(e.below,t))]):(r=hy(),r=new Q(`mover`,[n,r]));return r}});function gy(e,t){var n=Sv(e.body,t,!0);return Z([e.mclass],n,t)}function _y(e,t){var n,r=Vv(e.body,t);return e.mclass===`minner`?n=new Q(`mpadded`,r):e.mclass===`mord`?e.isCharacterBox?(n=r[0],n.type=`mi`):n=new Q(`mi`,r):(e.isCharacterBox?(n=r[0],n.type=`mo`):n=new Q(`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}mv({type:`mclass`,names:[`\\mathord`,`\\mathbin`,`\\mathrel`,`\\mathopen`,`\\mathclose`,`\\mathpunct`,`\\mathinner`],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`mclass`,mode:n.mode,mclass:`m`+r.slice(5),body:_v(i),isCharacterBox:Ph(i)}},htmlBuilder:gy,mathmlBuilder:_y});var vy=e=>{var t=e.type===`ordgroup`&&e.body.length?e.body[0]:e;return t.type===`atom`&&(t.family===`bin`||t.family===`rel`)?`m`+t.family:`mord`};mv({type:`mclass`,names:[`\\@binrel`],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:`mclass`,mode:n.mode,mclass:vy(t[0]),body:_v(t[1]),isCharacterBox:Ph(t[1])}}}),mv({type:`mclass`,names:[`\\stackrel`,`\\overset`,`\\underset`],props:{numArgs:2},handler(e,t){var{parser:n,funcName:r}=e,i=t[1],a=t[0],o=r===`\\stackrel`?`mrel`:vy(i),s={type:`op`,mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!==`\\stackrel`,body:_v(i)},c={type:`supsub`,mode:a.mode,base:s,sup:r===`\\underset`?null:a,sub:r===`\\underset`?a:null};return{type:`mclass`,mode:n.mode,mclass:o,body:[c],isCharacterBox:Ph(c)}},htmlBuilder:gy,mathmlBuilder:_y}),mv({type:`pmb`,names:[`\\pmb`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`pmb`,mode:n.mode,mclass:vy(t[0]),body:_v(t[0])}},htmlBuilder(e,t){var n=Sv(e.body,t,!0),r=Z([e.mclass],n,t);return r.style.textShadow=`0.02em 0.01em 0.04px`,r},mathmlBuilder(e,t){var n=new Q(`mstyle`,Vv(e.body,t));return n.setAttribute(`style`,`text-shadow: 0.02em 0.01em 0.04px`),n}});var yy={">":`\\\\cdrightarrow`,"<":`\\\\cdleftarrow`,"=":`\\\\cdlongequal`,A:`\\uparrow`,V:`\\downarrow`,"|":`\\Vert`,".":`no arrow`},by=()=>({type:`styling`,body:[],mode:`math`,style:`display`,resetFont:!0}),xy=e=>e.type===`textord`&&e.text===`@`,Sy=(e,t)=>(e.type===`mathord`||e.type===`atom`)&&e.text===t;function Cy(e,t,n){var r=yy[e];switch(r){case`\\\\cdrightarrow`:case`\\\\cdleftarrow`:return n.callFunction(r,[t[0]],[t[1]]);case`\\uparrow`:case`\\downarrow`:var i=n.callFunction(`\\\\cdleft`,[t[0]],[]),a={type:`atom`,text:r,mode:`math`,family:`rel`},o={type:`ordgroup`,mode:`math`,body:[i,n.callFunction(`\\Big`,[a],[]),n.callFunction(`\\\\cdright`,[t[1]],[])]};return n.callFunction(`\\\\cdparent`,[o],[]);case`\\\\cdlongequal`:return n.callFunction(`\\\\cdlongequal`,[],[]);case`\\Vert`:return n.callFunction(`\\Big`,[{type:`textord`,text:`\\Vert`,mode:`math`}],[]);default:return{type:`textord`,text:` `,mode:`math`}}}function wy(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set(`\\cr`,`\\\\\\relax`),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,`\\\\`)),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n===`&`||n===`\\\\`)e.consume();else if(n===`\\end`){t[t.length-1].length===0&&t.pop();break}else throw new H(`Expected \\\\ or \\cr or \\end`,e.nextToken)}for(var r=[],i=[r],a=0;a<t.length;a++){for(var o=t[a],s=by(),c=0;c<o.length;c++)if(!xy(o[c]))s.body.push(o[c]);else{r.push(s),c+=1;var l=ly(o[c]).text,u=[,,];if(u[0]={type:`ordgroup`,mode:`math`,body:[]},u[1]={type:`ordgroup`,mode:`math`,body:[]},!`=|.`.includes(l))if(`<>AV`.includes(l))for(var d=0;d<2;d++){for(var f=!0,p=c+1;p<o.length;p++){if(Sy(o[p],l)){f=!1,c=p;break}if(xy(o[p]))throw new H(`Missing a `+l+` character to complete a CD arrow.`,o[p]);u[d].body.push(o[p])}if(f)throw new H(`Missing a `+l+` character to complete a CD arrow.`,o[c])}else throw new H(`Expected one of "<>AV=|." after @`,o[c]);var m={type:`styling`,body:[Cy(l,u,e)],mode:`math`,style:`display`,resetFont:!0};r.push(m),s=by()}a%2==0?r.push(s):r.shift(),r=[],i.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:`math`,body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:Array(i[0].length).fill({type:`align`,align:`c`,pregap:.25,postgap:.25}),colSeparationType:`CD`,hLinesBeforeRow:Array(i.length+1).fill([])}}mv({type:`cdlabel`,names:[`\\\\cdleft`,`\\\\cdright`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`cdlabel`,mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=Q_(Ov(e.label,n,t),t);return r.classes.push(`cd-label-`+e.side),r.style.bottom=U(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new Q(`mrow`,[Uv(e.label,t)]);return n=new Q(`mpadded`,[n]),n.setAttribute(`width`,`0`),e.side===`left`&&n.setAttribute(`lspace`,`-1width`),n.setAttribute(`voffset`,`0.7em`),n=new Q(`mstyle`,[n]),n.setAttribute(`displaystyle`,`false`),n.setAttribute(`scriptlevel`,`1`),n}}),mv({type:`cdlabelparent`,names:[`\\\\cdparent`],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:`cdlabelparent`,mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=Q_(Ov(e.fragment,t),t);return n.classes.push(`cd-vert-arrow`),n},mathmlBuilder(e,t){return new Q(`mrow`,[Uv(e.fragment,t)])}}),mv({type:`textord`,names:[`\\@char`],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=cy(t[0],`ordgroup`).body,i=``,a=0;a<r.length;a++){var o=cy(r[a],`textord`);i+=o.text}var s=parseInt(i),c;if(isNaN(s))throw new H(`\\@char has non-numeric argument `+i);if(s<0||s>=1114111)throw new H(`\\@char with invalid code point `+i);return s<=65535?c=String.fromCharCode(s):(s-=65536,c=String.fromCharCode((s>>10)+55296,(s&1023)+56320)),{type:`textord`,mode:n.mode,text:c}}});var Ty=(e,t)=>Z_(Sv(e.body,t.withColor(e.color),!1)),Ey=(e,t)=>{var n=new Q(`mstyle`,Vv(e.body,t.withColor(e.color)));return n.setAttribute(`mathcolor`,e.color),n};mv({type:`color`,names:[`\\textcolor`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`original`]},handler(e,t){var{parser:n}=e,r=cy(t[0],`color-token`).color,i=t[1];return{type:`color`,mode:n.mode,color:r,body:_v(i)}},htmlBuilder:Ty,mathmlBuilder:Ey}),mv({type:`color`,names:[`\\color`],props:{numArgs:1,allowedInText:!0,argTypes:[`color`]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=cy(t[0],`color-token`).color;n.gullet.macros.set(`\\current@color`,i);var a=n.parseExpression(!0,r);return{type:`color`,mode:n.mode,color:i,body:a}},htmlBuilder:Ty,mathmlBuilder:Ey}),mv({type:`cr`,names:[`\\\\`],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){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`);return{type:`cr`,mode:r.mode,newLine:a,size:i&&cy(i,`size`).value}},htmlBuilder(e,t){var n=Z([`mspace`],[],t);return e.newLine&&(n.classes.push(`newline`),e.size&&(n.style.marginTop=U(Eg(e.size,t)))),n},mathmlBuilder(e,t){var n=new Q(`mspace`);return e.newLine&&(n.setAttribute(`linebreak`,`newline`),e.size&&n.setAttribute(`height`,U(Eg(e.size,t)))),n}});var Dy={"\\global":`\\global`,"\\long":`\\\\globallong`,"\\\\globallong":`\\\\globallong`,"\\def":`\\gdef`,"\\gdef":`\\gdef`,"\\edef":`\\xdef`,"\\xdef":`\\xdef`,"\\let":`\\\\globallet`,"\\futurelet":`\\\\globalfuture`},Oy=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new H(`Expected a control sequence`,e);return t},ky=e=>{var t=e.gullet.popToken();return t.text===`=`&&(t=e.gullet.popToken(),t.text===` `&&(t=e.gullet.popToken())),t},Ay=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i??=(n.noexpand=!0,{tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};mv({type:`internal`,names:[`\\global`,`\\long`,`\\\\globallong`],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(Dy[r.text])return(n===`\\global`||n===`\\\\globallong`)&&(r.text=Dy[r.text]),cy(t.parseFunction(),`internal`);throw new H(`Invalid token after macro prefix`,r)}}),mv({type:`internal`,names:[`\\def`,`\\gdef`,`\\edef`,`\\xdef`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new H(`Expected a control sequence`,r);for(var a=0,o,s=[[]];t.gullet.future().text!==`{`;)if(r=t.gullet.popToken(),r.text===`#`){if(t.gullet.future().text===`{`){o=t.gullet.future(),s[a].push(`{`);break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new H(`Invalid argument number "`+r.text+`"`);if(parseInt(r.text)!==a+1)throw new H(`Argument number "`+r.text+`" out of order`);a++,s.push([])}else if(r.text===`EOF`)throw new H(`Expected a macro definition`);else s[a].push(r.text);var{tokens:c}=t.gullet.consumeArg();return o&&c.unshift(o),(n===`\\edef`||n===`\\xdef`)&&(c=t.gullet.expandTokens(c),c.reverse()),t.gullet.macros.set(i,{tokens:c,numArgs:a,delimiters:s},n===Dy[n]),{type:`internal`,mode:t.mode}}}),mv({type:`internal`,names:[`\\let`,`\\\\globallet`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=Oy(t.gullet.popToken());return t.gullet.consumeSpaces(),Ay(t,r,ky(t),n===`\\\\globallet`),{type:`internal`,mode:t.mode}}}),mv({type:`internal`,names:[`\\futurelet`,`\\\\globalfuture`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=Oy(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return Ay(t,r,a,n===`\\\\globalfuture`),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:`internal`,mode:t.mode}}});var jy=function(e,t,n){var r=Jg(Zg.math[e]&&Zg.math[e].replace||e,t,n);if(!r)throw Error(`Unsupported symbol `+e+` and font size `+t+`.`);return r},My=function(e,t,n,r){var i=n.havingBaseStyle(t),a=Z(r.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},Ny=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push(`delimcenter`),e.style.top=U(i),e.height-=i,e.depth+=i},Py=function(e,t,n,r,i,a){var o=My(V_(e,`Main-Regular`,i,r),t,r,a);return n&&Ny(o,r,t),o},Fy=function(e,t,n,r){return V_(e,`Size`+t+`-Regular`,n,r)},Iy=function(e,t,n,r,i,a){var o=Fy(e,t,i,r),s=My(Z([`delimsizing`,`size`+t],[o],r),rg.TEXT,r,a);return n&&Ny(s,r,rg.TEXT),s},Ly=function(e,t,n){return{type:`elem`,elem:Z([`delimsizinginner`,t===`Size1-Regular`?`delim-size1`:`delim-size4`],[Z([],[V_(e,t,n)])])}},Ry=function(e,t,n){var r=Wg[`Size4-Regular`][e.charCodeAt(0)]?Wg[`Size4-Regular`][e.charCodeAt(0)][4]:Wg[`Size1-Regular`][e.charCodeAt(0)][4],i=J_([],[new Rg([new zg(`inner`,vg(e,Math.round(1e3*t)))],{width:U(r),height:U(t),style:`width:`+U(r),viewBox:`0 0 `+1e3*r+` `+Math.round(1e3*t),preserveAspectRatio:`xMinYMin`})],n);return i.height=t,i.style.height=U(t),i.style.width=U(r),{type:`elem`,elem:i}},zy=.008,By={type:`kern`,size:-1*zy},Vy=new Set([`|`,`\\lvert`,`\\rvert`,`\\vert`]),Hy=new Set([`\\|`,`\\lVert`,`\\rVert`,`\\Vert`]),Uy=function(e,t,n,r,i,a){var o,s,c,l,u=``,d=0;o=c=l=e,s=null;var f=`Size1-Regular`;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`):Vy.has(e)?(c=`∣`,u=`vert`,d=333):Hy.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`);var p=jy(o,f,i),m=p.height+p.depth,h=jy(c,f,i),g=h.height+h.depth,_=jy(l,f,i),v=_.height+_.depth,y=0,b=1;if(s!==null){var x=jy(s,f,i);y=x.height+x.depth,b=2}var S=m+v+y,C=S+Math.max(0,Math.ceil((t-S)/(b*g)))*b*g,w=r.fontMetrics().axisHeight;n&&(w*=r.sizeMultiplier);var T=C/2-w,E=[];if(u.length>0){var ee=C-m-v,te=Math.round(C*1e3),D=bg(u,Math.round(ee*1e3)),ne=new zg(u,D),re=U(d/1e3),ie=U(te/1e3),ae=J_([],[new Rg([ne],{width:re,height:ie,viewBox:`0 0 `+d+` `+te})],r);ae.height=te/1e3,ae.style.width=re,ae.style.height=ie,E.push({type:`elem`,elem:ae})}else{if(E.push(Ly(l,f,i)),E.push(By),s===null){var oe=C-m-v+2*zy;E.push(Ry(c,oe,r))}else{var se=(C-m-v-y)/2+2*zy;E.push(Ry(c,se,r)),E.push(By),E.push(Ly(s,f,i)),E.push(By),E.push(Ry(c,se,r))}E.push(By),E.push(Ly(o,f,i))}var ce=r.havingBaseStyle(rg.TEXT);return My(Z([`delimsizing`,`mult`],[ev({positionType:`bottom`,positionData:T,children:E})],ce),rg.TEXT,r,a)},Wy=80,Gy=.08,Ky=function(e,t,n,r,i){return J_([`hide-tail`],[new Rg([new zg(e,_g(e,r,n))],{width:`400em`,height:U(t),viewBox:`0 0 400000 `+n,preserveAspectRatio:`xMinYMin slice`})],i)},qy=function(e,t){var n=t.havingBaseSizing(),r=rb(`\\surd`,e*n.sizeMultiplier,tb,n),i=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,s,c,l,u;return r.type===`small`?(l=1e3+1e3*a+Wy,e<1?i=1:e<1.4&&(i=.7),s=(1+a+Gy)/i,c=(1+a)/i,o=Ky(`sqrtMain`,s,l,a,t),o.style.minWidth=`0.853em`,u=.833/i):r.type===`large`?(l=(1e3+Wy)*Zy[r.size],c=(Zy[r.size]+a)/i,s=(Zy[r.size]+a+Gy)/i,o=Ky(`sqrtSize`+r.size,s,l,a,t),o.style.minWidth=`1.02em`,u=1/i):(s=e+a+Gy,c=e+a,l=Math.floor(1e3*e+a)+Wy,o=Ky(`sqrtTall`,s,l,a,t),o.style.minWidth=`0.742em`,u=1.056),o.height=c,o.style.height=U(s),{span:o,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},Jy=new Set([`(`,`\\lparen`,`)`,`\\rparen`,`[`,`\\lbrack`,`]`,`\\rbrack`,`\\{`,`\\lbrace`,`\\}`,`\\rbrace`,`\\lfloor`,`\\rfloor`,`⌊`,`⌋`,`\\lceil`,`\\rceil`,`⌈`,`⌉`,`\\surd`]),Yy=new Set([`\\uparrow`,`\\downarrow`,`\\updownarrow`,`\\Uparrow`,`\\Downarrow`,`\\Updownarrow`,`|`,`\\|`,`\\vert`,`\\Vert`,`\\lvert`,`\\rvert`,`\\lVert`,`\\rVert`,`\\lgroup`,`\\rgroup`,`⟮`,`⟯`,`\\lmoustache`,`\\rmoustache`,`⎰`,`⎱`]),Xy=new Set([`<`,`>`,`\\langle`,`\\rangle`,`/`,`\\backslash`,`\\lt`,`\\gt`]),Zy=[0,1.2,1.8,2.4,3],Qy=function(e,t,n,r,i){if(e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`),Jy.has(e)||Xy.has(e))return Iy(e,t,!1,n,r,i);if(Yy.has(e))return Uy(e,Zy[t],!1,n,r,i);throw new H(`Illegal delimiter: '`+e+`'`)},$y=[{type:`small`,style:rg.SCRIPTSCRIPT},{type:`small`,style:rg.SCRIPT},{type:`small`,style:rg.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4}],eb=[{type:`small`,style:rg.SCRIPTSCRIPT},{type:`small`,style:rg.SCRIPT},{type:`small`,style:rg.TEXT},{type:`stack`}],tb=[{type:`small`,style:rg.SCRIPTSCRIPT},{type:`small`,style:rg.SCRIPT},{type:`small`,style:rg.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4},{type:`stack`}],nb=function(e){if(e.type===`small`)return`Main-Regular`;if(e.type===`large`)return`Size`+e.size+`-Regular`;if(e.type===`stack`)return`Size4-Regular`;var t=e.type;throw Error(`Add support for delim type '`+t+`' here.`)},rb=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);i<n.length;i++){var a=n[i];if(a.type===`stack`)break;var o=jy(e,nb(a),`math`),s=o.height+o.depth;if(a.type===`small`){var c=r.havingBaseStyle(a.style);s*=c.sizeMultiplier}if(s>t)return a}return n[n.length-1]},ib=function(e,t,n,r,i,a){e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`);var o=Xy.has(e)?$y:Jy.has(e)?tb:eb,s=rb(e,t,o,r);return s.type===`small`?Py(e,s.style,n,r,i,a):s.type===`large`?Iy(e,s.size,n,r,i,a):Uy(e,t,n,r,i,a)},ab=function(e,t,n,r,i,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=901,c=5/r.fontMetrics().ptPerEm,l=Math.max(t-o,n+o);return ib(e,Math.max(l/500*s,2*l-c),!0,r,i,a)},ob={"\\bigl":{mclass:`mopen`,size:1},"\\Bigl":{mclass:`mopen`,size:2},"\\biggl":{mclass:`mopen`,size:3},"\\Biggl":{mclass:`mopen`,size:4},"\\bigr":{mclass:`mclose`,size:1},"\\Bigr":{mclass:`mclose`,size:2},"\\biggr":{mclass:`mclose`,size:3},"\\Biggr":{mclass:`mclose`,size:4},"\\bigm":{mclass:`mrel`,size:1},"\\Bigm":{mclass:`mrel`,size:2},"\\biggm":{mclass:`mrel`,size:3},"\\Biggm":{mclass:`mrel`,size:4},"\\big":{mclass:`mord`,size:1},"\\Big":{mclass:`mord`,size:2},"\\bigg":{mclass:`mord`,size:3},"\\Bigg":{mclass:`mord`,size:4}},sb=new Set(`(,\\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(`,`));function cb(e){return`isMiddle`in e}function lb(e,t){var n=uy(e);if(n&&sb.has(n.text))return n;throw n?new H(`Invalid delimiter '`+n.text+`' after '`+t.funcName+`'`,e):new H(`Invalid delimiter type '`+e.type+`'`,e)}mv({type:`delimsizing`,names:[`\\bigl`,`\\Bigl`,`\\biggl`,`\\Biggl`,`\\bigr`,`\\Bigr`,`\\biggr`,`\\Biggr`,`\\bigm`,`\\Bigm`,`\\biggm`,`\\Biggm`,`\\big`,`\\Big`,`\\bigg`,`\\Bigg`],props:{numArgs:1,argTypes:[`primitive`]},handler:(e,t)=>{var n=lb(t[0],e);return{type:`delimsizing`,mode:e.parser.mode,size:ob[e.funcName].size,mclass:ob[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim===`.`?Z([e.mclass]):Qy(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!==`.`&&t.push(Iv(e.delim,e.mode));var n=new Q(`mo`,t);e.mclass===`mopen`||e.mclass===`mclose`?n.setAttribute(`fence`,`true`):n.setAttribute(`fence`,`false`),n.setAttribute(`stretchy`,`true`);var r=U(Zy[e.size]);return n.setAttribute(`minsize`,r),n.setAttribute(`maxsize`,r),n}});function ub(e){if(!e.body)throw Error(`Bug: The leftright ParseNode wasn't fully parsed.`)}mv({type:`leftright-right`,names:[`\\right`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get(`\\current@color`);if(n&&typeof n!=`string`)throw new H(`\\current@color set to non-string in \\right`);return{type:`leftright-right`,mode:e.parser.mode,delim:lb(t[0],e).text,color:n}}}),mv({type:`leftright`,names:[`\\left`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=lb(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect(`\\right`,!1);var a=cy(r.parseFunction(),`leftright-right`);return{type:`leftright`,mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{ub(e);for(var n=Sv(e.body,t,!0,[`mopen`,`mclose`]),r=0,i=0,a=!1,o=0;o<n.length;o++){var s=n[o];cb(s)?a=!0:(r=Math.max(n[o].height,r),i=Math.max(n[o].depth,i))}r*=t.sizeMultiplier,i*=t.sizeMultiplier;var c=e.left===`.`?Dv(t,[`mopen`]):ab(e.left,r,i,t,e.mode,[`mopen`]);if(n.unshift(c),a)for(var l=1;l<n.length;l++){var u=n[l];if(cb(u)){var d=u.isMiddle;n[l]=ab(d.delim,r,i,d.options,e.mode,[])}}var f;if(e.right===`.`)f=Dv(t,[`mclose`]);else{var p=e.rightColor?t.withColor(e.rightColor):t;f=ab(e.right,r,i,p,e.mode,[`mclose`])}return n.push(f),Z([`minner`],n,t)},mathmlBuilder:(e,t)=>{ub(e);var n=Vv(e.body,t);if(e.left!==`.`){var r=new Q(`mo`,[Iv(e.left,e.mode)]);r.setAttribute(`fence`,`true`),n.unshift(r)}if(e.right!==`.`){var i=new Q(`mo`,[Iv(e.right,e.mode)]);i.setAttribute(`fence`,`true`),e.rightColor&&i.setAttribute(`mathcolor`,e.rightColor),n.push(i)}return Lv(n)}}),mv({type:`middle`,names:[`\\middle`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=lb(t[0],e);if(!e.parser.leftrightDepth)throw new H(`\\middle without preceding \\left`,n);return{type:`middle`,mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return e.delim===`.`?n=Dv(t,[]):(n=Qy(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{var n=new Q(`mo`,[e.delim===`\\vert`||e.delim===`|`?Iv(`|`,`text`):Iv(e.delim,e.mode)]);return n.setAttribute(`fence`,`true`),n.setAttribute(`lspace`,`0.05em`),n.setAttribute(`rspace`,`0.05em`),n}});var db=(e,t)=>{var n=Q_(Ov(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,o,s=Ph(e.body);if(r===`sout`)a=Z([`stretchy`,`sout`]),a.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r===`phase`){var c=Eg({number:.6,unit:`pt`},t),l=Eg({number:.35,unit:`ex`},t),u=t.havingBaseSizing();i/=u.sizeMultiplier;var d=n.height+n.depth+c+l;n.style.paddingLeft=U(d/2+c);var f=Math.floor(1e3*d*i);a=J_([`hide-tail`],[new Rg([new zg(`phase`,hg(f))],{width:`400em`,height:U(f/1e3),viewBox:`0 0 400000 `+f,preserveAspectRatio:`xMinYMin slice`})],t),a.style.height=U(d),o=n.depth+c+l}else{/cancel/.test(r)?s||n.classes.push(`cancel-pad`):r===`angl`?n.classes.push(`anglpad`):n.classes.push(`boxpad`);var p,m,h=0;/box/.test(r)?(h=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),p=t.fontMetrics().fboxsep+(r===`colorbox`?0:h),m=p):r===`angl`?(h=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),p=4*h,m=Math.max(0,.25-n.depth)):(p=s?.2:0,m=p),a=iy(n,r,p,m,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle=`solid`,a.style.borderWidth=U(h)):r===`angl`&&h!==.049&&(a.style.borderTopWidth=U(h),a.style.borderRightWidth=U(h)),o=n.depth+m,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var g;if(e.backgroundColor)g=ev({positionType:`individualShift`,children:[{type:`elem`,elem:a,shift:o},{type:`elem`,elem:n,shift:0}]});else{var _=/cancel|phase/.test(r)?[`svg-align`]:[];g=ev({positionType:`individualShift`,children:[{type:`elem`,elem:n,shift:0},{type:`elem`,elem:a,shift:o,wrapperClasses:_}]})}return/cancel/.test(r)&&(g.height=n.height,g.depth=n.depth),/cancel/.test(r)&&!s?Z([`mord`,`cancel-lap`],[g],t):Z([`mord`],[g],t)},fb=(e,t)=>{var n,r=new Q(e.label.includes(`colorbox`)?`mpadded`:`menclose`,[Uv(e.body,t)]);switch(e.label){case`\\cancel`:r.setAttribute(`notation`,`updiagonalstrike`);break;case`\\bcancel`:r.setAttribute(`notation`,`downdiagonalstrike`);break;case`\\phase`:r.setAttribute(`notation`,`phasorangle`);break;case`\\sout`:r.setAttribute(`notation`,`horizontalstrike`);break;case`\\fbox`:r.setAttribute(`notation`,`box`);break;case`\\angl`:r.setAttribute(`notation`,`actuarial`);break;case`\\fcolorbox`:case`\\colorbox`: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`){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute(`style`,`border: `+U(i)+` solid `+e.borderColor)}break;case`\\xcancel`:r.setAttribute(`notation`,`updiagonalstrike downdiagonalstrike`);break}return e.backgroundColor&&r.setAttribute(`mathbackground`,e.backgroundColor),r};mv({type:`enclose`,names:[`\\colorbox`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`hbox`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=cy(t[0],`color-token`).color,o=t[1];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:db,mathmlBuilder:fb}),mv({type:`enclose`,names:[`\\fcolorbox`],props:{numArgs:3,allowedInText:!0,argTypes:[`color`,`color`,`hbox`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=cy(t[0],`color-token`).color,o=cy(t[1],`color-token`).color,s=t[2];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}},htmlBuilder:db,mathmlBuilder:fb}),mv({type:`enclose`,names:[`\\fbox`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\fbox`,body:t[0]}}}),mv({type:`enclose`,names:[`\\cancel`,`\\bcancel`,`\\xcancel`,`\\phase`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}},htmlBuilder:db,mathmlBuilder:fb}),mv({type:`enclose`,names:[`\\sout`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e;n.mode===`math`&&n.settings.reportNonstrict(`mathVsSout`,`LaTeX's \\sout works only in text mode`);var i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}},htmlBuilder:db,mathmlBuilder:fb}),mv({type:`enclose`,names:[`\\angl`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\angl`,body:t[0]}}});var pb={};function mb(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},c=0;c<n.length;++c)pb[n[c]]=s;a&&(fv[t]=a),o&&(pv[t]=o)}var hb={};function $(e,t){hb[e]=t}var gb=class e{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(t,n){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}},_b=class e{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(t,n){return new e(n,gb.range(this,t))}};function vb(e){var t=[];e.consumeSpaces();var n=e.fetch().text;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;return t}var yb=e=>{if(!e.parser.settings.displayMode)throw new H(`{`+e.envName+`} can be used only in display mode.`)},bb=new Set([`gather`,`gather*`]);function xb(e){if(!e.includes(`ed`))return!e.includes(`*`)}function Sb(e,t,n){var{hskipBeforeAndAfter:r,addJot:i,cols:a,arraystretch:o,colSeparationType:s,autoTag:c,singleRow:l,emptySingleRow:u,maxNumCols:d,leqno:f}=t;if(e.gullet.beginGroup(),l||e.gullet.macros.set(`\\cr`,`\\\\\\relax`),!o){var p=e.gullet.expandMacroAsText(`\\arraystretch`);if(p==null)o=1;else if(o=parseFloat(p),!o||o<0)throw new H(`Invalid \\arraystretch: `+p)}e.gullet.beginGroup();var m=[],h=[m],g=[],_=[],v=c==null?void 0:[];function y(){c&&e.gullet.macros.set(`\\@eqnsw`,`1`,!0)}function b(){v&&(e.gullet.macros.get(`\\df@tag`)?(v.push(e.subparse([new _b(`\\df@tag`)])),e.gullet.macros.set(`\\df@tag`,void 0,!0)):v.push(!!c&&e.gullet.macros.get(`\\@eqnsw`)===`1`))}for(y(),_.push(vb(e));;){var x=e.parseExpression(!1,l?`\\end`:`\\\\`);e.gullet.endGroup(),e.gullet.beginGroup();var S={type:`ordgroup`,mode:e.mode,body:x};n&&(S={type:`styling`,mode:e.mode,style:n,resetFont:!0,body:[S]}),m.push(S);var C=e.fetch().text;if(C===`&`){if(d&&m.length===d){if(l||s)throw new H(`Too many tab characters: &`,e.nextToken);e.settings.reportNonstrict(`textEnv`,`Too few columns specified in the {array} column argument.`)}e.consume()}else if(C===`\\end`){b(),m.length===1&&S.type===`styling`&&S.body.length===1&&S.body[0].type===`ordgroup`&&S.body[0].body.length===0&&(h.length>1||!u)&&h.pop(),_.length<h.length+1&&_.push([]);break}else if(C===`\\\\`){e.consume();var w=void 0;e.gullet.future().text!==` `&&(w=e.parseSizeGroup(!0)),g.push(w?w.value:null),b(),_.push(vb(e)),m=[],h.push(m),y()}else throw new H(`Expected & or \\\\ or \\cr or \\end`,e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:e.mode,addJot:i,arraystretch:o,body:h,cols:a,rowGaps:g,hskipBeforeAndAfter:r,hLinesBeforeRow:_,colSeparationType:s,tags:v,leqno:f}}function Cb(e){return e.slice(0,1)===`d`?`display`:`text`}var wb=function(e,t){var n,r,i=e.body.length,a=e.hLinesBeforeRow,o=0,s=Array(i),c=[],l=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),u=1/t.fontMetrics().ptPerEm,d=5*u;e.colSeparationType&&e.colSeparationType===`small`&&(d=.2778*(t.havingStyle(rg.SCRIPT).sizeMultiplier/t.sizeMultiplier));var f=e.colSeparationType===`CD`?Eg({number:3,unit:`ex`},t):12*u,p=3*u,m=e.arraystretch*f,h=.7*m,g=.3*m,_=0;function v(e){for(var t=0;t<e.length;++t)t>0&&(_+=.25),c.push({pos:_,isDashed:e[t]})}for(v(a[0]),n=0;n<e.body.length;++n){var y=e.body[n],b=h,x=g;o<y.length&&(o=y.length);var S={cells:Array(y.length),height:0,depth:0,pos:0};for(r=0;r<y.length;++r){var C=Ov(y[r],t);x<C.depth&&(x=C.depth),b<C.height&&(b=C.height),S.cells[r]=C}var w=e.rowGaps[n],T=0;w&&(T=Eg(w,t),T>0&&(T+=g,x<T&&(x=T),T=0)),e.addJot&&n<e.body.length-1&&(x+=p),S.height=b,S.depth=x,_+=b,S.pos=_,_+=x+T,s[n]=S,v(a[n+1])}var E=_/2+t.fontMetrics().axisHeight,ee=e.cols||[],te=[],D,ne,re=[];if(e.tags&&e.tags.some(e=>e))for(n=0;n<i;++n){var ie=s[n],ae=ie.pos-E,oe=e.tags[n],se=void 0;se=oe===!0?Z([`eqn-num`],[],t):oe===!1?Z([],[],t):Z([],Sv(oe,t,!0),t),se.depth=ie.depth,se.height=ie.height,re.push({type:`elem`,elem:se,shift:ae})}for(r=0,ne=0;r<o||ne<ee.length;++r,++ne){for(var ce=ee[ne],le=!0;(ue=ce)?.type===`separator`;){var ue;if(le||(D=Z([`arraycolsep`],[]),D.style.width=U(t.fontMetrics().doubleRuleSep),te.push(D)),ce.separator===`|`||ce.separator===`:`){var de=ce.separator===`|`?`solid`:`dashed`,fe=Z([`vertical-separator`],[],t);fe.style.height=U(_),fe.style.borderRightWidth=U(l),fe.style.borderRightStyle=de,fe.style.margin=`0 `+U(-l/2);var pe=_-E;pe&&(fe.style.verticalAlign=U(-pe)),te.push(fe)}else throw new H(`Invalid separator type: `+ce.separator);ne++,ce=ee[ne],le=!1}if(!(r>=o)){var me=void 0;(r>0||e.hskipBeforeAndAfter)&&(me=ce?.pregap??d,me!==0&&(D=Z([`arraycolsep`],[]),D.style.width=U(me),te.push(D)));var he=[];for(n=0;n<i;++n){var ge=s[n],_e=ge.cells[r];if(_e){var ve=ge.pos-E;_e.depth=ge.depth,_e.height=ge.height,he.push({type:`elem`,elem:_e,shift:ve})}}var ye=ev({positionType:`individualShift`,children:he}),be=Z([`col-align-`+(ce?.align||`c`)],[ye]);te.push(be),(r<o-1||e.hskipBeforeAndAfter)&&(me=ce?.postgap??d,me!==0&&(D=Z([`arraycolsep`],[]),D.style.width=U(me),te.push(D)))}}var xe=Z([`mtable`],te);if(c.length>0){for(var Se=Y_(`hline`,t,l),Ce=Y_(`hdashline`,t,l),we=[{type:`elem`,elem:xe,shift:0}];c.length>0;){var Te=c.pop(),Ee=Te.pos-E;Te.isDashed?we.push({type:`elem`,elem:Ce,shift:Ee}):we.push({type:`elem`,elem:Se,shift:Ee})}xe=ev({positionType:`individualShift`,children:we})}if(re.length===0)return Z([`mord`],[xe],t);var De=Z([`tag`],[ev({positionType:`individualShift`,children:re})],t);return Z_([xe,De])},Tb={c:`center `,l:`left `,r:`right `},Eb=function(e,t){for(var n=[],r=new Q(`mtd`,[],[`mtr-glue`]),i=new Q(`mtd`,[],[`mml-eqn-num`]),a=0;a<e.body.length;a++){for(var o=e.body[a],s=[],c=0;c<o.length;c++)s.push(new Q(`mtd`,[Uv(o[c],t)]));e.tags&&e.tags[a]&&(s.unshift(r),s.push(r),e.leqno?s.unshift(i):s.push(i)),n.push(new Q(`mtr`,s))}var l=new Q(`mtable`,n),u=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);l.setAttribute(`rowspacing`,U(u));var d=``,f=``;if(e.cols&&e.cols.length>0){var p=e.cols,m=``,h=!1,g=0,_=p.length;p[0].type===`separator`&&(d+=`top `,g=1),p[p.length-1].type===`separator`&&(d+=`bottom `,--_);for(var v=g;v<_;v++){var y=p[v];y.type===`align`?(f+=Tb[y.align],h&&(m+=`none `),h=!0):y.type===`separator`&&(h&&=(m+=y.separator===`|`?`solid `:`dashed `,!1))}l.setAttribute(`columnalign`,f.trim()),/[sd]/.test(m)&&l.setAttribute(`columnlines`,m.trim())}if(e.colSeparationType===`align`){for(var b=e.cols||[],x=``,S=1;S<b.length;S++)x+=S%2?`0em `:`1em `;l.setAttribute(`columnspacing`,x.trim())}else e.colSeparationType===`alignat`||e.colSeparationType===`gather`?l.setAttribute(`columnspacing`,`0em`):e.colSeparationType===`small`?l.setAttribute(`columnspacing`,`0.2778em`):e.colSeparationType===`CD`?l.setAttribute(`columnspacing`,`0.5em`):l.setAttribute(`columnspacing`,`1em`);var C=``,w=e.hLinesBeforeRow;d+=w[0].length>0?`left `:``,d+=w[w.length-1].length>0?`right `:``;for(var T=1;T<w.length-1;T++)C+=w[T].length===0?`none `:w[T][0]?`dashed `:`solid `;return/[sd]/.test(C)&&l.setAttribute(`rowlines`,C.trim()),d!==``&&(l=new Q(`menclose`,[l]),l.setAttribute(`notation`,d.trim())),e.arraystretch&&e.arraystretch<1&&(l=new Q(`mstyle`,[l]),l.setAttribute(`scriptlevel`,`1`)),l},Db=function(e,t){e.envName.includes(`ed`)||yb(e);var n=[],r=e.envName.includes(`at`)?`alignat`:`align`,i=e.envName===`split`,a=Sb(e.parser,{cols:n,addJot:!0,autoTag:i?void 0:xb(e.envName),emptySingleRow:!0,colSeparationType:r,maxNumCols:i?2:void 0,leqno:e.parser.settings.leqno},`display`),o=0,s=0,c={type:`ordgroup`,mode:e.mode,body:[]};if(t[0]&&t[0].type===`ordgroup`){for(var l=``,u=0;u<t[0].body.length;u++){var d=cy(t[0].body[u],`textord`);l+=d.text}o=Number(l),s=o*2}var f=!s;a.body.forEach(function(e){for(var t=1;t<e.length;t+=2)cy(cy(e[t],`styling`).body[0],`ordgroup`).body.unshift(c);if(f)s<e.length&&(s=e.length);else{var n=e.length/2;if(o<n)throw new H(`Too many math in a row: `+(`expected `+o+`, but got `+n),e[0])}});for(var p=0;p<s;++p){var m=`r`,h=0;p%2==1?m=`l`:p>0&&f&&(h=1),n[p]={type:`align`,align:m,pregap:h,postgap:0}}return a.colSeparationType=f?`align`:`alignat`,a};mb({type:`array`,names:[`array`,`darray`],props:{numArgs:1},handler(e,t){var n=(uy(t[0])?[t[0]]:cy(t[0],`ordgroup`).body).map(function(e){var t=ly(e).text;if(`lcr`.includes(t))return{type:`align`,align:t};if(t===`|`)return{type:`separator`,separator:`|`};if(t===`:`)return{type:`separator`,separator:`:`};throw new H(`Unknown column alignment: `+t,e)}),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return Sb(e.parser,r,Cb(e.envName))},htmlBuilder:wb,mathmlBuilder:Eb}),mb({type:`array`,names:[`matrix`,`pmatrix`,`bmatrix`,`Bmatrix`,`vmatrix`,`Vmatrix`,`matrix*`,`pmatrix*`,`bmatrix*`,`Bmatrix*`,`vmatrix*`,`Vmatrix*`],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:[`(`,`)`],bmatrix:[`[`,`]`],Bmatrix:[`\\{`,`\\}`],vmatrix:[`|`,`|`],Vmatrix:[`\\Vert`,`\\Vert`]}[e.envName.replace(`*`,``)],n=`c`,r={hskipBeforeAndAfter:!1,cols:[{type:`align`,align:n}]};if(e.envName.charAt(e.envName.length-1)===`*`){var i=e.parser;if(i.consumeSpaces(),i.fetch().text===`[`){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,!`lcr`.includes(n))throw new H(`Expected l or c or r`,i.nextToken);i.consume(),i.consumeSpaces(),i.expect(`]`),i.consume(),r.cols=[{type:`align`,align:n}]}}var a=Sb(e.parser,r,Cb(e.envName)),o=Math.max(0,...a.body.map(e=>e.length));return a.cols=Array(o).fill({type:`align`,align:n}),t?{type:`leftright`,mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:wb,mathmlBuilder:Eb}),mb({type:`array`,names:[`smallmatrix`],props:{numArgs:0},handler(e){var t=Sb(e.parser,{arraystretch:.5},`script`);return t.colSeparationType=`small`,t},htmlBuilder:wb,mathmlBuilder:Eb}),mb({type:`array`,names:[`subarray`],props:{numArgs:1},handler(e,t){var n=(uy(t[0])?[t[0]]:cy(t[0],`ordgroup`).body).map(function(e){var t=ly(e).text;if(`lc`.includes(t))return{type:`align`,align:t};throw new H(`Unknown column alignment: `+t,e)});if(n.length>1)throw new H(`{subarray} can contain only one column`);var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5},i=Sb(e.parser,r,`script`);if(i.body.length>0&&i.body[0].length>1)throw new H(`{subarray} can contain only one column`);return i},htmlBuilder:wb,mathmlBuilder:Eb}),mb({type:`array`,names:[`cases`,`dcases`,`rcases`,`drcases`],props:{numArgs:0},handler(e){var t=Sb(e.parser,{arraystretch:1.2,cols:[{type:`align`,align:`l`,pregap:0,postgap:1},{type:`align`,align:`l`,pregap:0,postgap:0}]},Cb(e.envName));return{type:`leftright`,mode:e.mode,body:[t],left:e.envName.includes(`r`)?`.`:`\\{`,right:e.envName.includes(`r`)?`\\}`:`.`,rightColor:void 0}},htmlBuilder:wb,mathmlBuilder:Eb}),mb({type:`array`,names:[`align`,`align*`,`aligned`,`split`],props:{numArgs:0},handler:Db,htmlBuilder:wb,mathmlBuilder:Eb}),mb({type:`array`,names:[`gathered`,`gather`,`gather*`],props:{numArgs:0},handler(e){bb.has(e.envName)&&yb(e);var t={cols:[{type:`align`,align:`c`}],addJot:!0,colSeparationType:`gather`,autoTag:xb(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Sb(e.parser,t,`display`)},htmlBuilder:wb,mathmlBuilder:Eb}),mb({type:`array`,names:[`alignat`,`alignat*`,`alignedat`],props:{numArgs:1},handler:Db,htmlBuilder:wb,mathmlBuilder:Eb}),mb({type:`array`,names:[`equation`,`equation*`],props:{numArgs:0},handler(e){yb(e);var t={autoTag:xb(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Sb(e.parser,t,`display`)},htmlBuilder:wb,mathmlBuilder:Eb}),mb({type:`array`,names:[`CD`],props:{numArgs:0},handler(e){return yb(e),wy(e.parser)},htmlBuilder:wb,mathmlBuilder:Eb}),$(`\\nonumber`,`\\gdef\\@eqnsw{0}`),$(`\\notag`,`\\nonumber`),mv({type:`text`,names:[`\\hline`,`\\hdashline`],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new H(e.funcName+` valid only within array environment`)}});var Ob=pb;mv({type:`environment`,names:[`\\begin`,`\\end`],props:{numArgs:1,argTypes:[`text`]},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];if(i.type!==`ordgroup`)throw new H(`Invalid environment name`,i);for(var a=``,o=0;o<i.body.length;++o)a+=cy(i.body[o],`textord`).text;if(r===`\\begin`){if(!Ob.hasOwnProperty(a))throw new H(`No such environment: `+a,i);var s=Ob[a],{args:c,optArgs:l}=n.parseArguments(`\\begin{`+a+`}`,s),u={mode:n.mode,envName:a,parser:n},d=s.handler(u,c,l);n.expect(`\\end`,!1);var f=n.nextToken,p=cy(n.parseFunction(),`environment`);if(p.name!==a)throw new H(`Mismatch: \\begin{`+a+`} matched by \\end{`+p.name+`}`,f);return d}return{type:`environment`,mode:n.mode,name:a,nameGroup:i}}});var kb=(e,t)=>{var n=e.font,r=t.withFont(n);return Ov(e.body,r)},Ab=(e,t)=>{var n=e.font,r=t.withFont(n);return Uv(e.body,r)},jb={"\\Bbb":`\\mathbb`,"\\bold":`\\mathbf`,"\\frak":`\\mathfrak`};mv({type:`font`,names:[`\\mathrm`,`\\mathit`,`\\mathbf`,`\\mathnormal`,`\\mathsfit`,`\\mathbb`,`\\mathcal`,`\\mathfrak`,`\\mathscr`,`\\mathsf`,`\\mathtt`,`\\Bbb`,`\\bold`,`\\frak`],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=gv(t[0]),a=r;return a in jb&&(a=jb[a]),{type:`font`,mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:kb,mathmlBuilder:Ab}),mv({type:`mclass`,names:[`\\boldsymbol`,`\\bm`],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`mclass`,mode:n.mode,mclass:vy(r),body:[{type:`font`,mode:n.mode,font:`boldsymbol`,body:r}],isCharacterBox:Ph(r)}}}),mv({type:`font`,names:[`\\rm`,`\\sf`,`\\tt`,`\\bf`,`\\it`,`\\cal`],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:a}=n,o=n.parseExpression(!0,i);return{type:`font`,mode:a,font:`math`+r.slice(1),body:{type:`ordgroup`,mode:n.mode,body:o}}},htmlBuilder:kb,mathmlBuilder:Ab});var Mb=(e,t)=>{var n=t.style,r=n.fracNum(),i=n.fracDen(),a=t.havingStyle(r),o=Ov(e.numer,a,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,c=3.5/t.fontMetrics().ptPerEm;o.height=o.height<s?s:o.height,o.depth=o.depth<c?c:o.depth}a=t.havingStyle(i);var l=Ov(e.denom,a,t),u,d,f;e.hasBarLine?(e.barSize?(d=Eg(e.barSize,t),u=Y_(`frac-line`,t,d)):u=Y_(`frac-line`,t),d=u.height,f=u.height):(u=null,d=0,f=t.fontMetrics().defaultRuleThickness);var p,m,h;n.size===rg.DISPLAY.size?(p=t.fontMetrics().num1,m=d>0?3*f:7*f,h=t.fontMetrics().denom1):(d>0?(p=t.fontMetrics().num2,m=f):(p=t.fontMetrics().num3,m=3*f),h=t.fontMetrics().denom2);var g;if(u){var _=t.fontMetrics().axisHeight;p-o.depth-(_+.5*d)<m&&(p+=m-(p-o.depth-(_+.5*d))),_-.5*d-(l.height-h)<m&&(h+=m-(_-.5*d-(l.height-h)));var v=-(_-.5*d);g=ev({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:u,shift:v},{type:`elem`,elem:o,shift:-p}]})}else{var y=p-o.depth-(l.height-h);y<m&&(p+=.5*(m-y),h+=.5*(m-y)),g=ev({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:o,shift:-p}]})}a=t.havingStyle(n),g.height*=a.sizeMultiplier/t.sizeMultiplier,g.depth*=a.sizeMultiplier/t.sizeMultiplier;var b=n.size===rg.DISPLAY.size?t.fontMetrics().delim1:n.size===rg.SCRIPTSCRIPT.size?t.havingStyle(rg.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,x=e.leftDelim==null?Dv(t,[`mopen`]):ib(e.leftDelim,b,!0,t.havingStyle(n),e.mode,[`mopen`]),S=e.continued?Z([]):e.rightDelim==null?Dv(t,[`mclose`]):ib(e.rightDelim,b,!0,t.havingStyle(n),e.mode,[`mclose`]);return Z([`mord`].concat(a.sizingClasses(t)),[x,Z([`mfrac`],[g]),S],t)},Nb=(e,t)=>{var n=new Q(`mfrac`,[Uv(e.numer,t),Uv(e.denom,t)]);if(!e.hasBarLine)n.setAttribute(`linethickness`,`0px`);else if(e.barSize){var r=Eg(e.barSize,t);n.setAttribute(`linethickness`,U(r))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var a=new Q(`mo`,[new Mv(e.leftDelim.replace(`\\`,``))]);a.setAttribute(`fence`,`true`),i.push(a)}if(i.push(n),e.rightDelim!=null){var o=new Q(`mo`,[new Mv(e.rightDelim.replace(`\\`,``))]);o.setAttribute(`fence`,`true`),i.push(o)}return Lv(i)}return n},Pb=(e,t)=>t?{type:`styling`,mode:e.mode,style:t,body:[e]}:e;mv({type:`genfrac`,names:[`\\cfrac`,`\\dfrac`,`\\frac`,`\\tfrac`,`\\dbinom`,`\\binom`,`\\tbinom`,`\\\\atopfrac`,`\\\\bracefrac`,`\\\\brackfrac`],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=t[1],o,s=null,c=null;switch(r){case`\\cfrac`:case`\\dfrac`:case`\\frac`:case`\\tfrac`:o=!0;break;case`\\\\atopfrac`:o=!1;break;case`\\dbinom`:case`\\binom`:case`\\tbinom`:o=!1,s=`(`,c=`)`;break;case`\\\\bracefrac`:o=!1,s=`\\{`,c=`\\}`;break;case`\\\\brackfrac`:o=!1,s=`[`,c=`]`;break;default:throw Error(`Unrecognized genfrac command`)}var l=r===`\\cfrac`,u=null;return l||r.startsWith(`\\d`)?u=`display`:r.startsWith(`\\t`)&&(u=`text`),Pb({type:`genfrac`,mode:n.mode,numer:i,denom:a,continued:l,hasBarLine:o,leftDelim:s,rightDelim:c,barSize:null},u)},htmlBuilder:Mb,mathmlBuilder:Nb}),mv({type:`infix`,names:[`\\over`,`\\choose`,`\\atop`,`\\brace`,`\\brack`],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:r}=e,i;switch(n){case`\\over`:i=`\\frac`;break;case`\\choose`:i=`\\binom`;break;case`\\atop`:i=`\\\\atopfrac`;break;case`\\brace`:i=`\\\\bracefrac`;break;case`\\brack`:i=`\\\\brackfrac`;break;default:throw Error(`Unrecognized infix genfrac command`)}return{type:`infix`,mode:t.mode,replaceWith:i,token:r}}});var Fb=[`display`,`text`,`script`,`scriptscript`],Ib=function(e){var t=null;return e.length>0&&(t=e,t=t===`.`?null:t),t};mv({type:`genfrac`,names:[`\\genfrac`],props:{numArgs:6,allowedInArgument:!0,argTypes:[`math`,`math`,`size`,`text`,`math`,`math`]},handler(e,t){var{parser:n}=e,r=t[4],i=t[5],a=gv(t[0]),o=a.type===`atom`&&a.family===`open`?Ib(a.text):null,s=gv(t[1]),c=s.type===`atom`&&s.family===`close`?Ib(s.text):null,l=cy(t[2],`size`),u,d=null;l.isBlank?u=!0:(d=l.value,u=d.number>0);var f=null,p=t[3];if(p.type===`ordgroup`){if(p.body.length>0){var m=cy(p.body[0],`textord`);f=Fb[Number(m.text)]}}else p=cy(p,`textord`),f=Fb[Number(p.text)];return Pb({type:`genfrac`,mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:o,rightDelim:c},f)}}),mv({type:`infix`,names:[`\\above`],props:{numArgs:1,argTypes:[`size`],infix:!0},handler(e,t){var{parser:n,funcName:r,token:i}=e;return{type:`infix`,mode:n.mode,replaceWith:`\\\\abovefrac`,size:cy(t[0],`size`).value,token:i}}}),mv({type:`genfrac`,names:[`\\\\abovefrac`],props:{numArgs:3,argTypes:[`math`,`size`,`math`]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=cy(t[1],`infix`).size;if(!a)throw Error(`\\\\abovefrac expected size, but got `+String(a));var o=t[2],s=a.number>0;return{type:`genfrac`,mode:n.mode,numer:i,denom:o,continued:!1,hasBarLine:s,barSize:a,leftDelim:null,rightDelim:null}}});var Lb=(e,t)=>{var n=t.style,r,i;e.type===`supsub`?(r=e.sup?Ov(e.sup,t.havingStyle(n.sup()),t):Ov(e.sub,t.havingStyle(n.sub()),t),i=cy(e.base,`horizBrace`)):i=cy(e,`horizBrace`);var a=Ov(i.base,t.havingBaseStyle(rg.DISPLAY)),o=ry(i,t),s=i.isOver?ev({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:.1},{type:`elem`,elem:o,wrapperClasses:[`svg-align`]}]}):ev({positionType:`bottom`,positionData:a.depth+.1+o.height,children:[{type:`elem`,elem:o,wrapperClasses:[`svg-align`]},{type:`kern`,size:.1},{type:`elem`,elem:a}]});if(r){var c=Z([`minner`,i.isOver?`mover`:`munder`],[s],t);s=i.isOver?ev({positionType:`firstBaseline`,children:[{type:`elem`,elem:c},{type:`kern`,size:.2},{type:`elem`,elem:r}]}):ev({positionType:`bottom`,positionData:c.depth+.2+r.height+r.depth,children:[{type:`elem`,elem:r},{type:`kern`,size:.2},{type:`elem`,elem:c}]})}return Z([`minner`,i.isOver?`mover`:`munder`],[s],t)};mv({type:`horizBrace`,names:[`\\overbrace`,`\\underbrace`,`\\overbracket`,`\\underbracket`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`horizBrace`,mode:n.mode,label:r,isOver:r.includes(`\\over`),base:t[0]}},htmlBuilder:Lb,mathmlBuilder:(e,t)=>{var n=ey(e.label);return new Q(e.isOver?`mover`:`munder`,[Uv(e.base,t),n])}}),mv({type:`href`,names:[`\\href`],props:{numArgs:2,argTypes:[`url`,`original`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=cy(t[0],`url`).url;return n.settings.isTrusted({command:`\\href`,url:i})?{type:`href`,mode:n.mode,href:i,body:_v(r)}:n.formatUnsupportedCmd(`\\href`)},htmlBuilder:(e,t)=>{var n=Sv(e.body,t,!1);return X_(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=Hv(e.body,t);return n instanceof Q||(n=new Q(`mrow`,[n])),n.setAttribute(`href`,e.href),n}}),mv({type:`href`,names:[`\\url`],props:{numArgs:1,argTypes:[`url`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=cy(t[0],`url`).url;if(!n.settings.isTrusted({command:`\\url`,url:r}))return n.formatUnsupportedCmd(`\\url`);for(var i=[],a=0;a<r.length;a++){var o=r[a];o===`~`&&(o=`\\textasciitilde`),i.push({type:`textord`,mode:`text`,text:o})}var s={type:`text`,mode:n.mode,font:`\\texttt`,body:i};return{type:`href`,mode:n.mode,href:r,body:_v(s)}}}),mv({type:`hbox`,names:[`\\hbox`],props:{numArgs:1,argTypes:[`text`],allowedInText:!0,primitive:!0},handler(e,t){var{parser:n}=e;return{type:`hbox`,mode:n.mode,body:_v(t[0])}},htmlBuilder(e,t){return Z_(Sv(e.body,t.withFont(``),!1))},mathmlBuilder(e,t){return new Q(`mrow`,Vv(e.body,t.withFont(``)))}}),mv({type:`html`,names:[`\\htmlClass`,`\\htmlId`,`\\htmlStyle`,`\\htmlData`],props:{numArgs:2,argTypes:[`raw`,`original`],allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,token:i}=e,a=cy(t[0],`raw`).string,o=t[1];n.settings.strict&&n.settings.reportNonstrict(`htmlExtension`,`HTML extension is disabled on strict mode`);var s,c={};switch(r){case`\\htmlClass`:c.class=a,s={command:`\\htmlClass`,class:a};break;case`\\htmlId`:c.id=a,s={command:`\\htmlId`,id:a};break;case`\\htmlStyle`:c.style=a,s={command:`\\htmlStyle`,style:a};break;case`\\htmlData`:for(var l=a.split(`,`),u=0;u<l.length;u++){var d=l[u],f=d.indexOf(`=`);if(f<0)throw new H(`\\htmlData key/value '`+d+`' missing equals sign`);var p=d.slice(0,f),m=d.slice(f+1);c[`data-`+p.trim()]=m}s={command:`\\htmlData`,attributes:c};break;default:throw Error(`Unrecognized html command`)}return n.settings.isTrusted(s)?{type:`html`,mode:n.mode,attributes:c,body:_v(o)}:n.formatUnsupportedCmd(r)},htmlBuilder:(e,t)=>{var n=Sv(e.body,t,!1),r=[`enclosing`];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=Z(r,n,t);for(var a in e.attributes)a!==`class`&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},mathmlBuilder:(e,t)=>Hv(e.body,t)}),mv({type:`htmlmathml`,names:[`\\html@mathml`],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`htmlmathml`,mode:n.mode,html:_v(t[0]),mathml:_v(t[1])}},htmlBuilder:(e,t)=>Z_(Sv(e.html,t,!1)),mathmlBuilder:(e,t)=>Hv(e.mathml,t)});var Rb=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:`bp`};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new H(`Invalid size: '`+e+`' in \\includegraphics`);var n={number:+(t[1]+t[2]),unit:t[3]};if(!Tg(n))throw new H(`Invalid unit: '`+n.unit+`' in \\includegraphics.`);return n};mv({type:`includegraphics`,names:[`\\includegraphics`],props:{numArgs:1,numOptionalArgs:1,argTypes:[`raw`,`url`],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,i={number:0,unit:`em`},a={number:.9,unit:`em`},o={number:0,unit:`em`},s=``;if(n[0])for(var c=cy(n[0],`raw`).string.split(`,`),l=0;l<c.length;l++){var u=c[l].split(`=`);if(u.length===2){var d=u[1].trim();switch(u[0].trim()){case`alt`:s=d;break;case`width`:i=Rb(d);break;case`height`:a=Rb(d);break;case`totalheight`:o=Rb(d);break;default:throw new H(`Invalid key: '`+u[0]+`' in \\includegraphics.`)}}}var f=cy(t[0],`url`).url;return s===``&&(s=f,s=s.replace(/^.*[\\/]/,``),s=s.substring(0,s.lastIndexOf(`.`))),r.settings.isTrusted({command:`\\includegraphics`,url:f})?{type:`includegraphics`,mode:r.mode,alt:s,width:i,height:a,totalheight:o,src:f}:r.formatUnsupportedCmd(`\\includegraphics`)},htmlBuilder:(e,t)=>{var n=Eg(e.height,t),r=0;e.totalheight.number>0&&(r=Eg(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=Eg(e.width,t));var a={height:U(n+r)};i>0&&(a.width=U(i)),r>0&&(a.verticalAlign=U(-r));var o=new Fg(e.src,e.alt,a);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new Q(`mglyph`,[]);n.setAttribute(`alt`,e.alt);var r=Eg(e.height,t),i=0;if(e.totalheight.number>0&&(i=Eg(e.totalheight,t)-r,n.setAttribute(`valign`,U(-i))),n.setAttribute(`height`,U(r+i)),e.width.number>0){var a=Eg(e.width,t);n.setAttribute(`width`,U(a))}return n.setAttribute(`src`,e.src),n}}),mv({type:`kern`,names:[`\\kern`,`\\mkern`,`\\hskip`,`\\mskip`],props:{numArgs:1,argTypes:[`size`],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=cy(t[0],`size`);if(n.settings.strict){var a=r[1]===`m`,o=i.value.unit===`mu`;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`)}return{type:`kern`,mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return tv(e.dimension,t)},mathmlBuilder(e,t){return new Nv(Eg(e.dimension,t))}}),mv({type:`lap`,names:[`\\mathllap`,`\\mathrlap`,`\\mathclap`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`lap`,mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment===`clap`?(n=Z([],[Ov(e.body,t)]),n=Z([`inner`],[n],t)):n=Z([`inner`],[Ov(e.body,t)]);var r=Z([`fix`],[]),i=Z([e.alignment],[n,r],t),a=Z([`strut`]);return a.style.height=U(i.height+i.depth),i.depth&&(a.style.verticalAlign=U(-i.depth)),i.children.unshift(a),i=Z([`thinbox`],[i],t),Z([`mord`,`vbox`],[i],t)},mathmlBuilder:(e,t)=>{var n=new Q(`mpadded`,[Uv(e.body,t)]);if(e.alignment!==`rlap`){var r=e.alignment===`llap`?`-1`:`-0.5`;n.setAttribute(`lspace`,r+`width`)}return n.setAttribute(`width`,`0px`),n}}),mv({type:`styling`,names:[`\\(`,`$`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode(`math`);var a=n===`\\(`?`\\)`:`$`,o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:`styling`,mode:r.mode,style:`text`,resetFont:!0,body:o}}}),mv({type:`text`,names:[`\\)`,`\\]`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new H(`Mismatched `+e.funcName)}});var zb=(e,t)=>{switch(t.style.size){case rg.DISPLAY.size:return e.display;case rg.TEXT.size:return e.text;case rg.SCRIPT.size:return e.script;case rg.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};mv({type:`mathchoice`,names:[`\\mathchoice`],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`mathchoice`,mode:n.mode,display:_v(t[0]),text:_v(t[1]),script:_v(t[2]),scriptscript:_v(t[3])}},htmlBuilder:(e,t)=>Z_(Sv(zb(e,t),t,!1)),mathmlBuilder:(e,t)=>Hv(zb(e,t),t)});var Bb=(e,t,n,r,i,a,o)=>{e=Z([],[e]);var s=n&&Ph(n),c,l;if(t){var u=Ov(t,r.havingStyle(i.sup()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=Ov(n,r.havingStyle(i.sub()),r);c={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}var f;if(l&&c)f=ev({positionType:`bottom`,positionData:r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:U(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:U(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else if(c)f=ev({positionType:`top`,positionData:e.height-o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:U(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e}]});else if(l)f=ev({positionType:`bottom`,positionData:e.depth+o,children:[{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:U(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else return e;var p=[f];if(c&&a!==0&&!s){var m=Z([`mspace`],[],r);m.style.marginRight=U(a),p.unshift(m)}return Z([`mop`,`op-limits`],p,r)},Vb=new Set([`\\smallint`]),Hb=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=cy(e.base,`op`),i=!0):a=cy(e,`op`);var o=t.style,s=!1;o.size===rg.DISPLAY.size&&a.symbol&&!Vb.has(a.name)&&(s=!0);var c,l;if(a.symbol){var u=s?`Size2-Regular`:`Size1-Regular`,d=``;if((a.name===`\\oiint`||a.name===`\\oiiint`)&&(d=a.name.slice(1),a.name=d===`oiint`?`\\iint`:`\\iiint`),c=V_(a.name,u,`math`,t,[`mop`,`op-symbol`,s?`large-op`:`small-op`]),l=c.italic,d.length>0){var f=av(d+`Size`+(s?`2`:`1`),t);c=ev({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:0},{type:`elem`,elem:f,shift:s?.08:0}]}),a.name=`\\`+d,c.classes.unshift(`mop`),c.italic=l}}else if(a.body){var p=Sv(a.body,t,!0);p.length===1&&p[0]instanceof Lg?(c=p[0],c.classes[0]=`mop`):c=Z([`mop`],p,t)}else{for(var m=[],h=1;h<a.name.length;h++)m.push(H_(a.name[h],a.mode,t));c=Z([`mop`],m,t)}var g=0,_=0;return(c instanceof Lg||a.name===`\\oiint`||a.name===`\\oiiint`)&&!a.suppressBaseShift&&(g=(c.height-c.depth)/2-t.fontMetrics().axisHeight,_=c.italic??0),i?Bb(c,n,r,t,o,_,g):(g&&(c.style.position=`relative`,c.style.top=U(g)),c)},Ub=(e,t)=>{var n;if(e.symbol)n=new Q(`mo`,[Iv(e.name,e.mode)]),Vb.has(e.name)&&n.setAttribute(`largeop`,`false`);else if(e.body)n=new Q(`mo`,Vv(e.body,t));else{n=new Q(`mi`,[new Mv(e.name.slice(1))]);var r=new Q(`mo`,[Iv(`⁡`,`text`)]);n=e.parentIsSupSub?new Q(`mrow`,[n,r]):jv([n,r])}return n},Wb={"∏":`\\prod`,"∐":`\\coprod`,"∑":`\\sum`,"⋀":`\\bigwedge`,"⋁":`\\bigvee`,"⋂":`\\bigcap`,"⋃":`\\bigcup`,"⨀":`\\bigodot`,"⨁":`\\bigoplus`,"⨂":`\\bigotimes`,"⨄":`\\biguplus`,"⨆":`\\bigsqcup`};mv({type:`op`,names:`\\coprod.\\bigvee.\\bigwedge.\\biguplus.\\bigcap.\\bigcup.\\intop.\\prod.\\sum.\\bigotimes.\\bigoplus.\\bigodot.\\bigsqcup.\\smallint.∏.∐.∑.⋀.⋁.⋂.⋃.⨀.⨁.⨂.⨄.⨆`.split(`.`),props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=r;return i.length===1&&(i=Wb[i]),{type:`op`,mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:Hb,mathmlBuilder:Ub}),mv({type:`op`,names:[`\\mathop`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`op`,mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:_v(r)}},htmlBuilder:Hb,mathmlBuilder:Ub});var Gb={"∫":`\\int`,"∬":`\\iint`,"∭":`\\iiint`,"∮":`\\oint`,"∯":`\\oiint`,"∰":`\\oiiint`};mv({type:`op`,names:`\\arcsin.\\arccos.\\arctan.\\arctg.\\arcctg.\\arg.\\ch.\\cos.\\cosec.\\cosh.\\cot.\\cotg.\\coth.\\csc.\\ctg.\\cth.\\deg.\\dim.\\exp.\\hom.\\ker.\\lg.\\ln.\\log.\\sec.\\sin.\\sinh.\\sh.\\tan.\\tanh.\\tg.\\th`.split(`.`),props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Hb,mathmlBuilder:Ub}),mv({type:`op`,names:[`\\det`,`\\gcd`,`\\inf`,`\\lim`,`\\max`,`\\min`,`\\Pr`,`\\sup`],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Hb,mathmlBuilder:Ub}),mv({type:`op`,names:[`\\int`,`\\iint`,`\\iiint`,`\\oint`,`\\oiint`,`\\oiiint`,`∫`,`∬`,`∭`,`∮`,`∯`,`∰`],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:n}=e,r=n;return r.length===1&&(r=Gb[r]),{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Hb,mathmlBuilder:Ub});var Kb=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=cy(e.base,`operatorname`),i=!0):a=cy(e,`operatorname`);var o;if(a.body.length>0){for(var s=Sv(a.body.map(e=>{var t=`text`in e?e.text:void 0;return typeof t==`string`?{type:`textord`,mode:e.mode,text:t}:e}),t.withFont(`mathrm`),!0),c=0;c<s.length;c++){var l=s[c];l instanceof Lg&&(l.text=l.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`))}o=Z([`mop`],s,t)}else o=Z([`mop`],[],t);return i?Bb(o,n,r,t,t.style,0,0):o};mv({type:`operatorname`,names:[`\\operatorname@`,`\\operatornamewithlimits`],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`operatorname`,mode:n.mode,body:_v(i),alwaysHandleSupSub:r===`\\operatornamewithlimits`,limits:!1,parentIsSupSub:!1}},htmlBuilder:Kb,mathmlBuilder:(e,t)=>{for(var n=Vv(e.body,t.withFont(`mathrm`)),r=!0,i=0;i<n.length;i++){var a=n[i];if(!(a instanceof Nv))if(a instanceof Q)switch(a.type){case`mi`:case`mn`:case`mspace`:case`mtext`:break;case`mo`:var o=a.children[0];a.children.length===1&&o instanceof Mv?o.text=o.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`):r=!1;break;default:r=!1}else r=!1}r&&(n=[new Mv(n.map(e=>e.toText()).join(``))]);var s=new Q(`mi`,n);s.setAttribute(`mathvariant`,`normal`);var c=new Q(`mo`,[Iv(`⁡`,`text`)]);return e.parentIsSupSub?new Q(`mrow`,[s,c]):jv([s,c])}}),$(`\\operatorname`,`\\@ifstar\\operatornamewithlimits\\operatorname@`),hv({type:`ordgroup`,htmlBuilder(e,t){return e.semisimple?Z_(Sv(e.body,t,!1)):Z([`mord`],Sv(e.body,t,!0),t)},mathmlBuilder(e,t){return Hv(e.body,t,!0)}}),mv({type:`overline`,names:[`\\overline`],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:`overline`,mode:n.mode,body:r}},htmlBuilder(e,t){var n=Ov(e.body,t.havingCrampedStyle()),r=Y_(`overline-line`,t),i=t.fontMetrics().defaultRuleThickness;return Z([`mord`,`overline`],[ev({positionType:`firstBaseline`,children:[{type:`elem`,elem:n},{type:`kern`,size:3*i},{type:`elem`,elem:r},{type:`kern`,size:i}]})],t)},mathmlBuilder(e,t){var n=new Q(`mo`,[new Mv(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new Q(`mover`,[Uv(e.body,t),n]);return r.setAttribute(`accent`,`true`),r}}),mv({type:`phantom`,names:[`\\phantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`phantom`,mode:n.mode,body:_v(r)}},htmlBuilder:(e,t)=>Z_(Sv(e.body,t.withPhantom(),!1)),mathmlBuilder:(e,t)=>new Q(`mphantom`,Vv(e.body,t))}),$(`\\hphantom`,`\\smash{\\phantom{#1}}`),mv({type:`vphantom`,names:[`\\vphantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`vphantom`,mode:n.mode,body:r}},htmlBuilder:(e,t)=>Z([`mord`,`rlap`],[Z([`inner`],[Ov(e.body,t.withPhantom())]),Z([`fix`],[])],t),mathmlBuilder:(e,t)=>{var n=new Q(`mpadded`,[new Q(`mphantom`,Vv(_v(e.body),t))]);return n.setAttribute(`width`,`0px`),n}}),mv({type:`raisebox`,names:[`\\raisebox`],props:{numArgs:2,argTypes:[`size`,`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e,r=cy(t[0],`size`).value,i=t[1];return{type:`raisebox`,mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=Ov(e.body,t);return ev({positionType:`shift`,positionData:-Eg(e.dy,t),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){var n=new Q(`mpadded`,[Uv(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute(`voffset`,r),n}}),mv({type:`internal`,names:[`\\relax`],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:`internal`,mode:t.mode}}}),mv({type:`rule`,names:[`\\rule`],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`size`,`size`,`size`]},handler(e,t,n){var{parser:r}=e,i=n[0],a=cy(t[0],`size`),o=cy(t[1],`size`);return{type:`rule`,mode:r.mode,shift:i&&cy(i,`size`).value,width:a.value,height:o.value}},htmlBuilder(e,t){var n=Z([`mord`,`rule`],[],t),r=Eg(e.width,t),i=Eg(e.height,t),a=e.shift?Eg(e.shift,t):0;return n.style.borderRightWidth=U(r),n.style.borderTopWidth=U(i),n.style.bottom=U(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=Eg(e.width,t),r=Eg(e.height,t),i=e.shift?Eg(e.shift,t):0,a=t.color&&t.getColor()||`black`,o=new Q(`mspace`);o.setAttribute(`mathbackground`,a),o.setAttribute(`width`,U(n)),o.setAttribute(`height`,U(r));var s=new Q(`mpadded`,[o]);return i>=0?s.setAttribute(`height`,U(i)):(s.setAttribute(`height`,U(i)),s.setAttribute(`depth`,U(-i))),s.setAttribute(`voffset`,U(i)),s}});function qb(e,t,n){for(var r=Sv(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,a=0;a<r.length;a++){var o=r[a].classes.indexOf(`sizing`);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}return Z_(r)}var Jb=[`\\tiny`,`\\sixptsize`,`\\scriptsize`,`\\footnotesize`,`\\small`,`\\normalsize`,`\\large`,`\\Large`,`\\LARGE`,`\\huge`,`\\Huge`];mv({type:`sizing`,names:Jb,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!1,n);return{type:`sizing`,mode:i.mode,size:Jb.indexOf(r)+1,body:a}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return qb(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=new Q(`mstyle`,Vv(e.body,n));return r.setAttribute(`mathsize`,U(n.sizeMultiplier)),r}}),mv({type:`smash`,names:[`\\smash`],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,i=!1,a=!1,o=n[0]&&cy(n[0],`ordgroup`);if(o)for(var s,c=0;c<o.body.length;++c){var l=o.body[c];if(s=ly(l).text,s===`t`)i=!0;else if(s===`b`)a=!0;else{i=!1,a=!1;break}}else i=!0,a=!0;var u=t[0];return{type:`smash`,mode:r.mode,body:u,smashHeight:i,smashDepth:a}},htmlBuilder:(e,t)=>{var n=Z([],[Ov(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return Z([`mord`,`smash`],[n],t);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);return Z([`mord`],[ev({positionType:`firstBaseline`,children:[{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=new Q(`mpadded`,[Uv(e.body,t)]);return e.smashHeight&&n.setAttribute(`height`,`0px`),e.smashDepth&&n.setAttribute(`depth`,`0px`),n}}),mv({type:`sqrt`,names:[`\\sqrt`],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,i=n[0],a=t[0];return{type:`sqrt`,mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=Ov(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=Q_(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.id<rg.TEXT.id&&(i=t.fontMetrics().xHeight);var a=r+i/4,{span:o,ruleWidth:s,advanceWidth:c}=qy(n.height+n.depth+a+r,t),l=o.height-s;l>n.height+n.depth+a&&(a=(a+l-n.height-n.depth)/2);var u=o.height-n.height-a-s;n.style.paddingLeft=U(c);var d=ev({positionType:`firstBaseline`,children:[{type:`elem`,elem:n,wrapperClasses:[`svg-align`]},{type:`kern`,size:-(n.height+u)},{type:`elem`,elem:o},{type:`kern`,size:s}]});if(e.index){var f=t.havingStyle(rg.SCRIPTSCRIPT),p=Ov(e.index,f,t);return Z([`mord`,`sqrt`],[Z([`root`],[ev({positionType:`shift`,positionData:-(.6*(d.height-d.depth)),children:[{type:`elem`,elem:p}]})]),d],t)}else return Z([`mord`,`sqrt`],[d],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new Q(`mroot`,[Uv(n,t),Uv(r,t)]):new Q(`msqrt`,[Uv(n,t)])}});var Yb={display:rg.DISPLAY,text:rg.TEXT,script:rg.SCRIPT,scriptscript:rg.SCRIPTSCRIPT};function Xb(e){return e in Yb}mv({type:`styling`,names:[`\\displaystyle`,`\\textstyle`,`\\scriptstyle`,`\\scriptscriptstyle`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);if(!Xb(o))throw Error(`Unknown style: `+o);return{type:`styling`,mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var n=Yb[e.style],r=t.havingStyle(n);return e.resetFont&&(r=r.withFont(``)),qb(e.body,r,t)},mathmlBuilder(e,t){var n=Yb[e.style],r=t.havingStyle(n);e.resetFont&&(r=r.withFont(``));var i=new Q(`mstyle`,Vv(e.body,r)),a={display:[`0`,`true`],text:[`0`,`false`],script:[`1`,`false`],scriptscript:[`2`,`false`]}[e.style];return i.setAttribute(`scriptlevel`,a[0]),i.setAttribute(`displaystyle`,a[1]),i}});var Zb=function(e,t){var n=e.base;return n?n.type===`op`?n.limits&&(t.style.size===rg.DISPLAY.size||n.alwaysHandleSupSub)?Hb:null:n.type===`operatorname`?n.alwaysHandleSupSub&&(t.style.size===rg.DISPLAY.size||n.limits)?Kb:null:n.type===`accent`?Ph(n.base)?fy:null:n.type===`horizBrace`&&!e.sub===n.isOver?Lb:null:null};hv({type:`supsub`,htmlBuilder(e,t){var n=Zb(e,t);if(n)return n(e,t);var{base:r,sup:i,sub:a}=e,o=Ov(r,t),s,c,l=t.fontMetrics(),u=0,d=0,f=r&&Ph(r);if(i){var p=t.havingStyle(t.style.sup());s=Ov(i,p,t),f||(u=o.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(a){var m=t.havingStyle(t.style.sub());c=Ov(a,m,t),f||(d=o.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}var h=t.style===rg.DISPLAY?l.sup1:t.style.cramped?l.sup3:l.sup2,g=t.sizeMultiplier,_=U(.5/l.ptPerEm/g),v=null;if(c){var y=e.base&&e.base.type===`op`&&e.base.name&&(e.base.name===`\\oiint`||e.base.name===`\\oiiint`);(o instanceof Lg||y)&&(v=U(-(o.italic??0)))}var b;if(s&&c){u=Math.max(u,h,s.depth+.25*l.xHeight),d=Math.max(d,l.sub2);var x=4*l.defaultRuleThickness;if(u-s.depth-(c.height-d)<x){d=x-(u-s.depth)+c.height;var S=.8*l.xHeight-(u-s.depth);S>0&&(u+=S,d-=S)}b=ev({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:d,marginRight:_,marginLeft:v},{type:`elem`,elem:s,shift:-u,marginRight:_}]})}else if(c)d=Math.max(d,l.sub1,c.height-.8*l.xHeight),b=ev({positionType:`shift`,positionData:d,children:[{type:`elem`,elem:c,marginLeft:v,marginRight:_}]});else if(s)u=Math.max(u,h,s.depth+.25*l.xHeight),b=ev({positionType:`shift`,positionData:-u,children:[{type:`elem`,elem:s,marginRight:_}]});else throw Error(`supsub must have either sup or sub.`);return Z([Ev(o,`right`)||`mord`],[o,Z([`msupsub`],[b])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type===`horizBrace`&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type===`op`||e.base.type===`operatorname`)&&(e.base.parentIsSupSub=!0);var a=[Uv(e.base,t)];e.sub&&a.push(Uv(e.sub,t)),e.sup&&a.push(Uv(e.sup,t));var o;if(n)o=r?`mover`:`munder`;else if(!e.sub){var s=e.base;o=s&&s.type===`op`&&s.limits&&(t.style===rg.DISPLAY||s.alwaysHandleSupSub)||s&&s.type===`operatorname`&&s.alwaysHandleSupSub&&(s.limits||t.style===rg.DISPLAY)?`mover`:`msup`}else if(e.sup){var c=e.base;o=c&&c.type===`op`&&c.limits&&t.style===rg.DISPLAY||c&&c.type===`operatorname`&&c.alwaysHandleSupSub&&(t.style===rg.DISPLAY||c.limits)?`munderover`:`msubsup`}else{var l=e.base;o=l&&l.type===`op`&&l.limits&&(t.style===rg.DISPLAY||l.alwaysHandleSupSub)||l&&l.type===`operatorname`&&l.alwaysHandleSupSub&&(l.limits||t.style===rg.DISPLAY)?`munder`:`msub`}return new Q(o,a)}}),hv({type:`atom`,htmlBuilder(e,t){return H_(e.text,e.mode,t,[`m`+e.family])},mathmlBuilder(e,t){var n=new Q(`mo`,[Iv(e.text,e.mode)]);if(e.family===`bin`){var r=zv(e,t);r===`bold-italic`&&n.setAttribute(`mathvariant`,r)}else e.family===`punct`?n.setAttribute(`separator`,`true`):(e.family===`open`||e.family===`close`)&&n.setAttribute(`stretchy`,`false`);return n}});var Qb={mi:`italic`,mn:`normal`,mtext:`normal`};hv({type:`mathord`,htmlBuilder(e,t){return W_(e,t,`mathord`)},mathmlBuilder(e,t){var n=new Q(`mi`,[Iv(e.text,e.mode,t)]),r=zv(e,t)||`italic`;return r!==Qb[n.type]&&n.setAttribute(`mathvariant`,r),n}}),hv({type:`textord`,htmlBuilder(e,t){return W_(e,t,`textord`)},mathmlBuilder(e,t){var n=Iv(e.text,e.mode,t),r=zv(e,t)||`normal`,i=e.mode===`text`?new Q(`mtext`,[n]):/[0-9]/.test(e.text)?new Q(`mn`,[n]):e.text===`\\prime`?new Q(`mo`,[n]):new Q(`mi`,[n]);return r!==Qb[i.type]&&i.setAttribute(`mathvariant`,r),i}});var $b={"\\nobreak":`nobreak`,"\\allowbreak":`allowbreak`},ex={" ":{},"\\ ":{},"~":{className:`nobreak`},"\\space":{},"\\nobreakspace":{className:`nobreak`}};hv({type:`spacing`,htmlBuilder(e,t){if(ex.hasOwnProperty(e.text)){var n=ex[e.text].className||``;if(e.mode===`text`){var r=W_(e,t,`textord`);return r.classes.push(n),r}else return Z([`mspace`,n],[H_(e.text,e.mode,t)],t)}else if($b.hasOwnProperty(e.text))return Z([`mspace`,$b[e.text]],[],t);else throw new H(`Unknown type of space "`+e.text+`"`)},mathmlBuilder(e,t){var n;if(ex.hasOwnProperty(e.text))n=new Q(`mtext`,[new Mv(`\xA0`)]);else if($b.hasOwnProperty(e.text))return new Q(`mspace`);else throw new H(`Unknown type of space "`+e.text+`"`);return n}});var tx=()=>{var e=new Q(`mtd`,[]);return e.setAttribute(`width`,`50%`),e};hv({type:`tag`,mathmlBuilder(e,t){var n=new Q(`mtable`,[new Q(`mtr`,[tx(),new Q(`mtd`,[Hv(e.body,t)]),tx(),new Q(`mtd`,[Hv(e.tag,t)])])]);return n.setAttribute(`width`,`100%`),n}});var nx={"\\text":void 0,"\\textrm":`textrm`,"\\textsf":`textsf`,"\\texttt":`texttt`,"\\textnormal":`textrm`},rx={"\\textbf":`textbf`,"\\textmd":`textmd`},ix={"\\textit":`textit`,"\\textup":`textup`},ax=(e,t)=>{var n=e.font;return n?nx[n]?t.withTextFontFamily(nx[n]):rx[n]?t.withTextFontWeight(rx[n]):n===`\\emph`?t.fontShape===`textit`?t.withTextFontShape(`textup`):t.withTextFontShape(`textit`):t.withTextFontShape(ix[n]):t};mv({type:`text`,names:[`\\text`,`\\textrm`,`\\textsf`,`\\texttt`,`\\textnormal`,`\\textbf`,`\\textmd`,`\\textit`,`\\textup`,`\\emph`],props:{numArgs:1,argTypes:[`text`],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`text`,mode:n.mode,body:_v(i),font:r}},htmlBuilder(e,t){var n=ax(e,t);return Z([`mord`,`text`],Sv(e.body,n,!0),n)},mathmlBuilder(e,t){var n=ax(e,t);return Hv(e.body,n)}}),mv({type:`underline`,names:[`\\underline`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`underline`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Ov(e.body,t),r=Y_(`underline-line`,t),i=t.fontMetrics().defaultRuleThickness;return Z([`mord`,`underline`],[ev({positionType:`top`,positionData:n.height,children:[{type:`kern`,size:i},{type:`elem`,elem:r},{type:`kern`,size:3*i},{type:`elem`,elem:n}]})],t)},mathmlBuilder(e,t){var n=new Q(`mo`,[new Mv(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new Q(`munder`,[Uv(e.body,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),mv({type:`vcenter`,names:[`\\vcenter`],props:{numArgs:1,argTypes:[`original`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`vcenter`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Ov(e.body,t),r=t.fontMetrics().axisHeight;return ev({positionType:`shift`,positionData:.5*(n.height-r-(n.depth+r)),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){return new Q(`mrow`,[new Q(`mpadded`,[Uv(e.body,t)],[`vcenter`])])}}),mv({type:`verb`,names:[`\\verb`],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new H(`\\verb ended by end of line instead of matching delimiter`)},htmlBuilder(e,t){for(var n=ox(e),r=[],i=t.havingStyle(t.style.text()),a=0;a<n.length;a++){var o=n[a];o===`~`&&(o=`\\textasciitilde`),r.push(V_(o,`Typewriter-Regular`,e.mode,i,[`mord`,`texttt`]))}return Z([`mord`,`text`].concat(i.sizingClasses(t)),K_(r),i)},mathmlBuilder(e,t){var n=new Q(`mtext`,[new Mv(ox(e))]);return n.setAttribute(`mathvariant`,`monospace`),n}});var ox=e=>e.body.replace(/ /g,e.star?`␣`:`\xA0`),sx=dv,cx=`[ \r
524
+ ]`,lx=`\\\\[a-zA-Z@]+`,ux=`\\\\[^\ud800-\udfff]`,dx=`(`+lx+`)`+cx+`*`,fx=`\\\\(
525
+ |[ \r ]+
526
+ ?)[ \r ]*`,px=`[̀-ͯ]`,mx=RegExp(px+`+$`),hx=`(`+cx+`+)|`+(fx+`|`)+`([!-\\[\\]-‧‪-퟿豈-￿]`+(px+`*`)+`|[\ud800-\udbff][\udc00-\udfff]`+(px+`*`)+`|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5`+(`|`+dx)+(`|`+ux+`)`),gx=class{constructor(e,t){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(hx,`g`),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new _b(`EOF`,new gb(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new H(`Unexpected character: '`+e[t]+`'`,new _b(e[t],new gb(this,t,t+1)));var r=n[6]||n[3]||(n[2]?`\\ `:` `);if(this.catcodes[r]===14){var i=e.indexOf(`
527
+ `,this.tokenRegex.lastIndex);return i===-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=i+1,this.lex()}return new _b(r,new gb(this,t,this.tokenRegex.lastIndex))}},_x=class{constructor(e,t){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=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new H(`Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug`);var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}},vx=hb;$(`\\noexpand`,function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),$(`\\expandafter`,function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),$(`\\@firstoftwo`,function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),$(`\\@secondoftwo`,function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),$(`\\@ifnextchar`,function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),$(`\\@ifstar`,`\\@ifnextchar *{\\@firstoftwo{#1}}`),$(`\\TextOrMath`,function(e){var t=e.consumeArgs(2);return e.mode===`text`?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var yx={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};$(`\\char`,function(e){var t=e.popToken(),n,r=0;if(t.text===`'`)n=8,t=e.popToken();else if(t.text===`"`)n=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]===`\\`)r=t.text.charCodeAt(1);else if(t.text===`EOF`)throw new H("\\char` missing argument");else r=t.text.charCodeAt(0);else n=10;if(n){if(r=yx[t.text],r==null||r>=n)throw new H(`Invalid base-`+n+` digit `+t.text);for(var i;(i=yx[e.future().text])!=null&&i<n;)r*=n,r+=i,e.popToken()}return`\\@char{`+r+`}`});var bx=(e,t,n,r)=>{var i=e.consumeArg().tokens;if(i.length!==1)throw new H(`\\newcommand's first argument must be a macro name`);var a=i[0].text,o=e.isDefined(a);if(o&&!t)throw new H(`\\newcommand{`+a+`} attempting to redefine `+(a+`; use \\renewcommand`));if(!o&&!n)throw new H(`\\renewcommand{`+a+`} when command `+a+` does not yet exist; use \\newcommand`);var s=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text===`[`){for(var c=``,l=e.expandNextToken();l.text!==`]`&&l.text!==`EOF`;)c+=l.text,l=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new H(`Invalid number of arguments: `+c);s=parseInt(c),i=e.consumeArg().tokens}return o&&r||e.macros.set(a,{tokens:i,numArgs:s}),``};$(`\\newcommand`,e=>bx(e,!1,!0,!1)),$(`\\renewcommand`,e=>bx(e,!0,!1,!1)),$(`\\providecommand`,e=>bx(e,!0,!0,!0)),$(`\\message`,e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join(``)),``}),$(`\\errmessage`,e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join(``)),``}),$(`\\show`,e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),sx[n],Zg.math[n],Zg.text[n]),``}),$(`\\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}}`);var xx={",":`\\dotsc`,"\\not":`\\dotsb`,"+":`\\dotsb`,"=":`\\dotsb`,"<":`\\dotsb`,">":`\\dotsb`,"-":`\\dotsb`,"*":`\\dotsb`,":":`\\dotsb`,"\\DOTSB":`\\dotsb`,"\\coprod":`\\dotsb`,"\\bigvee":`\\dotsb`,"\\bigwedge":`\\dotsb`,"\\biguplus":`\\dotsb`,"\\bigcap":`\\dotsb`,"\\bigcup":`\\dotsb`,"\\prod":`\\dotsb`,"\\sum":`\\dotsb`,"\\bigotimes":`\\dotsb`,"\\bigoplus":`\\dotsb`,"\\bigodot":`\\dotsb`,"\\bigsqcup":`\\dotsb`,"\\And":`\\dotsb`,"\\longrightarrow":`\\dotsb`,"\\Longrightarrow":`\\dotsb`,"\\longleftarrow":`\\dotsb`,"\\Longleftarrow":`\\dotsb`,"\\longleftrightarrow":`\\dotsb`,"\\Longleftrightarrow":`\\dotsb`,"\\mapsto":`\\dotsb`,"\\longmapsto":`\\dotsb`,"\\hookrightarrow":`\\dotsb`,"\\doteq":`\\dotsb`,"\\mathbin":`\\dotsb`,"\\mathrel":`\\dotsb`,"\\relbar":`\\dotsb`,"\\Relbar":`\\dotsb`,"\\xrightarrow":`\\dotsb`,"\\xleftarrow":`\\dotsb`,"\\DOTSI":`\\dotsi`,"\\int":`\\dotsi`,"\\oint":`\\dotsi`,"\\iint":`\\dotsi`,"\\iiint":`\\dotsi`,"\\iiiint":`\\dotsi`,"\\idotsint":`\\dotsi`,"\\DOTSX":`\\dotsx`},Sx=new Set([`bin`,`rel`]);$(`\\dots`,function(e){var t=`\\dotso`,n=e.expandAfterFuture().text;return n in xx?t=xx[n]:(n.slice(0,4)===`\\not`||n in Zg.math&&Sx.has(Zg.math[n].group))&&(t=`\\dotsb`),t});var Cx={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};$(`\\dotso`,function(e){return e.future().text in Cx?`\\ldots\\,`:`\\ldots`}),$(`\\dotsc`,function(e){var t=e.future().text;return t in Cx&&t!==`,`?`\\ldots\\,`:`\\ldots`}),$(`\\cdots`,function(e){return e.future().text in Cx?`\\@cdots\\,`:`\\@cdots`}),$(`\\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=>{if(e.macros.get(`\\df@tag`))throw new H(`Multiple \\tag`);return`\\gdef\\df@tag{\\text{#1}}`}),$(`\\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}}`);var wx=U(Wg[`Main-Regular`][84][1]-.7*Wg[`Main-Regular`][65][1]);$(`\\LaTeX`,`\\textrm{\\html@mathml{`+(`L\\kern-.36em\\raisebox{`+wx+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{LaTeX}}`),$(`\\KaTeX`,`\\textrm{\\html@mathml{`+(`K\\kern-.17em\\raisebox{`+wx+`}{\\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`);var Tx=e=>t=>{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(`\\|`);t.macros.beginGroup();var c=t=>n=>{e&&(n.macros.set(`|`,o),i.length&&n.macros.set(`\\|`,s));var a=t;return!t&&i.length&&n.future().text===`|`&&(n.popToken(),a=!0),{tokens:a?i:r,numArgs:0}};t.macros.set(`|`,c(!1)),i.length&&t.macros.set(`\\|`,c(!0));var l=t.consumeArg().tokens,u=t.expandTokens([...a,...l,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};$(`\\bra@ket`,Tx(!1)),$(`\\bra@set`,Tx(!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}`);var Ex={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Dx=class{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new _x(vx,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new gx(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!==`[`)return null;t=this.popToken(),{tokens:r,end:n}=this.consumeArg([`]`])}else ({tokens:r,start:t,end:n}=this.consumeArg());return this.pushToken(new _b(`EOF`,n.loc)),this.pushTokens(r),new _b(``,gb.range(t,n))}consumeSpaces(){for(;this.future().text===` `;)this.stack.pop()}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r=this.future(),i,a=0,o=0;do{if(i=this.popToken(),t.push(i),i.text===`{`)++a;else if(i.text===`}`){if(--a,a===-1)throw new H(`Extra }`,i)}else if(i.text===`EOF`)throw new H(`Unexpected end of input in a macro argument, expected '`+(e&&n?e[o]:`}`)+`'`,i);if(e&&n)if((a===0||a===1&&e[o]===`{`)&&i.text===e[o]){if(++o,o===e.length){t.splice(-o,o);break}}else o=0}while(a!==0||n);return r.text===`{`&&t[t.length-1].text===`}`&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:i}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new H(`The length of delimiters doesn't match the number of args!`);for(var n=t[0],r=0;r<n.length;r++){var i=this.popToken();if(n[r]!==i.text)throw new H(`Use of the macro doesn't match its definition`,i)}}for(var a=[],o=0;o<e;o++)a.push(this.consumeArg(t&&t[o+1]).tokens);return a}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new H(`Too many expansions: infinite loop or need to increase maxExpand setting`)}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]===`\\`&&!this.isDefined(n))throw new H(`Undefined control sequence: `+n);return this.pushToken(t),!1}this.countExpansion(1);var i=r.tokens,a=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var s=i[o];if(s.text===`#`){if(o===0)throw new H(`Incomplete placeholder at end of macro body`,s);if(s=i[--o],s.text===`#`)i.splice(o+1,1);else if(/^[1-9]$/.test(s.text))i.splice(o,2,...a[s.text-1]);else throw new H(`Not a valid argument number`,s)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text=`\\relax`),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new _b(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&=(r.noexpand=!1,!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(e=>e.text).join(``)}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t==`function`?t(this):t;if(typeof r==`string`){var i=0;if(r.includes(`#`))for(var a=r.replace(/##/g,``);a.includes(`#`+(i+1));)++i;for(var o=new gx(r,this.settings),s=[],c=o.lex();c.text!==`EOF`;)s.push(c),c=o.lex();return s.reverse(),{tokens:s,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||sx.hasOwnProperty(e)||Zg.math.hasOwnProperty(e)||Zg.text.hasOwnProperty(e)||Ex.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t==null?sx.hasOwnProperty(e)&&!sx[e].primitive:typeof t==`string`||typeof t==`function`||!t.unexpandable}},Ox=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,kx=Object.freeze({"₊":`+`,"₋":`-`,"₌":`=`,"₍":`(`,"₎":`)`,"₀":`0`,"₁":`1`,"₂":`2`,"₃":`3`,"₄":`4`,"₅":`5`,"₆":`6`,"₇":`7`,"₈":`8`,"₉":`9`,ₐ:`a`,ₑ:`e`,ₕ:`h`,ᵢ:`i`,ⱼ:`j`,ₖ:`k`,ₗ:`l`,ₘ:`m`,ₙ:`n`,ₒ:`o`,ₚ:`p`,ᵣ:`r`,ₛ:`s`,ₜ:`t`,ᵤ:`u`,ᵥ:`v`,ₓ:`x`,ᵦ:`β`,ᵧ:`γ`,ᵨ:`ρ`,ᵩ:`ϕ`,ᵪ:`χ`,"⁺":`+`,"⁻":`-`,"⁼":`=`,"⁽":`(`,"⁾":`)`,"⁰":`0`,"¹":`1`,"²":`2`,"³":`3`,"⁴":`4`,"⁵":`5`,"⁶":`6`,"⁷":`7`,"⁸":`8`,"⁹":`9`,ᴬ:`A`,ᴮ:`B`,ᴰ:`D`,ᴱ:`E`,ᴳ:`G`,ᴴ:`H`,ᴵ:`I`,ᴶ:`J`,ᴷ:`K`,ᴸ:`L`,ᴹ:`M`,ᴺ:`N`,ᴼ:`O`,ᴾ:`P`,ᴿ:`R`,ᵀ:`T`,ᵁ:`U`,ⱽ:`V`,ᵂ:`W`,ᵃ:`a`,ᵇ:`b`,ᶜ:`c`,ᵈ:`d`,ᵉ:`e`,ᶠ:`f`,ᵍ:`g`,ʰ:`h`,ⁱ:`i`,ʲ:`j`,ᵏ:`k`,ˡ:`l`,ᵐ:`m`,ⁿ:`n`,ᵒ:`o`,ᵖ:`p`,ʳ:`r`,ˢ:`s`,ᵗ:`t`,ᵘ:`u`,ᵛ:`v`,ʷ:`w`,ˣ:`x`,ʸ:`y`,ᶻ:`z`,ᵝ:`β`,ᵞ:`γ`,ᵟ:`δ`,ᵠ:`ϕ`,ᵡ:`χ`,ᶿ:`θ`}),Ax={"́":{text:`\\'`,math:`\\acute`},"̀":{text:"\\`",math:`\\grave`},"̈":{text:`\\"`,math:`\\ddot`},"̃":{text:`\\~`,math:`\\tilde`},"̄":{text:`\\=`,math:`\\bar`},"̆":{text:`\\u`,math:`\\breve`},"̌":{text:`\\v`,math:`\\check`},"̂":{text:`\\^`,math:`\\hat`},"̇":{text:`\\.`,math:`\\dot`},"̊":{text:`\\r`,math:`\\mathring`},"̋":{text:`\\H`},"̧":{text:`\\c`}},jx={á:`á`,à:`à`,ä:`ä`,ǟ:`ǟ`,ã:`ã`,ā:`ā`,ă:`ă`,ắ:`ắ`,ằ:`ằ`,ẵ:`ẵ`,ǎ:`ǎ`,â:`â`,ấ:`ấ`,ầ:`ầ`,ẫ:`ẫ`,ȧ:`ȧ`,ǡ:`ǡ`,å:`å`,ǻ:`ǻ`,ḃ:`ḃ`,ć:`ć`,ḉ:`ḉ`,č:`č`,ĉ:`ĉ`,ċ:`ċ`,ç:`ç`,ď:`ď`,ḋ:`ḋ`,ḑ:`ḑ`,é:`é`,è:`è`,ë:`ë`,ẽ:`ẽ`,ē:`ē`,ḗ:`ḗ`,ḕ:`ḕ`,ĕ:`ĕ`,ḝ:`ḝ`,ě:`ě`,ê:`ê`,ế:`ế`,ề:`ề`,ễ:`ễ`,ė:`ė`,ȩ:`ȩ`,ḟ:`ḟ`,ǵ:`ǵ`,ḡ:`ḡ`,ğ:`ğ`,ǧ:`ǧ`,ĝ:`ĝ`,ġ:`ġ`,ģ:`ģ`,ḧ:`ḧ`,ȟ:`ȟ`,ĥ:`ĥ`,ḣ:`ḣ`,ḩ:`ḩ`,í:`í`,ì:`ì`,ï:`ï`,ḯ:`ḯ`,ĩ:`ĩ`,ī:`ī`,ĭ:`ĭ`,ǐ:`ǐ`,î:`î`,ǰ:`ǰ`,ĵ:`ĵ`,ḱ:`ḱ`,ǩ:`ǩ`,ķ:`ķ`,ĺ:`ĺ`,ľ:`ľ`,ļ:`ļ`,ḿ:`ḿ`,ṁ:`ṁ`,ń:`ń`,ǹ:`ǹ`,ñ:`ñ`,ň:`ň`,ṅ:`ṅ`,ņ:`ņ`,ó:`ó`,ò:`ò`,ö:`ö`,ȫ:`ȫ`,õ:`õ`,ṍ:`ṍ`,ṏ:`ṏ`,ȭ:`ȭ`,ō:`ō`,ṓ:`ṓ`,ṑ:`ṑ`,ŏ:`ŏ`,ǒ:`ǒ`,ô:`ô`,ố:`ố`,ồ:`ồ`,ỗ:`ỗ`,ȯ:`ȯ`,ȱ:`ȱ`,ő:`ő`,ṕ:`ṕ`,ṗ:`ṗ`,ŕ:`ŕ`,ř:`ř`,ṙ:`ṙ`,ŗ:`ŗ`,ś:`ś`,ṥ:`ṥ`,š:`š`,ṧ:`ṧ`,ŝ:`ŝ`,ṡ:`ṡ`,ş:`ş`,ẗ:`ẗ`,ť:`ť`,ṫ:`ṫ`,ţ:`ţ`,ú:`ú`,ù:`ù`,ü:`ü`,ǘ:`ǘ`,ǜ:`ǜ`,ǖ:`ǖ`,ǚ:`ǚ`,ũ:`ũ`,ṹ:`ṹ`,ū:`ū`,ṻ:`ṻ`,ŭ:`ŭ`,ǔ:`ǔ`,û:`û`,ů:`ů`,ű:`ű`,ṽ:`ṽ`,ẃ:`ẃ`,ẁ:`ẁ`,ẅ:`ẅ`,ŵ:`ŵ`,ẇ:`ẇ`,ẘ:`ẘ`,ẍ:`ẍ`,ẋ:`ẋ`,ý:`ý`,ỳ:`ỳ`,ÿ:`ÿ`,ỹ:`ỹ`,ȳ:`ȳ`,ŷ:`ŷ`,ẏ:`ẏ`,ẙ:`ẙ`,ź:`ź`,ž:`ž`,ẑ:`ẑ`,ż:`ż`,Á:`Á`,À:`À`,Ä:`Ä`,Ǟ:`Ǟ`,Ã:`Ã`,Ā:`Ā`,Ă:`Ă`,Ắ:`Ắ`,Ằ:`Ằ`,Ẵ:`Ẵ`,Ǎ:`Ǎ`,Â:`Â`,Ấ:`Ấ`,Ầ:`Ầ`,Ẫ:`Ẫ`,Ȧ:`Ȧ`,Ǡ:`Ǡ`,Å:`Å`,Ǻ:`Ǻ`,Ḃ:`Ḃ`,Ć:`Ć`,Ḉ:`Ḉ`,Č:`Č`,Ĉ:`Ĉ`,Ċ:`Ċ`,Ç:`Ç`,Ď:`Ď`,Ḋ:`Ḋ`,Ḑ:`Ḑ`,É:`É`,È:`È`,Ë:`Ë`,Ẽ:`Ẽ`,Ē:`Ē`,Ḗ:`Ḗ`,Ḕ:`Ḕ`,Ĕ:`Ĕ`,Ḝ:`Ḝ`,Ě:`Ě`,Ê:`Ê`,Ế:`Ế`,Ề:`Ề`,Ễ:`Ễ`,Ė:`Ė`,Ȩ:`Ȩ`,Ḟ:`Ḟ`,Ǵ:`Ǵ`,Ḡ:`Ḡ`,Ğ:`Ğ`,Ǧ:`Ǧ`,Ĝ:`Ĝ`,Ġ:`Ġ`,Ģ:`Ģ`,Ḧ:`Ḧ`,Ȟ:`Ȟ`,Ĥ:`Ĥ`,Ḣ:`Ḣ`,Ḩ:`Ḩ`,Í:`Í`,Ì:`Ì`,Ï:`Ï`,Ḯ:`Ḯ`,Ĩ:`Ĩ`,Ī:`Ī`,Ĭ:`Ĭ`,Ǐ:`Ǐ`,Î:`Î`,İ:`İ`,Ĵ:`Ĵ`,Ḱ:`Ḱ`,Ǩ:`Ǩ`,Ķ:`Ķ`,Ĺ:`Ĺ`,Ľ:`Ľ`,Ļ:`Ļ`,Ḿ:`Ḿ`,Ṁ:`Ṁ`,Ń:`Ń`,Ǹ:`Ǹ`,Ñ:`Ñ`,Ň:`Ň`,Ṅ:`Ṅ`,Ņ:`Ņ`,Ó:`Ó`,Ò:`Ò`,Ö:`Ö`,Ȫ:`Ȫ`,Õ:`Õ`,Ṍ:`Ṍ`,Ṏ:`Ṏ`,Ȭ:`Ȭ`,Ō:`Ō`,Ṓ:`Ṓ`,Ṑ:`Ṑ`,Ŏ:`Ŏ`,Ǒ:`Ǒ`,Ô:`Ô`,Ố:`Ố`,Ồ:`Ồ`,Ỗ:`Ỗ`,Ȯ:`Ȯ`,Ȱ:`Ȱ`,Ő:`Ő`,Ṕ:`Ṕ`,Ṗ:`Ṗ`,Ŕ:`Ŕ`,Ř:`Ř`,Ṙ:`Ṙ`,Ŗ:`Ŗ`,Ś:`Ś`,Ṥ:`Ṥ`,Š:`Š`,Ṧ:`Ṧ`,Ŝ:`Ŝ`,Ṡ:`Ṡ`,Ş:`Ş`,Ť:`Ť`,Ṫ:`Ṫ`,Ţ:`Ţ`,Ú:`Ú`,Ù:`Ù`,Ü:`Ü`,Ǘ:`Ǘ`,Ǜ:`Ǜ`,Ǖ:`Ǖ`,Ǚ:`Ǚ`,Ũ:`Ũ`,Ṹ:`Ṹ`,Ū:`Ū`,Ṻ:`Ṻ`,Ŭ:`Ŭ`,Ǔ:`Ǔ`,Û:`Û`,Ů:`Ů`,Ű:`Ű`,Ṽ:`Ṽ`,Ẃ:`Ẃ`,Ẁ:`Ẁ`,Ẅ:`Ẅ`,Ŵ:`Ŵ`,Ẇ:`Ẇ`,Ẍ:`Ẍ`,Ẋ:`Ẋ`,Ý:`Ý`,Ỳ:`Ỳ`,Ÿ:`Ÿ`,Ỹ:`Ỹ`,Ȳ:`Ȳ`,Ŷ:`Ŷ`,Ẏ:`Ẏ`,Ź:`Ź`,Ž:`Ž`,Ẑ:`Ẑ`,Ż:`Ż`,ά:`ά`,ὰ:`ὰ`,ᾱ:`ᾱ`,ᾰ:`ᾰ`,έ:`έ`,ὲ:`ὲ`,ή:`ή`,ὴ:`ὴ`,ί:`ί`,ὶ:`ὶ`,ϊ:`ϊ`,ΐ:`ΐ`,ῒ:`ῒ`,ῑ:`ῑ`,ῐ:`ῐ`,ό:`ό`,ὸ:`ὸ`,ύ:`ύ`,ὺ:`ὺ`,ϋ:`ϋ`,ΰ:`ΰ`,ῢ:`ῢ`,ῡ:`ῡ`,ῠ:`ῠ`,ώ:`ώ`,ὼ:`ὼ`,Ύ:`Ύ`,Ὺ:`Ὺ`,Ϋ:`Ϋ`,Ῡ:`Ῡ`,Ῠ:`Ῠ`,Ώ:`Ώ`,Ὼ:`Ὼ`},Mx=class e{constructor(e,t){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 Dx(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new H(`Expected '`+e+`', got '`+this.fetch().text+`'`,this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken??=this.gullet.expandNextToken(),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set(`\\color`,`\\textcolor`);try{var e=this.parseExpression(!1);return this.expect(`EOF`),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new _b(`}`)),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect(`}`),this.nextToken=t,n}parseExpression(t,n){for(var r=[];;){this.mode===`math`&&this.consumeSpaces();var i=this.fetch();if(e.endOfExpression.has(i.text)||n&&i.text===n||t&&sx[i.text]&&sx[i.text].infix)break;var a=this.parseAtom(n);if(!a)break;a.type!==`internal`&&r.push(a)}return this.mode===`text`&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t=-1,n,r=0;r<e.length;r++){var i=e[r];if(i.type===`infix`){if(t!==-1)throw new H(`only one infix operator per group`,i.token);t=r,n=i.replaceWith}}if(t!==-1&&n){var a,o,s=e.slice(0,t),c=e.slice(t+1);return a=s.length===1&&s[0].type===`ordgroup`?s[0]:{type:`ordgroup`,mode:this.mode,body:s},o=c.length===1&&c[0].type===`ordgroup`?c[0]:{type:`ordgroup`,mode:this.mode,body:c},[n===`\\\\abovefrac`?this.callFunction(n,[a,e[t],o],[]):this.callFunction(n,[a,o],[])]}else return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r;do r=this.parseGroup(e);while(r?.type===`internal`);if(!r)throw new H(`Expected group after '`+n+`'`,t);return r}formatUnsupportedCmd(e){for(var t=[],n=0;n<e.length;n++)t.push({type:`textord`,mode:`text`,text:e[n]});var r={type:`text`,mode:this.mode,body:t};return{type:`color`,mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){var t=this.parseGroup(`atom`,e);if(t?.type===`internal`||this.mode===`text`)return t;for(var n,r;;){this.consumeSpaces();var i=this.fetch();if(i.text===`\\limits`||i.text===`\\nolimits`){if(t&&t.type===`op`)t.limits=i.text===`\\limits`,t.alwaysHandleSupSub=!0;else if(t&&t.type===`operatorname`)t.alwaysHandleSupSub&&(t.limits=i.text===`\\limits`);else throw new H(`Limit controls must follow a math operator`,i);this.consume()}else if(i.text===`^`){if(n)throw new H(`Double superscript`,i);n=this.handleSupSubscript(`superscript`)}else if(i.text===`_`){if(r)throw new H(`Double subscript`,i);r=this.handleSupSubscript(`subscript`)}else if(i.text===`'`){if(n)throw new H(`Double superscript`,i);var a={type:`textord`,mode:this.mode,text:`\\prime`},o=[a];for(this.consume();this.fetch().text===`'`;)o.push(a),this.consume();this.fetch().text===`^`&&o.push(this.handleSupSubscript(`superscript`)),n={type:`ordgroup`,mode:this.mode,body:o}}else if(kx[i.text]){var s=Ox.test(i.text),c=[];for(c.push(new _b(kx[i.text])),this.consume();;){var l=this.fetch().text;if(!kx[l]||Ox.test(l)!==s)break;c.unshift(new _b(kx[l])),this.consume()}var u=this.subparse(c);s?r={type:`ordgroup`,mode:`math`,body:u}:n={type:`ordgroup`,mode:`math`,body:u}}else break}return n||r?{type:`supsub`,mode:this.mode,base:t,sup:n,sub:r}:t}parseFunction(e,t){var n=this.fetch(),r=n.text,i=sx[r];if(!i)return null;if(this.consume(),t&&t!==`atom`&&!i.allowedInArgument)throw new H(`Got function '`+r+`' with no arguments`+(t?` as `+t:``),n);if(this.mode===`text`&&!i.allowedInText)throw new H(`Can't use function '`+r+`' in text mode`,n);if(this.mode===`math`&&i.allowedInMath===!1)throw new H(`Can't use function '`+r+`' in math mode`,n);var{args:a,optArgs:o}=this.parseArguments(r,i);return this.callFunction(r,a,o,n,e)}callFunction(e,t,n,r,i){var a={funcName:e,parser:this,token:r,breakOnTokenText:i},o=sx[e];if(o&&o.handler)return o.handler(a,t,n);throw new H(`No function handler for `+e)}parseArguments(e,t){var n=t.numArgs+t.numOptionalArgs;if(n===0)return{args:[],optArgs:[]};for(var r=[],i=[],a=0;a<n;a++){var o=t.argTypes&&t.argTypes[a],s=a<t.numOptionalArgs;(`primitive`in t&&t.primitive&&o==null||t.type===`sqrt`&&a===1&&i[0]==null)&&(o=`primitive`);var c=this.parseGroupOfType(`argument to '`+e+`'`,o,s);if(s)i.push(c);else if(c!=null)r.push(c);else throw new H(`Null argument, please report this as a bug`)}return{args:r,optArgs:i}}parseGroupOfType(e,t,n){switch(t){case`color`:return this.parseColorGroup(n);case`size`:return this.parseSizeGroup(n);case`url`:return this.parseUrlGroup(n);case`math`:case`text`:return this.parseArgumentGroup(n,t);case`hbox`:var r=this.parseArgumentGroup(n,`text`);return r==null?null:{type:`styling`,mode:r.mode,body:[r],style:`text`,resetFont:!0};case`raw`:var i=this.parseStringGroup(`raw`,n);return i==null?null:{type:`raw`,mode:`text`,string:i.text};case`primitive`:if(n)throw new H(`A primitive argument cannot be optional`);var a=this.parseGroup(e);if(a==null)throw new H(`Expected group as `+e,this.fetch());return a;case`original`:case null:case void 0:return this.parseArgumentGroup(n);default:throw new H(`Unknown group type as `+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===` `;)this.consume()}parseStringGroup(e,t){var n=this.gullet.scanArgument(t);if(n==null)return null;for(var r=``,i;(i=this.fetch()).text!==`EOF`;)r+=i.text,this.consume();return this.consume(),n.text=r,n}parseRegexGroup(e,t){for(var n=this.fetch(),r=n,i=``,a;(a=this.fetch()).text!==`EOF`&&e.test(i+a.text);)r=a,i+=r.text,this.consume();if(i===``)throw new H(`Invalid `+t+`: '`+n.text+`'`,n);return n.range(r,i)}parseColorGroup(e){var t=this.parseStringGroup(`color`,e);if(t==null)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new H(`Invalid color: '`+t.text+`'`,t);var r=n[0];return/^[0-9a-f]{6}$/i.test(r)&&(r=`#`+r),{type:`color-token`,mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;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;!e&&t.text.length===0&&(t.text=`0pt`,n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new H(`Invalid size: '`+t.text+`'`,t);var i={number:+(r[1]+r[2]),unit:r[3]};if(!Tg(i))throw new H(`Invalid unit: '`+i.unit+`'`,t);return{type:`size`,mode:this.mode,value:i,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode(`%`,13),this.gullet.lexer.setCatcode(`~`,12);var t=this.parseStringGroup(`url`,e);if(this.gullet.lexer.setCatcode(`%`,14),this.gullet.lexer.setCatcode(`~`,13),t==null)return null;var n=t.text.replace(/\\([#$%&~_^{}])/g,`$1`);return{type:`url`,mode:this.mode,url:n}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(n==null)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var i=this.parseExpression(!1,`EOF`);this.expect(`EOF`),this.gullet.endGroup();var a={type:`ordgroup`,mode:this.mode,loc:n.loc,body:i};return t&&this.switchMode(r),a}parseGroup(e,t){var n=this.fetch(),r=n.text,i;if(r===`{`||r===`\\begingroup`){this.consume();var a=r===`{`?`}`:`\\endgroup`;this.gullet.beginGroup();var o=this.parseExpression(!1,a),s=this.fetch();this.expect(a),this.gullet.endGroup(),i={type:`ordgroup`,mode:this.mode,loc:gb.range(n,s),body:o,semisimple:r===`\\begingroup`||void 0}}else if(i=this.parseFunction(t,e)||this.parseSymbol(),i==null&&r[0]===`\\`&&!Ex.hasOwnProperty(r)){if(this.settings.throwOnError)throw new H(`Undefined control sequence: `+r,n);i=this.formatUnsupportedCmd(r),this.consume()}return i}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n];if(r.type===`textord`){var i=r.text,a=e[n+1];if(!(!a||a.type!==`textord`)){if(i===`-`&&a.text===`-`){var o=e[n+2];n+1<t&&o&&o.type===`textord`&&o.text===`-`?(e.splice(n,3,{type:`textord`,mode:`text`,loc:gb.range(r,o),text:`---`}),t-=2):(e.splice(n,2,{type:`textord`,mode:`text`,loc:gb.range(r,a),text:`--`}),--t)}(i===`'`||i==="`")&&a.text===i&&(e.splice(n,2,{type:`textord`,mode:`text`,loc:gb.range(r,a),text:i+i}),--t)}}}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r=n.charAt(0)===`*`;if(r&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new H(`\\verb assertion failed --
528
+ please report what input caused this bug`);return n=n.slice(1,-1),{type:`verb`,mode:`text`,body:n,star:r}}jx.hasOwnProperty(t[0])&&!Zg[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=jx[t[0]]+t.slice(1));var i=mx.exec(t);i&&(t=t.substring(0,i.index),t===`i`?t=`ı`:t===`j`&&(t=`ȷ`));var a;if(Zg[this.mode][t]){this.settings.strict&&this.mode===`math`&&S_.includes(t)&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Latin-1/Unicode text character "`+t[0]+`" used in math mode`,e);var o=Zg[this.mode][t].group,s=gb.range(e);a=sy(o)?{type:`atom`,mode:this.mode,family:o,loc:s,text:t}:{type:o,mode:this.mode,loc:s,text:t}}else if(t.charCodeAt(0)>=128)this.settings.strict&&(sg(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)),a={type:`textord`,mode:`text`,loc:gb.range(e),text:t};else return null;if(this.consume(),i)for(var c=0;c<i[0].length;c++){var l=i[0][c];if(!Ax[l])throw new H(`Unknown accent ' `+l+`'`,e);var u=Ax[l][this.mode]||Ax[l].text;if(!u)throw new H(`Accent `+l+` unsupported in `+this.mode+` mode`,e);a={type:`accent`,mode:this.mode,loc:gb.range(e),label:u,isStretchy:!1,isShifty:!0,base:a}}return a}};Mx.endOfExpression=new Set([`}`,`\\endgroup`,`\\end`,`\\right`,`&`]);var Nx=function(e,t){if(!(typeof e==`string`||e instanceof String))throw TypeError(`KaTeX can only parse string typed expression`);var n=new Mx(e,t);delete n.gullet.macros.current[`\\df@tag`];var r=n.parse();if(delete n.gullet.macros.current[`\\current@color`],delete n.gullet.macros.current[`\\color`],n.gullet.macros.get(`\\df@tag`)){if(!t.displayMode)throw new H(`\\tag works only in display equations`);r=[{type:`tag`,mode:`text`,body:r,tag:n.subparse([new _b(`\\df@tag`)])}]}return r},Px=function(e,t,n){t.textContent=``;var r=Rx(e,n).toNode();t.appendChild(r)};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.`),Px=function(){throw new H(`KaTeX doesn't work in quirks mode.`)});var Fx=function(e,t){return Rx(e,t).toMarkup()},Ix=function(e,t){return Nx(e,new Bh(t))},Lx=function(e,t,n){if(n.throwOnError||!(e instanceof H))throw e;var r=Z([`katex-error`],[new Lg(t)]);return r.setAttribute(`title`,e.toString()),r.setAttribute(`style`,`color:`+n.errorColor),r},Rx=function(e,t){var n=new Bh(t);try{return Zv(Nx(e,n),e,n)}catch(t){return Lx(t,e,n)}},zx={version:`0.16.47`,render:Px,renderToString:Fx,ParseError:H,SETTINGS_SCHEMA:Ih,__parse:Ix,__renderToDomTree:Rx,__renderToHTMLTree:function(e,t){var n=new Bh(t);try{return Qv(Nx(e,n),e,n)}catch(t){return Lx(t,e,n)}},__setFontMetrics:qg,__defineSymbol:W,__defineFunction:mv,__defineMacro:$,__domTree:{Span:Ng,Anchor:Pg,SymbolNode:Lg,SvgNode:Rg,PathNode:zg,LineNode:Bg}},Bx={},Vx=[];function Hx(e){let t=e||Bx;return function(e,n){es(e,`element`,function(e,r){let i=Array.isArray(e.properties.className)?e.properties.className:Vx,a=i.includes(`language-math`),o=i.includes(`math-display`),s=i.includes(`math-inline`),c=o;if(!a&&!o&&!s)return;let l=r[r.length-1],u=e;if(e.tagName===`code`&&a&&l&&l.type===`element`&&l.tagName===`pre`&&(u=l,l=r[r.length-2],c=!0),!l)return;let d=_h(u,{whitespace:`pre`}),f;try{f=zx.renderToString(d,{...t,displayMode:c,throwOnError:!0})}catch(i){let a=i,o=a.name.toLowerCase();n.message(`Could not render math with KaTeX`,{ancestors:[...r,e],cause:a,place:e.position,ruleId:o,source:`rehype-katex`});try{f=zx.renderToString(d,{...t,displayMode:c,strict:`ignore`,throwOnError:!1})}catch{f=[{type:`element`,tagName:`span`,properties:{className:[`katex-error`],style:`color:`+(t.errorColor||`#cc0000`),title:String(i)},children:[{type:`text`,value:d}]}]}}typeof f==`string`&&(f=eh(f,{fragment:!0}).children);let p=l.children.indexOf(u);return l.children.splice(p,1,...f),$o})}}function Ux(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Wx(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Gx(e,t,n){let r=Wo((n||{}).ignore||[]),i=Kx(t),a=-1;for(;++a<i.length;)es(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function Kx(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([qx(e[0]),Jx(e[1])])}return t}function qx(e){return typeof e==`string`?new RegExp(Wx(e),`g`):e}function Jx(e){return typeof e==`function`?e:function(){return e}}var Yx=`phrasing`,Xx=[`autolink`,`link`,`image`,`label`];function Zx(){return{transforms:[aS],enter:{literalAutolink:$x,literalAutolinkEmail:eS,literalAutolinkHttp:eS,literalAutolinkWww:eS},exit:{literalAutolink:iS,literalAutolinkEmail:rS,literalAutolinkHttp:tS,literalAutolinkWww:nS}}}function Qx(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:Yx,notInConstruct:Xx},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:Yx,notInConstruct:Xx},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:Yx,notInConstruct:Xx}]}}function $x(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function eS(e){this.config.enter.autolinkProtocol.call(this,e)}function tS(e){this.config.exit.autolinkProtocol.call(this,e)}function nS(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function rS(e){this.config.exit.autolinkEmail.call(this,e)}function iS(e){this.exit(e)}function aS(e){Gx(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,oS],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,sS]],{ignore:[`link`,`linkReference`]})}function oS(e,t,n,r,i){let a=``;if(!uS(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!cS(n)))return!1;let o=lS(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function sS(e,t,n,r){return!uS(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function cS(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function lS(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Ux(e,`(`),a=Ux(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function uS(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||br(n)||yr(n))&&(!t||n!==47)}bS.peek=yS;function dS(){this.buffer()}function fS(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function pS(){this.buffer()}function mS(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function hS(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=cr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function gS(e){this.exit(e)}function _S(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=cr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function vS(e){this.exit(e)}function yS(){return`[`}function bS(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function xS(){return{enter:{gfmFootnoteCallString:dS,gfmFootnoteCall:fS,gfmFootnoteDefinitionLabelString:pS,gfmFootnoteDefinition:mS},exit:{gfmFootnoteCallString:hS,gfmFootnoteCall:gS,gfmFootnoteDefinitionLabelString:_S,gfmFootnoteDefinition:vS}}}function SS(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:bS},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
529
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?wS:CS))),s(),o}}function CS(e,t,n){return t===0?e:wS(e,t,n)}function wS(e,t,n){return(n?``:` `)+e}var TS=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];AS.peek=jS;function ES(){return{canContainEols:[`delete`],enter:{strikethrough:OS},exit:{strikethrough:kS}}}function DS(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:TS}],handlers:{delete:AS}}}function OS(e){this.enter({type:`delete`,children:[]},e)}function kS(e){this.exit(e)}function AS(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function jS(){return`~`}function MS(e){return e.length}function NS(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||MS,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=PS(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=FS(r[d]);else{let e=FS(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
530
+ `)}function PS(e){return e==null?``:String(e)}function FS(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function IS(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),LS);return i(),o}function LS(e,t,n){return`>`+(n?``:` `)+e}function RS(e,t){return zS(e,t.inConstruct,!0)&&!zS(e,t.notInConstruct,!1)}function zS(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function BS(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
531
+ `&&RS(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
532
+ `}function VS(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function HS(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function US(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function WS(e,t,n,r){let i=US(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(HS(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,GS);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(VS(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
533
+ `,encode:["`"],...s.current()})),t()}return u+=s.move(`
534
+ `),a&&(u+=s.move(a+`
535
+ `)),u+=s.move(c),l(),u}function GS(e,t,n){return(n?``:` `)+e}function KS(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function qS(e,t,n,r){let i=KS(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
536
+ `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function JS(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function YS(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function XS(e,t,n){let r=Ar(e),i=Ar(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ZS.peek=QS;function ZS(e,t,n,r){let i=JS(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=XS(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=YS(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=XS(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+YS(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function QS(e,t,n){return n.options.emphasis||`*`}function $S(e,t){let n=!1;return ns(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&Yn(e)&&(t.options.setext||n))}function eC(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if($S(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
537
+ `,after:`
538
+ `});return r(),t(),o+`
539
+ `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
540
+ `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
541
+ `,...a.current()});return/^[\t ]/.test(l)&&(l=YS(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}tC.peek=nC;function tC(e){return e.value||``}function nC(){return`<`}rC.peek=iC;function rC(e,t,n,r){let i=KS(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function iC(){return`!`}aC.peek=oC;function aC(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function oC(){return`!`}sC.peek=cC;function sC(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function cC(){return"`"}function lC(e,t){let n=Yn(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}uC.peek=dC;function uC(e,t,n,r){let i=KS(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(lC(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function dC(e,t,n){return lC(e,n)?`<`:`[`}fC.peek=pC;function fC(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function pC(){return`[`}function mC(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function hC(e){let t=mC(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function gC(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function _C(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function vC(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?gC(n):mC(n),s=e.ordered?o===`.`?`)`:`.`:hC(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),_C(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function yC(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function bC(e,t,n,r){let i=yC(n),a=n.bulletCurrent||mC(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function xC(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var SC=Wo([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function CC(e,t,n,r){return(e.children.some(function(e){return SC(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function wC(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}TC.peek=EC;function TC(e,t,n,r){let i=wC(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=XS(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=YS(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=XS(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+YS(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function EC(e,t,n){return n.options.strong||`*`}function DC(e,t,n,r){return n.safe(e.value,r)}function OC(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function kC(e,t,n){let r=(_C(n)+(n.options.ruleSpaces?` `:``)).repeat(OC(n));return n.options.ruleSpaces?r.slice(0,-1):r}var AC={blockquote:IS,break:BS,code:WS,definition:qS,emphasis:ZS,hardBreak:BS,heading:eC,html:tC,image:rC,imageReference:aC,inlineCode:sC,link:uC,linkReference:fC,list:vC,listItem:bC,paragraph:xC,root:CC,strong:TC,text:DC,thematicBreak:kC};function jC(){return{enter:{table:MC,tableData:IC,tableHeader:IC,tableRow:PC},exit:{codeText:LC,table:NC,tableData:FC,tableHeader:FC,tableRow:FC}}}function MC(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function NC(e){this.exit(e),this.data.inTable=void 0}function PC(e){this.enter({type:`tableRow`,children:[]},e)}function FC(e){this.exit(e)}function IC(e){this.enter({type:`tableCell`,children:[]},e)}function LC(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,RC));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function RC(e,t){return t===`|`?t:e}function zC(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
542
+ `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
543
+ `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return NS(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=AC.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function BC(){return{exit:{taskListCheckValueChecked:HC,taskListCheckValueUnchecked:HC,paragraph:UC}}}function VC(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:WC}}}function HC(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function UC(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function WC(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=AC.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function GC(){return[Zx(),xS(),ES(),jC(),BC()]}function KC(e){return{extensions:[Qx(),SS(e),DS(),zC(e),VC()]}}var qC={tokenize:sw,partial:!0},JC={tokenize:cw,partial:!0},YC={tokenize:lw,partial:!0},XC={tokenize:uw,partial:!0},ZC={tokenize:dw,partial:!0},QC={name:`wwwAutolink`,tokenize:aw,previous:fw},$C={name:`protocolAutolink`,tokenize:ow,previous:pw},ew={name:`emailAutolink`,tokenize:iw,previous:mw},tw={};function nw(){return{text:tw}}for(var rw=48;rw<123;)tw[rw]=ew,rw++,rw===58?rw=65:rw===91&&(rw=97);tw[43]=ew,tw[45]=ew,tw[46]=ew,tw[95]=ew,tw[72]=[ew,$C],tw[104]=[ew,$C],tw[87]=[ew,QC],tw[119]=[ew,QC];function iw(e,t,n){let r=this,i,a;return o;function o(t){return!hw(t)||!mw.call(r,r.previous)||gw(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return hw(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(ZC,u,l)(t):t===45||t===95||ur(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&lr(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function aw(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!fw.call(r,r.previous)||gw(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(qC,e.attempt(JC,e.attempt(YC,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function ow(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&pw.call(r,r.previous)&&!gw(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(lr(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||fr(t)||_r(t)||br(t)||yr(t)?n(t):e.attempt(JC,e.attempt(YC,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function sw(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function cw(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(XC,c,s)(t):t===null||_r(t)||br(t)||t!==45&&yr(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function lw(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(XC,t,a)(o):o===null||_r(o)||br(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function uw(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||_r(o)||br(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||_r(e)||br(e)?t(e):r(e)}function a(e){return lr(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):lr(t)?(e.consume(t),o):n(t)}}function dw(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return ur(e)?n(e):t(e)}}function fw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||_r(e)}function pw(e){return!lr(e)}function mw(e){return!(e===47||hw(e))}function hw(e){return e===43||e===45||e===46||e===95||ur(e)}function gw(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var _w={tokenize:Tw,partial:!0};function vw(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Sw,continuation:{tokenize:Cw},exit:ww}},text:{91:{name:`gfmFootnoteCall`,tokenize:xw},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:yw,resolveTo:bw}}}}function yw(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=cr(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function bw(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function xw(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||_r(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(cr(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return _r(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Sw(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||_r(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=cr(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return _r(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Cr(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Cw(e,t,n){return e.check(Rr,t,e.attempt(_w,t,n))}function ww(e){e.exit(`gfmFootnoteDefinition`)}function Tw(e,t,n){let r=this;return Cr(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Ew(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&tr(o,o.length,0,jr(s,e.slice(r+1,n),t)),tr(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),tr(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Ar(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Ar(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Dw=class{constructor(){this.map=[]}add(e,t,n){Ow(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function Ow(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function kw(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Aw(){return{flow:{null:{name:`table`,tokenize:jw,resolveAll:Mw}}}}function jw(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):gr(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):vr(t)?Cr(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||_r(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,vr(t)?Cr(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return vr(t)?Cr(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||gr(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return vr(t)?Cr(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||gr(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||gr(n)?(e.exit(`tableRow`),t(n)):vr(n)?Cr(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||_r(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Mw(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Dw;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Pw(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Nw(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Nw(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Nw(f,t,o,i,n,d)):(o[0]=o[1],d=Nw(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Pw(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=kw(t.events,n))}return e}function Nw(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Fw(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Fw(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=Fw(t.events,n[2]),a=Fw(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Fw(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Pw(e,t,n,r,i){let a=[],o=Fw(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Fw(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Iw={name:`tasklistCheck`,tokenize:Rw};function Lw(){return{text:{91:Iw}}}function Rw(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return _r(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return gr(r)?t(r):vr(r)?e.check({tokenize:zw},t,n)(r):n(r)}}function zw(e,t,n){return Cr(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Bw(e){return ir([nw(),vw(),Ew(e),Aw(),Lw()])}var Vw={};function Hw(e){let t=this,n=e||Vw,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Bw(n)),a.push(GC()),o.push(KC(n))}function Uw(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:a},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:s,mathText:o,mathTextData:s}};function e(e){this.enter({type:`math`,meta:null,value:``,data:{hName:`pre`,hChildren:[{type:`element`,tagName:`code`,properties:{className:[`language-math`,`math-display`]},children:[]}]}},e)}function t(){this.buffer()}function n(){let e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.meta=e}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(e){let t=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t;let r=n.data.hChildren[0];r.type,r.tagName,r.children.push({type:`text`,value:t}),this.data.mathFlowInside=void 0}function a(e){this.enter({type:`inlineMath`,value:``,data:{hName:`code`,hProperties:{className:[`language-math`,`math-inline`]},hChildren:[]}},e),this.buffer()}function o(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t,n.data.hChildren.push({type:`text`,value:t})}function s(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}}function Ww(e){let t=(e||{}).singleDollarTextMath;return t??=!0,r.peek=i,{unsafe:[{character:`\r`,inConstruct:`mathFlowMeta`},{character:`
544
+ `,inConstruct:`mathFlowMeta`},{character:`$`,after:t?void 0:`\\$`,inConstruct:`phrasing`},{character:`$`,inConstruct:`mathFlowMeta`},{atBreak:!0,character:`$`,after:`\\$`}],handlers:{math:n,inlineMath:r}};function n(e,t,n,r){let i=e.value||``,a=n.createTracker(r),o=`$`.repeat(Math.max(VS(i,`$`)+1,2)),s=n.enter(`mathFlow`),c=a.move(o);if(e.meta){let t=n.enter(`mathFlowMeta`);c+=a.move(n.safe(e.meta,{after:`
545
+ `,before:c,encode:[`$`],...a.current()})),t()}return c+=a.move(`
546
+ `),i&&(c+=a.move(i+`
547
+ `)),c+=a.move(o),s(),c}function r(e,n,r){let i=e.value||``,a=1;for(t||a++;RegExp(`(^|[^$])`+`\\$`.repeat(a)+`([^$]|$)`).test(i);)a++;let o=`$`.repeat(a);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` `+i+` `);let s=-1;for(;++s<r.unsafe.length;){let e=r.unsafe[s];if(!e.atBreak)continue;let t=r.compilePattern(e),n;for(;n=t.exec(i);){let e=n.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=i.slice(0,e)+` `+i.slice(n.index+1)}}return o+i+o}function i(){return`$`}}var Gw={tokenize:qw,concrete:!0,name:`mathFlow`},Kw={tokenize:Jw,partial:!0};function qw(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){return e.enter(`mathFlow`),e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),c(t)}function c(t){return t===36?(e.consume(t),o++,c):o<2?n(t):(e.exit(`mathFlowFenceSequence`),Cr(e,l,`whitespace`)(t))}function l(t){return t===null||gr(t)?d(t):(e.enter(`mathFlowFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===null||gr(t)?(e.exit(`chunkString`),e.exit(`mathFlowFenceMeta`),d(t)):t===36?n(t):(e.consume(t),u)}function d(n){return e.exit(`mathFlowFence`),r.interrupt?t(n):e.attempt(Kw,f,g)(n)}function f(t){return e.attempt({tokenize:_,partial:!0},g,p)(t)}function p(t){return(a?Cr(e,m,`linePrefix`,a+1):m)(t)}function m(t){return t===null?g(t):gr(t)?e.attempt(Kw,f,g)(t):(e.enter(`mathFlowValue`),h(t))}function h(t){return t===null||gr(t)?(e.exit(`mathFlowValue`),m(t)):(e.consume(t),h)}function g(n){return e.exit(`mathFlow`),t(n)}function _(e,t,n){let i=0;return Cr(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),s(t)}function s(t){return t===36?(i++,e.consume(t),s):i<o?n(t):(e.exit(`mathFlowFenceSequence`),Cr(e,c,`whitespace`)(t))}function c(r){return r===null||gr(r)?(e.exit(`mathFlowFence`),t(r)):n(r)}}}function Jw(e,t,n){let r=this;return i;function i(n){return n===null?t(n):(e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Yw(e){let t=(e||{}).singleDollarTextMath;return t??=!0,{tokenize:n,resolve:Xw,previous:Zw,name:`mathText`};function n(e,n,r){let i=0,a,o;return s;function s(t){return e.enter(`mathText`),e.enter(`mathTextSequence`),c(t)}function c(n){return n===36?(e.consume(n),i++,c):i<2&&!t?r(n):(e.exit(`mathTextSequence`),l(n))}function l(t){return t===null?r(t):t===36?(o=e.enter(`mathTextSequence`),a=0,d(t)):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),l):gr(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),l):(e.enter(`mathTextData`),u(t))}function u(t){return t===null||t===32||t===36||gr(t)?(e.exit(`mathTextData`),l(t)):(e.consume(t),u)}function d(t){return t===36?(e.consume(t),a++,d):a===i?(e.exit(`mathTextSequence`),e.exit(`mathText`),n(t)):(o.type=`mathTextData`,u(t))}}}function Xw(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`mathTextData`){e[t][1].type=`mathTextPadding`,e[n][1].type=`mathTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`mathTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Zw(e){return e!==36||this.events[this.events.length-1][1].type===`characterEscape`}function Qw(e){return{flow:{36:Gw},text:{36:Yw(e)}}}var $w={};function eT(e){let t=this,n=e||$w,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Qw(n)),a.push(Uw()),o.push(Ww(n))}var tT=/^file:\/\/|^file:\//i,nT=/^[a-z][a-z0-9+.-]*:/i;function rT(e){try{return decodeURIComponent(e)}catch{return e}}function iT(e){let t=[];for(let n of e.replaceAll(`\\`,`/`).split(`/`))!n||n===`.`||(n===`..`?t.pop():t.push(n));return`/${t.join(`/`)}`}function aT(e){let t=e.match(/^(.*):(\d+):(\d+)$/);if(t?.[1])return{path:t[1],line:Number(t[2]),column:Number(t[3])};let n=e.match(/^(.*):(\d+)$/);return n?.[1]?{path:n[1],line:Number(n[2]),column:null}:{path:e,line:null,column:null}}function oT(e,t=``){if(!e)return null;let n=e.trim(),r=``,i=``;if(tT.test(n))try{let e=/^file:\/(?!\/)/i.test(n)?`file://${n.slice(5)}`:n,t=new URL(e);if(t.protocol!==`file:`||t.hostname&&t.hostname!==`localhost`)return null;r=t.pathname,i=t.hash.slice(1)}catch{return null}else{let e=n.indexOf(`#`),a=e>=0?n.slice(0,e):n;if(i=e>=0?n.slice(e+1):``,r=a.split(`?`,1)[0],!r||r.startsWith(`//`))return null;let o=/^[a-z]:[\\/]/i.test(r);if(!r.startsWith(`/`)&&!o&&nT.test(r))return null;if(!r.startsWith(`/`)&&!o){if(!t.startsWith(`/`)&&!/^[a-z]:[\\/]/i.test(t))return null;r=`${t.replace(/\/+$/,``)}/${r}`}}let a=aT(rT(r));if(/[\u0000-\u001f\u007f]/.test(a.path))return null;let o=iT(a.path),s=i.match(/^L(\d+)(?:C(\d+))?(?:-L?\d+(?:C\d+)?)?$/i);return{path:/^\/[a-z]:\//i.test(o)?o.slice(1):o,line:s?Number(s[1]):a.line,column:s?.[2]?Number(s[2]):a.column}}function sT(e){return typeof e==`string`&&(/\.(mp4|m4v|webm|ogv|mov)(?:[?#]|$)/i.test(e)||e.startsWith(`/scope-video-api?`))}function cT(e,t,n){return sT(e)?lT(e,t,n):``}function lT(e,t,n){if(typeof e!=`string`||!e)return``;if(/^https?:\/\//i.test(e))return e;let r=oT(e,n);return!t||!r?``:`/${sT(e)?`scope-video-api`:`scope-image-api`}?${new URLSearchParams({host:t,path:r.path})}`}function uT(e,t,n,r){return t===`src`?lT(e,n,r):cT(e,n,r)||(n&&oT(e,r)?e:ic(e))}var dT=`SCOPE_CODE_`,fT=``;function pT(e){let t=[],n=e=>`${dT}${t.push(e)-1}${fT}`;return{value:e.replace(/(^|\n)[ \t]{0,3}(`{3,}|~{3,})[^\n]*(?:\n[\s\S]*?\n[ \t]{0,3}\2[ \t]*(?=\n|$)|$)/g,n).replace(/(`+)([\s\S]*?)\1/g,n),restore(e){return e.replace(RegExp(`${dT}(\\d+)${fT}`,`g`),(e,n)=>t[Number(n)]??``)}}}function mT(e){return e.replace(/(?<!\\)\\begin\{(equation\*?|displaymath|align\*?|aligned|gather\*?|gathered|multline\*?|split)\}([\s\S]*?)\\end\{\1\}/g,(e,t,n)=>{let r=n.trim(),i=r;return/^align\*?$/.test(t)||t===`aligned`||t===`split`?i=`\\begin{aligned}\n${r}\n\\end{aligned}`:/^gather\*?$/.test(t)||t===`gathered`?i=`\\begin{gathered}\n${r}\n\\end{gathered}`:/^multline\*?$/.test(t)&&(i=`\\begin{aligned}\n${r}\n\\end{aligned}`),`\n\n$$\n${i}\n$$\n\n`})}function hT(e){if(!e||!e.includes(`\\`))return e;let t=pT(e),n=mT(t.value);return n=n.replace(/(?<!\\)\\\[([\s\S]*?)(?<!\\)\\\]/g,(e,t)=>`\n\n$$\n${t.trim()}\n$$\n\n`),n=n.replace(/(?<!\\)\\\(([\s\S]*?)(?<!\\)\\\)/g,(e,t)=>`$${t.trim()}$`),t.restore(n)}function gT(e){let t=e.split(`#`,1)[0].split(`?`,1)[0].split(`/`).filter(Boolean).pop()||e;try{return decodeURIComponent(t)}catch{return t}}function _T(e){if(!e||!e.includes(`file:`)&&!/<(?:img|video)\b/i.test(e))return e;let t=pT(e),n=t.value;n=n.replace(/<(img|video)\b([^>]*?)\/?>\s*(?:<\/video>)?/gi,(e,t,n)=>{let r=n.match(/\bsrc\s*=\s*(?:"([^"]+)"|'([^']+)')/i),i=(r?.[1]||r?.[2]||``).trim();if(!i)return e;let a=n.match(/\balt\s*=\s*(?:"([^"]*)"|'([^']*)')/i);return`![${(a?.[1]||a?.[2]||gT(i)||t).trim()}](<${i}>)`}),n=n.replace(/(!?\[[^\]]*\]\()(file:\/\/\/?[^)\r\n<>]*[ \t][^)\r\n<>]*)(\))/gi,(e,t,n,r)=>`${t}<${n.trim()}>${r}`);let r=[];return n=n.replace(/!?\[[^\]]*\]\((?:<[^>\r\n]+>|[^)\r\n]+)\)/g,e=>`\uE002SCOPE_LINK_${r.push(e)-1}\uE003`),n=n.replace(/(^|[\s(>\[(【::])(file:\/\/\/[^\s<>)"'\])】]+)/gi,(e,t,n)=>{let r=n.match(/[.,;:!?。,;:!?]+$/)?.[0]||``,i=r?n.slice(0,-r.length):n,a=gT(i);return`${t}${/\.(?:png|jpe?g|gif|webp|svg|bmp|ico|avif|mp4|m4v|webm|ogv|mov)(?:[?#]|$)/i.test(i)?`!`:``}[${a}](<${i}>)${r}`}),n=n.replace(/\uE002SCOPE_LINK_(\d+)\uE003/g,(e,t)=>r[Number(t)]??``),t.restore(n)}function vT({src:e,label:t}){let{tr:n}=fc(),[r,i]=(0,f.useState)(!1),[a,o]=(0,f.useState)(0);return(0,O.jsxs)(`span`,{className:`markdown-video`,children:[(0,O.jsx)(`video`,{src:e,controls:!0,preload:`metadata`,playsInline:!0,onError:()=>i(!0),"aria-label":n(`视频预览`,`Video preview`)},a),(0,O.jsxs)(`span`,{className:`markdown-video-caption`,children:[(0,O.jsx)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,children:t||n(`打开视频`,`Open video`)}),r&&(0,O.jsx)(`button`,{type:`button`,onClick:()=>{i(!1),o(e=>e+1)},children:n(`加载失败或编码不受支持 · 重试`,`Playback failed · Retry`)})]})]})}function yT({src:e,alt:t,title:n}){let{tr:r}=fc(),[i,a]=(0,f.useState)(!1),[o,s]=(0,f.useState)(0),c=e.startsWith(`/scope-image-api?`)?new URLSearchParams(e.split(`?`)[1]).get(`path`):e,l=o&&e.startsWith(`/scope-image-api?`)?`${e}&retry=${o}`:e;return!e||i?(0,O.jsxs)(`span`,{className:`markdown-image-error`,children:[(0,O.jsxs)(`span`,{children:[t||r(`图片`,`Image`),`:`,r(`图片无法加载`,`Failed to load image`)]}),c&&(0,O.jsx)(`code`,{children:c}),e&&(0,O.jsx)(`button`,{type:`button`,onClick:()=>{a(!1),s(Date.now())},children:r(`重试`,`Retry`)})]}):(0,O.jsx)(`img`,{className:`markdown-image`,src:l,alt:t||r(`Agent 引用的图片`,`Embedded image`),title:n||t,loading:`lazy`,decoding:`async`,referrerPolicy:`no-referrer`,onError:()=>a(!0)})}var bT=(0,f.memo)(function({value:e,className:t=``,remoteHost:n,remoteCwd:r,RemoteFileLink:i}){let a=(0,f.useMemo)(()=>({pre:({children:e,node:t,...n})=>{let r=f.Children.toArray(e)[0];if((0,f.isValidElement)(r)){let e=String(r.props.children??``);return/^language-(?:tex|latex|math|katex)$/.test(r.props.className||``)?(0,O.jsx)(km,{source:e}):(0,O.jsx)(`pre`,{...n,children:(0,O.jsx)(`code`,{className:r.props.className,children:r.props.children})})}return(0,O.jsx)(`pre`,{...n,children:e})},code:({children:e,node:t,...n})=>{let r=String(e??``);return!n.className&&Em(r)?(0,O.jsx)(Am,{source:r}):(0,O.jsx)(`code`,{...n,children:e})},img:({src:e,alt:t,title:n})=>sT(e)?(0,O.jsx)(vT,{src:String(e),label:t},String(e)):(0,O.jsx)(yT,{src:typeof e==`string`?e:``,alt:t,title:n},String(e)),a:({href:e,children:t,node:a,className:o,...s})=>{if(e&&sT(e))return(0,O.jsx)(vT,{src:e,label:t},e);let c=oT(e,r);if(n&&c){let e=c.path.slice(0,c.path.lastIndexOf(`/`))||`/`;return(0,O.jsx)(i,{className:o,host:n,cwd:r||e,remotePath:c.path,line:c.line,column:c.column,children:t})}return(0,O.jsx)(`a`,{...s,className:o,href:e,children:t})}}),[n,r,i]),o=(0,f.useMemo)(()=>(e,t)=>uT(e,t,n,r),[n,r]);return(0,O.jsx)(`div`,{className:`markdown-body ${t}`.trim(),children:(0,O.jsx)(ec,{remarkPlugins:[Hw,eT],rehypePlugins:[Hx],urlTransform:o,components:a,children:_T(hT(e))})})}),xT=`http://127.0.0.1:4815`,ST=`scope:inspector-width`;function CT(e,t){return`${encodeURIComponent(e)}:${t}`}function wT(e){let t=e.match(/^(.*):(\d+)$/);return t?{host:decodeURIComponent(t[1]),index:Number(t[2])}:null}function TT(e){if(typeof window>`u`)return`${xT}${e}`;let t=document.querySelector(`meta[name="scope-bridge-url"]`)?.content?.trim();if(t)return t===`/scope-api`?`/scope-api${e}`:`${t.replace(/\/+$/,``)}${e}`;let n=window.location.hostname;return n===`localhost`||n===`127.0.0.1`||n===`::1`?`${xT}${e}`:`/scope-api${e}`}function ET(e,t,n,r=!1){let i=t-(n<=880?0:r?54:n<=1080?232:248)-220-7;return Math.min(Math.max(260,i),Math.max(260,Math.round(e)))}var DT={generatedAt:null,scanning:!0,sshConfig:``,hosts:[],summary:{hosts:0,online:0,codex:0,tmux:0,attention:0},management:{operatorName:`Operator`,sessions:{},hostRuntimeConfigs:{},resourcePolicy:{prompt:``,updatedAt:null,version:0}},appServer:{experimental:!0,connections:[],sessions:[],pendingRequests:[],pendingInputs:[]},submissionTracker:{scannedAt:null,scanning:!1,windowDays:1,targetHostname:``,items:[],calls:[],launches:[],alerts:[],hosts:[],error:null},gpuUsage:{updatedAt:null,retentionHours:168,episodes:[]},notifications:{email:{enabled:!1,configured:!1,to:[],provider:``,credentialSource:null,lastSentAt:null,lastError:null}}},OT={working:`工作中`,idle:`空闲`,attention:`需检查`},kT={"direct-shell":`直接 CLI`,programmatic:`程序化调用`,"submit-script":`提交脚本入口`,"output-only":`历史输出证据`},AT={pending:`等待输出`,submitted:`已返回 Job`,failed:`调用失败`,unresolved:`已开始但未解析`,unknown:`未确认 Job`,inspection:`仅查看帮助`,"dry-run":`Dry run`},jT={P0:`P0 紧急`,P1:`P1 高`,P2:`P2 正常`,P3:`P3 低`,paused:`暂停`},MT={P0:0,P1:1,P2:2,P3:3,paused:4};function NT(e){return`${e.host}:${e.rollout?.id||`pid-${e.pid}`}`}function PT(e,t){return t?.sessions[NT(e)]||{}}function FT(e,t){return e.hostRuntimeConfigs?.[t]||{preLaunchCommand:``,updatePreCommand:``,yolo:!0,residentSessionLimit:null,updatedAt:null}}function IT(e,t){return e.rollout?.approvalPolicy===`never`&&[`danger-full-access`,`dangerFullAccess`].includes(e.rollout?.sandboxPolicy||``)?!0:e.rollout?.approvalPolicy||e.rollout?.sandboxPolicy?!1:FT(t,e.host).yolo}function LT(e,t){let n=PT(e,t),r=n.summary||e.suggestedSummary||{theme:e.title||e.rollout?.firstUser||`新会话`,category:`other`,objective:``,progress:``,result:``,nextStep:``,source:`rollout`,updatedAt:null};return n.displayName?{...r,theme:n.displayName,source:`manual`}:r}function RT(e){if(!e)return`暂无记录`;let t=typeof e==`number`?e:new Date(e).getTime(),n=Math.max(0,Math.floor((Date.now()-t)/1e3));return n<10?`刚刚`:n<60?`${n} 秒前`:n<3600?`${Math.floor(n/60)} 分钟前`:n<86400?`${Math.floor(n/3600)} 小时前`:`${Math.floor(n/86400)} 天前`}function zT(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KiB`:`${(e/(1024*1024)).toFixed(1)} MiB`}function BT(e){return/fail|fault|stopp|cancel|kill/i.test(e||``)?`failed`:/queu|enqueued|pending/i.test(e||``)?`queued`:/running/i.test(e||``)?`running`:`unknown`}function VT(e){return e?e.replaceAll(`\\`,`/`).split(`/`).filter(Boolean).at(-1)||e:`未知目录`}function HT(e){return/^\/(?:tmp|var\/tmp)(?:\/|$)/.test(e)}function UT(e,t){let n=t.find(t=>t.alias===e.host);if(!n)return[];let r=VT(e.cwd),i=r.split(`-`)[0].toLowerCase(),a=new Set(r.toLowerCase().split(/[^a-z0-9_]+/).filter(e=>e.length>=3)),o=Array.from(new Set([...n.agents.map(e=>e.cwd),...n.sessions.map(e=>e.cwd)])).filter(t=>!!t&&t!==e.cwd&&!HT(t)).map(e=>{let t=VT(e).toLowerCase(),n=new Set(t.split(/[^a-z0-9_]+/).filter(e=>e.length>=3)),r=[...a].filter(e=>n.has(e)).length,o=i&&t===i,s=i&&e.toLowerCase().includes(i);return{cwd:e,score:(o?100:0)+(s?40:0)+r*10}});o.sort((e,t)=>t.score-e.score||e.cwd.length-t.cwd.length);let s=o.filter(e=>e.score>0);return HT(e.cwd)||s.unshift({cwd:e.cwd,score:1/0}),Array.from(new Set(s.map(e=>e.cwd)))}function WT(e,t,n){return`${e}::${t}::${n||`active`}`}function GT(e){return`'${e.replaceAll(`'`,`'\\''`)}'`}function KT(e){return e.pane?`ssh ${e.host} -t "tmux attach -t ${e.pane.session}"`:`ssh ${e.host}`}function qT(e){if(!e.rollout?.id)return`ssh ${e.host}`;let t=e.executable||`codex`,n=`scope-${e.rollout.id.slice(0,8)}`.replace(/[^a-zA-Z0-9_-]/g,`-`),r=[`exec`,GT(t),`resume`,GT(e.rollout.id)].join(` `),i=[`tmux new-session -A`,`-s`,GT(n),`-c`,GT(e.cwd||`.`),GT(r)].join(` `);return`ssh ${e.host} -t "${i}"`}function JT({host:e,cwd:t,className:n=``}){let r=t||`未记录工作目录`;async function i(){if(t)try{await YT({host:e,cwd:t})}catch(e){window.alert(e instanceof Error?e.message:`无法打开 VS Code`)}}return(0,O.jsxs)(`button`,{type:`button`,className:`remote-workdir-link ${n}`.trim(),title:`由本机 SCOPE Bridge 在 VS Code Remote SSH 中打开 ${e}:${r}`,disabled:!t,onClick:e=>{e.stopPropagation(),i()},onKeyDown:e=>e.stopPropagation(),children:[(0,O.jsx)(me,{size:13}),(0,O.jsx)(`code`,{children:r}),(0,O.jsx)(de,{size:12})]})}async function YT({host:e,cwd:t,file:n,line:r,column:i}){let a=await fetch(TT(`/api/vscode/open`),{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({host:e,cwd:t,file:n,line:r,column:i})}),o=await a.json();if(!a.ok)throw Error(o.error||`HTTP ${a.status}`);return o}function XT({host:e,cwd:t,remotePath:n,line:r,column:i,className:a=``,children:o}){let[s,c]=(0,f.useState)(`idle`),[l,u]=(0,f.useState)(``);async function d(){if(s!==`opening`){c(`opening`),u(``);try{await YT({host:e,cwd:t,file:n,line:r,column:i}),c(`idle`)}catch(e){u(e instanceof Error?e.message:`无法打开 VS Code`),c(`error`)}}}let p=s===`error`?l:`点击后由本机 SCOPE Bridge 打开 VS Code Remote SSH 工作区 ${e}:${t},再定位 ${n}${r?`:${r}${i?`:${i}`:``}`:``}`;return(0,O.jsxs)(`button`,{type:`button`,className:`remote-markdown-link ${s===`error`?`has-error`:``} ${a}`.trim(),title:p,"aria-label":`${p}${s===`opening`?`,正在打开`:``}`,"aria-busy":s===`opening`,onClick:e=>{e.stopPropagation(),d()},children:[(0,O.jsx)(`span`,{children:o}),s===`opening`?(0,O.jsx)(be,{"aria-hidden":`true`,size:11,className:`is-spinning`}):s===`error`?(0,O.jsx)($e,{"aria-hidden":`true`,size:11}):(0,O.jsx)(de,{"aria-hidden":`true`,size:11})]})}function ZT({value:e,className:t=``,remoteHost:n,remoteCwd:r}){return(0,O.jsx)(bT,{value:e,className:t,remoteHost:n,remoteCwd:r,RemoteFileLink:XT})}function QT({title:e,meta:t,defaultOpen:n=!1,className:r=``,children:i}){let[a,o]=(0,f.useState)(n);return(0,O.jsxs)(`details`,{className:`detail-section inspector-collapsible ${r}`.trim(),open:a,onToggle:e=>o(e.currentTarget.open),children:[(0,O.jsxs)(`summary`,{className:`section-title-row collapsible-section-summary`,children:[(0,O.jsx)(`span`,{className:`detail-label`,children:e}),t&&(0,O.jsx)(`span`,{children:t}),(0,O.jsx)(D,{size:15,className:`section-chevron`})]}),a&&i]})}function $T(e,t){let n=t.preview.split(/\r?\n/).map(e=>e.trim()).filter(Boolean),r=n.slice(-20).join(`
548
+ `),i=/traceback|error:|failed|fatal|out of memory|killed|address already in use|nan\b/i,a=/\bcomplete(?:d)?\b|finished|100(?:\.0+)?%|pane is dead|exit(?:ed)?\s+0/i,o=[...r.matchAll(/(\d+(?:\.\d+)?)\s*%/g)],s=r.match(/\bETA[=: ]+([^\s,;]+)/i),c=n.at(-1)||`尚未采集到终端输出`,l=`working`;(t.dead||a.test(r))&&(l=`idle`),(t.dead&&t.exitStatus!==0||i.test(r))&&(l=`attention`);let u=new Set((e.workloads||[]).filter(e=>e.pane?.session===t.session&&e.pane?.pane===t.pane).flatMap(e=>e.gpus.map(e=>e.index).filter(e=>e!==null)));return{...t,id:`${e.alias}:${t.session}:${t.pane}`,host:e.alias,hostname:e.hostname||e.alias,status:l,progress:o.at(-1)?.[1]?`${o.at(-1)?.[1]}%`:null,eta:s?.[1]||null,lastLine:c,gpus:e.gpus.filter(e=>u.has(e.index))}}function eE(){let[e,t]=(0,f.useState)(null),[n,r]=(0,f.useState)(``),[i,a]=(0,f.useState)(``),[o,s]=(0,f.useState)(!1),c=(0,f.useRef)(!0),l=(0,f.useRef)(0),u=(0,f.useCallback)(async e=>{let n=++l.current,i=await fetch(TT(`/api/workbench`),{cache:`no-store`,signal:e}),a=await i.json();if(!i.ok)throw Error(a.error||`无法连接工作台`);c.current&&n===l.current&&(t(a),r(``))},[]);(0,f.useEffect)(()=>{c.current=!0;let e=new AbortController,t;async function n(){try{await u(e.signal)}catch(t){e.signal.aborted||r(t.message)}e.signal.aborted||(t=setTimeout(n,3e3))}return n(),()=>{c.current=!1,e.abort(),clearTimeout(t)}},[u]);async function d(e,t){s(!0),a(``);try{let n=await fetch(TT(`/api/workbench/${e}`),{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t)}),i=await n.json();if(!n.ok)throw Error(i.error||`操作失败`);try{await u()}catch(e){c.current&&r(e.message)}return i}catch(e){throw c.current&&a(e.message),e}finally{c.current&&s(!1)}}return{state:e,error:i||n,busy:o,mutate:d}}function tE(e){let[t,n]=(0,f.useState)(``),[r,i]=(0,f.useState)(``);async function a(r,a,o){if(!t){n(`${r}:${a}`),i(``);try{let t=await fetch(TT(`/api/session/archives`),{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({host:r,sessionId:a,action:o})}),n=await t.json();if(!t.ok)throw Error(n.error||`归档操作失败`);o===`archive`&&e(r,a)}catch(e){i(e.message)}finally{n(``)}}}return{busy:t,error:r,change:a}}var nE=`@local`,rE=(e,t=`zh-CN`)=>e===`@local`?t===`en`?`Local`:`本机`:e;function iE(e,t){let n=typeof t==`string`?t.trim():``;if(!n||n.length>4e3||/[\x00-\x1f\x7f]/.test(n))throw Error(`请输入有效的工作目录`);if(e===`@local`){if(!/^(?:[A-Za-z]:[\\/]|[\\/]{2}[^\\/]+[\\/][^\\/]+|\/)/.test(n))throw Error(`请输入本机绝对目录,例如 C:/projects 或 /workspace`);let e=n.replaceAll(`\\`,`/`).replace(/^([a-z]):/,(e,t)=>`${t.toUpperCase()}:`);return e.replace(/\/+$/,``)+(/^[A-Z]:\/$/.test(e)?`/`:``)||`/`}if(!n.startsWith(`/`))throw Error(`请输入远端 Linux 绝对目录`);return n.replace(/\/+$/,``)||`/`}function aE(e,t){let n=typeof e==`string`?e.trim():``,r=typeof t==`string`?t:``,i;try{i=n===`@local`?iE(n,r):r.replace(/\/+$/,``)||(r?`/`:``)}catch{return null}return n!==`@local`&&!i.startsWith(`/`)||!n||/[\u0000-\u001f\u007f]/.test(n+i)?null:{host:n,cwd:i,key:JSON.stringify([n,i])}}function oE(e){if(!Array.isArray(e))return[];let t=new Set;return e.flatMap(e=>{let n=aE(e?.host,e?.cwd);return!n||t.has(n.key)?[]:(t.add(n.key),[{host:n.host,cwd:n.cwd,name:typeof e.name==`string`?e.name.trim().slice(0,80):``}])})}function sE(e,t){let n=new Map;for(let t of oE(e)){let e=aE(t.host,t.cwd);n.set(e.key,{...t,key:e.key,pinned:!0,sessions:[]})}for(let e of t||[]){let t=aE(e.host,e.cwd);t&&(n.has(t.key)||n.set(t.key,{...t,name:``,pinned:!1,sessions:[]}),n.get(t.key).sessions.push(e))}return[...n.values()].sort((e,t)=>Number(t.pinned)-Number(e.pinned)||e.cwd.localeCompare(t.cwd)||e.host.localeCompare(t.host))}function cE(e){let t=String(e).matchAll(/```scope-plan\s*\n([\s\S]*?)```/g);for(let e of t)try{let t=JSON.parse(e[1]);if(!Array.isArray(t))continue;return t.slice(0,8).filter(e=>e&&[`codex`,`claude`,`dsh`].includes(e.provider)&&typeof e.host==`string`&&typeof e.cwd==`string`&&aE(e.host,e.cwd)&&typeof e.prompt==`string`&&e.prompt.trim()&&e.prompt.length<=16e3).map(e=>({provider:e.provider,host:e.host,cwd:aE(e.host,e.cwd).cwd,prompt:e.prompt,gpuCount:Number.isInteger(e.gpuCount)?e.gpuCount:0,minMemoryMiB:Number.isInteger(e.minMemoryMiB)?e.minMemoryMiB:0}))}catch{}return[]}var lE={none:`无`,minimal:`最少`,low:`低`,medium:`中`,high:`高`,xhigh:`极高`,max:`最大`,ultra:`超高`};function uE(e,t){return e?.supportedReasoningEfforts?.includes(t)?t:``}function dE({state:e,busy:t,mutate:n,hosts:r,pending:i}){let[a,o]=(0,f.useState)(!1),[s,c]=(0,f.useState)(e.config.manager.host),[l,u]=(0,f.useState)([]),[d,p]=(0,f.useState)(``),[m,h]=(0,f.useState)(!1),g=(0,f.useRef)(null),_=(0,f.useRef)(null);(0,f.useEffect)(()=>{if(!a)return;let e=e=>{g.current?.contains(e.target)||o(!1)},t=e=>{e.key===`Escape`&&(o(!1),_.current?.focus())};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[a]),(0,f.useEffect)(()=>{if(!a||!s)return;let t=new AbortController,n=new URLSearchParams({host:s});return e.managerSession?.sessionId&&n.set(`sessionId`,e.managerSession.sessionId),fetch(TT(`/api/models?${n}`),{signal:t.signal}).then(async e=>{let n=await e.json();if(!e.ok)throw Error(n.error||`模型目录读取失败`);t.signal.aborted||u(n.models||[])}).catch(e=>{t.signal.aborted||p(e.message)}).finally(()=>{t.signal.aborted||h(!1)}),()=>t.abort()},[a,s,e.managerSession?.sessionId]);let v=l.find(t=>(t.model||t.id)===e.config.manager.model);async function y(t,r){try{await n(`config`,{revision:e.configRevision,config:{...e.config,manager:{...e.config.manager,host:s,model:t,effort:r}}})}catch(e){p(e.message)}}return(0,O.jsxs)(`div`,{className:`manager-model-picker`,ref:g,children:[(0,O.jsxs)(`button`,{type:`button`,className:`composer-model`,ref:_,"aria-label":`切换总调度模型`,"aria-expanded":a,onClick:()=>{c(e.config.manager.host),u([]),p(``),h(!!e.config.manager.host),o(e=>!e)},children:[(0,O.jsx)(`span`,{children:e.config.manager.model}),(0,O.jsx)(`span`,{className:`manager-effort-label`,children:lE[e.config.manager.effort]||`默认`}),(0,O.jsx)(te,{size:12})]}),a&&(0,O.jsxs)(`section`,{className:`composer-popover manager-model-menu`,role:`dialog`,"aria-label":`总调度模型`,children:[(0,O.jsxs)(`header`,{children:[(0,O.jsx)(`strong`,{children:`模型`}),(0,O.jsx)(`button`,{type:`button`,"aria-label":`关闭模型菜单`,onClick:()=>{o(!1),_.current?.focus()},children:(0,O.jsx)(it,{size:16})})]}),!e.config.manager.host&&(0,O.jsxs)(`label`,{children:[`运行设备`,(0,O.jsxs)(`select`,{"aria-label":`模型所在设备`,value:s,onChange:e=>{c(e.target.value),u([]),p(``),h(!!e.target.value)},children:[(0,O.jsx)(`option`,{value:``,children:`选择设备`}),r.map(e=>(0,O.jsxs)(`option`,{value:e.alias,disabled:!e.reachable,children:[rE(e.alias),e.reachable?``:` · 离线`]},e.alias))]})]}),i&&(0,O.jsx)(`p`,{children:`当前回复结束后可切换模型。`}),m&&(0,O.jsxs)(`p`,{children:[(0,O.jsx)(be,{size:14,className:`is-spinning`}),` `,`正在读取可用模型…`]}),d&&(0,O.jsx)(`p`,{role:`alert`,children:d}),(0,O.jsx)(`div`,{className:`manager-model-options`,children:l.map(n=>(0,O.jsxs)(`button`,{type:`button`,disabled:t||i,onClick:()=>void y(n.model||n.id,uE(n,e.config.manager.effort)),"aria-pressed":(n.model||n.id)===e.config.manager.model,children:[(0,O.jsx)(`span`,{children:n.displayName||n.model||n.id}),(n.model||n.id)===e.config.manager.model&&(0,O.jsx)(ee,{size:14})]},n.id))}),!!v?.supportedReasoningEfforts?.length&&(0,O.jsxs)(`label`,{className:`manager-effort-control`,children:[`推理强度`,(0,O.jsxs)(`select`,{"aria-label":`总调度推理强度`,value:e.config.manager.effort||``,disabled:t||i,onChange:t=>void y(e.config.manager.model,t.target.value),children:[(0,O.jsxs)(`option`,{value:``,children:[`模型默认`,v.defaultReasoningEffort?` · ${lE[v.defaultReasoningEffort]||v.defaultReasoningEffort}`:``]}),v.supportedReasoningEfforts.map(e=>(0,O.jsx)(`option`,{value:e,children:lE[e]||e},e))]})]}),!m&&s&&!l.length&&!d&&(0,O.jsx)(`p`,{children:`这台设备暂未返回可用模型。`})]})]})}function fE({label:e,value:t,options:n,onChange:r,disabled:i=!1,searchable:a=!1,searchPlaceholder:o=`搜索…`,icon:s,compact:c=!1,fieldLabel:l,className:u=``}){let d=(0,f.useId)(),p=(0,f.useRef)(null),m=(0,f.useRef)(null),h=(0,f.useRef)(null),g=(0,f.useRef)({top:0,left:0}),[_,v]=(0,f.useState)(!1),[y,b]=(0,f.useState)(``),x=n.find(e=>e.value===t),S=n.filter(e=>`${e.label} ${e.description||``}`.toLocaleLowerCase().includes(y.trim().toLocaleLowerCase()));function C(e=!1){m.current?.hidePopover(),e&&p.current?.focus({preventScroll:!0})}function w(){if(i||!m.current||!p.current)return;if(_)return C();b(``);let e=p.current.getBoundingClientRect();g.current={top:e.top,left:e.left};let t=window.visualViewport,n=t?.width||window.innerWidth,r=t?.height||window.innerHeight,o=t?.offsetLeft||0,s=t?.offsetTop||0,c=Math.min(n-24,Math.max(e.width,a?300:240)),l=e.top-s>r+s-e.bottom;Object.assign(m.current.style,{width:`${c}px`,left:`${Math.max(o+12,Math.min(e.right-c,o+n-c-12))}px`,top:l?`auto`:`${e.bottom+8}px`,bottom:l?`${window.innerHeight-e.top+8}px`:`auto`,maxHeight:`${Math.max(80,Math.min(380,(l?e.top-s:r+s-e.bottom)-20))}px`}),m.current.showPopover(),requestAnimationFrame(()=>{a?h.current?.focus({preventScroll:!0}):(m.current?.querySelector(`[aria-selected="true"]:not(:disabled)`))?.focus({preventScroll:!0})})}return(0,f.useEffect)(()=>{if(!_)return;let e=()=>m.current?.hidePopover(),t=t=>{if(m.current?.contains(t.target))return;let n=p.current?.getBoundingClientRect();(!n||Math.abs(n.top-g.current.top)>1||Math.abs(n.left-g.current.left)>1)&&e()};return window.addEventListener(`resize`,e),window.addEventListener(`scroll`,t,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,t,!0)}},[_]),(0,O.jsxs)(`div`,{className:`choice-menu${c?` is-compact`:``}${u?` ${u}`:``}`,children:[l&&(0,O.jsx)(`span`,{className:`choice-field-label`,children:l}),(0,O.jsxs)(`button`,{ref:p,type:`button`,className:`choice-trigger`,"aria-label":e,title:x?.label||t||e,"aria-haspopup":`listbox`,"aria-expanded":_,"aria-controls":d,disabled:i,onClick:w,onKeyDown:e=>{[`ArrowDown`,`ArrowUp`].includes(e.key)&&(e.preventDefault(),w())},children:[s,(0,O.jsx)(`span`,{children:x?.label||t||e}),(0,O.jsx)(te,{size:13,className:`choice-chevron`})]}),(0,O.jsxs)(`div`,{ref:m,popover:`auto`,className:`choice-panel`,onToggle:e=>v(e.currentTarget.matches(`:popover-open`)),onKeyDown:e=>{if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),C(!0);return}if(e.key===`Tab`){C(!0);return}let t=Array.from(m.current?.querySelectorAll(`[role="option"]:not(:disabled)`)||[]),n=t.indexOf(document.activeElement);if(e.key===`Enter`&&e.target===h.current){e.preventDefault(),t[0]?.click();return}let r=n;if(e.key===`ArrowDown`)r=(n+1)%t.length;else if(e.key===`ArrowUp`)r=n<=0?t.length-1:n-1;else if(e.target!==h.current&&e.key===`Home`)r=0;else if(e.target!==h.current&&e.key===`End`)r=t.length-1;else return;e.preventDefault(),t[r]?.focus()},children:[(0,O.jsx)(`div`,{className:`choice-title`,children:e}),a&&(0,O.jsxs)(`div`,{className:`choice-search`,children:[(0,O.jsx)(Be,{size:14}),(0,O.jsx)(`input`,{ref:h,"aria-label":`搜索${e}`,placeholder:o,value:y,onChange:e=>b(e.target.value)})]}),(0,O.jsxs)(`div`,{className:`choice-options`,id:d,role:`listbox`,"aria-label":e,children:[S.map(e=>(0,O.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":e.value===t,tabIndex:-1,disabled:e.disabled,onClick:()=>{r(e.value),C(!0)},children:[(0,O.jsxs)(`span`,{children:[(0,O.jsx)(`span`,{className:`choice-option-label`,children:e.label}),e.description&&(0,O.jsx)(`small`,{children:e.description})]}),e.value===t?(0,O.jsx)(ee,{size:15}):(0,O.jsx)(`span`,{className:`choice-check-space`})]},e.value)),!S.length&&(0,O.jsx)(`p`,{className:`choice-empty`,children:`没有匹配的选项`})]})]})]})}function pE({state:e,hosts:t,busy:n,mutate:r,onReady:i,onCancel:a,sending:o}){let s=e.config.manager.host||t.find(e=>e.alias===`@local`&&e.reachable)?.alias||t.find(e=>e.reachable)?.alias||``,[c,l]=(0,f.useState)(s),[u,d]=(0,f.useState)(e.config.manager.cwd||t.find(e=>e.alias===s)?.defaultCwd||``),[p,m]=(0,f.useState)(!1),[h,g]=(0,f.useState)(``);async function _(){if(!(p||n)){m(!0),g(``);try{await r(`config`,{revision:e.configRevision,config:{...e.config,manager:{...e.config.manager,host:c,cwd:u}}}),await i()}catch(e){g(e.message)}finally{m(!1)}}}return(0,O.jsxs)(`form`,{className:`manager-inline-setup`,"aria-label":`设置总调度运行位置`,onSubmit:e=>{e.preventDefault(),_()},children:[(0,O.jsx)(`strong`,{children:`选择运行位置`}),(0,O.jsxs)(`div`,{className:`manager-setup-fields`,children:[(0,O.jsx)(`div`,{className:`settings-field`,children:(0,O.jsx)(fE,{label:`设备`,fieldLabel:`设备`,value:c,disabled:p,options:[{value:``,label:`选择设备`},...t.map(e=>({value:e.alias,label:rE(e.alias),description:e.reachable?`在线`:`离线`,disabled:!e.reachable}))],onChange:e=>{l(e),d(t.find(t=>t.alias===e)?.defaultCwd||``)}})}),(0,O.jsxs)(`label`,{children:[`工作目录`,(0,O.jsx)(`input`,{required:!0,value:u,disabled:p,placeholder:c===`@local`?`C:/projects`:`/workspace`,onChange:e=>d(e.target.value)})]})]}),c===`@local`&&(0,O.jsx)(`small`,{children:`在运行 SCOPE 的电脑上执行,沿用本机 Codex 登录。`}),h&&(0,O.jsx)(`p`,{role:`alert`,children:h}),(0,O.jsxs)(`footer`,{children:[(0,O.jsx)(`button`,{type:`button`,onClick:a,disabled:p,children:`取消`}),(0,O.jsx)(`button`,{type:`submit`,className:`center-primary`,disabled:n||p||!c||!u.trim(),children:p?`正在保存…`:o?`保存并发送`:`保存`})]})]})}function mE({events:e,active:t=!1,host:n=``,cwd:r=``}){let{tr:i}=fc(),[a,o]=(0,f.useState)(!1),s=e.at(-1),c=e.some(e=>e.kind===`command`),l=e.some(e=>e.kind===`tool`),u=e.some(e=>e.kind===`reasoning`||e.category===`reasoning`),d=c?Ze:l?rt:u?T:ye,p=t?s?.kind===`command`?i(`正在执行命令`,`Running command`):s?.kind===`tool`?i(`正在使用工具`,`Using tools`):i(`正在思考`,`Thinking`):c?i(`运行了命令`,`Ran commands`):l?i(`使用了工具`,`Used tools`):u?i(`思考过程`,`Reasoning`):i(`执行记录`,`Activity`);return(0,O.jsxs)(`details`,{className:`conversation-activity`,open:a,onToggle:e=>o(e.currentTarget.open),children:[(0,O.jsxs)(`summary`,{children:[t?(0,O.jsx)(be,{size:14,className:`is-spinning`}):(0,O.jsx)(d,{size:14}),(0,O.jsx)(`span`,{children:p}),(0,O.jsx)(te,{size:14})]}),a&&(0,O.jsx)(`div`,{className:`conversation-activity-content`,children:e.map(e=>(0,O.jsxs)(`div`,{className:`conversation-tool`,children:[(0,O.jsx)(`strong`,{children:e.title||e.toolName||i(`执行记录`,`Activity`)}),e.command&&(0,O.jsx)(`pre`,{children:(0,O.jsx)(`code`,{children:e.command})}),(0,O.jsx)(ZT,{value:e.output||e.text||i(`暂无输出`,`No output`),remoteHost:n,remoteCwd:r})]},e.id))})]})}function hE({host:e,scope:t,onError:n}){let{tr:r}=fc(),[i,a]=(0,f.useState)([]),o=(0,f.useRef)([]);o.current=i;let s=(0,f.useRef)(null),c=`${e}::${t}`,l=(0,f.useRef)(c);(0,f.useEffect)(()=>{l.current=c,a(e=>{for(let t of e)t.previewUrl&&URL.revokeObjectURL(t.previewUrl);return[]}),s.current&&(s.current.value=``)},[c]),(0,f.useEffect)(()=>()=>{for(let e of o.current)e.previewUrl&&URL.revokeObjectURL(e.previewUrl)},[]);function u(e){a(t=>{let n=t.find(t=>t.localId===e);return n?.previewUrl&&URL.revokeObjectURL(n.previewUrl),t.filter(t=>t.localId!==e)})}function d(){a(e=>{for(let t of e)t.previewUrl&&URL.revokeObjectURL(t.previewUrl);return[]}),s.current&&(s.current.value=``)}async function p(o){if(!o.length)return;if(!e){n?.(r(`请先选择运行主机后再添加附件。`,`Select a target host before attaching files.`));return}if(i.some(e=>e.status===`uploading`)){n?.(r(`上一批附件仍在上传,请稍候。`,`Previous attachments are still uploading.`));return}let u=c;l.current=u;let d=i.reduce((e,t)=>e+t.size,0),f=Math.max(0,8-i.length),p=[],m=[];for(let e of o){if(!f){m.push(r(`${e.name}:每条消息最多 8 个附件`,`${e.name}: up to 8 attachments per message`));continue}if(e.size>52428800){m.push(r(`${e.name}:单个文件不能超过 50 MiB`,`${e.name}: exceeds 50 MiB file limit`));continue}if(d+e.size>104857600){m.push(r(`${e.name}:附件总大小不能超过 100 MiB`,`${e.name}: exceeds 100 MiB total limit`));continue}let t=globalThis.crypto?.randomUUID?.()||`${Date.now()}-${Math.random().toString(16).slice(2)}`,n=e.type.startsWith(`image/`)?URL.createObjectURL(e):``,i={localId:t,name:e.name||`attachment`,mimeType:e.type||`application/octet-stream`,size:e.size,kind:e.type.startsWith(`image/`)?`image`:`file`,status:`uploading`,token:``,remotePath:``,previewUrl:n,error:``};p.push({file:e,attachment:i}),d+=e.size,--f}p.length&&a(e=>[...e,...p.map(({attachment:e})=>e)]),m.length&&n?.(m.join(`;`));for(let{file:n,attachment:r}of p)try{let i=new URLSearchParams({host:e,scope:t,name:n.name||`attachment`,mimeType:n.type||`application/octet-stream`}),o=await fetch(TT(`/api/session/attachment?${i.toString()}`),{method:`POST`,headers:{"Content-Type":`application/octet-stream`},body:n}),s=await o.json().catch(()=>({}));if(!o.ok||!s.attachment)throw Error(s.error||`HTTP ${o.status}`);if(l.current!==u)continue;a(e=>e.map(e=>e.localId===r.localId?{...e,...s.attachment,status:`ready`,error:``}:e))}catch(e){if(l.current!==u)continue;a(t=>t.map(t=>t.localId===r.localId?{...t,status:`error`,error:e.message}:t))}s.current&&(s.current.value=``)}function m(e){e.clipboardData.files.length&&p(Array.from(e.clipboardData.files))}function h(e){e.dataTransfer.types.includes(`Files`)&&(e.preventDefault(),e.dataTransfer.dropEffect=`copy`)}function g(e){e.dataTransfer.files.length&&(e.preventDefault(),p(Array.from(e.dataTransfer.files)))}function _(){s.current?.click()}return{attachments:i,inputRef:s,uploadFiles:p,remove:u,clear:d,openPicker:_,onPaste:m,onDragOver:h,onDrop:g,uploading:i.some(e=>e.status===`uploading`),hasUnready:i.some(e=>e.status!==`ready`),readyTokens:i.filter(e=>e.status===`ready`&&e.token).map(e=>({token:e.token}))}}function gE({attachments:e,onRemove:t}){let{tr:n}=fc();return e.length?(0,O.jsx)(`ul`,{className:`instruction-attachment-list`,children:e.map(e=>(0,O.jsxs)(`li`,{className:`instruction-attachment is-${e.status}`,title:e.error||e.remotePath||e.name,children:[e.previewUrl?(0,O.jsx)(`img`,{src:e.previewUrl,alt:``}):e.kind===`image`?(0,O.jsx)(ge,{size:17}):(0,O.jsx)(fe,{size:17}),(0,O.jsxs)(`span`,{children:[(0,O.jsx)(`strong`,{children:e.name}),(0,O.jsxs)(`small`,{children:[zT(e.size),` ·`,` `,e.status===`uploading`?n(`正在上传`,`Uploading`):e.status===`error`?n(`上传失败`,`Failed`):n(`已就绪`,`Ready`)]})]}),e.status===`uploading`?(0,O.jsx)(be,{size:14,className:`is-spinning`}):(0,O.jsx)(`button`,{type:`button`,"aria-label":n(`移除附件 ${e.name}`,`Remove ${e.name}`),onClick:()=>t(e.localId),children:(0,O.jsx)(it,{size:14})})]},e.localId))}):null}function _E({inputRef:e,onFiles:t}){return(0,O.jsx)(`input`,{ref:e,className:`visually-hidden`,type:`file`,multiple:!0,hidden:!0,style:{display:`none`},onChange:e=>{let n=Array.from(e.target.files||[]);n.length&&t(n)}})}function vE({uploading:e,disabled:t,compact:n=!1,onClick:r}){let{tr:i}=fc();return(0,O.jsxs)(`button`,{type:`button`,className:n?`secondary-action attachment-picker is-compact`:`secondary-action attachment-picker`,disabled:t||e,onClick:r,"aria-label":i(`添加附件`,`Attach files`),title:i(`添加附件(支持拖拽与粘贴,单文件 ≤ 50 MiB)`,`Attach files (drag & drop or paste supported, ≤ 50 MiB each)`),children:[(0,O.jsx)(ke,{size:14}),n?null:(0,O.jsx)(`span`,{children:i(`附件`,`Attach`)})]})}var yE={queued:`排队中`,starting:`正在启动`,running:`执行中`,waiting:`等待回应`,unknown:`需要核实`,completed:`已完成`,failed:`执行失败`,cancelled:`已取消`,released:`占用已释放`},bE={queued:`Queued`,starting:`Starting`,running:`Running`,waiting:`Waiting`,unknown:`Verify`,completed:`Completed`,failed:`Failed`,cancelled:`Cancelled`,released:`Released`};function xE({state:e,busy:t,mutate:n,onSettings:r,onDraft:i,hosts:a}){let{tr:o}=fc(),[s,c]=(0,f.useState)(``),[l,u]=(0,f.useState)(``),[d,p]=(0,f.useState)(!1),[m,h]=(0,f.useState)(!1),g=(0,f.useRef)({text:``,id:``}),_=(0,f.useRef)(null),v=(0,f.useRef)(!0),[b,C]=(0,f.useState)(!1),T=!!(e.config.manager.host&&e.config.manager.cwd),E=hE({host:T?e.config.manager.host:``,scope:`manager`,onError:u}),ee=e.tasks.filter(e=>e.kind===`manager`&&[`queued`,`starting`,`running`,`waiting`,`unknown`].includes(e.status));(0,f.useEffect)(()=>{if(e.messages.length&&v.current)_.current?.scrollIntoView({block:`nearest`});else if(e.messages.length){let e=requestAnimationFrame(()=>C(!0));return()=>cancelAnimationFrame(e)}},[e.messages.length]);async function te(e=!1){let r=s.trim();if(!(r||E.readyTokens.length>0)||E.hasUnready||t&&!e)return;if(!T&&!e){h(!0),p(!0);return}let i=JSON.stringify({text:r,tokens:E.readyTokens});g.current.text!==i&&(g.current={text:i,id:crypto.randomUUID()}),u(``);try{await n(`messages`,{prompt:r,...E.readyTokens.length?{attachments:E.readyTokens}:{},requestId:g.current.id}),c(``),E.clear(),g.current={text:``,id:``}}catch{}}return(0,O.jsxs)(`section`,{className:`manager-chat`,"aria-label":`跨项目总调度`,children:[(0,O.jsxs)(`header`,{className:`center-page-heading`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{className:`center-eyebrow`,children:`SCOPE / 总调度`}),(0,O.jsx)(`h1`,{children:`总调度`})]}),(0,O.jsx)(`button`,{className:`center-icon-button`,onClick:r,"aria-label":`配置总调度`,children:(0,O.jsx)(Ke,{size:18})})]}),(0,O.jsxs)(`div`,{className:`manager-conversation`,role:`log`,"aria-label":`总调度对话`,onScroll:e=>{let t=e.currentTarget;v.current=t.scrollHeight-t.scrollTop-t.clientHeight<80,v.current&&C(!1)},children:[!e.messages.length&&(0,O.jsxs)(`div`,{className:`manager-welcome`,children:[(0,O.jsx)(`div`,{className:`manager-emblem`,children:(0,O.jsx)(w,{size:28,strokeWidth:1.5})}),(0,O.jsx)(`h2`,{children:`多个项目,一个目标。`}),(0,O.jsx)(`p`,{children:`从这里了解进展、梳理下一步,把任务送到合适的主机与 Agent。`}),(0,O.jsx)(`div`,{className:`manager-suggestions`,children:[`帮我梳理所有项目的进展和阻塞`,`看看现有资源,安排下一批任务`,`我想开始一个新项目,先一起拆解目标`].map(e=>(0,O.jsxs)(`button`,{onClick:()=>c(e),children:[e,(0,O.jsx)(x,{size:16})]},e))})]}),e.messages.map(t=>(0,O.jsxs)(`article`,{className:`manager-message ${t.role}`,children:[(0,O.jsx)(`span`,{className:`message-author`,children:t.role===`user`?`你`:`SCOPE`}),t.role===`assistant`&&!!e.tasks.find(e=>e.id===t.taskId)?.result?.activity?.length&&(0,O.jsx)(mE,{events:e.tasks.find(e=>e.id===t.taskId).result.activity}),(0,O.jsx)(ZT,{value:t.text}),t.role===`assistant`&&i&&cE(t.text).map((e,t)=>(0,O.jsxs)(`button`,{className:`manager-plan`,onClick:()=>i(e),children:[(0,O.jsxs)(`span`,{children:[(0,O.jsxs)(`strong`,{children:[e.host,` · `,e.cwd.split(`/`).pop()]}),(0,O.jsxs)(`small`,{children:[e.provider,` · `,e.prompt.slice(0,90)]})]}),(0,O.jsxs)(`span`,{children:[`查看任务 `,(0,O.jsx)(x,{size:14})]})]},t))]},t.id)),ee.map(e=>e.result?.activity?.length?(0,O.jsx)(mE,{events:e.result.activity,active:e.status===`running`},e.id):(0,O.jsxs)(`div`,{className:`manager-pending`,children:[[`unknown`,`waiting`].includes(e.status)?(0,O.jsx)(w,{size:16}):(0,O.jsx)(be,{className:`is-spinning`,size:16}),(0,O.jsxs)(`span`,{children:[yE[e.status],e.error?` · ${e.error}`:e.queueReason?` · ${e.queueReason}`:e.status===`running`?` · 正在思考`:``]})]},e.id)),(0,O.jsx)(`div`,{ref:_})]}),(0,O.jsxs)(`div`,{className:`manager-compose-wrap`,children:[b&&(0,O.jsxs)(`button`,{className:`conversation-stop`,onClick:()=>{v.current=!0,C(!1),_.current?.scrollIntoView({block:`nearest`})},children:[(0,O.jsx)(y,{size:14}),`回到最新消息`]}),!T&&(0,O.jsxs)(`div`,{className:`setup-callout`,children:[(0,O.jsx)(`span`,{children:`选择运行总调度的主机和目录,即可开始对话。`}),(0,O.jsxs)(`button`,{onClick:()=>{h(!1),p(!0)},children:[`完成设置 `,(0,O.jsx)(x,{size:14})]})]}),d&&(0,O.jsx)(pE,{state:e,hosts:a,busy:t,mutate:n,sending:m&&!!(s.trim()||E.readyTokens.length),onCancel:()=>p(!1),onReady:async()=>{p(!1),m&&await te(!0)}}),l&&(0,O.jsx)(`p`,{className:`form-error`,role:`alert`,children:l}),(0,O.jsxs)(`form`,{className:`manager-composer`,onDragOver:E.onDragOver,onDrop:e=>{if(e.dataTransfer.files.length){if(e.preventDefault(),!T){p(!0);return}u(``),E.onDrop(e)}},onSubmit:e=>{e.preventDefault(),te()},children:[(0,O.jsx)(gE,{attachments:E.attachments,onRemove:E.remove}),(0,O.jsx)(_E,{inputRef:E.inputRef,onFiles:e=>(u(``),E.uploadFiles(e))}),(0,O.jsx)(`textarea`,{"aria-label":o(`发送给总调度`,`Message coordinator`),rows:3,maxLength:16e3,placeholder:o(`说说你想做什么,或者问问项目现在怎么样…(支持拖拽或粘贴附件)`,`Ask about project status or plan next steps… (drop or paste files)`),value:s,onChange:e=>c(e.target.value),onPaste:e=>{if(e.clipboardData.files.length){if(!T){e.preventDefault(),p(!0);return}u(``),E.onPaste(e)}},onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),te())}}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:o(`全部项目`,`All projects`)}),(0,O.jsx)(vE,{compact:!0,uploading:E.uploading,disabled:t,onClick:()=>{if(!T){h(!1),p(!0);return}u(``),E.openPicker()}}),(0,O.jsx)(dE,{state:e,busy:t,mutate:n,hosts:a,pending:ee.length>0}),(0,O.jsx)(`button`,{className:`center-send`,"aria-label":o(`发送消息`,`Send message`),title:T?o(`发送消息`,`Send message`):o(`选择运行设备和目录后发送`,`Choose host & directory first`),disabled:t||!s.trim()&&E.attachments.length===0||E.hasUnready,children:(0,O.jsx)(S,{size:18})})]})]}),(0,O.jsx)(`p`,{className:`compose-caption`,children:`总调度负责分析与规划 · 执行任务进入调度队列 · Shift + Enter 换行`})]})]})}function SE(e,t){if(!e)return t(`连接不可达`,`Unreachable`);if(/REMOTE HOST IDENTIFICATION HAS CHANGED|@{4,}/i.test(e))return t(`SSH 主机指纹已变更,请在终端更新 known_hosts`,`SSH host key changed — refresh known_hosts`);let n=e.replace(/\s+/g,` `).trim();return n.length>90?`${n.slice(0,89)}…`:n}function CE({hosts:e,tasks:t,onSelectHost:n}){let{locale:r,tr:i}=fc(),a=e.filter(e=>e.reachable).sort((e,t)=>t.gpus.length-e.gpus.length||t.agents.length-e.agents.length||e.alias.localeCompare(t.alias)),o=e.filter(e=>!e.reachable),s=a.reduce((e,t)=>e+t.gpus.length,0),c=a.reduce((e,t)=>e+t.agents.length,0);return(0,O.jsxs)(`section`,{className:`resource-overview`,"aria-label":i(`主机与资源`,`Hosts & Resources`),children:[(0,O.jsxs)(`header`,{className:`center-page-heading`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{className:`center-eyebrow`,children:i(`SCOPE / 资源`,`SCOPE / Resources`)}),(0,O.jsx)(`h1`,{children:i(`知道工作在哪里运行。`,`See where every job runs.`)}),(0,O.jsx)(`p`,{children:i(`仅展示当前在线主机与 GPU 负载;离线或认证失败节点默认折叠在下方。`,`Showing online hosts and live GPUs; unreachable hosts are collapsed below.`)})]}),e.length>0&&(0,O.jsxs)(`div`,{className:`resource-summary-strip`,children:[(0,O.jsxs)(`span`,{children:[(0,O.jsx)(`strong`,{children:a.length}),` / `,e.length,` `,i(`在线主机`,`Online`)]}),(0,O.jsxs)(`span`,{children:[(0,O.jsx)(`strong`,{children:s}),` GPU`]}),(0,O.jsxs)(`span`,{children:[(0,O.jsx)(`strong`,{children:c}),` `,i(`活动会话`,`Active sessions`)]})]})]}),a.length>0&&(0,O.jsx)(`div`,{className:`resource-grid`,children:a.map(e=>{let a=t.filter(t=>t.host===e.alias&&[`starting`,`running`,`waiting`,`unknown`].includes(t.status)).length;return(0,O.jsxs)(`article`,{className:`resource-card center-card`,children:[(0,O.jsxs)(`header`,{children:[(0,O.jsx)(He,{size:18}),(0,O.jsx)(`strong`,{children:rE(e.alias,r)}),(0,O.jsx)(`span`,{className:`resource-status online`,children:i(`在线`,`Online`)})]}),(0,O.jsx)(`p`,{className:`resource-hostname`,title:e.hostname||``,children:e.hostname||e.alias}),(e.stale||e.inventoryError)&&(0,O.jsx)(`p`,{className:`center-error`,children:SE(e.inventoryError,i)}),(0,O.jsxs)(`div`,{className:`resource-metrics`,children:[(0,O.jsxs)(`span`,{children:[(0,O.jsx)(`strong`,{children:e.agents.length}),` `,i(`活动会话`,`Sessions`)]}),(0,O.jsxs)(`span`,{children:[(0,O.jsx)(`strong`,{children:a}),` `,i(`工作台占用`,`Tasks`)]}),n&&(0,O.jsxs)(`button`,{type:`button`,className:`resource-jump`,onClick:()=>n(e.alias),children:[i(`查看会话`,`Sessions`),(0,O.jsx)(D,{size:13})]})]}),e.gpus.length?e.gpus.map(t=>{let n=t.memoryTotal?Math.min(100,Math.round(t.memoryUsed/t.memoryTotal*100)):0;return(0,O.jsxs)(`div`,{className:`resource-gpu`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(le,{size:14}),(0,O.jsxs)(`strong`,{children:[`GPU `,t.index]}),(0,O.jsx)(`span`,{title:t.name,children:t.name})]}),(0,O.jsx)(`div`,{className:`resource-gpu-bar`,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":`${e.alias} GPU ${t.index} 显存使用率`,children:(0,O.jsx)(`div`,{className:`resource-gpu-fill`,style:{width:`${n}%`}})}),(0,O.jsxs)(`small`,{children:[t.memoryUsed.toLocaleString(),` /`,` `,t.memoryTotal.toLocaleString(),` MiB ·`,` `,i(`计算利用率`,`Compute`),` `,t.utilization,`%`]})]},t.index)}):(0,O.jsx)(`p`,{className:`resource-no-gpu`,children:i(`未发现 GPU,可运行通用任务`,`CPU host · general workloads`)})]},e.alias)})}),o.length>0&&(0,O.jsxs)(`details`,{className:`resource-offline-section`,open:a.length===0,children:[(0,O.jsxs)(`summary`,{children:[(0,O.jsx)(ne,{size:15}),(0,O.jsx)(`strong`,{children:i(`已折叠 ${o.length} 台不可用 / 离线主机`,`${o.length} unreachable / offline hosts collapsed`)}),(0,O.jsx)(`span`,{children:i(`点击展开连接诊断`,`Click to inspect connection errors`)})]}),(0,O.jsx)(`div`,{className:`resource-offline-grid`,children:o.map(e=>{let t=SE(e.error||e.inventoryError,i);return(0,O.jsxs)(`div`,{className:`resource-offline-item`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{className:`dot`}),(0,O.jsx)(`strong`,{children:rE(e.alias,r)})]}),(0,O.jsx)(`p`,{title:e.error||e.inventoryError||``,children:t})]},e.alias)})})]}),!e.length&&(0,O.jsxs)(`div`,{className:`queue-empty`,children:[(0,O.jsx)(He,{size:24}),(0,O.jsx)(`strong`,{children:i(`连接你的工作主机`,`Connect your hosts`)}),(0,O.jsx)(`p`,{children:i(`配置 SSH 主机并完成首次扫描后,资源会显示在这里。`,`Configure SSH aliases and complete a scan to monitor resources here.`)})]})]})}var wE=Object.freeze({codex:{name:`Codex`,transport:`app-server`,conversation:!0,approvals:!0,gpuIsolation:!1},claude:{name:`Claude Code`,transport:`remote-cli`,conversation:!0,approvals:!0,gpuIsolation:!0},antigravity:{name:`Antigravity`,transport:`remote-cli`,conversation:!0,approvals:!0,gpuIsolation:!0},dsh:{name:`DeepSeek Harness`,transport:`remote-cli`,conversation:!1,approvals:!1,gpuIsolation:!0}});function TE({initial:e,hosts:t,projects:n,state:r,busy:i,mutate:a,onClose:o}){let{tr:s}=fc(),[c,l]=(0,f.useState)(e),[u,d]=(0,f.useState)(``),p=hE({host:c.host,scope:`task`,onError:d}),m=(0,f.useRef)({signature:``,id:``});async function h(){if(i||p.hasUnready)return;let e=JSON.stringify({draft:c,attachments:p.readyTokens});m.current.signature!==e&&(m.current={signature:e,id:crypto.randomUUID()}),d(``);try{await a(`tasks`,{...c,...p.readyTokens.length?{attachments:p.readyTokens}:{},requestId:m.current.id}),p.clear(),o()}catch{}}return(0,O.jsxs)(`form`,{className:`task-composer center-card`,onDragOver:p.onDragOver,onDrop:e=>{d(``),p.onDrop(e)},onSubmit:e=>{e.preventDefault(),h()},children:[(0,O.jsxs)(`header`,{children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h2`,{children:`派发一个任务`}),(0,O.jsx)(`p`,{children:`任务会按资源与并发设置执行。`})]}),(0,O.jsx)(`button`,{type:`button`,className:`center-icon-button`,onClick:o,"aria-label":`关闭任务编辑`,children:(0,O.jsx)(it,{size:18})})]}),(0,O.jsxs)(`div`,{className:`settings-field`,style:{marginBottom:16},children:[(0,O.jsx)(`span`,{className:`settings-field-label`,children:s(`从已有项目开始`,`Start from project`)}),(0,O.jsx)(fE,{label:s(`从已有项目开始`,`Start from project`),searchable:!0,searchPlaceholder:s(`搜索项目…`,`Search projects…`),value:n.find(e=>e.host===c.host&&e.cwd===c.cwd)?.key||``,options:[{value:``,label:s(`自定义工作目录`,`Custom working directory`)},...n.map(e=>({value:e.key,label:e.name||e.cwd,description:`${rE(e.host)} · ${e.cwd}`}))],onChange:e=>{let t=n.find(t=>t.key===e);t&&l({...c,host:t.host,cwd:t.cwd})}})]}),(0,O.jsxs)(`div`,{className:`center-form-grid`,children:[(0,O.jsxs)(`div`,{className:`settings-field`,children:[(0,O.jsx)(`span`,{className:`settings-field-label`,children:`Agent`}),(0,O.jsx)(fE,{label:`Agent`,value:c.provider,options:Object.entries(wE).map(([e,t])=>({value:e,label:t.name,description:r.config.providers[e].enabled?void 0:s(`未启用`,`Disabled`),disabled:!r.config.providers[e].enabled||c.host===`@local`&&e!==`codex`})),onChange:e=>l({...c,provider:e,gpuCount:0})})]}),(0,O.jsxs)(`div`,{className:`settings-field`,children:[(0,O.jsx)(`span`,{className:`settings-field-label`,children:s(`执行主机`,`Execution host`)}),(0,O.jsx)(fE,{label:s(`执行主机`,`Execution host`),value:c.host,options:[{value:``,label:s(`选择主机`,`Select host`)},...t.map(e=>({value:e.alias,label:rE(e.alias),description:e.reachable?s(`在线`,`Online`):s(`离线`,`Offline`)}))],onChange:e=>l({...c,host:e,cwd:t.find(t=>t.alias===e)?.defaultCwd||``,provider:e===`@local`?`codex`:c.provider})})]})]}),(0,O.jsxs)(`label`,{children:[`工作目录`,(0,O.jsx)(`input`,{required:!0,placeholder:`/workspace/my-project`,value:c.cwd,onChange:e=>l({...c,cwd:e.target.value})})]}),(0,O.jsxs)(`label`,{children:[s(`要完成什么`,`Task prompt`),(0,O.jsx)(`textarea`,{autoFocus:!0,required:p.attachments.length===0,rows:4,maxLength:16e3,value:c.prompt,placeholder:s(`描述目标、完成标准和需要注意的约束。(支持拖拽或粘贴附件)`,`Describe the goal and constraints. (Drop or paste files)`),onPaste:e=>{d(``),p.onPaste(e)},onChange:e=>l({...c,prompt:e.target.value})})]}),(0,O.jsx)(gE,{attachments:p.attachments,onRemove:p.remove}),(0,O.jsx)(_E,{inputRef:p.inputRef,onFiles:e=>(d(``),p.uploadFiles(e))}),(0,O.jsxs)(`div`,{className:`composer-attach-bar`,children:[(0,O.jsx)(vE,{uploading:p.uploading,disabled:!c.host,onClick:()=>{d(``),p.openPicker()}}),(0,O.jsx)(`small`,{children:s(`支持点击、拖拽或粘贴附件上传至目标主机`,`Attach files for the target host via click, drop, or paste`)})]}),u&&(0,O.jsx)(`p`,{className:`form-error`,role:`alert`,children:u}),(0,O.jsxs)(`details`,{children:[(0,O.jsx)(`summary`,{children:`GPU 需求`}),c.provider===`codex`?(0,O.jsx)(`p`,{children:`Codex 复用远端 app-server,当前可通过资源视图查看 GPU;队列中的逐任务 GPU 环境分配支持 Claude、Antigravity 和 DSH。`}):(0,O.jsxs)(`div`,{className:`center-form-grid`,children:[(0,O.jsxs)(`label`,{children:[`GPU 数量`,(0,O.jsx)(`input`,{type:`number`,min:0,max:16,value:c.gpuCount,onChange:e=>l({...c,gpuCount:Number(e.target.value)})})]}),(0,O.jsxs)(`label`,{children:[`每张卡至少空闲显存(MiB)`,(0,O.jsx)(`input`,{type:`number`,min:0,max:1e6,value:c.minMemoryMiB,onChange:e=>l({...c,minMemoryMiB:Number(e.target.value)})})]})]}),(0,O.jsx)(`p`,{children:`分配控制本工作台内的并发,并设置 CUDA_VISIBLE_DEVICES;远端其他进程仍可能使用同一张卡。`})]}),[`claude`,`antigravity`].includes(c.provider)&&(0,O.jsx)(`p`,{className:`provider-note`,children:`先执行代理初始化,再启动 Agent。需要交互授权的工具调用会由远端 CLI 拒绝,结果会显示在任务详情中。`}),c.provider===`dsh`&&(0,O.jsx)(`p`,{className:`provider-note`,children:`使用远端 headless profile 的模型和权限配置,每项任务创建独立会话。`}),(0,O.jsxs)(`footer`,{children:[(0,O.jsx)(`button`,{type:`button`,className:`center-secondary`,onClick:o,children:`取消`}),(0,O.jsxs)(`button`,{className:`center-primary`,disabled:i||p.hasUnready||!c.host||!c.cwd||!c.prompt.trim()&&p.attachments.length===0||!r.config.providers[c.provider].enabled,children:[`加入队列 `,(0,O.jsx)(x,{size:15})]})]})]})}function EE({provider:e=`codex`,size:t=16}){let n=e===`agy`?`antigravity`:e;if(!Object.hasOwn(wE,n))return null;let r=wE[n].name;return(0,O.jsx)(`img`,{className:`agent-logo agent-logo-${n}`,src:`/agents/${n}.svg`,width:t,height:t,alt:r,title:r,draggable:!1,style:{width:t,height:t,objectFit:`contain`,flexShrink:0}})}function DE({tasks:e,busy:t,mutate:n,onNew:r,onOpenSession:i}){let{locale:a,tr:o}=fc();return(0,O.jsxs)(`section`,{className:`task-queue`,"aria-label":o(`跨项目任务队列`,`Cross-project task queue`),children:[(0,O.jsxs)(`header`,{className:`queue-heading`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`h2`,{children:[o(`任务队列`,`Task Queue`),` `,(0,O.jsx)(`span`,{children:e.filter(e=>![`completed`,`cancelled`,`failed`,`released`].includes(e.status)).length})]}),(0,O.jsx)(`p`,{children:o(`每项工作都有明确的去向和结果。`,`Every queued job has a clear host and outcome.`)})]}),r&&(0,O.jsxs)(`button`,{className:`center-secondary`,onClick:r,children:[(0,O.jsx)(Pe,{size:15}),` `,o(`派发任务`,`Dispatch task`)]})]}),!e.length&&(0,O.jsxs)(`div`,{className:`queue-empty`,children:[(0,O.jsx)(ie,{size:22}),(0,O.jsx)(`strong`,{children:o(`这里还很安静`,`All quiet here`)}),(0,O.jsx)(`p`,{children:r?o(`开始一个任务,或让总调度帮你规划下一步。`,`Dispatch a task or ask the coordinator to plan the next step.`):o(`实验任务队列未启用;现有执行记录仍可查看。`,`Task queue is disabled; previous runs remain inspectable.`)})]}),[...e].reverse().map(e=>(0,O.jsxs)(`details`,{className:`queue-task ${e.status}`,children:[(0,O.jsxs)(`summary`,{children:[(0,O.jsx)(EE,{provider:e.provider}),(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`strong`,{children:[e.kind===`manager`?o(`总调度 · `,`Manager · `):``,e.prompt.slice(0,100)]}),(0,O.jsxs)(`small`,{children:[e.host,` · `,e.cwd.split(`/`).pop()||`/`,` ·`,` `,e.provider]})]}),(0,O.jsx)(`span`,{className:`task-status-label`,children:a===`en`?bE[e.status]||e.status:yE[e.status]||e.status})]}),(0,O.jsxs)(`div`,{className:`queue-task-detail`,children:[(0,O.jsx)(`code`,{children:e.cwd}),(0,O.jsx)(`p`,{children:e.prompt}),e.queueReason&&(0,O.jsxs)(`p`,{className:`queue-reason`,children:[(0,O.jsx)(se,{size:14}),` `,e.queueReason]}),e.gpuIndices.length>0&&(0,O.jsxs)(`p`,{children:[`已分配 GPU `,e.gpuIndices.join(`, `)]}),e.error&&(0,O.jsx)(`p`,{role:`status`,className:`center-error`,children:e.error}),e.note&&(0,O.jsx)(`p`,{children:e.note}),e.result?.text&&(0,O.jsx)(ZT,{value:e.result.text,remoteHost:e.host,remoteCwd:e.cwd}),e.result?.stderr&&(0,O.jsxs)(`details`,{children:[(0,O.jsx)(`summary`,{children:`执行日志`}),(0,O.jsx)(`pre`,{children:e.result.stderr})]}),e.result?.truncated&&(0,O.jsx)(`p`,{children:`输出过长,显示末尾部分;完整日志保留在远端。`}),(e.remote?.remotePath||e.result?.remotePath)&&(0,O.jsx)(`code`,{children:e.remote?.remotePath||e.result?.remotePath}),(0,O.jsxs)(`footer`,{children:[e.remote?.sessionId&&e.provider===`codex`&&(0,O.jsxs)(`button`,{className:`center-secondary`,onClick:()=>i(e.host,e.remote.sessionId),children:[`查看会话 `,(0,O.jsx)(x,{size:13})]}),e.status===`queued`&&(0,O.jsx)(`button`,{className:`center-secondary`,disabled:t,onClick:()=>void n(`task-action`,{id:e.id,action:`cancel`}).catch(()=>{}),children:`取消排队`}),e.status===`unknown`&&(0,O.jsx)(`button`,{className:`center-secondary`,disabled:t,onClick:()=>{window.confirm(`请先核实远端任务已结束。继续只会释放工作台的并发和 GPU 记录,不会终止远端进程。`)&&n(`task-action`,{id:e.id,action:`release`}).catch(()=>{})},children:`已核实远端结束,释放占用`})]})]})]},e.id))]})}function OE({plugin:e,hosts:t}){let[n,r]=(0,f.useState)(e),[i,a]=(0,f.useState)(!1),[o,s]=(0,f.useState)(!1),[c,l]=(0,f.useState)(``),[u,d]=(0,f.useState)(null),p=n.manifest;(0,f.useEffect)(()=>{if(n.status.state!==`loading`)return;let e=new AbortController,t=setInterval(()=>{fetch(TT(`/api/plugins/${p.id}/config`),{signal:e.signal,cache:`no-store`}).then(async t=>{let n=await t.json();if(!t.ok)throw Error(n.error||`无法读取插件状态`);e.signal.aborted||r(n)}).catch(t=>{e.signal.aborted||l(t.message)})},750);return()=>{clearInterval(t),e.abort()}},[n.status.state,p.id]);let m=p.protocolVersion===1&&p.settings.every(e=>[`ssh-host`,`text`].includes(e.type));function h(e){r(t=>({...t,...e})),s(!1)}async function g(){a(!0),l(``),s(!1);try{let e=await fetch(TT(`/api/plugins/${p.id}/config`),{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({enabled:n.enabled,config:n.config,revision:n.revision})}),t=await e.json();if(!e.ok)throw Error(t.error||`保存失败`);r(t),s(!0)}catch(e){l(e.message)}finally{a(!1)}}async function _(e){a(!0),l(``),d(null);try{let t=await fetch(TT(`/api/plugins/${p.id}/actions/${e}`),{method:`POST`,headers:{"Content-Type":`application/json`},body:`{}`}),n=await t.json();if(!t.ok)throw Error(n.error||`操作失败`);d(JSON.stringify(n,null,2))}catch(e){l(e.message)}finally{a(!1)}}return(0,O.jsxs)(`article`,{className:`scope-plugin-card`,"aria-label":`${p.name}插件`,children:[(0,O.jsxs)(`header`,{children:[(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`h3`,{children:[p.name,(0,O.jsxs)(`small`,{children:[n.source===`local`?`本地导入`:`内置`,` · `,p.version]})]}),(0,O.jsx)(`p`,{children:p.description})]}),(0,O.jsx)(`span`,{className:`scope-plugin-state`,children:{disabled:`未启用`,loading:`加载中`,running:`运行中`,idle:`已启用`,error:`运行异常`}[n.status.state]||n.status.state})]}),(0,O.jsxs)(`label`,{className:`settings-checkbox`,children:[(0,O.jsx)(`input`,{type:`checkbox`,checked:n.enabled,disabled:i||!m,onChange:e=>h({enabled:e.target.checked})}),`启用插件`]}),m?(0,O.jsx)(`div`,{className:`center-form-grid`,children:p.settings.map(e=>(0,O.jsxs)(`label`,{className:`span-full`,children:[e.label,(0,O.jsx)(`input`,{value:n.config[e.key]||``,placeholder:e.placeholder,disabled:i,list:e.type===`ssh-host`?`${p.id}-${e.key}`:void 0,onChange:t=>h({config:{...n.config,[e.key]:t.target.value}})}),e.type===`ssh-host`&&(0,O.jsx)(`datalist`,{id:`${p.id}-${e.key}`,children:t.filter(e=>e.alias!==`@local`).map(e=>(0,O.jsx)(`option`,{value:e.alias},e.alias))})]},e.key))}):(0,O.jsx)(`p`,{role:`alert`,children:`当前界面不支持此插件的配置版本,请更新 SCOPE。`}),(0,O.jsx)(`p`,{className:`scope-plugin-permissions`,children:p.permissions.join(` · `)}),p.view===`submission-tracker/v1`&&(0,O.jsx)(`p`,{className:`settings-hint`,children:`结果在「更多 → 提交追踪」查看。保存立即生效;启用后定期扫描,也可在追踪页手动刷新。`}),n.source===`local`&&(0,O.jsx)(`div`,{className:`scope-plugin-actions`,children:p.actions.map(e=>(0,O.jsx)(`button`,{className:`center-secondary`,disabled:i||n.status.state!==`idle`,onClick:()=>void _(e.id),children:e.label},e.id))}),u!==null&&(0,O.jsx)(`pre`,{className:`scope-plugin-result`,"aria-label":`插件操作结果`,children:u}),n.status.error&&(0,O.jsx)(`p`,{className:`settings-error`,children:n.status.error}),c&&(0,O.jsx)(`p`,{className:`settings-error`,role:`alert`,children:c}),(0,O.jsxs)(`footer`,{className:`settings-footer`,children:[o&&(0,O.jsxs)(`span`,{role:`status`,children:[(0,O.jsx)(ee,{size:14}),`已保存`]}),(0,O.jsxs)(`button`,{className:`center-secondary`,type:`button`,disabled:i||!m||n.enabled&&p.settings.some(e=>e.requiredWhenEnabled&&!n.config[e.key]?.trim()),onClick:()=>void g(),children:[(0,O.jsx)(ze,{size:14}),i?`保存中…`:`保存插件设置`]})]})]})}var kE=`npm run plugin -- inspect ./examples/plugins/hello
549
+ npm run plugin -- add ./examples/plugins/hello`;function AE(){let[e,t]=(0,f.useState)(``);async function n(){try{await navigator.clipboard.writeText(kE),t(`已复制示例命令`)}catch{t(`无法复制,请手动选择命令`)}}return(0,O.jsxs)(`details`,{className:`scope-plugin-import`,children:[(0,O.jsxs)(`summary`,{children:[(0,O.jsx)(De,{size:15}),`导入插件`,(0,O.jsx)(`span`,{children:`本地插件包`})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{children:`在运行 SCOPE 的电脑上,进入 SCOPE 仓库,检查并导入插件目录:`}),(0,O.jsx)(`pre`,{children:kE}),(0,O.jsxs)(`button`,{className:`center-secondary`,onClick:()=>void n(),children:[(0,O.jsx)(ce,{size:13}),`复制示例`]}),(0,O.jsx)(`span`,{role:`status`,children:e}),(0,O.jsx)(`p`,{children:`重启 SCOPE 后刷新此页,启用已安装的插件。替换示例路径即可导入自己的插件。`}),(0,O.jsx)(`p`,{className:`settings-hint`,children:`插件以服务权限运行,请先检查来源和代码。支持 scope-plugin.json + apply(ctx);DSH / Cordis 插件需要适配。暂不支持网页上传、npm 或 GitHub 一键安装。`})]})]})}function jE({hosts:e}){let[t,n]=(0,f.useState)(null),[r,i]=(0,f.useState)(``),[a,o]=(0,f.useState)(0),[s,c]=(0,f.useState)([]);return(0,f.useEffect)(()=>{let e=new AbortController;return fetch(TT(`/api/plugins`),{signal:e.signal,cache:`no-store`}).then(async t=>{let r=await t.json();if(!t.ok)throw Error(r.error||`无法读取插件`);if(r.protocolVersion!==1)throw Error(`插件接口版本不兼容,请更新 SCOPE`);e.signal.aborted||(n(r.plugins),c(r.loadErrors||[]),i(``))}).catch(t=>{e.signal.aborted||i(t.message)}),()=>e.abort()},[a]),(0,O.jsxs)(`section`,{className:`settings-section scope-plugin-settings`,"aria-label":`插件设置`,children:[(0,O.jsxs)(`header`,{className:`scope-plugin-heading`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`h2`,{children:[(0,O.jsx)(Ne,{size:18}),` 插件`]}),(0,O.jsx)(`p`,{children:`按需启用外部服务,独立管理连接与权限。`})]}),(0,O.jsxs)(`button`,{className:`center-secondary`,onClick:()=>o(e=>e+1),title:`重新载入插件设置`,children:[(0,O.jsx)(Fe,{size:14}),`刷新`]})]}),(0,O.jsx)(AE,{}),r&&(0,O.jsx)(`p`,{className:`settings-error`,role:`alert`,children:r}),s.map(e=>(0,O.jsxs)(`p`,{className:`settings-error`,role:`alert`,children:[e.id,`:`,e.error]},e.id)),!t&&!r&&(0,O.jsx)(`p`,{role:`status`,children:`正在读取插件…`}),t?.length===0&&(0,O.jsx)(`p`,{children:`暂未安装插件。`}),t?.map(t=>(0,O.jsx)(OE,{plugin:t,hosts:e},`${t.manifest.id}:${a}:${t.revision}`))]})}function ME({draft:e,update:t,state:n,hosts:r,operatorName:i,onSaveOperatorName:a}){let{tr:o}=fc(),[s,c]=(0,f.useState)(null),l=s?.base===i?s.value:i,u=e=>c({base:i,value:e}),[d,p]=(0,f.useState)(!1),[m,h]=(0,f.useState)(``),[g,_]=(0,f.useState)(!1),[v,y]=(0,f.useState)(null),[b,x]=(0,f.useState)([]),[S,C]=(0,f.useState)(!1),[w,T]=(0,f.useState)(``),[E,ee]=(0,f.useState)(!1),te=r.find(t=>t.alias===e.manager.host),D=n.features?.taskQueue!==!1;async function ne(e,t=!1){if(!e){x([]),T(``);return}C(!0),T(``);try{let n=await fetch(TT(`/api/models?host=${encodeURIComponent(e)}${t?`&refresh=1`:``}`),{cache:`no-store`}),r=await n.json();if(!n.ok)throw Error(r.error||o(`无法读取模型目录`,`Failed to load models`));x(Array.isArray(r.models)?r.models:[])}catch(e){T(e.message)}finally{C(!1)}}(0,f.useEffect)(()=>{let t=e.manager.host;if(!t||!r.find(e=>e.alias===t)?.reachable)return;let n=!1,i=new AbortController;return fetch(TT(`/api/models?host=${encodeURIComponent(t)}`),{signal:i.signal,cache:`no-store`}).then(async e=>{let t=await e.json();if(!e.ok)throw Error(t.error||`Failed to load models`);n||(x(Array.isArray(t.models)?t.models:[]),T(``))}).catch(e=>{!n&&!i.signal.aborted&&T(e.message)}),()=>{n=!0,i.abort()}},[e.manager.host,r]);let re=b.find(t=>(t.model||t.id)===e.manager.model),ie=re?.supportedReasoningEfforts?.length?re.supportedReasoningEfforts:Object.keys(lE);async function ae(){if(!(!a||!l.trim())){p(!0),h(``);try{await a(l.trim()),h(o(`已更新显示名称`,`Display name updated`))}finally{p(!1)}}}async function oe(){let e=l.trim();if(!(!e||g)){_(!0),y(null);try{a&&e!==i&&await a(e);let t=[nE,...r.filter(e=>e.alias!==`@local`&&e.reachable).map(e=>e.alias)],n=0,s=[];for(let r of t)try{let t=await fetch(TT(`/api/remote-bootstrap`),{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({host:r,action:`sync-protocol`,operatorName:e})});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||`HTTP ${t.status}`)}n++}catch(e){s.push(`${rE(r)}: ${e.message}`)}y(s.length?{kind:`error`,text:o(`已同步 ${n}/${t.length} 台设备;失败:${s.join(`;`)}`,`Synced ${n}/${t.length} hosts; failed: ${s.join(`; `)}`)}:{kind:`success`,text:o(`已将用户名「${e}」与 SCOPE 协议写入 ${n} 台设备的 AGENTS.md / CLAUDE.md / GEMINI.md。`,`Synced "${e}" and the SCOPE protocol into AGENTS.md / CLAUDE.md / GEMINI.md on ${n} host(s).`)})}finally{_(!1)}}}return(0,O.jsxs)(`div`,{className:`settings-hub-body`,children:[(0,O.jsxs)(`div`,{className:`settings-card`,children:[(0,O.jsx)(`div`,{className:`settings-card-head`,children:(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`h2`,{children:[(0,O.jsx)(tt,{size:16}),o(`操作者信息`,`Operator Identity`)]}),(0,O.jsx)(`p`,{children:o(`用于界面显示与邮件通知称呼,并会在同步 SCOPE 协议时写入 Codex (AGENTS.md)、Claude (CLAUDE.md) 与 Antigravity (GEMINI.md),仅保存在本机 .scope/state.json。`,`Shown in the topbar, notifications, and injected into Codex (AGENTS.md), Claude (CLAUDE.md), and Antigravity (GEMINI.md) when syncing the SCOPE protocol. Stored locally in .scope/state.json.`)})]})}),(0,O.jsxs)(`div`,{className:`settings-inline-row`,children:[(0,O.jsxs)(`label`,{className:`settings-field`,children:[(0,O.jsx)(`span`,{className:`settings-field-label`,children:o(`显示名称`,`Display name`)}),(0,O.jsx)(`input`,{maxLength:40,value:l,onChange:e=>{u(e.target.value),h(``)}})]}),a&&(0,O.jsxs)(`button`,{type:`button`,className:`center-secondary`,disabled:d||!l.trim(),onClick:()=>void ae(),children:[(0,O.jsx)(ze,{size:14}),o(`保存名称`,`Save name`)]}),(0,O.jsxs)(`button`,{type:`button`,className:`center-secondary`,disabled:g||!l.trim(),onClick:()=>void oe(),children:[(0,O.jsx)(Fe,{size:14,className:g?`is-spinning`:``}),g?o(`正在写入三端协议…`,`Syncing rules…`):o(`写入三端 AGENTS.md`,`Sync to AGENTS.md`)]}),m&&(0,O.jsx)(`span`,{className:`settings-badge ok`,children:m})]}),v&&(0,O.jsx)(`p`,{className:`settings-status-banner ${v.kind}`,children:v.text})]}),(0,O.jsxs)(`div`,{className:`settings-card`,children:[(0,O.jsx)(`div`,{className:`settings-card-head`,children:(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`h2`,{children:[(0,O.jsx)(qe,{size:16}),o(`总调度(Coordinator)`,`Cross-Project Coordinator`)]}),(0,O.jsx)(`p`,{children:o(`跨项目只读对话持续保存。切换模型或推理强度沿用当前会话;更改设备或目录会开启新会话。`,`Read-only cross-project workspace advisor. Changing model or effort keeps the current thread; changing host or directory starts a fresh one.`)})]})}),(0,O.jsxs)(`div`,{className:`center-form-grid`,children:[(0,O.jsxs)(`div`,{className:`settings-field`,children:[(0,O.jsx)(`span`,{className:`settings-field-label`,children:o(`运行主机`,`Execution host`)}),(0,O.jsx)(fE,{label:o(`运行主机`,`Execution host`),value:e.manager.host,options:[{value:``,label:o(`暂不配置`,`Not configured`)},...r.map(e=>({value:e.alias,label:rE(e.alias),description:e.reachable?o(`在线`,`Online`):o(`离线`,`Offline`)}))],onChange:n=>t({...e,manager:{...e.manager,host:n,cwd:r.find(e=>e.alias===n)?.defaultCwd||``}})})]}),(0,O.jsxs)(`div`,{className:`settings-field`,children:[(0,O.jsx)(`span`,{className:`settings-field-label`,children:o(`模型`,`Model`)}),(0,O.jsxs)(`div`,{className:`settings-control-row`,children:[E?(0,O.jsx)(`input`,{"aria-label":o(`模型`,`Model`),value:e.manager.model,placeholder:o(`留空使用主机默认模型`,`Leave empty for host default`),onChange:n=>t({...e,manager:{...e.manager,model:n.target.value}})}):(0,O.jsx)(fE,{label:o(`模型`,`Model`),searchable:!0,searchPlaceholder:o(`搜索模型…`,`Search models…`),value:e.manager.model,options:[{value:``,label:o(`使用主机默认模型`,`Use host default model`)},...e.manager.model&&!b.some(t=>(t.model||t.id)===e.manager.model)?[{value:e.manager.model,label:e.manager.model}]:[],...b.map(e=>{let t=e.model||e.id;return{value:t,label:e.displayName||t}})],onChange:n=>t({...e,manager:{...e.manager,model:n}})}),te?.reachable&&(0,O.jsx)(`button`,{type:`button`,className:`settings-icon-btn`,disabled:S,title:o(`刷新模型目录`,`Refresh model catalog`),"aria-label":o(`刷新模型目录`,`Refresh model catalog`),onClick:()=>void ne(te.alias,!0),children:(0,O.jsx)(Fe,{size:14,className:S?`is-spinning`:``})}),(0,O.jsx)(`button`,{type:`button`,className:`settings-icon-btn`,title:E?o(`切回列表选择`,`Choose from catalog`):o(`手动输入模型名`,`Enter custom model ID`),"aria-label":E?o(`切回列表选择`,`Choose from catalog`):o(`手动输入模型名`,`Enter custom model ID`),onClick:()=>ee(e=>!e),children:E?(0,O.jsx)(ye,{size:14}):(0,O.jsx)(Ae,{size:14})})]})]}),(0,O.jsxs)(`div`,{className:`settings-field`,children:[(0,O.jsx)(`span`,{className:`settings-field-label`,children:o(`推理强度`,`Reasoning effort`)}),(0,O.jsx)(fE,{label:o(`推理强度`,`Reasoning effort`),value:e.manager.effort,options:[{value:``,label:o(`模型默认`,`Model default`)},...ie.map(e=>({value:e,label:lE[e]||e}))],onChange:n=>t({...e,manager:{...e.manager,effort:n}})})]}),(0,O.jsxs)(`label`,{className:`settings-field`,children:[(0,O.jsx)(`span`,{className:`settings-field-label`,children:o(`工作目录`,`Working directory`)}),(0,O.jsx)(`input`,{placeholder:e.manager.host===`@local`?`C:/projects`:`/workspace`,value:e.manager.cwd,onChange:n=>t({...e,manager:{...e.manager,cwd:n.target.value}})})]})]}),w&&(0,O.jsx)(`p`,{className:`settings-status-banner error`,children:w})]}),(0,O.jsxs)(`div`,{className:`settings-card`,children:[(0,O.jsxs)(`div`,{className:`settings-card-head`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h2`,{children:o(`并发与资源调度`,`Concurrency & Resident Pool`)}),(0,O.jsx)(`p`,{children:D?o(`设置任务队列并发上限与单设备常驻会话池:池内非超时或已保留会话长期常驻,超出池上限后按最久未活动顺序释放。`,`Configures queued task concurrency and per-host resident session pools (older overflow non-reserved sessions detach first).`):o(`控制单设备常驻会话池大小(<= 池上限时永久常驻,超出后按时间顺序清理非保留会话);可在主机设置中按设备覆盖。`,`Controls the per-host resident session pool (sessions within the limit stay alive; overflow non-reserved idle sessions close oldest-first).`)})]}),(0,O.jsx)(`span`,{className:`settings-badge ${D?`ok`:``}`,children:D?o(`队列已启用`,`Queue enabled`):o(`队列默认关闭`,`Queue disabled`)})]}),(0,O.jsx)(`div`,{className:`center-form-grid`,children:[[`maxRunning`,o(`全局同时运行`,`Max running globally`),1,32],[`maxPerHost`,o(`每台主机同时运行`,`Max per host`),1,32],[`maxPerProject`,o(`同一目录同时运行`,`Max per project directory`),1,32],[`inventoryMaxAgeSeconds`,o(`GPU 采样有效时间(秒)`,`GPU telemetry TTL (seconds)`),1,300],[`residentSessionsPerHost`,o(`单设备常驻会话池(0 = 不常驻)`,`Resident sessions per host (0 = no floor)`),0,64],[`sessionIdleGraceMinutes`,o(`超池闲置回收缓冲(分钟)`,`Overflow idle grace (minutes)`),1,1440]].map(([n,r,i,a])=>(0,O.jsxs)(`label`,{className:`settings-field`,children:[(0,O.jsx)(`span`,{className:`settings-field-label`,children:r}),(0,O.jsx)(`input`,{type:`number`,min:i,max:a,value:e.scheduler[n],onChange:r=>t({...e,scheduler:{...e.scheduler,[n]:Number(r.target.value)}})})]},n))}),(0,O.jsxs)(`label`,{className:`settings-checkbox`,style:{marginTop:4},children:[(0,O.jsx)(`input`,{type:`checkbox`,checked:e.scheduler.paused,onChange:n=>t({...e,scheduler:{...e.scheduler,paused:n.target.checked}})}),o(`暂停派发新的队列任务`,`Pause new queued task dispatches`)]})]})]})}var NE={codex:`Codex`,claude:`Claude Code`,antigravity:`Antigravity`,dsh:`DSH`};function PE(e){if(!e)return null;let t=String(e).match(/\d+\.\d+\.\d+(?:-[a-zA-Z0-9.-]+)?/);return t?t[0]:null}function FE(e,t){let n=PE(e),r=PE(t);if(!n)return!1;if(!r)return!0;let i=n.split(`-`)[0].split(`.`).map(Number),a=r.split(`-`)[0].split(`.`).map(Number);for(let e=0;e<3;e++)if((i[e]||0)!==(a[e]||0))return(i[e]||0)>(a[e]||0);return n!==r}function IE({hosts:e,selectedHost:t,detectedClis:n}){let{tr:r}=fc(),i=e.filter(e=>e.alias!==nE),[a,o]=(0,f.useState)(i.find(e=>e.reachable)?.alias||``),s=t??a,c=!!(s&&e.find(e=>e.alias===s)?.reachable),[l,u]=(0,f.useState)(null),[d,p]=(0,f.useState)(``),[m,h]=(0,f.useState)(``),[g,_]=(0,f.useState)(!1),[v,y]=(0,f.useState)(0),[b,x]=(0,f.useState)(null),[S,C]=(0,f.useState)(``),[w,T]=(0,f.useState)(!1),E={starting:r(`正在启动`,`Starting`),running:r(`正在执行`,`Running`),unknown:r(`等待远端确认`,`Awaiting confirmation`),failed:r(`检查未通过`,`Failed`),completed:r(`就绪`,`Ready`)};(0,f.useEffect)(()=>{if(!s)return;let e=new AbortController,t;async function n(){try{let t=await fetch(TT(`/api/agents/maintenance?host=${encodeURIComponent(s)}`),{signal:e.signal,cache:`no-store`}),n=await t.json();if(!t.ok)throw Error(n.error||r(`无法读取安装状态`,`Failed to read installation status`));e.signal.aborted||(u({host:s,rows:n.agents}),p(``))}catch(t){e.signal.aborted||p(t.message)}finally{e.signal.aborted||(t=setTimeout(n,4e3))}}return n(),()=>{e.abort(),clearTimeout(t)}},[s,v,r]),(0,f.useEffect)(()=>{if(!s||!c)return;let e=!1,t,n=new AbortController;async function r(){try{let i=await fetch(TT(`/api/codex/upgrade?host=${encodeURIComponent(s)}`),{signal:n.signal,cache:`no-store`});if(!i.ok)return;let a=await i.json();if(e)return;x({host:s,job:a}),C(``),t=setTimeout(r,a?.status===`running`?2e3:15e3)}catch{}}return r(),()=>{e=!0,n.abort(),clearTimeout(t)}},[s,c,v]);async function ee(e,t){h(e),p(``);try{let n=await fetch(TT(`/api/agents/maintenance`),{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({host:s,provider:e,action:t})}),i=await n.json();if(!n.ok)throw Error(i.error||r(`操作失败`,`Action failed`));u(t=>({host:s,rows:Object.keys(NE).map(n=>({provider:n,job:n===e?i.job:t?.host===s&&t.rows.find(e=>e.provider===n)?.job||null}))})),y(e=>e+1)}catch(e){p(e.message)}finally{h(``)}}async function te(){if(!(!s||!c||g||m)){_(!0),p(``);try{for(let e of Object.keys(NE))await fetch(TT(`/api/agents/maintenance`),{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({host:s,provider:e,action:`check`})}).catch(()=>{});y(e=>e+1)}finally{_(!1)}}}async function D(e){if(!(e===`upgrade`&&!window.confirm(r(`升级 ${s} 的 npm 全局 Codex 并安全切换 SCOPE 托管会话?工作中的会话会跳过不会中断,也不会重发指令。`,`Upgrade global Codex on ${s} and safely restart idle SCOPE-managed sessions? Active turns are untouched.`)))){T(!0),C(``);try{let t=await fetch(TT(`/api/codex/upgrade`),{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({host:s,action:e,confirmation:`upgrade:${s}`})}),n=await t.json().catch(()=>({}));if(!t.ok)throw Error(n.error||r(`升级请求失败`,`Upgrade failed`));x({host:s,job:n}),y(e=>e+1)}catch(e){C(e.message)}finally{T(!1)}}}let ne=l?.host===s?l.rows:Object.keys(NE).map(e=>({provider:e,job:null})),ie=c&&b?.host===s?b.job:null,ae=w||ie?.status===`running`;return(0,O.jsxs)(`section`,{className:`settings-card`,"aria-label":r(`远端 Agent CLI 版本与升级`,`Remote Agent CLIs & Upgrades`),children:[(0,O.jsxs)(`div`,{className:`settings-card-head`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`h2`,{children:[(0,O.jsx)(le,{size:16}),r(`远端 Agent CLI 版本与升级`,`Remote Agent CLIs & Upgrades`)]}),(0,O.jsx)(`p`,{children:r(`自动显示已探测的 CLI 版本;支持按需检查、安装、更新,以及 Codex 托管会话无损热切换。`,`Inspect installed CLI versions, update supported CLIs, or safely hot-swap idle Codex managed sessions.`)})]}),(0,O.jsxs)(`button`,{type:`button`,className:`center-secondary`,disabled:!c||g||!!m,onClick:()=>void te(),children:[(0,O.jsx)(Fe,{size:14,className:g?`is-spinning`:``}),g?r(`正在检查…`,`Checking…`):r(`检查全部`,`Check all`)]})]}),t===void 0&&(0,O.jsxs)(`div`,{className:`settings-field`,style:{maxWidth:320},children:[(0,O.jsx)(`span`,{className:`settings-field-label`,children:r(`远端设备`,`Remote host`)}),(0,O.jsx)(fE,{label:r(`远端设备`,`Remote host`),value:s,disabled:!!m,options:[{value:``,label:r(`选择设备`,`Select host`)},...i.map(e=>({value:e.alias,label:e.alias,description:e.reachable?r(`在线`,`Online`):r(`离线`,`Offline`),disabled:!e.reachable}))],onChange:e=>{o(e),p(``)}})]}),d&&(0,O.jsx)(`p`,{className:`settings-status-banner error`,children:d}),S&&(0,O.jsx)(`p`,{className:`settings-status-banner error`,children:S}),(0,O.jsx)(`div`,{className:`cli-maint-list`,children:ne.map(({provider:e,job:t})=>{let i=n?.[e],a=t?.info?.installed||i?.version||null,o=!!(a||i?.installed),s=!!(t&&[`starting`,`running`,`unknown`].includes(t.status))||m===e,l=!c||!!m||g||s,u=t?.status===`failed`,d=FE(t?.info?.latest,a),f=!!(o&&t?.info?.latest&&!d&&PE(a));return(0,O.jsxs)(`article`,{className:`cli-maint-row`,children:[(0,O.jsxs)(`div`,{className:`cli-maint-main`,children:[(0,O.jsxs)(`div`,{className:`cli-maint-identity`,children:[(0,O.jsx)(EE,{provider:e}),(0,O.jsx)(`strong`,{children:NE[e]||e}),o?(0,O.jsx)(`span`,{className:`settings-badge ok`,title:t?.info?.executable||i?.executable||``,children:a||r(`已安装`,`Installed`)}):t?.info?(0,O.jsx)(`span`,{className:`settings-badge`,children:r(`未安装`,`Not installed`)}):(0,O.jsx)(`span`,{className:`settings-badge`,children:r(`待检查`,`Unchecked`)}),d&&t?.info?.latest&&(0,O.jsxs)(`span`,{className:`settings-badge warn`,children:[r(`可更新`,`Update`),` `,t.info.latest]}),f&&(0,O.jsx)(`span`,{className:`settings-badge ok`,children:r(`已是最新`,`Up to date`)}),s&&(0,O.jsx)(`span`,{className:`settings-badge warn`,children:E[t?.status||`running`]||r(`进行中`,`Working`)})]}),(0,O.jsxs)(`div`,{className:`cli-maint-actions`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`center-secondary`,disabled:l,onClick:()=>void ee(e,`check`),children:[(0,O.jsx)(Fe,{size:13,className:s?`is-spinning`:``}),r(`检查`,`Check`)]}),t?.info&&e!==`antigravity`&&(0,O.jsxs)(`button`,{type:`button`,className:`center-secondary`,disabled:l||!t.info.supported,onClick:()=>void ee(e,o?`update`:`install`),children:[(0,O.jsx)(ue,{size:13}),o?r(`更新`,`Update`):r(`安装`,`Install`)]}),e===`codex`&&o&&(0,O.jsxs)(`button`,{type:`button`,className:`center-secondary`,disabled:!c||ae,onClick:()=>void D(`upgrade`),children:[(0,O.jsx)(re,{size:13}),ie?.status===`pending-switch`?r(`重试切换会话`,`Retry switch`):r(`安全热升级会话`,`Safe upgrade`)]})]})]}),e===`codex`&&ie&&(0,O.jsx)(`p`,{className:`cli-maint-meta`,role:`status`,children:ie.status===`running`?r(`Codex 升级中 (${ie.phase})…`,`Codex upgrade running (${ie.phase})…`):ie.status===`pending-switch`?r(`Codex 已升级,存在工作中的会话待空闲后切换。`,`Codex upgraded; waiting to switch busy sessions.`):ie.status===`failed`?`${r(`升级异常`,`Upgrade error`)}:${ie.error||``}`:ie.runningVersions?.length?ie.runningVersions.map(e=>`${e.connectionKey}: v${e.version||`?`} (${e.sessions})`).join(` · `):r(`Codex 托管版本与会话状态一致。`,`Codex runtime up to date.`)}),e===`antigravity`&&(0,O.jsx)(`p`,{className:`cli-maint-meta`,children:r(`支持版本探测;安装与更新请通过官方原生安装器完成。`,`Supports version detection; install or update via the official installer.`)}),u&&t?.error&&(0,O.jsx)(`p`,{className:`cli-maint-meta`,style:{color:`var(--red)`},children:t.error}),!u&&t?.info?.latestError&&e!==`antigravity`&&(0,O.jsx)(`p`,{className:`cli-maint-meta`,children:r(`未获取到远端最新版本(${t.info.latestError})。若需通过独立代理访问 npm/下载源,请在上方填写「CLI 更新前命令」。`,`Could not fetch latest version (${t.info.latestError}). If package registries require a separate proxy, set "CLI update pre-command" above.`)}),t?.info&&!t.info.supported&&e!==`antigravity`&&(0,O.jsx)(`p`,{className:`cli-maint-meta`,children:r(`当前通过独立/外部路径安装,暂不从界面覆盖升级;请使用原安装渠道更新。`,`Installed outside npm/managed paths; update using its original package channel.`)}),t?.log&&(0,O.jsxs)(`details`,{className:`cli-maint-log`,children:[(0,O.jsx)(`summary`,{children:r(`查看检查日志`,`View logs`)}),(0,O.jsx)(`pre`,{children:t.log})]})]},e)})})]})}function LE({hosts:e}){let{tr:t}=fc(),n=e.filter(e=>e.alias!==nE),r=n.filter(e=>e.reachable),i=n.filter(e=>!e.reachable),[a,o]=(0,f.useState)(()=>r[0]?.alias||n[0]?.alias||``),[s,c]=(0,f.useState)(!1),l=n.some(e=>e.alias===a)?a:r[0]?.alias||n[0]?.alias||``,u=e.find(e=>e.alias===l),[d,p]=(0,f.useState)(``),[m,h]=(0,f.useState)(``),[g,_]=(0,f.useState)(!0),[v,y]=(0,f.useState)(``),[b,x]=(0,f.useState)(!1),[S,C]=(0,f.useState)(null),[w,T]=(0,f.useState)(null),[E,te]=(0,f.useState)(``),[D,ne]=(0,f.useState)(null),[re,ie]=(0,f.useState)(4922),[ae,oe]=(0,f.useState)(!0),se=(0,f.useRef)(new Set);(0,f.useEffect)(()=>{if(!l)return;let e=!1,t=new AbortController;return fetch(TT(`/api/runtime/config?host=${encodeURIComponent(l)}`),{signal:t.signal,cache:`no-store`}).then(e=>e.json()).then(t=>{!e&&t?.config&&(p(t.config.preLaunchCommand||``),h(t.config.updatePreCommand||``),_(t.config.yolo!==!1),y(typeof t.config.residentSessionLimit==`number`?String(t.config.residentSessionLimit):``),C(null))}).catch(()=>{}),fetch(TT(`/api/remote-bootstrap?host=${encodeURIComponent(l)}`),{signal:t.signal,cache:`no-store`}).then(e=>e.json()).then(n=>{e||(T(n),n?.tunnel?.remotePort&&ie(n.tunnel.remotePort),ne(null),!n?.report&&u?.reachable&&!se.current.has(l)&&(se.current.add(l),te(`inspect`),fetch(TT(`/api/remote-bootstrap`),{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({host:l,action:`inspect`}),signal:t.signal}).then(e=>e.json().then(t=>({ok:e.ok,body:t}))).then(({ok:t,body:n})=>{!e&&t&&T(n)}).catch(()=>{}).finally(()=>{e||te(``)})))}).catch(()=>{}),()=>{e=!0,t.abort()}},[l,u?.reachable]);async function ce(){if(l){x(!0),C(null);try{let e=await fetch(TT(`/api/runtime/config`),{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({host:l,preLaunchCommand:d,updatePreCommand:m,yolo:g,residentSessionLimit:v.trim()===``?null:Number(v.trim())})}),n=await e.json();if(!e.ok)throw Error(n.error||t(`保存失败`,`Save failed`));C({kind:`success`,text:t(`主机启动环境已保存,新启动会话立即生效。`,`Host launch environment saved for future sessions.`)})}catch(e){C({kind:`error`,text:e.message})}finally{x(!1)}}}async function le(e){if(l){te(e),ne(null);try{let n=await fetch(TT(`/api/remote-bootstrap`),{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({host:l,action:e,remotePort:re,registerMcp:ae})}),r=await n.json();if(!n.ok)throw Error(r.error||t(`操作失败`,`Operation failed`));T(r),ne({kind:`success`,text:e===`inspect`?t(`远端主机环境检查完成。`,`Remote host environment inspected.`):e===`sync-protocol`?t(`已向 Codex (AGENTS.md)、Claude (CLAUDE.md) 与 Antigravity (GEMINI.md) 注入 SCOPE 公式/表格/音视频与 file:// 显示协议。`,`Injected SCOPE LaTeX, table, media, and file:// protocol into Codex (AGENTS.md), Claude (CLAUDE.md), and Antigravity (GEMINI.md).`):e===`deploy`?t(`远端 Scope 服务、三端协议与隧道已部署并启动。`,`Remote Scope service, agent protocols, and reverse tunnel deployed.`):t(`已停止并清理该主机的远端通知服务。`,`Remote service and tunnel removed for this host.`)})}catch(e){ne({kind:`error`,text:e.message})}finally{te(``)}}}if(!n.length)return(0,O.jsx)(`div`,{className:`settings-hub-body`,children:(0,O.jsx)(`div`,{className:`settings-card`,children:(0,O.jsx)(`div`,{className:`settings-card-head`,children:(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`h2`,{children:[(0,O.jsx)(He,{size:16}),t(`未发现远程 SSH 主机`,`No SSH hosts found`)]}),(0,O.jsx)(`p`,{children:t(`请在本机 ~/.ssh/config 中添加 Host 别名,或通过 SCOPE_SSH_CONFIG 指定 SSH 配置文件路径。`,`Add Host entries to ~/.ssh/config or point SCOPE_SSH_CONFIG to your SSH config file.`)})]})})})});let ue=w?.report,de=w?.tunnel,fe=s?i:i.filter(e=>e.alias===l),pe=i.length-fe.length,me=[...r,...fe];return(0,O.jsxs)(`div`,{className:`settings-hub-body`,children:[(0,O.jsxs)(`div`,{className:`settings-host-pills`,role:`tablist`,"aria-label":t(`选择远程主机`,`Select remote host`),children:[me.map(e=>(0,O.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":e.alias===l,className:`settings-host-pill ${e.alias===l?`active`:``}`,onClick:()=>o(e.alias),children:[(0,O.jsx)(`span`,{className:`dot ${e.reachable?`online`:``}`}),(0,O.jsx)(`span`,{children:rE(e.alias)}),e.gpus.length>0&&(0,O.jsxs)(`small`,{children:[`(`,e.gpus.length,` GPU)`]})]},e.alias)),i.length>0&&(s||pe>0)&&(0,O.jsx)(`button`,{type:`button`,className:`settings-host-pill offline-toggle`,"aria-expanded":s,onClick:()=>c(e=>!e),children:s?t(`收起离线设备`,`Hide offline`):`+${pe} ${t(`台离线设备`,`offline`)}`})]}),(0,O.jsxs)(`div`,{className:`settings-card`,children:[(0,O.jsxs)(`div`,{className:`settings-card-head`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`h2`,{children:[(0,O.jsx)(Ze,{size:16}),t(`${l} · 主机启动环境与出口代理`,`${l} · Host Environment & Outbound Proxy`)]}),(0,O.jsx)(`p`,{children:t(`自定义该主机每次启动 Agent 之前运行的命令(如加载代理、Conda/模块环境或 PATH)。留空则直接启动,不附带任何预设代理命令。`,`Optional shell commands executed before launching any Agent on this host (such as outbound proxy or PATH setup). Leave blank for direct launch.`)})]}),(0,O.jsx)(`span`,{className:`settings-badge ${u?.reachable?`ok`:`warn`}`,children:u?.reachable?t(`主机在线`,`Online`):t(`主机离线`,`Offline`)})]}),(0,O.jsxs)(`div`,{className:`center-form-grid`,children:[(0,O.jsxs)(`label`,{className:`span-full`,children:[t(`启动前命令(Pre-launch command · Agent 运行代理)`,`Pre-launch command (Agent runtime proxy)`),(0,O.jsx)(`textarea`,{rows:2,value:d,placeholder:t(`例如:export https_proxy=http://127.0.0.1:7890 或 source ~/.api_proxy.sh(留空则直连)`,`Example: export https_proxy=http://127.0.0.1:7890 or source ~/.api_proxy.sh (empty = direct)`),onChange:e=>{p(e.target.value),C(null)}})]}),(0,O.jsxs)(`label`,{className:`span-full`,children:[t(`CLI 更新前命令(包管理 / 独立下载代理,留空沿用上方命令)`,`CLI update pre-command (package registry proxy; blank = inherit above)`),(0,O.jsx)(`textarea`,{rows:2,value:m,placeholder:t(`例如:source ~/.pkg_proxy.sh 或自定义包管理代理命令(专门用于 npm / curl 检查与升级 CLI,不干扰 Agent 对话代理)`,`Example: source ~/.pkg_proxy.sh or custom package-proxy alias (used for npm/curl CLI version checks & updates without changing agent API proxy)`),onChange:e=>{h(e.target.value),C(null)}})]}),(0,O.jsxs)(`div`,{className:`settings-field`,children:[(0,O.jsx)(`span`,{className:`settings-field-label`,children:t(`Codex 默认会话权限`,`Default Codex session permissions`)}),(0,O.jsx)(fE,{label:t(`Codex 默认会话权限`,`Default Codex session permissions`),value:g?`yolo`:`controlled`,options:[{value:`yolo`,label:t(`完整权限(YOLO,免审批)`,`Full access (no approval prompts)`)},{value:`controlled`,label:t(`受控模式(按需审批、仅工作区可写)`,`Controlled (approval on request, workspace write)`)}],onChange:e=>{_(e===`yolo`),C(null)}})]}),(0,O.jsxs)(`label`,{className:`settings-field`,children:[(0,O.jsx)(`span`,{className:`settings-field-label`,children:t(`设备常驻会话池上限(留空跟随全局)`,`Resident session pool (empty = global default)`)}),(0,O.jsx)(`input`,{type:`number`,min:0,max:64,value:v,placeholder:t(`跟随全局设置`,`Follow global policy`),onChange:e=>{y(e.target.value),C(null)}})]})]}),S&&(0,O.jsx)(`p`,{className:`settings-status-banner ${S.kind}`,children:S.text}),(0,O.jsx)(`div`,{className:`settings-actions`,children:(0,O.jsxs)(`button`,{type:`button`,className:`center-primary`,disabled:b,onClick:()=>void ce(),children:[(0,O.jsx)(ze,{size:14}),t(`保存主机环境`,`Save host setup`)]})})]}),(0,O.jsxs)(`div`,{className:`settings-card`,children:[(0,O.jsxs)(`div`,{className:`settings-card-head`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`h2`,{children:[(0,O.jsx)(Ie,{size:16}),t(`${l} · 远端 Scope 服务一键部署`,`${l} · One-Click Remote Scope Bootstrap`)]}),(0,O.jsx)(`p`,{children:t(`向远端用户目录(~/.local,无需 root)安装免密邮件回传工具 scope-notify、注册 Codex/Claude MCP,并建立安全的本机回环 SSH 反向隧道。`,`Installs scope-notify into ~/.local (no root required), registers the Codex/Claude completion MCP server, and manages an encrypted loopback SSH reverse tunnel.`)})]}),(0,O.jsx)(`span`,{className:`settings-badge ${de?.status===`connected`?`ok`:de?.enabled?`warn`:``}`,children:de?.status===`connected`?t(`隧道已连接`,`Tunnel connected`):de?.enabled?`${t(`隧道状态`,`Tunnel`)}: ${de.status}`:t(`隧道未开启`,`Tunnel off`)})]}),ue&&(0,O.jsxs)(`div`,{className:`settings-env-grid`,children:[(0,O.jsxs)(`div`,{className:`settings-env-item`,children:[(0,O.jsx)(`span`,{children:t(`远端用户 / 目录`,`Remote user`)}),(0,O.jsxs)(`strong`,{children:[ue.user,` (`,ue.isRoot?`root`:`non-root`,`)`]})]}),(0,O.jsxs)(`div`,{className:`settings-env-item`,children:[(0,O.jsx)(`span`,{children:`Python / tmux / GPU`}),(0,O.jsxs)(`strong`,{children:[ue.python3?ue.python3.replace(`Python `,`py `):`missing`,` ·`,` `,ue.tmux?`tmux ok`:`no tmux`,` · `,ue.gpuCount,` GPU`]})]}),(0,O.jsxs)(`div`,{className:`settings-env-item`,children:[(0,O.jsx)(`span`,{children:`scope-notify`}),(0,O.jsx)(`strong`,{children:ue.scopeNotify.installed?ue.scopeNotify.daemonActive?t(`已安装 · 运行中`,`Installed · active`):t(`已安装 · 未运行`,`Installed · stopped`):t(`尚未部署`,`Not installed`)})]}),(0,O.jsxs)(`div`,{className:`settings-env-item`,children:[(0,O.jsx)(`span`,{children:t(`回传通路 / MCP`,`Relay & MCP`)}),(0,O.jsxs)(`strong`,{children:[ue.scopeNotify.relayReachable?t(`回环可达`,`Relay OK`):t(`未连通`,`Unreachable`),` ·`,` `,ue.scopeNotify.codexMcp?`Codex ✓`:`Codex -`,` /`,` `,ue.scopeNotify.claudeMcp?`Claude ✓`:`Claude -`]})]}),ue.scopeProtocol&&(0,O.jsxs)(`div`,{className:`settings-env-item`,children:[(0,O.jsx)(`span`,{children:t(`SCOPE 显示协议(公式/表格/媒体)`,`SCOPE Protocol (Math/Tables/Media)`)}),(0,O.jsxs)(`strong`,{children:[ue.scopeProtocol.codex?`Codex ✓`:`Codex -`,` /`,` `,ue.scopeProtocol.claude?`Claude ✓`:`Claude -`,` /`,` `,ue.scopeProtocol.antigravity?`AGY ✓`:`AGY -`]})]})]}),ue&&!ue.localBinInPath&&!ue.isRoot&&(0,O.jsx)(`p`,{className:`settings-status-banner`,children:t(`提示:远端 PATH 尚未包含 ${ue.home}/.local/bin;MCP 已使用绝对路径注册,终端手动调用可将该目录加入 PATH。`,`Note: ${ue.home}/.local/bin is not in remote PATH. MCP uses the absolute path automatically; add it to PATH for manual shell calls.`)}),(0,O.jsxs)(`div`,{className:`center-form-grid`,children:[(0,O.jsxs)(`label`,{className:`settings-field`,children:[(0,O.jsx)(`span`,{className:`settings-field-label`,children:t(`远端回环监听端口`,`Remote loopback port`)}),(0,O.jsx)(`input`,{type:`number`,min:1024,max:65535,value:re,onChange:e=>ie(Number(e.target.value)||4922)})]}),(0,O.jsxs)(`div`,{className:`settings-field`,children:[(0,O.jsx)(`span`,{className:`settings-field-label`,children:t(`MCP 自动注册`,`MCP Integration`)}),(0,O.jsxs)(`label`,{className:`settings-check-box-row`,children:[(0,O.jsx)(`input`,{type:`checkbox`,checked:ae,onChange:e=>oe(e.target.checked)}),(0,O.jsx)(`span`,{children:t(`自动注册 Codex / Claude 完成通知 MCP`,`Register scope-email MCP in Codex & Claude`)})]})]})]}),D&&(0,O.jsx)(`p`,{className:`settings-status-banner ${D.kind}`,children:D.text}),de?.lastError&&(0,O.jsx)(`p`,{className:`settings-status-banner error`,children:de.lastError}),(0,O.jsxs)(`div`,{className:`settings-actions`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`center-secondary`,disabled:!u?.reachable||!!E,onClick:()=>void le(`inspect`),children:[(0,O.jsx)(Fe,{size:14,className:E===`inspect`?`is-spinning`:``}),t(`检查远端环境`,`Inspect host`)]}),(0,O.jsxs)(`button`,{type:`button`,className:`center-secondary`,disabled:!u?.reachable||!!E,onClick:()=>void le(`sync-protocol`),children:[(0,O.jsx)(ee,{size:14}),E===`sync-protocol`?t(`正在注入协议…`,`Syncing protocol…`):t(`同步三端 SCOPE 协议`,`Sync SCOPE protocol`)]}),(0,O.jsxs)(`button`,{type:`button`,className:`center-primary`,disabled:!u?.reachable||!!E,onClick:()=>void le(`deploy`),children:[(0,O.jsx)(ee,{size:14}),E===`deploy`?t(`正在部署…`,`Deploying…`):t(`一键部署远端服务`,`One-click deploy`)]}),ue?.scopeNotify.installed&&(0,O.jsxs)(`button`,{type:`button`,className:`center-secondary`,disabled:!u?.reachable||!!E,onClick:()=>void le(`remove`),children:[(0,O.jsx)(Qe,{size:14}),t(`卸载通知服务`,`Remove service`)]})]})]}),(0,O.jsx)(IE,{hosts:e,selectedHost:l,detectedClis:w?.host===l?w?.report?.clis:void 0})]})}function RE({draft:e,update:t,onAccounts:n}){let{tr:r}=fc();function i(e){return e===`codex`?r(`app-server 持续会话 · 支持权限审批与多账号切换`,`Persistent app-server · approvals & account failover`):e===`claude`?r(`stream-json 实时对话 · 工具审批与问题卡片`,`Live stream-json · approvals & interactive questions`):e===`antigravity`?r(`ACP 实时会话 · 表单审批与模型/强度切换`,`ACP live sessions · form approvals & model effort`):r(`远端 headless 单次任务`,`Remote headless single-turn runner`)}return(0,O.jsxs)(`div`,{className:`settings-hub-body`,children:[(0,O.jsx)(`div`,{className:`settings-card`,children:(0,O.jsxs)(`div`,{className:`settings-card-head`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`h2`,{children:[(0,O.jsx)(ve,{size:16}),r(`Agent 账号登录与 Codex 账号池`,`Agent Accounts & Codex Failover Pool`)]}),(0,O.jsx)(`p`,{children:r(`统一查看各设备的 Codex、Claude Code 与 Antigravity 登录状态;支持一键打开 SSH 终端登录或切换 Claude / AGY,并管理远端多套 Codex Profile 自动切换。凭据始终留在对应设备上。`,`Inspect Codex, Claude Code, and Antigravity login state per host, launch interactive SSH login for Claude / AGY, and manage multi-profile Codex failover. Credentials stay on your machines.`)})]}),(0,O.jsxs)(`button`,{type:`button`,className:`center-secondary`,onClick:n,children:[(0,O.jsx)(ve,{size:14}),r(`打开账号管理`,`Manage accounts`)]})]})}),(0,O.jsx)(`div`,{className:`provider-grid`,children:Object.entries(wE).map(([n,a])=>{let o=n,s=e.providers[o],c=(n,r)=>t({...e,providers:{...e.providers,[o]:{...s,[n]:r}}});return(0,O.jsxs)(`article`,{className:`provider-card`,children:[(0,O.jsxs)(`header`,{children:[(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`h3`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,O.jsx)(EE,{provider:o,size:20}),a.name]}),(0,O.jsx)(`span`,{children:i(o)})]}),(0,O.jsxs)(`label`,{className:`provider-toggle`,children:[(0,O.jsx)(`input`,{type:`checkbox`,checked:s.enabled,onChange:e=>c(`enabled`,e.target.checked)}),r(`启用`,`Enabled`)]})]}),(0,O.jsxs)(`label`,{children:[r(`可执行文件`,`Executable`),(0,O.jsx)(`input`,{value:s.executable,required:!0,onChange:e=>c(`executable`,e.target.value)})]}),o!==`dsh`&&(0,O.jsxs)(`label`,{children:[r(`新会话默认模型(可选)`,`Default model (optional)`),(0,O.jsx)(`input`,{value:s.model,placeholder:r(`沿用远端 CLI 默认模型`,`Use remote CLI default`),onChange:e=>c(`model`,e.target.value)})]}),(0,O.jsxs)(`label`,{className:`span-full`,children:[r(`Agent 专属启动前命令(可选,留空则沿用主机设置)`,`Agent pre-launch override (optional; empty inherits host setting)`),(0,O.jsx)(`textarea`,{rows:2,value:s.preLaunchCommand,placeholder:r(`留空:沿用「远程主机与部署」中为每台服务器配置的环境/代理命令`,`Empty: inherits the per-host command configured in Hosts & Remote Deploy`),onChange:e=>c(`preLaunchCommand`,e.target.value)})]})]},o)})})]})}var zE=[{id:`gmail`,label:`Gmail`,host:`smtp.gmail.com`,port:465,secure:!0},{id:`outlook`,label:`Outlook / 365`,host:`smtp.office365.com`,port:587,secure:!1},{id:`qq`,label:`QQ Mail`,host:`smtp.qq.com`,port:465,secure:!0},{id:`163`,label:`163 Mail`,host:`smtp.163.com`,port:465,secure:!0},{id:`feishu`,label:`Feishu / Lark`,host:`smtp.feishu.cn`,port:465,secure:!0}];function BE(){let{tr:e}=fc(),[t,n]=(0,f.useState)(!0),[r,i]=(0,f.useState)(``),[a,o]=(0,f.useState)(null),[s,c]=(0,f.useState)(!1),[l,u]=(0,f.useState)(``),[d,p]=(0,f.useState)(465),[m,h]=(0,f.useState)(!0),[g,_]=(0,f.useState)(``),[v,y]=(0,f.useState)(``),[b,x]=(0,f.useState)(!1),[S,C]=(0,f.useState)(null),[w,T]=(0,f.useState)(``),[E,te]=(0,f.useState)(``),[D,ne]=(0,f.useState)(15),[re,ie]=(0,f.useState)(`http://localhost:3000/`),[ae,oe]=(0,f.useState)({humanRequests:!0,agentCompletion:!0,dlcAlerts:!0}),[se,ce]=(0,f.useState)(null);function le(e){c(!!e.enabled),u(e.smtp?.host||``),p(e.smtp?.port||465),h(!!e.smtp?.secure),_(e.smtpUser||``),x(!!e.hasPassword),C(e.credentialSource||null),T(e.from||``),te((e.to||[]).join(`, `)),ne(e.cooldownMinutes??15),ie(e.monitorUrl||`http://localhost:3000/`),oe({humanRequests:e.triggers?.humanRequests!==!1,agentCompletion:e.triggers?.agentCompletion!==!1,dlcAlerts:e.triggers?.dlcAlerts!==!1}),ce(e.lastError||null)}(0,f.useEffect)(()=>{let e=!1,t=new AbortController;return fetch(TT(`/api/email/settings`),{signal:t.signal,cache:`no-store`}).then(e=>e.json()).then(t=>{e||(le(t),n(!1))}).catch(()=>{e||n(!1)}),()=>{e=!0,t.abort()}},[]);async function ue(t=!1){i(`save`),o(null);try{let n=await fetch(TT(`/api/email/settings`),{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({enabled:s,smtp:{host:l,port:d,secure:m},smtpUser:g,...v?{smtpPass:v}:{},...t?{clearCredentials:!0}:{},from:w,to:E,cooldownMinutes:D,monitorUrl:re,triggers:ae})}),r=await n.json();if(!n.ok)throw Error(r.error||e(`保存邮件配置失败`,`Failed to save email settings`));le(r.settings),y(``),o({kind:`success`,text:t?e(`已清除本机保存的 SMTP 凭据。`,`Saved SMTP credentials cleared.`):e(`邮件配置已保存并立即热生效。`,`Email settings saved and active immediately.`)})}catch(e){o({kind:`error`,text:e.message})}finally{i(``)}}async function de(t){i(t),o(null);try{let n=await fetch(TT(`/api/email/${t}`),{method:`POST`}),r=await n.json();if(r.settings&&le(r.settings),!n.ok)throw Error(r.error||e(`操作失败`,`Operation failed`));o({kind:`success`,text:t===`verify`?e(`SMTP 连接与认证校验成功!`,`SMTP connection and authentication verified!`):e(`测试邮件已发送,请检查收件箱。`,`Test email sent. Check your inbox.`)})}catch(e){o({kind:`error`,text:e.message})}finally{i(``)}}return t?(0,O.jsx)(`div`,{className:`settings-hub-body`,children:(0,O.jsx)(`p`,{className:`settings-status-banner`,children:e(`正在读取邮件配置…`,`Loading email settings…`)})}):(0,O.jsx)(`div`,{className:`settings-hub-body`,children:(0,O.jsxs)(`div`,{className:`settings-card`,children:[(0,O.jsxs)(`div`,{className:`settings-card-head`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`h2`,{children:[(0,O.jsx)(xe,{size:16}),e(`SMTP 邮件服务配置`,`SMTP Mail Configuration`)]}),(0,O.jsx)(`p`,{children:e(`所有邮箱账号与授权码仅保存在你本机 .scope/ 目录(0600 权限),不会上传到仓库,也不会发送到远端 GPU 主机。`,`SMTP usernames and app passwords are stored only on your local workstation under .scope/ (mode 0600), never pushed to Git or copied to remote hosts.`)})]}),(0,O.jsxs)(`label`,{className:`provider-toggle`,children:[(0,O.jsx)(`input`,{type:`checkbox`,checked:s,onChange:e=>c(e.target.checked)}),e(`启用邮件通知`,`Enable email notifications`)]})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{style:{fontSize:12,color:`var(--muted)`,display:`block`,marginBottom:8},children:e(`快速填充常见邮箱服务器`,`Provider presets`)}),(0,O.jsx)(`div`,{className:`smtp-presets`,children:zE.map(e=>(0,O.jsx)(`button`,{type:`button`,className:`smtp-preset-btn ${l===e.host&&d===e.port?`active`:``}`,onClick:()=>{u(e.host),p(e.port),h(e.secure)},children:e.label},e.id))})]}),(0,O.jsxs)(`div`,{className:`center-form-grid`,children:[(0,O.jsxs)(`label`,{children:[e(`SMTP 服务器`,`SMTP host`),(0,O.jsx)(`input`,{value:l,placeholder:`smtp.example.com`,onChange:e=>u(e.target.value)})]}),(0,O.jsxs)(`label`,{children:[e(`端口`,`Port`),(0,O.jsx)(`input`,{type:`number`,min:1,max:65535,value:d,onChange:e=>p(Number(e.target.value)||465)})]}),(0,O.jsxs)(`label`,{className:`settings-field`,children:[(0,O.jsx)(`span`,{className:`settings-field-label`,children:e(`SMTP 登录账号`,`SMTP username`)}),(0,O.jsx)(`input`,{value:g,placeholder:`you@example.com`,onChange:e=>_(e.target.value)})]}),(0,O.jsxs)(`label`,{className:`settings-field`,children:[(0,O.jsxs)(`span`,{className:`settings-field-label`,style:{justifyContent:`space-between`,gap:8},children:[(0,O.jsx)(`span`,{children:e(`应用授权码 / 密码`,`App password / SMTP secret`)}),b&&(0,O.jsxs)(`span`,{className:`settings-badge ok`,style:{padding:`1px 8px`,fontSize:10.5},children:[(0,O.jsx)(ee,{size:10}),e(`已保存`,`Saved`),` (`,S||`local`,`)`]})]}),(0,O.jsx)(`input`,{type:`password`,autoComplete:`new-password`,value:v,placeholder:b?e(`留空保留当前已保存密码`,`Leave blank to keep saved secret`):e(`输入邮箱授权码(非登录密码)`,`Paste SMTP app password`),onChange:e=>y(e.target.value)})]}),(0,O.jsxs)(`label`,{children:[e(`收件邮箱(多个用逗号分隔)`,`Recipients (comma-separated)`),(0,O.jsx)(`input`,{value:E,placeholder:`alerts@example.com`,onChange:e=>te(e.target.value)})]}),(0,O.jsxs)(`label`,{children:[e(`发件人显示名(可选)`,`From header (optional)`),(0,O.jsx)(`input`,{value:w,placeholder:`SCOPE Monitor <you@example.com>`,onChange:e=>T(e.target.value)})]}),(0,O.jsxs)(`label`,{children:[e(`同类告警冷却(分钟)`,`Cooldown (minutes)`),(0,O.jsx)(`input`,{type:`number`,min:0,max:1440,value:D,onChange:e=>ne(Number(e.target.value)||0)})]}),(0,O.jsxs)(`label`,{children:[e(`邮件内附带的工作台链接`,`Monitor link inside emails`),(0,O.jsx)(`input`,{value:re,placeholder:`http://localhost:3000/`,onChange:e=>ie(e.target.value)})]})]}),(0,O.jsx)(`div`,{className:`settings-check-grid`,children:(0,O.jsxs)(`label`,{className:`settings-checkbox`,style:{marginTop:0},children:[(0,O.jsx)(`input`,{type:`checkbox`,checked:m,onChange:e=>h(e.target.checked)}),e(`使用 SSL/TLS 直连(465 端口勾选,587 STARTTLS 取消)`,`Direct SSL/TLS (checked for 465, unchecked for 587 STARTTLS)`)]})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{style:{fontSize:12,color:`var(--muted)`,display:`block`,marginBottom:8},children:e(`通知触发场景`,`Notification triggers`)}),(0,O.jsxs)(`div`,{className:`settings-check-grid`,children:[(0,O.jsxs)(`label`,{className:`settings-checkbox`,style:{marginTop:0},children:[(0,O.jsx)(`input`,{type:`checkbox`,checked:ae.humanRequests,onChange:e=>oe(t=>({...t,humanRequests:e.target.checked}))}),e(`待人工审批 / 提问等待`,`Pending approvals & questions`)]}),(0,O.jsxs)(`label`,{className:`settings-checkbox`,style:{marginTop:0},children:[(0,O.jsx)(`input`,{type:`checkbox`,checked:ae.agentCompletion,onChange:e=>oe(t=>({...t,agentCompletion:e.target.checked}))}),e(`远端任务完成 / 失败回执(scope-notify)`,`Remote completion / failure alerts (scope-notify)`)]}),(0,O.jsxs)(`label`,{className:`settings-checkbox`,style:{marginTop:0},children:[(0,O.jsx)(`input`,{type:`checkbox`,checked:ae.dlcAlerts,onChange:e=>oe(t=>({...t,dlcAlerts:e.target.checked}))}),e(`插件高失败告警`,`Plugin alert notifications`)]})]})]}),a&&(0,O.jsx)(`p`,{className:`settings-status-banner ${a.kind}`,children:a.text}),!a&&se&&(0,O.jsx)(`p`,{className:`settings-status-banner error`,children:se}),(0,O.jsxs)(`div`,{className:`settings-actions`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`center-primary`,disabled:!!r,onClick:()=>void ue(!1),children:[(0,O.jsx)(ze,{size:14}),r===`save`?e(`保存中…`,`Saving…`):e(`保存配置`,`Save settings`)]}),(0,O.jsxs)(`button`,{type:`button`,className:`center-secondary`,disabled:!!r,onClick:()=>void de(`verify`),children:[(0,O.jsx)(We,{size:14}),r===`verify`?e(`验证中…`,`Verifying…`):e(`验证 SMTP 连接`,`Verify connection`)]}),(0,O.jsxs)(`button`,{type:`button`,className:`center-secondary`,disabled:!!r,onClick:()=>void de(`test`),children:[(0,O.jsx)(Ve,{size:14}),r===`test`?e(`发送中…`,`Sending…`):e(`发送测试邮件`,`Send test email`)]}),b&&(0,O.jsxs)(`button`,{type:`button`,className:`center-secondary`,disabled:!!r,onClick:()=>void ue(!0),children:[(0,O.jsx)(Qe,{size:14}),e(`清除本机凭据`,`Clear credentials`)]})]})]})})}function VE({state:e,hosts:t,busy:n,mutate:r,onAccounts:i,tab:a,onTabChange:o,operatorName:s=`Operator`,onSaveOperatorName:c}){let{tr:l}=fc(),[u,d]=(0,f.useState)(`general`),p=a??u,m=e=>{d(e),o?.(e)},[h,g]=(0,f.useState)(()=>structuredClone(e.config)),[_,v]=(0,f.useState)(e.configRevision||0),[y,b]=(0,f.useState)(!1);function x(e){g(e),b(!1)}async function S(){try{let e=await r(`config`,{config:h,revision:_});v(e.configRevision),g(e.config),b(!0)}catch{}}let C=[{id:`general`,label:l(`常规与总调度`,`General & Coordinator`),icon:qe},{id:`hosts`,label:l(`远程主机与部署`,`Hosts & Remote Deploy`),icon:He},{id:`agents`,label:l(`Agent 与账号`,`Agents & Accounts`),icon:w},{id:`email`,label:l(`邮件与通知`,`Email & Notifications`),icon:xe},{id:`plugins`,label:l(`插件扩展`,`Plugins`),icon:Ne}],T=p===`general`||p===`agents`;return(0,O.jsxs)(`section`,{className:`workbench-settings settings-hub`,children:[(0,O.jsxs)(`header`,{className:`center-page-heading`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{className:`center-eyebrow`,children:l(`SCOPE / 设置与管理`,`SCOPE / Settings & Management`)}),(0,O.jsx)(`h1`,{children:l(`统一管理主机、Agent、通知与插件。`,`Configure hosts, agents, alerts, and plugins.`)}),(0,O.jsx)(`p`,{children:l(`按需配置远端代理、邮箱凭据与服务部署;敏感信息全部留在本机 .scope/ 目录。`,`All credentials, host runtime commands, and remote services stay under your local .scope/ directory.`)})]}),(0,O.jsxs)(`button`,{type:`button`,className:`center-secondary`,onClick:i,children:[(0,O.jsx)(ve,{size:15}),` `,l(`Codex 账号`,`Codex Accounts`)]})]}),(0,O.jsx)(`nav`,{className:`settings-hub-tabs`,role:`tablist`,"aria-label":l(`设置分组`,`Settings sections`),children:C.map(e=>{let t=e.icon;return(0,O.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":p===e.id,className:`settings-hub-tab ${p===e.id?`active`:``}`,onClick:()=>m(e.id),children:[(0,O.jsx)(t,{size:15}),(0,O.jsx)(`span`,{children:e.label})]},e.id)})}),T?(0,O.jsxs)(`form`,{className:`settings-hub-form`,onSubmit:e=>{e.preventDefault(),S()},children:[p===`general`?(0,O.jsx)(ME,{draft:h,update:x,state:e,hosts:t,operatorName:s,onSaveOperatorName:c}):(0,O.jsx)(RE,{draft:h,update:x,onAccounts:i}),(0,O.jsx)(`div`,{className:`settings-hub-body`,style:{paddingTop:0},children:(0,O.jsxs)(`footer`,{className:`settings-footer`,style:{paddingTop:6},children:[_!==(e.configRevision||0)&&(0,O.jsx)(`button`,{type:`button`,className:`center-secondary`,onClick:()=>{g(structuredClone(e.config)),v(e.configRevision||0)},children:l(`载入最新配置`,`Reload latest`)}),y&&(0,O.jsxs)(`span`,{role:`status`,children:[(0,O.jsx)(ee,{size:15}),` `,l(`工作台配置已保存`,`Settings saved`)]}),(0,O.jsxs)(`button`,{className:`center-primary`,disabled:n,children:[(0,O.jsx)(ze,{size:15}),` `,l(`保存工作台配置`,`Save settings`)]})]})})]}):p===`hosts`?(0,O.jsx)(LE,{hosts:t}):p===`email`?(0,O.jsx)(BE,{}):(0,O.jsx)(`div`,{className:`settings-hub-body`,children:(0,O.jsx)(jE,{hosts:t})})]})}function HE({client:e,section:t,onNavigate:n,workspace:r,settingsTab:i,onSettingsTabChange:a}){let{tr:o}=fc(),[s,c]=(0,f.useState)(null),{state:l}=e,u=l?.features?.taskQueue!==!1;function d(e,t){let i=[...r.allAgents,...r.inactiveAgents].find(n=>n.host===e&&n.rollout?.id===t);n(`projects`),r.chooseHost(e),i?r.selectAgentAndReveal(i.id):(r.setQuery(t),r.setActionNotice({kind:`success`,text:o(`已定位执行主机;等待会话同步,或在历史中按会话 ID 查找。`,`Located host; waiting for session sync or search by session ID in history.`)}))}async function p(e){let t=await fetch(TT(`/api/operator`),{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({name:e})}),n=await t.json();if(!t.ok)throw Error(n.error||o(`保存失败`,`Save failed`));r.setOperatorNameDraft(n.operatorName||e),await r.refresh()}return(0,O.jsxs)(`div`,{className:`workbench-surface surface-${t}`,children:[(e.error||l?.error)&&(0,O.jsx)(`div`,{className:`workbench-notice`,role:`alert`,children:e.error||l?.error}),l?(0,O.jsx)(O.Fragment,{children:t===`settings`?(0,O.jsx)(VE,{...e,state:l,hosts:r.snapshot.hosts,onAccounts:r.openAccountProfiles,tab:i,onTabChange:a,operatorName:r.operatorName,onSaveOperatorName:p},`settings`):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`workbench-primary`,children:[u&&s&&(0,O.jsx)(TE,{...e,initial:s,state:l,hosts:r.snapshot.hosts,projects:r.projects,onClose:()=>c(null)},JSON.stringify(s)),t===`manager`?(0,O.jsx)(xE,{hosts:r.snapshot.hosts,...e,state:l,onSettings:()=>n(`settings`),onDraft:u?c:void 0}):(0,O.jsx)(CE,{hosts:r.snapshot.hosts,tasks:l.tasks.filter(e=>!e.archivedAt),onSelectHost:e=>r.chooseHost(e)})]}),t===`resources`&&(0,O.jsxs)(`aside`,{className:`workbench-activity`,children:[(0,O.jsx)(DE,{...e,tasks:l.tasks.filter(e=>!e.archivedAt),onOpenSession:d,onNew:u?()=>c({provider:`codex`,host:r.selectedProject?.host||l.config.manager.host||r.snapshot.hosts[0]?.alias||``,cwd:r.selectedProject?.cwd||``,prompt:``,gpuCount:0,minMemoryMiB:0}):void 0}),!u&&(0,O.jsx)(`p`,{className:`queue-paused`,children:o(`实验任务队列未启用`,`Experimental task queue is disabled`)}),l.config.scheduler.paused&&(0,O.jsx)(`p`,{className:`queue-paused`,children:o(`调度已暂停 · 可在设置中恢复`,`Queue paused · resume in Settings`)})]})]})}):(0,O.jsxs)(`div`,{className:`center-loading`,children:[(0,O.jsx)(be,{size:20,className:`is-spinning`}),(0,O.jsx)(`p`,{children:o(`正在连接工作台…`,`Connecting to workbench…`)})]})]})}function UE(e,t){if(!e||typeof e!=`object`)return null;let n=e.usedPercent??e.used_percent,r=Number(n);if(n==null||!Number.isFinite(r))return null;let i=Math.max(0,Math.min(100,Math.round(r))),a=e.windowDurationMins??e.window_minutes,o=Number(a),s=a!=null&&Number.isFinite(o)&&o>0?Math.round(o):null,c=e.resetsAt??e.resets_at,l=Number(c),u=c!=null&&Number.isFinite(l)&&l>0?Math.round(l):null,d=!!(u&&u*1e3<=t);return{usedPercent:d?0:i,remainingPercent:d?100:Math.max(0,100-i),windowMinutes:s,resetsAt:u,expired:d}}function WE(e){if(!e||typeof e!=`object`)return null;let t=!!(e.hasCredits??e.has_credits),n=!!e.unlimited,r=e.balance!==void 0&&e.balance!==null&&String(e.balance).trim()!==``?String(e.balance).trim():null;return!t&&!n&&(!r||Number(r)<=0)?null:{hasCredits:t,unlimited:n,balance:r}}function GE(e,t){if(!e||typeof e!=`object`)return null;let n=typeof e.name==`string`?e.name.trim():``;if(!n)return null;let r=UE(e.primary,t),i=UE(e.secondary,t);if(!r&&!i)return null;let a=typeof e.description==`string`&&e.description.trim()?e.description.trim().slice(0,300):void 0;return a?{name:n.slice(0,120),description:a,primary:r,secondary:i}:{name:n.slice(0,120),primary:r,secondary:i}}function KE(e,t=Date.now()){if(!e||typeof e!=`object`)return null;let n=e.rateLimits&&typeof e.rateLimits==`object`?e.rateLimits:e,r=UE(n.primary,t),i=UE(n.secondary,t),a=WE(n.credits),o=Array.isArray(n.groups)?n.groups.map(e=>GE(e,t)).filter(Boolean):[],s=n.planType??n.plan_type,c=typeof s==`string`&&s.trim()||null;if(!r&&!i&&!a&&o.length===0)return null;let l={planType:c,primary:r,secondary:i,credits:a};return o.length>0&&(l.groups=o),l}function qE(e){if(!e)return null;let t=[e.primary,e.secondary].filter(Boolean),n=t.length>0?t:Array.isArray(e.groups)?e.groups.flatMap(e=>[e?.primary,e?.secondary].filter(Boolean)):[];return n.length&&[...n].sort((e,t)=>Number(!!e.expired)-Number(!!t.expired)||e.remainingPercent-t.remainingPercent)[0]||null}function JE(e,t=`zh-CN`){let n=t===`en-US`||t===`en`;if(!Number.isFinite(e)||!e)return n?`Limit`:`用量额度`;if(e>=10080&&e%1440==0){let t=Math.round(e/1440);return t===7?n?`7d`:`周额度`:n?`${t}d`:`${t}天额度`}if(e>=60&&e%60==0){let t=Math.round(e/60);return n?`${t}h`:`${t}h 额度`}return n?`${e}m`:`${e}m 额度`}function YE(e){return e?e.remainingPercent<=10?`danger`:e.remainingPercent<=30?`warn`:`ok`:`muted`}function XE(e){if(!e||!Number.isFinite(e))return``;let t=new Date(e*1e3);if(Number.isNaN(t.getTime()))return``;let n=e=>String(e).padStart(2,`0`);return`${n(t.getMonth()+1)}/${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}`}function ZE({quota:e,loading:t}){let{locale:n,tr:r}=fc();if(t&&!e)return(0,O.jsxs)(`span`,{className:`quota-inline-badge is-muted`,children:[(0,O.jsx)(be,{size:11,className:`is-spinning`}),r(`测算中`,`Checking`)]});let i=qE(e);if(i){let e=JE(i.windowMinutes,n);return(0,O.jsx)(`span`,{className:`quota-inline-badge is-${YE(i)}`,title:r(`${e}剩余 ${i.remainingPercent}%`,`${e}: ${i.remainingPercent}% left`),children:r(`剩余 ${i.remainingPercent}%`,`${i.remainingPercent}% left`)})}return e?.credits?.unlimited?(0,O.jsx)(`span`,{className:`quota-inline-badge is-ok`,children:r(`无限点数`,`Unlimited`)}):e?.credits?.balance?(0,O.jsx)(`span`,{className:`quota-inline-badge is-ok`,children:r(`点数 ${e.credits.balance}`,`Credits ${e.credits.balance}`)}):null}function QE({win:e}){let{locale:t,tr:n}=fc(),r=YE(e),i=JE(e.windowMinutes,t),a=XE(e.resetsAt),o=e.expired?n(`窗口已重置`,`Window reset`):a?n(`重置 ${a}`,`Resets ${a}`):n(`已用 ${e.usedPercent}%`,`${e.usedPercent}% used`);return(0,O.jsxs)(`div`,{className:`quota-window-row`,children:[(0,O.jsxs)(`div`,{className:`quota-window-top`,children:[(0,O.jsx)(`span`,{children:i}),(0,O.jsx)(`strong`,{className:`quota-value is-${r}`,children:n(`剩余 ${e.remainingPercent}%`,`${e.remainingPercent}% left`)})]}),(0,O.jsx)(`div`,{className:`quota-progress-track`,"aria-hidden":`true`,children:(0,O.jsx)(`div`,{className:`quota-progress-fill is-${r}`,style:{width:`${Math.max(0,Math.min(100,e.remainingPercent))}%`}})}),(0,O.jsx)(`small`,{className:`quota-window-detail`,children:o})]})}function $E({quota:e,loading:t,error:n,compact:r,emptyNote:i,onRefresh:a}){let{tr:o}=fc(),s=(e?.groups||[]).filter(e=>!!(e&&(e.primary||e.secondary))),c=[e?.primary,e?.secondary].filter(e=>!!e),l=e?.credits,u=!!(l&&(l.unlimited||l.balance||l.hasCredits));return(0,O.jsxs)(`div`,{className:`quota-meter-card${r?` is-compact`:``}`,children:[(0,O.jsxs)(`div`,{className:`quota-meter-head`,children:[(0,O.jsxs)(`span`,{className:`quota-meter-title`,children:[(0,O.jsx)(he,{size:13}),o(`订阅剩余额度`,`Subscription Quota`)]}),(0,O.jsxs)(`div`,{className:`quota-meter-meta`,children:[e?.planType&&e.planType!==`unknown`&&(0,O.jsx)(`small`,{className:`account-plan`,children:e.planType}),a&&(0,O.jsxs)(`button`,{type:`button`,className:`quota-refresh-btn`,title:o(`刷新订阅额度`,`Refresh quota`),"aria-label":o(`刷新订阅额度`,`Refresh quota`),disabled:t,onClick:a,children:[(0,O.jsx)(Fe,{size:12,className:t?`is-spinning`:``}),o(`刷新额度`,`Refresh`)]})]})]}),s.length>0?(0,O.jsx)(`div`,{className:`quota-group-list`,children:s.map(e=>{let t=[e.primary,e.secondary].filter(e=>!!e);return(0,O.jsxs)(`div`,{className:`quota-group-block`,children:[(0,O.jsx)(`div`,{className:`quota-group-head`,title:e.description,children:(0,O.jsx)(`span`,{children:e.name})}),(0,O.jsx)(`div`,{className:`quota-window-list`,children:t.map((t,n)=>(0,O.jsx)(QE,{win:t},`${e.name}:${n}:${t.windowMinutes??`window`}`))})]},e.name)})}):c.length>0?(0,O.jsx)(`div`,{className:`quota-window-list`,children:c.map((e,t)=>(0,O.jsx)(QE,{win:e},`${t}:${e.windowMinutes??`window`}`))}):(0,O.jsx)(`p`,{className:`quota-empty-note`,children:t?o(`正在读取订阅额度…`,`Loading subscription quota…`):n||i||o(`当前未读取到订阅额度窗口(API Key 或离线会话不返回订阅配额)`,`No subscription quota windows returned (API key or offline sessions do not expose plan quotas).`)}),u&&(0,O.jsxs)(`div`,{className:`quota-credits-row`,children:[(0,O.jsx)(`span`,{children:o(`附加点数`,`Extra Credits`)}),(0,O.jsx)(`strong`,{children:l?.unlimited?o(`无上限`,`Unlimited`):l?.balance?l.balance:o(`可用`,`Available`)})]})]})}function eD({accountProfiles:e,accountProfilesLoading:t,busyAction:n,activateAuthProfile:r,deleteAuthProfile:i,profileQuotas:a,quotasLoading:o}){let{tr:s}=fc();return(0,O.jsxs)(`div`,{className:`auth-profile-list`,children:[(0,O.jsxs)(`div`,{className:`auth-profile-list-head`,children:[(0,O.jsx)(`strong`,{children:s(`已保存账号`,`Saved profiles`)}),(0,O.jsx)(`span`,{children:s(`${e?.profiles.length||0} 个`,`${e?.profiles.length||0}`)})]}),t&&!e?(0,O.jsxs)(`div`,{className:`submission-empty`,children:[(0,O.jsx)(be,{size:17,className:`is-spinning`}),s(`正在读取账号…`,`Loading profiles…`)]}):e?.profiles.length?e.profiles.map(e=>(0,O.jsxs)(`article`,{className:e.active?`active`:``,title:e.updatedAt?s(`更新 ${RT(e.updatedAt)}`,`Updated ${RT(e.updatedAt)}`):e.slug,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`div`,{className:`account-profile-name`,children:[(0,O.jsx)(`strong`,{children:e.name}),e.account?.planType&&e.account.planType!==`unknown`&&(0,O.jsx)(`small`,{className:`account-plan`,children:e.account.planType}),(0,O.jsx)(ZE,{quota:a?.[e.slug]?.quota,loading:!!(o&&e.ready&&!a?.[e.slug])})]}),(0,O.jsx)(`span`,{title:e.account?.email||void 0,children:e.account?.email||(e.ready?s(`未识别账号信息`,`Unknown account`):s(`尚未登录`,`Signed out`))})]}),(0,O.jsxs)(`div`,{className:`auth-profile-actions`,children:[(0,O.jsxs)(`button`,{type:`button`,className:e.active?`profile-active`:`inline-action`,disabled:e.active||!e.ready||n===`profile-activate:${e.slug}`||n===`profile-delete:${e.slug}`,onClick:()=>r(e),children:[n===`profile-activate:${e.slug}`?(0,O.jsx)(be,{size:14,className:`is-spinning`}):e.active?(0,O.jsx)(ee,{size:14}):(0,O.jsx)(ve,{size:14}),e.active?s(`已选配置`,`Active`):s(`切换`,`Switch`)]}),(0,O.jsx)(`button`,{type:`button`,className:`profile-delete-action`,"aria-label":s(`删除 Profile ${e.name}`,`Delete profile ${e.name}`),title:e.active?s(`当前 Profile 不能删除,请先切换账号`,`Switch away before deleting the active profile`):s(`删除 ${e.name}`,`Delete ${e.name}`),disabled:e.active||n===`profile-delete:${e.slug}`||n===`profile-activate:${e.slug}`,onClick:()=>i(e),children:n===`profile-delete:${e.slug}`?(0,O.jsx)(be,{size:14,className:`is-spinning`}):(0,O.jsx)(Qe,{size:14})})]})]},e.slug)):(0,O.jsx)(`div`,{className:`submission-empty`,children:s(`暂无已保存账号。展开“添加账号”保存当前登录,或登录其他账号。`,`No saved profiles yet. Expand "Add account" to save the active login or sign in to another.`)})]})}function tD({deviceLoginJob:e,busyAction:t,closeDeviceLogin:n,copy:r,copied:i}){return e?(0,O.jsxs)(`div`,{className:`device-auth-card ${e.status}`,children:[(0,O.jsxs)(`div`,{className:`device-auth-head`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:e.profile.name}),(0,O.jsx)(`strong`,{children:e.status===`waiting`?`等待你在浏览器完成登录`:e.status===`completed`?`登录成功,Profile 已保存`:e.status===`failed`?`登录失败`:e.status===`cancelled`?`已取消`:`正在请求一次性代码`})]}),(0,O.jsxs)(`button`,{type:`button`,className:`device-auth-dismiss`,disabled:t===`profile-device-cancel`,onClick:n,children:[t===`profile-device-cancel`?(0,O.jsx)(be,{size:14,className:`is-spinning`}):(0,O.jsx)(it,{size:14}),[`starting`,`waiting`].includes(e.status)?`取消验证`:`关闭`]})]}),e.userCode&&(0,O.jsxs)(`div`,{className:`device-code-row`,children:[(0,O.jsx)(`code`,{children:e.userCode}),(0,O.jsxs)(`button`,{type:`button`,onClick:()=>r(e.userCode,`device-auth-code`),children:[i===`device-auth-code`?(0,O.jsx)(ee,{size:14}):(0,O.jsx)(ce,{size:14}),`复制代码`]}),(0,O.jsxs)(`a`,{href:e.verificationUrl,target:`_blank`,rel:`noreferrer`,children:[`打开登录页 `,(0,O.jsx)(de,{size:13})]})]}),e.error&&(0,O.jsx)(`p`,{children:e.error})]}):null}function nD(e){if(!e)return``;let t=new Date(e);if(Number.isNaN(t.getTime()))return e.slice(0,10);let n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}`}function rD(e,t){let n=(e||t||``).trim().toLowerCase();return n===`max_20x`?`Claude Max (20x)`:n===`max_5x`?`Claude Max (5x)`:n===`max`?`Claude Max`:n===`pro`?`Claude Pro`:n===`team`?`Claude Team`:n===`enterprise`?`Claude Enterprise`:e||t||``}function iD({accountProfilesOpen:e,setAccountProfilesOpen:t,accountHost:n,accountHostRef:r,setAccountHost:i,setAccountProfiles:a,snapshot:o,accountProfilesLoading:s,loadAccountProfiles:c,accountProfiles:l,profileNameDraft:u,setProfileNameDraft:d,busyAction:p,saveCurrentAccountProfile:m,deviceLoginJob:h,startDeviceLogin:g,closeDeviceLogin:_,copy:v,copied:y,activateAuthProfile:b,deleteAuthProfile:x,restartHostSessionsForAccount:S,authRestartJob:C,setSshTerminalTarget:w,setActionNotice:T,defaultProvider:E=`codex`}){let{locale:te,tr:D}=fc(),ne=(0,f.useRef)(null),[re,ie]=(0,f.useState)(null),[ae,oe]=(0,f.useState)(null),[se,le]=(0,f.useState)(null),[ue,de]=(0,f.useState)(0),fe=`${e?`open`:`closed`}:${E}`,pe=re?.sessionKey===fe?re.tab:E,me=e&&n?`${n}:${ue}`:``;(0,f.useEffect)(()=>{e&&ne.current?.showModal()},[e]),(0,f.useEffect)(()=>{if(!e||!n)return;let t=new AbortController,r=`/api/auth/quota?host=${encodeURIComponent(n)}&all=1${ue>0?`&refresh=1`:``}`;return fetch(TT(r),{signal:t.signal,cache:`no-store`}).then(async e=>{let n=await e.json();if(!t.signal.aborted){if(!e.ok)throw Error(n.error||`读取账号额度失败`);oe({requestKey:me,data:n,error:n.error||``})}}).catch(e=>{t.signal.aborted||oe({requestKey:me,data:null,error:e.message})}),()=>t.abort()},[e,n,ue,me]),(0,f.useEffect)(()=>{if(!e||!n)return;let t=new AbortController,r=`/api/auth/providers?host=${encodeURIComponent(n)}${ue>0?`&refresh=1`:``}`;return fetch(TT(r),{signal:t.signal,cache:`no-store`}).then(async e=>{let n=await e.json();if(!t.signal.aborted){if(!e.ok)throw Error(n.error||`读取 Agent 登录状态失败`);le({requestKey:me,data:n,error:``})}}).catch(e=>{t.signal.aborted||le({requestKey:me,data:null,error:e.message})}),()=>t.abort()},[e,n,ue,me]);let he=!!(me&&ae?.requestKey!==me),ge=!!(me&&se?.requestKey!==me),_e=ae?.data?.host===n?ae.data:null,ye=ae?.requestKey===me?ae.error:``,xe=se?.data?.host===n?se.data:null,Se=se?.requestKey===me?se.error:``,Ce=xe?.claude||null,we=xe?.antigravity||null,Te=n===`@local`||!!l?.local,Ee=s||he||ge;function De(e,r){!n||Te||(v(r,`login:${r}`),t(!1),w({host:n,cwd:``,tmuxSession:``}),T({kind:`success`,text:`已打开 ${n} 的 SSH 终端并复制 ${r},粘贴回车即可完成 ${e} 登录。`}))}let Oe=l?.profiles.find(e=>e.active),ke=!!(Oe?.account?.email&&l?.currentAccount?.email&&Oe.account.email.toLowerCase()!==l.currentAccount.email.toLowerCase());return(0,O.jsx)(O.Fragment,{children:e&&(0,O.jsxs)(`dialog`,{ref:ne,className:`account-profile-modal`,"aria-labelledby":`account-dialog-title`,onCancel:e=>{e.preventDefault(),t(!1)},onMouseDown:e=>{e.target===e.currentTarget&&t(!1)},children:[(0,O.jsxs)(`div`,{className:`account-dialog-head`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h2`,{id:`account-dialog-title`,children:D(`账号管理`,`Accounts & Quotas`)}),(0,O.jsx)(`p`,{children:D(`查看所选设备的 Codex、Claude Code 与 Antigravity 登录状态;凭据保留在对应设备上。`,`Inspect Codex, Claude Code, and Antigravity logins and live quotas; credentials stay on each host.`)})]}),(0,O.jsx)(`button`,{type:`button`,"aria-label":D(`关闭账号管理`,`Close accounts`),onClick:()=>t(!1),children:(0,O.jsx)(it,{size:17})})]}),(0,O.jsxs)(`div`,{className:`account-profile-toolbar`,children:[(0,O.jsx)(fE,{label:D(`账号所在设备`,`Target host`),value:n,onChange:e=>{r.current=e,i(e),a(null),oe(null),le(null),de(0)},options:o.hosts.filter(e=>e.reachable).map(e=>({value:e.alias,label:rE(e.alias,te),description:D(`${e.agents.length} 个 Codex 会话`,`${e.agents.length} Codex sessions`)}))}),(0,O.jsxs)(`button`,{type:`button`,className:`inline-action`,disabled:!n||Ee,onClick:()=>{c(n),de(e=>e+1)},children:[(0,O.jsx)(Fe,{size:14,className:Ee?`is-spinning`:``}),D(`刷新`,`Refresh`)]})]}),(0,O.jsx)(`div`,{className:`account-provider-tabs`,children:(0,O.jsx)(`div`,{className:`new-agent-choice`,role:`group`,"aria-label":D(`选择 Agent 账号类型`,`Choose agent provider`),children:[{id:`codex`,label:`Codex`,tag:s&&!l?`…`:l?.defaultAuthPresent?qE(_e?.currentQuota)?D(`剩 ${qE(_e?.currentQuota).remainingPercent}%`,`${qE(_e?.currentQuota).remainingPercent}% left`):D(`已登录`,`Signed in`):D(`未登录`,`Signed out`)},{id:`claude`,label:`Claude Code`,tag:ge&&!Ce?`…`:Ce?.loggedIn?qE(Ce.quota)?D(`剩 ${qE(Ce.quota).remainingPercent}%`,`${qE(Ce.quota).remainingPercent}% left`):D(`已登录`,`Signed in`):Ce?.installed?D(`未登录`,`Signed out`):D(`未安装`,`Not installed`)},{id:`antigravity`,label:`Antigravity`,tag:ge&&!we?`…`:we?.loggedIn?qE(we.quota)?D(`剩 ${qE(we.quota).remainingPercent}%`,`${qE(we.quota).remainingPercent}% left`):D(`已登录`,`Signed in`):we?.installed?D(`未登录`,`Signed out`):D(`未安装`,`Not installed`)}].map(e=>(0,O.jsxs)(`button`,{type:`button`,"aria-pressed":pe===e.id,onClick:()=>ie({sessionKey:fe,tab:e.id}),children:[(0,O.jsx)(EE,{provider:e.id,size:15}),(0,O.jsx)(`span`,{children:e.label}),(0,O.jsx)(`small`,{className:`provider-tab-pill`,children:e.tag})]},e.id))})}),(0,O.jsxs)(`div`,{className:`account-profile-body`,children:[pe===`claude`&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`current-account-card`,children:[(0,O.jsx)(`span`,{children:D(`Claude Code 当前登录(${rE(n,te)})`,`Claude Code Active Login (${rE(n,te)})`)}),(0,O.jsx)(`strong`,{children:ge&&!Ce?D(`正在读取…`,`Loading…`):Ce?.loggedIn?Ce.email||D(`已登录 Claude Code`,`Signed in to Claude Code`):Ce?.installed?D(`尚未登录`,`Signed out`):D(`未检测到 claude CLI`,`claude CLI not detected`)}),(0,O.jsx)(`small`,{children:Ce?.loggedIn?[rD(Ce.planTier,Ce.subscriptionType)||D(`未返回套餐类型`,`Unknown plan`),Ce.authMethod&&Ce.authMethod!==`none`?Ce.authMethod:``,Ce.orgName,Ce.loginExpiresAt?D(`授权到期 ${nD(Ce.loginExpiresAt)}`,`Expires ${nD(Ce.loginExpiresAt)}`):``].filter(Boolean).join(` · `):ge&&!Ce?D(`正在检测本机或远端登录态…`,`Checking local or remote login…`):Ce?.installed?D(`尚未登录 · 请通过下方终端执行 claude auth login`,`Signed out · run claude auth login via terminal below`):D(`未在目标主机检测到 claude 命令`,`claude CLI not found on target host`)}),(Se||Ce?.error)&&(0,O.jsx)(`small`,{className:`account-mismatch`,children:Se||Ce?.error}),(0,O.jsx)($E,{quota:Ce?.quota||null,loading:ge,error:Ce?.quotaError||Se||null,compact:!0,onRefresh:()=>de(e=>e+1),emptyNote:Ce?.loggedIn?D(`暂未读取到 Claude 订阅用量窗口(API Key 模式或网络未连通时不返回 OAuth 配额)`,`No Claude subscription quota returned (API key mode or offline host).`):D(`登录 Claude Code 后可查看 5 小时与 7 天订阅剩余额度`,`Sign in to Claude Code to view 5-hour and 7-day subscription quotas.`)})]}),(0,O.jsxs)(`div`,{className:`provider-auth-guide`,children:[(0,O.jsx)(`strong`,{children:D(`登录 / 切换 Claude Code 账号`,`Sign in / switch Claude Code account`)}),(0,O.jsx)(`p`,{children:te===`en`?(0,O.jsxs)(O.Fragment,{children:[`Run `,(0,O.jsx)(`code`,{children:`claude auth login`}),` in an interactive terminal to authorize via OAuth (credentials stay in `,(0,O.jsx)(`code`,{children:`~/.claude`}),` on the host). SCOPE queries Claude's OAuth usage endpoint directly on the host without exporting tokens; run `,(0,O.jsx)(`code`,{children:`/usage`}),` in CLI to cross-check.`]}):(0,O.jsxs)(O.Fragment,{children:[`Claude Code 通过交互式终端执行`,` `,(0,O.jsx)(`code`,{children:`claude auth login`}),` 完成浏览器 OAuth 授权(凭据保存在目标主机`,` `,(0,O.jsx)(`code`,{children:`~/.claude`}),`)。SCOPE 会在目标主机本地直接查询 Claude OAuth 用量接口(不回传令牌),也可以在 CLI 中运行`,` `,(0,O.jsx)(`code`,{children:`/usage`}),` 核对。`]})}),(0,O.jsxs)(`div`,{className:`provider-auth-actions`,children:[!Te&&(0,O.jsxs)(`button`,{type:`button`,className:`primary-action`,onClick:()=>De(`Claude Code`,`claude auth login`),children:[(0,O.jsx)(Je,{size:14}),D(`打开 SSH 终端登录 / 切换`,`Open SSH terminal to sign in`)]}),(0,O.jsxs)(`button`,{type:`button`,onClick:()=>void v(`claude auth login`,`claude-login`),children:[y===`claude-login`?(0,O.jsx)(ee,{size:14}):(0,O.jsx)(ce,{size:14}),y===`claude-login`?D(`已复制命令`,`Copied`):D(`复制 claude auth login`,`Copy claude auth login`)]}),(0,O.jsxs)(`button`,{type:`button`,onClick:()=>void v(`claude auth logout`,`claude-logout`),children:[y===`claude-logout`?(0,O.jsx)(ee,{size:14}):(0,O.jsx)(ce,{size:14}),y===`claude-logout`?D(`已复制命令`,`Copied`):D(`复制退出命令`,`Copy logout command`)]})]})]})]}),pe===`antigravity`&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`current-account-card`,children:[(0,O.jsx)(`span`,{children:D(`Antigravity (AGY) 当前登录(${rE(n,te)})`,`Antigravity (AGY) Active Login (${rE(n,te)})`)}),(0,O.jsx)(`strong`,{children:ge&&!we?D(`正在读取…`,`Loading…`):we?.loggedIn?we.email||D(`已登录 Antigravity`,`Signed in to Antigravity`):we?.installed?D(`尚未登录`,`Signed out`):D(`未检测到 agy CLI`,`agy CLI not detected`)}),(0,O.jsx)(`small`,{children:[we?.authMethod||`Google OAuth`,we?.defaultModel?D(`默认模型 ${we.defaultModel}`,`Default ${we.defaultModel}`):``,we?.useG1Credits?D(`已启用 G1 Credits`,`G1 Credits enabled`):``].filter(Boolean).join(` · `)}),(Se||we?.error)&&(0,O.jsx)(`small`,{className:`account-mismatch`,children:Se||we?.error}),(0,O.jsx)($E,{quota:we?.quota||null,loading:ge,error:we?.quotaError||Se||null,compact:!0,onRefresh:()=>de(e=>e+1),emptyNote:we?.loggedIn?D(`暂未读取到 Antigravity 额度(请确认目标主机已配置代理/网络且 agy CLI 支持 /usage)`,`No Antigravity quota returned (verify network/proxy and agy /usage support).`):D(`登录 Antigravity 后可查看各模型分组的 5 小时与周剩余额度`,`Sign in to Antigravity to view per-model-group 5-hour and weekly quotas.`)})]}),(0,O.jsxs)(`div`,{className:`provider-auth-guide`,children:[(0,O.jsx)(`strong`,{children:D(`登录 / 切换 Antigravity 账号`,`Sign in / switch Antigravity account`)}),(0,O.jsx)(`p`,{children:te===`en`?(0,O.jsxs)(O.Fragment,{children:[`Launch `,(0,O.jsx)(`code`,{children:`agy`}),` interactively (or run `,(0,O.jsx)(`code`,{children:`/login`}),`) to complete Google OAuth. Credentials stay in `,(0,O.jsx)(`code`,{children:`~/.gemini/antigravity-cli/antigravity-oauth-token`}),`, and quotas are read via `,(0,O.jsx)(`code`,{children:`agy -p /usage --output-format json`}),` with zero token cost.`]}):(0,O.jsxs)(O.Fragment,{children:[`Antigravity CLI 通过交互式启动 `,(0,O.jsx)(`code`,{children:`agy`}),`(首次启动或会话内执行`,` `,(0,O.jsx)(`code`,{children:`/login`}),`)完成 Google OAuth 授权,凭据保存在目标主机`,` `,(0,O.jsx)(`code`,{children:`~/.gemini/antigravity-cli/antigravity-oauth-token`}),`。剩余额度通过目标主机官方`,` `,(0,O.jsx)(`code`,{children:`agy -p /usage --output-format json`}),`(零 Token 消耗)实时读取。`]})}),(0,O.jsxs)(`div`,{className:`provider-auth-actions`,children:[!Te&&(0,O.jsxs)(`button`,{type:`button`,className:`primary-action`,onClick:()=>De(`Antigravity`,`agy`),children:[(0,O.jsx)(Je,{size:14}),D(`打开 SSH 终端登录 / 管理 AGY`,`Open SSH terminal for AGY`)]}),(0,O.jsxs)(`button`,{type:`button`,onClick:()=>void v(`agy`,`agy-login`),children:[y===`agy-login`?(0,O.jsx)(ee,{size:14}):(0,O.jsx)(ce,{size:14}),y===`agy-login`?D(`已复制命令`,`Copied`):D(`复制启动命令 agy`,`Copy agy command`)]})]})]})]}),pe===`codex`&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`current-account-card`,children:[(0,O.jsx)(`span`,{children:D(`当前登录`,`Active login`)}),(0,O.jsx)(`strong`,{children:!l&&s?D(`正在读取…`,`Loading…`):l?.currentAccount?.email||(l?.defaultAuthPresent?D(`已登录(未读取邮箱)`,`Signed in`):D(`未登录`,`Signed out`))}),(0,O.jsxs)(`small`,{children:[l?.currentAccount?.planType&&l.currentAccount.planType!==`unknown`?l.currentAccount.planType:D(`套餐未识别`,`Unknown plan`),` `,`·`,` `,Te?D(`本机当前登录`,`Local active login`):l?.activeProfile?D(`已选配置 ${Oe?.name||l.activeProfile}`,`Active profile ${Oe?.name||l.activeProfile}`):D(`尚未保存为账号配置`,`Unsaved profile`)]}),ke&&(0,O.jsx)(`small`,{className:`account-mismatch`,children:`当前登录与已选配置不同,请核实后再切换。`}),(0,O.jsx)($E,{quota:_e?.currentQuota||null,loading:he,error:ye||_e?.error||null,compact:!0})]}),l?.automaticFailover&&(0,O.jsx)(`div`,{className:`profile-restart-card`,children:(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`strong`,{children:`账号故障自动切换`}),(0,O.jsx)(`span`,{children:l.automaticFailover.status===`checking-profiles`?`正在验证下一套 Profile 的 refresh token。`:l.automaticFailover.status===`waiting-for-turns`?`已选 ${l.automaticFailover.targetProfile||`备用账号`};为避免中断 ${l.automaticFailover.waitingForSessions.length} 条正在运行的 Turn,空闲后自动切换。`:l.automaticFailover.status===`switching`?`正在将该主机从 ${l.automaticFailover.failedProfile||`失效账号`} 切换到 ${l.automaticFailover.targetProfile||`备用账号`} 并恢复中断任务。`:l.automaticFailover.status===`completed`?`已切换到 ${l.automaticFailover.targetProfile||`备用账号`}。`:`自动切换失败:${l.automaticFailover.error||`没有可用 Profile`}`})]})}),Te?(0,O.jsxs)(`p`,{className:`account-local-note`,children:[`本机读取 `,(0,O.jsx)(`code`,{children:`~/.codex/auth.json`}),` 的当前登录与实时订阅额度; 多账号 Profile 保存、Device Auth 登录与会话自动故障切换仅适用于远端 SSH 主机。`]}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`details`,{className:`account-add-section`,children:[(0,O.jsx)(`summary`,{children:D(`添加账号`,`Add account`)}),(0,O.jsxs)(`div`,{className:`profile-create-row`,children:[(0,O.jsxs)(`label`,{children:[(0,O.jsx)(`span`,{children:D(`账号名称`,`Profile name`)}),(0,O.jsx)(`input`,{value:u,maxLength:48,placeholder:D(`例如 work / personal`,`e.g. work / personal`),onChange:e=>d(e.target.value)})]}),(0,O.jsxs)(`button`,{type:`button`,className:`secondary-action`,disabled:!u.trim()||!l?.defaultAuthPresent||p===`profile-save-current`,onClick:m,children:[p===`profile-save-current`?(0,O.jsx)(be,{size:14,className:`is-spinning`}):(0,O.jsx)(ze,{size:14}),D(`保存当前登录`,`Save active login`)]}),(0,O.jsxs)(`button`,{type:`button`,className:`primary-action`,disabled:!u.trim()||p===`profile-device-login`||!!(h&&[`starting`,`waiting`].includes(h.status)),onClick:g,children:[p===`profile-device-login`?(0,O.jsx)(be,{size:14,className:`is-spinning`}):(0,O.jsx)(ve,{size:14}),D(`登录其他账号`,`Sign in another`)]})]})]}),(0,O.jsx)(tD,{deviceLoginJob:h,busyAction:p,closeDeviceLogin:_,copy:v,copied:y}),(0,O.jsx)(eD,{accountProfiles:l,accountProfilesLoading:s,busyAction:p,activateAuthProfile:b,deleteAuthProfile:x,profileQuotas:_e?.profileQuotas,quotasLoading:he}),(l?.runningSessions||0)>0&&(0,O.jsxs)(`details`,{className:`account-recovery-section`,children:[(0,O.jsx)(`summary`,{children:D(`会话恢复 · ${l?.runningSessions} 个会话`,`Session recovery · ${l?.runningSessions} sessions`)}),(0,O.jsxs)(`div`,{className:`profile-restart-card`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`strong`,{children:`切换账号后恢复会话`}),(0,O.jsxs)(`span`,{children:[`只处理 `,n,` 上可精确关联 rollout 的`,` `,l?.runningSessions,` 个 Codex Session;按主机串行恢复, 不主动终止训练/评测进程。`]})]}),(0,O.jsxs)(`button`,{type:`button`,className:`danger-secondary-action`,disabled:p===`profile-restart-host`,onClick:S,children:[p===`profile-restart-host`?(0,O.jsx)(be,{size:14,className:`is-spinning`}):(0,O.jsx)(Fe,{size:14}),`重启该主机 Codex`]}),C&&(0,O.jsxs)(`div`,{className:`auth-restart-report`,children:[(0,O.jsxs)(`small`,{children:[C.status,` · `,C.completed,`/`,C.total,` · 成功`,` `,C.results.filter(e=>e.ok).length,` `,`· 失败`,` `,C.results.filter(e=>!e.ok).length]}),C.results.some(e=>!e.ok)&&(0,O.jsx)(`div`,{className:`auth-restart-failures`,children:C.results.filter(e=>!e.ok).slice(0,12).map(e=>(0,O.jsxs)(`span`,{title:e.error,children:[(0,O.jsx)(`code`,{children:e.sessionId.slice(0,8)}),e.error||`恢复失败`]},e.sessionId))})]})]})]})]})]})]})]})})}function aD({client:e,archives:t,records:n,host:r,onTasks:i,nativeArchives:a=[],nativeBusy:o=!1,onNativeChange:s}){let{locale:c,tr:l}=fc(),u=(e.state?.tasks||[]).filter(e=>e.kind!==`manager`&&(r===`all`||e.host===r)),d=u.filter(e=>e.archivedAt),f=n.filter(e=>e.phase!==`restored`&&(r===`all`||e.host===r)),p=f.length+d.length+a.length,m=(t,n)=>void e.mutate(`task-action`,{id:t,action:n}).catch(()=>{});return(0,O.jsxs)(`section`,{className:`archive-sidebar`,"aria-label":l(`任务与归档`,`Tasks & Archive`),children:[(t.error||e.error)&&(0,O.jsx)(`p`,{className:`archive-error`,role:`alert`,children:t.error||e.error}),u.some(e=>!e.archivedAt)&&(0,O.jsxs)(`details`,{open:!0,children:[(0,O.jsx)(`summary`,{children:l(`任务`,`Tasks`)}),u.filter(e=>!e.archivedAt).slice(-10).reverse().map(t=>(0,O.jsxs)(`div`,{className:`sidebar-history-row`,children:[(0,O.jsx)(EE,{provider:t.provider}),(0,O.jsxs)(`button`,{type:`button`,className:`sidebar-history-title`,title:t.prompt,onClick:i,children:[(0,O.jsx)(`span`,{children:t.prompt}),(0,O.jsxs)(`small`,{children:[c===`en`?bE[t.status]||t.status:yE[t.status],` · `,t.host]})]}),(0,O.jsx)(`button`,{type:`button`,className:`sidebar-archive-action`,"aria-label":`${l(`归档任务`,`Archive task`)} ${t.prompt}`,title:t.status===`queued`?l(`取消排队并归档`,`Cancel & archive`):l(`归档任务`,`Archive task`),disabled:e.busy||![`queued`,`completed`,`failed`,`cancelled`,`released`].includes(t.status),onClick:()=>m(t.id,`archive`),children:(0,O.jsx)(v,{size:14})})]},t.id))]}),(0,O.jsxs)(`details`,{children:[(0,O.jsxs)(`summary`,{children:[(0,O.jsx)(v,{size:14}),` `,l(`已归档`,`Archived`),` `,(0,O.jsx)(`span`,{children:p})]}),p===0&&(0,O.jsx)(`p`,{className:`archive-empty`,children:l(`归档的会话与任务会保留在这里。`,`Archived sessions and tasks stay here for restoration.`)}),f.map(e=>(0,O.jsxs)(`div`,{className:`sidebar-history-row`,children:[(0,O.jsx)(EE,{provider:`codex`}),(0,O.jsxs)(`div`,{className:`sidebar-history-title`,title:e.error||e.title,children:[(0,O.jsx)(`span`,{children:e.title}),(0,O.jsxs)(`small`,{children:[e.host,e.phase===`archived`?``:l(` · 待核实,可重试`,` · pending, retry`)]})]}),(0,O.jsx)(`button`,{type:`button`,className:`sidebar-archive-action`,disabled:!!t.busy,"aria-label":`${e.phase===`archiving`?l(`重试归档`,`Retry archive`):l(`恢复会话`,`Restore session`)} ${e.title}`,onClick:()=>void t.change(e.host,e.sessionId,e.phase===`archiving`?`archive`:`restore`),children:e.phase===`archiving`?(0,O.jsx)(Re,{size:14}):(0,O.jsx)(_,{size:14})})]},`${e.host}:${e.sessionId}`)),a.map(e=>(0,O.jsxs)(`div`,{className:`sidebar-history-row`,children:[(0,O.jsx)(EE,{provider:e.provider}),(0,O.jsxs)(`div`,{className:`sidebar-history-title`,children:[(0,O.jsx)(`span`,{title:e.title,children:e.title}),(0,O.jsxs)(`small`,{children:[e.phase===`deleted`?l(`回收站`,`Trash`):l(`已归档`,`Archived`),` · `,e.host]})]}),s&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`button`,{type:`button`,className:`sidebar-archive-action`,disabled:o,"aria-label":`${l(`恢复`,`Restore`)} ${e.title}`,onClick:()=>void s(e.key,`restore`),children:(0,O.jsx)(_,{size:14})}),e.phase!==`deleted`&&(0,O.jsx)(`button`,{type:`button`,className:`sidebar-archive-action`,disabled:o,"aria-label":`${l(`移入回收站`,`Move to trash`)} ${e.title}`,onClick:()=>void s(e.key,`delete`),children:(0,O.jsx)(Qe,{size:14})})]})]},e.key)),d.map(t=>(0,O.jsxs)(`div`,{className:`sidebar-history-row`,children:[(0,O.jsx)(EE,{provider:t.provider}),(0,O.jsxs)(`div`,{className:`sidebar-history-title`,title:t.prompt,children:[(0,O.jsx)(`span`,{children:t.prompt}),(0,O.jsxs)(`small`,{children:[l(`任务`,`Task`),` · `,t.host]})]}),(0,O.jsx)(`button`,{type:`button`,className:`sidebar-archive-action`,disabled:e.busy,"aria-label":`${l(`恢复任务`,`Restore task`)} ${t.prompt}`,onClick:()=>m(t.id,`restore`),children:(0,O.jsx)(_,{size:14})})]},t.id))]})]})}function oD({status:e,historical:t}){let n=t?`history`:e,r=n===`working`?`执行中`:n===`attention`?`需要处理`:n===`history`?`历史会话`:`空闲`;return(0,O.jsx)(`span`,{className:`project-session-status`,"data-state":n,role:`img`,"aria-label":r,title:r,children:n===`working`?(0,O.jsx)(be,{size:12}):n===`attention`?(0,O.jsx)(ne,{size:12}):(0,O.jsx)(`span`,{})})}function sD(e){if(e==null||e===``)return 0;let t=Number(e),n=Number.isFinite(t)?t<1e11?t*1e3:t:Date.parse(e);return Number.isFinite(n)&&n>0?n:0}function cD(e){return e.map(e=>({...e,sessions:[...e.sessions].sort((e,t)=>(t.lastActivityAt||0)-(e.lastActivityAt||0))})).sort((e,t)=>Number(t.pinned)-Number(e.pinned)||(t.sessions[0]?.lastActivityAt||0)-(e.sessions[0]?.lastActivityAt||0)||e.key.localeCompare(t.key))}function lD(e,t=Date.now(),n=`zh-CN`){let r=n===`en`;if(!e)return r?`Unknown`:`时间未知`;let i=Math.max(0,Math.floor((t-e)/6e4));return i<1?r?`just now`:`刚刚`:i<60?r?`${i}m ago`:`${i}分钟前`:i<1440?r?`${Math.floor(i/60)}h ago`:`${Math.floor(i/60)}小时前`:i<10080?r?`${Math.floor(i/1440)}d ago`:`${Math.floor(i/1440)}天前`:new Date(e).toLocaleDateString(r?`en-US`:`zh-CN`,{month:`short`,day:`numeric`})}var uD={order:`recent`,category:`all`,provider:`all`,status:`all`},dD={order:{recent:`最近活动`,oldest:`最早活动`},category:{all:`全部任务`,research:`研究`,training:`训练`,evaluation:`评测`,engineering:`工程`,other:`未分类`},provider:{all:`全部 Agent`,codex:`Codex`,claude:`Claude`,antigravity:`Antigravity`},status:{all:`全部状态`,working:`执行中`,attention:`需要处理`,idle:`空闲 / 已结束`}};function fD(e){return Object.fromEntries(Object.entries(uD).map(([t,n])=>[t,Object.hasOwn(dD[t],e?.[t])?e[t]:n]))}function pD(e,t,n=``){let r=n.trim().toLocaleLowerCase(),i=(e,n)=>{let r=e.lastActivityAt||0,i=n.lastActivityAt||0;return!r||!i?Number(!r)-Number(!i):t.order===`oldest`?r-i:i-r},a=t.category!==`all`||t.provider!==`all`||t.status!==`all`;return e.flatMap(e=>{let n=e.sessions.filter(n=>(!r||[e.name,e.host,e.cwd,n.title].join(` `).toLocaleLowerCase().includes(r))&&(t.category===`all`||(n.category||`other`)===t.category)&&(t.provider===`all`||(n.provider||`codex`)===t.provider)&&(t.status===`all`||n.status===t.status)).sort(i);return n.length||!a&&!r&&!e.sessions.length?[{...e,sessions:n}]:[]}).sort((e,t)=>Number(t.pinned)-Number(e.pinned)||i(e.sessions[0]||{},t.sessions[0]||{})||e.key.localeCompare(t.key))}var mD={order:{recent:`Recent`,oldest:`Oldest`},category:{all:`All tasks`,research:`Research`,training:`Training`,evaluation:`Eval`,engineering:`Engineering`,other:`Uncategorized`},provider:{all:`All agents`,codex:`Codex`,claude:`Claude`,antigravity:`Antigravity`},status:{all:`All statuses`,working:`Running`,attention:`Attention`,idle:`Idle / Done`}},hD=`scope.project-filters.v1`,gD=`scope:project-filters`,_D=e=>(window.addEventListener(`storage`,e),window.addEventListener(gD,e),()=>{window.removeEventListener(`storage`,e),window.removeEventListener(gD,e)}),vD=null,yD=()=>{try{return localStorage.getItem(hD)??vD}catch{return vD}};function bD(){let e=(0,f.useSyncExternalStore)(_D,yD,()=>null),t=uD;try{t=fD(JSON.parse(e||`null`))}catch{}function n(e){vD=JSON.stringify(fD(e));try{localStorage.setItem(hD,vD)}catch{}window.dispatchEvent(new Event(gD))}return[t,n]}function xD({value:e,onChange:t}){let{locale:n,tr:r}=fc(),[i,a]=(0,f.useState)(!1),o=Object.keys(e).some(t=>e[t]!==uD[t]);function s(r,i){return(0,O.jsx)(fE,{label:i,value:e[r],compact:!0,onChange:n=>t({...e,[r]:n}),options:Object.entries(dD[r]).map(([e,t])=>({value:e,label:n===`en`&&mD[r]?.[e]||t}))})}return(0,O.jsxs)(`div`,{className:`project-filter-bar`,children:[(0,O.jsxs)(`div`,{children:[s(`order`,r(`会话时间排序`,`Sort by activity`)),s(`category`,r(`任务类型`,`Category`)),(0,O.jsx)(`button`,{type:`button`,className:e.provider!==`all`||e.status!==`all`?`active`:``,"aria-label":r(`更多会话筛选`,`More filters`),"aria-expanded":i,onClick:()=>a(!i),children:(0,O.jsx)(Ke,{size:13})})]}),i&&(0,O.jsxs)(`div`,{children:[s(`provider`,r(`Agent 类型`,`Agent`)),s(`status`,r(`会话状态`,`Status`))]}),o&&(0,O.jsxs)(`button`,{type:`button`,className:`project-filter-reset`,onClick:()=>t({...uD}),children:[(0,O.jsx)(Le,{size:11}),r(`重置筛选`,`Reset`)]})]})}function SD({projects:e,selectedKey:t,selectedSessionId:n,busyKey:r,onSelect:i,onTogglePin:a,onSelectSession:o,onNewTask:s,onHistory:c,hostFilter:l,hosts:u,onHostChange:d,onArchive:p,archiveBusy:m,onRescan:h,scanning:g=!1}){let{locale:_,tr:y}=fc(),[b,x]=(0,f.useState)(``),[S,C]=bD(),[w,T]=(0,f.useState)({}),[E,ee]=(0,f.useState)({}),[D,ne]=(0,f.useState)(!1),re=b.trim().toLocaleLowerCase(),ie=pD(e,S,b),ae=t||ie.find(e=>!!(n&&e.sessions.some(e=>e.id===n)))?.key||ie.find(e=>e.sessions.some(e=>e.status===`working`&&!e.historical))?.key||ie[0]?.key||null,oe=u.filter(e=>e.reachable),se=u.filter(e=>!e.reachable),ce=D?se:se.filter(e=>e.alias===l),le=se.length-ce.length,ue=[...oe,...ce];return(0,O.jsxs)(`section`,{className:`project-nav`,"aria-label":y(`项目导航`,`Projects`),children:[(0,O.jsxs)(`div`,{className:`sidebar-host-pills`,role:`group`,"aria-label":y(`按主机筛选`,`Filter by host`),children:[(0,O.jsxs)(`button`,{type:`button`,className:`sidebar-host-pill ${l===`all`?`active`:``}`,onClick:()=>d(`all`),children:[(0,O.jsx)(`span`,{children:y(`全部`,`All`)}),(0,O.jsxs)(`small`,{children:[oe.length,`/`,u.length]})]}),ue.map(e=>{let t=l===e.alias;return(0,O.jsxs)(`button`,{type:`button`,className:`sidebar-host-pill ${t?`active`:``}`,title:`${rE(e.alias,_)} · ${e.reachable?y(`在线`,`Online`):y(`离线`,`Offline`)}`,onClick:()=>d(t?`all`:e.alias),children:[(0,O.jsx)(`span`,{className:`dot ${e.reachable?`online`:``}`}),(0,O.jsx)(`span`,{children:rE(e.alias,_)})]},e.alias)}),se.length>0&&(D||le>0)&&(0,O.jsx)(`button`,{type:`button`,className:`sidebar-host-pill offline-toggle`,"aria-expanded":D,onClick:()=>ne(e=>!e),title:D?y(`收起离线主机`,`Collapse offline hosts`):y(`展开离线主机`,`Show offline hosts`),children:D?y(`收起离线`,`Hide offline`):`+${le} ${y(`离线`,`offline`)}`})]}),(0,O.jsxs)(`div`,{className:`project-search-row`,children:[(0,O.jsxs)(`label`,{className:`project-search`,children:[(0,O.jsx)(Be,{size:14}),(0,O.jsx)(`input`,{"aria-label":y(`搜索项目和会话`,`Search projects & sessions`),placeholder:y(`搜索会话…`,`Search sessions…`),value:b,onChange:e=>x(e.target.value)})]}),h&&(0,O.jsx)(`button`,{type:`button`,className:`project-rescan-btn`,disabled:g,"aria-label":y(`重新扫描会话目录`,`Rescan session catalog`),title:y(`重新扫描 Codex / Claude / AGY 会话`,`Rescan Codex / Claude / AGY sessions`),onClick:h,children:(0,O.jsx)(Fe,{size:13,className:g?`is-spinning`:``})})]}),(0,O.jsx)(xD,{value:S,onChange:C}),(0,O.jsxs)(`div`,{className:`project-nav-list`,children:[!ie.length&&(0,O.jsx)(`p`,{className:`project-nav-empty`,children:re||S.category!==`all`||S.provider!==`all`||S.status!==`all`?`没有找到匹配的会话`:l===`all`?`还没有项目`:`这台设备还没有项目`}),ie.map(e=>{let l=e.key===t,u=!!(n&&e.sessions.some(e=>e.id===n)),d=e.name||e.cwd.split(`/`).filter(Boolean).pop()||`/`,f=l||u||e.key===ae,h=!!re||(w[e.key]??f),g=e.sessions;return(0,O.jsxs)(`div`,{className:`project-nav-entry`,children:[(0,O.jsxs)(`div`,{className:`project-nav-row ${l||u?`selected`:``}`,children:[(0,O.jsx)(`button`,{type:`button`,className:`project-disclosure`,"aria-label":`${h?`收起`:`展开`}项目 ${d}`,"aria-expanded":!!h,onClick:()=>T(t=>({...t,[e.key]:!h})),children:(0,O.jsx)(te,{size:13})}),(0,O.jsxs)(`button`,{type:`button`,className:`project-nav-select`,onClick:()=>{T(t=>({...t,[e.key]:!0})),i(e)},title:`${rE(e.host)} · ${e.cwd}`,children:[(0,O.jsx)(me,{size:15}),(0,O.jsx)(`span`,{children:(0,O.jsx)(`strong`,{children:d})}),g.length>0&&(0,O.jsx)(`small`,{className:`project-nav-count`,children:g.length})]}),(0,O.jsx)(`button`,{type:`button`,className:`project-nav-icon`,onClick:()=>s(e),"aria-label":`在 ${d} 新建会话`,title:`在 ${d} 新建会话`,children:(0,O.jsx)(Pe,{size:14})}),(0,O.jsx)(`button`,{type:`button`,className:`project-nav-icon project-pin`,disabled:r===e.key,onClick:()=>a(e),"aria-label":`${e.pinned?`取消固定`:`固定`}项目 ${d}`,title:e.pinned?`取消固定`:`固定项目`,children:e.pinned?(0,O.jsx)(Me,{size:12}):(0,O.jsx)(je,{size:12})})]}),h&&(0,O.jsxs)(`div`,{className:`project-nav-details`,children:[g.slice(0,E[e.key]||8).map(t=>(0,O.jsxs)(`div`,{className:`project-session-row`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`project-nav-session ${t.id===n?`selected`:``}`,onClick:()=>o(e,t),title:`${t.title}\n${t.externalTerminal?`外部终端 · 持续监控
550
+ `:``}${t.lastActivityAt?`最近活动:${new Date(t.lastActivityAt).toLocaleString(`zh-CN`)}`:`尚未取得活动时间`}`,"aria-current":t.id===n?`page`:void 0,children:[(0,O.jsx)(EE,{provider:t.provider}),(0,O.jsx)(oD,{status:t.status,historical:t.historical}),(0,O.jsx)(`span`,{className:`project-session-title`,children:t.title}),t.externalTerminal&&(0,O.jsx)(`small`,{className:`project-session-source`,title:`外部终端 · 持续监控`,children:`终端`}),t.reserved&&(0,O.jsx)(`small`,{className:`project-session-source is-reserved`,title:y(`常驻保留资源`,`Reserved session`),children:y(`保留`,`Pin`)}),(t.activeSubagents||0)>0&&(0,O.jsxs)(`small`,{className:`project-session-source is-subagent`,title:y(`后台子代理正在工作`,`Background subagents working`),children:[t.activeSubagents,` `,y(`子代理`,`sub`)]}),(0,O.jsx)(`time`,{className:`project-session-time`,dateTime:t.lastActivityAt?new Date(t.lastActivityAt).toISOString():void 0,children:lD(t.lastActivityAt,void 0,_)})]},t.id),(!t.provider||t.provider===`codex`||t.provider===`claude`||t.provider===`antigravity`)&&(0,O.jsx)(`button`,{type:`button`,className:`sidebar-archive-action`,"aria-label":`归档会话 ${t.title}`,title:[`claude`,`antigravity`].includes(t.provider||``)?`归档到 SCOPE,保留原生历史`:`归档会话及其子会话,可在已归档中恢复`,disabled:m||!t.sessionId||t.status===`working`,onClick:()=>p(e,t),children:(0,O.jsx)(v,{size:14})})]},t.id)),g.length>(E[e.key]||8)&&(0,O.jsxs)(`button`,{type:`button`,className:`project-history-link`,onClick:()=>ee(t=>({...t,[e.key]:(t[e.key]||8)+20})),children:[y(`显示更多会话`,`Show more`),` (+`,g.length-(E[e.key]||8),`)`]}),l&&(0,O.jsx)(`button`,{type:`button`,className:`project-history-link`,onClick:()=>c(e),children:y(`加载历史会话`,`Load history`)}),!g.length&&(0,O.jsx)(`p`,{children:y(`还没有会话`,`No sessions yet`)})]})]},e.key)})]})]})}function CD({archives:e,sessionCatalog:t,workbench:n,section:r,onNavigate:i,hostSidebarCollapsed:a,mobileHostsOpen:o,snapshot:s,toggleHostSidebar:c,setMobileHostsOpen:l,projects:u,selectedProjectKey:d,selectedAgentId:f,projectBusyKey:p,chooseProject:m,toggleProjectPin:h,selectProjectSession:g,openNewTask:_,loadHistoryCache:v,projectHost:y,chooseHost:b}){let{tr:x}=fc();return(0,O.jsxs)(`aside`,{className:`host-sidebar ${a?`collapsed`:``} ${o?`mobile-open`:``}`,children:[(0,O.jsxs)(`div`,{className:`host-sidebar-head`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:x(`工作区`,`Workspace`)}),(0,O.jsxs)(`strong`,{children:[s.summary.online,` / `,s.summary.hosts]})]}),(0,O.jsx)(`button`,{type:`button`,className:`host-sidebar-collapse`,"aria-label":a?`展开 SSH 主机栏`:`折叠 SSH 主机栏`,title:a?`展开 SSH 主机栏`:`折叠 SSH 主机栏`,onClick:c,children:(0,O.jsx)(Oe,{size:17})}),(0,O.jsx)(`button`,{className:`close-hosts`,"aria-label":`关闭主机列表`,onClick:()=>l(!1),children:(0,O.jsx)(it,{size:17})})]}),(0,O.jsx)(`nav`,{className:`workspace-primary-nav`,"aria-label":x(`工作台导航`,`Workspace navigation`),children:[{id:`projects`,label:x(`项目会话`,`Sessions`),icon:we},{id:`manager`,label:x(`总调度`,`Coordinator`),icon:w},{id:`resources`,label:x(`资源与任务`,`Resources`),icon:le},{id:`settings`,label:x(`设置`,`Settings`),icon:Ue}].map(e=>(0,O.jsxs)(`button`,{title:e.label,className:r===e.id?`active`:``,"aria-current":r===e.id?`page`:void 0,onClick:()=>i(e.id),children:[(0,O.jsx)(e.icon,{size:17}),(0,O.jsx)(`span`,{children:e.label})]},e.id))}),(0,O.jsx)(SD,{projects:u.filter(e=>y===`all`||e.host===y),hostFilter:y,hosts:s.hosts,onHostChange:b,selectedKey:d,selectedSessionId:f,busyKey:p,onSelect:e=>m(e),onTogglePin:e=>void h(e),onSelectSession:g,archiveBusy:!!e.busy||!!t?.archiveBusy,onArchive:(n,r)=>[`claude`,`antigravity`].includes(r.provider||``)?void t?.archiveNative(r.id,`archive`):void e.change(n.host,r.sessionId,`archive`),onNewTask:e=>{m(e),_(e)},onHistory:e=>{m(e,`history`),v(void 0,e.host)},scanning:!!t?.scanning,onRescan:t?()=>void t.scan().catch(()=>{}):void 0}),(0,O.jsx)(aD,{client:n,archives:e,host:y,records:Object.values(s.management.sessions).flatMap(e=>e.archive?[e.archive]:[]),nativeArchives:t?.nativeArchives.filter(e=>y===`all`||e.host===y)||[],nativeBusy:!!t?.archiveBusy,onNativeChange:t?.archiveNative,onTasks:()=>i(`resources`)})]})}function wD({workspace:e}){let[t,n]=(0,f.useState)(``),[r,i]=(0,f.useState)(!1),[a,o]=(0,f.useState)(``),s=(0,f.useRef)(null);(0,f.useEffect)(()=>()=>s.current?.abort(),[]);let c=e.newTaskDirectoryBrowser;async function l(t){s.current?.abort();let n=new AbortController;s.current=n,e.setNewTaskDirectoryBrowser(e=>({...e,open:!0,loading:!0,error:``}));try{let r=await fetch(TT(`/api/remote/directories?host=${encodeURIComponent(u)}&path=${encodeURIComponent(t)}`),{signal:n.signal,cache:`no-store`}),i=await r.json();if(!r.ok)throw Error(i.error||`读取目录失败`);n.signal.aborted||e.setNewTaskDirectoryBrowser({open:!0,loading:!1,error:``,listing:i})}catch(t){n.signal.aborted||e.setNewTaskDirectoryBrowser(e=>({...e,loading:!1,error:t.message}))}}let u=e.newTaskDraft.host;async function d(){let a=c.listing?.cwd;if(!a||!t.trim()||r)return;s.current?.abort();let l=new AbortController;s.current=l,i(!0),o(``);try{let r=await fetch(TT(`/api/remote/directories`),{signal:l.signal,method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({host:u,parent:a,name:t.trim()})}),i=await r.json();if(!r.ok)throw Error(i.error||`创建目录失败`);l.signal.aborted||(e.chooseNewTaskDirectory(i.cwd),n(``))}catch(e){l.signal.aborted||o(e.message)}finally{l.signal.aborted||i(!1)}}return(0,O.jsxs)(`div`,{className:`new-conversation-directory`,children:[(0,O.jsx)(`label`,{htmlFor:`conversation-cwd`,children:`工作目录`}),(0,O.jsxs)(`div`,{className:`directory-input-row`,children:[(0,O.jsx)(`input`,{id:`conversation-cwd`,required:!0,placeholder:`/workspace/my-project`,value:e.newTaskDraft.cwd,onChange:t=>e.setNewTaskDraft(e=>({...e,cwd:t.target.value}))}),(0,O.jsxs)(`button`,{type:`button`,disabled:!u||r,onClick:()=>void l(e.newTaskDraft.cwd||``),children:[(0,O.jsx)(me,{size:15}),`选择目录`]})]}),c.open&&(0,O.jsxs)(`section`,{className:`directory-picker`,"aria-label":`选择工作目录`,children:[(0,O.jsxs)(`header`,{children:[(0,O.jsx)(`span`,{title:c.listing?.cwd,children:c.listing?.cwd||e.newTaskDraft.cwd||`/`}),(0,O.jsx)(`button`,{type:`button`,"aria-label":`关闭目录选择`,disabled:r,onClick:()=>{s.current?.abort(),e.setNewTaskDirectoryBrowser(e=>({...e,open:!1,loading:!1}))},children:(0,O.jsx)(it,{size:15})})]}),c.loading?(0,O.jsxs)(`p`,{children:[(0,O.jsx)(be,{size:15,className:`is-spinning`}),`正在读取…`]}):c.error?(0,O.jsx)(`p`,{role:`alert`,children:c.error}):c.listing&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`directory-picker-actions`,children:[(0,O.jsxs)(`button`,{type:`button`,disabled:!c.listing.parent||r,onClick:()=>void l(c.listing.parent),children:[(0,O.jsx)(S,{size:14}),`上一级`]}),(0,O.jsxs)(`button`,{type:`button`,disabled:r,onClick:()=>e.chooseNewTaskDirectory(c.listing.cwd),children:[(0,O.jsx)(ee,{size:14}),`使用此目录`]})]}),(0,O.jsxs)(`div`,{className:`directory-picker-list`,children:[c.listing.directories.map(e=>(0,O.jsxs)(`button`,{type:`button`,disabled:r,onClick:()=>void l(e.path),children:[(0,O.jsx)(me,{size:14}),e.name]},e.path)),!c.listing.directories.length&&(0,O.jsx)(`p`,{children:`没有子目录`})]}),c.listing.truncated&&(0,O.jsx)(`small`,{children:`目录较多,可输入完整路径定位。`}),(0,O.jsxs)(`div`,{className:`directory-create`,children:[(0,O.jsx)(`input`,{"aria-label":`新目录名称`,placeholder:`新建文件夹名称`,value:t,disabled:r,onChange:e=>n(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.nativeEvent.isComposing&&(e.preventDefault(),d())}}),(0,O.jsxs)(`button`,{type:`button`,disabled:!t.trim()||r,onClick:()=>void d(),children:[r?(0,O.jsx)(be,{size:14,className:`is-spinning`}):(0,O.jsx)(pe,{size:14}),`新建并使用`]})]}),(0,O.jsx)(`small`,{children:`仅创建文件夹,不初始化仓库或启动 Agent。`})]}),a&&(0,O.jsx)(`p`,{role:`alert`,children:a})]})]})}function TD({workspace:e}){let[t,n]=(0,f.useState)(null),{host:r,model:i,effort:a,yolo:o}=e.newTaskDraft,[s,c]=(0,f.useState)(0);(0,f.useEffect)(()=>{if(!r)return;let e=new AbortController;return fetch(TT(`/api/models?host=${encodeURIComponent(r)}`),{signal:e.signal}).then(async e=>{let t=await e.json();if(!e.ok)throw Error(t.error||`无法读取模型`);n({host:r,models:t.models||[],error:``})}).catch(t=>{e.signal.aborted||n({host:r,models:[],error:t.message})}),()=>e.abort()},[r,s]);let l=t?.host===r?t.models:[],u=l.find(e=>e.id===i),d={low:`低`,medium:`中`,high:`高`,xhigh:`极高`,max:`最高`};return(0,O.jsxs)(`div`,{className:`new-session-settings`,children:[(0,O.jsxs)(`div`,{className:`new-conversation-grid`,children:[(0,O.jsx)(fE,{label:`模型`,fieldLabel:`模型`,searchable:!0,searchPlaceholder:`搜索模型…`,value:i,options:[{value:``,label:`主机默认`},...l.map(e=>({value:e.id,label:e.displayName||e.id}))],onChange:t=>{let n=l.find(e=>e.id===t);e.setNewTaskDraft(e=>({...e,model:t,effort:n?.defaultReasoningEffort||``}))}}),(0,O.jsx)(fE,{label:`推理强度`,fieldLabel:`推理强度`,value:a,disabled:!u?.supportedReasoningEfforts.length,options:[{value:``,label:`默认`},...(u?.supportedReasoningEfforts||[]).map(e=>({value:e,label:d[e]||e}))],onChange:t=>e.setNewTaskDraft(e=>({...e,effort:t}))})]}),t?.host===r&&t.error&&(0,O.jsxs)(`p`,{className:`form-error`,role:`alert`,children:[(0,O.jsx)(`span`,{children:t.error}),(0,O.jsx)(`button`,{type:`button`,onClick:()=>c(e=>e+1),children:`重试`})]}),(0,O.jsx)(fE,{label:`权限`,fieldLabel:`权限`,value:o?`full`:`workspace`,options:[{value:`workspace`,label:`工作区权限`,description:`越界操作按需审批`},{value:`full`,label:`完全访问`,description:`不请求工具审批`}],onChange:t=>e.setNewTaskDraft(e=>({...e,yolo:t===`full`}))})]})}async function ED(e,t){let n=await fetch(TT(e),t===void 0?{}:{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t)}),r=await n.json();if(!n.ok)throw Error(r.error||`请求失败`);return r}function DD(e){let[t,n]=(0,f.useState)([]),[r,i]=(0,f.useState)([]),[a,o]=(0,f.useState)([]),[s,c]=(0,f.useState)(!1),[l,u]=(0,f.useState)(``),[d,p]=(0,f.useState)(!1),[m,h]=(0,f.useState)(!1),[g,_]=(0,f.useState)(null),v=(0,f.useRef)(``),y=(0,f.useCallback)(async e=>{try{let[t,r]=await Promise.all([fetch(TT(`/api/session-catalog`),{signal:e,headers:v.current?{"If-None-Match":v.current}:{}}),fetch(TT(`/api/cli-conversations`),{signal:e})]);if(t.status!==304){let e=await t.json();if(!t.ok)throw Error(e.error||`无法扫描会话`);v.current=t.headers.get(`etag`)||``,n(e.entries),o(e.scans),c(e.scanning)}if(!r.ok)throw Error(`无法读取网页会话`);i((await r.json()).entries),u(``),p(!0)}catch(t){e?.aborted||u(t.message)}},[]);(0,f.useEffect)(()=>{let e=new AbortController;y(e.signal);let t=setInterval(()=>{document.hidden||y(e.signal)},s?2500:1e4);return()=>{e.abort(),clearInterval(t)}},[y,s]);let b=(0,f.useMemo)(()=>{let e=new Set(r.filter(e=>e.sessionId).map(e=>JSON.stringify([e.host,e.provider,e.sessionId])));return[...r.map(e=>{let n=t.find(t=>t.host===e.host&&t.provider===e.provider&&t.sessionId===e.sessionId),r=Math.max(e.activeSubagents||0,n?.activeSubagents||0);return{...e,historyVersion:n?.historyVersion,phase:n?.phase||e.phase,activeSubagents:r}}),...t.filter(t=>!e.has(t.key)&&!r.some(e=>e.key===t.key))]},[t,r]),x=e.selectedAgent?.historical?e.selectedAgent:null,S=x&&t.find(e=>e.provider===`codex`&&e.host===x.host&&e.sessionId===x.rollout?.id),C=S?sD(S.updatedAt):0,w=x?.id,T=e.setHistoryState;(0,f.useEffect)(()=>{!w||!C||T(e=>{let t=e.sessions.find(e=>e.id===w);return!t?.rollout||(t.rollout.mtimeMs||0)>=C?e:{...e,sessions:e.sessions.map(e=>e.id===w?{...e,lastActivityAt:C,rollout:{...e.rollout,mtimeMs:C,lastEventAt:``}}:e)}})},[w,C,T]);let E=(0,f.useMemo)(()=>{let t=e.projects.map(e=>({...e,sessions:e.sessions.map(e=>({...e}))})),n=new Map(t.flatMap(e=>e.sessions.filter(e=>e.sessionId).map(t=>[JSON.stringify([e.host,t.sessionId]),t])));for(let r of b){if([`archived`,`deleted`].includes(r.phase||``)||r.provider===`codex`&&e.snapshot.management.sessions[`${r.host}:${r.sessionId}`]?.archive)continue;let i=r.provider===`codex`?n.get(JSON.stringify([r.host,r.sessionId])):void 0;if(i){i.lastActivityAt=Math.max(i.lastActivityAt||0,sD(r.updatedAt));continue}let a=aE(r.host,r.cwd)?.key||JSON.stringify([r.host,r.cwd]),o=t.find(e=>e.key===a);o||(o={key:a,host:r.host,cwd:r.cwd,name:r.cwd?r.cwd.split(/[\\/]/).filter(Boolean).at(-1)||r.cwd:`未记录目录`,pinned:!1,sessions:[]},t.push(o));let s=e.snapshot.management.sessions[`${r.host}:${r.sessionId}`],c=r.activeSubagents||0,l=[`running`,`launching`,`stopping`,`finishing`].includes(r.status||``)?`working`:[`failed`,`unknown`,`needs_permission`,`waiting_permission`].includes(r.status||``)?`attention`:`idle`;o.sessions.push({id:r.key,sessionId:r.sessionId||``,title:r.title,category:s?.summary?.category||`other`,status:c>0&&l===`idle`?`working`:l,historical:!r.managed,provider:r.provider,catalog:!0,lastActivityAt:sD(r.updatedAt),reserved:!!s?.reserved,activeSubagents:c})}return cD(t)},[e.projects,e.snapshot.management.sessions,b]);async function ee(t,n=()=>!0){let r=b.find(e=>e.key===t);if(!r)return _(null),!1;if(r.provider!==`codex`)return e.setHostFilter(r.host),e.setCwdFilter(r.cwd||`all`),_(r),e.setSelectedAgentId(null),!0;try{let{agent:i}=await ED(`/api/session-catalog/select`,{key:t});if(!n())return!1;e.setHistoryState(e=>({...e,sessions:[...e.sessions.filter(e=>e.id!==i.id),i]})),e.setHostFilter(r.host),e.setCwdFilter(r.cwd||`all`),e.setViewMode(i.historical?`history`:`agents`),e.setQuery(``),e.setStatusFilter(`all`),e.setCategoryFilter(`all`),e.setSelectedAgentId(i.id),_(null)}catch(t){return n()&&e.setActionNotice({kind:`error`,text:t.message}),!1}return!0}async function te(){await ED(`/api/session-catalog/scan`,{}),await y()}function D(t){e.setHostFilter(t.host),e.setCwdFilter(t.cwd||`all`),i(e=>[...e.filter(e=>e.key!==t.key),{...t,managed:!0}]),_({...t,managed:!0}),e.setSelectedAgentId(null),y()}let ne=g?b.find(e=>e.key===g.key)||g:null;async function re(t,n){h(!0);try{await ED(`/api/cli-conversations/state`,{key:t,action:n}),g?.key===t&&_(null),v.current=``,await y()}catch(t){e.setActionNotice({kind:`error`,text:t.message})}finally{h(!1)}}return{projects:E,loaded:d,selected:ne,select:ee,clear:()=>_(null),created:D,scans:a,scanning:s,error:l,scan:te,refresh:y,archiveNative:re,archiveBusy:m,nativeArchives:b.filter(e=>[`claude`,`antigravity`].includes(e.provider)&&[`archived`,`deleted`].includes(e.phase||``))}}function OD({label:e,effort:t,disabled:n,children:r}){let[i,a]=(0,f.useState)(!1),o=(0,f.useRef)(null),s=(0,f.useRef)(null);return(0,f.useEffect)(()=>{if(!i)return;let e=e=>{o.current?.contains(e.target)||a(!1)},t=e=>{e.key===`Escape`&&!e.defaultPrevented&&(a(!1),s.current?.focus())};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[i]),(0,O.jsxs)(`div`,{className:`native-model-menu`,ref:o,children:[(0,O.jsxs)(`button`,{type:`button`,className:`native-model-trigger`,ref:s,"aria-label":`模型与推理强度`,"aria-expanded":i&&!n,"aria-haspopup":`dialog`,title:`${e} · ${t}`,disabled:n,onClick:()=>a(e=>!e),children:[(0,O.jsx)(`span`,{children:e}),(0,O.jsx)(`small`,{children:t}),(0,O.jsx)(te,{size:13})]}),i&&!n&&(0,O.jsxs)(`section`,{className:`native-model-popover`,role:`dialog`,"aria-label":`模型与推理强度设置`,children:[(0,O.jsxs)(`header`,{children:[(0,O.jsx)(`strong`,{children:`模型与推理强度`}),(0,O.jsx)(`button`,{type:`button`,"aria-label":`关闭模型设置`,onClick:()=>{a(!1),s.current?.focus()},children:(0,O.jsx)(it,{size:15})})]}),r,(0,O.jsx)(`p`,{children:`应用于下一轮对话`})]})]})}function kD({host:e,provider:t,value:n,onChange:r,disabled:i=!1,compact:a=!1,effort:o=``,onEffortChange:s,onAutoSupportChange:c}){let[l,u]=(0,f.useState)(null),[d,p]=(0,f.useState)(0),m=[`antigravity`,`claude`].includes(t)&&!!e&&e!==`@local`,h=JSON.stringify([e,t,d]),g=l?.key===h?l:null,_=m&&!g,v=g?.models||[],y=g?.error||``;(0,f.useEffect)(()=>{if(!m)return;let n=!0;return ED(`/api/cli-conversations/models?host=${encodeURIComponent(e)}&provider=${t}${d?`&refresh=1`:``}`).then(e=>{n&&u({key:h,models:e.models,error:``})}).catch(e=>{n&&u({key:h,models:[],error:e.message})}),()=>{n=!1}},[e,t,m,d,h]);let{tr:b}=fc(),x=v.find(e=>e.id===(n||`default`)||e.resolvedModel===n),S=t===`antigravity`?v[0]?.supportsAutoMode:x?.supportsAutoMode;(0,f.useEffect)(()=>{c?.(S??null)},[S,c]);let C=x?.efforts||[],w={low:b(`低`,`Low`),medium:b(`中`,`Med`),high:b(`高`,`High`),xhigh:b(`极高`,`XHigh`),max:b(`最高`,`Max`)},T=(0,O.jsxs)(`div`,{className:`native-model-control`,children:[[`antigravity`,`claude`].includes(t)?(0,O.jsx)(fE,{label:b(`下一轮模型`,`Next turn model`),fieldLabel:b(`模型`,`Model`),value:n,onChange:e=>{r(e),s?.(``)},disabled:i||_,searchable:!0,options:[{value:``,label:_?b(`读取模型…`,`Loading models…`):b(`主机默认`,`Host default`)},...n&&!v.some(e=>e.id===n)?[{value:n,label:b(`${n}(待核验)`,`${n} (unverified)`)}]:[],...v.filter(e=>e.id!==`default`).map(e=>({value:e.id,label:e.label}))]}):(0,O.jsxs)(`label`,{className:`native-model-field`,children:[(0,O.jsx)(`span`,{children:b(`模型`,`Model`)}),(0,O.jsx)(`input`,{"aria-label":b(`下一轮模型`,`Next turn model`),placeholder:b(`默认`,`Default`),value:n,disabled:i,onChange:e=>r(e.target.value)})]}),[`claude`,`antigravity`].includes(t)&&s&&(0,O.jsx)(fE,{label:b(`推理强度`,`Reasoning effort`),fieldLabel:b(`推理强度`,`Effort`),value:t===`antigravity`?o||x?.currentEffort||``:o,onChange:e=>{s(e),t===`antigravity`&&x?.effortModels?.[e]&&r(x.effortModels[e])},disabled:i||_||!C.length,options:[{value:``,label:!_&&x&&!C.length?b(`不支持强度`,`Not supported`):t===`antigravity`&&!n?b(`先选择模型`,`Select model first`):b(`默认强度`,`Default effort`)},...C.map(e=>({value:e,label:w[e]||e}))]}),[`antigravity`,`claude`].includes(t)&&(0,O.jsx)(`button`,{type:`button`,className:`native-model-refresh`,"aria-label":b(`刷新模型能力`,`Refresh models`),disabled:_||i||!e||e===`@local`,onClick:()=>p(e=>e+1),children:(0,O.jsx)(Fe,{size:12})}),y&&(0,O.jsx)(`small`,{className:`native-model-error`,role:`alert`,children:y})]});return a?(0,O.jsx)(OD,{label:_?b(`读取模型…`,`Loading…`):x?.label||n||b(`主机默认`,`Host default`),effort:w[o||x?.currentEffort||``]||b(`默认`,`Default`),disabled:i,children:T}):T}function AD({value:e,onChange:t,disabled:n=!1,compact:r=!1,provider:i,autoSupported:a}){let{tr:o}=fc();return(0,O.jsx)(`div`,{className:`native-permission-control`,children:(0,O.jsx)(fE,{label:o(`CLI 会话权限`,`CLI permissions`),fieldLabel:r?void 0:o(`权限`,`Permissions`),value:e,disabled:n,compact:r,icon:(0,O.jsx)(We,{size:14}),onChange:e=>t(e),options:[...i===`antigravity`?[{value:`full`,label:o(`完全访问`,`Full access`),description:o(`跳过工具权限审批(--dangerously-skip-permissions)`,`Skip tool approval prompts (--dangerously-skip-permissions)`)}]:[],...[`claude`,`antigravity`].includes(i||``)?[{value:`auto`,label:o(`自动审批`,`Auto approve`),disabled:a===!1,description:a===!1?o(`当前账号、模型或 CLI 不支持`,`Not supported by current account, model, or CLI`):o(`自动评估工具操作;高风险操作仍可能被拒绝`,`Automatically evaluates tool calls; high-risk actions may still be blocked`)},{value:`plan`,label:o(`规划模式`,`Plan mode`),description:i===`antigravity`?o(`先调查并生成计划;不是只读权限隔离`,`Explore and draft a plan first`):o(`调查和规划,不执行修改`,`Investigate and plan without edits`)}]:[],{value:`default`,label:o(`默认权限`,`Default`),description:o(`沿用 CLI 的权限设置`,`Use the CLI's default permission policy`)},{value:`workspace`,label:o(`工作区编辑`,`Workspace edit`),description:o(`允许工作区编辑;越界操作仍需审批`,`Allow workspace edits; prompt for outside operations`)}]})})}function jD({value:e,onChange:t}){return(0,O.jsx)(`div`,{className:`new-agent-choice`,role:`group`,"aria-label":`选择 Agent`,children:[`codex`,`claude`,`antigravity`].map(n=>(0,O.jsxs)(`button`,{type:`button`,"aria-pressed":e===n,onClick:()=>t(n),children:[(0,O.jsx)(EE,{provider:n}),(0,O.jsx)(`span`,{children:n===`codex`?`Codex`:n===`claude`?`Claude`:`Antigravity`})]},n))})}function MD(e){return e.newTaskOpen?(0,O.jsx)(ND,{workspace:e}):null}function ND({workspace:e}){let{tr:t}=fc(),n=(0,f.useRef)(null),[r,i]=(0,f.useState)(`codex`),[a,o]=(0,f.useState)(!1),[s,c]=(0,f.useState)(``),[l,u]=(0,f.useState)(``),[d,p]=(0,f.useState)(null),[m,h]=(0,f.useState)(`default`),g=hE({host:e.newTaskDraft.host,scope:`new-session`,onError:t=>e.setActionNotice({kind:`error`,text:t})}),_=e.busyAction===`create-task`||a;async function v(){if(!g.hasUnready){if(r===`codex`){await e.createTask(g.readyTokens)&&g.clear();return}o(!0),e.setActionNotice(null);try{let t=await ED(`/api/cli-conversations/send`,{host:e.newTaskDraft.host,cwd:e.newTaskDraft.cwd,prompt:e.newTaskDraft.prompt,attachments:g.readyTokens,attachmentScope:`new-session`,provider:r,model:s,effort:l,permissionMode:m});g.clear(),e.onNativeCreated?.(t),e.setNewTaskOpen(!1)}catch(t){e.setActionNotice({kind:`error`,text:t.message})}finally{o(!1)}}}(0,f.useEffect)(()=>{n.current?.showModal()},[]);function y(){_||e.setNewTaskOpen(!1)}return(0,O.jsx)(`dialog`,{ref:n,className:`new-conversation-dialog`,"aria-labelledby":`new-conversation-title`,onCancel:e=>{e.preventDefault(),y()},onClick:e=>{e.target===e.currentTarget&&y()},children:(0,O.jsxs)(`form`,{onDragOver:g.onDragOver,onDrop:t=>{r!==`codex`&&e.newTaskDraft.host===`@local`||g.onDrop(t)},onSubmit:e=>{e.preventDefault(),_||v()},children:[(0,O.jsxs)(`header`,{children:[(0,O.jsx)(`h2`,{id:`new-conversation-title`,children:`新建会话`}),(0,O.jsx)(`button`,{type:`button`,"aria-label":`关闭新建会话`,disabled:_,onClick:y,children:(0,O.jsx)(it,{size:18})})]}),(0,O.jsxs)(`fieldset`,{disabled:_,className:`new-conversation-fields`,children:[(0,O.jsx)(jD,{value:r,onChange:e=>{i(e),c(``),u(``),h(e===`claude`?`auto`:`default`)}}),(0,O.jsx)(fE,{label:t(`设备`,`Device`),fieldLabel:t(`设备`,`Device`),value:e.newTaskDraft.host,options:[{value:``,label:t(`选择设备`,`Select host`)},...e.snapshot.hosts.map(e=>({value:e.alias,label:rE(e.alias),description:e.reachable?t(`在线`,`Online`):t(`离线`,`Offline`),disabled:!e.reachable||r!==`codex`&&e.alias===`@local`}))],onChange:t=>{let n=e.snapshot.hosts.find(e=>e.alias===t),r=FT(e.snapshot.management,t);e.setNewTaskDraft(e=>({...e,host:t,cwd:n?.defaultCwd||n?.agents.find(e=>e.cwd)?.cwd||``,transport:`app-server`,model:``,effort:``,preLaunchCommand:r.preLaunchCommand,yolo:r.yolo})),e.setNewTaskDirectoryBrowser({open:!1,loading:!1,error:``,listing:null})}}),(0,O.jsx)(wD,{workspace:e}),r===`codex`?(0,O.jsx)(TD,{workspace:e}):(0,O.jsxs)(`div`,{className:`new-session-cli-settings`,children:[(0,O.jsx)(kD,{onAutoSupportChange:p,host:e.newTaskDraft.host,provider:r,value:s,onChange:c,effort:l,onEffortChange:u}),(0,O.jsx)(AD,{autoSupported:d,provider:r,value:m,onChange:h}),(0,O.jsxs)(`p`,{className:`native-note`,children:[m===`auto`?`自动评估工具权限`:m===`plan`?`先调查并生成计划`:m===`workspace`?`允许工作区编辑;其他操作按 CLI 策略处理`:`沿用 CLI 默认权限`,` · 实时流式输出与交互审批 ·`,` `,FT(e.snapshot.management,e.newTaskDraft.host).preLaunchCommand?`已配置主机启动前命令`:`直连启动(可在「设置 → 远程主机」自定义启动前命令)`]}),e.newTaskDraft.host===`@local`&&(0,O.jsxs)(`p`,{className:`form-error`,role:`alert`,children:[`请选择远程设备运行`,` `,r===`claude`?`Claude`:`Antigravity`,`。`]})]}),(0,O.jsxs)(`label`,{children:[t(`开始聊什么?`,`What do you want to work on?`),(0,O.jsx)(`textarea`,{required:g.attachments.length===0,rows:3,placeholder:t(`描述你想完成的工作…(支持拖拽或粘贴附件)`,`Describe the task… (drop or paste files)`),value:e.newTaskDraft.prompt,onPaste:t=>{r!==`codex`&&e.newTaskDraft.host===`@local`||g.onPaste(t)},onChange:t=>e.setNewTaskDraft(e=>({...e,prompt:t.target.value}))})]}),(0,O.jsx)(gE,{attachments:g.attachments,onRemove:g.remove}),(0,O.jsx)(_E,{inputRef:g.inputRef,onFiles:g.uploadFiles}),(0,O.jsxs)(`div`,{className:`composer-attach-bar`,children:[(0,O.jsx)(vE,{uploading:g.uploading,disabled:!e.newTaskDraft.host||r!==`codex`&&e.newTaskDraft.host===`@local`,onClick:g.openPicker}),(0,O.jsx)(`small`,{children:t(`支持点击选择、拖拽或 Ctrl+V 粘贴图片/文件`,`Click, drag & drop, or paste images/files`)})]}),r===`codex`&&e.newTaskDraft.host!==`@local`&&(0,O.jsxs)(`details`,{className:`new-conversation-advanced`,children:[(0,O.jsx)(`summary`,{children:t(`高级设置`,`Advanced settings`)}),(0,O.jsx)(fE,{label:t(`运行方式`,`Transport`),fieldLabel:t(`运行方式`,`Transport`),value:e.newTaskDraft.transport,options:[{value:`app-server`,label:t(`网页会话`,`Web session (App Server)`)},{value:`tmux`,label:t(`终端会话(tmux)`,`Terminal session (tmux)`)}],onChange:t=>e.setNewTaskDraft(e=>({...e,transport:t}))}),(0,O.jsxs)(`label`,{children:[`启动前命令`,(0,O.jsx)(`textarea`,{rows:2,value:e.newTaskDraft.preLaunchCommand,onChange:t=>e.setNewTaskDraft(e=>({...e,preLaunchCommand:t.target.value}))})]}),(0,O.jsx)(`small`,{children:`启动新连接时执行;不会自动重启已有连接。`}),(0,O.jsx)(`button`,{type:`button`,disabled:!e.newTaskDraft.host||!!e.busyAction,onClick:()=>void e.saveNewTaskRuntimeConfig(),children:`保存为设备默认`})]})]}),e.actionNotice&&(0,O.jsx)(`p`,{className:`form-error`,role:`status`,children:e.actionNotice.text}),(0,O.jsxs)(`footer`,{children:[(0,O.jsx)(`button`,{type:`button`,disabled:_,onClick:y,children:`取消`}),(0,O.jsxs)(`button`,{type:`submit`,className:`new-conversation-submit`,disabled:_||g.hasUnready||r!==`codex`&&e.newTaskDraft.host===`@local`||!e.newTaskDraft.host||!e.newTaskDraft.cwd.trim()||!e.newTaskDraft.prompt.trim()&&g.attachments.length===0,children:[_?(0,O.jsx)(be,{size:15,className:`is-spinning`}):null,_?`正在创建…`:`开始会话`]})]})]})})}function PD({researchAssistantOpen:e,setResearchAssistantOpen:t,researchAssistantBusy:n,researchAssistantMessagesRef:r,researchAssistantMessages:i,openResearchAssistantCandidate:a,setResearchAssistantDraft:o,askResearchAssistant:s,researchAssistantDraft:c}){return(0,O.jsx)(O.Fragment,{children:e&&(0,O.jsxs)(`aside`,{className:`research-assistant-panel`,"aria-label":`SCOPE 科研检索助手`,children:[(0,O.jsxs)(`div`,{className:`research-assistant-head`,children:[(0,O.jsx)(`span`,{className:`research-assistant-icon`,children:(0,O.jsx)(w,{size:17})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`strong`,{children:`查找会话`}),(0,O.jsx)(`span`,{children:`搜索本机与远程设备上的实验和任务`})]}),(0,O.jsx)(`button`,{type:`button`,"aria-label":`关闭科研检索助手`,onClick:()=>t(!1),children:(0,O.jsx)(it,{size:16})})]}),(0,O.jsxs)(`div`,{className:`research-assistant-messages`,"aria-live":`polite`,"aria-busy":n,ref:r,children:[i.map(e=>(0,O.jsxs)(`div`,{className:`research-assistant-message ${e.role}`,children:[e.role===`assistant`?(0,O.jsx)(ZT,{value:e.text}):(0,O.jsx)(`p`,{children:e.text}),e.role===`assistant`&&e.model&&e.id!==`welcome`&&(0,O.jsx)(`span`,{className:`research-assistant-model`,children:e.model===`codex`?`Codex 整理`:`按相关度排序`}),e.warning&&(0,O.jsxs)(`span`,{className:`research-assistant-warning`,children:[`回答整理暂不可用,已展示检索结果:`,e.warning]}),e.scans&&(0,O.jsxs)(`details`,{className:`research-search-coverage`,children:[(0,O.jsxs)(`summary`,{children:[`已检索 `,e.scans.filter(e=>!e.error).length,` / `,e.scans.length,` 台设备`,e.scans.some(e=>e.error)?` · 部分设备未完成`:``]}),e.scans.map(e=>(0,O.jsxs)(`p`,{children:[(0,O.jsx)(`strong`,{children:e.host===`@local`?`本机`:e.host}),` · `,e.error||`${e.filesScanned} / ${e.totalFiles} 个记录 · ${e.matches} 个候选`]},e.host))]}),(e.candidates?.length||0)>0&&(0,O.jsx)(`div`,{className:`research-assistant-candidates`,children:e.candidates?.slice(0,6).map((e,t)=>(0,O.jsxs)(`button`,{type:`button`,onClick:()=>a(e),children:[(0,O.jsxs)(`span`,{className:`research-candidate-rank`,children:[`[`,t+1,`]`]}),(0,O.jsxs)(`span`,{className:`research-candidate-main`,children:[(0,O.jsx)(`strong`,{children:e.theme}),(0,O.jsxs)(`code`,{children:[e.host,` · `,e.sessionId.slice(0,8),e.active?` · 活动中`:` · 历史`]}),(0,O.jsx)(`small`,{children:e.cwd}),(0,O.jsxs)(`em`,{children:[`命中:`,e.matchedTerms.join(` · `)]}),e.evidence[0]?.text&&(0,O.jsx)(`p`,{children:e.evidence[0].text})]}),(0,O.jsx)(D,{size:15})]},`${e.host}:${e.sessionId}`))})]},e.id)),n&&(0,O.jsxs)(`div`,{className:`research-assistant-thinking`,children:[(0,O.jsx)(be,{size:15,className:`is-spinning`}),(0,O.jsx)(`span`,{children:`正在查找相关会话…`})]})]}),i.length===1&&(0,O.jsxs)(`div`,{className:`research-assistant-suggestions`,"aria-label":`常用检索建议`,children:[(0,O.jsx)(`button`,{type:`button`,onClick:()=>o(`我现在想确认使用 reward regressed goal z 去做 QGF 的 Session 是哪一个?`),children:`查找 QGF 实验所在的会话`}),(0,O.jsx)(`button`,{type:`button`,onClick:()=>o(`最近哪个 Session 提交了失败后仍在排队的 DLC 任务?`),children:`排查异常排队的 DLC 任务`})]}),(0,O.jsxs)(`form`,{className:`research-assistant-form`,onSubmit:e=>{e.preventDefault(),s()},children:[(0,O.jsx)(`textarea`,{value:c,maxLength:800,rows:1,"aria-label":`搜索会话`,placeholder:`输入实验名称、目录或任务关键词…`,onChange:e=>o(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),s())}}),(0,O.jsx)(`button`,{type:`submit`,"aria-label":`发送给科研检索助手`,disabled:n||!c.trim(),children:n?(0,O.jsx)(be,{size:15,className:`is-spinning`}):(0,O.jsx)(Ve,{size:14})})]}),(0,O.jsx)(`p`,{className:`research-assistant-footnote`,children:`只读搜索 · 不改动运行中的会话`})]})})}var FD=`scope.conversation-location.v1`;function ID(e){try{let t=JSON.parse(e);if(t?.version!==1||![`manager`,`projects`,`resources`,`settings`].includes(t.section))return null;let n=e=>typeof e==`string`&&e.length<=4096;return!n(t.projectHost)||!n(t.host)||!n(t.cwd)||t.session&&(!n(t.session.id)||!n(t.session.sessionId)||![`codex`,`claude`,`antigravity`].includes(t.session.provider))?null:{version:1,section:t.section,projectHost:t.projectHost,host:t.host,cwd:t.cwd,session:t.session?{id:t.session.id,sessionId:t.session.sessionId,provider:t.session.provider}:null}}catch{return null}}function LD(e,t){for(let n of e){if(n.host!==t.host)continue;if(!t.session){if(n.cwd===t.cwd)return{project:n,session:null};continue}let e=t.session,r=n.sessions.find(t=>(t.provider||`codex`)===e.provider&&(e.sessionId?t.sessionId===e.sessionId:t.id===e.id));if(r)return{project:n,session:r}}return null}function RD(e){let t=(0,f.useRef)(e);(0,f.useEffect)(()=>{t.current=e});let[n,r]=(0,f.useState)(!1),[i,a]=(0,f.useState)(null),[o,s]=(0,f.useState)(``),c=(0,f.useRef)(0),l=(0,f.useRef)(!1),{workspace:u,catalog:d,section:p,projectHost:m}=e;(0,f.useEffect)(()=>{let e=null;try{e=ID(sessionStorage.getItem(FD))}catch{}e&&(t.current.setSection(e.section),t.current.setProjectHost(e.projectHost),e.section===`projects`&&(e.session||e.host!==`all`&&e.cwd!==`all`?a(e):(t.current.workspace.setHostFilter(e.host),t.current.workspace.setCwdFilter(e.cwd)))),r(!0)},[]),(0,f.useEffect)(()=>{if(!i||l.current)return;if(u.bridgeState!==`connected`||!d.loaded){s(`正在连接并恢复上次会话…`);return}let e=LD(d.projects,i);if(!e){s(d.scanning?`正在扫描上次会话…`:`上次会话暂时不可用,可能已归档、删除或主机尚未连接。可等待扫描,或选择其他会话。`);return}let n=c.current;l.current=!0,s(`正在恢复上次会话…`),(async()=>{let{workspace:r,catalog:i}=t.current,o=!0;e.session?.catalog?o=await i.select(e.session.id,()=>c.current===n):e.session?r.selectProjectSession(e.project,e.session):r.chooseProject(e.project),c.current===n&&(o?(a(null),s(``)):s(`暂时无法读取上次会话,可重新尝试或选择其他会话。`))})().catch(()=>{c.current===n&&s(`恢复会话失败,请重新尝试。`)})},[i,u.bridgeState,d.loaded,d.projects,d.scanning]),(0,f.useEffect)(()=>{if(!n||i)return;let e=d.selected,t=u.selectedAgent;if(p===`projects`&&!e&&u.selectedAgentId&&!t)return;let r={version:1,section:p,projectHost:m,host:e?.host||t?.host||u.hostFilter,cwd:e?.cwd||t?.cwd||u.cwdFilter,session:e?{id:e.key,sessionId:e.sessionId||``,provider:e.provider}:t?{id:t.id,sessionId:t.rollout?.id||``,provider:`codex`}:null};try{sessionStorage.setItem(FD,JSON.stringify(r))}catch{}},[n,i,p,m,d.selected,u.selectedAgent,u.selectedAgentId,u.hostFilter,u.cwdFilter]);function h(){c.current++,l.current=!1,a(null),s(``)}function g(){c.current++,l.current=!1,a(e=>e?{...e}:null),d.refresh()}return{cancel:h,retry:g,message:o}}var zD=/\n*\s*\[附件:\s*[^\]]*\]\s*$/,BD=/\n*\[SCOPE 网页附件:[\s\S]*$/,VD=`请查看并处理本条消息附带的文件。`;function HD(e,t){let n=typeof e==`string`?e:``,r=t.test(n);return{text:n.replace(t,``).trim(),hasAttachment:r}}function UD(e,t){let n=HD(e,BD),r=HD(t,zD);return!!(n.text===r.text||(n.hasAttachment||r.hasAttachment)&&(r.text===``&&n.text===VD||n.text===``&&r.text===VD))}function WD(e,t){if(!Array.isArray(e)||!t?.prompt)return!1;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.role!==`user`||!UD(r.text||``,t.prompt||``))continue;let i=Date.parse(r.createdAt||``);if(!(!Number.isFinite(i)||!t.createdAt||i<t.createdAt-2e3))return!0}return!1}function GD(e,t){if(!Array.isArray(e)||t?.status!==`completed`||!t.text?.trim())return!1;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.role!==`user`||!UD(r.text||``,t.prompt||``))continue;let i=Date.parse(r.createdAt||``);if(!(!Number.isFinite(i)||!t.createdAt||i<t.createdAt-2e3)){for(let r=n+1;r<e.length&&e[r].role!==`user`;r++)if(e[r].role===`assistant`&&e[r].text.trim()===t.text.trim())return!0}}return!1}function KD(e,t){if(!Array.isArray(t))return[];if(!Array.isArray(e)||e.length===0)return t;let n=t.map(t=>GD(e,t)),r=n.lastIndexOf(!0);return t.filter((i,a)=>!(n[a]||a<r||i.status===`stopped`&&a<t.length-1&&WD(e,i)))}function qD(e,t,n){let r=t||e.sessionId,i=e.provider===`antigravity`&&r?JSON.stringify([e.host,e.provider,r]):e.key.startsWith(`cli:`)?``:e.key,[a,o]=(0,f.useState)(null),[s,c]=(0,f.useState)(``),[l,u]=(0,f.useState)(!1),d=(0,f.useRef)({generation:0}),p=(0,f.useCallback)((e,t)=>{if(!i)return Promise.resolve();let n=d.current,r=++n.generation;return ED(`/api/session-catalog/dialogue?key=${encodeURIComponent(i)}${e===void 0?``:`&before=${e}&version=${encodeURIComponent(t||``)}`}`).then(t=>{r===n.generation&&(o(n=>e!==void 0&&n&&!t.reset&&n.version===t.version?{...t,limited:n.limited||t.limited,messages:[...t.messages,...n.messages]}:t),c(``))}).catch(e=>{r===n.generation&&c(e.message)}).finally(()=>{r===n.generation&&u(!1)})},[i]);(0,f.useEffect)(()=>{let e=d.current;return p(),()=>{e.generation++}},[p,e.historyVersion,e.updatedAt,n]);let m=(0,f.useCallback)(()=>i?(u(!0),p()):Promise.resolve(),[i,p]),h=a?.nextBefore,g=a?.version,_=(0,f.useCallback)(()=>h==null?Promise.resolve():(u(!0),p(h,g)),[h,g,p]);return{available:!!i,history:a,error:s,busy:l||!!i&&!a&&!s,refresh:m,earlier:_}}function JD({value:e,host:t,cwd:n}){let{history:r,busy:i,error:a,earlier:o,refresh:s}=e;return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`native-history-actions`,children:[r?.nextBefore!=null&&(0,O.jsx)(`button`,{type:`button`,disabled:i,onClick:()=>void o(),children:`加载较早记录`}),(0,O.jsx)(`button`,{type:`button`,disabled:i||!e.available,onClick:()=>void s(),children:i?`同步历史…`:`刷新历史`})]}),a&&(0,O.jsxs)(`p`,{className:`form-error`,role:`alert`,children:[`历史同步失败:`,a]}),r?.reset&&(0,O.jsx)(`p`,{className:`native-note`,children:`远端记录已变化,已重新载入最新历史。`}),r?.summaryOnly&&(0,O.jsxs)(`div`,{className:`native-note native-summary-card`,children:[(0,O.jsx)(`strong`,{children:`历史摘要`}),(0,O.jsx)(`p`,{children:r.summary}),(0,O.jsxs)(`small`,{children:[r.reason||`此会话尚无可读取的文本历史`,`。继续发送仍沿用原会话。`]})]}),r?.limited&&(0,O.jsx)(`p`,{className:`native-note`,children:`部分记录过长、已被上游截断或尚未写完,当前显示可读取的内容。`}),r?.messages.map((e,r)=>(0,O.jsxs)(`div`,{children:[e.role===`activity`?(0,O.jsxs)(`details`,{className:`native-history-activity`,children:[(0,O.jsx)(`summary`,{children:e.title||`工具记录`}),(0,O.jsx)(`pre`,{children:e.text})]}):e.text&&(0,O.jsx)(`div`,{className:`native-message ${e.role}`,children:(0,O.jsx)(ZT,{value:e.text,remoteHost:t,remoteCwd:n})}),e.activity&&(0,O.jsxs)(`details`,{className:`native-history-activity`,children:[(0,O.jsx)(`summary`,{children:e.title||`工具调用`}),(0,O.jsx)(`pre`,{children:e.activity})]})]},`${e.id||r}:${e.role}`))]})}function YD({history:e,turns:t,ready:n,working:r}){let i=(0,f.useRef)(null),a=(0,f.useRef)(null),o=(0,f.useRef)(!0),s=(0,f.useRef)(!1),c=(0,f.useRef)(0),l=(0,f.useRef)(null),[u,d]=(0,f.useState)(!0),p=(0,f.useCallback)(()=>{let e=i.current;e&&(e.scrollTop=e.scrollHeight,c.current=e.scrollTop,d(e=>e||!0))},[]);(0,f.useLayoutEffect)(()=>{let r=i.current,a=Array.isArray(t)?t.length>0:!!t;if(!(!r||!n&&!a)){if(n&&(s.current=!0),l.current){l.current.history!==e&&(r.scrollTop=l.current.top+r.scrollHeight-l.current.height,c.current=r.scrollTop,l.current=null);return}if(o.current){p();let e=requestAnimationFrame(()=>{o.current&&!l.current&&p()});return()=>{typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(e)}}}},[e,t,n,r,p]),(0,f.useEffect)(()=>{let e=new ResizeObserver(()=>{s.current&&o.current&&!l.current&&p()});return a.current&&e.observe(a.current),i.current&&e.observe(i.current),()=>e.disconnect()},[p]);function m(e){if(!s.current)return;let t=e.currentTarget;t.scrollHeight-t.scrollTop-t.clientHeight<80?(o.current=!0,d(e=>e||!0)):t.scrollTop<c.current-4&&(o.current=!1,d(e=>e&&!1)),c.current=t.scrollTop}function h(){o.current=!0,l.current=null,p()}async function g(t){let n=i.current;n&&(l.current={height:n.scrollHeight,top:n.scrollTop,history:e}),o.current=!1,d(e=>e&&!1);try{await t()}finally{requestAnimationFrame(()=>{l.current=null})}}return{scroll:i,content:a,onScroll:m,toBottom:h,older:g,atBottom:u}}var XD={selected:[],other:``};function ZD(e){return[...e.selected,...e.other.trim()?[e.other.trim()]:[]].join(`, `)}function QD({title:e,options:t=[],multiple:n=!1,disabled:r=!1,allowOther:i=!0,secret:a=!1,value:o,onChange:s}){let{tr:c}=fc(),l=(0,f.useId)();return(0,O.jsxs)(`fieldset`,{className:`scope-question`,disabled:r,children:[(0,O.jsx)(`legend`,{children:e}),n&&(0,O.jsx)(`small`,{className:`scope-question-hint`,children:c(`可多选`,`Multi-select`)}),(0,O.jsx)(`div`,{className:`scope-question-options`,children:t.map((e,t)=>{let r=e.value??e.label;return(0,O.jsxs)(`label`,{className:`scope-question-option`,children:[(0,O.jsx)(`input`,{type:n?`checkbox`:`radio`,name:l,checked:o.selected.includes(r),onChange:()=>s({selected:n?o.selected.includes(r)?o.selected.filter(e=>e!==r):[...o.selected,r]:[r],other:n?o.other:``})}),(0,O.jsxs)(`span`,{children:[(0,O.jsx)(`strong`,{children:e.label}),e.description&&(0,O.jsx)(`small`,{children:e.description})]})]},`${r}:${t}`)})}),(i||!t.length)&&(0,O.jsxs)(`label`,{className:`scope-question-other`,children:[(0,O.jsx)(`span`,{children:t.length?c(`其他回答`,`Other`):c(`你的回答`,`Your answer`)}),(0,O.jsx)(`input`,{type:a?`password`:`text`,autoComplete:`off`,"aria-label":c(`${e} · 其他回答`,`${e} · Other`),value:o.other,maxLength:1e4,placeholder:n?c(`也可以补充自己的答案`,`Or type a custom answer`):c(`输入自己的答案`,`Type your answer`),onChange:e=>s({selected:n?o.selected:[],other:e.target.value})})]})]})}function $D({fields:e,message:t,disabled:n,respond:r}){let{tr:i}=fc(),[a,o]=(0,f.useState)(()=>Object.fromEntries(e.filter(e=>e.default!==void 0).map(e=>[e.name,e.default])));function s(e,t){o(n=>{let r={...n};return t===void 0?delete r[e]:r[e]=t,r})}let c=e.some(e=>{let t=a[e.name];return t===void 0||t===``?e.required:typeof t==`string`?t.length<(e.minLength||0)||t.length>(e.maxLength||1e4):typeof t==`number`?!Number.isFinite(t)||e.type===`integer`&&!Number.isInteger(t)||t<(e.minimum??-1/0)||t>(e.maximum??1/0):Array.isArray(t)&&(t.length<(e.minItems||0)||t.length>(e.maxItems||100))});return(0,O.jsxs)(`section`,{className:`native-approval`,"aria-label":i(`Antigravity 需要你的回答`,`Antigravity needs your input`),children:[(0,O.jsxs)(`header`,{children:[(0,O.jsx)(`strong`,{children:i(`Antigravity 需要你的回答`,`Antigravity needs your input`)}),(0,O.jsx)(`small`,{children:i(`选择后提交`,`Select & submit`)})]}),t&&(0,O.jsx)(`p`,{children:t}),e.map(e=>(0,O.jsxs)(`div`,{children:[e.description&&(0,O.jsx)(`p`,{children:e.description}),e.options?.length||e.type===`boolean`?(0,O.jsx)(QD,{title:`${e.title}${e.required?` *`:``}`,disabled:n,options:e.type===`boolean`?[{label:i(`是`,`Yes`),value:`true`},{label:i(`否`,`No`),value:`false`}]:e.options,multiple:e.type===`array`,allowOther:!1,value:{selected:a[e.name]===void 0?[]:Array.isArray(a[e.name])?a[e.name]:[String(a[e.name])],other:``},onChange:t=>s(e.name,e.type===`array`?t.selected:e.type===`boolean`?t.selected[0]===`true`:t.selected[0])}):(0,O.jsxs)(`label`,{className:`scope-form-field`,children:[(0,O.jsxs)(`span`,{children:[e.title,e.required?` *`:``]}),(0,O.jsx)(`input`,{disabled:n,type:[`number`,`integer`].includes(e.type)?`number`:`text`,value:String(a[e.name]??``),min:e.minimum,max:e.maximum,step:e.type===`integer`?1:`any`,minLength:e.minLength,maxLength:e.maxLength||1e4,onChange:t=>s(e.name,t.target.value===``?void 0:[`number`,`integer`].includes(e.type)?Number(t.target.value):t.target.value)})]})]},e.name)),(0,O.jsxs)(`footer`,{children:[(0,O.jsx)(`button`,{disabled:n,onClick:()=>r(`cancel`),children:i(`取消`,`Cancel`)}),(0,O.jsx)(`button`,{disabled:n,onClick:()=>r(`deny`),children:i(`暂不回答`,`Skip`)}),(0,O.jsx)(`button`,{disabled:n||c,onClick:()=>r(`allow`,a),children:i(`提交回答`,`Submit`)})]})]})}var eO=[{name:`model`,description:`选择下一轮模型`,kind:`local`},{name:`effort`,description:`调整推理强度`,kind:`local`},{name:`permissions`,description:`调整会话权限`,kind:`local`},{name:`stop`,description:`停止当前生成`,kind:`local`},{name:`help`,description:`浏览此会话可用命令`,kind:`local`}];function tO({provider:e,host:t,cwd:n,sessionId:r,draft:i,setDraft:a,onLocal:o,disabled:s,liveCommands:c}){let l=(0,f.useId)(),[u,d]=(0,f.useState)({key:``,items:[]}),[p,m]=(0,f.useState)(null),[h,g]=(0,f.useState)(null),[_,v]=(0,f.useState)(0),[y,b]=(0,f.useState)(0),x=JSON.stringify([e,t,n,r]),S=p?.key===`${x}:${y}`?p.message:``,C=/^\/[\w:-]*$/.test(i),w=!s&&C&&h!==i;(0,f.useEffect)(()=>{if(!w||c||u.key===`${x}:${y}`)return;let i=new AbortController,a=new URLSearchParams({host:t,cwd:n,provider:e,sessionId:r||``,refresh:String(+(y>0))});return ED(`${e===`codex`?`/api/session/commands`:`/api/cli-conversations/commands`}?${a}`).then(e=>{i.signal.aborted||d({key:`${x}:${y}`,items:e.commands,notice:e.notice})}).catch(e=>{i.signal.aborted||m({key:`${x}:${y}`,message:e.message})}),()=>i.abort()},[w,x,y,e,t,n,r,c,u.key]);let T=c||(u.key===`${x}:${y}`?u.items:[]),E=[...eO,...e===`codex`?[{name:`compact`,description:`压缩当前会话上下文`,kind:`local`}]:[],...T.filter(e=>!eO.some(t=>t.name===e.name))],ee=E.filter(e=>e.name.toLowerCase().includes(i.slice(1).toLowerCase())),te=Math.min(_,Math.max(0,ee.length-1));(0,f.useEffect)(()=>{w&&document.getElementById(`${l}-${te}`)?.scrollIntoView({block:`nearest`})},[te,l,w]);function D(e){g(null),v(0),e.kind===`local`?(a(e.name===`help`?`/`:``),e.name!==`help`&&o(e.name)):a(e.insertion||`/${e.name} `)}function ne(){if(s)return!1;let e=/^\/([\w:-]+)\s*$/.exec(i),t=E.find(t=>t.kind===`local`&&t.name===e?.[1]);return t?(D(t),!0):!1}function re(e){return!w||e.nativeEvent.isComposing?!1:e.key===`Escape`?(g(i),e.preventDefault(),!0):[`ArrowDown`,`ArrowUp`].includes(e.key)?(v((te+(e.key===`ArrowDown`?1:-1)+ee.length)%(ee.length||1)),e.preventDefault(),!0):(e.key===`Enter`&&!e.shiftKey||e.key===`Tab`)&&ee[te]?(D(ee[te]),e.preventDefault(),!0):!1}return{panel:w&&(0,O.jsxs)(`section`,{className:`scope-commands`,"aria-label":`可用命令`,children:[(0,O.jsxs)(`header`,{children:[(0,O.jsxs)(`span`,{children:[e===`antigravity`?`Antigravity`:e===`claude`?`Claude`:`Codex`,` · 命令与技能`]}),!c&&(0,O.jsx)(`button`,{type:`button`,onClick:()=>b(e=>e+1),children:`刷新`})]}),(0,O.jsxs)(`div`,{role:`listbox`,id:l,"aria-label":`命令列表`,children:[ee.map((e,t)=>(0,O.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":te===t,id:`${l}-${t}`,onMouseEnter:()=>v(t),onClick:()=>D(e),children:[(0,O.jsxs)(`span`,{children:[(0,O.jsxs)(`strong`,{children:[`/`,e.name]}),(0,O.jsx)(`small`,{children:e.kind===`local`?`设置`:e.kind===`skill`?`技能`:`原生命令`})]}),(0,O.jsx)(`p`,{children:e.description||e.argumentHint||`由当前 Agent 提供`})]},e.name)),!ee.length&&(0,O.jsx)(`p`,{className:`scope-command-note`,children:`没有匹配的网页命令。终端专用命令请在终端使用。`})]}),S&&(0,O.jsx)(`p`,{className:`scope-command-note`,role:`alert`,children:S}),!c&&u.key===`${x}:${y}`&&u.notice&&(0,O.jsx)(`p`,{className:`scope-command-note`,children:u.notice}),!c&&u.key!==`${x}:${y}`&&!S&&(0,O.jsx)(`p`,{className:`scope-command-note`,children:`正在读取远端命令…`}),(0,O.jsx)(`footer`,{children:`↑ ↓ 选择 · Enter 填入 · Esc 关闭`})]}),onKeyDown:re,handleLocal:ne,inputProps:{"aria-controls":w?l:void 0,"aria-expanded":w,"aria-autocomplete":`list`,"aria-activedescendant":w&&ee.length?`${l}-${te}`:void 0}}}function nO({request:e,disabled:t,respond:n,provider:r=`Claude`}){let{tr:i}=fc(),[a,o]=(0,f.useState)({}),s=e.tool===`AskUserQuestion`&&Array.isArray(e.input.questions)?e.input.questions:[],c=Object.fromEntries(s.map(e=>[e.question,ZD(a[e.question]||XD)]));return(0,O.jsxs)(`section`,{className:`native-approval`,"aria-label":i(`${r} 等待审批`,`${r} awaiting approval`),children:[(0,O.jsxs)(`header`,{children:[(0,O.jsx)(`strong`,{children:s.length?i(`${r} 需要你的回答`,`${r} needs your input`):i(`请求使用 ${e.tool}`,`Requesting ${e.tool}`)}),(0,O.jsx)(`small`,{children:s.length?i(`选择后提交`,`Select & submit`):i(`等待确认`,`Awaiting approval`)})]}),e.description&&(0,O.jsx)(`p`,{children:e.description}),e.path&&(0,O.jsxs)(`p`,{children:[i(`路径:`,`Path: `),e.path]}),!!e.reason&&(0,O.jsx)(`p`,{children:typeof e.reason==`string`?e.reason:JSON.stringify(e.reason)}),s.length?s.map((e,n)=>(0,O.jsx)(QD,{title:e.question,options:e.options,multiple:e.multiSelect,value:a[e.question]||XD,disabled:t,onChange:t=>o(n=>({...n,[e.question]:t}))},`${e.question}:${n}`)):(0,O.jsxs)(`details`,{className:`native-approval-details`,children:[(0,O.jsx)(`summary`,{children:i(`查看操作详情`,`Inspect details`)}),(0,O.jsx)(`pre`,{children:JSON.stringify(e.input,null,2)})]}),(0,O.jsx)(`footer`,{children:e.options?.length?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`button`,{type:`button`,disabled:t,onClick:()=>n(`deny`),children:i(`取消`,`Cancel`)}),e.options.map(e=>(0,O.jsxs)(`button`,{type:`button`,disabled:t,onClick:()=>n(e.kind.startsWith(`allow`)?`allow`:`deny`,void 0,e.optionId),children:[e.name,e.kind.endsWith(`always`)&&(0,O.jsx)(`small`,{children:i(` · 记住此选择`,` · Always`)})]},e.optionId))]}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`button`,{type:`button`,disabled:t,onClick:()=>n(`deny`),children:s.length?i(`暂不回答`,`Skip`):i(`拒绝这次`,`Deny`)}),(0,O.jsx)(`button`,{type:`button`,disabled:t||s.some(e=>!c[e.question]?.trim()),onClick:()=>n(`allow`,s.length?c:void 0),children:s.length?i(`提交回答`,`Submit`):i(`允许这次`,`Allow`)})]})})]})}function rO({events:e,partial:t,host:n,cwd:r}){return(0,O.jsxs)(O.Fragment,{children:[e.map((t,i)=>t.kind===`tool_result`?null:t.kind===`tool`?(0,O.jsxs)(`details`,{className:`native-tool-event`,children:[(0,O.jsx)(`summary`,{children:t.name||`工具调用`}),(0,O.jsx)(`pre`,{children:JSON.stringify(t.input,null,2)}),e.filter(e=>e.kind===`tool_result`&&e.id===t.id).map((e,t)=>(0,O.jsx)(`pre`,{children:e.text},t))]},i):t.kind===`permission`?(0,O.jsx)(`p`,{className:`native-note`,children:t.text},i):(0,O.jsxs)(`div`,{className:`native-message ${t.kind===`user`?`user`:`assistant`}`,children:[t.kind===`user`&&(0,O.jsx)(`small`,{children:`追加消息 · 已接收`}),(0,O.jsx)(ZT,{value:t.text||``,remoteHost:n,remoteCwd:r})]},i)),t&&(0,O.jsx)(`div`,{className:`native-message assistant`,children:(0,O.jsx)(ZT,{value:t,remoteHost:n,remoteCwd:r})})]})}var iO=[`launching`,`running`,`unknown`,`waiting_permission`,`stopping`,`finishing`];function aO(e=[],t=[],n){let r=new Map,i=n?[...e,...t]:[...t,...e];for(let e of i){if(!e?.id)continue;let t=r.get(e.id);if(!t){r.set(e.id,e);continue}let n=t.updatedAt||0,i=e.updatedAt||0,a=t.status===`working`,o=e.status===`working`;(i>n||i===n&&a&&!o)&&r.set(e.id,{...t,...e})}return Array.from(r.values())}function oO({subagents:e}){let{tr:t}=fc();if(!e.length)return null;let n={working:t(`工作中`,`Working`),completed:t(`已完成`,`Done`),failed:t(`失败`,`Failed`),stopped:t(`已停止`,`Stopped`)},r=e.filter(e=>e.status===`working`),i=e.length-r.length,a=(0,O.jsx)(`div`,{className:`native-subagents-list`,children:e.map(e=>(0,O.jsxs)(`div`,{className:`native-subagent-row`,children:[(0,O.jsxs)(`div`,{className:`native-subagent-meta`,children:[(0,O.jsxs)(`span`,{className:`native-subagent-badge is-${e.status||`working`}`,children:[e.status===`working`?(0,O.jsx)(be,{size:11,className:`is-spinning`}):(0,O.jsx)(w,{size:11}),n[e.status]||e.status]}),(0,O.jsx)(`strong`,{title:e.role,children:e.role}),e.typeName&&(0,O.jsx)(`small`,{children:e.typeName})]}),e.lastAction&&(0,O.jsx)(`span`,{className:`native-subagent-action`,title:e.lastAction,children:e.lastAction})]},e.id))});return r.length>0?(0,O.jsxs)(`section`,{className:`native-subagents-card is-working`,"aria-label":t(`后台子代理状态`,`Background subagents`),children:[(0,O.jsxs)(`div`,{className:`native-subagents-head`,children:[(0,O.jsx)(be,{size:13,className:`is-spinning`}),(0,O.jsx)(`strong`,{children:t(`后台子代理工作中 · ${r.length} 个运行中`,`Background subagents working · ${r.length} active`)}),i>0&&(0,O.jsx)(`span`,{children:t(` · ${i} 个已完成`,` · ${i} done`)})]}),a]}):(0,O.jsxs)(`details`,{className:`native-subagents-card`,children:[(0,O.jsxs)(`summary`,{className:`native-subagents-head`,children:[(0,O.jsx)(w,{size:13}),(0,O.jsx)(`span`,{children:t(`子代理记录 · ${e.length} 个已完成`,`Subagent history · ${e.length} completed`)})]}),a]})}function sO({entry:e,onChanged:t,onAccounts:n}){let[r,i]=(0,f.useState)(null),[a,o]=(0,f.useState)(null),s=(0,f.useRef)(null),[c,l]=(0,f.useState)(``),[u,d]=(0,f.useState)(!1),[p,m]=(0,f.useState)(``),[h,g]=(0,f.useState)(e.model||``),[_,v]=(0,f.useState)(``),[b,x]=(0,f.useState)(null),[C,w]=(0,f.useState)(e.provider===`claude`?`auto`:`default`),[T,E]=(0,f.useState)(``),[ee,te]=(0,f.useState)(!1),[D,ne]=(0,f.useState)(!!e.managed),re=(0,f.useRef)(null),{tr:ie}=fc(),ae=hE({host:e.host,scope:e.key,onError:E}),oe=tO({provider:e.provider,host:e.host,cwd:e.cwd,sessionId:e.sessionId,draft:p,setDraft:m,disabled:e.host===nE,liveCommands:r?.commands,onLocal:e=>{if(e===`stop`){xe(`stop`);return}let t=re.current?.querySelector(e===`permissions`?`.native-permission-control button`:`.native-model-trigger`);t?.disabled?E(`本轮结束后可调整下一轮的模型、强度和权限。`):t?.click()}}),se=ee||iO.includes(r?.status||``);function ce(e){let t=s.current;if(!t)return;let n=e.controlResults?.find(e=>e.id===t.id);n?(n.status===`rejected`&&(E(n.error||`操作未接收`),t.prompt&&m(t.prompt)),s.current=null,o(null)):iO.includes(e.status)||(E(`本轮已结束,控制请求未确认,请核对后重试`),t.prompt&&m(t.prompt),s.current=null,o(null))}(0,f.useEffect)(()=>{let n=!0,a;async function o(){try{let s=await ED(`/api/cli-conversations?key=${encodeURIComponent(e.key)}`);n&&(i(s),r||(w(s.permissionMode||(e.provider===`claude`?`auto`:`default`)),g(s.model||``),v(s.effort||``)),l(``),ce(s),iO.includes(s.status)?a=setTimeout(o,3e3):t())}catch(t){n&&(e.managed||r)&&(l(t.message),a=setTimeout(o,5e3))}finally{n&&ne(!1)}}return(e.managed||r)&&o(),()=>{n=!1,clearTimeout(a)}},[e.key,e.managed,r?.turns.length]);let le=qD(e,r?.sessionId,r?.status),ue=(0,f.useMemo)(()=>aO(le.history?.subagents||[],r?.subagents||r?.turns.at(-1)?.subagents||[],se),[le.history?.subagents,r?.subagents,r?.turns,se]),de=(0,f.useMemo)(()=>ue.filter(e=>e.status===`working`).length,[ue]),fe=le.refresh;(0,f.useEffect)(()=>{if(se||de===0||!le.available)return;let e=setInterval(()=>{document.hidden||fe()},4e3);return()=>clearInterval(e)},[se,de,le.available,fe]);let{scroll:pe,content:me,onScroll:he,toBottom:ge,older:_e,atBottom:ye}=YD({history:le.history,turns:r?.turns,ready:!D&&(!le.available||!!(le.history||le.error)),working:se});async function xe(t,n={}){if(u||a)return!1;d(!0),E(``);let r=crypto.randomUUID();try{return await ED(`/api/cli-conversations/control`,{key:e.key,id:r,action:t,...n}),s.current={id:r,prompt:t===`message`?String(n.prompt):void 0},o(s.current),!0}catch(e){return E(e.message),!1}finally{d(!1)}}let Se=r?.interactive&&[`running`,`waiting_permission`].includes(r.status);async function Ce(){if(!oe.handleLocal()&&!(!(p.trim()||ae.readyTokens.length>0)||ae.hasUnready||u||a||se&&!Se||e.host===`@local`||!e.cwd)){if(se&&Se){await xe(`message`,{prompt:p,attachments:ae.readyTokens})&&(m(``),ae.clear());return}te(!0),E(``);try{i(await ED(`/api/cli-conversations/send`,{key:e.key,prompt:p,attachments:ae.readyTokens,model:h,effort:_,permissionMode:C})),ge(),m(``),ae.clear(),t()}catch(e){E(e.message)}finally{te(!1)}}}let we=e.host===nE,[Te,Ee]=(0,f.useState)(null),De=we?``:`${e.host}:${e.provider}`;(0,f.useEffect)(()=>{if(!De)return;let t=new AbortController;return fetch(TT(`/api/auth/providers?host=${encodeURIComponent(e.host)}`),{signal:t.signal,cache:`no-store`}).then(async n=>{if(!n.ok)return;let r=await n.json();t.signal.aborted||Ee({key:De,quota:e.provider===`claude`?r.claude?.quota||null:r.antigravity?.quota||null})}).catch(()=>{}),()=>t.abort()},[e.host,e.provider,De]);let Oe=Te?.key===De?Te.quota:null,ke=e.provider===`claude`?`Claude`:`Antigravity`;return(0,O.jsxs)(`section`,{className:`session-conversation native-conversation`,children:[(0,O.jsxs)(`header`,{className:`conversation-header`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`strong`,{title:e.title,children:[(0,O.jsx)(EE,{provider:e.provider}),(0,O.jsx)(`span`,{children:e.title||`${ke} 会话`})]}),(0,O.jsxs)(`small`,{title:`${rE(e.host)} · ${e.cwd||`未记录工作目录`}`,children:[rE(e.host),` · `,e.cwd||`未记录工作目录`,we?` · 本机只读`:``]})]}),n&&!we&&(0,O.jsx)(`div`,{className:`conversation-header-actions`,children:(0,O.jsxs)(`button`,{type:`button`,className:`session-info-trigger`,onClick:n,children:[(0,O.jsx)(ve,{size:14}),(0,O.jsx)(`span`,{children:ie(`账号管理`,`Accounts`)}),(0,O.jsx)(ZE,{quota:Oe})]})})]}),(0,O.jsxs)(`div`,{className:`native-messages-wrap`,children:[(0,O.jsx)(`div`,{className:`native-messages`,ref:pe,onScroll:he,"aria-label":`会话消息`,children:(0,O.jsxs)(`div`,{ref:me,children:[D&&(0,O.jsx)(`p`,{className:`native-note`,children:`正在读取会话…`}),(0,O.jsx)(JD,{host:e.host,cwd:e.cwd,value:{...le,earlier:()=>_e(le.earlier)}}),(e.provider===`antigravity`?KD(le.history?.messages||[],r?.turns||[]):r?.turns||[]).map(t=>(0,O.jsxs)(`div`,{className:`native-turn`,children:[(0,O.jsx)(`div`,{className:`native-message user`,children:(0,O.jsx)(ZT,{value:t.prompt,remoteHost:e.host,remoteCwd:e.cwd})}),t.truncated&&(0,O.jsx)(`p`,{className:`native-note`,children:`过程记录较长,仅显示最近部分;完整记录保留在原生会话中。`}),(0,O.jsx)(rO,{events:t.events||[],partial:t.partial,host:e.host,cwd:e.cwd}),t.status===`stopped`&&(0,O.jsx)(`p`,{className:`native-note`,children:`已停止,保留已产生的消息和操作记录。`}),t.text&&!t.events?.some(e=>e.kind===`assistant`)&&(0,O.jsx)(`div`,{className:`native-message assistant`,children:(0,O.jsx)(ZT,{value:t.text,remoteHost:e.host,remoteCwd:e.cwd})}),t.error&&(0,O.jsxs)(`div`,{className:`form-error native-error`,role:`alert`,children:[t.error,(t.errorCode===`permission_required`||t.error.includes(`操作需要权限`))&&(0,O.jsxs)(`div`,{className:`native-permission-help`,children:[(0,O.jsx)(`p`,{children:`上轮已结束。可在下方调整下一轮权限,再发送继续请求;不会自动重跑上一轮。`}),(0,O.jsx)(`button`,{type:`button`,disabled:se||we,onClick:()=>m(`请继续上一轮未完成的工作,先确认已完成的步骤,避免重复操作。`),children:`填入继续请求`})]})]})]},t.id)),r?.permissions?.map(e=>e.kind===`acp-form`?(0,O.jsx)($D,{fields:e.fields||[],message:e.description,disabled:u||!!a||!Se,respond:(t,n)=>void xe(`permission`,{requestId:e.id,decision:t,content:n})},e.id):(0,O.jsx)(nO,{request:e,provider:ke,disabled:u||!!a||!Se,respond:(t,n,r)=>void xe(`permission`,{requestId:e.id,decision:t,answers:n,optionId:r})},e.id)),(0,O.jsx)(oO,{subagents:ue}),se&&(0,O.jsxs)(`details`,{className:`native-thinking`,children:[(0,O.jsxs)(`summary`,{children:[(0,O.jsx)(be,{size:14,className:`is-spinning`}),(0,O.jsx)(`span`,{children:r?.status===`unknown`?ie(`正在确认远端状态…`,`Checking remote status…`):r?.status===`waiting_permission`?ie(`等待你的审批或回答…`,`Waiting for your approval or reply…`):r?.status===`stopping`?ie(`正在停止…`,`Stopping…`):ie(`正在执行本轮任务…`,`Running current turn…`)}),(0,O.jsx)(`small`,{children:r?.interactive?ie(`过程消息持续更新`,`Live streaming updates`):ie(`完成后返回`,`Returns on completion`)})]}),(0,O.jsx)(`p`,{children:r?.interactive?`可追加消息,当前一轮结束后接着处理;权限请求会在这里等待你的决定。离开页面不会自动批准或停止任务。`:`此任务完成后返回完整回复;离开页面不会中断远端任务。`})]}),(T||c)&&(0,O.jsx)(`p`,{className:`form-error native-error`,role:`alert`,children:T||c})]})}),!ye&&(0,O.jsxs)(`button`,{type:`button`,className:`conversation-jump`,onClick:ge,children:[(0,O.jsx)(y,{size:14}),ie(`回到最新消息`,`Jump to latest`)]})]}),(0,O.jsxs)(`div`,{className:`native-compose-wrap`,children:[(0,O.jsxs)(`form`,{ref:re,className:`native-composer`,onDragOver:ae.onDragOver,onDrop:ae.onDrop,onSubmit:e=>{e.preventDefault(),Ce()},children:[(0,O.jsx)(gE,{attachments:ae.attachments,onRemove:ae.remove}),(0,O.jsx)(_E,{inputRef:ae.inputRef,onFiles:ae.uploadFiles}),oe.panel,(0,O.jsx)(`textarea`,{...oe.inputProps,"aria-label":ie(`发送消息`,`Send message`),placeholder:we?ie(`本机历史记录仅支持只读查看`,`Local history is read-only`):e.cwd?ie(`继续对话…(支持拖拽或粘贴附件)`,`Continue conversation… (drop or paste files)`):ie(`缺少工作目录,暂无法继续发送`,`Working directory is required`),rows:2,disabled:we||!e.cwd,value:p,onChange:e=>m(e.target.value),onPaste:ae.onPaste,onKeyDown:e=>{oe.onKeyDown(e)||e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),Ce())}}),(0,O.jsxs)(`footer`,{children:[(0,O.jsxs)(`span`,{className:`native-provider-badge`,title:ke,children:[(0,O.jsx)(EE,{provider:e.provider}),(0,O.jsx)(`span`,{children:ke})]}),(0,O.jsx)(vE,{compact:!0,uploading:ae.uploading,disabled:we||!e.cwd||se&&!Se,onClick:ae.openPicker}),(0,O.jsx)(AD,{autoSupported:b,provider:e.provider,compact:!0,value:C,onChange:w,disabled:se||we}),(0,O.jsx)(kD,{onAutoSupportChange:x,effort:_,onEffortChange:v,compact:!0,host:e.host,provider:e.provider,value:h,onChange:g,disabled:se||we}),Se&&(0,O.jsx)(`button`,{className:`native-stop`,type:`button`,"aria-label":`停止 ${ke}`,title:`停止当前 SCOPE 任务`,disabled:u||!!a,onClick:()=>void xe(`stop`),children:(0,O.jsx)(Ye,{size:14})}),(0,O.jsx)(`button`,{type:`submit`,"aria-label":ie(`发送消息`,`Send message`),disabled:se&&!Se||u||!!a||!p.trim()&&ae.attachments.length===0||ae.hasUnready||we||!e.cwd,children:(0,O.jsx)(S,{size:16})})]})]}),(0,O.jsx)(`p`,{className:`native-note`,children:we?ie(`本机历史只读 · 新建 Claude / Antigravity 会话请选择远程设备`,`Local history is read-only · Choose a remote host for new Claude / Antigravity sessions`):ie(`${C===`full`?`完全访问 · 跳过权限审批 · `:``}Enter 发送 · Shift + Enter 换行${se&&!r?.interactive?` · 回复在本轮结束后显示`:``}`,`${C===`full`?`Full access · Skipping approvals · `:``}Enter to send · Shift + Enter for newline${se&&!r?.interactive?` · Reply displays after turn finishes`:``}`)})]})]})}function cO({selectedHumanRequests:e,operatorName:t,clockNow:n,planInputDrafts:r,busyAction:i,setPlanInputDrafts:a,respondToHumanRequest:o,elicitationDrafts:s,setElicitationDrafts:c,answerElicitation:l,answerPlanInput:u}){return(0,O.jsx)(O.Fragment,{children:e.length>0&&(0,O.jsxs)(`section`,{className:`detail-section plan-input-section`,children:[(0,O.jsxs)(`div`,{className:`section-title-row`,children:[(0,O.jsx)(`span`,{className:`detail-label`,children:`Codex 待处理`}),(0,O.jsxs)(`span`,{children:[e.length,` 个请求`]})]}),(0,O.jsxs)(`p`,{className:`plan-input-intro`,children:[`需要 `,t,` 确认的请求会显示在这里,按此会话的权限设置执行。答复将直接返回原会话。`]}),(0,O.jsx)(`div`,{className:`plan-input-list`,children:e.map(e=>(0,O.jsxs)(`article`,{className:`plan-input-card`,children:[(0,O.jsxs)(`div`,{className:`plan-input-meta`,children:[(0,O.jsxs)(`span`,{children:[e.title,` · `,e.method]}),(0,O.jsx)(`span`,{children:e.expiresAt?`剩余 ${Math.max(0,Math.ceil((Date.parse(e.expiresAt)-n)/1e3))} 秒`:RT(e.receivedAt)})]}),e.kind===`user-input`&&e.questions?.map(t=>{let n=r[e.key]?.[t.id]||``,o=new Set(t.options?.map(e=>e.label)||[]),s=o.has(n)?``:n;return(0,O.jsx)(QD,{title:t.question,options:t.options||[],secret:t.isSecret,allowOther:t.isOther||!t.options?.length,disabled:e.status!==`pending`||i===`human-response:${e.key}`,value:{selected:o.has(n)?[n]:[],other:s},onChange:n=>a(r=>({...r,[e.key]:{...r[e.key]||{},[t.id]:n.other||n.selected[0]||``}}))},t.id)}),[`command-approval`,`file-change-approval`,`legacy-command-approval`,`legacy-file-change-approval`].includes(e.kind)&&(0,O.jsxs)(`div`,{className:`human-request-body`,children:[e.reason&&(0,O.jsx)(`p`,{className:`human-request-reason`,children:e.reason}),e.command&&(0,O.jsx)(`pre`,{className:`human-request-command`,children:e.command}),(e.cwd||e.grantRoot)&&(0,O.jsxs)(`dl`,{className:`human-request-facts`,children:[e.cwd&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`dt`,{children:`工作目录`}),(0,O.jsx)(`dd`,{children:e.cwd})]}),e.grantRoot&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`dt`,{children:`请求写入根目录`}),(0,O.jsx)(`dd`,{children:e.grantRoot})]})]}),e.fileChanges?.map(e=>(0,O.jsxs)(`details`,{className:`human-request-change`,children:[(0,O.jsxs)(`summary`,{children:[e.type,` · `,e.path]}),(0,O.jsx)(`pre`,{children:e.preview})]},e.path)),!!(e.additionalPermissions||e.networkApprovalContext)&&(0,O.jsxs)(`details`,{className:`human-request-change`,children:[(0,O.jsx)(`summary`,{children:`附加权限详情`}),(0,O.jsx)(`pre`,{children:JSON.stringify(e.additionalPermissions||e.networkApprovalContext,null,2)})]}),(0,O.jsx)(`div`,{className:`human-request-actions`,children:e.decisionOptions?.map(t=>(0,O.jsx)(`button`,{type:`button`,className:`human-request-action ${t.tone}`,title:t.description,disabled:e.status!==`pending`||i===`human-response:${e.key}`,onClick:()=>o(e,{decision:t.value}),children:t.label},t.id))})]}),e.kind===`permissions-approval`&&(0,O.jsxs)(`div`,{className:`human-request-body`,children:[e.reason&&(0,O.jsx)(`p`,{className:`human-request-reason`,children:e.reason}),(0,O.jsxs)(`dl`,{className:`human-request-facts`,children:[(0,O.jsx)(`dt`,{children:`工作目录`}),(0,O.jsx)(`dd`,{children:e.cwd||`未提供`}),(0,O.jsx)(`dt`,{children:`环境`}),(0,O.jsx)(`dd`,{children:e.environmentId||`默认环境`})]}),(0,O.jsx)(`pre`,{className:`human-request-json`,children:JSON.stringify(e.permissions,null,2)}),(0,O.jsx)(`div`,{className:`human-request-actions`,children:e.decisionOptions?.map(t=>(0,O.jsx)(`button`,{type:`button`,className:`human-request-action ${t.tone}`,title:t.description,disabled:e.status!==`pending`||i===`human-response:${e.key}`,onClick:()=>o(e,{choice:t.value}),children:t.label},t.id))})]}),e.kind===`mcp-elicitation`&&(0,O.jsxs)(`div`,{className:`human-request-body`,children:[(0,O.jsxs)(`p`,{className:`human-request-reason`,children:[(0,O.jsx)(`strong`,{children:e.serverName||`MCP Server`}),` · `,e.message||`需要你的输入`]}),e.mode===`url`&&e.url&&(0,O.jsxs)(`a`,{className:`human-request-url`,href:e.url,target:`_blank`,rel:`noreferrer`,children:[(0,O.jsx)(de,{size:14}),`打开 MCP 授权页面`]}),[`form`,`openai/form`].includes(e.mode||``)&&e.fields?.map(t=>{let n=s[e.key]?.[t.name]??t.default??``;if(t.type===`boolean`)return(0,O.jsxs)(`label`,{className:`human-request-checkbox`,children:[(0,O.jsx)(`input`,{type:`checkbox`,checked:!!n,disabled:e.status!==`pending`||i===`human-response:${e.key}`,onChange:n=>c(r=>({...r,[e.key]:{...r[e.key]||{},[t.name]:n.target.checked}}))}),(0,O.jsxs)(`span`,{children:[(0,O.jsx)(`strong`,{children:t.title}),(0,O.jsx)(`small`,{children:t.description})]})]},t.name);if(t.type===`array`&&t.options){let r=Array.isArray(n)?n.map(String):[];return(0,O.jsxs)(`fieldset`,{children:[(0,O.jsx)(`legend`,{children:t.title}),t.description&&(0,O.jsx)(`p`,{children:t.description}),t.options.map(n=>{let a=String(n.value);return(0,O.jsxs)(`label`,{className:`human-request-checkbox`,children:[(0,O.jsx)(`input`,{type:`checkbox`,checked:r.includes(a),disabled:e.status!==`pending`||i===`human-response:${e.key}`,onChange:n=>{let i=n.target.checked?[...r,a]:r.filter(e=>e!==a);c(n=>({...n,[e.key]:{...n[e.key]||{},[t.name]:i}}))}}),(0,O.jsx)(`span`,{children:n.label})]},a)})]},t.name)}return(0,O.jsxs)(`label`,{className:`plan-input-custom`,children:[(0,O.jsxs)(`span`,{children:[t.title,t.required?` *`:``]}),t.options?(0,O.jsxs)(`select`,{value:String(n),disabled:e.status!==`pending`||i===`human-response:${e.key}`,onChange:n=>c(r=>({...r,[e.key]:{...r[e.key]||{},[t.name]:n.target.value}})),children:[(0,O.jsx)(`option`,{value:``,children:`请选择`}),t.options.map(e=>(0,O.jsx)(`option`,{value:String(e.value),children:e.label},String(e.value)))]}):(0,O.jsx)(`input`,{type:t.type===`number`||t.type===`integer`?`number`:t.format===`date`?`date`:t.format===`date-time`?`datetime-local`:`text`,value:String(n),disabled:e.status!==`pending`||i===`human-response:${e.key}`,placeholder:t.description,onChange:n=>c(r=>({...r,[e.key]:{...r[e.key]||{},[t.name]:n.target.value}}))})]},t.name)}),!e.renderable&&(0,O.jsx)(`p`,{className:`plan-input-error`,children:`当前 CLI 返回了无法安全渲染的表单类型;仍可拒绝或取消, 不会让远端 Turn 卡住。`}),(0,O.jsxs)(`div`,{className:`human-request-actions`,children:[(0,O.jsx)(`button`,{type:`button`,className:`human-request-action accept`,disabled:!e.renderable||e.status!==`pending`||i===`human-response:${e.key}`,onClick:()=>l(e,`accept`),children:`接受并提交`}),(0,O.jsx)(`button`,{type:`button`,className:`human-request-action danger`,disabled:e.status!==`pending`||i===`human-response:${e.key}`,onClick:()=>l(e,`decline`),children:`拒绝`}),(0,O.jsx)(`button`,{type:`button`,className:`human-request-action danger`,disabled:e.status!==`pending`||i===`human-response:${e.key}`,onClick:()=>l(e,`cancel`),children:`取消`})]})]}),e.error&&(0,O.jsx)(`p`,{className:`plan-input-error`,children:e.error}),e.kind===`user-input`&&(0,O.jsxs)(`button`,{type:`button`,className:`plan-input-submit`,disabled:e.status!==`pending`||i===`human-response:${e.key}`,onClick:()=>u(e),children:[i===`human-response:${e.key}`?(0,O.jsx)(be,{size:15,className:`is-spinning`}):(0,O.jsx)(Ve,{size:15}),e.status===`disconnected`?`app-server 已断开`:i===`human-response:${e.key}`?`正在回传`:`提交并继续 Codex`]})]},e.key))})]})})}function lO({children:e,className:t}){return(0,O.jsx)(`div`,{className:`chat-compose-surface ${t||``}`,children:e})}function uO({conversation:e=!1,controls:t,onCommand:n,selectedInspectorKey:r,pendingInstruction:i,selectedAgent:a,selectedAppServerSession:o,selectedAgentIsExternalTerminal:s,sendInstruction:c,uploadInstructionFiles:l,instructionAttachments:u,removeInstructionAttachment:d,instructionDraft:p,setInstructionDraft:m,busyAction:h,instructionFileInputRef:g,unarchiveSession:_,selectedRecoveryCwd:v,setRecoveryCwdDrafts:y,selectedRecoveryCwdOptions:b,selectedRecoveryYolo:x,setRecoveryYoloDrafts:S,connectAppServer:C,takeoverSession:w}){let{tr:T}=fc(),E=(0,f.useRef)(null),ee=tO({provider:`codex`,host:a?.host||``,cwd:a?.cwd||``,sessionId:a?.rollout?.id,draft:p,setDraft:m,disabled:!e||!o,onLocal:e=>{if(e===`compact`||e===`stop`){n?.(e);return}E.current?.querySelector(e===`permissions`?`.composer-permission`:`.composer-model`)?.click()}});function te(){a&&!ee.handleLocal()&&c(a)}return a?(0,O.jsx)(e?lO:QT,{title:`继续对话`,defaultOpen:!0,meta:i?.key===NT(a)?`等待回复 · ${RT(i.sentAt)}`:o?`app-server`:a.pane?`tmux:${a.pane.session}`:s?`外部终端:${a.tty||`unknown`}`:`尚未接管`,className:`session-reply-section ${o||a.pane?`is-live`:``}`,children:o||a.pane?(0,O.jsxs)(`form`,{ref:E,className:`session-reply-composer`,onSubmit:e=>{e.preventDefault(),te()},onDragOver:e=>{e.dataTransfer.types.includes(`Files`)&&(e.preventDefault(),e.dataTransfer.dropEffect=`copy`)},onDrop:e=>{e.dataTransfer.files.length&&(e.preventDefault(),l(a,Array.from(e.dataTransfer.files)))},children:[u.length>0&&(0,O.jsx)(`div`,{className:`instruction-attachment-list`,children:u.map(e=>(0,O.jsxs)(`div`,{className:`instruction-attachment is-${e.status}`,title:e.error||e.remotePath||e.name,children:[e.previewUrl?(0,O.jsx)(`img`,{src:e.previewUrl,alt:``}):e.kind===`image`?(0,O.jsx)(ge,{size:17}):(0,O.jsx)(fe,{size:17}),(0,O.jsxs)(`span`,{children:[(0,O.jsx)(`strong`,{children:e.name}),(0,O.jsxs)(`small`,{children:[zT(e.size),` ·`,` `,e.status===`uploading`?T(`正在上传`,`Uploading`):e.status===`error`?T(`上传失败`,`Failed`):T(`已就绪`,`Ready`)]})]}),e.status===`uploading`?(0,O.jsx)(be,{size:14,className:`is-spinning`}):(0,O.jsx)(`button`,{type:`button`,"aria-label":T(`移除附件 ${e.name}`,`Remove ${e.name}`),onClick:()=>d(e.localId),children:(0,O.jsx)(it,{size:14})})]},e.localId))}),ee.panel,(0,O.jsx)(`textarea`,{...ee.inputProps,"aria-label":T(`发送消息`,`Send message`),maxLength:2e4,rows:3,value:p,placeholder:o?T(`继续聊聊,或者交给我一个任务…`,`Continue chatting or assign a task…`):T(`发送消息到当前会话…`,`Send a message to this session…`),onChange:e=>m(e.target.value),onPaste:e=>{e.clipboardData.files.length&&l(a,Array.from(e.clipboardData.files))},onKeyDown:t=>{ee.onKeyDown(t)||t.key===`Enter`&&!t.nativeEvent.isComposing&&(e?!t.shiftKey:t.ctrlKey||t.metaKey)&&(p.trim()||u.length>0)&&u.every(e=>e.status===`ready`)&&h!==`instruct:${NT(a)}`&&(t.preventDefault(),te())}}),(0,O.jsxs)(`div`,{className:`session-reply-actions`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`secondary-action attachment-picker`,disabled:u.some(e=>e.status===`uploading`),onClick:()=>g.current?.click(),children:[(0,O.jsx)(ke,{size:15}),T(`附件`,`Attach`)]}),(0,O.jsx)(`input`,{ref:g,className:`visually-hidden`,type:`file`,multiple:!0,onChange:e=>{let t=Array.from(e.target.files||[]);t.length&&l(a,t)}}),t,(0,O.jsxs)(`button`,{type:`submit`,className:`primary-action`,"aria-label":T(`发送消息`,`Send message`),disabled:!p.trim()&&u.length===0||u.some(e=>e.status!==`ready`)||h===`instruct:${NT(a)}`,children:[h===`instruct:${NT(a)}`?(0,O.jsx)(be,{size:15,className:`is-spinning`}):(0,O.jsx)(Ve,{size:15}),T(`发送`,`Send`)]})]})]}):(0,O.jsxs)(`div`,{className:`session-recovery-panel`,children:[(0,O.jsx)(`p`,{className:`session-reply-unavailable`,children:s?`该 Codex 仍在外部终端 ${a.tty||`unknown`} 中运行。SCOPE 不会终止或劫持它;请回到原 VS Code/SSH terminal 继续。正常退出原 CLI 后,才能在这里恢复同一 Session。`:a.historical&&HT(a.cwd)?`原目录 ${a.cwd} 是临时目录;恢复时不会再使用它。`:`选择恢复目录和运行通道后,将恢复同一个 Session 与 Dialogue。`}),a.rollout?.archived&&(0,O.jsxs)(`div`,{className:`session-archive-recovery`,children:[(0,O.jsx)(`p`,{children:`该 Session 是被旧版“关闭”按钮错误归档的;日志仍在远端归档目录中。`}),(0,O.jsxs)(`button`,{type:`button`,className:`secondary-action`,disabled:h===`unarchive:${NT(a)}`,onClick:()=>_(a),children:[h===`unarchive:${NT(a)}`?(0,O.jsx)(be,{size:15,className:`is-spinning`}):(0,O.jsx)(Fe,{size:15}),`恢复 Session 日志`]})]}),a.historical&&(0,O.jsxs)(`label`,{className:`session-recovery-cwd`,children:[(0,O.jsx)(`span`,{children:`恢复到工作目录`}),(0,O.jsx)(`input`,{required:!0,list:`scope-recovery-cwds-${a.rollout?.id||`session`}`,placeholder:`/persistent/path/to/project`,value:v,onChange:e=>y(t=>({...t,[NT(a)]:e.target.value}))}),(0,O.jsx)(`datalist`,{id:`scope-recovery-cwds-${a.rollout?.id||`session`}`,children:b.map(e=>(0,O.jsx)(`option`,{value:e},e))}),(0,O.jsx)(`small`,{children:`已优先建议同项目的持久目录;后端会先验证目录存在。`})]}),(0,O.jsxs)(`label`,{className:`session-recovery-cwd`,children:[(0,O.jsx)(`span`,{children:`恢复执行策略`}),(0,O.jsxs)(`select`,{value:x?`yolo`:`guarded`,onChange:e=>S(t=>({...t,[NT(a)]:e.target.value===`yolo`})),children:[(0,O.jsx)(`option`,{value:`yolo`,children:`YOLO(不审批、完整权限)`}),(0,O.jsx)(`option`,{value:`guarded`,children:`受控(按需审批、仅工作区可写)`})]})]}),(0,O.jsxs)(`div`,{className:`session-recovery-actions`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`primary-action`,disabled:!a.rollout||!a.historical&&!a.appServerManaged||a.historical&&!v.trim()||!!a.rollout?.archived||h===`app-server:${NT(a)}`||h===`takeover:${NT(a)}`,onClick:()=>C(a),children:[h===`app-server:${NT(a)}`?(0,O.jsx)(be,{size:15,className:`is-spinning`}):(0,O.jsx)(Ce,{size:15}),`恢复到 App Server`]}),(0,O.jsxs)(`button`,{type:`button`,className:`secondary-action`,disabled:!a.rollout||!a.historical&&!a.appServerManaged||a.historical&&!v.trim()||!!a.rollout?.archived||h===`app-server:${NT(a)}`||h===`takeover:${NT(a)}`,onClick:()=>w(a),children:[h===`takeover:${NT(a)}`?(0,O.jsx)(be,{size:15,className:`is-spinning`}):(0,O.jsx)(Je,{size:15}),`恢复到 tmux`]})]})]})},`${r}:reply`):null}function dO(e){return(0,O.jsx)(fO,{...e},`${e.host}:${e.sessionId}`)}function fO({host:e,sessionId:t,assignment:n,url:r,onChanged:i}){let[a,o]=(0,f.useState)(null),[s,c]=(0,f.useState)(``),[l,u]=(0,f.useState)(``),[d,p]=(0,f.useState)(!1),[m,h]=(0,f.useState)(0),g=n||a?.assignment;(0,f.useEffect)(()=>{let n=new AbortController;return fetch(r(`/api/session/profile?host=${encodeURIComponent(e)}&sessionId=${encodeURIComponent(t)}`),{signal:n.signal,cache:`no-store`}).then(async e=>{let t=await e.json();if(!e.ok)throw Error(t.error||`读取会话账号失败`);n.signal.aborted||(u(``),o(t),c(t.assignment?.desiredProfile||t.activeProfile||``))}).catch(e=>{n.signal.aborted||u(e.message)}),()=>n.abort()},[e,t,r,m,n?.verifiedAt]);async function _(n){p(!0),u(``);try{let a=await fetch(r(`/api/session/profile`),{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({host:e,sessionId:t,slug:s,action:n})}),c=await a.json();if(!a.ok)throw Error(c.error||`切换失败`);o(e=>e&&{...e,assignment:c.assignment}),c.assignment?.status===`failed`&&u(c.assignment.error),i(),h(e=>e+1)}catch(e){u(e.message)}finally{p(!1)}}return(0,O.jsxs)(`div`,{className:`session-profile-control`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`strong`,{children:`此会话账号`}),(0,O.jsxs)(`p`,{children:[`绑定:`,g?.profile||`未固定(使用主机默认)`,` · 实际账号:`,a?.account?.email||`尚未核实`,a?.account?.planType?` · ${a.account.planType}`:``]})]}),(0,O.jsxs)(`label`,{children:[(0,O.jsx)(`span`,{children:`固定 Profile`}),(0,O.jsxs)(`select`,{value:s,onChange:e=>c(e.target.value),disabled:d||!a||!!g?.handoff,children:[(0,O.jsx)(`option`,{value:``,children:`请选择账号`}),a?.profiles.map(e=>(0,O.jsxs)(`option`,{value:e.slug,disabled:!e.ready,children:[e.name||e.slug,e.account?.email?` · ${e.account.email}`:``,e.ready?``:`(未登录)`]},e.slug))]})]}),(0,O.jsx)(`button`,{className:`inline-action`,type:`button`,disabled:d||!s||g?.status===`switching`||!!g?.handoff,onClick:()=>_(),children:d?`正在处理…`:`仅应用到此会话`}),(0,O.jsx)(`button`,{className:`inline-action`,type:`button`,disabled:d,onClick:()=>h(e=>e+1),children:`核实账号`}),g&&[`queued`,`failed`,`waiting-writer`].includes(g.status)&&(0,O.jsx)(`button`,{className:`inline-action`,type:`button`,disabled:d,onClick:()=>_(`cancel`),children:`取消待切换`}),(0,O.jsx)(`p`,{children:`执行中会等待本轮结束;固定后不跟随主机切换,也不自动换用其他账号。`}),g?.status===`queued`&&(0,O.jsxs)(`p`,{role:`status`,children:[`等待本轮结束或待处理问题解决后,切换到 `,g.desiredProfile,`。`]}),g?.status===`switching`&&(0,O.jsxs)(`p`,{role:`status`,children:[`正在切换到 `,g.desiredProfile,`…`]}),g?.status===`waiting-writer`&&(0,O.jsxs)(`p`,{role:`status`,children:[`等待旧账号释放写入锁,再恢复到 `,g.desiredProfile,`。Codex 默认需连续 30 分钟无活动;后台每 30 秒检查一次,不会重新加载旧会话。`,g.handoff?.releasedAt?` 已于 ${new Date(g.handoff.releasedAt).toLocaleTimeString()} 取消旧连接订阅。`:``,`等待期间暂停发送指令;取消交接可恢复原账号。`]}),(l||g?.error||a?.accountError)&&(0,O.jsx)(`p`,{role:`alert`,children:l||g?.error||a?.accountError})]})}var pO={none:`无`,minimal:`最低`,low:`低`,medium:`中`,high:`高`,xhigh:`极高`,max:`最高`,ultra:`极限`},mO={none:`None`,minimal:`Min`,low:`Low`,medium:`Med`,high:`High`,xhigh:`XHigh`,max:`Max`,ultra:`Ultra`};function hO({workspace:e}){let{locale:t,tr:n}=fc(),r=t===`en`?mO:pO,i=e.selectedAgent,a=e.selectedAppServerSession,[o,s]=(0,f.useState)(null),[c,l]=(0,f.useState)(null),[u,d]=(0,f.useState)(null),[p,m]=(0,f.useState)({key:``,seq:0}),h=(0,f.useRef)(null),g=i?.host||``,_=a?.profileAssignment?.status===`applied`&&a.profileAssignment.profile?`profile:${a.profileAssignment.profile}`:`active`,v=`${g}:${_}`,y=!!(g&&e.snapshot.hosts.find(e=>e.alias===g)?.reachable),b=g&&e.snapshot.appServer.connections.find(e=>e.host===g&&(e.connectionKey||`active`)===_)?.rateLimits||null,x=a?.rateLimits||b,S=!!x,C=p.key===v?p.seq:0,w=`${v}:${C}`;if((0,f.useEffect)(()=>{if(!o)return;let e=e=>{h.current?.contains(e.target)||s(null)},t=e=>{e.key===`Escape`&&(s(null),h.current?.querySelector(`[aria-expanded="true"]`)?.focus())};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[o]),(0,f.useEffect)(()=>{if(!g||!y||S&&C===0)return;let e=new AbortController,t=`/api/auth/quota?host=${encodeURIComponent(g)}&connectionKey=${encodeURIComponent(_)}${C>0?`&refresh=1`:``}`;return fetch(TT(t),{signal:e.signal,cache:`no-store`}).then(async t=>{let n=await t.json();if(!e.signal.aborted){if(!t.ok)throw Error(n.error||`读取账号额度失败`);d({requestKey:w,quota:n.quota||null,error:n.error||``})}}).catch(t=>{e.signal.aborted||d({requestKey:w,quota:null,error:t.message})}),()=>e.abort()},[g,_,y,S,C,w]),!i)return null;let T=u?.requestKey.startsWith(`${v}:`)?u:null,E=(C>0?T?.quota:null)||x||T?.quota||KE(i.rollout?.account),D=!!(y&&(!S||C>0)&&u?.requestKey!==w),ne=qE(E),re=NT(i),ie=i.rollout?WT(i.host,i.rollout.id,e.modelCatalogConnectionKey):i.host,ae=e.modelsByHost[ie],oe={model:a?.model||i.rollout?.model||``,effort:a?.effort||i.rollout?.reasoningEffort||``,yolo:a?.yolo??IT(i,e.snapshot.management)},se=JSON.stringify(oe),ce=c?.source===se?c:oe,le=ae?.find(e=>e.id===ce.model),ue=e.busyAction===`model:${re}`,de=!!(a||i.pane&&i.status!==`working`)&&!a?.profileAssignment?.handoff;async function fe(t){!i||ue||!de||await e.changeSessionModel(i,t)&&(l({...t,source:se}),e.setModelDrafts(e=>({...e,[re]:t.model})),e.setEffortDrafts(e=>({...e,[re]:t.effort})),e.setYoloDrafts(e=>({...e,[re]:t.yolo})),s(null))}function pe(e){s(t=>t===e?null:e)}return(0,O.jsxs)(`div`,{className:`composer-controls`,ref:h,children:[(0,O.jsxs)(`button`,{type:`button`,className:`composer-permission ${ce.yolo?`full-access`:``}`,"aria-label":n(`选择权限`,`Select permissions`),"aria-expanded":o===`permission`,onClick:()=>pe(`permission`),children:[ce.yolo?(0,O.jsx)(Ge,{size:14}):(0,O.jsx)(We,{size:14}),(0,O.jsx)(`span`,{children:ce.yolo?n(`完全访问`,`Full access`):n(`工作区权限`,`Workspace`)}),(0,O.jsx)(te,{size:12})]}),(0,O.jsxs)(`button`,{type:`button`,className:`composer-quota is-${YE(ne)}`,"aria-label":n(`查看账号剩余额度`,`View account quota`),"aria-expanded":o===`account`,onClick:()=>pe(`account`),children:[D&&!ne?(0,O.jsx)(be,{size:13,className:`is-spinning`}):(0,O.jsx)(he,{size:13}),(0,O.jsx)(`span`,{children:ne?n(`剩余 ${ne.remainingPercent}%`,`${ne.remainingPercent}% left`):E?.credits?.unlimited?n(`无限额度`,`Unlimited`):E?.credits?.balance?n(`点数 ${E.credits.balance}`,`Credits ${E.credits.balance}`):D?n(`额度…`,`Quota…`):n(`额度`,`Quota`)})]}),(0,O.jsxs)(`button`,{type:`button`,className:`composer-model`,"aria-label":n(`选择模型与推理强度`,`Select model & reasoning effort`),"aria-expanded":o===`model`,onClick:()=>pe(`model`),children:[ue?(0,O.jsx)(be,{size:14,className:`is-spinning`}):null,(0,O.jsx)(`span`,{children:le?.displayName||ce.model||n(`选择模型`,`Select model`)}),(0,O.jsx)(`small`,{children:r[ce.effort]||ce.effort}),(0,O.jsx)(te,{size:12})]}),o&&(0,O.jsxs)(`section`,{className:`composer-popover panel-${o}`,role:`dialog`,"aria-label":o===`model`?`模型与推理强度`:o===`permission`?`会话权限`:`会话账号`,children:[(0,O.jsxs)(`header`,{children:[(0,O.jsx)(`strong`,{children:o===`model`?`模型与推理强度`:o===`permission`?`会话权限`:`会话账号`}),(0,O.jsx)(`button`,{type:`button`,"aria-label":`关闭设置菜单`,onClick:()=>s(null),children:(0,O.jsx)(it,{size:16})})]}),o===`model`&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`composer-model-list`,role:`group`,"aria-label":`可用模型`,children:[!ae&&!e.modelErrors[ie]&&(0,O.jsx)(`p`,{className:`composer-menu-note`,children:`正在读取此账号的可用模型…`}),ae?.length===0&&(0,O.jsx)(`p`,{className:`composer-menu-note`,children:`此账号暂未返回可用模型。`}),ae?.map(e=>(0,O.jsxs)(`button`,{type:`button`,"aria-pressed":e.id===ce.model,disabled:ue||!de,onClick:()=>void fe({...ce,model:e.id,effort:e.supportedReasoningEfforts.includes(ce.effort)?ce.effort:e.defaultReasoningEffort||e.supportedReasoningEfforts[0]||``}),children:[(0,O.jsx)(`span`,{children:e.displayName||e.id}),e.id===ce.model&&(0,O.jsx)(ee,{size:15})]},e.id))]}),le&&le.supportedReasoningEfforts.length>0&&(0,O.jsxs)(`div`,{className:`composer-efforts`,children:[(0,O.jsx)(`span`,{children:`推理强度`}),(0,O.jsx)(`div`,{children:le.supportedReasoningEfforts.map(e=>(0,O.jsx)(`button`,{type:`button`,"aria-pressed":e===ce.effort,disabled:ue||!de,onClick:()=>void fe({...ce,effort:e}),children:r[e]||e},e))})]}),e.modelErrors[ie]&&(0,O.jsx)(`p`,{className:`composer-menu-error`,role:`alert`,children:e.modelErrors[ie]}),(0,O.jsxs)(`footer`,{children:[(0,O.jsxs)(`button`,{type:`button`,onClick:()=>e.reloadModelsForHost(i.host),children:[(0,O.jsx)(Fe,{size:13}),`刷新`]}),(0,O.jsxs)(`button`,{type:`button`,onClick:()=>s(`account`),children:[(0,O.jsx)(et,{size:13}),`账号与额度`]})]})]}),o===`permission`&&(0,O.jsxs)(`div`,{className:`composer-permission-list`,children:[[{yolo:!1,title:`工作区权限`,text:`可修改工作目录;越界操作按需审批。`},{yolo:!0,title:`完全访问`,text:`允许访问主机文件和网络,不请求工具审批。`}].map(e=>(0,O.jsxs)(`button`,{type:`button`,"aria-pressed":e.yolo===ce.yolo,disabled:ue||!a||!de||!le,onClick:()=>void fe({...ce,yolo:e.yolo}),children:[(0,O.jsxs)(`span`,{children:[(0,O.jsx)(`strong`,{children:e.title}),(0,O.jsx)(`small`,{children:e.text})]}),e.yolo===ce.yolo&&(0,O.jsx)(ee,{size:15})]},String(e.yolo))),!a&&(0,O.jsx)(`p`,{className:`composer-menu-note`,children:`终端会话请在恢复时选择权限。`}),a&&!le&&(0,O.jsx)(`p`,{className:`composer-menu-note`,children:`先读取可用模型,再切换权限。`})]}),o===`account`&&(0,O.jsxs)(`div`,{className:`composer-account-panel`,children:[(0,O.jsx)($E,{quota:E,loading:D,error:T?.error,onRefresh:()=>m(e=>({key:v,seq:e.key===v?e.seq+1:1}))}),(0,O.jsx)(`div`,{className:`composer-account-actions`,children:(0,O.jsxs)(`button`,{type:`button`,className:`inline-action`,onClick:()=>{s(null),e.openAccountProfiles()},children:[(0,O.jsx)(ve,{size:13}),`账号管理`]})}),a&&i.host!==`@local`&&(0,O.jsx)(dO,{host:i.host,sessionId:a.sessionId,assignment:a.profileAssignment,url:TT,onChanged:()=>{e.reloadModelsForHost(i.host),m(e=>({key:v,seq:e.key===v?e.seq+1:1}))}})]}),o!==`account`&&!de&&(0,O.jsx)(`p`,{className:`composer-menu-note`,children:`恢复会话或等待当前操作结束后可更改设置。`}),o!==`account`&&a?.status===`working`&&(0,O.jsx)(`p`,{className:`composer-menu-note`,children:`更改从下一轮回复生效。`})]})]})}function gO(e){let t=[],n=new Set;for(let r of e)if(!n.has(r.id))if(n.add(r.id),r.kind===`user`||r.kind===`error`||r.kind===`assistant`&&(r.phase===`commentary`||r.category!==`reasoning`))t.push({type:`message`,id:r.id,event:r});else{let e=t.at(-1);e?.type===`activity`?e.events.push(r):t.push({type:`activity`,id:r.id,events:[r]})}return t}function _O(e,t){if(!e||e.sessionId!==t.sessionId||e.host!==t.host)return t;let n=new Map(e.events.map(e=>[e.id,e]));t.events.forEach(e=>n.set(e.id,e));let r=e.nextBefore!==null&&t.nextBefore!==null&&e.nextBefore<t.nextBefore,i=e.hasMore===!1;return{...t,events:[...n.values()],hasMore:i?!1:r?e.hasMore:t.hasMore,nextBefore:i?null:r?e.nextBefore:t.nextBefore}}function vO(e,t){return t.latestAssistant?e.baselineAssistantId!==void 0&&t.latestAssistantId?t.latestAssistantId!==e.baselineAssistantId:t.latestAssistant!==e.baselineAssistant:!1}function yO({events:e,host:t,cwd:n,loading:r,error:i,working:a,hasMore:o,loadingMore:s,onOlder:c,onRetry:l,children:u,sentAt:d}){let p=(0,f.useRef)(null),m=(0,f.useRef)(null),h=(0,f.useRef)(!0),g=(0,f.useRef)(null),[_,v]=(0,f.useState)(!1);function b(){let e=p.current;e&&(e.scrollTop=e.scrollHeight),h.current=!0,v(!1)}(0,f.useLayoutEffect)(()=>{let e=p.current;e&&(g.current?(e.scrollTop=g.current.top+e.scrollHeight-g.current.height,g.current=null):h.current?e.scrollTop=e.scrollHeight:v(!0))},[e,a]),(0,f.useEffect)(()=>{let e=new ResizeObserver(()=>{h.current&&p.current&&(p.current.scrollTop=p.current.scrollHeight)});return m.current&&e.observe(m.current),()=>e.disconnect()},[]),(0,f.useLayoutEffect)(()=>{!d||!p.current||(h.current=!0,p.current.scrollTop=p.current.scrollHeight,v(!1))},[d]);async function x(){let e=p.current;e&&(g.current={height:e.scrollHeight,top:e.scrollTop}),h.current=!1,await c(),requestAnimationFrame(()=>{g.current=null})}let S=gO(e),C=a&&S.at(-1)?.type===`activity`;return(0,O.jsxs)(`div`,{className:`conversation-feed-wrap`,children:[(0,O.jsx)(`div`,{className:`conversation-feed`,ref:p,"aria-label":`会话消息`,onScroll:e=>{let t=e.currentTarget;h.current=t.scrollHeight-t.scrollTop-t.clientHeight<80,h.current&&v(!1)},children:(0,O.jsxs)(`div`,{className:`conversation-messages`,ref:m,children:[o&&(0,O.jsxs)(`button`,{className:`conversation-history`,disabled:s,onClick:()=>void x(),children:[s?(0,O.jsx)(be,{size:14,className:`is-spinning`}):(0,O.jsx)(te,{size:14}),`加载更早消息`]}),r&&!e.length&&(0,O.jsxs)(`p`,{className:`conversation-state`,children:[(0,O.jsx)(be,{size:16,className:`is-spinning`}),`正在读取对话…`]}),!r&&!i&&!e.length&&(0,O.jsxs)(`div`,{className:`conversation-intro`,children:[(0,O.jsx)(`h2`,{children:`从这里继续。`}),(0,O.jsx)(`p`,{children:`发送一条消息,开始这个项目的工作。`})]}),S.map((e,r)=>e.type===`message`?(0,O.jsx)(bO,{event:e.event,host:t,cwd:n},e.id):(0,O.jsx)(mE,{events:e.events,active:a&&r===S.length-1,host:t,cwd:n},e.id)),i&&(0,O.jsxs)(`div`,{className:`conversation-error`,role:`alert`,children:[(0,O.jsx)(`span`,{children:i}),(0,O.jsx)(`button`,{onClick:l,children:`重新读取`})]}),a&&!C&&(0,O.jsxs)(`div`,{className:`conversation-working`,role:`status`,children:[(0,O.jsx)(be,{size:15,className:`is-spinning`}),`正在思考`]}),u]})}),_&&(0,O.jsxs)(`button`,{className:`conversation-jump`,onClick:b,children:[(0,O.jsx)(y,{size:14}),`回到最新消息`]})]})}function bO({event:e,host:t,cwd:n}){let[r,i]=(0,f.useState)(!1),[a,o]=(0,f.useState)(!1),s=e.kind===`assistant`&&e.phase===`commentary`;return(0,O.jsxs)(`article`,{className:`conversation-message message-${e.kind}${s?` message-progress`:``}`,children:[e.kind!==`user`&&!s&&(0,O.jsx)(`span`,{className:`conversation-author`,children:e.kind===`error`?`执行遇到问题`:`Codex`}),(0,O.jsx)(`div`,{className:`conversation-message-body`,children:(0,O.jsx)(ZT,{value:e.text,remoteHost:t,remoteCwd:n})}),!s&&(0,O.jsxs)(`div`,{className:`conversation-message-actions`,children:[(0,O.jsxs)(`button`,{"aria-label":`复制消息`,title:e.timestamp||`复制消息`,onClick:async()=>{try{await navigator.clipboard.writeText(e.text),i(!0),o(!1)}catch{o(!0)}},children:[r?(0,O.jsx)(ee,{size:14}):(0,O.jsx)(ce,{size:14}),r&&`已复制`]}),a&&(0,O.jsx)(`small`,{role:`status`,children:`复制失败,请选中文本复制`})]})]})}function xO({workspace:e,onTools:t}){let{tr:n}=fc(),[r,i]=(0,f.useState)(!1),{selectedAgent:a,selectedDialogue:o,selectedAppServerSession:s,selectedProject:c}=e,l=a?.status===`working`||s?.status===`working`||!!(a&&e.pendingInstruction?.key===NT(a));async function u(){if(!(!a?.rollout||r)){i(!0);try{let t=await fetch(TT(`/api/session/interrupt`),{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({host:a.host,sessionId:a.rollout.id})}),n=await t.json();if(!t.ok)throw Error(n.error||`停止失败`);e.setPendingInstruction(null),e.setActionNotice({kind:`success`,text:`已停止生成,可以继续发送消息。`}),e.setDialogueRefresh(e=>e+1)}catch(t){e.setActionNotice({kind:`error`,text:t.message})}finally{i(!1)}}}return a?(0,O.jsxs)(`section`,{className:`session-conversation`,"aria-label":n(`项目对话`,`Project conversation`),children:[(0,O.jsxs)(`header`,{className:`conversation-header`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h1`,{children:e.selectedSummary?.theme||a.title||n(`新会话`,`New session`)}),(0,O.jsxs)(`small`,{title:a.cwd,children:[c?.name||a.cwd.split(`/`).pop(),` · `,rE(a.host),e.selectedAgentIsExternalTerminal?n(` · 外部终端 · 持续监控`,` · External terminal · Read-only`):``]})]}),(0,O.jsxs)(`div`,{className:`conversation-header-actions`,children:[a.rollout&&!a.historical&&(()=>{let t=NT(a),r=!!e.snapshot.management.sessions[t]?.reserved,i=e.busyAction===`reserve:${t}`;return(0,O.jsxs)(`button`,{type:`button`,className:`session-reserve-trigger ${r?`active`:``}`,disabled:i,"aria-pressed":r,onClick:()=>void e.toggleSessionReserved(a),title:n(`设为保留后不会因超出设备常驻池而被自动释放(适合带 Timer 或长期等待的会话)`,`Reserved sessions stay pinned when the host resident pool overflows`),children:[i?(0,O.jsx)(be,{size:13,className:`is-spinning`}):(0,O.jsx)(je,{size:13}),(0,O.jsx)(`span`,{children:r?n(`常驻保留`,`Reserved`):n(`设为保留`,`Pin`)})]})})(),(0,O.jsxs)(`button`,{type:`button`,className:`session-info-trigger`,onClick:t,"aria-label":n(`会话信息`,`Session info`),children:[(0,O.jsx)(_e,{size:14}),(0,O.jsx)(`span`,{children:n(`会话信息`,`Session info`)})]})]})]}),(0,O.jsx)(yO,{sentAt:e.pendingInstruction?.key===NT(a)?e.pendingInstruction.sentAt:void 0,events:o?.events||[],host:a.host,cwd:a.cwd,loading:e.selectedDialoguePending,error:e.selectedDialogueError,working:l&&!e.selectedHumanRequests.length,hasMore:!!o?.hasMore,loadingMore:e.dialogueLoadingMore,onOlder:e.loadOlderDialogue,onRetry:()=>e.setDialogueRefresh(e=>e+1),children:(0,O.jsx)(cO,{...e})},NT(a)),(0,O.jsxs)(`div`,{className:`conversation-bottom`,children:[l&&s&&(0,O.jsxs)(`button`,{className:`conversation-stop`,disabled:r,onClick:()=>void u(),children:[(0,O.jsx)(Ye,{size:12}),r?`正在停止…`:`停止生成`]}),(0,O.jsx)(uO,{...e,conversation:!0,onCommand:t=>{t===`stop`?u():t===`compact`&&e.compactSession(a)},controls:(0,O.jsx)(hO,{workspace:e})}),(0,O.jsx)(`p`,{className:`conversation-caption`,children:s?n(`Enter 发送 · Shift + Enter 换行`,`Enter to send · Shift + Enter for newline`):a.pane?n(`消息发送到当前终端 · Enter 发送`,`Send to active terminal · Enter to send`):e.selectedAgentIsExternalTerminal?n(`正在监控原终端会话 · 请在原终端输入`,`Watching external terminal · Reply in original terminal`):n(`恢复会话后即可继续对话`,`Resume session to continue chatting`)})]})]}):(0,O.jsxs)(`section`,{className:`session-conversation conversation-empty`,children:[(0,O.jsx)(`header`,{className:`conversation-header`,children:(0,O.jsx)(`strong`,{children:c?.name||n(`项目会话`,`Project Sessions`)})}),(0,O.jsxs)(`div`,{className:`conversation-start`,children:[(0,O.jsx)(we,{size:30,strokeWidth:1.4}),(0,O.jsx)(`h1`,{children:c?n(`在 ${c.name} 开始工作`,`Work in ${c.name}`):n(`继续你的工作。`,`Continue your work.`)}),(0,O.jsx)(`p`,{children:n(`从左侧选择一段对话,或新建一个会话。`,`Select a conversation on the left, or start a new session.`)}),(0,O.jsxs)(`button`,{className:`center-primary`,onClick:()=>e.openNewTask(c||void 0),children:[(0,O.jsx)(Pe,{size:16}),n(`新建会话`,`New session`)]})]})]})}function SO({workspace:e,onClose:t}){let{tr:n}=fc(),r=(0,f.useRef)(null);(0,f.useEffect)(()=>{r.current?.showModal()},[]);let i=e.selectedAgent,a=e.selectedAppServerSession,o=i?NT(i):``,s=e.busyAction,c=(i?e.snapshot.hosts.find(e=>e.alias===i.host):null)?.gpus||[],l=i?.subagents||[],u=e.selectedAgentGpuUsage||[],d=i&&(e.selectedSummary?.theme||i.title)||n(`会话信息`,`Session Info`),p=a?.profileAssignment?.status===`applied`&&a.profileAssignment.profile?`profile:${a.profileAssignment.profile}`:`active`,m=i?a?.rateLimits||e.snapshot.appServer.connections.find(e=>e.host===i.host&&(e.connectionKey||`active`)===p)?.rateLimits||KE(i.rollout?.account):null;return(0,O.jsxs)(`dialog`,{ref:r,className:`workspace-tools-dialog`,onCancel:t,onClick:e=>{e.target===e.currentTarget&&t()},children:[(0,O.jsxs)(`header`,{children:[(0,O.jsxs)(`div`,{className:`session-drawer-head`,children:[(0,O.jsx)(`strong`,{title:d,children:d}),i&&(0,O.jsx)(`span`,{className:`session-drawer-status is-${i.status}`,children:OT[i.status]})]}),(0,O.jsx)(`button`,{type:`button`,"aria-label":n(`关闭会话信息`,`Close`),onClick:t,children:(0,O.jsx)(it,{size:16})})]}),(0,O.jsx)(`div`,{className:`session-drawer-body`,children:i?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`section`,{className:`session-drawer-card`,children:[(0,O.jsxs)(`h3`,{children:[(0,O.jsx)(Ze,{size:14}),n(`位置与终端`,`Location & Terminal`)]}),(0,O.jsxs)(`div`,{className:`session-drawer-kv`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:n(`运行主机`,`Host`)}),(0,O.jsxs)(`strong`,{children:[rE(i.host),i.hostname&&i.hostname!==i.host?` · ${i.hostname}`:``]})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:n(`工作目录`,`Directory`)}),(0,O.jsx)(`code`,{title:i.cwd,children:i.cwd})]}),i.rollout?.id&&(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`Session ID`}),(0,O.jsx)(`code`,{children:i.rollout.id})]})]}),(0,O.jsxs)(`div`,{className:`session-drawer-actions`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`inline-action`,onClick:()=>void e.copy(i.cwd,`drawer-cwd`),children:[e.copied===`drawer-cwd`?(0,O.jsx)(ee,{size:13}):(0,O.jsx)(ce,{size:13}),n(`复制路径`,`Copy path`)]}),i.host!==`@local`&&(0,O.jsxs)(`button`,{type:`button`,className:`inline-action`,onClick:()=>{t(),e.openWebTerminal()},children:[(0,O.jsx)(Je,{size:13}),n(`SSH 终端`,`SSH Terminal`)]}),i.rollout?.id&&i.host!==`@local`&&(0,O.jsxs)(`button`,{type:`button`,className:`inline-action`,onClick:()=>void e.copy(i.pane?KT(i):qT(i),`drawer-cmd`),children:[e.copied===`drawer-cmd`?(0,O.jsx)(ee,{size:13}):(0,O.jsx)(ce,{size:13}),i.pane?n(`复制 Attach`,`Copy attach`):n(`复制 Resume`,`Copy resume`)]})]})]}),(0,O.jsxs)(`section`,{className:`session-drawer-card`,children:[(0,O.jsxs)(`h3`,{children:[(0,O.jsx)(Ce,{size:14}),n(`连接与会话操作`,`Channel & Controls`)]}),(0,O.jsx)(`p`,{className:`session-drawer-note`,children:a?n(`当前通道:App Server 托管会话`,`Channel: Managed App Server`):i.pane?n(`当前通道:tmux (${i.pane.session})`,`Channel: tmux (${i.pane.session})`):e.selectedAgentIsExternalTerminal?n(`当前通道:外部终端 (${i.tty||`只读监控`})`,`Channel: External terminal (${i.tty||`read-only`})`):n(`当前为历史会话(未接管)`,`Historical session (detached)`)}),(0,O.jsxs)(`div`,{className:`session-drawer-actions`,children:[i.rollout&&(a||i.pane)&&(0,O.jsxs)(`button`,{type:`button`,className:`inline-action`,disabled:s===`compact:${o}`,onClick:()=>void e.compactSession(i),children:[s===`compact:${o}`?(0,O.jsx)(be,{size:13,className:`is-spinning`}):(0,O.jsx)(Te,{size:13}),n(`压缩上下文`,`Compact context`)]}),i.rollout&&!a&&(i.historical||i.appServerManaged)&&(0,O.jsxs)(`button`,{type:`button`,className:`inline-action`,disabled:i.historical&&!e.selectedRecoveryCwd||s===`app-server:${o}`,onClick:()=>void e.connectAppServer(i),children:[s===`app-server:${o}`?(0,O.jsx)(be,{size:13,className:`is-spinning`}):(0,O.jsx)(Ce,{size:13}),n(`接入 App Server`,`Connect App Server`)]}),i.rollout&&!i.pane&&i.host!==`@local`&&(i.historical||i.appServerManaged)&&(0,O.jsxs)(`button`,{type:`button`,className:`inline-action`,disabled:a?.status===`working`||i.historical&&!e.selectedRecoveryCwd||s===`takeover:${o}`,onClick:()=>void e.takeoverSession(i),children:[s===`takeover:${o}`?(0,O.jsx)(be,{size:13,className:`is-spinning`}):(0,O.jsx)(Je,{size:13}),n(`切到 tmux`,`Move to tmux`)]}),i.rollout&&!i.historical&&(()=>{let t=!!e.snapshot.management.sessions[o]?.reserved;return(0,O.jsxs)(`button`,{type:`button`,className:`inline-action ${t?`is-reserved`:``}`,disabled:s===`reserve:${o}`,"aria-pressed":t,onClick:()=>void e.toggleSessionReserved(i),title:n(`设为保留后不会因超出设备常驻池被自动断开`,`Prevent automatic eviction when the host resident pool overflows`),children:[s===`reserve:${o}`?(0,O.jsx)(be,{size:13,className:`is-spinning`}):(0,O.jsx)(je,{size:13}),t?n(`常驻保留中(点击取消)`,`Reserved (click to unpin)`):n(`设为常驻保留`,`Keep resident`)]})})(),i.appServerManaged&&(0,O.jsxs)(`button`,{type:`button`,className:`inline-action`,disabled:a?.status===`offline`||s===`close:${o}`,onClick:()=>{t(),e.closeSession(i)},children:[s===`close:${o}`?(0,O.jsx)(be,{size:13,className:`is-spinning`}):(0,O.jsx)(oe,{size:13}),n(`断开托管`,`Detach session`)]})]})]}),m&&(0,O.jsxs)(`section`,{className:`session-drawer-card`,children:[(0,O.jsxs)(`h3`,{children:[(0,O.jsx)(he,{size:14}),n(`订阅账号额度`,`Subscription Quota`)]}),(0,O.jsx)($E,{quota:m,compact:!0})]}),(c.length>0||u.length>0||l.length>0)&&(0,O.jsxs)(`section`,{className:`session-drawer-card`,children:[(0,O.jsxs)(`h3`,{children:[(0,O.jsx)(le,{size:14}),n(`实时负载与子代理`,`Host GPUs & Subagents`)]}),c.length>0&&(0,O.jsx)(`div`,{className:`session-drawer-gpus`,children:c.map(e=>(0,O.jsxs)(`div`,{className:`session-drawer-gpu`,children:[(0,O.jsxs)(`span`,{children:[`GPU `,e.index,` · `,e.name]}),(0,O.jsxs)(`small`,{children:[e.utilization,`% · `,Math.round(e.memoryUsed/1024),`/`,Math.round(e.memoryTotal/1024),` GiB`]})]},e.index))}),u.length>0&&(0,O.jsx)(`div`,{className:`session-drawer-gpus`,children:u.slice(0,4).map(e=>(0,O.jsxs)(`div`,{className:`session-drawer-gpu`,children:[(0,O.jsxs)(`span`,{children:[`GPU `,e.gpuIndex,` · `,e.kind]}),(0,O.jsx)(`small`,{title:e.command,children:e.command})]},e.id))}),l.length>0&&(0,O.jsx)(`p`,{className:`session-drawer-note`,children:n(`当前挂载 ${l.length} 个子代理`,`${l.length} subagent(s) recorded`)})]})]}):(0,O.jsx)(`p`,{className:`session-drawer-empty`,children:n(`请先从左侧选择一条会话。`,`Select a conversation from the left sidebar first.`)})})]})}function CO({submissionTrackerOpen:e,setSubmissionTrackerOpen:t,submissionTracker:n,submissionWindowDays:r,setSubmissionWindowDays:i,refreshSubmissions:a,dlcCallCounts:o,submissionCounts:s,submissionWindowLabel:c,submissionHostFailures:l,auditedDlcCalls:u,locateSubmission:d,setShowDlcCandidates:f,showDlcCandidates:p,copy:m,copied:h}){return(0,O.jsx)(O.Fragment,{children:e&&(0,O.jsx)(`div`,{className:`modal-backdrop`,role:`presentation`,onMouseDown:e=>{e.target===e.currentTarget&&t(!1)},children:(0,O.jsxs)(`section`,{className:`submission-modal`,"aria-label":`实验提交归属追踪`,children:[(0,O.jsxs)(`div`,{className:`submission-modal-head`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h2`,{children:`DLC 调用与实验归属`}),(0,O.jsxs)(`p`,{children:[`提交主机:`,n.targetHostname||`未启用`,` · 关联会话、Job 与运行状态。可在设置中更改。`]})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`select`,{"aria-label":`DLC 提交追踪时间范围`,value:r,disabled:n.scanning,onChange:e=>{let t=Number(e.target.value);i(t),a(t)},children:[(0,O.jsx)(`option`,{value:1,children:`最近 24 小时`}),(0,O.jsx)(`option`,{value:7,children:`最近 7 天`}),(0,O.jsx)(`option`,{value:14,children:`最近 14 天`}),(0,O.jsx)(`option`,{value:30,children:`最近 30 天`}),(0,O.jsx)(`option`,{value:90,children:`最近 90 天`}),(0,O.jsx)(`option`,{value:0,children:`全部历史`})]}),(0,O.jsxs)(`button`,{type:`button`,className:`secondary-action`,disabled:n.scanning,onClick:()=>a(),children:[(0,O.jsx)(Fe,{size:14,className:n.scanning?`is-spinning`:``}),n.scanning?`扫描中`:`刷新`]}),(0,O.jsx)(`button`,{type:`button`,"aria-label":`关闭提交追踪`,onClick:()=>t(!1),children:(0,O.jsx)(it,{size:17})})]})]}),(0,O.jsxs)(`div`,{className:`submission-summary`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`精确提交尝试`}),(0,O.jsx)(`strong`,{children:o.actual})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`已关联 Job`}),(0,O.jsx)(`strong`,{children:n.items.length})]}),(0,O.jsxs)(`div`,{className:`failed`,children:[(0,O.jsx)(`span`,{children:`失败 / 终止`}),(0,O.jsx)(`strong`,{children:s.failed})]}),(0,O.jsxs)(`div`,{className:`queued`,children:[(0,O.jsx)(`span`,{children:`排队`}),(0,O.jsx)(`strong`,{children:s.queued})]}),(0,O.jsxs)(`div`,{className:`running`,children:[(0,O.jsx)(`span`,{children:`运行中`}),(0,O.jsx)(`strong`,{children:s.running})]}),(0,O.jsx)(`small`,{children:n.scannedAt?`${c} · 更新于 ${RT(n.scannedAt)}`:n.scanning?`正在扫描${r?`最近 ${r} 天`:`全部历史`}…`:`尚未扫描`})]}),(0,O.jsxs)(`div`,{className:`submission-modal-body`,children:[n.alerts.map(e=>(0,O.jsxs)(`div`,{className:`submission-alert`,children:[(0,O.jsx)($e,{size:17}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`strong`,{children:e.sessionTheme}),(0,O.jsxs)(`span`,{children:[e.failed,`/`,e.total,` 已失败或终止`,e.queued>0?`,但仍有 ${e.queued} 个排队项`:`,整批任务达到高失败率`,` `,`· `,e.host,` · Session `,e.sessionId.slice(0,8)]})]})]},`${e.host}:${e.sessionId}`)),n.error&&(0,O.jsxs)(`div`,{className:`submission-empty error`,children:[(0,O.jsx)($e,{size:16}),n.error]}),l.length>0&&(0,O.jsxs)(`div`,{className:`submission-scan-warning`,children:[(0,O.jsx)($e,{size:16}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`strong`,{children:`本次结果不完整`}),l.map(e=>(0,O.jsxs)(`span`,{children:[e.host,`:`,e.error]},e.host))]})]}),n.calls.length>0&&(0,O.jsxs)(`details`,{className:`dlc-call-audit`,open:!0,children:[(0,O.jsxs)(`summary`,{children:[(0,O.jsx)(`span`,{children:`完整 DLC 调用审计`}),(0,O.jsxs)(`strong`,{children:[o.actual,` 次精确提交尝试 ·`,` `,u.explicitAttempts.length,` 次显式 wrapper 尝试 · `,o.candidates,` 条待复核证据`]})]}),(0,O.jsx)(`p`,{children:"直接 CLI 和 Python subprocess 调用按工具 call_id 记录;提交脚本只有观察到 SUBMITTING 或 Job ID 才计入精确提交尝试。仅带 `--submit` 的 wrapper 会保留为显式尝试, 不冒充底层 `dlc submit` 已执行。"}),(0,O.jsx)(`div`,{className:`dlc-call-list`,children:u.confirmed.map(e=>(0,O.jsxs)(`article`,{className:`dlc-call-row ${e.outcome===`failed`||e.outcome===`unresolved`?`failed`:e.outcome===`submitted`?`submitted`:e.outcome===`inspection`||e.outcome===`dry-run`?`inspection`:`unknown`}`,children:[(0,O.jsxs)(`div`,{className:`dlc-call-head`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`strong`,{children:[kT[e.invocationKind],e.isSubagent?` · subagent`:``]}),(0,O.jsxs)(`span`,{children:[e.host,` · `,RT(e.timestamp),` ·`,` `,e.callId||`rollout line ${e.line}`]})]}),(0,O.jsx)(`span`,{children:AT[e.outcome]})]}),(0,O.jsxs)(`div`,{className:`dlc-call-owner`,children:[(0,O.jsx)(`strong`,{children:e.sessionTheme}),(0,O.jsx)(`code`,{children:e.sessionId}),e.parentThreadId&&(0,O.jsxs)(`small`,{children:[`parent `,e.parentThreadId]}),(0,O.jsx)(JT,{host:e.host,cwd:e.cwd})]}),(0,O.jsxs)(`div`,{className:`dlc-call-metrics`,children:[(0,O.jsxs)(`span`,{children:[`观察调用 `,e.observedInvocations,e.syntacticInvocations===e.observedInvocations?``:`(静态 ${e.syntacticInvocations})`]}),(0,O.jsxs)(`span`,{children:[`exit`,` `,e.exitCode===null?`unknown`:e.exitCode]}),(0,O.jsxs)(`span`,{children:[`Job `,e.jobIds.length||`未解析`]}),(0,O.jsxs)(`small`,{children:[e.rolloutPath,`:`,e.line,e.resultLine?` → output:${e.resultLine}`:``]})]}),e.jobIds.length>0&&(0,O.jsx)(`div`,{className:`dlc-call-jobs`,children:e.jobIds.map(e=>(0,O.jsx)(`code`,{children:e},e))}),(0,O.jsxs)(`details`,{children:[(0,O.jsx)(`summary`,{children:`命令与返回证据`}),e.command&&(0,O.jsx)(`code`,{children:e.command}),e.resultEvidence&&(0,O.jsx)(`pre`,{children:e.resultEvidence})]}),(0,O.jsxs)(`button`,{type:`button`,onClick:()=>d(e),children:[(0,O.jsx)(C,{size:13}),e.active?`打开调用 Session`:`在 History 定位`]})]},`${e.host}:${e.id}`))}),u.candidates.length>0&&(0,O.jsxs)(`details`,{className:`launch-evidence dlc-call-candidates`,onToggle:e=>f(e.currentTarget.open),children:[(0,O.jsxs)(`summary`,{children:[`查看未计入精确提交尝试的 wrapper、帮助与 dry-run(`,u.candidates.length,`)`]}),(0,O.jsxs)(`p`,{children:[`其中 `,u.explicitAttempts.length," 条带有 `--submit` / `SUBMIT=1` 等显式提交参数,但没有 Job 或 SUBMITTING 输出;所有记录均保留用于人工复核,不占“精确提交尝试” 计数。"]}),p&&u.candidates.map(e=>(0,O.jsxs)(`div`,{className:`dlc-candidate-row`,children:[(0,O.jsx)(`span`,{children:AT[e.outcome]}),(0,O.jsxs)(`strong`,{children:[e.host,` · `,e.sessionTheme,` ·`,` `,kT[e.invocationKind]]}),(0,O.jsxs)(`small`,{children:[RT(e.timestamp),` ·`,` `,e.callId||`rollout line ${e.line}`]}),(0,O.jsx)(`code`,{children:e.command})]},`${e.host}:${e.id}`))]})]}),n.items.length>0?(0,O.jsx)(`div`,{className:`submission-list`,children:n.items.slice(0,100).map(e=>{let t=BT(e.status);return(0,O.jsxs)(`article`,{children:[(0,O.jsxs)(`div`,{className:`submission-job-head`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`strong`,{children:e.name}),(0,O.jsx)(`code`,{children:e.jobId})]}),(0,O.jsx)(`span`,{className:t,children:e.status||`Unknown`})]}),(0,O.jsxs)(`div`,{className:`submission-owner`,children:[(0,O.jsx)(`span`,{children:`提交 Session`}),(0,O.jsx)(`strong`,{children:e.sessionTheme}),(0,O.jsxs)(`code`,{children:[e.host,` · `,e.sessionId]}),(0,O.jsx)(JT,{host:e.host,cwd:e.cwd})]}),(0,O.jsxs)(`div`,{className:`submission-job-meta`,children:[(0,O.jsx)(`span`,{children:RT(e.submittedAt)}),(0,O.jsx)(`span`,{children:e.active?`Session 仍活动`:`Session 已结束`}),(0,O.jsx)(`span`,{children:e.ownershipSource===`output-only`?`仅输出证据,归属待核对`:`命令与返回值精确归属`}),(0,O.jsx)(`span`,{children:e.reason||`无 ReasonCode`})]}),e.message&&(0,O.jsx)(`p`,{className:`submission-message`,children:e.message}),(0,O.jsxs)(`details`,{children:[(0,O.jsx)(`summary`,{children:`原始提交证据`}),(0,O.jsx)(`code`,{children:e.evidence}),(0,O.jsxs)(`small`,{children:[e.rolloutPath,`:`,e.line]})]}),(0,O.jsxs)(`div`,{className:`submission-card-actions`,children:[(0,O.jsxs)(`button`,{type:`button`,onClick:()=>d(e),children:[(0,O.jsx)(C,{size:13}),e.active?`打开提交 Session`:`在 History 定位`]}),(0,O.jsxs)(`button`,{type:`button`,onClick:()=>m(e.sessionId,`submission-${e.jobId}`),children:[h===`submission-${e.jobId}`?(0,O.jsx)(ee,{size:13}):(0,O.jsx)(ce,{size:13}),`复制 Session ID`]})]})]},`${e.host}:${e.jobId}`)})}):(0,O.jsxs)(`div`,{className:`submission-empty`,children:[n.scanning?(0,O.jsx)(be,{size:18,className:`is-spinning`}):(0,O.jsx)(E,{size:18}),(0,O.jsx)(`strong`,{children:n.scanning?`正在建立 Job → Session 归属链`:`${c}内没有解析到 DLC Job`}),(0,O.jsx)(`span`,{children:`扫描不会提交、取消或修改任何远端任务。`})]}),n.launches.length>0&&(0,O.jsxs)(`details`,{className:`launch-evidence`,children:[(0,O.jsxs)(`summary`,{children:[`其他训练/调度命令证据(`,n.launches.length,`)`]}),n.launches.slice(0,30).map((e,t)=>(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:e.kind}),(0,O.jsxs)(`strong`,{children:[e.host,` · `,e.sessionId.slice(0,8),` ·`,` `,RT(e.timestamp)]}),(0,O.jsx)(`code`,{children:e.command})]},`${e.host}:${e.sessionId}:${e.timestamp}:${t}`))]})]})]})})})}function wO({setMobileHostsOpen:e,setOperatorNameDraft:t,operatorName:n,setOperatorEditorOpen:r,operatorEditorOpen:i,saveOperatorName:a,operatorNameDraft:o,busyAction:s,uiTheme:c,bridgeState:l,toggleUiTheme:u,pendingHumanRequests:d,snapshot:f,focusHumanRequest:p,openNewTask:m,selectedProject:h,submissionTracker:g,refreshSubmissions:_,setSubmissionTrackerOpen:v,openWebTerminal:y,openAccountProfiles:x,refresh:S,setResearchAssistantOpen:C,section:w,onNavigate:T,onOpenSettings:ee}){let{locale:te,toggleLocale:D,tr:ne}=fc();return(0,O.jsxs)(`header`,{className:`monitor-topbar`,children:[(0,O.jsxs)(`div`,{className:`scope-wordmark`,children:[(0,O.jsx)(`button`,{className:`mobile-host-toggle`,"aria-label":`打开主机列表`,onClick:()=>e(!0),children:(0,O.jsx)(Oe,{size:18})}),(0,O.jsx)(`span`,{className:`scope-mark`,children:(0,O.jsx)(lt,{size:25})}),(0,O.jsx)(`strong`,{children:`SCOPE`}),(0,O.jsx)(`em`,{children:ne(`跨项目工作台`,`Agent Workbench`)}),(0,O.jsxs)(`div`,{className:`operator-control`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`operator-name`,title:`修改显示名称`,onClick:()=>{t(n),r(e=>!e)},children:[n,(0,O.jsx)(Ae,{size:11})]}),i&&(0,O.jsxs)(`form`,{className:`operator-editor`,onSubmit:a,children:[(0,O.jsx)(`label`,{htmlFor:`operator-name-input`,children:`显示名称`}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`input`,{id:`operator-name-input`,autoFocus:!0,maxLength:40,value:o,onChange:e=>t(e.target.value)}),(0,O.jsx)(`button`,{type:`submit`,"aria-label":`保存显示名称`,disabled:s===`operator-name`||!o.trim(),children:(0,O.jsx)(ze,{size:13})}),(0,O.jsx)(`button`,{type:`button`,"aria-label":`取消修改显示名称`,onClick:()=>r(!1),children:(0,O.jsx)(it,{size:13})})]})]})]})]}),(0,O.jsxs)(`div`,{className:`topbar-right`,children:[w&&w!==`projects`&&T&&(0,O.jsxs)(`button`,{type:`button`,className:`topbar-nav-btn`,onClick:()=>T(`projects`),children:[(0,O.jsx)(b,{size:14}),(0,O.jsx)(`span`,{children:ne(`返回会话`,`Sessions`)})]}),ee&&(0,O.jsxs)(`button`,{type:`button`,className:`topbar-nav-btn ${w===`settings`?`active`:``}`,"aria-label":ne(`打开设置`,`Open settings`),onClick:()=>w===`settings`&&T?T(`projects`):ee(`general`),children:[(0,O.jsx)(Ue,{size:14}),(0,O.jsx)(`span`,{children:ne(`设置`,`Settings`)})]}),(0,O.jsx)(`button`,{type:`button`,className:`theme-toggle`,style:{width:`auto`,padding:`0 8px`,fontSize:11,fontWeight:600},"aria-label":te===`zh-CN`?`Switch to English`:`切换为中文`,title:te===`zh-CN`?`Switch to English`:`切换为中文`,onClick:D,children:te===`zh-CN`?`EN`:`中`}),(0,O.jsx)(`button`,{type:`button`,className:`theme-toggle`,"aria-label":c===`dark`?ne(`切换到浅色主题`,`Switch to light theme`):ne(`切换到深色主题`,`Switch to dark theme`),title:c===`dark`?ne(`切换到浅色主题`,`Switch to light theme`):ne(`切换到深色主题`,`Switch to dark theme`),onClick:u,children:c===`dark`?(0,O.jsx)(Xe,{size:15}):(0,O.jsx)(Ee,{size:15})}),(0,O.jsxs)(`details`,{className:`system-status-menu`,children:[(0,O.jsxs)(`summary`,{className:`connection-badge system-status-summary`,children:[(0,O.jsx)(nt,{size:13}),` `,ne(`系统状态`,`Status`)]}),(0,O.jsxs)(`div`,{className:`system-status-popover`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`SSH Bridge`}),(0,O.jsx)(`strong`,{className:l===`connected`?`is-healthy`:``,children:l===`connected`?ne(`已连接`,`Connected`):ne(`重连中`,`Reconnecting`)})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:ne(`交互通道`,`Interactive`)}),(0,O.jsx)(`strong`,{children:l===`connected`?d.length?`${d.length} ${ne(`条待处理`,`pending`)}`:ne(`监控与人工请求正常`,`Healthy`):ne(`等待服务恢复`,`Waiting for bridge`)})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:ne(`邮件通知`,`Email alerts`)}),(0,O.jsx)(`strong`,{children:f.notifications?.email.configured?`${ne(`已启用`,`Active`)} · ${f.notifications.email.to.join(`, `)}`:f.notifications?.email.lastError||ne(`尚未配置`,`Not configured`)}),ee&&(0,O.jsx)(`button`,{type:`button`,className:`secondary-action`,style:{marginTop:6,padding:`4px 8px`,fontSize:11},onClick:()=>ee(`email`),children:ne(`配置邮件`,`Configure`)})]}),(0,O.jsxs)(`div`,{className:`system-status-path`,children:[(0,O.jsx)(`span`,{children:`SSH Config`}),(0,O.jsx)(`code`,{title:f.sshConfig,children:f.sshConfig})]})]})]}),d.length>0&&(0,O.jsxs)(`button`,{type:`button`,className:`connection-badge pending-input-badge`,onClick:()=>p(d[0]),children:[(0,O.jsx)(ae,{size:13}),`待处理 `,d.length]}),(0,O.jsxs)(`button`,{className:`new-task-button`,onClick:()=>m(h),children:[(0,O.jsx)(Pe,{size:15}),ne(`新建会话`,`New session`)]}),(0,O.jsxs)(`details`,{className:`topbar-more`,children:[(0,O.jsxs)(`summary`,{"aria-label":ne(`更多工具`,`More tools`),children:[ne(`更多`,`More`),g.alerts.length>0&&(0,O.jsx)(`i`,{"aria-label":ne(`提交追踪有告警`,`Submission alerts`)})]}),(0,O.jsxs)(`div`,{className:`topbar-more-menu`,onClick:e=>e.currentTarget.parentElement?.removeAttribute(`open`),children:[(0,O.jsxs)(`button`,{type:`button`,onClick:()=>C(!0),children:[(0,O.jsx)(Be,{size:15}),` `,ne(`检索历史工作`,`Search history`)]}),g.targetHostname&&(0,O.jsxs)(`button`,{type:`button`,onClick:()=>{!g.scannedAt&&!g.scanning?_():v(!0)},children:[(0,O.jsx)(E,{size:15}),` `,ne(`提交追踪`,`Job tracker`),g.alerts.length>0&&(0,O.jsx)(`small`,{children:ne(`有告警`,`Alerts`)})]}),(0,O.jsxs)(`button`,{type:`button`,onClick:y,children:[(0,O.jsx)(Je,{size:15}),` `,ne(`SSH 终端`,`SSH Terminal`)]}),(0,O.jsxs)(`button`,{type:`button`,onClick:x,children:[(0,O.jsx)(ve,{size:15}),` `,ne(`主机账号`,`Accounts`)]}),(0,O.jsxs)(`button`,{type:`button`,onClick:S,children:[(0,O.jsx)(Fe,{size:15,className:f.scanning?`is-spinning`:``}),f.scanning?ne(`扫描中`,`Scanning`):ne(`立即扫描`,`Scan now`)]})]})]})]})]})}var TO=e({activateAuthProfile:()=>MO,closeDeviceLogin:()=>AO,deleteAuthProfile:()=>jO,loadAccountProfiles:()=>DO,openAccountProfiles:()=>EO,restartHostSessionsForAccount:()=>NO,saveCurrentAccountProfile:()=>OO,startDeviceLogin:()=>kO});function EO({selectedAgent:e,hostFilter:t,snapshot:n,accountHostRef:r,setAccountHost:i,setAccountProfiles:a,setDeviceLoginJob:o,setAuthRestartJob:s,setProfileNameDraft:c,setAccountProfilesOpen:l},u){let d=typeof u==`string`&&u||e?.host||(t===`all`?``:t)||n.hosts.find(e=>e.reachable&&e.alias!==`@local`)?.alias||n.hosts.find(e=>e.reachable)?.alias||``;r.current=d,i(d),a(null),o(null),s(null),c(``),l(!0)}async function DO({accountHost:e,accountHostRef:t,accountProfilesRequestRef:n,setAccountProfilesLoading:r,getJson:i,setAccountProfiles:a,setAuthRestartJob:o,setActionNotice:s},c=e){if(!c||c!==t.current)return;let l=++n.current,u=()=>l===n.current&&c===t.current;r(!0);try{let e=await i(`/api/auth/profiles?host=${encodeURIComponent(c)}`);if(!u())return;a(e),o(e.restartJob||null)}catch(e){u()&&s({kind:`error`,text:e.message})}finally{u()&&r(!1)}}async function OO({accountHost:e,profileNameDraft:t,setBusyAction:n,postJson:r,setProfileNameDraft:i,loadAccountProfiles:a,setActionNotice:o}){if(!(!e||!t.trim())){n(`profile-save-current`);try{await r(`/api/auth/profiles/save`,{host:e,profileName:t.trim()}),i(``),await a(e),o({kind:`success`,text:`已在 ${e} 远端保存当前账号 Profile;凭据未经过浏览器。`})}catch(e){o({kind:`error`,text:e.message})}finally{n(``)}}}async function kO({accountHost:e,profileNameDraft:t,setBusyAction:n,postJson:r,setDeviceLoginJob:i,setActionNotice:a}){if(!(!e||!t.trim())){n(`profile-device-login`);try{i(await r(`/api/auth/login/start`,{host:e,profileName:t.trim()})),a({kind:`success`,text:`Device auth 已在 ${e} 启动,请复制一次性代码完成登录。`})}catch(e){a({kind:`error`,text:e.message})}finally{n(``)}}}async function AO({deviceLoginJob:e,setDeviceLoginJob:t,setBusyAction:n,postJson:r,loadAccountProfiles:i,setActionNotice:a}){if(e){if(![`starting`,`waiting`].includes(e.status)){t(null);return}n(`profile-device-cancel`);try{await r(`/api/auth/login/cancel`,{jobId:e.id}),t(null),await i(e.host),a({kind:`success`,text:`${e.profile.name} 的 Device Auth 已取消。`})}catch(e){a({kind:`error`,text:e.message})}finally{n(``)}}}async function jO({accountHost:e,setBusyAction:t,postJson:n,setDeviceLoginJob:r,loadAccountProfiles:i,setActionNotice:a},o){if(!(!e||o.active)&&window.confirm(`从 SSH 主机 ${e} 永久删除 Profile“${o.name}”?只删除这套远端登录凭据,不会退出当前账号,也不会重启 Session。`)){t(`profile-delete:${o.slug}`);try{await n(`/api/auth/profiles/delete`,{host:e,slug:o.slug,confirmation:`${e}:${o.slug}`}),r(t=>t?.host===e&&t.profile.slug===o.slug?null:t),await i(e),a({kind:`success`,text:`${o.name} 已从 ${e} 删除;当前账号和运行中的 Session 未改变。`})}catch(e){a({kind:`error`,text:e.message})}finally{t(``)}}}async function MO({accountHost:e,setBusyAction:t,postJson:n,loadAccountProfiles:r,reloadModelsForHost:i,setActionNotice:a},o){if(!(!e||o.active)){t(`profile-activate:${o.slug}`);try{await n(`/api/auth/profiles/activate`,{host:e,slug:o.slug,name:o.name,account:o.account}),await r(e),i(e),a({kind:`success`,text:`${e} 新 App Server 会话默认使用 ${o.name};现有会话及终端账号保持不变,无需重启。`})}catch(e){a({kind:`error`,text:e.message})}finally{t(``)}}}async function NO({accountHost:e,accountProfiles:t,setBusyAction:n,postJson:r,setAuthRestartJob:i,setActionNotice:a}){if(!e)return;let o=t?.runningSessions||0;if(window.confirm(`只重启 SSH 主机 ${e} 上可安全确认的 ${o} 个 Codex Session?当前 turn 会被中断;训练/评测进程不会主动终止。`)){n(`profile-restart-host`);try{i(await r(`/api/auth/restart`,{host:e,confirmation:e}))}catch(e){a({kind:`error`,text:e.message}),n(``)}}}var PO=e({browseNewTaskDirectory:()=>IO,chooseNewTaskDirectory:()=>LO,clearInstructionAttachments:()=>VO,createTask:()=>RO,openNewTask:()=>FO,removeInstructionAttachment:()=>BO,saveNewTaskRuntimeConfig:()=>zO,sendInstruction:()=>UO,uploadInstructionFiles:()=>HO});function FO({snapshot:e,hostFilter:t,setNewTaskDraft:n,setNewTaskDirectoryBrowser:r,setNewTaskOpen:i},a){let o=e.hosts.find(e=>e.alias===(a?.host||t)&&e.reachable)||(a?void 0:e.hosts.find(e=>e.reachable)),s=a?.cwd||o&&(o.defaultCwd||o.agents.find(e=>e.cwd)?.cwd||o.sessions.find(e=>e.cwd)?.cwd)||``,c=FT(e.management,a?.host||o?.alias||``);n({host:a?.host||o?.alias||``,cwd:s,prompt:``,model:``,effort:``,preLaunchCommand:c.preLaunchCommand,yolo:c.yolo,transport:`app-server`}),r({open:!1,loading:!1,error:``,listing:null}),i(!0)}async function IO({newTaskDraft:e,setNewTaskDirectoryBrowser:t},n){let r=n||e.cwd.trim()||``;if(!e.host){t({open:!0,loading:!1,error:`请先选择 SSH 主机。`,listing:null});return}t(e=>({...e,open:!0,loading:!0,error:``}));try{let n=await fetch(TT(`/api/remote/directories?host=${encodeURIComponent(e.host)}&path=${encodeURIComponent(r)}`),{cache:`no-store`}),i=await n.json();if(!n.ok)throw Error(i.error||`HTTP ${n.status}`);t({open:!0,loading:!1,error:``,listing:i})}catch(e){t(t=>({...t,open:!0,loading:!1,error:e.message}))}}function LO({setNewTaskDraft:e,setNewTaskDirectoryBrowser:t},n){e(e=>({...e,cwd:n})),t(e=>({...e,open:!1,error:``}))}async function RO({setBusyAction:e,setActionNotice:t,postJson:n,newTaskDraft:r,setNewTaskOpen:i,setViewMode:a,setHostFilter:o,setCwdFilter:s,setSelectedAgentId:c,refresh:l},u=[]){e(`create-task`),t(null);try{let e=await n(`/api/session/create`,{...r,...u.length?{attachments:u}:{}});return i(!1),a(`agents`),o(r.host),s(e.session.cwd),e.transport===`app-server`&&c(`app-server:${r.host}:${e.session.sessionId}`),t({kind:`success`,text:`会话已创建。`}),window.setTimeout(()=>l(),900),!0}catch(e){return t({kind:`error`,text:e.message}),!1}finally{e(``)}}async function zO({newTaskDraft:e,setBusyAction:t,setActionNotice:n,postJson:r,refresh:i}){if(e.host){t(`runtime-config:${e.host}`),n(null);try{await r(`/api/runtime/config`,{host:e.host,preLaunchCommand:e.preLaunchCommand,yolo:e.yolo}),n({kind:`success`,text:`已保存 ${e.host} 的启动配置;没有重启或终止任何现有进程。`}),window.setTimeout(()=>i(),500)}catch(e){n({kind:`error`,text:e.message})}finally{t(``)}}}function BO({setInstructionAttachments:e},t){e(e=>{let n=e.find(e=>e.localId===t);return n?.previewUrl&&URL.revokeObjectURL(n.previewUrl),e.filter(e=>e.localId!==t)})}function VO({setInstructionAttachments:e,instructionFileInputRef:t}){e(e=>{for(let t of e)t.previewUrl&&URL.revokeObjectURL(t.previewUrl);return[]}),t.current&&(t.current.value=``)}async function HO({instructionAttachments:e,setActionNotice:t,instructionAttachmentOwnerRef:n,setInstructionAttachments:r,instructionFileInputRef:i},a,o){if(!a.rollout||!o.length)return;if(e.some(e=>e.status===`uploading`)){t({kind:`error`,text:`上一批附件仍在上传,请稍候。`});return}let s=NT(a);n.current=s;let c=e.reduce((e,t)=>e+t.size,0),l=Math.max(0,8-e.length),u=[],d=[];for(let e of o){if(!l){d.push(`${e.name}:每条消息最多 8 个附件`);continue}if(e.size>52428800){d.push(`${e.name}:单个文件不能超过 50 MiB`);continue}if(c+e.size>104857600){d.push(`${e.name}:附件总大小不能超过 100 MiB`);continue}let t=globalThis.crypto?.randomUUID?.()||`${Date.now()}-${Math.random().toString(16).slice(2)}`,n=e.type.startsWith(`image/`)?URL.createObjectURL(e):``,r={localId:t,name:e.name||`attachment`,mimeType:e.type||`application/octet-stream`,size:e.size,kind:e.type.startsWith(`image/`)?`image`:`file`,status:`uploading`,token:``,remotePath:``,previewUrl:n,error:``};u.push({file:e,attachment:r}),c+=e.size,--l}u.length&&r(e=>[...e,...u.map(({attachment:e})=>e)]),d.length?t({kind:`error`,text:d.join(`;`)}):t(null);for(let{file:e,attachment:t}of u)try{let i=new URLSearchParams({host:a.host,sessionId:a.rollout.id,name:e.name||`attachment`,mimeType:e.type||`application/octet-stream`}),o=await fetch(TT(`/api/session/attachment?${i.toString()}`),{method:`POST`,headers:{"Content-Type":`application/octet-stream`},body:e}),c=await o.json().catch(()=>({}));if(!o.ok||!c.attachment)throw Error(c.error||`HTTP ${o.status}`);if(n.current!==s)continue;r(e=>e.map(e=>e.localId===t.localId?{...e,...c.attachment,status:`ready`,error:``}:e))}catch(e){if(n.current!==s)continue;r(n=>n.map(n=>n.localId===t.localId?{...n,status:`error`,error:e.message}:n))}i.current&&(i.current.value=``)}async function UO({instructionDraft:e,selectedDialogue:t,instructionAttachments:n,setActionNotice:r,instructionAttemptRef:i,setBusyAction:a,postJson:o,setInstructionDraft:s,clearInstructionAttachments:c,setPendingInstruction:l},u){if(!u.rollout)return;let d=NT(u),f=e.trim();if(!u.pane&&/^\/[\w:-]+(?:\s|$)/.test(f)){r({kind:`error`,text:`请从 / 菜单选择网页命令;项目技能使用 $技能名,终端专用命令请在原终端执行。`});return}let p=n.find(e=>e.status!==`ready`);if(p){r({kind:`error`,text:p.status===`uploading`?`附件 ${p.name} 仍在上传。`:`附件 ${p.name} 上传失败,请移除后重试。`});return}if(!f&&!n.length)return;let m=`instruct:${d}`,h=JSON.stringify({text:f,attachments:n.map(e=>e.token)}),g=i.current,_=g?.key===d&&g.signature===h?g.deliveryId:globalThis.crypto?.randomUUID?.()||`${Date.now()}-${Math.random().toString(16).slice(2)}`;i.current={key:d,signature:h,deliveryId:_},a(m),r(null);try{let e=await o(`/api/session/instruct`,{host:u.host,sessionId:u.rollout.id,prompt:f,attachments:n.map(e=>({token:e.token})),deliveryId:_});i.current=null,s(e=>e.trim()===f?``:e),c(),l({key:NT(u),sentAt:Date.now(),baselineAssistant:u.rollout.lastAssistant||``,baselineAssistantId:t?.events.findLast(e=>e.kind===`assistant`)?.id||``,transport:e.transport,target:e.target||e.transport})}catch(e){r({kind:`error`,text:e.message})}finally{a(``)}}var WO=e({askResearchAssistant:()=>GO,loadHistoryCache:()=>qO,openResearchAssistantCandidate:()=>KO,scanHistory:()=>JO});async function GO({researchAssistantDraft:e,researchAssistantBusy:t,setResearchAssistantMessages:n,setResearchAssistantDraft:r,setResearchAssistantBusy:i,postJson:a}){let o=e.trim();if(!o||t)return;let s={id:`user:${Date.now()}`,role:`user`,text:o};n(e=>[...e,s]),r(``),i(!0);try{let e=await a(`/api/assistant/query`,{question:o});n(t=>[...t,{id:`assistant:${Date.now()}`,role:`assistant`,text:e.answer,candidates:e.candidates,model:e.model,warning:e.warning,scans:e.scans}])}catch(e){n(t=>[...t,{id:`assistant:error:${Date.now()}`,role:`assistant`,text:e.message}])}finally{i(!1)}}function KO({setHostFilter:e,setCwdFilter:t,setStatusFilter:n,setCategoryFilter:r,setQuery:i,allAgents:a,setViewMode:o,selectAgentAndReveal:s,setResearchAssistantOpen:c,setActionNotice:l,setHistoryState:u,setSelectedAgentId:d},f){e(f.host),t(`all`),n(`all`),r(`all`),i(``);let p=a.find(e=>e.host===f.host&&e.rollout?.id===f.sessionId);if(p){o(`agents`),s(p.id),c(!1),l({kind:`success`,text:`已打开检索命中的活动 Session:${f.theme}`});return}if(f.agent){u(e=>({...e,sessions:[f.agent,...e.sessions.filter(e=>!(e.host===f.host&&e.rollout?.id===f.agent?.rollout?.id))],scope:`assistant`,loading:!1,error:``})),o(`history`),d(f.agent.id),c(!1),l({kind:`success`,text:`已打开检索命中的历史 Session:${f.theme}`});return}o(`history`),i(f.sessionId),c(!1),l({kind:`success`,text:`已切到 History 并填入 Session ID;扫描历史后可查看完整对话。`})}async function qO({historyOrder:e,hostFilter:t,historyLimit:n,getJson:r,sortedHistorySessions:i,setHistoryState:a},o,s,c){let l=o||e,u=s||t,d=c||n;try{let e=await r(`/api/history/cache?host=${encodeURIComponent(u)}&limit=${d}&order=${l}`);return a({sessions:i(e.sessions,l),scannedAt:e.scannedAt,scope:e.scope,hosts:e.hosts,loading:!1,error:``}),e.cached?e:null}catch{return null}}async function JO({historyOrder:e,setHistoryState:t,setActionNotice:n,loadHistoryCache:r,postJson:i,hostFilter:a,historyLimit:o,sortedHistorySessions:s,setSelectedAgentId:c},l){let u=l||e;t(e=>({...e,loading:!0,error:``})),n(null);let d=await r(u);t(e=>({...e,loading:!0})),d&&n({kind:`success`,text:`已立即显示 ${d.sessions.length} 条本地缓存,正在后台刷新。`});try{let e=await i(`/api/history/scan`,{host:a,limit:o,order:u}),r=s(e.sessions,u);t({sessions:r,scannedAt:e.scannedAt,scope:e.scope,hosts:e.hosts,loading:!1,error:``}),c(r[0]?.id||null),n({kind:`success`,text:`历史扫描完成:找到 ${e.sessions.length} 条已结束 Session。`})}catch(e){t(t=>({...t,loading:!1,error:e.message})),n({kind:`error`,text:e.message})}}var YO=e({answerElicitation:()=>$O,answerPlanInput:()=>QO,focusHumanRequest:()=>XO,respondToHumanRequest:()=>ZO});function XO({allAgents:e,setViewMode:t,setHostFilter:n,setCwdFilter:r,setStatusFilter:i,setCategoryFilter:a,setQuery:o,selectAgentAndReveal:s},c){let l=e.find(e=>e.host===c.host&&e.rollout?.id===c.threadId);t(`agents`),n(c.host),r(`all`),i(`all`),a(`all`),o(``),l&&s(l.id)}async function ZO({setBusyAction:e,setActionNotice:t,postJson:n},r,i,a=`处理结果已按原始 request ID 回传,Codex 将继续当前 Turn。`){e(`human-response:${r.key}`),t(null);try{return await n(`/api/app-server/respond`,{key:r.key,response:i}),t({kind:`success`,text:a}),!0}catch(e){return t({kind:`error`,text:e.message}),!1}finally{e(``)}}async function QO({planInputDrafts:e,setActionNotice:t,respondToHumanRequest:n,setPlanInputDrafts:r},i){if(!i.questions)return;let a=e[i.key]||{},o={};for(let e of i.questions){let n=a[e.id]?.trim();if(!n){t({kind:`error`,text:`请先回答“${e.header}”。`});return}o[e.id]={answers:[n]}}await n(i,{answers:o},`答案已按原始 request ID 回传,Codex 将继续当前 Plan Turn。`)&&r(e=>{let t={...e};return delete t[i.key],t})}async function $O({elicitationDrafts:e,respondToHumanRequest:t,setElicitationDrafts:n},r,i){let a={};if(i===`accept`&&[`form`,`openai/form`].includes(r.mode||``))for(let t of r.fields||[]){let n=e[r.key]?.[t.name]??t.default;n!=null&&n!==``&&(a[t.name]=n)}await t(r,{action:i,content:i===`accept`?a:null,_meta:null})&&n(e=>{let t={...e};return delete t[r.key],t})}var ek=e({changeHostModel:()=>rk,changeSessionModel:()=>ok,inspectorWidthBounds:()=>ik,resizeWithKeyboard:()=>ak,toggleHostSidebar:()=>nk,toggleUiTheme:()=>tk});function tk({setUiTheme:e}){e(e=>{let t=e===`dark`?`light`:`dark`;return window.localStorage.setItem(`scope:ui-theme`,t),t})}function nk({setHostSidebarCollapsed:e}){e(e=>{let t=!e;return window.localStorage.setItem(`scope:host-sidebar-collapsed`,t?`1`:`0`),t})}async function rk({hostModelDrafts:e,setBusyAction:t,postJson:n,setHostModelResults:r,setActionNotice:i,setModelDrafts:a,snapshot:o,refresh:s},c){let l=e[c];if(l){t(`host-model:${c}`);try{let e=await n(`/api/host/model`,{host:c,model:l});r(t=>({...t,[c]:e.results}));let t=e.results.filter(e=>e.status===`failed`).length;i({kind:t?`error`:`success`,text:`${c}:已应用 ${e.results.filter(e=>e.status===`applied`).length},下一轮生效 ${e.results.filter(e=>e.status===`next-turn`).length},跳过 ${e.results.filter(e=>e.status===`skipped`).length},失败 ${t}。`}),a(t=>{let n={...t};for(let t of o.hosts.find(e=>e.alias===c)?.agents||[])e.results.some(e=>e.sessionId===t.rollout?.id&&[`applied`,`next-turn`].includes(e.status))&&(n[NT(t)]=l);return n}),s()}catch(e){i({kind:`error`,text:e.message})}finally{t(``)}}}function ik({monitorColumnsRef:e,hostSidebarCollapsed:t}){return{minimum:260,maximum:ET(2**53-1,e.current?.clientWidth||window.innerWidth,window.innerWidth,t)}}function ak({inspectorWidthBounds:e,inspectorWidth:t,updateInspectorWidth:n},r){let{minimum:i,maximum:a}=e(),o={ArrowLeft:t+24,ArrowRight:t-24,Home:i,End:a}[r.key];o!==void 0&&(r.preventDefault(),n(o))}async function ok({modelDrafts:e,snapshot:t,modelsByHost:n,effortDrafts:r,yoloDrafts:i,setBusyAction:a,postJson:o,setActionNotice:s,refresh:c},l,u){if(!l.rollout&&!l.pane)return;let d=NT(l),f=u?.model||e[d]||l.rollout?.model||``,p=t.appServer?.sessions.find(e=>e.host===l.host&&e.sessionId===l.rollout?.id)?.connectionKey,m=n[l.rollout?WT(l.host,l.rollout.id,p):l.host]?.find(e=>e.id===f),h=u?.effort??(r[d]||(m?.supportedReasoningEfforts.includes(l.rollout?.reasoningEffort||``)?l.rollout?.reasoningEffort||``:m?.defaultReasoningEffort||m?.supportedReasoningEfforts[0]||``));if(!f)return;let g=t.appServer?.sessions.find(e=>e.host===l.host&&e.sessionId===l.rollout?.id&&e.status!==`offline`),_=u?.yolo??i[d]??g?.yolo??IT(l,t.management);a(`model:${d}`);try{let e=await o(`/api/session/model`,{host:l.host,sessionId:l.rollout?.id,agentId:l.id,model:f,effort:h,...l.rollout?{yolo:_}:{}});return s({kind:`success`,text:e.transport===`app-server`?`该 Session ${e.deferred?`下一轮将使用`:`已切换到`} ${e.model} · ${h||`默认强度`} · ${e.yolo===!1?`受控`:`YOLO`}。`:`已在 tmux ${e.target} 完成 /model 与 ${h||`默认`} 推理强度选择,并发送 /status 验证。`}),window.setTimeout(()=>c(),900),!0}catch(e){return s({kind:`error`,text:e.message}),!1}finally{a(``)}}var sk=e({chooseGpu:()=>hk,chooseHost:()=>dk,chooseProject:()=>fk,locateSubmission:()=>_k,openGpuEpisode:()=>gk,openWebTerminal:()=>vk,refreshSubmissions:()=>lk,reloadModelsForHost:()=>ck,saveOperatorName:()=>yk,selectAgentAndReveal:()=>uk,selectProjectSession:()=>mk,toggleProjectPin:()=>pk});function ck({setModelsByHost:e,setModelRefresh:t},n){n&&(e(e=>{let t={...e};for(let e of Object.keys(t))(e===n||e.startsWith(`${n}::`))&&delete t[e];return t}),t(e=>e+1))}async function lk({submissionWindowDays:e,setSubmissionTrackerOpen:t,setActionNotice:n,postJson:r},i=e){t(!0),n(null);try{await r(`/api/submissions/scan`,{limit:120,days:i})}catch(e){n({kind:`error`,text:e.message})}}function uk({setSelectedAgentId:e},t){e(t),window.innerWidth<=720&&window.setTimeout(()=>{document.querySelector(`.inspector`)?.scrollIntoView({behavior:`smooth`,block:`start`})},80)}function dk({setConversationFocus:e,setHostFilter:t,setCwdFilter:n,viewMode:r,loadHistoryCache:i,selectedGpu:a,setGpuFilter:o,setMobileHostsOpen:s},c){e(!1),t(c),n(`all`),r===`history`&&i(void 0,c),a&&(c===`all`||a.host!==c)&&o(`all`),s(!1)}function fk({setConversationFocus:e,setHostFilter:t,setCwdFilter:n,setGpuFilter:r,setStatusFilter:i,setCategoryFilter:a,setQuery:o,setViewMode:s,setMobileHostsOpen:c},l,u=`agents`){e(!1),t(l.host),n(l.cwd),r(`all`),i(`all`),a(`all`),o(``),s(u),c(!1)}async function pk({setProjectBusyKey:e,postJson:t,setSnapshot:n,setActionNotice:r},i){e(i.key);try{let e=await t(`/api/projects`,{host:i.host,cwd:i.cwd,action:i.pinned?`unpin`:`pin`});n(t=>({...t,management:{...t.management,projects:e.projects}}))}catch(e){r({kind:`error`,text:`保存项目失败:${e.message}`})}finally{e(``)}}function mk({chooseProject:e,selectAgentAndReveal:t,setConversationFocus:n},r,i){e(r,i.historical?`history`:`agents`),t(i.id),n(!0)}function hk({setGpuFilter:e,setCwdFilter:t,setHostFilter:n},r){e(r),t(`all`);let i=r===`all`?null:wT(r);i&&n(i.host)}function gk({setHostFilter:e,setCwdFilter:t,setGpuFilter:n,allAgents:r,setViewMode:i,selectAgentAndReveal:a,historyState:o,setQuery:s,setActionNotice:c,allExperiments:l,setSelectedExperimentId:u},d){if(e(d.host),t(`all`),n(CT(d.host,d.gpuIndex)),d.ownerSessionId){let e=r.find(e=>e.host===d.host&&e.rollout?.id===d.ownerSessionId);if(e){i(`agents`),a(e.id);return}let t=o.sessions.find(e=>e.host===d.host&&e.rollout?.id===d.ownerSessionId);if(t){i(`history`),a(t.id);return}i(`history`),s(d.ownerSessionId),c({kind:`success`,text:`该 GPU 记录属于已结束 Session;已填入 ID,扫描历史后可打开完整记录。`});return}if(d.paneSession){let e=l.find(e=>e.host===d.host&&e.session===d.paneSession&&(!d.pane||e.pane===d.pane));if(e){i(`experiments`),u(e.id);return}}s(String(d.pid)),c({kind:`error`,text:`GPU 进程 PID ${d.pid} 暂未可靠归属到 Codex Session。`})}function _k({allAgents:e,setHostFilter:t,setCwdFilter:n,setStatusFilter:r,setCategoryFilter:i,setSubmissionTrackerOpen:a,setViewMode:o,setQuery:s,selectAgentAndReveal:c,setActionNotice:l},u){let d=e.find(e=>e.host===u.host&&(e.rollout?.id===u.sessionId||e.rollout?.id===u.parentThreadId));if(t(u.host),n(`all`),r(`all`),i(`all`),a(!1),d){o(`agents`),s(``),c(d.id),l({kind:`success`,text:`已定位 DLC 调用对应的活动 Session:${u.sessionTheme}`});return}o(`history`),s(u.sessionId),l({kind:`success`,text:`已切到 ${u.host} 的历史视图并填入 Session ID;点击“扫描历史”即可加载完整对话。`})}function vk({selectedAgent:e,hostFilter:t,snapshot:n,setActionNotice:r,setSshTerminalTarget:i}){let a=e?.host||(t===`all`?``:t)||n.hosts.find(e=>e.reachable)?.alias||``;if(!a){r({kind:`error`,text:`当前没有可连接的 SSH 主机。`});return}i({host:a,cwd:e?.cwd||e?.rollout?.cwd||``,tmuxSession:e?.pane?.session||``})}async function yk({operatorNameDraft:e,setBusyAction:t,postJson:n,setOperatorEditorOpen:r,setActionNotice:i},a){a.preventDefault();let o=e.trim();if(o){t(`operator-name`);try{await n(`/api/operator`,{name:o}),r(!1),i({kind:`success`,text:`显示名称已保存。`})}catch(e){i({kind:`error`,text:e.message})}finally{t(``)}}}var bk=e({closeSession:()=>kk,compactSession:()=>Ok,connectAppServer:()=>Pk,discoverExperiments:()=>Ek,recoverHostAppServer:()=>Ik,recoveryCwdFor:()=>Mk,restartHostCodex:()=>Fk,saveResourcePolicy:()=>wk,saveTheme:()=>Ck,summarizeSession:()=>Tk,syncResourcePrompt:()=>Dk,takeoverSession:()=>Nk,terminateTmuxSession:()=>Ak,toggleSessionReserved:()=>Sk,unarchiveSession:()=>jk,updatePriority:()=>xk});async function xk({setBusyAction:e,setActionNotice:t,postJson:n},r,i){if(!(!r.rollout||!i||r.historical)){e(`priority:${NT(r)}`),t(null);try{await n(`/api/session`,{host:r.host,sessionId:r.rollout.id,priority:i}),t({kind:`success`,text:`已保存 ${jT[i]},列表与调度 prompt 已更新。`})}catch(e){t({kind:`error`,text:e.message})}finally{e(``)}}}async function Sk({snapshot:e,setBusyAction:t,setActionNotice:n,postJson:r},i,a){if(!i.rollout||i.historical)return;let o=NT(i),s=`reserve:${o}`,c=!!e.management?.sessions[o]?.reserved,l=typeof a==`boolean`?a:!c;t(s),n(null);try{await r(`/api/session`,{host:i.host,sessionId:i.rollout.id,reserved:l}),n({kind:`success`,text:l?`已设为常驻保留资源,超出设备常驻池时也不会被自动断开。`:`已取消常驻保留,该会话将按设备常驻池顺序调度。`})}catch(e){n({kind:`error`,text:e.message})}finally{t(``)}}async function Ck({themeEdit:e,snapshot:t,setBusyAction:n,setActionNotice:r,postJson:i,setThemeEdit:a,setInlineRename:o},s,c){if(!s.rollout||s.historical)return;let l=NT(s),u=c??(e?.key===l?e.value:LT(s,t.management).theme);if(u.trim()){n(`theme:${l}`),r(null);try{await i(`/api/session`,{host:s.host,sessionId:s.rollout.id,theme:u}),a(null),o(null),r({kind:`success`,text:`Session 名称已保存。`})}catch(e){r({kind:`error`,text:e.message})}finally{n(``)}}}async function wk({setBusyAction:e,setActionNotice:t,postJson:n,policyDraft:r,snapshot:i,setPolicyDraft:a}){e(`policy`),t(null);try{await n(`/api/resource-policy`,{prompt:r??i.management?.resourcePolicy.prompt??``}),a(null),t({kind:`success`,text:`资源策略已保存;尚未自动推送到任何会话。`})}catch(e){t({kind:`error`,text:e.message})}finally{e(``)}}async function Tk({setBusyAction:e,setActionNotice:t,postJson:n},r){if(!(!r.rollout||r.historical)){e(`summary:${NT(r)}`),t(null);try{await n(`/api/summarize`,{host:r.host,sessionId:r.rollout.id}),t({kind:`success`,text:`远端 Codex 已生成并保存新的结构化主题。`})}catch(e){t({kind:`error`,text:`${e.message};当前仍显示 rollout 草稿。`})}finally{e(``)}}}async function Ek({setBusyAction:e,setActionNotice:t,postJson:n},r){if(!(!r.rollout||r.historical)){e(`experiments:${NT(r)}`),t(null);try{let e=await n(`/api/experiments/discover`,{host:r.host,sessionId:r.rollout.id});t({kind:`success`,text:e.experiments.runs.length?`在会话目录下发现 ${e.experiments.runs.length} 个 W&B run。`:`会话目录下没有发现本地 W&B run。`})}catch(e){t({kind:`error`,text:e.message})}finally{e(``)}}}async function Dk({setBusyAction:e,setActionNotice:t,postJson:n},r){if(!(!r.rollout||r.historical)){e(`sync:${NT(r)}`),t(null);try{t({kind:`success`,text:`资源调度 prompt 已发送到 tmux ${(await n(`/api/prompt/sync`,{host:r.host,sessionId:r.rollout.id})).target}。`})}catch(e){t({kind:`error`,text:e.message})}finally{e(``)}}}async function Ok({setBusyAction:e,setActionNotice:t,postJson:n},r){if(r.rollout){e(`compact:${NT(r)}`),t(null);try{let e=await n(`/api/session/compact`,{host:r.host,sessionId:r.rollout.id});t({kind:`success`,text:e.transport===`app-server`?`已请求 app-server 压缩该 Session 的上下文。`:`已向 tmux ${e.target} 发送 /compact。`})}catch(e){t({kind:`error`,text:e.message})}finally{e(``)}}}async function kk({snapshot:e,setBusyAction:t,setActionNotice:n,postJson:r,setSelectedAgentId:i,setPendingInstruction:a},o){if(!o.rollout||!o.appServerManaged)return;let s=NT(o),c=`停止 Session“${LT(o,e.management)?.theme||o.rollout.lastUser||o.rollout.id.slice(0,8)}”?如果当前 Turn 正在执行,会先中止该 Turn,再解除网页托管。Session 日志与 Dialogue 会完整保留;共享 app-server、其他 Session、tmux、VS Code 和已启动的训练/评测进程均不受影响。`;if(window.confirm(c)){t(`close:${s}`),n(null);try{let e=await r(`/api/session/close`,{host:o.host,sessionId:o.rollout.id,confirmation:s});i(null),a(e=>e?.key===s?null:e),n({kind:`success`,text:e.interrupted?`当前 Turn 已中止,Session 已停止托管;日志和 Dialogue 仍保留在历史记录中。`:`Session 已停止托管;日志和 Dialogue 仍保留在历史记录中。`})}catch(e){n({kind:`error`,text:e.message})}finally{t(``)}}}async function Ak({setBusyAction:e,setActionNotice:t,postJson:n,setSelectedExperimentId:r,setSelectedAgentId:i,filteredAgents:a},o,s){if(!o||!s)return;let c=`终止 ${o} 上的 tmux Session “${s}”?\n\n该 tmux 内的 Codex、训练或评测进程会被终止;Codex rollout、Dialogue 和历史日志会保留。其他 tmux Session 不受影响。`;if(window.confirm(c)){e(`terminate-tmux:${o}:${s}`),t(null);try{let e=await n(`/api/tmux/session/terminate`,{host:o,tmuxSession:s,confirmation:`${o}:${s}`});r(e=>e?.startsWith(`${o}:${s}:`)?null:e),i(e=>{let t=a.find(t=>t.id===e);return t?.host===o&&t.pane?.session===s?null:e}),t({kind:`success`,text:`tmux “${e.tmuxSession}” 已终止;其中 ${e.paneCount} 个 pane 已关闭,Codex Session 日志仍保留。`})}catch(e){t({kind:`error`,text:e.message})}finally{e(``)}}}async function jk({setBusyAction:e,setActionNotice:t,postJson:n,setHistoryState:r},i){if(!i.rollout?.archived)return;let a=NT(i);e(`unarchive:${a}`),t(null);try{let e=await n(`/api/session/unarchive`,{host:i.host,sessionId:i.rollout.id,confirmation:a});r(t=>({...t,sessions:t.sessions.map(t=>NT(t)===a&&t.rollout?{...t,rollout:{...t.rollout,archived:!1,path:e.path||t.rollout.path}}:t)})),t({kind:`success`,text:`Session 日志已从归档区恢复;现在可以继续查看 Dialogue,或恢复到 App Server/tmux。`})}catch(e){t({kind:`error`,text:e.message})}finally{e(``)}}function Mk({recoveryCwdDrafts:e,snapshot:t},n){return e[NT(n)]??(n.historical?UT(n,t.hosts)[0]||``:n.cwd)}async function Nk({setBusyAction:e,setActionNotice:t,postJson:n,recoveryCwdFor:r,recoveryYoloDrafts:i,snapshot:a,refresh:o},s){if(!(!s.rollout||s.pane||!s.historical&&!s.appServerManaged)){e(`takeover:${NT(s)}`),t(null);try{let e=await n(`/api/session/takeover`,{host:s.host,sessionId:s.rollout.id,pid:s.historical||s.appServerManaged?0:s.pid,cwd:r(s),yolo:i[NT(s)]??IT(s,a.management)});t({kind:`success`,text:e.switchedFrom===`app-server`?`Session 已从 app-server 切换到 tmux ${e.target};网页发送将改走 tmux 输入通道。`:e.mode===`active`?`Codex PID ${e.killedPid} 已${e.forced?`强制结束并`:`结束并`}恢复到 tmux ${e.target};已验证 pane PID ${e.panePid||`—`} 正在运行 Codex(${e.readyInMs} ms)。训练/评测进程未被终止。`:`历史 Session 已恢复到 tmux ${e.target};Codex 响应检查通过(${e.readyInMs} ms)。`}),window.setTimeout(()=>o(),900)}catch(e){t({kind:`error`,text:e.message})}finally{e(``)}}}async function Pk({setBusyAction:e,setActionNotice:t,postJson:n,recoveryCwdFor:r,recoveryYoloDrafts:i,snapshot:a,refresh:o},s){if(!(!s.rollout||!s.historical&&!s.appServerManaged)){e(`app-server:${NT(s)}`),t(null);try{let e=await n(`/api/app-server/connect`,{host:s.host,sessionId:s.rollout.id,pid:s.historical||s.appServerManaged?0:s.pid,cwd:r(s),yolo:i[NT(s)]??IT(s,a.management)});t({kind:`success`,text:e.alreadyConnected?`该 Session 已连接 app-server,所有人工问题和审批都会实时显示在网页。`:e.killedPid?`Codex PID ${e.killedPid} 已${e.forced?`强制结束并`:`结束并`}由 app-server 恢复;后续人工问题和审批可在网页处理。`:`历史 Session 已由 app-server 恢复;后续人工问题和审批可在网页处理。`}),window.setTimeout(()=>o(),900)}catch(e){t({kind:`error`,text:e.message})}finally{e(``)}}}async function Fk({setBusyAction:e,postJson:t,setActionNotice:n,refresh:r},i){if(window.confirm(`重启 ${i} 的全部 SCOPE 托管 Codex 进程以加载 config.toml?保留会话日志和账号,不自动发送“继续”。工作中、后台命令或归属不明时将安全阻止;不操作其他 tmux 或 VS Code。`)){e(`host-config-restart:${i}`);try{let e=await t(`/api/app-server/restart-host`,{host:i,confirmation:`restart:${i}`});for(let t=0;e.status===`running`&&t<240;t++){n({kind:`success`,text:`${i} ${e.phase===`preflight`?`正在核验重启安全性`:`正在重启并恢复会话`}…已恢复 ${e.results.length}`}),await new Promise(e=>window.setTimeout(e,1500));let t=await fetch(TT(`/api/app-server/restart-host?host=${encodeURIComponent(i)}`));if(!t.ok)throw Error(`重启状态查询失败;请勿重复点击,先核查服务状态`);e=await t.json()}let a=e.results.filter(e=>!e.ok);n({kind:e.status===`completed`?`success`:`error`,text:e.status===`running`?`${i} 重启仍在后台运行,请稍后查看`:e.error||`${i}:恢复 ${e.results.length-a.length} 个会话${a.length?`;失败 ${a.length}:${a.map(e=>e.error).join(`;`)}`:`,未重发指令`}`}),r()}catch(e){n({kind:`error`,text:e.message})}finally{e(``)}}}async function Ik({setBusyAction:e,setActionNotice:t,postJson:n,refresh:r},i){e(`host-recovery:${i}`),t(null);try{let e=await n(`/api/app-server/recover-host`,{host:i,confirmation:i}),a=[e.reconnected?`重连 ${e.reconnected}`:``,e.continued?`续跑 ${e.continued}`:``,e.alreadyWorking?`原本运行中 ${e.alreadyWorking}`:``,e.alreadyRecovering?`已有恢复任务 ${e.alreadyRecovering}`:``,e.idle?`保持空闲 ${e.idle}`:``,e.failed?`失败 ${e.failed}`:``].filter(Boolean);t({kind:e.failed?`error`:`success`,text:`${i} 恢复完成:${a.join(` · `)||`共 ${e.total} 条 Session`}`}),window.setTimeout(()=>r(),600)}catch(e){t({kind:`error`,text:e.message})}finally{e(``)}}var Lk=e({beginColumnResize:()=>Wk,continueColumnResize:()=>Gk,copyLatestAssistantReply:()=>Jk,copyRawContext:()=>qk,endColumnResize:()=>Kk,loadOlderDialogue:()=>Rk,resizeInspectorAt:()=>Uk,setDialogueEventExpanded:()=>Bk,setVisibleDialogueExpanded:()=>Vk,toggleDialogueFilter:()=>zk,updateInspectorWidth:()=>Hk});async function Rk({dialogueLoadingMore:e,selectedDialogue:t,selectedDialogueHost:n,selectedDialogueSessionId:r,setDialogueLoadingMore:i,setDialogueState:a,setExpandedDialogueEvents:o}){if(e||!t?.hasMore||t.nextBefore===null||!n||!r)return;let s=`${n}:${r}`;i(!0);try{let e=await fetch(TT(`/api/dialogue`),{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({host:n,sessionId:r,limit:10,before:t.nextBefore})}),i=await e.json();if(!e.ok)throw Error(i.error||`HTTP ${e.status}`);a(e=>{if(e.key!==s||!e.data)return e;let t=new Set,n=[...i.events,...e.data.events].filter(e=>t.has(e.id)?!1:(t.add(e.id),!0)),r={};return n.forEach(e=>{r[e.kind]=(r[e.kind]||0)+1}),{...e,error:``,data:{...e.data,loadedAt:i.loadedAt,events:n,counts:r,totalLines:e.data.totalLines+i.totalLines,scannedBytes:e.data.scannedBytes+i.scannedBytes,toolEventCount:n.filter(e=>[`command`,`tool`].includes(e.kind)).length,hiddenReasoningCount:e.data.hiddenReasoningCount+i.hiddenReasoningCount,hasMore:i.hasMore,nextBefore:i.nextBefore}}}),o(e=>{let t=new Set(e);return i.events.filter(e=>e.category!==`operations`).forEach(e=>t.add(e.id)),t})}catch(e){a(t=>t.key===s?{...t,error:e.message}:t)}finally{i(!1)}}function zk({setDialogueFilters:e},t){e(e=>({...e,[t]:!e[t]}))}function Bk({setExpandedDialogueEvents:e},t,n){e(e=>{if(e.has(t)===n)return e;let r=new Set(e);return n?r.add(t):r.delete(t),r})}function Vk({setExpandedDialogueEvents:e,renderedDialogueEvents:t},n){e(e=>{let r=new Set(e);return t.forEach(e=>{n?r.add(e.id):r.delete(e.id)}),r})}function Hk({monitorColumnsRef:e,hostSidebarCollapsed:t,setInspectorWidth:n},r){let i=ET(r,e.current?.clientWidth||window.innerWidth,window.innerWidth,t);n(i);try{window.localStorage.setItem(ST,String(i))}catch{}}function Uk({monitorColumnsRef:e,updateInspectorWidth:t},n){t((e.current?.getBoundingClientRect().right||window.innerWidth)-n)}function Wk({resizeActiveRef:e,setIsResizing:t,resizeInspectorAt:n},r){r.pointerType===`mouse`&&r.button!==0||(r.preventDefault(),e.current=!0,t(!0),r.currentTarget.setPointerCapture(r.pointerId),n(r.clientX))}function Gk({resizeActiveRef:e,resizeInspectorAt:t},n){e.current&&t(n.clientX)}function Kk({resizeActiveRef:e,setIsResizing:t},n){e.current&&(e.current=!1,t(!1),n.currentTarget.hasPointerCapture(n.pointerId)&&n.currentTarget.releasePointerCapture(n.pointerId))}async function qk({setBusyAction:e,setActionNotice:t,postJson:n,copy:r},i){if(!i.rollout?.id)return;let a=`raw-context:${NT(i)}`;e(a),t(null);try{let e=await n(`/api/session/raw-context`,{host:i.host,sessionId:i.rollout.id});await r(JSON.stringify(e.context,null,2),a),t({kind:`success`,text:e.context.truncated?`Raw context 已复制;内容超过安全传输上限,最早一段已截断。`:`Raw context 已复制(${e.context.records?.length||0} 条原始记录)。`})}catch(e){t({kind:`error`,text:e.message})}finally{e(``)}}async function Jk({canonicalDialogueMessages:e,selectedDialoguePending:t,setActionNotice:n,copy:r},i){let a=e.latestAssistant||(t?``:i.rollout?.lastAssistant||``);if(!a){n({kind:`error`,text:t?`最新回复仍在读取,请稍后再复制。`:`当前 Session 尚无可复制的 Codex 回复。`});return}let o=`latest-assistant:${NT(i)}`;try{await r(a,o),n({kind:`success`,text:`已复制 Codex 最新一条原始回复。`})}catch(e){n({kind:`error`,text:e.message})}}var Yk={...ek,...TO,...PO,...WO,...YO,...sk,...bk,...Lk};function Xk(e){return Object.fromEntries(Object.entries(Yk).map(([t,n])=>[t,(...t)=>Reflect.apply(n,void 0,[e(),...t])]))}function Zk({selectedAgent:e,setModelDrafts:t,setEffortDrafts:n}){(0,f.useEffect)(()=>{if(!e?.rollout)return;let r=NT(e);t(t=>t[r]?t:{...t,[r]:e.rollout?.model||``}),n(t=>t[r]?t:{...t,[r]:e.rollout?.reasoningEffort||``})},[e,n,t])}function Qk({accountProfilesOpen:e,accountHost:t,setDeviceLoginJob:n,setAuthRestartJob:r,loadAccountProfiles:i}){(0,f.useEffect)(()=>{!e||!t||(n(e=>e?.host===t?e:null),r(null),i(t))},[t,e])}function $k({deviceLoginJob:e,getJson:t,setDeviceLoginJob:n,setProfileNameDraft:r,loadAccountProfiles:i,setActionNotice:a}){(0,f.useEffect)(()=>{if(!e||![`starting`,`waiting`].includes(e.status))return;let o=window.setInterval(async()=>{try{let s=await t(`/api/auth/login/status?jobId=${encodeURIComponent(e.id)}`);n(s),s.status===`completed`&&(window.clearInterval(o),r(``),await i(s.host),a({kind:`success`,text:`${s.profile.name} 已登录并保存到 ${s.host};尚未切换正在运行的 Session。`})),[`failed`,`cancelled`].includes(s.status)&&window.clearInterval(o)}catch{}},1500);return()=>window.clearInterval(o)},[e?.id,e?.status])}function eA(e,t){return{key:t,loading:!0,data:e.key===t?e.data:null,error:``}}function tA(e,t,n){return{...eA(e,t),loading:!1,error:n}}function nA({instructionAttachmentsRef:e,instructionAttachments:t}){(0,f.useEffect)(()=>{e.current=t},[t,e])}function rA({instructionAttachmentsRef:e}){(0,f.useEffect)(()=>()=>{for(let t of e.current)t.previewUrl&&URL.revokeObjectURL(t.previewUrl)},[e])}function iA({instructionAttachmentOwnerRef:e,setInstructionAttachments:t,instructionFileInputRef:n,selectedAgentId:r}){(0,f.useEffect)(()=>{e.current=``,t(e=>{for(let t of e)t.previewUrl&&URL.revokeObjectURL(t.previewUrl);return[]}),n.current&&(n.current.value=``)},[e,n,r,t])}function aA({authRestartJob:e,getJson:t,setAuthRestartJob:n,setBusyAction:r,reloadModelsForHost:i,setActionNotice:a,refresh:o}){(0,f.useEffect)(()=>{if(!e||![`queued`,`running`].includes(e.status))return;let s=window.setInterval(async()=>{try{let c=await t(`/api/auth/restart/status?jobId=${encodeURIComponent(e.id)}`);if(n(c),[`completed`,`failed`].includes(c.status)){window.clearInterval(s),r(``),i(c.host);let e=c.results.filter(e=>!e.ok).length;a({kind:e||c.status===`failed`?`error`:`success`,text:`主机 ${c.host} 的账号重启任务完成:${c.results.length-e} 成功,${e} 跳过或失败。`}),window.setTimeout(()=>o(),800)}}catch{}},1500);return()=>window.clearInterval(s)},[e?.id,e?.status])}function oA({setDialogueRenderLimit:e,dialogueFilters:t,dialogueOrder:n,selectedDialogueKey:r}){(0,f.useEffect)(()=>{e(60)},[t,n,r,e])}function sA({pendingInstruction:e,selectedAgent:t,canonicalDialogueMessages:n,setPendingInstruction:r}){(0,f.useEffect)(()=>{!e||!t||e.key===NT(t)&&vO(e,{latestAssistant:n.latestAssistant||t.rollout?.lastAssistant||``,latestAssistantId:n.latestAssistantId})&&r(null)},[n.latestAssistant,n.latestAssistantId,e,t,r])}function cA({selectedDialogueHost:e,selectedDialogueSessionId:t,setDialogueLoadingMore:n,setDialogueState:r,selectedDialogueExpanded:i,setExpandedDialogueEvents:a,dialogueRefresh:o,selectedDialogueLastEventAt:s}){(0,f.useEffect)(()=>{if(!e||!t)return;let i=`${e}:${t}`,o=new AbortController,s=!1;queueMicrotask(()=>{s||(n(!1),r(e=>eA(e,i)))});async function c(){try{let n=await fetch(TT(`/api/dialogue`),{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({host:e,sessionId:t,limit:30,dialogueOnly:!1}),signal:o.signal}),c=await n.json();if(!n.ok)throw Error(c.error||`HTTP ${n.status}`);s||(r(e=>({key:i,loading:!1,data:_O(e.key===i?e.data:null,c),error:``})),a(new Set(c.events.filter(e=>e.category!==`operations`).map(e=>e.id))))}catch(e){!s&&e.name!==`AbortError`&&r(t=>tA(t,i,e.message))}}return c(),()=>{s=!0,o.abort()}},[o,i,e,s,t,n,r,a])}var lA=[`firstUser`,`lastUser`,`lastAssistant`,`lastAction`,`lastError`,`userMessages`,`assistantMessages`,`launches`,`mtimeMs`,`sizeBytes`,`lastEventAt`],uA=e=>e?.id||e?.path,dA=e=>Date.parse(e?.lastEventAt||``)||0;function fA(e,t){if(!e)return t;if(!t)return{...e,turnState:`idle`,cacheRecovery:`missing-on-remote`};if(dA(e)>dA(t)||!dA(e)&&Number(e.mtimeMs||0)>Number(t.mtimeMs||0)||Number(e.sizeBytes||0)>Number(t.sizeBytes||0)&&t.sizeBytes!=null){let n={...t,cacheRecovery:`remote-history-regressed`,turnState:`idle`};for(let t of lA)e[t]!==void 0&&(n[t]=e[t]);return n}if(dA(e)===dA(t)){let n={...t};for(let r of[`userMessages`,`assistantMessages`,`launches`])(e[r]?.length||0)>(t[r]?.length||0)&&(n[r]=e[r]);return n}return t}function pA(e,t){let n=new Map;for(let t of[...e?.sessions||[],...(e?.agents||[]).flatMap(e=>[e.rollout,...e.subagents||[]])])uA(t)&&n.set(uA(t),fA(n.get(uA(t)),t));let r=new Map;for(let e of t.sessions||[])uA(e)&&r.set(uA(e),fA(n.get(uA(e)),e));for(let[e,t]of n)r.has(e)||r.set(e,fA(t,null));return{...t,sessions:[...r.values()],agents:(t.agents||[]).map(e=>({...e,rollout:e.rollout?fA(n.get(uA(e.rollout)),e.rollout):e.rollout,subagents:(e.subagents||[]).map(e=>fA(n.get(uA(e)),e))}))}}function mA(e,t){let n=new Map((e?.hosts||[]).map(e=>[e.alias,e])),r=(t.hosts||[]).map(e=>pA(n.get(e.alias),e)),i=new Set(r.map(e=>e.alias));for(let e of n.values())i.has(e.alias)||r.push(pA(e,{alias:e.alias,hostname:e.hostname,reachable:!1,stale:!0,processes:[],workloads:[],panes:[],agents:[],sessions:[],gpus:[]}));return{...t,hosts:r}}var hA=`scope-monitor-cache`,gA=1,_A=`resources`,vA=`snapshot-sync-v1`;function yA(){return new Promise((e,t)=>{if(typeof indexedDB>`u`){t(Error(`IndexedDB unavailable`));return}let n=indexedDB.open(hA,gA);n.onupgradeneeded=()=>{let e=n.result;e.objectStoreNames.contains(_A)||e.createObjectStore(_A)},n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error||Error(`cache open failed`))})}async function bA(){let e=await yA();try{return await new Promise((t,n)=>{let r=e.transaction(_A,`readonly`).objectStore(_A).get(vA);r.onsuccess=()=>t(r.result||null),r.onerror=()=>n(r.error||Error(`cache read failed`))})}finally{e.close()}}async function xA(e){let t=await yA();try{await new Promise((n,r)=>{let i=t.transaction(_A,`readwrite`),a=i.objectStore(_A),o=a.get(vA);o.onsuccess=()=>{let t=mA(o.result?.snapshot,e.snapshot);a.put({...e,snapshot:t},vA)},i.oncomplete=()=>n(),i.onerror=()=>r(i.error||Error(`cache write failed`)),i.onabort=()=>r(i.error||Error(`cache write aborted`))})}finally{t.close()}}function SA(e,t){let n={...e,...t.set};for(let e of t.unset)delete n[e];return n}function CA(e,t){let n=SA(e,t);if(t.hosts){let r=new Map((e.hosts||[]).map(e=>[e.alias,e]));for(let e of t.hosts.changes)r.set(e.alias,SA(e.replace?{}:r.get(e.alias),e));n.hosts=(t.hosts.order||[...r.keys()]).map(e=>r.get(e))}return n}var wA=1;function TA(e){return new Map((e?.episodes||[]).map(e=>[e.id,e]))}function EA(e,t){if(!t||t.protocol!==wA)throw Error(`不支持的 Snapshot 增量协议`);if(t.reset){if(!t.overview||!t.gpuUsage||!t.submissionTracker)throw Error(`Snapshot reset 缺少完整资源`);return mA(e,{...t.overview,gpuUsage:t.gpuUsage,submissionTracker:t.submissionTracker})}if(!e)throw Error(`本地 Snapshot 缓存缺失,无法应用增量`);let n=e.gpuUsage;if(t.gpuUsage){let e=TA(n);for(let n of t.gpuUsage.removes||[])e.delete(n);for(let n of t.gpuUsage.upserts||[])e.set(n.id,n);n={...n,...t.gpuUsage.meta||{},episodes:[...e.values()]}}let r={...e,...t.overview||{}};for(let e of t.overviewPatches||[])r=CA(r,e);return mA(e,{...r,gpuUsage:n,submissionTracker:t.submissionTracker||e.submissionTracker})}function DA({setSnapshot:e,setBridgeState:t}){(0,f.useEffect)(()=>{let n=null,r=!1,i=!1,a=!1,o=``,s=0,c=null,l=null,u=null;function d(){u!==null&&(window.clearTimeout(u),u=null);let e=l;l=null,e&&xA(e).catch(()=>{})}function f(e){!o||s<=0||(l={protocol:1,epoch:o,revision:s,savedAt:Date.now(),snapshot:e},u===null&&(u=window.setTimeout(d,3e4)))}async function p(){if(i){a=!0;return}i=!0;try{do{a=!1;let n=new URLSearchParams;n.set(`fields`,`1`),o&&n.set(`epoch`,o),s>0&&n.set(`since`,String(s));let i=await fetch(TT(`/api/sync?${n}`),{cache:`no-store`});if(!i.ok)throw Error(`bridge unavailable`);let l=await i.json();if(r)return;let u;try{u=EA(c,l)}catch(e){if(o||s){o=``,s=0,c=null,a=!0;continue}throw e}c=u,o=l.epoch,s=l.revision,e(u),t(`connected`),f(u)}while(a&&!r)}catch{r||t(`offline`)}finally{i=!1}}async function m(){try{let i=await bA().catch(()=>null);i?.protocol===1&&i.epoch&&i.revision>0&&Array.isArray(i.snapshot?.hosts)&&(c=i.snapshot,o=i.epoch,s=i.revision,r||e({...i.snapshot,scanning:!0,appServer:{...i.snapshot.appServer,pendingRequests:[],pendingInputs:[]}})),n=new EventSource(TT(`/api/events`)),n.onopen=()=>{r||p()},n.onmessage=n=>{try{let r=JSON.parse(n.data);if(r.type!==`snapshot-invalidated`)return;if(t(`connected`),r.scanning){e(e=>({...e,scanning:!0}));return}if(r.epoch===o&&Number(r.revision||0)<=s)return;p()}catch{}},n.onerror=()=>{r||t(`offline`)},await p()}catch{r||t(`offline`)}}let h=()=>{document.visibilityState===`hidden`&&d()};document.addEventListener(`visibilitychange`,h);let g=()=>{p()};return window.addEventListener(`scope:reconnect`,g),m(),()=>{r=!0,n?.close(),document.removeEventListener(`visibilitychange`,h),window.removeEventListener(`scope:reconnect`,g),d()}},[t,e])}function OA(e,t){return Array.from(new Set(e.filter(e=>t===`all`||e.host===t).map(e=>e.cwd?.trim()).filter(Boolean))).sort((e,t)=>e.localeCompare(t))}function kA(e,t){let n=e=>{let t=e?.host?.trim(),n=e?.sessionId||e?.rollout?.id;return t&&n?`${t}:${n}`:``},r=new Set(t.map(n).filter(Boolean));return e.filter(e=>!r.has(n(e)))}function AA(e,t,n){let r=new Map;for(let t of e)r.set(n(t),t);let i=[],a=new Set;for(let e of t)!r.has(e)||a.has(e)||(i.push(e),a.add(e));for(let t of e){let e=n(t);a.has(e)||(i.push(e),a.add(e))}return{items:i.map(e=>r.get(e)),keys:i}}function jA({snapshot:e,gpuFilter:t,gpuWindow:n,historyState:r,hostFilter:i,cwdFilter:a,viewMode:o,query:s,statusFilter:c,categoryFilter:l,historyOrder:u,agentOrderRevision:d,activeAgentOrder:p}){let m=(0,f.useMemo)(()=>e.hosts.flatMap(e=>e.agents),[e.hosts]),h=e.management.operatorName?.trim()||`Operator`,g=e.gpuUsage||DT.gpuUsage,_=(0,f.useMemo)(()=>{let t=new Map;for(let n of e.hosts)for(let e of n.gpus){let r=CT(n.alias,e.index);t.set(r,{key:r,host:n.alias,index:e.index,name:e.name})}for(let e of g.episodes){let n=CT(e.host,e.gpuIndex);t.has(n)||t.set(n,{key:n,host:e.host,index:e.gpuIndex,name:e.gpuName})}return[...t.values()].sort((e,t)=>e.host.localeCompare(t.host)||e.index-t.index)},[g.episodes,e.hosts]),v=t===`all`?null:wT(t),y=v?.host||``,b=v?.index??-1,x=n===`active`?0:Number(n.replace(`h`,``))*60*60*1e3,S=(0,f.useMemo)(()=>{let t=(Date.parse(e.generatedAt||``)||0)-x;return g.episodes.filter(e=>!y||e.host===y&&e.gpuIndex===b).filter(e=>n===`active`?e.active:e.active||Date.parse(e.lastSeenAt)>=t).sort((e,t)=>Number(t.active)-Number(e.active)||Date.parse(t.lastSeenAt)-Date.parse(e.lastSeenAt))},[g.episodes,n,x,y,b,e.generatedAt]),C=(0,f.useMemo)(()=>new Set(S.map(e=>e.ownerSessionId).filter(e=>!!e)),[S]),w=(0,f.useMemo)(()=>{let e=new Map;for(let t of g.episodes){if(!t.ownerSessionId)continue;let n=`${t.host}:${t.ownerSessionId}`,r=e.get(n)||[];r.push(t),e.set(n,r)}for(let t of e.values())t.sort((e,t)=>Number(t.active)-Number(e.active)||Date.parse(t.lastSeenAt)-Date.parse(e.lastSeenAt));return e},[g.episodes]),T=e.submissionTracker||DT.submissionTracker,E={...DT.submissionTracker,...T,items:T.items||[],calls:T.calls||[],launches:T.launches||[],alerts:T.alerts||[],hosts:T.hosts||[]},ee=E.hosts.filter(e=>!!e.error),te=E.windowDays?`最近 ${E.windowDays} 天`:`全部历史`,D=(0,f.useMemo)(()=>({failed:E.items.filter(e=>/fail|fault|stopp|cancel|kill/i.test(e.status||``)).length,queued:E.items.filter(e=>/queu|enqueued|pending/i.test(e.status||``)).length,running:E.items.filter(e=>/running/i.test(e.status||``)).length}),[E.items]),ne=(0,f.useMemo)(()=>{let e=E.calls.filter(e=>!e.inspection&&!e.dryRun&&e.invocationKind!==`output-only`&&(e.invocationKind!==`submit-script`||e.jobIds.length>0||e.jobNames.length>0)),t=new Set(e.map(e=>e.id)),n=E.calls.filter(e=>!t.has(e.id));return{confirmed:e,explicitAttempts:n.filter(e=>e.invocationKind!==`output-only`&&e.explicitSubmit&&!e.inspection&&!e.dryRun),candidates:n}},[E.calls]),re=(0,f.useMemo)(()=>({actual:ne.confirmed.length,candidates:ne.candidates.length}),[ne]),ie=(0,f.useMemo)(()=>e.hosts.flatMap(e=>{let t=new Set(e.agents.map(e=>e.pane).filter(e=>!!e).map(e=>`${e.session}:${e.pane}`));return e.panes.filter(n=>n.dead||t.has(`${n.session}:${n.pane}`)?!1:(e.workloads||[]).some(e=>e.pane?.session===n.session&&e.pane?.pane===n.pane)?!0:!/^(?:ba|z|c|fi)?sh$|^tmux(?:: server)?$/i.test(n.command.trim())).map(t=>$T(e,t))}),[e.hosts]),ae=(0,f.useMemo)(()=>{let t=Date.parse(e.generatedAt||``)||0,n=1440*60*1e3,r=e.hosts.flatMap(e=>e.sessions.filter(e=>!e.isSubagent).map(t=>({host:e.alias,session:t}))),i=r.filter(({session:e})=>{let r=Date.parse(e.startedAt);return Number.isFinite(r)&&t-r<=n}).length,a=r.filter(({session:e})=>t-e.mtimeMs<=7*n),o=new Set(a.map(({session:e})=>e.cwd).filter(Boolean)).size,s=new Map;a.forEach(({host:e})=>s.set(e,(s.get(e)||0)+1));let c=Array.from(s.entries()).sort((e,t)=>t[1]-e[1])[0]||null;return{started24h:i,active7d:a.length,activeCwds:o,dailyAverage:(a.length/7).toFixed(1),busiestHost:c?.[0]||`—`,busiestCount:c?.[1]||0}},[e.hosts,e.generatedAt]),oe=(0,f.useMemo)(()=>kA(r.sessions,m),[m,r.sessions]),se=sE(e.management.projects||[],[...m,...oe].filter(t=>{let n=e.management.sessions[NT(t)]?.archive;return n?![`archived`,`restoring`].includes(n.phase):!t.rollout?.archived})).map(t=>({...t,sessions:t.sessions.map(t=>({id:t.id,sessionId:t.rollout?.id||``,title:LT(t,e.management).theme||t.title||VT(t.cwd),status:t.status,category:LT(t,e.management).category||`other`,historical:!!t.historical,lastActivityAt:t.lastActivityAt||t.rollout?.mtimeMs||t.pane?.activityAt||null,externalTerminal:!t.historical&&!t.appServerManaged&&!t.pane&&t.pid>0,reserved:!!e.management.sessions[NT(t)]?.reserved}))})),ce=i!==`all`&&a!==`all`&&aE(i,a)?.key||null,le=se.find(e=>e.key===ce),ue=o===`history`?oe:m,de=(0,f.useMemo)(()=>OA([...m,...r.sessions],i),[m,r.sessions,i]),fe=(0,f.useMemo)(()=>{let n=s.trim().toLowerCase();return ue.filter(e=>i===`all`||e.host===i).filter(e=>t===`all`||!!(e.rollout?.id&&C.has(e.rollout.id))).filter(e=>a===`all`||aE(e.host,e.cwd)?.key===aE(e.host,a)?.key).filter(e=>c===`all`||e.status===c).filter(t=>l===`all`||LT(t,e.management).category===l).filter(t=>{if(!n)return!0;let r=LT(t,e.management);return[t.host,t.hostname,t.cwd,t.title,t.rollout?.lastAction,t.pane?.session,r.theme,r.objective,r.progress,r.result,...(t.relatedPanes||[]).flatMap(e=>[e.session,e.command,e.cwd]),...(t.localWorkloads||[]).flatMap(e=>[e.cmdline,e.cwd,String(e.pid)]),...(t.remoteJobs||[]).flatMap(e=>[e.name,e.jobId,e.status])].some(e=>e?.toLowerCase().includes(n))}).sort((t,n)=>{if(o===`history`){let e=(n.lastActivityAt||0)-(t.lastActivityAt||0);return u===`recent`?e:-e}let r=PT(t,e.management).priority||`P2`,i=PT(n,e.management).priority||`P2`;if(MT[r]!==MT[i])return MT[r]-MT[i];let a={attention:0,working:1,idle:2};return a[t.status]===a[n.status]?(n.lastActivityAt||0)-(t.lastActivityAt||0):a[t.status]-a[n.status]})},[l,a,t,C,u,i,s,e.management,ue,c,o]),pe=(0,f.useMemo)(()=>JSON.stringify([o,i,a,t,c,l,s.trim().toLowerCase(),d]),[d,l,a,t,i,s,c,o]),me=(0,f.useMemo)(()=>o===`agents`?AA(fe,p.scope===pe?p.keys:[],NT):{items:fe,keys:fe.map(NT)},[p,pe,fe,o]);return{allAgents:m,operatorName:h,gpuUsage:g,gpuOptions:_,selectedGpu:v,selectedGpuHost:y,selectedGpuIndex:b,gpuWindowMs:x,gpuActivityEpisodes:S,gpuSessionIds:C,gpuEpisodesBySession:w,snapshotSubmissionTracker:T,submissionTracker:E,submissionHostFailures:ee,submissionWindowLabel:te,submissionCounts:D,auditedDlcCalls:ne,dlcCallCounts:re,allExperiments:ie,usageFrequency:ae,inactiveAgents:oe,projects:se,selectedProjectKey:ce,selectedProject:le,sourceAgents:ue,cwdOptions:de,sortedMatchingAgents:fe,activeAgentOrderScope:pe,stableAgentOrder:me,filteredAgents:me.items}}function MA({query:e,allExperiments:t,hostFilter:n,gpuFilter:r,gpuActivityEpisodes:i,filteredAgents:a,selectedAgentId:o,inspectorSectionOpen:s,gpuEpisodesBySession:c,snapshot:l,dialogueState:u,recoveryCwdDrafts:d,recoveryYoloDrafts:p,hostModelOpen:m}){let h=(0,f.useMemo)(()=>{let a=e.trim().toLowerCase();return t.filter(e=>n===`all`||e.host===n).filter(e=>r===`all`||i.some(t=>t.host===e.host&&t.paneSession===e.session&&(!t.pane||t.pane===e.pane))).filter(e=>a?[e.host,e.hostname,e.cwd,e.session,e.command,e.preview].some(e=>e?.toLowerCase().includes(a)):!0).sort((e,t)=>{let n={attention:0,working:1,idle:2};return n[e.status]===n[t.status]?(t.activityAt||0)-(e.activityAt||0):n[e.status]-n[t.status]})},[t,i,r,n,e]),g=a.find(e=>e.id===o)||null,_=!!(g&&!g.historical&&!g.appServerManaged&&!g.pane&&g.pid>0),v=g?NT(g):``,y=v?s[`${v}:dialogue`]??!1:!1,b=v?s[`${v}:summary`]??!1:!1,x=v?s[`${v}:research`]??!1:!1,S=v?s[`${v}:control`]??!1:!1,C=v?s[`${v}:experiments`]??!1:!1,w=v?s[`${v}:policy`]??!1:!1,T=g&&c.get(NT(g))||[],E=g?PT(g,l.management):{},ee=g?LT(g,l.management):null,te=g?.rollout?.account?.primary?.used_percent??null,D=g?.host||``,ne=g?.rollout?.id||``,re=g?.rollout?.lastEventAt||String(g?.rollout?.mtimeMs||``),ie=D&&ne?`${D}:${ne}`:``,ae=u.key===ie?u.data:null,oe=u.key===ie&&u.loading,se=!!(ie&&(u.key!==ie||u.loading)),ce=u.key===ie?u.error:``,le=l.appServer?.pendingRequests||l.appServer?.pendingInputs||[],ue=g?.rollout?.id?le.filter(e=>e.host===g.host&&e.threadId===g.rollout?.id):[],de=!!(g&&l.appServer?.connections.some(e=>e.host===g.host&&e.status===`connected`&&e.sessionIds.includes(g.rollout?.id||``))),fe=g?.rollout?.id?l.appServer?.sessions.find(e=>e.host===g.host&&e.sessionId===g.rollout?.id&&(de&&e.status!==`offline`||!!e.profileAssignment?.handoff)):null,pe=g?UT(g,l.hosts):[],me=g?d[NT(g)]??(g.historical?pe[0]||``:g.cwd):``,he=g?p[NT(g)]??fe?.yolo??IT(g,l.management):!0,ge=m&&n!==`all`?n:g?.host||``,_e=m?``:g?.rollout?.id||``,ve=l.appServer?.sessions.find(e=>e.host===ge&&e.sessionId===_e)?.connectionKey;return{filteredExperiments:h,selectedAgent:g,selectedAgentIsExternalTerminal:_,selectedInspectorKey:v,selectedDialogueExpanded:y,selectedSummaryExpanded:b,selectedResearchExpanded:x,selectedControlExpanded:S,selectedExperimentsExpanded:C,selectedPolicyExpanded:w,selectedAgentGpuUsage:T,selectedManagement:E,selectedSummary:ee,selectedQuotaUsed:te,selectedDialogueHost:D,selectedDialogueSessionId:ne,selectedDialogueLastEventAt:re,selectedDialogueKey:ie,selectedDialogue:ae,selectedDialogueLoading:oe,selectedDialoguePending:se,selectedDialogueError:ce,pendingHumanRequests:le,selectedHumanRequests:ue,selectedAppServerConnected:de,selectedAppServerSession:fe,selectedRecoveryCwdOptions:pe,selectedRecoveryCwd:me,selectedRecoveryYolo:he,modelCatalogHost:ge,modelCatalogSessionId:_e,modelCatalogConnectionKey:ve,modelCatalogKey:_e&&ge?WT(ge,_e,ve):ge}}function NA(e){let[t,n]=(0,f.useState)({}),r=e||`new`,i=(0,f.useCallback)(e=>{n(t=>({...t,[r]:typeof e==`function`?e(t[r]||``):e}))},[r]);return[t[r]||``,i]}function PA(){let[e,t]=(0,f.useState)(DT),[n,r]=(0,f.useState)(`connecting`),[i,a]=(0,f.useState)(`agents`),[o,s]=(0,f.useState)(`all`),[c,l]=(0,f.useState)(`all`),[u,d]=(0,f.useState)(``),[p,m]=(0,f.useState)(!1),[h,g]=(0,f.useState)(`all`),[_,v]=(0,f.useState)(`6h`),[y,b]=(0,f.useState)(100),[x,S]=(0,f.useState)(`recent`),[C,w]=(0,f.useState)({sessions:[],scannedAt:null,scope:``,hosts:[],loading:!1,error:``}),[T,E]=(0,f.useState)(`all`),[ee,te]=(0,f.useState)(`all`),[D,ne]=(0,f.useState)(``),[re,ie]=(0,f.useState)(32),[ae,oe]=(0,f.useState)(0),[se,ce]=(0,f.useState)({scope:``,keys:[]}),[le,ue]=(0,f.useState)(null),[de,fe]=(0,f.useState)(null),[pe,me]=(0,f.useState)(``),[he,ge]=(0,f.useState)(!1),[_e,ve]=(0,f.useState)(!1),[ye,be]=(0,f.useState)(`light`),[xe,Se]=(0,f.useState)(!1),[Ce,we]=(0,f.useState)(``),[Te,Ee]=(0,f.useState)(null),[De,Oe]=(0,f.useState)(null),[ke,Ae]=(0,f.useState)(``),[je,Me]=(0,f.useState)({}),[Ne,Pe]=(0,f.useState)({}),[Fe,Ie]=(0,f.useState)(()=>Date.now()),[Le,Re]=(0,f.useState)(0),[ze,Be]=(0,f.useState)(`desc`),[Ve,He]=(0,f.useState)({dialogue:!0,operations:!0,reasoning:!0,subagent:!0}),[Ue,We]=(0,f.useState)(new Set),[Ge,Ke]=(0,f.useState)(60),[qe,Je]=(0,f.useState)({}),[Ye,Xe]=(0,f.useState)({key:``,loading:!1,data:null,error:``}),[Ze,Qe]=(0,f.useState)(!1),[$e,et]=(0,f.useState)(null),[tt,nt]=(0,f.useState)(null),[rt,it]=(0,f.useState)(null),[O,at]=(0,f.useState)(!1),[ot,st]=(0,f.useState)({open:!1,loading:!1,error:``,listing:null}),[ct,lt]=(0,f.useState)(!1),[ut,dt]=(0,f.useState)(``),ft=(0,f.useRef)(``),pt=(0,f.useRef)(0),[mt,ht]=(0,f.useState)(null),[gt,_t]=(0,f.useState)(!1),[vt,yt]=(0,f.useState)(``),[bt,xt]=(0,f.useState)(null),[St,Ct]=(0,f.useState)(null),[wt,Tt]=(0,f.useState)({}),[Et,Dt]=(0,f.useState)({}),[Ot,kt]=(0,f.useState)(0),[At,k]=(0,f.useState)({}),[jt,Mt]=(0,f.useState)(!1),[Nt,Pt]=(0,f.useState)(!1),[Ft,It]=(0,f.useState)({}),[Lt,Rt]=(0,f.useState)({}),[zt,Bt]=(0,f.useState)({}),[Vt,Ht]=(0,f.useState)({}),[Ut,Wt]=(0,f.useState)({}),[Gt,Kt]=(0,f.useState)({}),[qt,Jt]=(0,f.useState)(!1),[Yt,Xt]=(0,f.useState)(1),[Zt,Qt]=(0,f.useState)(!1),[$t,en]=(0,f.useState)(!1),[tn,nn]=(0,f.useState)(``),[rn,an]=(0,f.useState)(!1),[on,sn]=(0,f.useState)([{id:`welcome`,role:`assistant`,text:`想找哪个实验或任务?描述关键词,我会查找相关会话并列出证据。`,model:`retrieval-only`}]),[cn,ln]=(0,f.useState)({host:``,cwd:``,prompt:``,model:``,effort:``,preLaunchCommand:``,yolo:!0,transport:`app-server`}),[un,dn]=NA(le),[fn,pn]=(0,f.useState)([]),[mn,hn]=(0,f.useState)(null),gn=(0,f.useRef)(null),_n=(0,f.useRef)(``),vn=(0,f.useRef)([]),yn=(0,f.useRef)(null),bn=(0,f.useRef)(null),xn=(0,f.useRef)(null),Sn=(0,f.useRef)(!1),[Cn,wn]=(0,f.useState)(470),[Tn,En]=(0,f.useState)(!1);return{snapshot:e,setSnapshot:t,bridgeState:n,setBridgeState:r,viewMode:i,setViewMode:a,hostFilter:o,setHostFilter:s,cwdFilter:c,setCwdFilter:l,projectBusyKey:u,setProjectBusyKey:d,conversationFocus:p,setConversationFocus:m,gpuFilter:h,setGpuFilter:g,gpuWindow:_,setGpuWindow:v,historyLimit:y,setHistoryLimit:b,historyOrder:x,setHistoryOrder:S,historyState:C,setHistoryState:w,statusFilter:T,setStatusFilter:E,categoryFilter:ee,setCategoryFilter:te,query:D,setQuery:ne,sessionRenderLimit:re,setSessionRenderLimit:ie,agentOrderRevision:ae,setAgentOrderRevision:oe,activeAgentOrder:se,setActiveAgentOrder:ce,selectedAgentId:le,setSelectedAgentId:ue,selectedExperimentId:de,setSelectedExperimentId:fe,copied:pe,setCopied:me,mobileHostsOpen:he,setMobileHostsOpen:ge,hostSidebarCollapsed:_e,setHostSidebarCollapsed:ve,uiTheme:ye,setUiTheme:be,operatorEditorOpen:xe,setOperatorEditorOpen:Se,operatorNameDraft:Ce,setOperatorNameDraft:we,sshTerminalTarget:Te,setSshTerminalTarget:Ee,policyDraft:De,setPolicyDraft:Oe,busyAction:ke,setBusyAction:Ae,planInputDrafts:je,setPlanInputDrafts:Me,elicitationDrafts:Ne,setElicitationDrafts:Pe,clockNow:Fe,setClockNow:Ie,dialogueRefresh:Le,setDialogueRefresh:Re,dialogueOrder:ze,setDialogueOrder:Be,dialogueFilters:Ve,setDialogueFilters:He,expandedDialogueEvents:Ue,setExpandedDialogueEvents:We,dialogueRenderLimit:Ge,setDialogueRenderLimit:Ke,inspectorSectionOpen:qe,setInspectorSectionOpen:Je,dialogueState:Ye,setDialogueState:Xe,dialogueLoadingMore:Ze,setDialogueLoadingMore:Qe,themeEdit:$e,setThemeEdit:et,inlineRename:tt,setInlineRename:nt,actionNotice:rt,setActionNotice:it,newTaskOpen:O,setNewTaskOpen:at,newTaskDirectoryBrowser:ot,setNewTaskDirectoryBrowser:st,accountProfilesOpen:ct,setAccountProfilesOpen:lt,accountHost:ut,setAccountHost:dt,accountHostRef:ft,accountProfilesRequestRef:pt,accountProfiles:mt,setAccountProfiles:ht,accountProfilesLoading:gt,setAccountProfilesLoading:_t,profileNameDraft:vt,setProfileNameDraft:yt,deviceLoginJob:bt,setDeviceLoginJob:xt,authRestartJob:St,setAuthRestartJob:Ct,modelsByHost:wt,setModelsByHost:Tt,modelDrafts:Et,setModelDrafts:Dt,modelRefresh:Ot,setModelRefresh:kt,modelErrors:At,setModelErrors:k,hostModelOpen:jt,setHostModelOpen:Mt,hostSettingsOpen:Nt,setHostSettingsOpen:Pt,hostModelDrafts:Ft,setHostModelDrafts:It,hostModelResults:Lt,setHostModelResults:Rt,effortDrafts:zt,setEffortDrafts:Bt,yoloDrafts:Vt,setYoloDrafts:Ht,recoveryCwdDrafts:Ut,setRecoveryCwdDrafts:Wt,recoveryYoloDrafts:Gt,setRecoveryYoloDrafts:Kt,submissionTrackerOpen:qt,setSubmissionTrackerOpen:Jt,submissionWindowDays:Yt,setSubmissionWindowDays:Xt,showDlcCandidates:Zt,setShowDlcCandidates:Qt,researchAssistantOpen:$t,setResearchAssistantOpen:en,researchAssistantDraft:tn,setResearchAssistantDraft:nn,researchAssistantBusy:rn,setResearchAssistantBusy:an,researchAssistantMessages:on,setResearchAssistantMessages:sn,newTaskDraft:cn,setNewTaskDraft:ln,instructionDraft:un,setInstructionDraft:dn,instructionAttachments:fn,setInstructionAttachments:pn,pendingInstruction:mn,setPendingInstruction:hn,instructionAttemptRef:gn,instructionAttachmentOwnerRef:_n,instructionAttachmentsRef:vn,instructionFileInputRef:yn,monitorColumnsRef:bn,researchAssistantMessagesRef:xn,resizeActiveRef:Sn,inspectorWidth:Cn,setInspectorWidth:wn,isResizing:Tn,setIsResizing:En}}function FA({setUiTheme:e,setHostSidebarCollapsed:t}){(0,f.useEffect)(()=>{let n=window.localStorage.getItem(`scope:ui-theme`);n===`light`||n===`dark`?e(n):window.matchMedia?.(`(prefers-color-scheme: dark)`).matches&&e(`dark`),t(window.localStorage.getItem(`scope:host-sidebar-collapsed`)===`1`)},[t,e])}function IA({researchAssistantOpen:e,researchAssistantMessagesRef:t,researchAssistantBusy:n,researchAssistantMessages:r}){(0,f.useEffect)(()=>{if(!e)return;let n=t.current;n&&(n.scrollTop=n.scrollHeight)},[n,r,t,e])}function LA({snapshot:e,setClockNow:t}){(0,f.useEffect)(()=>{if(!(e.appServer?.pendingRequests||[]).some(e=>e.expiresAt))return;let n=window.setInterval(()=>t(Date.now()),1e3);return()=>window.clearInterval(n)},[t,e.appServer?.pendingRequests])}function RA({monitorColumnsRef:e,setInspectorWidth:t,hostSidebarCollapsed:n}){(0,f.useEffect)(()=>{let r=window.requestAnimationFrame(()=>{let r=NaN;try{r=Number(window.localStorage.getItem(ST))}catch{}t(ET(Number.isFinite(r)&&r>0?r:470,e.current?.clientWidth||window.innerWidth,window.innerWidth,n))});function i(){let r=e.current?.clientWidth||window.innerWidth;t(e=>ET(e,r,window.innerWidth,n))}return window.addEventListener(`resize`,i),()=>{window.cancelAnimationFrame(r),window.removeEventListener(`resize`,i)}},[n,e,t])}function zA({viewMode:e,filteredAgents:t,setConversationFocus:n}){(0,f.useEffect)(()=>{(e===`experiments`||t.length===0)&&n(!1)},[e,t.length,n])}function BA({viewMode:e,setActiveAgentOrder:t,activeAgentOrderScope:n,stableAgentOrder:r}){(0,f.useEffect)(()=>{e===`agents`&&t(e=>e.scope===n&&e.keys.length===r.keys.length&&e.keys.every((e,t)=>e===r.keys[t])?e:{scope:n,keys:r.keys})},[n,t,r.keys,e])}function VA({setSessionRenderLimit:e,categoryFilter:t,cwdFilter:n,gpuFilter:r,historyOrder:i,hostFilter:a,query:o,statusFilter:s,viewMode:c}){(0,f.useEffect)(()=>{e(32)},[t,n,r,i,a,o,e,s,c])}function HA({modelCatalogHost:e,modelCatalogKey:t,modelCatalogSessionId:n,setModelsByHost:r,setModelErrors:i,modelRefresh:a}){(0,f.useEffect)(()=>{if(!e||!t)return;let a=e,o=t,s=new AbortController,c=()=>fetch(TT(`/api/models?host=${encodeURIComponent(a)}&sessionId=${encodeURIComponent(n)}&refresh=1`),{cache:`no-store`,signal:s.signal}).then(async e=>{let t=await e.json();if(!e.ok)throw Error(t.error||`HTTP ${e.status}`);r(e=>({...e,[o]:t.models||[]})),i(e=>({...e,[o]:``}))}).catch(e=>{e.name!==`AbortError`&&(r(e=>({...e,[o]:[]})),i(t=>({...t,[o]:e.message})))});c();let l=window.setInterval(c,6e4);return()=>{s.abort(),window.clearInterval(l)}},[e,t,n,a,i,r])}function UA(){let e=Xk(()=>Et),{loadAccountProfiles:t,reloadModelsForHost:n}=e,r=PA(),{snapshot:i,setSnapshot:a,setBridgeState:o,viewMode:s,hostFilter:c,cwdFilter:l,setConversationFocus:u,gpuFilter:d,gpuWindow:p,historyOrder:m,historyState:h,statusFilter:g,categoryFilter:_,query:v,sessionRenderLimit:y,setSessionRenderLimit:b,agentOrderRevision:x,activeAgentOrder:S,setActiveAgentOrder:C,selectedAgentId:w,selectedExperimentId:T,setCopied:E,hostSidebarCollapsed:ee,setHostSidebarCollapsed:te,setUiTheme:D,setBusyAction:ne,setClockNow:re,dialogueRefresh:ie,dialogueOrder:ae,dialogueFilters:oe,setExpandedDialogueEvents:se,dialogueRenderLimit:ce,setDialogueRenderLimit:le,inspectorSectionOpen:ue,dialogueState:de,setDialogueState:fe,setDialogueLoadingMore:pe,setActionNotice:me,accountProfilesOpen:he,accountHost:ge,setProfileNameDraft:_e,deviceLoginJob:ve,setDeviceLoginJob:ye,authRestartJob:be,setAuthRestartJob:xe,setModelsByHost:Se,setModelDrafts:Ce,modelRefresh:we,setModelErrors:Te,hostModelOpen:Ee,setEffortDrafts:De,recoveryCwdDrafts:Oe,recoveryYoloDrafts:ke,researchAssistantOpen:Ae,researchAssistantBusy:je,researchAssistantMessages:Me,instructionAttachments:Ne,setInstructionAttachments:Pe,pendingInstruction:Fe,setPendingInstruction:Ie,instructionAttachmentOwnerRef:Le,instructionAttachmentsRef:Re,instructionFileInputRef:ze,monitorColumnsRef:Be,researchAssistantMessagesRef:Ve,setInspectorWidth:He}=r;FA({setUiTheme:D,setHostSidebarCollapsed:te}),IA({researchAssistantOpen:Ae,researchAssistantMessagesRef:Ve,researchAssistantBusy:je,researchAssistantMessages:Me}),DA({setSnapshot:a,setBridgeState:o}),LA({snapshot:i,setClockNow:re}),nA({instructionAttachmentsRef:Re,instructionAttachments:Ne}),rA({instructionAttachmentsRef:Re}),iA({instructionAttachmentOwnerRef:Le,setInstructionAttachments:Pe,instructionFileInputRef:ze,selectedAgentId:w}),RA({monitorColumnsRef:Be,setInspectorWidth:He,hostSidebarCollapsed:ee});let Ue=jA({snapshot:i,gpuFilter:d,gpuWindow:p,historyState:h,hostFilter:c,cwdFilter:l,viewMode:s,query:v,statusFilter:g,categoryFilter:_,historyOrder:m,agentOrderRevision:x,activeAgentOrder:S}),{allAgents:We,gpuActivityEpisodes:Ge,gpuEpisodesBySession:Ke,allExperiments:qe,sortedMatchingAgents:Je,activeAgentOrderScope:Ye,stableAgentOrder:Xe,filteredAgents:Ze}=Ue;zA({viewMode:s,filteredAgents:Ze,setConversationFocus:u});let Qe=s===`agents`&&Je.some((e,t)=>NT(e)!==NT(Ze[t]));BA({viewMode:s,setActiveAgentOrder:C,activeAgentOrderScope:Ye,stableAgentOrder:Xe});let $e=(0,f.useMemo)(()=>Ze.slice(0,y),[Ze,y]);VA({setSessionRenderLimit:b,categoryFilter:_,cwdFilter:l,gpuFilter:d,historyOrder:m,hostFilter:c,query:v,statusFilter:g,viewMode:s});let et=MA({query:v,allExperiments:qe,hostFilter:c,gpuFilter:d,gpuActivityEpisodes:Ge,filteredAgents:[...We,...Ue.inactiveAgents],selectedAgentId:w,inspectorSectionOpen:ue,gpuEpisodesBySession:Ke,snapshot:i,dialogueState:de,recoveryCwdDrafts:Oe,recoveryYoloDrafts:ke,hostModelOpen:Ee}),{filteredExperiments:tt,selectedAgent:nt,selectedDialogueExpanded:rt,selectedSummary:it,selectedDialogueHost:O,selectedDialogueSessionId:at,selectedDialogueLastEventAt:ot,selectedDialogueKey:st,selectedDialogue:ct,modelCatalogHost:lt,modelCatalogSessionId:ut,modelCatalogKey:dt}=et;HA({modelCatalogHost:lt,modelCatalogKey:dt,modelCatalogSessionId:ut,setModelsByHost:Se,setModelErrors:Te,modelRefresh:we}),Zk({selectedAgent:nt,setModelDrafts:Ce,setEffortDrafts:De}),Qk({accountProfilesOpen:he,accountHost:ge,setDeviceLoginJob:ye,setAuthRestartJob:xe,loadAccountProfiles:t}),$k({deviceLoginJob:ve,getJson:Ct,setDeviceLoginJob:ye,setProfileNameDraft:_e,loadAccountProfiles:t,setActionNotice:me}),aA({authRestartJob:be,getJson:Ct,setAuthRestartJob:xe,setBusyAction:ne,reloadModelsForHost:n,setActionNotice:me,refresh:xt});let ft=(0,f.useMemo)(()=>{let e={dialogue:0,operations:0,reasoning:0,subagent:0};return ct?.events.forEach(t=>{e[t.category]+=1}),e},[ct]),pt=(0,f.useMemo)(()=>{let e=(ct?.events||[]).filter(e=>oe[e.category]);return ae===`desc`?[...e].reverse():e},[oe,ae,ct]),mt=(0,f.useMemo)(()=>pt.slice(0,ce),[ce,pt]);oA({setDialogueRenderLimit:le,dialogueFilters:oe,dialogueOrder:ae,selectedDialogueKey:st});let ht=(0,f.useMemo)(()=>{let e=``,t=``,n=``;for(let r of ct?.events||[])r.category!==`dialogue`||!r.text||(r.kind===`user`&&(e=r.text),r.kind===`assistant`&&(t=r.text,n=r.id));return{latestUser:e,latestAssistant:t,latestAssistantId:n}},[ct]);sA({pendingInstruction:Fe,selectedAgent:nt,canonicalDialogueMessages:ht,setPendingInstruction:Ie,setActionNotice:me});let gt=it?.source===`rollout`?ht.latestAssistant||it.result:it?.result||ht.latestAssistant,_t=qe.find(e=>e.id===T)||tt[0]||null,vt=c===`all`?null:i.hosts.find(e=>e.alias===c)||null,yt=vt?new Set([...i.appServer.sessions.filter(e=>e.host===vt.alias).map(e=>e.sessionId),...(i.appServer.restorePending||[]).filter(e=>e.host===vt.alias).map(e=>e.sessionId)]).size:0,bt=(0,f.useMemo)(()=>({working:We.filter(e=>e.status===`working`).length,idle:We.filter(e=>e.status===`idle`).length,attention:We.filter(e=>e.status===`attention`).length}),[We]);cA({selectedDialogueHost:O,selectedDialogueSessionId:at,setDialogueLoadingMore:pe,setDialogueState:fe,selectedDialogueExpanded:rt,setExpandedDialogueEvents:se,dialogueRefresh:ie,selectedDialogueLastEventAt:ot});async function xt(){try{await fetch(TT(`/api/refresh`),{method:`POST`}),o(`connected`)}catch{o(`offline`)}}async function St(e,t){let n=await fetch(TT(e),{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)}),r=await n.json();if(!n.ok)throw Error(r.error||`HTTP ${n.status}`);return r}async function Ct(e){let t=await fetch(TT(e),{cache:`no-store`}),n=await t.json();if(!t.ok)throw Error(n.error||`HTTP ${t.status}`);return n}function wt(e,t){return[...e].sort((e,n)=>{let r=(n.lastActivityAt||0)-(e.lastActivityAt||0);return t===`recent`?r:-r})}async function Tt(e,t){await navigator.clipboard.writeText(e),E(t),window.setTimeout(()=>E(``),1500)}let Et={...r,...Ue,...et,...e,hasPendingAgentOrder:Qe,renderedAgents:$e,dialogueCategoryCounts:ft,visibleDialogueEvents:pt,renderedDialogueEvents:mt,canonicalDialogueMessages:ht,selectedResearchResult:gt,selectedExperiment:_t,selectedHost:vt,selectedHostAppServerCount:yt,statusCounts:bt,refresh:xt,postJson:St,getJson:Ct,sortedHistorySessions:wt,copy:Tt};return Et}function WA(){return(0,O.jsx)(dc,{children:(0,O.jsx)(GA,{})})}function GA(){let e=UA(),t=eE(),n=DD(e),r=tE((t,n)=>{e.selectedAgent?.host===t&&e.selectedAgent.rollout?.id===n&&e.setSelectedAgentId(null)}),[i,a]=(0,f.useState)(`manager`),[o,s]=(0,f.useState)(`general`),[c,l]=(0,f.useState)(!1),[u,d]=(0,f.useState)(`all`),p=(0,f.useRef)({}),m=RD({workspace:e,catalog:n,section:i,setSection:a,projectHost:u,setProjectHost:d}),h={...e,projects:n.projects,selectedAgentId:n.selected?.key||e.selectedAgentId,chooseHost:t=>{m.cancel(),n.clear(),a(`projects`),e.chooseHost(t),d(t),t!==`all`&&e.selectedAgent?.host!==t&&e.setSelectedAgentId(null)},chooseProject:(...t)=>{m.cancel(),a(`projects`),e.chooseProject(...t);let r=t[0],i=p.current[r.key],o=r.sessions.find(e=>e.id===i)||r.sessions[0];o?.catalog?n.select(o.id):(n.clear(),e.setSelectedAgentId(o?.id||null))},selectProjectSession:(...t)=>{m.cancel(),a(`projects`),t[1].catalog?n.select(t[1].id):(n.clear(),e.selectProjectSession(...t)),p.current[t[0].key]=t[1].id},openNewTask:(...t)=>{m.cancel(),a(`projects`),e.setActionNotice(null),e.openNewTask(...t)},createTask:async(...t)=>(u!==`all`&&d(e.newTaskDraft.host),await e.createTask(...t)),focusHumanRequest:(...t)=>{m.cancel(),a(`projects`),e.focusHumanRequest(...t)}};function g(t){m.cancel(),a(t),e.setMobileHostsOpen(!1)}let{bridgeState:_,copied:v,mobileHostsOpen:y,setMobileHostsOpen:b,hostSidebarCollapsed:x,uiTheme:S,sshTerminalTarget:C,setSshTerminalTarget:w,actionNotice:T,setActionNotice:E,monitorColumnsRef:te,isResizing:D,copy:ne}=e;return _===`offline`&&!e.snapshot.generatedAt?(0,O.jsx)(dt,{theme:S,copied:v===`scope`,onCopy:()=>{ne(`npm run scope`,`scope`)}}):(0,O.jsxs)(`main`,{className:`monitor-shell ${D?`is-resizing`:``}`,"data-ui-theme":S,children:[(0,O.jsx)(wO,{...h,section:i,onNavigate:g,onOpenSettings:(e=`general`)=>{s(e),g(`settings`)}}),_===`offline`&&(0,O.jsx)(ft,{}),m.message&&(0,O.jsxs)(`div`,{className:`connection-reconnect-notice`,role:`status`,children:[(0,O.jsx)(`span`,{children:m.message}),(0,O.jsx)(`button`,{type:`button`,onClick:m.retry,children:`重试`}),(0,O.jsx)(`button`,{type:`button`,onClick:m.cancel,children:`关闭`})]}),(0,O.jsxs)(`div`,{className:`monitor-columns chat-workspace workbench-mode ${x?`hosts-collapsed`:``}`,ref:te,children:[(0,O.jsx)(CD,{...h,workbench:t,archives:r,sessionCatalog:n,projectHost:u,section:i,onNavigate:g}),y&&(0,O.jsx)(`button`,{className:`mobile-backdrop`,"aria-label":`关闭主机列表`,onClick:()=>b(!1)}),i===`projects`?n.selected?(0,O.jsx)(sO,{entry:n.selected,onChanged:()=>{n.refresh()},onAccounts:()=>{e.openAccountProfiles(n.selected?.host)}},n.selected.key):(0,O.jsx)(xO,{workspace:h,onTools:()=>l(!0)},e.selectedAgentId||`empty`):(0,O.jsx)(HE,{client:t,section:i,onNavigate:g,workspace:h,settingsTab:o,onSettingsTabChange:s})]}),c&&(0,O.jsx)(SO,{workspace:e,onClose:()=>l(!1)}),C&&(0,O.jsx)(ct,{target:C,uiTheme:S,onClose:()=>w(null)}),(0,O.jsx)(CO,{...e}),(0,O.jsx)(iD,{...e,defaultProvider:n.selected?.provider===`claude`||n.selected?.provider===`antigravity`?n.selected.provider:`codex`}),(0,O.jsx)(MD,{...h,onNativeCreated:e=>{u!==`all`&&d(e.host),n.created(e),a(`projects`)}}),(0,O.jsx)(PD,{...e}),T&&(0,O.jsxs)(`div`,{className:`action-toast ${T.kind}`,role:T.kind===`error`?`alert`:`status`,children:[T.kind===`success`?(0,O.jsx)(ee,{size:15}):(0,O.jsx)($e,{size:15}),(0,O.jsx)(`span`,{children:T.text}),(0,O.jsx)(`button`,{type:`button`,"aria-label":`关闭通知`,onClick:()=>E(null),children:(0,O.jsx)(it,{size:14})})]})]})}export{WA as default};