@polderlabs/bizar 7.0.2 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (490) hide show
  1. package/.claude/settings.local.json +8 -0
  2. package/bizar-dash/DESIGN.md +729 -969
  3. package/bizar-dash/GLYPH.md +418 -0
  4. package/bizar-dash/PLAN.md +1135 -0
  5. package/bizar-dash/dist/assets/ActivityFeed-BRBtQOHB.js +6 -0
  6. package/bizar-dash/dist/assets/ActivityFeed-BRBtQOHB.js.map +1 -0
  7. package/bizar-dash/dist/assets/ActivityView-CwqhxBfh.js +1 -0
  8. package/bizar-dash/dist/assets/ActivityView-CwqhxBfh.js.map +1 -0
  9. package/bizar-dash/dist/assets/AgentActivity-6MxU-a9F.js +1 -0
  10. package/bizar-dash/dist/assets/AgentActivity-6MxU-a9F.js.map +1 -0
  11. package/bizar-dash/dist/assets/AgentsView-BYrOFdwl.js +8 -0
  12. package/bizar-dash/dist/assets/AgentsView-BYrOFdwl.js.map +1 -0
  13. package/bizar-dash/dist/assets/Badge-Cd61wsBa.js +1 -0
  14. package/bizar-dash/dist/assets/Badge-Cd61wsBa.js.map +1 -0
  15. package/bizar-dash/dist/assets/Card-C_bvqXdQ.js +1 -0
  16. package/bizar-dash/dist/assets/Card-C_bvqXdQ.js.map +1 -0
  17. package/bizar-dash/dist/assets/EmptyState-BWQuKnk9.js +1 -0
  18. package/bizar-dash/dist/assets/EmptyState-BWQuKnk9.js.map +1 -0
  19. package/bizar-dash/dist/assets/GoalsView-Dok0yt9S.js +11 -0
  20. package/bizar-dash/dist/assets/GoalsView-Dok0yt9S.js.map +1 -0
  21. package/bizar-dash/dist/assets/Grid-C62gCPqt.js +1 -0
  22. package/bizar-dash/dist/assets/Grid-C62gCPqt.js.map +1 -0
  23. package/bizar-dash/dist/assets/KanbanCard-CtTKP6ZX.js +21 -0
  24. package/bizar-dash/dist/assets/KanbanCard-CtTKP6ZX.js.map +1 -0
  25. package/bizar-dash/dist/assets/LibrariesView-BcyBQXiY.js +67 -0
  26. package/bizar-dash/dist/assets/LibrariesView-BcyBQXiY.js.map +1 -0
  27. package/bizar-dash/dist/assets/MemoryView-49wR4u-y.js +13 -0
  28. package/bizar-dash/dist/assets/MemoryView-49wR4u-y.js.map +1 -0
  29. package/bizar-dash/dist/assets/OverviewView-BtQ_UWYj.js +1 -0
  30. package/bizar-dash/dist/assets/OverviewView-BtQ_UWYj.js.map +1 -0
  31. package/bizar-dash/dist/assets/ProgressBar-CpvDeq9F.js +1 -0
  32. package/bizar-dash/dist/assets/ProgressBar-CpvDeq9F.js.map +1 -0
  33. package/bizar-dash/dist/assets/SettingsRow-DmIe5OUu.js +30 -0
  34. package/bizar-dash/dist/assets/SettingsRow-DmIe5OUu.js.map +1 -0
  35. package/bizar-dash/dist/assets/SettingsView-D1KmGWbi.js +48 -0
  36. package/bizar-dash/dist/assets/SettingsView-D1KmGWbi.js.map +1 -0
  37. package/bizar-dash/dist/assets/StatTile-BkIP32gG.js +11 -0
  38. package/bizar-dash/dist/assets/StatTile-BkIP32gG.js.map +1 -0
  39. package/bizar-dash/dist/assets/TasksView-Cba3GJ42.js +1 -0
  40. package/bizar-dash/dist/assets/TasksView-Cba3GJ42.js.map +1 -0
  41. package/bizar-dash/dist/assets/ViewHeader-D6c2cw1b.js +6 -0
  42. package/bizar-dash/dist/assets/ViewHeader-D6c2cw1b.js.map +1 -0
  43. package/bizar-dash/dist/assets/brain-DeoXNDE2.js +6 -0
  44. package/bizar-dash/dist/assets/brain-DeoXNDE2.js.map +1 -0
  45. package/bizar-dash/dist/assets/calendar-DRlQkGJc.js +6 -0
  46. package/bizar-dash/dist/assets/calendar-DRlQkGJc.js.map +1 -0
  47. package/bizar-dash/dist/assets/circle-check-DmYQ3vGp.js +6 -0
  48. package/bizar-dash/dist/assets/circle-check-DmYQ3vGp.js.map +1 -0
  49. package/bizar-dash/dist/assets/cmdk-BwN8hcKQ.js +80 -0
  50. package/bizar-dash/dist/assets/cmdk-BwN8hcKQ.js.map +1 -0
  51. package/bizar-dash/dist/assets/dnd-kit-DR2Qzzxk.js +5 -0
  52. package/bizar-dash/dist/assets/dnd-kit-DR2Qzzxk.js.map +1 -0
  53. package/bizar-dash/dist/assets/git-merge-OoqBKQer.js +6 -0
  54. package/bizar-dash/dist/assets/git-merge-OoqBKQer.js.map +1 -0
  55. package/bizar-dash/dist/assets/git-pull-request-CXBQTR2f.js +6 -0
  56. package/bizar-dash/dist/assets/git-pull-request-CXBQTR2f.js.map +1 -0
  57. package/bizar-dash/dist/assets/main-COdgjqbZ.css +1 -0
  58. package/bizar-dash/dist/assets/main-Cw6gybzS.js +109 -0
  59. package/bizar-dash/dist/assets/main-Cw6gybzS.js.map +1 -0
  60. package/bizar-dash/dist/assets/message-square-DUTeIQAR.js +6 -0
  61. package/bizar-dash/dist/assets/message-square-DUTeIQAR.js.map +1 -0
  62. package/bizar-dash/dist/assets/minus-CrStJTZ7.js +6 -0
  63. package/bizar-dash/dist/assets/minus-CrStJTZ7.js.map +1 -0
  64. package/bizar-dash/dist/assets/wrench-BJ1WIC4u.js +6 -0
  65. package/bizar-dash/dist/assets/wrench-BJ1WIC4u.js.map +1 -0
  66. package/bizar-dash/dist/{mobile.html → v8.html} +6 -9
  67. package/bizar-dash/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
  68. package/bizar-dash/src/server/server.mjs +1 -57
  69. package/bizar-dash/src/web/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
  70. package/bizar-dash/src/web/v8/App.tsx +188 -0
  71. package/bizar-dash/src/web/v8/__tests__/App.test.tsx +102 -0
  72. package/bizar-dash/src/web/v8/__tests__/AppShell.test.tsx +79 -0
  73. package/bizar-dash/src/web/v8/__tests__/PageSkeleton.test.tsx +12 -0
  74. package/bizar-dash/src/web/v8/__tests__/SettingsView.test.tsx +84 -0
  75. package/bizar-dash/src/web/v8/__tests__/Sidebar.test.tsx +95 -0
  76. package/bizar-dash/src/web/v8/__tests__/activity.test.tsx +63 -0
  77. package/bizar-dash/src/web/v8/__tests__/agents.test.tsx +90 -0
  78. package/bizar-dash/src/web/v8/__tests__/controls.test.tsx +135 -0
  79. package/bizar-dash/src/web/v8/__tests__/cx.test.ts +25 -0
  80. package/bizar-dash/src/web/v8/__tests__/data.test.tsx +293 -0
  81. package/bizar-dash/src/web/v8/__tests__/feedback.test.tsx +213 -0
  82. package/bizar-dash/src/web/v8/__tests__/goals.test.tsx +105 -0
  83. package/bizar-dash/src/web/v8/__tests__/kanban.test.tsx +176 -0
  84. package/bizar-dash/src/web/v8/__tests__/libraries.test.tsx +70 -0
  85. package/bizar-dash/src/web/v8/__tests__/memory.test.tsx +60 -0
  86. package/bizar-dash/src/web/v8/__tests__/navigation.test.tsx +137 -0
  87. package/bizar-dash/src/web/v8/__tests__/settings.test.tsx +104 -0
  88. package/bizar-dash/src/web/v8/__tests__/theme.test.tsx +98 -0
  89. package/bizar-dash/src/web/v8/__tests__/views.test.tsx +112 -0
  90. package/bizar-dash/src/web/v8/main.tsx +28 -0
  91. package/bizar-dash/src/web/v8/shell/AppShell.tsx +90 -0
  92. package/bizar-dash/src/web/v8/shell/PageSkeleton.tsx +29 -0
  93. package/bizar-dash/src/web/v8/shell/Sidebar.tsx +361 -0
  94. package/bizar-dash/src/web/v8/shell/StatusBar.tsx +63 -0
  95. package/bizar-dash/src/web/v8/shell/Topbar.tsx +113 -0
  96. package/bizar-dash/src/web/v8/shell/index.ts +15 -0
  97. package/bizar-dash/src/web/v8/ui/activity/ActivityFeed.tsx +137 -0
  98. package/bizar-dash/src/web/v8/ui/agents/AgentActivity.tsx +101 -0
  99. package/bizar-dash/src/web/v8/ui/agents/AgentCard.tsx +158 -0
  100. package/bizar-dash/src/web/v8/ui/controls/Button.tsx +141 -0
  101. package/bizar-dash/src/web/v8/ui/controls/ButtonGroup.tsx +32 -0
  102. package/bizar-dash/src/web/v8/ui/controls/Checkbox.tsx +49 -0
  103. package/bizar-dash/src/web/v8/ui/controls/Field.tsx +78 -0
  104. package/bizar-dash/src/web/v8/ui/controls/Form.tsx +23 -0
  105. package/bizar-dash/src/web/v8/ui/controls/IconButton.tsx +112 -0
  106. package/bizar-dash/src/web/v8/ui/controls/Input.tsx +94 -0
  107. package/bizar-dash/src/web/v8/ui/controls/RadioGroup.tsx +74 -0
  108. package/bizar-dash/src/web/v8/ui/controls/Select.tsx +171 -0
  109. package/bizar-dash/src/web/v8/ui/controls/Slider.tsx +68 -0
  110. package/bizar-dash/src/web/v8/ui/controls/Switch.tsx +56 -0
  111. package/bizar-dash/src/web/v8/ui/controls/Textarea.tsx +64 -0
  112. package/bizar-dash/src/web/v8/ui/controls/Toggle.tsx +36 -0
  113. package/bizar-dash/src/web/v8/ui/controls/ToggleGroup.tsx +85 -0
  114. package/bizar-dash/src/web/v8/ui/data/Accordion.tsx +134 -0
  115. package/bizar-dash/src/web/v8/ui/data/Avatar.tsx +175 -0
  116. package/bizar-dash/src/web/v8/ui/data/Badge.tsx +93 -0
  117. package/bizar-dash/src/web/v8/ui/data/BarList.tsx +101 -0
  118. package/bizar-dash/src/web/v8/ui/data/Card.tsx +140 -0
  119. package/bizar-dash/src/web/v8/ui/data/Chip.tsx +96 -0
  120. package/bizar-dash/src/web/v8/ui/data/Kbd.tsx +42 -0
  121. package/bizar-dash/src/web/v8/ui/data/ProgressBar.tsx +93 -0
  122. package/bizar-dash/src/web/v8/ui/data/Sparkline.tsx +98 -0
  123. package/bizar-dash/src/web/v8/ui/data/StatTile.tsx +150 -0
  124. package/bizar-dash/src/web/v8/ui/data/Table.tsx +170 -0
  125. package/bizar-dash/src/web/v8/ui/data/Timeline.tsx +130 -0
  126. package/bizar-dash/src/web/v8/ui/data/ViewHeader.tsx +122 -0
  127. package/bizar-dash/src/web/v8/ui/feedback/Alert.tsx +95 -0
  128. package/bizar-dash/src/web/v8/ui/feedback/Banner.tsx +39 -0
  129. package/bizar-dash/src/web/v8/ui/feedback/ContextMenu.tsx +143 -0
  130. package/bizar-dash/src/web/v8/ui/feedback/Dialog.tsx +149 -0
  131. package/bizar-dash/src/web/v8/ui/feedback/Drawer.tsx +8 -0
  132. package/bizar-dash/src/web/v8/ui/feedback/DropdownMenu.tsx +231 -0
  133. package/bizar-dash/src/web/v8/ui/feedback/EmptyState.tsx +48 -0
  134. package/bizar-dash/src/web/v8/ui/feedback/Popover.tsx +56 -0
  135. package/bizar-dash/src/web/v8/ui/feedback/Sheet.tsx +103 -0
  136. package/bizar-dash/src/web/v8/ui/feedback/Skeleton.tsx +67 -0
  137. package/bizar-dash/src/web/v8/ui/feedback/Spinner.tsx +30 -0
  138. package/bizar-dash/src/web/v8/ui/feedback/Toast.tsx +66 -0
  139. package/bizar-dash/src/web/v8/ui/feedback/Tooltip.tsx +89 -0
  140. package/bizar-dash/src/web/v8/ui/goals/GoalCard.tsx +176 -0
  141. package/bizar-dash/src/web/v8/ui/goals/KeyResult.tsx +115 -0
  142. package/bizar-dash/src/web/v8/ui/index.ts +322 -0
  143. package/bizar-dash/src/web/v8/ui/kanban/KanbanBoard.tsx +80 -0
  144. package/bizar-dash/src/web/v8/ui/kanban/KanbanCard.tsx +247 -0
  145. package/bizar-dash/src/web/v8/ui/kanban/KanbanColumn.tsx +181 -0
  146. package/bizar-dash/src/web/v8/ui/kanban/KanbanContextMenu.tsx +122 -0
  147. package/bizar-dash/src/web/v8/ui/kanban/KanbanQuickAdd.tsx +141 -0
  148. package/bizar-dash/src/web/v8/ui/libraries/LibraryGrid.tsx +30 -0
  149. package/bizar-dash/src/web/v8/ui/libraries/LibraryItem.tsx +161 -0
  150. package/bizar-dash/src/web/v8/ui/memory/MemoryVault.tsx +144 -0
  151. package/bizar-dash/src/web/v8/ui/navigation/CommandPalette.tsx +224 -0
  152. package/bizar-dash/src/web/v8/ui/navigation/NavLink.tsx +81 -0
  153. package/bizar-dash/src/web/v8/ui/navigation/Pagination.tsx +164 -0
  154. package/bizar-dash/src/web/v8/ui/navigation/Tabs.tsx +128 -0
  155. package/bizar-dash/src/web/v8/ui/navigation/useCommandPaletteHotkey.test.ts +79 -0
  156. package/bizar-dash/src/web/v8/ui/primitives/Box.tsx +144 -0
  157. package/bizar-dash/src/web/v8/ui/primitives/Center.tsx +40 -0
  158. package/bizar-dash/src/web/v8/ui/primitives/Cluster.tsx +67 -0
  159. package/bizar-dash/src/web/v8/ui/primitives/Grid.tsx +104 -0
  160. package/bizar-dash/src/web/v8/ui/primitives/Inline.tsx +77 -0
  161. package/bizar-dash/src/web/v8/ui/primitives/Portal.tsx +33 -0
  162. package/bizar-dash/src/web/v8/ui/primitives/ScrollArea.tsx +62 -0
  163. package/bizar-dash/src/web/v8/ui/primitives/Separator.tsx +42 -0
  164. package/bizar-dash/src/web/v8/ui/primitives/Stack.tsx +73 -0
  165. package/bizar-dash/src/web/v8/ui/primitives/VisuallyHidden.tsx +49 -0
  166. package/bizar-dash/src/web/v8/ui/settings/SettingsNav.tsx +91 -0
  167. package/bizar-dash/src/web/v8/ui/settings/SettingsRow.tsx +88 -0
  168. package/bizar-dash/src/web/v8/ui/settings/SettingsSection.tsx +109 -0
  169. package/bizar-dash/src/web/v8/ui/styles/globals.css +220 -0
  170. package/bizar-dash/src/web/v8/ui/styles/reset.css +57 -0
  171. package/bizar-dash/src/web/v8/ui/styles/tokens.css +217 -0
  172. package/bizar-dash/src/web/v8/ui/theme/DensityProvider.test.tsx +74 -0
  173. package/bizar-dash/src/web/v8/ui/theme/DensityProvider.tsx +66 -0
  174. package/bizar-dash/src/web/v8/ui/theme/ThemeProvider.test.tsx +86 -0
  175. package/bizar-dash/src/web/v8/ui/theme/ThemeProvider.tsx +94 -0
  176. package/bizar-dash/src/web/v8/ui/theme/ThemeToggle.tsx +88 -0
  177. package/bizar-dash/src/web/v8/ui/theme/useDensity.ts +15 -0
  178. package/bizar-dash/src/web/v8/ui/theme/useTheme.ts +16 -0
  179. package/bizar-dash/src/web/v8/ui/utils/cx.ts +19 -0
  180. package/bizar-dash/src/web/v8/views/Activity/ActivityView.tsx +33 -0
  181. package/bizar-dash/src/web/v8/views/Agents/AgentsView.tsx +108 -0
  182. package/bizar-dash/src/web/v8/views/CommandPalette/AppCommandPalette.test.tsx +142 -0
  183. package/bizar-dash/src/web/v8/views/CommandPalette/AppCommandPalette.tsx +144 -0
  184. package/bizar-dash/src/web/v8/views/Goals/GoalsView.tsx +84 -0
  185. package/bizar-dash/src/web/v8/views/Libraries/LibrariesView.tsx +41 -0
  186. package/bizar-dash/src/web/v8/views/Memory/MemoryView.tsx +61 -0
  187. package/bizar-dash/src/web/v8/views/Overview/OverviewView.tsx +92 -0
  188. package/bizar-dash/src/web/v8/views/Router.tsx +96 -0
  189. package/bizar-dash/src/web/v8/views/Settings/SettingsView.tsx +305 -0
  190. package/bizar-dash/src/web/v8/views/Tasks/CommandPalettePlaceholder.tsx +106 -0
  191. package/bizar-dash/src/web/v8/views/Tasks/TasksKanbanPlaceholder.tsx +62 -0
  192. package/bizar-dash/src/web/v8/views/Tasks/TasksView.tsx +74 -0
  193. package/bizar-dash/src/web/v8/vite-env.d.ts +15 -0
  194. package/bizar-dash/src/web/{mobile.html → v8.html} +4 -7
  195. package/bizar-dash/tests/settings-layout.test.tsx +2 -2
  196. package/bizar-dash/tests/settings-nav.test.tsx +6 -6
  197. package/bizar-dash/tests/setup.ts +26 -0
  198. package/bizar-dash/vite.config.ts +26 -2
  199. package/bizar-dash/vitest.config.ts +5 -3
  200. package/cli/provision-claude.mjs +108 -5
  201. package/package.json +36 -3
  202. package/bizar-dash/dist/assets/EnvVarsSection-BfhAz3ax.js +0 -114
  203. package/bizar-dash/dist/assets/EnvVarsSection-BfhAz3ax.js.map +0 -1
  204. package/bizar-dash/dist/assets/MobileChat-DLWdv6tQ.js +0 -1
  205. package/bizar-dash/dist/assets/MobileChat-DLWdv6tQ.js.map +0 -1
  206. package/bizar-dash/dist/assets/MobileSettings-Bxv62uPY.js +0 -1
  207. package/bizar-dash/dist/assets/MobileSettings-Bxv62uPY.js.map +0 -1
  208. package/bizar-dash/dist/assets/Toast-ATSAmbdi.js +0 -26
  209. package/bizar-dash/dist/assets/Toast-ATSAmbdi.js.map +0 -1
  210. package/bizar-dash/dist/assets/__vite-browser-external-BIHI7g3E.js +0 -1
  211. package/bizar-dash/dist/assets/__vite-browser-external-BIHI7g3E.js.map +0 -1
  212. package/bizar-dash/dist/assets/main-306CZfn6.js +0 -430
  213. package/bizar-dash/dist/assets/main-306CZfn6.js.map +0 -1
  214. package/bizar-dash/dist/assets/main-G3bNDpY3.css +0 -1
  215. package/bizar-dash/dist/assets/mobile-C_naUN91.js +0 -1
  216. package/bizar-dash/dist/assets/mobile-C_naUN91.js.map +0 -1
  217. package/bizar-dash/dist/assets/mobile-layout-BWLtwtfQ.css +0 -1
  218. package/bizar-dash/dist/assets/mobile-layout-GZ3bE8L6.js +0 -211
  219. package/bizar-dash/dist/assets/mobile-layout-GZ3bE8L6.js.map +0 -1
  220. package/bizar-dash/dist/assets/useSlashCommands-BOwD7lNb.js +0 -65
  221. package/bizar-dash/dist/assets/useSlashCommands-BOwD7lNb.js.map +0 -1
  222. package/bizar-dash/dist/index.html +0 -43
  223. package/bizar-dash/src/web/App.tsx +0 -915
  224. package/bizar-dash/src/web/MobileApp.tsx +0 -414
  225. package/bizar-dash/src/web/components/ArtifactCreateDialog.tsx +0 -95
  226. package/bizar-dash/src/web/components/ArtifactListDialog.tsx +0 -55
  227. package/bizar-dash/src/web/components/ArtifactViewer.tsx +0 -144
  228. package/bizar-dash/src/web/components/AuditDialog.tsx +0 -79
  229. package/bizar-dash/src/web/components/AutosaveField.tsx +0 -50
  230. package/bizar-dash/src/web/components/BackupRestore.tsx +0 -330
  231. package/bizar-dash/src/web/components/BgStatusBadge.tsx +0 -32
  232. package/bizar-dash/src/web/components/Button.tsx +0 -56
  233. package/bizar-dash/src/web/components/CanvasContextMenu.tsx +0 -68
  234. package/bizar-dash/src/web/components/Card.tsx +0 -40
  235. package/bizar-dash/src/web/components/CollapsibleSection.tsx +0 -72
  236. package/bizar-dash/src/web/components/CommandDialog.tsx +0 -66
  237. package/bizar-dash/src/web/components/DoctorPanel.tsx +0 -160
  238. package/bizar-dash/src/web/components/EmptyState.tsx +0 -30
  239. package/bizar-dash/src/web/components/EnvVarManager.tsx +0 -430
  240. package/bizar-dash/src/web/components/EvalDiff.tsx +0 -157
  241. package/bizar-dash/src/web/components/EvalExportButton.tsx +0 -27
  242. package/bizar-dash/src/web/components/EvalRunCard.tsx +0 -78
  243. package/bizar-dash/src/web/components/FileBrowser.tsx +0 -633
  244. package/bizar-dash/src/web/components/HeadroomSettings.tsx +0 -418
  245. package/bizar-dash/src/web/components/HeadroomStatus.tsx +0 -158
  246. package/bizar-dash/src/web/components/HelpDialog.tsx +0 -55
  247. package/bizar-dash/src/web/components/InviteDialog.tsx +0 -205
  248. package/bizar-dash/src/web/components/KillConfirmDialog.tsx +0 -88
  249. package/bizar-dash/src/web/components/MobileBottomNav.tsx +0 -38
  250. package/bizar-dash/src/web/components/MobileDrawer.tsx +0 -68
  251. package/bizar-dash/src/web/components/MobileHeader.tsx +0 -50
  252. package/bizar-dash/src/web/components/MobileLayout.tsx +0 -63
  253. package/bizar-dash/src/web/components/Modal.tsx +0 -215
  254. package/bizar-dash/src/web/components/Notifications.tsx +0 -242
  255. package/bizar-dash/src/web/components/ScheduleTemplateCard.tsx +0 -72
  256. package/bizar-dash/src/web/components/ScreenshotCapture.tsx +0 -138
  257. package/bizar-dash/src/web/components/ScreenshotOCR.tsx +0 -42
  258. package/bizar-dash/src/web/components/SearchModal.tsx +0 -227
  259. package/bizar-dash/src/web/components/SettingsNav.tsx +0 -112
  260. package/bizar-dash/src/web/components/SettingsSearch.tsx +0 -328
  261. package/bizar-dash/src/web/components/Sidebar.tsx +0 -89
  262. package/bizar-dash/src/web/components/Spinner.tsx +0 -19
  263. package/bizar-dash/src/web/components/StatusBadge.tsx +0 -56
  264. package/bizar-dash/src/web/components/Tag.tsx +0 -41
  265. package/bizar-dash/src/web/components/TailscaleSettings.tsx +0 -161
  266. package/bizar-dash/src/web/components/TaskCard.tsx +0 -69
  267. package/bizar-dash/src/web/components/TaskCreateSheet.tsx +0 -76
  268. package/bizar-dash/src/web/components/Toast.tsx +0 -150
  269. package/bizar-dash/src/web/components/Toggle.tsx +0 -31
  270. package/bizar-dash/src/web/components/Topbar.tsx +0 -410
  271. package/bizar-dash/src/web/components/UsageChart.tsx +0 -250
  272. package/bizar-dash/src/web/components/UsageTable.tsx +0 -90
  273. package/bizar-dash/src/web/components/VirtualList.tsx +0 -53
  274. package/bizar-dash/src/web/components/VisualPlanDialog.tsx +0 -58
  275. package/bizar-dash/src/web/components/VoiceNotesPanel.tsx +0 -211
  276. package/bizar-dash/src/web/components/VoiceRecorder.tsx +0 -105
  277. package/bizar-dash/src/web/components/WorkspaceSelector.tsx +0 -158
  278. package/bizar-dash/src/web/components/agents/CommunicationLog.tsx +0 -126
  279. package/bizar-dash/src/web/components/agents/DependencyGraph.tsx +0 -163
  280. package/bizar-dash/src/web/components/agents/QualityGates.tsx +0 -123
  281. package/bizar-dash/src/web/components/agents/RealTimeEventLog.tsx +0 -127
  282. package/bizar-dash/src/web/components/agents/RoutingDecisions.test.tsx +0 -148
  283. package/bizar-dash/src/web/components/agents/RoutingDecisions.tsx +0 -160
  284. package/bizar-dash/src/web/components/background/AttachButton.tsx +0 -96
  285. package/bizar-dash/src/web/components/background/TmuxAttachCard.tsx +0 -122
  286. package/bizar-dash/src/web/components/chat/AgentChip.tsx +0 -68
  287. package/bizar-dash/src/web/components/chat/AgentNode.tsx +0 -127
  288. package/bizar-dash/src/web/components/chat/AgentTree.tsx +0 -80
  289. package/bizar-dash/src/web/components/chat/ChatBubble.tsx +0 -60
  290. package/bizar-dash/src/web/components/chat/ChatComposer.tsx +0 -72
  291. package/bizar-dash/src/web/components/chat/ChatInfoPanel.tsx +0 -370
  292. package/bizar-dash/src/web/components/chat/ChatRail.tsx +0 -387
  293. package/bizar-dash/src/web/components/chat/ChatThread.tsx +0 -127
  294. package/bizar-dash/src/web/components/chat/ChatTopBar.tsx +0 -50
  295. package/bizar-dash/src/web/components/chat/Composer.tsx +0 -166
  296. package/bizar-dash/src/web/components/chat/ConfirmModal.tsx +0 -54
  297. package/bizar-dash/src/web/components/chat/EmptyState.tsx +0 -21
  298. package/bizar-dash/src/web/components/chat/FirstRunGreeting.tsx +0 -18
  299. package/bizar-dash/src/web/components/chat/FloatingComposer.tsx +0 -38
  300. package/bizar-dash/src/web/components/chat/InfoPanel.tsx +0 -184
  301. package/bizar-dash/src/web/components/chat/JumpToLatest.tsx +0 -58
  302. package/bizar-dash/src/web/components/chat/LoadingSkeleton.tsx +0 -19
  303. package/bizar-dash/src/web/components/chat/MessageBlock.tsx +0 -260
  304. package/bizar-dash/src/web/components/chat/MessageBubble.tsx +0 -60
  305. package/bizar-dash/src/web/components/chat/SessionList.tsx +0 -163
  306. package/bizar-dash/src/web/components/chat/SessionRowMenu.tsx +0 -206
  307. package/bizar-dash/src/web/components/chat/StreamingIndicator.tsx +0 -37
  308. package/bizar-dash/src/web/components/chat/SuggestionCards.tsx +0 -55
  309. package/bizar-dash/src/web/components/chat/WelcomeScreen.tsx +0 -36
  310. package/bizar-dash/src/web/components/chat/_legacy.ts +0 -30
  311. package/bizar-dash/src/web/components/chat/index.ts +0 -31
  312. package/bizar-dash/src/web/components/chat/useAutoGrowTextarea.ts +0 -18
  313. package/bizar-dash/src/web/components/chat/useChat.ts +0 -1190
  314. package/bizar-dash/src/web/components/chat/useSlashCommands.ts +0 -47
  315. package/bizar-dash/src/web/components/goals/GoalInput.tsx +0 -86
  316. package/bizar-dash/src/web/components/goals/PlanVisualization.tsx +0 -111
  317. package/bizar-dash/src/web/components/tasks/BacklogPanel.css +0 -109
  318. package/bizar-dash/src/web/components/tasks/BacklogPanel.tsx +0 -209
  319. package/bizar-dash/src/web/hooks/useAutosave.ts +0 -107
  320. package/bizar-dash/src/web/hooks/useI18n.ts +0 -13
  321. package/bizar-dash/src/web/index.html +0 -37
  322. package/bizar-dash/src/web/lib/api.ts +0 -237
  323. package/bizar-dash/src/web/lib/goapPlanner.ts +0 -614
  324. package/bizar-dash/src/web/lib/i18n.ts +0 -25
  325. package/bizar-dash/src/web/lib/logger.ts +0 -30
  326. package/bizar-dash/src/web/lib/markdown.tsx +0 -59
  327. package/bizar-dash/src/web/lib/search.ts +0 -115
  328. package/bizar-dash/src/web/lib/types.ts +0 -894
  329. package/bizar-dash/src/web/lib/utils.ts +0 -114
  330. package/bizar-dash/src/web/lib/ws.ts +0 -177
  331. package/bizar-dash/src/web/locales/en.json +0 -52
  332. package/bizar-dash/src/web/main.tsx +0 -43
  333. package/bizar-dash/src/web/mobile/MobileApp.tsx +0 -309
  334. package/bizar-dash/src/web/mobile/MobileBottomNav.tsx +0 -38
  335. package/bizar-dash/src/web/mobile/MobileChat.tsx +0 -138
  336. package/bizar-dash/src/web/mobile/MobileDoctor.tsx +0 -80
  337. package/bizar-dash/src/web/mobile/MobileEval.tsx +0 -167
  338. package/bizar-dash/src/web/mobile/MobileMemory.tsx +0 -108
  339. package/bizar-dash/src/web/mobile/MobileOverview.tsx +0 -213
  340. package/bizar-dash/src/web/mobile/MobileSettings.tsx +0 -251
  341. package/bizar-dash/src/web/mobile/MobileTasks.tsx +0 -94
  342. package/bizar-dash/src/web/mobile/MobileTopbar.tsx +0 -115
  343. package/bizar-dash/src/web/mobile/components/MobileBottomSheet.tsx +0 -182
  344. package/bizar-dash/src/web/mobile/components/MobileListItem.tsx +0 -64
  345. package/bizar-dash/src/web/mobile/components/MobileModal.tsx +0 -123
  346. package/bizar-dash/src/web/mobile/views/MobileActivity.tsx +0 -273
  347. package/bizar-dash/src/web/mobile/views/MobileAgents.tsx +0 -374
  348. package/bizar-dash/src/web/mobile/views/MobileArtifactCanvas.tsx +0 -439
  349. package/bizar-dash/src/web/mobile/views/MobileArtifacts.tsx +0 -143
  350. package/bizar-dash/src/web/mobile/views/MobileChat.tsx +0 -257
  351. package/bizar-dash/src/web/mobile/views/MobileConfig.tsx +0 -175
  352. package/bizar-dash/src/web/mobile/views/MobileHistory.tsx +0 -191
  353. package/bizar-dash/src/web/mobile/views/MobileMods.tsx +0 -149
  354. package/bizar-dash/src/web/mobile/views/MobileMore.tsx +0 -121
  355. package/bizar-dash/src/web/mobile/views/MobileNotifications.tsx +0 -137
  356. package/bizar-dash/src/web/mobile/views/MobilePlans.tsx +0 -26
  357. package/bizar-dash/src/web/mobile/views/MobileSchedules.tsx +0 -685
  358. package/bizar-dash/src/web/mobile/views/MobileSearchModal.tsx +0 -172
  359. package/bizar-dash/src/web/mobile/views/MobileSettings.tsx +0 -363
  360. package/bizar-dash/src/web/mobile/views/MobileSkills.tsx +0 -153
  361. package/bizar-dash/src/web/mobile/views/MobileTasks.tsx +0 -564
  362. package/bizar-dash/src/web/mobile/views/QrCodePanel.tsx +0 -69
  363. package/bizar-dash/src/web/mobile.tsx +0 -14
  364. package/bizar-dash/src/web/styles/agents-redesign.css +0 -311
  365. package/bizar-dash/src/web/styles/chat.css +0 -1740
  366. package/bizar-dash/src/web/styles/glyphs.css +0 -960
  367. package/bizar-dash/src/web/styles/main.css +0 -10391
  368. package/bizar-dash/src/web/styles/memory.css +0 -1182
  369. package/bizar-dash/src/web/styles/minimax-usage.css +0 -842
  370. package/bizar-dash/src/web/styles/mobile-chat.css +0 -5
  371. package/bizar-dash/src/web/styles/mobile-layout.css +0 -233
  372. package/bizar-dash/src/web/styles/mobile.css +0 -2181
  373. package/bizar-dash/src/web/styles/settings.css +0 -795
  374. package/bizar-dash/src/web/styles/skills.css +0 -302
  375. package/bizar-dash/src/web/styles/tasks-redesign.css +0 -253
  376. package/bizar-dash/src/web/styles/tasks.css +0 -605
  377. package/bizar-dash/src/web/ui/controls/Button.tsx +0 -77
  378. package/bizar-dash/src/web/ui/controls/Checkbox.tsx +0 -95
  379. package/bizar-dash/src/web/ui/controls/IconButton.tsx +0 -66
  380. package/bizar-dash/src/web/ui/controls/Kbd.tsx +0 -24
  381. package/bizar-dash/src/web/ui/controls/NumberInput.tsx +0 -77
  382. package/bizar-dash/src/web/ui/controls/RadioGroup.tsx +0 -109
  383. package/bizar-dash/src/web/ui/controls/SearchInput.tsx +0 -91
  384. package/bizar-dash/src/web/ui/controls/Select.tsx +0 -92
  385. package/bizar-dash/src/web/ui/controls/Slider.tsx +0 -70
  386. package/bizar-dash/src/web/ui/controls/TextInput.tsx +0 -67
  387. package/bizar-dash/src/web/ui/controls/Textarea.tsx +0 -56
  388. package/bizar-dash/src/web/ui/controls/Toggle.tsx +0 -79
  389. package/bizar-dash/src/web/ui/controls/controls.css +0 -476
  390. package/bizar-dash/src/web/ui/controls/index.ts +0 -35
  391. package/bizar-dash/src/web/ui/data/BarChart.tsx +0 -60
  392. package/bizar-dash/src/web/ui/data/DataTable.tsx +0 -216
  393. package/bizar-dash/src/web/ui/data/EmptyState.tsx +0 -60
  394. package/bizar-dash/src/web/ui/data/ErrorState.tsx +0 -56
  395. package/bizar-dash/src/web/ui/data/KeyValueList.tsx +0 -106
  396. package/bizar-dash/src/web/ui/data/LoadingState.tsx +0 -65
  397. package/bizar-dash/src/web/ui/data/Sparkline.tsx +0 -87
  398. package/bizar-dash/src/web/ui/data/StatTile.tsx +0 -87
  399. package/bizar-dash/src/web/ui/data/data.css +0 -535
  400. package/bizar-dash/src/web/ui/data/index.ts +0 -31
  401. package/bizar-dash/src/web/ui/feedback/Badge.tsx +0 -49
  402. package/bizar-dash/src/web/ui/feedback/Dialog.tsx +0 -209
  403. package/bizar-dash/src/web/ui/feedback/ProgressBar.tsx +0 -69
  404. package/bizar-dash/src/web/ui/feedback/StatusDot.tsx +0 -50
  405. package/bizar-dash/src/web/ui/feedback/Toast.tsx +0 -200
  406. package/bizar-dash/src/web/ui/feedback/Tooltip.tsx +0 -126
  407. package/bizar-dash/src/web/ui/feedback/feedback.css +0 -314
  408. package/bizar-dash/src/web/ui/feedback/index.ts +0 -43
  409. package/bizar-dash/src/web/ui/index.ts +0 -56
  410. package/bizar-dash/src/web/ui/layout/AppShell.tsx +0 -51
  411. package/bizar-dash/src/web/ui/layout/Breadcrumbs.tsx +0 -97
  412. package/bizar-dash/src/web/ui/layout/Panel.tsx +0 -73
  413. package/bizar-dash/src/web/ui/layout/PanelHeader.tsx +0 -39
  414. package/bizar-dash/src/web/ui/layout/Sidebar.tsx +0 -131
  415. package/bizar-dash/src/web/ui/layout/Tabs.tsx +0 -133
  416. package/bizar-dash/src/web/ui/layout/Topbar.tsx +0 -42
  417. package/bizar-dash/src/web/ui/layout/ViewHeader.tsx +0 -48
  418. package/bizar-dash/src/web/ui/layout/index.ts +0 -34
  419. package/bizar-dash/src/web/ui/layout/layout.css +0 -464
  420. package/bizar-dash/src/web/ui/navigation/CommandPalette.tsx +0 -199
  421. package/bizar-dash/src/web/ui/navigation/NavGroup.tsx +0 -95
  422. package/bizar-dash/src/web/ui/navigation/NavLink.tsx +0 -93
  423. package/bizar-dash/src/web/ui/navigation/index.ts +0 -17
  424. package/bizar-dash/src/web/ui/navigation/navigation.css +0 -343
  425. package/bizar-dash/src/web/ui/primitives/Box.tsx +0 -91
  426. package/bizar-dash/src/web/ui/primitives/Grid.tsx +0 -49
  427. package/bizar-dash/src/web/ui/primitives/Inline.tsx +0 -55
  428. package/bizar-dash/src/web/ui/primitives/Separator.tsx +0 -46
  429. package/bizar-dash/src/web/ui/primitives/Stack.tsx +0 -54
  430. package/bizar-dash/src/web/ui/primitives/VisuallyHidden.tsx +0 -26
  431. package/bizar-dash/src/web/ui/primitives/index.ts +0 -23
  432. package/bizar-dash/src/web/ui/primitives/primitives.css +0 -183
  433. package/bizar-dash/src/web/ui/styles/globals.css +0 -86
  434. package/bizar-dash/src/web/ui/styles/reset.css +0 -125
  435. package/bizar-dash/src/web/ui/styles/tokens.css +0 -208
  436. package/bizar-dash/src/web/ui/theme/ThemeProvider.tsx +0 -142
  437. package/bizar-dash/src/web/ui/theme/tokens.ts +0 -131
  438. package/bizar-dash/src/web/ui/theme/useTheme.ts +0 -22
  439. package/bizar-dash/src/web/ui/utils/cx.ts +0 -42
  440. package/bizar-dash/src/web/views/Activity.tsx +0 -1221
  441. package/bizar-dash/src/web/views/Agents.tsx +0 -964
  442. package/bizar-dash/src/web/views/Artifacts.tsx +0 -1494
  443. package/bizar-dash/src/web/views/BackgroundAgents.tsx +0 -822
  444. package/bizar-dash/src/web/views/Chat.tsx +0 -532
  445. package/bizar-dash/src/web/views/Config.tsx +0 -3
  446. package/bizar-dash/src/web/views/Doctor.tsx +0 -317
  447. package/bizar-dash/src/web/views/Eval.tsx +0 -372
  448. package/bizar-dash/src/web/views/EvalReport.tsx +0 -353
  449. package/bizar-dash/src/web/views/GoalPlanner.tsx +0 -158
  450. package/bizar-dash/src/web/views/Harness.tsx +0 -306
  451. package/bizar-dash/src/web/views/History.tsx +0 -353
  452. package/bizar-dash/src/web/views/Memory.tsx +0 -161
  453. package/bizar-dash/src/web/views/MiniMaxUsage.tsx +0 -942
  454. package/bizar-dash/src/web/views/ModView.tsx +0 -207
  455. package/bizar-dash/src/web/views/Mods.tsx +0 -706
  456. package/bizar-dash/src/web/views/Overview.tsx +0 -1364
  457. package/bizar-dash/src/web/views/Providers.tsx +0 -302
  458. package/bizar-dash/src/web/views/Schedules.tsx +0 -902
  459. package/bizar-dash/src/web/views/Settings.tsx +0 -308
  460. package/bizar-dash/src/web/views/Skills.tsx +0 -383
  461. package/bizar-dash/src/web/views/SpawnAgentModal.tsx +0 -221
  462. package/bizar-dash/src/web/views/Tasks.tsx +0 -789
  463. package/bizar-dash/src/web/views/Workspace.tsx +0 -294
  464. package/bizar-dash/src/web/views/glyphs/GlyphRenderer.tsx +0 -844
  465. package/bizar-dash/src/web/views/glyphs/components.tsx +0 -1098
  466. package/bizar-dash/src/web/views/memory/ConfigPanel.tsx +0 -426
  467. package/bizar-dash/src/web/views/memory/FromScreenshotPanel.tsx +0 -23
  468. package/bizar-dash/src/web/views/memory/GitSyncPanel.tsx +0 -220
  469. package/bizar-dash/src/web/views/memory/LightragPanel.tsx +0 -310
  470. package/bizar-dash/src/web/views/memory/MemoryGraphLegend.tsx +0 -29
  471. package/bizar-dash/src/web/views/memory/MemoryGraphPanel.tsx +0 -192
  472. package/bizar-dash/src/web/views/memory/MemoryGraphView.tsx +0 -336
  473. package/bizar-dash/src/web/views/memory/MemoryOverview.tsx +0 -367
  474. package/bizar-dash/src/web/views/memory/MemoryStatusCard.tsx +0 -160
  475. package/bizar-dash/src/web/views/memory/ObsidianPanel.tsx +0 -650
  476. package/bizar-dash/src/web/views/memory/SemanticSearchPanel.tsx +0 -197
  477. package/bizar-dash/src/web/views/memory/VaultFromClipboardPanel.tsx +0 -101
  478. package/bizar-dash/src/web/views/settings/ActivitySection.tsx +0 -205
  479. package/bizar-dash/src/web/views/settings/AgentSection.tsx +0 -305
  480. package/bizar-dash/src/web/views/settings/AuthSection.tsx +0 -159
  481. package/bizar-dash/src/web/views/settings/EnvVarsSection.tsx +0 -15
  482. package/bizar-dash/src/web/views/settings/GeneralSection.tsx +0 -128
  483. package/bizar-dash/src/web/views/settings/HeadroomSection.tsx +0 -39
  484. package/bizar-dash/src/web/views/settings/MemorySection.tsx +0 -154
  485. package/bizar-dash/src/web/views/settings/NetworkSection.tsx +0 -87
  486. package/bizar-dash/src/web/views/settings/NotificationsSection.tsx +0 -34
  487. package/bizar-dash/src/web/views/settings/SystemLlmSection.tsx +0 -81
  488. package/bizar-dash/src/web/views/settings/ThemeSection.tsx +0 -168
  489. package/bizar-dash/src/web/views/settings/UpdatesSection.tsx +0 -256
  490. package/bizar-dash/src/web/views/settings/WorkspacesSection.tsx +0 -189
@@ -1,65 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mobile-layout-GZ3bE8L6.js","assets/mobile-layout-BWLtwtfQ.css"])))=>i.map(i=>d[i]);
2
- import{c as Xe,j as E,F as Oi,Q as wt,K as zr,m as ji,R as Bi,T as $i,r as P,B as Hi,X as Ui,d as Vi,y as qi,o as Wi,b as be,L as Ot,_ as Yi}from"./mobile-layout-GZ3bE8L6.js";import{a as Pr}from"./Toast-ATSAmbdi.js";/**
3
- * @license lucide-react v0.460.0 - ISC
4
- *
5
- * This source code is licensed under the ISC license.
6
- * See the LICENSE file in the root directory of this source tree.
7
- */const Qi=Xe("BookOpen",[["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"}]]);/**
8
- * @license lucide-react v0.460.0 - ISC
9
- *
10
- * This source code is licensed under the ISC license.
11
- * See the LICENSE file in the root directory of this source tree.
12
- */const Xi=Xe("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
13
- * @license lucide-react v0.460.0 - ISC
14
- *
15
- * This source code is licensed under the ISC license.
16
- * See the LICENSE file in the root directory of this source tree.
17
- */const Gi=Xe("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"}]]);/**
18
- * @license lucide-react v0.460.0 - ISC
19
- *
20
- * This source code is licensed under the ISC license.
21
- * See the LICENSE file in the root directory of this source tree.
22
- */const Ki=Xe("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"}]]);/**
23
- * @license lucide-react v0.460.0 - ISC
24
- *
25
- * This source code is licensed under the ISC license.
26
- * See the LICENSE file in the root directory of this source tree.
27
- */const Ji=Xe("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
28
- * @license lucide-react v0.460.0 - ISC
29
- *
30
- * This source code is licensed under the ISC license.
31
- * See the LICENSE file in the root directory of this source tree.
32
- */const Rn=Xe("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/**
33
- * @license lucide-react v0.460.0 - ISC
34
- *
35
- * This source code is licensed under the ISC license.
36
- * See the LICENSE file in the root directory of this source tree.
37
- */const Zi=Xe("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"}]]);function nh({activeProject:e,sessionCount:n,sessionsOpen:t,infoOpen:r,onToggleSessions:i,onToggleInfo:o,onOpenOverview:l}){return E.jsxs("header",{className:"chat-topbar",children:[E.jsxs("button",{type:"button",className:"chat-topbar-project",onClick:l,children:[E.jsx(Oi,{size:14}),E.jsx("span",{className:"chat-topbar-project-name",children:(e==null?void 0:e.name)??"No project"}),E.jsx(Pr,{size:12})]}),E.jsx("div",{className:"chat-topbar-spacer"}),E.jsxs("button",{type:"button",className:`chat-topbar-btn ${t?"active":""}`,onClick:i,"aria-pressed":t,children:["Sessions (",n,")"]}),E.jsx("button",{type:"button",className:`chat-topbar-btn ${r?"active":""}`,onClick:o,"aria-pressed":r,children:"Info"})]})}function el({count:e=3}){return E.jsx("div",{className:"chat-loading-skeleton","aria-label":"Loading messages",children:Array.from({length:e}).map((n,t)=>E.jsxs("div",{className:"chat-loading-skeleton-bubble",children:[E.jsx("div",{className:"chat-loading-skeleton-meta"}),E.jsx("div",{className:"chat-loading-skeleton-line"}),E.jsx("div",{className:"chat-loading-skeleton-line short"})]},t))})}function tl({projectName:e,onPickSuggestion:n}){const t=[{icon:E.jsx(Xi,{size:16}),title:e?`Explain ${e}`:"Explain this project",preview:"Give me a tour of the codebase, highlight the architecture, and call out any anti-patterns or hotspots.",prompt:e?`Explain the ${e} project. Give me a tour of the codebase, highlight the architecture, and call out any anti-patterns or hotspots.`:"Explain the current project. Give me a tour of the codebase, highlight the architecture, and call out any anti-patterns or hotspots."},{icon:E.jsx(Qi,{size:16}),title:"Summarize recent sessions",preview:"Read my last 5 chat sessions and give me a 3-bullet summary of what I worked on and what got stuck.",prompt:"Read my last 5 chat sessions and give me a 3-bullet summary of what I worked on and what got stuck."},{icon:E.jsx(Ji,{size:16}),title:"Suggest a refactor",preview:"Look for the largest, most painful files in this project and propose a concrete refactor for the worst one.",prompt:"Look for the largest, most painful files in this project and propose a concrete refactor for the worst one."},{icon:E.jsx(Ki,{size:16}),title:"Find visual regressions",preview:"Open the dashboard, screenshot the Chat tab, and flag any layout problems or anti-patterns you see.",prompt:"Open the dashboard, screenshot the Chat tab, and flag any layout problems or anti-patterns you see."}];return E.jsx("div",{className:"chat-suggestions",children:t.map((r,i)=>E.jsxs("button",{type:"button",className:"chat-suggestion",onClick:()=>n(r.prompt),children:[E.jsxs("div",{className:"chat-suggestion-title",children:[r.icon,E.jsx("span",{children:r.title})]}),E.jsx("div",{className:"chat-suggestion-preview",children:r.preview})]},i))})}function Fn({variant:e,projectName:n,onPickSuggestion:t}){if(e==="no-project")return E.jsxs("div",{className:"chat-welcome",children:[E.jsx("h1",{className:"chat-welcome-h1",children:E.jsx("span",{className:"chat-greeting-hello",children:"No project selected."})}),E.jsx("p",{className:"chat-welcome-subtitle",children:"Pick a project in Overview to scope chat sessions."})]});const r=n||"there";return E.jsxs("div",{className:"chat-welcome",children:[E.jsxs("h1",{className:"chat-welcome-h1",children:[E.jsx("span",{className:"chat-greeting-hello",children:"Hello, "}),E.jsxs("span",{className:"chat-greeting-name",children:[r,"."]})]}),E.jsx("p",{className:"chat-welcome-subtitle",children:"How can I help you today?"}),E.jsx(tl,{projectName:n,onPickSuggestion:t})]})}function nl(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const rl=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,il=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ll={};function _n(e,n){return(ll.jsx?il:rl).test(e)}const ol=/[ \t\n\f\r]/g;function al(e){return typeof e=="object"?e.type==="text"?Mn(e.value):!1:Mn(e)}function Mn(e){return e.replace(ol,"")===""}class ft{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}ft.prototype.normal={};ft.prototype.property={};ft.prototype.space=void 0;function Lr(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new ft(t,r,n)}function en(e){return e.toLowerCase()}class Ee{constructor(n,t){this.attribute=t,this.property=n}}Ee.prototype.attribute="";Ee.prototype.booleanish=!1;Ee.prototype.boolean=!1;Ee.prototype.commaOrSpaceSeparated=!1;Ee.prototype.commaSeparated=!1;Ee.prototype.defined=!1;Ee.prototype.mustUseProperty=!1;Ee.prototype.number=!1;Ee.prototype.overloadedBoolean=!1;Ee.prototype.property="";Ee.prototype.spaceSeparated=!1;Ee.prototype.space=void 0;let sl=0;const H=Ge(),fe=Ge(),tn=Ge(),A=Ge(),ie=Ge(),Ye=Ge(),De=Ge();function Ge(){return 2**++sl}const nn=Object.freeze(Object.defineProperty({__proto__:null,boolean:H,booleanish:fe,commaOrSpaceSeparated:De,commaSeparated:Ye,number:A,overloadedBoolean:tn,spaceSeparated:ie},Symbol.toStringTag,{value:"Module"})),jt=Object.keys(nn);class pn extends Ee{constructor(n,t,r,i){let o=-1;if(super(n,t),Nn(this,"space",i),typeof r=="number")for(;++o<jt.length;){const l=jt[o];Nn(this,jt[o],(r&nn[l])===nn[l])}}}pn.prototype.defined=!0;function Nn(e,n,t){t&&(e[n]=t)}function tt(e){const n={},t={};for(const[r,i]of Object.entries(e.properties)){const o=new pn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),n[r]=o,t[en(r)]=r,t[en(o.attribute)]=r}return new ft(n,t,e.space)}const Rr=tt({properties:{ariaActiveDescendant:null,ariaAtomic:fe,ariaAutoComplete:null,ariaBusy:fe,ariaChecked:fe,ariaColCount:A,ariaColIndex:A,ariaColSpan:A,ariaControls:ie,ariaCurrent:null,ariaDescribedBy:ie,ariaDetails:null,ariaDisabled:fe,ariaDropEffect:ie,ariaErrorMessage:null,ariaExpanded:fe,ariaFlowTo:ie,ariaGrabbed:fe,ariaHasPopup:null,ariaHidden:fe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ie,ariaLevel:A,ariaLive:null,ariaModal:fe,ariaMultiLine:fe,ariaMultiSelectable:fe,ariaOrientation:null,ariaOwns:ie,ariaPlaceholder:null,ariaPosInSet:A,ariaPressed:fe,ariaReadOnly:fe,ariaRelevant:null,ariaRequired:fe,ariaRoleDescription:ie,ariaRowCount:A,ariaRowIndex:A,ariaRowSpan:A,ariaSelected:fe,ariaSetSize:A,ariaSort:null,ariaValueMax:A,ariaValueMin:A,ariaValueNow:A,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function Fr(e,n){return n in e?e[n]:n}function _r(e,n){return Fr(e,n.toLowerCase())}const ul=tt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ye,acceptCharset:ie,accessKey:ie,action:null,allow:null,allowFullScreen:H,allowPaymentRequest:H,allowUserMedia:H,alpha:H,alt:null,as:null,async:H,autoCapitalize:null,autoComplete:ie,autoFocus:H,autoPlay:H,blocking:ie,capture:null,charSet:null,checked:H,cite:null,className:ie,closedBy:null,colorSpace:null,cols:A,colSpan:A,command:null,commandFor:null,content:null,contentEditable:fe,controls:H,controlsList:ie,coords:A|Ye,crossOrigin:null,data:null,dateTime:null,decoding:null,default:H,defer:H,dir:null,dirName:null,disabled:H,download:tn,draggable:fe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:H,formTarget:null,headers:ie,height:A,hidden:tn,high:A,href:null,hrefLang:null,htmlFor:ie,httpEquiv:ie,id:null,imageSizes:null,imageSrcSet:null,inert:H,inputMode:null,integrity:null,is:null,isMap:H,itemId:null,itemProp:ie,itemRef:ie,itemScope:H,itemType:ie,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:H,low:A,manifest:null,max:null,maxLength:A,media:null,method:null,min:null,minLength:A,multiple:H,muted:H,name:null,nonce:null,noModule:H,noValidate:H,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:H,optimum:A,pattern:null,ping:ie,placeholder:null,playsInline:H,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:H,referrerPolicy:null,rel:ie,required:H,reversed:H,rows:A,rowSpan:A,sandbox:ie,scope:null,scoped:H,seamless:H,selected:H,shadowRootClonable:H,shadowRootCustomElementRegistry:H,shadowRootDelegatesFocus:H,shadowRootMode:null,shadowRootSerializable:H,shape:null,size:A,sizes:null,slot:null,span:A,spellCheck:fe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:A,step:null,style:null,tabIndex:A,target:null,title:null,translate:null,type:null,typeMustMatch:H,useMap:null,value:fe,width:A,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ie,axis:null,background:null,bgColor:null,border:A,borderColor:null,bottomMargin:A,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:H,declare:H,event:null,face:null,frame:null,frameBorder:null,hSpace:A,leftMargin:A,link:null,longDesc:null,lowSrc:null,marginHeight:A,marginWidth:A,noResize:H,noHref:H,noShade:H,noWrap:H,object:null,profile:null,prompt:null,rev:null,rightMargin:A,rules:null,scheme:null,scrolling:fe,standby:null,summary:null,text:null,topMargin:A,valueType:null,version:null,vAlign:null,vLink:null,vSpace:A,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:H,disablePictureInPicture:H,disableRemotePlayback:H,exportParts:Ye,part:ie,prefix:null,property:null,results:A,security:null,unselectable:null},space:"html",transform:_r}),cl=tt({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:De,accentHeight:A,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:A,amplitude:A,arabicForm:null,ascent:A,attributeName:null,attributeType:null,azimuth:A,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:A,by:null,calcMode:null,capHeight:A,className:ie,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:A,diffuseConstant:A,direction:null,display:null,dur:null,divisor:A,dominantBaseline:null,download:H,dx:null,dy:null,edgeMode:null,editable:null,elevation:A,enableBackground:null,end:null,event:null,exponent:A,externalResourcesRequired:null,fill:null,fillOpacity:A,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:Ye,g2:Ye,glyphName:Ye,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:A,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:A,horizOriginX:A,horizOriginY:A,id:null,ideographic:A,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:A,k:A,k1:A,k2:A,k3:A,k4:A,kernelMatrix:De,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:A,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:A,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:A,overlineThickness:A,paintOrder:null,panose1:null,path:null,pathLength:A,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ie,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:A,pointsAtY:A,pointsAtZ:A,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:De,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:De,rev:De,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:De,requiredFeatures:De,requiredFonts:De,requiredFormats:De,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:A,specularExponent:A,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:A,strikethroughThickness:A,string:null,stroke:null,strokeDashArray:De,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:A,strokeOpacity:A,strokeWidth:null,style:null,surfaceScale:A,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:De,tabIndex:A,tableValues:null,target:null,targetX:A,targetY:A,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:De,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:A,underlineThickness:A,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:A,values:null,vAlphabetic:A,vMathematical:A,vectorEffect:null,vHanging:A,vIdeographic:A,version:null,vertAdvY:A,vertOriginX:A,vertOriginY:A,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:A,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Fr}),Mr=tt({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),Nr=tt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_r}),Or=tt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),fl={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"},hl=/[A-Z]/g,On=/-[a-z]/g,pl=/^data[-\w.:]+$/i;function ml(e,n){const t=en(n);let r=n,i=Ee;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&pl.test(n)){if(n.charAt(4)==="-"){const o=n.slice(5).replace(On,gl);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=n.slice(4);if(!On.test(o)){let l=o.replace(hl,dl);l.charAt(0)!=="-"&&(l="-"+l),n="data"+l}}i=pn}return new i(r,n)}function dl(e){return"-"+e.toLowerCase()}function gl(e){return e.charAt(1).toUpperCase()}const yl=Lr([Rr,ul,Mr,Nr,Or],"html"),mn=Lr([Rr,cl,Mr,Nr,Or],"svg");function kl(e){return e.join(" ").trim()}var dn={},jn=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,xl=/\n/g,bl=/^\s*/,wl=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Sl=/^:\s*/,Cl=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Il=/^[;\s]*/,El=/^\s+|\s+$/g,Tl=`
38
- `,Bn="/",$n="*",We="",Al="comment",vl="declaration";function Dl(e,n){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];n=n||{};var t=1,r=1;function i(d){var x=d.match(xl);x&&(t+=x.length);var T=d.lastIndexOf(Tl);r=~T?d.length-T:r+d.length}function o(){var d={line:t,column:r};return function(x){return x.position=new l(d),u(),x}}function l(d){this.start=d,this.end={line:t,column:r},this.source=n.source}l.prototype.content=e;function a(d){var x=new Error(n.source+":"+t+":"+r+": "+d);if(x.reason=d,x.filename=n.source,x.line=t,x.column=r,x.source=e,!n.silent)throw x}function s(d){var x=d.exec(e);if(x){var T=x[0];return i(T),e=e.slice(T.length),x}}function u(){s(bl)}function f(d){var x;for(d=d||[];x=c();)x!==!1&&d.push(x);return d}function c(){var d=o();if(!(Bn!=e.charAt(0)||$n!=e.charAt(1))){for(var x=2;We!=e.charAt(x)&&($n!=e.charAt(x)||Bn!=e.charAt(x+1));)++x;if(x+=2,We===e.charAt(x-1))return a("End of comment missing");var T=e.slice(2,x-2);return r+=2,i(T),e=e.slice(x),r+=2,d({type:Al,comment:T})}}function p(){var d=o(),x=s(wl);if(x){if(c(),!s(Sl))return a("property missing ':'");var T=s(Cl),y=d({type:vl,property:Hn(x[0].replace(jn,We)),value:T?Hn(T[0].replace(jn,We)):We});return s(Il),y}}function h(){var d=[];f(d);for(var x;x=p();)x!==!1&&(d.push(x),f(d));return d}return u(),h()}function Hn(e){return e?e.replace(El,We):We}var zl=Dl,Pl=wt&&wt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dn,"__esModule",{value:!0});dn.default=Rl;const Ll=Pl(zl);function Rl(e,n){let t=null;if(!e||typeof e!="string")return t;const r=(0,Ll.default)(e),i=typeof n=="function";return r.forEach(o=>{if(o.type!=="declaration")return;const{property:l,value:a}=o;i?n(l,a,o):a&&(t=t||{},t[l]=a)}),t}var Tt={};Object.defineProperty(Tt,"__esModule",{value:!0});Tt.camelCase=void 0;var Fl=/^--[a-zA-Z0-9_-]+$/,_l=/-([a-z])/g,Ml=/^[^-]+$/,Nl=/^-(webkit|moz|ms|o|khtml)-/,Ol=/^-(ms)-/,jl=function(e){return!e||Ml.test(e)||Fl.test(e)},Bl=function(e,n){return n.toUpperCase()},Un=function(e,n){return"".concat(n,"-")},$l=function(e,n){return n===void 0&&(n={}),jl(e)?e:(e=e.toLowerCase(),n.reactCompat?e=e.replace(Ol,Un):e=e.replace(Nl,Un),e.replace(_l,Bl))};Tt.camelCase=$l;var Hl=wt&&wt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ul=Hl(dn),Vl=Tt;function rn(e,n){var t={};return!e||typeof e!="string"||(0,Ul.default)(e,function(r,i){r&&i&&(t[(0,Vl.camelCase)(r,n)]=i)}),t}rn.default=rn;var ql=rn;const Wl=zr(ql),jr=Br("end"),gn=Br("start");function Br(e){return n;function n(t){const r=t&&t.position&&t.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Yl(e){const n=gn(e),t=jr(e);if(n&&t)return{start:n,end:t}}function ot(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Vn(e.position):"start"in e||"end"in e?Vn(e):"line"in e||"column"in e?ln(e):""}function ln(e){return qn(e&&e.line)+":"+qn(e&&e.column)}function Vn(e){return ln(e&&e.start)+"-"+ln(e&&e.end)}function qn(e){return e&&typeof e=="number"?e:1}class ge extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",o={},l=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof n=="string"?i=n:!o.cause&&n&&(l=!0,i=n.message,o.cause=n),!o.ruleId&&!o.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?o.ruleId=r:(o.source=r.slice(0,s),o.ruleId=r.slice(s+1))}if(!o.place&&o.ancestors&&o.ancestors){const s=o.ancestors[o.ancestors.length-1];s&&(o.place=s.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=ot(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ge.prototype.file="";ge.prototype.name="";ge.prototype.reason="";ge.prototype.message="";ge.prototype.stack="";ge.prototype.column=void 0;ge.prototype.line=void 0;ge.prototype.ancestors=void 0;ge.prototype.cause=void 0;ge.prototype.fatal=void 0;ge.prototype.place=void 0;ge.prototype.ruleId=void 0;ge.prototype.source=void 0;const yn={}.hasOwnProperty,Ql=new Map,Xl=/[A-Z]/g,Gl=new Set(["table","tbody","thead","tfoot","tr"]),Kl=new Set(["td","th"]),$r="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Jl(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=oo(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=lo(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?mn:yl,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},o=Hr(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Hr(e,n,t){if(n.type==="element")return Zl(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return eo(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return no(e,n,t);if(n.type==="mdxjsEsm")return to(e,n);if(n.type==="root")return ro(e,n,t);if(n.type==="text")return io(e,n)}function Zl(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=mn,e.schema=i),e.ancestors.push(n);const o=Vr(e,n.tagName,!1),l=ao(e,n);let a=xn(e,n);return Gl.has(n.tagName)&&(a=a.filter(function(s){return typeof s=="string"?!al(s):!0})),Ur(e,l,o,n),kn(l,a),e.ancestors.pop(),e.schema=r,e.create(n,o,l,t)}function eo(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ut(e,n.position)}function to(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);ut(e,n.position)}function no(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=mn,e.schema=i),e.ancestors.push(n);const o=n.name===null?e.Fragment:Vr(e,n.name,!0),l=so(e,n),a=xn(e,n);return Ur(e,l,o,n),kn(l,a),e.ancestors.pop(),e.schema=r,e.create(n,o,l,t)}function ro(e,n,t){const r={};return kn(r,xn(e,n)),e.create(n,e.Fragment,r,t)}function io(e,n){return n.value}function Ur(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function kn(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function lo(e,n,t){return r;function r(i,o,l,a){const u=Array.isArray(l.children)?t:n;return a?u(o,l,a):u(o,l)}}function oo(e,n){return t;function t(r,i,o,l){const a=Array.isArray(o.children),s=gn(r);return n(i,o,l,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function ao(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&yn.call(n.properties,i)){const o=uo(e,i,n.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&Kl.has(n.tagName)?r=a:t[l]=a}}if(r){const o=t.style||(t.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function so(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(t,e.evaluater.evaluateExpression(a.argument))}else ut(e,n.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else ut(e,n.position);else o=r.value===null?!0:r.value;t[i]=o}return t}function xn(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:Ql;for(;++r<n.children.length;){const o=n.children[r];let l;if(e.passKeys){const s=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(s){const u=i.get(s)||0;l=s+"-"+u,i.set(s,u+1)}}const a=Hr(e,o,l);a!==void 0&&t.push(a)}return t}function uo(e,n,t){const r=ml(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?nl(t):kl(t)),r.property==="style"){let i=typeof t=="object"?t:co(e,String(t));return e.stylePropertyNameCase==="css"&&(i=fo(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?fl[r.property]||r.property:r.attribute,t]}}function co(e,n){try{return Wl(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,i=new ge("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=$r+"#cannot-parse-style-attribute",i}}function Vr(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let o=-1,l;for(;++o<i.length;){const a=_n(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=l}else r=_n(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return yn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);ut(e)}function ut(e,n){const t=new ge("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=$r+"#cannot-handle-mdx-estrees-without-createevaluater",t}function fo(e){const n={};let t;for(t in e)yn.call(e,t)&&(n[ho(t)]=e[t]);return n}function ho(e){let n=e.replace(Xl,po);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function po(e){return"-"+e.toLowerCase()}const Bt={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"]},mo={};function bn(e,n){const t=mo,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return qr(e,r,i)}function qr(e,n,t){if(go(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Wn(e.children,n,t)}return Array.isArray(e)?Wn(e,n,t):""}function Wn(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=qr(e[i],n,t);return r.join("")}function go(e){return!!(e&&typeof e=="object")}const Yn=document.createElement("i");function wn(e){const n="&"+e+";";Yn.innerHTML=n;const t=Yn.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function ze(e,n,t,r){const i=e.length;let o=0,l;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)l=Array.from(r),l.unshift(n,t),e.splice(...l);else for(t&&e.splice(n,t);o<r.length;)l=r.slice(o,o+1e4),l.unshift(n,0),e.splice(...l),o+=1e4,n+=1e4}function Pe(e,n){return e.length>0?(ze(e,e.length,0,n),e):n}const Qn={}.hasOwnProperty;function Wr(e){const n={};let t=-1;for(;++t<e.length;)yo(n,e[t]);return n}function yo(e,n){let t;for(t in n){const i=(Qn.call(e,t)?e[t]:void 0)||(e[t]={}),o=n[t];let l;if(o)for(l in o){Qn.call(i,l)||(i[l]=[]);const a=o[l];ko(i[l],Array.isArray(a)?a:a?[a]:[])}}}function ko(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);ze(e,0,0,r)}function Yr(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Re(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const we=Be(/[A-Za-z]/),de=Be(/[\dA-Za-z]/),xo=Be(/[#-'*+\--9=?A-Z^-~]/);function St(e){return e!==null&&(e<32||e===127)}const on=Be(/\d/),bo=Be(/[\dA-Fa-f]/),wo=Be(/[!-/:-@[-`{-~]/);function M(e){return e!==null&&e<-2}function le(e){return e!==null&&(e<0||e===32)}function W(e){return e===-2||e===-1||e===32}const At=Be(new RegExp("\\p{P}|\\p{S}","u")),Qe=Be(/\s/);function Be(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function nt(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const o=e.charCodeAt(t);let l="";if(o===37&&de(e.charCodeAt(t+1))&&de(e.charCodeAt(t+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(t+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(n.push(e.slice(r,t),encodeURIComponent(l)),r=t+i+1,l=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function X(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(s){return W(s)?(e.enter(t),a(s)):n(s)}function a(s){return W(s)&&o++<i?(e.consume(s),a):(e.exit(t),n(s))}}const So={tokenize:Co};function Co(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),X(e,n,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const s=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=s),t=s,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return M(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const Io={tokenize:Eo},Xn={tokenize:To};function Eo(e){const n=this,t=[];let r=0,i,o,l;return a;function a(C){if(r<t.length){const O=t[r];return n.containerState=O[1],e.attempt(O[0].continuation,s,u)(C)}return u(C)}function s(C){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&I();const O=n.events.length;let j=O,b;for(;j--;)if(n.events[j][0]==="exit"&&n.events[j][1].type==="chunkFlow"){b=n.events[j][1].end;break}y(r);let Y=O;for(;Y<n.events.length;)n.events[Y][1].end={...b},Y++;return ze(n.events,j+1,0,n.events.slice(O)),n.events.length=Y,u(C)}return a(C)}function u(C){if(r===t.length){if(!i)return p(C);if(i.currentConstruct&&i.currentConstruct.concrete)return d(C);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(Xn,f,c)(C)}function f(C){return i&&I(),y(r),p(C)}function c(C){return n.parser.lazy[n.now().line]=r!==t.length,l=n.now().offset,d(C)}function p(C){return n.containerState={},e.attempt(Xn,h,d)(C)}function h(C){return r++,t.push([n.currentConstruct,n.containerState]),p(C)}function d(C){if(C===null){i&&I(),y(0),e.consume(C);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),x(C)}function x(C){if(C===null){T(e.exit("chunkFlow"),!0),y(0),e.consume(C);return}return M(C)?(e.consume(C),T(e.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(e.consume(C),x)}function T(C,O){const j=n.sliceStream(C);if(O&&j.push(null),C.previous=o,o&&(o.next=C),o=C,i.defineSkip(C.start),i.write(j),n.parser.lazy[C.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<l&&(!i.events[b][1].end||i.events[b][1].end.offset>l))return;const Y=n.events.length;let J=Y,Z,k;for(;J--;)if(n.events[J][0]==="exit"&&n.events[J][1].type==="chunkFlow"){if(Z){k=n.events[J][1].end;break}Z=!0}for(y(r),b=Y;b<n.events.length;)n.events[b][1].end={...k},b++;ze(n.events,J+1,0,n.events.slice(Y)),n.events.length=b}}function y(C){let O=t.length;for(;O-- >C;){const j=t[O];n.containerState=j[1],j[0].exit.call(n,e)}t.length=C}function I(){i.write([null]),o=void 0,i=void 0,n.containerState._closeFlow=void 0}}function To(e,n,t){return X(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function et(e){if(e===null||le(e)||Qe(e))return 1;if(At(e))return 2}function vt(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(n=o(n,t),r.push(o))}return n}const an={name:"attention",resolveAll:Ao,tokenize:vo};function Ao(e,n){let t=-1,r,i,o,l,a,s,u,f;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const c={...e[r][1].end},p={...e[t][1].start};Gn(c,-s),Gn(p,s),l={type:s>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},o={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:s>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[t][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Pe(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=Pe(u,[["enter",i,n],["enter",l,n],["exit",l,n],["enter",o,n]]),u=Pe(u,vt(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=Pe(u,[["exit",o,n],["enter",a,n],["exit",a,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(f=2,u=Pe(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):f=0,ze(e,r-1,t-r+3,u),t=r+u.length-f-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function vo(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=et(r);let o;return l;function l(s){return o=s,e.enter("attentionSequence"),a(s)}function a(s){if(s===o)return e.consume(s),a;const u=e.exit("attentionSequence"),f=et(s),c=!f||f===2&&i||t.includes(s),p=!i||i===2&&f||t.includes(r);return u._open=!!(o===42?c:c&&(i||!p)),u._close=!!(o===42?p:p&&(f||!c)),n(s)}}function Gn(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const Do={name:"autolink",tokenize:zo};function zo(e,n,t){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return we(h)?(e.consume(h),l):h===64?t(h):u(h)}function l(h){return h===43||h===45||h===46||de(h)?(r=1,a(h)):u(h)}function a(h){return h===58?(e.consume(h),r=0,s):(h===43||h===45||h===46||de(h))&&r++<32?(e.consume(h),a):(r=0,u(h))}function s(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),n):h===null||h===32||h===60||St(h)?t(h):(e.consume(h),s)}function u(h){return h===64?(e.consume(h),f):xo(h)?(e.consume(h),u):t(h)}function f(h){return de(h)?c(h):t(h)}function c(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),n):p(h)}function p(h){if((h===45||de(h))&&r++<63){const d=h===45?p:c;return e.consume(h),d}return t(h)}}const ht={partial:!0,tokenize:Po};function Po(e,n,t){return r;function r(o){return W(o)?X(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||M(o)?n(o):t(o)}}const Qr={continuation:{tokenize:Ro},exit:Fo,name:"blockQuote",tokenize:Lo};function Lo(e,n,t){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return t(l)}function o(l){return W(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(l))}}function Ro(e,n,t){const r=this;return i;function i(l){return W(l)?X(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Qr,n,t)(l)}}function Fo(e){e.exit("blockQuote")}const Xr={name:"characterEscape",tokenize:_o};function _o(e,n,t){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return wo(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(o)}}const Gr={name:"characterReference",tokenize:Mo};function Mo(e,n,t){const r=this;let i=0,o,l;return a;function a(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),s}function s(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,l=de,f(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=bo,f):(e.enter("characterReferenceValue"),o=7,l=on,f(c))}function f(c){if(c===59&&i){const p=e.exit("characterReferenceValue");return l===de&&!wn(r.sliceSerialize(p))?t(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return l(c)&&i++<o?(e.consume(c),f):t(c)}}const Kn={partial:!0,tokenize:Oo},Jn={concrete:!0,name:"codeFenced",tokenize:No};function No(e,n,t){const r=this,i={partial:!0,tokenize:j};let o=0,l=0,a;return s;function s(b){return u(b)}function u(b){const Y=r.events[r.events.length-1];return o=Y&&Y[1].type==="linePrefix"?Y[2].sliceSerialize(Y[1],!0).length:0,a=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(b)}function f(b){return b===a?(l++,e.consume(b),f):l<3?t(b):(e.exit("codeFencedFenceSequence"),W(b)?X(e,c,"whitespace")(b):c(b))}function c(b){return b===null||M(b)?(e.exit("codeFencedFence"),r.interrupt?n(b):e.check(Kn,x,O)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===null||M(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(b)):W(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),X(e,h,"whitespace")(b)):b===96&&b===a?t(b):(e.consume(b),p)}function h(b){return b===null||M(b)?c(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(b))}function d(b){return b===null||M(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(b)):b===96&&b===a?t(b):(e.consume(b),d)}function x(b){return e.attempt(i,O,T)(b)}function T(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),y}function y(b){return o>0&&W(b)?X(e,I,"linePrefix",o+1)(b):I(b)}function I(b){return b===null||M(b)?e.check(Kn,x,O)(b):(e.enter("codeFlowValue"),C(b))}function C(b){return b===null||M(b)?(e.exit("codeFlowValue"),I(b)):(e.consume(b),C)}function O(b){return e.exit("codeFenced"),n(b)}function j(b,Y,J){let Z=0;return k;function k(Q){return b.enter("lineEnding"),b.consume(Q),b.exit("lineEnding"),L}function L(Q){return b.enter("codeFencedFence"),W(Q)?X(b,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):F(Q)}function F(Q){return Q===a?(b.enter("codeFencedFenceSequence"),ee(Q)):J(Q)}function ee(Q){return Q===a?(Z++,b.consume(Q),ee):Z>=l?(b.exit("codeFencedFenceSequence"),W(Q)?X(b,oe,"whitespace")(Q):oe(Q)):J(Q)}function oe(Q){return Q===null||M(Q)?(b.exit("codeFencedFence"),Y(Q)):J(Q)}}}function Oo(e,n,t){const r=this;return i;function i(l){return l===null?t(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}const $t={name:"codeIndented",tokenize:Bo},jo={partial:!0,tokenize:$o};function Bo(e,n,t){const r=this;return i;function i(u){return e.enter("codeIndented"),X(e,o,"linePrefix",5)(u)}function o(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(u):t(u)}function l(u){return u===null?s(u):M(u)?e.attempt(jo,l,s)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||M(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),a)}function s(u){return e.exit("codeIndented"),n(u)}}function $o(e,n,t){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?t(l):M(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):X(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(l):M(l)?i(l):t(l)}}const Ho={name:"codeText",previous:Vo,resolve:Uo,tokenize:qo};function Uo(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||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),n-=r-i-2,r=i+2),i=void 0);return e}function Vo(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function qo(e,n,t){let r=0,i,o;return l;function l(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)}function a(c){return c===96?(e.consume(c),r++,a):(e.exit("codeTextSequence"),s(c))}function s(c){return c===null?t(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),s):c===96?(o=e.enter("codeTextSequence"),i=0,f(c)):M(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||M(c)?(e.exit("codeTextData"),s(c)):(e.consume(c),u)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(c)):(o.type="codeTextData",u(c))}}class Wo{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&it(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),it(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),it(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const t=this.left.splice(n,Number.POSITIVE_INFINITY);it(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);it(this.left,t.reverse())}}}function it(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function Kr(e){const n={};let t=-1,r,i,o,l,a,s,u;const f=new Wo(e);for(;++t<f.length;){for(;t in n;)t=n[t];if(r=f.get(t),t&&r[1].type==="chunkFlow"&&f.get(t-1)[1].type==="listItemPrefix"&&(s=r[1]._tokenizer.events,o=0,o<s.length&&s[o][1].type==="lineEndingBlank"&&(o+=2),o<s.length&&s[o][1].type==="content"))for(;++o<s.length&&s[o][1].type!=="content";)s[o][1].type==="chunkText"&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,Yo(f,t)),t=n[t],u=!0);else if(r[1]._container){for(o=t,i=void 0;o--;)if(l=f.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,t),a.unshift(r),f.splice(i,t-i+1,a))}}return ze(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function Yo(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const o=[];let l=t._tokenizer;l||(l=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,s=[],u={};let f,c,p=-1,h=t,d=0,x=0;const T=[x];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),c&&l.defineSkip(h.start),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),c=h,h=h.next}for(h=t;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(x=p+1,T.push(x),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(l.events=[],h?(h._tokenizer=void 0,h.previous=void 0):T.pop(),p=T.length;p--;){const y=a.slice(T[p],T[p+1]),I=o.pop();s.push([I,I+y.length-1]),e.splice(I,2,y)}for(s.reverse(),p=-1;++p<s.length;)u[d+s[p][0]]=d+s[p][1],d+=s[p][1]-s[p][0]-1;return u}const Qo={resolve:Go,tokenize:Ko},Xo={partial:!0,tokenize:Jo};function Go(e){return Kr(e),e}function Ko(e,n){let t;return r;function r(a){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):M(a)?e.check(Xo,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),n(a)}function l(a){return e.consume(a),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function Jo(e,n,t){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),X(e,o,"linePrefix")}function o(l){if(l===null||M(l))return t(l);const 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?n(l):e.interrupt(r.parser.constructs.flow,t,n)(l)}}function Jr(e,n,t,r,i,o,l,a,s){const u=s||Number.POSITIVE_INFINITY;let f=0;return c;function c(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),p):y===null||y===32||y===41||St(y)?t(y):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),x(y))}function p(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===62?(e.exit("chunkString"),e.exit(a),p(y)):y===null||y===60||M(y)?t(y):(e.consume(y),y===92?d:h)}function d(y){return y===60||y===62||y===92?(e.consume(y),h):h(y)}function x(y){return!f&&(y===null||y===41||le(y))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),n(y)):f<u&&y===40?(e.consume(y),f++,x):y===41?(e.consume(y),f--,x):y===null||y===32||y===40||St(y)?t(y):(e.consume(y),y===92?T:x)}function T(y){return y===40||y===41||y===92?(e.consume(y),x):x(y)}}function Zr(e,n,t,r,i,o){const l=this;let a=0,s;return u;function u(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),f}function f(h){return a>999||h===null||h===91||h===93&&!s||h===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?t(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),n):M(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===null||h===91||h===93||M(h)||a++>999?(e.exit("chunkString"),f(h)):(e.consume(h),s||(s=!W(h)),h===92?p:c)}function p(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}}function ei(e,n,t,r,i,o){let l;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),l=p===40?41:p,s):t(p)}function s(p){return p===l?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):(e.enter(o),u(p))}function u(p){return p===l?(e.exit(o),s(l)):p===null?t(p):M(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),X(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===l||p===null||M(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?c:f)}function c(p){return p===l||p===92?(e.consume(p),f):f(p)}}function at(e,n){let t;return r;function r(i){return M(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):W(i)?X(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const Zo={name:"definition",tokenize:ta},ea={partial:!0,tokenize:na};function ta(e,n,t){const r=this;let i;return o;function o(h){return e.enter("definition"),l(h)}function l(h){return Zr.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=Re(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),s):t(h)}function s(h){return le(h)?at(e,u)(h):u(h)}function u(h){return Jr(e,f,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(ea,c,c)(h)}function c(h){return W(h)?X(e,p,"whitespace")(h):p(h)}function p(h){return h===null||M(h)?(e.exit("definition"),r.parser.defined.push(i),n(h)):t(h)}}function na(e,n,t){return r;function r(a){return le(a)?at(e,i)(a):t(a)}function i(a){return ei(e,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return W(a)?X(e,l,"whitespace")(a):l(a)}function l(a){return a===null||M(a)?n(a):t(a)}}const ra={name:"hardBreakEscape",tokenize:ia};function ia(e,n,t){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return M(o)?(e.exit("hardBreakEscape"),n(o)):t(o)}}const la={name:"headingAtx",resolve:oa,tokenize:aa};function oa(e,n){let t=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},o={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},ze(e,r,t-r+1,[["enter",i,n],["enter",o,n],["exit",o,n],["exit",i,n]])),e}function aa(e,n,t){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||le(f)?(e.exit("atxHeadingSequence"),a(f)):t(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),s(f)):f===null||M(f)?(e.exit("atxHeading"),n(f)):W(f)?X(e,a,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function s(f){return f===35?(e.consume(f),s):(e.exit("atxHeadingSequence"),a(f))}function u(f){return f===null||f===35||le(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),u)}}const sa=["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"],Zn=["pre","script","style","textarea"],ua={concrete:!0,name:"htmlFlow",resolveTo:ha,tokenize:pa},ca={partial:!0,tokenize:da},fa={partial:!0,tokenize:ma};function ha(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function pa(e,n,t){const r=this;let i,o,l,a,s;return u;function u(m){return f(m)}function f(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),c}function c(m){return m===33?(e.consume(m),p):m===47?(e.consume(m),o=!0,x):m===63?(e.consume(m),i=3,r.interrupt?n:g):we(m)?(e.consume(m),l=String.fromCharCode(m),T):t(m)}function p(m){return m===45?(e.consume(m),i=2,h):m===91?(e.consume(m),i=5,a=0,d):we(m)?(e.consume(m),i=4,r.interrupt?n:g):t(m)}function h(m){return m===45?(e.consume(m),r.interrupt?n:g):t(m)}function d(m){const me="CDATA[";return m===me.charCodeAt(a++)?(e.consume(m),a===me.length?r.interrupt?n:F:d):t(m)}function x(m){return we(m)?(e.consume(m),l=String.fromCharCode(m),T):t(m)}function T(m){if(m===null||m===47||m===62||le(m)){const me=m===47,ae=l.toLowerCase();return!me&&!o&&Zn.includes(ae)?(i=1,r.interrupt?n(m):F(m)):sa.includes(l.toLowerCase())?(i=6,me?(e.consume(m),y):r.interrupt?n(m):F(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(m):o?I(m):C(m))}return m===45||de(m)?(e.consume(m),l+=String.fromCharCode(m),T):t(m)}function y(m){return m===62?(e.consume(m),r.interrupt?n:F):t(m)}function I(m){return W(m)?(e.consume(m),I):k(m)}function C(m){return m===47?(e.consume(m),k):m===58||m===95||we(m)?(e.consume(m),O):W(m)?(e.consume(m),C):k(m)}function O(m){return m===45||m===46||m===58||m===95||de(m)?(e.consume(m),O):j(m)}function j(m){return m===61?(e.consume(m),b):W(m)?(e.consume(m),j):C(m)}function b(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),s=m,Y):W(m)?(e.consume(m),b):J(m)}function Y(m){return m===s?(e.consume(m),s=null,Z):m===null||M(m)?t(m):(e.consume(m),Y)}function J(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||le(m)?j(m):(e.consume(m),J)}function Z(m){return m===47||m===62||W(m)?C(m):t(m)}function k(m){return m===62?(e.consume(m),L):t(m)}function L(m){return m===null||M(m)?F(m):W(m)?(e.consume(m),L):t(m)}function F(m){return m===45&&i===2?(e.consume(m),ce):m===60&&i===1?(e.consume(m),he):m===62&&i===4?(e.consume(m),pe):m===63&&i===3?(e.consume(m),g):m===93&&i===5?(e.consume(m),Le):M(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(ca,G,ee)(m)):m===null||M(m)?(e.exit("htmlFlowData"),ee(m)):(e.consume(m),F)}function ee(m){return e.check(fa,oe,G)(m)}function oe(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),Q}function Q(m){return m===null||M(m)?ee(m):(e.enter("htmlFlowData"),F(m))}function ce(m){return m===45?(e.consume(m),g):F(m)}function he(m){return m===47?(e.consume(m),l="",Se):F(m)}function Se(m){if(m===62){const me=l.toLowerCase();return Zn.includes(me)?(e.consume(m),pe):F(m)}return we(m)&&l.length<8?(e.consume(m),l+=String.fromCharCode(m),Se):F(m)}function Le(m){return m===93?(e.consume(m),g):F(m)}function g(m){return m===62?(e.consume(m),pe):m===45&&i===2?(e.consume(m),g):F(m)}function pe(m){return m===null||M(m)?(e.exit("htmlFlowData"),G(m)):(e.consume(m),pe)}function G(m){return e.exit("htmlFlow"),n(m)}}function ma(e,n,t){const r=this;return i;function i(l){return M(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):t(l)}function o(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}function da(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ht,n,t)}}const ga={name:"htmlText",tokenize:ya};function ya(e,n,t){const r=this;let i,o,l;return a;function a(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),s}function s(g){return g===33?(e.consume(g),u):g===47?(e.consume(g),j):g===63?(e.consume(g),C):we(g)?(e.consume(g),J):t(g)}function u(g){return g===45?(e.consume(g),f):g===91?(e.consume(g),o=0,d):we(g)?(e.consume(g),I):t(g)}function f(g){return g===45?(e.consume(g),h):t(g)}function c(g){return g===null?t(g):g===45?(e.consume(g),p):M(g)?(l=c,he(g)):(e.consume(g),c)}function p(g){return g===45?(e.consume(g),h):c(g)}function h(g){return g===62?ce(g):g===45?p(g):c(g)}function d(g){const pe="CDATA[";return g===pe.charCodeAt(o++)?(e.consume(g),o===pe.length?x:d):t(g)}function x(g){return g===null?t(g):g===93?(e.consume(g),T):M(g)?(l=x,he(g)):(e.consume(g),x)}function T(g){return g===93?(e.consume(g),y):x(g)}function y(g){return g===62?ce(g):g===93?(e.consume(g),y):x(g)}function I(g){return g===null||g===62?ce(g):M(g)?(l=I,he(g)):(e.consume(g),I)}function C(g){return g===null?t(g):g===63?(e.consume(g),O):M(g)?(l=C,he(g)):(e.consume(g),C)}function O(g){return g===62?ce(g):C(g)}function j(g){return we(g)?(e.consume(g),b):t(g)}function b(g){return g===45||de(g)?(e.consume(g),b):Y(g)}function Y(g){return M(g)?(l=Y,he(g)):W(g)?(e.consume(g),Y):ce(g)}function J(g){return g===45||de(g)?(e.consume(g),J):g===47||g===62||le(g)?Z(g):t(g)}function Z(g){return g===47?(e.consume(g),ce):g===58||g===95||we(g)?(e.consume(g),k):M(g)?(l=Z,he(g)):W(g)?(e.consume(g),Z):ce(g)}function k(g){return g===45||g===46||g===58||g===95||de(g)?(e.consume(g),k):L(g)}function L(g){return g===61?(e.consume(g),F):M(g)?(l=L,he(g)):W(g)?(e.consume(g),L):Z(g)}function F(g){return g===null||g===60||g===61||g===62||g===96?t(g):g===34||g===39?(e.consume(g),i=g,ee):M(g)?(l=F,he(g)):W(g)?(e.consume(g),F):(e.consume(g),oe)}function ee(g){return g===i?(e.consume(g),i=void 0,Q):g===null?t(g):M(g)?(l=ee,he(g)):(e.consume(g),ee)}function oe(g){return g===null||g===34||g===39||g===60||g===61||g===96?t(g):g===47||g===62||le(g)?Z(g):(e.consume(g),oe)}function Q(g){return g===47||g===62||le(g)?Z(g):t(g)}function ce(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),n):t(g)}function he(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),Se}function Se(g){return W(g)?X(e,Le,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):Le(g)}function Le(g){return e.enter("htmlTextData"),l(g)}}const Sn={name:"labelEnd",resolveAll:wa,resolveTo:Sa,tokenize:Ca},ka={tokenize:Ia},xa={tokenize:Ea},ba={tokenize:Ta};function wa(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==t.length&&ze(e,0,e.length,t),e}function Sa(e,n){let t=e.length,r=0,i,o,l,a;for(;t--;)if(i=e[t][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=t);const s={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",s,n],["enter",u,n]],a=Pe(a,e.slice(o+1,o+r+3)),a=Pe(a,[["enter",f,n]]),a=Pe(a,vt(n.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),n)),a=Pe(a,[["exit",f,n],e[l-2],e[l-1],["exit",u,n]]),a=Pe(a,e.slice(l+1)),a=Pe(a,[["exit",s,n]]),ze(e,o,e.length,a),e}function Ca(e,n,t){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(p){return o?o._inactive?c(p):(l=r.parser.defined.includes(Re(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),s):t(p)}function s(p){return p===40?e.attempt(ka,f,l?f:c)(p):p===91?e.attempt(xa,f,l?u:c)(p):l?f(p):c(p)}function u(p){return e.attempt(ba,f,c)(p)}function f(p){return n(p)}function c(p){return o._balanced=!0,t(p)}}function Ia(e,n,t){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return le(c)?at(e,o)(c):o(c)}function o(c){return c===41?f(c):Jr(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return le(c)?at(e,s)(c):f(c)}function a(c){return t(c)}function s(c){return c===34||c===39||c===40?ei(e,u,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return le(c)?at(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),n):t(c)}}function Ea(e,n,t){const r=this;return i;function i(a){return Zr.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(Re(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(a):t(a)}function l(a){return t(a)}}function Ta(e,n,t){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),n):t(o)}}const Aa={name:"labelStartImage",resolveAll:Sn.resolveAll,tokenize:va};function va(e,n,t){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):t(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}const Da={name:"labelStartLink",resolveAll:Sn.resolveAll,tokenize:za};function za(e,n,t){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(l):n(l)}}const Ht={name:"lineEnding",tokenize:Pa};function Pa(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),X(e,n,"linePrefix")}}const xt={name:"thematicBreak",tokenize:La};function La(e,n,t){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),l(u)}function l(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),s(u)):r>=3&&(u===null||M(u))?(e.exit("thematicBreak"),n(u)):t(u)}function s(u){return u===i?(e.consume(u),r++,s):(e.exit("thematicBreakSequence"),W(u)?X(e,a,"whitespace")(u):a(u))}}const Ie={continuation:{tokenize:Ma},exit:Oa,name:"list",tokenize:_a},Ra={partial:!0,tokenize:ja},Fa={partial:!0,tokenize:Na};function _a(e,n,t){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(h){const d=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(d==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:on(h)){if(r.containerState.type||(r.containerState.type=d,e.enter(d,{_container:!0})),d==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(xt,t,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(h)}return t(h)}function s(h){return on(h)&&++l<10?(e.consume(h),s):(!r.interrupt||l<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):t(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(ht,r.interrupt?t:f,e.attempt(Ra,p,c))}function f(h){return r.containerState.initialBlankLine=!0,o++,p(h)}function c(h){return W(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):t(h)}function p(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(h)}}function Ma(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(ht,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,X(e,n,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!W(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Fa,n,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,X(e,e.attempt(Ie,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function Na(e,n,t){const r=this;return X(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?n(o):t(o)}}function Oa(e){e.exit(this.containerState.type)}function ja(e,n,t){const r=this;return X(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!W(o)&&l&&l[1].type==="listItemPrefixWhitespace"?n(o):t(o)}}const er={name:"setextUnderline",resolveTo:Ba,tokenize:$a};function Ba(e,n){let t=e.length,r,i,o;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!o&&e[t][1].type==="definition"&&(o=t);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,n]),e.splice(o+1,0,["exit",e[r][1],n]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,n]),e}function $a(e,n,t){const r=this;let i;return o;function o(u){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=u,l(u)):t(u)}function l(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),W(u)?X(e,s,"lineSuffix")(u):s(u))}function s(u){return u===null||M(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const Ha={tokenize:Ua};function Ua(e){const n=this,t=e.attempt(ht,r,e.attempt(this.parser.constructs.flowInitial,i,X(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Qo,i)),"linePrefix")));return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const Va={resolveAll:ni()},qa=ti("string"),Wa=ti("text");function ti(e){return{resolveAll:ni(e==="text"?Ya:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],o=t.attempt(i,l,a);return l;function l(f){return u(f)?o(f):a(f)}function a(f){if(f===null){t.consume(f);return}return t.enter("data"),t.consume(f),s}function s(f){return u(f)?(t.exit("data"),o(f)):(t.consume(f),s)}function u(f){if(f===null)return!0;const c=i[f];let p=-1;if(c)for(;++p<c.length;){const h=c[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function ni(e){return n;function n(t,r){let i=-1,o;for(;++i<=t.length;)o===void 0?t[i]&&t[i][1].type==="data"&&(o=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==o+2&&(t[o][1].end=t[i-1][1].end,t.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(t,r):t}}function Ya(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],i=n.sliceStream(r);let o=i.length,l=-1,a=0,s;for(;o--;){const u=i[o];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(u===-2)s=!0,a++;else if(u!==-1){o++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(a=0),a){const u={type:t===e.length||s||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(t,0,["enter",u,n],["exit",u,n]),t+=2)}t++}return e}const Qa={42:Ie,43:Ie,45:Ie,48:Ie,49:Ie,50:Ie,51:Ie,52:Ie,53:Ie,54:Ie,55:Ie,56:Ie,57:Ie,62:Qr},Xa={91:Zo},Ga={[-2]:$t,[-1]:$t,32:$t},Ka={35:la,42:xt,45:[er,xt],60:ua,61:er,95:xt,96:Jn,126:Jn},Ja={38:Gr,92:Xr},Za={[-5]:Ht,[-4]:Ht,[-3]:Ht,33:Aa,38:Gr,42:an,60:[Do,ga],91:Da,92:[ra,Xr],93:Sn,95:an,96:Ho},es={null:[an,Va]},ts={null:[42,95]},ns={null:[]},rs=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ts,contentInitial:Xa,disable:ns,document:Qa,flow:Ka,flowInitial:Ga,insideSpan:es,string:Ja,text:Za},Symbol.toStringTag,{value:"Module"}));function is(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},o=[];let l=[],a=[];const s={attempt:Y(j),check:Y(b),consume:I,enter:C,exit:O,interrupt:Y(b,{interrupt:!0})},u={code:null,containerState:{},defineSkip:x,events:[],now:d,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:c};let f=n.tokenize.call(u,s);return n.resolveAll&&o.push(n),u;function c(L){return l=Pe(l,L),T(),l[l.length-1]!==null?[]:(J(n,0),u.events=vt(o,u.events,u),u.events)}function p(L,F){return os(h(L),F)}function h(L){return ls(l,L)}function d(){const{_bufferIndex:L,_index:F,line:ee,column:oe,offset:Q}=r;return{_bufferIndex:L,_index:F,line:ee,column:oe,offset:Q}}function x(L){i[L.line]=L.column,k()}function T(){let L;for(;r._index<l.length;){const F=l[r._index];if(typeof F=="string")for(L=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===L&&r._bufferIndex<F.length;)y(F.charCodeAt(r._bufferIndex));else y(F)}}function y(L){f=f(L)}function I(L){M(L)?(r.line++,r.column=1,r.offset+=L===-3?2:1,k()):L!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=L}function C(L,F){const ee=F||{};return ee.type=L,ee.start=d(),u.events.push(["enter",ee,u]),a.push(ee),ee}function O(L){const F=a.pop();return F.end=d(),u.events.push(["exit",F,u]),F}function j(L,F){J(L,F.from)}function b(L,F){F.restore()}function Y(L,F){return ee;function ee(oe,Q,ce){let he,Se,Le,g;return Array.isArray(oe)?G(oe):"tokenize"in oe?G([oe]):pe(oe);function pe(se){return Te;function Te(ye){const Ae=ye!==null&&se[ye],ke=ye!==null&&se.null,xe=[...Array.isArray(Ae)?Ae:Ae?[Ae]:[],...Array.isArray(ke)?ke:ke?[ke]:[]];return G(xe)(ye)}}function G(se){return he=se,Se=0,se.length===0?ce:m(se[Se])}function m(se){return Te;function Te(ye){return g=Z(),Le=se,se.partial||(u.currentConstruct=se),se.name&&u.parser.constructs.disable.null.includes(se.name)?ae():se.tokenize.call(F?Object.assign(Object.create(u),F):u,s,me,ae)(ye)}}function me(se){return L(Le,g),Q}function ae(se){return g.restore(),++Se<he.length?m(he[Se]):ce}}}function J(L,F){L.resolveAll&&!o.includes(L)&&o.push(L),L.resolve&&ze(u.events,F,u.events.length-F,L.resolve(u.events.slice(F),u)),L.resolveTo&&(u.events=L.resolveTo(u.events,u))}function Z(){const L=d(),F=u.previous,ee=u.currentConstruct,oe=u.events.length,Q=Array.from(a);return{from:oe,restore:ce};function ce(){r=L,u.previous=F,u.currentConstruct=ee,u.events.length=oe,a=Q,k()}}function k(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ls(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,o=n.end._bufferIndex;let l;if(t===i)l=[e[t].slice(r,o)];else{if(l=e.slice(t,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function os(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const o=e[t];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
39
- `;break}case-3:{l=`\r
40
- `;break}case-2:{l=n?" ":" ";break}case-1:{if(!n&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function as(e){const r={constructs:Wr([rs,...(e||{}).extensions||[]]),content:i(So),defined:[],document:i(Io),flow:i(Ha),lazy:{},string:i(qa),text:i(Wa)};return r;function i(o){return l;function l(a){return is(r,o,a)}}}function ss(e){for(;!Kr(e););return e}const tr=/[\0\t\n\r]/g;function us(){let e=1,n="",t=!0,r;return i;function i(o,l,a){const s=[];let u,f,c,p,h;for(o=n+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),c=0,n="",t&&(o.charCodeAt(0)===65279&&c++,t=void 0);c<o.length;){if(tr.lastIndex=c,u=tr.exec(o),p=u&&u.index!==void 0?u.index:o.length,h=o.charCodeAt(p),!u){n=o.slice(c);break}if(h===10&&c===p&&r)s.push(-3),r=void 0;else switch(r&&(s.push(-5),r=void 0),c<p&&(s.push(o.slice(c,p)),e+=p-c),h){case 0:{s.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,s.push(-2);e++<f;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:r=!0,e=1}c=p+1}return a&&(r&&s.push(-5),n&&s.push(n),s.push(null)),s}}const cs=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function fs(e){return e.replace(cs,hs)}function hs(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),o=i===120||i===88;return Yr(t.slice(o?2:1),o?16:10)}return wn(t)||e}const ri={}.hasOwnProperty;function ps(e,n,t){return n&&typeof n=="object"&&(t=n,n=void 0),ms(t)(ss(as(t).document().write(us()(e,n,!0))))}function ms(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Ue),autolinkProtocol:Z,autolinkEmail:Z,atxHeading:o(Je),blockQuote:o(ke),characterEscape:Z,characterReference:Z,codeFenced:o(xe),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(xe,l),codeText:o(Lt,l),codeTextData:Z,data:Z,codeFlowValue:Z,definition:o(Fe),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Ke),hardBreakEscape:o($e),hardBreakTrailing:o($e),htmlFlow:o(rt,l),htmlFlowData:Z,htmlText:o(rt,l),htmlTextData:Z,image:o(He),label:l,link:o(Ue),listItem:o(Rt),listItemValue:p,listOrdered:o(mt,c),listUnordered:o(mt),paragraph:o(Ft),reference:m,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(Je),strong:o(_t),thematicBreak:o(Nt)},exit:{atxHeading:s(),atxHeadingSequence:j,autolink:s(),autolinkEmail:Ae,autolinkProtocol:ye,blockQuote:s(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:se,characterReference:Te,codeFenced:s(T),codeFencedFence:x,codeFencedFenceInfo:h,codeFencedFenceMeta:d,codeFlowValue:k,codeIndented:s(y),codeText:s(Q),codeTextData:k,data:k,definition:s(),definitionDestinationString:O,definitionLabelString:I,definitionTitleString:C,emphasis:s(),hardBreakEscape:s(F),hardBreakTrailing:s(F),htmlFlow:s(ee),htmlFlowData:k,htmlText:s(oe),htmlTextData:k,image:s(he),label:Le,labelText:Se,lineEnding:L,link:s(ce),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:me,resourceDestinationString:g,resourceTitleString:pe,resource:G,setextHeading:s(J),setextHeadingLineSequence:Y,setextHeadingText:b,strong:s(),thematicBreak:s()}};ii(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(w){let v={type:"root",children:[]};const B={stack:[v],tokenStack:[],config:n,enter:a,exit:u,buffer:l,resume:f,data:t},V=[];let ne=-1;for(;++ne<w.length;)if(w[ne][1].type==="listOrdered"||w[ne][1].type==="listUnordered")if(w[ne][0]==="enter")V.push(ne);else{const S=V.pop();ne=i(w,S,ne)}for(ne=-1;++ne<w.length;){const S=n[w[ne][0]];ri.call(S,w[ne][1].type)&&S[w[ne][1].type].call(Object.assign({sliceSerialize:w[ne][2].sliceSerialize},B),w[ne][1])}if(B.tokenStack.length>0){const S=B.tokenStack[B.tokenStack.length-1];(S[1]||nr).call(B,void 0,S[0])}for(v.position={start:je(w.length>0?w[0][1].start:{line:1,column:1,offset:0}),end:je(w.length>0?w[w.length-2][1].end:{line:1,column:1,offset:0})},ne=-1;++ne<n.transforms.length;)v=n.transforms[ne](v)||v;return v}function i(w,v,B){let V=v-1,ne=-1,S=!1,z,D,R,_;for(;++V<=B;){const N=w[V];switch(N[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{N[0]==="enter"?ne++:ne--,_=void 0;break}case"lineEndingBlank":{N[0]==="enter"&&(z&&!_&&!ne&&!R&&(R=V),_=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:_=void 0}if(!ne&&N[0]==="enter"&&N[1].type==="listItemPrefix"||ne===-1&&N[0]==="exit"&&(N[1].type==="listUnordered"||N[1].type==="listOrdered")){if(z){let te=V;for(D=void 0;te--;){const K=w[te];if(K[1].type==="lineEnding"||K[1].type==="lineEndingBlank"){if(K[0]==="exit")continue;D&&(w[D][1].type="lineEndingBlank",S=!0),K[1].type="lineEnding",D=te}else if(!(K[1].type==="linePrefix"||K[1].type==="blockQuotePrefix"||K[1].type==="blockQuotePrefixWhitespace"||K[1].type==="blockQuoteMarker"||K[1].type==="listItemIndent"))break}R&&(!D||R<D)&&(z._spread=!0),z.end=Object.assign({},D?w[D][1].start:N[1].end),w.splice(D||V,0,["exit",z,N[2]]),V++,B++}if(N[1].type==="listItemPrefix"){const te={type:"listItem",_spread:!1,start:Object.assign({},N[1].start),end:void 0};z=te,w.splice(V,0,["enter",te,N[2]]),V++,B++,R=void 0,_=!0}}}return w[v][1]._spread=S,B}function o(w,v){return B;function B(V){a.call(this,w(V),V),v&&v.call(this,V)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(w,v,B){this.stack[this.stack.length-1].children.push(w),this.stack.push(w),this.tokenStack.push([v,B||void 0]),w.position={start:je(v.start),end:void 0}}function s(w){return v;function v(B){w&&w.call(this,B),u.call(this,B)}}function u(w,v){const B=this.stack.pop(),V=this.tokenStack.pop();if(V)V[0].type!==w.type&&(v?v.call(this,w,V[0]):(V[1]||nr).call(this,w,V[0]));else throw new Error("Cannot close `"+w.type+"` ("+ot({start:w.start,end:w.end})+"): it’s not open");B.position.end=je(w.end)}function f(){return bn(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function p(w){if(this.data.expectingFirstListItemValue){const v=this.stack[this.stack.length-2];v.start=Number.parseInt(this.sliceSerialize(w),10),this.data.expectingFirstListItemValue=void 0}}function h(){const w=this.resume(),v=this.stack[this.stack.length-1];v.lang=w}function d(){const w=this.resume(),v=this.stack[this.stack.length-1];v.meta=w}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const w=this.resume(),v=this.stack[this.stack.length-1];v.value=w.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const w=this.resume(),v=this.stack[this.stack.length-1];v.value=w.replace(/(\r?\n|\r)$/g,"")}function I(w){const v=this.resume(),B=this.stack[this.stack.length-1];B.label=v,B.identifier=Re(this.sliceSerialize(w)).toLowerCase()}function C(){const w=this.resume(),v=this.stack[this.stack.length-1];v.title=w}function O(){const w=this.resume(),v=this.stack[this.stack.length-1];v.url=w}function j(w){const v=this.stack[this.stack.length-1];if(!v.depth){const B=this.sliceSerialize(w).length;v.depth=B}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function Y(w){const v=this.stack[this.stack.length-1];v.depth=this.sliceSerialize(w).codePointAt(0)===61?1:2}function J(){this.data.setextHeadingSlurpLineEnding=void 0}function Z(w){const B=this.stack[this.stack.length-1].children;let V=B[B.length-1];(!V||V.type!=="text")&&(V=Mt(),V.position={start:je(w.start),end:void 0},B.push(V)),this.stack.push(V)}function k(w){const v=this.stack.pop();v.value+=this.sliceSerialize(w),v.position.end=je(w.end)}function L(w){const v=this.stack[this.stack.length-1];if(this.data.atHardBreak){const B=v.children[v.children.length-1];B.position.end=je(w.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(v.type)&&(Z.call(this,w),k.call(this,w))}function F(){this.data.atHardBreak=!0}function ee(){const w=this.resume(),v=this.stack[this.stack.length-1];v.value=w}function oe(){const w=this.resume(),v=this.stack[this.stack.length-1];v.value=w}function Q(){const w=this.resume(),v=this.stack[this.stack.length-1];v.value=w}function ce(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const v=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=v,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function he(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const v=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=v,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function Se(w){const v=this.sliceSerialize(w),B=this.stack[this.stack.length-2];B.label=fs(v),B.identifier=Re(v).toLowerCase()}function Le(){const w=this.stack[this.stack.length-1],v=this.resume(),B=this.stack[this.stack.length-1];if(this.data.inReference=!0,B.type==="link"){const V=w.children;B.children=V}else B.alt=v}function g(){const w=this.resume(),v=this.stack[this.stack.length-1];v.url=w}function pe(){const w=this.resume(),v=this.stack[this.stack.length-1];v.title=w}function G(){this.data.inReference=void 0}function m(){this.data.referenceType="collapsed"}function me(w){const v=this.resume(),B=this.stack[this.stack.length-1];B.label=v,B.identifier=Re(this.sliceSerialize(w)).toLowerCase(),this.data.referenceType="full"}function ae(w){this.data.characterReferenceType=w.type}function se(w){const v=this.sliceSerialize(w),B=this.data.characterReferenceType;let V;B?(V=Yr(v,B==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):V=wn(v);const ne=this.stack[this.stack.length-1];ne.value+=V}function Te(w){const v=this.stack.pop();v.position.end=je(w.end)}function ye(w){k.call(this,w);const v=this.stack[this.stack.length-1];v.url=this.sliceSerialize(w)}function Ae(w){k.call(this,w);const v=this.stack[this.stack.length-1];v.url="mailto:"+this.sliceSerialize(w)}function ke(){return{type:"blockquote",children:[]}}function xe(){return{type:"code",lang:null,meta:null,value:""}}function Lt(){return{type:"inlineCode",value:""}}function Fe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ke(){return{type:"emphasis",children:[]}}function Je(){return{type:"heading",depth:0,children:[]}}function $e(){return{type:"break"}}function rt(){return{type:"html",value:""}}function He(){return{type:"image",title:null,url:"",alt:null}}function Ue(){return{type:"link",title:null,url:"",children:[]}}function mt(w){return{type:"list",ordered:w.type==="listOrdered",start:null,spread:w._spread,children:[]}}function Rt(w){return{type:"listItem",spread:w._spread,checked:null,children:[]}}function Ft(){return{type:"paragraph",children:[]}}function _t(){return{type:"strong",children:[]}}function Mt(){return{type:"text",value:""}}function Nt(){return{type:"thematicBreak"}}}function je(e){return{line:e.line,column:e.column,offset:e.offset}}function ii(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?ii(e,r):ds(e,r)}}function ds(e,n){let t;for(t in n)if(ri.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function nr(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+ot({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+ot({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+ot({start:n.start,end:n.end})+") is still open")}function gs(e){const n=this;n.parser=t;function t(r){return ps(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function ys(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function ks(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
41
- `}]}function xs(e,n){const t=n.value?n.value+`
42
- `:"",r={},i=n.lang?n.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(o.data={meta:n.meta}),e.patch(n,o),o=e.applyData(n,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(n,o),o}function bs(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ws(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Ss(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),i=nt(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,a+=1,e.footnoteCounts.set(r,a);const s={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+i,id:t+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(n,s);const u={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(n,u),e.applyData(n,u)}function Cs(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Is(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function li(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const i=e.all(n),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function Es(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return li(e,n);const i={src:nt(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,o),e.applyData(n,o)}function Ts(e,n){const t={src:nt(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function As(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function vs(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return li(e,n);const i={href:nt(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,o),e.applyData(n,o)}function Ds(e,n){const t={href:nt(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function zs(e,n,t){const r=e.all(n),i=t?Ps(t):oi(n),o={},l=[];if(typeof n.checked=="boolean"){const f=r[0];let c;f&&f.type==="element"&&f.tagName==="p"?c=f:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const f=r[a];(i||a!==0||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
43
- `}),f.type==="element"&&f.tagName==="p"&&!i?l.push(...f.children):l.push(f)}const s=r[r.length-1];s&&(i||s.type!=="element"||s.tagName!=="p")&&l.push({type:"text",value:`
44
- `});const u={type:"element",tagName:"li",properties:o,children:l};return e.patch(n,u),e.applyData(n,u)}function Ps(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r<t.length;)n=oi(t[r])}return n}function oi(e){const n=e.spread;return n??e.children.length>1}function Ls(e,n){const t={},r=e.all(n);let i=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const o={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,o),e.applyData(n,o)}function Rs(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Fs(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function _s(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Ms(e,n){const t=e.all(n),r=t.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],l),i.push(l)}if(t.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},a=gn(n.children[1]),s=jr(n.children[n.children.length-1]);a&&s&&(l.position={start:a,end:s}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,o),e.applyData(n,o)}function Ns(e,n,t){const r=t?t.children:void 0,o=(r?r.indexOf(n):1)===0?"th":"td",l=t&&t.type==="table"?t.align:void 0,a=l?l.length:n.children.length;let s=-1;const u=[];for(;++s<a;){const c=n.children[s],p={},h=l?l[s]:void 0;h&&(p.align=h);let d={type:"element",tagName:o,properties:p,children:[]};c&&(d.children=e.all(c),e.patch(c,d),d=e.applyData(c,d)),u.push(d)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(n,f),e.applyData(n,f)}function Os(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const rr=9,ir=32;function js(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),i=0;const o=[];for(;r;)o.push(lr(n.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return o.push(lr(n.slice(i),i>0,!1)),o.join("")}function lr(e,n,t){let r=0,i=e.length;if(n){let o=e.codePointAt(r);for(;o===rr||o===ir;)r++,o=e.codePointAt(r)}if(t){let o=e.codePointAt(i-1);for(;o===rr||o===ir;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Bs(e,n){const t={type:"text",value:js(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function $s(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const Hs={blockquote:ys,break:ks,code:xs,delete:bs,emphasis:ws,footnoteReference:Ss,heading:Cs,html:Is,imageReference:Es,image:Ts,inlineCode:As,linkReference:vs,link:Ds,listItem:zs,list:Ls,paragraph:Rs,root:Fs,strong:_s,table:Ms,tableCell:Os,tableRow:Ns,text:Bs,thematicBreak:$s,toml:dt,yaml:dt,definition:dt,footnoteDefinition:dt};function dt(){}const ai=-1,Dt=0,st=1,Ct=2,Cn=3,In=4,En=5,Tn=6,si=7,ui=8,ci=typeof self=="object"?self:globalThis,or=(e,n)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new ci[e](n)},Us=(e,n)=>{const t=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=n[i];switch(o){case Dt:case ai:return t(l,i);case st:{const a=t([],i);for(const s of l)a.push(r(s));return a}case Ct:{const a=t({},i);for(const[s,u]of l)a[r(s)]=r(u);return a}case Cn:return t(new Date(l),i);case In:{const{source:a,flags:s}=l;return t(new RegExp(a,s),i)}case En:{const a=t(new Map,i);for(const[s,u]of l)a.set(r(s),r(u));return a}case Tn:{const a=t(new Set,i);for(const s of l)a.add(r(s));return a}case si:{const{name:a,message:s}=l;return t(typeof ci[a]=="function"?or(a,s):new Error(s),i)}case ui:return t(BigInt(l),i);case"BigInt":return t(Object(BigInt(l)),i);case"ArrayBuffer":return t(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return t(new DataView(a),l)}}return t(or(o,l),i)};return r},ar=e=>Us(new Map,e)(0),qe="",{toString:Vs}={},{keys:qs}=Object,lt=e=>{const n=typeof e;if(n!=="object"||!e)return[Dt,n];const t=Vs.call(e).slice(8,-1);switch(t){case"Array":return[st,qe];case"Object":return[Ct,qe];case"Date":return[Cn,qe];case"RegExp":return[In,qe];case"Map":return[En,qe];case"Set":return[Tn,qe];case"DataView":return[st,t]}return t.includes("Array")?[st,t]:e instanceof Error?[si,e.name||"Error"]:[Ct,t]},gt=([e,n])=>e===Dt&&(n==="function"||n==="symbol"),Ws=(e,n,t,r)=>{const i=(l,a)=>{const s=r.push(l)-1;return t.set(a,s),s},o=l=>{if(t.has(l))return t.get(l);let[a,s]=lt(l);switch(a){case Dt:{let f=l;switch(s){case"bigint":a=ui,f=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);f=null;break;case"undefined":return i([ai],l)}return i([a,f],l)}case st:{if(s){let p=l;return s==="DataView"?p=new Uint8Array(l.buffer):s==="ArrayBuffer"&&(p=new Uint8Array(l)),i([s,[...p]],l)}const f=[],c=i([a,f],l);for(const p of l)f.push(o(p));return c}case Ct:{if(s)switch(s){case"BigInt":return i([s,l.toString()],l);case"Boolean":case"Number":case"String":return i([s,l.valueOf()],l)}if(n&&"toJSON"in l)return o(l.toJSON());const f=[],c=i([a,f],l);for(const p of qs(l))(e||!gt(lt(l[p])))&&f.push([o(p),o(l[p])]);return c}case Cn:return i([a,isNaN(l.getTime())?qe:l.toISOString()],l);case In:{const{source:f,flags:c}=l;return i([a,{source:f,flags:c}],l)}case En:{const f=[],c=i([a,f],l);for(const[p,h]of l)(e||!(gt(lt(p))||gt(lt(h))))&&f.push([o(p),o(h)]);return c}case Tn:{const f=[],c=i([a,f],l);for(const p of l)(e||!gt(lt(p)))&&f.push(o(p));return c}}const{message:u}=l;return i([a,{name:s,message:u}],l)};return o},sr=(e,{json:n,lossy:t}={})=>{const r=[];return Ws(!(n||t),!!n,new Map,r)(e),r},It=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?ar(sr(e,n)):structuredClone(e):(e,n)=>ar(sr(e,n));function Ys(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function Qs(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function Xs(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||Ys,r=e.options.footnoteBackLabel||Qs,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let s=-1;for(;++s<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[s]);if(!u)continue;const f=e.all(u),c=String(u.identifier).toUpperCase(),p=nt(c.toLowerCase());let h=0;const d=[],x=e.footnoteCounts.get(c);for(;x!==void 0&&++h<=x;){d.length>0&&d.push({type:"text",value:" "});let I=typeof t=="string"?t:t(s,h);typeof I=="string"&&(I={type:"text",value:I}),d.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(s,h),className:["data-footnote-backref"]},children:Array.isArray(I)?I:[I]})}const T=f[f.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const I=T.children[T.children.length-1];I&&I.type==="text"?I.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...d)}else f.push(...d);const y={type:"element",tagName:"li",properties:{id:n+"fn-"+p},children:e.wrap(f,!0)};e.patch(u,y),a.push(y)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...It(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
45
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
46
- `}]}}const zt=function(e){if(e==null)return Zs;if(typeof e=="function")return Pt(e);if(typeof e=="object")return Array.isArray(e)?Gs(e):Ks(e);if(typeof e=="string")return Js(e);throw new Error("Expected function, string, or object as test")};function Gs(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=zt(e[t]);return Pt(r);function r(...i){let o=-1;for(;++o<n.length;)if(n[o].apply(this,i))return!0;return!1}}function Ks(e){const n=e;return Pt(t);function t(r){const i=r;let o;for(o in e)if(i[o]!==n[o])return!1;return!0}}function Js(e){return Pt(n);function n(t){return t&&t.type===e}}function Pt(e){return n;function n(t,r,i){return!!(eu(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function Zs(){return!0}function eu(e){return e!==null&&typeof e=="object"&&"type"in e}const fi=[],tu=!0,sn=!1,nu="skip";function hi(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;const o=zt(i),l=r?-1:1;a(e,void 0,[])();function a(s,u,f){const c=s&&typeof s=="object"?s:{};if(typeof c.type=="string"){const h=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(s.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=fi,d,x,T;if((!n||o(s,u,f[f.length-1]||void 0))&&(h=ru(t(s,f)),h[0]===sn))return h;if("children"in s&&s.children){const y=s;if(y.children&&h[0]!==nu)for(x=(r?y.children.length:-1)+l,T=f.concat(y);x>-1&&x<y.children.length;){const I=y.children[x];if(d=a(I,x,T)(),d[0]===sn)return d;x=typeof d[1]=="number"?d[1]:x+l}}return h}}}function ru(e){return Array.isArray(e)?e:typeof e=="number"?[tu,e]:e==null?fi:[e]}function An(e,n,t,r){let i,o,l;typeof n=="function"&&typeof t!="function"?(o=void 0,l=n,i=t):(o=n,l=t,i=r),hi(e,o,a,i);function a(s,u){const f=u[u.length-1],c=f?f.children.indexOf(s):void 0;return l(s,c,f)}}const un={}.hasOwnProperty,iu={};function lu(e,n){const t=n||iu,r=new Map,i=new Map,o=new Map,l={...Hs,...t.handlers},a={all:u,applyData:au,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:s,options:t,patch:ou,wrap:uu};return An(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const c=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();c.has(p)||c.set(p,f)}}),a;function s(f,c){const p=f.type,h=a.handlers[p];if(un.call(a.handlers,p)&&h)return h(a,f,c);if(a.options.passThrough&&a.options.passThrough.includes(p)){if("children"in f){const{children:x,...T}=f,y=It(T);return y.children=a.all(f),y}return It(f)}return(a.options.unknownHandler||su)(a,f,c)}function u(f){const c=[];if("children"in f){const p=f.children;let h=-1;for(;++h<p.length;){const d=a.one(p[h],f);if(d){if(h&&p[h-1].type==="break"&&(!Array.isArray(d)&&d.type==="text"&&(d.value=ur(d.value)),!Array.isArray(d)&&d.type==="element")){const x=d.children[0];x&&x.type==="text"&&(x.value=ur(x.value))}Array.isArray(d)?c.push(...d):c.push(d)}}}return c}}function ou(e,n){e.position&&(n.position=Yl(e))}function au(e,n){let t=n;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(t.type==="element")t.tagName=r;else{const l="children"in t?t.children:[t];t={type:"element",tagName:r,properties:{},children:l}}t.type==="element"&&o&&Object.assign(t.properties,It(o)),"children"in t&&t.children&&i!==null&&i!==void 0&&(t.children=i)}return t}function su(e,n){const t=n.data||{},r="value"in n&&!(un.call(t,"hProperties")||un.call(t,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function uu(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
47
- `});++r<e.length;)r&&t.push({type:"text",value:`
48
- `}),t.push(e[r]);return n&&e.length>0&&t.push({type:"text",value:`
49
- `}),t}function ur(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function cr(e,n){const t=lu(e,n),r=t.one(e,void 0),i=Xs(t),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
50
- `},i),o}function cu(e,n){return e&&"run"in e?async function(t,r){const i=cr(t,{file:r,...n});await e.run(i,r)}:function(t,r){return cr(t,{file:r,...e||n})}}function fr(e){if(e)throw e}var bt=Object.prototype.hasOwnProperty,pi=Object.prototype.toString,hr=Object.defineProperty,pr=Object.getOwnPropertyDescriptor,mr=function(n){return typeof Array.isArray=="function"?Array.isArray(n):pi.call(n)==="[object Array]"},dr=function(n){if(!n||pi.call(n)!=="[object Object]")return!1;var t=bt.call(n,"constructor"),r=n.constructor&&n.constructor.prototype&&bt.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!t&&!r)return!1;var i;for(i in n);return typeof i>"u"||bt.call(n,i)},gr=function(n,t){hr&&t.name==="__proto__"?hr(n,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):n[t.name]=t.newValue},yr=function(n,t){if(t==="__proto__")if(bt.call(n,t)){if(pr)return pr(n,t).value}else return;return n[t]},fu=function e(){var n,t,r,i,o,l,a=arguments[0],s=1,u=arguments.length,f=!1;for(typeof a=="boolean"&&(f=a,a=arguments[1]||{},s=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});s<u;++s)if(n=arguments[s],n!=null)for(t in n)r=yr(a,t),i=yr(n,t),a!==i&&(f&&i&&(dr(i)||(o=mr(i)))?(o?(o=!1,l=r&&mr(r)?r:[]):l=r&&dr(r)?r:{},gr(a,{name:t,newValue:e(f,l,i)})):typeof i<"u"&&gr(a,{name:t,newValue:i}));return a};const Ut=zr(fu);function cn(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function hu(){const e=[],n={run:t,use:r};return n;function t(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(s,...u){const f=e[++o];let c=-1;if(s){l(s);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,f?pu(f,a)(...u):l(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function pu(e,n){let t;return r;function r(...l){const a=e.length>l.length;let s;a&&l.push(i);try{s=e.apply(this,l)}catch(u){const f=u;if(a&&t)throw f;return i(f)}a||(s&&s.then&&typeof s.then=="function"?s.then(o,i):s instanceof Error?i(s):o(s))}function i(l,...a){t||(t=!0,n(l,...a))}function o(l){i(null,l)}}const _e={basename:mu,dirname:du,extname:gu,join:yu,sep:"/"};function mu(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');pt(e);let t=0,r=-1,i=e.length,o;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let l=-1,a=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===n.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return t===r?r=l:r<0&&(r=e.length),e.slice(t,r)}function du(e){if(pt(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function gu(e){pt(e);let n=e.length,t=-1,r=0,i=-1,o=0,l;for(;n--;){const a=e.codePointAt(n);if(a===47){if(l){r=n+1;break}continue}t<0&&(l=!0,t=n+1),a===46?i<0?i=n:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||t<0||o===0||o===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function yu(...e){let n=-1,t;for(;++n<e.length;)pt(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":ku(t)}function ku(e){pt(e);const n=e.codePointAt(0)===47;let t=xu(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function xu(e,n){let t="",r=0,i=-1,o=0,l=-1,a,s;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(s=t.lastIndexOf("/"),s!==t.length-1){s<0?(t="",r=0):(t=t.slice(0,s),r=t.length-1-t.lastIndexOf("/")),i=l,o=0;continue}}else if(t.length>0){t="",r=0,i=l,o=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,l):t=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return t}function pt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const bu={cwd:wu};function wu(){return"/"}function fn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Su(e){if(typeof e=="string")e=new URL(e);else if(!fn(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return Cu(e)}function Cu(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let t=-1;for(;++t<n.length;)if(n.codePointAt(t)===37&&n.codePointAt(t+1)===50){const r=n.codePointAt(t+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(n)}const Vt=["history","path","basename","stem","extname","dirname"];class mi{constructor(n){let t;n?fn(n)?t={path:n}:typeof n=="string"||Iu(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":bu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Vt.length;){const o=Vt[r];o in t&&t[o]!==void 0&&t[o]!==null&&(this[o]=o==="history"?[...t[o]]:t[o])}let i;for(i in t)Vt.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?_e.basename(this.path):void 0}set basename(n){Wt(n,"basename"),qt(n,"basename"),this.path=_e.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?_e.dirname(this.path):void 0}set dirname(n){kr(this.basename,"dirname"),this.path=_e.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?_e.extname(this.path):void 0}set extname(n){if(qt(n,"extname"),kr(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=_e.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){fn(n)&&(n=Su(n)),Wt(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?_e.basename(this.path,this.extname):void 0}set stem(n){Wt(n,"stem"),qt(n,"stem"),this.path=_e.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){const i=this.message(n,t,r);throw i.fatal=!0,i}info(n,t,r){const i=this.message(n,t,r);return i.fatal=void 0,i}message(n,t,r){const i=new ge(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function qt(e,n){if(e&&e.includes(_e.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+_e.sep+"`")}function Wt(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function kr(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function Iu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Eu=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},Tu={}.hasOwnProperty;class vn extends Eu{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=hu()}copy(){const n=new vn;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(Ut(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(Xt("data",this.frozen),this.namespace[n]=t,this):Tu.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Xt("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const t=yt(n),r=this.parser||this.Parser;return Yt("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),Yt("process",this.parser||this.Parser),Qt("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(o,l){const a=yt(n),s=r.parse(a);r.run(s,a,function(f,c,p){if(f||!c||!p)return u(f);const h=c,d=r.stringify(h,p);Du(d)?p.value=d:p.result=d,u(f,p)});function u(f,c){f||!c?l(f):o?o(c):t(void 0,c)}}}processSync(n){let t=!1,r;return this.freeze(),Yt("processSync",this.parser||this.Parser),Qt("processSync",this.compiler||this.Compiler),this.process(n,i),br("processSync","process",t),r;function i(o,l){t=!0,fr(o),r=l}}run(n,t,r){xr(n),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?o(void 0,r):new Promise(o);function o(l,a){const s=yt(t);i.run(n,s,u);function u(f,c,p){const h=c||n;f?a(f):l?l(h):r(void 0,h,p)}}}runSync(n,t){let r=!1,i;return this.run(n,t,o),br("runSync","run",r),i;function o(l,a){fr(l),i=a,r=!0}}stringify(n,t){this.freeze();const r=yt(t),i=this.compiler||this.Compiler;return Qt("stringify",i),xr(n),i(n,r)}use(n,...t){const r=this.attachers,i=this.namespace;if(Xt("use",this.frozen),n!=null)if(typeof n=="function")s(n,t);else if(typeof n=="object")Array.isArray(n)?a(n):l(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function o(u){if(typeof u=="function")s(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...c]=u;s(f,c)}else l(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function l(u){if(!("plugins"in u)&&!("settings"in u))throw new 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");a(u.plugins),u.settings&&(i.settings=Ut(!0,i.settings,u.settings))}function a(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const c=u[f];o(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function s(u,f){let c=-1,p=-1;for(;++c<r.length;)if(r[c][0]===u){p=c;break}if(p===-1)r.push([u,...f]);else if(f.length>0){let[h,...d]=f;const x=r[p][1];cn(x)&&cn(h)&&(h=Ut(!0,x,h)),r[p]=[u,h,...d]}}}}const Au=new vn().freeze();function Yt(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Qt(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Xt(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function xr(e){if(!cn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function br(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function yt(e){return vu(e)?e:new mi(e)}function vu(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Du(e){return typeof e=="string"||zu(e)}function zu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Pu="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",wr=[],Sr={allowDangerousHtml:!0},Lu=/^(https?|ircs?|mailto|xmpp)$/i,Ru=[{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:"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 Fu(e){const n=_u(e),t=Mu(e);return Nu(n.runSync(n.parse(t),t),e)}function _u(e){const n=e.rehypePlugins||wr,t=e.remarkPlugins||wr,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Sr}:Sr;return Au().use(gs).use(t).use(cu,r).use(n)}function Mu(e){const n=e.children||"",t=new mi;return typeof n=="string"&&(t.value=n),t}function Nu(e,n){const t=n.allowedElements,r=n.allowElement,i=n.components,o=n.disallowedElements,l=n.skipHtml,a=n.unwrapDisallowed,s=n.urlTransform||Ou;for(const f of Ru)Object.hasOwn(n,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Pu+f.id,void 0);return n.className&&(e={type:"element",tagName:"div",properties:{className:n.className},children:e.type==="root"?e.children:[e]}),An(e,u),Jl(e,{Fragment:E.Fragment,components:i,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0});function u(f,c,p){if(f.type==="raw"&&p&&typeof c=="number")return l?p.children.splice(c,1):p.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let h;for(h in Bt)if(Object.hasOwn(Bt,h)&&Object.hasOwn(f.properties,h)){const d=f.properties[h],x=Bt[h];(x===null||x.includes(f.tagName))&&(f.properties[h]=s(String(d||""),h,f))}}if(f.type==="element"){let h=t?!t.includes(f.tagName):o?o.includes(f.tagName):!1;if(!h&&r&&typeof c=="number"&&(h=!r(f,c,p)),h&&p&&typeof c=="number")return a&&f.children?p.children.splice(c,1,...f.children):p.children.splice(c,1),c}}}function Ou(e){const n=e.indexOf(":"),t=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return n===-1||i!==-1&&n>i||t!==-1&&n>t||r!==-1&&n>r||Lu.test(e.slice(0,n))?e:""}function Cr(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+n.length);return r}function ju(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Bu(e,n,t){const i=zt((t||{}).ignore||[]),o=$u(n);let l=-1;for(;++l<o.length;)hi(e,"text",a);function a(u,f){let c=-1,p;for(;++c<f.length;){const h=f[c],d=p?p.children:void 0;if(i(h,d?d.indexOf(h):void 0,p))return;p=h}if(p)return s(u,f)}function s(u,f){const c=f[f.length-1],p=o[l][0],h=o[l][1];let d=0;const T=c.children.indexOf(u);let y=!1,I=[];p.lastIndex=0;let C=p.exec(u.value);for(;C;){const O=C.index,j={index:C.index,input:C.input,stack:[...f,u]};let b=h(...C,j);if(typeof b=="string"&&(b=b.length>0?{type:"text",value:b}:void 0),b===!1?p.lastIndex=O+1:(d!==O&&I.push({type:"text",value:u.value.slice(d,O)}),Array.isArray(b)?I.push(...b):b&&I.push(b),d=O+C[0].length,y=!0),!p.global)break;C=p.exec(u.value)}return y?(d<u.value.length&&I.push({type:"text",value:u.value.slice(d)}),c.children.splice(T,1,...I)):I=[u],T+I.length}}function $u(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<t.length;){const i=t[r];n.push([Hu(i[0]),Uu(i[1])])}return n}function Hu(e){return typeof e=="string"?new RegExp(ju(e),"g"):e}function Uu(e){return typeof e=="function"?e:function(){return e}}const Gt="phrasing",Kt=["autolink","link","image","label"];function Vu(){return{transforms:[Ku],enter:{literalAutolink:Wu,literalAutolinkEmail:Jt,literalAutolinkHttp:Jt,literalAutolinkWww:Jt},exit:{literalAutolink:Gu,literalAutolinkEmail:Xu,literalAutolinkHttp:Yu,literalAutolinkWww:Qu}}}function qu(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Gt,notInConstruct:Kt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Gt,notInConstruct:Kt},{character:":",before:"[ps]",after:"\\/",inConstruct:Gt,notInConstruct:Kt}]}}function Wu(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Jt(e){this.config.enter.autolinkProtocol.call(this,e)}function Yu(e){this.config.exit.autolinkProtocol.call(this,e)}function Qu(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function Xu(e){this.config.exit.autolinkEmail.call(this,e)}function Gu(e){this.exit(e)}function Ku(e){Bu(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Ju],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Zu]],{ignore:["link","linkReference"]})}function Ju(e,n,t,r,i){let o="";if(!di(i)||(/^w/i.test(n)&&(t=n+t,n="",o="http://"),!ec(t)))return!1;const l=tc(t+r);if(!l[0])return!1;const a={type:"link",title:null,url:o+n+l[0],children:[{type:"text",value:n+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function Zu(e,n,t,r){return!di(r,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function ec(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function tc(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const i=Cr(e,"(");let o=Cr(e,")");for(;r!==-1&&i>o;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),o++;return[e,t]}function di(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Qe(t)||At(t))&&(!n||t!==47)}gi.peek=cc;function nc(){this.buffer()}function rc(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ic(){this.buffer()}function lc(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function oc(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Re(this.sliceSerialize(e)).toLowerCase(),t.label=n}function ac(e){this.exit(e)}function sc(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Re(this.sliceSerialize(e)).toLowerCase(),t.label=n}function uc(e){this.exit(e)}function cc(){return"["}function gi(e,n,t,r){const i=t.createTracker(r);let o=i.move("[^");const l=t.enter("footnoteReference"),a=t.enter("reference");return o+=i.move(t.safe(t.associationId(e),{after:"]",before:o})),a(),l(),o+=i.move("]"),o}function fc(){return{enter:{gfmFootnoteCallString:nc,gfmFootnoteCall:rc,gfmFootnoteDefinitionLabelString:ic,gfmFootnoteDefinition:lc},exit:{gfmFootnoteCallString:oc,gfmFootnoteCall:ac,gfmFootnoteDefinitionLabelString:sc,gfmFootnoteDefinition:uc}}}function hc(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:gi},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,i,o,l){const a=o.createTracker(l);let s=a.move("[^");const u=o.enter("footnoteDefinition"),f=o.enter("label");return s+=a.move(o.safe(o.associationId(r),{before:s,after:"]"})),f(),s+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),s+=a.move((n?`
51
- `:" ")+o.indentLines(o.containerFlow(r,a.current()),n?yi:pc))),u(),s}}function pc(e,n,t){return n===0?e:yi(e,n,t)}function yi(e,n,t){return(t?"":" ")+e}const mc=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ki.peek=xc;function dc(){return{canContainEols:["delete"],enter:{strikethrough:yc},exit:{strikethrough:kc}}}function gc(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:mc}],handlers:{delete:ki}}}function yc(e){this.enter({type:"delete",children:[]},e)}function kc(e){this.exit(e)}function ki(e,n,t,r){const i=t.createTracker(r),o=t.enter("strikethrough");let l=i.move("~~");return l+=t.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function xc(){return"~"}function bc(e){return e.length}function wc(e,n){const t=n||{},r=(t.align||[]).concat(),i=t.stringLength||bc,o=[],l=[],a=[],s=[];let u=0,f=-1;for(;++f<e.length;){const x=[],T=[];let y=-1;for(e[f].length>u&&(u=e[f].length);++y<e[f].length;){const I=Sc(e[f][y]);if(t.alignDelimiters!==!1){const C=i(I);T[y]=C,(s[y]===void 0||C>s[y])&&(s[y]=C)}x.push(I)}l[f]=x,a[f]=T}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)o[c]=Ir(r[c]);else{const x=Ir(r);for(;++c<u;)o[c]=x}c=-1;const p=[],h=[];for(;++c<u;){const x=o[c];let T="",y="";x===99?(T=":",y=":"):x===108?T=":":x===114&&(y=":");let I=t.alignDelimiters===!1?1:Math.max(1,s[c]-T.length-y.length);const C=T+"-".repeat(I)+y;t.alignDelimiters!==!1&&(I=T.length+I+y.length,I>s[c]&&(s[c]=I),h[c]=I),p[c]=C}l.splice(1,0,p),a.splice(1,0,h),f=-1;const d=[];for(;++f<l.length;){const x=l[f],T=a[f];c=-1;const y=[];for(;++c<u;){const I=x[c]||"";let C="",O="";if(t.alignDelimiters!==!1){const j=s[c]-(T[c]||0),b=o[c];b===114?C=" ".repeat(j):b===99?j%2?(C=" ".repeat(j/2+.5),O=" ".repeat(j/2-.5)):(C=" ".repeat(j/2),O=C):O=" ".repeat(j)}t.delimiterStart!==!1&&!c&&y.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&I==="")&&(t.delimiterStart!==!1||c)&&y.push(" "),t.alignDelimiters!==!1&&y.push(C),y.push(I),t.alignDelimiters!==!1&&y.push(O),t.padding!==!1&&y.push(" "),(t.delimiterEnd!==!1||c!==u-1)&&y.push("|")}d.push(t.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return d.join(`
52
- `)}function Sc(e){return e==null?"":String(e)}function Ir(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function Cc(e,n,t,r){const i=t.enter("blockquote"),o=t.createTracker(r);o.move("> "),o.shift(2);const l=t.indentLines(t.containerFlow(e,o.current()),Ic);return i(),l}function Ic(e,n,t){return">"+(t?"":" ")+e}function Ec(e,n){return Er(e,n.inConstruct,!0)&&!Er(e,n.notInConstruct,!1)}function Er(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++r<n.length;)if(e.includes(n[r]))return!0;return!1}function Tr(e,n,t,r){let i=-1;for(;++i<t.unsafe.length;)if(t.unsafe[i].character===`
53
- `&&Ec(t.stack,t.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
54
- `}function Tc(e,n){const t=String(e);let r=t.indexOf(n),i=r,o=0,l=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>l&&(l=o):o=1,i=r+n.length,r=t.indexOf(n,i);return l}function Ac(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function vc(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function Dc(e,n,t,r){const i=vc(t),o=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(Ac(e,t)){const c=t.enter("codeIndented"),p=t.indentLines(o,zc);return c(),p}const a=t.createTracker(r),s=i.repeat(Math.max(Tc(o,i)+1,3)),u=t.enter("codeFenced");let f=a.move(s);if(e.lang){const c=t.enter(`codeFencedLang${l}`);f+=a.move(t.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),c()}if(e.lang&&e.meta){const c=t.enter(`codeFencedMeta${l}`);f+=a.move(" "),f+=a.move(t.safe(e.meta,{before:f,after:`
55
- `,encode:["`"],...a.current()})),c()}return f+=a.move(`
56
- `),o&&(f+=a.move(o+`
57
- `)),f+=a.move(s),u(),f}function zc(e,n,t){return(t?"":" ")+e}function Dn(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function Pc(e,n,t,r){const i=Dn(t),o=i==='"'?"Quote":"Apostrophe",l=t.enter("definition");let a=t.enter("label");const s=t.createTracker(r);let u=s.move("[");return u+=s.move(t.safe(t.associationId(e),{before:u,after:"]",...s.current()})),u+=s.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(t.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=t.enter("destinationRaw"),u+=s.move(t.safe(e.url,{before:u,after:e.title?" ":`
58
- `,...s.current()}))),a(),e.title&&(a=t.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(t.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),l(),u}function Lc(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function ct(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Et(e,n,t){const r=et(e),i=et(n);return r===void 0?i===void 0?t==="_"?{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}}xi.peek=Rc;function xi(e,n,t,r){const i=Lc(t),o=t.enter("emphasis"),l=t.createTracker(r),a=l.move(i);let s=l.move(t.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=s.charCodeAt(0),f=Et(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(s=ct(u)+s.slice(1));const c=s.charCodeAt(s.length-1),p=Et(r.after.charCodeAt(0),c,i);p.inside&&(s=s.slice(0,-1)+ct(c));const h=l.move(i);return o(),t.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},a+s+h}function Rc(e,n,t){return t.options.emphasis||"*"}function Fc(e,n){let t=!1;return An(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,sn}),!!((!e.depth||e.depth<3)&&bn(e)&&(n.options.setext||t))}function _c(e,n,t,r){const i=Math.max(Math.min(6,e.depth||1),1),o=t.createTracker(r);if(Fc(e,t)){const f=t.enter("headingSetext"),c=t.enter("phrasing"),p=t.containerPhrasing(e,{...o.current(),before:`
59
- `,after:`
60
- `});return c(),f(),p+`
61
- `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
62
- `))+1))}const l="#".repeat(i),a=t.enter("headingAtx"),s=t.enter("phrasing");o.move(l+" ");let u=t.containerPhrasing(e,{before:"# ",after:`
63
- `,...o.current()});return/^[\t ]/.test(u)&&(u=ct(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,t.options.closeAtx&&(u+=" "+l),s(),a(),u}bi.peek=Mc;function bi(e){return e.value||""}function Mc(){return"<"}wi.peek=Nc;function wi(e,n,t,r){const i=Dn(t),o=i==='"'?"Quote":"Apostrophe",l=t.enter("image");let a=t.enter("label");const s=t.createTracker(r);let u=s.move("![");return u+=s.move(t.safe(e.alt,{before:u,after:"]",...s.current()})),u+=s.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(t.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=t.enter("destinationRaw"),u+=s.move(t.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),a(),e.title&&(a=t.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(t.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),u+=s.move(")"),l(),u}function Nc(){return"!"}Si.peek=Oc;function Si(e,n,t,r){const i=e.referenceType,o=t.enter("imageReference");let l=t.enter("label");const a=t.createTracker(r);let s=a.move("![");const u=t.safe(e.alt,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const c=t.safe(t.associationId(e),{before:s,after:"]",...a.current()});return l(),t.stack=f,o(),i==="full"||!u||u!==c?s+=a.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function Oc(){return"!"}Ci.peek=jc;function Ci(e,n,t){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<t.unsafe.length;){const l=t.unsafe[o],a=t.compilePattern(l);let s;if(l.atBreak)for(;s=a.exec(r);){let u=s.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(s.index+1)}}return i+r+i}function jc(){return"`"}function Ii(e,n){const t=bn(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(t===e.url||"mailto:"+t===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Ei.peek=Bc;function Ei(e,n,t,r){const i=Dn(t),o=i==='"'?"Quote":"Apostrophe",l=t.createTracker(r);let a,s;if(Ii(e,t)){const f=t.stack;t.stack=[],a=t.enter("autolink");let c=l.move("<");return c+=l.move(t.containerPhrasing(e,{before:c,after:">",...l.current()})),c+=l.move(">"),a(),t.stack=f,c}a=t.enter("link"),s=t.enter("label");let u=l.move("[");return u+=l.move(t.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=t.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(t.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=t.enter("destinationRaw"),u+=l.move(t.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=t.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(t.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),u+=l.move(")"),a(),u}function Bc(e,n,t){return Ii(e,t)?"<":"["}Ti.peek=$c;function Ti(e,n,t,r){const i=e.referenceType,o=t.enter("linkReference");let l=t.enter("label");const a=t.createTracker(r);let s=a.move("[");const u=t.containerPhrasing(e,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const c=t.safe(t.associationId(e),{before:s,after:"]",...a.current()});return l(),t.stack=f,o(),i==="full"||!u||u!==c?s+=a.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function $c(){return"["}function zn(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function Hc(e){const n=zn(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function Uc(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function Ai(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function Vc(e,n,t,r){const i=t.enter("list"),o=t.bulletCurrent;let l=e.ordered?Uc(t):zn(t);const a=e.ordered?l==="."?")":".":Hc(t);let s=n&&t.bulletLastUsed?l===t.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(s=!0),Ai(t)===l&&f){let c=-1;for(;++c<e.children.length;){const p=e.children[c];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){s=!0;break}}}}s&&(l=a),t.bulletCurrent=l;const u=t.containerFlow(e,r);return t.bulletLastUsed=l,t.bulletCurrent=o,i(),u}function qc(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function Wc(e,n,t,r){const i=qc(t);let o=t.bulletCurrent||zn(t);n&&n.type==="list"&&n.ordered&&(o=(typeof n.start=="number"&&n.start>-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=t.createTracker(r);a.move(o+" ".repeat(l-o.length)),a.shift(l);const s=t.enter("listItem"),u=t.indentLines(t.containerFlow(e,a.current()),f);return s(),u;function f(c,p,h){return p?(h?"":" ".repeat(l))+c:(h?o:o+" ".repeat(l-o.length))+c}}function Yc(e,n,t,r){const i=t.enter("paragraph"),o=t.enter("phrasing"),l=t.containerPhrasing(e,r);return o(),i(),l}const Qc=zt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Xc(e,n,t,r){return(e.children.some(function(l){return Qc(l)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function Gc(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}vi.peek=Kc;function vi(e,n,t,r){const i=Gc(t),o=t.enter("strong"),l=t.createTracker(r),a=l.move(i+i);let s=l.move(t.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=s.charCodeAt(0),f=Et(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(s=ct(u)+s.slice(1));const c=s.charCodeAt(s.length-1),p=Et(r.after.charCodeAt(0),c,i);p.inside&&(s=s.slice(0,-1)+ct(c));const h=l.move(i+i);return o(),t.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},a+s+h}function Kc(e,n,t){return t.options.strong||"*"}function Jc(e,n,t,r){return t.safe(e.value,r)}function Zc(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function ef(e,n,t){const r=(Ai(t)+(t.options.ruleSpaces?" ":"")).repeat(Zc(t));return t.options.ruleSpaces?r.slice(0,-1):r}const Di={blockquote:Cc,break:Tr,code:Dc,definition:Pc,emphasis:xi,hardBreak:Tr,heading:_c,html:bi,image:wi,imageReference:Si,inlineCode:Ci,link:Ei,linkReference:Ti,list:Vc,listItem:Wc,paragraph:Yc,root:Xc,strong:vi,text:Jc,thematicBreak:ef};function tf(){return{enter:{table:nf,tableData:Ar,tableHeader:Ar,tableRow:lf},exit:{codeText:of,table:rf,tableData:Zt,tableHeader:Zt,tableRow:Zt}}}function nf(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function rf(e){this.exit(e),this.data.inTable=void 0}function lf(e){this.enter({type:"tableRow",children:[]},e)}function Zt(e){this.exit(e)}function Ar(e){this.enter({type:"tableCell",children:[]},e)}function of(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,af));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function af(e,n){return n==="|"?n:e}function sf(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,i=n.stringLength,o=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
64
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:l,tableCell:s,tableRow:a}};function l(h,d,x,T){return u(f(h,x,T),h.align)}function a(h,d,x,T){const y=c(h,x,T),I=u([y]);return I.slice(0,I.indexOf(`
65
- `))}function s(h,d,x,T){const y=x.enter("tableCell"),I=x.enter("phrasing"),C=x.containerPhrasing(h,{...T,before:o,after:o});return I(),y(),C}function u(h,d){return wc(h,{align:d,alignDelimiters:r,padding:t,stringLength:i})}function f(h,d,x){const T=h.children;let y=-1;const I=[],C=d.enter("table");for(;++y<T.length;)I[y]=c(T[y],d,x);return C(),I}function c(h,d,x){const T=h.children;let y=-1;const I=[],C=d.enter("tableRow");for(;++y<T.length;)I[y]=s(T[y],h,d,x);return C(),I}function p(h,d,x){let T=Di.inlineCode(h,d,x);return x.stack.includes("tableCell")&&(T=T.replace(/\|/g,"\\$&")),T}}function uf(){return{exit:{taskListCheckValueChecked:vr,taskListCheckValueUnchecked:vr,paragraph:ff}}}function cf(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:hf}}}function vr(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function ff(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const t=this.stack[this.stack.length-1];t.type;const r=t.children[0];if(r&&r.type==="text"){const i=n.children;let o=-1,l;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){l=a;break}}l===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function hf(e,n,t,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=t.createTracker(r);o&&a.move(l);let s=Di.listItem(e,n,t,{...r,...a.current()});return o&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),s;function u(f){return f+l}}function pf(){return[Vu(),fc(),dc(),tf(),uf()]}function mf(e){return{extensions:[qu(),hc(e),gc(),sf(e),cf()]}}const df={tokenize:wf,partial:!0},zi={tokenize:Sf,partial:!0},Pi={tokenize:Cf,partial:!0},Li={tokenize:If,partial:!0},gf={tokenize:Ef,partial:!0},Ri={name:"wwwAutolink",tokenize:xf,previous:_i},Fi={name:"protocolAutolink",tokenize:bf,previous:Mi},Oe={name:"emailAutolink",tokenize:kf,previous:Ni},Me={};function yf(){return{text:Me}}let Ve=48;for(;Ve<123;)Me[Ve]=Oe,Ve++,Ve===58?Ve=65:Ve===91&&(Ve=97);Me[43]=Oe;Me[45]=Oe;Me[46]=Oe;Me[95]=Oe;Me[72]=[Oe,Fi];Me[104]=[Oe,Fi];Me[87]=[Oe,Ri];Me[119]=[Oe,Ri];function kf(e,n,t){const r=this;let i,o;return l;function l(c){return!hn(c)||!Ni.call(r,r.previous)||Pn(r.events)?t(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(c))}function a(c){return hn(c)?(e.consume(c),a):c===64?(e.consume(c),s):t(c)}function s(c){return c===46?e.check(gf,f,u)(c):c===45||c===95||de(c)?(o=!0,e.consume(c),s):f(c)}function u(c){return e.consume(c),i=!0,s}function f(c){return o&&i&&we(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(c)):t(c)}}function xf(e,n,t){const r=this;return i;function i(l){return l!==87&&l!==119||!_i.call(r,r.previous)||Pn(r.events)?t(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(df,e.attempt(zi,e.attempt(Pi,o),t),t)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(l)}}function bf(e,n,t){const r=this;let i="",o=!1;return l;function l(c){return(c===72||c===104)&&Mi.call(r,r.previous)&&!Pn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),a):t(c)}function a(c){if(we(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),a;if(c===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(c),s}return t(c)}function s(c){return c===47?(e.consume(c),o?u:(o=!0,s)):t(c)}function u(c){return c===null||St(c)||le(c)||Qe(c)||At(c)?t(c):e.attempt(zi,e.attempt(Pi,f),t)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(c)}}function wf(e,n,t){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),o):t(l)}function o(l){return l===null?t(l):n(l)}}function Sf(e,n,t){let r,i,o;return l;function l(u){return u===46||u===95?e.check(Li,s,a)(u):u===null||le(u)||Qe(u)||u!==45&&At(u)?s(u):(o=!0,e.consume(u),l)}function a(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),l}function s(u){return i||r||!o?t(u):n(u)}}function Cf(e,n){let t=0,r=0;return i;function i(l){return l===40?(t++,e.consume(l),i):l===41&&r<t?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(Li,n,o)(l):l===null||le(l)||Qe(l)?n(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function If(e,n,t){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),i):a===60||a===null||le(a)||Qe(a)?n(a):t(a)}function i(a){return a===null||a===40||a===91||le(a)||Qe(a)?n(a):r(a)}function o(a){return we(a)?l(a):t(a)}function l(a){return a===59?(e.consume(a),r):we(a)?(e.consume(a),l):t(a)}}function Ef(e,n,t){return r;function r(o){return e.consume(o),i}function i(o){return de(o)?t(o):n(o)}}function _i(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||le(e)}function Mi(e){return!we(e)}function Ni(e){return!(e===47||hn(e))}function hn(e){return e===43||e===45||e===46||e===95||de(e)}function Pn(e){let n=e.length,t=!1;for(;n--;){const r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const Tf={tokenize:Ff,partial:!0};function Af(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Pf,continuation:{tokenize:Lf},exit:Rf}},text:{91:{name:"gfmFootnoteCall",tokenize:zf},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:vf,resolveTo:Df}}}}function vf(e,n,t){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const s=r.events[i][1];if(s.type==="labelImage"){l=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return a;function a(s){if(!l||!l._balanced)return t(s);const u=Re(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?t(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),n(s))}}function Df(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",i,n],["exit",i,n],["enter",o,n],["enter",l,n],["exit",l,n],["exit",o,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...a),e}function zf(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return a;function a(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),s}function s(c){return c!==94?t(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(o>999||c===93&&!l||c===null||c===91||le(c))return t(c);if(c===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(Re(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(c)}return le(c)||(l=!0),o++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),o++,u):u(c)}}function Pf(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,a;return s;function s(d){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(d){return d===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):t(d)}function f(d){if(l>999||d===93&&!a||d===null||d===91||le(d))return t(d);if(d===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return o=Re(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return le(d)||(a=!0),l++,e.consume(d),d===92?c:f}function c(d){return d===91||d===92||d===93?(e.consume(d),l++,f):f(d)}function p(d){return d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),i.includes(o)||i.push(o),X(e,h,"gfmFootnoteDefinitionWhitespace")):t(d)}function h(d){return n(d)}}function Lf(e,n,t){return e.check(ht,n,e.attempt(Tf,n,t))}function Rf(e){e.exit("gfmFootnoteDefinition")}function Ff(e,n,t){const r=this;return X(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?n(o):t(o)}}function _f(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,a){let s=-1;for(;++s<l.length;)if(l[s][0]==="enter"&&l[s][1].type==="strikethroughSequenceTemporary"&&l[s][1]._close){let u=s;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[s][1].end.offset-l[s][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[s][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[s][1].end)},c={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[s][1].start)},p=[["enter",f,a],["enter",l[u][1],a],["exit",l[u][1],a],["enter",c,a]],h=a.parser.constructs.insideSpan.null;h&&ze(p,p.length,0,vt(h,l.slice(u+1,s),a)),ze(p,p.length,0,[["exit",c,a],["enter",l[s][1],a],["exit",l[s][1],a],["exit",f,a]]),ze(l,u-1,s-u+3,p),s=u+p.length-2;break}}for(s=-1;++s<l.length;)l[s][1].type==="strikethroughSequenceTemporary"&&(l[s][1].type="data");return l}function o(l,a,s){const u=this.previous,f=this.events;let c=0;return p;function p(d){return u===126&&f[f.length-1][1].type!=="characterEscape"?s(d):(l.enter("strikethroughSequenceTemporary"),h(d))}function h(d){const x=et(u);if(d===126)return c>1?s(d):(l.consume(d),c++,h);if(c<2&&!t)return s(d);const T=l.exit("strikethroughSequenceTemporary"),y=et(d);return T._open=!y||y===2&&!!x,T._close=!x||x===2&&!!y,a(d)}}}class Mf{constructor(){this.map=[]}add(n,t,r){Nf(this,n,t,r)}consume(n){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let i=r.pop();for(;i;){for(const o of i)n.push(o);i=r.pop()}this.map.length=0}}function Nf(e,n,t,r){let i=0;if(!(t===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===n){e.map[i][1]+=t,e.map[i][2].push(...r);return}i+=1}e.map.push([n,t,r])}}function Of(e,n){let t=!1;const r=[];for(;n<e.length;){const i=e[n];if(t){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(t=!0);n+=1}return r}function jf(){return{flow:{null:{name:"table",tokenize:Bf,resolveAll:$f}}}}function Bf(e,n,t){const r=this;let i=0,o=0,l;return a;function a(k){let L=r.events.length-1;for(;L>-1;){const oe=r.events[L][1].type;if(oe==="lineEnding"||oe==="linePrefix")L--;else break}const F=L>-1?r.events[L][1].type:null,ee=F==="tableHead"||F==="tableRow"?b:s;return ee===b&&r.parser.lazy[r.now().line]?t(k):ee(k)}function s(k){return e.enter("tableHead"),e.enter("tableRow"),u(k)}function u(k){return k===124||(l=!0,o+=1),f(k)}function f(k){return k===null?t(k):M(k)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),h):t(k):W(k)?X(e,f,"whitespace")(k):(o+=1,l&&(l=!1,i+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),c(k)))}function c(k){return k===null||k===124||le(k)?(e.exit("data"),f(k)):(e.consume(k),k===92?p:c)}function p(k){return k===92||k===124?(e.consume(k),c):c(k)}function h(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(k):(e.enter("tableDelimiterRow"),l=!1,W(k)?X(e,d,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):d(k))}function d(k){return k===45||k===58?T(k):k===124?(l=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),x):j(k)}function x(k){return W(k)?X(e,T,"whitespace")(k):T(k)}function T(k){return k===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),y):k===45?(o+=1,y(k)):k===null||M(k)?O(k):j(k)}function y(k){return k===45?(e.enter("tableDelimiterFiller"),I(k)):j(k)}function I(k){return k===45?(e.consume(k),I):k===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(k))}function C(k){return W(k)?X(e,O,"whitespace")(k):O(k)}function O(k){return k===124?d(k):k===null||M(k)?!l||i!==o?j(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(k)):j(k)}function j(k){return t(k)}function b(k){return e.enter("tableRow"),Y(k)}function Y(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),Y):k===null||M(k)?(e.exit("tableRow"),n(k)):W(k)?X(e,Y,"whitespace")(k):(e.enter("data"),J(k))}function J(k){return k===null||k===124||le(k)?(e.exit("data"),Y(k)):(e.consume(k),k===92?Z:J)}function Z(k){return k===92||k===124?(e.consume(k),J):J(k)}}function $f(e,n){let t=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],a=!1,s=0,u,f,c;const p=new Mf;for(;++t<e.length;){const h=e[t],d=h[1];h[0]==="enter"?d.type==="tableHead"?(a=!1,s!==0&&(Dr(p,n,s,u,f),f=void 0,s=0),u={type:"table",start:Object.assign({},d.start),end:Object.assign({},d.end)},p.add(t,0,[["enter",u,n]])):d.type==="tableRow"||d.type==="tableDelimiterRow"?(r=!0,c=void 0,o=[0,0,0,0],l=[0,t+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},d.start),end:Object.assign({},d.end)},p.add(t,0,[["enter",f,n]])),i=d.type==="tableDelimiterRow"?2:f?3:1):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],c=kt(p,n,o,i,void 0,c),o=[0,0,0,0]),l[2]=t)):d.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],c=kt(p,n,o,i,void 0,c)),o=l,l=[o[1],t,0,0])):d.type==="tableHead"?(a=!0,s=t):d.type==="tableRow"||d.type==="tableDelimiterRow"?(s=t,o[1]!==0?(l[0]=l[1],c=kt(p,n,o,i,t,c)):l[1]!==0&&(c=kt(p,n,l,i,t,c)),i=0):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")&&(l[3]=t)}for(s!==0&&Dr(p,n,s,u,f),p.consume(n.events),t=-1;++t<n.events.length;){const h=n.events[t];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=Of(n.events,t))}return e}function kt(e,n,t,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";t[0]!==0&&(o.end=Object.assign({},Ze(n.events,t[0])),e.add(t[0],0,[["exit",o,n]]));const s=Ze(n.events,t[1]);if(o={type:l,start:Object.assign({},s),end:Object.assign({},s)},e.add(t[1],0,[["enter",o,n]]),t[2]!==0){const u=Ze(n.events,t[2]),f=Ze(n.events,t[3]),c={type:a,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(t[2],0,[["enter",c,n]]),r!==2){const p=n.events[t[2]],h=n.events[t[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",t[3]>t[2]+1){const d=t[2]+1,x=t[3]-t[2]-1;e.add(d,x,[])}}e.add(t[3]+1,0,[["exit",c,n]])}return i!==void 0&&(o.end=Object.assign({},Ze(n.events,i)),e.add(i,0,[["exit",o,n]]),o=void 0),o}function Dr(e,n,t,r,i){const o=[],l=Ze(n.events,t);i&&(i.end=Object.assign({},l),o.push(["exit",i,n])),r.end=Object.assign({},l),o.push(["exit",r,n]),e.add(t+1,0,o)}function Ze(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const Hf={name:"tasklistCheck",tokenize:Vf};function Uf(){return{text:{91:Hf}}}function Vf(e,n,t){const r=this;return i;function i(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),o)}function o(s){return le(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),l):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),l):t(s)}function l(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):t(s)}function a(s){return M(s)?n(s):W(s)?e.check({tokenize:qf},n,t)(s):t(s)}}function qf(e,n,t){return X(e,r,"whitespace");function r(i){return i===null?t(i):n(i)}}function Wf(e){return Wr([yf(),Af(),_f(e),jf(),Uf()])}const Yf={};function Qf(e){const n=this,t=e||Yf,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Wf(t)),o.push(pf()),l.push(mf(t))}function Xf({message:e,pinned:n,onCopy:t,onDelete:r,onTogglePin:i,onRegenerate:o}){const l=(e.role||"assistant").toLowerCase(),a=e.ts?ji(e.ts):"",s=e.content||e.message||"",u=l==="user";return E.jsxs("article",{className:`chat-message ${u?"chat-message-user":"chat-message-assistant"} ${n?"chat-message-pinned":""}`,children:[E.jsxs("header",{className:"chat-message-meta",children:[E.jsx("span",{className:"chat-message-role",children:l}),e.agent&&E.jsxs("span",{className:"chat-message-agent",children:["@",e.agent]}),a&&E.jsx("time",{className:"chat-message-time",children:a}),n&&E.jsx("span",{className:"chat-message-pin",children:"pinned"}),E.jsxs("div",{className:"chat-message-actions",children:[E.jsx("button",{type:"button",className:"chat-msg-action-btn",onClick:t,title:"Copy","aria-label":"Copy",children:E.jsx(Gi,{size:12})}),!u&&E.jsx("button",{type:"button",className:"chat-msg-action-btn",onClick:o,title:"Regenerate","aria-label":"Regenerate",children:E.jsx(Bi,{size:12})}),E.jsx("button",{type:"button",className:"chat-msg-action-btn",onClick:i,title:"Pin","aria-label":"Pin",children:E.jsx(Zi,{size:12})}),E.jsx("button",{type:"button",className:"chat-msg-action-btn chat-msg-action-btn-danger",onClick:r,title:"Delete","aria-label":"Delete",children:E.jsx($i,{size:12})})]})]}),E.jsx("div",{className:"chat-message-content markdown-body",children:E.jsx(Fu,{remarkPlugins:[Qf],children:s})})]})}function Gf({items:e,renderItem:n,itemHeight:t=80,height:r=400,overscan:i=5,className:o}){const[l,a]=P.useState(0),s=P.useRef(null),u=P.useMemo(()=>{const h=Math.max(0,Math.floor(l/t)-i),d=Math.min(e.length,Math.ceil((l+r)/t)+i);return{start:h,end:d}},[l,t,r,i,e.length]),f=e.length*t,c=u.start*t,p=e.slice(u.start,u.end);return E.jsx("div",{ref:s,onScroll:h=>a(h.currentTarget.scrollTop),style:{height:r,overflowY:"auto"},className:o,children:E.jsx("div",{style:{height:f,position:"relative"},children:E.jsx("div",{style:{transform:`translateY(${c}px)`},children:p.map((h,d)=>E.jsx("div",{style:{height:t},children:n(h,u.start+d)},u.start+d))})})})}function rh({messages:e,loading:n,activeProject:t,sessionId:r,pinned:i,activeSource:o,onPickSuggestion:l,onCopy:a,onDelete:s,onTogglePin:u,onRegenerate:f}){const c=P.useRef(null);P.useEffect(()=>{const h=c.current;if(!h)return;let d=h.parentElement,x=!1;for(;d;){if(d.classList.contains("chat-thread-scroll")){x=!0;break}d=d.parentElement}x||(h.scrollTop=h.scrollHeight)},[e]);const p=o==="cline"?"cline":"bizar";return n?E.jsx("div",{className:"chat-thread legacy",ref:c,"data-stream":p,children:E.jsx(el,{count:3})}):t?e.length===0?E.jsx("div",{className:"chat-thread legacy",ref:c,"data-stream":p,children:E.jsx(Fn,{variant:"empty",projectName:t.name,onPickSuggestion:l})}):E.jsx("div",{className:"chat-thread legacy",ref:c,children:E.jsx(Gf,{items:e,itemHeight:120,height:800,className:"chat-thread-virtual",renderItem:(h,d)=>E.jsx(Xf,{message:h,pinned:i.has(d),onCopy:()=>a(h),onDelete:()=>s(d),onTogglePin:()=>u(d),onRegenerate:()=>f(String(h.ts??d))})})}):E.jsx("div",{className:"chat-thread legacy",ref:c,"data-stream":p,children:E.jsx(Fn,{variant:"no-project",projectName:"",onPickSuggestion:l})})}function Kf({agent:e,setAgent:n,agents:t}){const[r,i]=P.useState(!1),o=P.useRef(null);P.useEffect(()=>{if(!r)return;const s=u=>{o.current&&!o.current.contains(u.target)&&i(!1)};return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[r]);const l=e||"no agent",a=l.startsWith("@")?l.slice(1):l;return E.jsxs("div",{className:"chat-agent-chip",ref:o,children:[E.jsxs("button",{type:"button",className:"chat-agent-chip-btn",onClick:()=>i(s=>!s),"aria-haspopup":"listbox","aria-expanded":r,children:[E.jsx(Hi,{size:14}),E.jsx("span",{children:a}),E.jsx(Pr,{size:12,className:r?"rotated":""})]}),r&&E.jsxs("div",{className:"chat-agent-chip-menu",role:"listbox",children:[E.jsx("button",{type:"button",role:"option","aria-selected":!e,onClick:()=>{n(""),i(!1)},children:E.jsx("span",{children:"no agent"})}),t.map(s=>E.jsx("button",{type:"button",role:"option","aria-selected":e===s.name,onClick:()=>{n(s.name),i(!1)},children:E.jsxs("span",{children:["@",s.name]})},s.name))]})]})}function Jf(e,n,t=240){P.useLayoutEffect(()=>{const r=e.current;if(!r)return;r.style.height="auto";const i=Math.min(r.scrollHeight,t);r.style.height=`${i}px`,r.style.overflowY=r.scrollHeight>t?"auto":"hidden"},[e,n,t])}function ih({agent:e,setAgent:n,model:t,setModel:r,text:i,setText:o,sending:l,onSend:a,attachments:s,setAttachments:u,suggestions:f,onPickSuggestion:c,agents:p,onAttach:h}){const d=P.useRef(null),x=P.useRef(null);Jf(d,i,160);const T=I=>{if(I.key==="Enter"&&(I.metaKey||I.ctrlKey))I.preventDefault(),a();else if(I.key==="Enter"&&!I.shiftKey)I.preventDefault(),a();else if(I.key==="Tab"&&f.length){I.preventDefault();const C=f[0].cmd.split(" ")[0];o(`${C} `)}},y=I=>{const C=I.target.files;if(!C)return;const O=[];for(let j=0;j<C.length;j++)O.push(C[j].name);u(j=>[...j,...O]),I.target.value=""};return E.jsxs("div",{className:"chat-composer",children:[f.length>0&&E.jsx("div",{className:"chat-composer-suggestions",children:f.map(I=>E.jsxs("button",{type:"button",className:"chat-composer-suggestion",onClick:()=>{var O;const C=I.cmd.split(" ")[0];o(`${C} `),(O=d.current)==null||O.focus()},children:[E.jsx("span",{className:"mono",children:I.cmd}),E.jsx("span",{children:I.desc})]},I.cmd))}),s.length>0&&E.jsx("div",{className:"chat-composer-attachments",children:s.map((I,C)=>E.jsxs("span",{className:"chat-composer-attachment-tag",children:[E.jsx(Rn,{size:10})," ",I,E.jsx("button",{type:"button",className:"chat-composer-attachment-remove",onClick:()=>u(O=>O.filter((j,b)=>b!==C)),"aria-label":`Remove ${I}`,children:E.jsx(Ui,{size:10})})]},C))}),E.jsxs("div",{className:"chat-composer-input",children:[E.jsx(Kf,{agent:e,setAgent:n,agents:p}),E.jsx("textarea",{ref:d,className:"chat-composer-textarea",placeholder:l?"Sending…":"Send a message…",rows:1,value:i,onChange:I=>o(I.target.value),onKeyDown:T,disabled:l,"aria-label":"Message"}),E.jsx("input",{ref:x,type:"file",multiple:!0,style:{display:"none"},onChange:y,"aria-label":"Attach files",tabIndex:-1}),E.jsx("button",{type:"button",className:"chat-attach-btn",onClick:h,title:"Attach files","aria-label":"Attach files",children:E.jsx(Rn,{size:14})}),E.jsx("button",{type:"button",className:"chat-attach-btn",onClick:async()=>{if(!i.trim())return;const I=await qi(i);I!==i&&o(I)},title:"Enhance prompt with AI","aria-label":"Enhance prompt",children:E.jsx(Vi,{size:14})}),E.jsx("button",{type:"button",className:"chat-send-btn",onClick:a,disabled:l||!i.trim(),title:"Send (Enter)","aria-label":"Send message",children:E.jsx(Wi,{size:16})})]})]})}function lh(e,n,t){const[r,i]=P.useState([]),[o,l]=P.useState([]),[a,s]=P.useState(""),[u,f]=P.useState(!0),[c,p]=P.useState({create:!1,send:!1,rename:!1,delete:!1}),[h,d]=P.useState([]),[x,T]=P.useState([]),[y,I]=P.useState(null),[C,O]=P.useState(null),[j,b]=P.useState(null),[Y,J]=P.useState(null),[Z,k]=P.useState(null),[L,F]=P.useState({}),[ee,oe]=P.useState(!0),[Q,ce]=P.useState(0),[he,Se]=P.useState(new Set),[Le,g]=P.useState(new Set),pe=P.useRef(null),G=P.useRef(null),m=P.useRef(null),me=P.useRef(0),ae=P.useRef(null),se=P.useRef(null),Te=P.useRef(!1),ye=P.useCallback(S=>{S&&T(z=>{if(S.id&&z.some(R=>R.id===S.id))return z;const D=z.findIndex(R=>typeof R.id=="string"&&R.id.startsWith("msg_")&&R.role===S.role&&(R.content||"")===(S.content||""));if(D>=0){const R=z.slice();return R[D]={...S,id:S.id??z[D].id},R}return[...z,S]})},[]),Ae=P.useCallback(S=>{S&&Se(z=>{if(z.has(S))return z;const D=new Set(z);return D.add(S),D})},[]),ke=P.useCallback((S,z)=>{F(D=>{const R=D[S]??{state:"idle",unread:0,pinned:!1};return{...D,[S]:{...R,...z}}})},[]),xe=P.useCallback((S,z)=>{ke(S,{state:z?"streaming":"idle"})},[ke]),Lt=P.useCallback(S=>{G.current=S},[]),Fe=P.useCallback(async S=>{var z;try{const D=S?`/chat?session=${encodeURIComponent(S)}`:"/chat?limit=200",R=await be.get(D);i(R.messages||[]),l(R.sessions||[])}catch(D){(z=G.current)==null||z.error(`Chat load failed: ${D.message}`)}finally{f(!1)}},[]),Ke=P.useCallback(async S=>{var z;f(!0);try{const D=await be.get(`/tasks/${encodeURIComponent(S)}/chat`);i(D.messages||[]),s(D.sessionId||S)}catch(D){(z=G.current)==null||z.error(`Task chat load failed: ${D.message}`)}finally{f(!1)}},[]),Je=P.useCallback(async()=>{try{const S=await be.get("/chat/sessions");l(S.sessions||[])}catch{}},[]),$e=P.useCallback(async()=>{try{const z=((await be.get("/claude-sessions")).sessions||[]).map(D=>({...D,source:"cline",title:D.title||D.id}));d(z)}catch{}},[]),rt=P.useCallback(S=>{if(m.current){try{m.current.close()}catch{}m.current=null}ae.current!==null&&(clearTimeout(ae.current),ae.current=null);const z=be.getToken(),D=z?`/api/claude-sessions/${encodeURIComponent(S)}/stream?token=${encodeURIComponent(z)}`:`/api/claude-sessions/${encodeURIComponent(S)}/stream`;se.current=S,Te.current=!0,me.current=0,b(null),J(null),k(null);const R=()=>{if(!Te.current||se.current!==S)return;const _=new EventSource(D);m.current=_;const N=$=>{var ue,Ce,ve,Ne;if(!$||!$.type||$.sessionID&&$.sessionID!==S)return;const q=new Date().toISOString(),re=S;if($.type==="message.user.created"||$.type==="message.user.updated"){const U=$.data;ye({id:(U==null?void 0:U.messageID)??$.messageID,role:"user",content:((ue=U==null?void 0:U.data)==null?void 0:ue.content)??"",ts:q}),Ae((U==null?void 0:U.messageID)??$.messageID);return}if($.type==="message.assistant.created"||$.type==="message.assistant.updated"){const U=$.data;ye({id:(U==null?void 0:U.messageID)??$.messageID,role:"assistant",content:((Ce=U==null?void 0:U.data)==null?void 0:Ce.content)??"",ts:q}),Ae((U==null?void 0:U.messageID)??$.messageID),xe(re,!0);return}if($.type==="message.part.updated"){const U=$.data,Ln=((ve=U==null?void 0:U.part)==null?void 0:ve.text)??"";if(!Ln)return;ye({id:(U==null?void 0:U.id)??(U==null?void 0:U.messageID)??$.messageID,role:"assistant",content:Ln,ts:q}),Ae((U==null?void 0:U.id)??(U==null?void 0:U.messageID)??$.messageID),xe(re,!0);return}if($.type==="session.idle"||$.type==="message.assistant.completed"||$.type==="session.completed"){xe(re,!1);return}if($.type==="session.awaiting"||$.type==="session.awaiting_input"||$.type==="message.assistant.awaiting"){ke(re,{state:"awaiting"});return}if($.type==="session.error"){b(((Ne=$.data)==null?void 0:Ne.message)||"cline session error");return}},te=$=>{if(!$)return null;try{const q=JSON.parse($);if(typeof q.type=="string"){const re=q.properties,ue=q.data??re,Ce=typeof q.sessionID=="string"?q.sessionID:typeof(re==null?void 0:re.sessionID)=="string"?re.sessionID:typeof(ue==null?void 0:ue.sessionID)=="string"?ue.sessionID:void 0,ve=typeof q.messageID=="string"?q.messageID:typeof(re==null?void 0:re.messageID)=="string"?re.messageID:typeof(ue==null?void 0:ue.messageID)=="string"?ue.messageID:void 0;let Ne=q.type;const U=/\.\d+$/.exec(Ne);return U&&(Ne=Ne.slice(0,U.index)),{type:Ne,sessionID:Ce,messageID:ve,data:q}}if(q.type==="sync"&&q.syncEvent&&typeof q.syncEvent=="object"){const re=q.syncEvent;let ue=re.type||"";const Ce=/\.\d+$/.exec(ue);Ce&&(ue=ue.slice(0,Ce.index));const ve=re.data||{};return{type:ue,sessionID:typeof ve.sessionID=="string"?ve.sessionID:void 0,messageID:typeof ve.messageID=="string"?ve.messageID:void 0,data:re}}return null}catch{return null}},K=["message.user.created","message.user.updated","message.assistant.created","message.assistant.updated","message.part.updated","session.idle","message.assistant.completed","session.completed","session.awaiting","session.awaiting_input","message.assistant.awaiting","session.error"];for(const $ of K)_.addEventListener($,q=>{N(te(q.data))});_.onerror=()=>{if(se.current!==S)return;if(!Te.current){try{_.close()}catch{}m.current=null;return}try{_.close()}catch{}m.current=null;const $=me.current+1;me.current=$;const q=Math.min(3e4,1e3*2**($-1));ae.current!==null&&clearTimeout(ae.current),ae.current=window.setTimeout(()=>{ae.current=null,Te.current&&se.current===S&&R()},q)},_.onopen=()=>{me.current=0,b(null),J(null),k(null)}};R()},[ye,Ae,xe,ke]),He=P.useCallback(()=>{if(Te.current=!1,se.current=null,ae.current!==null&&(clearTimeout(ae.current),ae.current=null),m.current){try{m.current.close()}catch{}m.current=null}T([]),Se(new Set),b(null),J(null),k(null),O(null),I("bizar")},[]),Ue=P.useCallback(async S=>{var z;if(Te.current=!1,m.current){try{m.current.close()}catch{}m.current=null}ae.current!==null&&(clearTimeout(ae.current),ae.current=null),b(null),J(null),k(null),f(!0);try{const D=await be.get(`/claude-sessions/${encodeURIComponent(S)}/messages`);T(D.messages||[])}catch(D){const R=D.message;let _=null;if(D instanceof Ot&&D.data&&typeof D.data=="object"){const N=D.data,te=N.error||"unknown",K=te!=="bad_request"&&te!=="too_many_subscribers"&&te!=="unauthorized";_={type:"session_load_failed",code:te,message:N.message||R,cause:N.cause,status:N.status,suggestion:N.suggestion??null,canRetry:K}}else D instanceof Ot&&(_={type:"session_load_failed",code:"unknown",message:R,suggestion:null,canRetry:!0});b(_?`Cline session load failed (${_.code}): ${_.message}`:`Cline session load failed: ${R}`),J((_==null?void 0:_.suggestion)??null),k(_),(z=G.current)==null||z.error(_?`Cline session load failed: ${_.message}`:`Cline session load failed: ${R}`),T([])}finally{f(!1)}O(S),I("cline"),xe(S,!1),rt(S)},[xe,rt]),mt=P.useCallback(S=>{He(),s(S),I("bizar"),Fe(S),ke(S,{unread:0})},[He,Fe,ke]),Rt=P.useCallback(async()=>{var z,D,R,_,N;if(c.create)return{ok:!1};const S=n.defaultAgent||"odin";p(te=>({...te,create:!0}));try{try{const K=await be.post("/claude-sessions/new",{agent:S});return await $e(),await Ue(K.id),(z=G.current)==null||z.success(`Session ${K.id} created.`),{ok:!0,source:"cline",id:K.id}}catch(K){if(!(K instanceof Ot)||K.status!==503)return(D=G.current)==null||D.error(`Create failed: ${K.message}`),{ok:!1}}if(!e.activeProject)return(R=G.current)==null||R.error("Pick a project in Overview to scope chat sessions."),{ok:!1};const te=await be.post("/chat/sessions",{});return s(te.id),i([]),g(new Set),ke(te.id,{state:"idle",unread:0}),await Fe(te.id),Je().catch(()=>{}),(_=G.current)==null||_.success(`Session ${te.id} created.`),{ok:!0,source:"bizar",id:te.id}}catch(te){return(N=G.current)==null||N.error(`Create failed: ${te.message}`),{ok:!1}}finally{p(te=>({...te,create:!1}))}},[c.create,n.defaultAgent,e.activeProject,$e,Ue,Fe,Je,ke]),Ft=P.useCallback(async(S,z,D,R)=>{var te,K,$;if(c.send)return{ok:!1};const _=S.trim();if(!_)return{ok:!1};if(y==="cline"&&C){const q=C,re=`msg_${Date.now().toString(36)}${Math.random().toString(36).slice(2,8)}`,ue={id:re,role:"user",content:_,agent:z,ts:new Date().toISOString()};ye(ue),Ae(re),p(Ce=>({...Ce,send:!0}));try{return await be.post(`/claude-sessions/${encodeURIComponent(q)}/send`,{message:_,agent:z}),xe(q,!0),{ok:!0}}catch(Ce){return T(ve=>ve.filter(Ne=>Ne.id!==re)),(te=G.current)==null||te.error(`Send failed: ${Ce.message}`),{ok:!1}}finally{p(Ce=>({...Ce,send:!1}))}}const N={role:"user",content:_,agent:z,ts:new Date().toISOString()};i(q=>[...q,N]),p(q=>({...q,send:!0})),xe(a,!0);try{const q=await be.post("/chat",{message:_,agent:z,model:D,attachments:R||[]});if(q!=null&&q.messages)for(const re of q.messages)re.role==="assistant"&&i(ue=>ue.some(ve=>ve.ts===re.ts)?ue:[...ue,re]);else(K=G.current)==null||K.info("Still processing… the response will appear shortly.");return{ok:!0}}catch(q){return i(re=>re.filter(ue=>ue!==N)),($=G.current)==null||$.error(`Send failed: ${q.message}`),{ok:!1}}finally{p(q=>({...q,send:!1})),xe(a,!1)}},[y,C,ye,Ae,xe,a,c.send]),_t=P.useCallback(async S=>{var z,D;if(!a){(z=G.current)==null||z.error("No active session to regenerate.");return}try{await be.post("/chat/regenerate",{sessionId:a,messageId:S}),await Fe(a)}catch(R){(D=G.current)==null||D.error(`Regenerate failed: ${R.message}`)}},[a,Fe]),Mt=P.useCallback(S=>{y==="cline"?T(z=>z.filter((D,R)=>R!==S)):i(z=>z.filter((D,R)=>R!==S))},[y]),Nt=P.useCallback(S=>{g(z=>{const D=new Set(z);return D.has(S)?D.delete(S):D.add(S),D})},[]),w=P.useCallback(S=>{var D,R;const z=S.content||S.message||"";try{(D=navigator.clipboard)==null||D.writeText(z).then(()=>{var _;return(_=G.current)==null?void 0:_.success("Copied.")},()=>{var _;return(_=G.current)==null?void 0:_.error("Copy failed.")})}catch{(R=G.current)==null||R.error("Copy failed.")}},[]),v=P.useCallback(()=>{const S=pe.current;if(!S)return;const D=S.scrollHeight-S.scrollTop-S.clientHeight<32;oe(D),D&&ce(0)},[]),B=P.useCallback(()=>{const S=pe.current;S&&(S.scrollTop=S.scrollHeight,oe(!0),ce(0))},[]),V=P.useCallback(async(S,z)=>{var D,R,_;if(c.rename)return!1;p(N=>({...N,rename:!0}));try{const N=z.trim();return N?(h.some(K=>K.id===S)?(await be.patch(`/claude-sessions/${encodeURIComponent(S)}`,{title:N}),d(K=>K.map($=>$.id===S?{...$,title:N}:$))):(await be.post(`/chat/sessions/${encodeURIComponent(S)}/rename`,{title:N}),l(K=>K.map($=>$.id===S?{...$,title:N}:$))),(R=G.current)==null||R.success("Renamed."),!0):((D=G.current)==null||D.error("Title cannot be empty."),!1)}catch(N){return(_=G.current)==null||_.error(`Rename failed: ${N.message}`),!1}finally{p(N=>({...N,rename:!1}))}},[c.rename,h]),ne=P.useCallback(async S=>{var z,D;if(c.delete)return!1;p(R=>({...R,delete:!0}));try{return h.some(_=>_.id===S)?(await be.del(`/claude-sessions/${encodeURIComponent(S)}`),d(_=>_.filter(N=>N.id!==S)),C===S&&He()):(await be.del(`/chat/sessions/${encodeURIComponent(S)}`),l(_=>_.filter(N=>N.id!==S)),a===S&&(s(""),i([]))),F(_=>{const N={..._};return delete N[S],N}),(z=G.current)==null||z.success("Session deleted."),!0}catch(R){return(D=G.current)==null||D.error(`Delete failed: ${R.message}`),!1}finally{p(R=>({...R,delete:!1}))}},[c.delete,h,C,He,a]);return P.useEffect(()=>{pe.current&&(ee?pe.current.scrollTop=pe.current.scrollHeight:ce(S=>S+1))},[r,x]),P.useEffect(()=>()=>{if(Te.current=!1,se.current=null,ae.current!==null&&(clearTimeout(ae.current),ae.current=null),m.current){try{m.current.close()}catch{}m.current=null}},[]),P.useEffect(()=>{t?Ke(t):Fe(),$e()},[]),P.useEffect(()=>{const S=z=>{var R;const D=(R=z.detail)==null?void 0:R.taskId;D&&Ke(D)};return window.addEventListener("bizar:setChatTask",S),()=>window.removeEventListener("bizar:setChatTask",S)},[Ke]),P.useEffect(()=>{let S=!1;return Yi(async()=>{const{Ws:z}=await import("./mobile-layout-GZ3bE8L6.js").then(D=>D.U);return{Ws:z}},__vite__mapDeps([0,1])).then(({Ws:z})=>{if(S)return;new z().on(R=>{if(R.type!=="chat:message")return;const _=R.message;_&&i(N=>N.some(K=>K.ts===_.ts)?N:[...N,_])})}),()=>{S=!0}},[]),{messages:y==="cline"?x:r,bizarMessages:r,clineMessages:x,sessions:o,clineSessions:h,sessionId:a,setSessionId:s,loading:u,sending:c.send,pinned:Le,listRef:pe,activeSource:y,activeClineSessionId:C,clineError:j,clineSuggestion:Y,clineErrorInfo:Z,retryClineSession:()=>{C&&Ue(C)},sessionStates:L,busy:c,getSessionDisplay:S=>{var z,D,R,_;return{...S,state:((z=L[S.id])==null?void 0:z.state)??"idle",unread:((D=L[S.id])==null?void 0:D.unread)??0,pinned:((R=L[S.id])==null?void 0:R.pinned)??!1,tree:(_=L[S.id])==null?void 0:_.tree}},stickToBottom:ee,newMessageCount:Q,handleScroll:v,jumpToLatest:B,setToast:Lt,loadChat:Fe,loadTaskChat:Ke,refreshSessions:Je,refreshClineSessions:$e,loadClineSession:Ue,closeClineSession:He,selectBizarSession:mt,onCreateSession:Rt,onSend:Ft,onRegenerate:_t,deleteMessage:Mt,togglePin:Nt,copyMessage:w,renameSession:V,deleteSession:ne,seenClineMessages:he}}const Zf=[{cmd:"/visual-plan [on|off|status]",desc:"Toggle or view visual plan mode"},{cmd:"/plan new <slug> [template]",desc:"Create a new plan"},{cmd:"/plan list",desc:"List all plans"},{cmd:"/plan open <slug>",desc:"Open a plan in the viewer"},{cmd:"/plan status <slug> <status>",desc:"Set plan status"},{cmd:"/plan get <slug>",desc:"Fetch plan canvas"},{cmd:"/plan add <slug> --title T --type kind",desc:"Add element to a plan"},{cmd:"/plan update <slug> <id>",desc:"Update a plan element"},{cmd:"/plan delete <slug> <id>",desc:"Delete a plan element"},{cmd:'/plan comment <slug> [id] "text"',desc:"Add a comment"},{cmd:"/plan comments <slug> [id]",desc:"Read plan comments"},{cmd:"/bizar",desc:"Launch Bizar dashboard"},{cmd:"/bizar <args>",desc:"Route via Bizar menu"},{cmd:"/audit",desc:"Run security audit"},{cmd:"/explain <q>",desc:"Read-only code Q&A"},{cmd:"/init",desc:"Initialize .bizar/ in this project"},{cmd:"/learn",desc:"Extract patterns from session"},{cmd:"/pr-review",desc:"PR review"},{cmd:"/help | /commands",desc:"Show all Bizar commands"}];function oh(e){const[n,t]=P.useState(""),r=P.useMemo(()=>[...Zf,...(e.mods||[]).flatMap(o=>{var l;return(l=o.entry)!=null&&l.command?[{cmd:`/${o.id}`,desc:o.description||o.name,mod:o.id}]:[]})],[e.mods]),i=P.useMemo(()=>{if(!n.startsWith("/")||n.includes(" "))return[];const o=n.toLowerCase();return r.filter(l=>l.cmd.toLowerCase().startsWith(o)).slice(0,6)},[n,r]);return{allCommands:r,suggestions:i,setQuery:t}}export{Qi as B,Gi as C,Fu as M,Gf as V,ih as a,oh as b,nh as c,rh as d,Qf as r,lh as u};