@waq666/pneuma 0.8.0 → 0.9.2

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 (2841) hide show
  1. package/README.md +97 -23
  2. package/bin/dsc.js +25 -2
  3. package/lib/adapter/transcript.d.ts +94 -1
  4. package/lib/adapter/transcript.js +410 -13
  5. package/lib/boot.js +6 -27
  6. package/lib/contract/approval.d.ts +41 -4
  7. package/lib/contract/fonts.d.ts +101 -0
  8. package/lib/contract/fonts.js +157 -0
  9. package/lib/contract/memory.d.ts +93 -0
  10. package/lib/contract/memory.js +12 -0
  11. package/lib/contract/plugin.d.ts +114 -5
  12. package/lib/contract/remote.d.ts +8 -0
  13. package/lib/contract/remote.js +8 -0
  14. package/lib/contract/runtime.d.ts +240 -11
  15. package/lib/contract/session.d.ts +77 -6
  16. package/lib/contract/settings.d.ts +143 -3
  17. package/lib/contract/snapshot.d.ts +27 -5
  18. package/lib/contract/task.d.ts +38 -2
  19. package/lib/contract/transcript.d.ts +209 -13
  20. package/lib/contract/transcript.js +47 -1
  21. package/lib/contract.d.ts +3 -1
  22. package/lib/contract.js +3 -1
  23. package/lib/core/bytes.d.ts +1 -1
  24. package/lib/core/bytes.js +2 -2
  25. package/lib/core/child-env.d.ts +31 -0
  26. package/lib/core/child-env.js +70 -0
  27. package/lib/core/command-intent.d.ts +121 -0
  28. package/lib/core/command-intent.js +380 -0
  29. package/lib/core/command-policy.js +10 -46
  30. package/lib/core/config-store.js +6 -1
  31. package/lib/core/config.d.ts +98 -0
  32. package/lib/core/config.js +286 -4
  33. package/lib/core/context-injection-report.d.ts +107 -0
  34. package/lib/core/context-injection-report.js +132 -0
  35. package/lib/core/dock-browser.d.ts +30 -1
  36. package/lib/core/dock-browser.js +2 -1
  37. package/lib/core/dock-ops.d.ts +4 -4
  38. package/lib/core/dock-ops.js +2 -2
  39. package/lib/core/dock-session.d.ts +1 -2
  40. package/lib/core/dsh-compat/resolve-hook.d.ts +29 -1
  41. package/lib/core/dsh-compat/resolve-hook.js +272 -15
  42. package/lib/core/dsh-compat/service-map.js +1 -1
  43. package/lib/core/events.d.ts +57 -4
  44. package/lib/core/executable.d.ts +38 -0
  45. package/lib/core/executable.js +115 -0
  46. package/lib/core/git-exec.d.ts +11 -2
  47. package/lib/core/git-exec.js +27 -3
  48. package/lib/core/git-info.d.ts +127 -15
  49. package/lib/core/git-info.js +307 -32
  50. package/lib/core/guard-session.d.ts +50 -0
  51. package/lib/core/guard-session.js +58 -0
  52. package/lib/core/host-browser-link.d.ts +1 -2
  53. package/lib/core/host-methods.d.ts +1 -1
  54. package/lib/core/host-methods.js +15 -1
  55. package/lib/core/http-debug.d.ts +43 -0
  56. package/lib/core/http-debug.js +65 -0
  57. package/lib/core/i18n-text.d.ts +39 -0
  58. package/lib/core/i18n-text.js +50 -0
  59. package/lib/core/i18n.d.ts +28 -0
  60. package/lib/core/i18n.js +109 -0
  61. package/lib/core/image-diet.d.ts +77 -22
  62. package/lib/core/image-diet.js +233 -9
  63. package/lib/core/llm.d.ts +85 -9
  64. package/lib/core/llm.js +152 -22
  65. package/lib/core/lockfile.d.ts +4 -5
  66. package/lib/core/lockfile.js +78 -16
  67. package/lib/core/log-config.d.ts +35 -0
  68. package/lib/core/log-config.js +71 -0
  69. package/lib/core/mention.d.ts +25 -15
  70. package/lib/core/mention.js +153 -32
  71. package/lib/core/migrate.d.ts +18 -0
  72. package/lib/core/native-bridge.d.ts +1 -1
  73. package/lib/core/native-bridge.js +1 -1
  74. package/lib/core/os-lock.d.ts +30 -0
  75. package/lib/core/os-lock.js +232 -0
  76. package/lib/core/path-policy.d.ts +13 -2
  77. package/lib/core/path-policy.js +30 -2
  78. package/lib/core/plugin-bundle.d.ts +90 -8
  79. package/lib/core/plugin-bundle.js +184 -22
  80. package/lib/core/plugin-loader.d.ts +238 -8
  81. package/lib/core/plugin-loader.js +1288 -152
  82. package/lib/core/plugin-locale.d.ts +42 -0
  83. package/lib/core/plugin-locale.js +132 -0
  84. package/lib/core/plugin-npm.d.ts +44 -0
  85. package/lib/core/plugin-npm.js +459 -0
  86. package/lib/core/plugin-patch.d.ts +17 -0
  87. package/lib/core/plugin-patch.js +23 -1
  88. package/lib/core/plugin-registry.d.ts +72 -13
  89. package/lib/core/plugin-registry.js +275 -76
  90. package/lib/core/plugin-watch.d.ts +128 -0
  91. package/lib/core/plugin-watch.js +880 -0
  92. package/lib/core/prefs.d.ts +7 -1
  93. package/lib/core/prefs.js +125 -33
  94. package/lib/core/profile-bootstrap.d.ts +5 -0
  95. package/lib/core/profile-bootstrap.js +33 -0
  96. package/lib/core/profile-dir.js +7 -3
  97. package/lib/core/records.d.ts +1 -1
  98. package/lib/core/records.js +1 -1
  99. package/lib/core/redact.d.ts +20 -0
  100. package/lib/core/redact.js +52 -0
  101. package/lib/core/repeat-reminder.d.ts +152 -0
  102. package/lib/core/repeat-reminder.js +175 -0
  103. package/lib/core/request-invariant.js +1 -1
  104. package/lib/core/schedule/runner.d.ts +18 -2
  105. package/lib/core/schedule/runner.js +50 -15
  106. package/lib/core/session.d.ts +240 -18
  107. package/lib/core/session.js +511 -26
  108. package/lib/core/shell-quote.d.ts +2 -2
  109. package/lib/core/shell-quote.js +2 -2
  110. package/lib/core/skills.d.ts +14 -0
  111. package/lib/core/skills.js +31 -0
  112. package/lib/core/team-board.d.ts +94 -10
  113. package/lib/core/team-board.js +226 -7
  114. package/lib/core/terminal-env.d.ts +18 -4
  115. package/lib/core/terminal-env.js +151 -15
  116. package/lib/core/todo-reminder-cadence.d.ts +86 -0
  117. package/lib/core/todo-reminder-cadence.js +76 -0
  118. package/lib/core/token-estimate.d.ts +1 -1
  119. package/lib/core/token-estimate.js +1 -1
  120. package/lib/core/tool-guards.d.ts +42 -0
  121. package/lib/core/tool-guards.js +43 -1
  122. package/lib/core/tools/command-runner.d.ts +11 -0
  123. package/lib/core/tools/fs-tools.js +6 -0
  124. package/lib/core/tools.d.ts +21 -4
  125. package/lib/core/transcript-text.d.ts +1 -1
  126. package/lib/core/transcript-text.js +1 -1
  127. package/lib/core/ui-boot-source.d.ts +3 -1
  128. package/lib/core/ui-boot-source.js +1 -1
  129. package/lib/core/ui-bundles.d.ts +13 -4
  130. package/lib/core/ui-bundles.js +122 -29
  131. package/lib/core/ui-graph-frames.d.ts +47 -0
  132. package/lib/core/ui-graph-frames.js +54 -0
  133. package/lib/core/ui-hmr.d.ts +1 -1
  134. package/lib/core/ui-manifest.d.ts +224 -0
  135. package/lib/core/ui-manifest.js +185 -0
  136. package/lib/core/ui-methods.d.ts +1 -1
  137. package/lib/core/ui-methods.js +60 -2
  138. package/lib/core/ui-server.d.ts +3 -2
  139. package/lib/core/ui-server.js +18 -18
  140. package/lib/core/usage-log.d.ts +58 -1
  141. package/lib/core/usage-log.js +140 -1
  142. package/lib/headless.js +4 -24
  143. package/lib/host/kernel.d.ts +7 -15
  144. package/lib/host/kernel.js +65 -434
  145. package/lib/host/launch.d.ts +20 -0
  146. package/lib/host/launch.js +48 -0
  147. package/lib/host/startup.d.ts +8 -0
  148. package/lib/host/startup.js +74 -0
  149. package/lib/node_modules/@pneuma/agent/cache-probe.d.ts +1 -0
  150. package/lib/node_modules/@pneuma/agent/cache-probe.js +1 -0
  151. package/lib/node_modules/@pneuma/agent/cordis.patch.yml +4 -0
  152. package/lib/node_modules/@pneuma/agent/index.d.ts +1 -0
  153. package/lib/node_modules/@pneuma/agent/index.js +1 -0
  154. package/lib/node_modules/@pneuma/agent/locale/en.json +4 -0
  155. package/lib/node_modules/@pneuma/agent/package.json +38 -0
  156. package/lib/node_modules/@pneuma/approval/approval.d.ts +1 -0
  157. package/lib/node_modules/@pneuma/approval/approval.js +1 -0
  158. package/lib/node_modules/@pneuma/approval/call-meaning.d.ts +1 -0
  159. package/lib/node_modules/@pneuma/approval/call-meaning.js +1 -0
  160. package/lib/node_modules/@pneuma/approval/cordis.patch.yml +4 -0
  161. package/lib/node_modules/@pneuma/approval/index.d.ts +1 -0
  162. package/lib/node_modules/@pneuma/approval/index.js +1 -0
  163. package/lib/node_modules/@pneuma/approval/locale/en.json +4 -0
  164. package/lib/node_modules/@pneuma/approval/package.json +38 -0
  165. package/lib/node_modules/@pneuma/approval-floor/approval-floor.d.ts +1 -0
  166. package/lib/node_modules/@pneuma/approval-floor/approval-floor.js +1 -0
  167. package/lib/node_modules/@pneuma/approval-floor/cordis.patch.yml +4 -0
  168. package/lib/node_modules/@pneuma/approval-floor/index.d.ts +1 -0
  169. package/lib/node_modules/@pneuma/approval-floor/index.js +1 -0
  170. package/lib/node_modules/@pneuma/approval-floor/locale/en.json +4 -0
  171. package/lib/node_modules/@pneuma/approval-floor/locale/ui.en.json +28 -0
  172. package/lib/node_modules/@pneuma/approval-floor/locale/ui.zh.json +28 -0
  173. package/lib/node_modules/@pneuma/approval-floor/package.json +40 -0
  174. package/lib/node_modules/@pneuma/ask/cordis.patch.yml +4 -0
  175. package/lib/node_modules/@pneuma/ask/index.d.ts +1 -0
  176. package/lib/node_modules/@pneuma/ask/index.js +1 -0
  177. package/lib/node_modules/@pneuma/ask/locale/en.json +4 -0
  178. package/lib/node_modules/@pneuma/ask/package.json +38 -0
  179. package/lib/node_modules/@pneuma/base/cordis.patch.yml +176 -0
  180. package/lib/node_modules/@pneuma/base/package.json +12 -0
  181. package/lib/node_modules/@pneuma/browser/cordis.patch.yml +5 -0
  182. package/lib/node_modules/@pneuma/browser/index.d.ts +1 -0
  183. package/lib/node_modules/@pneuma/browser/index.js +1 -0
  184. package/lib/node_modules/@pneuma/browser/locale/en.json +4 -0
  185. package/lib/node_modules/@pneuma/browser/locale/ui.en.json +61 -0
  186. package/lib/node_modules/@pneuma/browser/locale/ui.zh.json +61 -0
  187. package/lib/node_modules/@pneuma/browser/package.json +40 -0
  188. package/lib/node_modules/@pneuma/cdp/actions.d.ts +1 -0
  189. package/lib/node_modules/@pneuma/cdp/actions.js +1 -0
  190. package/lib/node_modules/@pneuma/cdp/cloud-metadata.d.ts +1 -0
  191. package/lib/node_modules/@pneuma/cdp/cloud-metadata.js +1 -0
  192. package/lib/node_modules/@pneuma/cdp/index.d.ts +1 -0
  193. package/lib/node_modules/@pneuma/cdp/index.js +1 -0
  194. package/lib/node_modules/@pneuma/cdp/launch.d.ts +1 -0
  195. package/lib/node_modules/@pneuma/cdp/launch.js +1 -0
  196. package/lib/node_modules/@pneuma/cdp/locale/en.json +4 -0
  197. package/lib/node_modules/@pneuma/cdp/package.json +40 -0
  198. package/lib/node_modules/@pneuma/cdp/report.d.ts +1 -0
  199. package/lib/node_modules/@pneuma/cdp/report.js +1 -0
  200. package/lib/node_modules/@pneuma/cdp/ring-buffer.d.ts +1 -0
  201. package/lib/node_modules/@pneuma/cdp/ring-buffer.js +1 -0
  202. package/lib/node_modules/@pneuma/cdp/snapshot.d.ts +1 -0
  203. package/lib/node_modules/@pneuma/cdp/snapshot.js +1 -0
  204. package/lib/node_modules/@pneuma/cdp/transport.d.ts +1 -0
  205. package/lib/node_modules/@pneuma/cdp/transport.js +1 -0
  206. package/lib/node_modules/@pneuma/checkpoint/cordis.patch.yml +4 -0
  207. package/lib/node_modules/@pneuma/checkpoint/index.d.ts +1 -0
  208. package/lib/node_modules/@pneuma/checkpoint/index.js +1 -0
  209. package/lib/node_modules/@pneuma/checkpoint/locale/en.json +4 -0
  210. package/lib/node_modules/@pneuma/checkpoint/locale/ui.en.json +15 -0
  211. package/lib/node_modules/@pneuma/checkpoint/locale/ui.zh.json +15 -0
  212. package/lib/node_modules/@pneuma/checkpoint/package.json +38 -0
  213. package/lib/node_modules/@pneuma/checkpoint/shadow.d.ts +1 -0
  214. package/lib/node_modules/@pneuma/checkpoint/shadow.js +1 -0
  215. package/lib/node_modules/@pneuma/cli/config-cli.d.ts +1 -0
  216. package/lib/node_modules/@pneuma/cli/config-cli.js +1 -0
  217. package/lib/node_modules/@pneuma/cli/index.d.ts +1 -0
  218. package/lib/node_modules/@pneuma/cli/index.js +1 -0
  219. package/lib/node_modules/@pneuma/cli/locale/en.json +4 -0
  220. package/lib/node_modules/@pneuma/cli/package.json +35 -0
  221. package/lib/node_modules/@pneuma/cli/plugin-cli.d.ts +1 -0
  222. package/lib/node_modules/@pneuma/cli/plugin-cli.js +1 -0
  223. package/lib/node_modules/@pneuma/cli/pnpm-builds.d.ts +1 -0
  224. package/lib/node_modules/@pneuma/cli/pnpm-builds.js +1 -0
  225. package/lib/node_modules/@pneuma/commands/cordis.patch.yml +4 -0
  226. package/lib/node_modules/@pneuma/commands/index.d.ts +1 -0
  227. package/lib/node_modules/@pneuma/commands/index.js +1 -0
  228. package/lib/node_modules/@pneuma/commands/locale/en.json +4 -0
  229. package/lib/node_modules/@pneuma/commands/package.json +38 -0
  230. package/lib/node_modules/@pneuma/commands/session-export.d.ts +1 -0
  231. package/lib/node_modules/@pneuma/commands/session-export.js +1 -0
  232. package/lib/node_modules/@pneuma/commands-core/commands-completion.d.ts +1 -0
  233. package/lib/node_modules/@pneuma/commands-core/commands-completion.js +1 -0
  234. package/lib/node_modules/@pneuma/commands-core/index.d.ts +1 -0
  235. package/lib/node_modules/@pneuma/commands-core/index.js +1 -0
  236. package/lib/node_modules/@pneuma/commands-core/locale/en.json +4 -0
  237. package/lib/node_modules/@pneuma/commands-core/package.json +34 -0
  238. package/lib/node_modules/@pneuma/compact/cordis.patch.yml +4 -0
  239. package/lib/node_modules/@pneuma/compact/index.d.ts +1 -0
  240. package/lib/node_modules/@pneuma/compact/index.js +1 -0
  241. package/lib/node_modules/@pneuma/compact/locale/en.json +4 -0
  242. package/lib/node_modules/@pneuma/compact/locale/ui.en.json +24 -0
  243. package/lib/node_modules/@pneuma/compact/locale/ui.zh.json +24 -0
  244. package/lib/node_modules/@pneuma/compact/package.json +39 -0
  245. package/lib/node_modules/@pneuma/computer-use/cordis.patch.yml +5 -0
  246. package/lib/node_modules/@pneuma/computer-use/desktop-control.d.ts +1 -0
  247. package/lib/node_modules/@pneuma/computer-use/desktop-control.js +1 -0
  248. package/lib/node_modules/@pneuma/computer-use/index.d.ts +1 -0
  249. package/lib/node_modules/@pneuma/computer-use/index.js +1 -0
  250. package/lib/node_modules/@pneuma/computer-use/locale/en.json +4 -0
  251. package/lib/node_modules/@pneuma/computer-use/locale/ui.en.json +41 -0
  252. package/lib/node_modules/@pneuma/computer-use/locale/ui.zh.json +41 -0
  253. package/lib/node_modules/@pneuma/computer-use/package.json +40 -0
  254. package/lib/node_modules/@pneuma/config-core/index.d.ts +1 -0
  255. package/lib/node_modules/@pneuma/config-core/index.js +1 -0
  256. package/lib/node_modules/@pneuma/config-core/locale/en.json +4 -0
  257. package/lib/node_modules/@pneuma/config-core/market.d.ts +1 -0
  258. package/lib/node_modules/@pneuma/config-core/market.js +1 -0
  259. package/lib/node_modules/@pneuma/config-core/package.json +35 -0
  260. package/lib/node_modules/@pneuma/config-core/presets.d.ts +1 -0
  261. package/lib/node_modules/@pneuma/config-core/presets.js +1 -0
  262. package/lib/node_modules/@pneuma/desktop-dock/cordis.patch.yml +4 -0
  263. package/lib/node_modules/@pneuma/desktop-dock/index.d.ts +1 -0
  264. package/lib/node_modules/@pneuma/desktop-dock/index.js +1 -0
  265. package/lib/node_modules/@pneuma/desktop-dock/locale/en.json +4 -0
  266. package/lib/node_modules/@pneuma/desktop-dock/locale/ui.en.json +11 -0
  267. package/lib/node_modules/@pneuma/desktop-dock/locale/ui.zh.json +11 -0
  268. package/lib/node_modules/@pneuma/desktop-dock/package.json +38 -0
  269. package/lib/node_modules/@pneuma/dock-browser/cordis.patch.yml +5 -0
  270. package/lib/node_modules/@pneuma/dock-browser/index.d.ts +1 -0
  271. package/lib/node_modules/@pneuma/dock-browser/index.js +1 -0
  272. package/lib/node_modules/@pneuma/dock-browser/locale/en.json +4 -0
  273. package/lib/node_modules/@pneuma/dock-browser/locale/ui.en.json +10 -0
  274. package/lib/node_modules/@pneuma/dock-browser/locale/ui.zh.json +10 -0
  275. package/lib/node_modules/@pneuma/dock-browser/package.json +40 -0
  276. package/lib/node_modules/@pneuma/doctor/bundle.d.ts +1 -0
  277. package/lib/node_modules/@pneuma/doctor/bundle.js +1 -0
  278. package/lib/node_modules/@pneuma/doctor/checks/data.d.ts +1 -0
  279. package/lib/node_modules/@pneuma/doctor/checks/data.js +1 -0
  280. package/lib/node_modules/@pneuma/doctor/checks/ecosystem.d.ts +1 -0
  281. package/lib/node_modules/@pneuma/doctor/checks/ecosystem.js +1 -0
  282. package/lib/node_modules/@pneuma/doctor/checks/environment.d.ts +1 -0
  283. package/lib/node_modules/@pneuma/doctor/checks/environment.js +1 -0
  284. package/lib/node_modules/@pneuma/doctor/checks/util.d.ts +1 -0
  285. package/lib/node_modules/@pneuma/doctor/checks/util.js +1 -0
  286. package/lib/node_modules/@pneuma/doctor/cordis.patch.yml +4 -0
  287. package/lib/node_modules/@pneuma/doctor/index.d.ts +1 -0
  288. package/lib/node_modules/@pneuma/doctor/index.js +1 -0
  289. package/lib/node_modules/@pneuma/doctor/locale/en.json +4 -0
  290. package/lib/node_modules/@pneuma/doctor/package.json +39 -0
  291. package/lib/node_modules/@pneuma/dsh-compat/cordis.patch.yml +5 -0
  292. package/lib/node_modules/@pneuma/dsh-compat/index.d.ts +1 -0
  293. package/lib/node_modules/@pneuma/dsh-compat/index.js +1 -0
  294. package/lib/node_modules/@pneuma/dsh-compat/locale/en.json +4 -0
  295. package/lib/node_modules/@pneuma/dsh-compat/package.json +40 -0
  296. package/lib/node_modules/@pneuma/git/cordis.patch.yml +4 -0
  297. package/lib/node_modules/@pneuma/git/index.d.ts +1 -0
  298. package/lib/node_modules/@pneuma/git/index.js +1 -0
  299. package/lib/node_modules/@pneuma/git/locale/en.json +4 -0
  300. package/lib/node_modules/@pneuma/git/package.json +38 -0
  301. package/lib/node_modules/@pneuma/goal/cordis.patch.yml +4 -0
  302. package/lib/node_modules/@pneuma/goal/goal.d.ts +1 -0
  303. package/lib/node_modules/@pneuma/goal/goal.js +1 -0
  304. package/lib/node_modules/@pneuma/goal/index.d.ts +1 -0
  305. package/lib/node_modules/@pneuma/goal/index.js +1 -0
  306. package/lib/node_modules/@pneuma/goal/locale/en.json +4 -0
  307. package/lib/node_modules/@pneuma/goal/locale/ui.en.json +10 -0
  308. package/lib/node_modules/@pneuma/goal/locale/ui.zh.json +10 -0
  309. package/lib/node_modules/@pneuma/goal/package.json +39 -0
  310. package/lib/node_modules/@pneuma/guards/cordis.patch.yml +4 -0
  311. package/lib/node_modules/@pneuma/guards/index.d.ts +1 -0
  312. package/lib/node_modules/@pneuma/guards/index.js +1 -0
  313. package/lib/node_modules/@pneuma/guards/locale/en.json +4 -0
  314. package/lib/node_modules/@pneuma/guards/package.json +38 -0
  315. package/lib/node_modules/@pneuma/hooks/cordis.patch.yml +4 -0
  316. package/lib/node_modules/@pneuma/hooks/index.d.ts +1 -0
  317. package/lib/node_modules/@pneuma/hooks/index.js +1 -0
  318. package/lib/node_modules/@pneuma/hooks/lifecycle-hooks.d.ts +1 -0
  319. package/lib/node_modules/@pneuma/hooks/lifecycle-hooks.js +1 -0
  320. package/lib/node_modules/@pneuma/hooks/locale/en.json +4 -0
  321. package/lib/node_modules/@pneuma/hooks/locale/ui.en.json +111 -0
  322. package/lib/node_modules/@pneuma/hooks/locale/ui.zh.json +111 -0
  323. package/lib/node_modules/@pneuma/hooks/package.json +39 -0
  324. package/lib/node_modules/@pneuma/host-stdio/cordis.patch.yml +4 -0
  325. package/lib/node_modules/@pneuma/host-stdio/index.d.ts +1 -0
  326. package/lib/node_modules/@pneuma/host-stdio/index.js +1 -0
  327. package/lib/node_modules/@pneuma/host-stdio/locale/en.json +4 -0
  328. package/lib/node_modules/@pneuma/host-stdio/package.json +38 -0
  329. package/lib/node_modules/@pneuma/image-diet/cordis.patch.yml +4 -0
  330. package/lib/node_modules/@pneuma/image-diet/index.d.ts +1 -0
  331. package/lib/node_modules/@pneuma/image-diet/index.js +1 -0
  332. package/lib/node_modules/@pneuma/image-diet/locale/en.json +4 -0
  333. package/lib/node_modules/@pneuma/image-diet/locale/ui.en.json +14 -0
  334. package/lib/node_modules/@pneuma/image-diet/locale/ui.zh.json +14 -0
  335. package/lib/node_modules/@pneuma/image-diet/package.json +39 -0
  336. package/lib/node_modules/@pneuma/llm/cordis.patch.yml +4 -0
  337. package/lib/node_modules/@pneuma/llm/index.d.ts +1 -0
  338. package/lib/node_modules/@pneuma/llm/index.js +1 -0
  339. package/lib/node_modules/@pneuma/llm/locale/en.json +4 -0
  340. package/lib/node_modules/@pneuma/llm/package.json +38 -0
  341. package/lib/node_modules/@pneuma/log/cordis.patch.yml +4 -0
  342. package/lib/node_modules/@pneuma/log/filter.d.ts +1 -0
  343. package/lib/node_modules/@pneuma/log/filter.js +1 -0
  344. package/lib/node_modules/@pneuma/log/index.d.ts +1 -0
  345. package/lib/node_modules/@pneuma/log/index.js +1 -0
  346. package/lib/node_modules/@pneuma/log/locale/en.json +4 -0
  347. package/lib/node_modules/@pneuma/log/locale/ui.en.json +30 -0
  348. package/lib/node_modules/@pneuma/log/locale/ui.zh.json +30 -0
  349. package/lib/node_modules/@pneuma/log/package.json +40 -0
  350. package/lib/node_modules/@pneuma/log/sink.d.ts +1 -0
  351. package/lib/node_modules/@pneuma/log/sink.js +1 -0
  352. package/lib/node_modules/@pneuma/lsp/client.d.ts +1 -0
  353. package/lib/node_modules/@pneuma/lsp/client.js +1 -0
  354. package/lib/node_modules/@pneuma/lsp/cordis.patch.yml +5 -0
  355. package/lib/node_modules/@pneuma/lsp/framing.d.ts +1 -0
  356. package/lib/node_modules/@pneuma/lsp/framing.js +1 -0
  357. package/lib/node_modules/@pneuma/lsp/index.d.ts +1 -0
  358. package/lib/node_modules/@pneuma/lsp/index.js +1 -0
  359. package/lib/node_modules/@pneuma/lsp/line-shift.d.ts +1 -0
  360. package/lib/node_modules/@pneuma/lsp/line-shift.js +1 -0
  361. package/lib/node_modules/@pneuma/lsp/locale/en.json +4 -0
  362. package/lib/node_modules/@pneuma/lsp/locale/ui.en.json +17 -0
  363. package/lib/node_modules/@pneuma/lsp/locale/ui.zh.json +17 -0
  364. package/lib/node_modules/@pneuma/lsp/manager.d.ts +1 -0
  365. package/lib/node_modules/@pneuma/lsp/manager.js +1 -0
  366. package/lib/node_modules/@pneuma/lsp/normalize.d.ts +1 -0
  367. package/lib/node_modules/@pneuma/lsp/normalize.js +1 -0
  368. package/lib/node_modules/@pneuma/lsp/package.json +40 -0
  369. package/lib/node_modules/@pneuma/lsp/servers.d.ts +1 -0
  370. package/lib/node_modules/@pneuma/lsp/servers.js +1 -0
  371. package/lib/node_modules/@pneuma/lsp/uri.d.ts +1 -0
  372. package/lib/node_modules/@pneuma/lsp/uri.js +1 -0
  373. package/lib/node_modules/@pneuma/mcp/cordis.patch.yml +5 -0
  374. package/lib/node_modules/@pneuma/mcp/index.d.ts +1 -0
  375. package/lib/node_modules/@pneuma/mcp/index.js +1 -0
  376. package/lib/node_modules/@pneuma/mcp/locale/en.json +4 -0
  377. package/lib/node_modules/@pneuma/mcp/locale/ui.en.json +28 -0
  378. package/lib/node_modules/@pneuma/mcp/locale/ui.zh.json +28 -0
  379. package/lib/node_modules/@pneuma/mcp/mcp.d.ts +1 -0
  380. package/lib/node_modules/@pneuma/mcp/mcp.js +1 -0
  381. package/lib/node_modules/@pneuma/mcp/package.json +40 -0
  382. package/lib/node_modules/@pneuma/memory/cordis.patch.yml +4 -0
  383. package/lib/node_modules/@pneuma/memory/index.d.ts +1 -0
  384. package/lib/node_modules/@pneuma/memory/index.js +1 -0
  385. package/lib/node_modules/@pneuma/memory/locale/en.json +4 -0
  386. package/lib/node_modules/@pneuma/memory/locale/ui.en.json +67 -0
  387. package/lib/node_modules/@pneuma/memory/locale/ui.zh.json +67 -0
  388. package/lib/node_modules/@pneuma/memory/memory-eval.d.ts +1 -0
  389. package/lib/node_modules/@pneuma/memory/memory-eval.js +1 -0
  390. package/lib/node_modules/@pneuma/memory/memory.d.ts +1 -0
  391. package/lib/node_modules/@pneuma/memory/memory.js +1 -0
  392. package/lib/node_modules/@pneuma/memory/package.json +39 -0
  393. package/lib/node_modules/@pneuma/microcompact/cordis.patch.yml +4 -0
  394. package/lib/node_modules/@pneuma/microcompact/index.d.ts +1 -0
  395. package/lib/node_modules/@pneuma/microcompact/index.js +1 -0
  396. package/lib/node_modules/@pneuma/microcompact/locale/en.json +4 -0
  397. package/lib/node_modules/@pneuma/microcompact/locale/ui.en.json +20 -0
  398. package/lib/node_modules/@pneuma/microcompact/locale/ui.zh.json +20 -0
  399. package/lib/node_modules/@pneuma/microcompact/microcompact.d.ts +1 -0
  400. package/lib/node_modules/@pneuma/microcompact/microcompact.js +1 -0
  401. package/lib/node_modules/@pneuma/microcompact/package.json +39 -0
  402. package/lib/node_modules/@pneuma/mode/cordis.patch.yml +4 -0
  403. package/lib/node_modules/@pneuma/mode/index.d.ts +1 -0
  404. package/lib/node_modules/@pneuma/mode/index.js +1 -0
  405. package/lib/node_modules/@pneuma/mode/locale/en.json +4 -0
  406. package/lib/node_modules/@pneuma/mode/package.json +38 -0
  407. package/lib/node_modules/@pneuma/ops/cordis.patch.yml +5 -0
  408. package/lib/node_modules/@pneuma/ops/index.d.ts +1 -0
  409. package/lib/node_modules/@pneuma/ops/index.js +1 -0
  410. package/lib/node_modules/@pneuma/ops/locale/en.json +4 -0
  411. package/lib/node_modules/@pneuma/ops/locale/ui.en.json +21 -0
  412. package/lib/node_modules/@pneuma/ops/locale/ui.zh.json +21 -0
  413. package/lib/node_modules/@pneuma/ops/package.json +41 -0
  414. package/lib/node_modules/@pneuma/ops/render.d.ts +1 -0
  415. package/lib/node_modules/@pneuma/ops/render.js +1 -0
  416. package/lib/node_modules/@pneuma/ops/tools.d.ts +1 -0
  417. package/lib/node_modules/@pneuma/ops/tools.js +1 -0
  418. package/lib/node_modules/@pneuma/ops/worker.d.ts +1 -0
  419. package/lib/node_modules/@pneuma/ops/worker.js +1 -0
  420. package/lib/node_modules/@pneuma/permission-core/index.d.ts +1 -0
  421. package/lib/node_modules/@pneuma/permission-core/index.js +1 -0
  422. package/lib/node_modules/@pneuma/permission-core/locale/en.json +4 -0
  423. package/lib/node_modules/@pneuma/permission-core/package.json +35 -0
  424. package/lib/node_modules/@pneuma/permission-core/permission-presets.d.ts +1 -0
  425. package/lib/node_modules/@pneuma/permission-core/permission-presets.js +1 -0
  426. package/lib/node_modules/@pneuma/permission-core/permission-scope.d.ts +1 -0
  427. package/lib/node_modules/@pneuma/permission-core/permission-scope.js +1 -0
  428. package/lib/node_modules/@pneuma/permission-presets/cordis.patch.yml +4 -0
  429. package/lib/node_modules/@pneuma/permission-presets/index.d.ts +1 -0
  430. package/lib/node_modules/@pneuma/permission-presets/index.js +1 -0
  431. package/lib/node_modules/@pneuma/permission-presets/locale/en.json +4 -0
  432. package/lib/node_modules/@pneuma/permission-presets/locale/ui.en.json +10 -0
  433. package/lib/node_modules/@pneuma/permission-presets/locale/ui.zh.json +10 -0
  434. package/lib/node_modules/@pneuma/permission-presets/package.json +38 -0
  435. package/lib/node_modules/@pneuma/plan/cordis.patch.yml +4 -0
  436. package/lib/node_modules/@pneuma/plan/index.d.ts +1 -0
  437. package/lib/node_modules/@pneuma/plan/index.js +1 -0
  438. package/lib/node_modules/@pneuma/plan/locale/en.json +4 -0
  439. package/lib/node_modules/@pneuma/plan/package.json +38 -0
  440. package/lib/node_modules/@pneuma/plugin-manager/cordis.patch.yml +4 -0
  441. package/lib/node_modules/@pneuma/plugin-manager/index.d.ts +1 -0
  442. package/lib/node_modules/@pneuma/plugin-manager/index.js +1 -0
  443. package/lib/node_modules/@pneuma/plugin-manager/locale/en.json +4 -0
  444. package/lib/node_modules/@pneuma/plugin-manager/package.json +38 -0
  445. package/lib/node_modules/@pneuma/presets/cordis.patch.yml +4 -0
  446. package/lib/node_modules/@pneuma/presets/index.d.ts +1 -0
  447. package/lib/node_modules/@pneuma/presets/index.js +1 -0
  448. package/lib/node_modules/@pneuma/presets/locale/en.json +4 -0
  449. package/lib/node_modules/@pneuma/presets/locale/ui.en.json +10 -0
  450. package/lib/node_modules/@pneuma/presets/locale/ui.zh.json +10 -0
  451. package/lib/node_modules/@pneuma/presets/package.json +38 -0
  452. package/lib/node_modules/@pneuma/prompt/cordis.patch.yml +4 -0
  453. package/lib/node_modules/@pneuma/prompt/index.d.ts +1 -0
  454. package/lib/node_modules/@pneuma/prompt/index.js +1 -0
  455. package/lib/node_modules/@pneuma/prompt/locale/en.json +4 -0
  456. package/lib/node_modules/@pneuma/prompt/package.json +38 -0
  457. package/lib/node_modules/@pneuma/prompt/tool-result-prune.d.ts +1 -0
  458. package/lib/node_modules/@pneuma/prompt/tool-result-prune.js +1 -0
  459. package/lib/node_modules/@pneuma/ptc/cordis.patch.yml +4 -0
  460. package/lib/node_modules/@pneuma/ptc/index.d.ts +1 -0
  461. package/lib/node_modules/@pneuma/ptc/index.js +1 -0
  462. package/lib/node_modules/@pneuma/ptc/locale/en.json +4 -0
  463. package/lib/node_modules/@pneuma/ptc/package.json +38 -0
  464. package/lib/node_modules/@pneuma/remote/cordis.patch.yml +4 -0
  465. package/lib/node_modules/@pneuma/remote/http.d.ts +1 -0
  466. package/lib/node_modules/@pneuma/remote/http.js +1 -0
  467. package/lib/node_modules/@pneuma/remote/index.d.ts +1 -0
  468. package/lib/node_modules/@pneuma/remote/index.js +1 -0
  469. package/lib/node_modules/@pneuma/remote/locale/en.json +4 -0
  470. package/lib/node_modules/@pneuma/remote/locale/ui.en.json +76 -0
  471. package/lib/node_modules/@pneuma/remote/locale/ui.zh.json +76 -0
  472. package/lib/node_modules/@pneuma/remote/package.json +38 -0
  473. package/lib/node_modules/@pneuma/remote/routes.d.ts +1 -0
  474. package/lib/node_modules/@pneuma/remote/routes.js +1 -0
  475. package/lib/node_modules/@pneuma/remote/types.d.ts +1 -0
  476. package/lib/node_modules/@pneuma/remote/types.js +1 -0
  477. package/lib/node_modules/@pneuma/runtime/adapter/transcript.d.ts +1 -0
  478. package/lib/node_modules/@pneuma/runtime/adapter/transcript.js +1 -0
  479. package/lib/node_modules/@pneuma/runtime/boot.d.ts +1 -0
  480. package/lib/node_modules/@pneuma/runtime/boot.js +1 -0
  481. package/lib/node_modules/@pneuma/runtime/contract/approval.d.ts +1 -0
  482. package/lib/node_modules/@pneuma/runtime/contract/approval.js +1 -0
  483. package/lib/node_modules/@pneuma/runtime/contract/fonts.d.ts +1 -0
  484. package/lib/node_modules/@pneuma/runtime/contract/fonts.js +1 -0
  485. package/lib/node_modules/@pneuma/runtime/contract/memory.d.ts +1 -0
  486. package/lib/node_modules/@pneuma/runtime/contract/memory.js +1 -0
  487. package/lib/node_modules/@pneuma/runtime/contract/mode.d.ts +1 -0
  488. package/lib/node_modules/@pneuma/runtime/contract/mode.js +1 -0
  489. package/lib/node_modules/@pneuma/runtime/contract/plugin.d.ts +1 -0
  490. package/lib/node_modules/@pneuma/runtime/contract/plugin.js +1 -0
  491. package/lib/node_modules/@pneuma/runtime/contract/remote.d.ts +1 -0
  492. package/lib/node_modules/@pneuma/runtime/contract/remote.js +1 -0
  493. package/lib/node_modules/@pneuma/runtime/contract/runtime.d.ts +1 -0
  494. package/lib/node_modules/@pneuma/runtime/contract/runtime.js +1 -0
  495. package/lib/node_modules/@pneuma/runtime/contract/session.d.ts +1 -0
  496. package/lib/node_modules/@pneuma/runtime/contract/session.js +1 -0
  497. package/lib/node_modules/@pneuma/runtime/contract/settings.d.ts +1 -0
  498. package/lib/node_modules/@pneuma/runtime/contract/settings.js +1 -0
  499. package/lib/node_modules/@pneuma/runtime/contract/snapshot.d.ts +1 -0
  500. package/lib/node_modules/@pneuma/runtime/contract/snapshot.js +1 -0
  501. package/lib/node_modules/@pneuma/runtime/contract/task.d.ts +1 -0
  502. package/lib/node_modules/@pneuma/runtime/contract/task.js +1 -0
  503. package/lib/node_modules/@pneuma/runtime/contract/transcript.d.ts +1 -0
  504. package/lib/node_modules/@pneuma/runtime/contract/transcript.js +1 -0
  505. package/lib/node_modules/@pneuma/runtime/contract/usage.d.ts +1 -0
  506. package/lib/node_modules/@pneuma/runtime/contract/usage.js +1 -0
  507. package/lib/node_modules/@pneuma/runtime/contract.d.ts +1 -0
  508. package/lib/node_modules/@pneuma/runtime/contract.js +1 -0
  509. package/lib/node_modules/@pneuma/runtime/core/attachments.d.ts +1 -0
  510. package/lib/node_modules/@pneuma/runtime/core/attachments.js +1 -0
  511. package/lib/node_modules/@pneuma/runtime/core/audit.d.ts +1 -0
  512. package/lib/node_modules/@pneuma/runtime/core/audit.js +1 -0
  513. package/lib/node_modules/@pneuma/runtime/core/boot-notices.d.ts +1 -0
  514. package/lib/node_modules/@pneuma/runtime/core/boot-notices.js +1 -0
  515. package/lib/node_modules/@pneuma/runtime/core/bytes.d.ts +1 -0
  516. package/lib/node_modules/@pneuma/runtime/core/bytes.js +1 -0
  517. package/lib/node_modules/@pneuma/runtime/core/child-env.d.ts +1 -0
  518. package/lib/node_modules/@pneuma/runtime/core/child-env.js +1 -0
  519. package/lib/node_modules/@pneuma/runtime/core/clamp.d.ts +1 -0
  520. package/lib/node_modules/@pneuma/runtime/core/clamp.js +1 -0
  521. package/lib/node_modules/@pneuma/runtime/core/clock.d.ts +1 -0
  522. package/lib/node_modules/@pneuma/runtime/core/clock.js +1 -0
  523. package/lib/node_modules/@pneuma/runtime/core/command-intent.d.ts +1 -0
  524. package/lib/node_modules/@pneuma/runtime/core/command-intent.js +1 -0
  525. package/lib/node_modules/@pneuma/runtime/core/command-policy.d.ts +1 -0
  526. package/lib/node_modules/@pneuma/runtime/core/command-policy.js +1 -0
  527. package/lib/node_modules/@pneuma/runtime/core/compact-anchors.d.ts +1 -0
  528. package/lib/node_modules/@pneuma/runtime/core/compact-anchors.js +1 -0
  529. package/lib/node_modules/@pneuma/runtime/core/config-store.d.ts +1 -0
  530. package/lib/node_modules/@pneuma/runtime/core/config-store.js +1 -0
  531. package/lib/node_modules/@pneuma/runtime/core/config.d.ts +1 -0
  532. package/lib/node_modules/@pneuma/runtime/core/config.js +1 -0
  533. package/lib/node_modules/@pneuma/runtime/core/context-injection-report.d.ts +1 -0
  534. package/lib/node_modules/@pneuma/runtime/core/context-injection-report.js +1 -0
  535. package/lib/node_modules/@pneuma/runtime/core/diff-text.d.ts +1 -0
  536. package/lib/node_modules/@pneuma/runtime/core/diff-text.js +1 -0
  537. package/lib/node_modules/@pneuma/runtime/core/dock-browser.d.ts +1 -0
  538. package/lib/node_modules/@pneuma/runtime/core/dock-browser.js +1 -0
  539. package/lib/node_modules/@pneuma/runtime/core/dock-ops.d.ts +1 -0
  540. package/lib/node_modules/@pneuma/runtime/core/dock-ops.js +1 -0
  541. package/lib/node_modules/@pneuma/runtime/core/dock-session.d.ts +1 -0
  542. package/lib/node_modules/@pneuma/runtime/core/dock-session.js +1 -0
  543. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/llm-usage-event.d.ts +1 -0
  544. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/llm-usage-event.js +1 -0
  545. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/presentation.d.ts +1 -0
  546. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/presentation.js +1 -0
  547. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/resolve-hook.d.ts +1 -0
  548. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/resolve-hook.js +1 -0
  549. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/service-map.d.ts +1 -0
  550. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/service-map.js +1 -0
  551. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/session-bridge.d.ts +1 -0
  552. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/session-bridge.js +1 -0
  553. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/session-events.d.ts +1 -0
  554. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/session-events.js +1 -0
  555. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/shims/credentials.d.ts +1 -0
  556. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/shims/credentials.js +1 -0
  557. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/shims/home-paths.d.ts +1 -0
  558. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/shims/home-paths.js +1 -0
  559. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/tools-facade.d.ts +1 -0
  560. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/tools-facade.js +1 -0
  561. package/lib/node_modules/@pneuma/runtime/core/err-text.d.ts +1 -0
  562. package/lib/node_modules/@pneuma/runtime/core/err-text.js +1 -0
  563. package/lib/node_modules/@pneuma/runtime/core/events.d.ts +1 -0
  564. package/lib/node_modules/@pneuma/runtime/core/events.js +1 -0
  565. package/lib/node_modules/@pneuma/runtime/core/executable.d.ts +1 -0
  566. package/lib/node_modules/@pneuma/runtime/core/executable.js +1 -0
  567. package/lib/node_modules/@pneuma/runtime/core/git-exec.d.ts +1 -0
  568. package/lib/node_modules/@pneuma/runtime/core/git-exec.js +1 -0
  569. package/lib/node_modules/@pneuma/runtime/core/git-info.d.ts +1 -0
  570. package/lib/node_modules/@pneuma/runtime/core/git-info.js +1 -0
  571. package/lib/node_modules/@pneuma/runtime/core/git-surface.d.ts +1 -0
  572. package/lib/node_modules/@pneuma/runtime/core/git-surface.js +1 -0
  573. package/lib/node_modules/@pneuma/runtime/core/guard-session.d.ts +1 -0
  574. package/lib/node_modules/@pneuma/runtime/core/guard-session.js +1 -0
  575. package/lib/node_modules/@pneuma/runtime/core/host-browser-link.d.ts +1 -0
  576. package/lib/node_modules/@pneuma/runtime/core/host-browser-link.js +1 -0
  577. package/lib/node_modules/@pneuma/runtime/core/host-methods.d.ts +1 -0
  578. package/lib/node_modules/@pneuma/runtime/core/host-methods.js +1 -0
  579. package/lib/node_modules/@pneuma/runtime/core/http-debug.d.ts +1 -0
  580. package/lib/node_modules/@pneuma/runtime/core/http-debug.js +1 -0
  581. package/lib/node_modules/@pneuma/runtime/core/i18n-text.d.ts +1 -0
  582. package/lib/node_modules/@pneuma/runtime/core/i18n-text.js +1 -0
  583. package/lib/node_modules/@pneuma/runtime/core/i18n.d.ts +1 -0
  584. package/lib/node_modules/@pneuma/runtime/core/i18n.js +1 -0
  585. package/lib/node_modules/@pneuma/runtime/core/image-diet.d.ts +1 -0
  586. package/lib/node_modules/@pneuma/runtime/core/image-diet.js +1 -0
  587. package/lib/node_modules/@pneuma/runtime/core/json-text.d.ts +1 -0
  588. package/lib/node_modules/@pneuma/runtime/core/json-text.js +1 -0
  589. package/lib/node_modules/@pneuma/runtime/core/llm.d.ts +1 -0
  590. package/lib/node_modules/@pneuma/runtime/core/llm.js +1 -0
  591. package/lib/node_modules/@pneuma/runtime/core/lockfile.d.ts +1 -0
  592. package/lib/node_modules/@pneuma/runtime/core/lockfile.js +1 -0
  593. package/lib/node_modules/@pneuma/runtime/core/log-config.d.ts +1 -0
  594. package/lib/node_modules/@pneuma/runtime/core/log-config.js +1 -0
  595. package/lib/node_modules/@pneuma/runtime/core/mention.d.ts +1 -0
  596. package/lib/node_modules/@pneuma/runtime/core/mention.js +1 -0
  597. package/lib/node_modules/@pneuma/runtime/core/migrate.d.ts +1 -0
  598. package/lib/node_modules/@pneuma/runtime/core/migrate.js +1 -0
  599. package/lib/node_modules/@pneuma/runtime/core/model-caps.d.ts +1 -0
  600. package/lib/node_modules/@pneuma/runtime/core/model-caps.js +1 -0
  601. package/lib/node_modules/@pneuma/runtime/core/native-bridge.d.ts +1 -0
  602. package/lib/node_modules/@pneuma/runtime/core/native-bridge.js +1 -0
  603. package/lib/node_modules/@pneuma/runtime/core/os-lock.d.ts +1 -0
  604. package/lib/node_modules/@pneuma/runtime/core/os-lock.js +1 -0
  605. package/lib/node_modules/@pneuma/runtime/core/path-policy.d.ts +1 -0
  606. package/lib/node_modules/@pneuma/runtime/core/path-policy.js +1 -0
  607. package/lib/node_modules/@pneuma/runtime/core/plugin-bundle.d.ts +1 -0
  608. package/lib/node_modules/@pneuma/runtime/core/plugin-bundle.js +1 -0
  609. package/lib/node_modules/@pneuma/runtime/core/plugin-loader.d.ts +1 -0
  610. package/lib/node_modules/@pneuma/runtime/core/plugin-loader.js +1 -0
  611. package/lib/node_modules/@pneuma/runtime/core/plugin-locale.d.ts +1 -0
  612. package/lib/node_modules/@pneuma/runtime/core/plugin-locale.js +1 -0
  613. package/lib/node_modules/@pneuma/runtime/core/plugin-npm.d.ts +1 -0
  614. package/lib/node_modules/@pneuma/runtime/core/plugin-npm.js +1 -0
  615. package/lib/node_modules/@pneuma/runtime/core/plugin-patch.d.ts +1 -0
  616. package/lib/node_modules/@pneuma/runtime/core/plugin-patch.js +1 -0
  617. package/lib/node_modules/@pneuma/runtime/core/plugin-registry.d.ts +1 -0
  618. package/lib/node_modules/@pneuma/runtime/core/plugin-registry.js +1 -0
  619. package/lib/node_modules/@pneuma/runtime/core/plugin-watch.d.ts +1 -0
  620. package/lib/node_modules/@pneuma/runtime/core/plugin-watch.js +1 -0
  621. package/lib/node_modules/@pneuma/runtime/core/prefs.d.ts +1 -0
  622. package/lib/node_modules/@pneuma/runtime/core/prefs.js +1 -0
  623. package/lib/node_modules/@pneuma/runtime/core/pricing.d.ts +1 -0
  624. package/lib/node_modules/@pneuma/runtime/core/pricing.js +1 -0
  625. package/lib/node_modules/@pneuma/runtime/core/profile-bootstrap.d.ts +1 -0
  626. package/lib/node_modules/@pneuma/runtime/core/profile-bootstrap.js +1 -0
  627. package/lib/node_modules/@pneuma/runtime/core/profile-dir.d.ts +1 -0
  628. package/lib/node_modules/@pneuma/runtime/core/profile-dir.js +1 -0
  629. package/lib/node_modules/@pneuma/runtime/core/ptc.d.ts +1 -0
  630. package/lib/node_modules/@pneuma/runtime/core/ptc.js +1 -0
  631. package/lib/node_modules/@pneuma/runtime/core/records.d.ts +1 -0
  632. package/lib/node_modules/@pneuma/runtime/core/records.js +1 -0
  633. package/lib/node_modules/@pneuma/runtime/core/redact.d.ts +1 -0
  634. package/lib/node_modules/@pneuma/runtime/core/redact.js +1 -0
  635. package/lib/node_modules/@pneuma/runtime/core/remote/frames.d.ts +1 -0
  636. package/lib/node_modules/@pneuma/runtime/core/remote/frames.js +1 -0
  637. package/lib/node_modules/@pneuma/runtime/core/remote/notify.d.ts +1 -0
  638. package/lib/node_modules/@pneuma/runtime/core/remote/notify.js +1 -0
  639. package/lib/node_modules/@pneuma/runtime/core/remote/owner.d.ts +1 -0
  640. package/lib/node_modules/@pneuma/runtime/core/remote/owner.js +1 -0
  641. package/lib/node_modules/@pneuma/runtime/core/remote/pairing.d.ts +1 -0
  642. package/lib/node_modules/@pneuma/runtime/core/remote/pairing.js +1 -0
  643. package/lib/node_modules/@pneuma/runtime/core/remote/push.d.ts +1 -0
  644. package/lib/node_modules/@pneuma/runtime/core/remote/push.js +1 -0
  645. package/lib/node_modules/@pneuma/runtime/core/remote/store.d.ts +1 -0
  646. package/lib/node_modules/@pneuma/runtime/core/remote/store.js +1 -0
  647. package/lib/node_modules/@pneuma/runtime/core/remote/tickets.d.ts +1 -0
  648. package/lib/node_modules/@pneuma/runtime/core/remote/tickets.js +1 -0
  649. package/lib/node_modules/@pneuma/runtime/core/remote/uploads.d.ts +1 -0
  650. package/lib/node_modules/@pneuma/runtime/core/remote/uploads.js +1 -0
  651. package/lib/node_modules/@pneuma/runtime/core/repeat-reminder.d.ts +1 -0
  652. package/lib/node_modules/@pneuma/runtime/core/repeat-reminder.js +1 -0
  653. package/lib/node_modules/@pneuma/runtime/core/request-attribution.d.ts +1 -0
  654. package/lib/node_modules/@pneuma/runtime/core/request-attribution.js +1 -0
  655. package/lib/node_modules/@pneuma/runtime/core/request-invariant.d.ts +1 -0
  656. package/lib/node_modules/@pneuma/runtime/core/request-invariant.js +1 -0
  657. package/lib/node_modules/@pneuma/runtime/core/schedule/rule.d.ts +1 -0
  658. package/lib/node_modules/@pneuma/runtime/core/schedule/rule.js +1 -0
  659. package/lib/node_modules/@pneuma/runtime/core/schedule/runner.d.ts +1 -0
  660. package/lib/node_modules/@pneuma/runtime/core/schedule/runner.js +1 -0
  661. package/lib/node_modules/@pneuma/runtime/core/schedule/store.d.ts +1 -0
  662. package/lib/node_modules/@pneuma/runtime/core/schedule/store.js +1 -0
  663. package/lib/node_modules/@pneuma/runtime/core/secrets.d.ts +1 -0
  664. package/lib/node_modules/@pneuma/runtime/core/secrets.js +1 -0
  665. package/lib/node_modules/@pneuma/runtime/core/session-meta.d.ts +1 -0
  666. package/lib/node_modules/@pneuma/runtime/core/session-meta.js +1 -0
  667. package/lib/node_modules/@pneuma/runtime/core/session.d.ts +1 -0
  668. package/lib/node_modules/@pneuma/runtime/core/session.js +1 -0
  669. package/lib/node_modules/@pneuma/runtime/core/shell-quote.d.ts +1 -0
  670. package/lib/node_modules/@pneuma/runtime/core/shell-quote.js +1 -0
  671. package/lib/node_modules/@pneuma/runtime/core/side-ask.d.ts +1 -0
  672. package/lib/node_modules/@pneuma/runtime/core/side-ask.js +1 -0
  673. package/lib/node_modules/@pneuma/runtime/core/skills.d.ts +1 -0
  674. package/lib/node_modules/@pneuma/runtime/core/skills.js +1 -0
  675. package/lib/node_modules/@pneuma/runtime/core/snapshot-throttle.d.ts +1 -0
  676. package/lib/node_modules/@pneuma/runtime/core/snapshot-throttle.js +1 -0
  677. package/lib/node_modules/@pneuma/runtime/core/spill.d.ts +1 -0
  678. package/lib/node_modules/@pneuma/runtime/core/spill.js +1 -0
  679. package/lib/node_modules/@pneuma/runtime/core/strings.d.ts +1 -0
  680. package/lib/node_modules/@pneuma/runtime/core/strings.js +1 -0
  681. package/lib/node_modules/@pneuma/runtime/core/team-board.d.ts +1 -0
  682. package/lib/node_modules/@pneuma/runtime/core/team-board.js +1 -0
  683. package/lib/node_modules/@pneuma/runtime/core/terminal-env.d.ts +1 -0
  684. package/lib/node_modules/@pneuma/runtime/core/terminal-env.js +1 -0
  685. package/lib/node_modules/@pneuma/runtime/core/text-format.d.ts +1 -0
  686. package/lib/node_modules/@pneuma/runtime/core/text-format.js +1 -0
  687. package/lib/node_modules/@pneuma/runtime/core/throughput.d.ts +1 -0
  688. package/lib/node_modules/@pneuma/runtime/core/throughput.js +1 -0
  689. package/lib/node_modules/@pneuma/runtime/core/todo-reminder-cadence.d.ts +1 -0
  690. package/lib/node_modules/@pneuma/runtime/core/todo-reminder-cadence.js +1 -0
  691. package/lib/node_modules/@pneuma/runtime/core/todo-reminder.d.ts +1 -0
  692. package/lib/node_modules/@pneuma/runtime/core/todo-reminder.js +1 -0
  693. package/lib/node_modules/@pneuma/runtime/core/token-estimate.d.ts +1 -0
  694. package/lib/node_modules/@pneuma/runtime/core/token-estimate.js +1 -0
  695. package/lib/node_modules/@pneuma/runtime/core/tool-guards.d.ts +1 -0
  696. package/lib/node_modules/@pneuma/runtime/core/tool-guards.js +1 -0
  697. package/lib/node_modules/@pneuma/runtime/core/tools/command-runner.d.ts +1 -0
  698. package/lib/node_modules/@pneuma/runtime/core/tools/command-runner.js +1 -0
  699. package/lib/node_modules/@pneuma/runtime/core/tools/fs-tools.d.ts +1 -0
  700. package/lib/node_modules/@pneuma/runtime/core/tools/fs-tools.js +1 -0
  701. package/lib/node_modules/@pneuma/runtime/core/tools/path-args.d.ts +1 -0
  702. package/lib/node_modules/@pneuma/runtime/core/tools/path-args.js +1 -0
  703. package/lib/node_modules/@pneuma/runtime/core/tools/sandbox-args.d.ts +1 -0
  704. package/lib/node_modules/@pneuma/runtime/core/tools/sandbox-args.js +1 -0
  705. package/lib/node_modules/@pneuma/runtime/core/tools.d.ts +1 -0
  706. package/lib/node_modules/@pneuma/runtime/core/tools.js +1 -0
  707. package/lib/node_modules/@pneuma/runtime/core/transcript-text.d.ts +1 -0
  708. package/lib/node_modules/@pneuma/runtime/core/transcript-text.js +1 -0
  709. package/lib/node_modules/@pneuma/runtime/core/ui-boot-source.d.ts +1 -0
  710. package/lib/node_modules/@pneuma/runtime/core/ui-boot-source.js +1 -0
  711. package/lib/node_modules/@pneuma/runtime/core/ui-bundles.d.ts +1 -0
  712. package/lib/node_modules/@pneuma/runtime/core/ui-bundles.js +1 -0
  713. package/lib/node_modules/@pneuma/runtime/core/ui-combo.d.ts +1 -0
  714. package/lib/node_modules/@pneuma/runtime/core/ui-combo.js +1 -0
  715. package/lib/node_modules/@pneuma/runtime/core/ui-events.d.ts +1 -0
  716. package/lib/node_modules/@pneuma/runtime/core/ui-events.js +1 -0
  717. package/lib/node_modules/@pneuma/runtime/core/ui-graph-frames.d.ts +1 -0
  718. package/lib/node_modules/@pneuma/runtime/core/ui-graph-frames.js +1 -0
  719. package/lib/node_modules/@pneuma/runtime/core/ui-hmr.d.ts +1 -0
  720. package/lib/node_modules/@pneuma/runtime/core/ui-hmr.js +1 -0
  721. package/lib/node_modules/@pneuma/runtime/core/ui-manifest.d.ts +1 -0
  722. package/lib/node_modules/@pneuma/runtime/core/ui-manifest.js +1 -0
  723. package/lib/node_modules/@pneuma/runtime/core/ui-methods.d.ts +1 -0
  724. package/lib/node_modules/@pneuma/runtime/core/ui-methods.js +1 -0
  725. package/lib/node_modules/@pneuma/runtime/core/ui-route.d.ts +1 -0
  726. package/lib/node_modules/@pneuma/runtime/core/ui-route.js +1 -0
  727. package/lib/node_modules/@pneuma/runtime/core/ui-server.d.ts +1 -0
  728. package/lib/node_modules/@pneuma/runtime/core/ui-server.js +1 -0
  729. package/lib/node_modules/@pneuma/runtime/core/ui-trust.d.ts +1 -0
  730. package/lib/node_modules/@pneuma/runtime/core/ui-trust.js +1 -0
  731. package/lib/node_modules/@pneuma/runtime/core/unified-diff.d.ts +1 -0
  732. package/lib/node_modules/@pneuma/runtime/core/unified-diff.js +1 -0
  733. package/lib/node_modules/@pneuma/runtime/core/untrusted.d.ts +1 -0
  734. package/lib/node_modules/@pneuma/runtime/core/untrusted.js +1 -0
  735. package/lib/node_modules/@pneuma/runtime/core/update-check.d.ts +1 -0
  736. package/lib/node_modules/@pneuma/runtime/core/update-check.js +1 -0
  737. package/lib/node_modules/@pneuma/runtime/core/usage-log.d.ts +1 -0
  738. package/lib/node_modules/@pneuma/runtime/core/usage-log.js +1 -0
  739. package/lib/node_modules/@pneuma/runtime/core/version.d.ts +1 -0
  740. package/lib/node_modules/@pneuma/runtime/core/version.js +1 -0
  741. package/lib/node_modules/@pneuma/runtime/core/web-http.d.ts +1 -0
  742. package/lib/node_modules/@pneuma/runtime/core/web-http.js +1 -0
  743. package/lib/node_modules/@pneuma/runtime/core/web-static.d.ts +1 -0
  744. package/lib/node_modules/@pneuma/runtime/core/web-static.js +1 -0
  745. package/lib/node_modules/@pneuma/runtime/headless.d.ts +1 -0
  746. package/lib/node_modules/@pneuma/runtime/headless.js +1 -0
  747. package/lib/node_modules/@pneuma/runtime/package.json +11 -0
  748. package/lib/node_modules/@pneuma/runtime/services/types.d.ts +1 -0
  749. package/lib/node_modules/@pneuma/runtime/services/types.js +1 -0
  750. package/lib/node_modules/@pneuma/runtime-adapter/cordis.patch.yml +4 -0
  751. package/lib/node_modules/@pneuma/runtime-adapter/index.d.ts +1 -0
  752. package/lib/node_modules/@pneuma/runtime-adapter/index.js +1 -0
  753. package/lib/node_modules/@pneuma/runtime-adapter/locale/en.json +4 -0
  754. package/lib/node_modules/@pneuma/runtime-adapter/package.json +38 -0
  755. package/lib/node_modules/@pneuma/runtime-api/cordis.patch.yml +4 -0
  756. package/lib/node_modules/@pneuma/runtime-api/index.d.ts +1 -0
  757. package/lib/node_modules/@pneuma/runtime-api/index.js +1 -0
  758. package/lib/node_modules/@pneuma/runtime-api/inspect.d.ts +1 -0
  759. package/lib/node_modules/@pneuma/runtime-api/inspect.js +1 -0
  760. package/lib/node_modules/@pneuma/runtime-api/locale/en.json +4 -0
  761. package/lib/node_modules/@pneuma/runtime-api/package.json +38 -0
  762. package/lib/node_modules/@pneuma/sandbox/backends.d.ts +1 -0
  763. package/lib/node_modules/@pneuma/sandbox/backends.js +1 -0
  764. package/lib/node_modules/@pneuma/sandbox/cordis.patch.yml +4 -0
  765. package/lib/node_modules/@pneuma/sandbox/execpolicy.d.ts +1 -0
  766. package/lib/node_modules/@pneuma/sandbox/execpolicy.js +1 -0
  767. package/lib/node_modules/@pneuma/sandbox/index.d.ts +1 -0
  768. package/lib/node_modules/@pneuma/sandbox/index.js +1 -0
  769. package/lib/node_modules/@pneuma/sandbox/locale/en.json +4 -0
  770. package/lib/node_modules/@pneuma/sandbox/locale/ui.en.json +78 -0
  771. package/lib/node_modules/@pneuma/sandbox/locale/ui.zh.json +78 -0
  772. package/lib/node_modules/@pneuma/sandbox/net-proxy.d.ts +1 -0
  773. package/lib/node_modules/@pneuma/sandbox/net-proxy.js +1 -0
  774. package/lib/node_modules/@pneuma/sandbox/package.json +40 -0
  775. package/lib/node_modules/@pneuma/sandbox/policy.d.ts +1 -0
  776. package/lib/node_modules/@pneuma/sandbox/policy.js +1 -0
  777. package/lib/node_modules/@pneuma/sandbox/review.d.ts +1 -0
  778. package/lib/node_modules/@pneuma/sandbox/review.js +1 -0
  779. package/lib/node_modules/@pneuma/sandbox/win/abi.d.ts +1 -0
  780. package/lib/node_modules/@pneuma/sandbox/win/abi.js +1 -0
  781. package/lib/node_modules/@pneuma/sandbox/win/account.d.ts +1 -0
  782. package/lib/node_modules/@pneuma/sandbox/win/account.js +1 -0
  783. package/lib/node_modules/@pneuma/sandbox/win/acl.d.ts +1 -0
  784. package/lib/node_modules/@pneuma/sandbox/win/acl.js +1 -0
  785. package/lib/node_modules/@pneuma/sandbox/win/backend.d.ts +1 -0
  786. package/lib/node_modules/@pneuma/sandbox/win/backend.js +1 -0
  787. package/lib/node_modules/@pneuma/sandbox/win/doctor.d.ts +1 -0
  788. package/lib/node_modules/@pneuma/sandbox/win/doctor.js +1 -0
  789. package/lib/node_modules/@pneuma/sandbox/win/ffi.d.ts +1 -0
  790. package/lib/node_modules/@pneuma/sandbox/win/ffi.js +1 -0
  791. package/lib/node_modules/@pneuma/sandbox/win/interpreter.d.ts +1 -0
  792. package/lib/node_modules/@pneuma/sandbox/win/interpreter.js +1 -0
  793. package/lib/node_modules/@pneuma/sandbox/win/net-abi.d.ts +1 -0
  794. package/lib/node_modules/@pneuma/sandbox/win/net-abi.js +1 -0
  795. package/lib/node_modules/@pneuma/sandbox/win/runner-entry.d.ts +1 -0
  796. package/lib/node_modules/@pneuma/sandbox/win/runner-entry.js +1 -0
  797. package/lib/node_modules/@pneuma/sandbox/win/setup.d.ts +1 -0
  798. package/lib/node_modules/@pneuma/sandbox/win/setup.js +1 -0
  799. package/lib/node_modules/@pneuma/sandbox/win/sweep.d.ts +1 -0
  800. package/lib/node_modules/@pneuma/sandbox/win/sweep.js +1 -0
  801. package/lib/node_modules/@pneuma/sandbox/win/token.d.ts +1 -0
  802. package/lib/node_modules/@pneuma/sandbox/win/token.js +1 -0
  803. package/lib/node_modules/@pneuma/sandbox/win/utf16.d.ts +1 -0
  804. package/lib/node_modules/@pneuma/sandbox/win/utf16.js +1 -0
  805. package/lib/node_modules/@pneuma/sandbox/win/wfp.d.ts +1 -0
  806. package/lib/node_modules/@pneuma/sandbox/win/wfp.js +1 -0
  807. package/lib/node_modules/@pneuma/sandbox/win/workspace-sid.d.ts +1 -0
  808. package/lib/node_modules/@pneuma/sandbox/win/workspace-sid.js +1 -0
  809. package/lib/node_modules/@pneuma/schedule/cordis.patch.yml +5 -0
  810. package/lib/node_modules/@pneuma/schedule/index.d.ts +1 -0
  811. package/lib/node_modules/@pneuma/schedule/index.js +1 -0
  812. package/lib/node_modules/@pneuma/schedule/locale/en.json +4 -0
  813. package/lib/node_modules/@pneuma/schedule/locale/ui.en.json +29 -0
  814. package/lib/node_modules/@pneuma/schedule/locale/ui.zh.json +29 -0
  815. package/lib/node_modules/@pneuma/schedule/package.json +40 -0
  816. package/lib/node_modules/@pneuma/self-improve/cordis.patch.yml +5 -0
  817. package/lib/node_modules/@pneuma/self-improve/index.d.ts +1 -0
  818. package/lib/node_modules/@pneuma/self-improve/index.js +1 -0
  819. package/lib/node_modules/@pneuma/self-improve/ledger.d.ts +1 -0
  820. package/lib/node_modules/@pneuma/self-improve/ledger.js +1 -0
  821. package/lib/node_modules/@pneuma/self-improve/locale/en.json +4 -0
  822. package/lib/node_modules/@pneuma/self-improve/locale/ui.en.json +31 -0
  823. package/lib/node_modules/@pneuma/self-improve/locale/ui.zh.json +31 -0
  824. package/lib/node_modules/@pneuma/self-improve/package.json +41 -0
  825. package/lib/node_modules/@pneuma/self-improve/skill-write.d.ts +1 -0
  826. package/lib/node_modules/@pneuma/self-improve/skill-write.js +1 -0
  827. package/lib/node_modules/@pneuma/self-improve/store.d.ts +1 -0
  828. package/lib/node_modules/@pneuma/self-improve/store.js +1 -0
  829. package/lib/node_modules/@pneuma/session/cordis.patch.yml +4 -0
  830. package/lib/node_modules/@pneuma/session/index.d.ts +1 -0
  831. package/lib/node_modules/@pneuma/session/index.js +1 -0
  832. package/lib/node_modules/@pneuma/session/locale/en.json +4 -0
  833. package/lib/node_modules/@pneuma/session/package.json +38 -0
  834. package/lib/node_modules/@pneuma/session-core/compact.d.ts +1 -0
  835. package/lib/node_modules/@pneuma/session-core/compact.js +1 -0
  836. package/lib/node_modules/@pneuma/session-core/hooks.d.ts +1 -0
  837. package/lib/node_modules/@pneuma/session-core/hooks.js +1 -0
  838. package/lib/node_modules/@pneuma/session-core/index.d.ts +1 -0
  839. package/lib/node_modules/@pneuma/session-core/index.js +1 -0
  840. package/lib/node_modules/@pneuma/session-core/locale/en.json +4 -0
  841. package/lib/node_modules/@pneuma/session-core/loop.d.ts +1 -0
  842. package/lib/node_modules/@pneuma/session-core/loop.js +1 -0
  843. package/lib/node_modules/@pneuma/session-core/modes.d.ts +1 -0
  844. package/lib/node_modules/@pneuma/session-core/modes.js +1 -0
  845. package/lib/node_modules/@pneuma/session-core/package.json +38 -0
  846. package/lib/node_modules/@pneuma/session-core/prompt.d.ts +1 -0
  847. package/lib/node_modules/@pneuma/session-core/prompt.js +1 -0
  848. package/lib/node_modules/@pneuma/session-search/cordis.patch.yml +4 -0
  849. package/lib/node_modules/@pneuma/session-search/index.d.ts +1 -0
  850. package/lib/node_modules/@pneuma/session-search/index.js +1 -0
  851. package/lib/node_modules/@pneuma/session-search/locale/en.json +4 -0
  852. package/lib/node_modules/@pneuma/session-search/locale/ui.en.json +29 -0
  853. package/lib/node_modules/@pneuma/session-search/locale/ui.zh.json +29 -0
  854. package/lib/node_modules/@pneuma/session-search/package.json +40 -0
  855. package/lib/node_modules/@pneuma/session-search/session-index.d.ts +1 -0
  856. package/lib/node_modules/@pneuma/session-search/session-index.js +1 -0
  857. package/lib/node_modules/@pneuma/session-title/cordis.patch.yml +4 -0
  858. package/lib/node_modules/@pneuma/session-title/index.d.ts +1 -0
  859. package/lib/node_modules/@pneuma/session-title/index.js +1 -0
  860. package/lib/node_modules/@pneuma/session-title/locale/en.json +4 -0
  861. package/lib/node_modules/@pneuma/session-title/package.json +38 -0
  862. package/lib/node_modules/@pneuma/settings/connection-test.d.ts +1 -0
  863. package/lib/node_modules/@pneuma/settings/connection-test.js +1 -0
  864. package/lib/node_modules/@pneuma/settings/cordis.patch.yml +4 -0
  865. package/lib/node_modules/@pneuma/settings/index.d.ts +1 -0
  866. package/lib/node_modules/@pneuma/settings/index.js +1 -0
  867. package/lib/node_modules/@pneuma/settings/locale/en.json +4 -0
  868. package/lib/node_modules/@pneuma/settings/locale/ui.en.json +94 -0
  869. package/lib/node_modules/@pneuma/settings/locale/ui.zh.json +94 -0
  870. package/lib/node_modules/@pneuma/settings/model-discovery.d.ts +1 -0
  871. package/lib/node_modules/@pneuma/settings/model-discovery.js +1 -0
  872. package/lib/node_modules/@pneuma/settings/package.json +38 -0
  873. package/lib/node_modules/@pneuma/skills/cordis.patch.yml +4 -0
  874. package/lib/node_modules/@pneuma/skills/index.d.ts +1 -0
  875. package/lib/node_modules/@pneuma/skills/index.js +1 -0
  876. package/lib/node_modules/@pneuma/skills/locale/en.json +4 -0
  877. package/lib/node_modules/@pneuma/skills/package.json +38 -0
  878. package/lib/node_modules/@pneuma/spill/cordis.patch.yml +4 -0
  879. package/lib/node_modules/@pneuma/spill/index.d.ts +1 -0
  880. package/lib/node_modules/@pneuma/spill/index.js +1 -0
  881. package/lib/node_modules/@pneuma/spill/locale/en.json +4 -0
  882. package/lib/node_modules/@pneuma/spill/locale/ui.en.json +31 -0
  883. package/lib/node_modules/@pneuma/spill/locale/ui.zh.json +31 -0
  884. package/lib/node_modules/@pneuma/spill/package.json +40 -0
  885. package/lib/node_modules/@pneuma/subagent/agent-roles.d.ts +1 -0
  886. package/lib/node_modules/@pneuma/subagent/agent-roles.js +1 -0
  887. package/lib/node_modules/@pneuma/subagent/board-snapshot.d.ts +1 -0
  888. package/lib/node_modules/@pneuma/subagent/board-snapshot.js +1 -0
  889. package/lib/node_modules/@pneuma/subagent/cordis.patch.yml +5 -0
  890. package/lib/node_modules/@pneuma/subagent/index.d.ts +1 -0
  891. package/lib/node_modules/@pneuma/subagent/index.js +1 -0
  892. package/lib/node_modules/@pneuma/subagent/locale/en.json +4 -0
  893. package/lib/node_modules/@pneuma/subagent/locale/ui.en.json +51 -0
  894. package/lib/node_modules/@pneuma/subagent/locale/ui.zh.json +51 -0
  895. package/lib/node_modules/@pneuma/subagent/package.json +40 -0
  896. package/lib/node_modules/@pneuma/superagent/app/api.d.ts +1 -0
  897. package/lib/node_modules/@pneuma/superagent/app/api.js +1 -0
  898. package/lib/node_modules/@pneuma/superagent/app/assessment.d.ts +1 -0
  899. package/lib/node_modules/@pneuma/superagent/app/assessment.js +1 -0
  900. package/lib/node_modules/@pneuma/superagent/app/cache.d.ts +1 -0
  901. package/lib/node_modules/@pneuma/superagent/app/cache.js +1 -0
  902. package/lib/node_modules/@pneuma/superagent/app/cards.d.ts +1 -0
  903. package/lib/node_modules/@pneuma/superagent/app/cards.js +1 -0
  904. package/lib/node_modules/@pneuma/superagent/app/context.d.ts +1 -0
  905. package/lib/node_modules/@pneuma/superagent/app/context.js +1 -0
  906. package/lib/node_modules/@pneuma/superagent/app/delivery.d.ts +1 -0
  907. package/lib/node_modules/@pneuma/superagent/app/delivery.js +1 -0
  908. package/lib/node_modules/@pneuma/superagent/app/effects.d.ts +1 -0
  909. package/lib/node_modules/@pneuma/superagent/app/effects.js +1 -0
  910. package/lib/node_modules/@pneuma/superagent/app/execution-environment.d.ts +1 -0
  911. package/lib/node_modules/@pneuma/superagent/app/execution-environment.js +1 -0
  912. package/lib/node_modules/@pneuma/superagent/app/links.d.ts +1 -0
  913. package/lib/node_modules/@pneuma/superagent/app/links.js +1 -0
  914. package/lib/node_modules/@pneuma/superagent/app/migration.d.ts +1 -0
  915. package/lib/node_modules/@pneuma/superagent/app/migration.js +1 -0
  916. package/lib/node_modules/@pneuma/superagent/app/notices.d.ts +1 -0
  917. package/lib/node_modules/@pneuma/superagent/app/notices.js +1 -0
  918. package/lib/node_modules/@pneuma/superagent/app/outbox.d.ts +1 -0
  919. package/lib/node_modules/@pneuma/superagent/app/outbox.js +1 -0
  920. package/lib/node_modules/@pneuma/superagent/app/passes.d.ts +1 -0
  921. package/lib/node_modules/@pneuma/superagent/app/passes.js +1 -0
  922. package/lib/node_modules/@pneuma/superagent/app/prompts.d.ts +1 -0
  923. package/lib/node_modules/@pneuma/superagent/app/prompts.js +1 -0
  924. package/lib/node_modules/@pneuma/superagent/app/resources.d.ts +1 -0
  925. package/lib/node_modules/@pneuma/superagent/app/resources.js +1 -0
  926. package/lib/node_modules/@pneuma/superagent/app/retry-health.d.ts +1 -0
  927. package/lib/node_modules/@pneuma/superagent/app/retry-health.js +1 -0
  928. package/lib/node_modules/@pneuma/superagent/app/role-models.d.ts +1 -0
  929. package/lib/node_modules/@pneuma/superagent/app/role-models.js +1 -0
  930. package/lib/node_modules/@pneuma/superagent/app/runtime.d.ts +1 -0
  931. package/lib/node_modules/@pneuma/superagent/app/runtime.js +1 -0
  932. package/lib/node_modules/@pneuma/superagent/app/sessions.d.ts +1 -0
  933. package/lib/node_modules/@pneuma/superagent/app/sessions.js +1 -0
  934. package/lib/node_modules/@pneuma/superagent/app/settings-history.d.ts +1 -0
  935. package/lib/node_modules/@pneuma/superagent/app/settings-history.js +1 -0
  936. package/lib/node_modules/@pneuma/superagent/app/settings.d.ts +1 -0
  937. package/lib/node_modules/@pneuma/superagent/app/settings.js +1 -0
  938. package/lib/node_modules/@pneuma/superagent/app/setup.d.ts +1 -0
  939. package/lib/node_modules/@pneuma/superagent/app/setup.js +1 -0
  940. package/lib/node_modules/@pneuma/superagent/app/skill-files.d.ts +1 -0
  941. package/lib/node_modules/@pneuma/superagent/app/skill-files.js +1 -0
  942. package/lib/node_modules/@pneuma/superagent/app/source-context.d.ts +1 -0
  943. package/lib/node_modules/@pneuma/superagent/app/source-context.js +1 -0
  944. package/lib/node_modules/@pneuma/superagent/app/store-read.d.ts +1 -0
  945. package/lib/node_modules/@pneuma/superagent/app/store-read.js +1 -0
  946. package/lib/node_modules/@pneuma/superagent/app/store.d.ts +1 -0
  947. package/lib/node_modules/@pneuma/superagent/app/store.js +1 -0
  948. package/lib/node_modules/@pneuma/superagent/app/tools/executor.d.ts +1 -0
  949. package/lib/node_modules/@pneuma/superagent/app/tools/executor.js +1 -0
  950. package/lib/node_modules/@pneuma/superagent/app/tools/main.d.ts +1 -0
  951. package/lib/node_modules/@pneuma/superagent/app/tools/main.js +1 -0
  952. package/lib/node_modules/@pneuma/superagent/app/tools/tool.d.ts +1 -0
  953. package/lib/node_modules/@pneuma/superagent/app/tools/tool.js +1 -0
  954. package/lib/node_modules/@pneuma/superagent/app/versions.d.ts +1 -0
  955. package/lib/node_modules/@pneuma/superagent/app/versions.js +1 -0
  956. package/lib/node_modules/@pneuma/superagent/app/views/overview.d.ts +1 -0
  957. package/lib/node_modules/@pneuma/superagent/app/views/overview.js +1 -0
  958. package/lib/node_modules/@pneuma/superagent/app/views/records.d.ts +1 -0
  959. package/lib/node_modules/@pneuma/superagent/app/views/records.js +1 -0
  960. package/lib/node_modules/@pneuma/superagent/app/views/settings.d.ts +1 -0
  961. package/lib/node_modules/@pneuma/superagent/app/views/settings.js +1 -0
  962. package/lib/node_modules/@pneuma/superagent/app/views/sources.d.ts +1 -0
  963. package/lib/node_modules/@pneuma/superagent/app/views/sources.js +1 -0
  964. package/lib/node_modules/@pneuma/superagent/app/views/text.d.ts +1 -0
  965. package/lib/node_modules/@pneuma/superagent/app/views/text.js +1 -0
  966. package/lib/node_modules/@pneuma/superagent/app/views/threads.d.ts +1 -0
  967. package/lib/node_modules/@pneuma/superagent/app/views/threads.js +1 -0
  968. package/lib/node_modules/@pneuma/superagent/app/views/tickets.d.ts +1 -0
  969. package/lib/node_modules/@pneuma/superagent/app/views/tickets.js +1 -0
  970. package/lib/node_modules/@pneuma/superagent/cordis.patch.yml +7 -0
  971. package/lib/node_modules/@pneuma/superagent/core/admission.d.ts +1 -0
  972. package/lib/node_modules/@pneuma/superagent/core/admission.js +1 -0
  973. package/lib/node_modules/@pneuma/superagent/core/assignments.d.ts +1 -0
  974. package/lib/node_modules/@pneuma/superagent/core/assignments.js +1 -0
  975. package/lib/node_modules/@pneuma/superagent/core/engine.d.ts +1 -0
  976. package/lib/node_modules/@pneuma/superagent/core/engine.js +1 -0
  977. package/lib/node_modules/@pneuma/superagent/core/errors.d.ts +1 -0
  978. package/lib/node_modules/@pneuma/superagent/core/errors.js +1 -0
  979. package/lib/node_modules/@pneuma/superagent/core/evals.d.ts +1 -0
  980. package/lib/node_modules/@pneuma/superagent/core/evals.js +1 -0
  981. package/lib/node_modules/@pneuma/superagent/core/ids.d.ts +1 -0
  982. package/lib/node_modules/@pneuma/superagent/core/ids.js +1 -0
  983. package/lib/node_modules/@pneuma/superagent/core/index.d.ts +1 -0
  984. package/lib/node_modules/@pneuma/superagent/core/index.js +1 -0
  985. package/lib/node_modules/@pneuma/superagent/core/intake.d.ts +1 -0
  986. package/lib/node_modules/@pneuma/superagent/core/intake.js +1 -0
  987. package/lib/node_modules/@pneuma/superagent/core/limits.d.ts +1 -0
  988. package/lib/node_modules/@pneuma/superagent/core/limits.js +1 -0
  989. package/lib/node_modules/@pneuma/superagent/core/memory.d.ts +1 -0
  990. package/lib/node_modules/@pneuma/superagent/core/memory.js +1 -0
  991. package/lib/node_modules/@pneuma/superagent/core/model.d.ts +1 -0
  992. package/lib/node_modules/@pneuma/superagent/core/model.js +1 -0
  993. package/lib/node_modules/@pneuma/superagent/core/part.d.ts +1 -0
  994. package/lib/node_modules/@pneuma/superagent/core/part.js +1 -0
  995. package/lib/node_modules/@pneuma/superagent/core/policy.d.ts +1 -0
  996. package/lib/node_modules/@pneuma/superagent/core/policy.js +1 -0
  997. package/lib/node_modules/@pneuma/superagent/core/ports.d.ts +1 -0
  998. package/lib/node_modules/@pneuma/superagent/core/ports.js +1 -0
  999. package/lib/node_modules/@pneuma/superagent/core/reasons.d.ts +1 -0
  1000. package/lib/node_modules/@pneuma/superagent/core/reasons.js +1 -0
  1001. package/lib/node_modules/@pneuma/superagent/core/replies.d.ts +1 -0
  1002. package/lib/node_modules/@pneuma/superagent/core/replies.js +1 -0
  1003. package/lib/node_modules/@pneuma/superagent/core/stage.d.ts +1 -0
  1004. package/lib/node_modules/@pneuma/superagent/core/stage.js +1 -0
  1005. package/lib/node_modules/@pneuma/superagent/core/tickets.d.ts +1 -0
  1006. package/lib/node_modules/@pneuma/superagent/core/tickets.js +1 -0
  1007. package/lib/node_modules/@pneuma/superagent/deployment.d.ts +1 -0
  1008. package/lib/node_modules/@pneuma/superagent/deployment.js +1 -0
  1009. package/lib/node_modules/@pneuma/superagent/executor/background.d.ts +1 -0
  1010. package/lib/node_modules/@pneuma/superagent/executor/background.js +1 -0
  1011. package/lib/node_modules/@pneuma/superagent/executor/dsh.d.ts +1 -0
  1012. package/lib/node_modules/@pneuma/superagent/executor/dsh.js +1 -0
  1013. package/lib/node_modules/@pneuma/superagent/host/command.d.ts +1 -0
  1014. package/lib/node_modules/@pneuma/superagent/host/command.js +1 -0
  1015. package/lib/node_modules/@pneuma/superagent/host/health.d.ts +1 -0
  1016. package/lib/node_modules/@pneuma/superagent/host/health.js +1 -0
  1017. package/lib/node_modules/@pneuma/superagent/host/settings-section.d.ts +1 -0
  1018. package/lib/node_modules/@pneuma/superagent/host/settings-section.js +1 -0
  1019. package/lib/node_modules/@pneuma/superagent/index.d.ts +1 -0
  1020. package/lib/node_modules/@pneuma/superagent/index.js +1 -0
  1021. package/lib/node_modules/@pneuma/superagent/infra/commands.d.ts +1 -0
  1022. package/lib/node_modules/@pneuma/superagent/infra/commands.js +1 -0
  1023. package/lib/node_modules/@pneuma/superagent/infra/environment.d.ts +1 -0
  1024. package/lib/node_modules/@pneuma/superagent/infra/environment.js +1 -0
  1025. package/lib/node_modules/@pneuma/superagent/infra/health.d.ts +1 -0
  1026. package/lib/node_modules/@pneuma/superagent/infra/health.js +1 -0
  1027. package/lib/node_modules/@pneuma/superagent/infra/text.d.ts +1 -0
  1028. package/lib/node_modules/@pneuma/superagent/infra/text.js +1 -0
  1029. package/lib/node_modules/@pneuma/superagent/kv.d.ts +1 -0
  1030. package/lib/node_modules/@pneuma/superagent/kv.js +1 -0
  1031. package/lib/node_modules/@pneuma/superagent/locale/en.json +4 -0
  1032. package/lib/node_modules/@pneuma/superagent/locale/ui.en.json +26 -0
  1033. package/lib/node_modules/@pneuma/superagent/locale/ui.zh.json +26 -0
  1034. package/lib/node_modules/@pneuma/superagent/package.json +46 -0
  1035. package/lib/node_modules/@pneuma/superagent/paths.d.ts +1 -0
  1036. package/lib/node_modules/@pneuma/superagent/paths.js +1 -0
  1037. package/lib/node_modules/@pneuma/superagent/prompts/admission.md +68 -0
  1038. package/lib/node_modules/@pneuma/superagent/prompts/cli.md +17 -0
  1039. package/lib/node_modules/@pneuma/superagent/prompts/dispatch.md +59 -0
  1040. package/lib/node_modules/@pneuma/superagent/prompts/handoff-orchestrator.md +4 -0
  1041. package/lib/node_modules/@pneuma/superagent/prompts/handoff-worker.md +7 -0
  1042. package/lib/node_modules/@pneuma/superagent/prompts/handoff.md +6 -0
  1043. package/lib/node_modules/@pneuma/superagent/prompts/orchestrator.md +16 -0
  1044. package/lib/node_modules/@pneuma/superagent/prompts/replies.md +35 -0
  1045. package/lib/node_modules/@pneuma/superagent/prompts/shared.md +7 -0
  1046. package/lib/node_modules/@pneuma/superagent/prompts/subscriptions.md +13 -0
  1047. package/lib/node_modules/@pneuma/superagent/prompts/team/communication.md +97 -0
  1048. package/lib/node_modules/@pneuma/superagent/prompts/team/delivery.md +28 -0
  1049. package/lib/node_modules/@pneuma/superagent/prompts/team/scope.md +22 -0
  1050. package/lib/node_modules/@pneuma/superagent/prompts/work.md +49 -0
  1051. package/lib/node_modules/@pneuma/superagent/prompts/worker.md +10 -0
  1052. package/lib/node_modules/@pneuma/superagent/setup.d.ts +1 -0
  1053. package/lib/node_modules/@pneuma/superagent/setup.js +1 -0
  1054. package/lib/node_modules/@pneuma/superagent/skills/dsh-superagent-feishu/SKILL.md +12 -0
  1055. package/lib/node_modules/@pneuma/superagent/skills/dsh-superagent-github/SKILL.md +14 -0
  1056. package/lib/node_modules/@pneuma/superagent/sources/admission-context.d.ts +1 -0
  1057. package/lib/node_modules/@pneuma/superagent/sources/admission-context.js +1 -0
  1058. package/lib/node_modules/@pneuma/superagent/sources/feishu-channel.d.ts +1 -0
  1059. package/lib/node_modules/@pneuma/superagent/sources/feishu-channel.js +1 -0
  1060. package/lib/node_modules/@pneuma/superagent/sources/feishu-image.d.ts +1 -0
  1061. package/lib/node_modules/@pneuma/superagent/sources/feishu-image.js +1 -0
  1062. package/lib/node_modules/@pneuma/superagent/sources/feishu-loops.d.ts +1 -0
  1063. package/lib/node_modules/@pneuma/superagent/sources/feishu-loops.js +1 -0
  1064. package/lib/node_modules/@pneuma/superagent/sources/feishu-read.d.ts +1 -0
  1065. package/lib/node_modules/@pneuma/superagent/sources/feishu-read.js +1 -0
  1066. package/lib/node_modules/@pneuma/superagent/sources/feishu-trigger.d.ts +1 -0
  1067. package/lib/node_modules/@pneuma/superagent/sources/feishu-trigger.js +1 -0
  1068. package/lib/node_modules/@pneuma/superagent/sources/feishu.d.ts +1 -0
  1069. package/lib/node_modules/@pneuma/superagent/sources/feishu.js +1 -0
  1070. package/lib/node_modules/@pneuma/superagent/sources/github-channel.d.ts +1 -0
  1071. package/lib/node_modules/@pneuma/superagent/sources/github-channel.js +1 -0
  1072. package/lib/node_modules/@pneuma/superagent/sources/github-pull.d.ts +1 -0
  1073. package/lib/node_modules/@pneuma/superagent/sources/github-pull.js +1 -0
  1074. package/lib/node_modules/@pneuma/superagent/sources/github-read.d.ts +1 -0
  1075. package/lib/node_modules/@pneuma/superagent/sources/github-read.js +1 -0
  1076. package/lib/node_modules/@pneuma/superagent/sources/github-trigger.d.ts +1 -0
  1077. package/lib/node_modules/@pneuma/superagent/sources/github-trigger.js +1 -0
  1078. package/lib/node_modules/@pneuma/superagent/sources/github.d.ts +1 -0
  1079. package/lib/node_modules/@pneuma/superagent/sources/github.js +1 -0
  1080. package/lib/node_modules/@pneuma/superagent/sources/host.d.ts +1 -0
  1081. package/lib/node_modules/@pneuma/superagent/sources/host.js +1 -0
  1082. package/lib/node_modules/@pneuma/superagent/sources/kind.d.ts +1 -0
  1083. package/lib/node_modules/@pneuma/superagent/sources/kind.js +1 -0
  1084. package/lib/node_modules/@pneuma/superagent/sources/poll.d.ts +1 -0
  1085. package/lib/node_modules/@pneuma/superagent/sources/poll.js +1 -0
  1086. package/lib/node_modules/@pneuma/superagent/sources/registry.d.ts +1 -0
  1087. package/lib/node_modules/@pneuma/superagent/sources/registry.js +1 -0
  1088. package/lib/node_modules/@pneuma/superagent-webhook/cordis.patch.yml +9 -0
  1089. package/lib/node_modules/@pneuma/superagent-webhook/index.d.ts +1 -0
  1090. package/lib/node_modules/@pneuma/superagent-webhook/index.js +1 -0
  1091. package/lib/node_modules/@pneuma/superagent-webhook/locale/en.json +4 -0
  1092. package/lib/node_modules/@pneuma/superagent-webhook/package.json +39 -0
  1093. package/lib/node_modules/@pneuma/superagent-webhook/tests/settings-contract.d.ts +1 -0
  1094. package/lib/node_modules/@pneuma/superagent-webhook/tests/settings-contract.js +1 -0
  1095. package/lib/node_modules/@pneuma/superagent-webhook/webhook.d.ts +1 -0
  1096. package/lib/node_modules/@pneuma/superagent-webhook/webhook.js +1 -0
  1097. package/lib/node_modules/@pneuma/surfaces/cordis.patch.yml +4 -0
  1098. package/lib/node_modules/@pneuma/surfaces/index.d.ts +1 -0
  1099. package/lib/node_modules/@pneuma/surfaces/index.js +1 -0
  1100. package/lib/node_modules/@pneuma/surfaces/locale/en.json +4 -0
  1101. package/lib/node_modules/@pneuma/surfaces/package.json +38 -0
  1102. package/lib/node_modules/@pneuma/surfaces/surface-registry.d.ts +1 -0
  1103. package/lib/node_modules/@pneuma/surfaces/surface-registry.js +1 -0
  1104. package/lib/node_modules/@pneuma/todo/cordis.patch.yml +4 -0
  1105. package/lib/node_modules/@pneuma/todo/index.d.ts +1 -0
  1106. package/lib/node_modules/@pneuma/todo/index.js +1 -0
  1107. package/lib/node_modules/@pneuma/todo/locale/en.json +4 -0
  1108. package/lib/node_modules/@pneuma/todo/locale/ui.en.json +11 -0
  1109. package/lib/node_modules/@pneuma/todo/locale/ui.zh.json +11 -0
  1110. package/lib/node_modules/@pneuma/todo/package.json +39 -0
  1111. package/lib/node_modules/@pneuma/todo/todo.d.ts +1 -0
  1112. package/lib/node_modules/@pneuma/todo/todo.js +1 -0
  1113. package/lib/node_modules/@pneuma/tool-search/cordis.patch.yml +5 -0
  1114. package/lib/node_modules/@pneuma/tool-search/index.d.ts +1 -0
  1115. package/lib/node_modules/@pneuma/tool-search/index.js +1 -0
  1116. package/lib/node_modules/@pneuma/tool-search/locale/en.json +4 -0
  1117. package/lib/node_modules/@pneuma/tool-search/locale/ui.en.json +36 -0
  1118. package/lib/node_modules/@pneuma/tool-search/locale/ui.zh.json +36 -0
  1119. package/lib/node_modules/@pneuma/tool-search/package.json +40 -0
  1120. package/lib/node_modules/@pneuma/tool-search/tool-search.d.ts +1 -0
  1121. package/lib/node_modules/@pneuma/tool-search/tool-search.js +1 -0
  1122. package/lib/node_modules/@pneuma/tools/cordis.patch.yml +4 -0
  1123. package/lib/node_modules/@pneuma/tools/index.d.ts +1 -0
  1124. package/lib/node_modules/@pneuma/tools/index.js +1 -0
  1125. package/lib/node_modules/@pneuma/tools/locale/en.json +4 -0
  1126. package/lib/node_modules/@pneuma/tools/package.json +38 -0
  1127. package/lib/node_modules/@pneuma/tools-default/bash.d.ts +1 -0
  1128. package/lib/node_modules/@pneuma/tools-default/bash.js +1 -0
  1129. package/lib/node_modules/@pneuma/tools-default/cordis.patch.yml +4 -0
  1130. package/lib/node_modules/@pneuma/tools-default/image-tool.d.ts +1 -0
  1131. package/lib/node_modules/@pneuma/tools-default/image-tool.js +1 -0
  1132. package/lib/node_modules/@pneuma/tools-default/index.d.ts +1 -0
  1133. package/lib/node_modules/@pneuma/tools-default/index.js +1 -0
  1134. package/lib/node_modules/@pneuma/tools-default/locale/en.json +4 -0
  1135. package/lib/node_modules/@pneuma/tools-default/locale/ui.en.json +27 -0
  1136. package/lib/node_modules/@pneuma/tools-default/locale/ui.zh.json +27 -0
  1137. package/lib/node_modules/@pneuma/tools-default/package.json +39 -0
  1138. package/lib/node_modules/@pneuma/tools-default/persistent-shell.d.ts +1 -0
  1139. package/lib/node_modules/@pneuma/tools-default/persistent-shell.js +1 -0
  1140. package/lib/node_modules/@pneuma/tools-default/search-tools.d.ts +1 -0
  1141. package/lib/node_modules/@pneuma/tools-default/search-tools.js +1 -0
  1142. package/lib/node_modules/@pneuma/transcript/cordis.patch.yml +4 -0
  1143. package/lib/node_modules/@pneuma/transcript/index.d.ts +1 -0
  1144. package/lib/node_modules/@pneuma/transcript/index.js +1 -0
  1145. package/lib/node_modules/@pneuma/transcript/locale/en.json +4 -0
  1146. package/lib/node_modules/@pneuma/transcript/package.json +38 -0
  1147. package/lib/node_modules/@pneuma/tui/app/AgentsOverlay.d.ts +1 -0
  1148. package/lib/node_modules/@pneuma/tui/app/AgentsOverlay.js +1 -0
  1149. package/lib/node_modules/@pneuma/tui/app/App.d.ts +1 -0
  1150. package/lib/node_modules/@pneuma/tui/app/App.js +1 -0
  1151. package/lib/node_modules/@pneuma/tui/app/ApprovalCard.d.ts +1 -0
  1152. package/lib/node_modules/@pneuma/tui/app/ApprovalCard.js +1 -0
  1153. package/lib/node_modules/@pneuma/tui/app/AskCard.d.ts +1 -0
  1154. package/lib/node_modules/@pneuma/tui/app/AskCard.js +1 -0
  1155. package/lib/node_modules/@pneuma/tui/app/ChatView.d.ts +1 -0
  1156. package/lib/node_modules/@pneuma/tui/app/ChatView.js +1 -0
  1157. package/lib/node_modules/@pneuma/tui/app/Composer.d.ts +1 -0
  1158. package/lib/node_modules/@pneuma/tui/app/Composer.js +1 -0
  1159. package/lib/node_modules/@pneuma/tui/app/DiffBlock.d.ts +1 -0
  1160. package/lib/node_modules/@pneuma/tui/app/DiffBlock.js +1 -0
  1161. package/lib/node_modules/@pneuma/tui/app/MarkdownView.d.ts +1 -0
  1162. package/lib/node_modules/@pneuma/tui/app/MarkdownView.js +1 -0
  1163. package/lib/node_modules/@pneuma/tui/app/ModelPicker.d.ts +1 -0
  1164. package/lib/node_modules/@pneuma/tui/app/ModelPicker.js +1 -0
  1165. package/lib/node_modules/@pneuma/tui/app/PickerFrame.d.ts +1 -0
  1166. package/lib/node_modules/@pneuma/tui/app/PickerFrame.js +1 -0
  1167. package/lib/node_modules/@pneuma/tui/app/PlanReviewCard.d.ts +1 -0
  1168. package/lib/node_modules/@pneuma/tui/app/PlanReviewCard.js +1 -0
  1169. package/lib/node_modules/@pneuma/tui/app/PresetPicker.d.ts +1 -0
  1170. package/lib/node_modules/@pneuma/tui/app/PresetPicker.js +1 -0
  1171. package/lib/node_modules/@pneuma/tui/app/PreviewOverlay.d.ts +1 -0
  1172. package/lib/node_modules/@pneuma/tui/app/PreviewOverlay.js +1 -0
  1173. package/lib/node_modules/@pneuma/tui/app/SessionPicker.d.ts +1 -0
  1174. package/lib/node_modules/@pneuma/tui/app/SessionPicker.js +1 -0
  1175. package/lib/node_modules/@pneuma/tui/app/SettingsOverlay.d.ts +1 -0
  1176. package/lib/node_modules/@pneuma/tui/app/SettingsOverlay.js +1 -0
  1177. package/lib/node_modules/@pneuma/tui/app/SkillsPicker.d.ts +1 -0
  1178. package/lib/node_modules/@pneuma/tui/app/SkillsPicker.js +1 -0
  1179. package/lib/node_modules/@pneuma/tui/app/StatusBar.d.ts +1 -0
  1180. package/lib/node_modules/@pneuma/tui/app/StatusBar.js +1 -0
  1181. package/lib/node_modules/@pneuma/tui/app/TaskStrips.d.ts +1 -0
  1182. package/lib/node_modules/@pneuma/tui/app/TaskStrips.js +1 -0
  1183. package/lib/node_modules/@pneuma/tui/app/TimelineRail.d.ts +1 -0
  1184. package/lib/node_modules/@pneuma/tui/app/TimelineRail.js +1 -0
  1185. package/lib/node_modules/@pneuma/tui/app/ToolCard.d.ts +1 -0
  1186. package/lib/node_modules/@pneuma/tui/app/ToolCard.js +1 -0
  1187. package/lib/node_modules/@pneuma/tui/app/TranscriptOverlay.d.ts +1 -0
  1188. package/lib/node_modules/@pneuma/tui/app/TranscriptOverlay.js +1 -0
  1189. package/lib/node_modules/@pneuma/tui/app/TranscriptViewport.d.ts +1 -0
  1190. package/lib/node_modules/@pneuma/tui/app/TranscriptViewport.js +1 -0
  1191. package/lib/node_modules/@pneuma/tui/app/Welcome.d.ts +1 -0
  1192. package/lib/node_modules/@pneuma/tui/app/Welcome.js +1 -0
  1193. package/lib/node_modules/@pneuma/tui/app/attach.d.ts +1 -0
  1194. package/lib/node_modules/@pneuma/tui/app/attach.js +1 -0
  1195. package/lib/node_modules/@pneuma/tui/app/click.d.ts +1 -0
  1196. package/lib/node_modules/@pneuma/tui/app/click.js +1 -0
  1197. package/lib/node_modules/@pneuma/tui/app/clipboard-image.d.ts +1 -0
  1198. package/lib/node_modules/@pneuma/tui/app/clipboard-image.js +1 -0
  1199. package/lib/node_modules/@pneuma/tui/app/cursor.d.ts +1 -0
  1200. package/lib/node_modules/@pneuma/tui/app/cursor.js +1 -0
  1201. package/lib/node_modules/@pneuma/tui/app/display-width.d.ts +1 -0
  1202. package/lib/node_modules/@pneuma/tui/app/display-width.js +1 -0
  1203. package/lib/node_modules/@pneuma/tui/app/history-store.d.ts +1 -0
  1204. package/lib/node_modules/@pneuma/tui/app/history-store.js +1 -0
  1205. package/lib/node_modules/@pneuma/tui/app/image-blocks.d.ts +1 -0
  1206. package/lib/node_modules/@pneuma/tui/app/image-blocks.js +1 -0
  1207. package/lib/node_modules/@pneuma/tui/app/keymap.d.ts +1 -0
  1208. package/lib/node_modules/@pneuma/tui/app/keymap.js +1 -0
  1209. package/lib/node_modules/@pneuma/tui/app/markdown.d.ts +1 -0
  1210. package/lib/node_modules/@pneuma/tui/app/markdown.js +1 -0
  1211. package/lib/node_modules/@pneuma/tui/app/mouse.d.ts +1 -0
  1212. package/lib/node_modules/@pneuma/tui/app/mouse.js +1 -0
  1213. package/lib/node_modules/@pneuma/tui/app/pointer.d.ts +1 -0
  1214. package/lib/node_modules/@pneuma/tui/app/pointer.js +1 -0
  1215. package/lib/node_modules/@pneuma/tui/app/scroll-model.d.ts +1 -0
  1216. package/lib/node_modules/@pneuma/tui/app/scroll-model.js +1 -0
  1217. package/lib/node_modules/@pneuma/tui/app/settings-model.d.ts +1 -0
  1218. package/lib/node_modules/@pneuma/tui/app/settings-model.js +1 -0
  1219. package/lib/node_modules/@pneuma/tui/app/snapshot-subscribe.d.ts +1 -0
  1220. package/lib/node_modules/@pneuma/tui/app/snapshot-subscribe.js +1 -0
  1221. package/lib/node_modules/@pneuma/tui/app/theme.d.ts +1 -0
  1222. package/lib/node_modules/@pneuma/tui/app/theme.js +1 -0
  1223. package/lib/node_modules/@pneuma/tui/app/ticker.d.ts +1 -0
  1224. package/lib/node_modules/@pneuma/tui/app/ticker.js +1 -0
  1225. package/lib/node_modules/@pneuma/tui/cordis.patch.yml +4 -0
  1226. package/lib/node_modules/@pneuma/tui/index.d.ts +1 -0
  1227. package/lib/node_modules/@pneuma/tui/index.js +1 -0
  1228. package/lib/node_modules/@pneuma/tui/locale/en.json +4 -0
  1229. package/lib/node_modules/@pneuma/tui/package.json +38 -0
  1230. package/lib/node_modules/@pneuma/ui-actions/cordis.patch.yml +5 -0
  1231. package/lib/node_modules/@pneuma/ui-actions/index.d.ts +1 -0
  1232. package/lib/node_modules/@pneuma/ui-actions/index.js +1 -0
  1233. package/lib/node_modules/@pneuma/ui-actions/locale/en.json +4 -0
  1234. package/lib/node_modules/@pneuma/ui-actions/locale/ui.en.json +3 -0
  1235. package/lib/node_modules/@pneuma/ui-actions/locale/ui.zh.json +3 -0
  1236. package/lib/node_modules/@pneuma/ui-actions/package.json +43 -0
  1237. package/lib/node_modules/@pneuma/ui-ask/cordis.patch.yml +5 -0
  1238. package/lib/node_modules/@pneuma/ui-ask/index.d.ts +1 -0
  1239. package/lib/node_modules/@pneuma/ui-ask/index.js +1 -0
  1240. package/lib/node_modules/@pneuma/ui-ask/locale/en.json +4 -0
  1241. package/lib/node_modules/@pneuma/ui-ask/locale/ui.en.json +28 -0
  1242. package/lib/node_modules/@pneuma/ui-ask/locale/ui.zh.json +28 -0
  1243. package/lib/node_modules/@pneuma/ui-ask/package.json +43 -0
  1244. package/lib/node_modules/@pneuma/ui-boot/index.d.ts +1 -0
  1245. package/lib/node_modules/@pneuma/ui-boot/index.js +1 -0
  1246. package/lib/node_modules/@pneuma/ui-boot/locale/en.json +4 -0
  1247. package/lib/node_modules/@pneuma/ui-boot/locale/ui.en.json +28 -0
  1248. package/lib/node_modules/@pneuma/ui-boot/locale/ui.zh.json +28 -0
  1249. package/lib/node_modules/@pneuma/ui-boot/package.json +38 -0
  1250. package/lib/node_modules/@pneuma/ui-browser/cordis.patch.yml +5 -0
  1251. package/lib/node_modules/@pneuma/ui-browser/index.d.ts +1 -0
  1252. package/lib/node_modules/@pneuma/ui-browser/index.js +1 -0
  1253. package/lib/node_modules/@pneuma/ui-browser/locale/en.json +4 -0
  1254. package/lib/node_modules/@pneuma/ui-browser/locale/ui.en.json +17 -0
  1255. package/lib/node_modules/@pneuma/ui-browser/locale/ui.zh.json +17 -0
  1256. package/lib/node_modules/@pneuma/ui-browser/package.json +43 -0
  1257. package/lib/node_modules/@pneuma/ui-composer/cordis.patch.yml +5 -0
  1258. package/lib/node_modules/@pneuma/ui-composer/index.d.ts +1 -0
  1259. package/lib/node_modules/@pneuma/ui-composer/index.js +1 -0
  1260. package/lib/node_modules/@pneuma/ui-composer/locale/en.json +4 -0
  1261. package/lib/node_modules/@pneuma/ui-composer/locale/ui.en.json +161 -0
  1262. package/lib/node_modules/@pneuma/ui-composer/locale/ui.zh.json +161 -0
  1263. package/lib/node_modules/@pneuma/ui-composer/package.json +44 -0
  1264. package/lib/node_modules/@pneuma/ui-core/arrival.d.ts +1 -0
  1265. package/lib/node_modules/@pneuma/ui-core/arrival.js +1 -0
  1266. package/lib/node_modules/@pneuma/ui-core/frames.d.ts +1 -0
  1267. package/lib/node_modules/@pneuma/ui-core/frames.js +1 -0
  1268. package/lib/node_modules/@pneuma/ui-core/i18n.d.ts +1 -0
  1269. package/lib/node_modules/@pneuma/ui-core/i18n.js +1 -0
  1270. package/lib/node_modules/@pneuma/ui-core/index.d.ts +1 -0
  1271. package/lib/node_modules/@pneuma/ui-core/index.js +1 -0
  1272. package/lib/node_modules/@pneuma/ui-core/locale/en.json +4 -0
  1273. package/lib/node_modules/@pneuma/ui-core/package.json +37 -0
  1274. package/lib/node_modules/@pneuma/ui-core/plugin.d.ts +1 -0
  1275. package/lib/node_modules/@pneuma/ui-core/plugin.js +1 -0
  1276. package/lib/node_modules/@pneuma/ui-core/scoped-slots.d.ts +1 -0
  1277. package/lib/node_modules/@pneuma/ui-core/scoped-slots.js +1 -0
  1278. package/lib/node_modules/@pneuma/ui-core/services-react.d.ts +1 -0
  1279. package/lib/node_modules/@pneuma/ui-core/services-react.js +1 -0
  1280. package/lib/node_modules/@pneuma/ui-core/services.d.ts +1 -0
  1281. package/lib/node_modules/@pneuma/ui-core/services.js +1 -0
  1282. package/lib/node_modules/@pneuma/ui-core/signal.d.ts +1 -0
  1283. package/lib/node_modules/@pneuma/ui-core/signal.js +1 -0
  1284. package/lib/node_modules/@pneuma/ui-core/slots-ink.d.ts +1 -0
  1285. package/lib/node_modules/@pneuma/ui-core/slots-ink.js +1 -0
  1286. package/lib/node_modules/@pneuma/ui-core/slots-react.d.ts +1 -0
  1287. package/lib/node_modules/@pneuma/ui-core/slots-react.js +1 -0
  1288. package/lib/node_modules/@pneuma/ui-core/slots.d.ts +1 -0
  1289. package/lib/node_modules/@pneuma/ui-core/slots.js +1 -0
  1290. package/lib/node_modules/@pneuma/ui-core/store.d.ts +1 -0
  1291. package/lib/node_modules/@pneuma/ui-core/store.js +1 -0
  1292. package/lib/node_modules/@pneuma/ui-core/tui-plugin-api.d.ts +1 -0
  1293. package/lib/node_modules/@pneuma/ui-core/tui-plugin-api.js +1 -0
  1294. package/lib/node_modules/@pneuma/ui-core/tui-plugins.d.ts +1 -0
  1295. package/lib/node_modules/@pneuma/ui-core/tui-plugins.js +1 -0
  1296. package/lib/node_modules/@pneuma/ui-dockkit/index.d.ts +1 -0
  1297. package/lib/node_modules/@pneuma/ui-dockkit/index.js +1 -0
  1298. package/lib/node_modules/@pneuma/ui-dockkit/locale/en.json +4 -0
  1299. package/lib/node_modules/@pneuma/ui-dockkit/locale/ui.en.json +21 -0
  1300. package/lib/node_modules/@pneuma/ui-dockkit/locale/ui.zh.json +21 -0
  1301. package/lib/node_modules/@pneuma/ui-dockkit/package.json +33 -0
  1302. package/lib/node_modules/@pneuma/ui-files/cordis.patch.yml +5 -0
  1303. package/lib/node_modules/@pneuma/ui-files/index.d.ts +1 -0
  1304. package/lib/node_modules/@pneuma/ui-files/index.js +1 -0
  1305. package/lib/node_modules/@pneuma/ui-files/locale/en.json +4 -0
  1306. package/lib/node_modules/@pneuma/ui-files/locale/ui.en.json +43 -0
  1307. package/lib/node_modules/@pneuma/ui-files/locale/ui.zh.json +43 -0
  1308. package/lib/node_modules/@pneuma/ui-files/package.json +43 -0
  1309. package/lib/node_modules/@pneuma/ui-layout/cordis.patch.yml +7 -0
  1310. package/lib/node_modules/@pneuma/ui-layout/index.d.ts +1 -0
  1311. package/lib/node_modules/@pneuma/ui-layout/index.js +1 -0
  1312. package/lib/node_modules/@pneuma/ui-layout/locale/en.json +4 -0
  1313. package/lib/node_modules/@pneuma/ui-layout/locale/ui.en.json +112 -0
  1314. package/lib/node_modules/@pneuma/ui-layout/locale/ui.zh.json +112 -0
  1315. package/lib/node_modules/@pneuma/ui-layout/package.json +44 -0
  1316. package/lib/node_modules/@pneuma/ui-palette/cordis.patch.yml +5 -0
  1317. package/lib/node_modules/@pneuma/ui-palette/index.d.ts +1 -0
  1318. package/lib/node_modules/@pneuma/ui-palette/index.js +1 -0
  1319. package/lib/node_modules/@pneuma/ui-palette/locale/en.json +4 -0
  1320. package/lib/node_modules/@pneuma/ui-palette/locale/ui.en.json +35 -0
  1321. package/lib/node_modules/@pneuma/ui-palette/locale/ui.zh.json +35 -0
  1322. package/lib/node_modules/@pneuma/ui-palette/package.json +43 -0
  1323. package/lib/node_modules/@pneuma/ui-plugins/cordis.patch.yml +5 -0
  1324. package/lib/node_modules/@pneuma/ui-plugins/index.d.ts +1 -0
  1325. package/lib/node_modules/@pneuma/ui-plugins/index.js +1 -0
  1326. package/lib/node_modules/@pneuma/ui-plugins/locale/en.json +4 -0
  1327. package/lib/node_modules/@pneuma/ui-plugins/locale/ui.en.json +134 -0
  1328. package/lib/node_modules/@pneuma/ui-plugins/locale/ui.zh.json +134 -0
  1329. package/lib/node_modules/@pneuma/ui-plugins/package.json +43 -0
  1330. package/lib/node_modules/@pneuma/ui-preview/cordis.patch.yml +5 -0
  1331. package/lib/node_modules/@pneuma/ui-preview/index.d.ts +1 -0
  1332. package/lib/node_modules/@pneuma/ui-preview/index.js +1 -0
  1333. package/lib/node_modules/@pneuma/ui-preview/locale/en.json +4 -0
  1334. package/lib/node_modules/@pneuma/ui-preview/locale/ui.en.json +29 -0
  1335. package/lib/node_modules/@pneuma/ui-preview/locale/ui.zh.json +29 -0
  1336. package/lib/node_modules/@pneuma/ui-preview/package.json +43 -0
  1337. package/lib/node_modules/@pneuma/ui-primitives/index.d.ts +1 -0
  1338. package/lib/node_modules/@pneuma/ui-primitives/index.js +1 -0
  1339. package/lib/node_modules/@pneuma/ui-primitives/locale/en.json +4 -0
  1340. package/lib/node_modules/@pneuma/ui-primitives/locale/ui.en.json +167 -0
  1341. package/lib/node_modules/@pneuma/ui-primitives/locale/ui.zh.json +167 -0
  1342. package/lib/node_modules/@pneuma/ui-primitives/package.json +33 -0
  1343. package/lib/node_modules/@pneuma/ui-prompt/cordis.patch.yml +5 -0
  1344. package/lib/node_modules/@pneuma/ui-prompt/index.d.ts +1 -0
  1345. package/lib/node_modules/@pneuma/ui-prompt/index.js +1 -0
  1346. package/lib/node_modules/@pneuma/ui-prompt/locale/en.json +4 -0
  1347. package/lib/node_modules/@pneuma/ui-prompt/locale/ui.en.json +73 -0
  1348. package/lib/node_modules/@pneuma/ui-prompt/locale/ui.zh.json +73 -0
  1349. package/lib/node_modules/@pneuma/ui-prompt/package.json +43 -0
  1350. package/lib/node_modules/@pneuma/ui-renderer/cordis.patch.yml +7 -0
  1351. package/lib/node_modules/@pneuma/ui-renderer/index.d.ts +1 -0
  1352. package/lib/node_modules/@pneuma/ui-renderer/index.js +1 -0
  1353. package/lib/node_modules/@pneuma/ui-renderer/locale/en.json +4 -0
  1354. package/lib/node_modules/@pneuma/ui-renderer/locale/ui.en.json +14 -0
  1355. package/lib/node_modules/@pneuma/ui-renderer/locale/ui.zh.json +14 -0
  1356. package/lib/node_modules/@pneuma/ui-renderer/package.json +45 -0
  1357. package/lib/node_modules/@pneuma/ui-runtime/index.d.ts +1 -0
  1358. package/lib/node_modules/@pneuma/ui-runtime/index.js +1 -0
  1359. package/lib/node_modules/@pneuma/ui-runtime/locale/en.json +4 -0
  1360. package/lib/node_modules/@pneuma/ui-runtime/locale/ui.en.json +5 -0
  1361. package/lib/node_modules/@pneuma/ui-runtime/locale/ui.zh.json +5 -0
  1362. package/lib/node_modules/@pneuma/ui-runtime/package.json +33 -0
  1363. package/lib/node_modules/@pneuma/ui-sessions/cordis.patch.yml +5 -0
  1364. package/lib/node_modules/@pneuma/ui-sessions/index.d.ts +1 -0
  1365. package/lib/node_modules/@pneuma/ui-sessions/index.js +1 -0
  1366. package/lib/node_modules/@pneuma/ui-sessions/locale/en.json +4 -0
  1367. package/lib/node_modules/@pneuma/ui-sessions/locale/ui.en.json +119 -0
  1368. package/lib/node_modules/@pneuma/ui-sessions/locale/ui.zh.json +119 -0
  1369. package/lib/node_modules/@pneuma/ui-sessions/package.json +43 -0
  1370. package/lib/node_modules/@pneuma/ui-settings/cordis.patch.yml +5 -0
  1371. package/lib/node_modules/@pneuma/ui-settings/index.d.ts +1 -0
  1372. package/lib/node_modules/@pneuma/ui-settings/index.js +1 -0
  1373. package/lib/node_modules/@pneuma/ui-settings/locale/en.json +4 -0
  1374. package/lib/node_modules/@pneuma/ui-settings/locale/ui.en.json +490 -0
  1375. package/lib/node_modules/@pneuma/ui-settings/locale/ui.zh.json +490 -0
  1376. package/lib/node_modules/@pneuma/ui-settings/package.json +43 -0
  1377. package/lib/node_modules/@pneuma/ui-skills/cordis.patch.yml +5 -0
  1378. package/lib/node_modules/@pneuma/ui-skills/index.d.ts +1 -0
  1379. package/lib/node_modules/@pneuma/ui-skills/index.js +1 -0
  1380. package/lib/node_modules/@pneuma/ui-skills/locale/en.json +4 -0
  1381. package/lib/node_modules/@pneuma/ui-skills/locale/ui.en.json +93 -0
  1382. package/lib/node_modules/@pneuma/ui-skills/locale/ui.zh.json +93 -0
  1383. package/lib/node_modules/@pneuma/ui-skills/package.json +43 -0
  1384. package/lib/node_modules/@pneuma/ui-slots/index.d.ts +1 -0
  1385. package/lib/node_modules/@pneuma/ui-slots/index.js +1 -0
  1386. package/lib/node_modules/@pneuma/ui-slots/locale/en.json +4 -0
  1387. package/lib/node_modules/@pneuma/ui-slots/locale/ui.en.json +4 -0
  1388. package/lib/node_modules/@pneuma/ui-slots/locale/ui.zh.json +4 -0
  1389. package/lib/node_modules/@pneuma/ui-slots/package.json +33 -0
  1390. package/lib/node_modules/@pneuma/ui-status/cordis.patch.yml +5 -0
  1391. package/lib/node_modules/@pneuma/ui-status/index.d.ts +1 -0
  1392. package/lib/node_modules/@pneuma/ui-status/index.js +1 -0
  1393. package/lib/node_modules/@pneuma/ui-status/locale/en.json +4 -0
  1394. package/lib/node_modules/@pneuma/ui-status/locale/ui.en.json +134 -0
  1395. package/lib/node_modules/@pneuma/ui-status/locale/ui.zh.json +134 -0
  1396. package/lib/node_modules/@pneuma/ui-status/package.json +43 -0
  1397. package/lib/node_modules/@pneuma/ui-statusbar/cordis.patch.yml +5 -0
  1398. package/lib/node_modules/@pneuma/ui-statusbar/index.d.ts +1 -0
  1399. package/lib/node_modules/@pneuma/ui-statusbar/index.js +1 -0
  1400. package/lib/node_modules/@pneuma/ui-statusbar/locale/en.json +4 -0
  1401. package/lib/node_modules/@pneuma/ui-statusbar/locale/ui.en.json +33 -0
  1402. package/lib/node_modules/@pneuma/ui-statusbar/locale/ui.zh.json +33 -0
  1403. package/lib/node_modules/@pneuma/ui-statusbar/package.json +44 -0
  1404. package/lib/node_modules/@pneuma/ui-superagent/cordis.patch.yml +10 -0
  1405. package/lib/node_modules/@pneuma/ui-superagent/index.d.ts +1 -0
  1406. package/lib/node_modules/@pneuma/ui-superagent/index.js +1 -0
  1407. package/lib/node_modules/@pneuma/ui-superagent/locale/en.json +4 -0
  1408. package/lib/node_modules/@pneuma/ui-superagent/locale/ui.en.json +117 -0
  1409. package/lib/node_modules/@pneuma/ui-superagent/locale/ui.zh.json +117 -0
  1410. package/lib/node_modules/@pneuma/ui-superagent/package.json +43 -0
  1411. package/lib/node_modules/@pneuma/ui-tasks/cordis.patch.yml +5 -0
  1412. package/lib/node_modules/@pneuma/ui-tasks/index.d.ts +1 -0
  1413. package/lib/node_modules/@pneuma/ui-tasks/index.js +1 -0
  1414. package/lib/node_modules/@pneuma/ui-tasks/locale/en.json +4 -0
  1415. package/lib/node_modules/@pneuma/ui-tasks/locale/ui.en.json +22 -0
  1416. package/lib/node_modules/@pneuma/ui-tasks/locale/ui.zh.json +22 -0
  1417. package/lib/node_modules/@pneuma/ui-tasks/package.json +43 -0
  1418. package/lib/node_modules/@pneuma/ui-team/cordis.patch.yml +5 -0
  1419. package/lib/node_modules/@pneuma/ui-team/index.d.ts +1 -0
  1420. package/lib/node_modules/@pneuma/ui-team/index.js +1 -0
  1421. package/lib/node_modules/@pneuma/ui-team/locale/en.json +4 -0
  1422. package/lib/node_modules/@pneuma/ui-team/locale/ui.en.json +19 -0
  1423. package/lib/node_modules/@pneuma/ui-team/locale/ui.zh.json +19 -0
  1424. package/lib/node_modules/@pneuma/ui-team/package.json +43 -0
  1425. package/lib/node_modules/@pneuma/ui-terminal/cordis.patch.yml +5 -0
  1426. package/lib/node_modules/@pneuma/ui-terminal/index.d.ts +1 -0
  1427. package/lib/node_modules/@pneuma/ui-terminal/index.js +1 -0
  1428. package/lib/node_modules/@pneuma/ui-terminal/locale/en.json +4 -0
  1429. package/lib/node_modules/@pneuma/ui-terminal/locale/ui.en.json +9 -0
  1430. package/lib/node_modules/@pneuma/ui-terminal/locale/ui.zh.json +9 -0
  1431. package/lib/node_modules/@pneuma/ui-terminal/package.json +43 -0
  1432. package/lib/node_modules/@pneuma/ui-trace/cordis.patch.yml +5 -0
  1433. package/lib/node_modules/@pneuma/ui-trace/index.d.ts +1 -0
  1434. package/lib/node_modules/@pneuma/ui-trace/index.js +1 -0
  1435. package/lib/node_modules/@pneuma/ui-trace/locale/en.json +4 -0
  1436. package/lib/node_modules/@pneuma/ui-trace/locale/ui.en.json +118 -0
  1437. package/lib/node_modules/@pneuma/ui-trace/locale/ui.zh.json +118 -0
  1438. package/lib/node_modules/@pneuma/ui-trace/package.json +46 -0
  1439. package/lib/node_modules/@pneuma/ui-transcript/cordis.patch.yml +4 -0
  1440. package/lib/node_modules/@pneuma/ui-transcript/index.d.ts +1 -0
  1441. package/lib/node_modules/@pneuma/ui-transcript/index.js +1 -0
  1442. package/lib/node_modules/@pneuma/ui-transcript/locale/en.json +4 -0
  1443. package/lib/node_modules/@pneuma/ui-transcript/locale/ui.en.json +281 -0
  1444. package/lib/node_modules/@pneuma/ui-transcript/locale/ui.zh.json +281 -0
  1445. package/lib/node_modules/@pneuma/ui-transcript/package.json +43 -0
  1446. package/lib/node_modules/@pneuma/waiting/cordis.patch.yml +4 -0
  1447. package/lib/node_modules/@pneuma/waiting/index.d.ts +1 -0
  1448. package/lib/node_modules/@pneuma/waiting/index.js +1 -0
  1449. package/lib/node_modules/@pneuma/waiting/locale/en.json +4 -0
  1450. package/lib/node_modules/@pneuma/waiting/package.json +38 -0
  1451. package/lib/node_modules/@pneuma/web-fetch/cordis.patch.yml +4 -0
  1452. package/lib/node_modules/@pneuma/web-fetch/html.d.ts +1 -0
  1453. package/lib/node_modules/@pneuma/web-fetch/html.js +1 -0
  1454. package/lib/node_modules/@pneuma/web-fetch/http.d.ts +1 -0
  1455. package/lib/node_modules/@pneuma/web-fetch/http.js +1 -0
  1456. package/lib/node_modules/@pneuma/web-fetch/index.d.ts +1 -0
  1457. package/lib/node_modules/@pneuma/web-fetch/index.js +1 -0
  1458. package/lib/node_modules/@pneuma/web-fetch/locale/en.json +4 -0
  1459. package/lib/node_modules/@pneuma/web-fetch/locale/ui.en.json +14 -0
  1460. package/lib/node_modules/@pneuma/web-fetch/locale/ui.zh.json +14 -0
  1461. package/lib/node_modules/@pneuma/web-fetch/package.json +40 -0
  1462. package/lib/node_modules/@pneuma/web-search/cordis.patch.yml +4 -0
  1463. package/lib/node_modules/@pneuma/web-search/index.d.ts +1 -0
  1464. package/lib/node_modules/@pneuma/web-search/index.js +1 -0
  1465. package/lib/node_modules/@pneuma/web-search/locale/en.json +4 -0
  1466. package/lib/node_modules/@pneuma/web-search/locale/ui.en.json +30 -0
  1467. package/lib/node_modules/@pneuma/web-search/locale/ui.zh.json +30 -0
  1468. package/lib/node_modules/@pneuma/web-search/package.json +40 -0
  1469. package/lib/node_modules/@pneuma/webserver/cordis.patch.yml +4 -0
  1470. package/lib/node_modules/@pneuma/webserver/index.d.ts +1 -0
  1471. package/lib/node_modules/@pneuma/webserver/index.js +1 -0
  1472. package/lib/node_modules/@pneuma/webserver/locale/en.json +4 -0
  1473. package/lib/node_modules/@pneuma/webserver/package.json +38 -0
  1474. package/lib/packages/agent/cache-probe.d.ts +56 -0
  1475. package/lib/packages/agent/cache-probe.js +169 -0
  1476. package/lib/packages/agent/index.d.ts +21 -0
  1477. package/lib/packages/agent/index.js +511 -0
  1478. package/lib/packages/agent/locale/en.json +4 -0
  1479. package/lib/packages/approval/approval.d.ts +11 -0
  1480. package/lib/packages/approval/approval.js +11 -0
  1481. package/lib/packages/approval/call-meaning.js +347 -0
  1482. package/lib/packages/approval/index.d.ts +26 -0
  1483. package/lib/packages/approval/index.js +1413 -0
  1484. package/lib/packages/approval/locale/en.json +4 -0
  1485. package/lib/packages/approval-floor/approval-floor.d.ts +192 -0
  1486. package/lib/packages/approval-floor/approval-floor.js +851 -0
  1487. package/lib/packages/approval-floor/index.js +236 -0
  1488. package/lib/packages/approval-floor/locale/en.json +4 -0
  1489. package/lib/packages/approval-floor/locale/ui.en.json +28 -0
  1490. package/lib/packages/approval-floor/locale/ui.zh.json +28 -0
  1491. package/lib/packages/ask/index.js +298 -0
  1492. package/lib/packages/ask/locale/en.json +4 -0
  1493. package/lib/packages/browser/index.d.ts +72 -0
  1494. package/lib/packages/browser/index.js +1286 -0
  1495. package/lib/packages/browser/locale/en.json +4 -0
  1496. package/lib/packages/browser/locale/ui.en.json +61 -0
  1497. package/lib/packages/browser/locale/ui.zh.json +61 -0
  1498. package/lib/packages/cdp/actions.js +655 -0
  1499. package/lib/packages/cdp/cloud-metadata.d.ts +9 -0
  1500. package/lib/packages/cdp/cloud-metadata.js +16 -0
  1501. package/lib/packages/cdp/index.d.ts +21 -0
  1502. package/lib/packages/cdp/index.js +21 -0
  1503. package/lib/packages/cdp/launch.js +491 -0
  1504. package/lib/packages/cdp/locale/en.json +4 -0
  1505. package/lib/packages/cdp/report.d.ts +42 -0
  1506. package/lib/packages/cdp/report.js +76 -0
  1507. package/lib/packages/cdp/ring-buffer.d.ts +25 -0
  1508. package/lib/packages/cdp/ring-buffer.js +44 -0
  1509. package/lib/packages/cdp/snapshot.d.ts +139 -0
  1510. package/lib/packages/cdp/snapshot.js +312 -0
  1511. package/lib/packages/cdp/transport.d.ts +147 -0
  1512. package/lib/packages/cdp/transport.js +359 -0
  1513. package/lib/packages/checkpoint/index.d.ts +21 -0
  1514. package/lib/packages/checkpoint/index.js +360 -0
  1515. package/lib/packages/checkpoint/locale/en.json +4 -0
  1516. package/lib/packages/checkpoint/locale/ui.en.json +15 -0
  1517. package/lib/packages/checkpoint/locale/ui.zh.json +15 -0
  1518. package/lib/packages/checkpoint/shadow.d.ts +166 -0
  1519. package/lib/packages/checkpoint/shadow.js +832 -0
  1520. package/lib/packages/cli/config-cli.js +89 -0
  1521. package/lib/packages/cli/index.d.ts +20 -0
  1522. package/lib/packages/cli/index.js +18 -0
  1523. package/lib/packages/cli/locale/en.json +4 -0
  1524. package/lib/packages/cli/plugin-cli.js +626 -0
  1525. package/lib/packages/cli/pnpm-builds.d.ts +26 -0
  1526. package/lib/packages/cli/pnpm-builds.js +68 -0
  1527. package/lib/packages/commands/index.d.ts +28 -0
  1528. package/lib/packages/commands/index.js +620 -0
  1529. package/lib/packages/commands/locale/en.json +4 -0
  1530. package/lib/packages/commands/session-export.d.ts +18 -0
  1531. package/lib/packages/commands/session-export.js +73 -0
  1532. package/lib/packages/commands-core/commands-completion.d.ts +106 -0
  1533. package/lib/packages/commands-core/commands-completion.js +245 -0
  1534. package/lib/packages/commands-core/index.d.ts +16 -0
  1535. package/lib/packages/commands-core/index.js +16 -0
  1536. package/lib/packages/commands-core/locale/en.json +4 -0
  1537. package/lib/packages/compact/index.d.ts +21 -0
  1538. package/lib/packages/compact/index.js +457 -0
  1539. package/lib/packages/compact/locale/en.json +4 -0
  1540. package/lib/packages/compact/locale/ui.en.json +24 -0
  1541. package/lib/packages/compact/locale/ui.zh.json +24 -0
  1542. package/lib/packages/computer-use/desktop-control.d.ts +298 -0
  1543. package/lib/packages/computer-use/desktop-control.js +1309 -0
  1544. package/lib/packages/computer-use/index.d.ts +47 -0
  1545. package/lib/packages/computer-use/index.js +564 -0
  1546. package/lib/packages/computer-use/locale/en.json +4 -0
  1547. package/lib/packages/computer-use/locale/ui.en.json +41 -0
  1548. package/lib/packages/computer-use/locale/ui.zh.json +41 -0
  1549. package/lib/packages/config-core/index.d.ts +15 -0
  1550. package/lib/packages/config-core/index.js +15 -0
  1551. package/lib/packages/config-core/locale/en.json +4 -0
  1552. package/lib/packages/config-core/market.d.ts +107 -0
  1553. package/lib/packages/config-core/market.js +730 -0
  1554. package/lib/packages/config-core/presets.d.ts +104 -0
  1555. package/lib/packages/config-core/presets.js +423 -0
  1556. package/lib/packages/desktop-dock/index.d.ts +13 -0
  1557. package/lib/packages/desktop-dock/index.js +719 -0
  1558. package/lib/packages/desktop-dock/locale/en.json +4 -0
  1559. package/lib/packages/desktop-dock/locale/ui.en.json +11 -0
  1560. package/lib/packages/desktop-dock/locale/ui.zh.json +11 -0
  1561. package/lib/packages/dock-browser/index.d.ts +38 -0
  1562. package/lib/packages/dock-browser/index.js +898 -0
  1563. package/lib/packages/dock-browser/locale/en.json +4 -0
  1564. package/lib/packages/dock-browser/locale/ui.en.json +10 -0
  1565. package/lib/packages/dock-browser/locale/ui.zh.json +10 -0
  1566. package/lib/packages/doctor/bundle.d.ts +93 -0
  1567. package/lib/packages/doctor/bundle.js +159 -0
  1568. package/lib/packages/doctor/checks/data.d.ts +19 -0
  1569. package/lib/packages/doctor/checks/data.js +143 -0
  1570. package/lib/packages/doctor/checks/ecosystem.d.ts +12 -0
  1571. package/lib/packages/doctor/checks/ecosystem.js +125 -0
  1572. package/lib/packages/doctor/checks/environment.d.ts +9 -0
  1573. package/lib/packages/doctor/checks/environment.js +130 -0
  1574. package/lib/packages/doctor/checks/util.d.ts +27 -0
  1575. package/lib/packages/doctor/checks/util.js +100 -0
  1576. package/lib/packages/doctor/index.d.ts +26 -0
  1577. package/lib/packages/doctor/index.js +168 -0
  1578. package/lib/packages/doctor/locale/en.json +4 -0
  1579. package/lib/packages/dsh-compat/index.js +44 -0
  1580. package/lib/packages/dsh-compat/locale/en.json +4 -0
  1581. package/lib/packages/git/index.js +177 -0
  1582. package/lib/packages/git/locale/en.json +4 -0
  1583. package/lib/packages/goal/goal.d.ts +77 -0
  1584. package/lib/packages/goal/index.d.ts +22 -0
  1585. package/lib/packages/goal/index.js +333 -0
  1586. package/lib/packages/goal/locale/en.json +4 -0
  1587. package/lib/packages/goal/locale/ui.en.json +10 -0
  1588. package/lib/packages/goal/locale/ui.zh.json +10 -0
  1589. package/lib/packages/guards/index.js +22 -0
  1590. package/lib/packages/guards/locale/en.json +4 -0
  1591. package/lib/packages/hooks/index.d.ts +26 -0
  1592. package/lib/packages/hooks/index.js +966 -0
  1593. package/lib/packages/hooks/lifecycle-hooks.d.ts +217 -0
  1594. package/lib/packages/hooks/lifecycle-hooks.js +608 -0
  1595. package/lib/packages/hooks/locale/en.json +4 -0
  1596. package/lib/packages/hooks/locale/ui.en.json +111 -0
  1597. package/lib/packages/hooks/locale/ui.zh.json +111 -0
  1598. package/lib/packages/host-stdio/index.d.ts +88 -0
  1599. package/lib/packages/host-stdio/index.js +330 -0
  1600. package/lib/packages/host-stdio/locale/en.json +4 -0
  1601. package/lib/packages/image-diet/index.js +92 -0
  1602. package/lib/packages/image-diet/locale/en.json +4 -0
  1603. package/lib/packages/image-diet/locale/ui.en.json +14 -0
  1604. package/lib/packages/image-diet/locale/ui.zh.json +14 -0
  1605. package/lib/packages/llm/index.d.ts +13 -0
  1606. package/lib/packages/llm/index.js +275 -0
  1607. package/lib/packages/llm/locale/en.json +4 -0
  1608. package/lib/packages/log/filter.d.ts +37 -0
  1609. package/lib/packages/log/filter.js +43 -0
  1610. package/lib/packages/log/index.d.ts +30 -0
  1611. package/lib/packages/log/index.js +311 -0
  1612. package/lib/packages/log/locale/en.json +4 -0
  1613. package/lib/packages/log/locale/ui.en.json +30 -0
  1614. package/lib/packages/log/locale/ui.zh.json +30 -0
  1615. package/lib/packages/log/sink.d.ts +91 -0
  1616. package/lib/packages/log/sink.js +286 -0
  1617. package/lib/packages/lsp/client.js +703 -0
  1618. package/lib/packages/lsp/index.d.ts +54 -0
  1619. package/lib/packages/lsp/index.js +616 -0
  1620. package/lib/packages/lsp/locale/en.json +4 -0
  1621. package/lib/packages/lsp/locale/ui.en.json +17 -0
  1622. package/lib/packages/lsp/locale/ui.zh.json +17 -0
  1623. package/lib/packages/lsp/manager.js +418 -0
  1624. package/lib/packages/lsp/normalize.js +134 -0
  1625. package/lib/packages/lsp/servers.js +349 -0
  1626. package/lib/packages/mcp/index.js +717 -0
  1627. package/lib/packages/mcp/locale/en.json +4 -0
  1628. package/lib/packages/mcp/locale/ui.en.json +28 -0
  1629. package/lib/packages/mcp/locale/ui.zh.json +28 -0
  1630. package/lib/packages/mcp/mcp.d.ts +207 -0
  1631. package/lib/packages/mcp/mcp.js +807 -0
  1632. package/lib/packages/memory/index.d.ts +36 -0
  1633. package/lib/packages/memory/index.js +930 -0
  1634. package/lib/packages/memory/locale/en.json +4 -0
  1635. package/lib/packages/memory/locale/ui.en.json +67 -0
  1636. package/lib/packages/memory/locale/ui.zh.json +67 -0
  1637. package/lib/packages/memory/memory.d.ts +187 -0
  1638. package/lib/packages/memory/memory.js +704 -0
  1639. package/lib/packages/microcompact/index.d.ts +31 -0
  1640. package/lib/packages/microcompact/index.js +261 -0
  1641. package/lib/packages/microcompact/locale/en.json +4 -0
  1642. package/lib/packages/microcompact/locale/ui.en.json +20 -0
  1643. package/lib/packages/microcompact/locale/ui.zh.json +20 -0
  1644. package/lib/packages/microcompact/microcompact.d.ts +142 -0
  1645. package/lib/packages/microcompact/microcompact.js +268 -0
  1646. package/lib/packages/mode/index.d.ts +18 -0
  1647. package/lib/packages/mode/index.js +138 -0
  1648. package/lib/packages/mode/locale/en.json +4 -0
  1649. package/lib/packages/ops/index.d.ts +36 -0
  1650. package/lib/packages/ops/index.js +187 -0
  1651. package/lib/packages/ops/locale/en.json +4 -0
  1652. package/lib/packages/ops/locale/ui.en.json +21 -0
  1653. package/lib/packages/ops/locale/ui.zh.json +21 -0
  1654. package/lib/packages/ops/render.d.ts +43 -0
  1655. package/lib/packages/ops/render.js +324 -0
  1656. package/lib/packages/ops/tools.d.ts +17 -0
  1657. package/lib/packages/ops/tools.js +640 -0
  1658. package/lib/packages/ops/worker.d.ts +63 -0
  1659. package/lib/packages/ops/worker.js +294 -0
  1660. package/lib/packages/permission-core/index.d.ts +15 -0
  1661. package/lib/packages/permission-core/index.js +15 -0
  1662. package/lib/packages/permission-core/locale/en.json +4 -0
  1663. package/lib/packages/permission-core/permission-presets.d.ts +71 -0
  1664. package/lib/packages/permission-core/permission-scope.d.ts +65 -0
  1665. package/lib/packages/permission-core/permission-scope.js +109 -0
  1666. package/lib/packages/permission-presets/index.d.ts +19 -0
  1667. package/lib/packages/permission-presets/index.js +176 -0
  1668. package/lib/packages/permission-presets/locale/en.json +4 -0
  1669. package/lib/packages/permission-presets/locale/ui.en.json +10 -0
  1670. package/lib/packages/permission-presets/locale/ui.zh.json +10 -0
  1671. package/lib/packages/plan/index.js +261 -0
  1672. package/lib/packages/plan/locale/en.json +4 -0
  1673. package/lib/packages/plugin-manager/index.js +217 -0
  1674. package/lib/packages/plugin-manager/locale/en.json +4 -0
  1675. package/lib/packages/presets/index.js +243 -0
  1676. package/lib/packages/presets/locale/en.json +4 -0
  1677. package/lib/packages/presets/locale/ui.en.json +10 -0
  1678. package/lib/packages/presets/locale/ui.zh.json +10 -0
  1679. package/lib/packages/prompt/index.d.ts +25 -0
  1680. package/lib/packages/prompt/index.js +441 -0
  1681. package/lib/packages/prompt/locale/en.json +4 -0
  1682. package/lib/packages/prompt/tool-result-prune.d.ts +93 -0
  1683. package/lib/packages/prompt/tool-result-prune.js +212 -0
  1684. package/lib/packages/ptc/index.js +377 -0
  1685. package/lib/packages/ptc/locale/en.json +4 -0
  1686. package/lib/packages/remote/http.d.ts +11 -0
  1687. package/lib/packages/remote/http.js +11 -0
  1688. package/lib/packages/remote/index.d.ts +17 -0
  1689. package/lib/packages/remote/index.js +1189 -0
  1690. package/lib/packages/remote/locale/en.json +4 -0
  1691. package/lib/packages/remote/locale/ui.en.json +76 -0
  1692. package/lib/packages/remote/locale/ui.zh.json +76 -0
  1693. package/lib/packages/remote/routes.js +384 -0
  1694. package/lib/packages/remote/types.d.ts +135 -0
  1695. package/lib/packages/remote/types.js +102 -0
  1696. package/lib/packages/runtime/index.js +678 -0
  1697. package/lib/packages/runtime/locale/en.json +4 -0
  1698. package/lib/packages/runtime-api/index.js +126 -0
  1699. package/lib/packages/runtime-api/inspect.d.ts +29 -0
  1700. package/lib/packages/runtime-api/inspect.js +73 -0
  1701. package/lib/packages/runtime-api/locale/en.json +4 -0
  1702. package/lib/packages/sandbox/backends.d.ts +64 -0
  1703. package/lib/packages/sandbox/execpolicy.d.ts +74 -0
  1704. package/lib/packages/sandbox/execpolicy.js +244 -0
  1705. package/lib/packages/sandbox/index.js +1132 -0
  1706. package/lib/packages/sandbox/locale/en.json +4 -0
  1707. package/lib/packages/sandbox/locale/ui.en.json +78 -0
  1708. package/lib/packages/sandbox/locale/ui.zh.json +78 -0
  1709. package/lib/packages/sandbox/net-proxy.js +202 -0
  1710. package/lib/packages/sandbox/policy.d.ts +294 -0
  1711. package/lib/packages/sandbox/policy.js +674 -0
  1712. package/lib/packages/sandbox/review.d.ts +141 -0
  1713. package/lib/packages/sandbox/review.js +348 -0
  1714. package/lib/packages/sandbox/win/account.js +203 -0
  1715. package/lib/packages/sandbox/win/backend.d.ts +107 -0
  1716. package/lib/packages/sandbox/win/backend.js +425 -0
  1717. package/lib/packages/sandbox/win/doctor.js +269 -0
  1718. package/lib/packages/sandbox/win/ffi.d.ts +116 -0
  1719. package/lib/packages/sandbox/win/ffi.js +185 -0
  1720. package/lib/packages/sandbox/win/interpreter.d.ts +44 -0
  1721. package/lib/packages/sandbox/win/interpreter.js +47 -0
  1722. package/lib/packages/sandbox/win/runner-entry.d.ts +61 -0
  1723. package/lib/packages/sandbox/win/runner-entry.js +898 -0
  1724. package/lib/packages/sandbox/win/setup.d.ts +134 -0
  1725. package/lib/packages/sandbox/win/setup.js +1384 -0
  1726. package/lib/packages/sandbox/win/sweep.d.ts +36 -0
  1727. package/lib/packages/sandbox/win/sweep.js +115 -0
  1728. package/lib/packages/sandbox/win/wfp.js +197 -0
  1729. package/lib/packages/schedule/index.d.ts +41 -0
  1730. package/lib/packages/schedule/index.js +612 -0
  1731. package/lib/packages/schedule/locale/en.json +4 -0
  1732. package/lib/packages/schedule/locale/ui.en.json +29 -0
  1733. package/lib/packages/schedule/locale/ui.zh.json +29 -0
  1734. package/lib/packages/self-improve/index.d.ts +140 -0
  1735. package/lib/packages/self-improve/index.js +1312 -0
  1736. package/lib/packages/self-improve/ledger.d.ts +75 -0
  1737. package/lib/packages/self-improve/ledger.js +364 -0
  1738. package/lib/packages/self-improve/locale/en.json +4 -0
  1739. package/lib/packages/self-improve/locale/ui.en.json +31 -0
  1740. package/lib/packages/self-improve/locale/ui.zh.json +31 -0
  1741. package/lib/packages/self-improve/skill-write.d.ts +257 -0
  1742. package/lib/packages/self-improve/skill-write.js +890 -0
  1743. package/lib/packages/self-improve/store.js +266 -0
  1744. package/lib/packages/session/index.js +383 -0
  1745. package/lib/packages/session/locale/en.json +4 -0
  1746. package/lib/packages/session-core/compact.d.ts +140 -0
  1747. package/lib/packages/session-core/compact.js +282 -0
  1748. package/lib/packages/session-core/hooks.d.ts +289 -0
  1749. package/lib/packages/session-core/hooks.js +862 -0
  1750. package/lib/packages/session-core/index.d.ts +20 -0
  1751. package/lib/packages/session-core/index.js +20 -0
  1752. package/lib/packages/session-core/locale/en.json +4 -0
  1753. package/lib/packages/session-core/loop.d.ts +215 -0
  1754. package/lib/packages/session-core/loop.js +726 -0
  1755. package/lib/packages/session-core/modes.d.ts +72 -0
  1756. package/lib/packages/session-core/modes.js +152 -0
  1757. package/lib/packages/session-core/prompt.d.ts +124 -0
  1758. package/lib/packages/session-core/prompt.js +436 -0
  1759. package/lib/packages/session-search/index.js +323 -0
  1760. package/lib/packages/session-search/locale/en.json +4 -0
  1761. package/lib/packages/session-search/locale/ui.en.json +29 -0
  1762. package/lib/packages/session-search/locale/ui.zh.json +29 -0
  1763. package/lib/packages/session-search/session-index.js +849 -0
  1764. package/lib/packages/session-title/index.js +109 -0
  1765. package/lib/packages/session-title/locale/en.json +4 -0
  1766. package/lib/packages/settings/connection-test.d.ts +60 -0
  1767. package/lib/packages/settings/connection-test.js +84 -0
  1768. package/lib/packages/settings/index.d.ts +3 -0
  1769. package/lib/packages/settings/index.js +689 -0
  1770. package/lib/packages/settings/locale/en.json +4 -0
  1771. package/lib/packages/settings/locale/ui.en.json +94 -0
  1772. package/lib/packages/settings/locale/ui.zh.json +94 -0
  1773. package/lib/packages/skills/index.d.ts +13 -0
  1774. package/lib/packages/skills/index.js +499 -0
  1775. package/lib/packages/skills/locale/en.json +4 -0
  1776. package/lib/packages/spill/index.js +223 -0
  1777. package/lib/packages/spill/locale/en.json +4 -0
  1778. package/lib/packages/spill/locale/ui.en.json +31 -0
  1779. package/lib/packages/spill/locale/ui.zh.json +31 -0
  1780. package/lib/packages/subagent/agent-roles.d.ts +78 -0
  1781. package/lib/packages/subagent/agent-roles.js +425 -0
  1782. package/lib/packages/subagent/board-snapshot.d.ts +114 -0
  1783. package/lib/packages/subagent/board-snapshot.js +194 -0
  1784. package/lib/packages/subagent/index.d.ts +133 -0
  1785. package/lib/packages/subagent/index.js +2414 -0
  1786. package/lib/packages/subagent/locale/en.json +4 -0
  1787. package/lib/packages/subagent/locale/ui.en.json +51 -0
  1788. package/lib/packages/subagent/locale/ui.zh.json +51 -0
  1789. package/lib/packages/superagent/app/api.d.ts +99 -0
  1790. package/lib/packages/superagent/app/api.js +556 -0
  1791. package/lib/packages/superagent/app/assessment.d.ts +573 -0
  1792. package/lib/packages/superagent/app/assessment.js +303 -0
  1793. package/lib/packages/superagent/app/cache.d.ts +22 -0
  1794. package/lib/packages/superagent/app/cache.js +42 -0
  1795. package/lib/packages/superagent/app/cards.d.ts +278 -0
  1796. package/lib/packages/superagent/app/cards.js +103 -0
  1797. package/lib/packages/superagent/app/context.d.ts +35 -0
  1798. package/lib/packages/superagent/app/context.js +49 -0
  1799. package/lib/packages/superagent/app/delivery.d.ts +118 -0
  1800. package/lib/packages/superagent/app/delivery.js +189 -0
  1801. package/lib/packages/superagent/app/effects.d.ts +97 -0
  1802. package/lib/packages/superagent/app/effects.js +162 -0
  1803. package/lib/packages/superagent/app/execution-environment.d.ts +42 -0
  1804. package/lib/packages/superagent/app/execution-environment.js +47 -0
  1805. package/lib/packages/superagent/app/links.d.ts +192 -0
  1806. package/lib/packages/superagent/app/links.js +59 -0
  1807. package/lib/packages/superagent/app/migration.d.ts +40 -0
  1808. package/lib/packages/superagent/app/migration.js +674 -0
  1809. package/lib/packages/superagent/app/notices.d.ts +60 -0
  1810. package/lib/packages/superagent/app/notices.js +128 -0
  1811. package/lib/packages/superagent/app/outbox.d.ts +39 -0
  1812. package/lib/packages/superagent/app/outbox.js +50 -0
  1813. package/lib/packages/superagent/app/passes.d.ts +44 -0
  1814. package/lib/packages/superagent/app/passes.js +65 -0
  1815. package/lib/packages/superagent/app/prompts.d.ts +220 -0
  1816. package/lib/packages/superagent/app/prompts.js +259 -0
  1817. package/lib/packages/superagent/app/resources.d.ts +41 -0
  1818. package/lib/packages/superagent/app/resources.js +394 -0
  1819. package/lib/packages/superagent/app/retry-health.d.ts +36 -0
  1820. package/lib/packages/superagent/app/retry-health.js +112 -0
  1821. package/lib/packages/superagent/app/role-models.d.ts +45 -0
  1822. package/lib/packages/superagent/app/role-models.js +26 -0
  1823. package/lib/packages/superagent/app/runtime.d.ts +94 -0
  1824. package/lib/packages/superagent/app/runtime.js +331 -0
  1825. package/lib/packages/superagent/app/sessions.d.ts +275 -0
  1826. package/lib/packages/superagent/app/sessions.js +676 -0
  1827. package/lib/packages/superagent/app/settings-history.d.ts +34 -0
  1828. package/lib/packages/superagent/app/settings-history.js +105 -0
  1829. package/lib/packages/superagent/app/settings.d.ts +198 -0
  1830. package/lib/packages/superagent/app/settings.js +260 -0
  1831. package/lib/packages/superagent/app/setup.d.ts +67 -0
  1832. package/lib/packages/superagent/app/setup.js +98 -0
  1833. package/lib/packages/superagent/app/skill-files.d.ts +19 -0
  1834. package/lib/packages/superagent/app/skill-files.js +54 -0
  1835. package/lib/packages/superagent/app/source-context.d.ts +46 -0
  1836. package/lib/packages/superagent/app/source-context.js +48 -0
  1837. package/lib/packages/superagent/app/store-read.d.ts +69 -0
  1838. package/lib/packages/superagent/app/store-read.js +75 -0
  1839. package/lib/packages/superagent/app/store.d.ts +179 -0
  1840. package/lib/packages/superagent/app/store.js +384 -0
  1841. package/lib/packages/superagent/app/tools/executor.d.ts +16 -0
  1842. package/lib/packages/superagent/app/tools/executor.js +114 -0
  1843. package/lib/packages/superagent/app/tools/main.d.ts +47 -0
  1844. package/lib/packages/superagent/app/tools/main.js +286 -0
  1845. package/lib/packages/superagent/app/tools/tool.d.ts +28 -0
  1846. package/lib/packages/superagent/app/tools/tool.js +36 -0
  1847. package/lib/packages/superagent/app/versions.d.ts +35 -0
  1848. package/lib/packages/superagent/app/versions.js +36 -0
  1849. package/lib/packages/superagent/app/views/overview.d.ts +327 -0
  1850. package/lib/packages/superagent/app/views/overview.js +91 -0
  1851. package/lib/packages/superagent/app/views/records.d.ts +478 -0
  1852. package/lib/packages/superagent/app/views/records.js +203 -0
  1853. package/lib/packages/superagent/app/views/settings.d.ts +111 -0
  1854. package/lib/packages/superagent/app/views/settings.js +50 -0
  1855. package/lib/packages/superagent/app/views/sources.d.ts +97 -0
  1856. package/lib/packages/superagent/app/views/sources.js +70 -0
  1857. package/lib/packages/superagent/app/views/text.d.ts +6 -0
  1858. package/lib/packages/superagent/app/views/text.js +53 -0
  1859. package/lib/packages/superagent/app/views/threads.d.ts +582 -0
  1860. package/lib/packages/superagent/app/views/threads.js +117 -0
  1861. package/lib/packages/superagent/app/views/tickets.d.ts +1852 -0
  1862. package/lib/packages/superagent/app/views/tickets.js +96 -0
  1863. package/lib/packages/superagent/core/admission.d.ts +17 -0
  1864. package/lib/packages/superagent/core/admission.js +4 -0
  1865. package/lib/packages/superagent/core/assignments.d.ts +53 -0
  1866. package/lib/packages/superagent/core/assignments.js +160 -0
  1867. package/lib/packages/superagent/core/engine.d.ts +191 -0
  1868. package/lib/packages/superagent/core/engine.js +244 -0
  1869. package/lib/packages/superagent/core/errors.d.ts +58 -0
  1870. package/lib/packages/superagent/core/errors.js +63 -0
  1871. package/lib/packages/superagent/core/evals.d.ts +99 -0
  1872. package/lib/packages/superagent/core/evals.js +381 -0
  1873. package/lib/packages/superagent/core/ids.d.ts +1 -0
  1874. package/lib/packages/superagent/core/ids.js +5 -0
  1875. package/lib/packages/superagent/core/index.d.ts +9 -0
  1876. package/lib/packages/superagent/core/index.js +9 -0
  1877. package/lib/packages/superagent/core/intake.d.ts +15 -0
  1878. package/lib/packages/superagent/core/intake.js +68 -0
  1879. package/lib/packages/superagent/core/limits.d.ts +26 -0
  1880. package/lib/packages/superagent/core/limits.js +11 -0
  1881. package/lib/packages/superagent/core/memory.d.ts +40 -0
  1882. package/lib/packages/superagent/core/memory.js +51 -0
  1883. package/lib/packages/superagent/core/model.d.ts +432 -0
  1884. package/lib/packages/superagent/core/model.js +79 -0
  1885. package/lib/packages/superagent/core/part.d.ts +49 -0
  1886. package/lib/packages/superagent/core/part.js +71 -0
  1887. package/lib/packages/superagent/core/policy.d.ts +187 -0
  1888. package/lib/packages/superagent/core/policy.js +244 -0
  1889. package/lib/packages/superagent/core/ports.d.ts +217 -0
  1890. package/lib/packages/superagent/core/ports.js +1 -0
  1891. package/lib/packages/superagent/core/reasons.d.ts +36 -0
  1892. package/lib/packages/superagent/core/reasons.js +35 -0
  1893. package/lib/packages/superagent/core/replies.d.ts +55 -0
  1894. package/lib/packages/superagent/core/replies.js +94 -0
  1895. package/lib/packages/superagent/core/stage.d.ts +18 -0
  1896. package/lib/packages/superagent/core/stage.js +27 -0
  1897. package/lib/packages/superagent/core/tickets.d.ts +151 -0
  1898. package/lib/packages/superagent/core/tickets.js +487 -0
  1899. package/lib/packages/superagent/deployment.d.ts +54 -0
  1900. package/lib/packages/superagent/deployment.js +160 -0
  1901. package/lib/packages/superagent/executor/background.d.ts +93 -0
  1902. package/lib/packages/superagent/executor/background.js +192 -0
  1903. package/lib/packages/superagent/executor/dsh.d.ts +304 -0
  1904. package/lib/packages/superagent/executor/dsh.js +776 -0
  1905. package/lib/packages/superagent/host/command.d.ts +89 -0
  1906. package/lib/packages/superagent/host/command.js +198 -0
  1907. package/lib/packages/superagent/host/health.d.ts +45 -0
  1908. package/lib/packages/superagent/host/health.js +355 -0
  1909. package/lib/packages/superagent/host/settings-section.d.ts +32 -0
  1910. package/lib/packages/superagent/host/settings-section.js +528 -0
  1911. package/lib/packages/superagent/index.d.ts +82 -0
  1912. package/lib/packages/superagent/index.js +140 -0
  1913. package/lib/packages/superagent/infra/commands.d.ts +55 -0
  1914. package/lib/packages/superagent/infra/commands.js +144 -0
  1915. package/lib/packages/superagent/infra/environment.d.ts +44 -0
  1916. package/lib/packages/superagent/infra/environment.js +227 -0
  1917. package/lib/packages/superagent/infra/health.d.ts +27 -0
  1918. package/lib/packages/superagent/infra/health.js +29 -0
  1919. package/lib/packages/superagent/infra/text.d.ts +10 -0
  1920. package/lib/packages/superagent/infra/text.js +31 -0
  1921. package/lib/packages/superagent/kv.d.ts +102 -0
  1922. package/lib/packages/superagent/kv.js +44 -0
  1923. package/lib/packages/superagent/locale/en.json +4 -0
  1924. package/lib/packages/superagent/locale/ui.en.json +26 -0
  1925. package/lib/packages/superagent/locale/ui.zh.json +26 -0
  1926. package/lib/packages/superagent/paths.d.ts +21 -0
  1927. package/lib/packages/superagent/paths.js +50 -0
  1928. package/lib/packages/superagent/prompts/admission.md +68 -0
  1929. package/lib/packages/superagent/prompts/cli.md +17 -0
  1930. package/lib/packages/superagent/prompts/dispatch.md +59 -0
  1931. package/lib/packages/superagent/prompts/handoff-orchestrator.md +4 -0
  1932. package/lib/packages/superagent/prompts/handoff-worker.md +7 -0
  1933. package/lib/packages/superagent/prompts/handoff.md +6 -0
  1934. package/lib/packages/superagent/prompts/orchestrator.md +16 -0
  1935. package/lib/packages/superagent/prompts/replies.md +35 -0
  1936. package/lib/packages/superagent/prompts/shared.md +7 -0
  1937. package/lib/packages/superagent/prompts/subscriptions.md +13 -0
  1938. package/lib/packages/superagent/prompts/team/communication.md +97 -0
  1939. package/lib/packages/superagent/prompts/team/delivery.md +28 -0
  1940. package/lib/packages/superagent/prompts/team/scope.md +22 -0
  1941. package/lib/packages/superagent/prompts/work.md +49 -0
  1942. package/lib/packages/superagent/prompts/worker.md +10 -0
  1943. package/lib/packages/superagent/setup.d.ts +37 -0
  1944. package/lib/packages/superagent/setup.js +46 -0
  1945. package/lib/packages/superagent/skills/dsh-superagent-feishu/SKILL.md +12 -0
  1946. package/lib/packages/superagent/skills/dsh-superagent-github/SKILL.md +14 -0
  1947. package/lib/packages/superagent/sources/admission-context.d.ts +43 -0
  1948. package/lib/packages/superagent/sources/admission-context.js +42 -0
  1949. package/lib/packages/superagent/sources/feishu-channel.d.ts +20 -0
  1950. package/lib/packages/superagent/sources/feishu-channel.js +33 -0
  1951. package/lib/packages/superagent/sources/feishu-image.d.ts +12 -0
  1952. package/lib/packages/superagent/sources/feishu-image.js +81 -0
  1953. package/lib/packages/superagent/sources/feishu-loops.d.ts +18 -0
  1954. package/lib/packages/superagent/sources/feishu-loops.js +330 -0
  1955. package/lib/packages/superagent/sources/feishu-read.d.ts +81 -0
  1956. package/lib/packages/superagent/sources/feishu-read.js +183 -0
  1957. package/lib/packages/superagent/sources/feishu-trigger.d.ts +95 -0
  1958. package/lib/packages/superagent/sources/feishu-trigger.js +96 -0
  1959. package/lib/packages/superagent/sources/feishu.d.ts +56 -0
  1960. package/lib/packages/superagent/sources/feishu.js +164 -0
  1961. package/lib/packages/superagent/sources/github-channel.d.ts +6 -0
  1962. package/lib/packages/superagent/sources/github-channel.js +62 -0
  1963. package/lib/packages/superagent/sources/github-pull.d.ts +82 -0
  1964. package/lib/packages/superagent/sources/github-pull.js +112 -0
  1965. package/lib/packages/superagent/sources/github-read.d.ts +54 -0
  1966. package/lib/packages/superagent/sources/github-read.js +184 -0
  1967. package/lib/packages/superagent/sources/github-trigger.d.ts +140 -0
  1968. package/lib/packages/superagent/sources/github-trigger.js +107 -0
  1969. package/lib/packages/superagent/sources/github.d.ts +52 -0
  1970. package/lib/packages/superagent/sources/github.js +559 -0
  1971. package/lib/packages/superagent/sources/host.d.ts +101 -0
  1972. package/lib/packages/superagent/sources/host.js +13 -0
  1973. package/lib/packages/superagent/sources/kind.d.ts +229 -0
  1974. package/lib/packages/superagent/sources/kind.js +1 -0
  1975. package/lib/packages/superagent/sources/poll.d.ts +21 -0
  1976. package/lib/packages/superagent/sources/poll.js +53 -0
  1977. package/lib/packages/superagent/sources/registry.d.ts +402 -0
  1978. package/lib/packages/superagent/sources/registry.js +162 -0
  1979. package/lib/packages/superagent-webhook/index.d.ts +47 -0
  1980. package/lib/packages/superagent-webhook/index.js +83 -0
  1981. package/lib/packages/superagent-webhook/locale/en.json +4 -0
  1982. package/lib/packages/superagent-webhook/tests/settings-contract.d.ts +34 -0
  1983. package/lib/packages/superagent-webhook/tests/settings-contract.js +66 -0
  1984. package/lib/packages/superagent-webhook/webhook.d.ts +87 -0
  1985. package/lib/packages/superagent-webhook/webhook.js +199 -0
  1986. package/lib/packages/surfaces/index.d.ts +11 -0
  1987. package/lib/packages/surfaces/index.js +20 -0
  1988. package/lib/packages/surfaces/locale/en.json +4 -0
  1989. package/lib/packages/todo/index.d.ts +21 -0
  1990. package/lib/packages/todo/index.js +351 -0
  1991. package/lib/packages/todo/locale/en.json +4 -0
  1992. package/lib/packages/todo/locale/ui.en.json +11 -0
  1993. package/lib/packages/todo/locale/ui.zh.json +11 -0
  1994. package/lib/packages/todo/todo.d.ts +73 -0
  1995. package/lib/packages/tool-search/index.js +474 -0
  1996. package/lib/packages/tool-search/locale/en.json +4 -0
  1997. package/lib/packages/tool-search/locale/ui.en.json +36 -0
  1998. package/lib/packages/tool-search/locale/ui.zh.json +36 -0
  1999. package/lib/packages/tool-search/tool-search.d.ts +153 -0
  2000. package/lib/packages/tools/locale/en.json +4 -0
  2001. package/lib/packages/tools-default/bash.d.ts +332 -0
  2002. package/lib/packages/tools-default/bash.js +1139 -0
  2003. package/lib/packages/tools-default/image-tool.d.ts +2 -0
  2004. package/lib/packages/tools-default/image-tool.js +59 -0
  2005. package/lib/packages/tools-default/index.js +407 -0
  2006. package/lib/packages/tools-default/locale/en.json +4 -0
  2007. package/lib/packages/tools-default/locale/ui.en.json +27 -0
  2008. package/lib/packages/tools-default/locale/ui.zh.json +27 -0
  2009. package/lib/packages/tools-default/persistent-shell.d.ts +79 -0
  2010. package/lib/packages/tools-default/persistent-shell.js +247 -0
  2011. package/lib/packages/tools-default/search-tools.d.ts +40 -0
  2012. package/lib/packages/tools-default/search-tools.js +484 -0
  2013. package/lib/packages/transcript/index.d.ts +48 -0
  2014. package/lib/packages/transcript/index.js +436 -0
  2015. package/lib/packages/transcript/locale/en.json +4 -0
  2016. package/lib/packages/tui/app/AgentsOverlay.d.ts +18 -0
  2017. package/lib/packages/tui/app/App.d.ts +21 -0
  2018. package/lib/packages/tui/app/App.js +1788 -0
  2019. package/lib/packages/tui/app/ApprovalCard.d.ts +12 -0
  2020. package/lib/packages/tui/app/ApprovalCard.js +82 -0
  2021. package/lib/packages/tui/app/AskCard.d.ts +20 -0
  2022. package/lib/packages/tui/app/ChatView.d.ts +67 -0
  2023. package/lib/packages/tui/app/ChatView.js +314 -0
  2024. package/lib/packages/tui/app/Composer.d.ts +56 -0
  2025. package/lib/packages/tui/app/Composer.js +306 -0
  2026. package/lib/packages/tui/app/DiffBlock.d.ts +6 -0
  2027. package/lib/packages/tui/app/DiffBlock.js +39 -0
  2028. package/lib/packages/tui/app/ModelPicker.d.ts +7 -0
  2029. package/lib/packages/tui/app/PlanReviewCard.d.ts +13 -0
  2030. package/lib/packages/tui/app/PresetPicker.d.ts +11 -0
  2031. package/lib/packages/tui/app/SessionPicker.d.ts +43 -0
  2032. package/lib/packages/tui/app/SettingsOverlay.d.ts +36 -0
  2033. package/lib/packages/tui/app/SettingsOverlay.js +265 -0
  2034. package/lib/packages/tui/app/SkillsPicker.d.ts +7 -0
  2035. package/lib/packages/tui/app/StatusBar.d.ts +22 -0
  2036. package/lib/packages/tui/app/StatusBar.js +189 -0
  2037. package/lib/packages/tui/app/TaskStrips.d.ts +13 -0
  2038. package/lib/packages/tui/app/TaskStrips.js +37 -0
  2039. package/lib/packages/tui/app/ToolCard.d.ts +11 -0
  2040. package/lib/packages/tui/app/ToolCard.js +62 -0
  2041. package/lib/packages/tui/app/TranscriptOverlay.d.ts +27 -0
  2042. package/lib/packages/tui/app/TranscriptViewport.d.ts +85 -0
  2043. package/lib/packages/tui/app/TranscriptViewport.js +233 -0
  2044. package/lib/packages/tui/app/Welcome.js +68 -0
  2045. package/lib/packages/tui/app/clipboard-image.js +66 -0
  2046. package/lib/packages/tui/app/display-width.d.ts +16 -0
  2047. package/lib/packages/tui/app/display-width.js +33 -0
  2048. package/lib/packages/tui/app/history-store.js +41 -0
  2049. package/lib/packages/tui/app/image-blocks.js +125 -0
  2050. package/lib/packages/tui/app/scroll-model.d.ts +240 -0
  2051. package/lib/packages/tui/app/settings-model.d.ts +128 -0
  2052. package/lib/packages/tui/app/settings-model.js +215 -0
  2053. package/lib/packages/tui/app/snapshot-subscribe.js +110 -0
  2054. package/lib/packages/tui/index.js +102 -0
  2055. package/lib/packages/tui/locale/en.json +4 -0
  2056. package/lib/packages/ui-actions/index.d.ts +27 -0
  2057. package/lib/packages/ui-actions/index.js +27 -0
  2058. package/lib/packages/ui-actions/locale/en.json +4 -0
  2059. package/lib/packages/ui-actions/locale/ui.en.json +3 -0
  2060. package/lib/packages/ui-actions/locale/ui.zh.json +3 -0
  2061. package/lib/packages/ui-ask/index.d.ts +29 -0
  2062. package/lib/packages/ui-ask/index.js +29 -0
  2063. package/lib/packages/ui-ask/locale/en.json +4 -0
  2064. package/lib/packages/ui-ask/locale/ui.en.json +28 -0
  2065. package/lib/packages/ui-ask/locale/ui.zh.json +28 -0
  2066. package/lib/packages/ui-boot/index.d.ts +13 -0
  2067. package/lib/packages/ui-boot/index.js +1 -0
  2068. package/lib/packages/ui-boot/locale/en.json +4 -0
  2069. package/lib/packages/ui-boot/locale/ui.en.json +28 -0
  2070. package/lib/packages/ui-boot/locale/ui.zh.json +28 -0
  2071. package/lib/packages/ui-browser/index.d.ts +29 -0
  2072. package/lib/packages/ui-browser/index.js +29 -0
  2073. package/lib/packages/ui-browser/locale/en.json +4 -0
  2074. package/lib/packages/ui-browser/locale/ui.en.json +17 -0
  2075. package/lib/packages/ui-browser/locale/ui.zh.json +17 -0
  2076. package/lib/packages/ui-composer/index.d.ts +28 -0
  2077. package/lib/packages/ui-composer/index.js +28 -0
  2078. package/lib/packages/ui-composer/locale/en.json +4 -0
  2079. package/lib/packages/ui-composer/locale/ui.en.json +161 -0
  2080. package/lib/packages/ui-composer/locale/ui.zh.json +161 -0
  2081. package/lib/packages/ui-core/frames.js +144 -0
  2082. package/lib/packages/ui-core/i18n.d.ts +33 -0
  2083. package/lib/packages/ui-core/i18n.js +42 -0
  2084. package/lib/packages/ui-core/index.d.ts +102 -0
  2085. package/lib/packages/ui-core/index.js +93 -0
  2086. package/lib/packages/ui-core/locale/en.json +4 -0
  2087. package/lib/packages/ui-core/plugin.d.ts +168 -0
  2088. package/lib/packages/ui-core/scoped-slots.d.ts +20 -0
  2089. package/lib/packages/ui-core/slots-ink.d.ts +26 -0
  2090. package/lib/packages/ui-core/slots-ink.js +78 -0
  2091. package/lib/packages/ui-core/slots.d.ts +490 -0
  2092. package/lib/packages/ui-core/tui-plugin-api.d.ts +23 -0
  2093. package/lib/packages/ui-core/tui-plugin-api.js +23 -0
  2094. package/lib/packages/ui-core/tui-plugins.d.ts +47 -0
  2095. package/lib/packages/ui-core/tui-plugins.js +293 -0
  2096. package/lib/packages/ui-dockkit/index.d.ts +13 -0
  2097. package/lib/packages/ui-dockkit/index.js +13 -0
  2098. package/lib/packages/ui-dockkit/locale/en.json +4 -0
  2099. package/lib/packages/ui-dockkit/locale/ui.en.json +21 -0
  2100. package/lib/packages/ui-dockkit/locale/ui.zh.json +21 -0
  2101. package/lib/packages/ui-files/index.d.ts +27 -0
  2102. package/lib/packages/ui-files/index.js +27 -0
  2103. package/lib/packages/ui-files/locale/en.json +4 -0
  2104. package/lib/packages/ui-files/locale/ui.en.json +43 -0
  2105. package/lib/packages/ui-files/locale/ui.zh.json +43 -0
  2106. package/lib/packages/ui-layout/index.d.ts +30 -0
  2107. package/lib/packages/ui-layout/index.js +30 -0
  2108. package/lib/packages/ui-layout/locale/en.json +4 -0
  2109. package/lib/packages/ui-layout/locale/ui.en.json +112 -0
  2110. package/lib/packages/ui-layout/locale/ui.zh.json +112 -0
  2111. package/lib/packages/ui-palette/index.d.ts +27 -0
  2112. package/lib/packages/ui-palette/index.js +27 -0
  2113. package/lib/packages/ui-palette/locale/en.json +4 -0
  2114. package/lib/packages/ui-palette/locale/ui.en.json +35 -0
  2115. package/lib/packages/ui-palette/locale/ui.zh.json +35 -0
  2116. package/lib/packages/ui-plugins/index.d.ts +27 -0
  2117. package/lib/packages/ui-plugins/index.js +27 -0
  2118. package/lib/packages/ui-plugins/locale/en.json +4 -0
  2119. package/lib/packages/ui-plugins/locale/ui.en.json +134 -0
  2120. package/lib/packages/ui-plugins/locale/ui.zh.json +134 -0
  2121. package/lib/packages/ui-preview/index.d.ts +27 -0
  2122. package/lib/packages/ui-preview/index.js +27 -0
  2123. package/lib/packages/ui-preview/locale/en.json +4 -0
  2124. package/lib/packages/ui-preview/locale/ui.en.json +29 -0
  2125. package/lib/packages/ui-preview/locale/ui.zh.json +29 -0
  2126. package/lib/packages/ui-primitives/index.d.ts +13 -0
  2127. package/lib/packages/ui-primitives/index.js +13 -0
  2128. package/lib/packages/ui-primitives/locale/en.json +4 -0
  2129. package/lib/packages/ui-primitives/locale/ui.en.json +167 -0
  2130. package/lib/packages/ui-primitives/locale/ui.zh.json +167 -0
  2131. package/lib/packages/ui-prompt/index.d.ts +29 -0
  2132. package/lib/packages/ui-prompt/index.js +29 -0
  2133. package/lib/packages/ui-prompt/locale/en.json +4 -0
  2134. package/lib/packages/ui-prompt/locale/ui.en.json +73 -0
  2135. package/lib/packages/ui-prompt/locale/ui.zh.json +73 -0
  2136. package/lib/packages/ui-renderer/index.d.ts +26 -0
  2137. package/lib/packages/ui-renderer/index.js +26 -0
  2138. package/lib/packages/ui-renderer/locale/en.json +4 -0
  2139. package/lib/packages/ui-renderer/locale/ui.en.json +14 -0
  2140. package/lib/packages/ui-renderer/locale/ui.zh.json +14 -0
  2141. package/lib/packages/ui-runtime/index.d.ts +17 -0
  2142. package/lib/packages/ui-runtime/index.js +17 -0
  2143. package/lib/packages/ui-runtime/locale/en.json +4 -0
  2144. package/lib/packages/ui-runtime/locale/ui.en.json +5 -0
  2145. package/lib/packages/ui-runtime/locale/ui.zh.json +5 -0
  2146. package/lib/packages/ui-sessions/index.d.ts +27 -0
  2147. package/lib/packages/ui-sessions/index.js +27 -0
  2148. package/lib/packages/ui-sessions/locale/en.json +4 -0
  2149. package/lib/packages/ui-sessions/locale/ui.en.json +119 -0
  2150. package/lib/packages/ui-sessions/locale/ui.zh.json +119 -0
  2151. package/lib/packages/ui-settings/index.d.ts +29 -0
  2152. package/lib/packages/ui-settings/index.js +29 -0
  2153. package/lib/packages/ui-settings/locale/en.json +4 -0
  2154. package/lib/packages/ui-settings/locale/ui.en.json +490 -0
  2155. package/lib/packages/ui-settings/locale/ui.zh.json +490 -0
  2156. package/lib/packages/ui-skills/index.d.ts +29 -0
  2157. package/lib/packages/ui-skills/index.js +29 -0
  2158. package/lib/packages/ui-skills/locale/en.json +4 -0
  2159. package/lib/packages/ui-skills/locale/ui.en.json +93 -0
  2160. package/lib/packages/ui-skills/locale/ui.zh.json +93 -0
  2161. package/lib/packages/ui-slots/index.d.ts +13 -0
  2162. package/lib/packages/ui-slots/index.js +13 -0
  2163. package/lib/packages/ui-slots/locale/en.json +4 -0
  2164. package/lib/packages/ui-slots/locale/ui.en.json +4 -0
  2165. package/lib/packages/ui-slots/locale/ui.zh.json +4 -0
  2166. package/lib/packages/ui-status/index.d.ts +27 -0
  2167. package/lib/packages/ui-status/index.js +27 -0
  2168. package/lib/packages/ui-status/locale/en.json +4 -0
  2169. package/lib/packages/ui-status/locale/ui.en.json +134 -0
  2170. package/lib/packages/ui-status/locale/ui.zh.json +134 -0
  2171. package/lib/packages/ui-statusbar/index.d.ts +28 -0
  2172. package/lib/packages/ui-statusbar/index.js +28 -0
  2173. package/lib/packages/ui-statusbar/locale/en.json +4 -0
  2174. package/lib/packages/ui-statusbar/locale/ui.en.json +33 -0
  2175. package/lib/packages/ui-statusbar/locale/ui.zh.json +33 -0
  2176. package/lib/packages/ui-superagent/index.d.ts +31 -0
  2177. package/lib/packages/ui-superagent/index.js +31 -0
  2178. package/lib/packages/ui-superagent/locale/en.json +4 -0
  2179. package/lib/packages/ui-superagent/locale/ui.en.json +117 -0
  2180. package/lib/packages/ui-superagent/locale/ui.zh.json +117 -0
  2181. package/lib/packages/ui-tasks/index.d.ts +27 -0
  2182. package/lib/packages/ui-tasks/index.js +27 -0
  2183. package/lib/packages/ui-tasks/locale/en.json +4 -0
  2184. package/lib/packages/ui-tasks/locale/ui.en.json +22 -0
  2185. package/lib/packages/ui-tasks/locale/ui.zh.json +22 -0
  2186. package/lib/packages/ui-team/index.d.ts +29 -0
  2187. package/lib/packages/ui-team/index.js +29 -0
  2188. package/lib/packages/ui-team/locale/en.json +4 -0
  2189. package/lib/packages/ui-team/locale/ui.en.json +19 -0
  2190. package/lib/packages/ui-team/locale/ui.zh.json +19 -0
  2191. package/lib/packages/ui-terminal/index.d.ts +27 -0
  2192. package/lib/packages/ui-terminal/index.js +27 -0
  2193. package/lib/packages/ui-terminal/locale/en.json +4 -0
  2194. package/lib/packages/ui-terminal/locale/ui.en.json +9 -0
  2195. package/lib/packages/ui-terminal/locale/ui.zh.json +9 -0
  2196. package/lib/packages/ui-trace/index.d.ts +28 -0
  2197. package/lib/packages/ui-trace/index.js +28 -0
  2198. package/lib/packages/ui-trace/locale/en.json +4 -0
  2199. package/lib/packages/ui-trace/locale/ui.en.json +118 -0
  2200. package/lib/packages/ui-trace/locale/ui.zh.json +118 -0
  2201. package/lib/packages/ui-transcript/index.d.ts +30 -0
  2202. package/lib/packages/ui-transcript/index.js +30 -0
  2203. package/lib/packages/ui-transcript/locale/en.json +4 -0
  2204. package/lib/packages/ui-transcript/locale/ui.en.json +281 -0
  2205. package/lib/packages/ui-transcript/locale/ui.zh.json +281 -0
  2206. package/lib/packages/waiting/index.d.ts +17 -0
  2207. package/lib/packages/waiting/index.js +53 -0
  2208. package/lib/packages/waiting/locale/en.json +4 -0
  2209. package/lib/packages/web-fetch/html.d.ts +26 -0
  2210. package/lib/packages/web-fetch/html.js +249 -0
  2211. package/lib/packages/web-fetch/http.d.ts +97 -0
  2212. package/lib/packages/web-fetch/http.js +252 -0
  2213. package/lib/packages/web-fetch/index.d.ts +17 -0
  2214. package/lib/packages/web-fetch/index.js +165 -0
  2215. package/lib/packages/web-fetch/locale/en.json +4 -0
  2216. package/lib/packages/web-fetch/locale/ui.en.json +14 -0
  2217. package/lib/packages/web-fetch/locale/ui.zh.json +14 -0
  2218. package/lib/packages/web-search/index.d.ts +15 -0
  2219. package/lib/packages/web-search/index.js +521 -0
  2220. package/lib/packages/web-search/locale/en.json +4 -0
  2221. package/lib/packages/web-search/locale/ui.en.json +30 -0
  2222. package/lib/packages/web-search/locale/ui.zh.json +30 -0
  2223. package/lib/packages/webserver/index.d.ts +51 -0
  2224. package/lib/packages/webserver/index.js +316 -0
  2225. package/lib/packages/webserver/locale/en.json +4 -0
  2226. package/lib/services/types.d.ts +384 -29
  2227. package/package.json +64 -8
  2228. package/lib/adapter/core-runtime.d.ts +0 -11
  2229. package/lib/adapter/core-runtime.js +0 -259
  2230. package/lib/adapter/host.d.ts +0 -18
  2231. package/lib/adapter/host.js +0 -14
  2232. package/lib/adapter/runtime.d.ts +0 -15
  2233. package/lib/adapter/runtime.js +0 -290
  2234. package/lib/app/AgentsOverlay.d.ts +0 -18
  2235. package/lib/app/App.d.ts +0 -15
  2236. package/lib/app/App.js +0 -1650
  2237. package/lib/app/App.js.nv-backup +0 -1650
  2238. package/lib/app/ApprovalCard.d.ts +0 -12
  2239. package/lib/app/ApprovalCard.js +0 -82
  2240. package/lib/app/AskCard.d.ts +0 -20
  2241. package/lib/app/ChatView.d.ts +0 -65
  2242. package/lib/app/ChatView.js +0 -314
  2243. package/lib/app/Composer.d.ts +0 -50
  2244. package/lib/app/Composer.js +0 -288
  2245. package/lib/app/DiffBlock.d.ts +0 -6
  2246. package/lib/app/DiffBlock.js +0 -37
  2247. package/lib/app/ModelPicker.d.ts +0 -7
  2248. package/lib/app/PlanReviewCard.d.ts +0 -13
  2249. package/lib/app/PresetPicker.d.ts +0 -11
  2250. package/lib/app/SessionPicker.d.ts +0 -43
  2251. package/lib/app/SettingsOverlay.d.ts +0 -32
  2252. package/lib/app/SettingsOverlay.js +0 -157
  2253. package/lib/app/SkillsPicker.d.ts +0 -7
  2254. package/lib/app/StatusBar.d.ts +0 -22
  2255. package/lib/app/StatusBar.js +0 -189
  2256. package/lib/app/TaskStrips.d.ts +0 -13
  2257. package/lib/app/TaskStrips.js +0 -37
  2258. package/lib/app/TimelineRail.js.negbak +0 -98
  2259. package/lib/app/TimelineRail.js.nv-backup +0 -160
  2260. package/lib/app/ToolCard.d.ts +0 -11
  2261. package/lib/app/ToolCard.js +0 -60
  2262. package/lib/app/ToolCard.js.nv-backup +0 -64
  2263. package/lib/app/TranscriptOverlay.d.ts +0 -27
  2264. package/lib/app/TranscriptViewport.d.ts +0 -78
  2265. package/lib/app/TranscriptViewport.js +0 -218
  2266. package/lib/app/Welcome.js +0 -68
  2267. package/lib/app/clipboard-image.js +0 -66
  2268. package/lib/app/display-width.d.ts +0 -16
  2269. package/lib/app/display-width.js +0 -33
  2270. package/lib/app/hello.d.ts +0 -11
  2271. package/lib/app/hello.js +0 -8
  2272. package/lib/app/history-store.js +0 -41
  2273. package/lib/app/image-blocks.js +0 -125
  2274. package/lib/app/scroll-model.d.ts +0 -240
  2275. package/lib/app/settings-model.d.ts +0 -69
  2276. package/lib/app/settings-model.js +0 -114
  2277. package/lib/app/snapshot-subscribe.js +0 -110
  2278. package/lib/commands.d.ts +0 -49
  2279. package/lib/commands.js +0 -115
  2280. package/lib/core/agent-roles.d.ts +0 -52
  2281. package/lib/core/agent-roles.js +0 -274
  2282. package/lib/core/approval-floor.d.ts +0 -192
  2283. package/lib/core/approval-floor.js +0 -806
  2284. package/lib/core/approval.d.ts +0 -42
  2285. package/lib/core/approval.js +0 -8
  2286. package/lib/core/call-meaning.js +0 -347
  2287. package/lib/core/cdp/actions.js +0 -655
  2288. package/lib/core/cdp/launch.js +0 -491
  2289. package/lib/core/cdp/report.d.ts +0 -27
  2290. package/lib/core/cdp/report.js +0 -50
  2291. package/lib/core/cdp/ring-buffer.d.ts +0 -25
  2292. package/lib/core/cdp/ring-buffer.js +0 -44
  2293. package/lib/core/cdp/snapshot.d.ts +0 -139
  2294. package/lib/core/cdp/snapshot.js +0 -312
  2295. package/lib/core/cdp/transport.d.ts +0 -160
  2296. package/lib/core/cdp/transport.js +0 -359
  2297. package/lib/core/commands-completion.d.ts +0 -89
  2298. package/lib/core/commands-completion.js +0 -192
  2299. package/lib/core/compact.d.ts +0 -110
  2300. package/lib/core/compact.js +0 -210
  2301. package/lib/core/connection-test.d.ts +0 -60
  2302. package/lib/core/connection-test.js +0 -84
  2303. package/lib/core/desktop-control.d.ts +0 -298
  2304. package/lib/core/desktop-control.js +0 -1309
  2305. package/lib/core/dsh-compat/hook.d.ts +0 -18
  2306. package/lib/core/dsh-compat/hook.js +0 -52
  2307. package/lib/core/goal.d.ts +0 -89
  2308. package/lib/core/hooks.d.ts +0 -289
  2309. package/lib/core/hooks.js +0 -862
  2310. package/lib/core/learnings/ledger.d.ts +0 -73
  2311. package/lib/core/learnings/ledger.js +0 -273
  2312. package/lib/core/learnings/skill-write.d.ts +0 -244
  2313. package/lib/core/learnings/skill-write.js +0 -820
  2314. package/lib/core/learnings/store.js +0 -266
  2315. package/lib/core/lifecycle-hooks.d.ts +0 -197
  2316. package/lib/core/lifecycle-hooks.js +0 -567
  2317. package/lib/core/loop.d.ts +0 -195
  2318. package/lib/core/loop.js +0 -648
  2319. package/lib/core/lsp/client.js +0 -703
  2320. package/lib/core/lsp/manager.js +0 -418
  2321. package/lib/core/lsp/normalize.js +0 -134
  2322. package/lib/core/lsp/servers.js +0 -349
  2323. package/lib/core/market.d.ts +0 -51
  2324. package/lib/core/market.js +0 -358
  2325. package/lib/core/mcp.d.ts +0 -219
  2326. package/lib/core/mcp.js +0 -880
  2327. package/lib/core/memory.d.ts +0 -266
  2328. package/lib/core/memory.js +0 -703
  2329. package/lib/core/microcompact.d.ts +0 -93
  2330. package/lib/core/microcompact.js +0 -207
  2331. package/lib/core/modes.d.ts +0 -72
  2332. package/lib/core/modes.js +0 -152
  2333. package/lib/core/permission-presets.d.ts +0 -71
  2334. package/lib/core/permission-scope.d.ts +0 -54
  2335. package/lib/core/permission-scope.js +0 -84
  2336. package/lib/core/presets.d.ts +0 -91
  2337. package/lib/core/presets.js +0 -384
  2338. package/lib/core/prompt.d.ts +0 -92
  2339. package/lib/core/prompt.js +0 -375
  2340. package/lib/core/sandbox/backends.d.ts +0 -64
  2341. package/lib/core/sandbox/execpolicy.d.ts +0 -93
  2342. package/lib/core/sandbox/execpolicy.js +0 -476
  2343. package/lib/core/sandbox/net-proxy.js +0 -162
  2344. package/lib/core/sandbox/policy.d.ts +0 -211
  2345. package/lib/core/sandbox/policy.js +0 -565
  2346. package/lib/core/sandbox/win/account.js +0 -203
  2347. package/lib/core/sandbox/win/backend.d.ts +0 -82
  2348. package/lib/core/sandbox/win/backend.js +0 -299
  2349. package/lib/core/sandbox/win/doctor.js +0 -269
  2350. package/lib/core/sandbox/win/ffi.d.ts +0 -107
  2351. package/lib/core/sandbox/win/ffi.js +0 -166
  2352. package/lib/core/sandbox/win/runner-entry.d.ts +0 -35
  2353. package/lib/core/sandbox/win/runner-entry.js +0 -386
  2354. package/lib/core/sandbox/win/setup.d.ts +0 -60
  2355. package/lib/core/sandbox/win/setup.js +0 -983
  2356. package/lib/core/sandbox/win/wfp.js +0 -197
  2357. package/lib/core/session-export.d.ts +0 -18
  2358. package/lib/core/session-export.js +0 -73
  2359. package/lib/core/session-index.js +0 -849
  2360. package/lib/core/todo.d.ts +0 -81
  2361. package/lib/core/tool-result-prune.d.ts +0 -42
  2362. package/lib/core/tool-result-prune.js +0 -47
  2363. package/lib/core/tool-search.d.ts +0 -153
  2364. package/lib/core/tools/bash.d.ts +0 -313
  2365. package/lib/core/tools/bash.js +0 -998
  2366. package/lib/core/tools/image-tool.d.ts +0 -2
  2367. package/lib/core/tools/image-tool.js +0 -59
  2368. package/lib/core/tools/index.d.ts +0 -8
  2369. package/lib/core/tools/index.js +0 -4
  2370. package/lib/core/tools/search-tools.d.ts +0 -33
  2371. package/lib/core/tools/search-tools.js +0 -440
  2372. package/lib/index.d.ts +0 -41
  2373. package/lib/index.js +0 -35
  2374. package/lib/plugins/agent.d.ts +0 -2
  2375. package/lib/plugins/agent.js +0 -314
  2376. package/lib/plugins/approval-floor.js +0 -227
  2377. package/lib/plugins/approval.d.ts +0 -16
  2378. package/lib/plugins/approval.js +0 -846
  2379. package/lib/plugins/ask.js +0 -297
  2380. package/lib/plugins/browser.d.ts +0 -68
  2381. package/lib/plugins/browser.js +0 -1289
  2382. package/lib/plugins/commands.d.ts +0 -23
  2383. package/lib/plugins/commands.js +0 -504
  2384. package/lib/plugins/compact.d.ts +0 -21
  2385. package/lib/plugins/compact.js +0 -316
  2386. package/lib/plugins/computer-use.d.ts +0 -47
  2387. package/lib/plugins/computer-use.js +0 -555
  2388. package/lib/plugins/desktop-dock.d.ts +0 -2
  2389. package/lib/plugins/desktop-dock.js +0 -626
  2390. package/lib/plugins/dock-browser.d.ts +0 -34
  2391. package/lib/plugins/dock-browser.js +0 -724
  2392. package/lib/plugins/dsh-compat.js +0 -44
  2393. package/lib/plugins/file-review.d.ts +0 -108
  2394. package/lib/plugins/file-review.js +0 -437
  2395. package/lib/plugins/git.js +0 -126
  2396. package/lib/plugins/goal.d.ts +0 -20
  2397. package/lib/plugins/goal.js +0 -242
  2398. package/lib/plugins/guards.js +0 -18
  2399. package/lib/plugins/hooks.d.ts +0 -19
  2400. package/lib/plugins/hooks.js +0 -585
  2401. package/lib/plugins/host-stdio.d.ts +0 -88
  2402. package/lib/plugins/host-stdio.js +0 -305
  2403. package/lib/plugins/image-diet.js +0 -85
  2404. package/lib/plugins/lifecycle-hooks.d.ts +0 -27
  2405. package/lib/plugins/lifecycle-hooks.js +0 -340
  2406. package/lib/plugins/llm.d.ts +0 -13
  2407. package/lib/plugins/llm.js +0 -256
  2408. package/lib/plugins/lsp.d.ts +0 -54
  2409. package/lib/plugins/lsp.js +0 -603
  2410. package/lib/plugins/mcp.js +0 -672
  2411. package/lib/plugins/memory.d.ts +0 -17
  2412. package/lib/plugins/memory.js +0 -837
  2413. package/lib/plugins/microcompact.d.ts +0 -18
  2414. package/lib/plugins/microcompact.js +0 -191
  2415. package/lib/plugins/mode.d.ts +0 -18
  2416. package/lib/plugins/mode.js +0 -134
  2417. package/lib/plugins/permission-presets.d.ts +0 -19
  2418. package/lib/plugins/permission-presets.js +0 -155
  2419. package/lib/plugins/plan.js +0 -192
  2420. package/lib/plugins/plugin-manager.js +0 -163
  2421. package/lib/plugins/presets.js +0 -211
  2422. package/lib/plugins/prompt.d.ts +0 -2
  2423. package/lib/plugins/prompt.js +0 -307
  2424. package/lib/plugins/ptc.js +0 -369
  2425. package/lib/plugins/remote/http.d.ts +0 -11
  2426. package/lib/plugins/remote/http.js +0 -11
  2427. package/lib/plugins/remote/routes.js +0 -384
  2428. package/lib/plugins/remote/types.d.ts +0 -135
  2429. package/lib/plugins/remote/types.js +0 -98
  2430. package/lib/plugins/remote.d.ts +0 -17
  2431. package/lib/plugins/remote.js +0 -1021
  2432. package/lib/plugins/runtime-api.js +0 -99
  2433. package/lib/plugins/runtime.js +0 -523
  2434. package/lib/plugins/sandbox.js +0 -882
  2435. package/lib/plugins/schedule.d.ts +0 -26
  2436. package/lib/plugins/schedule.js +0 -539
  2437. package/lib/plugins/self-improve.d.ts +0 -61
  2438. package/lib/plugins/self-improve.js +0 -963
  2439. package/lib/plugins/session-search.js +0 -313
  2440. package/lib/plugins/session-title.js +0 -109
  2441. package/lib/plugins/session.js +0 -300
  2442. package/lib/plugins/settings.d.ts +0 -3
  2443. package/lib/plugins/settings.js +0 -681
  2444. package/lib/plugins/skills.d.ts +0 -2
  2445. package/lib/plugins/skills.js +0 -361
  2446. package/lib/plugins/spill.js +0 -207
  2447. package/lib/plugins/subagent.d.ts +0 -2
  2448. package/lib/plugins/subagent.js +0 -1026
  2449. package/lib/plugins/surfaces.d.ts +0 -11
  2450. package/lib/plugins/surfaces.js +0 -20
  2451. package/lib/plugins/team.d.ts +0 -16
  2452. package/lib/plugins/team.js +0 -155
  2453. package/lib/plugins/todo.d.ts +0 -19
  2454. package/lib/plugins/todo.js +0 -194
  2455. package/lib/plugins/tool-search.js +0 -453
  2456. package/lib/plugins/tool-search.js.nv-backup +0 -434
  2457. package/lib/plugins/tools-default.js +0 -359
  2458. package/lib/plugins/transcript.d.ts +0 -15
  2459. package/lib/plugins/transcript.js +0 -418
  2460. package/lib/plugins/tui.js +0 -98
  2461. package/lib/plugins/waiting.d.ts +0 -12
  2462. package/lib/plugins/waiting.js +0 -34
  2463. package/lib/plugins/web-search.d.ts +0 -14
  2464. package/lib/plugins/web-search.js +0 -272
  2465. package/lib/plugins/webserver.d.ts +0 -48
  2466. package/lib/plugins/webserver.js +0 -261
  2467. package/lib/remote/assets/app-B3Id1EBq.js +0 -14
  2468. package/lib/remote/assets/icon-192.png +0 -0
  2469. package/lib/remote/assets/icon-512.png +0 -0
  2470. package/lib/remote/assets/index.html +0 -34
  2471. package/lib/remote/assets/manifest.json +0 -27
  2472. package/lib/remote/assets/style-NtlpbKOI.css +0 -1
  2473. package/lib/remote/assets/sw.js +0 -66
  2474. package/lib/tools/config-cli.js +0 -89
  2475. package/lib/tools/plugin-cli.js +0 -209
  2476. package/lib/ui/assets/app-MhfBFsp-.js +0 -89
  2477. package/lib/ui/assets/chunk-2UxHyX5q.js +0 -1
  2478. package/lib/ui/assets/chunk-B1dDrJ26.js +0 -1
  2479. package/lib/ui/assets/chunk-B6aJPvgy.js +0 -1
  2480. package/lib/ui/assets/chunk-BEwlwnbL.js +0 -1
  2481. package/lib/ui/assets/chunk-BIGW1oBm.js +0 -1
  2482. package/lib/ui/assets/chunk-BPQ3VLAy.js +0 -1
  2483. package/lib/ui/assets/chunk-BRH0KZbk.js +0 -141
  2484. package/lib/ui/assets/chunk-BX6H_ySx.js +0 -1
  2485. package/lib/ui/assets/chunk-B_P3UbPa.js +0 -1
  2486. package/lib/ui/assets/chunk-B_TYUkTI.js +0 -1
  2487. package/lib/ui/assets/chunk-B_vNuMnf.js +0 -1
  2488. package/lib/ui/assets/chunk-BdnUsdx6.js +0 -1
  2489. package/lib/ui/assets/chunk-Buea-lGh.js +0 -1
  2490. package/lib/ui/assets/chunk-C0PvZCCE.js +0 -1
  2491. package/lib/ui/assets/chunk-C0m74zRD.js +0 -1
  2492. package/lib/ui/assets/chunk-C27-OAKa.js +0 -1
  2493. package/lib/ui/assets/chunk-C2oV4EkX.js +0 -1
  2494. package/lib/ui/assets/chunk-C7zT0LnQ.js +0 -1
  2495. package/lib/ui/assets/chunk-C9GSunVT.js +0 -1
  2496. package/lib/ui/assets/chunk-C9tS-k6U.js +0 -1
  2497. package/lib/ui/assets/chunk-CA5f1pGf.js +0 -12
  2498. package/lib/ui/assets/chunk-CHLpvVh8.js +0 -1
  2499. package/lib/ui/assets/chunk-CLxacb5B.js +0 -1
  2500. package/lib/ui/assets/chunk-COt5Ahok.js +0 -1
  2501. package/lib/ui/assets/chunk-CPTIWCL2.js +0 -1
  2502. package/lib/ui/assets/chunk-CQLl-L-p.js +0 -1
  2503. package/lib/ui/assets/chunk-CUWRgxuq.js +0 -55
  2504. package/lib/ui/assets/chunk-CWanVSXC.js +0 -1
  2505. package/lib/ui/assets/chunk-Cf5RLm7j.js +0 -1
  2506. package/lib/ui/assets/chunk-CickPsom.js +0 -1
  2507. package/lib/ui/assets/chunk-Cj5Yp3dK.js +0 -1
  2508. package/lib/ui/assets/chunk-Cmh6b_Ma.js +0 -1
  2509. package/lib/ui/assets/chunk-Cp-IABpG.js +0 -1
  2510. package/lib/ui/assets/chunk-Cq7xGE-D.js +0 -10
  2511. package/lib/ui/assets/chunk-CqE71os6.js +0 -1
  2512. package/lib/ui/assets/chunk-CtKP3W-j.js +0 -1
  2513. package/lib/ui/assets/chunk-Cvjx9yec.js +0 -1
  2514. package/lib/ui/assets/chunk-CxGP3dtY.js +0 -1
  2515. package/lib/ui/assets/chunk-CylS5w8V.js +0 -1
  2516. package/lib/ui/assets/chunk-D38fbIBN.js +0 -1
  2517. package/lib/ui/assets/chunk-D97Zzqfu.js +0 -1
  2518. package/lib/ui/assets/chunk-DAi9KRSo.js +0 -1
  2519. package/lib/ui/assets/chunk-DHK4yRfg.js +0 -1
  2520. package/lib/ui/assets/chunk-DJeabLx-.js +0 -1
  2521. package/lib/ui/assets/chunk-DNRxmY5a.js +0 -1
  2522. package/lib/ui/assets/chunk-DNSN1z5r.js +0 -1
  2523. package/lib/ui/assets/chunk-DNasK_ZG.js +0 -1
  2524. package/lib/ui/assets/chunk-DPvrY3IQ.js +0 -1
  2525. package/lib/ui/assets/chunk-DXmwc3jG.js +0 -1
  2526. package/lib/ui/assets/chunk-Dd0kTxKP.js +0 -1
  2527. package/lib/ui/assets/chunk-De0Btta0.js +0 -1
  2528. package/lib/ui/assets/chunk-Des-eS-w.js +0 -1
  2529. package/lib/ui/assets/chunk-Df6bDoY_.js +0 -1
  2530. package/lib/ui/assets/chunk-DijEV5ha.js +0 -1
  2531. package/lib/ui/assets/chunk-DkvoVjww.js +0 -1
  2532. package/lib/ui/assets/chunk-DlC-OlHO.js +0 -1
  2533. package/lib/ui/assets/chunk-DnzrXTVv.js +0 -1
  2534. package/lib/ui/assets/chunk-Dualf0xi.js +0 -1
  2535. package/lib/ui/assets/chunk-EXT84bkm.js +0 -1
  2536. package/lib/ui/assets/chunk-GwR3hkPK.js +0 -1
  2537. package/lib/ui/assets/chunk-P80f7IUj.js +0 -1
  2538. package/lib/ui/assets/chunk-VOosw3JB.js +0 -1
  2539. package/lib/ui/assets/chunk-YQ4lDkt_.js +0 -140
  2540. package/lib/ui/assets/chunk-Yzrsuije.js +0 -1
  2541. package/lib/ui/assets/chunk-Z72CF80r.js +0 -1
  2542. package/lib/ui/assets/chunk-g9-lgVsj.js +0 -1
  2543. package/lib/ui/assets/chunk-vGWfd6FD.js +0 -1
  2544. package/lib/ui/assets/chunk-wDzz0qaB.js +0 -1
  2545. package/lib/ui/assets/chunk-ySF7HWmS.js +0 -1
  2546. package/lib/ui/assets/icon.png +0 -0
  2547. package/lib/ui/assets/index.html +0 -62
  2548. package/lib/ui/assets/pdf.worker.min-CjEcRF4W.mjs +0 -28
  2549. package/lib/ui/assets/style-CIJVQKkj.css +0 -1
  2550. package/lib/ui/frames.js +0 -144
  2551. package/lib/ui/index.d.ts +0 -88
  2552. package/lib/ui/index.js +0 -79
  2553. package/lib/ui/manifest.d.ts +0 -190
  2554. package/lib/ui/manifest.js +0 -159
  2555. package/lib/ui/plugin.d.ts +0 -161
  2556. package/lib/ui/plugins/actions/bundle.json +0 -8
  2557. package/lib/ui/plugins/actions/client.js +0 -43
  2558. package/lib/ui/plugins/ask/bundle.json +0 -8
  2559. package/lib/ui/plugins/ask/client.js +0 -415
  2560. package/lib/ui/plugins/browser/bundle.json +0 -8
  2561. package/lib/ui/plugins/browser/client.js +0 -290
  2562. package/lib/ui/plugins/browser/icon.png +0 -0
  2563. package/lib/ui/plugins/composer/bundle.json +0 -9
  2564. package/lib/ui/plugins/composer/client.js +0 -2509
  2565. package/lib/ui/plugins/composer/icon.png +0 -0
  2566. package/lib/ui/plugins/files/bundle.json +0 -8
  2567. package/lib/ui/plugins/files/client.js +0 -561
  2568. package/lib/ui/plugins/files/icon.png +0 -0
  2569. package/lib/ui/plugins/manifest.json +0 -4
  2570. package/lib/ui/plugins/palette/bundle.json +0 -8
  2571. package/lib/ui/plugins/palette/client.js +0 -360
  2572. package/lib/ui/plugins/plugins/bundle.json +0 -8
  2573. package/lib/ui/plugins/plugins/client.js +0 -760
  2574. package/lib/ui/plugins/plugins/icon.png +0 -0
  2575. package/lib/ui/plugins/preview/bundle.json +0 -8
  2576. package/lib/ui/plugins/preview/client.js +0 -187
  2577. package/lib/ui/plugins/preview/icon.png +0 -0
  2578. package/lib/ui/plugins/prompt/bundle.json +0 -8
  2579. package/lib/ui/plugins/prompt/client.js +0 -687
  2580. package/lib/ui/plugins/prompt/icon.png +0 -0
  2581. package/lib/ui/plugins/sessions/bundle.json +0 -8
  2582. package/lib/ui/plugins/sessions/client.js +0 -1595
  2583. package/lib/ui/plugins/sessions/icon.png +0 -0
  2584. package/lib/ui/plugins/settings/bundle.json +0 -8
  2585. package/lib/ui/plugins/settings/client.js +0 -5484
  2586. package/lib/ui/plugins/settings/icon.png +0 -0
  2587. package/lib/ui/plugins/skills/bundle.json +0 -8
  2588. package/lib/ui/plugins/skills/client.js +0 -567
  2589. package/lib/ui/plugins/skills/icon.png +0 -0
  2590. package/lib/ui/plugins/status/bundle.json +0 -8
  2591. package/lib/ui/plugins/status/client.js +0 -1406
  2592. package/lib/ui/plugins/status/icon.png +0 -0
  2593. package/lib/ui/plugins/statusbar/bundle.json +0 -9
  2594. package/lib/ui/plugins/statusbar/client.js +0 -460
  2595. package/lib/ui/plugins/statusbar/icon.png +0 -0
  2596. package/lib/ui/plugins/tasks/bundle.json +0 -8
  2597. package/lib/ui/plugins/tasks/client.js +0 -52
  2598. package/lib/ui/plugins/tasks/icon.png +0 -0
  2599. package/lib/ui/plugins/team/bundle.json +0 -8
  2600. package/lib/ui/plugins/team/client.js +0 -529
  2601. package/lib/ui/plugins/team/icon.png +0 -0
  2602. package/lib/ui/plugins/terminal/bundle.json +0 -8
  2603. package/lib/ui/plugins/terminal/client.js +0 -226
  2604. package/lib/ui/plugins/terminal/icon.png +0 -0
  2605. package/lib/ui/plugins/trace/bundle.json +0 -11
  2606. package/lib/ui/plugins/trace/client.js +0 -1283
  2607. package/lib/ui/plugins/trace/icon.png +0 -0
  2608. package/lib/ui/plugins/transcript/bundle.json +0 -8
  2609. package/lib/ui/plugins/transcript/client.js +0 -2966
  2610. package/lib/ui/plugins/transcript/icon.png +0 -0
  2611. package/lib/ui/scoped-slots.d.ts +0 -20
  2612. package/lib/ui/sdk/@dsc/ui/index.d.ts +0 -280
  2613. package/lib/ui/sdk/@dsc/ui/package.json +0 -16
  2614. package/lib/ui/sdk/@dsc/ui-core/contract.d.ts +0 -25
  2615. package/lib/ui/sdk/@dsc/ui-core/core/attachments.d.ts +0 -185
  2616. package/lib/ui/sdk/@dsc/ui-core/core/bytes.d.ts +0 -14
  2617. package/lib/ui/sdk/@dsc/ui-core/core/diff-text.d.ts +0 -74
  2618. package/lib/ui/sdk/@dsc/ui-core/core/dock-browser.d.ts +0 -137
  2619. package/lib/ui/sdk/@dsc/ui-core/core/dock-ops.d.ts +0 -59
  2620. package/lib/ui/sdk/@dsc/ui-core/core/err-text.d.ts +0 -18
  2621. package/lib/ui/sdk/@dsc/ui-core/core/git-surface.d.ts +0 -17
  2622. package/lib/ui/sdk/@dsc/ui-core/core/json-text.d.ts +0 -11
  2623. package/lib/ui/sdk/@dsc/ui-core/core/model-caps.d.ts +0 -83
  2624. package/lib/ui/sdk/@dsc/ui-core/core/native-bridge.d.ts +0 -135
  2625. package/lib/ui/sdk/@dsc/ui-core/core/path-policy.d.ts +0 -44
  2626. package/lib/ui/sdk/@dsc/ui-core/core/records.d.ts +0 -16
  2627. package/lib/ui/sdk/@dsc/ui-core/core/throughput.d.ts +0 -46
  2628. package/lib/ui/sdk/@dsc/ui-core/core/token-estimate.d.ts +0 -71
  2629. package/lib/ui/sdk/@dsc/ui-core/core/unified-diff.d.ts +0 -35
  2630. package/lib/ui/sdk/@dsc/ui-core/package.json +0 -16
  2631. package/lib/ui/sdk/@dsc/ui-core/ui/arrival.d.ts +0 -72
  2632. package/lib/ui/sdk/@dsc/ui-core/ui/frames.d.ts +0 -67
  2633. package/lib/ui/sdk/@dsc/ui-core/ui/index.d.ts +0 -88
  2634. package/lib/ui/sdk/@dsc/ui-core/ui/manifest.d.ts +0 -190
  2635. package/lib/ui/sdk/@dsc/ui-core/ui/plugin.d.ts +0 -161
  2636. package/lib/ui/sdk/@dsc/ui-core/ui/scoped-slots.d.ts +0 -20
  2637. package/lib/ui/sdk/@dsc/ui-core/ui/slots.d.ts +0 -481
  2638. package/lib/ui/sdk/@dsc/ui-dockkit/dock-model.d.ts +0 -252
  2639. package/lib/ui/sdk/@dsc/ui-dockkit/dock-state.d.ts +0 -163
  2640. package/lib/ui/sdk/@dsc/ui-dockkit/dock.d.ts +0 -24
  2641. package/lib/ui/sdk/@dsc/ui-dockkit/index.d.ts +0 -15
  2642. package/lib/ui/sdk/@dsc/ui-dockkit/package.json +0 -16
  2643. package/lib/ui/sdk/@dsc/ui-layout/app.d.ts +0 -78
  2644. package/lib/ui/sdk/@dsc/ui-layout/appearance.d.ts +0 -75
  2645. package/lib/ui/sdk/@dsc/ui-layout/host-channel.d.ts +0 -133
  2646. package/lib/ui/sdk/@dsc/ui-layout/index.d.ts +0 -35
  2647. package/lib/ui/sdk/@dsc/ui-layout/package.json +0 -16
  2648. package/lib/ui/sdk/@dsc/ui-layout/page-state.d.ts +0 -14
  2649. package/lib/ui/sdk/@dsc/ui-layout/review-pane.d.ts +0 -21
  2650. package/lib/ui/sdk/@dsc/ui-layout/runtime-context.d.ts +0 -53
  2651. package/lib/ui/sdk/@dsc/ui-layout/thread-view.d.ts +0 -28
  2652. package/lib/ui/sdk/@dsc/ui-layout/update-button.d.ts +0 -21
  2653. package/lib/ui/sdk/@dsc/ui-layout/usage-today.d.ts +0 -11
  2654. package/lib/ui/sdk/@dsc/ui-primitives/code-file-icon-artwork.d.ts +0 -53
  2655. package/lib/ui/sdk/@dsc/ui-primitives/code-view.d.ts +0 -15
  2656. package/lib/ui/sdk/@dsc/ui-primitives/compat.d.ts +0 -27
  2657. package/lib/ui/sdk/@dsc/ui-primitives/completion-sound.d.ts +0 -24
  2658. package/lib/ui/sdk/@dsc/ui-primitives/confirm.d.ts +0 -33
  2659. package/lib/ui/sdk/@dsc/ui-primitives/css.d.ts +0 -47
  2660. package/lib/ui/sdk/@dsc/ui-primitives/dialog-focus.d.ts +0 -30
  2661. package/lib/ui/sdk/@dsc/ui-primitives/diff-rows.d.ts +0 -20
  2662. package/lib/ui/sdk/@dsc/ui-primitives/error-text.d.ts +0 -12
  2663. package/lib/ui/sdk/@dsc/ui-primitives/file-icons.d.ts +0 -38
  2664. package/lib/ui/sdk/@dsc/ui-primitives/file-type-classify.d.ts +0 -66
  2665. package/lib/ui/sdk/@dsc/ui-primitives/file-type-icon.d.ts +0 -57
  2666. package/lib/ui/sdk/@dsc/ui-primitives/git-surface.d.ts +0 -9
  2667. package/lib/ui/sdk/@dsc/ui-primitives/highlight.d.ts +0 -47
  2668. package/lib/ui/sdk/@dsc/ui-primitives/hover-delay.d.ts +0 -17
  2669. package/lib/ui/sdk/@dsc/ui-primitives/humanize-error.d.ts +0 -35
  2670. package/lib/ui/sdk/@dsc/ui-primitives/icons-workspace.d.ts +0 -33
  2671. package/lib/ui/sdk/@dsc/ui-primitives/icons.d.ts +0 -116
  2672. package/lib/ui/sdk/@dsc/ui-primitives/index.d.ts +0 -68
  2673. package/lib/ui/sdk/@dsc/ui-primitives/lang-table.d.ts +0 -10
  2674. package/lib/ui/sdk/@dsc/ui-primitives/markdown.d.ts +0 -16
  2675. package/lib/ui/sdk/@dsc/ui-primitives/native.d.ts +0 -41
  2676. package/lib/ui/sdk/@dsc/ui-primitives/package.json +0 -16
  2677. package/lib/ui/sdk/@dsc/ui-primitives/panels.d.ts +0 -109
  2678. package/lib/ui/sdk/@dsc/ui-primitives/paths.d.ts +0 -13
  2679. package/lib/ui/sdk/@dsc/ui-primitives/pdf-view.d.ts +0 -13
  2680. package/lib/ui/sdk/@dsc/ui-primitives/plugin-text.d.ts +0 -15
  2681. package/lib/ui/sdk/@dsc/ui-primitives/review-notice-card.d.ts +0 -27
  2682. package/lib/ui/sdk/@dsc/ui-primitives/review-notice.d.ts +0 -80
  2683. package/lib/ui/sdk/@dsc/ui-primitives/select.d.ts +0 -35
  2684. package/lib/ui/sdk/@dsc/ui-primitives/signal.d.ts +0 -9
  2685. package/lib/ui/sdk/@dsc/ui-primitives/sizes.d.ts +0 -15
  2686. package/lib/ui/sdk/@dsc/ui-primitives/skeleton.d.ts +0 -39
  2687. package/lib/ui/sdk/@dsc/ui-primitives/snapshot.d.ts +0 -46
  2688. package/lib/ui/sdk/@dsc/ui-primitives/table-view.d.ts +0 -23
  2689. package/lib/ui/sdk/@dsc/ui-primitives/thread-resizer.d.ts +0 -22
  2690. package/lib/ui/sdk/@dsc/ui-primitives/throughput.d.ts +0 -13
  2691. package/lib/ui/sdk/@dsc/ui-primitives/time.d.ts +0 -33
  2692. package/lib/ui/sdk/@dsc/ui-primitives/toast.d.ts +0 -16
  2693. package/lib/ui/sdk/@dsc/ui-primitives/tokens.d.ts +0 -23
  2694. package/lib/ui/sdk/@dsc/ui-primitives/tool-args.d.ts +0 -49
  2695. package/lib/ui/sdk/@dsc/ui-primitives/tool-summary.d.ts +0 -88
  2696. package/lib/ui/sdk/@dsc/ui-primitives/unified-diff.d.ts +0 -10
  2697. package/lib/ui/sdk/@dsc/ui-renderer/boot.d.ts +0 -130
  2698. package/lib/ui/sdk/@dsc/ui-renderer/cordis-host.d.ts +0 -113
  2699. package/lib/ui/sdk/@dsc/ui-renderer/hmr.d.ts +0 -43
  2700. package/lib/ui/sdk/@dsc/ui-renderer/index.d.ts +0 -20
  2701. package/lib/ui/sdk/@dsc/ui-renderer/package.json +0 -16
  2702. package/lib/ui/sdk/@dsc/ui-slots/index.d.ts +0 -19
  2703. package/lib/ui/sdk/@dsc/ui-slots/package.json +0 -16
  2704. package/lib/ui/sdk/@dsc/ui-slots/slots-react.d.ts +0 -48
  2705. package/lib/ui/sdk/@dsc/ui-slots/slots.d.ts +0 -102
  2706. package/lib/ui/services-react.d.ts +0 -27
  2707. package/lib/ui/services.d.ts +0 -74
  2708. package/lib/ui/signal.d.ts +0 -49
  2709. package/lib/ui/slots-ink.d.ts +0 -26
  2710. package/lib/ui/slots-ink.js +0 -78
  2711. package/lib/ui/slots-react.d.ts +0 -28
  2712. package/lib/ui/slots.d.ts +0 -481
  2713. package/lib/ui/store.d.ts +0 -89
  2714. package/lib/ui/tui-plugin-api.d.ts +0 -23
  2715. package/lib/ui/tui-plugin-api.js +0 -23
  2716. package/lib/ui/tui-plugins.d.ts +0 -47
  2717. package/lib/ui/tui-plugins.js +0 -240
  2718. /package/lib/{core → packages/approval}/call-meaning.d.ts +0 -0
  2719. /package/lib/{plugins/approval-floor.d.ts → packages/approval-floor/index.d.ts} +0 -0
  2720. /package/lib/{plugins/ask.d.ts → packages/ask/index.d.ts} +0 -0
  2721. /package/lib/{core → packages}/cdp/actions.d.ts +0 -0
  2722. /package/lib/{core → packages}/cdp/launch.d.ts +0 -0
  2723. /package/lib/{tools → packages/cli}/config-cli.d.ts +0 -0
  2724. /package/lib/{tools → packages/cli}/plugin-cli.d.ts +0 -0
  2725. /package/lib/{plugins/dsh-compat.d.ts → packages/dsh-compat/index.d.ts} +0 -0
  2726. /package/lib/{plugins/git.d.ts → packages/git/index.d.ts} +0 -0
  2727. /package/lib/{core → packages/goal}/goal.js +0 -0
  2728. /package/lib/{plugins/guards.d.ts → packages/guards/index.d.ts} +0 -0
  2729. /package/lib/{plugins/image-diet.d.ts → packages/image-diet/index.d.ts} +0 -0
  2730. /package/lib/{core → packages}/lsp/client.d.ts +0 -0
  2731. /package/lib/{core → packages}/lsp/framing.d.ts +0 -0
  2732. /package/lib/{core → packages}/lsp/framing.js +0 -0
  2733. /package/lib/{core → packages}/lsp/line-shift.d.ts +0 -0
  2734. /package/lib/{core → packages}/lsp/line-shift.js +0 -0
  2735. /package/lib/{core → packages}/lsp/manager.d.ts +0 -0
  2736. /package/lib/{core → packages}/lsp/normalize.d.ts +0 -0
  2737. /package/lib/{core → packages}/lsp/servers.d.ts +0 -0
  2738. /package/lib/{core → packages}/lsp/uri.d.ts +0 -0
  2739. /package/lib/{core → packages}/lsp/uri.js +0 -0
  2740. /package/lib/{plugins/mcp.d.ts → packages/mcp/index.d.ts} +0 -0
  2741. /package/lib/{core → packages/memory}/memory-eval.d.ts +0 -0
  2742. /package/lib/{core → packages/memory}/memory-eval.js +0 -0
  2743. /package/lib/{core → packages/permission-core}/permission-presets.js +0 -0
  2744. /package/lib/{plugins/plan.d.ts → packages/plan/index.d.ts} +0 -0
  2745. /package/lib/{plugins/plugin-manager.d.ts → packages/plugin-manager/index.d.ts} +0 -0
  2746. /package/lib/{plugins/presets.d.ts → packages/presets/index.d.ts} +0 -0
  2747. /package/lib/{plugins/ptc.d.ts → packages/ptc/index.d.ts} +0 -0
  2748. /package/lib/{plugins → packages}/remote/routes.d.ts +0 -0
  2749. /package/lib/{plugins/runtime.d.ts → packages/runtime/index.d.ts} +0 -0
  2750. /package/lib/{plugins/runtime-api.d.ts → packages/runtime-api/index.d.ts} +0 -0
  2751. /package/lib/{core → packages}/sandbox/backends.js +0 -0
  2752. /package/lib/{plugins/sandbox.d.ts → packages/sandbox/index.d.ts} +0 -0
  2753. /package/lib/{core → packages}/sandbox/net-proxy.d.ts +0 -0
  2754. /package/lib/{core → packages}/sandbox/win/abi.d.ts +0 -0
  2755. /package/lib/{core → packages}/sandbox/win/abi.js +0 -0
  2756. /package/lib/{core → packages}/sandbox/win/account.d.ts +0 -0
  2757. /package/lib/{core → packages}/sandbox/win/acl.d.ts +0 -0
  2758. /package/lib/{core → packages}/sandbox/win/acl.js +0 -0
  2759. /package/lib/{core → packages}/sandbox/win/doctor.d.ts +0 -0
  2760. /package/lib/{core → packages}/sandbox/win/net-abi.d.ts +0 -0
  2761. /package/lib/{core → packages}/sandbox/win/net-abi.js +0 -0
  2762. /package/lib/{core → packages}/sandbox/win/token.d.ts +0 -0
  2763. /package/lib/{core → packages}/sandbox/win/token.js +0 -0
  2764. /package/lib/{core → packages}/sandbox/win/utf16.d.ts +0 -0
  2765. /package/lib/{core → packages}/sandbox/win/utf16.js +0 -0
  2766. /package/lib/{core → packages}/sandbox/win/wfp.d.ts +0 -0
  2767. /package/lib/{core → packages}/sandbox/win/workspace-sid.d.ts +0 -0
  2768. /package/lib/{core → packages}/sandbox/win/workspace-sid.js +0 -0
  2769. /package/lib/{core/learnings → packages/self-improve}/store.d.ts +0 -0
  2770. /package/lib/{plugins/session.d.ts → packages/session/index.d.ts} +0 -0
  2771. /package/lib/{plugins/session-search.d.ts → packages/session-search/index.d.ts} +0 -0
  2772. /package/lib/{core → packages/session-search}/session-index.d.ts +0 -0
  2773. /package/lib/{plugins/session-title.d.ts → packages/session-title/index.d.ts} +0 -0
  2774. /package/lib/{core → packages/settings}/model-discovery.d.ts +0 -0
  2775. /package/lib/{core → packages/settings}/model-discovery.js +0 -0
  2776. /package/lib/{plugins/spill.d.ts → packages/spill/index.d.ts} +0 -0
  2777. /package/lib/{core → packages/surfaces}/surface-registry.d.ts +0 -0
  2778. /package/lib/{core → packages/surfaces}/surface-registry.js +0 -0
  2779. /package/lib/{core → packages/todo}/todo.js +0 -0
  2780. /package/lib/{plugins/tool-search.d.ts → packages/tool-search/index.d.ts} +0 -0
  2781. /package/lib/{core → packages/tool-search}/tool-search.js +0 -0
  2782. /package/lib/{plugins/tools.d.ts → packages/tools/index.d.ts} +0 -0
  2783. /package/lib/{plugins/tools.js → packages/tools/index.js} +0 -0
  2784. /package/lib/{plugins/tools-default.d.ts → packages/tools-default/index.d.ts} +0 -0
  2785. /package/lib/{app → packages/tui/app}/AgentsOverlay.js +0 -0
  2786. /package/lib/{app → packages/tui/app}/AskCard.js +0 -0
  2787. /package/lib/{app → packages/tui/app}/MarkdownView.d.ts +0 -0
  2788. /package/lib/{app → packages/tui/app}/MarkdownView.js +0 -0
  2789. /package/lib/{app → packages/tui/app}/ModelPicker.js +0 -0
  2790. /package/lib/{app → packages/tui/app}/PickerFrame.d.ts +0 -0
  2791. /package/lib/{app → packages/tui/app}/PickerFrame.js +0 -0
  2792. /package/lib/{app → packages/tui/app}/PlanReviewCard.js +0 -0
  2793. /package/lib/{app → packages/tui/app}/PresetPicker.js +0 -0
  2794. /package/lib/{app → packages/tui/app}/PreviewOverlay.d.ts +0 -0
  2795. /package/lib/{app → packages/tui/app}/PreviewOverlay.js +0 -0
  2796. /package/lib/{app → packages/tui/app}/SessionPicker.js +0 -0
  2797. /package/lib/{app → packages/tui/app}/SkillsPicker.js +0 -0
  2798. /package/lib/{app → packages/tui/app}/TimelineRail.d.ts +0 -0
  2799. /package/lib/{app → packages/tui/app}/TimelineRail.js +0 -0
  2800. /package/lib/{app → packages/tui/app}/TranscriptOverlay.js +0 -0
  2801. /package/lib/{app → packages/tui/app}/Welcome.d.ts +0 -0
  2802. /package/lib/{app → packages/tui/app}/attach.d.ts +0 -0
  2803. /package/lib/{app → packages/tui/app}/attach.js +0 -0
  2804. /package/lib/{app → packages/tui/app}/click.d.ts +0 -0
  2805. /package/lib/{app → packages/tui/app}/click.js +0 -0
  2806. /package/lib/{app → packages/tui/app}/clipboard-image.d.ts +0 -0
  2807. /package/lib/{app → packages/tui/app}/cursor.d.ts +0 -0
  2808. /package/lib/{app → packages/tui/app}/cursor.js +0 -0
  2809. /package/lib/{app → packages/tui/app}/history-store.d.ts +0 -0
  2810. /package/lib/{app → packages/tui/app}/image-blocks.d.ts +0 -0
  2811. /package/lib/{app → packages/tui/app}/keymap.d.ts +0 -0
  2812. /package/lib/{app → packages/tui/app}/keymap.js +0 -0
  2813. /package/lib/{app → packages/tui/app}/markdown.d.ts +0 -0
  2814. /package/lib/{app → packages/tui/app}/markdown.js +0 -0
  2815. /package/lib/{app → packages/tui/app}/mouse.d.ts +0 -0
  2816. /package/lib/{app → packages/tui/app}/mouse.js +0 -0
  2817. /package/lib/{app → packages/tui/app}/pointer.d.ts +0 -0
  2818. /package/lib/{app → packages/tui/app}/pointer.js +0 -0
  2819. /package/lib/{app → packages/tui/app}/scroll-model.js +0 -0
  2820. /package/lib/{app → packages/tui/app}/snapshot-subscribe.d.ts +0 -0
  2821. /package/lib/{app → packages/tui/app}/theme.d.ts +0 -0
  2822. /package/lib/{app → packages/tui/app}/theme.js +0 -0
  2823. /package/lib/{app → packages/tui/app}/ticker.d.ts +0 -0
  2824. /package/lib/{app → packages/tui/app}/ticker.js +0 -0
  2825. /package/lib/{plugins/tui.d.ts → packages/tui/index.d.ts} +0 -0
  2826. /package/lib/{ui → packages/ui-core}/arrival.d.ts +0 -0
  2827. /package/lib/{ui → packages/ui-core}/arrival.js +0 -0
  2828. /package/lib/{ui → packages/ui-core}/frames.d.ts +0 -0
  2829. /package/lib/{ui → packages/ui-core}/plugin.js +0 -0
  2830. /package/lib/{ui → packages/ui-core}/scoped-slots.js +0 -0
  2831. /package/lib/{ui/sdk/@dsc/ui-core/ui → packages/ui-core}/services-react.d.ts +0 -0
  2832. /package/lib/{ui → packages/ui-core}/services-react.js +0 -0
  2833. /package/lib/{ui/sdk/@dsc/ui-core/ui → packages/ui-core}/services.d.ts +0 -0
  2834. /package/lib/{ui → packages/ui-core}/services.js +0 -0
  2835. /package/lib/{ui/sdk/@dsc/ui-core/ui → packages/ui-core}/signal.d.ts +0 -0
  2836. /package/lib/{ui → packages/ui-core}/signal.js +0 -0
  2837. /package/lib/{ui/sdk/@dsc/ui-core/ui → packages/ui-core}/slots-react.d.ts +0 -0
  2838. /package/lib/{ui → packages/ui-core}/slots-react.js +0 -0
  2839. /package/lib/{ui → packages/ui-core}/slots.js +0 -0
  2840. /package/lib/{ui/sdk/@dsc/ui-core/ui → packages/ui-core}/store.d.ts +0 -0
  2841. /package/lib/{ui → packages/ui-core}/store.js +0 -0
@@ -1,89 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./chunk-DlC-OlHO.js","./chunk-BIGW1oBm.js","./chunk-D38fbIBN.js","./chunk-C0m74zRD.js","./chunk-wDzz0qaB.js","./chunk-Z72CF80r.js","./chunk-B_vNuMnf.js","./chunk-CylS5w8V.js","./chunk-DkvoVjww.js","./chunk-Cp-IABpG.js","./chunk-ySF7HWmS.js","./chunk-GwR3hkPK.js","./chunk-BPQ3VLAy.js","./chunk-g9-lgVsj.js","./chunk-COt5Ahok.js","./chunk-Yzrsuije.js","./chunk-CPTIWCL2.js","./chunk-Buea-lGh.js","./chunk-DNasK_ZG.js","./chunk-C9GSunVT.js","./chunk-DNRxmY5a.js","./chunk-DJeabLx-.js","./chunk-DnzrXTVv.js","./chunk-CQLl-L-p.js","./chunk-C0PvZCCE.js","./chunk-B6aJPvgy.js","./chunk-Cf5RLm7j.js","./chunk-BX6H_ySx.js","./chunk-CWanVSXC.js","./chunk-Cvjx9yec.js","./chunk-B_P3UbPa.js","./chunk-DNSN1z5r.js","./chunk-DHK4yRfg.js","./chunk-EXT84bkm.js"])))=>i.map(i=>d[i]);
2
- function Yh(e,t){for(var n=0;n<t.length;n++){const s=t[n];if(typeof s!="string"&&!Array.isArray(s)){for(const l in s)if(l!=="default"&&!(l in e)){const o=Object.getOwnPropertyDescriptor(s,l);o&&Object.defineProperty(e,l,o.get?o:{enumerable:!0,get:()=>s[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))s(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function da(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var V1={exports:{}},_o={};var fy;function V9(){if(fy)return _o;fy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(s,l,o){var u=null;if(o!==void 0&&(u=""+o),l.key!==void 0&&(u=""+l.key),"key"in l){o={};for(var h in l)h!=="key"&&(o[h]=l[h])}else o=l;return l=o.ref,{$$typeof:e,type:s,key:u,ref:l!==void 0?l:null,props:o}}return _o.Fragment=t,_o.jsx=n,_o.jsxs=n,_o}var dy;function q9(){return dy||(dy=1,V1.exports=V9()),V1.exports}var y=q9();const $9=da(y),Y9=Yh({__proto__:null,default:$9},[y]);var q1={exports:{}},De={};var py;function K9(){if(py)return De;py=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),u=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),S=Symbol.for("react.view_transition"),v=Symbol.iterator;function w(D){return D===null||typeof D!="object"?null:(D=v&&D[v]||D["@@iterator"],typeof D=="function"?D:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,M={};function U(D,ne,ae){this.props=D,this.context=ne,this.refs=M,this.updater=ae||C}U.prototype.isReactComponent={},U.prototype.setState=function(D,ne){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,ne,"setState")},U.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function B(){}B.prototype=U.prototype;function X(D,ne,ae){this.props=D,this.context=ne,this.refs=M,this.updater=ae||C}var Q=X.prototype=new B;Q.constructor=X,E(Q,U.prototype),Q.isPureReactComponent=!0;var R=Array.isArray;function V(){}var se={H:null,A:null,T:null,S:null},me=Object.prototype.hasOwnProperty;function k(D,ne,ae){var de=ae.ref;return{$$typeof:e,type:D,key:ne,ref:de!==void 0?de:null,props:ae}}function K(D,ne){return k(D.type,ne,D.props)}function W(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function q(D){var ne={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(ae){return ne[ae]})}var Z=/\/+/g;function P(D,ne){return typeof D=="object"&&D!==null&&D.key!=null?q(""+D.key):ne.toString(36)}function H(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(V,V):(D.status="pending",D.then(function(ne){D.status==="pending"&&(D.status="fulfilled",D.value=ne)},function(ne){D.status==="pending"&&(D.status="rejected",D.reason=ne)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function ie(D,ne,ae,de,Ee){var ve=typeof D;(ve==="undefined"||ve==="boolean")&&(D=null);var Me=!1;if(D===null)Me=!0;else switch(ve){case"bigint":case"string":case"number":Me=!0;break;case"object":switch(D.$$typeof){case e:case t:Me=!0;break;case g:return Me=D._init,ie(Me(D._payload),ne,ae,de,Ee)}}if(Me)return Ee=Ee(D),Me=de===""?"."+P(D,0):de,R(Ee)?(ae="",Me!=null&&(ae=Me.replace(Z,"$&/")+"/"),ie(Ee,ne,ae,"",function(Be){return Be})):Ee!=null&&(W(Ee)&&(Ee=K(Ee,ae+(Ee.key==null||D&&D.key===Ee.key?"":(""+Ee.key).replace(Z,"$&/")+"/")+Me)),ne.push(Ee)),1;Me=0;var fe=de===""?".":de+":";if(R(D))for(var Se=0;Se<D.length;Se++)de=D[Se],ve=fe+P(de,Se),Me+=ie(de,ne,ae,ve,Ee);else if(Se=w(D),typeof Se=="function")for(D=Se.call(D),Se=0;!(de=D.next()).done;)de=de.value,ve=fe+P(de,Se++),Me+=ie(de,ne,ae,ve,Ee);else if(ve==="object"){if(typeof D.then=="function")return ie(H(D),ne,ae,de,Ee);throw ne=String(D),Error("Objects are not valid as a React child (found: "+(ne==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":ne)+"). If you meant to render a collection of children, use an array instead.")}return Me}function $(D,ne,ae){if(D==null)return D;var de=[],Ee=0;return ie(D,de,"","",function(ve){return ne.call(ae,ve,Ee++)}),de}function oe(D){if(D._status===-1){var ne=D._result,ae=ne();ae.then(function(de){(D._status===0||D._status===-1)&&(D._status=1,D._result=de,ae.status===void 0&&(ae.status="fulfilled",ae.value=de))},function(de){(D._status===0||D._status===-1)&&(D._status=2,D._result=de,ae.status===void 0&&(ae.status="rejected",ae.reason=de))}),D._status===-1&&(D._status=0,D._result=ae)}if(D._status===1)return D._result.default;throw D._result}var T=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ne=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(ne))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)};function ze(D){var ne=se.T,ae={};ae.types=ne!==null?ne.types:null,se.T=ae;try{var de=D(),Ee=se.S;Ee!==null&&Ee(ae,de),typeof de=="object"&&de!==null&&typeof de.then=="function"&&de.then(V,T)}catch(ve){T(ve)}finally{ne!==null&&ae.types!==null&&(ne.types=ae.types),se.T=ne}}function We(D){var ne=se.T;if(ne!==null){var ae=ne.types;ae===null?ne.types=[D]:ae.indexOf(D)===-1&&ae.push(D)}else ze(We.bind(null,D))}var O={map:$,forEach:function(D,ne,ae){$(D,function(){ne.apply(this,arguments)},ae)},count:function(D){var ne=0;return $(D,function(){ne++}),ne},toArray:function(D){return $(D,function(ne){return ne})||[]},only:function(D){if(!W(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return De.Activity=_,De.Children=O,De.Component=U,De.Fragment=n,De.Profiler=l,De.PureComponent=X,De.StrictMode=s,De.Suspense=p,De.ViewTransition=S,De.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=se,De.__COMPILER_RUNTIME={__proto__:null,c:function(D){return se.H.useMemoCache(D)}},De.addTransitionType=We,De.cache=function(D){return function(){return D.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(D,ne,ae){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var de=E({},D.props),Ee=D.key;if(ne!=null)for(ve in ne.key!==void 0&&(Ee=""+ne.key),ne)!me.call(ne,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&ne.ref===void 0||(de[ve]=ne[ve]);var ve=arguments.length-2;if(ve===1)de.children=ae;else if(1<ve){for(var Me=Array(ve),fe=0;fe<ve;fe++)Me[fe]=arguments[fe+2];de.children=Me}return k(D.type,Ee,de)},De.createContext=function(D){return D={$$typeof:u,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:o,_context:D},D},De.createElement=function(D,ne,ae){var de,Ee={},ve=null;if(ne!=null)for(de in ne.key!==void 0&&(ve=""+ne.key),ne)me.call(ne,de)&&de!=="key"&&de!=="__self"&&de!=="__source"&&(Ee[de]=ne[de]);var Me=arguments.length-2;if(Me===1)Ee.children=ae;else if(1<Me){for(var fe=Array(Me),Se=0;Se<Me;Se++)fe[Se]=arguments[Se+2];Ee.children=fe}if(D&&D.defaultProps)for(de in Me=D.defaultProps,Me)Ee[de]===void 0&&(Ee[de]=Me[de]);return k(D,ve,Ee)},De.createRef=function(){return{current:null}},De.forwardRef=function(D){return{$$typeof:h,render:D}},De.isValidElement=W,De.lazy=function(D){return{$$typeof:g,_payload:{_status:-1,_result:D},_init:oe}},De.memo=function(D,ne){return{$$typeof:d,type:D,compare:ne===void 0?null:ne}},De.startTransition=ze,De.unstable_useCacheRefresh=function(){return se.H.useCacheRefresh()},De.use=function(D){return se.H.use(D)},De.useActionState=function(D,ne,ae){return se.H.useActionState(D,ne,ae)},De.useCallback=function(D,ne){return se.H.useCallback(D,ne)},De.useContext=function(D){return se.H.useContext(D)},De.useDebugValue=function(){},De.useDeferredValue=function(D,ne){return se.H.useDeferredValue(D,ne)},De.useEffect=function(D,ne){return se.H.useEffect(D,ne)},De.useEffectEvent=function(D){return se.H.useEffectEvent(D)},De.useId=function(){return se.H.useId()},De.useImperativeHandle=function(D,ne,ae){return se.H.useImperativeHandle(D,ne,ae)},De.useInsertionEffect=function(D,ne){return se.H.useInsertionEffect(D,ne)},De.useLayoutEffect=function(D,ne){return se.H.useLayoutEffect(D,ne)},De.useMemo=function(D,ne){return se.H.useMemo(D,ne)},De.useOptimistic=function(D,ne){return se.H.useOptimistic(D,ne)},De.useReducer=function(D,ne,ae){return se.H.useReducer(D,ne,ae)},De.useRef=function(D){return se.H.useRef(D)},De.useState=function(D){return se.H.useState(D)},De.useSyncExternalStore=function(D,ne,ae){return se.H.useSyncExternalStore(D,ne,ae)},De.useTransition=function(){return se.H.useTransition()},De.version="19.3.1",De}var my;function Jp(){return my||(my=1,q1.exports=K9()),q1.exports}var I=Jp();const W9=da(I),G9=Yh({__proto__:null,default:W9},[I]);var $1={exports:{}},go={},Y1={exports:{}},K1={};var _y;function X9(){return _y||(_y=1,(function(e){function t(H,ie){var $=H.length;H.push(ie);e:for(;0<$;){var oe=$-1>>>1,T=H[oe];if(0<l(T,ie))H[oe]=ie,H[$]=T,$=oe;else break e}}function n(H){return H.length===0?null:H[0]}function s(H){if(H.length===0)return null;var ie=H[0],$=H.pop();if($!==ie){H[0]=$;e:for(var oe=0,T=H.length,ze=T>>>1;oe<ze;){var We=2*(oe+1)-1,O=H[We],D=We+1,ne=H[D];if(0>l(O,$))D<T&&0>l(ne,O)?(H[oe]=ne,H[D]=$,oe=D):(H[oe]=O,H[We]=$,oe=We);else if(D<T&&0>l(ne,$))H[oe]=ne,H[D]=$,oe=D;else break e}}return ie}function l(H,ie){var $=H.sortIndex-ie.sortIndex;return $!==0?$:H.id-ie.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var u=Date,h=u.now();e.unstable_now=function(){return u.now()-h}}var p=[],d=[],g=1,_=null,S=3,v=!1,w=!1,C=!1,E=!1,M=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;function X(H){for(var ie=n(d);ie!==null;){if(ie.callback===null)s(d);else if(ie.startTime<=H)s(d),ie.sortIndex=ie.expirationTime,t(p,ie);else break;ie=n(d)}}function Q(H){if(C=!1,X(H),!w)if(n(p)!==null)w=!0,R||(R=!0,W());else{var ie=n(d);ie!==null&&P(Q,ie.startTime-H)}}var R=!1,V=-1,se=5,me=-1;function k(){return E?!0:!(e.unstable_now()-me<se)}function K(){if(E=!1,R){var H=e.unstable_now();me=H;var ie=!0;try{e:{w=!1,C&&(C=!1,U(V),V=-1),v=!0;var $=S;try{t:{for(X(H),_=n(p);_!==null&&!(_.expirationTime>H&&k());){var oe=_.callback;if(typeof oe=="function"){_.callback=null,S=_.priorityLevel;var T=oe(_.expirationTime<=H);if(H=e.unstable_now(),typeof T=="function"){_.callback=T,X(H),ie=!0;break t}_===n(p)&&s(p),X(H)}else s(p);_=n(p)}if(_!==null)ie=!0;else{var ze=n(d);ze!==null&&P(Q,ze.startTime-H),ie=!1}}break e}finally{_=null,S=$,v=!1}ie=void 0}}finally{ie?W():R=!1}}}var W;if(typeof B=="function")W=function(){B(K)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,Z=q.port2;q.port1.onmessage=K,W=function(){Z.postMessage(null)}}else W=function(){M(K,0)};function P(H,ie){V=M(function(){H(e.unstable_now())},ie)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(H){H.callback=null},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):se=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return S},e.unstable_next=function(H){switch(S){case 1:case 2:case 3:var ie=3;break;default:ie=S}var $=S;S=ie;try{return H()}finally{S=$}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(H,ie){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var $=S;S=H;try{return ie()}finally{S=$}},e.unstable_scheduleCallback=function(H,ie,$){var oe=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?oe+$:oe):$=oe,H){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=$+T,H={id:g++,callback:ie,priorityLevel:H,startTime:$,expirationTime:T,sortIndex:-1},$>oe?(H.sortIndex=$,t(d,H),n(p)===null&&H===n(d)&&(C?(U(V),V=-1):C=!0,P(Q,$-oe))):(H.sortIndex=T,t(p,H),w||v||(w=!0,R||(R=!0,W()))),H},e.unstable_shouldYield=k,e.unstable_wrapCallback=function(H){var ie=S;return function(){var $=S;S=ie;try{return H.apply(this,arguments)}finally{S=$}}}})(K1)),K1}var gy;function Z9(){return gy||(gy=1,Y1.exports=X9()),Y1.exports}var W1={exports:{}},ei={};var vy;function Q9(){if(vy)return ei;vy=1;var e=Jp();function t(g){var _="https://react.dev/errors/"+g;if(1<arguments.length){_+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)_+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+g+"; visit "+_+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var s={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},l=Symbol.for("react.portal"),o=Symbol.for("react.recoverable"),u=Symbol.for("react.optimistic_key");function h(g,_,S){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:v==null?null:v===u?u:""+v,children:g,containerInfo:_,implementation:S}}var p=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(g,_){if(g==="font")return"";if(typeof _=="string")return _==="use-credentials"?_:""}return ei.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,ei.browser=function(g){return{$$typeof:o,_reason:g}},ei.createPortal=function(g,_){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_||_.nodeType!==1&&_.nodeType!==9&&_.nodeType!==11)throw Error(t(299));return h(g,_,null,S)},ei.flushSync=function(g){var _=p.T,S=s.p;try{if(p.T=null,s.p=2,g)return g()}finally{p.T=_,s.p=S,s.d.f()}},ei.preconnect=function(g,_){typeof g=="string"&&(_?(_=_.crossOrigin,_=typeof _=="string"?_==="use-credentials"?_:"":void 0):_=null,s.d.C(g,_))},ei.prefetchDNS=function(g){typeof g=="string"&&s.d.D(g)},ei.preinit=function(g,_){if(typeof g=="string"&&_&&typeof _.as=="string"){var S=_.as,v=d(S,_.crossOrigin),w=typeof _.integrity=="string"?_.integrity:void 0,C=typeof _.fetchPriority=="string"?_.fetchPriority:void 0;S==="style"?s.d.S(g,typeof _.precedence=="string"?_.precedence:void 0,{crossOrigin:v,integrity:w,fetchPriority:C}):S==="script"&&s.d.X(g,{crossOrigin:v,integrity:w,fetchPriority:C,nonce:typeof _.nonce=="string"?_.nonce:void 0})}},ei.preinitModule=function(g,_){if(typeof g=="string")if(typeof _=="object"&&_!==null){if(_.as==null||_.as==="script"){var S=d(_.as,_.crossOrigin);s.d.M(g,{crossOrigin:S,integrity:typeof _.integrity=="string"?_.integrity:void 0,nonce:typeof _.nonce=="string"?_.nonce:void 0,fetchPriority:typeof _.fetchPriority=="string"?_.fetchPriority:void 0})}}else _==null&&s.d.M(g)},ei.preload=function(g,_){if(typeof g=="string"&&typeof _=="object"&&_!==null&&typeof _.as=="string"){var S=_.as,v=d(S,_.crossOrigin);s.d.L(g,S,{crossOrigin:v,integrity:typeof _.integrity=="string"?_.integrity:void 0,nonce:typeof _.nonce=="string"?_.nonce:void 0,type:typeof _.type=="string"?_.type:void 0,fetchPriority:typeof _.fetchPriority=="string"?_.fetchPriority:void 0,referrerPolicy:typeof _.referrerPolicy=="string"?_.referrerPolicy:void 0,imageSrcSet:typeof _.imageSrcSet=="string"?_.imageSrcSet:void 0,imageSizes:typeof _.imageSizes=="string"?_.imageSizes:void 0,media:typeof _.media=="string"?_.media:void 0})}},ei.preloadModule=function(g,_){if(typeof g=="string")if(_){var S=d(_.as,_.crossOrigin);s.d.m(g,{as:typeof _.as=="string"&&_.as!=="script"?_.as:void 0,crossOrigin:S,integrity:typeof _.integrity=="string"?_.integrity:void 0,nonce:typeof _.nonce=="string"?_.nonce:void 0,fetchPriority:typeof _.fetchPriority=="string"?_.fetchPriority:void 0})}else s.d.m(g)},ei.requestFormReset=function(g){s.d.r(g)},ei.unstable_batchedUpdates=function(g,_){return g(_)},ei.useFormState=function(g,_,S){return p.H.useFormState(g,_,S)},ei.useFormStatus=function(){return p.H.useHostTransitionStatus()},ei.version="19.3.1",ei}var yy;function U5(){if(yy)return W1.exports;yy=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),W1.exports=Q9(),W1.exports}var Sy;function J9(){if(Sy)return go;Sy=1;var e=Z9(),t=Jp(),n=U5();function s(i){var r="https://react.dev/errors/"+i;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)r+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+i+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function o(i){for(var r=i,a=r;a&&!a.alternate;)r=a,(r.flags&4098)!==0&&(i=r.return),a=r.return;for(;r.return;)r=r.return;return r.tag===3?i:null}function u(i){if(i.tag===13){var r=i.memoizedState;if(r===null&&(i=i.alternate,i!==null&&(r=i.memoizedState)),r!==null)return r.dehydrated}return null}function h(i){if(i.tag===31){var r=i.memoizedState;if(r===null&&(i=i.alternate,i!==null&&(r=i.memoizedState)),r!==null)return r.dehydrated}return null}function p(i){if(o(i)!==i)throw Error(s(188))}function d(i){var r=i.alternate;if(!r){if(r=o(i),r===null)throw Error(s(188));return r!==i?null:i}for(var a=i,c=r;;){var f=a.return;if(f===null)break;var m=f.alternate;if(m===null){if(c=f.return,c!==null){a=c;continue}break}if(f.child===m.child){for(m=f.child;m;){if(m===a)return p(f),i;if(m===c)return p(f),r;m=m.sibling}throw Error(s(188))}if(a.return!==c.return)a=f,c=m;else{for(var b=!1,x=f.child;x;){if(x===a){b=!0,a=f,c=m;break}if(x===c){b=!0,c=f,a=m;break}x=x.sibling}if(!b){for(x=m.child;x;){if(x===a){b=!0,a=m,c=f;break}if(x===c){b=!0,c=m,a=f;break}x=x.sibling}if(!b)throw Error(s(189))}}if(a.alternate!==c)throw Error(s(190))}if(a.tag!==3)throw Error(s(188));return a.stateNode.current===a?i:r}function g(i){var r=i.tag;if(r===5||r===26||r===27||r===6)return i;for(i=i.child;i!==null;){if(r=g(i),r!==null)return r;i=i.sibling}return null}function _(i,r,a,c,f,m){for(;i!==null;){if((i.tag===5||i.tag===27||i.tag===6)&&a(i,c,f,m)||(i.tag!==22||i.memoizedState===null)&&(r||i.tag!==5&&i.tag!==27)&&_(i.child,r,a,c,f,m))return!0;i=i.sibling}return!1}function S(i){for(i=i.return;i!==null;){if(i.tag===3||i.tag===5||i.tag===27)return i;i=i.return}return null}function v(i){var r=!1;for(i=i.return;i!==null&&(i.tag===4&&(r=!0),!(i.tag===3||i.tag===5||i.tag===27));)i=i.return;return r}function w(i){var r=[null,null],a=S(i);return a===null||C(r,i,a.child,{foundSelf:!1}),r}function C(i,r,a,c){for(;a!==null;){if(a===r)c.foundSelf=!0;else if(a.tag===5||a.tag===27||a.tag===6){if(c.foundSelf)return i[1]=a,!0;i[0]=a}else if((a.tag!==22||a.memoizedState===null)&&C(i,r,a.child,c))return!0;a=a.sibling}return!1}function E(i){switch(i.tag){case 5:case 27:case 6:return i.stateNode;case 3:return i.stateNode.containerInfo;default:throw Error(s(559))}}var M=null,U=null;function B(i,r,a){return i===a?!0:i===r?(M=i,!0):!1}function X(i,r,a){return i===a?(U=i,!1):i===r?(U!==null&&(M=i),!0):!1}function Q(i){if(i===null)return null;do i=i===null?null:i.return;while(i&&i.tag!==5&&i.tag!==27&&i.tag!==3);return i||null}function R(i,r,a){for(var c=0,f=i;f;f=a(f))c++;f=0;for(var m=r;m;m=a(m))f++;for(;0<c-f;)i=a(i),c--;for(;0<f-c;)r=a(r),f--;for(;c--;){if(i===r||r!==null&&i===r.alternate)return i;i=a(i),r=a(r)}return null}var V=Object.assign,se=Symbol.for("react.element"),me=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),K=Symbol.for("react.fragment"),W=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),Z=Symbol.for("react.consumer"),P=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),ie=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),ze=Symbol.for("react.activity"),We=Symbol.for("react.legacy_hidden"),O=Symbol.for("react.memo_cache_sentinel"),D=Symbol.for("react.view_transition"),ne=Symbol.for("react.recoverable"),ae=Symbol.iterator;function de(i){return i===null||typeof i!="object"?null:(i=ae&&i[ae]||i["@@iterator"],typeof i=="function"?i:null)}var Ee=Symbol.for("react.client.reference");function ve(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===Ee?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case K:return"Fragment";case q:return"Profiler";case W:return"StrictMode";case ie:return"Suspense";case $:return"SuspenseList";case ze:return"Activity";case D:return"ViewTransition"}if(typeof i=="object")switch(i.$$typeof){case k:return"Portal";case P:return i.displayName||"Context";case Z:return(i._context.displayName||"Context")+".Consumer";case H:var r=i.render;return i=i.displayName,i||(i=r.displayName||r.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case oe:return r=i.displayName||null,r!==null?r:ve(i.type)||"Memo";case T:r=i._payload,i=i._init;try{return ve(i(r))}catch{}}return null}var Me=Array.isArray,fe=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Se=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Be={pending:!1,data:null,method:null,action:null},Fn=[],_r=-1;function Ti(i){return{current:i}}function wt(i){0>_r||(i.current=Fn[_r],Fn[_r]=null,_r--)}function Ze(i,r){_r++,Fn[_r]=i.current,i.current=r}var Vi=Ti(null),gr=Ti(null),an=Ti(null),tl=Ti(null);function il(i,r){switch(Ze(an,r),Ze(gr,i),Ze(Vi,null),r.nodeType){case 9:case 11:i=(i=r.documentElement)&&(i=i.namespaceURI)?b3(i):0;break;default:if(i=r.tagName,r=r.namespaceURI)r=b3(r),i=w3(r,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}wt(Vi),Ze(Vi,i)}function vr(){wt(Vi),wt(gr),wt(an)}function ba(i){var r=i.memoizedState;r!==null&&(ql._currentValue=r.memoizedState,Ze(tl,i)),r=Vi.current;var a=w3(r,i.type);r!==a&&(Ze(gr,i),Ze(Vi,a))}function nl(i){gr.current===i&&(wt(Vi),wt(gr)),tl.current===i&&(wt(tl),ql._currentValue=Be)}var J,ce;function xe(i){if(J===void 0)try{throw Error()}catch(a){var r=a.stack.trim().match(/\n( *(at )?)/);J=r&&r[1]||"",ce=-1<a.stack.indexOf(`
3
- at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
4
- `+J+i+ce}var Re=!1;function zt(i,r){if(!i||Re)return"";Re=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(r){var te=function(){throw Error()};if(Object.defineProperty(te.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(te,[])}catch(he){var N=he}Reflect.construct(i,[],te)}else{try{te.call()}catch(he){N=he}te=!1;try{var Y=Object.getOwnPropertyDescriptor(i.prototype,"props");Object.defineProperty(i.prototype,"props",{configurable:!0,set:function(){throw Error()}}),te=!0,new i}finally{te&&(Y!==void 0?Object.defineProperty(i.prototype,"props",Y):delete i.prototype.props)}}}else{try{throw Error()}catch(he){N=he}(te=i())&&typeof te.catch=="function"&&te.catch(function(){})}}catch(he){if(he&&N&&typeof he.stack=="string")return[he.stack,N.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=c.DetermineComponentFrameRoot(),b=m[0],x=m[1];if(b&&x){var A=b.split(`
5
- `),j=x.split(`
6
- `);for(f=c=0;c<A.length&&!A[c].includes("DetermineComponentFrameRoot");)c++;for(;f<j.length&&!j[f].includes("DetermineComponentFrameRoot");)f++;if(c===A.length||f===j.length)for(c=A.length-1,f=j.length-1;1<=c&&0<=f&&A[c]!==j[f];)f--;for(;1<=c&&0<=f;c--,f--)if(A[c]!==j[f]){if(c!==1||f!==1)do if(c--,f--,0>f||A[c]!==j[f]){var G=`
7
- `+A[c].replace(" at new "," at ");return i.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",i.displayName)),G}while(1<=c&&0<=f);break}}}finally{Re=!1,Error.prepareStackTrace=a}return(a=i?i.displayName||i.name:"")?xe(a):""}function nt(i,r){switch(i.tag){case 26:case 27:case 5:return xe(i.type);case 16:return xe("Lazy");case 13:return i.child!==r&&r!==null?xe("Suspense Fallback"):xe("Suspense");case 19:return xe("SuspenseList");case 0:case 15:return zt(i.type,!1);case 11:return zt(i.type.render,!1);case 1:return zt(i.type,!0);case 31:return xe("Activity");case 30:return xe("ViewTransition");default:return""}}function Yt(i){try{var r="",a=null;do r+=nt(i,a),a=i,i=i.return;while(i);return r}catch(c){return`
8
- Error generating stack: `+c.message+`
9
- `+c.stack}}var gi=Object.prototype.hasOwnProperty,Un=e.unstable_scheduleCallback,Vn=e.unstable_cancelCallback,hs=e.unstable_shouldYield,_c=e.unstable_requestPaint,Kt=e.unstable_now,oi=e.unstable_getCurrentPriorityLevel,qn=e.unstable_ImmediatePriority,qi=e.unstable_UserBlockingPriority,gc=e.unstable_NormalPriority,Z7=e.unstable_LowPriority,Y_=e.unstable_IdlePriority,Q7=e.log,J7=e.unstable_setDisableYieldValue,wa=null,Mi=null;function yr(i){if(typeof Q7=="function"&&J7(i),Mi&&typeof Mi.setStrictMode=="function")try{Mi.setStrictMode(wa,i)}catch{}}var Ai=Math.clz32?Math.clz32:iw,ew=Math.log,tw=Math.LN2;function iw(i){return i>>>=0,i===0?32:31-(ew(i)/tw|0)|0}var vc=256,yc=262144,Sc=4194304;function fs(i){var r=i&42;if(r!==0)return r;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&-i;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function bc(i,r,a){var c=i.pendingLanes;if(c===0)return 0;var f=0,m=i.suspendedLanes,b=i.pingedLanes;i=i.warmLanes;var x=c&134217727;return x!==0?(c=x&~m,c!==0?f=fs(c):(b&=x,b!==0?f=fs(b):a||(a=x&~i,a!==0&&(f=fs(a))))):(x=c&~m,x!==0?f=fs(x):b!==0?f=fs(b):a||(a=c&~i,a!==0&&(f=fs(a)))),f===0?0:r!==0&&r!==f&&(r&m)===0&&(m=f&-f,a=r&-r,m>=a||m===32&&(a&4194048)!==0)?r:f}function xa(i,r){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&r)===0}function K_(i,r){(r&8)!==0&&(r|=r&32);var a=i.entangledLanes;if(a!==0)for(i=i.entanglements,a&=r;0<a;){var c=31-Ai(a),f=1<<c;r|=i[c],a&=~f}return r}function nw(i,r){switch(i){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function W_(){var i=Sc;return Sc<<=1,(Sc&62914560)===0&&(Sc=4194304),i}function _f(i){for(var r=[],a=0;31>a;a++)r.push(i);return r}function Ca(i,r){i.pendingLanes|=r,r!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function rw(i,r,a,c,f,m){var b=i.pendingLanes;i.pendingLanes=a,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=a,i.entangledLanes&=a,i.errorRecoveryDisabledLanes&=a,i.shellSuspendCounter=0;var x=i.entanglements,A=i.expirationTimes,j=i.hiddenUpdates;for(a=b&~a;0<a;){var G=31-Ai(a),te=1<<G;x[G]=0,A[G]=-1;var N=j[G];if(N!==null)for(j[G]=null,G=0;G<N.length;G++){var Y=N[G];Y!==null&&(Y.lane&=-536870913)}a&=~te}c!==0&&G_(i,c,0),m!==0&&f===0&&i.tag!==0&&(i.suspendedLanes|=m&~(b&~r))}function G_(i,r,a){i.pendingLanes|=r,i.suspendedLanes&=~r;var c=31-Ai(r);i.entangledLanes|=r,i.entanglements[c]=i.entanglements[c]|1073741824|a&261930}function X_(i,r){var a=i.entangledLanes|=r;for(i=i.entanglements;a;){var c=31-Ai(a),f=1<<c;f&r|i[c]&r&&(i[c]|=r),a&=~f}}function Z_(i,r){var a=r&-r;return a=(a&42)!==0?1:gf(a),(a&(i.suspendedLanes|r))!==0?0:a}function gf(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function vf(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function Q_(){var i=Se.p;return i!==0?i:(i=window.event,i===void 0?32:sy(i.type))}function J_(i,r){var a=Se.p;try{return Se.p=i,r()}finally{Se.p=a}}var $n=Math.random().toString(36).slice(2),Wt="__reactFiber$"+$n,vi="__reactProps$"+$n,rl="__reactContainer$"+$n,eg="__reactEvents$"+$n,sw="__reactListeners$"+$n,lw="__reactHandles$"+$n,tg="__reactResources$"+$n,Ea="__reactMarker$"+$n,wc="__reactLoad$"+$n;function xc(i){delete i[Wt],delete i[vi],delete i[sw],delete i[lw]}function ds(i){var r;if(r=i[Wt])return r;for(var a=i.parentNode;a;){if(r=a[rl]||a[Wt]){if(a=r.alternate,r.child!==null||a!==null&&a.child!==null)for(i=I3(i);i!==null;){if(a=i[Wt])return a;i=I3(i)}return r}i=a,a=i.parentNode}return null}function sl(i){if(i=i[Wt]||i[rl]){var r=i.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return i}return null}function ka(i){var r=i.tag;if(r===5||r===26||r===27||r===6)return i.stateNode;throw Error(s(33))}function ll(i){var r=i[tg];return r||(r=i[tg]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Bt(i){i[Ea]=!0}function ig(i){i[wc]=void 0}var ng=new Set,rg={};function ps(i,r){al(i,r),al(i+"Capture",r)}function al(i,r){for(rg[i]=r,i=0;i<r.length;i++)ng.add(r[i])}var aw=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),sg={},lg={};function ow(i){return gi.call(lg,i)?!0:gi.call(sg,i)?!1:aw.test(i)?lg[i]=!0:(sg[i]=!0,!1)}var Ye=!1;function ag(){var i=Ye;return Ye=!1,i}function Cc(i,r,a){if(ow(r))if(a===null)i.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":i.removeAttribute(r);return;case"boolean":var c=r.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){i.removeAttribute(r);return}}i.setAttribute(r,a)}}function Ec(i,r,a){if(a===null)i.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(r);return}i.setAttribute(r,a)}}function Yn(i,r,a,c){if(c===null)i.removeAttribute(a);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(a);return}i.setAttributeNS(r,a,c)}}function Di(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function og(i){var r=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function cw(i,r,a){var c=Object.getOwnPropertyDescriptor(i.constructor.prototype,r);if(!i.hasOwnProperty(r)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var f=c.get,m=c.set;return Object.defineProperty(i,r,{configurable:!0,get:function(){return f.call(this)},set:function(b){a=""+b,m.call(this,b)}}),Object.defineProperty(i,r,{enumerable:c.enumerable}),{getValue:function(){return a},setValue:function(b){a=""+b},stopTracking:function(){i._valueTracker=null,delete i[r]}}}}function yf(i){if(!i._valueTracker){var r=og(i)?"checked":"value";i._valueTracker=cw(i,r,""+i[r])}}function cg(i){if(!i)return!1;var r=i._valueTracker;if(!r)return!0;var a=r.getValue(),c="";return i&&(c=og(i)?i.checked?"true":"false":i.value),i=c,i!==a?(r.setValue(i),!0):!1}var uw=/[\n"\\]/g;function $i(i){return i.replace(uw,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Sf(i,r,a,c,f,m,b,x){i.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?i.type=b:i.removeAttribute("type"),r!=null?b==="number"?(r===0&&i.value===""||i.value!=r)&&(i.value=""+Di(r)):i.value!==""+Di(r)&&(i.value=""+Di(r)):b!=="submit"&&b!=="reset"||i.removeAttribute("value"),r!=null?b==="number"&&i.value==r?bf(i,Di(i.value)):bf(i,Di(r)):a!=null?bf(i,Di(a)):c!=null&&i.removeAttribute("value"),f==null&&m!=null&&(i.defaultChecked=!!m),f!=null&&(i.checked=f&&typeof f!="function"&&typeof f!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?i.name=""+Di(x):i.removeAttribute("name")}function ug(i,r,a,c,f,m,b,x){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(i.type=m),r!=null||a!=null){if(!(m!=="submit"&&m!=="reset"||r!=null)){yf(i);return}a=a!=null?""+Di(a):"",r=r!=null?""+Di(r):a,x||r===i.value||(i.value=r),i.defaultValue=r}c=c??f,c=typeof c!="function"&&typeof c!="symbol"&&!!c,i.checked=x?i.checked:!!c,i.defaultChecked=!!c,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(i.name=b),yf(i)}function bf(i,r){i.defaultValue!==""+r&&(i.defaultValue=""+r)}function ol(i,r,a,c){if(i=i.options,r){r={};for(var f=0;f<a.length;f++)r["$"+a[f]]=!0;for(a=0;a<i.length;a++)f=r.hasOwnProperty("$"+i[a].value),i[a].selected!==f&&(i[a].selected=f),f&&c&&(i[a].defaultSelected=!0)}else{for(a=""+Di(a),r=null,f=0;f<i.length;f++){if(i[f].value===a){i[f].selected=!0,c&&(i[f].defaultSelected=!0);return}r!==null||i[f].disabled||(r=i[f])}r!==null&&(r.selected=!0)}}function hg(i,r,a){if(r!=null&&(r=""+Di(r),r!==i.value&&(i.value=r),a==null)){i.defaultValue!==r&&(i.defaultValue=r);return}i.defaultValue=a!=null?""+Di(a):""}function fg(i,r,a,c){if(r==null){if(c!=null){if(a!=null)throw Error(s(92));if(Me(c)){if(1<c.length)throw Error(s(93));c=c[0]}a=c}a==null&&(a=""),r=a}a=Di(r),i.defaultValue=a,c=i.textContent,c===a&&c!==""&&c!==null&&(i.value=c),yf(i)}function cl(i,r){if(r){var a=i.firstChild;if(a&&a===i.lastChild&&a.nodeType===3){a.nodeValue=r;return}}i.textContent=r}var hw=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function dg(i,r,a){var c=r.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?c?i.setProperty(r,""):r==="float"?i.cssFloat="":i[r]="":c?i.setProperty(r,a):typeof a!="number"||a===0||hw.has(r)?r==="float"?i.cssFloat=a:i[r]=(""+a).trim():i[r]=a+"px"}function pg(i,r,a){if(r!=null&&typeof r!="object")throw Error(s(62));if(i=i.style,a!=null){for(var c in a)!a.hasOwnProperty(c)||r!=null&&r.hasOwnProperty(c)||(c.indexOf("--")===0?i.setProperty(c,""):c==="float"?i.cssFloat="":i[c]="",Ye=!0);for(var f in r)c=r[f],r.hasOwnProperty(f)&&a[f]!==c&&(dg(i,f,c),Ye=!0)}else for(var m in r)r.hasOwnProperty(m)&&dg(i,m,r[m])}function wf(i){if(i.indexOf("-")===-1)return!1;switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var fw=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["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"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["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"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["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"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),dw=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function kc(i){return dw.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function gn(){}var xf=null;function Cf(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var ul=null,hl=null;function mg(i){var r=sl(i);if(r&&(i=r.stateNode)){var a=i[vi]||null;e:switch(i=r.stateNode,r.type){case"input":if(Sf(i,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),r=a.name,a.type==="radio"&&r!=null){for(a=i;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+$i(""+r)+'"][type="radio"]'),r=0;r<a.length;r++){var c=a[r];if(c!==i&&c.form===i.form){var f=c[vi]||null;if(!f)throw Error(s(90));Sf(c,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(r=0;r<a.length;r++)c=a[r],c.form===i.form&&cg(c)}break e;case"textarea":hg(i,a.value,a.defaultValue);break e;case"select":r=a.value,r!=null&&ol(i,!!a.multiple,r,!1)}}}var Ef=!1;function _g(i,r,a){if(Ef)return i(r,a);Ef=!0;try{var c=i(r);return c}finally{if(Ef=!1,(ul!==null||hl!==null)&&(ku(),ul&&(r=ul,i=hl,hl=ul=null,mg(r),i)))for(r=0;r<i.length;r++)mg(i[r])}}function Ta(i,r){var a=i.stateNode;if(a===null)return null;var c=a[vi]||null;if(c===null)return null;a=c[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(i=i.type,c=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!c;break e;default:i=!1}if(i)return null;if(a&&typeof a!="function")throw Error(s(231,r,typeof a));return a}var Kn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),kf=!1;if(Kn)try{var Ma={};Object.defineProperty(Ma,"passive",{get:function(){kf=!0}}),window.addEventListener("test",Ma,Ma),window.removeEventListener("test",Ma,Ma)}catch{kf=!1}var Sr=null,Tf=null,Tc=null;function gg(){if(Tc)return Tc;var i,r=Tf,a=r.length,c,f="value"in Sr?Sr.value:Sr.textContent,m=f.length;for(i=0;i<a&&r[i]===f[i];i++);var b=a-i;for(c=1;c<=b&&r[a-c]===f[m-c];c++);return Tc=f.slice(i,1<c?1-c:void 0)}function Mc(i){var r=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&r===13&&(i=13)):i=r,i===10&&(i=13),32<=i||i===13?i:0}function Ac(){return!0}function vg(){return!1}function ci(i){function r(a,c,f,m,b){this._reactName=a,this._targetInst=f,this.type=c,this.nativeEvent=m,this.target=b,this.currentTarget=null;for(var x in i)i.hasOwnProperty(x)&&(a=i[x],this[x]=a?a(m):m[x]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?Ac:vg,this.isPropagationStopped=vg,this}return V(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Ac)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ac)},persist:function(){},isPersistent:Ac}),r}var br={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Dc=ci(br),Aa=V({},br,{view:0,detail:0}),pw=ci(Aa),Mf,Af,Da,Oc=V({},Aa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Of,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Da&&(Da&&i.type==="mousemove"?(Mf=i.screenX-Da.screenX,Af=i.screenY-Da.screenY):Af=Mf=0,Da=i),Mf)},movementY:function(i){return"movementY"in i?i.movementY:Af}}),yg=ci(Oc),mw=V({},Oc,{dataTransfer:0}),_w=ci(mw),gw=V({},Aa,{relatedTarget:0}),Df=ci(gw),vw=V({},br,{animationName:0,elapsedTime:0,pseudoElement:0}),yw=ci(vw),Sw=V({},br,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),bw=ci(Sw),ww=V({},br,{data:0}),Sg=ci(ww),xw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Cw={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Ew={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kw(i){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(i):(i=Ew[i])?!!r[i]:!1}function Of(){return kw}var Tw=V({},Aa,{key:function(i){if(i.key){var r=xw[i.key]||i.key;if(r!=="Unidentified")return r}return i.type==="keypress"?(i=Mc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?Cw[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Of,charCode:function(i){return i.type==="keypress"?Mc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Mc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),Mw=ci(Tw),Aw=V({},Oc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bg=ci(Aw),Dw=V({},br,{submitter:0}),Ow=ci(Dw),Rw=V({},Aa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Of}),Lw=ci(Rw),Nw=V({},br,{propertyName:0,elapsedTime:0,pseudoElement:0}),zw=ci(Nw),Bw=V({},Oc,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),jw=ci(Bw),Hw=V({},br,{newState:0,oldState:0,source:0}),Iw=ci(Hw),Pw=[9,13,27,32],Rf=Kn&&"CompositionEvent"in window,Oa=null;Kn&&"documentMode"in document&&(Oa=document.documentMode);var Fw=Kn&&"TextEvent"in window&&!Oa,wg=Kn&&(!Rf||Oa&&8<Oa&&11>=Oa),xg=" ",Cg=!1;function Eg(i,r){switch(i){case"keyup":return Pw.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kg(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var fl=!1;function Uw(i,r){switch(i){case"compositionend":return kg(r);case"keypress":return r.which!==32?null:(Cg=!0,xg);case"textInput":return i=r.data,i===xg&&Cg?null:i;default:return null}}function Vw(i,r){if(fl)return i==="compositionend"||!Rf&&Eg(i,r)?(i=gg(),Tc=Tf=Sr=null,fl=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return wg&&r.locale!=="ko"?null:r.data;default:return null}}var qw={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Tg(i){var r=i&&i.nodeName&&i.nodeName.toLowerCase();return r==="input"?!!qw[i.type]:r==="textarea"}function Mg(i,r,a,c){ul?hl?hl.push(c):hl=[c]:ul=c,r=Ru(r,"onChange"),0<r.length&&(a=new Dc("onChange","change",null,a,c),i.push({event:a,listeners:r}))}var Ra=null,La=null;function $w(i){m3(i,0)}function Rc(i){var r=ka(i);if(cg(r))return i}function Ag(i,r){if(i==="change")return r}var Dg=!1;if(Kn){var Lf;if(Kn){var Nf="oninput"in document;if(!Nf){var Og=document.createElement("div");Og.setAttribute("oninput","return;"),Nf=typeof Og.oninput=="function"}Lf=Nf}else Lf=!1;Dg=Lf&&(!document.documentMode||9<document.documentMode)}function Rg(){Ra&&(Ra.detachEvent("onpropertychange",Lg),La=Ra=null)}function Lg(i){if(i.propertyName==="value"&&Rc(La)){var r=[];Mg(r,La,i,Cf(i)),_g($w,r)}}function Yw(i,r,a){i==="focusin"?(Rg(),Ra=r,La=a,Ra.attachEvent("onpropertychange",Lg)):i==="focusout"&&Rg()}function Kw(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Rc(La)}function Ww(i,r){if(i==="click")return Rc(r)}function Gw(i,r){if(i==="input"||i==="change")return Rc(r)}function Xw(i,r){return i===r&&(i!==0||1/i===1/r)||i!==i&&r!==r}var Oi=typeof Object.is=="function"?Object.is:Xw;function Na(i,r){if(Oi(i,r))return!0;if(typeof i!="object"||i===null||typeof r!="object"||r===null)return!1;var a=Object.keys(i),c=Object.keys(r);if(a.length!==c.length)return!1;for(c=0;c<a.length;c++){var f=a[c];if(!gi.call(r,f)||!Oi(i[f],r[f]))return!1}return!0}function zf(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function Ng(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function zg(i,r){var a=Ng(i);i=0;for(var c;a;){if(a.nodeType===3){if(c=i+a.textContent.length,i<=r&&c>=r)return{node:a,offset:r-i};i=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Ng(a)}}function Bg(i,r){return i&&r?i===r?!0:i&&i.nodeType===3?!1:r&&r.nodeType===3?Bg(i,r.parentNode):"contains"in i?i.contains(r):i.compareDocumentPosition?!!(i.compareDocumentPosition(r)&16):!1:!1}function jg(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var r=zf(i.document);r instanceof i.HTMLIFrameElement;){try{var a=typeof r.contentWindow.location.href=="string"}catch{a=!1}if(a)i=r.contentWindow;else break;r=zf(i.document)}return r}function Bf(i){var r=i&&i.nodeName&&i.nodeName.toLowerCase();return r&&(r==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||r==="textarea"||i.contentEditable==="true")}var Zw=Kn&&"documentMode"in document&&11>=document.documentMode,dl=null,jf=null,za=null,Hf=!1;function Hg(i,r,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Hf||dl==null||dl!==zf(c)||(c=dl,"selectionStart"in c&&Bf(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),za&&Na(za,c)||(za=c,c=Ru(jf,"onSelect"),0<c.length&&(r=new Dc("onSelect","select",null,r,a),i.push({event:r,listeners:c}),r.target=dl)))}function ms(i,r){var a={};return a[i.toLowerCase()]=r.toLowerCase(),a["Webkit"+i]="webkit"+r,a["Moz"+i]="moz"+r,a}var pl={animationend:ms("Animation","AnimationEnd"),animationiteration:ms("Animation","AnimationIteration"),animationstart:ms("Animation","AnimationStart"),transitionrun:ms("Transition","TransitionRun"),transitionstart:ms("Transition","TransitionStart"),transitioncancel:ms("Transition","TransitionCancel"),transitionend:ms("Transition","TransitionEnd")},If={},Ig={};Kn&&(Ig=document.createElement("div").style,"AnimationEvent"in window||(delete pl.animationend.animation,delete pl.animationiteration.animation,delete pl.animationstart.animation),"TransitionEvent"in window||delete pl.transitionend.transition);function _s(i){if(If[i])return If[i];if(!pl[i])return i;var r=pl[i],a;for(a in r)if(r.hasOwnProperty(a)&&a in Ig)return If[i]=r[a];return i}var Pg=_s("animationend"),Fg=_s("animationiteration"),Ug=_s("animationstart"),Qw=_s("transitionrun"),Jw=_s("transitionstart"),ex=_s("transitioncancel"),Vg=_s("transitionend"),qg=new Map,Pf="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Pf.push("scrollEnd");function on(i,r){qg.set(i,r),ps(r,[i])}var tx=0;function Wn(i,r){if(i.name!=null&&i.name!=="auto")return i.name;if(r.autoName!==null)return r.autoName;i=fn.identifierPrefix;var a=tx++;return i="_"+i+"t_"+a.toString(32)+"_",r.autoName=i}function $g(i){if(i==null||typeof i=="string")return i;var r=null,a=Nl;if(a!==null)for(var c=0;c<a.length;c++){var f=i[a[c]];if(f!=null){if(f==="none")return"none";r=r==null?f:r+(" "+f)}}return r??i.default}function Gn(i,r){return i=$g(i),r=$g(r),r==null?i==="auto"?null:i:r==="auto"?null:r}var Lc=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Yi=[],ml=0,Ff=0;function Nc(){for(var i=ml,r=Ff=ml=0;r<i;){var a=Yi[r];Yi[r++]=null;var c=Yi[r];Yi[r++]=null;var f=Yi[r];Yi[r++]=null;var m=Yi[r];if(Yi[r++]=null,c!==null&&f!==null){var b=c.pending;b===null?f.next=f:(f.next=b.next,b.next=f),c.pending=f}m!==0&&Yg(a,f,m)}}function zc(i,r,a,c){Yi[ml++]=i,Yi[ml++]=r,Yi[ml++]=a,Yi[ml++]=c,Ff|=c,i.lanes|=c,i=i.alternate,i!==null&&(i.lanes|=c)}function Uf(i,r,a,c){return zc(i,r,a,c),Bc(i)}function gs(i,r){return zc(i,null,null,r),Bc(i)}function Yg(i,r,a){i.lanes|=a;var c=i.alternate;c!==null&&(c.lanes|=a);for(var f=!1,m=i.return;m!==null;)m.childLanes|=a,c=m.alternate,c!==null&&(c.childLanes|=a),m.tag===22&&(i=m.stateNode,i===null||i._visibility&1||(f=!0)),i=m,m=m.return;return i.tag===3?(m=i.stateNode,f&&r!==null&&(f=31-Ai(a),i=m.hiddenUpdates,c=i[f],c===null?i[f]=[r]:c.push(r),r.lane=a|536870912),m):null}function Bc(i){if(50<no)throw no=0,Eu=null,Error(s(185));for(var r=i.return;r!==null;)i=r,r=i.return;return i.tag===3?i.stateNode:null}var _l={};function ix(i,r,a,c){this.tag=i,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yi(i,r,a,c){return new ix(i,r,a,c)}function Vf(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Xn(i,r){var a=i.alternate;return a===null?(a=yi(i.tag,r,i.key,i.mode),a.elementType=i.elementType,a.type=i.type,a.stateNode=i.stateNode,a.alternate=i,i.alternate=a):(a.pendingProps=r,a.type=i.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=i.flags&1206910976,a.childLanes=i.childLanes,a.lanes=i.lanes,a.child=i.child,a.memoizedProps=i.memoizedProps,a.memoizedState=i.memoizedState,a.updateQueue=i.updateQueue,r=i.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},a.sibling=i.sibling,a.index=i.index,a.ref=i.ref,a.refCleanup=i.refCleanup,a}function Kg(i,r){i.flags&=1206910978;var a=i.alternate;return a===null?(i.childLanes=0,i.lanes=r,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,r=a.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),i}function jc(i,r,a,c,f,m){var b=0;if(c=i,typeof c=="function")Vf(c)&&(b=1);else if(typeof c=="string")b=D9(i,a,Vi.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(c){case ze:return i=yi(31,a,r,f),i.elementType=ze,i.lanes=m,i;case K:return vs(a.children,f,m,r);case W:b=8,f|=24;break;case q:return i=yi(12,a,r,f|2),i.elementType=q,i.lanes=m,i;case ie:return i=yi(13,a,r,f),i.elementType=ie,i.lanes=m,i;case $:return i=yi(19,a,r,f),i.elementType=$,i.lanes=m,i;case We:case D:return i=f|32,i=yi(30,a,r,i),i.elementType=D,i.lanes=m,i.stateNode={autoName:null,paired:null,clones:null,ref:null},i;default:if(typeof c=="object"&&c!==null)switch(c.$$typeof){case P:b=10;break e;case Z:b=9;break e;case H:b=11;break e;case oe:b=14;break e;case T:b=16,c=null;break e}b=29,a=Error(s(130,i===null?"null":typeof i,"")),c=null}return r=yi(b,a,r,f),r.elementType=i,r.type=c,r.lanes=m,r}function vs(i,r,a,c){return i=yi(7,i,c,r),i.lanes=a,i}function qf(i,r,a){return i=yi(6,i,null,r),i.lanes=a,i}function Wg(i){var r=yi(18,null,null,0);return r.stateNode=i,r}function $f(i,r,a){return r=yi(4,i.children!==null?i.children:[],i.key,r),r.lanes=a,r.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},r}var Gg=new WeakMap;function Ki(i,r){if(typeof i=="object"&&i!==null){var a=Gg.get(i);return a!==void 0?a:(r={value:i,source:r,stack:Yt(r)},Gg.set(i,r),r)}return{value:i,source:r,stack:Yt(r)}}var gl=[],vl=0,Hc=null,Ba=0,Wi=[],Gi=0,wr=null,vn=1,yn="";function Zn(i,r){gl[vl++]=Ba,gl[vl++]=Hc,Hc=i,Ba=r}function Xg(i,r,a){Wi[Gi++]=vn,Wi[Gi++]=yn,Wi[Gi++]=wr,wr=i;var c=vn;i=yn;var f=32-Ai(c)-1;c&=~(1<<f),a+=1;var m=32-Ai(r)+f;if(30<m){var b=f-f%5;m=(c&(1<<b)-1).toString(32),c>>=b,f-=b,vn=1<<32-Ai(r)+f|a<<f|c,yn=m+i}else vn=1<<m|a<<f|c,yn=i}function Ic(i){i.return!==null&&(Zn(i,1),Xg(i,1,0))}function Yf(i){for(;i===Hc;)Hc=gl[--vl],gl[vl]=null,Ba=gl[--vl],gl[vl]=null;for(;i===wr;)wr=Wi[--Gi],Wi[Gi]=null,yn=Wi[--Gi],Wi[Gi]=null,vn=Wi[--Gi],Wi[Gi]=null}function Zg(i,r){Wi[Gi++]=vn,Wi[Gi++]=yn,Wi[Gi++]=wr,vn=r.id,yn=r.overflow,wr=i}var jt=null,at=null,je=!1,xr=null,Xi=!1,Kf=Error(s(519));function Cr(i){var r=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ja(Ki(r,i)),Kf}function Qg(i){var r=i.stateNode,a=i.type,c=i.memoizedProps;switch(r[Wt]=i,r[vi]=c,a){case"dialog":Ue("cancel",r),Ue("close",r);break;case"iframe":case"object":case"embed":Ue("load",r);break;case"video":case"audio":for(a=0;a<so.length;a++)Ue(so[a],r);break;case"source":Ue("error",r);break;case"img":case"image":case"link":Ue("error",r),Ue("load",r);break;case"details":Ue("toggle",r);break;case"input":Ue("invalid",r),ug(r,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":Ue("invalid",r);break;case"textarea":Ue("invalid",r),fg(r,c.value,c.defaultValue,c.children)}a=c.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||r.textContent===""+a||c.suppressHydrationWarning===!0||y3(r.textContent,a)?(c.popover!=null&&(Ue("beforetoggle",r),Ue("toggle",r)),c.onScroll!=null&&Ue("scroll",r),c.onScrollEnd!=null&&Ue("scrollend",r),c.onClick!=null&&(r.onclick=gn),r=!0):r=!1,r||Cr(i,!0)}function Pc(i){for(jt=i.return;jt;)switch(jt.tag){case 5:case 31:case 13:Xi=!1;return;case 27:case 3:Xi=!0;return;default:jt=jt.return}}function yl(i){if(i!==jt)return!1;if(!je)return Pc(i),je=!0,!1;var r=i.tag,a;if((a=r!==3&&r!==27)&&((a=r===5)&&(a=i.type,a=!(a!=="form"&&a!=="button")||x1(i.type,i.memoizedProps)),a=!a),a&&at&&Cr(i),Pc(i),r===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(s(317));at=H3(i)}else if(r===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(s(317));at=H3(i)}else r===27?(r=at,Pr(i.type)?(i=R1,R1=null,at=i):at=r):at=jt?Qi(i.stateNode.nextSibling):null;return!0}function ys(){at=jt=null,je=!1}function Wf(){var i=xr;return i!==null&&(wi===null?wi=i:wi.push.apply(wi,i),xr=null),i}function ja(i){xr===null?xr=[i]:xr.push(i)}var Gf=Ti(null),Ss=null,Qn=null;function Er(i,r,a){Ze(Gf,r._currentValue),r._currentValue=a}function Jn(i){i._currentValue=Gf.current,wt(Gf)}function Fc(i,r,a){for(;i!==null;){var c=i.alternate;if((i.childLanes&r)!==r?(i.childLanes|=r,c!==null&&(c.childLanes|=r)):c!==null&&(c.childLanes&r)!==r&&(c.childLanes|=r),i===a)break;i=i.return}}function Xf(i,r,a,c){var f=i.child;for(f!==null&&(f.return=i);f!==null;){var m=f.dependencies;if(m!==null){var b=f.child;m=m.firstContext;e:for(;m!==null;){var x=m;m=f;for(var A=0;A<r.length;A++)if(x.context===r[A]){m.lanes|=a,x=m.alternate,x!==null&&(x.lanes|=a),Fc(m.return,a,i),c||(b=null);break e}m=x.next}}else if(f.tag===18){if(b=f.return,b===null)throw Error(s(341));b.lanes|=a,m=b.alternate,m!==null&&(m.lanes|=a),Fc(b,a,i),b=null}else f.tag===13&&f.memoizedState!==null&&f.memoizedState.dehydrated===null?(f.lanes|=a,b=f.alternate,b!==null&&(b.lanes|=a),Fc(f.return,a,i),b=f.child,b=b!==null?b.sibling:null):b=f.child;if(b!==null)b.return=f;else for(b=f;b!==null;){if(b===i){b=null;break}if(f=b.sibling,f!==null){f.return=b.return,b=f;break}b=b.return}f=b}}function bs(i,r,a,c){i=null;for(var f=r,m=!1;f!==null;){if(!m){if((f.flags&524288)!==0)m=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var b=f.alternate;if(b===null)throw Error(s(387));if(b=b.memoizedProps,b!==null){var x=f.type;Oi(f.pendingProps.value,b.value)||(i!==null?i.push(x):i=[x])}}else if(f===tl.current){if(b=f.alternate,b===null)throw Error(s(387));b.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(i!==null?i.push(ql):i=[ql])}f=f.return}return i!==null&&Xf(r,i,a,c),r.flags|=262144,i!==null}function Uc(i){for(i=i.firstContext;i!==null;){if(!Oi(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function ws(i){Ss=i,Qn=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Gt(i){return Jg(Ss,i)}function Vc(i,r){return Ss===null&&ws(i),Jg(i,r)}function Jg(i,r){var a=r._currentValue;if(r={context:r,memoizedValue:a,next:null},Qn===null){if(i===null)throw Error(s(308));Qn=r,i.dependencies={lanes:0,firstContext:r},i.flags|=524288}else Qn=Qn.next=r;return a}var nx=typeof AbortController<"u"?AbortController:function(){var i=[],r=this.signal={aborted:!1,addEventListener:function(a,c){i.push(c)}};this.abort=function(){r.aborted=!0,i.forEach(function(a){return a()})}},rx=e.unstable_scheduleCallback,sx=e.unstable_NormalPriority,xt={$$typeof:P,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Zf(){return{controller:new nx,data:new Map,refCount:0}}function Ha(i){i.refCount--,i.refCount===0&&rx(sx,function(){i.controller.abort()})}function e2(i,r){if((i.pendingLanes&4194048)!==0){var a=i.transitionTypes;for(a===null&&(a=i.transitionTypes=[]),i=0;i<r.length;i++){var c=r[i];a.indexOf(c)===-1&&a.push(c)}}}var Ia=null;function lx(i){var r=i.transitionTypes;return i.transitionTypes=null,r}var Pa=null,Qf=0,xs=0,Sl=null;function ax(i,r){if(Pa===null){var a=Pa=[];Qf=0,xs=p1(),Sl={status:"pending",value:void 0,then:function(c){a.push(c)}}}return Qf++,r.then(t2,t2),r}function t2(){if(--Qf===0&&(Ia=null,Pa!==null)){Sl!==null&&(Sl.status="fulfilled");var i=Pa;Pa=null,xs=0,Sl=null;for(var r=0;r<i.length;r++)(0,i[r])()}}function ox(i,r){var a=[],c={status:"pending",value:null,reason:null,then:function(f){a.push(f)}};return i.then(function(){c.status="fulfilled",c.value=r;for(var f=0;f<a.length;f++)(0,a[f])(r)},function(f){for(c.status="rejected",c.reason=f,f=0;f<a.length;f++)(0,a[f])(void 0)}),c}var i2=fe.S;fe.S=function(i,r){if(Wv=Kt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&ax(i,r),Ia!==null)for(var a=Hl;a!==null;)e2(a,Ia),a=a.next;if(a=i.types,a!==null){for(var c=Hl;c!==null;)e2(c,a),c=c.next;if(xs!==0){c=Ia,c===null&&(c=Ia=[]);for(var f=0;f<a.length;f++){var m=a[f];c.indexOf(m)===-1&&c.push(m)}}}i2!==null&&i2(i,r)};var Cs=Ti(null);function Jf(){var i=Cs.current;return i!==null?i:rt.pooledCache}function qc(i,r){r===null?Ze(Cs,Cs.current):Ze(Cs,r.pool)}function n2(){var i=Jf();return i===null?null:{parent:xt._currentValue,pool:i}}var bl=Error(s(460)),ed=Error(s(474)),$c=Error(s(542)),Yc={then:function(){}};function r2(i){return i=i.status,i==="fulfilled"||i==="rejected"}function s2(i,r,a){switch(a=i[a],a===void 0?i.push(r):a!==r&&(r.then(gn,gn),r=a),r.status){case"fulfilled":return r.value;case"rejected":throw i=r.reason,a2(i),i===void 0&&!("reason"in r)?Error(s(600)):i;default:if(typeof r.status=="string")r.then(gn,gn);else{if(i=rt,i!==null&&100<i.shellSuspendCounter)throw Error(s(482));i=r,i.status="pending",i.then(function(c){if(r.status==="pending"){var f=r;f.status="fulfilled",f.value=c}},function(c){if(r.status==="pending"){var f=r;f.status="rejected",f.reason=c}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw i=r.reason,a2(i),i}throw ks=r,bl}}function Es(i){try{var r=i._init;return r(i._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ks=a,bl):a}}var ks=null;function l2(){if(ks===null)throw Error(s(459));var i=ks;return ks=null,i}function a2(i){if(i===bl||i===$c)throw Error(s(483))}var wl=null,Fa=0;function Kc(i){var r=Fa;return Fa+=1,wl===null&&(wl=[]),s2(wl,i,r)}function kr(i,r){r=r.props.ref,i.ref=r!==void 0?r:null}function Wc(i,r){throw r.$$typeof===se?Error(s(525)):(i=Object.prototype.toString.call(r),Error(s(31,i==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":i)))}function o2(i){function r(z,L){if(i){var F=z.deletions;F===null?(z.deletions=[L],z.flags|=16):F.push(L)}}function a(z,L){if(!i)return null;for(;L!==null;)r(z,L),L=L.sibling;return null}function c(z){for(var L=new Map;z!==null;)z.key===null?L.set(z.index,z):L.set(z.key,z),z=z.sibling;return L}function f(z,L){return z=Xn(z,L),z.index=0,z.sibling=null,z}function m(z,L,F){return z.index=F,i?(F=z.alternate,F!==null?(F=F.index,F<L?(z.flags|=2,L):F):(z.flags|=134217730,L)):(z.flags|=1048576,L)}function b(z){return i&&z.alternate===null&&(z.flags|=134217730),z}function x(z,L,F,ee){return L===null||L.tag!==6?(L=qf(F,z.mode,ee),L.return=z,L):(L=f(L,F),L.return=z,L)}function A(z,L,F,ee){var _e=F.type;return _e===K?(z=G(z,L,F.props.children,ee,F.key),kr(z,F),z):L!==null&&(L.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===T&&Es(_e)===L.type)?(L=f(L,F.props),kr(L,F),L.return=z,L):(L=jc(F.type,F.key,F.props,null,z.mode,ee),kr(L,F),L.return=z,L)}function j(z,L,F,ee){return L===null||L.tag!==4||L.stateNode.containerInfo!==F.containerInfo||L.stateNode.implementation!==F.implementation?(L=$f(F,z.mode,ee),L.return=z,L):(L=f(L,F.children||[]),L.return=z,L)}function G(z,L,F,ee,_e){return L===null||L.tag!==7?(L=vs(F,z.mode,ee,_e),L.return=z,L):(L=f(L,F),L.return=z,L)}function te(z,L,F){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return L=qf(""+L,z.mode,F),L.return=z,L;if(typeof L=="object"&&L!==null){switch(L.$$typeof){case me:return F=jc(L.type,L.key,L.props,null,z.mode,F),kr(F,L),F.return=z,F;case k:return L=$f(L,z.mode,F),L.return=z,L;case T:return L=Es(L),te(z,L,F)}if(Me(L)||de(L))return L=vs(L,z.mode,F,null),L.return=z,L;if(typeof L.then=="function")return te(z,Kc(L),F);if(L.$$typeof===P)return te(z,Vc(z,L),F);Wc(z,L)}return null}function N(z,L,F,ee){var _e=L!==null?L.key:null;if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return _e!==null?null:x(z,L,""+F,ee);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case me:return F.key===_e?A(z,L,F,ee):null;case k:return F.key===_e?j(z,L,F,ee):null;case T:return F=Es(F),N(z,L,F,ee)}if(Me(F)||de(F))return _e!==null?null:G(z,L,F,ee,null);if(typeof F.then=="function")return N(z,L,Kc(F),ee);if(F.$$typeof===P)return N(z,L,Vc(z,F),ee);Wc(z,F)}return null}function Y(z,L,F,ee,_e){if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return z=z.get(F)||null,x(L,z,""+ee,_e);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case me:return z=z.get(ee.key===null?F:ee.key)||null,A(L,z,ee,_e);case k:return z=z.get(ee.key===null?F:ee.key)||null,j(L,z,ee,_e);case T:return ee=Es(ee),Y(z,L,F,ee,_e)}if(Me(ee)||de(ee))return z=z.get(F)||null,G(L,z,ee,_e,null);if(typeof ee.then=="function")return Y(z,L,F,Kc(ee),_e);if(ee.$$typeof===P)return Y(z,L,F,Vc(L,ee),_e);Wc(L,ee)}return null}function he(z,L,F,ee){for(var _e=null,qe=null,be=L,Te=L=0,kt=null;be!==null&&Te<F.length;Te++){be.index>Te?(kt=be,be=null):kt=be.sibling;var $e=N(z,be,F[Te],ee);if($e===null){be===null&&(be=kt);break}i&&be&&$e.alternate===null&&r(z,be),L=m($e,L,Te),qe===null?_e=$e:qe.sibling=$e,qe=$e,be=kt}if(Te===F.length)return a(z,be),je&&Zn(z,Te),_e;if(be===null){for(;Te<F.length;Te++)be=te(z,F[Te],ee),be!==null&&(L=m(be,L,Te),qe===null?_e=be:qe.sibling=be,qe=be);return je&&Zn(z,Te),_e}for(be=c(be);Te<F.length;Te++)kt=Y(be,z,Te,F[Te],ee),kt!==null&&(i&&($e=kt.alternate,$e!==null&&be.delete($e.key===null?Te:$e.key)),L=m(kt,L,Te),qe===null?_e=kt:qe.sibling=kt,qe=kt);return i&&be.forEach(function($r){return r(z,$r)}),je&&Zn(z,Te),_e}function ye(z,L,F,ee){if(F==null)throw Error(s(151));for(var _e=null,qe=null,be=L,Te=L=0,kt=null,$e=F.next();be!==null&&!$e.done;Te++,$e=F.next()){be.index>Te?(kt=be,be=null):kt=be.sibling;var $r=N(z,be,$e.value,ee);if($r===null){be===null&&(be=kt);break}i&&be&&$r.alternate===null&&r(z,be),L=m($r,L,Te),qe===null?_e=$r:qe.sibling=$r,qe=$r,be=kt}if($e.done)return a(z,be),je&&Zn(z,Te),_e;if(be===null){for(;!$e.done;Te++,$e=F.next())$e=te(z,$e.value,ee),$e!==null&&(L=m($e,L,Te),qe===null?_e=$e:qe.sibling=$e,qe=$e);return je&&Zn(z,Te),_e}for(be=c(be);!$e.done;Te++,$e=F.next())$e=Y(be,z,Te,$e.value,ee),$e!==null&&(i&&(kt=$e.alternate,kt!==null&&be.delete(kt.key===null?Te:kt.key)),L=m($e,L,Te),qe===null?_e=$e:qe.sibling=$e,qe=$e);return i&&be.forEach(function(U9){return r(z,U9)}),je&&Zn(z,Te),_e}function Ne(z,L,F,ee){if(typeof F=="object"&&F!==null&&F.type===K&&F.key===null&&F.props.ref===void 0&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case me:e:{for(var _e=F.key;L!==null;){if(L.key===_e){if(_e=F.type,_e===K){if(L.tag===7){a(z,L.sibling),ee=f(L,F.props.children),kr(ee,F),ee.return=z,z=ee;break e}}else if(L.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===T&&Es(_e)===L.type){a(z,L.sibling),ee=f(L,F.props),kr(ee,F),ee.return=z,z=ee;break e}a(z,L);break}else r(z,L);L=L.sibling}F.type===K?(ee=vs(F.props.children,z.mode,ee,F.key),kr(ee,F),ee.return=z,z=ee):(ee=jc(F.type,F.key,F.props,null,z.mode,ee),kr(ee,F),ee.return=z,z=ee)}return b(z);case k:e:{for(_e=F.key;L!==null;){if(L.key===_e)if(L.tag===4&&L.stateNode.containerInfo===F.containerInfo&&L.stateNode.implementation===F.implementation){a(z,L.sibling),ee=f(L,F.children||[]),ee.return=z,z=ee;break e}else{a(z,L);break}else r(z,L);L=L.sibling}ee=$f(F,z.mode,ee),ee.return=z,z=ee}return b(z);case T:return F=Es(F),Ne(z,L,F,ee)}if(Me(F))return he(z,L,F,ee);if(de(F)){if(_e=de(F),typeof _e!="function")throw Error(s(150));return F=_e.call(F),ye(z,L,F,ee)}if(typeof F.then=="function")return Ne(z,L,Kc(F),ee);if(F.$$typeof===P)return Ne(z,L,Vc(z,F),ee);Wc(z,F)}return typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint"?(F=""+F,L!==null&&L.tag===6?(a(z,L.sibling),ee=f(L,F),ee.return=z,z=ee):(a(z,L),ee=qf(F,z.mode,ee),ee.return=z,z=ee),b(z)):a(z,L)}return function(z,L,F,ee){try{Fa=0;var _e=Ne(z,L,F,ee);return wl=null,_e}catch(be){if(be===bl||be===$c)throw be;var qe=yi(29,be,null,z.mode);return qe.lanes=ee,qe.return=z,qe}}}var Ts=o2(!0),c2=o2(!1),Tr=!1;function td(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function id(i,r){i=i.updateQueue,r.updateQueue===i&&(r.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Mr(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Ar(i,r,a){var c=i.updateQueue;if(c===null)return null;if(c=c.shared,(Ge&2)!==0){var f=c.pending;return f===null?r.next=r:(r.next=f.next,f.next=r),c.pending=r,r=Bc(i),Yg(i,null,a),r}return zc(i,c,r,a),Bc(i)}function Ua(i,r,a){if(r=r.updateQueue,r!==null&&(r=r.shared,(a&4194048)!==0)){var c=r.lanes;c&=i.pendingLanes,a|=c,r.lanes=a,X_(i,a)}}function nd(i,r){var a=i.updateQueue,c=i.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var f=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var b={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};m===null?f=m=b:m=m.next=b,a=a.next}while(a!==null);m===null?f=m=r:m=m.next=r}else f=m=r;a={baseState:c.baseState,firstBaseUpdate:f,lastBaseUpdate:m,shared:c.shared,callbacks:c.callbacks},i.updateQueue=a;return}i=a.lastBaseUpdate,i===null?a.firstBaseUpdate=r:i.next=r,a.lastBaseUpdate=r}var rd=!1;function Va(){if(rd){var i=Sl;if(i!==null)throw i}}function qa(i,r,a,c){rd=!1;var f=i.updateQueue;Tr=!1;var m=f.firstBaseUpdate,b=f.lastBaseUpdate,x=f.shared.pending;if(x!==null){f.shared.pending=null;var A=x,j=A.next;A.next=null,b===null?m=j:b.next=j,b=A;var G=i.alternate;G!==null&&(G=G.updateQueue,x=G.lastBaseUpdate,x!==b&&(x===null?G.firstBaseUpdate=j:x.next=j,G.lastBaseUpdate=A))}if(m!==null){var te=f.baseState;b=0,G=j=A=null,x=m;do{var N=x.lane&-536870913,Y=N!==x.lane;if(Y?(Ve&N)===N:(c&N)===N){N!==0&&N===xs&&(rd=!0),G!==null&&(G=G.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var he=i,ye=x;N=r;var Ne=a;switch(ye.tag){case 1:if(he=ye.payload,typeof he=="function"){te=he.call(Ne,te,N);break e}te=he;break e;case 3:he.flags=he.flags&-65537|128;case 0:if(he=ye.payload,N=typeof he=="function"?he.call(Ne,te,N):he,N==null)break e;te=V({},te,N);break e;case 2:Tr=!0}}N=x.callback,N!==null&&(i.flags|=64,Y&&(i.flags|=8192),Y=f.callbacks,Y===null?f.callbacks=[N]:Y.push(N))}else Y={lane:N,tag:x.tag,payload:x.payload,callback:x.callback,next:null},G===null?(j=G=Y,A=te):G=G.next=Y,b|=N;if(x=x.next,x===null){if(x=f.shared.pending,x===null)break;Y=x,x=Y.next,Y.next=null,f.lastBaseUpdate=Y,f.shared.pending=null}}while(!0);G===null&&(A=te),f.baseState=A,f.firstBaseUpdate=j,f.lastBaseUpdate=G,m===null&&(f.shared.lanes=0),Br|=b,i.lanes=b,i.memoizedState=te}}function u2(i,r){if(typeof i!="function")throw Error(s(191,i));i.call(r)}function h2(i,r){var a=i.callbacks;if(a!==null)for(i.callbacks=null,i=0;i<a.length;i++)u2(a[i],r)}var Dr=Ti(null),Gc=Ti(0);function f2(i,r){i=rr,Ze(Gc,i),Ze(Dr,r),rr=i|r.baseLanes}function sd(){Ze(Gc,rr),Ze(Dr,Dr.current)}function ld(){rr=Gc.current,wt(Dr),wt(Gc)}var Xt=Ti(null),si=null;function Or(i){var r=i.alternate;Ze(Zt,Zt.current&1),Ze(Xt,i),si===null&&(r===null||Dr.current!==null||r.memoizedState!==null)&&(si=i)}function ad(i){Ze(Zt,Zt.current),Ze(Xt,i),si===null&&(si=i)}function d2(i){i.tag===22?(Ze(Zt,Zt.current),Ze(Xt,i),si===null&&(si=i)):Rr()}function Rr(){Ze(Zt,Zt.current),Ze(Xt,Xt.current)}function Ri(i){wt(Xt),si===i&&(si=null),wt(Zt)}var Zt=Ti(0);function $a(i,r){Ze(Xt,Xt.current),Ze(Zt,r)}function od(i){wt(Zt),wt(Xt),si===i&&(si=null)}function Xc(i){for(var r=i;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||D1(a)||O1(a)))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!=="independent"){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break;for(;r.sibling===null;){if(r.return===null||r.return===i)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var er=0,Le=null,tt=null,Ct=null,Zc=!1,xl=!1,Ms=!1,Qc=0,Ya=0,Cl=null,cx=0;function mt(){throw Error(s(321))}function cd(i,r){if(r===null)return!1;for(var a=0;a<r.length&&a<i.length;a++)if(!Oi(i[a],r[a]))return!1;return!0}function ud(i,r,a,c,f,m){return er=m,Le=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,fe.H=i===null||i.memoizedState===null?X2:Z2,Ms=!1,m=a(c,f),Ms=!1,xl&&(m=m2(r,a,c,f)),p2(i),m}function p2(i){fe.H=su;var r=tt!==null&&tt.next!==null;if(er=0,Ct=tt=Le=null,Zc=!1,Ya=0,Cl=null,r)throw Error(s(300));i===null||Et||(i=i.dependencies,i!==null&&Uc(i)&&(Et=!0))}function m2(i,r,a,c){Le=i;var f=0;do{if(xl&&(Cl=null),Ya=0,xl=!1,25<=f)throw Error(s(301));if(f+=1,Ct=tt=null,i.updateQueue!=null){var m=i.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}fe.H=gx,m=r(a,c)}while(xl);return m}function ux(){var i=fe.H,r=i.useState()[0];return r=typeof r.then=="function"?Ka(r):r,i=i.useState()[0],(tt!==null?tt.memoizedState:null)!==i&&(Le.flags|=1024),r}function hd(){var i=Qc!==0;return Qc=0,i}function fd(i,r,a){r.updateQueue=i.updateQueue,r.flags&=-2053,i.lanes&=~a}function dd(i){if(Zc){for(i=i.memoizedState;i!==null;){var r=i.queue;r!==null&&(r.pending=null),i=i.next}Zc=!1}er=0,Ct=tt=Le=null,xl=!1,Ya=Qc=0,Cl=null}function ui(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ct===null?Le.memoizedState=Ct=i:Ct=Ct.next=i,Ct}function yt(){if(tt===null){var i=Le.alternate;i=i!==null?i.memoizedState:null}else i=tt.next;var r=Ct===null?Le.memoizedState:Ct.next;if(r!==null)Ct=r,tt=i;else{if(i===null)throw Le.alternate===null?Error(s(467)):Error(s(310));tt=i,i={memoizedState:tt.memoizedState,baseState:tt.baseState,baseQueue:tt.baseQueue,queue:tt.queue,next:null},Ct===null?Le.memoizedState=Ct=i:Ct=Ct.next=i}return Ct}function Jc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ka(i){var r=Ya;return Ya+=1,Cl===null&&(Cl=[]),i=s2(Cl,i,r),r=Le,(Ct===null?r.memoizedState:Ct.next)===null&&(r=r.alternate,fe.H=r===null||r.memoizedState===null?X2:Z2),i}function eu(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Ka(i);if(i.$$typeof===ne)return;if(i.$$typeof===P)return Gt(i)}throw Error(s(438,String(i)))}function pd(i){var r=null,a=Le.updateQueue;if(a!==null&&(r=a.memoCache),r==null){var c=Le.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(r={data:c.data.map(function(f){return f.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),a===null&&(a=Jc(),Le.updateQueue=a),a.memoCache=r,a=r.data[r.index],a===void 0)for(a=r.data[r.index]=Array(i),c=0;c<i;c++)a[c]=O;return r.index++,a}function tr(i,r){return typeof r=="function"?r(i):r}function tu(i){var r=yt();return md(r,tt,i)}function md(i,r,a){var c=i.queue;if(c===null)throw Error(s(311));c.lastRenderedReducer=a;var f=i.baseQueue,m=c.pending;if(m!==null){if(f!==null){var b=f.next;f.next=m.next,m.next=b}r.baseQueue=f=m,c.pending=null}if(m=i.baseState,f===null)i.memoizedState=m;else{r=f.next;var x=b=null,A=null,j=r,G=!1;do{var te=j.lane&-536870913;if(te!==j.lane?(Ve&te)===te:(er&te)===te){var N=j.revertLane;if(N===0)A!==null&&(A=A.next={lane:0,revertLane:0,gesture:null,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null}),te===xs&&(G=!0);else if((er&N)===N){j=j.next,N===xs&&(G=!0);continue}else te={lane:0,revertLane:j.revertLane,gesture:null,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},A===null?(x=A=te,b=m):A=A.next=te,Le.lanes|=N,Br|=N;te=j.action,Ms&&a(m,te),m=j.hasEagerState?j.eagerState:a(m,te)}else N={lane:te,revertLane:j.revertLane,gesture:j.gesture,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},A===null?(x=A=N,b=m):A=A.next=N,Le.lanes|=te,Br|=te;j=j.next}while(j!==null&&j!==r);if(A===null?b=m:A.next=x,!Oi(m,i.memoizedState)&&(Et=!0,G&&(a=Sl,a!==null)))throw a;i.memoizedState=m,i.baseState=b,i.baseQueue=A,c.lastRenderedState=m}return f===null&&(c.lanes=0),[i.memoizedState,c.dispatch]}function _d(i){var r=yt(),a=r.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=i;var c=a.dispatch,f=a.pending,m=r.memoizedState;if(f!==null){a.pending=null;var b=f=f.next;do m=i(m,b.action),b=b.next;while(b!==f);Oi(m,r.memoizedState)||(Et=!0),r.memoizedState=m,r.baseQueue===null&&(r.baseState=m),a.lastRenderedState=m}return[m,c]}function _2(i,r,a){var c=Le,f=yt(),m=je;if(m){if(a===void 0)throw Error(s(407));a=a()}else a=r();var b=!Oi((tt||f).memoizedState,a);if(b&&(f.memoizedState=a,Et=!0),f=f.queue,yd(y2.bind(null,c,f,i),[i]),i=f.getSnapshot!==r||b||Ct!==null&&(Ct.memoizedState.tag&1)!==0,El(i?9:8,{destroy:void 0},v2.bind(null,c,f,a,r),null),i){if(c.flags|=2048,rt===null)throw Error(s(349));m||(er&127)!==0||g2(c,r,a)}return a}function g2(i,r,a){i.flags|=16384,i={getSnapshot:r,value:a},r=Le.updateQueue,r===null?(r=Jc(),Le.updateQueue=r,r.stores=[i]):(a=r.stores,a===null?r.stores=[i]:a.push(i))}function v2(i,r,a,c){r.value=a,r.getSnapshot=c,S2(r)&&b2(i)}function y2(i,r,a){return a(function(){S2(r)&&b2(i)})}function S2(i){var r=i.getSnapshot;i=i.value;try{var a=r();return!Oi(i,a)}catch{return!0}}function b2(i){var r=gs(i,2);r!==null&&xi(r,i,2)}function gd(i){var r=ui();if(typeof i=="function"){var a=i;if(i=a(),Ms){yr(!0);try{a()}finally{yr(!1)}}}return r.memoizedState=r.baseState=i,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:tr,lastRenderedState:i},r}function w2(i,r,a,c){return i.baseState=a,md(i,tt,typeof c=="function"?c:tr)}function hx(i,r,a,c,f){if(ru(i))throw Error(s(485));if(i=r.action,i!==null){var m={payload:f,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){m.listeners.push(b)}};fe.T!==null?a(!0):m.isTransition=!1,c(m),a=r.pending,a===null?(m.next=r.pending=m,x2(r,m)):(m.next=a.next,r.pending=a.next=m)}}function x2(i,r){var a=r.action,c=r.payload,f=i.state;if(r.isTransition){var m=fe.T,b={};b.types=m!==null?m.types:null,fe.T=b;try{var x=a(f,c),A=fe.S;A!==null&&A(b,x),C2(i,r,x)}catch(j){vd(i,r,j)}finally{m!==null&&b.types!==null&&(m.types=b.types),fe.T=m}}else try{m=a(f,c),C2(i,r,m)}catch(j){vd(i,r,j)}}function C2(i,r,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(c){E2(i,r,c)},function(c){return vd(i,r,c)}):E2(i,r,a)}function E2(i,r,a){r.status="fulfilled",r.value=a,k2(r),i.state=a,r=i.pending,r!==null&&(a=r.next,a===r?i.pending=null:(a=a.next,r.next=a,x2(i,a)))}function vd(i,r,a){var c=i.pending;if(i.pending=null,c!==null){c=c.next;do r.status="rejected",r.reason=a,k2(r),r=r.next;while(r!==c)}i.action=null}function k2(i){i=i.listeners;for(var r=0;r<i.length;r++)(0,i[r])()}function T2(i,r){return r}function M2(i,r){if(je){var a=rt.formState;if(a!==null){e:{var c=Le;if(je){if(at){t:{for(var f=at,m=Xi;f.nodeType!==8;){if(!m){f=null;break t}if(f=Qi(f.nextSibling),f===null){f=null;break t}}m=f.data,f=m==="F!"||m==="F"?f:null}if(f){at=Qi(f.nextSibling),c=f.data==="F!";break e}}Cr(c)}c=!1}c&&(r=a[0])}}return a=ui(),a.memoizedState=a.baseState=r,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:T2,lastRenderedState:r},a.queue=c,a=K2.bind(null,Le,c),c.dispatch=a,c=gd(!1),m=Cd.bind(null,Le,!1,c.queue),c=ui(),f={state:r,dispatch:null,action:i,pending:null},c.queue=f,a=hx.bind(null,Le,f,m,a),f.dispatch=a,c.memoizedState=i,[r,a,!1]}function A2(i){var r=yt();return D2(r,tt,i)}function D2(i,r,a){if(r=md(i,r,T2)[0],i=tu(tr)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var c=Ka(r)}catch(b){throw b===bl?$c:b}else c=r;r=yt();var f=r.queue,m=f.dispatch;return a!==r.memoizedState&&(Le.flags|=2048,El(9,{destroy:void 0},fx.bind(null,f,a),null)),[c,m,i]}function fx(i,r){i.action=r}function O2(i){var r=yt(),a=tt;if(a!==null)return D2(r,a,i);yt(),r=r.memoizedState,a=yt();var c=a.queue.dispatch;return a.memoizedState=i,[r,c,!1]}function El(i,r,a,c){return i={tag:i,create:a,deps:c,inst:r,next:null},r=Le.updateQueue,r===null&&(r=Jc(),Le.updateQueue=r),a=r.lastEffect,a===null?r.lastEffect=i.next=i:(c=a.next,a.next=i,i.next=c,r.lastEffect=i),i}function R2(){return yt().memoizedState}function iu(i,r,a,c){var f=ui();Le.flags|=i,f.memoizedState=El(1|r,{destroy:void 0},a,c===void 0?null:c)}function nu(i,r,a,c){var f=yt();c=c===void 0?null:c;var m=f.memoizedState.inst;tt!==null&&c!==null&&cd(c,tt.memoizedState.deps)?f.memoizedState=El(r,m,a,c):(Le.flags|=i,f.memoizedState=El(1|r,m,a,c))}function L2(i,r){iu(8390656,8,i,r)}function yd(i,r){nu(2048,8,i,r)}function dx(i){Le.flags|=4;var r=Le.updateQueue;if(r===null)r=Jc(),Le.updateQueue=r,r.events=[i];else{var a=r.events;a===null?r.events=[i]:a.push(i)}}function N2(i){var r=yt().memoizedState;return dx({ref:r,nextImpl:i}),function(){if((Ge&2)!==0)throw Error(s(440));return r.impl.apply(void 0,arguments)}}function z2(i,r){return nu(4,2,i,r)}function B2(i,r){return nu(4,4,i,r)}function j2(i,r){if(typeof r=="function"){i=i();var a=r(i);return function(){typeof a=="function"?a():r(null)}}if(r!=null)return i=i(),r.current=i,function(){r.current=null}}function H2(i,r,a){a=a!=null?a.concat([i]):null,nu(4,4,j2.bind(null,r,i),a)}function Sd(){}function I2(i,r){var a=yt();r=r===void 0?null:r;var c=a.memoizedState;return r!==null&&cd(r,c[1])?c[0]:(a.memoizedState=[i,r],i)}function P2(i,r){var a=yt();r=r===void 0?null:r;var c=a.memoizedState;if(r!==null&&cd(r,c[1]))return c[0];if(c=i(),Ms){yr(!0);try{i()}finally{yr(!1)}}return a.memoizedState=[c,r],c}function bd(i,r,a){return a===void 0||(er&1073741824)!==0&&(Ve&261930)===0?i.memoizedState=r:(i.memoizedState=a,i=Xv(),Le.lanes|=i,Br|=i,a)}function F2(i,r,a,c){return Oi(a,r)?a:Dr.current!==null?(i=bd(i,a,c),Oi(i,r)||(Et=!0),i):(er&106)===0||(er&1073741824)!==0&&(Ve&261930)===0?(Et=!0,i.memoizedState=a):(i=Xv(),Le.lanes|=i,Br|=i,r)}function U2(i,r,a,c,f){var m=Se.p;Se.p=m!==0&&8>m?m:8;var b=fe.T,x={};x.types=b!==null?b.types:null,fe.T=x,Cd(i,!1,r,a);try{var A=f(),j=fe.S;if(j!==null&&j(x,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var G=ox(A,c);Wa(i,r,G,Bi(i))}else Wa(i,r,c,Bi(i))}catch(te){Wa(i,r,{then:function(){},status:"rejected",reason:te},Bi())}finally{Se.p=m,b!==null&&x.types!==null&&(b.types=x.types),fe.T=b}}function px(){}function wd(i,r,a,c){if(i.tag!==5)throw Error(s(476));var f=V2(i).queue;U2(i,f,r,Be,a===null?px:function(){return q2(i),a(c)})}function V2(i){var r=i.memoizedState;if(r!==null)return r;r={memoizedState:Be,baseState:Be,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:tr,lastRenderedState:Be},next:null};var a={};return r.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:tr,lastRenderedState:a},next:null},i.memoizedState=r,i=i.alternate,i!==null&&(i.memoizedState=r),r}function q2(i){var r=V2(i);r.next===null&&(r=i.alternate.memoizedState),Wa(i,r.next.queue,{},Bi())}function xd(){return Gt(ql)}function $2(){return yt().memoizedState}function Y2(){return yt().memoizedState}function mx(i){for(var r=i.return;r!==null;){switch(r.tag){case 24:case 3:var a=Bi();i=Mr(a);var c=Ar(r,i,a);c!==null&&(xi(c,r,a),Ua(c,r,a)),r={cache:Zf()},i.payload=r;return}r=r.return}}function _x(i,r,a){var c=Bi();a={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ru(i)?W2(r,a):(a=Uf(i,r,a,c),a!==null&&(xi(a,i,c),G2(a,r,c)))}function K2(i,r,a){var c=Bi();Wa(i,r,a,c)}function Wa(i,r,a,c){var f={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ru(i))W2(r,f);else{var m=i.alternate;if(i.lanes===0&&(m===null||m.lanes===0)&&(m=r.lastRenderedReducer,m!==null))try{var b=r.lastRenderedState,x=m(b,a);if(f.hasEagerState=!0,f.eagerState=x,Oi(x,b))return zc(i,r,f,0),rt===null&&Nc(),!1}catch{}if(a=Uf(i,r,f,c),a!==null)return xi(a,i,c),G2(a,r,c),!0}return!1}function Cd(i,r,a,c){if(c={lane:2,revertLane:p1(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},ru(i)){if(r)throw Error(s(479))}else r=Uf(i,a,c,2),r!==null&&xi(r,i,2)}function ru(i){var r=i.alternate;return i===Le||r!==null&&r===Le}function W2(i,r){xl=Zc=!0;var a=i.pending;a===null?r.next=r:(r.next=a.next,a.next=r),i.pending=r}function G2(i,r,a){if((a&4194048)!==0){var c=r.lanes;c&=i.pendingLanes,a|=c,r.lanes=a,X_(i,a)}}var su={readContext:Gt,use:eu,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useLayoutEffect:mt,useInsertionEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useSyncExternalStore:mt,useId:mt,useHostTransitionStatus:mt,useFormState:mt,useActionState:mt,useOptimistic:mt,useMemoCache:mt,useCacheRefresh:mt,useEffectEvent:mt},X2={readContext:Gt,use:eu,useCallback:function(i,r){return ui().memoizedState=[i,r===void 0?null:r],i},useContext:Gt,useEffect:L2,useImperativeHandle:function(i,r,a){a=a!=null?a.concat([i]):null,iu(4194308,4,j2.bind(null,r,i),a)},useLayoutEffect:function(i,r){return iu(4194308,4,i,r)},useInsertionEffect:function(i,r){iu(4,2,i,r)},useMemo:function(i,r){var a=ui();r=r===void 0?null:r;var c=i();if(Ms){yr(!0);try{i()}finally{yr(!1)}}return a.memoizedState=[c,r],c},useReducer:function(i,r,a){var c=ui();if(a!==void 0){var f=a(r);if(Ms){yr(!0);try{a(r)}finally{yr(!1)}}}else f=r;return c.memoizedState=c.baseState=f,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:f},c.queue=i,i=i.dispatch=_x.bind(null,Le,i),[c.memoizedState,i]},useRef:function(i){var r=ui();return i={current:i},r.memoizedState=i},useState:function(i){i=gd(i);var r=i.queue,a=K2.bind(null,Le,r);return r.dispatch=a,[i.memoizedState,a]},useDebugValue:Sd,useDeferredValue:function(i,r){var a=ui();return bd(a,i,r)},useTransition:function(){var i=gd(!1);return i=U2.bind(null,Le,i.queue,!0,!1),ui().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,r,a){var c=Le,f=ui();if(je){if(a===void 0)throw Error(s(407));a=a()}else{if(a=r(),rt===null)throw Error(s(349));(Ve&127)!==0||g2(c,r,a)}f.memoizedState=a;var m={value:a,getSnapshot:r};return f.queue=m,L2(y2.bind(null,c,m,i),[i]),c.flags|=2048,El(9,{destroy:void 0},v2.bind(null,c,m,a,r),null),a},useId:function(){var i=ui(),r=rt.identifierPrefix;if(je){var a=yn,c=vn;a=(c&~(1<<32-Ai(c)-1)).toString(32)+a,r="_"+r+"R_"+a,a=Qc++,0<a&&(r+="H"+a.toString(32)),r+="_"}else a=cx++,r="_"+r+"r_"+a.toString(32)+"_";return i.memoizedState=r},useHostTransitionStatus:xd,useFormState:M2,useActionState:M2,useOptimistic:function(i){var r=ui();r.memoizedState=r.baseState=i;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=a,r=Cd.bind(null,Le,!0,a),a.dispatch=r,[i,r]},useMemoCache:pd,useCacheRefresh:function(){return ui().memoizedState=mx.bind(null,Le)},useEffectEvent:function(i){var r=ui(),a={impl:i};return r.memoizedState=a,function(){if((Ge&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}},Z2={readContext:Gt,use:eu,useCallback:I2,useContext:Gt,useEffect:yd,useImperativeHandle:H2,useInsertionEffect:z2,useLayoutEffect:B2,useMemo:P2,useReducer:tu,useRef:R2,useState:function(){return tu(tr)},useDebugValue:Sd,useDeferredValue:function(i,r){var a=yt();return F2(a,tt.memoizedState,i,r)},useTransition:function(){var i=tu(tr)[0],r=yt().memoizedState;return[typeof i=="boolean"?i:Ka(i),r]},useSyncExternalStore:_2,useId:$2,useHostTransitionStatus:xd,useFormState:A2,useActionState:A2,useOptimistic:function(i,r){var a=yt();return w2(a,tt,i,r)},useMemoCache:pd,useCacheRefresh:Y2,useEffectEvent:N2},gx={readContext:Gt,use:eu,useCallback:I2,useContext:Gt,useEffect:yd,useImperativeHandle:H2,useInsertionEffect:z2,useLayoutEffect:B2,useMemo:P2,useReducer:_d,useRef:R2,useState:function(){return _d(tr)},useDebugValue:Sd,useDeferredValue:function(i,r){var a=yt();return tt===null?bd(a,i,r):F2(a,tt.memoizedState,i,r)},useTransition:function(){var i=_d(tr)[0],r=yt().memoizedState;return[typeof i=="boolean"?i:Ka(i),r]},useSyncExternalStore:_2,useId:$2,useHostTransitionStatus:xd,useFormState:O2,useActionState:O2,useOptimistic:function(i,r){var a=yt();return tt!==null?w2(a,tt,i,r):(a.baseState=i,[i,a.queue.dispatch])},useMemoCache:pd,useCacheRefresh:Y2,useEffectEvent:N2};function Ed(i,r,a,c){r=i.memoizedState,a=a(c,r),a=a==null?r:V({},r,a),i.memoizedState=a,i.lanes===0&&(i.updateQueue.baseState=a)}var kd={enqueueSetState:function(i,r,a){i=i._reactInternals;var c=Bi(),f=Mr(c);f.payload=r,a!=null&&(f.callback=a),r=Ar(i,f,c),r!==null&&(xi(r,i,c),Ua(r,i,c))},enqueueReplaceState:function(i,r,a){i=i._reactInternals;var c=Bi(),f=Mr(c);f.tag=1,f.payload=r,a!=null&&(f.callback=a),r=Ar(i,f,c),r!==null&&(xi(r,i,c),Ua(r,i,c))},enqueueForceUpdate:function(i,r){i=i._reactInternals;var a=Bi(),c=Mr(a);c.tag=2,r!=null&&(c.callback=r),r=Ar(i,c,a),r!==null&&(xi(r,i,a),Ua(r,i,a))}};function Q2(i,r,a,c,f,m,b){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(c,m,b):r.prototype&&r.prototype.isPureReactComponent?!Na(a,c)||!Na(f,m):!0}function J2(i,r,a,c){i=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(a,c),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(a,c),r.state!==i&&kd.enqueueReplaceState(r,r.state,null)}function As(i,r){var a=r;if("ref"in r){a={};for(var c in r)c!=="ref"&&(a[c]=r[c])}if(i=i.defaultProps){a===r&&(a=V({},a));for(var f in i)a[f]===void 0&&(a[f]=i[f])}return a}function ev(i){Lc(i)}function tv(i){console.error(i)}function iv(i){Lc(i)}function lu(i,r){try{var a=i.onUncaughtError;a(r.value,{componentStack:r.stack})}catch(c){setTimeout(function(){throw c})}}function nv(i,r,a){try{var c=i.onCaughtError;c(a.value,{componentStack:a.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Td(i,r,a){return a=Mr(a),a.tag=3,a.payload={element:null},a.callback=function(){lu(i,r)},a}function rv(i){return i=Mr(i),i.tag=3,i}function sv(i,r,a,c){var f=a.type.getDerivedStateFromError;if(typeof f=="function"){var m=c.value;i.payload=function(){return f(m)},i.callback=function(){nv(r,a,c)}}var b=a.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(i.callback=function(){nv(r,a,c),typeof f!="function"&&(jr===null?jr=new Set([this]):jr.add(this));var x=c.stack;this.componentDidCatch(c.value,{componentStack:x!==null?x:""})})}function vx(i,r,a,c,f){if(a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(r=a.alternate,r!==null&&bs(r,a,f,!0),a=Xt.current,a!==null){switch(a.tag){case 31:case 13:case 19:return si===null?Tu():a.alternate===null&&_t===0&&(_t=3),a.flags&=-257,a.flags|=65536,a.lanes=f,c===Yc?a.flags|=16384:(r=a.updateQueue,r===null?a.updateQueue=new Set([c]):r.add(c),h1(i,c,f)),!1;case 22:return a.flags|=65536,c===Yc?a.flags|=16384:(r=a.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([c])},a.updateQueue=r):(a=r.retryQueue,a===null?r.retryQueue=new Set([c]):a.add(c)),h1(i,c,f)),!1}throw Error(s(435,a.tag))}return h1(i,c,f),Tu(),!1}if(je)return r=Xt.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=f,c!==Kf&&(i=Error(s(422),{cause:c}),ja(Ki(i,a)))):(c!==Kf&&(r=Error(s(423),{cause:c}),ja(Ki(r,a))),i=i.current.alternate,i.flags|=65536,f&=-f,i.lanes|=f,c=Ki(c,a),f=Td(i.stateNode,c,f),nd(i,f),_t!==4&&(_t=2)),!1;var m=Error(s(520),{cause:c});if(m=Ki(m,a),io===null?io=[m]:io.push(m),_t!==4&&(_t=2),r===null)return!0;c=Ki(c,a),a=r;do{switch(a.tag){case 3:return a.flags|=65536,i=f&-f,a.lanes|=i,i=Td(a.stateNode,c,i),nd(a,i),!1;case 1:if(r=a.type,m=a.stateNode,(a.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(jr===null||!jr.has(m))))return a.flags|=65536,f&=-f,a.lanes|=f,f=rv(f),sv(f,i,a,c),nd(a,f),!1;break;case 22:if(a.memoizedState!==null)return a.flags|=65536,!1}a=a.return}while(a!==null);return!1}var Md=Error(s(461)),Et=!1;function Dt(i,r,a,c){r.child=i===null?c2(r,null,a,c):Ts(r,i.child,a,c)}function lv(i,r,a,c,f){a=a.render;var m=r.ref;if("ref"in c){var b={};for(var x in c)x!=="ref"&&(b[x]=c[x])}else b=c;return ws(r),c=ud(i,r,a,b,m,f),x=hd(),i!==null&&!Et?(fd(i,r,f),ir(i,r,f)):(je&&x&&Ic(r),r.flags|=1,Dt(i,r,c,f),r.child)}function av(i,r,a,c,f){if(i===null){var m=a.type;return typeof m=="function"&&!Vf(m)&&m.defaultProps===void 0&&a.compare===null?(r.tag=15,r.type=m,ov(i,r,m,c,f)):(i=jc(a.type,null,c,r,r.mode,f),i.ref=r.ref,i.return=r,r.child=i)}if(m=i.child,!Bd(i,f)){var b=m.memoizedProps;if(a=a.compare,a=a!==null?a:Na,a(b,c)&&i.ref===r.ref)return ir(i,r,f)}return r.flags|=1,i=Xn(m,c),i.ref=r.ref,i.return=r,r.child=i}function ov(i,r,a,c,f){if(i!==null){var m=i.memoizedProps;if(Na(m,c)&&i.ref===r.ref)if(Et=!1,r.pendingProps=c=m,Bd(i,f))(i.flags&131072)!==0&&(Et=!0);else return r.lanes=i.lanes,ir(i,r,f)}return Ad(i,r,a,c,f)}function cv(i,r,a,c){var f=c.children,m=i!==null?i.memoizedState:null;if(i===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((r.flags&128)!==0){if(m=m!==null?m.baseLanes|a:a,i!==null){for(c=r.child=i.child,f=0;c!==null;)f=f|c.lanes|c.childLanes,c=c.sibling;c=f&~m}else c=0,r.child=null;return uv(i,r,m,a,c)}if((a&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},i!==null&&qc(r,m!==null?m.cachePool:null),m!==null?f2(r,m):sd(),d2(r);else return c=r.lanes=536870912,uv(i,r,m!==null?m.baseLanes|a:a,a,c)}else m!==null?(qc(r,m.cachePool),f2(r,m),Rr(),r.memoizedState=null):(i!==null&&qc(r,null),sd(),Rr());return Dt(i,r,f,a),r.child}function Ga(i,r){return i!==null&&i.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function uv(i,r,a,c,f){var m=Jf();return m=m===null?null:{parent:xt._currentValue,pool:m},r.memoizedState={baseLanes:a,cachePool:m},i!==null&&qc(r,null),sd(),d2(r),i!==null&&bs(i,r,c,!0),r.childLanes=f,null}function au(i,r){return r=ou({mode:r.mode,children:r.children},i.mode),r.ref=i.ref,i.child=r,r.return=i,r}function hv(i,r,a){return Ts(r,i.child,null,a),i=au(r,r.pendingProps),i.flags|=2,Ri(r),r.memoizedState=null,i}function yx(i,r,a){var c=r.pendingProps,f=(r.flags&128)!==0;if(r.flags&=-129,i===null){if(je){if(c.mode==="hidden")return i=au(r,c),r.lanes=536870912,i.memoizedState={baseLanes:0,cachePool:null},Ga(null,i);if(ad(r),(i=at)?(i=j3(i,Xi),i=i!==null&&i.data==="&"?i:null,i!==null&&(r.memoizedState={dehydrated:i,treeContext:wr!==null?{id:vn,overflow:yn}:null,retryLane:536870912,hydrationErrors:null},a=Wg(i),a.return=r,r.child=a,jt=r,at=null)):i=null,i===null)throw Cr(r);return r.lanes=536870912,null}return au(r,c)}var m=i.memoizedState;if(m!==null){var b=m.dehydrated;if(ad(r),f)if(r.flags&256)r.flags&=-257,r=hv(i,r,a);else if(r.memoizedState!==null)r.child=i.child,r.flags|=128,r=null;else throw Error(s(558));else if(Et||bs(i,r,a,!1),f=(a&i.childLanes)!==0,Et||f){if(Dr.current===null){if(c=rt,c!==null&&(b=Z_(c,a),b!==0&&b!==m.retryLane))throw m.retryLane=b,gs(i,b),xi(c,i,b),Md;Tu()}r=hv(i,r,a)}else i=m.treeContext,at=Qi(b.nextSibling),jt=r,je=!0,xr=null,Xi=!1,i!==null&&Zg(r,i),r=au(r,c),r.flags|=134221824;return r}return i=Xn(i.child,{mode:c.mode,children:c.children}),i.ref=r.ref,r.child=i,i.return=r,i}function kl(i,r){var a=r.ref;if(a===null)i!==null&&i.ref!==null&&(r.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(s(284));(i===null||i.ref!==a)&&(r.flags|=4194816)}}function Ad(i,r,a,c,f){return ws(r),a=ud(i,r,a,c,void 0,f),c=hd(),i!==null&&!Et?(fd(i,r,f),ir(i,r,f)):(je&&c&&Ic(r),r.flags|=1,Dt(i,r,a,f),r.child)}function fv(i,r,a,c,f,m){return ws(r),r.updateQueue=null,a=m2(r,c,a,f),p2(i),c=hd(),i!==null&&!Et?(fd(i,r,m),ir(i,r,m)):(je&&c&&Ic(r),r.flags|=1,Dt(i,r,a,m),r.child)}function dv(i,r,a,c,f){if(ws(r),r.stateNode===null){var m=_l,b=a.contextType;typeof b=="object"&&b!==null&&(m=Gt(b)),m=new a(c,m),r.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=kd,r.stateNode=m,m._reactInternals=r,m=r.stateNode,m.props=c,m.state=r.memoizedState,m.refs={},td(r),b=a.contextType,m.context=typeof b=="object"&&b!==null?Gt(b):_l,m.state=r.memoizedState,b=a.getDerivedStateFromProps,typeof b=="function"&&(Ed(r,a,b,c),m.state=r.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(b=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),b!==m.state&&kd.enqueueReplaceState(m,m.state,null),qa(r,c,m,f),Va(),m.state=r.memoizedState),typeof m.componentDidMount=="function"&&(r.flags|=4194308),c=!0}else if(i===null){m=r.stateNode;var x=r.memoizedProps,A=As(a,x);m.props=A;var j=m.context,G=a.contextType;b=_l,typeof G=="object"&&G!==null&&(b=Gt(G));var te=a.getDerivedStateFromProps;G=typeof te=="function"||typeof m.getSnapshotBeforeUpdate=="function",x=r.pendingProps!==x,G||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(x||j!==b)&&J2(r,m,c,b),Tr=!1;var N=r.memoizedState;m.state=N,qa(r,c,m,f),Va(),j=r.memoizedState,x||N!==j||Tr?(typeof te=="function"&&(Ed(r,a,te,c),j=r.memoizedState),(A=Tr||Q2(r,a,A,c,N,j,b))?(G||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(r.flags|=4194308)):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=c,r.memoizedState=j),m.props=c,m.state=j,m.context=b,c=A):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),c=!1)}else{m=r.stateNode,id(i,r),b=r.memoizedProps,G=As(a,b),m.props=G,te=r.pendingProps,N=m.context,j=a.contextType,A=_l,typeof j=="object"&&j!==null&&(A=Gt(j)),x=a.getDerivedStateFromProps,(j=typeof x=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(b!==te||N!==A)&&J2(r,m,c,A),Tr=!1,N=r.memoizedState,m.state=N,qa(r,c,m,f),Va();var Y=r.memoizedState;b!==te||N!==Y||Tr||i!==null&&i.dependencies!==null&&Uc(i.dependencies)?(typeof x=="function"&&(Ed(r,a,x,c),Y=r.memoizedState),(G=Tr||Q2(r,a,G,c,N,Y,A)||i!==null&&i.dependencies!==null&&Uc(i.dependencies))?(j||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(c,Y,A),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(c,Y,A)),typeof m.componentDidUpdate=="function"&&(r.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof m.componentDidUpdate!="function"||b===i.memoizedProps&&N===i.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||b===i.memoizedProps&&N===i.memoizedState||(r.flags|=1024),r.memoizedProps=c,r.memoizedState=Y),m.props=c,m.state=Y,m.context=A,c=G):(typeof m.componentDidUpdate!="function"||b===i.memoizedProps&&N===i.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||b===i.memoizedProps&&N===i.memoizedState||(r.flags|=1024),c=!1)}return m=c,kl(i,r),c=(r.flags&128)!==0,m||c?(m=r.stateNode,a=c&&typeof a.getDerivedStateFromError!="function"?null:m.render(),r.flags|=1,i!==null&&c?(r.child=Ts(r,i.child,null,f),r.child=Ts(r,null,a,f)):Dt(i,r,a,f),r.memoizedState=m.state,i=r.child):i=ir(i,r,f),i}function pv(i,r,a,c){return ys(),r.flags|=256,Dt(i,r,a,c),r.child}var Dd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Od(i){return{baseLanes:i,cachePool:n2()}}function Rd(i,r,a){return i=i!==null?i.childLanes&~a:0,r&&(i|=zi),i}function mv(i,r,a){var c=r.pendingProps,f=!1,m=(r.flags&128)!==0,b;if((b=m)||(b=i!==null&&i.memoizedState===null?!1:(Zt.current&2)!==0),b&&(f=!0,r.flags&=-129),b=(r.flags&32)!==0,r.flags&=-33,i===null){if(je){if(f?Or(r):Rr(),(i=at)?(i=j3(i,Xi),i=i!==null&&i.data!=="&"?i:null,i!==null&&(r.memoizedState={dehydrated:i,treeContext:wr!==null?{id:vn,overflow:yn}:null,retryLane:536870912,hydrationErrors:null},a=Wg(i),a.return=r,r.child=a,jt=r,at=null)):i=null,i===null)throw Cr(r);return O1(i)?r.lanes=32:r.lanes=536870912,null}return m=c.children,c=c.fallback,f?(Rr(),f=r.mode,m=ou({mode:"hidden",children:m},f),c=vs(c,f,a,null),m.return=r,c.return=r,m.sibling=c,r.child=m,c=r.child,c.memoizedState=Od(a),c.childLanes=Rd(i,b,a),r.memoizedState=Dd,Ga(null,c)):(Or(r),Ld(r,m))}var x=i.memoizedState;if(x!==null){var A=x.dehydrated;if(A!==null)return Sx(i,r,m,b,c,A,x,a)}return f?(Rr(),f=c.fallback,m=r.mode,x=i.child,A=x.sibling,c=Xn(x,{mode:"hidden",children:c.children}),c.subtreeFlags=x.subtreeFlags&1206910976,A!==null?f=Xn(A,f):(f=vs(f,m,a,null),f.flags|=2),f.return=r,c.return=r,c.sibling=f,r.child=c,Ga(null,c),c=r.child,f=i.child.memoizedState,f===null?f=Od(a):(m=f.cachePool,m!==null?(x=xt._currentValue,m=m.parent!==x?{parent:x,pool:x}:m):m=n2(),f={baseLanes:f.baseLanes|a,cachePool:m}),c.memoizedState=f,c.childLanes=Rd(i,b,a),r.memoizedState=Dd,Ga(i.child,c)):(Or(r),a=i.child,i=a.sibling,a=Xn(a,{mode:"visible",children:c.children}),a.return=r,a.sibling=null,i!==null&&(b=r.deletions,b===null?(r.deletions=[i],r.flags|=16):b.push(i)),r.child=a,r.memoizedState=null,a)}function Ld(i,r){return r=ou({mode:"visible",children:r},i.mode),r.return=i,i.child=r}function ou(i,r){return i=yi(22,i,null,r),i.lanes=0,i}function cu(i,r,a){return Ts(r,i.child,null,a),i=Ld(r,r.pendingProps.children),i.flags|=2,r.memoizedState=null,i}function Sx(i,r,a,c,f,m,b,x){if(a)return r.flags&256?(Or(r),r.flags&=-257,cu(i,r,x)):r.memoizedState!==null?(Rr(),r.child=i.child,r.flags|=128,null):(Rr(),m=f.fallback,b=r.mode,f=ou({mode:"visible",children:f.children},b),m=vs(m,b,x,null),m.flags|=2,f.return=r,m.return=r,f.sibling=m,r.child=f,Ts(r,i.child,null,x),f=r.child,f.memoizedState=Od(x),f.childLanes=Rd(i,c,x),r.memoizedState=Dd,Ga(null,f));if(Or(r),O1(m)){if(c=m.nextSibling&&m.nextSibling.dataset,c)var A=c.dgst;return c=A,c!==""&&(f=Error(s(419)),f.stack="",f.digest=c,ja({value:f,source:null,stack:null})),cu(i,r,x)}if(Et||bs(i,r,x,!1),c=(x&i.childLanes)!==0,Et||c){if(Dr.current!==null)return cu(i,r,x);if(c=rt,c!==null&&(f=Z_(c,x),f!==0&&f!==b.retryLane))throw b.retryLane=f,gs(i,f),xi(c,i,f),Md;return D1(m)||Tu(),cu(i,r,x)}return D1(m)?(r.flags|=192,r.child=i.child,null):(i=b.treeContext,at=Qi(m.nextSibling),jt=r,je=!0,xr=null,Xi=!1,i!==null&&Zg(r,i),r=Ld(r,f.children),r.flags|=134221824,r)}function _v(i,r,a){i.lanes|=r;var c=i.alternate;c!==null&&(c.lanes|=r),Fc(i.return,r,a)}function gv(i){for(var r=null;i!==null;){var a=i.alternate;a!==null&&Xc(a)===null&&(r=i),i=i.sibling}return r}function uu(i,r,a,c,f,m){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:c,tail:a,tailMode:f,treeForkCount:m}:(b.isBackwards=r,b.rendering=null,b.renderingStartTime=0,b.last=c,b.tail=a,b.tailMode=f,b.treeForkCount=m)}function Nd(i){var r=i.child;for(i.child=null;r!==null;){var a=r.sibling;r.sibling=i.child,i.child=r,r=a}}function zd(i,r,a){var c=r.pendingProps,f=c.revealOrder,m=c.tail;c=c.children;var b=Zt.current;if(r.flags&128)return $a(r,b),null;var x=(b&2)!==0;if(x?(b=b&1|2,r.flags|=128):b&=1,$a(r,b),f==="backwards"&&i!==null?(Nd(i),Dt(i,r,c,a),Nd(i)):Dt(i,r,c,a),c=je?Ba:0,!x&&i!==null&&(i.flags&128)!==0)e:for(i=r.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&_v(i,a,r);else if(i.tag===19)_v(i,a,r);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break e;for(;i.sibling===null;){if(i.return===null||i.return===r)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(f){case"backwards":a=gv(r.child),a===null?(f=r.child,r.child=null):(f=a.sibling,a.sibling=null,Nd(r)),uu(r,!0,f,null,m,c);break;case"unstable_legacy-backwards":for(a=null,f=r.child,r.child=null;f!==null;){if(i=f.alternate,i!==null&&Xc(i)===null){r.child=f;break}i=f.sibling,f.sibling=a,a=f,f=i}uu(r,!0,a,null,m,c);break;case"together":uu(r,!1,null,null,void 0,c);break;case"independent":r.memoizedState=null;break;default:a=gv(r.child),a===null?(f=r.child,r.child=null):(f=a.sibling,a.sibling=null),uu(r,!1,f,a,m,c)}return r.child}function vv(i,r,a){var c=r.pendingProps;return Er(r,r.type,c.value),Dt(i,r,c.children,a),r.child}function ir(i,r,a){if(i!==null&&(r.dependencies=i.dependencies),Br|=r.lanes,(a&r.childLanes)===0)if(i!==null){if(bs(i,r,a,!1),(a&r.childLanes)===0)return null}else return null;if(i!==null&&r.child!==i.child)throw Error(s(153));if(r.child!==null){for(i=r.child,a=Xn(i,i.pendingProps),r.child=a,a.return=r;i.sibling!==null;)i=i.sibling,a=a.sibling=Xn(i,i.pendingProps),a.return=r;a.sibling=null}return r.child}function Bd(i,r){return(i.lanes&r)!==0?!0:(i=i.dependencies,!!(i!==null&&Uc(i)))}function bx(i,r,a){switch(r.tag){case 3:il(r,r.stateNode.containerInfo),Er(r,xt,i.memoizedState.cache),ys();break;case 27:case 5:ba(r);break;case 4:il(r,r.stateNode.containerInfo);break;case 10:Er(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,ad(r),null;break;case 13:var c=r.memoizedState;if(c!==null){if(c.dehydrated!==null)return Or(r),r.flags|=128,null;c=bs(i,r,a,!1);var f=r.child.childLanes;return c||(a&f)!==0?mv(i,r,a):(Or(r),i=ir(i,r,a),i!==null?i.sibling:null)}Or(r);break;case 19:if(r.flags&128)return zd(i,r,a);if(f=(i.flags&128)!==0,c=(a&r.childLanes)!==0,c||(bs(i,r,a,!1),c=(a&r.childLanes)!==0),f){if(c)return zd(i,r,a);r.flags|=128}if(f=r.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),$a(r,Zt.current),c)break;return null;case 22:return r.lanes=0,cv(i,r,a,r.pendingProps);case 24:Er(r,xt,i.memoizedState.cache)}return ir(i,r,a)}function yv(i,r,a){if(i!==null)if(i.memoizedProps!==r.pendingProps)Et=!0;else{if(!Bd(i,a)&&(r.flags&128)===0)return Et=!1,bx(i,r,a);Et=(i.flags&131072)!==0}else Et=!1,je&&(r.flags&1048576)!==0&&Xg(r,Ba,r.index);switch(r.lanes=0,r.tag){case 16:e:{var c=r.pendingProps;if(i=Es(r.elementType),r.type=i,typeof i=="function")Vf(i)?(c=As(i,c),r.tag=1,r=dv(null,r,i,c,a)):(r.tag=0,r=Ad(null,r,i,c,a));else{if(i!=null){var f=i.$$typeof;if(f===H){r.tag=11,r=lv(null,r,i,c,a);break e}else if(f===oe){r.tag=14,r=av(null,r,i,c,a);break e}else if(f===P){r.tag=10,r.type=i,r=vv(null,r,a);break e}}throw r=ve(i)||i,Error(s(306,r,""))}}return r;case 0:return Ad(i,r,r.type,r.pendingProps,a);case 1:return c=r.type,f=As(c,r.pendingProps),dv(i,r,c,f,a);case 3:e:{if(il(r,r.stateNode.containerInfo),i===null)throw Error(s(387));c=r.pendingProps;var m=r.memoizedState;f=m.element,id(i,r),qa(r,c,null,a);var b=r.memoizedState;if(c=b.cache,Er(r,xt,c),c!==m.cache&&Xf(r,[xt],a,!0),Va(),c=b.element,m.isDehydrated)if(m={element:c,isDehydrated:!1,cache:b.cache},r.updateQueue.baseState=m,r.memoizedState=m,r.flags&256){r=pv(i,r,c,a);break e}else if(c!==f){f=Ki(Error(s(424)),r),ja(f),r=pv(i,r,c,a);break e}else for(i=r.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,at=Qi(i.firstChild),jt=r,je=!0,xr=null,Xi=!0,a=c2(r,null,c,a),r.child=a;a;)a.flags=a.flags&-3|134221824,a=a.sibling;else{if(ys(),c===f){r=ir(i,r,a);break e}Dt(i,r,c,a)}r=r.child}return r;case 26:return kl(i,r),i===null?(a=q3(r.type,null,r.pendingProps,null))?r.memoizedState=a:je||(r.stateNode=x3(r.type,r.pendingProps,an.current,r)):r.memoizedState=q3(r.type,i.memoizedProps,r.pendingProps,i.memoizedState),null;case 27:return ba(r),i===null&&je&&(c=r.stateNode=P3(r.type,r.pendingProps,an.current),jt=r,Xi=!0,f=at,Pr(r.type)?(R1=f,at=Qi(c.firstChild)):at=f),Dt(i,r,r.pendingProps.children,a),kl(i,r),i===null&&(r.flags|=4194304),r.child;case 5:return i===null&&je&&((f=c=at)&&(c=m9(c,r.type,r.pendingProps,Xi),c!==null?(r.stateNode=c,jt=r,at=Qi(c.firstChild),Xi=!1,f=!0):f=!1),f||Cr(r)),ba(r),f=r.type,m=r.pendingProps,b=i!==null?i.memoizedProps:null,c=m.children,x1(f,m)?c=null:b!==null&&x1(f,b)&&(r.flags|=32),r.memoizedState!==null&&(f=ud(i,r,ux,null,null,a),ql._currentValue=f),kl(i,r),Dt(i,r,c,a),r.child;case 6:return i===null&&je&&((i=a=at)&&(a=_9(a,r.pendingProps,Xi),a!==null?(r.stateNode=a,jt=r,at=null,i=!0):i=!1),i||Cr(r)),null;case 13:return mv(i,r,a);case 4:return il(r,r.stateNode.containerInfo),c=r.pendingProps,i===null?r.child=Ts(r,null,c,a):Dt(i,r,c,a),r.child;case 11:return lv(i,r,r.type,r.pendingProps,a);case 7:return c=r.pendingProps,kl(i,r),Dt(i,r,c,a),r.child;case 8:return Dt(i,r,r.pendingProps.children,a),r.child;case 12:return Dt(i,r,r.pendingProps.children,a),r.child;case 10:return vv(i,r,a);case 9:return f=r.type._context,c=r.pendingProps.children,ws(r),f=Gt(f),c=c(f),r.flags|=1,Dt(i,r,c,a),r.child;case 14:return av(i,r,r.type,r.pendingProps,a);case 15:return ov(i,r,r.type,r.pendingProps,a);case 19:return zd(i,r,a);case 31:return yx(i,r,a);case 22:return cv(i,r,a,r.pendingProps);case 24:return ws(r),c=Gt(xt),i===null?(f=Jf(),f===null&&(f=rt,m=Zf(),f.pooledCache=m,m.refCount++,m!==null&&(f.pooledCacheLanes|=a),f=m),r.memoizedState={parent:c,cache:f},td(r),Er(r,xt,f)):((i.lanes&a)!==0&&(id(i,r),qa(r,null,null,a),Va()),f=i.memoizedState,m=r.memoizedState,f.parent!==c?(f={parent:c,cache:c},r.memoizedState=f,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=f),Er(r,xt,c)):(c=m.cache,Er(r,xt,c),c!==f.cache&&Xf(r,[xt],a,!0))),Dt(i,r,r.pendingProps.children,a),r.child;case 30:return r.stateNode===null&&(r.stateNode={autoName:null,paired:null,clones:null,ref:null}),c=r.pendingProps,c.name!=null&&c.name!=="auto"?r.flags|=i===null?18882560:18874368:je&&Ic(r),i!==null&&i.memoizedProps.name!==c.name?r.flags|=4194816:kl(i,r),Dt(i,r,c.children,a),r.child;case 29:throw r.pendingProps}throw Error(s(156,r.tag))}function nr(i){i.flags|=4}function jd(i,r,a,c,f){var m;if((m=(i.mode&32)!==0)&&(m=a===null?W3(r,c):W3(r,c)&&(c.src!==a.src||c.srcSet!==a.srcSet)),m){if(i.flags|=16777216,(f&335544128)===f)if(i.stateNode.complete)i.flags|=8192;else if(e3())i.flags|=8192;else throw ks=Yc,ed}else i.flags&=-16777217}function Sv(i,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!G3(r))if(e3())i.flags|=8192;else throw ks=Yc,ed}function hu(i,r){r!==null&&(i.flags|=4),i.flags&16384&&(r=i.tag!==22?W_():536870912,i.lanes|=r,Ol|=r)}function Xa(i,r){if(!je)switch(i.tailMode){case"visible":break;case"collapsed":for(var a=i.tail,c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?r||i.tail===null?i.tail=null:i.tail.sibling=null:c.sibling=null;break;default:for(r=i.tail,a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?i.tail=null:a.sibling=null}}function ot(i){var r=i.alternate!==null&&i.alternate.child===i.child,a=0,c=0;if(r)for(var f=i.child;f!==null;)a|=f.lanes|f.childLanes,c|=f.subtreeFlags&1206910976,c|=f.flags&1206910976,f.return=i,f=f.sibling;else for(f=i.child;f!==null;)a|=f.lanes|f.childLanes,c|=f.subtreeFlags,c|=f.flags,f.return=i,f=f.sibling;return i.subtreeFlags|=c,i.childLanes=a,r}function wx(i,r,a){var c=r.pendingProps;switch(Yf(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ot(r),null;case 1:return ot(r),null;case 3:return a=r.stateNode,c=null,i!==null&&(c=i.memoizedState.cache),r.memoizedState.cache!==c&&(r.flags|=2048),Jn(xt),vr(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(i===null||i.child===null)&&(yl(r)?nr(r):i===null||i.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Wf())),ot(r),null;case 26:var f=r.type,m=r.memoizedState;return i===null?(nr(r),m!==null?(ot(r),Sv(r,m)):(ot(r),jd(r,f,null,c,a))):m?m!==i.memoizedState?(nr(r),ot(r),Sv(r,m)):(ot(r),r.flags&=-16777217):(i=i.memoizedProps,i!==c&&nr(r),ot(r),jd(r,f,i,c,a)),null;case 27:if(nl(r),a=an.current,f=r.type,i!==null&&r.stateNode!=null)i.memoizedProps!==c&&nr(r);else{if(!c){if(r.stateNode===null)throw Error(s(166));return ot(r),r.subtreeFlags&=-33554433,null}i=Vi.current,yl(r)?Qg(r):(i=P3(f,c,a),r.stateNode=i,nr(r))}return ot(r),r.subtreeFlags&=-33554433,null;case 5:if(nl(r),f=r.type,i!==null&&r.stateNode!=null)i.memoizedProps!==c&&nr(r);else{if(!c){if(r.stateNode===null)throw Error(s(166));return ot(r),r.subtreeFlags&=-33554433,null}if(m=Vi.current,yl(r))Qg(r);else{var b=ao(an.current);switch(m){case 1:m=b.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:m=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":m=b.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":m=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":m=b.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof c.is=="string"?b.createElement("select",{is:c.is}):b.createElement("select"),c.multiple?m.multiple=!0:c.size&&(m.size=c.size);break;default:m=typeof c.is=="string"?b.createElement(f,{is:c.is}):b.createElement(f)}}m[Wt]=r,m[vi]=c;e:for(b=r.child;b!==null;){if(b.tag===5||b.tag===6)m.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===r)break e;for(;b.sibling===null;){if(b.return===null||b.return===r)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}r.stateNode=m;e:switch(Jt(m,f,c),f){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&nr(r)}}return ot(r),r.subtreeFlags&=-33554433,jd(r,r.type,i===null?null:i.memoizedProps,r.pendingProps,a),null;case 6:if(i&&r.stateNode!=null)i.memoizedProps!==c&&nr(r);else{if(typeof c!="string"&&r.stateNode===null)throw Error(s(166));if(i=an.current,yl(r)){if(i=r.stateNode,a=r.memoizedProps,c=null,f=jt,f!==null)switch(f.tag){case 27:case 5:c=f.memoizedProps}i[Wt]=r,i=!!(i.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||y3(i.nodeValue,a)),i||Cr(r,!0)}else i=ao(i).createTextNode(c),i[Wt]=r,r.stateNode=i}return ot(r),null;case 31:if(a=r.memoizedState,i===null||i.memoizedState!==null){if(c=yl(r),a!==null){if(i===null){if(!c)throw Error(s(318));if(i=r.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(s(557));i[Wt]=r}else ys(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;ot(r),i=!1}else a=Wf(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=a),i=!0;if(!i)return r.flags&256?(Ri(r),r):(Ri(r),null);if((r.flags&128)!==0)throw Error(s(558))}return ot(r),null;case 13:if(c=r.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(f=yl(r),c!==null&&c.dehydrated!==null){if(i===null){if(!f)throw Error(s(318));if(f=r.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(s(317));f[Wt]=r}else ys(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;ot(r),f=!1}else f=Wf(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=f),f=!0;if(!f)return r.flags&256?(Ri(r),r):(Ri(r),null)}return Ri(r),(r.flags&128)!==0?(r.lanes=a,r):(a=c!==null,i=i!==null&&i.memoizedState!==null,a&&(c=r.child,f=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(f=c.alternate.memoizedState.cachePool.pool),m=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(m=c.memoizedState.cachePool.pool),m!==f&&(c.flags|=2048)),a!==i&&a&&(r.child.flags|=8192),hu(r,r.updateQueue),ot(r),null);case 4:return vr(),i===null&&v1(r.stateNode.containerInfo),r.flags|=67108864,ot(r),null;case 10:return Jn(r.type),ot(r),null;case 19:if(od(r),c=r.memoizedState,c===null)return ot(r),null;if(f=(r.flags&128)!==0,m=c.rendering,m===null)if(f)Xa(c,!1);else{if(_t!==0||i!==null&&(i.flags&128)!==0)for(i=r.child;i!==null;){if(m=Xc(i),m!==null){for(r.flags|=128,Xa(c,!1),i=m.updateQueue,r.updateQueue=i,hu(r,i),r.subtreeFlags=0,i=a,a=r.child;a!==null;)Kg(a,i),a=a.sibling;return $a(r,Zt.current&1|2),je&&Zn(r,c.treeForkCount),r.child}i=i.sibling}c.tail!==null&&Kt()>xu&&(r.flags|=128,f=!0,Xa(c,!1),r.lanes=4194304)}else{if(!f)if(i=Xc(m),i!==null){if(r.flags|=128,f=!0,i=i.updateQueue,r.updateQueue=i,hu(r,i),Xa(c,!0),c.tail===null&&c.tailMode!=="collapsed"&&c.tailMode!=="visible"&&!m.alternate&&!je)return ot(r),null}else 2*Kt()-c.renderingStartTime>xu&&a!==536870912&&(r.flags|=128,f=!0,Xa(c,!1),r.lanes=4194304);c.isBackwards?(m.sibling=r.child,r.child=m):(i=c.last,i!==null?i.sibling=m:r.child=m,c.last=m)}if(c.tail!==null){i=c.tail;e:{for(a=i;a!==null;){if(a.alternate!==null){a=!1;break e}a=a.sibling}a=!0}return c.rendering=i,c.tail=i.sibling,c.renderingStartTime=Kt(),i.sibling=null,m=Zt.current,m=f?m&1|2:m&1,c.tailMode==="visible"||c.tailMode==="collapsed"||!a||je?$a(r,m):(a=m,Ze(Xt,r),Ze(Zt,a),si===null&&(si=r)),je&&Zn(r,c.treeForkCount),i}return ot(r),null;case 22:case 23:return Ri(r),ld(),c=r.memoizedState!==null,i!==null?i.memoizedState!==null!==c&&(r.flags|=8192):c&&(r.flags|=8192),c?(a&536870912)!==0&&(r.flags&128)===0&&(ot(r),r.subtreeFlags&6&&(r.flags|=8192)):ot(r),a=r.updateQueue,a!==null&&hu(r,a.retryQueue),a=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(a=i.memoizedState.cachePool.pool),c=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),c!==a&&(r.flags|=2048),i!==null&&wt(Cs),null;case 24:return a=null,i!==null&&(a=i.memoizedState.cache),r.memoizedState.cache!==a&&(r.flags|=2048),Jn(xt),ot(r),null;case 25:return null;case 30:return r.flags|=33554432,ot(r),null}throw Error(s(156,r.tag))}function xx(i,r){switch(Yf(r),r.tag){case 1:return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 3:return Jn(xt),vr(),i=r.flags,(i&65536)!==0&&(i&128)===0?(r.flags=i&-65537|128,r):null;case 26:case 27:case 5:return nl(r),null;case 31:if(r.memoizedState!==null){if(Ri(r),r.alternate===null)throw Error(s(340));ys()}return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 13:if(Ri(r),i=r.memoizedState,i!==null&&i.dehydrated!==null){if(r.alternate===null)throw Error(s(340));ys()}return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 19:return od(r),i=r.flags,i&65536?(r.flags=i&-65537|128,i=r.memoizedState,i!==null&&(i.rendering=null,i.tail=null),r.flags|=4,r):null;case 4:return vr(),null;case 10:return Jn(r.type),null;case 22:case 23:return Ri(r),ld(),i!==null&&wt(Cs),i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 24:return Jn(xt),null;case 25:return null;default:return null}}function bv(i,r){switch(Yf(r),r.tag){case 3:Jn(xt),vr();break;case 26:case 27:case 5:nl(r);break;case 4:vr();break;case 31:r.memoizedState!==null&&Ri(r);break;case 13:Ri(r);break;case 19:od(r);break;case 10:Jn(r.type);break;case 22:case 23:Ri(r),ld(),i!==null&&wt(Cs);break;case 24:Jn(xt)}}function Za(i,r){try{var a=r.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var f=c.next;a=f;do{if((a.tag&i)===i){c=void 0;var m=a.create,b=a.inst;c=m(),b.destroy=c}a=a.next}while(a!==f)}}catch(x){Je(r,r.return,x)}}function Lr(i,r,a){try{var c=r.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var m=f.next;c=m;do{if((c.tag&i)===i){var b=c.inst,x=b.destroy;if(x!==void 0){b.destroy=void 0,f=r;var A=a,j=x;try{j()}catch(G){Je(f,A,G)}}}c=c.next}while(c!==m)}}catch(G){Je(r,r.return,G)}}function wv(i){var r=i.updateQueue;if(r!==null){var a=i.stateNode;try{h2(r,a)}catch(c){Je(i,i.return,c)}}}function xv(i,r,a){a.props=As(i.type,i.memoizedProps),a.state=i.memoizedState;try{a.componentWillUnmount()}catch(c){Je(i,r,c)}}function Sn(i,r){try{var a=i.ref;if(a!==null){switch(i.tag){case 26:case 27:case 5:var c=i.stateNode;break;case 30:var f=i.stateNode,m=Wn(i.memoizedProps,f);(f.ref===null||f.ref.name!==m)&&(f.ref=D3(m)),c=f.ref;break;case 7:if(i.stateNode===null){var b=new ji(i);_(i.child,!1,d9,b,void 0,void 0),i.stateNode=b}c=i.stateNode;break;default:c=i.stateNode}typeof a=="function"?i.refCleanup=a(c):a.current=c}}catch(x){Je(i,r,x)}}function Qt(i,r){var a=i.ref,c=i.refCleanup;if(a!==null)if(typeof c=="function")try{c()}catch(f){Je(i,r,f)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(f){Je(i,r,f)}else a.current=null}function fu(i,r){if((i.tag===5||i.tag===27||i.tag===6)&&i.alternate===null&&r!==null)for(var a=0;a<r.length;a++)B3(i.stateNode,r[a])}function Cv(i){for(var r=i.return;r!==null&&(Id(r)&&B3(i.stateNode,r.stateNode),!Hd(r));)r=r.return}function Qa(i){for(var r=i.return;r!==null&&(Id(r)&&p9(i.stateNode,r.stateNode),!Hd(r));)r=r.return}function Hd(i){return i.tag===5||i.tag===3||i.tag===27}function Id(i){return i&&i.tag===7&&i.stateNode!==null}function Pd(i){var r=i.type,a=i.memoizedProps,c=i.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":a.autoFocus&&c.focus();break e;case"img":a.src?c.src=a.src:a.srcSet&&(c.srcset=a.srcSet)}}catch(f){Je(i,i.return,f)}}function Fd(i,r,a){try{var c=i.stateNode;Gx(c,i.type,a,r),c[vi]=r}catch(f){Je(i,i.return,f)}}function Ev(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Pr(i.type)||i.tag===4}function Ud(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Ev(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&Pr(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Vd(i,r,a,c){var f=i.tag;if(f===5||f===6)f=i.stateNode,r?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(f,r):(r=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,r.appendChild(f),a=a._reactRootContainer,a!=null||r.onclick!==null||(r.onclick=gn)),fu(i,c),Ye=!0;else if(f!==4&&(f===27&&(fu(i,c),c=null,Pr(i.type)&&(a=i.stateNode,r=null)),i=i.child,i!==null))for(Vd(i,r,a,c),i=i.sibling;i!==null;)Vd(i,r,a,c),i=i.sibling}function du(i,r,a,c){var f=i.tag;if(f===5||f===6)f=i.stateNode,r?a.insertBefore(f,r):a.appendChild(f),fu(i,c),Ye=!0;else if(f!==4&&(f===27&&(fu(i,c),c=null,Pr(i.type)&&(a=i.stateNode)),i=i.child,i!==null))for(du(i,r,a,c),i=i.sibling;i!==null;)du(i,r,a,c),i=i.sibling}function kv(i){var r=i.stateNode,a=i.memoizedProps;try{for(var c=i.type,f=r.attributes;f.length;)r.removeAttributeNode(f[0]);Jt(r,c,a),r[Wt]=i,r[vi]=a}catch(m){Je(i,i.return,m)}}var pu=!1,Li=null;function Tv(i){(i.tag===30||(i.subtreeFlags&33554432)!==0)&&(pu=!0)}var bn=null;function Mv(){var i=bn;return bn=null,i}var Si=0;function Tl(i,r,a,c,f){return Si=0,Av(i.child,r,a,c,f)}function Av(i,r,a,c,f){for(var m=!1;i!==null;){if(i.tag===5){var b=i.stateNode;if(c!==null){var x=k1(b);c.push(x),x.view&&(m=!0)}else m||k1(b).view&&(m=!0);pu=!0,M3(b,Si===0?r:r+"_"+Si,a),Si++}else(i.tag!==22||i.memoizedState===null)&&(i.tag===30&&f||Av(i.child,r,a,c,f)&&(m=!0));i=i.sibling}return m}function wn(i,r){for(;i!==null;)i.tag===5?A3(i.stateNode,i.memoizedProps):(i.tag!==22||i.memoizedState===null)&&(i.tag===30&&r||wn(i.child,r)),i=i.sibling}function mu(i){if((i.subtreeFlags&18874368)!==0)for(i=i.child;i!==null;){if((i.tag!==22||i.memoizedState===null)&&(mu(i),i.tag===30&&(i.flags&18874368)!==0&&i.stateNode.paired)){var r=i.memoizedProps;if(r.name==null||r.name==="auto")throw Error(s(544));var a=r.name;r=Gn(r.default,r.share),r!=="none"&&(Tl(i,a,r,null,!1)||wn(i.child,!1))}i=i.sibling}}function qd(i,r){if(i.tag===30){var a=i.stateNode,c=i.memoizedProps,f=Wn(c,a),m=Gn(c.default,a.paired?c.share:c.enter);m!=="none"?Tl(i,f,m,null,!1)?(mu(i),a.paired||r||zl(i,c.onEnter)):wn(i.child,!1):mu(i)}else if((i.subtreeFlags&33554432)!==0)for(i=i.child;i!==null;)qd(i,r),i=i.sibling;else mu(i)}function $d(i){if(Li!==null&&Li.size!==0){var r=Li;if((i.subtreeFlags&18874368)!==0)for(i=i.child;i!==null;){if(i.tag!==22||i.memoizedState===null){if(i.tag===30&&(i.flags&18874368)!==0){var a=i.memoizedProps,c=a.name;if(c!=null&&c!=="auto"){var f=r.get(c);if(f!==void 0){var m=Gn(a.default,a.share);if(m!=="none"&&(Tl(i,c,m,null,!1)?(m=i.stateNode,f.paired=m,m.paired=f,zl(i,a.onShare)):wn(i.child,!1)),r.delete(c),r.size===0)break}}}$d(i)}i=i.sibling}}}function Yd(i){if(i.tag===30){var r=i.memoizedProps,a=Wn(r,i.stateNode),c=Li!==null?Li.get(a):void 0,f=Gn(r.default,c!==void 0?r.share:r.exit);f!=="none"&&(Tl(i,a,f,null,!1)?c!==void 0?(f=i.stateNode,c.paired=f,f.paired=c,Li.delete(a),zl(i,r.onShare)):zl(i,r.onExit):wn(i.child,!1)),Li!==null&&$d(i)}else if((i.subtreeFlags&33554432)!==0)for(i=i.child;i!==null;)Yd(i),i=i.sibling;else Li!==null&&$d(i)}function Dv(i){for(i=i.child;i!==null;){if(i.tag===30){var r=i.memoizedProps,a=Wn(r,i.stateNode);r=Gn(r.default,r.update),i.flags&=-5,r!=="none"&&Tl(i,a,r,i.memoizedState=[],!1)}else(i.subtreeFlags&33554432)!==0&&Dv(i);i=i.sibling}}function Kd(i){if((i.subtreeFlags&18874368)!==0)for(i=i.child;i!==null;){if(i.tag!==22||i.memoizedState===null){if(i.tag===30&&(i.flags&18874368)!==0){var r=i.stateNode;r.paired!==null&&(r.paired=null,wn(i.child,!1))}Kd(i)}i=i.sibling}}function _u(i){if(i.tag===30)i.stateNode.paired=null,wn(i.child,!1),Kd(i);else if((i.subtreeFlags&33554432)!==0)for(i=i.child;i!==null;)_u(i),i=i.sibling;else Kd(i)}function Ov(i){for(i=i.child;i!==null;)i.tag===30?wn(i.child,!1):(i.subtreeFlags&33554432)!==0&&Ov(i),i=i.sibling}function Wd(i,r,a,c,f,m,b){for(var x=!1;r!==null;){if(r.tag===5){var A=r.stateNode;if(m!==null&&Si<m.length){var j=m[Si],G=k1(A);(j.view||G.view)&&(x=!0);var te;if(te=(i.flags&4)===0)if(G.clip)te=!0;else{te=j.rect;var N=G.rect;te=te.y!==N.y||te.x!==N.x||te.height!==N.height||te.width!==N.width}te&&(i.flags|=4),G.abs?G=!j.abs:(j=j.rect,G=G.rect,G=j.height!==G.height||j.width!==G.width),G&&(i.flags|=32)}else i.flags|=32;(i.flags&4)!==0&&M3(A,Si===0?a:a+"_"+Si,f),x&&(i.flags&4)!==0||(bn===null&&(bn=[]),bn.push(A,Si===0?c:c+"_"+Si,r.memoizedProps)),Si++}else(r.tag!==22||r.memoizedState===null)&&(r.tag===30&&b?i.flags|=r.flags&32:Wd(i,r.child,a,c,f,m,b)&&(x=!0));r=r.sibling}return x}function Rv(i,r){for(i=i.child;i!==null;){if(i.tag===30){var a=i.memoizedProps,c=i.stateNode,f=Wn(a,c),m=Gn(a.default,a.update),b;b=i.memoizedState,i.memoizedState=null,c=i;var x=i.child;Si=0,f=Wd(c,x,f,f,m,b,!1),(i.flags&4)!==0&&f&&zl(i,a.onUpdate)}else(i.subtreeFlags&33554432)!==0&&Rv(i);i=i.sibling}}var Ht=!1,Xe=!1,xn=!1,Gd=!1,Lv=typeof WeakSet=="function"?WeakSet:Set,It=null,Cn=!1,Ja=!1,gu=!1,Xd=!1;function Cx(i,r,a){if(i=i.containerInfo,b1=$l,i=jg(i),Bf(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var f=c.getSelection&&c.getSelection();if(f&&f.rangeCount!==0){c=f.anchorNode;var m=f.anchorOffset,b=f.focusNode;f=f.focusOffset;try{c.nodeType,b.nodeType}catch{c=null;break e}var x=0,A=-1,j=-1,G=0,te=0,N=i,Y=null;t:for(;;){for(var he;N!==c||m!==0&&N.nodeType!==3||(A=x+m),N!==b||f!==0&&N.nodeType!==3||(j=x+f),N.nodeType===3&&(x+=N.nodeValue.length),(he=N.firstChild)!==null;)Y=N,N=he;for(;;){if(N===i)break t;if(Y===c&&++G===m&&(A=x),Y===b&&++te===f&&(j=x),(he=N.nextSibling)!==null)break;N=Y,Y=N.parentNode}N=he}c=A===-1||j===-1?null:{start:A,end:j}}else c=null}c=c||{start:0,end:0}}else c=null;for(w1={focusedElem:i,selectionRange:c},$l=!1,a=(a&335544064)===a,It=r,r=a?9270:1024;It!==null;){if(i=It,a&&(c=i.deletions,c!==null))for(m=0;m<c.length;m++)a&&Yd(c[m]);if(i.alternate===null&&(i.flags&2)!==0)a&&Tv(i),vu(a);else{if(i.tag===22){if(c=i.alternate,i.memoizedState!==null){c!==null&&c.memoizedState===null&&a&&Yd(c),vu(a);continue}else if(c!==null&&c.memoizedState!==null){a&&Tv(i),vu(a);continue}}c=i.child,(i.subtreeFlags&r)!==0&&c!==null?(c.return=i,It=c):(a&&Dv(i),vu(a))}}Li=null}function vu(i){for(;It!==null;){var r=It,a=i,c=r.alternate,f=r.flags;switch(r.tag){case 0:case 11:case 15:break;case 1:if((f&1024)!==0&&c!==null){a=void 0,f=c.memoizedProps,c=c.memoizedState;var m=r.stateNode;try{var b=As(r.type,f);a=m.getSnapshotBeforeUpdate(b,c),m.__reactInternalSnapshotBeforeUpdate=a}catch(x){Je(r,r.return,x)}}break;case 3:if((f&1024)!==0){if(c=r.stateNode.containerInfo,a=c.nodeType,a===9)A1(c);else if(a===1)switch(c.nodeName){case"HEAD":case"HTML":case"BODY":A1(c);break;default:c.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:a&&c!==null&&(a=Wn(c.memoizedProps,c.stateNode),f=r.memoizedProps,f=Gn(f.default,f.update),f!=="none"&&Tl(c,a,f,c.memoizedState=[],!0));break;default:if((f&1024)!==0)throw Error(s(163))}if(c=r.sibling,c!==null){c.return=r.return,It=c;break}It=r.return}}function Nv(i,r,a){var c=a.flags;switch(a.tag){case 0:case 11:case 15:En(i,a),c&4&&Za(5,a);break;case 1:if(En(i,a),c&4)if(i=a.stateNode,r===null)try{i.componentDidMount()}catch(b){Je(a,a.return,b)}else{var f=As(a.type,r.memoizedProps);r=r.memoizedState;try{i.componentDidUpdate(f,r,i.__reactInternalSnapshotBeforeUpdate)}catch(b){Je(a,a.return,b)}}c&64&&wv(a),c&512&&Sn(a,a.return);break;case 3:if(En(i,a),c&64&&(i=a.updateQueue,i!==null)){if(r=null,a.child!==null)switch(a.child.tag){case 27:case 5:r=a.child.stateNode;break;case 1:r=a.child.stateNode}try{h2(i,r)}catch(b){Je(a,a.return,b)}}break;case 27:r===null&&c&4&&kv(a);case 26:case 5:En(i,a),r===null&&c&4&&Pd(a),c&512&&Sn(a,a.return);break;case 12:En(i,a);break;case 31:En(i,a),c&4&&Hv(i,a);break;case 13:En(i,a),c&4&&Iv(i,a),c&64&&(i=a.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(a=Bx.bind(null,a),g9(i,a))));break;case 22:if(c=a.memoizedState!==null||Ht,!c){var m=r!==null&&r.memoizedState!==null||Xe;r=Ht,f=Xe,Ht=c,(Xe=m)&&!f?(c=2,(a.subtreeFlags&8772)!==0&&(c|=1),hn(i,a,c)):En(i,a),Ht=r,Xe=f}break;case 30:En(i,a),c&512&&Sn(a,a.return);break;case 7:c&512&&Sn(a,a.return);default:En(i,a)}}function Zd(i,r){for(i=i.child;i!==null;)zv(i,r),i=i.sibling}function zv(i,r){switch(i.tag){case 5:case 26:try{var a=i.stateNode;if(r){var c=a.style;typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none"}else{var f=i.stateNode,m=i.memoizedProps.style,b=m!=null&&m.hasOwnProperty("display")?m.display:null;f.style.display=b==null||typeof b=="boolean"?"":(""+b).trim()}}catch(A){Je(i,i.return,A)}Qd(i,r);break;case 6:try{i.stateNode.nodeValue=r?"":i.memoizedProps,Ye=!0}catch(A){Je(i,i.return,A)}break;case 18:try{var x=i.stateNode;r?T3(x,!0):T3(i.stateNode,!1)}catch(A){Je(i,i.return,A)}break;case 22:case 23:i.memoizedState===null&&Zd(i,r);break;default:Zd(i,r)}}function Qd(i,r){if(i.subtreeFlags&67108864)for(i=i.child;i!==null;){e:{var a=i,c=r;switch(a.tag){case 4:zv(a,c);break e;case 22:a.memoizedState===null&&Qd(a,c);break e;default:Qd(a,c)}}i=i.sibling}}function Bv(i){var r=i.alternate;r!==null&&(i.alternate=null,Bv(r)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(r=i.stateNode,r!==null&&xc(r)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var ut=null,bi=!1;function cn(i,r,a){for(a=a.child;a!==null;)jv(i,r,a),a=a.sibling}function jv(i,r,a){if(Mi&&typeof Mi.onCommitFiberUnmount=="function")try{Mi.onCommitFiberUnmount(wa,a)}catch{}switch(a.tag){case 26:Xe||Qt(a,r),cn(i,r,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&!Xe&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Xe||Qt(a,r),Qa(a);var c=ut,f=bi;Pr(a.type)&&(ut=a.stateNode,bi=!1),cn(i,r,a),F3(a.stateNode,a.type,a.memoizedProps),ut=c,bi=f;break;case 5:Xe||Qt(a,r),Qa(a);case 6:if(a.tag===6&&Qa(a),c=ut,f=bi,ut=null,cn(i,r,a),ut=c,bi=f,ut!==null)if(bi)try{(ut.nodeType===9?ut.body:ut.nodeName==="HTML"?ut.ownerDocument.body:ut).removeChild(a.stateNode),Ye=!0}catch(m){Je(a,r,m)}else try{ut.removeChild(a.stateNode),Ye=!0}catch(m){Je(a,r,m)}break;case 18:ut!==null&&(bi?(i=ut,k3(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,a.stateNode),Yl(i)):k3(ut,a.stateNode));break;case 4:c=ut,f=bi,ut=a.stateNode.containerInfo,bi=!0,cn(i,r,a),ut=c,bi=f;break;case 0:case 11:case 14:case 15:Lr(2,a,r),Xe||Lr(4,a,r),cn(i,r,a);break;case 1:Xe||(Qt(a,r),c=a.stateNode,typeof c.componentWillUnmount=="function"&&xv(a,r,c)),cn(i,r,a);break;case 21:cn(i,r,a);break;case 22:Xe=(c=Xe)||a.memoizedState!==null,cn(i,r,a),Xe=c;break;case 30:Qt(a,r),cn(i,r,a);break;case 7:Xe||Qt(a,r),cn(i,r,a);break;default:cn(i,r,a)}}function Hv(i,r){if(r.memoizedState===null&&(i=r.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Yl(i)}catch(a){Je(r,r.return,a)}}}function Iv(i,r){if(r.memoizedState===null&&(i=r.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Yl(i)}catch(a){Je(r,r.return,a)}}function Ex(i){switch(i.tag){case 31:case 13:case 19:var r=i.stateNode;return r===null&&(r=i.stateNode=new Lv),r;case 22:return i=i.stateNode,r=i._retryCache,r===null&&(r=i._retryCache=new Lv),r;default:throw Error(s(435,i.tag))}}function yu(i,r){var a=Ex(i);r.forEach(function(c){if(!a.has(c)){a.add(c);var f=jx.bind(null,i,c);c.then(f,f)}})}function hi(i,r,a){var c=r.deletions;if(c!==null)for(var f=0;f<c.length;f++){var m=c[f],b=i,x=r,A=x;e:for(;A!==null;){switch(A.tag){case 27:if(Pr(A.type)){ut=A.stateNode,bi=!1;break e}break;case 5:ut=A.stateNode,bi=!1;break e;case 3:case 4:ut=A.stateNode.containerInfo,bi=!0;break e}A=A.return}if(ut===null)throw Error(s(160));jv(b,x,m),ut=null,bi=!1,b=m.alternate,b!==null&&(b.return=null),m.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Pv(r,i,a),r=r.sibling}var un=null;function Pv(i,r,a){var c=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(f&4&&(c=i.updateQueue,c=c!==null?c.events:null,c!==null))for(var m=0;m<c.length;m++){var b=c[m];b.ref.impl=b.nextImpl}hi(r,i,a),fi(i),f&4&&(Lr(3,i,i.return),Za(3,i),Lr(5,i,i.return));break;case 1:hi(r,i,a),fi(i),f&512&&(Xe||c===null||Qt(c,c.return)),f&64&&Ht&&(i=i.updateQueue,i!==null&&(r=i.callbacks,r!==null&&(a=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=a===null?r:a.concat(r))));break;case 26:if(m=un,hi(r,i,a),fi(i),f&512&&(Xe||c===null||Qt(c,c.return)),f&4)if(f=c!==null?c.memoizedState:null,a=i.memoizedState,c===null)if(a===null)if(i.stateNode===null)if(Ht)i.stateNode=x3(i.type,i.memoizedProps,r.containerInfo,i);else{e:{r=i.type,a=i.memoizedProps,f=m.ownerDocument||m;t:switch(r){case"title":c=f.getElementsByTagName("title")[0],(!c||c[Ea]||c[Wt]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=f.createElement(r),f.head.insertBefore(c,f.querySelector("head > title"))),Jt(c,r,a),c[Wt]=i,Bt(c),r=c;break e;case"link":if(m=K3("link","href",f).get(r+(a.href||""))){for(b=0;b<m.length;b++)if(c=m[b],c.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&c.getAttribute("rel")===(a.rel==null?null:a.rel)&&c.getAttribute("title")===(a.title==null?null:a.title)&&c.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){m.splice(b,1);break t}}c=f.createElement(r),Jt(c,r,a),f.head.appendChild(c);break;case"meta":if(m=K3("meta","content",f).get(r+(a.content||""))){for(b=0;b<m.length;b++)if(c=m[b],c.getAttribute("content")===(a.content==null?null:""+a.content)&&c.getAttribute("name")===(a.name==null?null:a.name)&&c.getAttribute("property")===(a.property==null?null:a.property)&&c.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&c.getAttribute("charset")===(a.charSet==null?null:a.charSet)){m.splice(b,1);break t}}c=f.createElement(r),Jt(c,r,a),f.head.appendChild(c);break;default:throw Error(s(468,r))}c[Wt]=i,Bt(c),r=c}i.stateNode=r}else Ht||B1(m,i.type,i.stateNode);else i.stateNode=Y3(m,a,i.memoizedProps);else f!==a?(f===null?(r=c.stateNode,r===null||Xe||r.parentNode.removeChild(r)):f.count--,a===null?Ht||B1(m,i.type,i.stateNode):Y3(m,a,i.memoizedProps)):a===null&&i.stateNode!==null&&Fd(i,i.memoizedProps,c.memoizedProps);break;case 27:hi(r,i,a),fi(i),f&512&&(Xe||c===null||Qt(c,c.return)),c!==null&&f&4&&Fd(i,i.memoizedProps,c.memoizedProps);break;case 5:if(m=xn,xn=!1,hi(r,i,a),xn=m,fi(i),f&512&&(Xe||c===null||Qt(c,c.return)),i.flags&32){r=i.stateNode;try{cl(r,""),Ye=!0}catch(G){Je(i,i.return,G)}}f&4&&i.stateNode!=null&&(r=i.memoizedProps,Fd(i,r,c!==null?c.memoizedProps:r)),f&1024&&(Gd=!0);break;case 6:if(hi(r,i,a),fi(i),f&4){if(i.stateNode===null)throw Error(s(162));r=i.memoizedProps,a=i.stateNode;try{a.nodeValue=r,Ye=!0}catch(G){Je(i,i.return,G)}}break;case 3:if(Ye=!1,Nu=null,m=un,un=oo(r.containerInfo),hi(r,i,a),un=m,fi(i),f&4&&c!==null&&c.memoizedState.isDehydrated)try{Yl(r.containerInfo)}catch(G){Je(i,i.return,G)}Gd&&(Gd=!1,Fv(i)),Ye=!1;break;case 4:f=xn,xn=Ht,c=ag(),m=un,un=oo(i.stateNode.containerInfo),hi(r,i,a),fi(i),un=m,Ye&&Ja&&(gu=!0),Ye=c,xn=f;break;case 12:hi(r,i,a),fi(i);break;case 31:hi(r,i,a),fi(i),f&4&&(r=i.updateQueue,r!==null&&(i.updateQueue=null,yu(i,r)));break;case 13:hi(r,i,a),fi(i),i.child.flags&8192&&i.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(wu=Kt()),f&4&&(r=i.updateQueue,r!==null&&(i.updateQueue=null,yu(i,r)));break;case 22:m=i.memoizedState!==null,b=c!==null&&c.memoizedState!==null;var x=Ht,A=Xe,j=xn;Ht=x||m,xn=j||m,Xe=A||b,hi(r,i,a),Xe=A,xn=j,Ht=x,fi(i),f&8192&&(r=i.stateNode,r._visibility=m?r._visibility&-2:r._visibility|1,!m||c===null||b||Ht||Xe||(r=b||Xe,a=Ht,c=Xe,Ht=m||Ht,Xe=r,Nr(i,2),Ht=a,Xe=c),!m&&xn||Zd(i,m)),f&4&&(r=i.updateQueue,r!==null&&(a=r.retryQueue,a!==null&&(r.retryQueue=null,yu(i,a))));break;case 19:hi(r,i,a),fi(i),f&4&&(r=i.updateQueue,r!==null&&(i.updateQueue=null,yu(i,r)));break;case 30:f&512&&(Xe||c===null||Qt(c,c.return)),f=ag(),m=Ja,b=(a&335544064)===a,x=i.memoizedProps,Ja=b&&Gn(x.default,x.update)!=="none",hi(r,i,a),fi(i),b&&c!==null&&Ye&&(i.flags|=4),Ja=m,Ye=f;break;case 21:break;case 7:f&512&&(Xe||c===null||Qt(c,c.return)),c&&c.stateNode!==null&&(c.stateNode._fragmentFiber=i);default:hi(r,i,a),fi(i)}}function fi(i){var r=i.flags;if(r&2){try{for(var a,c=i.return;c!==null;){if(Ev(c)){a=c;break}c=c.return}c=null;for(var f=i.return;f!==null;){if(Id(f)){var m=f.stateNode;c===null?c=[m]:c.push(m)}if(Hd(f))break;f=f.return}var b=c;if(a==null)throw Error(s(160));switch(a.tag){case 27:var x=a.stateNode,A=Ud(i);du(i,A,x,b);break;case 5:var j=a.stateNode;a.flags&32&&(cl(j,""),a.flags&=-33);var G=Ud(i);du(i,G,j,b);break;case 3:case 4:var te=a.stateNode.containerInfo,N=Ud(i);Vd(i,N,te,b);break;default:throw Error(s(161))}}catch(Y){Je(i,i.return,Y)}i.flags&=-3}r&4096&&(i.flags&=-4097)}function Fv(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var r=i;Fv(r),r.tag===5&&r.flags&1024&&(r=r.stateNode,$l=!0,r.reset(),$l=!1),i=i.sibling}}function Ml(i,r){if(r.subtreeFlags&9270)for(r=r.child;r!==null;)Uv(r,i),r=r.sibling;else Rv(r)}function Uv(i,r){var a=i.alternate;if(a===null)qd(i,!1);else switch(i.tag){case 3:if(Xd=Cn=!1,Mv(),Ml(r,i),!Cn&&!gu){if(i=bn,i!==null)for(var c=0;c<i.length;c+=3){a=i[c];var f=i[c+1];A3(a,i[c+2]),a=a.ownerDocument.documentElement,a!==null&&a.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+f+")"})}i=r.containerInfo,i=i.nodeType===9?i.documentElement:i.ownerDocument.documentElement,i!==null&&i.style.viewTransitionName===""&&(i.style.viewTransitionName="none",i.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),i.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),Xd=!0}bn=null;break;case 5:Ml(r,i);break;case 4:c=Cn,Cn=!1,Ml(r,i),Cn&&(gu=!0),Cn=c;break;case 22:i.memoizedState===null&&(a.memoizedState!==null?qd(i,!1):Ml(r,i));break;case 30:c=Cn,f=Mv(),Cn=!1,Ml(r,i),Cn&&(i.flags|=4);var m=i.memoizedProps,b=i.stateNode;r=Wn(m,b),b=Wn(a.memoizedProps,b);var x=Gn(m.default,m.update);x==="none"?r=!1:(m=a.memoizedState,a.memoizedState=null,a=i.child,Si=0,r=Wd(i,a,r,b,x,m,!0),Si!==(m===null?0:m.length)&&(i.flags|=32)),(i.flags&4)!==0&&r?(zl(i,i.memoizedProps.onUpdate),bn=f):f!==null&&(f.push.apply(f,bn),bn=f),Cn=(i.flags&32)!==0?!0:c;break;default:Ml(r,i)}}function En(i,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Nv(i,r.alternate,r),r=r.sibling}function Nr(i,r){for(i=i.child;i!==null;){var a=i,c=r;switch(a.tag){case 0:case 11:case 14:case 15:Lr(4,a,a.return),Nr(a,c);break;case 1:Qt(a,a.return);var f=a.stateNode;typeof f.componentWillUnmount=="function"&&xv(a,a.return,f),Nr(a,c);break;case 27:(c&2)!==0&&F3(a.stateNode,a.type,a.memoizedProps);case 5:Qt(a,a.return),a.tag!==5&&a.tag!==27||Qa(a),Nr(a,c);break;case 6:Qa(a);break;case 26:Qt(a,a.return),f=a.stateNode,a.memoizedState!==null||f===null||Xe||f.parentNode.removeChild(f),Nr(a,c);break;case 22:a.memoizedState===null&&Nr(a,c);break;case 30:Qt(a,a.return),Nr(a,c);break;case 7:Qt(a,a.return);default:Nr(a,c)}i=i.sibling}}function hn(i,r,a){for(a=(r.subtreeFlags&8772)!==0?a:a&-2,r=r.child;r!==null;){var c=r.alternate,f=i,m=r,b=m.flags,x=(a&1)!==0;switch(m.tag){case 0:case 11:case 15:hn(f,m,a),Za(4,m);break;case 1:if(hn(f,m,a),c=m,f=c.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(G){Je(c,c.return,G)}if(c=m,f=c.updateQueue,f!==null){var A=c.stateNode;try{var j=f.shared.hiddenCallbacks;if(j!==null)for(f.shared.hiddenCallbacks=null,f=0;f<j.length;f++)u2(j[f],A)}catch(G){Je(c,c.return,G)}}x&&b&64&&wv(m),Sn(m,m.return);break;case 27:(a&2)!==0&&kv(m);case 5:m.tag!==5&&m.tag!==27||Cv(m),hn(f,m,a),x&&c===null&&b&4&&Pd(m),Sn(m,m.return);break;case 6:Cv(m);break;case 26:A=m.stateNode,m.memoizedState!==null||A===null||Ht||B1(oo(A.ownerDocument),m.type,A),hn(f,m,a),x&&c===null&&b&4&&Pd(m),Sn(m,m.return);break;case 12:hn(f,m,a);break;case 31:hn(f,m,a),x&&b&4&&Hv(f,m);break;case 13:hn(f,m,a),x&&b&4&&Iv(f,m);break;case 22:m.memoizedState===null&&hn(f,m,a),Sn(m,m.return);break;case 30:hn(f,m,a),Sn(m,m.return);break;case 7:Sn(m,m.return);default:hn(f,m,a)}r=r.sibling}}function Jd(i,r){var a=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(a=i.memoizedState.cachePool.pool),i=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==a&&(i!=null&&i.refCount++,a!=null&&Ha(a))}function e1(i,r){i=null,r.alternate!==null&&(i=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==i&&(r.refCount++,i!=null&&Ha(i))}function Zi(i,r,a,c){var f=(a&335544064)===a;if(r.subtreeFlags&(f?10262:10256))for(r=r.child;r!==null;)Vv(i,r,a,c),r=r.sibling;else f&&Ov(r)}function Vv(i,r,a,c){var f=(a&335544064)===a;f&&r.alternate===null&&r.return!==null&&r.return.alternate!==null&&_u(r);var m=r.flags;switch(r.tag){case 0:case 11:case 15:Zi(i,r,a,c),m&2048&&Za(9,r);break;case 1:Zi(i,r,a,c);break;case 3:Zi(i,r,a,c),f&&Xd&&(i=i.containerInfo,i=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,i.style.viewTransitionName==="root"&&(i.style.viewTransitionName=""),i=i.ownerDocument.documentElement,i!==null&&i.style.viewTransitionName==="none"&&(i.style.viewTransitionName="")),m&2048&&(m=null,r.alternate!==null&&(m=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==m&&(r.refCount++,m!=null&&Ha(m)));break;case 12:if(m&2048){Zi(i,r,a,c),m=r.stateNode;try{var b=r.memoizedProps,x=b.id,A=b.onPostCommit;typeof A=="function"&&A(x,r.alternate===null?"mount":"update",m.passiveEffectDuration,-0)}catch(j){Je(r,r.return,j)}}else Zi(i,r,a,c);break;case 31:Zi(i,r,a,c);break;case 13:Zi(i,r,a,c);break;case 23:break;case 22:b=r.stateNode,x=r.alternate,r.memoizedState!==null?(f&&x!==null&&x.memoizedState===null&&_u(x),b._visibility&2?Zi(i,r,a,c):eo(i,r)):(f&&x!==null&&x.memoizedState!==null&&_u(r),b._visibility&2?Zi(i,r,a,c):(b._visibility|=2,Al(i,r,a,c,(r.subtreeFlags&10256)!==0||!1))),m&2048&&Jd(x,r);break;case 24:Zi(i,r,a,c),m&2048&&e1(r.alternate,r);break;case 30:f&&(m=r.alternate,m!==null&&(wn(m.child,!0),wn(r.child,!0))),Zi(i,r,a,c);break;default:Zi(i,r,a,c)}}function Al(i,r,a,c,f){for(f=f&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var m=i,b=r,x=a,A=c,j=b.flags;switch(b.tag){case 0:case 11:case 15:Al(m,b,x,A,f),Za(8,b);break;case 23:break;case 22:var G=b.stateNode;b.memoizedState!==null?G._visibility&2?Al(m,b,x,A,f):eo(m,b):(G._visibility|=2,Al(m,b,x,A,f)),f&&j&2048&&Jd(b.alternate,b);break;case 24:Al(m,b,x,A,f),f&&j&2048&&e1(b.alternate,b);break;default:Al(m,b,x,A,f)}r=r.sibling}}function eo(i,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var a=i,c=r,f=c.flags;switch(c.tag){case 22:eo(a,c),f&2048&&Jd(c.alternate,c);break;case 24:eo(a,c),f&2048&&e1(c.alternate,c);break;default:eo(a,c)}r=r.sibling}}var Ds=8192;function Os(i,r,a){if(i.subtreeFlags&Ds)for(i=i.child;i!==null;)qv(i,r,a),i=i.sibling}function qv(i,r,a){switch(i.tag){case 26:Os(i,r,a),i.flags&Ds&&(i.memoizedState!==null?O9(a,un,i.memoizedState,i.memoizedProps):(i=i.stateNode,(r&335544128)===r&&Z3(a,i)));break;case 5:Os(i,r,a),i.flags&Ds&&(i=i.stateNode,(r&335544128)===r&&Z3(a,i));break;case 3:case 4:var c=un;un=oo(i.stateNode.containerInfo),Os(i,r,a),un=c;break;case 22:i.memoizedState===null&&(c=i.alternate,c!==null&&c.memoizedState!==null?(c=Ds,Ds=16777216,Os(i,r,a),Ds=c):Os(i,r,a));break;case 30:if((i.flags&Ds)!==0&&(c=i.memoizedProps.name,c!=null&&c!=="auto")){var f=i.stateNode;f.paired=null,Li===null&&(Li=new Map),Li.set(c,f)}Os(i,r,a);break;default:Os(i,r,a)}}function $v(i){var r=i.alternate;if(r!==null&&(i=r.child,i!==null)){r.child=null;do r=i.sibling,i.sibling=null,i=r;while(i!==null)}}function to(i){var r=i.deletions;if((i.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var c=r[a];It=c,Kv(c,i)}$v(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Yv(i),i=i.sibling}function Yv(i){switch(i.tag){case 0:case 11:case 15:to(i),i.flags&2048&&Lr(9,i,i.return);break;case 3:to(i);break;case 12:to(i);break;case 22:var r=i.stateNode;i.memoizedState!==null&&r._visibility&2&&(i.return===null||i.return.tag!==13)?(r._visibility&=-3,Su(i)):to(i);break;default:to(i)}}function Su(i){var r=i.deletions;if((i.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var c=r[a];It=c,Kv(c,i)}$v(i)}for(i=i.child;i!==null;){switch(r=i,r.tag){case 0:case 11:case 15:Lr(8,r,r.return),Su(r);break;case 22:a=r.stateNode,a._visibility&2&&(a._visibility&=-3,Su(r));break;default:Su(r)}i=i.sibling}}function Kv(i,r){for(;It!==null;){var a=It;switch(a.tag){case 0:case 11:case 15:Lr(8,a,r);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var c=a.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:Ha(a.memoizedState.cache)}if(c=a.child,c!==null)c.return=a,It=c;else e:for(a=i;It!==null;){c=It;var f=c.sibling,m=c.return;if(Bv(c),c===a){It=null;break e}if(f!==null){f.return=m,It=f;break e}It=m}}}var kx={getCacheForType:function(i){var r=Gt(xt),a=r.data.get(i);return a===void 0&&(a=i(),r.data.set(i,a)),a},cacheSignal:function(){return Gt(xt).controller.signal}},Tx=typeof WeakMap=="function"?WeakMap:Map,Ge=0,rt=null,Fe=null,Ve=0,Qe=0,Ni=null,zr=!1,Dl=!1,t1=!1,rr=0,_t=0,Br=0,Rs=0,bu=0,zi=0,Ol=0,io=null,wi=null,i1=!1,wu=0,Wv=0,xu=1/0,Cu=null,jr=null,ft=0,fn=null,Ls=null,kn=0,n1=0,r1=null,Gv=null,Rl=null,Ll=null,Nl=null,no=0,Eu=null;function Bi(){return(Ge&2)!==0&&Ve!==0?Ve&-Ve:fe.T!==null?p1():Q_()}function Xv(){if(zi===0)if((Ve&536870912)===0||je){var i=yc;yc<<=1,(yc&3932160)===0&&(yc=262144),zi=i}else zi=536870912;return i=Xt.current,i!==null&&(i.flags|=32),zi}function zl(i,r){if(r!=null){var a=i.stateNode,c=a.ref;c===null&&(c=a.ref=D3(Wn(i.memoizedProps,a))),Ll===null&&(Ll=[]),Ll.push(r.bind(null,c))}}function xi(i,r,a){(i===rt&&(Qe===2||Qe===9)||i.cancelPendingCommit!==null)&&(Bl(i,0),Hr(i,Ve,zi,!1)),Ca(i,a),((Ge&2)===0||i!==rt)&&(i===rt&&((Ge&2)===0&&(Rs|=a),_t===4&&Hr(i,Ve,zi,!1)),Tn(i))}function Zv(i,r,a){if((Ge&6)!==0)throw Error(s(327));var c=!a&&(r&127)===0&&(r&i.expiredLanes)===0||xa(i,r),f=c?Dx(i,r):l1(i,r,!0),m=c;do{if(f===0){Dl&&!c&&Hr(i,r,0,!1);break}else{if(a=i.current.alternate,m&&!Mx(a)){f=l1(i,r,!1),m=!1;continue}if(f===2){if(m=r,i.errorRecoveryDisabledLanes&m)var b=0;else b=i.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){r=b;e:{var x=i;f=io;var A=x.current.memoizedState.isDehydrated;if(A&&(Bl(x,b).flags|=256),b=l1(x,b,!1),b!==2&&b!==6){if(t1&&!A){x.errorRecoveryDisabledLanes|=m,Rs|=m,f=4;break e}m=wi,wi=f,m!==null&&(wi===null?wi=m:wi.push.apply(wi,m))}f=b}if(m=!1,f!==2)continue}}if(f===1){Bl(i,0),Hr(i,r,0,!0);break}e:{switch(c=i,m=f,m){case 0:case 1:throw Error(s(345));case 4:if((r&4194048)!==r&&(r&62914560)!==r)break;case 6:Hr(c,r,zi,!zr);break e;case 2:wi=null;break;case 3:case 5:break;default:throw Error(s(329))}if((r&62914560)===r&&(f=wu+300-Kt(),10<f)){if(Hr(c,r,zi,!zr),bc(c,0,!0)!==0)break e;kn=r,c.timeoutHandle=E1(Qv.bind(null,c,a,wi,Cu,i1,r,zi,Rs,Ol,zr,m,"Throttled",-0,0),f);break e}Qv(c,a,wi,Cu,i1,r,zi,Rs,Ol,zr,m,null,-0,0)}}break}while(!0);Tn(i)}function Qv(i,r,a,c,f,m,b,x,A,j,G,te,N,Y){i.timeoutHandle=-1;var he=r.subtreeFlags,ye=(m&335544064)===m;if(te=null,(ye||he&8192||(he&16785408)===16785408)&&(te={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:gn},Li=null,qv(r,m,te),ye&&(he=te,ye=i.containerInfo,ye=(ye.nodeType===9?ye:ye.ownerDocument).__reactViewTransition,ye!=null&&(he.count++,he.waitingForViewTransition=!0,he=ho.bind(he),ye.finished.then(he,he))),he=(m&62914560)===m?wu-Kt():(m&4194048)===m?Wv-Kt():0,he=R9(te,he),he!==null)){kn=m,i.cancelPendingCommit=he(l3.bind(null,i,r,m,a,c,f,b,x,A,j,G,te,null,N,Y)),Hr(i,m,b,!j);return}l3(i,r,m,a,c,f,b,x,A,j,G,te)}function Mx(i){for(var r=i;;){var a=r.tag;if((a===0||a===11||a===15)&&r.flags&16384&&(a=r.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var c=0;c<a.length;c++){var f=a[c],m=f.getSnapshot;f=f.value;try{if(!Oi(m(),f))return!1}catch{return!1}}if(a=r.child,r.subtreeFlags&16384&&a!==null)a.return=r,r=a;else{if(r===i)break;for(;r.sibling===null;){if(r.return===null||r.return===i)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Hr(i,r,a,c){r=K_(i,r),r&=~bu,r&=~Rs,i.suspendedLanes|=r,i.pingedLanes&=~r,c&&(i.warmLanes|=r),c=i.expirationTimes;for(var f=r;0<f;){var m=31-Ai(f),b=1<<m;c[m]=-1,f&=~b}a!==0&&G_(i,a,r)}function ku(){return(Ge&6)===0?(ro(0),!1):!0}function s1(){if(Fe!==null){if(Qe===0)var i=Fe.return;else i=Fe,Qn=Ss=null,dd(i),wl=null,Fa=0,i=Fe;for(;i!==null;)bv(i.alternate,i),i=i.return;Fe=null}}function Bl(i,r){var a=i.timeoutHandle;return a!==-1&&(i.timeoutHandle=-1,Qx(a)),a=i.cancelPendingCommit,a!==null&&(i.cancelPendingCommit=null,a()),kn=0,s1(),rt=i,Fe=a=Xn(i.current,null),Ve=r,Qe=0,Ni=null,zr=!1,Dl=xa(i,r),t1=!1,Ol=zi=bu=Rs=Br=_t=0,wi=io=null,i1=!1,rr=K_(i,r),Nc(),a}function Jv(i,r){Le=null,fe.H=su,r===bl||r===$c?(r=l2(),Qe=3):r===ed?(r=l2(),Qe=4):Qe=r===Md?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Ni=r,Fe===null&&(_t=1,lu(i,Ki(r,i.current)))}function e3(){var i=Xt.current;return i===null?!0:(Ve&4194048)===Ve?si===null:(Ve&62914560)===Ve||(Ve&536870912)!==0?i===si:!1}function t3(){var i=fe.H;return fe.H=su,i===null?su:i}function i3(){var i=fe.A;return fe.A=kx,i}function Tu(){_t=4,zr||(Ve&4194048)!==Ve&&Xt.current!==null||(Dl=!0),(Br&134217727)===0&&(Rs&134217727)===0||rt===null||Hr(rt,Ve,zi,!1)}function l1(i,r,a){var c=Ge;Ge|=2;var f=t3(),m=i3();(rt!==i||Ve!==r)&&(Cu=null,Bl(i,r)),r=!1;var b=_t;e:do try{if(Qe!==0&&Fe!==null){var x=Fe,A=Ni;switch(Qe){case 8:s1(),b=6;break e;case 3:case 2:case 9:case 6:Xt.current===null&&(r=!0);var j=Qe;if(Qe=0,Ni=null,jl(i,x,A,j),a&&Dl){b=0;break e}break;default:j=Qe,Qe=0,Ni=null,jl(i,x,A,j)}}Ax(),b=_t;break}catch(G){Jv(i,G)}while(!0);return r&&i.shellSuspendCounter++,Qn=Ss=null,Ge=c,fe.H=f,fe.A=m,Fe===null&&(rt=null,Ve=0,Nc()),b}function Ax(){for(;Fe!==null;)n3(Fe)}function Dx(i,r){var a=Ge;Ge|=2;var c=t3(),f=i3();rt!==i||Ve!==r?(Cu=null,xu=Kt()+500,Bl(i,r)):Dl=xa(i,r);e:do try{if(Qe!==0&&Fe!==null){r=Fe;var m=Ni;t:switch(Qe){case 1:Qe=0,Ni=null,jl(i,r,m,1);break;case 2:case 9:if(r2(m)){Qe=0,Ni=null,r3(r);break}r=function(){Qe!==2&&Qe!==9||rt!==i||(Qe=7),Tn(i)},m.then(r,r);break e;case 3:Qe=7;break e;case 4:Qe=5;break e;case 7:r2(m)?(Qe=0,Ni=null,r3(r)):(Qe=0,Ni=null,jl(i,r,m,7));break;case 5:var b=null;switch(Fe.tag){case 26:b=Fe.memoizedState;case 5:case 27:var x=Fe;if(b?G3(b):x.stateNode.complete){Qe=0,Ni=null;var A=x.sibling;if(A!==null)Fe=A;else{var j=x.return;j!==null?(Fe=j,Mu(j)):Fe=null}break t}}Qe=0,Ni=null,jl(i,r,m,5);break;case 6:Qe=0,Ni=null,jl(i,r,m,6);break;case 8:s1(),_t=6;break e;default:throw Error(s(462))}}Ox();break}catch(G){Jv(i,G)}while(!0);return Qn=Ss=null,fe.H=c,fe.A=f,Ge=a,Fe!==null?0:(rt=null,Ve=0,Nc(),_t)}function Ox(){for(;Fe!==null&&!hs();)n3(Fe)}function n3(i){var r=yv(i.alternate,i,rr);i.memoizedProps=i.pendingProps,r===null?Mu(i):Fe=r}function r3(i){var r=i,a=r.alternate;switch(r.tag){case 15:case 0:r=fv(a,r,r.pendingProps,r.type,void 0,Ve);break;case 11:r=fv(a,r,r.pendingProps,r.type.render,r.ref,Ve);break;case 5:dd(r);var c=r;c===jt&&(je?(Pc(c),c.tag===5&&c.stateNode!=null&&(at=c.stateNode)):(Pc(c),je=!0));default:bv(a,r),r=Fe=Kg(r,rr),r=yv(a,r,rr)}i.memoizedProps=i.pendingProps,r===null?Mu(i):Fe=r}function jl(i,r,a,c){Qn=Ss=null,dd(r),wl=null,Fa=0;var f=r.return;try{if(vx(i,f,r,a,Ve)){_t=1,lu(i,Ki(a,i.current)),Fe=null;return}}catch(m){if(f!==null)throw Fe=f,m;_t=1,lu(i,Ki(a,i.current)),Fe=null;return}r.flags&32768?(je||c===1?i=!0:Dl||(Ve&536870912)!==0?i=!1:(zr=i=!0,(c===2||c===9||c===3||c===6)&&(c=Xt.current,c!==null&&c.tag===13&&(c.flags|=16384))),s3(r,i)):Mu(r)}function Mu(i){var r=i;do{if((r.flags&32768)!==0){s3(r,zr);return}i=r.return;var a=wx(r.alternate,r,rr);if(a!==null){Fe=a;return}if(r=r.sibling,r!==null){Fe=r;return}Fe=r=i}while(r!==null);_t===0&&(_t=5)}function s3(i,r){do{var a=xx(i.alternate,i);if(a!==null){a.flags&=32767,Fe=a;return}if(a=i.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!r&&(i=i.sibling,i!==null)){Fe=i;return}Fe=i=a}while(i!==null);_t=6,Fe=null}function l3(i,r,a,c,f,m,b,x,A,j,G,te){i.cancelPendingCommit=null;do Au();while(ft!==0);if((Ge&6)!==0)throw Error(s(327));if(r!==null){if(r===i.current)throw Error(s(177));i===rt&&(Fe=rt=null,Ve=0),Ls=r,fn=i,kn=a,r1=f,Gv=c,Rx(i,r,a,b,x,A,te)}}function Rx(i,r,a,c,f,m,b){var x=r.lanes|r.childLanes;if(n1=x,x|=Ff,rw(i,a,x,c,f,m),Ll=null,(a&335544064)===a?(Nl=lx(i),c=10262):(Nl=null,c=10256),(r.subtreeFlags&c)!==0||(r.flags&c)!==0?(i.callbackNode=null,i.callbackPriority=0,Hx(gc,function(){return u1(),null})):(i.callbackNode=null,i.callbackPriority=0),pu=!1,c=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||c){c=fe.T,fe.T=null,f=Se.p,Se.p=2,m=Ge,Ge|=4;try{Cx(i,r,a)}finally{Ge=m,Se.p=f,fe.T=c}}ft=1,pu?Rl=r9(b,i.containerInfo,Nl,a1,o1,Nx,c1,u1,Lx):(a1(),o1(),c1())}function Lx(i){if(ft!==0){var r=fn.onRecoverableError;r(i,{componentStack:null})}}function Nx(){ft===3&&(ft=0,Uv(Ls,fn),ft=4)}function a1(){if(ft===1){ft=0;var i=fn,r=Ls,a=kn,c=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||c){c=fe.T,fe.T=null;var f=Se.p;Se.p=2;var m=Ge;Ge|=4;try{Ja=gu=!1,Pv(r,i,a),a=w1;var b=jg(i.containerInfo),x=a.focusedElem,A=a.selectionRange;if(b!==x&&x&&x.ownerDocument&&Bg(x.ownerDocument.documentElement,x)){if(A!==null&&Bf(x)){var j=A.start,G=A.end;if(G===void 0&&(G=j),"selectionStart"in x)x.selectionStart=j,x.selectionEnd=Math.min(G,x.value.length);else{var te=x.ownerDocument||document,N=te&&te.defaultView||window;if(N.getSelection){var Y=N.getSelection(),he=x.textContent.length,ye=Math.min(A.start,he),Ne=A.end===void 0?ye:Math.min(A.end,he);!Y.extend&&ye>Ne&&(b=Ne,Ne=ye,ye=b);var z=zg(x,ye),L=zg(x,Ne);if(z&&L&&(Y.rangeCount!==1||Y.anchorNode!==z.node||Y.anchorOffset!==z.offset||Y.focusNode!==L.node||Y.focusOffset!==L.offset)){var F=te.createRange();F.setStart(z.node,z.offset),Y.removeAllRanges(),ye>Ne?(Y.addRange(F),Y.extend(L.node,L.offset)):(F.setEnd(L.node,L.offset),Y.addRange(F))}}}}for(te=[],Y=x;Y=Y.parentNode;)Y.nodeType===1&&te.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<te.length;x++){var ee=te[x];ee.element.scrollLeft=ee.left,ee.element.scrollTop=ee.top}}$l=!!b1,w1=b1=null}finally{Ge=m,Se.p=f,fe.T=c}}i.current=r,ft=2}}function o1(){if(ft===2){ft=0;var i=fn,r=Ls,a=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||a){a=fe.T,fe.T=null;var c=Se.p;Se.p=2;var f=Ge;Ge|=4;try{Nv(i,r.alternate,r)}finally{Ge=f,Se.p=c,fe.T=a}}ft=3}}function c1(){if(ft===4||ft===3){ft=0;var i=Rl;Rl=null,_c();var r=fn,a=Ls,c=kn,f=Gv,m=(c&335544064)===c?10262:10256;if((a.subtreeFlags&m)!==0||(a.flags&m)!==0?ft=5:(ft=0,Ls=fn=null,a3(r,r.pendingLanes)),m=r.pendingLanes,m===0&&(jr=null),vf(c),a=a.stateNode,Mi&&typeof Mi.onCommitFiberRoot=="function")try{Mi.onCommitFiberRoot(wa,a,void 0,(a.current.flags&128)===128)}catch{}if(f!==null){a=fe.T,m=Se.p,Se.p=2,fe.T=null;try{for(var b=r.onRecoverableError,x=0;x<f.length;x++){var A=f[x];b(A.value,{componentStack:A.stack})}}finally{fe.T=a,Se.p=m}}if(f=Ll,b=Nl,Nl=null,f!==null&&(Ll=null,b===null&&(b=[]),i!==null))for(A=0;A<f.length;A++)a=(0,f[A])(b),a!==void 0&&i.finished.finally(a);(kn&3)!==0&&Au(),Tn(r),m=r.pendingLanes,(c&261930)!==0&&(m&42)!==0?r===Eu?no++:(no=0,Eu=r):(no=0,Eu=null),ro(0)}}function a3(i,r){(i.pooledCacheLanes&=r)===0&&(r=i.pooledCache,r!=null&&(i.pooledCache=null,Ha(r)))}function Au(){return Rl!==null&&(Rl.skipTransition(),Rl=null),a1(),o1(),c1(),u1()}function u1(){if(ft!==5)return!1;var i=fn,r=n1;n1=0;var a=vf(kn),c=fe.T,f=Se.p;try{Se.p=32>a?32:a,fe.T=null,a=r1,r1=null;var m=fn,b=kn;if(ft=0,Ls=fn=null,kn=0,(Ge&6)!==0)throw Error(s(331));var x=Ge;if(Ge|=4,Yv(m.current),Vv(m,m.current,b,a),Ge=x,ro(0,!1),Mi&&typeof Mi.onPostCommitFiberRoot=="function")try{Mi.onPostCommitFiberRoot(wa,m)}catch{}return!0}finally{Se.p=f,fe.T=c,a3(i,r)}}function o3(i,r,a){r=Ki(a,r),r=Td(i.stateNode,r,2),i=Ar(i,r,2),i!==null&&(Ca(i,2),Tn(i))}function Je(i,r,a){if(i.tag===3)o3(i,i,a);else for(;r!==null;){if(r.tag===3){o3(r,i,a);break}else if(r.tag===1){var c=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(jr===null||!jr.has(c))){i=Ki(a,i),a=rv(2),c=Ar(r,a,2),c!==null&&(sv(a,c,r,i),Ca(c,2),Tn(c));break}}r=r.return}}function h1(i,r,a){var c=i.pingCache;if(c===null){c=i.pingCache=new Tx;var f=new Set;c.set(r,f)}else f=c.get(r),f===void 0&&(f=new Set,c.set(r,f));f.has(a)||(t1=!0,f.add(a),i=zx.bind(null,i,r,a),r.then(i,i))}function zx(i,r,a){var c=i.pingCache;c!==null&&c.delete(r),i.pingedLanes|=i.suspendedLanes&a,i.warmLanes&=~a,rt===i&&(Ve&a)===a&&((_t===4||_t===3&&(Ve&62914560)===Ve&&300>Kt()-wu)&&(Ge&2)===0?Bl(i,0):bu|=a,Ol===Ve&&(Ol=0)),Tn(i)}function c3(i,r){r===0&&(r=W_()),i=gs(i,r),i!==null&&(Ca(i,r),Tn(i))}function Bx(i){var r=i.memoizedState,a=0;r!==null&&(a=r.retryLane),c3(i,a)}function jx(i,r){var a=0;switch(i.tag){case 31:case 13:var c=i.stateNode,f=i.memoizedState;f!==null&&(a=f.retryLane);break;case 19:c=i.stateNode;break;case 22:c=i.stateNode._retryCache;break;default:throw Error(s(314))}c!==null&&c.delete(r),c3(i,a)}function Hx(i,r){return Un(i,r)}var Hl=null,Il=null,f1=!1,Du=!1,d1=!1,Ir=0;function Tn(i){i!==Il&&i.next===null&&(Il===null?Hl=Il=i:Il=Il.next=i),Du=!0,f1||(f1=!0,Px())}function ro(i,r){if(!d1&&Du){d1=!0;do for(var a=!1,c=Hl;c!==null;){if(i!==0){var f=c.pendingLanes;if(f===0)var m=0;else{var b=c.suspendedLanes,x=c.pingedLanes;m=(1<<31-Ai(42|i)+1)-1,m&=f&~(b&~x),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(a=!0,d3(c,m))}else m=Ve,m=bc(c,c===rt?m:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(m&3)===0||xa(c,m)||(a=!0,d3(c,m));c=c.next}while(a);d1=!1}}function Ix(){u3()}function u3(){Du=f1=!1;var i=0;Ir!==0&&Zx()&&(i=Ir);for(var r=Kt(),a=null,c=Hl;c!==null;){var f=c.next,m=h3(c,r);m===0?(c.next=null,a===null?Hl=f:a.next=f,f===null&&(Il=a)):(a=c,(i!==0||(m&3)!==0)&&(Du=!0)),c=f}ft!==0&&ft!==5||ro(i),Ir!==0&&(Ir=0)}function h3(i,r){for(var a=i.suspendedLanes,c=i.pingedLanes,f=i.expirationTimes,m=i.pendingLanes&-62914561;0<m;){var b=31-Ai(m),x=1<<b,A=f[b];A===-1?((x&a)===0||(x&c)!==0)&&(f[b]=nw(x,r)):A<=r&&(i.expiredLanes|=x),m&=~x}if(r=rt,a=Ve,a=bc(i,i===r?a:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),c=i.callbackNode,a===0||i===r&&(Qe===2||Qe===9)||i.cancelPendingCommit!==null)return c!==null&&c!==null&&Vn(c),i.callbackNode=null,i.callbackPriority=0;if((a&3)===0||xa(i,a)){if(r=a&-a,r===i.callbackPriority)return r;switch(c!==null&&Vn(c),vf(a)){case 2:case 8:a=qi;break;case 32:a=gc;break;case 268435456:a=Y_;break;default:a=gc}return c=f3.bind(null,i),a=Un(a,c),i.callbackPriority=r,i.callbackNode=a,r}return c!==null&&c!==null&&Vn(c),i.callbackPriority=2,i.callbackNode=null,2}function f3(i,r){if(ft!==0&&ft!==5)return i.callbackNode=null,i.callbackPriority=0,null;var a=i.callbackNode;if(Au()&&i.callbackNode!==a)return null;var c=Ve;return c=bc(i,i===rt?c:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),c===0?null:(Zv(i,c,r),h3(i,Kt()),i.callbackNode!=null&&i.callbackNode===a?f3.bind(null,i):null)}function d3(i,r){if(Au())return null;Zv(i,r,!0)}function Px(){Jx(function(){(Ge&6)!==0?Un(qn,Ix):u3()})}function p1(){if(Ir===0){var i=xs;i===0&&(i=vc,vc<<=1,(vc&261888)===0&&(vc=256)),Ir=i}return Ir}function p3(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:kc(i)}function Fx(i,r,a,c,f){if(r==="submit"&&a&&a.stateNode===f){var m=p3((f[vi]||null).action),b=c.submitter;b&&(r=(r=b[vi]||null)?p3(r.formAction):b.getAttribute("formAction"),r!==null&&(m=r,b=null));var x=new Dc("action","action",null,c,f);i.push({event:x,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Ir!==0){var A=new FormData(f,b);wd(a,{pending:!0,data:A,method:f.method,action:m},null,A)}}else typeof m=="function"&&(x.preventDefault(),A=new FormData(f,b),wd(a,{pending:!0,data:A,method:f.method,action:m},m,A))},currentTarget:f}]})}}for(var m1=0;m1<Pf.length;m1++){var _1=Pf[m1],Ux=_1.toLowerCase(),Vx=_1[0].toUpperCase()+_1.slice(1);on(Ux,"on"+Vx)}on(Pg,"onAnimationEnd"),on(Fg,"onAnimationIteration"),on(Ug,"onAnimationStart"),on("dblclick","onDoubleClick"),on("focusin","onFocus"),on("focusout","onBlur"),on(Qw,"onTransitionRun"),on(Jw,"onTransitionStart"),on(ex,"onTransitionCancel"),on(Vg,"onTransitionEnd"),al("onMouseEnter",["mouseout","mouseover"]),al("onMouseLeave",["mouseout","mouseover"]),al("onPointerEnter",["pointerout","pointerover"]),al("onPointerLeave",["pointerout","pointerover"]),ps("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ps("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ps("onBeforeInput",["compositionend","keypress","textInput","paste"]),ps("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ps("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ps("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var so="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),qx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(so));function m3(i,r){r=(r&4)!==0;for(var a=0;a<i.length;a++){var c=i[a],f=c.event;c=c.listeners;e:{var m=void 0;if(r)for(var b=c.length-1;0<=b;b--){var x=c[b],A=x.instance,j=x.currentTarget;if(x=x.listener,A!==m&&f.isPropagationStopped())break e;m=x,f.currentTarget=j;try{m(f)}catch(G){Lc(G)}f.currentTarget=null,m=A}else for(b=0;b<c.length;b++){if(x=c[b],A=x.instance,j=x.currentTarget,x=x.listener,A!==m&&f.isPropagationStopped())break e;m=x,f.currentTarget=j;try{m(f)}catch(G){Lc(G)}f.currentTarget=null,m=A}}}}function Ue(i,r){var a=r[eg];a===void 0&&(a=r[eg]=new Set);var c=i+"__bubble";a.has(c)||(_3(r,i,2,!1),a.add(c))}function g1(i,r,a){var c=0;r&&(c|=4),_3(a,i,c,r)}var Ou="_reactListening"+Math.random().toString(36).slice(2);function v1(i){if(!i[Ou]){i[Ou]=!0,ng.forEach(function(a){a!=="selectionchange"&&(qx.has(a)||g1(a,!1,i),g1(a,!0,i))});var r=i.nodeType===9?i:i.ownerDocument;r===null||r[Ou]||(r[Ou]=!0,g1("selectionchange",!1,r))}}function _3(i,r,a,c){switch(sy(r)){case 2:var f=B9;break;case 8:f=j9;break;default:f=H1}a=f.bind(null,r,a,i),f=void 0,!kf||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(f=!0),c?f!==void 0?i.addEventListener(r,a,{capture:!0,passive:f}):i.addEventListener(r,a,!0):f!==void 0?i.addEventListener(r,a,{passive:f}):i.addEventListener(r,a,!1)}function y1(i,r,a,c,f){var m=c;if((r&1)===0&&(r&2)===0&&c!==null)e:for(;;){if(c===null)return;var b=c.tag;if(b===3||b===4){var x=c.stateNode.containerInfo;if(x===f)break;if(b===4)for(b=c.return;b!==null;){var A=b.tag;if((A===3||A===4)&&b.stateNode.containerInfo===f)return;b=b.return}for(;x!==null;){if(b=ds(x),b===null)return;if(A=b.tag,A===5||A===6||A===26||A===27){c=m=b;continue e}x=x.parentNode}}c=c.return}_g(function(){var j=m,G=Cf(a),te=[];e:{var N=qg.get(i);if(N!==void 0){var Y=Dc,he=i;switch(i){case"keypress":if(Mc(a)===0)break e;case"keydown":case"keyup":Y=Mw;break;case"focusin":he="focus",Y=Df;break;case"focusout":he="blur",Y=Df;break;case"beforeblur":case"afterblur":Y=Df;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Y=yg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=_w;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=Lw;break;case Pg:case Fg:case Ug:Y=yw;break;case Vg:Y=zw;break;case"scroll":case"scrollend":Y=pw;break;case"wheel":Y=jw;break;case"copy":case"cut":case"paste":Y=bw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=bg;break;case"submit":Y=Ow;break;case"toggle":case"beforetoggle":Y=Iw}var ye=(r&4)!==0,Ne=!ye&&(i==="scroll"||i==="scrollend"),z=ye?N!==null?N+"Capture":null:N;ye=[];for(var L=j,F;L!==null;){var ee=L;if(F=ee.stateNode,ee=ee.tag,ee!==5&&ee!==26&&ee!==27||F===null||z===null||(ee=Ta(L,z),ee!=null&&ye.push(lo(L,ee,F))),Ne)break;L=L.return}0<ye.length&&(N=new Y(N,he,null,a,G),te.push({event:N,listeners:ye}))}}if((r&7)===0){e:{if(Y=i==="mouseover"||i==="pointerover",N=i==="mouseout"||i==="pointerout",Y&&a!==xf&&(he=a.relatedTarget||a.fromElement)&&(ds(he)||he[rl]))break e;(N||Y)&&(he=G.window===G?G:(Y=G.ownerDocument)?Y.defaultView||Y.parentWindow:window,N?(Y=a.relatedTarget||a.toElement,N=j,Y=Y?ds(Y):null,Y!==null&&(Ne=o(Y),ye=Y.tag,Y!==Ne||ye!==5&&ye!==27&&ye!==6)&&(Y=null)):(N=null,Y=j),N!==Y&&(ye=yg,ee="onMouseLeave",z="onMouseEnter",L="mouse",(i==="pointerout"||i==="pointerover")&&(ye=bg,ee="onPointerLeave",z="onPointerEnter",L="pointer"),Ne=N==null?he:ka(N),F=Y==null?he:ka(Y),he=new ye(ee,L+"leave",N,a,G),he.target=Ne,he.relatedTarget=F,ee=null,ds(G)===j&&(ye=new ye(z,L+"enter",Y,a,G),ye.target=F,ye.relatedTarget=Ne,ee=ye),Ne=ee,ye=N&&Y?R(N,Y,$x):null,N!==null&&g3(te,he,N,ye,!1),Y!==null&&Ne!==null&&g3(te,Ne,Y,ye,!0)))}e:{if(N=j?ka(j):window,Y=N.nodeName&&N.nodeName.toLowerCase(),Y==="select"||Y==="input"&&N.type==="file")var _e=Ag;else if(Tg(N))if(Dg)_e=Gw;else{_e=Kw;var qe=Yw}else Y=N.nodeName,!Y||Y.toLowerCase()!=="input"||N.type!=="checkbox"&&N.type!=="radio"?j&&wf(j.elementType)&&(_e=Ag):_e=Ww;if(_e&&(_e=_e(i,j))){Mg(te,_e,a,G);break e}qe&&qe(i,N,j)}switch(qe=j?ka(j):window,i){case"focusin":(Tg(qe)||qe.contentEditable==="true")&&(dl=qe,jf=j,za=null);break;case"focusout":za=jf=dl=null;break;case"mousedown":Hf=!0;break;case"contextmenu":case"mouseup":case"dragend":Hf=!1,Hg(te,a,G);break;case"selectionchange":if(Zw)break;case"keydown":case"keyup":Hg(te,a,G)}var be;if(Rf)e:{switch(i){case"compositionstart":var Te="onCompositionStart";break e;case"compositionend":Te="onCompositionEnd";break e;case"compositionupdate":Te="onCompositionUpdate";break e}Te=void 0}else fl?Eg(i,a)&&(Te="onCompositionEnd"):i==="keydown"&&a.keyCode===229&&(Te="onCompositionStart");Te&&(wg&&a.locale!=="ko"&&(fl||Te!=="onCompositionStart"?Te==="onCompositionEnd"&&fl&&(be=gg()):(Sr=G,Tf="value"in Sr?Sr.value:Sr.textContent,fl=!0)),qe=Ru(j,Te),0<qe.length&&(Te=new Sg(Te,i,null,a,G),te.push({event:Te,listeners:qe}),be?Te.data=be:(be=kg(a),be!==null&&(Te.data=be)))),(be=Fw?Uw(i,a):Vw(i,a))&&(Te=Ru(j,"onBeforeInput"),0<Te.length&&(qe=new Sg("onBeforeInput","beforeinput",null,a,G),te.push({event:qe,listeners:Te}),qe.data=be)),Fx(te,i,j,a,G)}m3(te,r)})}function lo(i,r,a){return{instance:i,listener:r,currentTarget:a}}function Ru(i,r){for(var a=r+"Capture",c=[];i!==null;){var f=i,m=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||m===null||(f=Ta(i,a),f!=null&&c.unshift(lo(i,f,m)),f=Ta(i,r),f!=null&&c.push(lo(i,f,m))),i.tag===3)return c;i=i.return}return[]}function $x(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function g3(i,r,a,c,f){for(var m=r._reactName,b=[];a!==null&&a!==c;){var x=a,A=x.alternate,j=x.stateNode;if(x=x.tag,A!==null&&A===c)break;x!==5&&x!==26&&x!==27||j===null||(A=j,f?(j=Ta(a,m),j!=null&&b.unshift(lo(a,j,A))):f||(j=Ta(a,m),j!=null&&b.push(lo(a,j,A)))),a=a.return}b.length!==0&&i.push({event:r,listeners:b})}var Yx=/\r\n?/g,Kx=/\u0000|\uFFFD/g;function v3(i){return(typeof i=="string"?i:""+i).replace(Yx,`
10
- `).replace(Kx,"")}function y3(i,r){return r=v3(r),v3(i)===r}function et(i,r,a,c,f,m){switch(a){case"children":if(typeof c=="string")r==="body"||r==="textarea"&&c===""||cl(i,c);else if(typeof c=="number"||typeof c=="bigint")r!=="body"&&cl(i,""+c);else return;break;case"className":Ec(i,"class",c);break;case"tabIndex":Ec(i,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Ec(i,a,c);break;case"style":pg(i,c,m);return;case"data":if(r!=="object"){Ec(i,"data",c);break}case"src":case"href":if(c===""&&(r!=="a"||a!=="href")){i.removeAttribute(a);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){i.removeAttribute(a);break}c=kc(c),i.setAttribute(a,c);break;case"action":case"formAction":if(typeof c=="function"){i.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof m=="function"&&(a==="formAction"?(r!=="input"&&et(i,r,"name",f.name,f,null),et(i,r,"formEncType",f.formEncType,f,null),et(i,r,"formMethod",f.formMethod,f,null),et(i,r,"formTarget",f.formTarget,f,null)):(et(i,r,"encType",f.encType,f,null),et(i,r,"method",f.method,f,null),et(i,r,"target",f.target,f,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){i.removeAttribute(a);break}c=kc(c),i.setAttribute(a,c);break;case"onClick":c!=null&&(i.onclick=gn);return;case"onScroll":c!=null&&Ue("scroll",i);return;case"onScrollEnd":c!=null&&Ue("scrollend",i);return;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(s(61));if(a=c.__html,a!=null){if(f.children!=null)throw Error(s(60));m?.__html!==a&&(i.innerHTML=a)}}break;case"multiple":i.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":i.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){i.removeAttribute("xlink:href");break}a=kc(c),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?i.setAttribute(a,c):i.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?i.setAttribute(a,""):i.removeAttribute(a);break;case"capture":case"download":c===!0?i.setAttribute(a,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?i.setAttribute(a,c):i.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?i.setAttribute(a,c):i.removeAttribute(a);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?i.removeAttribute(a):i.setAttribute(a,c);break;case"popover":Ue("beforetoggle",i),Ue("toggle",i),Cc(i,"popover",c);break;case"xlinkActuate":Yn(i,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Yn(i,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Yn(i,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Yn(i,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Yn(i,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Yn(i,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Yn(i,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Yn(i,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Yn(i,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Cc(i,"is",c);break;case"innerText":case"textContent":return;default:if(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")a=fw.get(a)||a,Cc(i,a,c);else return}Ye=!0}function S1(i,r,a,c,f,m){switch(a){case"style":pg(i,c,m);return;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(s(61));if(a=c.__html,a!=null){if(f.children!=null)throw Error(s(60));m?.__html!==a&&(i.innerHTML=a)}}break;case"children":if(typeof c=="string")cl(i,c);else if(typeof c=="number"||typeof c=="bigint")cl(i,""+c);else return;break;case"onScroll":c!=null&&Ue("scroll",i);return;case"onScrollEnd":c!=null&&Ue("scrollend",i);return;case"onClick":c!=null&&(i.onclick=gn);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!rg.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(f=a.endsWith("Capture"),m=a.slice(2,f?a.length-7:void 0),r=i[vi]||null,r=r!=null?r[a]:null,typeof r=="function"&&i.removeEventListener(m,r,f),typeof c=="function")){typeof r!="function"&&r!==null&&(a in i?i[a]=null:i.hasAttribute(a)&&i.removeAttribute(a)),i.addEventListener(m,c,f);break e}Ye=!0,a in i?i[a]=c:c===!0?i.setAttribute(a,""):Cc(i,a,c)}return}Ye=!0}function Jt(i,r,a){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ue("error",i),Ue("load",i);var c=!1,f=!1,m;for(m in a)if(a.hasOwnProperty(m)){var b=a[m];if(b!=null)switch(m){case"src":c=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:et(i,r,m,b,a,null)}}f&&et(i,r,"srcSet",a.srcSet,a,null),c&&et(i,r,"src",a.src,a,null);return;case"input":Ue("invalid",i);var x=m=b=f=null,A=null,j=null;for(c in a)if(a.hasOwnProperty(c)){var G=a[c];if(G!=null)switch(c){case"name":f=G;break;case"type":b=G;break;case"checked":A=G;break;case"defaultChecked":j=G;break;case"value":m=G;break;case"defaultValue":x=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(s(137,r));break;default:et(i,r,c,G,a,null)}}ug(i,m,x,A,j,b,f,!1);return;case"select":Ue("invalid",i),c=b=m=null;for(f in a)if(a.hasOwnProperty(f)&&(x=a[f],x!=null))switch(f){case"value":m=x;break;case"defaultValue":b=x;break;case"multiple":c=x;default:et(i,r,f,x,a,null)}r=m,a=b,i.multiple=!!c,r!=null?ol(i,!!c,r,!1):a!=null&&ol(i,!!c,a,!0);return;case"textarea":Ue("invalid",i),m=f=c=null;for(b in a)if(a.hasOwnProperty(b)&&(x=a[b],x!=null))switch(b){case"value":c=x;break;case"defaultValue":f=x;break;case"children":m=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(s(91));break;default:et(i,r,b,x,a,null)}fg(i,c,f,m);return;case"option":for(A in a)a.hasOwnProperty(A)&&(c=a[A],c!=null)&&(A==="selected"?i.selected=c&&typeof c!="function"&&typeof c!="symbol":et(i,r,A,c,a,null));return;case"dialog":Ue("beforetoggle",i),Ue("toggle",i),Ue("cancel",i),Ue("close",i);break;case"iframe":case"object":Ue("load",i);break;case"video":case"audio":for(c=0;c<so.length;c++)Ue(so[c],i);break;case"image":Ue("error",i),Ue("load",i);break;case"details":Ue("toggle",i);break;case"embed":case"source":case"link":Ue("error",i),Ue("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(j in a)if(a.hasOwnProperty(j)&&(c=a[j],c!=null))switch(j){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:et(i,r,j,c,a,null)}return;default:if(wf(r)){for(G in a)a.hasOwnProperty(G)&&(c=a[G],c!==void 0&&S1(i,r,G,c,a,void 0));return}}for(x in a)a.hasOwnProperty(x)&&(c=a[x],c!=null&&et(i,r,x,c,a,null))}var Wx={};function Gx(i,r,a,c){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,m=null,b=null,x=null,A=null,j=null,G=null;for(Y in a){var te=a[Y];if(a.hasOwnProperty(Y)&&te!=null)switch(Y){case"checked":break;case"value":break;case"defaultValue":A=te;default:c.hasOwnProperty(Y)||et(i,r,Y,null,c,te)}}for(var N in c){var Y=c[N];if(te=a[N],c.hasOwnProperty(N)&&(Y!=null||te!=null))switch(N){case"type":Y!==te&&(Ye=!0),m=Y;break;case"name":Y!==te&&(Ye=!0),f=Y;break;case"checked":Y!==te&&(Ye=!0),j=Y;break;case"defaultChecked":Y!==te&&(Ye=!0),G=Y;break;case"value":Y!==te&&(Ye=!0),b=Y;break;case"defaultValue":Y!==te&&(Ye=!0),x=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(s(137,r));break;default:Y!==te&&et(i,r,N,Y,c,te)}}Sf(i,b,x,A,j,G,m,f);return;case"select":Y=b=x=N=null;for(m in a)if(A=a[m],a.hasOwnProperty(m)&&A!=null)switch(m){case"value":break;case"multiple":Y=A;default:c.hasOwnProperty(m)||et(i,r,m,null,c,A)}for(f in c)if(m=c[f],A=a[f],c.hasOwnProperty(f)&&(m!=null||A!=null))switch(f){case"value":m!==A&&(Ye=!0),N=m;break;case"defaultValue":m!==A&&(Ye=!0),x=m;break;case"multiple":m!==A&&(Ye=!0),b=m;default:m!==A&&et(i,r,f,m,c,A)}r=x,a=b,c=Y,N!=null?ol(i,!!a,N,!1):!!c!=!!a&&(r!=null?ol(i,!!a,r,!0):ol(i,!!a,a?[]:"",!1));return;case"textarea":Y=N=null;for(x in a)if(f=a[x],a.hasOwnProperty(x)&&f!=null&&!c.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:et(i,r,x,null,c,f)}for(b in c)if(f=c[b],m=a[b],c.hasOwnProperty(b)&&(f!=null||m!=null))switch(b){case"value":f!==m&&(Ye=!0),N=f;break;case"defaultValue":f!==m&&(Ye=!0),Y=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(s(91));break;default:f!==m&&et(i,r,b,f,c,m)}hg(i,N,Y);return;case"option":for(var he in a)N=a[he],a.hasOwnProperty(he)&&N!=null&&!c.hasOwnProperty(he)&&(he==="selected"?i.selected=!1:et(i,r,he,null,c,N));for(A in c)N=c[A],Y=a[A],c.hasOwnProperty(A)&&N!==Y&&(N!=null||Y!=null)&&(A==="selected"?(N!==Y&&(Ye=!0),i.selected=N&&typeof N!="function"&&typeof N!="symbol"):et(i,r,A,N,c,Y));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ye in a)N=a[ye],a.hasOwnProperty(ye)&&N!=null&&!c.hasOwnProperty(ye)&&et(i,r,ye,null,c,N);for(j in c)if(N=c[j],Y=a[j],c.hasOwnProperty(j)&&N!==Y&&(N!=null||Y!=null))switch(j){case"children":case"dangerouslySetInnerHTML":if(N!=null)throw Error(s(137,r));break;default:et(i,r,j,N,c,Y)}return;default:if(wf(r)){for(var Ne in a)N=a[Ne],a.hasOwnProperty(Ne)&&N!==void 0&&!c.hasOwnProperty(Ne)&&S1(i,r,Ne,void 0,c,N);for(G in c)N=c[G],Y=a[G],!c.hasOwnProperty(G)||N===Y||N===void 0&&Y===void 0||S1(i,r,G,N,c,Y);return}}for(var z in a)N=a[z],a.hasOwnProperty(z)&&N!=null&&!c.hasOwnProperty(z)&&et(i,r,z,null,c,N);for(te in c)N=c[te],Y=a[te],!c.hasOwnProperty(te)||N===Y||N==null&&Y==null||et(i,r,te,N,c,Y)}function S3(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Xx(){if(typeof performance.getEntriesByType=="function"){for(var i=0,r=0,a=performance.getEntriesByType("resource"),c=0;c<a.length;c++){var f=a[c],m=f.transferSize,b=f.initiatorType,x=f.duration;if(m&&x&&S3(b)){for(b=0,x=f.responseEnd,c+=1;c<a.length;c++){var A=a[c],j=A.startTime;if(j>x)break;var G=A.transferSize,te=A.initiatorType;G&&S3(te)&&(A=A.responseEnd,b+=G*(A<x?1:(x-j)/(A-j)))}if(--c,r+=8*(m+b)/(f.duration/1e3),i++,10<i)break}}if(0<i)return r/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var b1=null,w1=null;function ao(i){return i.nodeType===9?i:i.ownerDocument}function b3(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function w3(i,r){if(i===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&r==="foreignObject"?0:i}function x3(i,r,a,c){return a=ao(a).createElement(i),a[Wt]=c,a[vi]=r,Jt(a,i,r),Bt(a),a}function x1(i,r){return i==="textarea"||i==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var C1=null;function Zx(){var i=window.event;return i&&i.type==="popstate"?i===C1?!1:(C1=i,!0):(C1=null,!1)}var E1=typeof setTimeout=="function"?setTimeout:void 0,Qx=typeof clearTimeout=="function"?clearTimeout:void 0,C3=typeof Promise=="function"?Promise:void 0,E3=typeof requestAnimationFrame=="function"?requestAnimationFrame:E1,Jx=typeof queueMicrotask=="function"?queueMicrotask:typeof C3<"u"?function(i){return C3.resolve(null).then(i).catch(e9)}:E1;function e9(i){setTimeout(function(){throw i})}function Pr(i){return i==="head"}function k3(i,r){var a=r,c=0;do{var f=a.nextSibling;if(i.removeChild(a),f&&f.nodeType===8)if(a=f.data,a==="/$"||a==="/&"){if(c===0){i.removeChild(f),Yl(r);return}c--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")c++;else if(a==="html")L1(i.ownerDocument.documentElement);else if(a==="head"){a=i.ownerDocument.head,L1(a);for(var m=a.firstChild;m;){var b=m.nextSibling,x=m.nodeName;m[Ea]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&m.rel.toLowerCase()==="stylesheet"||a.removeChild(m),m=b}}else a==="body"&&L1(i.ownerDocument.body);a=f}while(a);Yl(r)}function T3(i,r){var a=i;i=0;do{var c=a.nextSibling;if(a.nodeType===1?r?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(r?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),c&&c.nodeType===8)if(a=c.data,a==="/$"){if(i===0)break;i--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||i++;a=c}while(a)}function M3(i,r,a){if(r=CSS.escape(r)!==r?"r-"+btoa(r).replace(/=/g,""):r,i.style.viewTransitionName=r,a!=null&&(i.style.viewTransitionClass=a),a=getComputedStyle(i),a.display==="inline"){if(r=i.getClientRects(),r.length===1)var c=1;else for(var f=c=0;f<r.length;f++){var m=r[f];0<m.width&&0<m.height&&c++}c===1&&(i=i.style,i.display=r.length===1?"inline-block":"block",i.marginTop="-"+a.paddingTop,i.marginBottom="-"+a.paddingBottom)}}function A3(i,r){i=i.style,r=r.style;var a=r!=null?r.hasOwnProperty("viewTransitionName")?r.viewTransitionName:r.hasOwnProperty("view-transition-name")?r["view-transition-name"]:null:null;i.viewTransitionName=a==null||typeof a=="boolean"?"":(""+a).trim(),a=r!=null?r.hasOwnProperty("viewTransitionClass")?r.viewTransitionClass:r.hasOwnProperty("view-transition-class")?r["view-transition-class"]:null:null,i.viewTransitionClass=a==null||typeof a=="boolean"?"":(""+a).trim(),i.display==="inline-block"&&(r==null?i.display=i.margin="":(a=r.display,i.display=a==null||typeof a=="boolean"?"":a,a=r.margin,a!=null?i.margin=a:(a=r.hasOwnProperty("marginTop")?r.marginTop:r["margin-top"],i.marginTop=a==null||typeof a=="boolean"?"":a,r=r.hasOwnProperty("marginBottom")?r.marginBottom:r["margin-bottom"],i.marginBottom=r==null||typeof r=="boolean"?"":r)))}function t9(i,r,a){return a=a.ownerDocument.defaultView,{rect:i,abs:r.position==="absolute"||r.position==="fixed",clip:r.clipPath!=="none"||r.overflow!=="visible"||r.filter!=="none"||r.mask!=="none"||r.mask!=="none"||r.borderRadius!=="0px",view:0<=i.bottom&&0<=i.right&&i.top<=a.innerHeight&&i.left<=a.innerWidth}}function k1(i){var r=i.getBoundingClientRect(),a=getComputedStyle(i);return t9(r,a,i)}function i9(i){return i.documentElement.clientHeight}function n9(i){this.addEventListener("load",i),this.addEventListener("error",i)}function r9(i,r,a,c,f,m,b,x,A){var j=r.nodeType===9?r:r.ownerDocument;try{var G=j.startViewTransition({update:function(){var N=j.defaultView,Y=N.navigation&&N.navigation.transition,he=j.fonts.status;c();var ye=[];if(he==="loaded"&&(i9(j),j.fonts.status==="loading"&&ye.push(j.fonts.ready)),he=ye.length,i!==null)for(var Ne=i.suspenseyImages,z=0,L=0;L<Ne.length;L++){var F=Ne[L];if(!F.complete){var ee=F.getBoundingClientRect();if(0<ee.bottom&&0<ee.right&&ee.top<N.innerHeight&&ee.left<N.innerWidth){if(z+=X3(F),z>zu){ye.length=he;break}F=new Promise(n9.bind(F)),ye.push(F)}}}if(0<ye.length)return N=Promise.race([Promise.all(ye),new Promise(function(_e){return setTimeout(_e,500)})]).then(f,f),(Y?Promise.allSettled([Y.finished,N]):N).then(m,m);if(f(),Y)return Y.finished.then(m,m);m()},types:a});j.__reactViewTransition=G;var te=[];return G.ready.then(function(){for(var N=j.documentElement.getAnimations({subtree:!0}),Y=0;Y<N.length;Y++){var he=N[Y],ye=he.effect,Ne=ye.pseudoElement;if(Ne!=null&&Ne.startsWith("::view-transition")){te.push(he),he=ye.getKeyframes();for(var z=Ne=void 0,L=!0,F=0;F<he.length;F++){var ee=he[F],_e=ee.width;if(Ne===void 0)Ne=_e;else if(Ne!==_e){L=!1;break}if(_e=ee.height,z===void 0)z=_e;else if(z!==_e){L=!1;break}delete ee.width,delete ee.height,ee.transform==="none"&&delete ee.transform}L&&Ne!==void 0&&z!==void 0&&(ye.setKeyframes(he),L=getComputedStyle(ye.target,ye.pseudoElement),L.width!==Ne||L.height!==z)&&(L=he[0],L.width=Ne,L.height=z,L=he[he.length-1],L.width=Ne,L.height=z,ye.setKeyframes(he))}}b()},function(N){j.__reactViewTransition===G&&(j.__reactViewTransition=null);try{typeof N=="object"&&N!==null&&N.name==="InvalidStateError"&&(N.message==="View transition was skipped because document visibility state is hidden."||N.message==="Skipping view transition because document visibility state has become hidden."||N.message==="Skipping view transition because viewport size changed."||N.message==="Transition was aborted because of invalid state")&&(N=null),N!==null&&A(N)}finally{c(),f(),b()}}),G.finished.finally(function(){for(var N=0;N<te.length;N++)te[N].cancel();j.__reactViewTransition===G&&(j.__reactViewTransition=null),x()}),G}catch{return c(),f(),b(),null}}function Ns(i,r){this._scope=document.documentElement,this._selector="::view-transition-"+i+"("+r+")"}Ns.prototype.animate=function(i,r){return r=typeof r=="number"?{duration:r}:V({},r),r.pseudoElement=this._selector,this._scope.animate(i,r)},Ns.prototype.getAnimations=function(){for(var i=this._scope,r=this._selector,a=i.getAnimations({subtree:!0}),c=[],f=0;f<a.length;f++){var m=a[f].effect;m!==null&&m.target===i&&m.pseudoElement===r&&c.push(a[f])}return c},Ns.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function D3(i){return{name:i,group:new Ns("group",i),imagePair:new Ns("image-pair",i),old:new Ns("old",i),new:new Ns("new",i)}}function ji(i){this._fragmentFiber=i,this._observers=this._eventListeners=null}ji.prototype.addEventListener=function(i,r,a){var c=null,f=null;if(!(a!=null&&typeof a!="boolean"&&(c=a.signal||null,c!==null&&c.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var m=this._eventListeners;if(R3(m,i,r,a)===-1){var b=this,x=r;a!=null&&typeof a!="boolean"&&a.once===!0&&(x=function(A){b.removeEventListener(i,r,a),typeof r=="function"?r.call(this,A):r.handleEvent(A)}),c!==null&&(f=b.removeEventListener.bind(b,i,r,a),c.addEventListener("abort",f,{once:!0}),f=c.removeEventListener.bind(c,"abort",f)),c=Pl(a),m.push({type:i,listener:r,optionsOrUseCapture:a,attachedListener:x,cleanup:f}),_(this._fragmentFiber.child,!1,s9,i,x,c)}this._eventListeners=m}};function s9(i,r,a,c){return E(i).addEventListener(r,a,c),!1}ji.prototype.removeEventListener=function(i,r,a){var c=this._eventListeners;if(c!==null&&(r=R3(c,i,r,a),r!==-1)){var f=c[r];a=f.attachedListener;var m=f.cleanup;f=Pl(f.optionsOrUseCapture),_(this._fragmentFiber.child,!1,l9,i,a,f),c.splice(r,1),m!==null&&m()}};function l9(i,r,a,c){return E(i).removeEventListener(r,a,c),!1}function Pl(i){return i!=null&&typeof i!="boolean"&&(i.once===!0||i.signal instanceof AbortSignal)?{capture:i.capture,passive:i.passive}:i}function O3(i){return i==null?"c=0":typeof i=="boolean"?"c="+(i?"1":"0"):"c="+(i.capture?"1":"0")}function R3(i,r,a,c){if(i.length===0)return-1;c=O3(c);for(var f=0;f<i.length;f++){var m=i[f];if(m.type===r&&m.listener===a&&O3(m.optionsOrUseCapture)===c)return f}return-1}ji.prototype.dispatchEvent=function(i){var r=S(this._fragmentFiber);if(r===null)return!0;r=E(r);var a=this._eventListeners;if(a!==null&&0<a.length||!i.bubbles){var c=r.nodeType===9?r.createComment(""):document.createTextNode("");if(a)for(var f=0;f<a.length;f++){var m=a[f];c.addEventListener(m.type,m.attachedListener,Pl(m.optionsOrUseCapture))}if(r.appendChild(c),i=c.dispatchEvent(i),a)for(f=0;f<a.length;f++)m=a[f],c.removeEventListener(m.type,m.attachedListener,Pl(m.optionsOrUseCapture));return r.removeChild(c),i}return r.dispatchEvent(i)},ji.prototype.focus=function(i){_(this._fragmentFiber.child,!0,L3,i,void 0,void 0)};function L3(i,r){return i.tag===6?!1:(i=E(i),v9(i,r))}ji.prototype.focusLast=function(i){var r=[];_(this._fragmentFiber.child,!0,T1,r,void 0,void 0);for(var a=r.length-1;0<=a&&!L3(r[a],i);a--);};function T1(i,r){return r.push(i),!1}ji.prototype.blur=function(){var i=S(this._fragmentFiber);i!==null&&(i=E(i),i=ao(i).activeElement,i!==null&&_(this._fragmentFiber.child,!1,a9,i,void 0,void 0))};function a9(i,r){return i.tag===6?!1:(i=E(i),i===r||i.contains(r)?(r.blur(),!0):!1)}ji.prototype.observeUsing=function(i){this._observers===null&&(this._observers=new Set),this._observers.add(i),_(this._fragmentFiber.child,!1,o9,i,void 0,void 0)};function o9(i,r){return i.tag===6||(i=E(i),r.observe(i)),!1}ji.prototype.unobserveUsing=function(i){var r=this._observers;if(r!==null&&r.has(i)){r.delete(i),_(this._fragmentFiber.child,!1,c9,i,void 0,void 0);for(var a=r=0;a<dn.length;a++){var c=dn[a];c.fragmentInstance===this&&c.observer===i?i.unobserve(c.instance):dn[r++]=c}dn.length=r}};function c9(i,r){return i.tag===6||(i=E(i),r.unobserve(i)),!1}var dn=[],M1=!1;function u9(i,r,a){dn.push({fragmentInstance:i,observer:r,instance:a}),M1||(M1=!0,y9(function(){M1=!1;var c=dn;dn=[];for(var f=0;f<c.length;f++){var m=c[f];m.observer.unobserve(m.instance)}}))}ji.prototype.getClientRects=function(){var i=[];return _(this._fragmentFiber.child,!1,h9,i,void 0,void 0),i};function h9(i,r){if(i.tag===6){i=i.stateNode;var a=i.ownerDocument.createRange();a.selectNodeContents(i),r.push.apply(r,a.getClientRects())}else i=E(i),r.push.apply(r,i.getClientRects());return!1}ji.prototype.getRootNode=function(i){var r=S(this._fragmentFiber);return r===null?this:E(r).getRootNode(i)},ji.prototype.compareDocumentPosition=function(i){var r=S(this._fragmentFiber);if(r===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var a=[];_(this._fragmentFiber.child,!1,T1,a,void 0,void 0);var c=E(r);if(a.length===0){if(a=c,v(this._fragmentFiber)){e:{for(r=this._fragmentFiber.return;r!==null;){if(r.tag===4){r=r.stateNode.containerInfo;break e}if(r.tag===3||r.tag===5||r.tag===27)break;r=r.return}r=null}r!=null&&(a=r)}r=this._fragmentFiber;var f=c=a.compareDocumentPosition(i);return a===i?f=Node.DOCUMENT_POSITION_CONTAINS:c&Node.DOCUMENT_POSITION_CONTAINED_BY&&(a=w(r)[1],a===null?f=Node.DOCUMENT_POSITION_PRECEDING:(i=E(a).compareDocumentPosition(i),f=i===0||i&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),f|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}r=E(a[0]),f=E(a[a.length-1]);var m=v(this._fragmentFiber)?r.parentElement:c;if(m==null)return Node.DOCUMENT_POSITION_DISCONNECTED;c=m.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_CONTAINED_BY,m=m.compareDocumentPosition(f)&Node.DOCUMENT_POSITION_CONTAINED_BY;var b=r.compareDocumentPosition(i),x=f.compareDocumentPosition(i),A=b&Node.DOCUMENT_POSITION_CONTAINED_BY||x&Node.DOCUMENT_POSITION_CONTAINED_BY;return x=c&&m&&b&Node.DOCUMENT_POSITION_FOLLOWING&&x&Node.DOCUMENT_POSITION_PRECEDING,r=c&&r===i||m&&f===i||A||x?Node.DOCUMENT_POSITION_CONTAINED_BY:!c&&r===i||!m&&f===i?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:b,r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||f9(r,this._fragmentFiber,a[0],a[a.length-1],i)?r:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function f9(i,r,a,c,f){var m=ds(f);if(i&Node.DOCUMENT_POSITION_CONTAINED_BY){if(a=!!m)e:{for(;m!==null;){if(m.tag===7&&(m===r||m.alternate===r)){a=!0;break e}m=m.return}a=!1}return a}if(i&Node.DOCUMENT_POSITION_CONTAINS){if(m===null)return m=f.ownerDocument,f===m||f===m.documentElement||f===m.body;e:{for(m=r,r=S(r);m!==null;){if(!(m.tag!==5&&m.tag!==3&&m.tag!==27||m!==r&&m.alternate!==r)){m=!0;break e}m=m.return}m=!1}return m}return i&Node.DOCUMENT_POSITION_PRECEDING?((r=!!m)&&!(r=m===a)&&(r=R(a,m,Q),r===null?r=!1:(_(r,!0,B,m,a),m=M,M=null,r=m!==null)),r):i&Node.DOCUMENT_POSITION_FOLLOWING?((r=!!m)&&!(r=m===c)&&(r=R(c,m,Q),r===null?r=!1:(_(r,!0,X,m,c),m=M,U=M=null,r=m!==null)),r):!1}function N3(i,r){var a=i.ownerDocument.createRange();a.selectNodeContents(i),i=a.getBoundingClientRect(),window.scrollTo(window.scrollX+i.left,r?window.scrollY+i.top:window.scrollY+i.bottom-window.innerHeight)}ji.prototype.scrollIntoView=function(i){if(typeof i=="object")throw Error(s(566));var r=[];_(this._fragmentFiber.child,!1,T1,r,void 0,void 0);var a=i!==!1;if(r.length===0){var c=w(this._fragmentFiber);if(c=a?c[1]||c[0]||S(this._fragmentFiber):c[0]||c[1],c===null)return;if(c.tag===6){i=E(c),N3(i,a);return}if(c=E(c),c.nodeType!==9){if(c.nodeType===11){a="host"in c?c.host:null,a!==null&&a.scrollIntoView(i);return}c.scrollIntoView(i)}}for(c=a?r.length-1:0;c!==(a?-1:r.length);){var f=r[c];f.tag===6?(f=E(f),N3(f,a)):E(f).scrollIntoView(i),c+=a?-1:1}};function d9(i,r){return i=E(i),z3(i,r),!1}function z3(i,r){i.reactFragments==null&&(i.reactFragments=new Set),i.reactFragments.add(r)}function B3(i,r){var a=r._eventListeners;if(a!==null)for(var c=0;c<a.length;c++){var f=a[c];i.addEventListener(f.type,f.attachedListener,Pl(f.optionsOrUseCapture))}i.nodeType!==3&&(a=r._observers,a!==null&&a.forEach(function(m){for(var b=0,x=0;x<dn.length;x++){var A=dn[x];(A.fragmentInstance!==r||A.observer!==m||A.instance!==i)&&(dn[b++]=A)}dn.length=b,m.observe(i)}),z3(i,r))}function p9(i,r){var a=r._eventListeners;if(a!==null)for(var c=0;c<a.length;c++){var f=a[c];i.removeEventListener(f.type,f.attachedListener,Pl(f.optionsOrUseCapture))}i.nodeType!==3&&(a=r._observers,a!==null&&a.forEach(function(m){typeof m.rootMargin=="string"?u9(r,m,i):m.unobserve(i)}),i.reactFragments!=null&&i.reactFragments.delete(r))}function A1(i){var r=i.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var a=r;switch(r=r.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":A1(a),xc(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}i.removeChild(a)}}function m9(i,r,a,c){for(;i.nodeType===1;){var f=a;if(i.nodeName.toLowerCase()!==r.toLowerCase()){if(!c&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(c){if(!i[Ea])switch(r){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(m=i.getAttribute("rel"),m==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(m!==f.rel||i.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||i.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||i.getAttribute("title")!==(f.title==null?null:f.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(m=i.getAttribute("src"),(m!==(f.src==null?null:f.src)||i.getAttribute("type")!==(f.type==null?null:f.type)||i.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&m&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(r==="input"&&i.type==="hidden"){var m=f.name==null?null:""+f.name;if(f.type==="hidden"&&i.getAttribute("name")===m)return i}else return i;if(i=Qi(i.nextSibling),i===null)break}return null}function _9(i,r,a){if(r==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!a||(i=Qi(i.nextSibling),i===null))return null;return i}function j3(i,r){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!r||(i=Qi(i.nextSibling),i===null))return null;return i}function D1(i){return i.data==="$?"||i.data==="$~"}function O1(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function g9(i,r){var a=i.ownerDocument;if(i.data==="$~")i._reactRetry=r;else if(i.data!=="$?"||a.readyState!=="loading")r();else{var c=function(){r(),a.removeEventListener("DOMContentLoaded",c)};a.addEventListener("DOMContentLoaded",c),i._reactRetry=c}}function Qi(i){for(;i!=null;i=i.nextSibling){var r=i.nodeType;if(r===1||r===3)break;if(r===8){if(r=i.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return i}var R1=null;function H3(i){i=i.nextSibling;for(var r=0;i;){if(i.nodeType===8){var a=i.data;if(a==="/$"||a==="/&"){if(r===0)return Qi(i.nextSibling);r--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||r++}i=i.nextSibling}return null}function I3(i){i=i.previousSibling;for(var r=0;i;){if(i.nodeType===8){var a=i.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(r===0)return i;r--}else a!=="/$"&&a!=="/&"||r++}i=i.previousSibling}return null}function v9(i,r){function a(){c=!0}if(i.ownerDocument.activeElement===i)return!0;var c=!1;try{i.ownerDocument.addEventListener("focus",a,!0),(i.focus||HTMLElement.prototype.focus).call(i,r)}finally{i.ownerDocument.removeEventListener("focus",a,!0)}return c}function y9(i){E3(function(){E3(function(r){return i(r)})})}function P3(i,r,a){switch(r=ao(a),i){case"html":if(i=r.documentElement,!i)throw Error(s(452));return i;case"head":if(i=r.head,!i)throw Error(s(453));return i;case"body":if(i=r.body,!i)throw Error(s(454));return i;default:throw Error(s(451))}}function F3(i,r,a){for(var c in a){var f=a[c];a.hasOwnProperty(c)&&f!=null&&et(i,r,c,null,Wx,f)}a.dangerouslySetInnerHTML!=null&&(i.textContent=""),i.onclick===gn&&(i.onclick=null),xc(i)}function L1(i){for(var r=i.attributes;r.length;)i.removeAttributeNode(r[0]);xc(i)}var Ji=new Map,U3=new Set;function oo(i){if(typeof i.getRootNode=="function"){var r=i.getRootNode();if(r.nodeType===9||r.nodeType===11)return r}return i.nodeType===9?i:i.ownerDocument}var sr=Se.d;Se.d={f:S9,r:b9,D:w9,C:x9,L:C9,m:E9,X:T9,S:k9,M:M9};function S9(){var i=sr.f(),r=ku();return i||r}function b9(i){var r=sl(i);r!==null&&r.tag===5&&r.type==="form"?q2(r):sr.r(i)}var Fl=typeof document>"u"?null:document;function V3(i,r,a){var c=Fl;if(c&&typeof r=="string"&&r){var f=$i(r);f='link[rel="'+i+'"][href="'+f+'"]',typeof a=="string"&&(f+='[crossorigin="'+a+'"]'),U3.has(f)||(U3.add(f),i={rel:i,crossOrigin:a,href:r},c.querySelector(f)===null&&(r=c.createElement("link"),Jt(r,"link",i),Bt(r),c.head.appendChild(r)))}}function w9(i){sr.D(i),V3("dns-prefetch",i,null)}function x9(i,r){sr.C(i,r),V3("preconnect",i,r)}function C9(i,r,a){sr.L(i,r,a);var c=Fl;if(c&&i&&r){var f='link[rel="preload"][as="'+$i(r)+'"]';r==="image"&&a&&a.imageSrcSet?(f+='[imagesrcset="'+$i(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(f+='[imagesizes="'+$i(a.imageSizes)+'"]')):f+='[href="'+$i(i)+'"]';var m=f;switch(r){case"style":m=Ul(i);break;case"script":m=Vl(i)}if(!(Ji.has(m)||(i=V({rel:"preload",href:r==="image"&&a&&a.imageSrcSet?void 0:i,as:r},a),Ji.set(m,i),c.querySelector(f)!==null||r==="style"&&c.querySelector(co(m))||r==="script"&&c.querySelector(uo(m))))){var b=c.createElement("link");Jt(b,"link",i),r==="style"&&(b[wc]=!0,b.onload=b.onerror=function(){ig(b)}),Bt(b),c.head.appendChild(b)}}}function E9(i,r){sr.m(i,r);var a=Fl;if(a&&i){var c=r&&typeof r.as=="string"?r.as:"script",f='link[rel="modulepreload"][as="'+$i(c)+'"][href="'+$i(i)+'"]',m=f;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Vl(i)}if(!Ji.has(m)&&(i=V({rel:"modulepreload",href:i},r),Ji.set(m,i),a.querySelector(f)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(uo(m)))return}c=a.createElement("link"),Jt(c,"link",i),Bt(c),a.head.appendChild(c)}}}function k9(i,r,a){sr.S(i,r,a);var c=Fl;if(c&&i){var f=ll(c).hoistableStyles,m=Ul(i);r=r||"default";var b=f.get(m);if(!b){var x={loading:0,preload:null};if(b=c.querySelector(co(m)))x.loading=5;else{i=V({rel:"stylesheet",href:i,"data-precedence":r},a),(a=Ji.get(m))&&N1(i,a);var A=b=c.createElement("link");Bt(A),Jt(A,"link",i),A._p=new Promise(function(j,G){A.onload=j,A.onerror=G}),A.addEventListener("load",function(){x.loading|=1}),A.addEventListener("error",function(){x.loading|=2}),x.loading|=4,Lu(b,r,c)}b={type:"stylesheet",instance:b,count:1,state:x},f.set(m,b)}}}function T9(i,r){sr.X(i,r);var a=Fl;if(a&&i){var c=ll(a).hoistableScripts,f=Vl(i),m=c.get(f);m||(m=a.querySelector(uo(f)),m||(i=V({src:i,async:!0},r),(r=Ji.get(f))&&z1(i,r),m=a.createElement("script"),Bt(m),Jt(m,"link",i),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},c.set(f,m))}}function M9(i,r){sr.M(i,r);var a=Fl;if(a&&i){var c=ll(a).hoistableScripts,f=Vl(i),m=c.get(f);m||(m=a.querySelector(uo(f)),m||(i=V({src:i,async:!0,type:"module"},r),(r=Ji.get(f))&&z1(i,r),m=a.createElement("script"),Bt(m),Jt(m,"link",i),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},c.set(f,m))}}function q3(i,r,a,c){var f=(f=an.current)?oo(f):null;if(!f)throw Error(s(446));switch(i){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(a=Ul(a.href),r=ll(f).hoistableStyles,c=r.get(a),c||(c={type:"style",instance:null,count:0,state:null},r.set(a,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){i=Ul(a.href);var m=ll(f).hoistableStyles,b=m.get(i);if(b||(f=f.ownerDocument||f,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(i,b),(m=f.querySelector(co(i)))?m._p||(b.instance=m,b.state.loading=5):(m=Ji.get(i),m||(m={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Ji.set(i,m)),A9(f,i,m,b.state))),r&&c===null)throw Error(s(528,""));return b}if(r&&c!==null)throw Error(s(529,""));return null;case"script":return r=a.async,a=a.src,typeof a=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(a=Vl(a),r=ll(f).hoistableScripts,c=r.get(a),c||(c={type:"script",instance:null,count:0,state:null},r.set(a,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,i))}}function Ul(i){return'href="'+$i(i)+'"'}function co(i){return'link[rel="stylesheet"]['+i+"]"}function $3(i){return V({},i,{"data-precedence":i.precedence,precedence:null})}function A9(i,r,a,c){if(r=i.querySelector('link[rel="preload"][as="style"]['+r+"]")){if(r[wc]!==!0){c.loading=1;return}}else r=i.createElement("link"),r[wc]=!0,r.onload=r.onerror=ig.bind(null,r),Jt(r,"link",a),Bt(r),i.head.appendChild(r);c.preload=r,r.addEventListener("load",function(){return c.loading|=1}),r.addEventListener("error",function(){return c.loading|=2})}function Vl(i){return'[src="'+$i(i)+'"]'}function uo(i){return"script[async]"+i}function Y3(i,r,a){if(r.count++,r.instance===null)switch(r.type){case"style":var c=i.querySelector('style[data-href~="'+$i(a.href)+'"]');if(c)return r.instance=c,Bt(c),c;var f=V({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return c=(i.ownerDocument||i).createElement("style"),Bt(c),Jt(c,"style",f),Lu(c,a.precedence,i),r.instance=c;case"stylesheet":f=Ul(a.href);var m=i.querySelector(co(f));if(m)return r.state.loading|=4,r.instance=m,Bt(m),m;c=$3(a),(f=Ji.get(f))&&N1(c,f),m=(i.ownerDocument||i).createElement("link"),Bt(m);var b=m;return b._p=new Promise(function(x,A){b.onload=x,b.onerror=A}),Jt(m,"link",c),r.state.loading|=4,Lu(m,a.precedence,i),r.instance=m;case"script":return m=Vl(a.src),(f=i.querySelector(uo(m)))?(r.instance=f,Bt(f),f):(c=a,(f=Ji.get(m))&&(c=V({},a),z1(c,f)),i=i.ownerDocument||i,f=i.createElement("script"),Bt(f),Jt(f,"link",c),i.head.appendChild(f),r.instance=f);case"void":return null;default:throw Error(s(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(c=r.instance,r.state.loading|=4,Lu(c,a.precedence,i));return r.instance}function Lu(i,r,a){for(var c=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=c.length?c[c.length-1]:null,m=f,b=0;b<c.length;b++){var x=c[b];if(x.dataset.precedence===r)m=x;else if(m!==f)break}m?m.parentNode.insertBefore(i,m.nextSibling):(r=a.nodeType===9?a.head:a,r.insertBefore(i,r.firstChild))}function N1(i,r){i.crossOrigin==null&&(i.crossOrigin=r.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=r.referrerPolicy),i.title==null&&(i.title=r.title)}function z1(i,r){i.crossOrigin==null&&(i.crossOrigin=r.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=r.referrerPolicy),i.integrity==null&&(i.integrity=r.integrity)}var Nu=null;function K3(i,r,a){if(Nu===null){var c=new Map,f=Nu=new Map;f.set(a,c)}else f=Nu,c=f.get(a),c||(c=new Map,f.set(a,c));if(c.has(i))return c;for(c.set(i,null),a=a.getElementsByTagName(i),f=0;f<a.length;f++){var m=a[f];if(!(m[Ea]||m[Wt]||i==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var b=m.getAttribute(r)||"";b=i+b;var x=c.get(b);x?x.push(m):c.set(b,[m])}}return c}function B1(i,r,a){i=i.ownerDocument||i,i.head.insertBefore(a,r==="title"?i.querySelector("head > title"):null)}function D9(i,r,a){if(a===1||r.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(i=r.disabled,typeof r.precedence=="string"&&i==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function W3(i,r){return i==="img"&&r.src!=null&&r.src!==""&&r.onLoad==null&&r.loading!=="lazy"}function G3(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function X3(i){return(i.width||100)*(i.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function Z3(i,r){typeof r.decode=="function"&&(i.imgCount++,r.complete||(i.imgBytes+=X3(r),i.suspenseyImages.push(r)),i=L9.bind(i),r.decode().then(i,i))}function O9(i,r,a,c){if(a.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var f=Ul(c.href),m=r.querySelector(co(f));if(m){r=m._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(i.count++,i=ho.bind(i),r.then(i,i)),a.state.loading|=4,a.instance=m,Bt(m);return}m=r.ownerDocument||r,c=$3(c),(f=Ji.get(f))&&N1(c,f),m=m.createElement("link"),Bt(m);var b=m;b._p=new Promise(function(x,A){b.onload=x,b.onerror=A}),Jt(m,"link",c),a.instance=m}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(a,r),(r=a.state.preload)&&(a.state.loading&3)===0&&(i.count++,a=ho.bind(i),r.addEventListener("load",a),r.addEventListener("error",a))}}var zu=0;function R9(i,r){return i.stylesheets&&i.count===0&&ju(i,i.stylesheets),0<i.count||0<i.imgCount?function(a){var c=setTimeout(function(){if(i.stylesheets&&ju(i,i.stylesheets),i.unsuspend){var m=i.unsuspend;i.unsuspend=null,m()}},6e4+r);0<i.imgBytes&&zu===0&&(zu=62500*Xx());var f=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&ju(i,i.stylesheets),i.unsuspend)){var m=i.unsuspend;i.unsuspend=null,m()}},(i.imgBytes>zu?50:800)+r);return i.unsuspend=a,function(){i.unsuspend=null,clearTimeout(c),clearTimeout(f)}}:null}function Q3(i){if(i.count===0&&(i.imgCount===0||!i.waitingForImages)){if(i.stylesheets)ju(i,i.stylesheets);else if(i.unsuspend){var r=i.unsuspend;i.unsuspend=null,r()}}}function ho(){this.count--,Q3(this)}function L9(){this.imgCount--,Q3(this)}var Bu=null;function ju(i,r){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Bu=new Map,r.forEach(N9,i),Bu=null,ho.call(i))}function N9(i,r){if(!(r.state.loading&4)){var a=Bu.get(i);if(a)var c=a.get(null);else{a=new Map,Bu.set(i,a);for(var f=i.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<f.length;m++){var b=f[m];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(a.set(b.dataset.precedence,b),c=b)}c&&a.set(null,c)}f=r.instance,b=f.getAttribute("data-precedence"),m=a.get(b)||c,m===c&&a.set(null,f),a.set(b,f),this.count++,c=ho.bind(this),f.addEventListener("load",c),f.addEventListener("error",c),m?m.parentNode.insertBefore(f,m.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(f,i.firstChild)),r.state.loading|=4}}var ql={$$typeof:P,Provider:null,Consumer:null,_currentValue:Be,_currentValue2:Be,_threadCount:0};function z9(i,r,a,c,f,m,b,x,A){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=_f(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_f(0),this.hiddenUpdates=_f(null),this.identifierPrefix=c,this.onUncaughtError=f,this.onCaughtError=m,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.transitionTypes=null,this.incompleteTransitions=new Map}function J3(i,r,a,c,f,m,b,x,A,j,G,te){return i=new z9(i,r,a,b,A,j,G,te,x),r=1,m===!0&&(r|=24),m=yi(3,null,null,r),i.current=m,m.stateNode=i,r=Zf(),r.refCount++,i.pooledCache=r,r.refCount++,m.memoizedState={element:c,isDehydrated:a,cache:r},td(m),i}function ey(i){return i?(i=_l,i):_l}function ty(i,r,a,c,f,m){f=ey(f),c.context===null?c.context=f:c.pendingContext=f,c=Mr(r),c.payload={element:a},m=m===void 0?null:m,m!==null&&(c.callback=m),a=Ar(i,c,r),a!==null&&(xi(a,i,r),Ua(a,i,r))}function iy(i,r){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var a=i.retryLane;i.retryLane=a!==0&&a<r?a:r}}function j1(i,r){iy(i,r),(i=i.alternate)&&iy(i,r)}function ny(i){if(i.tag===13||i.tag===31){var r=gs(i,67108864);r!==null&&xi(r,i,67108864),j1(i,67108864)}}function ry(i){if(i.tag===13||i.tag===31){var r=Bi();r=gf(r);var a=gs(i,r);a!==null&&xi(a,i,r),j1(i,r)}}var $l=!0;function B9(i,r,a,c){var f=fe.T;fe.T=null;var m=Se.p;try{Se.p=2,H1(i,r,a,c)}finally{Se.p=m,fe.T=f}}function j9(i,r,a,c){var f=fe.T;fe.T=null;var m=Se.p;try{Se.p=8,H1(i,r,a,c)}finally{Se.p=m,fe.T=f}}function H1(i,r,a,c){if($l){var f=I1(c);if(f===null)y1(i,r,c,Hu,a),ly(i,c);else if(I9(f,i,r,a,c))c.stopPropagation();else if(ly(i,c),r&4&&-1<H9.indexOf(i)){for(;f!==null;){var m=sl(f);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var b=fs(m.pendingLanes);if(b!==0){var x=m;for(x.pendingLanes|=2,x.entangledLanes|=2;b;){var A=1<<31-Ai(b);x.entanglements[1]|=A,b&=~A}Tn(m),(Ge&6)===0&&(xu=Kt()+500,ro(0))}}break;case 31:case 13:x=gs(m,2),x!==null&&xi(x,m,2),ku(),j1(m,2)}if(m=I1(c),m===null&&y1(i,r,c,Hu,a),m===f)break;f=m}f!==null&&c.stopPropagation()}else y1(i,r,c,null,a)}}function I1(i){return i=Cf(i),P1(i)}var Hu=null;function P1(i){if(Hu=null,i=ds(i),i!==null){var r=o(i);if(r===null)i=null;else{var a=r.tag;if(a===13){if(i=u(r),i!==null)return i;i=null}else if(a===31){if(i=h(r),i!==null)return i;i=null}else if(a===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;i=null}else r!==i&&(i=null)}}return Hu=i,null}function sy(i){switch(i){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(oi()){case qn:return 2;case qi:return 8;case gc:case Z7:return 32;case Y_:return 268435456;default:return 32}default:return 32}}var F1=!1,Fr=null,Ur=null,Vr=null,fo=new Map,po=new Map,qr=[],H9="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function ly(i,r){switch(i){case"focusin":case"focusout":Fr=null;break;case"dragenter":case"dragleave":Ur=null;break;case"mouseover":case"mouseout":Vr=null;break;case"pointerover":case"pointerout":fo.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":po.delete(r.pointerId)}}function mo(i,r,a,c,f,m){return i===null||i.nativeEvent!==m?(i={blockedOn:r,domEventName:a,eventSystemFlags:c,nativeEvent:m,targetContainers:[f]},r!==null&&(r=sl(r),r!==null&&ny(r)),i):(i.eventSystemFlags|=c,r=i.targetContainers,f!==null&&r.indexOf(f)===-1&&r.push(f),i)}function I9(i,r,a,c,f){switch(r){case"focusin":return Fr=mo(Fr,i,r,a,c,f),!0;case"dragenter":return Ur=mo(Ur,i,r,a,c,f),!0;case"mouseover":return Vr=mo(Vr,i,r,a,c,f),!0;case"pointerover":var m=f.pointerId;return fo.set(m,mo(fo.get(m)||null,i,r,a,c,f)),!0;case"gotpointercapture":return m=f.pointerId,po.set(m,mo(po.get(m)||null,i,r,a,c,f)),!0}return!1}function ay(i){var r=ds(i.target);if(r!==null){var a=o(r);if(a!==null){if(r=a.tag,r===13){if(r=u(a),r!==null){i.blockedOn=r,J_(i.priority,function(){ry(a)});return}}else if(r===31){if(r=h(a),r!==null){i.blockedOn=r,J_(i.priority,function(){ry(a)});return}}else if(r===3&&a.stateNode.current.memoizedState.isDehydrated){i.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Iu(i){if(i.blockedOn!==null)return!1;for(var r=i.targetContainers;0<r.length;){var a=I1(i.nativeEvent);if(a===null){a=i.nativeEvent;var c=new a.constructor(a.type,a);xf=c,a.target.dispatchEvent(c),xf=null}else return r=sl(a),r!==null&&ny(r),i.blockedOn=a,!1;r.shift()}return!0}function oy(i,r,a){Iu(i)&&a.delete(r)}function P9(){F1=!1,Fr!==null&&Iu(Fr)&&(Fr=null),Ur!==null&&Iu(Ur)&&(Ur=null),Vr!==null&&Iu(Vr)&&(Vr=null),fo.forEach(oy),po.forEach(oy)}function Pu(i,r){i.blockedOn===r&&(i.blockedOn=null,F1||(F1=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,P9)))}var Fu=null;function cy(i){Fu!==i&&(Fu=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Fu===i&&(Fu=null);for(var r=0;r<i.length;r+=3){var a=i[r],c=i[r+1],f=i[r+2];if(typeof c!="function"){if(P1(c||a)===null)continue;break}var m=sl(a);m!==null&&(i.splice(r,3),r-=3,wd(m,{pending:!0,data:f,method:a.method,action:c},c,f))}}))}function Yl(i){function r(A){return Pu(A,i)}Fr!==null&&Pu(Fr,i),Ur!==null&&Pu(Ur,i),Vr!==null&&Pu(Vr,i),fo.forEach(r),po.forEach(r);for(var a=0;a<qr.length;a++){var c=qr[a];c.blockedOn===i&&(c.blockedOn=null)}for(;0<qr.length&&(a=qr[0],a.blockedOn===null);)ay(a),a.blockedOn===null&&qr.shift();if(a=(i.ownerDocument||i).$$reactFormReplay,a!=null)for(c=0;c<a.length;c+=3){var f=a[c],m=a[c+1],b=f[vi]||null;if(typeof m=="function")b||cy(a);else if(b){var x=null;if(m&&m.hasAttribute("formAction")){if(f=m,b=m[vi]||null)x=b.formAction;else if(P1(f)!==null)continue}else x=b.action;typeof x=="function"?a[c+1]=x:(a.splice(c,3),c-=3),cy(a)}}}function uy(){function i(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(b){return f=b})},focusReset:"manual",scroll:"manual"})}function r(){f!==null&&(f(),f=null),c||setTimeout(a,20)}function a(){if(!c&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,f=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(a,100),function(){c=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),f!==null&&(f(),f=null)}}}function U1(i){this._internalRoot=i}Uu.prototype.render=U1.prototype.render=function(i){var r=this._internalRoot;if(r===null)throw Error(s(409));var a=r.current,c=Bi();ty(a,c,i,r,null,null)},Uu.prototype.unmount=U1.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var r=i.containerInfo;ty(i.current,2,null,i,null,null),ku(),r[rl]=null}};function Uu(i){this._internalRoot=i}Uu.prototype.unstable_scheduleHydration=function(i){if(i){var r=Q_();i={blockedOn:null,target:i,priority:r};for(var a=0;a<qr.length&&r!==0&&r<qr[a].priority;a++);qr.splice(a,0,i),a===0&&ay(i)}};var hy=t.version;if(hy!=="19.3.1")throw Error(s(527,hy,"19.3.1"));Se.findDOMNode=function(i){var r=i._reactInternals;if(r===void 0)throw typeof i.render=="function"?Error(s(188)):(i=Object.keys(i).join(","),Error(s(268,i)));return i=d(r),i=i!==null?g(i):null,i=i===null?null:i.stateNode,i};var F9={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:fe,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vu.isDisabled&&Vu.supportsFiber)try{wa=Vu.inject(F9),Mi=Vu}catch{}}return go.createRoot=function(i,r){if(!l(i))throw Error(s(299));var a=!1,c="",f=ev,m=tv,b=iv;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onUncaughtError!==void 0&&(f=r.onUncaughtError),r.onCaughtError!==void 0&&(m=r.onCaughtError),r.onRecoverableError!==void 0&&(b=r.onRecoverableError)),r=J3(i,1,!1,null,null,a,c,null,f,m,b,uy),i[rl]=r.current,v1(i),new U1(r)},go.hydrateRoot=function(i,r,a){if(!l(i))throw Error(s(299));var c=!1,f="",m=ev,b=tv,x=iv,A=null;return a!=null&&(a.unstable_strictMode===!0&&(c=!0),a.identifierPrefix!==void 0&&(f=a.identifierPrefix),a.onUncaughtError!==void 0&&(m=a.onUncaughtError),a.onCaughtError!==void 0&&(b=a.onCaughtError),a.onRecoverableError!==void 0&&(x=a.onRecoverableError),a.formState!==void 0&&(A=a.formState)),r=J3(i,1,!0,r,a??null,c,f,A,m,b,x,uy),r.context=ey(null),a=r.current,c=Bi(),c=gf(c),f=Mr(c),f.callback=null,Ar(a,f,c),a=c,r.current.lanes=a,Ca(r,a),Tn(r),i[rl]=r.current,v1(i),new Uu(r)},go.version="19.3.1",go}var by;function eC(){if(by)return $1.exports;by=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),$1.exports=J9(),$1.exports}var em=eC();const tC=da(em),iC=Yh({__proto__:null,default:tC},[em]);function Wo(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}class es extends Error{}class V5 extends es{}function nC(e){const t=Wo(e);return t===null?!1:t.full===!0?!0:t.full===!1?!1:t.type==="snapshot"}function rC(e){const t=Wo(e);if(t===null)return null;const n=t.seq;return typeof n=="number"&&Number.isFinite(n)?n:null}function vo(e){if(e===void 0)return[];if(!Array.isArray(e))throw new es("条目字段不是数组");const t=[];for(const n of e){const s=Wo(n),l=s?.id;if(s===null||typeof l!="number"||!Number.isFinite(l))throw new es("条目缺少数字 id");t.push(s)}return t}function sC(e){if(e===void 0)return[];if(!Array.isArray(e))throw new es("removedIds 不是数组");const t=[];for(const n of e)typeof n=="number"&&Number.isFinite(n)&&t.push(n);return t}function lC(e,t){const n=Wo(t);if(n===null)throw new es("帧不是对象");const s=rC(n);if(s===null)throw new es("帧缺少 seq");const l=nC(n);if(e===null&&!l)throw new es("第一帧必须是全量帧");if(e!==null){if(s<=e.seq)return e;if(!l&&s>e.seq+1)throw new V5(`帧号跳号:手上有 seq ${String(e.seq)},收到 seq ${String(s)}`)}if(l){const d={};for(const[g,_]of Object.entries(n))g==="entries"||g==="liveEntries"||g==="type"||g==="full"||(d[g]=_);return{...d,seq:s,entries:vo(n.entries),liveEntries:vo(n.liveEntries)}}const o=Wo(n.meta);if(o===null)throw new es("增量帧缺少 meta");const u=new Map;for(const d of e?.entries??[])u.set(d.id,d);for(const d of sC(n.removedIds))u.delete(d);for(const d of vo(n.updated))u.set(d.id,d);for(const d of vo(n.added))u.set(d.id,d);const h=[...u.values()].sort((d,g)=>d.id-g.id),p="liveEntries"in n?vo(n.liveEntries):e?.liveEntries??[];return{...e??{},...o,seq:s,entries:h,liveEntries:p}}class aC{inFlight=new Map;executed=new Set;failed=new Set;loadShared(t,n){let s=this.inFlight.get(t);return s===void 0&&(s=n.load(t).then(()=>{this.executed.add(t)}).finally(()=>{this.inFlight.delete(t)}),this.inFlight.set(t,s)),s}async arrive(t,n){const s={requests:[],failures:[]};if(n.has(t.id))return s;const l=async u=>{s.requests.push(u);try{await this.loadShared(u,n)}catch(h){return s.failures.push(`${u}: ${h instanceof Error?h.message:String(h)}`),"transport-failed"}return n.has(t.id)?"registered":(s.failures.push(`${u}: 脚本执行了却没有注册「${t.id}」的工厂`),"not-registered")};let o="transport-failed";if(this.failed.has(t.preferred)?s.failures.push(`${t.preferred}: 这个地址上一次已经失败过,跳过`):t.fallback!==void 0&&this.executed.has(t.preferred)?(s.failures.push(`${t.preferred}: 批已经执行过却没注册「${t.id}」,不再重放`),o="not-registered",this.failed.add(t.preferred)):(o=await l(t.preferred),o==="transport-failed"&&(o=await l(t.preferred)),o!=="registered"&&t.fallback!==void 0&&this.failed.add(t.preferred)),o!=="registered"&&t.fallback!==void 0&&(o=await l(t.fallback)),o!=="registered")throw new Error(`插件「${t.id}」取不回来:${s.failures.join(";")}`);return s}}class oC extends Error{constructor(t,n){super(`槽位 ${t} 没有被声明(已声明:${n.length===0?"无":n.join("、")})`)}}class cC extends Error{constructor(t,n,s){super(`槽位 ${t} 已经声明成 ${n},不能再声明成 ${s}`)}}class uC extends Error{constructor(t,n,s,l,o){const u=n===""?"这个槽":`格子 ${n}`;super(`槽位 ${t} 的${u}里已经有 ${l}(priority ${String(s)})。想替换它就把 ${o} 的 priority 调小(例如 ${String(s-1)}),或者换个 id。`)}}class hC extends Error{constructor(t){super(`槽位 ${t} 是 keyed 形态,register 必须给 key(决定这条登记负责哪一格)`)}}class fC extends Error{constructor(t){super(`槽位 ${t} 是 chain 形态,register 必须给 select(这条登记靠它参与选举)`)}}class jn extends Error{}class dC{kinds=new Map;entries=new Map;broken=new Set;listeners=new Set;faultLog=[];faultListeners=new Set;waiters=new Map;seats=new Map;factories=new Map;factoryVersions=new Map;factoryListeners=new Map;winnersCache=new Map;versions=new Map;globalVersion=0;seq=0;declare(t,n){const s=this.kinds.get(t);if(s!==void 0){if(s.kind!==n)throw new cC(t,s.kind,n);s.refs+=1}else this.kinds.set(t,{kind:n,refs:1}),this.runWaiters(t);let l=!1;return()=>{if(l)return;l=!0;const o=this.kinds.get(t);o!==void 0&&(o.refs-=1,!(o.refs>0)&&(this.kinds.delete(t),this.entries.delete(t),this.suspendWaiters(t),this.bump(t)))}}injectSlot(t,n){const s={contribute:n,ran:!1,dispose:null},l=this.waiters.get(t)??new Set;return l.add(s),this.waiters.set(t,l),this.kinds.has(t)&&this.runWaiter(t,s),()=>{l.delete(s),l.size===0&&this.waiters.delete(t),this.suspendWaiter(t,s)}}register(t,n,s){const l=this.kinds.get(t);if(l===void 0)throw new oC(t,this.slots);const o=l.kind==="keyed"?n.key:null;if(l.kind==="keyed"&&(o===void 0||o===""))throw new hC(t);if(l.kind==="chain"&&n.select===void 0)throw new fC(t);const u=n.priority??0,h=l.kind==="chain"?"":l.kind==="list"?n.id:l.kind==="keyed"?o:"",p=this.entries.get(t)??[],d=l.kind==="chain"?void 0:p.find(v=>v.cell===h&&v.priority===u);if(d!==void 0)throw new uC(t,h,u,d.id,n.id);const g=this.declareChildren(n.children),_=n.store??null;_!==null&&this.holdSeat(_);const S={slot:t,id:n.id,order:n.order??0,priority:u,key:o??null,cell:h,children:Object.keys(n.children??{}),select:n.select??null,component:s,store:_,seq:this.seq};return this.seq+=1,this.entries.set(t,[...p,S].sort(tm)),this.bump(t),()=>{const v=this.entries.get(t);if(v!==void 0){const w=v.filter(C=>C!==S);w.length!==v.length&&(this.entries.set(t,w),this.broken.delete(S),this.bump(t))}S.store!==null&&this.releaseSeat(S.store);for(const w of g)w()}}elect(t,n){if(this.kinds.get(t)?.kind!=="chain")throw new jn(`槽位 ${t} 不是 chain 形态(elect 只对 chain 有意义)`);const s=[...this.entries.get(t)??Ps].sort(wy);for(const l of s)if(!this.broken.has(l))try{const o=l.select,u=o===null?null:o(n);if(u!=null)return{entry:l,matched:u}}catch(o){this.broken.add(l),this.record({slot:t,id:l.id,phase:"render",error:yo(o)}),this.bump(t)}return null}reportFault(t,n){this.broken.has(t)||(this.broken.add(t),this.record({slot:t.slot,id:t.id,phase:"render",error:yo(n)}),this.bump(t.slot))}onFault(t){return this.faultListeners.add(t),()=>{this.faultListeners.delete(t)}}get faults(){return this.faultLog}get slots(){return[...this.kinds.keys()]}spec(t){return this.kinds.get(t)?.kind}entriesOf(t){return this.entries.get(t)??Ps}winners(t){const n=this.versions.get(t)??0,s=this.winnersCache.get(t);if(s!==void 0&&s.version===n)return s.list;const l=this.kinds.get(t)?.kind,o=this.kinds.has(t)?l==="chain"?[...this.entries.get(t)??Ps].filter(u=>!this.broken.has(u)).sort(wy):pC(this.entries.get(t)??Ps,this.broken):Ps;return this.winnersCache.set(t,{version:n,list:o}),o}version(t){return this.versions.get(t)??0}getVersion(){return this.globalVersion}subscribe(t,n){const s={slot:n??null,fn:t};return this.listeners.add(s),()=>{this.listeners.delete(s)}}get size(){let t=0;for(const n of this.entries.values())t+=n.length;return t}brokenCount(t){let n=0;for(const s of this.entries.get(t)??[])this.broken.has(s)&&(n+=1);return n}seat(t){const n=this.seats.get(t);if(n!==void 0)return n.instance===void 0&&(n.instance=t.create()),n.instance}registerFactory(t,n){if(this.factories.get(t.name)!==void 0)throw new jn(`装配错误:Factory「${t.name}」已经定义(先注册者还在账上),一个名字只许一个定义`);const l=this.declareChildren(t.children),o=t.store??null;o!==null&&this.holdSeat(o);const u={name:t.name,component:n,children:Object.freeze(Object.keys(t.children??{})),slots:Object.freeze(Object.keys(t.slots??{})),store:o};this.factories.set(t.name,u),this.bumpFactory(t.name);let h=!1;return()=>{if(!h&&(h=!0,this.factories.get(t.name)===u)){this.factories.delete(t.name),this.bumpFactory(t.name),u.store!==null&&this.releaseSeat(u.store);for(const p of l)p()}}}factory(t){return this.factories.get(t)}factoryVersion(t){return this.factoryVersions.get(t)??0}subscribeFactory(t,n){const s=this.factoryListeners.get(t)??new Set;return s.add(n),this.factoryListeners.set(t,s),()=>{s.delete(n),s.size===0&&this.factoryListeners.delete(t)}}reportFactoryFault(t,n,s){this.record({slot:`factory:${t}`,id:n,phase:"render",error:yo(s)})}holdSeat(t){const n=this.seats.get(t);n===void 0?this.seats.set(t,{refs:1,instance:void 0}):n.refs+=1}releaseSeat(t){const n=this.seats.get(t);n!==void 0&&(n.refs-=1,!(n.refs>0)&&this.seats.delete(t))}bumpFactory(t){this.factoryVersions.set(t,(this.factoryVersions.get(t)??0)+1);const n=this.factoryListeners.get(t);if(n!==void 0)for(const s of[...n])try{s()}catch(l){console.error(`Factory ${t} 的订阅者抛异常:`,l)}}declareChildren(t){if(t===void 0)return[];const n=[];for(const[s,l]of Object.entries(t))l!==void 0&&n.push(this.declare(s,l));return n}runWaiters(t){const n=this.waiters.get(t);if(n!==void 0)for(const s of[...n])this.runWaiter(t,s)}runWaiter(t,n){if(!n.ran){n.ran=!0;try{const s=n.contribute();n.dispose=typeof s=="function"?s:null}catch(s){this.record({slot:t,id:"",phase:"contribute",error:yo(s)})}}}suspendWaiters(t){const n=this.waiters.get(t);if(n!==void 0)for(const s of[...n])this.suspendWaiter(t,s)}suspendWaiter(t,n){if(!n.ran)return;n.ran=!1;const s=n.dispose;if(n.dispose=null,s!==null)try{s()}catch(l){this.record({slot:t,id:"",phase:"dispose",error:yo(l)})}}bump(t){this.versions.set(t,(this.versions.get(t)??0)+1),this.globalVersion+=1;for(const n of[...this.listeners])if(!(n.slot!==null&&n.slot!==t))try{n.fn()}catch(s){console.error(`槽位 ${t} 的订阅者抛异常:`,s)}}record(t){this.faultLog=[...this.faultLog,t].slice(-50);for(const n of[...this.faultListeners])try{n(t)}catch(s){console.error("槽位故障监听器抛异常:",s)}}}const Ps=Object.freeze([]);function pC(e,t){if(e.length===0)return Ps;const n=new Map;for(const s of e){if(t.has(s))continue;const l=n.get(s.cell);(l===void 0||mC(s,l)<0)&&n.set(s.cell,s)}return n.size===0?Ps:[...n.values()].sort(tm)}function tm(e,t){return e.order===t.order?e.seq-t.seq:e.order-t.order}function mC(e,t){return e.priority!==t.priority?e.priority-t.priority:tm(e,t)}function wy(e,t){return e.priority===t.priority?e.seq-t.seq:e.priority-t.priority}function yo(e){return e instanceof Error?e:new Error(String(e))}function _C(e){return{spec:e,create(){let t=e.init();const n=new Set,s=o=>{t=o;for(const u of[...n])u()},l={};for(const o of Object.keys(e.actions)){const u=e.actions[o];l[o]=(...h)=>{const p={...t};u(p,...h),s(p)}}return{getSnapshot:()=>t,subscribe:o=>(n.add(o),()=>{n.delete(o)}),actions:l,set:s}}}}function q5(e,t){return{get slots(){return e.slots},spec:n=>e.spec(n),declare:(n,s)=>t(e.declare(n,s)),register:(n,s,l)=>t(e.register(n,s,l)),registerFactory:(n,s)=>t(e.registerFactory(n,s)),seat:n=>e.seat(n),injectSlot:(n,s)=>t(e.injectSlot(n,s)),entriesOf:n=>e.entriesOf(n),winners:n=>e.winners(n)}}class gC extends Error{constructor(t,n,s){super(`服务「${t}」已经由插件 ${n} 提供,插件 ${s} 不能重复提供(一个名字只能有一个提供者)`)}}class vC extends Error{constructor(t){const n=typeof t=="string"?`「${t}」`:String(t);super(`服务名必须是非空字符串,收到的是 ${n}`)}}class $5{records=new Map;listeners=new Set;provide(t,n,s){if(typeof t!="string"||t==="")throw new vC(t);const l=this.records.get(t);if(l!==void 0)throw new gC(t,l.provider,s);const o={name:t,value:n,provider:s};this.records.set(t,o),this.notify();let u=!1;return()=>{u||(u=!0,this.records.get(t)===o&&(this.records.delete(t),this.notify()))}}consume(t){return this.records.get(t)?.value}has(t){return this.records.has(t)}names(){return[...this.records.keys()]}providerOf(t){return this.records.get(t)?.provider}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}notify(){for(const t of[...this.listeners])try{t()}catch(n){console.error("服务表订阅者抛异常:",n)}}}function yC(e,t,n,s){const l=[];for(const o of e.plugins??[]){const u=t(o);u===void 0?l.push(s?.has(o)===!0?`插件 ${o} 被停用了(在插件中心或 ~/.dsc/plugins.json 里打开)`:`插件 ${o} 不在清单里`):u.ok!==!0&&l.push(`插件 ${o} 没装上:${u.error??"未知原因"}`)}for(const o of e.services??[])n.has(o)||l.push(`服务 ${o} 还没有提供者`);return l}const Y5=I.createContext(null);function SC({services:e,children:t}){return y.jsx(Y5.Provider,{value:e,children:t})}function K5(e){const t=I.useContext(Y5),n=I.useCallback(l=>t===null?()=>{}:t.subscribe(l),[t]),s=I.useCallback(()=>t===null?void 0:t.consume(e),[t,e]);return I.useSyncExternalStore(n,s,s)}function im(e,t){const n=I.useCallback(l=>e.subscribe(l,t),[e,t]),s=I.useCallback(()=>e.winners(t),[e,t]);return I.useSyncExternalStore(n,s,s)}function W5(e){const t=I.useCallback(s=>e.subscribe(s),[e]),n=I.useCallback(()=>e.faults,[e]);return I.useSyncExternalStore(t,n,n)}function G5(e,t,n=Object.is){const s=I.useRef(t);s.current=t;const l=I.useRef(n);l.current=n;const[o,u]=I.useState(()=>e===void 0?void 0:t(e.getSnapshot())),h=I.useRef(o);return I.useEffect(()=>{if(e===void 0){h.current!==void 0&&(h.current=void 0,u(void 0));return}const p=()=>{const d=s.current(e.getSnapshot());h.current!==void 0&&l.current(h.current,d)||(h.current=d,u(d))};return p(),e.subscribe(p)},[e]),o}function X5(e,t){const n=I.useMemo(()=>t===null?void 0:e.seat(t),[e,t]),s=I.useCallback((l,o)=>G5(n,l,o),[n]);return I.useMemo(()=>{if(t===null)return bC;if(n===void 0)throw new jn("席位的实例不在账上:登记的持有者还在,实例却已释放(装配错误)");return{useStore:s,actions:n.actions}},[t,n,s])}const bC=Object.freeze({}),wC="browser-tab-open-request",xC="browser-tab-close-request",CC=["git-stage","git-unstage","git-commit","git-checkout","git-branch-create"],EC=["term-spawn","term-input","term-kill"];new Set(EC);new Set(CC);const I0=3,P0=["setWindowChrome","setThemeSource","chooseDirectory","pickDirectory","rememberCwd","switchCwd","recentCwds","removeRecentCwd","openPath","openExternal","openWorkspace","installSkill","installPlugin","installMarketSkill","setMarketSources","setUiTrust","saveProvider","removeProvider","setProviderKey","setConfigFile","pickConfigFile","setPolicy","setReviewer","usePermissionPreset","setDefaultPermissionPreset","sessionUsage","notify","restartHost","quit","terminal","dockBrowser","browserNav","browserClose","checkUpdate","installUpdate"],kC=["dock-data","browser-state","browser-open-requested","update-status","update-progress",wC,xC];new Set(kC);new Set(P0);const TC=/[\u1100-\u11FF\u2E80-\u9FFF\uA000-\uA4CF\uAC00-\uD7FF\uF900-\uFAFF\uFE30-\uFE4F\uFF00-\uFFEF]/;function MC(e){let t=0,n=0;for(const s of e)TC.test(s)?t+=1:n+=1;return t*.65+n*.33}const AC=["off","low","high","max"],DC=["thinking","reasoning-effort","none"],OC=["text","image","video"],RC="thinking",LC=["off","low","high","max"],NC={off:"关",low:"低",high:"高",max:"最大"},zC={off:"none",low:"low",high:"high",max:"max"},BC={text:"文本",image:"照片",video:"视频"},jC={thinking:{label:"thinking 开关",help:"DeepSeek / GLM 风格:只有开与关,低·高·最大都发 enabled"},"reasoning-effort":{label:"reasoning_effort",help:"OpenAI 与多数网关风格:按档位发线上值,可逐档改名字"},none:{label:"不发思考字段",help:"端点没有思考参数:选哪档都不发,只有「默认」有意义"}},HC={thinkingLevels:[...LC],thinkingParam:RC,effortMap:{},modalities:["text"]},IC=4e6;function xy(e){const t=e.charCodeAt(0)===65279?e.slice(1):e;return t===""?[]:(t.endsWith(`
11
- `)?t.slice(0,-1):t).split(`
12
- `).map(s=>s.endsWith("\r")?s.slice(0,-1):s)}function PC(e,t){const n=o=>o===""?"none":o.includes(`\r
13
- `)?"crlf":"lf",s=n(e),l=n(t);return s!=="none"&&l!=="none"&&s!==l}function FC(e,t,n){let s=0;const l=Math.min(e.length,t.length);for(;s<l&&e[s]===t[s];)s+=1;let o=0;for(;o<l-s&&e[e.length-1-o]===t[t.length-1-o];)o+=1;const u=e.length-s-o,h=t.length-s-o,p=s<l||u>0?`第 ${String(s+1)} 行起`:"文件末尾";return{ok:!1,hunks:[],added:Math.max(0,h),removed:Math.max(0,u),note:`${n};从${p}开始不一样:删 ${String(Math.max(0,u))} 行、加 ${String(Math.max(0,h))} 行`,identical:!1,oversize:!0}}function UC(e,t,n){const s=xy(e),l=xy(t),o=Math.max(0,Math.min(Math.round(n),50));if(e===t)return{ok:!0,hunks:[],added:0,removed:0,identical:!0,oversize:!1};const u=PC(e,t)?"(顺带改了换行风格:CRLF ↔ LF)":"",h=Math.min(s.length,l.length);let p=0;for(;p<h&&s[p]===l[p];)p+=1;let d=0;for(;d<h-p&&s[s.length-1-d]===l[l.length-1-d];)d+=1;const g=s.slice(p,s.length-d),_=l.slice(p,l.length-d),S=(g.length+1)*(_.length+1);if(g.length>0&&_.length>0&&S>IC)return FC(s,l,`改动区间过大(约 ${String(g.length)} 行 vs ${String(_.length)} 行),只给摘要`);const v=VC(g,_),w=[];let C=p,E=p;for(const R of v)R==="context"?(w.push({kind:"context",text:g[C-p]??"",oldLine:C+1,newLine:E+1}),C+=1,E+=1):R==="remove"?(w.push({kind:"remove",text:g[C-p]??"",oldLine:C+1,newLine:null}),C+=1):(w.push({kind:"add",text:_[E-p]??"",oldLine:null,newLine:E+1}),E+=1);const M=[...s.slice(0,p).map((R,V)=>({kind:"context",text:R,oldLine:V+1,newLine:V+1})),...w,...s.slice(s.length-d).map((R,V)=>({kind:"context",text:R,oldLine:s.length-d+V+1,newLine:l.length-d+V+1}))],U=qC(M,o),B=w.reduce((R,V)=>R+(V.kind==="add"?1:0),0),X=w.reduce((R,V)=>R+(V.kind==="remove"?1:0),0),Q=u===""?void 0:`${u}(逐行差异已忽略行尾风格)`;return{ok:!0,hunks:U,added:B,removed:X,identical:!1,oversize:!1,...Q!==void 0?{note:Q}:{}}}function VC(e,t){const n=e.length,s=t.length;if(n===0)return new Array(s).fill("add");if(s===0)return new Array(n).fill("remove");const l=s+1,o=new Int32Array((n+1)*l);for(let d=n-1;d>=0;d-=1)for(let g=s-1;g>=0;g-=1)o[d*l+g]=e[d]===t[g]?(o[(d+1)*l+g+1]??0)+1:Math.max(o[(d+1)*l+g]??0,o[d*l+g+1]??0);const u=[];let h=0,p=0;for(;h<n&&p<s;)e[h]===t[p]?(u.push("context"),h+=1,p+=1):(o[(h+1)*l+p]??0)>=(o[h*l+p+1]??0)?(u.push("remove"),h+=1):(u.push("add"),p+=1);for(;h<n;)u.push("remove"),h+=1;for(;p<s;)u.push("add"),p+=1;return u}function qC(e,t){const n=e.map((l,o)=>l.kind==="context"?-1:o).filter(l=>l>=0);if(n.length===0)return[];const s=[];for(const l of n){const o=Math.max(0,l-t),u=Math.min(e.length-1,l+t),h=s[s.length-1];h!==void 0&&o<=h.to+1?h.to=Math.max(h.to,u):s.push({from:o,to:u})}return s.map(l=>{const o=e.slice(l.from,l.to+1),u=o[0];return{oldStart:u.oldLine??e[l.from-1]?.oldLine??0,oldCount:o.reduce((h,p)=>h+(p.kind==="add"?0:1),0),newStart:u.newLine??e[l.from-1]?.newLine??0,newCount:o.reduce((h,p)=>h+(p.kind==="remove"?0:1),0),lines:o}})}function Z5(e){return e instanceof Error?e.message:String(e)}function Q5(e){return e.decodeMs>0?e.decodeTokens/(e.decodeMs/1e3):null}function J5(e){return e.ttftSteps>0?e.ttftMs/e.ttftSteps:null}function eS(e){const t=Math.max(0,e);return t>=10?String(Math.round(t)):String(Math.round(t*10)/10)}function tS(e,t){return e.repo===t.repo&&e.branch===t.branch&&e.detached===t.detached&&e.dirtyFileCount===t.dirtyFileCount}const Cy=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/;function nm(e){const t=[],n=e.split(/\r?\n/);let s=0;for(;s<n.length;){const l=(n[s]??"").match(Cy);if(l===null){s+=1;continue}s+=1;const o=[];let u=Number(l[1]),h=Number(l[3]);for(;s<n.length;){const p=n[s]??"";if(Cy.test(p))break;const d=p.charAt(0);if(d==="\\"){s+=1;continue}if(d===" ")o.push({kind:"context",text:p.slice(1),oldLine:u,newLine:h}),u+=1,h+=1;else if(d==="-")o.push({kind:"remove",text:p.slice(1),oldLine:u,newLine:null}),u+=1;else if(d==="+")o.push({kind:"add",text:p.slice(1),oldLine:null,newLine:h}),h+=1;else break;s+=1}o.length>0&&t.push({oldStart:Number(l[1]),oldCount:o.reduce((p,d)=>p+(d.kind==="add"?0:1),0),newStart:Number(l[3]),newCount:o.reduce((p,d)=>p+(d.kind==="remove"?0:1),0),lines:o})}return t}function iS(e){const t=[],n=e.split(/^diff --git /m).filter(s=>s.trim()!=="");for(const s of n){const l=s.indexOf(`
14
- `),o=l<0?s:s.slice(0,l),u=o.match(/^a\/(.*) b\/(.*)$/),h=(u!==null?u[2]:o).trim();if(h==="")continue;const p=nm(s);if(p.length===0)continue;let d=0,g=0;for(const _ of p)for(const S of _.lines)S.kind==="add"?d+=1:S.kind==="remove"&&(g+=1);t.push({path:h,added:d,removed:g,hunks:p})}return t}function pa(e){let t=e;const n=new Set,s=()=>{for(const l of[...n])l()};return{get:()=>t,set:l=>{Object.is(l,t)||(t=l,s())},notify:s,subscribe:l=>(n.add(l),()=>{n.delete(l)})}}function Kh(e){return{"--dsc-icon-size":`${e}px`}}function rm(e){return Kh(e)}function we(e,{size:t=16,className:n},s="0 0 24 24"){return y.jsx("svg",{width:t,height:t,style:Kh(t),viewBox:s,fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",className:n,"aria-hidden":!0,children:e})}function sm(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M12 5v14"}),y.jsx("path",{d:"M5 12h14"})]}),e)}function ns(e){return we(y.jsx("path",{d:"M3.5 6.5A1.5 1.5 0 0 1 5 5h4.2c.4 0 .8.16 1.06.44L11.5 6.7h7A1.5 1.5 0 0 1 20 8.2v9.3a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 4 17.5Z"}),e)}function nS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M4 9V6.5A1.5 1.5 0 0 1 5.5 5h3.7c.4 0 .78.16 1.06.44L11.5 6.7h7A1.5 1.5 0 0 1 20 8.2V9"}),y.jsx("path",{d:"M2.8 12.6 4.4 8.4A1.2 1.2 0 0 1 5.5 7.6h13a1.2 1.2 0 0 1 1.13 1.55l-1.7 6.1a1.5 1.5 0 0 1-1.44 1.1H4.2a1.5 1.5 0 0 1-1.4-2.05Z"})]}),e)}function Qr(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("circle",{cx:"11",cy:"11",r:"6.5"}),y.jsx("path",{d:"m20 20-3.8-3.8"})]}),e)}function Wh(e){return we(y.jsx("path",{d:"m6 9.5 6 6 6-6"}),e)}function rS(e){return we(y.jsx("path",{d:"m9.5 6 6 6-6 6"}),e)}function _h(e){return we(y.jsx("path",{d:"m14.5 6-6 6 6 6"}),e)}function sS(e){return we(y.jsx("path",{d:"m6 14.5 6-6 6 6"}),e)}function lS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M12 19V5"}),y.jsx("path",{d:"m6 11 6-6 6 6"})]}),e)}function aS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M4.5 12h14"}),y.jsx("path",{d:"m12.5 6 6 6-6 6"})]}),e)}function oS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M15 3.5h5.5V9"}),y.jsx("path",{d:"M20.5 3.5 14 10"}),y.jsx("path",{d:"M9 20.5H3.5V15"}),y.jsx("path",{d:"M3.5 20.5 10 14"})]}),e)}function cS(e){return we(y.jsx("rect",{x:"7",y:"7",width:"10",height:"10",rx:"2",fill:"currentColor",stroke:"none"}),e)}function uS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("rect",{x:"9",y:"9",width:"11",height:"11",rx:"2"}),y.jsx("path",{d:"M5 15H4.5A1.5 1.5 0 0 1 3 13.5v-9A1.5 1.5 0 0 1 4.5 3h9A1.5 1.5 0 0 1 15 4.5V5"})]}),e)}function hS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M7 4v13"}),y.jsx("path",{d:"m3.5 7.5 3.5-3.5 3.5 3.5"}),y.jsx("path",{d:"M17 20V7"}),y.jsx("path",{d:"m13.5 16.5 3.5 3.5 3.5-3.5"})]}),e)}function qs(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("rect",{x:"3.5",y:"4.5",width:"17",height:"15",rx:"2.5"}),y.jsx("path",{d:"M9.5 4.5v15"})]}),e)}function fS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("circle",{cx:"12",cy:"12",r:"8.5"}),y.jsx("path",{d:"M12 7.5V12l3 2"})]}),e)}function dS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M12 3.5 5 6.2v5.1c0 4.4 3 7.6 7 9.2 4-1.6 7-4.8 7-9.2V6.2Z"}),y.jsx("path",{d:"m9 11.8 2.2 2.2L15.5 9.5"})]}),e)}function Gh(e){return we(y.jsx("path",{d:"M10 3.5a2 2 0 0 1 4 0c0 .4-.12.8-.32 1.1h3.82c.55 0 1 .45 1 1v3.1a2 2 0 1 0 0 3.6v3.1c0 .55-.45 1-1 1h-3.32c.2.3.32.7.32 1.1a2 2 0 0 1-4 0c0-.4.12-.8.32-1.1H7a1 1 0 0 1-1-1v-3.1a2 2 0 1 1 0-3.6V5.6c0-.55.45-1 1-1h3.32A1.99 1.99 0 0 1 10 3.5Z"}),e)}function pS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M20.5 12a8.5 8.5 0 1 1-2.6-6.1"}),y.jsx("path",{d:"M20.5 3.5v4h-4"})]}),e)}function mS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M12 3v8"}),y.jsx("path",{d:"M6.4 6.9a8 8 0 1 0 11.2 0"})]}),e)}function lm(e){return we(y.jsx("path",{d:"m5 12.5 4.5 4.5L19 7.5"}),e)}function _S(e){return we(y.jsx("circle",{cx:"12",cy:"12",r:"7.5"}),e)}function gS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("circle",{cx:"12",cy:"12",r:"8.2"}),y.jsx("circle",{cx:"12",cy:"12",r:"3.2"})]}),e)}function vS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("ellipse",{cx:"12",cy:"6.5",rx:"7",ry:"3"}),y.jsx("path",{d:"M5 6.5v5c0 1.66 3.13 3 7 3s7-1.34 7-3v-5"}),y.jsx("path",{d:"M5 11.5v5c0 1.66 3.13 3 7 3s7-1.34 7-3v-5"})]}),e)}function am(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 0 0-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 0 0-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 0 0-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 0 0-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 0 0 1.066-2.573c-.94-1.543.826-3.31 2.37-2.37c1 .608 2.296.07 2.572-1.065z"}),y.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),e)}function yS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("rect",{x:"7",y:"3.5",width:"10",height:"17",rx:"2.2"}),y.jsx("path",{d:"M10.5 6h3"}),y.jsx("circle",{cx:"12",cy:"17.2",r:"0.9",fill:"currentColor",stroke:"none"})]}),e)}function la(e){return we(y.jsx("path",{d:"M12 2.8 14.2 9l6.2 2.2-6.2 2.2L12 19.6 9.8 13.4 3.6 11.2 9.8 9Z"}),e)}function om(e){return we(y.jsx("path",{d:"M13.2 2.8 5.4 13.4h5l-1.2 7.8 7.8-10.6h-5Z"}),e)}function SS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M12 3.2 3.4 8 12 12.8 20.6 8Z"}),y.jsx("path",{d:"M3.4 12.6 12 17.4l8.6-4.8"}),y.jsx("path",{d:"M3.4 16.9 12 21.7l8.6-4.8"})]}),e)}function bS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M12 3.2 3.4 8v7.6l8.6 4.8 8.6-4.8V8Z"}),y.jsx("path",{d:"M3.4 8 12 12.8 20.6 8"}),y.jsx("path",{d:"M12 12.8v7.6"})]}),e)}function wS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M12 4.9a3.3 3.3 0 0 0-5.3 2.6A3.1 3.1 0 0 0 5.3 12a3.2 3.2 0 0 0 1.4 5.3A3 3 0 0 0 12 19.1Z"}),y.jsx("path",{d:"M12 4.9a3.3 3.3 0 0 1 5.3 2.6 3.1 3.1 0 0 1 1.4 4.5 3.2 3.2 0 0 1-1.4 5.3A3 3 0 0 1 12 19.1Z"})]}),e)}function gh(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("circle",{cx:"12",cy:"12",r:"9"}),y.jsx("path",{d:"M12 11v5.5"}),y.jsx("circle",{cx:"12",cy:"7.9",r:"0.9",fill:"currentColor",stroke:"none"})]}),e)}function aa(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("circle",{cx:"12",cy:"12",r:"9"}),y.jsx("path",{d:"M3.2 12h17.6"}),y.jsx("path",{d:"M12 3c2.5 2.4 3.9 5.6 3.9 9s-1.4 6.6-3.9 9c-2.5-2.4-3.9-5.6-3.9-9S9.5 5.4 12 3Z"})]}),e)}function xS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M4 9.5V19a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V9.5"}),y.jsx("path",{d:"M3.2 9.5 5 4.2h14l1.8 5.3a3 3 0 0 1-5.6 1.6 3 3 0 0 1-5.4 0 3 3 0 0 1-5.6-1.6Z"}),y.jsx("path",{d:"M9.6 20v-4.6h4.8V20"})]}),e)}function CS(e){return we(y.jsx("path",{d:"M6 6l12 12M18 6 6 18"}),e)}function ES(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M4.5 6.8h15"}),y.jsx("path",{d:"M9.5 6.8V4.6h5v2.2"}),y.jsx("path",{d:"M6.6 6.8 7.5 20a1 1 0 0 0 1 .9h7a1 1 0 0 0 1-.9l.9-13.2"}),y.jsx("path",{d:"M10.4 10.5v6.4M13.6 10.5v6.4"})]}),e)}function vh(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M4.5 19.5h4l10-10a2.1 2.1 0 0 0-3-3l-10 10Z"}),y.jsx("path",{d:"M13.5 6.5l3 3"})]}),e)}function Xh(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("circle",{cx:"7",cy:"5.5",r:"2.1"}),y.jsx("circle",{cx:"7",cy:"18.5",r:"2.1"}),y.jsx("circle",{cx:"17",cy:"9.5",r:"2.1"}),y.jsx("path",{d:"M7 7.6v8.8"}),y.jsx("path",{d:"M7 12.2h3.6a4.3 4.3 0 0 0 4.3-4.3V9.5"})]}),e)}function kS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M6.4 3.9h7.2l4 4v12.2H6.4z"}),y.jsx("path",{d:"M13.6 3.9v4h4"}),y.jsx("path",{d:"M9.6 11.1h2.8M11 9.7v2.8"}),y.jsx("path",{d:"M9.6 15.2h2.8"})]}),e)}function TS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("circle",{cx:"8.2",cy:"12",r:"3.4"}),y.jsx("path",{d:"M11.6 12H20"}),y.jsx("path",{d:"M17 12v3M14.3 12v2.2"})]}),e)}function MS(e){return we(y.jsxs("g",{fill:"currentColor",stroke:"none",children:[y.jsx("circle",{cx:"5.5",cy:"12",r:"1.15"}),y.jsx("circle",{cx:"12",cy:"12",r:"1.15"}),y.jsx("circle",{cx:"18.5",cy:"12",r:"1.15"})]}),e)}function AS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M4 7.5h8.5"}),y.jsx("circle",{cx:"16.2",cy:"7.5",r:"2"}),y.jsx("path",{d:"M20.5 7.5h-.3"}),y.jsx("path",{d:"M20 16.5h-8.5"}),y.jsx("circle",{cx:"12.2",cy:"16.5",r:"2"}),y.jsx("path",{d:"M4 16.5h4.3"})]}),e)}function DS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M3.8 4.8h16.4a.8.8 0 0 1 .8.8v2.4H3v-2.4a.8.8 0 0 1 .8-.8Z"}),y.jsx("path",{d:"M5 8v9.4a1.6 1.6 0 0 0 1.6 1.6h10.8A1.6 1.6 0 0 0 19 17.4V8"}),y.jsx("path",{d:"M9.8 11.6h4.4"})]}),e)}function OS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M14.2 3.6 20.4 9.8"}),y.jsx("path",{d:"M16.4 5.6 12 11.4l-5.6 2.4 3.8 3.8 2.4-5.6 5.8-4.4Z"}),y.jsx("path",{d:"M9.6 17.4 6.4 20.6"})]}),e)}function rs(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("rect",{x:"3.5",y:"5",width:"17",height:"14",rx:"2"}),y.jsx("path",{d:"m7 9.5 3 2.5-3 2.5"}),y.jsx("path",{d:"M12.5 15H17"})]}),e)}function Zh(e){return we(y.jsx("path",{d:"m9 8-4 4 4 4M15 8l4 4-4 4"}),e)}function RS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M4 20h16"}),y.jsx("path",{d:"M7.5 20v-6"}),y.jsx("path",{d:"M12 20V7.5"}),y.jsx("path",{d:"M16.5 20v-9"})]}),e)}function Qh(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M4.2 4.5v14"}),y.jsx("path",{d:"M4.2 8h4.3"}),y.jsx("path",{d:"M4.2 15h4.3"}),y.jsx("rect",{x:"8.5",y:"5.6",width:"11.3",height:"4.8",rx:"1.4"}),y.jsx("rect",{x:"8.5",y:"12.6",width:"11.3",height:"4.8",rx:"1.4"})]}),e)}function LS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M4 7h16"}),y.jsx("path",{d:"M4 12h16"}),y.jsx("path",{d:"M4 17h16"})]}),e)}function NS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("rect",{x:"3.8",y:"5.4",width:"16.4",height:"14.2",rx:"2"}),y.jsx("path",{d:"M3.8 9.8h16.4"}),y.jsx("path",{d:"M8.4 3.6v3.4M15.6 3.6v3.4"})]}),e)}function zS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M3.8 4.8h16.4a.8.8 0 0 1 .8.8v2.4H3v-2.4a.8.8 0 0 1 .8-.8Z"}),y.jsx("path",{d:"M5 8v9.4a1.6 1.6 0 0 0 1.6 1.6h10.8A1.6 1.6 0 0 0 19 17.4V8"}),y.jsx("path",{d:"M4 3.6 20 19.6"})]}),e)}function yh(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M4 6.5h9.5M4 12h9.5M4 17.5h6"}),y.jsx("path",{d:"M17.5 6.5v11"}),y.jsx("path",{d:"m14.6 14.8 2.9 2.9 2.9-2.9"})]}),e)}function BS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("circle",{cx:"12",cy:"12",r:"8.5"}),y.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),e)}function jS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("ellipse",{cx:"12",cy:"6",rx:"7.5",ry:"3"}),y.jsx("path",{d:"M4.5 6v12c0 1.66 3.36 3 7.5 3s7.5-1.34 7.5-3V6"}),y.jsx("path",{d:"M4.5 12c0 1.66 3.36 3 7.5 3s7.5-1.34 7.5-3"})]}),e)}function HS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M7 10.5 10.8 3.6a2 2 0 0 1 2.7 2.5L12.6 9.6h4.9a1.8 1.8 0 0 1 1.74 2.28l-1.3 5.2A2 2 0 0 1 16 18.6H7"}),y.jsx("rect",{x:"3.4",y:"10.5",width:"3.6",height:"8.1",rx:"1"})]}),e)}function IS(e){return we(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M17 13.5 13.2 20.4a2 2 0 0 1-2.7-2.5l.9-3.5H6.5a1.8 1.8 0 0 1-1.74-2.28l1.3-5.2A2 2 0 0 1 8 5.4h9"}),y.jsx("rect",{x:"17",y:"5.4",width:"3.6",height:"8.1",rx:"1"})]}),e)}function PS(e){const t=e.size??14;return y.jsx("svg",{width:t,height:t,style:Kh(t),viewBox:"0 0 16 16",fill:"none",className:e.className,"aria-hidden":!0,children:y.jsx("path",{d:"M5.5 4.5C5.5 4.40714 5.52586 4.31612 5.57467 4.23713C5.62349 4.15815 5.69334 4.09431 5.77639 4.05279C5.85945 4.01126 5.95242 3.99368 6.0449 4.00202C6.13738 4.01036 6.22572 4.04429 6.3 4.1L10.967 7.6C11.0291 7.64657 11.0795 7.70697 11.1142 7.77639C11.1489 7.84582 11.167 7.92238 11.167 8C11.167 8.07762 11.1489 8.15418 11.1142 8.22361C11.0795 8.29303 11.0291 8.35343 10.967 8.4L6.3 11.9C6.22572 11.9557 6.13738 11.9896 6.0449 11.998C5.95242 12.0063 5.85945 11.9887 5.77639 11.9472C5.69334 11.9057 5.62349 11.8419 5.57467 11.7629C5.52586 11.6839 5.5 11.5929 5.5 11.5V4.5Z",fill:"currentColor"})})}function FS(e){const t=e.size??16;return y.jsxs("svg",{width:t,height:t,style:Kh(t),viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",className:e.className,"aria-hidden":!0,children:[y.jsx("path",{d:"M2.37091 11.2501C1.58745 9.89288 1.32067 8.29835 1.61969 6.76006C1.91872 5.22177 2.76342 3.8433 3.99826 2.87846C5.2331 1.91362 6.77494 1.42737 8.33988 1.50925C9.90482 1.59113 11.3875 2.23562 12.5149 3.32406C13.6425 4.41269 14.3387 5.87206 14.4754 7.4334C14.612 8.99474 14.18 10.5529 13.2587 11.8209C12.3375 13.0888 10.9891 13.9813 9.46194 14.3337C8.18691 14.628 6.85895 14.5294 5.64989 14.0605C5.1712 13.8748 4.76962 13.4932 4.26534 13.3967C3.67413 13.2835 2.95257 13.5598 2.03794 14.3337"}),y.jsx("path",{d:"M8 5V11"}),y.jsx("path",{d:"M5 8H11"})]})}const F0="#C8801F",US="#F3B44C",qu="#34A46F",$C="#2C9CE6",G1="#7C8BA1";function rc(e,t,n,s){return y.jsx("svg",{width:e,height:e,style:rm(e),viewBox:n,fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":!0,children:s})}function VS({size:e=16,className:t}){return rc(e,t,"0 0 24 24",y.jsxs(y.Fragment,{children:[y.jsx("rect",{x:"2.5",y:"5.4",width:"9",height:"6.4",rx:"2",fill:F0}),y.jsx("rect",{x:"2.5",y:"8.6",width:"19",height:"11",rx:"3.1",fill:US})]}))}function qS({size:e=16,className:t}){return rc(e,t,"0 0 24 24",y.jsxs(y.Fragment,{children:[y.jsx("rect",{x:"2.5",y:"5.4",width:"9",height:"6.4",rx:"2",fill:F0}),y.jsx("rect",{x:"2.5",y:"8.6",width:"19",height:"11",rx:"3.1",fill:F0}),y.jsx("path",{d:"M3.6 11.8h17.4c.72 0 1.26.68 1.1 1.38l-1.46 5.6c-.23.9-1.04 1.52-1.97 1.52H5.6c-1.2 0-2.13-1.03-1.99-2.22z",fill:US})]}))}function $S({size:e=16,className:t}){return rc(e,t,"0 0 24 24",y.jsxs(y.Fragment,{children:[y.jsx("rect",{x:"2.9",y:"4.4",width:"18.2",height:"15.2",rx:"3.4",fill:qu,fillOpacity:"0.16"}),y.jsx("rect",{x:"2.9",y:"4.4",width:"18.2",height:"15.2",rx:"3.4",stroke:qu,strokeWidth:"1.5"}),y.jsx("path",{d:"m7.2 9.5 2.9 2.5-2.9 2.5",stroke:qu,strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"}),y.jsx("path",{d:"M12.7 14.8h4",stroke:qu,strokeWidth:"1.7",strokeLinecap:"round"})]}))}function YS({size:e=16,className:t}){return rc(e,t,"0 0 24 24",y.jsx("path",{d:"M23.15 2.587 18.21.162a1.494 1.494 0 0 0-1.643.196L3.82 10.02 1.24 7.966 0 8.66v6.68l1.24.694 2.58-2.054 12.747 9.662a1.494 1.494 0 0 0 1.643.196l4.94-2.425A1.5 1.5 0 0 0 24 19.957V4.043a1.5 1.5 0 0 0-.85-1.456ZM18 17.5l-7-5.5 7-5.5v11Z",fill:$C,fillRule:"evenodd",clipRule:"evenodd"}))}function KS({size:e=16,className:t}){return rc(e,t,"0 0 24 24",y.jsxs(y.Fragment,{children:[y.jsx("rect",{x:"8.4",y:"3.2",width:"11.4",height:"13.2",rx:"2.8",fill:G1,fillOpacity:"0.18"}),y.jsx("rect",{x:"8.4",y:"3.2",width:"11.4",height:"13.2",rx:"2.8",stroke:G1,strokeWidth:"1.5"}),y.jsx("path",{d:"M15.4 16.4v1.6a2.8 2.8 0 0 1-2.8 2.8H6.6a2.8 2.8 0 0 1-2.8-2.8V9.6a2.8 2.8 0 0 1 2.8-2.8h1.4",stroke:G1,strokeWidth:"1.5",strokeLinecap:"round"})]}))}const YC='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';function WS(e,t){const n=I.useRef(null),s=I.useRef(t);return s.current=t,I.useEffect(()=>{if(!e)return;const l=n.current;if(l===null)return;const o=document.activeElement instanceof HTMLElement?document.activeElement:null,u=()=>Array.from(l.querySelectorAll(YC)).filter(g=>g.offsetParent!==null||g===l),p=l.querySelector("[data-autofocus]")??u()[0]??l;p===l&&l.tabIndex<0&&(l.tabIndex=-1),p.focus({preventScroll:!0});const d=g=>{if(g.key==="Escape"){if(s.current===void 0||g.defaultPrevented)return;g.preventDefault(),g.stopPropagation(),s.current();return}if(g.key!=="Tab")return;const _=u();if(_.length===0){g.preventDefault();return}const S=_[0],v=_[_.length-1],w=document.activeElement;g.shiftKey&&(w===S||w===l)?(g.preventDefault(),v.focus()):!g.shiftKey&&w===v&&(g.preventDefault(),S.focus())};return l.addEventListener("keydown",d),()=>{l.removeEventListener("keydown",d),o!==null&&o.isConnected&&o.focus({preventScroll:!0})}},[e]),{ref:n}}function cm({width:e="100%",height:t=12,radius:n=6,className:s}){const l={width:e,height:t,borderRadius:n};return y.jsx("span",{className:s===void 0?"dsc-skeleton":`dsc-skeleton ${s}`,style:l,"aria-hidden":"true"})}function GS({lines:e=3,gap:t=8,widths:n}){return y.jsx("span",{className:"dsc-skeleton-text",style:{gap:t},"aria-hidden":"true",children:Array.from({length:e},(s,l)=>y.jsx(cm,{width:n?.[l]??(l===e-1?"62%":"100%"),height:11},l))})}function XS({label:e}){return y.jsx("span",{className:"dsc-loading-status",role:"status","aria-live":"polite",children:e})}function ZS(e){if(!Number.isFinite(e)||e<0)return"—";if(e<1024)return`${String(Math.round(e))} B`;const t=["KB","MB","GB"];let n=e/1024,s=0;for(;n>=1024&&s<t.length-1;)n/=1024,s+=1;return`${n>=10?String(Math.round(n)):n.toFixed(1).replace(/\.0$/,"")} ${t[s]}`}const um=Object.freeze([]),Jh=Object.freeze([]);function QS(e){const t=e?.status;if(typeof t!="object"||t===null)return null;const n=t.cwd;return typeof n=="string"&&n!==""?n:null}function JS(e){const t=e?.sessions;return Array.isArray(t)?t:um}function e6(e){const t=e?.status;if(typeof t!="object"||t===null)return null;const n=t.sessionPath;return typeof n=="string"?n:null}function t6(e){const t=e?.status;if(typeof t!="object"||t===null)return"idle";const n=t.turnState;return typeof n=="string"?n:"idle"}function i6(e){const t=e?.status;if(typeof t!="object"||t===null)return null;const n=t.compactingSince;return typeof n=="number"&&Number.isFinite(n)?n:null}function n6(e){const t=e?.entries;return Array.isArray(t)?t:Jh}function r6(e){const t=e?.liveEntries;return Array.isArray(t)?t:Jh}function s6(e){const t=e?.status;if(typeof t!="object"||t===null)return null;const n=t.sessionPath;if(typeof n!="string"||n==="")return null;const s=n.replace(/\\/g,"/").split("/").pop()??"";return s.endsWith(".jsonl")?s.slice(0,-6):s}function KC(e){if(typeof e=="string")return e.trim();if(e instanceof Error)return`${e.name}: ${e.message}`.trim();if(e==null)return"";if(typeof e=="object")try{const t=JSON.stringify(e);if(typeof t=="string"&&t!=="{}")return t.slice(0,800)}catch{}try{return String(e).trim()}catch{return""}}const WC=[{match:/econnrefused|econnreset|failed to fetch|fetch failed|networkerror|network error|load failed/,title:"连不上宿主",hint:"确认 Pneuma 还开着;宿主重启过就刷新这个页面。"},{match:/etimedout|timed? ?out|abort(ed)?|timeout/,title:"等太久了,请求被掐断",hint:"再试一次;一直这样的话把模型服务换一个再试。"},{match:/enoent|no such file|not exist|cannot find the path|找不到/,title:"这个路径不存在了",hint:"确认目录还在,或者重新选一次工作区。"},{match:/eacces|eperm|permission denied|access is denied|没有权限/,title:"系统不允许这一步",hint:"换个有写权限的目录,或者用管理员身份重开一次。"},{match:/401|403|unauthorized|invalid api key|api key/,title:"凭据不对或过期",hint:'到设置 → 模型里重新填一次 key,再点"测试连接"。'},{match:/429|rate limit|too many requests|频繁/,title:"请求太频繁,被服务方限流了",hint:"等十几秒再发;连续撞就把并发降下来。"},{match:/404|not found|没有找到/,title:"对方没有这个东西",hint:"核对一下名字或地址;版本对不上时先在设置里刷新一次清单。"},{match:/413|too large|payload|超过(大小|上限)/,title:"这一份太大了",hint:"换小一点的文件,或者先压缩再试。"},{match:/500|502|503|504|internal server error|bad gateway/,title:"对方服务自己出错了",hint:"过一会儿再试;一直这样就是服务方的问题,不是你操作错了。"}];function ef(e,t="这一步没有完成"){const n=KC(e),s=n.toLowerCase();for(const o of WC)if(o.match.test(s))return{title:o.title,hint:o.hint,detail:n};const l=(n.split(/\r?\n/)[0]??"").replace(/^error:\s*/i,"").trim();return{title:l===""?t:l,hint:"再试一次;还不行就把这段原文发出来,好定位。",detail:n}}function l6(e,t){const{title:n,hint:s}=ef(e,t);return`${n}——${s}`}function a6(e,t){const{title:n,hint:s,detail:l}=ef(e,t);return{text:`${n}。${s}`,detail:l}}function o6(e){return y.jsx("span",{className:e.className,children:e.children})}const GC="modulepreload",XC=function(e,t){return new URL(e,t).href},Ey={},ge=function(t,n,s){let l=Promise.resolve();if(n&&n.length>0){let d=function(g){return Promise.all(g.map(_=>Promise.resolve(_).then(S=>({status:"fulfilled",value:S}),S=>({status:"rejected",reason:S}))))};const u=document.getElementsByTagName("link"),h=document.querySelector("meta[property=csp-nonce]"),p=h?.nonce||h?.getAttribute("nonce");l=d(n.map(g=>{if(g=XC(g,s),g in Ey)return;Ey[g]=!0;const _=g.endsWith(".css"),S=_?'[rel="stylesheet"]':"";if(s)for(let w=u.length-1;w>=0;w--){const C=u[w];if(C.href===g&&(!_||C.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${g}"]${S}`))return;const v=document.createElement("link");if(v.rel=_?"stylesheet":GC,_||(v.as="script"),v.crossOrigin="",v.href=g,p&&v.setAttribute("nonce",p),document.head.appendChild(v),_)return new Promise((w,C)=>{v.addEventListener("load",w),v.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${g}`)))})}))}function o(u){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=u,window.dispatchEvent(h),!h.defaultPrevented)throw u}return l.then(u=>{for(const h of u||[])h.status==="rejected"&&o(h.reason);return t().catch(o)})},hm={ts:"typescript",mts:"typescript",cts:"typescript",js:"javascript",mjs:"javascript",cjs:"javascript",jsx:"jsx",tsx:"tsx",json:"json",jsonc:"jsonc",json5:"json5",md:"markdown",mdx:"mdx",py:"python",pyi:"python",rs:"rust",go:"go",java:"java",c:"c",h:"c",cpp:"cpp",cc:"cpp",hpp:"cpp",hh:"cpp",cs:"csharp",kt:"kotlin",kts:"kotlin",swift:"swift",php:"php",rb:"ruby",lua:"lua",scala:"scala",sh:"shellscript",bash:"shellscript",zsh:"shellscript",ps1:"powershell",psm1:"powershell",bat:"bat",cmd:"bat",yml:"yaml",yaml:"yaml",toml:"toml",ini:"ini",cfg:"ini",conf:"ini",env:"dotenv",html:"html",htm:"html",xml:"xml",svg:"xml",xaml:"xml",csproj:"xml",props:"xml",css:"css",scss:"scss",sass:"sass",less:"less",vue:"vue",svelte:"svelte",astro:"astro",sql:"sql",graphql:"graphql",gql:"graphql",proto:"proto",m:"objective-c",mm:"objective-cpp",dart:"dart",r:"r",jl:"julia",ex:"elixir",exs:"elixir",erl:"erlang",hs:"haskell",clj:"clojure",cljs:"clojure",pl:"perl",pm:"perl",zig:"zig",sol:"solidity",fs:"fsharp",diff:"diff",patch:"diff",log:"log",rst:"rst",tex:"latex",makefile:"makefile",mk:"makefile"};function ZC(e){return e.slice(Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"))+1)}function tf(e){const t=ZC(e).toLowerCase(),n=t.includes(".")?t.slice(t.lastIndexOf(".")+1):t;return hm[n]}const fm={typescript:()=>ge(()=>import("./chunk-BPQ3VLAy.js"),[],import.meta.url),tsx:()=>ge(()=>import("./chunk-COt5Ahok.js"),[],import.meta.url),javascript:()=>ge(()=>import("./chunk-wDzz0qaB.js"),[],import.meta.url),jsx:()=>ge(()=>import("./chunk-g9-lgVsj.js"),[],import.meta.url),json:()=>ge(()=>import("./chunk-Cp-IABpG.js"),[],import.meta.url),jsonc:()=>ge(()=>import("./chunk-Des-eS-w.js"),[],import.meta.url),json5:()=>ge(()=>import("./chunk-C9tS-k6U.js"),[],import.meta.url),markdown:()=>ge(()=>import("./chunk-Cvjx9yec.js"),[],import.meta.url),mdx:()=>ge(()=>import("./chunk-Cmh6b_Ma.js"),[],import.meta.url),python:()=>ge(()=>import("./chunk-B6aJPvgy.js"),[],import.meta.url),rust:()=>ge(()=>import("./chunk-DPvrY3IQ.js"),[],import.meta.url),go:()=>ge(()=>import("./chunk-C27-OAKa.js"),[],import.meta.url),java:()=>ge(()=>import("./chunk-CylS5w8V.js"),[],import.meta.url),c:()=>ge(()=>import("./chunk-BIGW1oBm.js"),[],import.meta.url),cpp:()=>ge(()=>import("./chunk-DlC-OlHO.js"),__vite__mapDeps([0,1]),import.meta.url),csharp:()=>ge(()=>import("./chunk-B_TYUkTI.js"),[],import.meta.url),kotlin:()=>ge(()=>import("./chunk-BdnUsdx6.js"),[],import.meta.url),swift:()=>ge(()=>import("./chunk-C2oV4EkX.js"),[],import.meta.url),php:()=>ge(()=>import("./chunk-D38fbIBN.js"),__vite__mapDeps([2,3,4,5,6,7,8,9]),import.meta.url),ruby:()=>ge(()=>import("./chunk-ySF7HWmS.js"),__vite__mapDeps([10,3,4,5,6,7,8,11,12,13,14,0,1,15,16,17]),import.meta.url),lua:()=>ge(()=>import("./chunk-CPTIWCL2.js"),__vite__mapDeps([16,1]),import.meta.url),scala:()=>ge(()=>import("./chunk-CqE71os6.js"),[],import.meta.url),shellscript:()=>ge(()=>import("./chunk-Yzrsuije.js"),[],import.meta.url),bat:()=>ge(()=>import("./chunk-CickPsom.js"),[],import.meta.url),powershell:()=>ge(()=>import("./chunk-Dd0kTxKP.js"),[],import.meta.url),yaml:()=>ge(()=>import("./chunk-Buea-lGh.js"),[],import.meta.url),toml:()=>ge(()=>import("./chunk-vGWfd6FD.js"),[],import.meta.url),ini:()=>ge(()=>import("./chunk-BEwlwnbL.js"),[],import.meta.url),dotenv:()=>ge(()=>import("./chunk-De0Btta0.js"),[],import.meta.url),html:()=>ge(()=>import("./chunk-C0m74zRD.js"),__vite__mapDeps([3,4,5]),import.meta.url),xml:()=>ge(()=>import("./chunk-B_vNuMnf.js"),__vite__mapDeps([6,7]),import.meta.url),css:()=>ge(()=>import("./chunk-Z72CF80r.js"),[],import.meta.url),scss:()=>ge(()=>import("./chunk-DNasK_ZG.js"),__vite__mapDeps([18,5]),import.meta.url),sass:()=>ge(()=>import("./chunk-Cj5Yp3dK.js"),[],import.meta.url),less:()=>ge(()=>import("./chunk-B1dDrJ26.js"),[],import.meta.url),vue:()=>ge(()=>import("./chunk-C9GSunVT.js"),__vite__mapDeps([19,5,4,12,9,3,20]),import.meta.url),svelte:()=>ge(()=>import("./chunk-DJeabLx-.js"),__vite__mapDeps([21,4,12,5,22]),import.meta.url),astro:()=>ge(()=>import("./chunk-CQLl-L-p.js"),__vite__mapDeps([23,9,4,12,5,22,14]),import.meta.url),sql:()=>ge(()=>import("./chunk-DkvoVjww.js"),[],import.meta.url),graphql:()=>ge(()=>import("./chunk-GwR3hkPK.js"),__vite__mapDeps([11,4,12,13,14]),import.meta.url),proto:()=>ge(()=>import("./chunk-C7zT0LnQ.js"),[],import.meta.url),"objective-c":()=>ge(()=>import("./chunk-DXmwc3jG.js"),[],import.meta.url),"objective-cpp":()=>ge(()=>import("./chunk-CLxacb5B.js"),[],import.meta.url),dart:()=>ge(()=>import("./chunk-CtKP3W-j.js"),[],import.meta.url),r:()=>ge(()=>import("./chunk-Cf5RLm7j.js"),[],import.meta.url),julia:()=>ge(()=>import("./chunk-C0PvZCCE.js"),__vite__mapDeps([24,0,1,25,4,26,8]),import.meta.url),elixir:()=>ge(()=>import("./chunk-BX6H_ySx.js"),__vite__mapDeps([27,3,4,5]),import.meta.url),erlang:()=>ge(()=>import("./chunk-CWanVSXC.js"),__vite__mapDeps([28,29]),import.meta.url),haskell:()=>ge(()=>import("./chunk-Df6bDoY_.js"),[],import.meta.url),clojure:()=>ge(()=>import("./chunk-P80f7IUj.js"),[],import.meta.url),perl:()=>ge(()=>import("./chunk-B_P3UbPa.js"),__vite__mapDeps([30,3,4,5,6,7,8]),import.meta.url),zig:()=>ge(()=>import("./chunk-VOosw3JB.js"),[],import.meta.url),solidity:()=>ge(()=>import("./chunk-DijEV5ha.js"),[],import.meta.url),fsharp:()=>ge(()=>import("./chunk-DNSN1z5r.js"),__vite__mapDeps([31,29]),import.meta.url),diff:()=>ge(()=>import("./chunk-D97Zzqfu.js"),[],import.meta.url),log:()=>ge(()=>import("./chunk-2UxHyX5q.js"),[],import.meta.url),rst:()=>ge(()=>import("./chunk-DHK4yRfg.js"),__vite__mapDeps([32,20,3,4,5,0,1,25,15,17,10,6,7,8,11,12,13,14,16]),import.meta.url),latex:()=>ge(()=>import("./chunk-EXT84bkm.js"),__vite__mapDeps([33,26]),import.meta.url),makefile:()=>ge(()=>import("./chunk-CHLpvVh8.js"),[],import.meta.url)};let ky=null;const Go=new Set,QC={ts:"typescript",js:"javascript",py:"python",rb:"ruby",sh:"shellscript",bash:"shellscript",zsh:"shellscript",yml:"yaml",ps1:"powershell",cs:"csharp","c++":"cpp",golang:"go"};function c6(e){return fm[e]!==void 0?e:QC[e]??e}function ma(){return ky??=ge(()=>import("./chunk-CA5f1pGf.js"),[],import.meta.url).then(async e=>e.createHighlighterCore({themes:[ge(()=>import("./chunk-DAi9KRSo.js"),[],import.meta.url),ge(()=>import("./chunk-CxGP3dtY.js"),[],import.meta.url)],langs:[],engine:(await ge(async()=>{const{createJavaScriptRegexEngine:t}=await import("./chunk-BRH0KZbk.js");return{createJavaScriptRegexEngine:t}},[],import.meta.url)).createJavaScriptRegexEngine()})),ky}async function sc(e){if(Go.has(e))return;const t=fm[e];if(t===void 0)return;const n=await t();await(await ma()).loadLanguage(n.default),Go.add(e)}async function dm(e,t){const n=await ma(),s=t===void 0?void 0:c6(t),l=s!==void 0&&(Go.has(s)||fm[s]!==void 0),o=l&&s!==void 0?s:"text";return l&&s!==void 0&&!Go.has(s)&&await sc(s),n.codeToHtml(e,{lang:o,themes:{light:"github-light",dark:"one-dark-pro"},defaultColor:!1})}async function pm(e,t){if(t===void 0)return null;const n=c6(t);if(await sc(n),!Go.has(n))return null;const s=await ma();try{return s.codeToTokens(e,{lang:n,themes:{light:"github-light",dark:"one-dark-pro"},defaultColor:!1}).tokens.map(o=>o.map(u=>({text:u.content,style:u.htmlStyle??(u.color===void 0?{}:{color:u.color})})))}catch{return null}}const JC=2e3,eE=512*1024;async function mm(e,t){const n=tf(t);if(n===void 0||e.split(`
15
- `).length>JC||e.length>eE)return null;try{return await sc(n),(await ma()).codeToTokens(e,{lang:n,themes:{light:"github-light",dark:"one-dark-pro"},defaultColor:!1}).tokens.map(u=>({segments:u.map(h=>{const p=h.htmlStyle??{color:h.color};return`<span style="${Object.entries(p).map(([g,_])=>`${g}:${_}`).join(";")}">${iE(h.content)}</span>`})}))}catch{return null}}const tE={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function iE(e){return e.replace(/[&<>"']/g,t=>tE[t]??t)}const X1=5e3;function u6({text:e,path:t,targetLine:n}){const s=I.useMemo(()=>tf(t),[t]),l=I.useMemo(()=>e.split(`
16
- `),[e]),o=l.length>X1,u=I.useMemo(()=>o?l.slice(0,X1).join(`
17
- `):e,[l,e,o]),[h,p]=I.useState(null),d=I.useRef(null);I.useEffect(()=>{let _=!0;return dm(u,s).then(S=>{_&&p(S)}).catch(()=>{}),()=>{_=!1}},[u,s]),I.useEffect(()=>{if(n===void 0)return;const _=d.current;if(_===null)return;_.querySelectorAll(".file-code-line-target").forEach(C=>C.classList.remove("file-code-line-target"));const S=_.querySelectorAll(".line"),v=Math.min(Math.max(n,1),S.length),w=S[v-1];w!==void 0&&(w.classList.add("file-code-line-target"),w.scrollIntoView({block:"center"}))},[h,n,u]);const g=n!==void 0;return y.jsxs("div",{className:g?"file-code file-code--numbered":"file-code",children:[o&&y.jsxs("div",{className:"tree-note","data-tree-note":"truncated",children:["文件较大,仅高亮前 ",X1," 行"]}),h!==null?y.jsx("div",{ref:_=>{d.current=_},className:"file-code-body",dangerouslySetInnerHTML:{__html:h}}):y.jsx("pre",{ref:_=>{d.current=_},className:"file-code-plain",children:u.split(`
18
- `).map((_,S)=>y.jsx("span",{className:"line",children:`${_}
19
- `},S))})]})}function h6(e,t){for(let n=e.length-1;n>=0;n-=1){const s=e[n];if(t(s,n))return s}}function Pt(e,t,n,s){const l=e.createOscillator(),o=e.createGain(),u=n+(s.start??0),h=s.gain??.5,p=s.attack??.006,d=u+s.dur;l.type=s.type??"sine",l.frequency.setValueAtTime(s.freq,u),o.gain.setValueAtTime(1e-4,u),o.gain.exponentialRampToValueAtTime(Math.max(h,2e-4),u+p),o.gain.exponentialRampToValueAtTime(1e-4,d),l.connect(o),o.connect(t),l.start(u),l.stop(d+.02)}function Ty(e,t,n,s){const l=e.createOscillator(),o=e.createGain(),u=n+(s.start??0),h=s.attack??.004,p=s.glide??.16,d=u+s.decay;l.type="triangle",l.frequency.setValueAtTime(s.freqFrom,u),l.frequency.exponentialRampToValueAtTime(s.freqTo,u+p),o.gain.setValueAtTime(1e-4,u),o.gain.exponentialRampToValueAtTime(Math.max(s.gain,2e-4),u+h),o.gain.exponentialRampToValueAtTime(1e-4,d),l.connect(o),o.connect(t),l.start(u),l.stop(d+.02)}function Yr(e,t,n,s){const l=e.createOscillator(),o=e.createGain(),u=n+(s.start??0),h=s.hold??.08,p=u+s.attack+h+s.decay;l.type=s.type??"sine",l.frequency.setValueAtTime(s.freq,u),s.freqTo!==void 0&&l.frequency.exponentialRampToValueAtTime(s.freqTo,u+s.attack+h*.6),l.detune.setValueAtTime(s.detune??0,u),o.gain.setValueAtTime(1e-4,u),o.gain.exponentialRampToValueAtTime(Math.max(s.gain,2e-4),u+s.attack),o.gain.setValueAtTime(Math.max(s.gain,2e-4),u+s.attack+h),o.gain.exponentialRampToValueAtTime(1e-4,p),l.connect(o),o.connect(t),l.start(u),l.stop(p+.02)}function f6(e,t){const n=Math.floor(e.sampleRate*t),s=e.createBuffer(1,n,e.sampleRate),l=s.getChannelData(0);for(let u=0;u<n;u+=1)l[u]=Math.random()*2-1;const o=e.createBufferSource();return o.buffer=s,o}function My(e,t,n,s){const l=f6(e,.12),o=e.createBiquadFilter(),u=e.createGain(),h=n+(s.start??0),p=h+s.decay;o.type="bandpass",o.frequency.setValueAtTime(s.freq,h),o.Q.setValueAtTime(s.q??1.2,h),u.gain.setValueAtTime(1e-4,h),u.gain.exponentialRampToValueAtTime(Math.max(s.gain,2e-4),h+.018),u.gain.exponentialRampToValueAtTime(1e-4,p),l.connect(o),o.connect(u),u.connect(t),l.start(h),l.stop(p+.02)}function nE(e,t,n,s){const l=f6(e,.4),o=e.createBiquadFilter(),u=e.createGain(),h=n+(s.start??0),p=h+s.decay;o.type="bandpass",o.frequency.setValueAtTime(s.freqFrom,h),o.frequency.exponentialRampToValueAtTime(s.freqTo,p),o.Q.setValueAtTime(s.q??.8,h),u.gain.setValueAtTime(1e-4,h),u.gain.exponentialRampToValueAtTime(Math.max(s.gain,2e-4),h+.03),u.gain.exponentialRampToValueAtTime(1e-4,p),l.connect(o),o.connect(u),u.connect(t),l.start(h),l.stop(p+.02)}function Ay(e,t,n,s){const l=e.createOscillator(),o=e.createGain(),u=n+(s.start??0),h=s.attack??.003,p=u+s.decay;l.type=s.type??"triangle",l.frequency.setValueAtTime(s.freqFrom,u),l.frequency.exponentialRampToValueAtTime(s.freqTo,p-.02),o.gain.setValueAtTime(1e-4,u),o.gain.exponentialRampToValueAtTime(Math.max(s.gain,2e-4),u+h),o.gain.exponentialRampToValueAtTime(1e-4,p),l.connect(o),o.connect(t),l.start(u),l.stop(p+.02)}let $u=null;function rE(e){if($u===null){const s=Math.floor(e.sampleRate*1.6);$u=e.createBuffer(2,s,e.sampleRate);for(let l=0;l<2;l+=1){const o=$u.getChannelData(l);for(let u=0;u<s;u+=1)o[u]=(Math.random()*2-1)*(1-u/s)**2.6}}const t=e.createConvolver();return t.buffer=$u,t}const sE=110,Z1=220,lE=440,Q1=880,aE=987.77,oE=130.81,J1=261.63,e0=329.63,Kl=659.25,cE=1318.51,uE=392,Wl=783.99,t0=523.25,So=1046.5,_m=[{id:1,name:"双音轻抚",play:(e,t,n)=>{Pt(e,t,n,{freq:e0,dur:.22,gain:.05,attack:.03,type:"sine"}),Pt(e,t,n+.08,{freq:J1,dur:.52,gain:.07,attack:.08,type:"sine"}),Pt(e,t,n+.08,{freq:oE,dur:.46,gain:.02,attack:.1,type:"sine"})}},{id:2,name:"玻璃清鸣",play:(e,t,n)=>{Pt(e,t,n,{freq:So,dur:.55,gain:.032,attack:.002,type:"sine"}),Pt(e,t,n+.01,{freq:Kl,dur:.42,gain:.018,attack:.004,type:"sine"}),My(e,t,n,{freq:3200,gain:.004,decay:.1,q:1.4})}},{id:3,name:"柔木琴",play:(e,t,n)=>{Ty(e,t,n,{freqFrom:Kl,freqTo:Wl,gain:.03,decay:.14,glide:.08}),Yr(e,t,n+.04,{freq:t0,gain:.028,attack:.08,hold:.04,decay:.62}),Yr(e,t,n+.06,{freq:uE,gain:.014,attack:.12,hold:.06,decay:.55})}},{id:4,name:"三音讯号",play:(e,t,n)=>{Pt(e,t,n,{freq:So,dur:.14,gain:.045,attack:.004,type:"sine"}),Pt(e,t,n+.1,{freq:Q1,dur:.16,gain:.04,attack:.004,type:"sine"}),Pt(e,t,n+.2,{freq:Wl,dur:.22,gain:.035,attack:.006,type:"sine"})}},{id:5,name:"风声掠过",play:(e,t,n)=>{nE(e,t,n,{freqFrom:4200,freqTo:900,gain:.022,decay:.28,q:.7}),Pt(e,t,n+.12,{freq:Q1,dur:.35,gain:.02,attack:.02,type:"sine"})}},{id:6,name:"发现之簇",play:(e,t,n)=>{[-14,-5,0,7,12].forEach((l,o)=>{Yr(e,t,n+o*.03,{freq:Z1,gain:.012,attack:.38,hold:.12,decay:1.05,detune:l})}),Yr(e,t,n+.1,{freq:e0,gain:.008,attack:.45,hold:.08,decay:.9,detune:3})}},{id:7,name:"系统上线",play:(e,t,n)=>{Pt(e,t,n,{freq:t0,dur:.16,gain:.04,attack:.006,type:"sine"}),Pt(e,t,n+.09,{freq:Wl,dur:.28,gain:.042,attack:.008,type:"sine"}),Pt(e,t,n+.09,{freq:J1,dur:.24,gain:.012,attack:.01,type:"sine"})}},{id:8,name:"老式终端",play:(e,t,n)=>{Pt(e,t,n,{freq:aE,dur:.12,gain:.038,attack:.002,type:"square"}),Pt(e,t,n+.14,{freq:Kl,dur:.1,gain:.028,attack:.002,type:"square"})}},{id:9,name:"调制解调",play:(e,t,n)=>{Ay(e,t,n,{freqFrom:320,freqTo:2200,gain:.024,decay:.16,type:"triangle"}),Ay(e,t,n+.1,{freqFrom:480,freqTo:1400,gain:.014,decay:.12,type:"sine"})}},{id:10,name:"风铃",play:(e,t,n)=>{[Wl,So,Kl,Q1].forEach((l,o)=>{Pt(e,t,n+o*.13,{freq:l,dur:.72,gain:.028-o*.003,attack:.003,type:"sine"})})}},{id:11,name:"颂钵",play:(e,t,n)=>{Yr(e,t,n,{freq:Z1,gain:.022,attack:.58,hold:.16,decay:1.35}),Yr(e,t,n+.08,{freq:e0,gain:.01,attack:.62,hold:.12,decay:1.2,detune:4}),Yr(e,t,n+.14,{freq:lE,gain:.006,attack:.68,hold:.08,decay:1.05,detune:-3})}},{id:12,name:"竖琴拾音",play:(e,t,n)=>{[t0,Kl,Wl,So].forEach((l,o)=>{Pt(e,t,n+o*.075,{freq:l,dur:.38,gain:.034-o*.004,attack:.012,type:"sine"})}),Yr(e,t,n+.2,{freq:J1,gain:.01,attack:.18,hold:.06,decay:.7})}},{id:13,name:"声呐",play:(e,t,n)=>{Pt(e,t,n,{freq:sE,dur:.95,gain:.036,attack:.008,type:"sine"}),Pt(e,t,n+.42,{freq:Z1,dur:.55,gain:.014,attack:.01,type:"sine"}),My(e,t,n,{freq:600,gain:.005,decay:.2,q:.5})}},{id:14,name:"八音盒",play:(e,t,n)=>{[cE,So,Wl,Kl].forEach((l,o)=>{Ty(e,t,n+o*.09,{freqFrom:l,freqTo:l*.998,gain:.02-o*.002,decay:.2,glide:.06})})}}];let bo=null;function hE(){if(typeof window>"u")return null;try{if(bo===null){const e=window.AudioContext??window.webkitAudioContext;if(e===void 0)return null;bo=new e}return bo.state==="suspended"&&bo.resume().catch(()=>{}),bo}catch{return null}}function fE(e){const t=_m.find(p=>p.id===e);if(t===void 0)return;const n=hE();if(n===null)return;const s=n.createGain(),l=n.createBiquadFilter();l.type="lowpass",l.frequency.setValueAtTime(3800,n.currentTime),l.Q.setValueAtTime(.32,n.currentTime),s.gain.setValueAtTime(.48,n.currentTime),s.connect(l);const o=n.createGain();o.gain.setValueAtTime(.88,n.currentTime),l.connect(o),o.connect(n.destination);const u=rE(n),h=n.createGain();h.gain.setValueAtTime(.34,n.currentTime),l.connect(u),u.connect(h),h.connect(n.destination),t.play(n,s,n.currentTime+.01)}function d6(e){fE(e)}let Yu=null;function p6(e){return Yu?.settle(),new Promise(t=>{const n=document.activeElement instanceof HTMLElement?document.activeElement:null,s=document.createElement("div");s.className="dsc-overlay dsc-confirm",s.setAttribute("role","alertdialog"),s.setAttribute("aria-modal","true");const l=document.createElement("div");l.className="dsc-overlay__card",l.style.setProperty("--card-w","24rem");const o=document.createElement("div");o.className="dsc-confirm__body";const u=document.createElement("h3");u.className="dsc-confirm__title",u.id="dsc-confirm-title",u.textContent=e.title;const h=document.createElement("p");h.className="dsc-confirm__detail",h.id="dsc-confirm-detail",h.textContent=e.detail,o.append(u,h);const p=document.createElement("div");p.className="dsc-confirm__actions";const d=document.createElement("button");d.className="dsc-btn",d.type="button",d.dataset.variant="secondary",d.dataset.size="sm",d.textContent="取消";const g=document.createElement("button");g.className="dsc-btn",g.type="button",g.dataset.variant=e.danger===!0?"destructive":"primary",g.dataset.size="sm",g.textContent=e.confirmLabel,p.append(d,g),l.append(o,p),s.append(l),s.setAttribute("aria-labelledby","dsc-confirm-title"),s.setAttribute("aria-describedby","dsc-confirm-detail");const _=E=>{if(E.key==="Escape"){E.stopPropagation(),C(!1);return}E.key==="Tab"&&(E.preventDefault(),(document.activeElement===d?g:d).focus())},S=E=>{E.target===s&&C(!1)},v={settle:()=>C(!1)};let w=!1;const C=E=>{w||(w=!0,document.removeEventListener("keydown",_,!0),s.removeEventListener("pointerdown",S),s.remove(),Yu===v&&(Yu=null),n!==null&&n.isConnected&&n.focus(),t(E))};Yu=v,document.addEventListener("keydown",_,!0),s.addEventListener("pointerdown",S),d.addEventListener("click",()=>C(!1)),g.addEventListener("click",()=>C(!0)),document.body.appendChild(s),d.focus()})}let wo;function dE(){return wo===void 0&&(wo=document.createElement("div"),wo.style.cssText="position:absolute;top:0;left:0;width:0;height:0;visibility:hidden;pointer-events:none",document.documentElement.append(wo)),wo}function Sh(e){return typeof document>"u"?null:gm(q0(e))}function m6(e,t){if(typeof document>"u")return t;const n=getComputedStyle(document.documentElement).getPropertyValue(e).trim();return n===""?t:n}function U0(e){const t=/^(rgb|color)\((.+)\)$/i.exec(e.trim());if(!t)return null;const n=t[1].toLowerCase()==="color",l=(n?t[2].replace(/^\s*srgb\s+/i,""):t[2]).split(/[,/\s]+/).filter(h=>h!=="").map(Number);if(l.length<3||l.slice(0,4).some(h=>!Number.isFinite(h)))return null;const o=n?255:1,u=h=>Math.min(255,Math.max(0,h*o));return{r:u(l[0]),g:u(l[1]),b:u(l[2]),a:l.length>3?Math.min(1,Math.max(0,l[3])):1}}function V0(e){const t=n=>Math.round(n).toString(16).padStart(2,"0");return`#${t(e.r)}${t(e.g)}${t(e.b)}`}function pE(e,t){const n=(s,l)=>s*e.a+l*(1-e.a);return{r:n(e.r,t.r),g:n(e.g,t.g),b:n(e.b,t.b),a:1}}function gm(e){const t=U0(e);return t===null||t.a<.999?null:V0(t)}function q0(e){const t=dE();return t.style.backgroundColor=`var(${e})`,getComputedStyle(t).backgroundColor}function _6(e,t,n){if(typeof document>"u")return n;const s=U0(q0(e));if(s===null)return n;if(s.a>=.999)return V0(s);const l=U0(q0(t));return V0(l===null?s:pE(s,l))}function g6({text:e,highlight:t}){return t===void 0?y.jsx("span",{className:"diff-text",children:e}):y.jsx("span",{className:"diff-text",dangerouslySetInnerHTML:{__html:t.segments.join("")}})}function mE({line:e,highlight:t}){const n=e.kind==="add"?"add":e.kind==="remove"?"del":"ctx";return y.jsxs("div",{className:`diff-line diff-${n}`,children:[y.jsx("span",{className:"diff-no",children:e.oldLine===null?"":String(e.oldLine)}),y.jsx("span",{className:"diff-no",children:e.newLine===null?"":String(e.newLine)}),y.jsx("span",{className:"diff-sign",children:e.kind==="add"?"+":e.kind==="remove"?"-":""}),y.jsx(g6,{text:e.text,highlight:t})]})}function _E(e){const t=[];let n=0;for(;n<e.length;){const s=e[n];if(s.kind==="context"){t.push({left:s,right:s}),n+=1;continue}let l=0,o=n;for(;o<e.length&&e[o].kind==="remove";)l+=1,o+=1;let u=0;for(;o<e.length&&e[o].kind==="add";)u+=1,o+=1;const h=Math.max(l,u);for(let p=0;p<h;p+=1)t.push({left:p<l?e[n+p]:null,right:p<u?e[n+l+p]:null});n=o}return t}function Dy({line:e,show:t,highlight:n}){if(e===null)return y.jsxs("span",{className:"diff-half diff-half-empty",children:[y.jsx("span",{className:"diff-no"}),y.jsx("span",{className:"diff-sign"}),y.jsx("span",{className:"diff-text"})]});const s=e.kind==="add"?"add":e.kind==="remove"?"del":"ctx";return y.jsxs("span",{className:`diff-half diff-half-${s}`,children:[y.jsx("span",{className:"diff-no",children:(t==="old"?e.oldLine:e.newLine)??""}),y.jsx("span",{className:"diff-sign",children:e.kind==="add"?"+":e.kind==="remove"?"-":""}),y.jsx(g6,{text:e.text,highlight:n})]})}function gE({hunk:e,split:t,highlights:n,head:s}){return y.jsxs("div",{className:"diff-hunk",children:[y.jsx("div",{className:"diff-hunk-head",children:`@@ -${String(e.oldStart)},${String(e.oldCount)} +${String(e.newStart)},${String(e.newCount)} @@`}),t?_E(e.lines).map((l,o)=>y.jsxs("span",{className:"diff-split-row",children:[y.jsx(Dy,{line:l.left,show:"old",highlight:n?.[s+o]}),y.jsx(Dy,{line:l.right,show:"new",highlight:n?.[s+o]})]},String(o))):e.lines.map((l,o)=>y.jsx(mE,{line:l,highlight:n?.[s+o]},String(o)))]})}function vm({hunks:e,path:t,split:n=!1,wrap:s=!1}){const[l,o]=I.useState(null),u=e.map(p=>p.lines.map(d=>d.text).join(`
20
- `)).join(`
21
- `);I.useEffect(()=>{let p=!0;return o(null),mm(u,t).then(d=>{p&&o(d)}),()=>{p=!1}},[u,t]);let h=0;return y.jsx("div",{className:"diff-body","data-split":n||void 0,"data-wrap":s||void 0,children:e.map((p,d)=>{const g=h;return h+=p.lines.length,y.jsx(gE,{hunk:p,split:n,highlights:l,head:g},String(d))})})}const ym="__DSC_CODE_ICON_INSTANCE__",Sm=Object.freeze({angular:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#F8ECEF" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#DD0031" d="M16.712 17.711H7.288l-1.204 2.916L12 24l5.916-3.373-1.204-2.916ZM14.692 0l7.832 16.855.814-12.856L14.692 0ZM9.308 0 .662 3.999l.814 12.856L9.308 0Zm-.405 13.93h6.198L12 6.396 8.903 13.93Z"/></g>',c:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#EEF4F8" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#659AD2" d="M16.5921 9.1962s-.354-3.298-3.627-3.39c-3.2741-.09-4.9552 2.474-4.9552 6.14 0 3.6651 1.858 6.5972 5.0451 6.5972 3.184 0 3.5381-3.665 3.5381-3.665l6.1041.365s.36 3.31-2.196 5.836c-2.552 2.5241-5.6901 2.9371-7.8762 2.9201-2.19-.017-5.2261.034-8.1602-2.97-2.938-3.0101-3.436-5.9302-3.436-8.8002 0-2.8701.556-6.6702 4.047-9.5502C7.444.72 9.849 0 12.254 0c10.0422 0 10.7172 9.2602 10.7172 9.2602z"/></g>',clojure:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#F1F7EC" stroke="#DCEAD2" stroke-width=".5"/><svg x="2.75" y="2.75" width="14.5" height="14.5" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><g fill="none"><path d="M64 0C28.712 0 0 28.6 0 63.751c0 35.155 28.712 63.753 64 63.753s64-28.598 64-63.753C128 28.6 99.288 0 64 0" fill="#FFF"/><path d="M61.659 64.898a265.825 265.825 0 00-1.867 4.12c-2.322 5.241-4.894 11.62-5.834 15.706-.337 1.455-.546 3.258-.542 5.258 0 .79.043 1.622.11 2.469a30.74 30.74 0 0010.533 1.87 30.796 30.796 0 009.642-1.566 18.09 18.09 0 01-2.011-2.12c-4.11-5.221-6.403-12.872-10.031-25.737M46.485 38.96c-7.85 5.51-12.986 14.6-13.005 24.9.019 10.145 5.001 19.116 12.653 24.65 1.877-7.789 6.582-14.92 13.637-29.214a114.691 114.691 0 00-1.43-3.72c-1.955-4.884-4.776-10.556-7.294-13.124-1.283-1.342-2.84-2.502-4.561-3.492" fill="#91DC47"/><path d="M90.697 98.798c-4.05-.506-7.392-1.116-10.317-2.144a36.708 36.708 0 01-16.32 3.807c-20.293 0-36.742-16.383-36.745-36.602 0-10.97 4.852-20.805 12.528-27.512-2.053-.495-4.194-.783-6.38-.779-10.782.101-22.162 6.044-26.9 22.095-.443 2.337-.337 4.103-.337 6.197 0 31.818 25.895 57.613 57.835 57.613 19.561 0 36.841-9.682 47.305-24.489-5.66 1.405-11.103 2.077-15.763 2.091-1.747 0-3.387-.093-4.906-.277" fill="#63B132"/><path d="M79.829 87.634c.357.176 1.167.464 2.293.783 7.579-5.542 12.504-14.469 12.523-24.558h-.003c-.028-16.82-13.693-30.43-30.582-30.462a30.765 30.765 0 00-9.602 1.554c6.21 7.05 9.196 17.127 12.084 28.148l.005.013c.005.009.924 3.06 2.501 7.11 1.566 4.042 3.797 9.048 6.23 12.696 1.597 2.444 3.354 4.2 4.551 4.716" fill="#90B4FE"/><path d="M17.057 30.311c5.463-3.408 11.04-4.637 15.908-4.593 6.722.02 12.008 2.096 14.544 3.516.612.352 1.194.73 1.764 1.12a36.714 36.714 0 0114.786-3.096c20.295.003 36.747 16.386 36.75 36.601-.003 10.192-4.188 19.408-10.934 26.044a45.3 45.3 0 005.225.29c6.406.004 13.329-1.404 18.52-5.753 3.384-2.84 6.22-6.998 7.792-13.233.307-2.408.484-4.856.484-7.347 0-31.817-25.892-57.614-57.835-57.614-19.372 0-36.508 9.5-47.004 24.065z" fill="#5881D8"/></g></svg>',cmake:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#F2F5F7" stroke="#D9E1E7" stroke-width=".5"/><svg x="2.75" y="2.75" width="14.5" height="14.5" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><path fill="#064F8C" d="M62.8.4L.3 123.8l68.1-57.9z"/><path fill="#249847" d="M123.8 127.7l-84-33.9L0 127.7z"/><path fill="#BE2128" d="M128 126.6L65.6 2.5l9.2 102.6z"/><path fill="#CDCDCE" d="M71.9 104l-3.1-34.9L42 92z"/></svg>',cpp:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#E8F2F8" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#00599C" d="M22.394 6c-.167-.29-.398-.543-.652-.69L12.926.22c-.509-.294-1.34-.294-1.848 0L2.26 5.31c-.508.293-.923 1.013-.923 1.6v10.18c0 .294.104.62.271.91.167.29.398.543.652.69l8.816 5.09c.508.293 1.34.293 1.848 0l8.816-5.09c.254-.147.485-.4.652-.69.167-.29.27-.616.27-.91V6.91c.003-.294-.1-.62-.268-.91zM12 19.11c-3.92 0-7.109-3.19-7.109-7.11 0-3.92 3.19-7.11 7.11-7.11a7.133 7.133 0 016.156 3.553l-3.076 1.78a3.567 3.567 0 00-3.08-1.78A3.56 3.56 0 008.444 12 3.56 3.56 0 0012 15.555a3.57 3.57 0 003.08-1.778l3.078 1.78A7.135 7.135 0 0112 19.11zm7.11-6.715h-.79v.79h-.79v-.79h-.79v-.79h.79v-.79h.79v.79h.79zm2.962 0h-.79v.79h-.79v-.79h-.79v-.79h.79v-.79h.79v.79h.79z"/></g>',csharp:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#F3EEF7" stroke="#E2D7EA" stroke-width=".5"/><svg x="2.75" y="2.75" width="14.5" height="14.5" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><path fill="#9B4F96" d="M115.4 30.7L67.1 2.9c-.8-.5-1.9-.7-3.1-.7-1.2 0-2.3.3-3.1.7l-48 27.9c-1.7 1-2.9 3.5-2.9 5.4v55.7c0 1.1.2 2.4 1 3.5l106.8-62c-.6-1.2-1.5-2.1-2.4-2.7z"/><path fill="#68217A" d="M10.7 95.3c.5.8 1.2 1.5 1.9 1.9l48.2 27.9c.8.5 1.9.7 3.1.7 1.2 0 2.3-.3 3.1-.7l48-27.9c1.7-1 2.9-3.5 2.9-5.4V36.1c0-.9-.1-1.9-.6-2.8l-106.6 62z"/><path fill="#fff" d="M85.3 76.1C81.1 83.5 73.1 88.5 64 88.5c-13.5 0-24.5-11-24.5-24.5s11-24.5 24.5-24.5c9.1 0 17.1 5 21.3 12.5l13-7.5c-6.8-11.9-19.6-20-34.3-20-21.8 0-39.5 17.7-39.5 39.5s17.7 39.5 39.5 39.5c14.6 0 27.4-8 34.2-19.8l-12.9-7.6zM97 66.2l.9-4.3h-4.2v-4.7h5.1L100 51h4.9l-1.2 6.1h3.8l1.2-6.1h4.8l-1.2 6.1h2.4v4.7h-3.3l-.9 4.3h4.2v4.7h-5.1l-1.2 6h-4.9l1.2-6h-3.8l-1.2 6h-4.8l1.2-6h-2.4v-4.7H97zm4.8 0h3.8l.9-4.3h-3.8l-.9 4.3z"/></svg>',css:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#1572B6"/><text x="10" y="12.8" text-anchor="middle" font-family="Arial,sans-serif" font-size="6.2" font-weight="900" fill="#fff">CSS</text>',dart:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#ECF7FA" stroke="#D5EAF0" stroke-width=".5"/><svg x="2.75" y="2.75" width="14.5" height="14.5" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><path fill="#00c4b3" d="M35.2 34.9l-8.3-8.3v59.7l.1 2.8c0 1.3.2 2.8.7 4.3l65.6 23.1 16.3-7.2-74.4-74.4z"/><path d="M27.7 93.4zm81.9 15.9l-16.3 7.2-65.4-23.1c1.3 4.8 4 10.1 7 13.2l21.3 21.2 47.6.1 5.8-18.6z" fill="#22d3c5"/><path fill="#0075c9" d="M1.7 65.1C-.4 67.3.7 72 4 75.5l14.7 14.8 9.2 3.3c-.3-1.5-.7-3-.7-4.3l-.1-2.8-.2-59.8m82.7 82.6l7.2-16.4-23-65.6c-1.5-.3-3-.6-4.3-.7l-2.9-.1-59.6.1"/><path d="M93.6 27.3c.2 0 .2 0 0 0 .2 0 .2 0 0 0zm16 82l17.7-5.8V54.8l-20.4-20.5c-3-3-8.3-5.8-13.2-7l23.1 65.6" fill="#00a8e1"/><path fill="#00c4b3" d="M90.5 18.2L75.7 3.5c-3.4-3.4-8-4.4-10.4-2.3L26.9 26.6h59.5l2.9.1c1.3 0 2.8.2 4.3.7l-3.1-9.2z"/></svg>',docker:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#E8F4FC" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#2496ED" d="M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288Z"/></g>',elixir:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#F3EEF6" stroke="#E3D9E8" stroke-width=".5"/><svg x="2.75" y="2.75" width="14.5" height="14.5" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><linearGradient id="__DSC_CODE_ICON_INSTANCE__elixir-original-a" gradientUnits="userSpaceOnUse" x1="835.592" y1="-36.546" x2="821.211" y2="553.414" gradientTransform="matrix(.1297 0 0 .2 -46.03 17.198)"><stop offset="0" stop-color="#d9d8dc"/><stop offset="1" stop-color="#fff" stop-opacity=".385"/></linearGradient><path fill-rule="evenodd" clip-rule="evenodd" fill="url(#__DSC_CODE_ICON_INSTANCE__elixir-original-a)" d="M64.4.5C36.7 13.9 1.9 83.4 30.9 113.9c26.8 33.5 85.4 1.3 68.4-40.5-21.5-36-35-37.9-34.9-72.9z"/><linearGradient id="__DSC_CODE_ICON_INSTANCE__elixir-original-b" gradientUnits="userSpaceOnUse" x1="942.357" y1="-40.593" x2="824.692" y2="472.243" gradientTransform="matrix(.1142 0 0 .2271 -47.053 17.229)"><stop offset="0" stop-color="#8d67af" stop-opacity=".672"/><stop offset="1" stop-color="#9f8daf"/></linearGradient><path fill-rule="evenodd" clip-rule="evenodd" fill="url(#__DSC_CODE_ICON_INSTANCE__elixir-original-b)" d="M64.4.2C36.8 13.6 1.9 82.9 31 113.5c10.7 12.4 28 16.5 37.7 9.1 26.4-18.8 7.4-53.1 10.4-78.5C68.1 33.9 64.2 11.3 64.4.2z"/><linearGradient id="__DSC_CODE_ICON_INSTANCE__elixir-original-c" gradientUnits="userSpaceOnUse" x1="924.646" y1="120.513" x2="924.646" y2="505.851" gradientTransform="matrix(.1227 0 0 .2115 -46.493 17.206)"><stop offset="0" stop-color="#26053d" stop-opacity=".762"/><stop offset="1" stop-color="#b7b4b4" stop-opacity=".278"/></linearGradient><path fill-rule="evenodd" clip-rule="evenodd" fill="url(#__DSC_CODE_ICON_INSTANCE__elixir-original-c)" d="M56.7 4.3c-22.3 15.9-28.2 75-24.1 94.2 8.2 48.1 75.2 28.3 69.6-16.5-6-29.2-48.8-39.2-45.5-77.7z"/><linearGradient id="__DSC_CODE_ICON_INSTANCE__elixir-original-d" gradientUnits="userSpaceOnUse" x1="428.034" y1="198.448" x2="607.325" y2="559.255" gradientTransform="matrix(.1848 0 0 .1404 -42.394 17.138)"><stop offset="0" stop-color="#91739f" stop-opacity=".46"/><stop offset="1" stop-color="#32054f" stop-opacity=".54"/></linearGradient><path fill-rule="evenodd" clip-rule="evenodd" fill="url(#__DSC_CODE_ICON_INSTANCE__elixir-original-d)" d="M78.8 49.8c10.4 13.4 12.7 22.6 6.8 27.9-27.7 19.4-61.3 7.4-54-37.3C22.1 63 4.5 96.8 43.3 101.6c20.8 3.6 54 2 58.9-16.1-.2-15.9-10.8-22.9-23.4-35.7z"/><linearGradient id="__DSC_CODE_ICON_INSTANCE__elixir-original-e" gradientUnits="userSpaceOnUse" x1="907.895" y1="540.636" x2="590.242" y2="201.281" gradientTransform="matrix(.1418 0 0 .1829 -45.23 17.18)"><stop offset="0" stop-color="#463d49" stop-opacity=".331"/><stop offset="1" stop-color="#340a50" stop-opacity=".821"/></linearGradient><path fill-rule="evenodd" clip-rule="evenodd" fill="url(#__DSC_CODE_ICON_INSTANCE__elixir-original-e)" d="M38.1 36.4c-2.9 21.2 35.1 77.9 58.3 71-17.7 35.6-56.9-21.2-64-41.7 1.5-11 2.2-16.4 5.7-29.3z"/><linearGradient id="__DSC_CODE_ICON_INSTANCE__elixir-original-f" gradientUnits="userSpaceOnUse" x1="1102.297" y1="100.542" x2="1008.071" y2="431.648" gradientTransform="matrix(.106 0 0 .2448 -47.595 17.242)"><stop offset="0" stop-color="#715383" stop-opacity=".145"/><stop offset="1" stop-color="#f4f4f4" stop-opacity=".234"/></linearGradient><path fill-rule="evenodd" clip-rule="evenodd" fill="url(#__DSC_CODE_ICON_INSTANCE__elixir-original-f)" d="M60.4 49.7c.8 7.9 3.9 20.5 0 28.8S38.7 102 43.6 115.3c11.4 24.8 37.1-4.4 36.9-19 1.1-11.8-6.6-38.7-1.8-52.5L76.5 41l-13.6-4c-2.2 3.2-3 7.5-2.5 12.7z"/><linearGradient id="__DSC_CODE_ICON_INSTANCE__elixir-original-g" gradientUnits="userSpaceOnUse" x1="1354.664" y1="140.06" x2="1059.233" y2="84.466" gradientTransform="matrix(.09173 0 0 .2828 -48.536 17.28)"><stop offset="0" stop-color="#a5a1a8" stop-opacity=".356"/><stop offset="1" stop-color="#370c50" stop-opacity=".582"/></linearGradient><path fill-rule="evenodd" clip-rule="evenodd" fill="url(#__DSC_CODE_ICON_INSTANCE__elixir-original-g)" d="M65.3 10.8C36 27.4 48 53.4 49.3 81.6l19.1-55.4c-1.4-5.7-2.3-9.5-3.1-15.4z"/><path fill-rule="evenodd" clip-rule="evenodd" fill="#330A4C" fill-opacity=".316" d="M68.3 26.1c-14.8 11.7-14.1 31.3-18.6 54 8.1-21.3 4.1-38.2 18.6-54z"/><path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF" d="M45.8 119.7c8 1.1 12.1 2.2 12.5 3 .3 4.2-11.1 1.2-12.5-3z"/><path fill-rule="evenodd" clip-rule="evenodd" fill="#EDEDED" fill-opacity=".603" d="M49.8 10.8c-6.9 7.7-14.4 21.8-18.2 29.7-1 6.5-.5 15.7.6 23.5.9-18.2 7.5-39.2 17.6-53.2z"/></svg>',env:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#ECD53F"/><text x="10" y="12.9" text-anchor="middle" font-family="Arial,sans-serif" font-size="5.7" font-weight="900" fill="#24292F">.ENV</text>',erlang:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#FAEDF1" stroke="#EED6DE" stroke-width=".5"/><svg x="2.75" y="2.75" width="14.5" height="14.5" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><path d="M20.7 103.9C11 93.5 5.2 79.2 5.3 62.1 5.2 47 10 34 18.2 24.1H1v79.7l19.7.1zm90.4 0c4.2-4.5 8-9.8 11.4-15.9l-19-9.5c-6.7 10.8-16.4 20.8-29.9 20.9-19.6-.1-27.3-16.9-27.3-38.5h73.3c.1-2.4.1-3.6 0-4.7.5-12.9-2.9-23.7-9.1-32.1H127v79.7l-15.9.1zM47.5 42.4c.8-9.8 8.5-16.3 17.6-16.4 9.1 0 15.7 6.6 15.9 16.4H47.5z" fill="#A90533"/></svg>',flutter:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#EEF7FD" stroke="#D7EAF6" stroke-width=".5"/><svg x="2.75" y="2.75" width="14.5" height="14.5" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><g fill="#3FB6D3"><path d="M12.3 64.2L76.3 0h39.4L32.1 83.6zM76.3 128h39.4L81.6 93.9l34.1-34.8H76.3L42.2 93.5z"/></g><path fill="#27AACD" d="M81.6 93.9l-20-20-19.4 19.6 19.4 19.6z"/><path fill="#19599A" d="M115.7 128L81.6 93.9l-20 19.2L76.3 128z"/><linearGradient id="__DSC_CODE_ICON_INSTANCE__flutter-original-a" gradientUnits="userSpaceOnUse" x1="59.365" y1="116.36" x2="86.825" y2="99.399"><stop offset="0" stop-color="#1b4e94"/><stop offset=".63" stop-color="#1a5497"/><stop offset="1" stop-color="#195a9b"/></linearGradient><path fill="url(#__DSC_CODE_ICON_INSTANCE__flutter-original-a)" d="M61.6 113.1l30.8-8.4-10.8-10.8z"/></svg>',git:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#FFF0EC" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#F05032" d="M13.09 23.549a1.54 1.54 0 0 1-2.18 0L.451 13.089a1.54 1.54 0 0 1 0-2.179l7.191-7.19 2.733 2.733a1.85 1.85 0 0 0 .964 2.326v6.66a1.849 1.849 0 1 0 1.54 0V8.957l2.508 2.508a1.85 1.85 0 1 0 1.09-1.09l-2.634-2.634a1.85 1.85 0 0 0-2.378-2.377L8.73 2.63 10.91.451a1.54 1.54 0 0 1 2.179 0l10.459 10.46a1.54 1.54 0 0 1 0 2.179z"/></g>',go:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#E7F9FC" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#00ADD8" d="M1.811 10.231c-.047 0-.058-.023-.035-.059l.246-.315c.023-.035.081-.058.128-.058h4.172c.046 0 .058.035.035.07l-.199.303c-.023.036-.082.07-.117.07zM.047 11.306c-.047 0-.059-.023-.035-.058l.245-.316c.023-.035.082-.058.129-.058h5.328c.047 0 .07.035.058.07l-.093.28c-.012.047-.058.07-.105.07zm2.828 1.075c-.047 0-.059-.035-.035-.07l.163-.292c.023-.035.07-.07.117-.07h2.337c.047 0 .07.035.07.082l-.023.28c0 .047-.047.082-.082.082zm12.129-2.36c-.736.187-1.239.327-1.963.514-.176.046-.187.058-.34-.117-.174-.199-.303-.327-.548-.444-.737-.362-1.45-.257-2.115.175-.795.514-1.204 1.274-1.192 2.22.011.935.654 1.706 1.577 1.835.795.105 1.46-.175 1.987-.77.105-.13.198-.27.315-.434H10.47c-.245 0-.304-.152-.222-.35.152-.362.432-.97.596-1.274a.315.315 0 01.292-.187h4.253c-.023.316-.023.631-.07.947a4.983 4.983 0 01-.958 2.29c-.841 1.11-1.94 1.8-3.33 1.986-1.145.152-2.209-.07-3.143-.77-.865-.655-1.356-1.52-1.484-2.595-.152-1.274.222-2.419.993-3.424.83-1.086 1.928-1.776 3.272-2.02 1.098-.2 2.15-.07 3.096.571.62.41 1.063.97 1.356 1.648.07.105.023.164-.117.2m3.868 6.461c-1.064-.024-2.034-.328-2.852-1.029a3.665 3.665 0 01-1.262-2.255c-.21-1.32.152-2.489.947-3.529.853-1.122 1.881-1.706 3.272-1.95 1.192-.21 2.314-.095 3.33.595.923.63 1.496 1.484 1.648 2.605.198 1.578-.257 2.863-1.344 3.962-.771.783-1.718 1.273-2.805 1.495-.315.06-.63.07-.934.106zm2.78-4.72c-.011-.153-.011-.27-.034-.387-.21-1.157-1.274-1.81-2.384-1.554-1.087.245-1.788.935-2.045 2.033-.21.912.234 1.835 1.075 2.21.643.28 1.285.244 1.905-.07.923-.48 1.425-1.228 1.484-2.233z"/></g>',graphql:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#FCEAF6" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#E10098" d="M12.002 0a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm8.54 4.931a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm0 9.862a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm-8.54 4.931a2.138 2.138 0 1 0 0 4.276 2.138 2.138 0 1 0 0-4.276zm-8.542-4.93a2.138 2.138 0 1 0 0 4.276 2.138 2.138 0 1 0 0-4.277zm0-9.863a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm8.542-3.378L2.953 6.777v10.448l9.049 5.224 9.047-5.224V6.777zm0 1.601 7.66 13.27H4.34zm-1.387.371L3.97 15.037V7.363zm2.774 0 6.646 3.838v7.674zM5.355 17.44h13.293l-6.646 3.836z"/></g>',haskell:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#F3F0F7" stroke="#E1D9EA" stroke-width=".5"/><svg x="2.75" y="2.75" width="14.5" height="14.5" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><path fill="#463B63" d="M0 110.2L30.1 65 0 19.9h22.6L52.7 65l-30.1 45.1H0z"/><path fill="#5E5187" d="M30.1 110.2L60.2 65 30.1 19.9h22.6l60.2 90.3H90.4L71.5 81.9l-18.8 28.2H30.1z"/><path fill="#904F8C" d="M102.9 83.8l-10-15.1H128v15.1h-25.1zM87.8 61.3l-10-15.1H128v15.1H87.8z"/></svg>',ini:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#6E7781"/><text x="10" y="13.2" text-anchor="middle" font-family="Arial,sans-serif" font-size="7.2" font-weight="800" fill="#fff">INI</text>',java:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#F4F7FA" stroke="#D9E2E8" stroke-width=".5"/><svg x="2.5" y="2.5" width="15" height="15" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><path fill="#0074BD" d="M47.617 98.12s-4.767 2.774 3.397 3.71c9.892 1.13 14.947.968 25.845-1.092 0 0 2.871 1.795 6.873 3.351-24.439 10.47-55.308-.607-36.115-5.969zm-2.988-13.665s-5.348 3.959 2.823 4.805c10.567 1.091 18.91 1.18 33.354-1.6 0 0 1.993 2.025 5.132 3.131-29.542 8.64-62.446.68-41.309-6.336z"/><path fill="#EA2D2E" d="M69.802 61.271c6.025 6.935-1.58 13.17-1.58 13.17s15.289-7.891 8.269-17.777c-6.559-9.215-11.587-13.792 15.635-29.58 0 .001-42.731 10.67-22.324 34.187z"/><path fill="#0074BD" d="M102.123 108.229s3.529 2.91-3.888 5.159c-14.102 4.272-58.706 5.56-71.094.171-4.451-1.938 3.899-4.625 6.526-5.192 2.739-.593 4.303-.485 4.303-.485-4.953-3.487-32.013 6.85-13.743 9.815 49.821 8.076 90.817-3.637 77.896-9.468zM49.912 70.294s-22.686 5.389-8.033 7.348c6.188.828 18.518.638 30.011-.326 9.39-.789 18.813-2.474 18.813-2.474s-3.308 1.419-5.704 3.053c-23.042 6.061-67.544 3.238-54.731-2.958 10.832-5.239 19.644-4.643 19.644-4.643zm40.697 22.747c23.421-12.167 12.591-23.86 5.032-22.285-1.848.385-2.677.72-2.677.72s.688-1.079 2-1.543c14.953-5.255 26.451 15.503-4.823 23.725 0-.002.359-.327.468-.617z"/><path fill="#EA2D2E" d="M76.491 1.587S89.459 14.563 64.188 34.51c-20.266 16.006-4.621 25.13-.007 35.559-11.831-10.673-20.509-20.07-14.688-28.815C58.041 28.42 81.722 22.195 76.491 1.587z"/><path fill="#0074BD" d="M52.214 126.021c22.476 1.437 57-.8 57.817-11.436 0 0-1.571 4.032-18.577 7.231-19.186 3.612-42.854 3.191-56.887.874 0 .001 2.875 2.381 17.647 3.331z"/></svg>',javascript:'<defs><clipPath id="__DSC_CODE_ICON_INSTANCE__a"><rect x="1" y="1" width="18" height="18" rx="4"/></clipPath></defs><g clip-path="url(#__DSC_CODE_ICON_INSTANCE__a)"><svg x="1" y="1" width="18" height="18" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><path fill="#F0DB4F" d="M1.408 1.408h125.184v125.185H1.408z"/><path fill="#323330" d="M116.347 96.736c-.917-5.711-4.641-10.508-15.672-14.981-3.832-1.761-8.104-3.022-9.377-5.926-.452-1.69-.512-2.642-.226-3.665.821-3.32 4.784-4.355 7.925-3.403 2.023.678 3.938 2.237 5.093 4.724 5.402-3.498 5.391-3.475 9.163-5.879-1.381-2.141-2.118-3.129-3.022-4.045-3.249-3.629-7.676-5.498-14.756-5.355l-3.688.477c-3.534.893-6.902 2.748-8.877 5.235-5.926 6.724-4.236 18.492 2.975 23.335 7.104 5.332 17.54 6.545 18.873 11.531 1.297 6.104-4.486 8.08-10.234 7.378-4.236-.881-6.592-3.034-9.139-6.949-4.688 2.713-4.688 2.713-9.508 5.485 1.143 2.499 2.344 3.63 4.26 5.795 9.068 9.198 31.76 8.746 35.83-5.176.165-.478 1.261-3.666.38-8.581zM69.462 58.943H57.753l-.048 30.272c0 6.438.333 12.34-.714 14.149-1.713 3.558-6.152 3.117-8.175 2.427-2.059-1.012-3.106-2.451-4.319-4.485-.333-.584-.583-1.036-.667-1.071l-9.52 5.83c1.583 3.249 3.915 6.069 6.902 7.901 4.462 2.678 10.459 3.499 16.731 2.059 4.082-1.189 7.604-3.652 9.448-7.401 2.666-4.915 2.094-10.864 2.07-17.444.06-10.735.001-21.468.001-32.237z"/></svg></g>',json:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#F4F4F4" stroke="#DDDDDD" stroke-width=".5"/><svg x="2.75" y="2.75" width="14.5" height="14.5" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><linearGradient id="__DSC_CODE_ICON_INSTANCE__a" x1="-670.564" x2="-583.105" y1="-280.831" y2="-368.306" gradientTransform="matrix(.9988 0 0 -.9987 689.011 -259.008)" gradientUnits="userSpaceOnUse"><stop offset="0"/><stop offset="1" stop-color="#fff"/></linearGradient><path fill="url(#__DSC_CODE_ICON_INSTANCE__a)" fill-rule="evenodd" d="M63.895 94.303c27.433 37.398 54.281-10.438 54.241-39.205-.046-34.012-34.518-53.021-54.263-53.021C32.182 2.077 2 28.269 2 64.105 2 103.937 36.596 126 63.873 126c-6.172-.889-26.742-5.296-27.019-52.674-.186-32.044 10.453-44.846 26.974-39.214.37.137 18.223 7.18 18.223 30.187 0 22.908-18.156 30.004-18.156 30.004z" clip-rule="evenodd"/><linearGradient id="__DSC_CODE_ICON_INSTANCE__b" x1="-579.148" x2="-666.607" y1="-364.34" y2="-276.873" gradientTransform="matrix(.9988 0 0 -.9987 689.011 -259.008)" gradientUnits="userSpaceOnUse"><stop offset="0"/><stop offset="1" stop-color="#fff"/></linearGradient><path fill="url(#__DSC_CODE_ICON_INSTANCE__b)" fill-rule="evenodd" d="M63.863 34.086C45.736 27.838 23.53 42.778 23.53 72.703 23.53 121.565 59.739 126 64.128 126 95.818 126 126 99.808 126 63.972 126 24.14 91.404 2.077 64.127 2.077c7.555-1.046 40.719 8.176 40.719 53.504 0 29.559-24.764 45.651-40.87 38.776-.37-.137-18.223-7.18-18.223-30.187 0-22.91 18.11-30.085 18.11-30.084z" clip-rule="evenodd"/></svg>',kotlin:'<defs><linearGradient id="__DSC_CODE_ICON_INSTANCE__k" x1="1" y1="19" x2="19" y2="1"><stop stop-color="#0095D5"/><stop offset=".5" stop-color="#7F52FF"/><stop offset="1" stop-color="#F88909"/></linearGradient></defs><rect x="1" y="1" width="18" height="18" rx="4" fill="url(#__DSC_CODE_ICON_INSTANCE__k)"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#FFFFFF" d="M24 24H0V0h24L12 12Z"/></g>',lua:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#ECECF7" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#000080" d="M.38 10.377l-.272-.037c-.048.344-.082.695-.101 1.041l.275.016c.018-.34.051-.682.098-1.02zM4.136 3.289l-.184-.205c-.258.232-.509.48-.746.734l.202.188c.231-.248.476-.49.728-.717zM5.769 2.059l-.146-.235c-.296.186-.586.385-.863.594l.166.219c.27-.203.554-.399.843-.578zM1.824 18.369c.185.297.384.586.593.863l.22-.164c-.205-.271-.399-.555-.58-.844l-.233.145zM1.127 16.402l-.255.104c.129.318.274.635.431.943l.005.01.245-.125-.005-.01c-.153-.301-.295-.611-.421-.922zM.298 9.309l.269.063c.076-.332.168-.664.272-.986l-.261-.087c-.108.332-.202.672-.28 1.01zM.274 12.42l-.275.01c.012.348.04.699.083 1.043l.273-.033c-.042-.336-.069-.68-.081-1.02zM.256 14.506c.073.34.162.682.264 1.014l.263-.08c-.1-.326-.187-.658-.258-.99l-.269.056zM11.573.275L11.563 0c-.348.012-.699.039-1.044.082l.034.273c.338-.041.68-.068 1.02-.08zM23.221 8.566c.1.326.186.66.256.992l.27-.059c-.072-.34-.16-.682-.262-1.014l-.264.081zM17.621 1.389c-.309-.164-.627-.314-.947-.449l-.107.252c.314.133.625.281.926.439l.128-.242zM15.693.572c-.332-.105-.67-.199-1.01-.277l-.063.268c.332.076.664.168.988.273l.085-.264zM6.674 1.545c.298-.15.606-.291.916-.418L7.486.873c-.317.127-.632.272-.937.428l-.015.008.125.244.015-.008zM23.727 11.588l.275-.01a11.797 11.797 0 0 0-.082-1.045l-.273.033c.041.338.068.682.08 1.022zM13.654.105c-.346-.047-.696-.08-1.043-.098l-.014.273c.339.018.683.051 1.019.098l.038-.273zM9.544.527l-.058-.27c-.34.072-.681.16-1.014.264l.081.262c.325-.099.659-.185.991-.256zM1.921 5.469l.231.15c.185-.285.384-.566.592-.834l-.217-.17c-.213.276-.417.563-.606.854zM.943 7.318l.253.107c.132-.313.28-.625.439-.924l-.243-.128c-.163.307-.314.625-.449.945zM18.223 21.943l.145.234c.295-.186.586-.385.863-.594l-.164-.219c-.272.204-.557.4-.844.579zM21.248 19.219l.217.17c.215-.273.418-.561.607-.854l-.23-.148c-.186.285-.385.564-.594.832zM19.855 20.715l.184.203c.258-.23.51-.479.746-.732l-.201-.188c-.23.248-.477.488-.729.717zM22.359 17.504l.244.129c.162-.307.314-.625.449-.945l-.254-.107a11.27 11.27 0 0 1-.439.923zM23.617 13.629l.273.039c.049-.346.082-.695.102-1.043l-.275-.014c-.018.338-.051.682-.1 1.018zM23.156 15.621l.264.086c.107-.332.201-.67.279-1.01l-.268-.063c-.077.333-.169.665-.275.987zM22.453 6.672c.154.303.297.617.424.932l.256-.104c-.131-.322-.277-.643-.436-.953l-.244.125zM8.296 23.418c.331.107.67.201 1.009.279l.062-.268c-.331-.076-.663-.168-.986-.273l-.085.262zM10.335 23.889c.345.049.696.082 1.043.102l.014-.275c-.339-.018-.682-.051-1.019-.098l-.038.271zM17.326 22.449c-.303.154-.613.297-.926.424l.104.256c.318-.131.639-.275.947-.434l.004-.002-.123-.246-.006.002zM4.613 21.467c.274.213.562.418.854.605l.149-.23c-.285-.184-.565-.385-.833-.592l-.17.217zM12.417 23.725l.009.275c.348-.014.699-.041 1.045-.084l-.035-.271c-.336.041-.68.068-1.019.08zM6.37 22.604c.307.162.625.314.946.449l.107-.254c-.313-.133-.624-.279-.924-.439l-.129.244zM3.083 20.041c.233.258.48.51.734.746l.188-.201c-.249-.23-.49-.477-.717-.729l-.205.184zM14.445 23.475l.059.27c.34-.074.68-.162 1.014-.266l-.082-.262c-.325.099-.659.185-.991.258zM21.18.129A2.689 2.689 0 1 0 21.18 5.507 2.689 2.689 0 1 0 21.18.129zM15.324 15.447c0 .471.314.66.852.66.67 0 1.297-.396 1.297-1.016v-.645c-.23.107-.379.141-1.107.24-.735.109-1.042.306-1.042.761zM12 2.818c-5.07 0-9.18 4.109-9.18 9.18 0 5.068 4.11 9.18 9.18 9.18 5.07 0 9.18-4.111 9.18-9.18 0-5.07-4.11-9.18-9.18-9.18zm-2.487 13.77H5.771v-6.023h.769v5.346h2.974v.677zm4.13 0h-.619v-.67c-.405.57-.811.793-1.446.793-.843 0-1.38-.463-1.38-1.182v-3.271h.686v3c0 .52.347.85.893.85.719 0 1.181-.578 1.181-1.461v-2.389h.686v4.33zm-.53-8.393c0-1.484 1.205-2.689 2.689-2.689s2.688 1.205 2.688 2.689-1.203 2.688-2.688 2.688-2.689-1.203-2.689-2.688zm5.567 7.856v.52c-.223.059-.33.074-.471.074-.34 0-.637-.238-.711-.57-.381.406-.918.637-1.471.637-.877 0-1.422-.463-1.422-1.248 0-.527.256-.916.76-1.123.266-.107.414-.141 1.389-.264.545-.066.719-.191.719-.48v-.182c0-.412-.348-.645-.967-.645-.645 0-.957.24-1.016.77h-.693c.041-1 .686-1.404 1.734-1.404 1.066 0 1.627.412 1.627 1.182v2.412c0 .215.133.338.373.338.041-.002.074-.002.149-.017z"/></g>',makefile:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#427819"/><path fill="#fff" d="m5 4.5 2.3 2.3 2.3-2.3L11 5.9 8.7 8.2l2.4 2.4L9.7 12l-2.4-2.4L5 11.9 3.6 10.5l2.3-2.3-2.3-2.3zm7 6.5h4v1.5h-4zm0 2.8h4v1.5h-4z"/>',node:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#EDF7EA" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#539E43" d="M11.998,24c-0.321,0-0.641-0.084-0.922-0.247l-2.936-1.737c-0.438-0.245-0.224-0.332-0.08-0.383 c0.585-0.203,0.703-0.25,1.328-0.604c0.065-0.037,0.151-0.023,0.218,0.017l2.256,1.339c0.082,0.045,0.197,0.045,0.272,0l8.795-5.076 c0.082-0.047,0.134-0.141,0.134-0.238V6.921c0-0.099-0.053-0.192-0.137-0.242l-8.791-5.072c-0.081-0.047-0.189-0.047-0.271,0 L3.075,6.68C2.99,6.729,2.936,6.825,2.936,6.921v10.15c0,0.097,0.054,0.189,0.139,0.235l2.409,1.392 c1.307,0.654,2.108-0.116,2.108-0.89V7.787c0-0.142,0.114-0.253,0.256-0.253h1.115c0.139,0,0.255,0.112,0.255,0.253v10.021 c0,1.745-0.95,2.745-2.604,2.745c-0.508,0-0.909,0-2.026-0.551L2.28,18.675c-0.57-0.329-0.922-0.945-0.922-1.604V6.921 c0-0.659,0.353-1.275,0.922-1.603l8.795-5.082c0.557-0.315,1.296-0.315,1.848,0l8.794,5.082c0.57,0.329,0.924,0.944,0.924,1.603 v10.15c0,0.659-0.354,1.273-0.924,1.604l-8.794,5.078C12.643,23.916,12.324,24,11.998,24z M19.099,13.993 c0-1.9-1.284-2.406-3.987-2.763c-2.731-0.361-3.009-0.548-3.009-1.187c0-0.528,0.235-1.233,2.258-1.233 c1.807,0,2.473,0.389,2.747,1.607c0.024,0.115,0.129,0.199,0.247,0.199h1.141c0.071,0,0.138-0.031,0.186-0.081 c0.048-0.054,0.074-0.123,0.067-0.196c-0.177-2.098-1.571-3.076-4.388-3.076c-2.508,0-4.004,1.058-4.004,2.833 c0,1.925,1.488,2.457,3.895,2.695c2.88,0.282,3.103,0.703,3.103,1.269c0,0.983-0.789,1.402-2.642,1.402 c-2.327,0-2.839-0.584-3.011-1.742c-0.02-0.124-0.126-0.215-0.253-0.215h-1.137c-0.141,0-0.254,0.112-0.254,0.253 c0,1.482,0.806,3.248,4.655,3.248C17.501,17.007,19.099,15.91,19.099,13.993z"/></g>',"objective-c":'<rect x="1" y="1" width="18" height="18" rx="4" fill="#438EFF"/><text x="10" y="13.2" text-anchor="middle" font-family="Arial,sans-serif" font-size="7.2" font-weight="800" fill="#fff">OC</text>',perl:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#EAF2F7" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#0073A1" d="M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0m.157 1.103a10.91 10.91 0 0 1 9.214 5.404c-1.962.152-3.156 1.698-5.132 3.553-2.81 2.637-4.562.582-5.288-.898-.447-1.004-.847-2.117-1.544-2.769A.4.4 0 0 1 9.3 6.02l.08-.37a.083.083 0 0 0-.074-.1c-.33-.022-.601.093-.84.368a2.5 2.5 0 0 0-.375-.064c-.863-.093-1.036.345-1.873.345H5.81c-.758 0-1.391.361-1.7.892-.248.424-.257.884.15.93-.126.445.292.62 1.224.192 0 0 .733.421 1.749.421.549 0 .712.087.914.967.486 2.138 2.404 5.655 6.282 5.655l.118.166c.659.934.86 2.113.48 3.184-.307.867-.697 1.531-.697 1.531q.01.178.01.349c0 .81-.175 1.553-.387 2.23a10.91 10.91 0 0 1-11.989-6.342A10.91 10.91 0 0 1 7.608 2.01a10.9 10.9 0 0 1 4.55-.907M7.524 6.47c.288 0 .575.231.477.272a.4.4 0 0 1-.1.02.38.38 0 0 1-.375.327.384.384 0 0 1-.378-.326.4.4 0 0 1-.101-.02c-.098-.042.19-.273.477-.273m10.193 10.49q.05 0 .101.007.326.054.694.096.135.01.269.026a13.4 13.4 0 0 0 2.846-.007 10.9 10.9 0 0 1-2.007 2.705c-.11-.23-.547-1.19-.573-2.196q-.156-.01-.313-.026-.13-.014-.256-.022a18 18 0 0 1-.735-.102h-.003c-.032 0-.06.01-.074.035l-.003.012q-.081.265-.182.544c.428 1.084.652 2.078.652 2.078.14.22.258.432.363.64a11 11 0 0 1-2.168 1.264 11 11 0 0 1-1.205.426 13.3 13.3 0 0 1 1.055-2.531s.678-1.445 1.027-2.564v-.004a.55.55 0 0 1 .512-.38"/></g>',php:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#F0EFF8" stroke="#DDDCEB" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#777BB4" d="M7.01 10.207h-.944l-.515 2.648h.838c.556 0 .97-.105 1.242-.314.272-.21.455-.559.55-1.049.092-.47.05-.802-.124-.995-.175-.193-.523-.29-1.047-.29zM12 5.688C5.373 5.688 0 8.514 0 12s5.373 6.313 12 6.313S24 15.486 24 12c0-3.486-5.373-6.312-12-6.312zm-3.26 7.451c-.261.25-.575.438-.917.551-.336.108-.765.164-1.285.164H5.357l-.327 1.681H3.652l1.23-6.326h2.65c.797 0 1.378.209 1.744.628.366.418.476 1.002.33 1.752a2.836 2.836 0 0 1-.305.847c-.143.255-.33.49-.561.703zm4.024.715l.543-2.799c.063-.318.039-.536-.068-.651-.107-.116-.336-.174-.687-.174H11.46l-.704 3.625H9.388l1.23-6.327h1.367l-.327 1.682h1.218c.767 0 1.295.134 1.586.401s.378.7.263 1.299l-.572 2.944h-1.389zm7.597-2.265a2.782 2.782 0 0 1-.305.847c-.143.255-.33.49-.561.703a2.44 2.44 0 0 1-.917.551c-.336.108-.765.164-1.286.164h-1.18l-.327 1.682h-1.378l1.23-6.326h2.649c.797 0 1.378.209 1.744.628.366.417.477 1.001.331 1.751zM17.766 10.207h-.943l-.516 2.648h.838c.557 0 .971-.105 1.242-.314.272-.21.455-.559.551-1.049.092-.47.049-.802-.125-.995s-.524-.29-1.047-.29z"/></g>',powershell:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#2671BE"/><path fill="#fff" fill-opacity=".16" d="M5.5 4h11l-3.5 12H2z"/><path d="m6.5 6.5 3 3-4.2 3.2m4 1h4" fill="none" stroke="#fff" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>',protobuf:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#4285F4"/><path fill="none" stroke="#fff" stroke-width="1.2" stroke-linejoin="round" d="m10 3.5 6 3.3v6.4l-6 3.3-6-3.3V6.8z"/><path fill="#fff" d="M6.5 6.5h4.4c2.3 0 3.6 1.2 3.6 3.1s-1.3 3.1-3.6 3.1H9v2H6.5zM9 8.4v2.4h1.6c.8 0 1.2-.4 1.2-1.2s-.4-1.2-1.2-1.2z"/>',python:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#F2F4F7" stroke="#D5DBE5" stroke-width=".5"/><g transform="matrix(.126 0 0 .126 2.30 2.24)"><path fill="#3776AB" d="M 60.510156,6.3979729 C 55.926503,6.4192712 51.549217,6.8101906 47.697656,7.4917229 C 36.35144,9.4962267 34.291407,13.691825 34.291406,21.429223 L 34.291406,31.647973 L 61.103906,31.647973 L 61.103906,35.054223 L 34.291406,35.054223 L 24.228906,35.054223 C 16.436447,35.054223 9.6131468,39.73794 7.4789058,48.647973 C 5.0170858,58.860939 4.9078907,65.233996 7.4789058,75.897973 C 9.3848341,83.835825 13.936449,89.491721 21.728906,89.491723 L 30.947656,89.491723 L 30.947656,77.241723 C 30.947656,68.391821 38.6048,60.585475 47.697656,60.585473 L 74.478906,60.585473 C 81.933857,60.585473 87.885159,54.447309 87.885156,46.960473 L 87.885156,21.429223 C 87.885156,14.162884 81.755176,8.7044455 74.478906,7.4917229 C 69.872919,6.7249976 65.093809,6.3766746 60.510156,6.3979729 z M 46.010156,14.616723 C 48.779703,14.616723 51.041406,16.915369 51.041406,19.741723 C 51.041404,22.558059 48.779703,24.835473 46.010156,24.835473 C 43.23068,24.835472 40.978906,22.558058 40.978906,19.741723 C 40.978905,16.91537 43.23068,14.616723 46.010156,14.616723 z "/><path fill="#FFD43B" d="M 91.228906,35.054223 L 91.228906,46.960473 C 91.228906,56.191228 83.403011,63.960472 74.478906,63.960473 L 47.697656,63.960473 C 40.361823,63.960473 34.291407,70.238956 34.291406,77.585473 L 34.291406,103.11672 C 34.291406,110.38306 40.609994,114.65704 47.697656,116.74172 C 56.184987,119.23733 64.323893,119.68835 74.478906,116.74172 C 81.229061,114.78733 87.885159,110.85411 87.885156,103.11672 L 87.885156,92.897973 L 61.103906,92.897973 L 61.103906,89.491723 L 87.885156,89.491723 L 101.29141,89.491723 C 109.08387,89.491723 111.98766,84.056315 114.69765,75.897973 C 117.49698,67.499087 117.37787,59.422197 114.69765,48.647973 C 112.77187,40.890532 109.09378,35.054223 101.29141,35.054223 L 91.228906,35.054223 z M 76.166406,99.710473 C 78.945884,99.710476 81.197656,101.98789 81.197656,104.80422 C 81.197654,107.63057 78.945881,109.92922 76.166406,109.92922 C 73.396856,109.92922 71.135156,107.63057 71.135156,104.80422 C 71.135158,101.98789 73.396853,99.710473 76.166406,99.710473 z "/></g>',r:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#EEF2F6" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#276DC3" d="M12 2.746c-6.627 0-12 3.599-12 8.037 0 3.897 4.144 7.144 9.64 7.88V16.26c-2.924-.915-4.925-2.755-4.925-4.877 0-3.035 4.084-5.494 9.12-5.494 5.038 0 8.757 1.683 8.757 5.494 0 1.976-.999 3.379-2.662 4.272.09.066.174.128.258.216.169.149.25.363.372.544 2.128-1.45 3.44-3.437 3.44-5.631 0-4.44-5.373-8.038-12-8.038zm-2.111 4.99v13.516l4.093-.002-.002-5.291h1.1c.225 0 .321.066.549.25.272.22.715.982.715.982l2.164 4.063 4.627-.002-2.864-4.826s-.086-.193-.265-.383a2.22 2.22 0 00-.582-.416c-.422-.214-1.149-.434-1.149-.434s3.578-.264 3.578-3.826c0-3.562-3.744-3.63-3.744-3.63zm4.127 2.93l2.478.002s1.149-.062 1.149 1.127c0 1.165-1.149 1.17-1.149 1.17h-2.478zm1.754 6.119c-.494.049-1.012.079-1.54.088v1.807a16.622 16.622 0 002.37-.473l-.471-.891s-.108-.183-.248-.394c-.039-.054-.08-.098-.111-.137z"/></g>',react:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#20232A"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#61DAFB" d="M14.23 12.004a2.236 2.236 0 0 1-2.235 2.236 2.236 2.236 0 0 1-2.236-2.236 2.236 2.236 0 0 1 2.235-2.236 2.236 2.236 0 0 1 2.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38-.318-.184-.688-.277-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44-.96-.236-2.006-.417-3.107-.534-.66-.905-1.345-1.727-2.035-2.447 1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442-1.107.117-2.154.298-3.113.538-.112-.49-.195-.964-.254-1.42-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87-.728.063-1.466.098-2.21.098-.74 0-1.477-.035-2.202-.093-.406-.582-.802-1.204-1.183-1.86-.372-.64-.71-1.29-1.018-1.946.303-.657.646-1.313 1.013-1.954.38-.66.773-1.286 1.18-1.868.728-.064 1.466-.098 2.21-.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933-.2-.39-.41-.783-.64-1.174-.225-.392-.465-.774-.705-1.146zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493-.28-.958-.646-1.956-1.1-2.98.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98-.45 1.017-.812 2.01-1.086 2.964-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39.24-.375.48-.762.705-1.158.225-.39.435-.788.636-1.18zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143-.695-.102-1.365-.23-2.006-.386.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295-.22-.005-.406-.05-.553-.132-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z"/></g>',ruby:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#FCEDEC" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#CC342D" d="M20.156.083c3.033.525 3.893 2.598 3.829 4.77L24 4.822 22.635 22.71 4.89 23.926h.016C3.433 23.864.15 23.729 0 19.139l1.645-3 2.819 6.586.503 1.172 2.805-9.144-.03.007.016-.03 9.255 2.956-1.396-5.431-.99-3.9 8.82-.569-.615-.51L16.5 2.114 20.159.073l-.003.01zM0 19.089zM5.13 5.073c3.561-3.533 8.157-5.621 9.922-3.84 1.762 1.777-.105 6.105-3.673 9.636-3.563 3.532-8.103 5.734-9.864 3.957-1.766-1.777.045-6.217 3.612-9.75l.003-.003z"/></g>',rust:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#F3E6DD" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#2B2B2B" d="M23.8346 11.7033l-1.0073-.6236a13.7268 13.7268 0 00-.0283-.2936l.8656-.8069a.3483.3483 0 00-.1154-.578l-1.1066-.414a8.4958 8.4958 0 00-.087-.2856l.6904-.9587a.3462.3462 0 00-.2257-.5446l-1.1663-.1894a9.3574 9.3574 0 00-.1407-.2622l.49-1.0761a.3437.3437 0 00-.0274-.3361.3486.3486 0 00-.3006-.154l-1.1845.0416a6.7444 6.7444 0 00-.1873-.2268l.2723-1.153a.3472.3472 0 00-.417-.4172l-1.1532.2724a14.0183 14.0183 0 00-.2278-.1873l.0415-1.1845a.3442.3442 0 00-.49-.328l-1.076.491c-.0872-.0476-.1742-.0952-.2623-.1407l-.1903-1.1673A.3483.3483 0 0016.256.955l-.9597.6905a8.4867 8.4867 0 00-.2855-.086l-.414-1.1066a.3483.3483 0 00-.5781-.1154l-.8069.8666a9.2936 9.2936 0 00-.2936-.0284L12.2946.1683a.3462.3462 0 00-.5892 0l-.6236 1.0073a13.7383 13.7383 0 00-.2936.0284L9.9803.3374a.3462.3462 0 00-.578.1154l-.4141 1.1065c-.0962.0274-.1903.0567-.2855.086L7.744.955a.3483.3483 0 00-.5447.2258L7.009 2.348a9.3574 9.3574 0 00-.2622.1407l-1.0762-.491a.3462.3462 0 00-.49.328l.0416 1.1845a7.9826 7.9826 0 00-.2278.1873L3.8413 3.425a.3472.3472 0 00-.4171.4171l.2713 1.1531c-.0628.075-.1255.1509-.1863.2268l-1.1845-.0415a.3462.3462 0 00-.328.49l.491 1.0761a9.167 9.167 0 00-.1407.2622l-1.1662.1894a.3483.3483 0 00-.2258.5446l.6904.9587a13.303 13.303 0 00-.087.2855l-1.1065.414a.3483.3483 0 00-.1155.5781l.8656.807a9.2936 9.2936 0 00-.0283.2935l-1.0073.6236a.3442.3442 0 000 .5892l1.0073.6236c.008.0982.0182.1964.0283.2936l-.8656.8079a.3462.3462 0 00.1155.578l1.1065.4141c.0273.0962.0567.1914.087.2855l-.6904.9587a.3452.3452 0 00.2268.5447l1.1662.1893c.0456.088.0922.1751.1408.2622l-.491 1.0762a.3462.3462 0 00.328.49l1.1834-.0415c.0618.0769.1235.1528.1873.2277l-.2713 1.1541a.3462.3462 0 00.4171.4161l1.153-.2713c.075.0638.151.1255.2279.1863l-.0415 1.1845a.3442.3442 0 00.49.327l1.0761-.49c.087.0486.1741.0951.2622.1407l.1903 1.1662a.3483.3483 0 00.5447.2268l.9587-.6904a9.299 9.299 0 00.2855.087l.414 1.1066a.3452.3452 0 00.5781.1154l.8079-.8656c.0972.0111.1954.0203.2936.0294l.6236 1.0073a.3472.3472 0 00.5892 0l.6236-1.0073c.0982-.0091.1964-.0183.2936-.0294l.8069.8656a.3483.3483 0 00.578-.1154l.4141-1.1066a8.4626 8.4626 0 00.2855-.087l.9587.6904a.3452.3452 0 00.5447-.2268l.1903-1.1662c.088-.0456.1751-.0931.2622-.1407l1.0762.49a.3472.3472 0 00.49-.327l-.0415-1.1845a6.7267 6.7267 0 00.2267-.1863l1.1531.2713a.3472.3472 0 00.4171-.416l-.2713-1.1542c.0628-.0749.1255-.1508.1863-.2278l1.1845.0415a.3442.3442 0 00.328-.49l-.49-1.076c.0475-.0872.0951-.1742.1407-.2623l1.1662-.1893a.3483.3483 0 00.2258-.5447l-.6904-.9587.087-.2855 1.1066-.414a.3462.3462 0 00.1154-.5781l-.8656-.8079c.0101-.0972.0202-.1954.0283-.2936l1.0073-.6236a.3442.3442 0 000-.5892zm-6.7413 8.3551a.7138.7138 0 01.2986-1.396.714.714 0 11-.2997 1.396zm-.3422-2.3142a.649.649 0 00-.7715.5l-.3573 1.6685c-1.1035.501-2.3285.7795-3.6193.7795a8.7368 8.7368 0 01-3.6951-.814l-.3574-1.6684a.648.648 0 00-.7714-.499l-1.473.3158a8.7216 8.7216 0 01-.7613-.898h7.1676c.081 0 .1356-.0141.1356-.088v-2.536c0-.074-.0536-.0881-.1356-.0881h-2.0966v-1.6077h2.2677c.2065 0 1.1065.0587 1.394 1.2088.0901.3533.2875 1.5044.4232 1.8729.1346.413.6833 1.2381 1.2685 1.2381h3.5716a.7492.7492 0 00.1296-.0131 8.7874 8.7874 0 01-.8119.9526zM6.8369 20.024a.714.714 0 11-.2997-1.396.714.714 0 01.2997 1.396zM4.1177 8.9972a.7137.7137 0 11-1.304.5791.7137.7137 0 011.304-.579zm-.8352 1.9813l1.5347-.6824a.65.65 0 00.33-.8585l-.3158-.7147h1.2432v5.6025H3.5669a8.7753 8.7753 0 01-.2834-3.348zm6.7343-.5437V8.7836h2.9601c.153 0 1.0792.1772 1.0792.8697 0 .575-.7107.7815-1.2948.7815zm10.7574 1.4862c0 .2187-.008.4363-.0243.651h-.9c-.09 0-.1265.0586-.1265.1477v.413c0 .973-.5487 1.1846-1.0296 1.2382-.4576.0517-.9648-.1913-1.0275-.4717-.2704-1.5186-.7198-1.8436-1.4305-2.4034.8817-.5599 1.799-1.386 1.799-2.4915 0-1.1936-.819-1.9458-1.3769-2.3153-.7825-.5163-1.6491-.6195-1.883-.6195H5.4682a8.7651 8.7651 0 014.907-2.7699l1.0974 1.151a.648.648 0 00.9182.0213l1.227-1.1743a8.7753 8.7753 0 016.0044 4.2762l-.8403 1.8982a.652.652 0 00.33.8585l1.6178.7188c.0283.2875.0425.577.0425.8717zm-9.3006-9.5993a.7128.7128 0 11.984 1.0316.7137.7137 0 01-.984-1.0316zm8.3389 6.71a.7107.7107 0 01.9395-.3625.7137.7137 0 11-.9405.3635z"/></g>',scala:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#FCECEB" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#DC322F" d="M4.589 24c4.537 0 13.81-1.516 14.821-3v-5.729c-.957 1.408-10.284 2.912-14.821 2.912V24zM4.589 16.365c4.537 0 13.81-1.516 14.821-3V7.636c-.957 1.408-10.284 2.912-14.821 2.912v5.817zM4.589 8.729c4.537 0 13.81-1.516 14.821-3V0C18.453 1.408 9.126 2.912 4.589 2.912v5.817z"/></g>',shell:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#303642"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#7EE787" d="M21.038,4.9l-7.577-4.498C13.009,0.134,12.505,0,12,0c-0.505,0-1.009,0.134-1.462,0.403L2.961,4.9 C2.057,5.437,1.5,6.429,1.5,7.503v8.995c0,1.073,0.557,2.066,1.462,2.603l7.577,4.497C10.991,23.866,11.495,24,12,24 c0.505,0,1.009-0.134,1.461-0.402l7.577-4.497c0.904-0.537,1.462-1.529,1.462-2.603V7.503C22.5,6.429,21.943,5.437,21.038,4.9z M15.17,18.946l0.013,0.646c0.001,0.078-0.05,0.167-0.111,0.198l-0.383,0.22c-0.061,0.031-0.111-0.007-0.112-0.085L14.57,19.29 c-0.328,0.136-0.66,0.169-0.872,0.084c-0.04-0.016-0.057-0.075-0.041-0.142l0.139-0.584c0.011-0.046,0.036-0.092,0.069-0.121 c0.012-0.011,0.024-0.02,0.036-0.026c0.022-0.011,0.043-0.014,0.062-0.006c0.229,0.077,0.521,0.041,0.802-0.101 c0.357-0.181,0.596-0.545,0.592-0.907c-0.003-0.328-0.181-0.465-0.613-0.468c-0.55,0.001-1.064-0.107-1.072-0.917 c-0.007-0.667,0.34-1.361,0.889-1.8l-0.007-0.652c-0.001-0.08,0.048-0.168,0.111-0.2l0.37-0.236 c0.061-0.031,0.111,0.007,0.112,0.087l0.006,0.653c0.273-0.109,0.511-0.138,0.726-0.088c0.047,0.012,0.067,0.076,0.048,0.151 l-0.144,0.578c-0.011,0.044-0.036,0.088-0.065,0.116c-0.012,0.012-0.025,0.021-0.038,0.028c-0.019,0.01-0.038,0.013-0.057,0.009 c-0.098-0.022-0.332-0.073-0.699,0.113c-0.385,0.195-0.52,0.53-0.517,0.778c0.003,0.297,0.155,0.387,0.681,0.396 c0.7,0.012,1.003,0.318,1.01,1.023C16.105,17.747,15.736,18.491,15.17,18.946z M19.143,17.859c0,0.06-0.008,0.116-0.058,0.145 l-1.916,1.164c-0.05,0.029-0.09,0.004-0.09-0.056v-0.494c0-0.06,0.037-0.093,0.087-0.122l1.887-1.129 c0.05-0.029,0.09-0.004,0.09,0.056V17.859z M20.459,6.797l-7.168,4.427c-0.894,0.523-1.553,1.109-1.553,2.187v8.833 c0,0.645,0.26,1.063,0.66,1.184c-0.131,0.023-0.264,0.039-0.398,0.039c-0.42,0-0.833-0.114-1.197-0.33L3.226,18.64 c-0.741-0.44-1.201-1.261-1.201-2.142V7.503c0-0.881,0.46-1.702,1.201-2.142l7.577-4.498c0.363-0.216,0.777-0.33,1.197-0.33 c0.419,0,0.833,0.114,1.197,0.33l7.577,4.498c0.624,0.371,1.046,1.013,1.164,1.732C21.686,6.557,21.12,6.411,20.459,6.797z"/></g>',solidity:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#F0F0F0" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#363636" d="M4.409 6.608L7.981.255l3.572 6.353H4.409zM8.411 0l3.569 6.348L15.552 0H8.411zm4.036 17.392l3.572 6.354 3.575-6.354h-7.147zm-.608-10.284h-7.43l3.715 6.605 3.715-6.605zm.428-.25h7.428L15.982.255l-3.715 6.603zM15.589 24l-3.569-6.349L8.448 24h7.141zm-3.856-6.858H4.306l3.712 6.603 3.715-6.603zm.428-.25h7.433l-3.718-6.605-3.715 6.605z"/></g>',sql:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#336791"/><ellipse cx="10" cy="5.5" rx="5.8" ry="2.1" fill="#fff"/><path fill="#fff" fill-opacity=".88" d="M4.2 5.5v8.9c0 1.2 2.6 2.1 5.8 2.1s5.8-.9 5.8-2.1V5.5c0 1.2-2.6 2.1-5.8 2.1s-5.8-.9-5.8-2.1z"/><path d="M4.2 9.2c0 1.2 2.6 2.1 5.8 2.1s5.8-.9 5.8-2.1M4.2 12.9c0 1.2 2.6 2.1 5.8 2.1s5.8-.9 5.8-2.1" fill="none" stroke="#336791" stroke-opacity=".7" stroke-width=".7"/>',svelte:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#FFF0EB" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#FF3E00" d="M10.354 21.125a4.44 4.44 0 0 1-4.765-1.767 4.109 4.109 0 0 1-.703-3.107 3.898 3.898 0 0 1 .134-.522l.105-.321.287.21a7.21 7.21 0 0 0 2.186 1.092l.208.063-.02.208a1.253 1.253 0 0 0 .226.83 1.337 1.337 0 0 0 1.435.533 1.231 1.231 0 0 0 .343-.15l5.59-3.562a1.164 1.164 0 0 0 .524-.778 1.242 1.242 0 0 0-.211-.937 1.338 1.338 0 0 0-1.435-.533 1.23 1.23 0 0 0-.343.15l-2.133 1.36a4.078 4.078 0 0 1-1.135.499 4.44 4.44 0 0 1-4.765-1.766 4.108 4.108 0 0 1-.702-3.108 3.855 3.855 0 0 1 1.742-2.582l5.589-3.563a4.072 4.072 0 0 1 1.135-.499 4.44 4.44 0 0 1 4.765 1.767 4.109 4.109 0 0 1 .703 3.107 3.943 3.943 0 0 1-.134.522l-.105.321-.286-.21a7.204 7.204 0 0 0-2.187-1.093l-.208-.063.02-.207a1.255 1.255 0 0 0-.226-.831 1.337 1.337 0 0 0-1.435-.532 1.231 1.231 0 0 0-.343.15L8.62 9.368a1.162 1.162 0 0 0-.524.778 1.24 1.24 0 0 0 .211.937 1.338 1.338 0 0 0 1.435.533 1.235 1.235 0 0 0 .344-.151l2.132-1.36a4.067 4.067 0 0 1 1.135-.498 4.44 4.44 0 0 1 4.765 1.766 4.108 4.108 0 0 1 .702 3.108 3.857 3.857 0 0 1-1.742 2.583l-5.589 3.562a4.072 4.072 0 0 1-1.135.499m10.358-17.95C18.484-.015 14.082-.96 10.9 1.068L5.31 4.63a6.412 6.412 0 0 0-2.896 4.295 6.753 6.753 0 0 0 .666 4.336 6.43 6.43 0 0 0-.96 2.396 6.833 6.833 0 0 0 1.168 5.167c2.229 3.19 6.63 4.135 9.812 2.108l5.59-3.562a6.41 6.41 0 0 0 2.896-4.295 6.756 6.756 0 0 0-.665-4.336 6.429 6.429 0 0 0 .958-2.396 6.831 6.831 0 0 0-1.167-5.168Z"/></g>',swift:'<defs><clipPath id="__DSC_CODE_ICON_INSTANCE__a"><rect x="1" y="1" width="18" height="18" rx="4"/></clipPath></defs><g clip-path="url(#__DSC_CODE_ICON_INSTANCE__a)"><svg x="1" y="1" width="18" height="18" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><path fill="#f05138" d="M126.33 34.06a39.32 39.32 0 00-.79-7.83 28.78 28.78 0 00-2.65-7.58 28.84 28.84 0 00-4.76-6.32 23.42 23.42 0 00-6.62-4.55 27.27 27.27 0 00-7.68-2.53c-2.65-.51-5.56-.51-8.21-.76H30.25a45.46 45.46 0 00-6.09.51 21.82 21.82 0 00-5.82 1.52c-.53.25-1.32.51-1.85.76a33.82 33.82 0 00-5 3.28c-.53.51-1.06.76-1.59 1.26a22.41 22.41 0 00-4.76 6.32 23.61 23.61 0 00-2.65 7.58 78.5 78.5 0 00-.79 7.83v60.39a39.32 39.32 0 00.79 7.83 28.78 28.78 0 002.65 7.58 28.84 28.84 0 004.76 6.32 23.42 23.42 0 006.62 4.55 27.27 27.27 0 007.68 2.53c2.65.51 5.56.51 8.21.76h63.22a45.08 45.08 0 008.21-.76 27.27 27.27 0 007.68-2.53 30.13 30.13 0 006.62-4.55 22.41 22.41 0 004.76-6.32 23.61 23.61 0 002.65-7.58 78.49 78.49 0 00.79-7.83V34.06z"/><path fill="#fefefe" d="M85 96.5c-11.11 6.13-26.38 6.76-41.75.47A64.53 64.53 0 0113.84 73a50 50 0 0010.85 6.32c15.87 7.1 31.73 6.61 42.9 0-15.9-11.66-29.4-26.82-39.46-39.2a43.47 43.47 0 01-5.29-6.82c12.16 10.61 31.5 24 38.38 27.79a271.77 271.77 0 01-27-32.34 266.8 266.8 0 0044.47 34.87c.71.38 1.26.7 1.7 1a32.7 32.7 0 001.21-3.51c3.71-12.89-.53-27.54-9.79-39.67C93.25 33.81 106 57.05 100.66 76.51c-.14.53-.29 1-.45 1.55l.19.22c10.59 12.63 7.68 26 6.35 23.5C101 91 90.37 94.33 85 96.5z"/></svg></g>',toml:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#F6EEEA" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#9C4121" d="M.014 0h5.34v2.652H2.888v18.681h2.468V24H.015V0Zm17.622 5.049v2.78h-4.274v12.935h-3.008V7.83H6.059V5.05h11.577ZM23.986 24h-5.34v-2.652h2.467V2.667h-2.468V0h5.34v24Z"/></g>',typescript:'<defs><clipPath id="__DSC_CODE_ICON_INSTANCE__a"><rect x="1" y="1" width="18" height="18" rx="4"/></clipPath></defs><g clip-path="url(#__DSC_CODE_ICON_INSTANCE__a)"><svg x="1" y="1" width="18" height="18" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><path fill="#fff" d="M22.67 47h99.67v73.67H22.67z"/><path data-name="original" fill="#007acc" d="M1.5 63.91v62.5h125v-125H1.5zm100.73-5a15.56 15.56 0 017.82 4.5 20.58 20.58 0 013 4c0 .16-5.4 3.81-8.69 5.85-.12.08-.6-.44-1.13-1.23a7.09 7.09 0 00-5.87-3.53c-3.79-.26-6.23 1.73-6.21 5a4.58 4.58 0 00.54 2.34c.83 1.73 2.38 2.76 7.24 4.86 8.95 3.85 12.78 6.39 15.16 10 2.66 4 3.25 10.46 1.45 15.24-2 5.2-6.9 8.73-13.83 9.9a38.32 38.32 0 01-9.52-.1 23 23 0 01-12.72-6.63c-1.15-1.27-3.39-4.58-3.25-4.82a9.34 9.34 0 011.15-.73L82 101l3.59-2.08.75 1.11a16.78 16.78 0 004.74 4.54c4 2.1 9.46 1.81 12.16-.62a5.43 5.43 0 00.69-6.92c-1-1.39-3-2.56-8.59-5-6.45-2.78-9.23-4.5-11.77-7.24a16.48 16.48 0 01-3.43-6.25 25 25 0 01-.22-8c1.33-6.23 6-10.58 12.82-11.87a31.66 31.66 0 019.49.26zm-29.34 5.24v5.12H56.66v46.23H45.15V69.26H28.88v-5a49.19 49.19 0 01.12-5.17C29.08 59 39 59 51 59h21.83z"/></svg></g>',vue:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#ECF8F3" stroke="#D5EAE0" stroke-width=".5"/><path fill="#41B883" d="M3.5 5h3.2l3.3 5.7L13.3 5h3.2L10 16z"/><path fill="#35495E" d="M6.7 5H9l1 1.8L11 5h2.3L10 10.7z"/>',wasm:'<defs><clipPath id="__DSC_CODE_ICON_INSTANCE__a"><rect x="1" y="1" width="18" height="18" rx="4"/></clipPath></defs><g clip-path="url(#__DSC_CODE_ICON_INSTANCE__a)"><svg x="1" y="1" width="18" height="18" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><path fill="#654ff0" d="M.223.222v127.555h127.555V.222H78.594c.014.227.036.455.036.686 0 8.08-6.55 14.626-14.63 14.626-8.078 0-14.625-6.546-14.625-14.626 0-.231.022-.459.031-.686zm29.595 68.746h8.445l5.782 30.738h.107l6.968-30.738h7.908l6.265 31.119h.106l6.597-31.119h8.284l-10.765 45.156H61.12l-6.213-30.738H54.8l-6.7 30.738h-8.557zm59.994 0h13.334l13.284 45.156h-8.77l-2.879-10.051H89.59l-2.212 10.05h-8.5ZM94.895 80.1l-3.684 16.57h11.473L98.448 80.1Z"/></svg></g>',xml:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#EAF3FA" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#005FAD" d="M4.345 7.053c-.495.02-.44.725-.536 1.081-.157.583-.3 1.325-.347 1.926-.046.585-.008 1.127.066 1.719.058.46.191.767.07.89-.108.11-3.216 2.962-3.466 3.123-.26.169-.08.584.069.817.157.246.23.373.557.33.306-.042.405-.409.583-.606.228-.252 2.421-2.401 2.616-2.401.077.544.367 1.064.67 1.513.15.222.314.439.505.629.175.175.4.317.587.45.44.024.795-.301.35-.67-.17-.14-.735-.971-.927-1.43-.18-.43-.574-1.076-.146-1.428 1.494-1.23 3.72-2.262 4.247-2.313-.257 1.024-1.356 3.048-1.757 4.012-.14.333-.231.732-.185 1.094.055.434.383.774.587.806.417-.023.7-.387.946-.645.343-.357.634-.685.974-1.043.339-.356.672-.731.971-1.07.184-.207.674-.713.963-.713-.11.693-.716 1.552-.839 2.254-.125.716.531 1.596 1.217.956.623-.58 1.255-1.129 1.867-1.72.217-.208.175.037.224.242.05.208.176.91.275 1.1.18.346.496.592.897.598.362.006.727-.161.982-.414.19-.187.513-.699.154-.832-.23-.086-.217-.176-.495-.129-.172.029-.362.074-.507.179-.367-.003-.381-.89-.324-1.161.068-.327.207-.659.185-.998-.026-.418-.478-.69-.582-.72-.156-.076-.253.023-.458.212-.173.161-.363.332-.535.495-.34.322-.768.813-.942.813.305-.705.708-2.652-.643-2.48-.563.071-.95.377-1.394.71-.29.28-.683.641-.936.87-.236.216-.371.404-.496.404.132-.747 1.685-3.167.885-3.853-.158-.136-.313-.325-.515-.349a4.637 4.637 0 0 0-.833.19c-.565.18-2.78 1.28-4.19 2.289-.131.094-.214-.085-.231-.29-.087-1.058.199-2.19.496-3.188.208-.696-.557-1.225-.659-1.249zm18.177.874c-.166.364-.2.894-.248 1.319a24.307 24.307 0 0 0-1.246-.115c.238.296.691.588 1.056.724-.048.366-.434.67-.599 1.021.458-.127.676-.47.989-.821.362.22.791.627 1.26.636-.177-.376-.334-.695-.658-.966.269-.175.717-.362.924-.633-.345-.074-.718-.093-1.052-.015-.258-.284-.3-.772-.426-1.15zm-2.92.079c-.23.02-.613.49-.832.773-.807 1.039-1.542 3.15-1.661 3.542-.363 1.195-.502 2.672.28 3.722.456.612 1.258.66 2.041.434.405-.116.812-.406.95-.723.114-.263.174-.753-.404-.38-.224.145-.634.304-1.37.291-.247-.004-.651-.357-.76-.722-.192-.595-.11-1.393-.11-1.393.167-1.028.642-2.146 1.061-3.076.163-.36.658-1.259.842-1.546 0 0 .239-.373.131-.77-.031-.116-.091-.16-.168-.152zm3.072 2.976c-.12.264-.144.648-.18.956-.274-.031-.63-.066-.904-.083.172.215.501.426.766.525-.034.265-.314.486-.434.741.332-.092.49-.34.717-.596.263.16.575.456.914.462-.127-.273-.242-.504-.477-.701.195-.127.52-.262.67-.46a1.77 1.77 0 0 0-.763-.01c-.187-.206-.217-.56-.309-.834zm-1.123 2.422c-.083.183-.1.449-.125.662a12.6 12.6 0 0 0-.624-.058c.119.148.346.295.53.363-.025.184-.219.336-.301.513.23-.064.339-.236.496-.413.181.11.397.316.632.32-.088-.19-.168-.349-.33-.485.135-.087.36-.181.463-.317a1.22 1.22 0 0 0-.527-.008c-.13-.142-.151-.387-.214-.576z"/></g>',yaml:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#FCEEEF" stroke="#F0D8DB" stroke-width=".5"/><svg x="2.75" y="2.75" width="14.5" height="14.5" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet">
22
- <polygon transform="matrix(.24805 0 0 .24805 .5 5.6287)" points="87.702 137.67 0 0 63.25 0 119.02 88.646 175.24 0 235.79 0 143.98 137.67 143.98 224.95 87.702 224.95"/>
23
- <path d="m82.428 49.149h-25.266l-5.1388 12.408h-11.188l23.659-55.798h11.444l22.699 55.798h-11.956l-4.2525-12.408zm-4.197-11.14-7.7455-20.476-8.6412 20.476z" fill="#cb171e"/>
24
- <polygon transform="matrix(.24805 0 0 .24805 .5 5.6287)" points="87.701 250.18 87.701 470.65 135 470.65 135 318.57 184.51 420.79 221.74 420.79 272.94 314.98 272.94 470.6 318.32 470.6 318.32 250.18 256.36 250.18 201.38 349.88 149.02 250.18"/>
25
- <polygon transform="matrix(.24805 0 0 .24805 .5 5.6287)" points="512 422.74 512 422.74 395.64 422.74 395.64 250.12 347.44 250.12 347.44 469.65 512 469.65"/>
26
- </svg>`,zig:'<rect x="1" y="1" width="18" height="18" rx="4" fill="#FFF4DF" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#E18A00" d="m23.53 1.02-7.686 3.45h-7.06l-2.98 3.452h7.173L.47 22.98l7.681-3.607h7.065v-.002l2.978-3.45-7.148-.001 12.482-14.9zM0 4.47v14.901h1.883l2.98-3.45H3.451v-8h.942l2.824-3.45H0zm22.117 0-2.98 3.608h1.412v7.844h-.942l-2.98 3.45H24V4.47h-1.883z"/></g>'}),bm=["angular","c","clojure","cmake","cpp","csharp","css","dart","docker","elixir","env","erlang","flutter","git","go","graphql","haskell","ini","java","javascript","json","kotlin","lua","makefile","node","objective-c","perl","php","powershell","protobuf","python","r","react","ruby","rust","scala","shell","solidity","sql","svelte","swift","toml","typescript","vue","wasm","xml","yaml","zig"],vE=new Set(bm),yE={".bash_profile":"shell",".bashrc":"shell",".env":"env",".gitattributes":"git",".gitconfig":"git",".gitignore":"git",".gitmodules":"git",".mailmap":"git",".profile":"shell",".zprofile":"shell",".zshrc":"shell",bsdmakefile:"makefile","cmakelists.txt":"cmake",commit_editmsg:"git","compose.yaml":"docker","compose.yml":"docker","docker-compose.yaml":"docker","docker-compose.yml":"docker",dockerfile:"docker",gemfile:"ruby",gnumakefile:"makefile",guardfile:"ruby",makefile:"makefile","npm-shrinkwrap.json":"node","package-lock.json":"node","package.json":"node",podfile:"ruby",rakefile:"ruby"},SE=[["dockerfile.","docker"],[".env.","env"]],bE=[[".component.ts","angular"],[".component.html","angular"],[".directive.ts","angular"],[".service.ts","angular"],[".module.ts","angular"],[".pipe.ts","angular"],[".guard.ts","angular"],[".interceptor.ts","angular"],[".dockerfile","docker"]],wE={bash:"shell",c:"c","c++":"cpp",cc:"cpp",cfg:"ini",cjs:"javascript",clj:"clojure",cljc:"clojure",cljs:"clojure",cmake:"cmake",cpp:"cpp",cs:"csharp",csh:"shell",css:"css",csx:"csharp",cts:"typescript",cxx:"cpp",dart:"dart",dtd:"xml",edn:"clojure",env:"env",erl:"erlang",es6:"javascript",escript:"erlang",ex:"elixir",exs:"elixir",fish:"shell",gemspec:"ruby",go:"go",gql:"graphql",graphql:"graphql",h:"c","h++":"cpp",hh:"cpp",hpp:"cpp",hrl:"erlang",hs:"haskell",hxx:"cpp",ini:"ini",ipp:"cpp",java:"java",js:"javascript",json:"json",json5:"json",jsonc:"json",jsx:"react",ksh:"shell",kt:"kotlin",kts:"kotlin",lhs:"haskell",lua:"lua",m:"objective-c",mak:"makefile",mjs:"javascript",mk:"makefile",mm:"objective-c",mts:"typescript",node:"node",pch:"objective-c",php:"php",php3:"php",php4:"php",php5:"php",phps:"php",phtml:"php",pl:"perl",plist:"xml",pm:"perl",pod:"perl",proto:"protobuf",ps1:"powershell",psd1:"powershell",psm1:"powershell",py:"python",pyi:"python",pyw:"python",pyx:"python",r:"r",rake:"ruby",rb:"ruby",rmd:"r",rs:"rust",sc:"scala",scala:"scala",sh:"shell",sol:"solidity",sql:"sql",svelte:"svelte",swift:"swift",t:"perl",tcsh:"shell",toml:"toml",tpp:"cpp",ts:"typescript",tsx:"react",vue:"vue",wasm:"wasm",wast:"wasm",wat:"wasm",xml:"xml",xsd:"xml",xsl:"xml",xslt:"xml",yaml:"yaml",yml:"yaml",zig:"zig",zsh:"shell"},xE={"7z":"archive",apk:"archive",avi:"video",avif:"image",bat:"code",bmp:"image",br:"archive",bz2:"archive",cab:"archive",cmd:"code",csv:"excel",doc:"word",docx:"word",fods:"excel",gif:"image",gz:"archive",heic:"image",heif:"image",htm:"html",html:"html",ico:"image",jar:"archive",jpeg:"image",jpg:"image",key:"ppt",less:"code",lz:"archive",lzma:"archive",markdown:"markdown",m4v:"video",md:"markdown",mdx:"markdown",mkv:"video",mov:"video",mp4:"video",mpeg:"video",mpg:"video",numbers:"excel",odp:"ppt",ods:"excel",odt:"word",ots:"excel",pages:"word",pdf:"pdf",png:"image",ppt:"ppt",pptx:"ppt",rar:"archive",rtf:"word",sass:"code",scss:"code",svg:"image",tar:"archive",taz:"archive",tbz:"archive",tbz2:"archive",tgz:"archive",tif:"image",tiff:"image",tsv:"excel",txz:"archive",webm:"video",webp:"image",xls:"excel",xlsb:"excel",xlsm:"excel",xlt:"excel",xltm:"excel",xltx:"excel",xlsx:"excel",xz:"archive",zip:"archive",zst:"archive"},CE={changelog:"markdown",contributing:"markdown",readme:"markdown"};function lc(e){return e.slice(Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"))+1)}function wm(e){const t=lc(e),n=t.lastIndexOf(".");return n<0?"":t.slice(n+1)}function xm(e){return vE.has(e)}function Cm(e,t,n){const s=yE[e];if(s!==void 0)return s;for(const[l,o]of SE)if(e.startsWith(l))return o;for(const[l,o]of bE)if(e.endsWith(l))return o;return t==="dart"&&n!==void 0&&Object.entries(n.files).find(([o])=>lc(o).toLowerCase()==="pubspec.yaml")?.[1]?.includes("flutter:")===!0?"flutter":wE[t]??null}function nf(e,t){const n=lc(e).toLowerCase(),s=wm(n).toLowerCase();return Cm(n,s,t)??CE[n]??xE[s]??"other"}const bh=28,EE="M8.48924 28H19.5108C21.6479 28 22.7165 28 23.5594 27.6509C24.6833 27.1853 25.5762 26.2924 26.0417 25.1685C26.3909 24.3256 26.3909 23.257 26.3909 21.1199V8.79443C26.3909 8.32877 26.3909 8.09593 26.3471 7.87507C26.2887 7.58058 26.173 7.30042 26.0067 7.05048C25.882 6.86303 25.7177 6.69799 25.3893 6.36792L20.0611 1.01354C19.7304 0.681235 19.5651 0.515081 19.3769 0.38885C19.126 0.220541 18.8443 0.103463 18.5481 0.0443412C18.3259 0 18.0915 0 17.6226 0H8.48924C6.35209 0 5.28351 0 4.4406 0.349145C3.31672 0.814671 2.4238 1.70759 1.95828 2.83147C1.60913 3.67438 1.60913 4.74296 1.60913 6.88011V21.1199C1.60913 23.257 1.60913 24.3256 1.95828 25.1685C2.4238 26.2924 3.31672 27.1853 4.4406 27.6509C5.28351 28 6.35209 28 8.48924 28Z",kE="M26.3909 7.37445L19.0525 0V3.77445C19.0525 4.89271 19.0525 5.45184 19.2352 5.89289C19.4788 6.48096 19.946 6.94818 20.5341 7.19176C20.9751 7.37445 21.5342 7.37445 22.6525 7.37445H26.3909Z",i0="translate(14 16) scale(1.12) translate(-14 -16)",Lo="translate(14 16) scale(1.22) translate(-14 -16)",TE="translate(14 13.0693) scale(1.12) translate(-14 -13.0693)";function ME(e){return e?{fill:"#ffffff",fillOpacity:.36}:{fill:"#ffffff",fillOpacity:.72}}function pn({size:e,className:t,children:n,markTransform:s,muted:l=!1}){return y.jsxs("svg",{width:e,height:e,className:t,viewBox:`0 0 ${String(bh)} ${String(bh)}`,fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:[y.jsx("path",{d:EE,fill:"currentColor"}),y.jsx("path",{d:kE,...ME(l)}),n!==void 0&&y.jsx("g",{color:"#ffffff",transform:s,children:n})]})}function AE({size:e,className:t}){return y.jsxs("svg",{width:e,height:e,className:t,viewBox:`0 0 ${String(bh)} ${String(bh)}`,fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:[y.jsx("path",{d:"M2.80078 10.2112C2.80078 9.52802 2.80078 9.18642 2.85314 8.866C2.98648 8.05 3.36942 7.29538 3.94925 6.70595C4.17694 6.4745 4.45264 6.2728 5.00404 5.86939C5.29197 5.65874 5.43594 5.55342 5.58711 5.46632C5.97089 5.24521 6.39638 5.10618 6.83667 5.05803C7.01011 5.03906 7.18849 5.03906 7.54524 5.03906H11.6543C12.4669 5.03906 12.8732 5.03906 13.2599 5.13697C13.3882 5.16945 13.5143 5.20986 13.6375 5.25795C14.0091 5.40294 14.3398 5.63902 15.0012 6.1112L16.2632 7.01224C16.5526 7.21881 16.6972 7.3221 16.8598 7.38553C16.9137 7.40657 16.9689 7.42425 17.025 7.43846C17.1942 7.4813 17.372 7.4813 17.7275 7.4813H19.8008C22.0506 7.4813 23.1755 7.4813 23.9641 8.05425C24.2188 8.23928 24.4428 8.46326 24.6278 8.71794C25.2008 9.50654 25.2008 10.6315 25.2008 12.8813V18.7283C25.2008 20.9781 25.2008 22.1031 24.6278 22.8917C24.4428 23.1463 24.2188 23.3703 23.9641 23.5554C23.1755 24.1283 22.0506 24.1283 19.8008 24.1283H8.20077C5.95094 24.1283 4.82602 24.1283 4.03743 23.5554C3.78274 23.3703 3.55877 23.1463 3.37373 22.8917C2.80078 22.1031 2.80078 20.9781 2.80078 18.7283V10.2112Z",fill:"currentColor"}),y.jsx("g",{color:"#ffffff",transform:TE,children:y.jsx("path",{d:"M6.31445 13.0693H21.6893",stroke:"currentColor",strokeWidth:"2.38"})})]})}function DE({size:e,className:t}){return y.jsx(pn,{size:e,className:t,children:y.jsx("path",{d:"M14 11.5H11.4C10.5599 11.5 10.1399 11.5 9.81901 11.6635C9.53677 11.8073 9.3073 12.0368 9.16349 12.319C9 12.6399 9 13.0599 9 13.9V16.5M14 11.5H16.6C17.4401 11.5 17.8601 11.5 18.181 11.6635C18.4632 11.8073 18.6927 12.0368 18.8365 12.319C19 12.6399 19 13.0599 19 13.9V16.5M14 11.5V21.5M14 21.5H16.6C17.4401 21.5 17.8601 21.5 18.181 21.3365C18.4632 21.1927 18.6927 20.9632 18.8365 20.681C19 20.3601 19 19.9401 19 19.1V16.5M14 21.5H11.4C10.5599 21.5 10.1399 21.5 9.81901 21.3365C9.53677 21.1927 9.3073 20.9632 9.16349 20.681C9 20.3601 9 19.9401 9 19.1V16.5M19 16.5H9",stroke:"currentColor",strokeWidth:"1.2"})})}function OE({size:e,className:t}){return y.jsxs(pn,{size:e,className:t,markTransform:Lo,children:[y.jsx("rect",{x:"9",y:"12.6",width:"10",height:"8",rx:"1.3",stroke:"currentColor",strokeWidth:"1.35"}),y.jsx("path",{d:"M9 15.6h10",stroke:"currentColor",strokeWidth:"1.35"}),y.jsx("rect",{x:"13.3",y:"15",width:"1.4",height:"1.6",fill:"currentColor"})]})}function RE(e,t,n){switch(e){case"archive":return y.jsx(OE,{size:t,className:n});case"code":return y.jsxs(pn,{size:t,className:n,children:[y.jsx("path",{d:"M10.0053 13.126L7.0236 16.3788C6.96052 16.4476 6.96052 16.5532 7.0236 16.622L10.0053 19.8748",stroke:"currentColor",strokeWidth:"1.35"}),y.jsx("path",{d:"M17.9941 13.126L20.9759 16.3788C21.039 16.4476 21.039 16.5532 20.9759 16.622L17.9941 19.8748",stroke:"currentColor",strokeWidth:"1.35"}),y.jsx("path",{d:"M15.2652 12.957L12.7344 20.0433",stroke:"currentColor",strokeWidth:"1.35"})]});case"excel":return y.jsx(DE,{size:t,className:n});case"folder":return y.jsx(AE,{size:t,className:n});case"html":return y.jsx(pn,{size:t,className:n,markTransform:i0,children:y.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.9994 9.68298C17.212 9.68298 19.8167 12.2872 19.8168 15.4997C19.8168 18.7123 17.2121 21.3171 13.9994 21.3171C10.7869 21.3169 8.18274 18.7122 8.18274 15.4997C8.1829 12.2873 10.787 9.68315 13.9994 9.68298ZM9.26213 16.0247C9.47025 17.9241 10.7936 19.4876 12.5639 20.0463C12.42 19.7977 12.2952 19.5152 12.1879 19.2116C11.885 18.3541 11.693 17.2434 11.6424 16.0247H9.26213ZM16.3565 16.0247C16.3059 17.2434 16.1145 18.3542 15.8116 19.2116C15.7044 19.5151 15.5788 19.7971 15.435 20.0456C17.2054 19.487 18.5293 17.9242 18.7374 16.0247H16.3565ZM12.6938 16.0247C12.7439 17.1459 12.9212 18.1334 13.1784 18.8616C13.332 19.2962 13.503 19.61 13.6686 19.805C13.834 19.9996 13.9473 20.0256 13.9994 20.0258C14.0514 20.0258 14.1651 20.0002 14.331 19.805C14.4966 19.61 14.6676 19.2962 14.8211 18.8616C15.0784 18.1334 15.2557 17.1459 15.3058 16.0247H12.6938ZM13.9994 10.733C13.9473 10.7331 13.834 10.7598 13.6686 10.9545C13.503 11.1494 13.3319 11.4633 13.1784 11.8978C12.903 12.6777 12.7188 13.7545 12.6849 14.9747H15.3147C15.2808 13.7545 15.0966 12.6777 14.8211 11.8978C14.6676 11.4633 14.4965 11.1494 14.331 10.9545C14.1651 10.7593 14.0514 10.733 13.9994 10.733ZM15.5888 11.0051C15.6701 11.1756 15.7444 11.3576 15.8116 11.5478C16.1343 12.4613 16.3308 13.6619 16.3647 14.9747H18.7374C18.5352 13.1307 17.2817 11.6036 15.5888 11.0051ZM12.4101 11.0051C10.7174 11.6037 9.46428 13.1308 9.26213 14.9747H11.6349C11.6688 13.6619 11.8652 12.4613 12.1879 11.5478C12.2551 11.3577 12.3288 11.1756 12.4101 11.0051Z",fill:"currentColor"})});case"image":return y.jsxs(pn,{size:t,className:n,markTransform:i0,children:[y.jsx("path",{d:"M10.4212 15.9204C10.5756 15.6558 10.9579 15.6558 11.1123 15.9204L13.6493 20.2696C13.8048 20.5362 13.6125 20.8711 13.3037 20.8711H8.22974C7.92102 20.8711 7.72868 20.5362 7.88423 20.2696L10.4212 15.9204Z",fill:"currentColor"}),y.jsx("path",{d:"M15.4981 13.186C15.6505 12.9117 16.0451 12.9117 16.1975 13.186L20.1368 20.2769C20.2849 20.5435 20.0922 20.8711 19.7872 20.8711H11.9084C11.6034 20.8711 11.4107 20.5435 11.5588 20.2769L15.4981 13.186Z",fill:"currentColor"}),y.jsx("path",{d:"M11.8603 11.3997C11.8603 12.286 11.1418 13.0045 10.2555 13.0045C9.36924 13.0045 8.65076 12.286 8.65076 11.3997C8.65076 10.5134 9.36924 9.79492 10.2555 9.79492C11.1418 9.79492 11.8603 10.5134 11.8603 11.3997Z",fill:"currentColor"})]});case"markdown":return y.jsx(pn,{size:t,className:n,markTransform:Lo,children:y.jsx("path",{d:"M8.7588 19.5V14.6H9.8998L11.9298 17.932H11.3278L13.3018 14.6H14.4428L14.4568 19.5H13.1828L13.1688 16.539H13.3858L11.9088 19.017H11.2928L9.7738 16.539H10.0398V19.5H8.7588ZM15.4375 19.5V14.6H17.7545C18.2958 14.6 18.7718 14.7003 19.1825 14.901C19.5932 15.1017 19.9128 15.384 20.1415 15.748C20.3748 16.112 20.4915 16.546 20.4915 17.05C20.4915 17.5493 20.3748 17.9833 20.1415 18.352C19.9128 18.716 19.5932 18.9983 19.1825 19.199C18.7718 19.3997 18.2958 19.5 17.7545 19.5H15.4375ZM16.8235 18.394H17.6985C17.9785 18.394 18.2212 18.3427 18.4265 18.24C18.6365 18.1327 18.7998 17.9787 18.9165 17.778C19.0332 17.5727 19.0915 17.33 19.0915 17.05C19.0915 16.7653 19.0332 16.5227 18.9165 16.322C18.7998 16.1213 18.6365 15.9697 18.4265 15.867C18.2212 15.7597 17.9785 15.706 17.6985 15.706H16.8235V18.394Z",fill:"currentColor"})});case"other":return y.jsx(pn,{size:t,className:n,muted:!0});case"pdf":return y.jsx(pn,{size:t,className:n,markTransform:Lo,children:y.jsx("path",{d:"M6.80616 19.5V14.6H9.04616C9.49416 14.6 9.87916 14.6723 10.2012 14.817C10.5278 14.9617 10.7798 15.1717 10.9572 15.447C11.1345 15.7177 11.2232 16.0397 11.2232 16.413C11.2232 16.7817 11.1345 17.1013 10.9572 17.372C10.7798 17.6427 10.5278 17.8527 10.2012 18.002C9.87916 18.1467 9.49416 18.219 9.04616 18.219H7.57616L8.19216 17.617V19.5H6.80616ZM8.19216 17.764L7.57616 17.127H8.96216C9.2515 17.127 9.46616 17.064 9.60616 16.938C9.75083 16.812 9.82316 16.637 9.82316 16.413C9.82316 16.1843 9.75083 16.007 9.60616 15.881C9.46616 15.755 9.2515 15.692 8.96216 15.692H7.57616L8.19216 15.055V17.764ZM11.8989 19.5V14.6H14.2159C14.7573 14.6 15.2333 14.7003 15.6439 14.901C16.0546 15.1017 16.3743 15.384 16.6029 15.748C16.8363 16.112 16.9529 16.546 16.9529 17.05C16.9529 17.5493 16.8363 17.9833 16.6029 18.352C16.3743 18.716 16.0546 18.9983 15.6439 19.199C15.2333 19.3997 14.7573 19.5 14.2159 19.5H11.8989ZM13.2849 18.394H14.1599C14.4399 18.394 14.6826 18.3427 14.8879 18.24C15.0979 18.1327 15.2613 17.9787 15.3779 17.778C15.4946 17.5727 15.5529 17.33 15.5529 17.05C15.5529 16.7653 15.4946 16.5227 15.3779 16.322C15.2613 16.1213 15.0979 15.9697 14.8879 15.867C14.6826 15.7597 14.4399 15.706 14.1599 15.706H13.2849V18.394ZM17.6821 19.5V14.6H21.5251V15.671H19.0681V19.5H17.6821ZM18.9701 17.82V16.749H21.2311V17.82H18.9701Z",fill:"currentColor"})});case"ppt":return y.jsx(pn,{size:t,className:n,markTransform:Lo,children:y.jsx("path",{d:"M11.0132 20.5V13.5H14.2132C14.8532 13.5 15.4032 13.6033 15.8632 13.81C16.3299 14.0167 16.6899 14.3167 16.9432 14.71C17.1966 15.0967 17.3232 15.5567 17.3232 16.09C17.3232 16.6167 17.1966 17.0733 16.9432 17.46C16.6899 17.8467 16.3299 18.1467 15.8632 18.36C15.4032 18.5667 14.8532 18.67 14.2132 18.67H12.1132L12.9932 17.81V20.5H11.0132ZM12.9932 18.02L12.1132 17.11H14.0932C14.5066 17.11 14.8132 17.02 15.0132 16.84C15.2199 16.66 15.3232 16.41 15.3232 16.09C15.3232 15.7633 15.2199 15.51 15.0132 15.33C14.8132 15.15 14.5066 15.06 14.0932 15.06H12.1132L12.9932 14.15V18.02Z",fill:"currentColor"})});case"video":return y.jsx(pn,{size:t,className:n,markTransform:i0,children:y.jsx("path",{d:"M17.5 14.634C18.1667 15.0189 18.1667 15.9811 17.5 16.366L11.5 19.8301C10.8333 20.215 10 19.7339 10 18.9641L10 12.0359C10 11.2661 10.8333 10.785 11.5 11.1699L17.5 14.634Z",fill:"currentColor"})});case"word":return y.jsx(pn,{size:t,className:n,markTransform:Lo,children:y.jsx("path",{d:"M10.5118 20.5L8.24179 13.5H10.2818L12.1918 19.56H11.1618L13.1718 13.5H14.9918L16.8918 19.56H15.9018L17.8718 13.5H19.7618L17.4918 20.5H15.3718L13.7518 15.35H14.3218L12.6318 20.5H10.5118Z",fill:"currentColor"})});default:return LE(e)}}function LE(e){throw new Error(`没有字形的传统档:${String(e)}`)}function NE(e,t,n){const s=`${e} dsc-fti--${t}`;return n===void 0||n===""?s:`${s} ${n}`}function Em(e){const{size:t=16,className:n}=e,s="path"in e?nf(e.path,e.context):e.kind;return xm(s)?y.jsx(km,{type:s,size:t,className:n}):RE(s,t,NE("dsc-fti",s,n))}function km({type:e,size:t=20,className:n}){const s=`dsc-code-icon-${I.useId().replace(/[^a-zA-Z0-9]/g,"")}`,l=Sm[e].replaceAll(ym,s);return y.jsx("svg",{width:t,height:t,className:n,viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,dangerouslySetInnerHTML:{__html:l}})}function v6(e){return nf(e)}function ac({name:e,size:t=16,className:n}){return y.jsx(Em,{path:e,size:t,className:n})}const zE=500,BE=1e3;function y6(){const[e,t]=I.useState(null),n=I.useRef(null),s=I.useRef(null),l=()=>{n.current!==null&&(window.clearTimeout(n.current),n.current=null)},o=()=>{s.current!==null&&(window.clearTimeout(s.current),s.current=null)};return I.useEffect(()=>()=>{l(),o()},[]),{hover:e,arm:(p,d,g=520)=>{l(),o(),n.current=window.setTimeout(()=>t({item:p,anchor:d,cardWidth:g}),zE)},disarm:()=>{l(),o(),s.current=window.setTimeout(()=>t(null),BE)},keep:o,close:()=>{l(),o(),t(null)}}}function jE(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const HE=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,IE=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,PE={};function Oy(e,t){return(PE.jsx?IE:HE).test(e)}const FE=/[ \t\n\f\r]/g;function UE(e){return typeof e=="object"?e.type==="text"?Ry(e.value):!1:Ry(e)}function Ry(e){return e.replace(FE,"")===""}class oc{constructor(t,n,s){this.normal=n,this.property=t,s&&(this.space=s)}}oc.prototype.normal={};oc.prototype.property={};oc.prototype.space=void 0;function S6(e,t){const n={},s={};for(const l of e)Object.assign(n,l.property),Object.assign(s,l.normal);return new oc(n,s,t)}function $0(e){return e.toLowerCase()}class ki{constructor(t,n){this.attribute=n,this.property=t}}ki.prototype.attribute="";ki.prototype.booleanish=!1;ki.prototype.boolean=!1;ki.prototype.commaOrSpaceSeparated=!1;ki.prototype.commaSeparated=!1;ki.prototype.defined=!1;ki.prototype.mustUseProperty=!1;ki.prototype.number=!1;ki.prototype.overloadedBoolean=!1;ki.prototype.property="";ki.prototype.spaceSeparated=!1;ki.prototype.space=void 0;let VE=0;const Oe=Zs(),Tt=Zs(),Y0=Zs(),le=Zs(),st=Zs(),$s=Zs(),Pi=Zs();function Zs(){return 2**++VE}const K0=Object.freeze(Object.defineProperty({__proto__:null,boolean:Oe,booleanish:Tt,commaOrSpaceSeparated:Pi,commaSeparated:$s,number:le,overloadedBoolean:Y0,spaceSeparated:st},Symbol.toStringTag,{value:"Module"})),n0=Object.keys(K0);class Tm extends ki{constructor(t,n,s,l){let o=-1;if(super(t,n),Ly(this,"space",l),typeof s=="number")for(;++o<n0.length;){const u=n0[o];Ly(this,n0[o],(s&K0[u])===K0[u])}}}Tm.prototype.defined=!0;function Ly(e,t,n){n&&(e[t]=n)}function _a(e){const t={},n={};for(const[s,l]of Object.entries(e.properties)){const o=new Tm(s,e.transform(e.attributes||{},s),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(o.mustUseProperty=!0),t[s]=o,n[$0(s)]=s,n[$0(o.attribute)]=s}return new oc(t,n,e.space)}const b6=_a({properties:{ariaActiveDescendant:null,ariaAtomic:Tt,ariaAutoComplete:null,ariaBusy:Tt,ariaChecked:Tt,ariaColCount:le,ariaColIndex:le,ariaColSpan:le,ariaControls:st,ariaCurrent:null,ariaDescribedBy:st,ariaDetails:null,ariaDisabled:Tt,ariaDropEffect:st,ariaErrorMessage:null,ariaExpanded:Tt,ariaFlowTo:st,ariaGrabbed:Tt,ariaHasPopup:null,ariaHidden:Tt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:st,ariaLevel:le,ariaLive:null,ariaModal:Tt,ariaMultiLine:Tt,ariaMultiSelectable:Tt,ariaOrientation:null,ariaOwns:st,ariaPlaceholder:null,ariaPosInSet:le,ariaPressed:Tt,ariaReadOnly:Tt,ariaRelevant:null,ariaRequired:Tt,ariaRoleDescription:st,ariaRowCount:le,ariaRowIndex:le,ariaRowSpan:le,ariaSelected:Tt,ariaSetSize:le,ariaSort:null,ariaValueMax:le,ariaValueMin:le,ariaValueNow:le,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function w6(e,t){return t in e?e[t]:t}function x6(e,t){return w6(e,t.toLowerCase())}const qE=_a({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:$s,acceptCharset:st,accessKey:st,action:null,allow:null,allowFullScreen:Oe,allowPaymentRequest:Oe,allowUserMedia:Oe,alpha:Oe,alt:null,as:null,async:Oe,autoCapitalize:null,autoComplete:st,autoFocus:Oe,autoPlay:Oe,blocking:st,capture:null,charSet:null,checked:Oe,cite:null,className:st,closedBy:null,colorSpace:null,cols:le,colSpan:le,command:null,commandFor:null,content:null,contentEditable:Tt,controls:Oe,controlsList:st,coords:le|$s,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Oe,defer:Oe,dir:null,dirName:null,disabled:Oe,download:Y0,draggable:Tt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Oe,formTarget:null,headers:st,height:le,hidden:Y0,high:le,href:null,hrefLang:null,htmlFor:st,httpEquiv:st,id:null,imageSizes:null,imageSrcSet:null,inert:Oe,inputMode:null,integrity:null,is:null,isMap:Oe,itemId:null,itemProp:st,itemRef:st,itemScope:Oe,itemType:st,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Oe,low:le,manifest:null,max:null,maxLength:le,media:null,method:null,min:null,minLength:le,multiple:Oe,muted:Oe,name:null,nonce:null,noModule:Oe,noValidate:Oe,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:Oe,optimum:le,pattern:null,ping:st,placeholder:null,playsInline:Oe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Oe,referrerPolicy:null,rel:st,required:Oe,reversed:Oe,rows:le,rowSpan:le,sandbox:st,scope:null,scoped:Oe,seamless:Oe,selected:Oe,shadowRootClonable:Oe,shadowRootCustomElementRegistry:Oe,shadowRootDelegatesFocus:Oe,shadowRootMode:null,shadowRootSerializable:Oe,shape:null,size:le,sizes:null,slot:null,span:le,spellCheck:Tt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:le,step:null,style:null,tabIndex:le,target:null,title:null,translate:null,type:null,typeMustMatch:Oe,useMap:null,value:Tt,width:le,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:st,axis:null,background:null,bgColor:null,border:le,borderColor:null,bottomMargin:le,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Oe,declare:Oe,event:null,face:null,frame:null,frameBorder:null,hSpace:le,leftMargin:le,link:null,longDesc:null,lowSrc:null,marginHeight:le,marginWidth:le,noResize:Oe,noHref:Oe,noShade:Oe,noWrap:Oe,object:null,profile:null,prompt:null,rev:null,rightMargin:le,rules:null,scheme:null,scrolling:Tt,standby:null,summary:null,text:null,topMargin:le,valueType:null,version:null,vAlign:null,vLink:null,vSpace:le,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Oe,disablePictureInPicture:Oe,disableRemotePlayback:Oe,exportParts:$s,part:st,prefix:null,property:null,results:le,security:null,unselectable:null},space:"html",transform:x6}),$E=_a({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:Pi,accentHeight:le,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:le,amplitude:le,arabicForm:null,ascent:le,attributeName:null,attributeType:null,azimuth:le,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:le,by:null,calcMode:null,capHeight:le,className:st,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:le,diffuseConstant:le,direction:null,display:null,dur:null,divisor:le,dominantBaseline:null,download:Oe,dx:null,dy:null,edgeMode:null,editable:null,elevation:le,enableBackground:null,end:null,event:null,exponent:le,externalResourcesRequired:null,fill:null,fillOpacity:le,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:$s,g2:$s,glyphName:$s,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:le,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:le,horizOriginX:le,horizOriginY:le,id:null,ideographic:le,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:le,k:le,k1:le,k2:le,k3:le,k4:le,kernelMatrix:Pi,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:le,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:le,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:le,overlineThickness:le,paintOrder:null,panose1:null,path:null,pathLength:le,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:st,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:le,pointsAtY:le,pointsAtZ:le,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Pi,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Pi,rev:Pi,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Pi,requiredFeatures:Pi,requiredFonts:Pi,requiredFormats:Pi,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:le,specularExponent:le,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:le,strikethroughThickness:le,string:null,stroke:null,strokeDashArray:Pi,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:le,strokeOpacity:le,strokeWidth:null,style:null,surfaceScale:le,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Pi,tabIndex:le,tableValues:null,target:null,targetX:le,targetY:le,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Pi,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:le,underlineThickness:le,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:le,values:null,vAlphabetic:le,vMathematical:le,vectorEffect:null,vHanging:le,vIdeographic:le,version:null,vertAdvY:le,vertOriginX:le,vertOriginY:le,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:le,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:w6}),C6=_a({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),E6=_a({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:x6}),k6=_a({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),YE={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"},KE=/[A-Z]/g,Ny=/-[a-z]/g,WE=/^data[-\w.:]+$/i;function GE(e,t){const n=$0(t);let s=t,l=ki;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&WE.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Ny,ZE);s="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Ny.test(o)){let u=o.replace(KE,XE);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}l=Tm}return new l(s,t)}function XE(e){return"-"+e.toLowerCase()}function ZE(e){return e.charAt(1).toUpperCase()}const QE=S6([b6,qE,C6,E6,k6],"html"),Mm=S6([b6,$E,C6,E6,k6],"svg");function JE(e){return e.join(" ").trim()}var Gl={},r0,zy;function ek(){if(zy)return r0;zy=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,h=/^\s+|\s+$/g,p=`
27
- `,d="/",g="*",_="",S="comment",v="declaration";function w(E,M){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];M=M||{};var U=1,B=1;function X(Z){var P=Z.match(t);P&&(U+=P.length);var H=Z.lastIndexOf(p);B=~H?Z.length-H:B+Z.length}function Q(){var Z={line:U,column:B};return function(P){return P.position=new R(Z),me(),P}}function R(Z){this.start=Z,this.end={line:U,column:B},this.source=M.source}R.prototype.content=E;function V(Z){var P=new Error(M.source+":"+U+":"+B+": "+Z);if(P.reason=Z,P.filename=M.source,P.line=U,P.column=B,P.source=E,!M.silent)throw P}function se(Z){var P=Z.exec(E);if(P){var H=P[0];return X(H),E=E.slice(H.length),P}}function me(){se(n)}function k(Z){var P;for(Z=Z||[];P=K();)P!==!1&&Z.push(P);return Z}function K(){var Z=Q();if(!(d!=E.charAt(0)||g!=E.charAt(1))){for(var P=2;_!=E.charAt(P)&&(g!=E.charAt(P)||d!=E.charAt(P+1));)++P;if(P+=2,_===E.charAt(P-1))return V("End of comment missing");var H=E.slice(2,P-2);return B+=2,X(H),E=E.slice(P),B+=2,Z({type:S,comment:H})}}function W(){var Z=Q(),P=se(s);if(P){if(K(),!se(l))return V("property missing ':'");var H=se(o),ie=Z({type:v,property:C(P[0].replace(e,_)),value:H?C(H[0].replace(e,_)):_});return se(u),ie}}function q(){var Z=[];k(Z);for(var P;P=W();)P!==!1&&(Z.push(P),k(Z));return Z}return me(),q()}function C(E){return E?E.replace(h,_):_}return r0=w,r0}var By;function tk(){if(By)return Gl;By=1;var e=Gl&&Gl.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Gl,"__esModule",{value:!0}),Gl.default=n;const t=e(ek());function n(s,l){let o=null;if(!s||typeof s!="string")return o;const u=(0,t.default)(s),h=typeof l=="function";return u.forEach(p=>{if(p.type!=="declaration")return;const{property:d,value:g}=p;h?l(d,g,p):g&&(o=o||{},o[d]=g)}),o}return Gl}var xo={},jy;function ik(){if(jy)return xo;jy=1,Object.defineProperty(xo,"__esModule",{value:!0}),xo.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,s=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,o=function(d){return!d||n.test(d)||e.test(d)},u=function(d,g){return g.toUpperCase()},h=function(d,g){return"".concat(g,"-")},p=function(d,g){return g===void 0&&(g={}),o(d)?d:(d=d.toLowerCase(),g.reactCompat?d=d.replace(l,h):d=d.replace(s,h),d.replace(t,u))};return xo.camelCase=p,xo}var Co,Hy;function nk(){if(Hy)return Co;Hy=1;var e=Co&&Co.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},t=e(tk()),n=ik();function s(l,o){var u={};return!l||typeof l!="string"||(0,t.default)(l,function(h,p){h&&p&&(u[(0,n.camelCase)(h,o)]=p)}),u}return s.default=s,Co=s,Co}var rk=nk();const sk=da(rk),T6=M6("end"),Am=M6("start");function M6(e){return t;function t(n){const s=n&&n.position&&n.position[e]||{};if(typeof s.line=="number"&&s.line>0&&typeof s.column=="number"&&s.column>0)return{line:s.line,column:s.column,offset:typeof s.offset=="number"&&s.offset>-1?s.offset:void 0}}}function lk(e){const t=Am(e),n=T6(e);if(t&&n)return{start:t,end:n}}function Po(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Iy(e.position):"start"in e||"end"in e?Iy(e):"line"in e||"column"in e?W0(e):""}function W0(e){return Py(e&&e.line)+":"+Py(e&&e.column)}function Iy(e){return W0(e&&e.start)+"-"+W0(e&&e.end)}function Py(e){return e&&typeof e=="number"?e:1}class ai extends Error{constructor(t,n,s){super(),typeof n=="string"&&(s=n,n=void 0);let l="",o={},u=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?l=t:!o.cause&&t&&(u=!0,l=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof s=="string"){const p=s.indexOf(":");p===-1?o.ruleId=s:(o.source=s.slice(0,p),o.ruleId=s.slice(p+1))}if(!o.place&&o.ancestors&&o.ancestors){const p=o.ancestors[o.ancestors.length-1];p&&(o.place=p.position)}const h=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=h?h.column:void 0,this.fatal=void 0,this.file="",this.message=l,this.line=h?h.line:void 0,this.name=Po(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=u&&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}}ai.prototype.file="";ai.prototype.name="";ai.prototype.reason="";ai.prototype.message="";ai.prototype.stack="";ai.prototype.column=void 0;ai.prototype.line=void 0;ai.prototype.ancestors=void 0;ai.prototype.cause=void 0;ai.prototype.fatal=void 0;ai.prototype.place=void 0;ai.prototype.ruleId=void 0;ai.prototype.source=void 0;const Dm={}.hasOwnProperty,ak=new Map,ok=/[A-Z]/g,ck=new Set(["table","tbody","thead","tfoot","tr"]),uk=new Set(["td","th"]),A6="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function hk(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let s;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");s=yk(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");s=vk(n,t.jsx,t.jsxs)}const l={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:s,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Mm:QE,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=D6(l,e,void 0);return o&&typeof o!="string"?o:l.create(e,l.Fragment,{children:o||void 0},void 0)}function D6(e,t,n){if(t.type==="element")return fk(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return dk(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return mk(e,t,n);if(t.type==="mdxjsEsm")return pk(e,t);if(t.type==="root")return _k(e,t,n);if(t.type==="text")return gk(e,t)}function fk(e,t,n){const s=e.schema;let l=s;t.tagName.toLowerCase()==="svg"&&s.space==="html"&&(l=Mm,e.schema=l),e.ancestors.push(t);const o=R6(e,t.tagName,!1),u=Sk(e,t);let h=Rm(e,t);return ck.has(t.tagName)&&(h=h.filter(function(p){return typeof p=="string"?!UE(p):!0})),O6(e,u,o,t),Om(u,h),e.ancestors.pop(),e.schema=s,e.create(t,o,u,n)}function dk(e,t){if(t.data&&t.data.estree&&e.evaluater){const s=t.data.estree.body[0];return s.type,e.evaluater.evaluateExpression(s.expression)}Xo(e,t.position)}function pk(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Xo(e,t.position)}function mk(e,t,n){const s=e.schema;let l=s;t.name==="svg"&&s.space==="html"&&(l=Mm,e.schema=l),e.ancestors.push(t);const o=t.name===null?e.Fragment:R6(e,t.name,!0),u=bk(e,t),h=Rm(e,t);return O6(e,u,o,t),Om(u,h),e.ancestors.pop(),e.schema=s,e.create(t,o,u,n)}function _k(e,t,n){const s={};return Om(s,Rm(e,t)),e.create(t,e.Fragment,s,n)}function gk(e,t){return t.value}function O6(e,t,n,s){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=s)}function Om(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function vk(e,t,n){return s;function s(l,o,u,h){const d=Array.isArray(u.children)?n:t;return h?d(o,u,h):d(o,u)}}function yk(e,t){return n;function n(s,l,o,u){const h=Array.isArray(o.children),p=Am(s);return t(l,o,u,h,{columnNumber:p?p.column-1:void 0,fileName:e,lineNumber:p?p.line:void 0},void 0)}}function Sk(e,t){const n={};let s,l;for(l in t.properties)if(l!=="children"&&Dm.call(t.properties,l)){const o=wk(e,l,t.properties[l]);if(o){const[u,h]=o;e.tableCellAlignToStyle&&u==="align"&&typeof h=="string"&&uk.has(t.tagName)?s=h:n[u]=h}}if(s){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=s}return n}function bk(e,t){const n={};for(const s of t.attributes)if(s.type==="mdxJsxExpressionAttribute")if(s.data&&s.data.estree&&e.evaluater){const o=s.data.estree.body[0];o.type;const u=o.expression;u.type;const h=u.properties[0];h.type,Object.assign(n,e.evaluater.evaluateExpression(h.argument))}else Xo(e,t.position);else{const l=s.name;let o;if(s.value&&typeof s.value=="object")if(s.value.data&&s.value.data.estree&&e.evaluater){const h=s.value.data.estree.body[0];h.type,o=e.evaluater.evaluateExpression(h.expression)}else Xo(e,t.position);else o=s.value===null?!0:s.value;n[l]=o}return n}function Rm(e,t){const n=[];let s=-1;const l=e.passKeys?new Map:ak;for(;++s<t.children.length;){const o=t.children[s];let u;if(e.passKeys){const p=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(p){const d=l.get(p)||0;u=p+"-"+d,l.set(p,d+1)}}const h=D6(e,o,u);h!==void 0&&n.push(h)}return n}function wk(e,t,n){const s=GE(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=s.commaSeparated?jE(n):JE(n)),s.property==="style"){let l=typeof n=="object"?n:xk(e,String(n));return e.stylePropertyNameCase==="css"&&(l=Ck(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&s.space?YE[s.property]||s.property:s.attribute,n]}}function xk(e,t){try{return sk(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const s=n,l=new ai("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:s,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=A6+"#cannot-parse-style-attribute",l}}function R6(e,t,n){let s;if(!n)s={type:"Literal",value:t};else if(t.includes(".")){const l=t.split(".");let o=-1,u;for(;++o<l.length;){const h=Oy(l[o])?{type:"Identifier",name:l[o]}:{type:"Literal",value:l[o]};u=u?{type:"MemberExpression",object:u,property:h,computed:!!(o&&h.type==="Literal"),optional:!1}:h}s=u}else s=Oy(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(s.type==="Literal"){const l=s.value;return Dm.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(s);Xo(e)}function Xo(e,t){const n=new ai("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=A6+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Ck(e){const t={};let n;for(n in e)Dm.call(e,n)&&(t[Ek(n)]=e[n]);return t}function Ek(e){let t=e.replace(ok,kk);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function kk(e){return"-"+e.toLowerCase()}const s0={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"]},Tk={};function Lm(e,t){const n=Tk,s=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,l=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return L6(e,s,l)}function L6(e,t,n){if(Mk(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Fy(e.children,t,n)}return Array.isArray(e)?Fy(e,t,n):""}function Fy(e,t,n){const s=[];let l=-1;for(;++l<e.length;)s[l]=L6(e[l],t,n);return s.join("")}function Mk(e){return!!(e&&typeof e=="object")}const Uy=document.createElement("i");function Nm(e){const t="&"+e+";";Uy.innerHTML=t;const n=Uy.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function mn(e,t,n,s){const l=e.length;let o=0,u;if(t<0?t=-t>l?0:l+t:t=t>l?l:t,n=n>0?n:0,s.length<1e4)u=Array.from(s),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);o<s.length;)u=s.slice(o,o+1e4),u.unshift(t,0),e.splice(...u),o+=1e4,t+=1e4}function rn(e,t){return e.length>0?(mn(e,e.length,0,t),e):t}const Vy={}.hasOwnProperty;function N6(e){const t={};let n=-1;for(;++n<e.length;)Ak(t,e[n]);return t}function Ak(e,t){let n;for(n in t){const l=(Vy.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let u;if(o)for(u in o){Vy.call(l,u)||(l[u]=[]);const h=o[u];Dk(l[u],Array.isArray(h)?h:h?[h]:[])}}}function Dk(e,t){let n=-1;const s=[];for(;++n<t.length;)(t[n].add==="after"?e:s).push(t[n]);mn(e,0,0,s)}function z6(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function _n(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ii=cs(/[A-Za-z]/),ri=cs(/[\dA-Za-z]/),Ok=cs(/[#-'*+\--9=?A-Z^-~]/);function wh(e){return e!==null&&(e<32||e===127)}const G0=cs(/\d/),Rk=cs(/[\dA-Fa-f]/),B6=cs(/[!-/:-@[-`{-~]/);function ke(e){return e!==null&&e<-2}function lt(e){return e!==null&&(e<0||e===32)}function Ie(e){return e===-2||e===-1||e===32}const rf=cs(/\p{P}|\p{S}/u),Ks=cs(/\s/);function cs(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ga(e){const t=[];let n=-1,s=0,l=0;for(;++n<e.length;){const o=e.charCodeAt(n);let u="";if(o===37&&ri(e.charCodeAt(n+1))&&ri(e.charCodeAt(n+2)))l=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(u=String.fromCharCode(o));else if(o>55295&&o<57344){const h=e.charCodeAt(n+1);o<56320&&h>56319&&h<57344?(u=String.fromCharCode(o,h),l=1):u="�"}else u=String.fromCharCode(o);u&&(t.push(e.slice(s,n),encodeURIComponent(u)),s=n+l+1,u=""),l&&(n+=l,l=0)}return t.join("")+e.slice(s)}function Ke(e,t,n,s){const l=s?s-1:1/0;let o=0;return u;function u(p){return Ie(p)?(e.enter(n),h(p)):t(p)}function h(p){return Ie(p)&&o++<l?(e.consume(p),h):(e.exit(n),t(p))}}function j6(e,t,n,s,l,o){let u=0;return h;function h(g){return Ie(g)?(e.enter(s),p(g)):d(g)}function p(g){return Ie(g)&&u<o?(e.consume(g),u++,p):(e.exit(s),d(g))}function d(g){return u>=l?t(g):n(g)}}const Lk={tokenize:Nk};function Nk(e){const t=e.attempt(this.parser.constructs.contentInitial,s,l);let n;return t;function s(h){if(h===null){e.consume(h);return}return e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),Ke(e,t,"linePrefix")}function l(h){return e.enter("paragraph"),o(h)}function o(h){const p=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=p),n=p,u(h)}function u(h){if(h===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(h);return}return ke(h)?(e.consume(h),e.exit("chunkText"),o):(e.consume(h),u)}}let xh=class{constructor(){this.index=new Map,this.map=[]}add(t,n,s){qy(this,t,n,s,!1)}addBefore(t,n,s){qy(this,t,n,s,!0)}consume(t){if(this.map.sort(function(o,u){return o[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const s=[];for(;n>0;)n-=1,s.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];s.push(t.slice()),t.length=0;let l=s.pop();for(;l;){for(const o of l)t.push(o);l=s.pop()}this.map.length=0,this.index.clear()}};function qy(e,t,n,s,l){if(n===0&&s.length===0)return;const o=e.index.get(t);if(o){o[1]+=n,l?(s.push(...o[2]),o[2]=s):o[2].push(...s);return}const u=[t,n,s];e.map.push(u),e.index.set(t,u)}const zk={tokenize:Bk},$y={tokenize:jk};function Bk(e){const t=this,n=[];let s=0,l,o,u;return h;function h(B){if(s<n.length){const X=n[s];return t.containerState=X[1],e.attempt(X[0].continuation,p,d)(B)}return d(B)}function p(B){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,l&&U();const X=t.events.length;let Q=X,R;for(;Q--;)if(t.events[Q][0]==="exit"&&t.events[Q][1].type==="chunkFlow"){R=t.events[Q][1].end;break}M(s);let V=X;for(;V<t.events.length;)t.events[V][1].end={...R},V++;const se=new xh;return se.add(Q+1,0,t.events.slice(X)),se.add(X,V-X,[]),se.consume(t.events),d(B)}return h(B)}function d(B){if(s===n.length){if(!l)return S(B);if(l.currentConstruct&&l.currentConstruct.concrete)return w(B);t.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return t.containerState={},e.check($y,g,_)(B)}function g(B){return l&&U(),M(s),S(B)}function _(B){return t.parser.lazy[t.now().line]=s!==n.length,u=t.now().offset,w(B)}function S(B){return t.containerState={},e.attempt($y,v,w)(B)}function v(B){return s++,n.push([t.currentConstruct,t.containerState]),S(B)}function w(B){if(B===null){l&&U(),M(0),e.consume(B);return}return l=l||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:o}),C(B)}function C(B){if(B===null){E(e.exit("chunkFlow"),!0),M(0),e.consume(B);return}return ke(B)?(e.consume(B),E(e.exit("chunkFlow")),s=0,t.interrupt=void 0,h):(e.consume(B),C)}function E(B,X){const Q=t.sliceStream(B);if(X&&Q.push(null),B.previous=o,o&&(o.next=B),o=B,l.defineSkip(B.start),l.write(Q),t.parser.lazy[B.start.line]){let R=l.events.length;for(;R--;)if(l.events[R][1].start.offset<u&&(!l.events[R][1].end||l.events[R][1].end.offset>u))return;const V=t.events.length;let se=V,me,k;for(;se--;)if(t.events[se][0]==="exit"&&t.events[se][1].type==="chunkFlow"){if(me){k=t.events[se][1].end;break}me=!0}for(M(s),R=V;R<t.events.length;)t.events[R][1].end={...k},R++;const K=new xh;K.add(se+1,0,t.events.slice(V)),K.add(V,R-V,[]),K.consume(t.events)}}function M(B){let X=n.length;for(;X-- >B;){const Q=n[X];t.containerState=Q[1],Q[0].exit.call(t,e)}n.length=B}function U(){l.write([null]),o=void 0,l=void 0,t.containerState._closeFlow=void 0}}function jk(e,t,n){return Ke(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function as(e){if(e===null||lt(e)||Ks(e))return 1;if(rf(e))return 2}function sf(e,t,n){const s=[];let l=-1;for(;++l<e.length;){const o=e[l].resolveAll;o&&!s.includes(o)&&(t=o(t,n),s.push(o))}return t}const X0={name:"attention",resolveAll:Hk,tokenize:Ik};function Hk(e,t){let n=-1,s;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){let l=n;for(;l--;)if(e[l][0]==="exit"&&e[l][1].type==="attentionSequence"&&e[l][1]._open&&t.sliceSerialize(e[l][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[l][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[l][1].end.offset-e[l][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;const o=e[l][1].end.offset-e[l][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,u={...e[l][1].end},h={...e[n][1].start};Yy(u,-o),Yy(h,o);const p={type:o>1?"strongSequence":"emphasisSequence",start:u,end:{...e[l][1].end}},d={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},g={type:o>1?"strongText":"emphasisText",start:{...e[l][1].end},end:{...e[n][1].start}},_={type:o>1?"strong":"emphasis",start:{...p.start},end:{...d.end}};e[l][1].end={...p.start},e[n][1].start={...d.end},s=[],e[l][1].end.offset-e[l][1].start.offset&&(s=rn(s,[["enter",e[l][1],t],["exit",e[l][1],t]])),s=rn(s,[["enter",_,t],["enter",p,t],["exit",p,t],["enter",g,t]]),s=rn(s,sf(t.parser.constructs.insideSpan.null,e.slice(l+1,n),t)),s=rn(s,[["exit",g,t],["enter",d,t],["exit",d,t],["exit",_,t]]);let S=0;e[n][1].end.offset-e[n][1].start.offset&&(S=2,s=rn(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),mn(e,l-1,n-l+3,s),n=l+s.length-S-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Ik(e,t){const n=this.parser.constructs.attentionMarkers.null,s=this.previous,l=as(s);let o;return u;function u(p){return o=p,e.enter("attentionSequence"),h(p)}function h(p){if(p===o)return e.consume(p),h;const d=e.exit("attentionSequence"),g=as(p),_=!g||g===2&&l||n.includes(p)&&p!==42&&p!==95,S=!l||l===2&&g||n.includes(s)&&s!==42&&s!==95;return d._open=!!(o===42?_:_&&(l||!S)),d._close=!!(o===42?S:S&&(g||!_)),t(p)}}function Yy(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Pk={name:"autolink",tokenize:Fk};function Fk(e,t,n){let s=0;return l;function l(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(v){return ii(v)?(e.consume(v),u):v===64?n(v):d(v)}function u(v){return v===43||v===45||v===46||ri(v)?(s=1,h(v)):d(v)}function h(v){return v===58?(e.consume(v),s=0,p):(v===43||v===45||v===46||ri(v))&&s++<32?(e.consume(v),h):(s=0,d(v))}function p(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||wh(v)?n(v):(e.consume(v),p)}function d(v){return v===64?(e.consume(v),g):Ok(v)?(e.consume(v),d):n(v)}function g(v){return ri(v)?_(v):n(v)}function _(v){return v===46?(e.consume(v),s=0,g):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):S(v)}function S(v){if((v===45||ri(v))&&s++<63){const w=v===45?S:_;return e.consume(v),w}return n(v)}}const cc={partial:!0,tokenize:Uk};function Uk(e,t,n){return s;function s(o){return Ie(o)?Ke(e,l,"linePrefix")(o):l(o)}function l(o){return o===null||ke(o)?t(o):n(o)}}const H6={continuation:{tokenize:qk},exit:$k,name:"blockQuote",tokenize:Vk};function Vk(e,t,n){const s=this;return l;function l(u){if(u===62){const h=s.containerState;return h.open||(e.enter("blockQuote",{_container:!0}),h.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),o}return n(u)}function o(u){return Ie(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function qk(e,t,n){const s=this;return l;function l(u){return Ie(u)?Ke(e,o,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):o(u)}function o(u){return e.attempt(H6,t,n)(u)}}function $k(e){e.exit("blockQuote")}const I6={name:"characterEscape",tokenize:Yk};function Yk(e,t,n){return s;function s(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),l}function l(o){return B6(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const P6={name:"characterReference",tokenize:Kk};function Kk(e,t,n){const s=this;let l=0,o,u;return h;function h(_){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(_),e.exit("characterReferenceMarker"),p}function p(_){return _===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(_),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),o=31,u=ri,g(_))}function d(_){return _===88||_===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(_),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,u=Rk,g):(e.enter("characterReferenceValue"),o=7,u=G0,g(_))}function g(_){if(_===59&&l){const S=e.exit("characterReferenceValue");return u===ri&&!Nm(s.sliceSerialize(S))?n(_):(e.enter("characterReferenceMarker"),e.consume(_),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(_)&&l++<o?(e.consume(_),g):n(_)}}const Z0={partial:!0,tokenize:Wk};function Wk(e,t,n){const s=this;return l;function l(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o)}function o(u){return s.parser.lazy[s.now().line]?n(u):t(u)}}const Ky={concrete:!0,name:"codeFenced",tokenize:Gk};function Gk(e,t,n){const s=this,l={partial:!0,tokenize:Q};let o=0,u=0,h;return p;function p(R){return d(R)}function d(R){const V=s.events[s.events.length-1];return o=V&&V[1].type==="linePrefix"?V[2].sliceSerialize(V[1],!0).length:0,h=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(R)}function g(R){return R===h?(u++,e.consume(R),g):u<3?n(R):(e.exit("codeFencedFenceSequence"),Ie(R)?Ke(e,_,"whitespace")(R):_(R))}function _(R){return R===null||ke(R)?(e.exit("codeFencedFence"),s.interrupt?t(R):e.check(Z0,C,X)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),S(R))}function S(R){return R===null||ke(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),_(R)):Ie(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ke(e,v,"whitespace")(R)):R===96&&R===h?n(R):(e.consume(R),S)}function v(R){return R===null||ke(R)?_(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(R))}function w(R){return R===null||ke(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),_(R)):R===96&&R===h?n(R):(e.consume(R),w)}function C(R){return e.attempt(l,X,E)(R)}function E(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),M}function M(R){return o>0&&Ie(R)?Ke(e,U,"linePrefix",o+1)(R):U(R)}function U(R){return R===null||ke(R)?e.check(Z0,C,X)(R):(e.enter("codeFlowValue"),B(R))}function B(R){return R===null||ke(R)?(e.exit("codeFlowValue"),U(R)):(e.consume(R),B)}function X(R){return e.exit("codeFenced"),t(R)}function Q(R,V,se){let me=0;return k;function k(P){return R.enter("lineEnding"),R.consume(P),R.exit("lineEnding"),K}function K(P){return R.enter("codeFencedFence"),Ie(P)?Ke(R,W,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):W(P)}function W(P){return P===h?(R.enter("codeFencedFenceSequence"),q(P)):se(P)}function q(P){return P===h?(me++,R.consume(P),q):me>=u?(R.exit("codeFencedFenceSequence"),Ie(P)?Ke(R,Z,"whitespace")(P):Z(P)):se(P)}function Z(P){return P===null||ke(P)?(R.exit("codeFencedFence"),V(P)):se(P)}}}const l0={name:"codeIndented",tokenize:Zk},Xk={partial:!0,tokenize:Qk};function Zk(e,t,n){return s;function s(h){return e.enter("codeIndented"),j6(e,l,n,"linePrefix",4,4)(h)}function l(h){return h===null?u(h):ke(h)?e.attempt(Xk,l,u)(h):(e.enter("codeFlowValue"),o(h))}function o(h){return h===null||ke(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),o)}function u(h){return e.exit("codeIndented"),t(h)}}function Qk(e,t,n){const s=this;return l;function l(u){return s.parser.lazy[s.now().line]?n(u):ke(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):j6(e,t,o,"linePrefix",4,4)(u)}function o(u){return ke(u)?l(u):n(u)}}const Jk={name:"codeText",previous:tT,resolve:eT,tokenize:iT};function eT(e){let t=e.length-4,n=3,s,l;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(s=n;++s<t;)if(e[s][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(s=n-1,t++;++s<=t;)l===void 0?s!==t&&e[s][1].type!=="lineEnding"&&(l=s):(s===t||e[s][1].type==="lineEnding")&&(e[l][1].type="codeTextData",s!==l+2&&(e[l][1].end=e[s-1][1].end,e.splice(l+2,s-l-2),t-=s-l-2,s=l+2),l=void 0);return e}function tT(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function iT(e,t,n){let s=0,l,o;return u;function u(_){return e.enter("codeText"),e.enter("codeTextSequence"),h(_)}function h(_){return _===96?(e.consume(_),s++,h):(e.exit("codeTextSequence"),p(_))}function p(_){return _===null?n(_):_===32?(e.enter("space"),e.consume(_),e.exit("space"),p):_===96?(o=e.enter("codeTextSequence"),l=0,g(_)):ke(_)?(e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),p):(e.enter("codeTextData"),d(_))}function d(_){return _===null||_===32||_===96||ke(_)?(e.exit("codeTextData"),p(_)):(e.consume(_),d)}function g(_){return _===96?(e.consume(_),l++,g):l===s?(e.exit("codeTextSequence"),e.exit("codeText"),t(_)):(o.type="codeTextData",d(_))}}class nT{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const s=n??Number.POSITIVE_INFINITY;return s<this.left.length?this.left.slice(t,s):t>this.left.length?this.right.slice(this.right.length-s+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-s+this.left.length).reverse())}splice(t,n,s){const l=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return s&&Eo(this.left,s),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Eo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Eo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Eo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Eo(this.left,n.reverse())}}}function Eo(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function F6(e){const t={};let n=-1,s,l,o,u,h,p,d;const g=new nT(e);for(;++n<g.length;){for(;n in t;)n=t[n];if(s=g.get(n),n&&s[1].type==="chunkFlow"&&g.get(n-1)[1].type==="listItemPrefix"&&(p=s[1]._tokenizer.events,o=0,o<p.length&&p[o][1].type==="lineEndingBlank"&&(o+=2),o<p.length&&p[o][1].type==="content"))for(;++o<p.length&&p[o][1].type!=="content";)p[o][1].type==="chunkText"&&(p[o][1]._isInFirstContentOfListItem=!0,o++);if(s[0]==="enter")s[1].contentType&&(Object.assign(t,rT(g,n)),n=t[n],d=!0);else if(s[1]._container){for(o=n,l=void 0;o--;)if(u=g.get(o),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(l&&(g.get(l)[1].type="lineEndingBlank"),u[1].type="lineEnding",l=o);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;l&&(s[1].end={...g.get(l)[1].start},h=g.slice(l,n),h.unshift(s),g.splice(l,n-l+1,h))}}return mn(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!d}function rT(e,t){const n=e.get(t)[1],s=e.get(t)[2];let l=t-1;const o=[];let u=n._tokenizer;u||(u=s.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const h=u.events,p=[],d={};let g,_,S=-1,v=n,w=0,C=0;const E=[C];for(;v;){for(;e.get(++l)[1]!==v;);o.push(l),v._tokenizer||(g=s.sliceStream(v),v.next||g.push(null),_&&u.defineSkip(v.start),v._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(g),v._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),_=v,v=v.next}for(v=n;++S<h.length;)h[S][0]==="exit"&&h[S-1][0]==="enter"&&h[S][1].type===h[S-1][1].type&&h[S][1].start.line!==h[S][1].end.line&&(C=S+1,E.push(C),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(u.events=[],v?(v._tokenizer=void 0,v.previous=void 0):E.pop(),S=E.length;S--;){const M=h.slice(E[S],E[S+1]),U=o.pop();p.push([U,U+M.length-1]),e.splice(U,2,M)}for(p.reverse(),S=-1;++S<p.length;)d[w+p[S][0]]=w+p[S][1],w+=p[S][1]-p[S][0]-1;return d}const sT={resolve:aT,tokenize:oT},lT={partial:!0,tokenize:cT};function aT(e){return F6(e),e}function oT(e,t){let n;return s;function s(h){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),l(h)}function l(h){return h===null?o(h):ke(h)?e.check(lT,u,o)(h):(e.consume(h),l)}function o(h){return e.exit("chunkContent"),e.exit("content"),t(h)}function u(h){return e.consume(h),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,l}}function cT(e,t,n){const s=this;return l;function l(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Ke(e,o,"linePrefix")}function o(u){if(u===null||ke(u))return n(u);const h=s.events[s.events.length-1];return!s.parser.constructs.disable.null.includes("codeIndented")&&h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?t(u):e.interrupt(s.parser.constructs.flow,n,t)(u)}}function U6(e,t,n,s,l,o,u,h,p){const d=p||Number.POSITIVE_INFINITY;let g=0;return _;function _(M){return M===60?(e.enter(s),e.enter(l),e.enter(o),e.consume(M),e.exit(o),S):M===null||M===32||M===41||wh(M)?n(M):(e.enter(s),e.enter(u),e.enter(h),e.enter("chunkString",{contentType:"string"}),C(M))}function S(M){return M===62?(e.enter(o),e.consume(M),e.exit(o),e.exit(l),e.exit(s),t):(e.enter(h),e.enter("chunkString",{contentType:"string"}),v(M))}function v(M){return M===62?(e.exit("chunkString"),e.exit(h),S(M)):M===null||M===60||ke(M)?n(M):(e.consume(M),M===92?w:v)}function w(M){return M===60||M===62||M===92?(e.consume(M),v):v(M)}function C(M){return!g&&(M===null||M===41||lt(M))?(e.exit("chunkString"),e.exit(h),e.exit(u),e.exit(s),t(M)):g<d&&M===40?(e.consume(M),g++,C):M===41?(e.consume(M),g--,C):M===null||M===32||M===40||wh(M)?n(M):(e.consume(M),M===92?E:C)}function E(M){return M===40||M===41||M===92?(e.consume(M),C):C(M)}}function V6(e,t,n,s,l,o){const u=this;let h=0,p;return d;function d(v){return e.enter(s),e.enter(l),e.consume(v),e.exit(l),e.enter(o),g}function g(v){return h>999||v===null||v===91||v===93&&!p||v===94&&!h&&"_hiddenFootnoteSupport"in u.parser.constructs?n(v):v===93?(e.exit(o),e.enter(l),e.consume(v),e.exit(l),e.exit(s),t):ke(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),_(v))}function _(v){return v===null||v===91||v===93||ke(v)||h++>999?(e.exit("chunkString"),g(v)):(e.consume(v),p||(p=!Ie(v)),v===92?S:_)}function S(v){return v===91||v===92||v===93?(e.consume(v),h++,_):_(v)}}function q6(e,t,n,s,l,o){let u;return h;function h(S){return S===34||S===39||S===40?(e.enter(s),e.enter(l),e.consume(S),e.exit(l),u=S===40?41:S,p):n(S)}function p(S){return S===u?(e.enter(l),e.consume(S),e.exit(l),e.exit(s),t):(e.enter(o),d(S))}function d(S){return S===u?(e.exit(o),p(u)):S===null?n(S):ke(S)?(e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),Ke(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(S))}function g(S){return S===u||S===null||ke(S)?(e.exit("chunkString"),d(S)):(e.consume(S),S===92?_:g)}function _(S){return S===u||S===92?(e.consume(S),g):g(S)}}function Fo(e,t){let n;return s;function s(l){return ke(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n=!0,s):Ie(l)?Ke(e,s,n?"linePrefix":"lineSuffix")(l):t(l)}}const uT={name:"definition",tokenize:fT},hT={partial:!0,tokenize:dT};function fT(e,t,n){const s=this;let l;return o;function o(v){return e.enter("definition"),u(v)}function u(v){return V6.call(s,e,h,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function h(v){return l=_n(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),p):n(v)}function p(v){return lt(v)?Fo(e,d)(v):d(v)}function d(v){return U6(e,g,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function g(v){return e.attempt(hT,_,_)(v)}function _(v){return Ie(v)?Ke(e,S,"whitespace")(v):S(v)}function S(v){return v===null||ke(v)?(e.exit("definition"),s.parser.defined.push(l),t(v)):n(v)}}function dT(e,t,n){return s;function s(h){return lt(h)?Fo(e,l)(h):n(h)}function l(h){return q6(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(h)}function o(h){return Ie(h)?Ke(e,u,"whitespace")(h):u(h)}function u(h){return h===null||ke(h)?t(h):n(h)}}const pT={name:"hardBreakEscape",tokenize:mT};function mT(e,t,n){return s;function s(o){return e.enter("hardBreakEscape"),e.consume(o),l}function l(o){return ke(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const _T={name:"headingAtx",resolve:gT,tokenize:vT};function gT(e,t){let n=e.length-2,s=3;if(e[s][1].type==="whitespace"&&(s+=2),n-2>s&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(s===n-1||n-4>s&&e[n-2][1].type==="whitespace")&&(n-=s+1===n?2:4),n>s){const l={type:"atxHeadingText",start:e[s][1].start,end:e[n][1].end},o={type:"chunkText",start:e[s][1].start,end:e[n][1].end,contentType:"text"};mn(e,s,n-s+1,[["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t]])}return e}function vT(e,t,n){let s=0;return l;function l(g){return e.enter("atxHeading"),o(g)}function o(g){return e.enter("atxHeadingSequence"),u(g)}function u(g){return g===35&&s++<6?(e.consume(g),u):g===null||lt(g)?(e.exit("atxHeadingSequence"),h(g)):n(g)}function h(g){return g===35?(e.enter("atxHeadingSequence"),p(g)):g===null||ke(g)?(e.exit("atxHeading"),t(g)):Ie(g)?Ke(e,h,"whitespace")(g):(e.enter("atxHeadingText"),d(g))}function p(g){return g===35?(e.consume(g),p):(e.exit("atxHeadingSequence"),h(g))}function d(g){return g===null||g===35||lt(g)?(e.exit("atxHeadingText"),h(g)):(e.consume(g),d)}}const $6=["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"],Q0=["pre","script","style","textarea"],yT={concrete:!0,name:"htmlFlow",resolveTo:bT,tokenize:wT},ST={partial:!0,tokenize:xT};function bT(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function wT(e,t,n){const s=this;let l,o,u,h,p;return d;function d(O){return g(O)}function g(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),_}function _(O){return O===33?(e.consume(O),S):O===47?(e.consume(O),o=!0,C):O===63?(e.consume(O),l=3,s.interrupt?t:T):ii(O)?(e.consume(O),u=String.fromCharCode(O),E):n(O)}function S(O){return O===45?(e.consume(O),l=2,v):O===91?(e.consume(O),l=5,h=0,w):ii(O)?(e.consume(O),l=4,s.interrupt?t:T):n(O)}function v(O){return O===45?(e.consume(O),s.interrupt?t:T):n(O)}function w(O){const D="CDATA[";return O===D.charCodeAt(h++)?(e.consume(O),h===D.length?s.interrupt?t:W:w):n(O)}function C(O){return ii(O)?(e.consume(O),u=String.fromCharCode(O),E):n(O)}function E(O){if(O===null||O===47||O===62||lt(O)){const D=O===47,ne=u.toLowerCase();return!D&&!o&&Q0.includes(ne)?(l=1,s.interrupt?t(O):W(O)):$6.includes(u.toLowerCase())?(l=6,D?(e.consume(O),M):s.interrupt?t(O):W(O)):(l=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(O):o?U(O):B(O))}return O===45||ri(O)?(e.consume(O),u+=String.fromCharCode(O),E):n(O)}function M(O){return O===62?(e.consume(O),s.interrupt?t:W):n(O)}function U(O){return Ie(O)?(e.consume(O),U):k(O)}function B(O){return O===47?(e.consume(O),k):O===58||O===95||ii(O)?(e.consume(O),X):Ie(O)?(e.consume(O),B):k(O)}function X(O){return O===45||O===46||O===58||O===95||ri(O)?(e.consume(O),X):Q(O)}function Q(O){return O===61?(e.consume(O),R):Ie(O)?(e.consume(O),Q):B(O)}function R(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),p=O,V):Ie(O)?(e.consume(O),R):se(O)}function V(O){return O===p?(e.consume(O),p=null,me):O===null||ke(O)?n(O):(e.consume(O),V)}function se(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||lt(O)?Q(O):(e.consume(O),se)}function me(O){return O===47||O===62||Ie(O)?B(O):n(O)}function k(O){return O===62?(e.consume(O),K):n(O)}function K(O){return O===null||ke(O)?W(O):Ie(O)?(e.consume(O),K):n(O)}function W(O){return O===45&&l===2?(e.consume(O),H):O===60&&l===1?(e.consume(O),ie):O===62&&l===4?(e.consume(O),ze):O===63&&l===3?(e.consume(O),T):O===93&&l===5?(e.consume(O),oe):ke(O)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(ST,We,q)(O)):O===null||ke(O)?(e.exit("htmlFlowData"),q(O)):(e.consume(O),W)}function q(O){return e.check(Z0,Z,We)(O)}function Z(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),P}function P(O){return O===null||ke(O)?q(O):(e.enter("htmlFlowData"),W(O))}function H(O){return O===45?(e.consume(O),T):W(O)}function ie(O){return O===47?(e.consume(O),u="",$):W(O)}function $(O){if(O===62){const D=u.toLowerCase();return Q0.includes(D)?(e.consume(O),ze):W(O)}return ii(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),$):W(O)}function oe(O){return O===93?(e.consume(O),T):W(O)}function T(O){return O===62?(e.consume(O),ze):O===45&&l===2?(e.consume(O),T):W(O)}function ze(O){return O===null||ke(O)?(e.exit("htmlFlowData"),We(O)):(e.consume(O),ze)}function We(O){return e.exit("htmlFlow"),t(O)}}function xT(e,t,n){return s;function s(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(cc,t,n)}}const CT={name:"htmlText",tokenize:ET};function ET(e,t,n){const s=this;let l,o,u;return h;function h(T){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(T),p}function p(T){return T===33?(e.consume(T),d):T===47?(e.consume(T),Q):T===63?(e.consume(T),B):ii(T)?(e.consume(T),se):n(T)}function d(T){return T===45?(e.consume(T),g):T===91?(e.consume(T),o=0,w):ii(T)?(e.consume(T),U):n(T)}function g(T){return T===45?(e.consume(T),v):n(T)}function _(T){return T===null?n(T):T===45?(e.consume(T),S):ke(T)?(u=_,ie(T)):(e.consume(T),_)}function S(T){return T===45?(e.consume(T),v):_(T)}function v(T){return T===62?H(T):T===45?S(T):_(T)}function w(T){const ze="CDATA[";return T===ze.charCodeAt(o++)?(e.consume(T),o===ze.length?C:w):n(T)}function C(T){return T===null?n(T):T===93?(e.consume(T),E):ke(T)?(u=C,ie(T)):(e.consume(T),C)}function E(T){return T===93?(e.consume(T),M):C(T)}function M(T){return T===62?H(T):T===93?(e.consume(T),M):C(T)}function U(T){return T===null||T===62?H(T):ke(T)?(u=U,ie(T)):(e.consume(T),U)}function B(T){return T===null?n(T):T===63?(e.consume(T),X):ke(T)?(u=B,ie(T)):(e.consume(T),B)}function X(T){return T===62?H(T):B(T)}function Q(T){return ii(T)?(e.consume(T),R):n(T)}function R(T){return T===45||ri(T)?(e.consume(T),R):V(T)}function V(T){return ke(T)?(u=V,ie(T)):Ie(T)?(e.consume(T),V):H(T)}function se(T){return T===45||ri(T)?(e.consume(T),se):T===47||T===62||lt(T)?me(T):n(T)}function me(T){return T===47?(e.consume(T),H):T===58||T===95||ii(T)?(e.consume(T),k):ke(T)?(u=me,ie(T)):Ie(T)?(e.consume(T),me):H(T)}function k(T){return T===45||T===46||T===58||T===95||ri(T)?(e.consume(T),k):K(T)}function K(T){return T===61?(e.consume(T),W):ke(T)?(u=K,ie(T)):Ie(T)?(e.consume(T),K):me(T)}function W(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),l=T,q):ke(T)?(u=W,ie(T)):Ie(T)?(e.consume(T),W):(e.consume(T),Z)}function q(T){return T===l?(e.consume(T),l=void 0,P):T===null?n(T):ke(T)?(u=q,ie(T)):(e.consume(T),q)}function Z(T){return T===null||T===34||T===39||T===60||T===61||T===96?n(T):T===47||T===62||lt(T)?me(T):(e.consume(T),Z)}function P(T){return T===47||T===62||lt(T)?me(T):n(T)}function H(T){return T===62?(e.consume(T),e.exit("htmlTextData"),e.exit("htmlText"),t):n(T)}function ie(T){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),$}function $(T){return Ie(T)?Ke(e,oe,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):oe(T)}function oe(T){return e.enter("htmlTextData"),u(T)}}const zm={name:"labelEnd",resolveAll:AT,resolveTo:DT,tokenize:OT},kT={tokenize:RT},TT={tokenize:LT},MT={tokenize:NT};function AT(e){let t=-1;const n=[];for(;++t<e.length;){const s=e[t][1];if(n.push(e[t]),s.type==="labelImage"||s.type==="labelLink"||s.type==="labelEnd"){const l=s.type==="labelImage"?4:2;s.type="data",t+=l}}return e.length!==n.length&&mn(e,0,e.length,n),e}function DT(e,t){let n=e.length,s=0,l,o,u;for(;n--;){const g=e[n][1];if(l){if(g.type==="link"||g.type==="labelLink"&&g._inactive)break;e[n][0]==="enter"&&g.type==="labelLink"&&(g._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(g.type==="labelImage"||g.type==="labelLink")&&!g._balanced&&(l=n,g.type!=="labelLink")){s=2;break}}else g.type==="labelEnd"&&(o=n)}const h={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},p={type:"label",start:{...e[l][1].start},end:{...e[o][1].end}},d={type:"labelText",start:{...e[l+s+2][1].end},end:{...e[o-2][1].start}};return u=[["enter",h,t],["enter",p,t]],u=rn(u,e.slice(l+1,l+s+3)),u=rn(u,[["enter",d,t]]),u=rn(u,sf(t.parser.constructs.insideSpan.null,e.slice(l+s+4,o-3),t)),u=rn(u,[["exit",d,t],e[o-2],e[o-1],["exit",p,t]]),u=rn(u,e.slice(o+1)),u=rn(u,[["exit",h,t]]),mn(e,l,e.length,u),e}function OT(e,t,n){const s=this,l=s._labelStarts;let o,u;if(l){for(;l.length>0&&l[l.length-1]._balanced;)l.pop();o=l[l.length-1]}return h;function h(S){return o?o._inactive?_(S):(u=s.parser.defined.includes(_n(s.sliceSerialize({start:o.end,end:s.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(S),e.exit("labelMarker"),e.exit("labelEnd"),p):n(S)}function p(S){return S===40?e.attempt(kT,g,u?g:_)(S):S===91?e.attempt(TT,g,u?d:_)(S):u?g(S):_(S)}function d(S){return e.attempt(MT,g,_)(S)}function g(S){return l.pop(),t(S)}function _(S){return o._balanced=!0,n(S)}}function RT(e,t,n){return s;function s(_){return e.enter("resource"),e.enter("resourceMarker"),e.consume(_),e.exit("resourceMarker"),l}function l(_){return lt(_)?Fo(e,o)(_):o(_)}function o(_){return _===41?g(_):U6(e,u,h,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(_)}function u(_){return lt(_)?Fo(e,p)(_):g(_)}function h(_){return n(_)}function p(_){return _===34||_===39||_===40?q6(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(_):g(_)}function d(_){return lt(_)?Fo(e,g)(_):g(_)}function g(_){return _===41?(e.enter("resourceMarker"),e.consume(_),e.exit("resourceMarker"),e.exit("resource"),t):n(_)}}function LT(e,t,n){const s=this;return l;function l(h){return V6.call(s,e,o,u,"reference","referenceMarker","referenceString")(h)}function o(h){return s.parser.defined.includes(_n(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)))?t(h):n(h)}function u(h){return n(h)}}function NT(e,t,n){return s;function s(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),l}function l(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const zT={name:"labelStartImage",resolveAll:zm.resolveAll,tokenize:BT};function BT(e,t,n){const s=this;let l;return o;function o(p){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(p),e.exit("labelImageMarker"),u}function u(p){return p===91?(e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),l=e.exit("labelImage"),h):n(p)}function h(p){return p===94&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):(s._labelStarts=s._labelStarts||[],s._labelStarts.push(l),t(p))}}const jT={name:"labelStartLink",resolveAll:zm.resolveAll,tokenize:HT};function HT(e,t,n){const s=this;let l;return o;function o(h){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),l=e.exit("labelLink"),u}function u(h){return h===94&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):(s._labelStarts=s._labelStarts||[],s._labelStarts.push(l),t(h))}}const a0={name:"lineEnding",tokenize:IT};function IT(e,t){return n;function n(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ke(e,t,"linePrefix")}}const lh={name:"thematicBreak",tokenize:PT};function PT(e,t,n){let s=0,l;return o;function o(d){return e.enter("thematicBreak"),u(d)}function u(d){return l=d,h(d)}function h(d){return d===l?(e.enter("thematicBreakSequence"),p(d)):s>=3&&(d===null||ke(d))?(e.exit("thematicBreak"),t(d)):n(d)}function p(d){return d===l?(e.consume(d),s++,p):(e.exit("thematicBreakSequence"),Ie(d)?Ke(e,h,"whitespace")(d):h(d))}}const Ei={continuation:{tokenize:qT},exit:YT,name:"list",tokenize:VT},FT={partial:!0,tokenize:KT},UT={partial:!0,tokenize:$T};function VT(e,t,n){const s=this,l=s.events[s.events.length-1];let o=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,u=0;return h;function h(v){const w=s.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!s.containerState.marker||v===s.containerState.marker:G0(v)){if(s.containerState.type||(s.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(lh,n,d)(v):d(v);if(!s.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(v)}return n(v)}function p(v){return G0(v)&&++u<10?(e.consume(v),p):(!s.interrupt||u<2)&&(s.containerState.marker?v===s.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),d(v)):n(v)}function d(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),s.containerState.marker=s.containerState.marker||v,e.check(cc,s.interrupt?n:g,e.attempt(FT,S,_))}function g(v){return s.containerState.initialBlankLine=!0,o++,S(v)}function _(v){return Ie(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),S):n(v)}function S(v){return s.containerState.size=o+s.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function qT(e,t,n){const s=this;return s.containerState._closeFlow=void 0,e.check(cc,l,o);function l(h){return s.containerState.furtherBlankLines=s.containerState.furtherBlankLines||s.containerState.initialBlankLine,Ke(e,t,"listItemIndent",s.containerState.size+1)(h)}function o(h){return s.containerState.furtherBlankLines||!Ie(h)?(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,u(h)):(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,e.attempt(UT,t,u)(h))}function u(h){return s.containerState._closeFlow=!0,s.interrupt=void 0,Ke(e,e.attempt(Ei,t,n),"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h)}}function $T(e,t,n){const s=this;return Ke(e,l,"listItemIndent",s.containerState.size+1);function l(o){const u=s.events[s.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===s.containerState.size?t(o):n(o)}}function YT(e){e.exit(this.containerState.type)}function KT(e,t,n){const s=this;return Ke(e,l,"listItemPrefixWhitespace",s.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(o){const u=s.events[s.events.length-1];return!Ie(o)&&u&&u[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Wy={name:"setextUnderline",resolveTo:WT,tokenize:GT};function WT(e,t){const n=new xh;let s=e.length,l,o,u;for(;s--;)if(e[s][0]==="enter"){if(e[s][1].type==="content"){l=s;break}e[s][1].type==="paragraph"&&(o=s)}else e[s][1].type==="content"&&n.add(s,1,[]),!u&&e[s][1].type==="definition"&&(u=s);const h={type:"setextHeading",start:{...e[l][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",u?(n.add(o,0,[["enter",h,t]]),n.add(u+1,0,[["exit",e[l][1],t]]),e[l][1].end={...e[u][1].end}):e[l][1]=h,n.add(e.length,0,[["exit",h,t]]),n.consume(e),e}function GT(e,t,n){const s=this;let l;return o;function o(d){let g=s.events.length,_;for(;g--;)if(s.events[g][1].type!=="lineEnding"&&s.events[g][1].type!=="linePrefix"&&s.events[g][1].type!=="content"){_=s.events[g][1].type==="paragraph";break}return!s.parser.lazy[s.now().line]&&(s.interrupt||_)?(e.enter("setextHeadingLine"),l=d,u(d)):n(d)}function u(d){return e.enter("setextHeadingLineSequence"),h(d)}function h(d){return d===l?(e.consume(d),h):(e.exit("setextHeadingLineSequence"),Ie(d)?Ke(e,p,"lineSuffix")(d):p(d))}function p(d){return d===null||ke(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}const XT={tokenize:ZT};function ZT(e){const t=this,n=e.attempt(cc,s,e.attempt(this.parser.constructs.flowInitial,l,Ke(e,e.attempt(this.parser.constructs.flow,l,e.attempt(sT,l)),"linePrefix")));return n;function s(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function l(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const QT={resolveAll:K6()},JT=Y6("string"),eM=Y6("text");function Y6(e){return{resolveAll:K6(e==="text"?tM:void 0),tokenize:t};function t(n){const s=this,l=this.parser.constructs[e],o=n.attempt(l,u,h);return u;function u(g){return d(g)?o(g):h(g)}function h(g){if(g===null){n.consume(g);return}return n.enter("data"),n.consume(g),p}function p(g){return d(g)?(n.exit("data"),o(g)):(n.consume(g),p)}function d(g){if(g===null)return!0;const _=l[g];let S=-1;if(_)for(;++S<_.length;){const v=_[S];if(!v.previous||v.previous.call(s,s.previous))return!0}return!1}}}function K6(e){return t;function t(n,s){let l=-1,o;for(;++l<=n.length;)o===void 0?n[l]&&n[l][1].type==="data"&&(o=l,l++):(!n[l]||n[l][1].type!=="data")&&(l!==o+2&&(n[o][1].end=n[l-1][1].end,n.splice(o+2,l-o-2),l=o+2),o=void 0);return e?e(n,s):n}}function tM(e,t){const n=new xh;let s=0;for(;++s<=e.length;)if((s===e.length||e[s][1].type==="lineEnding")&&e[s-1][1].type==="data"){const l=e[s-1][1],o=t.sliceStream(l);let u=o.length,h=-1,p=0,d;for(;u--;){const g=o[u];if(typeof g=="string"){for(h=g.length;g.charCodeAt(h-1)===32;)p++,h--;if(h)break;h=-1}else if(g===-2)d=!0,p++;else if(g!==-1){u++;break}}if(t._contentTypeTextTrailing&&s===e.length&&(p=0),p){const g={type:s===e.length||d||p<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?h:l.start._bufferIndex+h,_index:l.start._index+u,line:l.end.line,column:l.end.column-p,offset:l.end.offset-p},end:{...l.end}};l.end={...g.start},l.start.offset===l.end.offset?Object.assign(l,g):n.add(s,0,[["enter",g,t],["exit",g,t]])}s++}return n.consume(e),e}const iM={42:Ei,43:Ei,45:Ei,48:Ei,49:Ei,50:Ei,51:Ei,52:Ei,53:Ei,54:Ei,55:Ei,56:Ei,57:Ei,62:H6},nM={91:uT},rM={[-2]:l0,[-1]:l0,32:l0},sM={35:_T,42:lh,45:[Wy,lh],60:yT,61:Wy,95:lh,96:Ky,126:Ky},lM={38:P6,92:I6},aM={[-5]:a0,[-4]:a0,[-3]:a0,33:zT,38:P6,42:X0,60:[Pk,CT],91:jT,92:[pT,I6],93:zm,95:X0,96:Jk},oM={null:[X0,QT]},cM={null:[42,95]},uM={null:[]},hM=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:cM,contentInitial:nM,disable:uM,document:iM,flow:sM,flowInitial:rM,insideSpan:oM,string:lM,text:aM},Symbol.toStringTag,{value:"Module"}));function fM(e,t,n){let s={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const l={},o=[];let u=[],h=[];const p={attempt:V(Q),check:V(R),consume:U,enter:B,exit:X,interrupt:V(R,{interrupt:!0})},d={code:null,containerState:{},defineSkip:C,events:[],now:w,parser:e,previous:null,sliceSerialize:S,sliceStream:v,write:_};let g=t.tokenize.call(d,p);return t.resolveAll&&o.push(t),d;function _(K){return u=rn(u,K),E(),u[u.length-1]!==null?[]:(se(t,0),d.events=sf(o,d.events,d),d.events)}function S(K,W){return pM(v(K),W)}function v(K){return dM(u,K)}function w(){const{_bufferIndex:K,_index:W,line:q,column:Z,offset:P}=s;return{_bufferIndex:K,_index:W,line:q,column:Z,offset:P}}function C(K){l[K.line]=K.column,k()}function E(){for(;s._index<u.length;){const K=u[s._index];if(typeof K=="string"){const W=s._index;for(s._bufferIndex<0&&(s._bufferIndex=0);s._index===W&&s._bufferIndex<K.length;)M(K.charCodeAt(s._bufferIndex))}else M(K)}}function M(K){g=g(K)}function U(K){ke(K)?(s.line++,s.column=1,s.offset+=K===-3?2:1,k()):K!==-1&&(s.column++,s.offset++),s._bufferIndex<0?s._index++:(s._bufferIndex++,s._bufferIndex===u[s._index].length&&(s._bufferIndex=-1,s._index++)),d.previous=K}function B(K,W){const q=W||{};return q.type=K,q.start=w(),d.events.push(["enter",q,d]),h.push(q),q}function X(K){const W=h.pop();return W.end=w(),d.events.push(["exit",W,d]),W}function Q(K,W){se(K,W.from)}function R(K,W){W.restore()}function V(K,W){return q;function q(Z,P,H){let ie,$,oe,T;return Array.isArray(Z)?We(Z):"tokenize"in Z?We([Z]):ze(Z);function ze(ae){return de;function de(Ee){const ve=Ee!==null&&ae[Ee],Me=Ee!==null&&ae.null,fe=[...Array.isArray(ve)?ve:ve?[ve]:[],...Array.isArray(Me)?Me:Me?[Me]:[]];return We(fe)(Ee)}}function We(ae){return ie=ae,$=0,ae.length===0?H:O(ae[$])}function O(ae){return de;function de(Ee){return T=me(),oe=ae,ae.partial||(d.currentConstruct=ae),ae.name&&d.parser.constructs.disable.null.includes(ae.name)?ne():ae.tokenize.call(W?Object.assign(Object.create(d),W):d,p,D,ne)(Ee)}}function D(ae){return K(oe,T),P}function ne(ae){return T.restore(),++$<ie.length?O(ie[$]):H}}}function se(K,W){K.resolveAll&&!o.includes(K)&&o.push(K),K.resolve&&mn(d.events,W,d.events.length-W,K.resolve(d.events.slice(W),d)),K.resolveTo&&(d.events=K.resolveTo(d.events,d))}function me(){const K=w(),W=d.previous,q=d.currentConstruct,Z=d.events.length,P=Array.from(h);return{from:Z,restore:H};function H(){s=K,d.previous=W,d.currentConstruct=q,d.events.length=Z,h=P,k()}}function k(){s.line in l&&s.column<2&&(s.column=l[s.line],s.offset+=l[s.line]-1)}}function dM(e,t){const n=t.start._index,s=t.start._bufferIndex,l=t.end._index,o=t.end._bufferIndex;let u;if(n===l)u=[e[n].slice(s,o)];else{if(u=e.slice(n,l),s>-1){const h=u[0];typeof h=="string"?u[0]=h.slice(s):u.shift()}o>0&&u.push(e[l].slice(0,o))}return u}function pM(e,t){let n=-1;const s=[];let l;for(;++n<e.length;){const o=e[n];let u;if(typeof o=="string")u=o;else switch(o){case-5:{u="\r";break}case-4:{u=`
28
- `;break}case-3:{u=`\r
29
- `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&l)continue;u=" ";break}default:u=String.fromCharCode(o)}l=o===-2,s.push(u)}return s.join("")}function mM(e){const s={constructs:N6([hM,...(e||{}).extensions||[]]),content:l(Lk),defined:[],document:l(zk),flow:l(XT),lazy:{},string:l(JT),text:l(eM)};return s;function l(o){return u;function u(h){return fM(s,o,h)}}}function _M(e){for(;!F6(e););return e}const Gy=/[\0\t\n\r]/g;function gM(){let e=1,t="",n=!0,s;return l;function l(o,u,h){o=t+(typeof o=="string"?o.toString():new TextDecoder(u||void 0).decode(o));const p=[];let d=0;for(t="",n&&(o.charCodeAt(0)===65279&&d++,n=void 0);d<o.length;){Gy.lastIndex=d;const g=Gy.exec(o),_=g&&g.index!==void 0?g.index:o.length,S=o.charCodeAt(_);if(!g){t=o.slice(d);break}if(S===10&&d===_&&s)p.push(-3),s=void 0;else switch(s&&(p.push(-5),s=void 0),d<_&&(p.push(o.slice(d,_)),e+=_-d),S){case 0:{p.push(65533),e++;break}case 9:{const v=Math.ceil(e/4)*4;for(p.push(-2);e++<v;)p.push(-1);break}case 10:{p.push(-4),e=1;break}default:s=!0,e=1}d=_+1}return h&&(s&&p.push(-5),t&&p.push(t),p.push(null)),p}}const vM=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function yM(e){return e.replace(vM,SM)}function SM(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const l=n.charCodeAt(1),o=l===120||l===88;return z6(n.slice(o?2:1),o?16:10)}return Nm(n)||e}const W6={}.hasOwnProperty;function bM(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),wM(n)(_M(mM(n).document().write(gM()(e,t,!0))))}function wM(e){const t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(gr),autolinkProtocol:k,autolinkEmail:k,atxHeading:u(Ti),blockQuote:u(fe),characterEscape:k,characterReference:k,codeFenced:u(Se),codeFencedFenceInfo:h,codeFencedFenceMeta:h,codeIndented:u(Se,h),codeText:u(Be,h),codeTextData:k,data:k,codeFlowValue:k,definition:u(Fn),definitionDestinationString:h,definitionLabelString:h,definitionTitleString:h,emphasis:u(_r),hardBreakEscape:u(wt),hardBreakTrailing:u(wt),htmlFlow:u(Ze,h),htmlFlowData:k,htmlText:u(Ze,h),htmlTextData:k,image:u(Vi),label:h,link:u(gr),listItem:u(tl),listItemValue:v,listOrdered:u(an,S),listUnordered:u(an),paragraph:u(il),reference:D,referenceString:h,resourceDestinationString:h,resourceTitleString:h,setextHeading:u(Ti),strong:u(vr),thematicBreak:u(nl)},exit:{atxHeading:d(),atxHeadingSequence:R,autolink:d(),autolinkEmail:Me,autolinkProtocol:ve,blockQuote:d(),characterEscapeValue:K,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:de,characterReference:Ee,codeFenced:d(M),codeFencedFence:E,codeFencedFenceInfo:w,codeFencedFenceMeta:C,codeFlowValue:K,codeIndented:d(U),codeText:d(H),codeTextData:K,data:K,definition:d(),definitionDestinationString:Q,definitionLabelString:B,definitionTitleString:X,emphasis:d(),hardBreakEscape:d(q),hardBreakTrailing:d(q),htmlFlow:d(Z),htmlFlowData:K,htmlText:d(P),htmlTextData:K,image:d($),label:T,labelText:oe,lineEnding:W,link:d(ie),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ne,resourceDestinationString:ze,resourceTitleString:We,resource:O,setextHeading:d(me),setextHeadingLineSequence:se,setextHeadingText:V,strong:d(),thematicBreak:d()}};G6(t,(e||{}).mdastExtensions||[]);const n={};return s;function s(J){let ce={type:"root",children:[],position:void 0};const xe={stack:[ce],tokenStack:[],config:t,enter:p,exit:g,buffer:h,resume:_,data:n},Re=[],zt=[];let nt=-1;for(;++nt<J.length;)if(zt.push(J[nt]),J[nt][1].type==="listOrdered"||J[nt][1].type==="listUnordered")if(J[nt][0]==="enter")Re.push(zt.length-1);else{const Yt=Re.pop();o(zt,Yt)}for(J=zt,nt=-1;++nt<J.length;){const Yt=t[J[nt][0]];J[nt][0]==="enter"&&t.beforeEnter.length>0&&l(t.beforeEnter,{...xe,sliceSerialize:J[nt][2].sliceSerialize},J[nt][1]),W6.call(Yt,J[nt][1].type)&&Yt[J[nt][1].type].call({...xe,sliceSerialize:J[nt][2].sliceSerialize},J[nt][1]),J[nt][0]==="exit"&&t.afterExit.length>0&&l(t.afterExit,{...xe,sliceSerialize:J[nt][2].sliceSerialize},J[nt][1])}if(xe.tokenStack.length>0){const Yt=xe.tokenStack[xe.tokenStack.length-1];(Yt[1]||Xy).call(xe,void 0,Yt[0])}for(ce.position={start:Kr(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:Kr(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},nt=-1;++nt<t.transforms.length;)ce=t.transforms[nt](ce)||ce;return ce}function l(J,ce,xe){let Re=-1;for(;++Re<J.length;)J[Re].call(ce,xe)}function o(J,ce){const xe=J.length-1;let Re=ce-1,zt=-1,nt=!1,Yt,gi,Un,Vn;const hs=[];for(;++Re<=xe;){const oi=J[Re];switch(oi[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{oi[0]==="enter"?zt++:zt--,Vn=void 0;break}case"lineEndingBlank":{oi[0]==="enter"&&(Yt&&!Vn&&!zt&&!Un&&(Un=Re),Vn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Vn=void 0}if(!zt&&oi[0]==="enter"&&oi[1].type==="listItemPrefix"||zt===-1&&oi[0]==="exit"&&(oi[1].type==="listUnordered"||oi[1].type==="listOrdered")){if(Yt){let qn=Re;for(gi=void 0;qn--;){const qi=J[qn];if(qi[1].type==="lineEnding"||qi[1].type==="lineEndingBlank"){if(qi[0]==="exit")continue;gi&&(J[gi][1].type="lineEndingBlank",nt=!0),qi[1].type="lineEnding",gi=qn}else if(!(qi[1].type==="linePrefix"||qi[1].type==="blockQuotePrefix"||qi[1].type==="blockQuotePrefixWhitespace"||qi[1].type==="blockQuoteMarker"||qi[1].type==="listItemIndent"))break}Un&&(!gi||Un<gi)&&(Yt._spread=!0),Yt.end=Object.assign({},gi?J[gi][1].start:oi[1].end),hs.push({at:gi||Re,event:["exit",Yt,oi[2]]})}if(oi[1].type==="listItemPrefix"){const qn={type:"listItem",_spread:!1,start:Object.assign({},oi[1].start),end:void 0};Yt=qn,hs.push({at:Re,event:["enter",qn,oi[2]]}),Un=void 0,Vn=!0}}}const _c=J.splice(ce);let Kt=0;for(Re=-1;++Re<_c.length;){for(;Kt<hs.length&&hs[Kt].at===ce+Re;)J.push(hs[Kt++].event);J.push(_c[Re])}J[ce][1]._spread=nt}function u(J,ce){return xe;function xe(Re){p.call(this,J(Re),Re),ce&&ce.call(this,Re)}}function h(){this.stack.push({type:"fragment",children:[]})}function p(J,ce,xe){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([ce,xe||void 0]),J.position={start:Kr(ce.start),end:void 0}}function d(J){return ce;function ce(xe){J&&J.call(this,xe),g.call(this,xe)}}function g(J,ce){const xe=this.stack.pop(),Re=this.tokenStack.pop();if(!Re)throw new Error("Cannot close `"+J.type+"` ("+Po({start:J.start,end:J.end})+"): it’s not open");Re[0].type!==J.type&&(ce?ce.call(this,J,Re[0]):(Re[1]||Xy).call(this,J,Re[0])),xe.position.end=Kr(J.end)}function _(){return Lm(this.stack.pop())}function S(){this.data.expectingFirstListItemValue=!0}function v(J){if(this.data.expectingFirstListItemValue){const ce=this.stack[this.stack.length-2];ce.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function w(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.lang=J}function C(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.meta=J}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function M(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function U(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.value=J.replace(/(\r?\n|\r)$/g,"")}function B(J){const ce=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ce,xe.identifier=_n(this.sliceSerialize(J)).toLowerCase()}function X(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.title=J}function Q(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.url=J}function R(J){const ce=this.stack[this.stack.length-1];if(!ce.depth){const xe=this.sliceSerialize(J).length;ce.depth=xe}}function V(){this.data.setextHeadingSlurpLineEnding=!0}function se(J){const ce=this.stack[this.stack.length-1];ce.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function me(){this.data.setextHeadingSlurpLineEnding=void 0}function k(J){const xe=this.stack[this.stack.length-1].children;let Re=xe[xe.length-1];(!Re||Re.type!=="text")&&(Re=ba(),Re.position={start:Kr(J.start),end:void 0},xe.push(Re)),this.stack.push(Re)}function K(J){const ce=this.stack.pop();ce.value+=this.sliceSerialize(J),ce.position.end=Kr(J.end)}function W(J){const ce=this.stack[this.stack.length-1];if(this.data.atHardBreak){const xe=ce.children[ce.children.length-1];xe.position.end=Kr(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ce.type)&&(k.call(this,J),K.call(this,J))}function q(){this.data.atHardBreak=!0}function Z(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.value=J}function P(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.value=J}function H(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.value=J}function ie(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ce=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ce,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function $(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ce=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ce,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function oe(J){const ce=this.sliceSerialize(J),xe=this.stack[this.stack.length-2];xe.label=yM(ce),xe.identifier=_n(ce).toLowerCase()}function T(){const J=this.stack[this.stack.length-1],ce=this.resume(),xe=this.stack[this.stack.length-1];if(this.data.inReference=!0,xe.type==="link"){const Re=J.children;xe.children=Re}else xe.alt=ce}function ze(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.url=J}function We(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.title=J}function O(){this.data.inReference=void 0}function D(){this.data.referenceType="collapsed"}function ne(J){const ce=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ce,xe.identifier=_n(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function ae(J){this.data.characterReferenceType=J.type}function de(J){const ce=this.sliceSerialize(J),xe=this.data.characterReferenceType;let Re;xe?(Re=z6(ce,xe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Re=Nm(ce);const zt=this.stack[this.stack.length-1];zt.value+=Re}function Ee(J){const ce=this.stack.pop();ce.position.end=Kr(J.end)}function ve(J){K.call(this,J);const ce=this.stack[this.stack.length-1];ce.url=this.sliceSerialize(J)}function Me(J){K.call(this,J);const ce=this.stack[this.stack.length-1];ce.url="mailto:"+this.sliceSerialize(J)}function fe(){return{type:"blockquote",children:[],position:void 0}}function Se(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function Be(){return{type:"inlineCode",value:"",position:void 0}}function Fn(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function _r(){return{type:"emphasis",children:[],position:void 0}}function Ti(){return{type:"heading",depth:0,children:[],position:void 0}}function wt(){return{type:"break",position:void 0}}function Ze(){return{type:"html",value:"",position:void 0}}function Vi(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function gr(){return{type:"link",title:null,url:"",children:[],position:void 0}}function an(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[],position:void 0}}function tl(J){return{type:"listItem",spread:J._spread,checked:null,children:[],position:void 0}}function il(){return{type:"paragraph",children:[],position:void 0}}function vr(){return{type:"strong",children:[],position:void 0}}function ba(){return{type:"text",value:"",position:void 0}}function nl(){return{type:"thematicBreak",position:void 0}}}function Kr(e){return{line:e.line,column:e.column,offset:e.offset}}function G6(e,t){let n=-1;for(;++n<t.length;){const s=t[n];Array.isArray(s)?G6(e,s):xM(e,s)}}function xM(e,t){let n;for(n in t)if(W6.call(t,n))switch(n){case"canContainEols":{const s=t[n];s&&e[n].push(...s);break}case"transforms":{const s=t[n];s&&e[n].push(...s);break}case"afterExit":case"beforeEnter":{const s=t[n];s&&e[n].push(s);break}case"enter":case"exit":{const s=t[n];s&&Object.assign(e[n],s);break}}}function Xy(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Po({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Po({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Po({start:t.start,end:t.end})+") is still open")}function CM(e){const t=this;t.parser=n;function n(s){return bM(s,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function EM(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function kM(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
30
- `}]}function TM(e,t){const n=t.value?t.value+`
31
- `:"",s={},l=t.lang?t.lang.split(/\s+/):[];l.length>0&&(s.className=["language-"+l[0]]);let o={type:"element",tagName:"code",properties:s,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function MM(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function AM(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function DM(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",s=String(t.identifier).toUpperCase(),l=ga(s.toLowerCase()),o=e.footnoteOrder.indexOf(s);let u,h=e.footnoteCounts.get(s);h===void 0?(h=0,e.footnoteOrder.push(s),u=e.footnoteOrder.length):u=o+1,h+=1,e.footnoteCounts.set(s,h);const p={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+l,id:n+"fnref-"+l+(h>1?"-"+h:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,p);const d={type:"element",tagName:"sup",properties:{},children:[p]};return e.patch(t,d),e.applyData(t,d)}function OM(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function RM(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function X6(e,t){const n=t.referenceType;let s="]";if(n==="collapsed"?s+="[]":n==="full"&&(s+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+s}];const l=e.all(t),o=l[0];o&&o.type==="text"?o.value="["+o.value:l.unshift({type:"text",value:"["});const u=l[l.length-1];return u&&u.type==="text"?u.value+=s:l.push({type:"text",value:s}),l}function LM(e,t){const n=String(t.identifier).toUpperCase(),s=e.definitionById.get(n);if(!s)return X6(e,t);const l={src:ga(s.url||""),alt:t.alt};s.title!==null&&s.title!==void 0&&(l.title=s.title);const o={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,o),e.applyData(t,o)}function NM(e,t){const n={src:ga(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const s={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,s),e.applyData(t,s)}function zM(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const s={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,s),e.applyData(t,s)}function BM(e,t){const n=String(t.identifier).toUpperCase(),s=e.definitionById.get(n);if(!s)return X6(e,t);const l={href:ga(s.url||"")};s.title!==null&&s.title!==void 0&&(l.title=s.title);const o={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function jM(e,t){const n={href:ga(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const s={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function HM(e,t,n){const s=e.all(t),l=n?IM(n):Z6(t),o={},u=[];if(typeof t.checked=="boolean"){const g=s[0];let _;g&&g.type==="element"&&g.tagName==="p"?_=g:(_={type:"element",tagName:"p",properties:{},children:[]},s.unshift(_)),_.children.length>0&&_.children.unshift({type:"text",value:" "}),_.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let h=-1;for(;++h<s.length;){const g=s[h];(l||h!==0||g.type!=="element"||g.tagName!=="p")&&u.push({type:"text",value:`
32
- `}),g.type==="element"&&g.tagName==="p"&&!l?u.push(...g.children):u.push(g)}const p=s[s.length-1];p&&(l||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
33
- `});const d={type:"element",tagName:"li",properties:o,children:u};return e.patch(t,d),e.applyData(t,d)}function IM(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let s=-1;for(;!t&&++s<n.length;)t=Z6(n[s])}return t}function Z6(e){const t=e.spread;return t??e.children.length>1}function PM(e,t){const n={},s=e.all(t);let l=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++l<s.length;){const u=s[l];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(s,!0)};return e.patch(t,o),e.applyData(t,o)}function FM(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function UM(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function VM(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qM(e,t){const n=e.all(t),s=n.shift(),l=[];if(s){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([s],!0)};e.patch(t.children[0],u),l.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},h=Am(t.children[1]),p=T6(t.children[t.children.length-1]);h&&p&&(u.position={start:h,end:p}),l.push(u)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,o),e.applyData(t,o)}function $M(e,t,n){const s=n?n.children:void 0,o=(s?s.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,h=u?u.length:t.children.length;let p=-1;const d=[];for(;++p<h;){const _=t.children[p],S={},v=u?u[p]:void 0;v&&(S.align=v);let w={type:"element",tagName:o,properties:S,children:[]};_&&(w.children=e.all(_),e.patch(_,w),w=e.applyData(_,w)),d.push(w)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(t,g),e.applyData(t,g)}function YM(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Zy=9,Qy=32;function KM(e){const t=String(e),n=/\r?\n|\r/g;let s=n.exec(t),l=0;const o=[];for(;s;)o.push(Jy(t.slice(l,s.index),l>0,!0),s[0]),l=s.index+s[0].length,s=n.exec(t);return o.push(Jy(t.slice(l),l>0,!1)),o.join("")}function Jy(e,t,n){let s=0,l=e.length;if(t){let o=e.codePointAt(s);for(;o===Zy||o===Qy;)s++,o=e.codePointAt(s)}if(n){let o=e.codePointAt(l-1);for(;o===Zy||o===Qy;)l--,o=e.codePointAt(l-1)}return l>s?e.slice(s,l):""}function WM(e,t){const n={type:"text",value:KM(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function GM(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const XM={blockquote:EM,break:kM,code:TM,delete:MM,emphasis:AM,footnoteReference:DM,heading:OM,html:RM,imageReference:LM,image:NM,inlineCode:zM,linkReference:BM,link:jM,listItem:HM,list:PM,paragraph:FM,root:UM,strong:VM,table:qM,tableCell:YM,tableRow:$M,text:WM,thematicBreak:GM,toml:Ku,yaml:Ku,definition:Ku,footnoteDefinition:Ku};function Ku(){}const Q6=-1,lf=0,Uo=1,Ch=2,Bm=3,jm=4,Hm=5,Im=6,J6=7,eb=8,{defineProperty:ZM}=Object,tb=typeof self=="object"?self:globalThis,e4=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new tb[e](t)},QM=(e,t)=>{const n=(l,o)=>(e.set(o,l),l),s=l=>{if(e.has(l))return e.get(l);const[o,u]=t[l];switch(o){case lf:case Q6:return n(u,l);case Uo:{const h=n([],l);for(const p of u)h.push(s(p));return h}case Ch:{const h=n({},l);for(const[p,d]of u){const g=s(p),_=s(d);g==="__proto__"?ZM(h,g,{value:_,configurable:!0,enumerable:!0,writable:!0}):h[g]=_}return h}case Bm:return n(new Date(u),l);case jm:{const{source:h,flags:p}=u;return n(new RegExp(h,p),l)}case Hm:{const h=n(new Map,l);for(const[p,d]of u)h.set(s(p),s(d));return h}case Im:{const h=n(new Set,l);for(const p of u)h.add(s(p));return h}case J6:{const{name:h,message:p}=u;return n(typeof tb[h]=="function"?e4(h,p):new Error(p),l)}case eb:return n(BigInt(u),l);case"BigInt":return n(Object(BigInt(u)),l);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:h}=new Uint8Array(u);return n(new DataView(h),u)}case"-0":return-0}return n(e4(o,u),l)};return s},t4=e=>QM(new Map,e)(0),js="",{toString:JM}={},{keys:eA,is:tA}=Object,ko=e=>{const t=typeof e;if(t!=="object"||!e)return[lf,t];const n=JM.call(e).slice(8,-1);switch(n){case"Array":return[Uo,js];case"Object":return[Ch,js];case"Date":return[Bm,js];case"RegExp":return[jm,js];case"Map":return[Hm,js];case"Set":return[Im,js];case"DataView":return[Uo,n]}return n.includes("Array")?[Uo,n]:e instanceof Error?[J6,e.name||"Error"]:[Ch,n]},Wu=([e,t])=>e===lf&&(t==="function"||t==="symbol"),iA=(e,t,n,s)=>{const l=(u,h)=>{const p=s.push(u)-1;return n.set(h,p),p},o=u=>{if(n.has(u))return n.get(u);let[h,p]=ko(u);switch(h){case lf:{let g=u;switch(p){case"bigint":h=eb,g=u.toString();break;case"number":if(!u&&tA(u,-0))return s.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);g=null;break;case"undefined":return l([Q6],u)}return l([h,g],u)}case Uo:{if(p){let S=u;return p==="DataView"?S=new Uint8Array(u.buffer):p==="ArrayBuffer"&&(S=new Uint8Array(u)),l([p,[...S]],u)}const g=[],_=l([h,g],u);for(const S of u)g.push(o(S));return _}case Ch:{if(p)switch(p){case"BigInt":return l([p,u.toString()],u);case"Boolean":case"Number":case"String":return l([p,u.valueOf()],u)}if(t&&"toJSON"in u)return o(u.toJSON());const g=[],_=l([h,g],u);for(const S of eA(u))(e||!Wu(ko(u[S])))&&g.push([o(S),o(u[S])]);return _}case Bm:return l([h,isNaN(u.getTime())?js:u.toISOString()],u);case jm:{const{source:g,flags:_}=u;return l([h,{source:g,flags:_}],u)}case Hm:{const g=[],_=l([h,g],u);for(const[S,v]of u)(e||!(Wu(ko(S))||Wu(ko(v))))&&g.push([o(S),o(v)]);return _}case Im:{const g=[],_=l([h,g],u);for(const S of u)(e||!Wu(ko(S)))&&g.push(o(S));return _}}const{message:d}=u;return l([h,{name:p,message:d}],u)};return o},i4=(e,{json:t,lossy:n}={})=>{const s=[];return iA(!(t||n),!!t,new Map,s)(e),s},Eh=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?t4(i4(e,t)):structuredClone(e):(e,t)=>t4(i4(e,t));function nA(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function rA(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function sA(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||nA,s=e.options.footnoteBackLabel||rA,l=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},h=[];let p=-1;for(;++p<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[p]);if(!d)continue;const g=e.all(d),_=String(d.identifier).toUpperCase(),S=ga(_.toLowerCase());let v=0;const w=[],C=e.footnoteCounts.get(_);for(;C!==void 0&&++v<=C;){w.length>0&&w.push({type:"text",value:" "});let U=typeof n=="string"?n:n(p,v);typeof U=="string"&&(U={type:"text",value:U}),w.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+S+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof s=="string"?s:s(p,v),className:["data-footnote-backref"]},children:Array.isArray(U)?U:[U]})}const E=g[g.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const U=E.children[E.children.length-1];U&&U.type==="text"?U.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...w)}else g.push(...w);const M={type:"element",tagName:"li",properties:{id:t+"fn-"+S},children:e.wrap(g,!0)};e.patch(d,M),h.push(M)}if(h.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Eh(u),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
34
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(h,!0)},{type:"text",value:`
35
- `}]}}const af=(function(e){if(e==null)return cA;if(typeof e=="function")return of(e);if(typeof e=="object")return Array.isArray(e)?lA(e):aA(e);if(typeof e=="string")return oA(e);throw new Error("Expected function, string, or object as test")});function lA(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=af(e[n]);return of(s);function s(...l){let o=-1;for(;++o<t.length;)if(t[o].apply(this,l))return!0;return!1}}function aA(e){const t=e;return of(n);function n(s){const l=s;let o;for(o in e)if(l[o]!==t[o])return!1;return!0}}function oA(e){return of(t);function t(n){return n&&n.type===e}}function of(e){return t;function t(n,s,l){return!!(uA(n)&&e.call(this,n,typeof s=="number"?s:void 0,l||void 0))}}function cA(){return!0}function uA(e){return e!==null&&typeof e=="object"&&"type"in e}const ib=[],hA=!0,ah=!1,J0="skip";function ep(e,t,n,s){if(!e||typeof e!="object")throw new Error("Unexpected value `"+e+"` for `tree`, expected node");let l=!0,o,u,h,p;if(typeof n=="function"||n&&typeof n=="object"?(o=t,u=n,s&&(l=!1)):(u=t,n&&(l=!1)),typeof u=="function")h=u;else if(u&&typeof u=="object"){if(!(u.enter===null||u.enter===void 0))if(typeof u.enter=="function")h=u.enter;else throw new Error("Unexpected value `"+u.enter+"` for `visitors.enter`, expected optional visitor");if(typeof u.exit=="function")p=u.exit;else throw new Error("Unexpected value `"+u.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw new Error("Unexpected value `"+u+"` for `enter` or `visitors`, expected visitor or object with visitors");const d=af(o),g=l?1:-1;_(e,void 0,[])();function _(S,v,w){const C=S&&typeof S=="object"?S:{};if(typeof C.type=="string"){const M=typeof C.tagName=="string"?C.tagName:typeof C.name=="string"?C.name:void 0;Object.defineProperty(E,"name",{value:"node ("+(S.type+(M?"<"+M+">":""))+")"})}return E;function E(){const M=!o||d(S,v,w[w.length-1]||void 0);let U=ib;if(h&&M&&(U=n4(h(S,w,v)),U[0]===ah))return U;if("children"in S&&S.children){const B=S;if(B.children&&U[0]!==J0){let X=(l?-1:B.children.length)+g;const Q=[...w,B];for(;X>-1&&X<B.children.length;){const R=B.children[X],V=_(R,X,Q)();if(V[0]===ah)return V;X=typeof V[1]=="number"?V[1]:X+g}}}if(p&&M){const B=n4(p(S,w,v));if(B[0]===J0)throw new Error("Unexpected value `"+B[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(B[0]===ah||typeof B[1]=="number")return B}return U}}}function n4(e){return Array.isArray(e)?e:typeof e=="number"?[hA,e]:e==null?ib:[e]}function Pm(e,t,n,s){let l,o,u;o=t,u=n,typeof o=="function"?ep(e,l,tp(o),u):ep(e,l,fA(o),u)}function fA(e){return!e||typeof e!="object"?e:{enter:typeof e.enter=="function"?tp(e.enter):e.enter,exit:typeof e.exit=="function"?tp(e.exit):e.exit}}function tp(e){return t;function t(n,s,l){return e(n,l,s[s.length-1])}}const ip={}.hasOwnProperty,dA={};function pA(e,t){const n=t||dA,s=new Map,l=new Map,o=new Map,u={...XM,...n.handlers},h={all:d,applyData:_A,definitionById:s,footnoteById:l,footnoteCounts:o,footnoteOrder:[],handlers:u,one:p,options:n,patch:mA,wrap:vA};return Pm(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const _=g.type==="definition"?s:l,S=String(g.identifier).toUpperCase();_.has(S)||_.set(S,g)}}),h;function p(g,_){const S=g.type,v=h.handlers[S];if(ip.call(h.handlers,S)&&v)return v(h,g,_);if(h.options.passThrough&&h.options.passThrough.includes(S)){if("children"in g){const{children:C,...E}=g,M=Eh(E);return M.children=h.all(g),M}return Eh(g)}return(h.options.unknownHandler||gA)(h,g,_)}function d(g){const _=[];if("children"in g){const S=g.children;let v=-1;for(;++v<S.length;){const w=h.one(S[v],g);if(w){if(v&&S[v-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=r4(w.value)),!Array.isArray(w)&&w.type==="element")){const C=w.children[0];C&&C.type==="text"&&(C.value=r4(C.value))}Array.isArray(w)?_.push(...w):_.push(w)}}}return _}}function mA(e,t){e.position&&(t.position=lk(e))}function _A(e,t){let n=t;if(e&&e.data){const s=e.data.hName,l=e.data.hChildren,o=e.data.hProperties;if(typeof s=="string")if(n.type==="element")n.tagName=s;else{const u="children"in n?n.children:[n];n={type:"element",tagName:s,properties:{},children:u}}n.type==="element"&&o&&Object.assign(n.properties,Eh(o)),"children"in n&&n.children&&l!==null&&l!==void 0&&(n.children=l)}return n}function gA(e,t){const n=t.data||{},s="value"in t&&!(ip.call(n,"hProperties")||ip.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function vA(e,t){const n=[];let s=-1;for(t&&n.push({type:"text",value:`
36
- `});++s<e.length;)s&&n.push({type:"text",value:`
37
- `}),n.push(e[s]);return t&&e.length>0&&n.push({type:"text",value:`
38
- `}),n}function r4(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function s4(e,t){const n=pA(e,t),s=n.one(e,void 0),l=sA(n),o=Array.isArray(s)?{type:"root",children:s}:s||{type:"root",children:[]};return l&&o.children.push({type:"text",value:`
39
- `},l),o}function yA(e,t){return e&&"run"in e?async function(n,s){const l=s4(n,{file:s,...t});await e.run(l,s)}:function(n,s){return s4(n,{file:s,...e||t})}}function l4(e){if(e)throw e}var o0,a4;function SA(){if(a4)return o0;a4=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l=function(d){return typeof Array.isArray=="function"?Array.isArray(d):t.call(d)==="[object Array]"},o=function(d){if(!d||t.call(d)!=="[object Object]")return!1;var g=e.call(d,"constructor"),_=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!g&&!_)return!1;var S;for(S in d);return typeof S>"u"||e.call(d,S)},u=function(d,g){n&&g.name==="__proto__"?n(d,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):d[g.name]=g.newValue},h=function(d,g){if(g==="__proto__")if(e.call(d,g)){if(s)return s(d,g).value}else return;return d[g]};return o0=function p(){var d,g,_,S,v,w,C=arguments[0],E=1,M=arguments.length,U=!1;for(typeof C=="boolean"&&(U=C,C=arguments[1]||{},E=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});E<M;++E)if(d=arguments[E],d!=null)for(g in d)_=h(C,g),S=h(d,g),C!==S&&(U&&S&&(o(S)||(v=l(S)))?(v?(v=!1,w=_&&l(_)?_:[]):w=_&&o(_)?_:{},u(C,{name:g,newValue:p(U,w,S)})):typeof S<"u"&&u(C,{name:g,newValue:S}));return C},o0}var bA=SA();const c0=da(bA);function np(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function wA(){const e=[],t={run:n,use:s};return t;function n(...l){let o=-1;const u=l.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);h(null,...l);function h(p,...d){const g=e[++o];let _=-1;if(p){u(p);return}for(;++_<l.length;)(d[_]===null||d[_]===void 0)&&(d[_]=l[_]);l=d,g?xA(g,h)(...d):u(null,...d)}}function s(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),t}}function xA(e,t){let n;return s;function s(...u){const h=e.length>u.length;let p;h&&u.push(l);try{p=e.apply(this,u)}catch(d){const g=d;if(h&&n)throw g;return l(g)}h||(p&&p.then&&typeof p.then=="function"?p.then(o,l):p instanceof Error?l(p):o(p))}function l(u,...h){n||(n=!0,t(u,...h))}function o(u){l(null,u)}}const Rn={basename:CA,dirname:EA,extname:kA,join:TA,sep:"/"};function CA(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');uc(e);let n=0,s=-1,l=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(o){n=l+1;break}}else s<0&&(o=!0,s=l+1);return s<0?"":e.slice(n,s)}if(t===e)return"";let u=-1,h=t.length-1;for(;l--;)if(e.codePointAt(l)===47){if(o){n=l+1;break}}else u<0&&(o=!0,u=l+1),h>-1&&(e.codePointAt(l)===t.codePointAt(h--)?h<0&&(s=l):(h=-1,s=u));return n===s?s=u:s<0&&(s=e.length),e.slice(n,s)}function EA(e){if(uc(e),e.length===0)return".";let t=-1,n=e.length,s;for(;--n;)if(e.codePointAt(n)===47){if(s){t=n;break}}else s||(s=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function kA(e){uc(e);let t=e.length,n=-1,s=0,l=-1,o=0,u;for(;t--;){const h=e.codePointAt(t);if(h===47){if(u){s=t+1;break}continue}n<0&&(u=!0,n=t+1),h===46?l<0?l=t:o!==1&&(o=1):l>-1&&(o=-1)}return l<0||n<0||o===0||o===1&&l===n-1&&l===s+1?"":e.slice(l,n)}function TA(...e){let t=-1,n;for(;++t<e.length;)uc(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":MA(n)}function MA(e){uc(e);const t=e.codePointAt(0)===47;let n=AA(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function AA(e,t){let n="",s=0,l=-1,o=0,u=-1,h,p;for(;++u<=e.length;){if(u<e.length)h=e.codePointAt(u);else{if(h===47)break;h=47}if(h===47){if(!(l===u-1||o===1))if(l!==u-1&&o===2){if(n.length<2||s!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(p=n.lastIndexOf("/"),p!==n.length-1){p<0?(n="",s=0):(n=n.slice(0,p),s=n.length-1-n.lastIndexOf("/")),l=u,o=0;continue}}else if(n.length>0){n="",s=0,l=u,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",s=2)}else n.length>0?n+="/"+e.slice(l+1,u):n=e.slice(l+1,u),s=u-l-1;l=u,o=0}else h===46&&o>-1?o++:o=-1}return n}function uc(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const DA={cwd:OA};function OA(){return"/"}function rp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function RA(e){if(typeof e=="string")e=new URL(e);else if(!rp(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return LA(e)}function LA(e){if(e.hostname!==""){const s=new TypeError('File URL host must be "localhost" or empty on darwin');throw s.code="ERR_INVALID_FILE_URL_HOST",s}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const s=t.codePointAt(n+2);if(s===70||s===102){const l=new TypeError("File URL path must not include encoded / characters");throw l.code="ERR_INVALID_FILE_URL_PATH",l}}return decodeURIComponent(t)}const u0=["history","path","basename","stem","extname","dirname"];class nb{constructor(t){let n;t?rp(t)?n={path:t}:typeof t=="string"||NA(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":DA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let s=-1;for(;++s<u0.length;){const o=u0[s];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let l;for(l in n)u0.includes(l)||(this[l]=n[l])}get basename(){return typeof this.path=="string"?Rn.basename(this.path):void 0}set basename(t){f0(t,"basename"),h0(t,"basename"),this.path=Rn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Rn.dirname(this.path):void 0}set dirname(t){o4(this.basename,"dirname"),this.path=Rn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Rn.extname(this.path):void 0}set extname(t){if(h0(t,"extname"),o4(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Rn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){rp(t)&&(t=RA(t)),f0(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Rn.basename(this.path,this.extname):void 0}set stem(t){f0(t,"stem"),h0(t,"stem"),this.path=Rn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,s){const l=this.message(t,n,s);throw l.fatal=!0,l}info(t,n,s){const l=this.message(t,n,s);return l.fatal=void 0,l}message(t,n,s){const l=new ai(t,n,s);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function h0(e,t){if(e&&e.includes(Rn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Rn.sep+"`")}function f0(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function o4(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function NA(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const zA=(function(e){const s=this.constructor.prototype,l=s[e],o=function(){return l.apply(o,arguments)};return Object.setPrototypeOf(o,s),o}),BA={}.hasOwnProperty;class Fm extends zA{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=wA()}copy(){const t=new Fm;let n=-1;for(;++n<this.attachers.length;){const s=this.attachers[n];t.use(...s)}return t.data(c0(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(m0("data",this.frozen),this.namespace[t]=n,this):BA.call(this.namespace,t)&&this.namespace[t]||void 0:t?(m0("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...s]=this.attachers[this.freezeIndex];if(s[0]===!1)continue;s[0]===!0&&(s[0]=void 0);const l=n.call(t,...s);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Gu(t),s=this.parser||this.Parser;return d0("parse",s),s(String(n),n)}process(t,n){const s=this;return this.freeze(),d0("process",this.parser||this.Parser),p0("process",this.compiler||this.Compiler),n?l(void 0,n):new Promise(l);function l(o,u){const h=Gu(t),p=s.parse(h);s.run(p,h,function(g,_,S){if(g||!_||!S)return d(g);const v=_,w=s.stringify(v,S);IA(w)?S.value=w:S.result=w,d(g,S)});function d(g,_){g||!_?u(g):o?o(_):n(void 0,_)}}}processSync(t){let n=!1,s;return this.freeze(),d0("processSync",this.parser||this.Parser),p0("processSync",this.compiler||this.Compiler),this.process(t,l),u4("processSync","process",n),s;function l(o,u){n=!0,l4(o),s=u}}run(t,n,s){c4(t),this.freeze();const l=this.transformers;return!s&&typeof n=="function"&&(s=n,n=void 0),s?o(void 0,s):new Promise(o);function o(u,h){const p=Gu(n);l.run(t,p,d);function d(g,_,S){const v=_||t;g?h(g):u?u(v):s(void 0,v,S)}}}runSync(t,n){let s=!1,l;return this.run(t,n,o),u4("runSync","run",s),l;function o(u,h){l4(u),l=h,s=!0}}stringify(t,n){this.freeze();const s=Gu(n),l=this.compiler||this.Compiler;return p0("stringify",l),c4(t),l(t,s)}use(t,...n){const s=this.attachers,l=this.namespace;if(m0("use",this.frozen),t!=null)if(typeof t=="function")p(t,n);else if(typeof t=="object")Array.isArray(t)?h(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(d){if(typeof d=="function")p(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[g,..._]=d;p(g,_)}else u(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function u(d){if(!("plugins"in d)&&!("settings"in d))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");h(d.plugins),d.settings&&(l.settings=c0(!0,l.settings,d.settings))}function h(d){let g=-1;if(d!=null)if(Array.isArray(d))for(;++g<d.length;){const _=d[g];o(_)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function p(d,g){let _=-1,S=-1;for(;++_<s.length;)if(s[_][0]===d){S=_;break}if(S===-1)s.push([d,...g]);else if(g.length>0){let[v,...w]=g;const C=s[S][1];np(C)&&np(v)&&(v=c0(!0,C,v)),s[S]=[d,v,...w]}}}}const jA=new Fm().freeze();function d0(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function p0(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function m0(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function c4(e){if(!np(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function u4(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Gu(e){return HA(e)?e:new nb(e)}function HA(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function IA(e){return typeof e=="string"||PA(e)}function PA(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const FA="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",h4=[],f4={allowDangerousHtml:!0},UA=/^(https?|ircs?|mailto|xmpp)$/i,VA=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function qA(e){const t=$A(e),n=YA(e);return KA(t.runSync(t.parse(n),n),e)}function $A(e){const t=e.rehypePlugins||h4,n=e.remarkPlugins||h4,s=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...f4}:f4;return jA().use(CM).use(n).use(yA,s).use(t)}function YA(e){const t=e.children||"",n=new nb;return typeof t=="string"&&(n.value=t),n}function KA(e,t){const n=t.allowedElements,s=t.allowElement,l=t.components,o=t.disallowedElements,u=t.skipHtml,h=t.unwrapDisallowed,p=t.urlTransform||WA;for(const g of VA)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+FA+g.id,void 0);return Pm(e,d),hk(e,{Fragment:y.Fragment,components:l,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function d(g,_,S){if(g.type==="raw"&&S&&typeof _=="number")return u?S.children.splice(_,1):S.children[_]={type:"text",value:g.value},_;if(g.type==="element"){let v;for(v in s0)if(Object.hasOwn(s0,v)&&Object.hasOwn(g.properties,v)){const w=g.properties[v],C=s0[v];(C===null||C.includes(g.tagName))&&(g.properties[v]=p(String(w||""),v,g))}}if(g.type==="element"){let v=n?!n.includes(g.tagName):o?o.includes(g.tagName):!1;if(!v&&s&&typeof _=="number"&&(v=!s(g,_,S)),v&&S&&typeof _=="number")return h&&g.children?S.children.splice(_,1,...g.children):S.children.splice(_,1),_}}}function WA(e){const t=e.indexOf(":"),n=e.indexOf("?"),s=e.indexOf("#"),l=e.indexOf("/");return t===-1||l!==-1&&t>l||n!==-1&&t>n||s!==-1&&t>s||UA.test(e.slice(0,t))?e:""}function d4(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let s=0,l=n.indexOf(t);for(;l!==-1;)s++,l=n.indexOf(t,l+t.length);return s}function GA(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function XA(e,t,n){const l=af((n||{}).ignore||[]),o=ZA(t);let u=-1;for(;++u<o.length;)ep(e,h);function h(d,g,_){if(d.type==="text"&&typeof _=="number")return p(d,g,_);if(l(d,_,g[g.length-1]))return J0}function p(d,g,_){const S=g[g.length-1],v=o[u][0],w=o[u][1];let C=0,E=!1,M=[];v.lastIndex=0;let U=v.exec(d.value);for(;U;){const X=U.index,Q={index:U.index,input:U.input,stack:[...g,d]};let R=w(...U,Q);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1)v.lastIndex=X+1;else{if(C!==X&&B({type:"text",value:d.value.slice(C,X)}),Array.isArray(R))for(const V of R)B(V);else R&&B(R);C=X+U[0].length,E=!0}if(!v.global)break;U=v.exec(d.value)}return E?(C<d.value.length&&B({type:"text",value:d.value.slice(C)}),S.children.splice(_,1,...M)):M=[d],_+M.length;function B(X){const Q=M[M.length-1];Q&&Q.type==="text"&&X.type==="text"?Q.value+=X.value:M.push(X)}}}function ZA(e){if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=[],n=!e[0]||Array.isArray(e[0])?e:[e];let s=-1;for(;++s<n.length;){const l=n[s];t.push([QA(l[0]),JA(l[1])])}return t}function QA(e){return typeof e=="string"?new RegExp(GA(e),"g"):e}function JA(e){return typeof e=="function"?e:function(){return e}}const _0="phrasing",g0=["autolink","link","image","label"];function eD(){return{transforms:[aD],enter:{literalAutolink:iD,literalAutolinkEmail:v0,literalAutolinkHttp:v0,literalAutolinkWww:v0},exit:{literalAutolink:lD,literalAutolinkEmail:sD,literalAutolinkHttp:nD,literalAutolinkWww:rD}}}function tD(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:_0,notInConstruct:g0},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:_0,notInConstruct:g0},{character:":",before:"[ps]",after:"\\/",inConstruct:_0,notInConstruct:g0}]}}function iD(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function v0(e){this.config.enter.autolinkProtocol.call(this,e)}function nD(e){this.config.exit.autolinkProtocol.call(this,e)}function rD(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function sD(e){this.config.exit.autolinkEmail.call(this,e)}function lD(e){this.exit(e)}function aD(e){XA(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,oD],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,cD]],{ignore:["link","linkReference"]})}function oD(e,t,n,s,l){let o="";if(!rb(l)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!uD(n)))return!1;const u=hD(n+s);if(!u[0])return!1;const h={type:"link",title:null,url:o+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[h,{type:"text",value:u[1]}]:h}function cD(e,t,n,s){return!rb(s,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function uD(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function hD(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],s=n.indexOf(")");const l=d4(e,"(");let o=d4(e,")");for(;s!==-1&&l>o;)e+=n.slice(0,s+1),n=n.slice(s+1),s=n.indexOf(")"),o++;return[e,n]}function rb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ks(n)||rf(n))&&(!t||n!==47)}sb.peek=SD;function fD(){this.buffer()}function dD(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function pD(){this.buffer()}function mD(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function _D(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_n(this.sliceSerialize(e)).toLowerCase(),n.label=t}function gD(e){this.exit(e)}function vD(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_n(this.sliceSerialize(e)).toLowerCase(),n.label=t}function yD(e){this.exit(e)}function SD(){return"["}function sb(e,t,n,s){const l=n.createTracker(s);let o=l.move("[^");const u=n.enter("footnoteReference"),h=n.enter("reference");return o+=l.move(n.safe(n.associationId(e),{after:"]",before:o})),h(),u(),o+=l.move("]"),o}function bD(){return{enter:{gfmFootnoteCallString:fD,gfmFootnoteCall:dD,gfmFootnoteDefinitionLabelString:pD,gfmFootnoteDefinition:mD},exit:{gfmFootnoteCallString:_D,gfmFootnoteCall:gD,gfmFootnoteDefinitionLabelString:vD,gfmFootnoteDefinition:yD}}}function wD(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:sb},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(s,l,o,u){const h=o.createTracker(u);let p=h.move("[^");const d=o.enter("footnoteDefinition"),g=o.enter("label");return p+=h.move(o.safe(o.associationId(s),{before:p,after:"]"})),g(),p+=h.move("]:"),s.children&&s.children.length>0&&(h.shift(4),p+=h.move((t?`
40
- `:" ")+o.indentLines(o.containerFlow(s,h.current()),t?lb:xD))),d(),p}}function xD(e,t,n){return t===0?e:lb(e,t,n)}function lb(e,t,n){return(n?"":" ")+e}const CD=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Um.attention=AD;Um.peek=DD;function ED(){return{canContainEols:["delete"],enter:{strikethrough:TD},exit:{strikethrough:MD}}}function kD(){return{handlers:{delete:Um},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:CD}]}}function TD(e){this.enter({type:"delete",children:[],position:void 0},e)}function MD(e){this.exit(e)}function Um(e,t,n,s){const l=n.createTracker(s),o=n.stack.includes("strikethrough")?"~":"~~",u=n.enter("strikethrough");let h=l.move(o);return h+=n.containerPhrasing(e,{...l.current(),before:h,after:"~"}),h+=l.move(o),u(),h}function AD(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function DD(){return"~"}function OD(e){return e.length}function RD(e,t){const n=t||{},s=(n.align||[]).concat(),l=n.stringLength||OD,o=[],u=[],h=[],p=[];let d=0,g=-1;for(;++g<e.length;){const C=[],E=[];let M=-1;for(e[g].length>d&&(d=e[g].length);++M<e[g].length;){const U=LD(e[g][M]);if(n.alignDelimiters!==!1){const B=l(U);E[M]=B,(p[M]===void 0||B>p[M])&&(p[M]=B)}C.push(U)}u[g]=C,h[g]=E}let _=-1;if(typeof s=="object"&&"length"in s)for(;++_<d;)o[_]=p4(s[_]);else{const C=p4(s);for(;++_<d;)o[_]=C}_=-1;const S=[],v=[];for(;++_<d;){const C=o[_];let E="",M="";C===99?(E=":",M=":"):C===108?E=":":C===114&&(M=":");let U=n.alignDelimiters===!1?1:Math.max(1,p[_]-E.length-M.length);const B=E+"-".repeat(U)+M;n.alignDelimiters!==!1&&(U=E.length+U+M.length,U>p[_]&&(p[_]=U),v[_]=U),S[_]=B}u.splice(1,0,S),h.splice(1,0,v),g=-1;const w=[];for(;++g<u.length;){const C=u[g],E=h[g];_=-1;const M=[];for(;++_<d;){const U=C[_]||"";let B="",X="";if(n.alignDelimiters!==!1){const Q=p[_]-(E[_]||0),R=o[_];R===114?B=" ".repeat(Q):R===99?Q%2?(B=" ".repeat(Q/2+.5),X=" ".repeat(Q/2-.5)):(B=" ".repeat(Q/2),X=B):X=" ".repeat(Q)}n.delimiterStart!==!1&&!_&&M.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&U==="")&&(n.delimiterStart!==!1||_)&&M.push(" "),n.alignDelimiters!==!1&&M.push(B),M.push(U),n.alignDelimiters!==!1&&M.push(X),n.padding!==!1&&M.push(" "),(n.delimiterEnd!==!1||_!==d-1)&&M.push("|")}w.push(n.delimiterEnd===!1?M.join("").replace(/ +$/,""):M.join(""))}return w.join(`
41
- `)}function LD(e){return e==null?"":String(e)}function p4(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const ND=af(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function zD(e,t,n,s){const l=n.enter("blockquote"),o=n.createTracker(s);o.move("> "),o.shift(2);const u=n.indentLines(n.containerFlow(e,o.current()),BD);return l(),u}function BD(e,t,n){return">"+(n?"":" ")+e}function jD(e,t){return m4(e,t.inConstruct,!0)&&!m4(e,t.notInConstruct,!1)}function m4(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let s=-1;for(;++s<t.length;)if(e.includes(t[s]))return!0;return!1}function _4(e,t,n,s){let l=-1;for(;++l<n.unsafe.length;){const o=n.unsafe[l];if(o.character===`
42
- `&&!o.before&&!o.after&&jD(n.stack,o))return/[\t ]/.test(s.before)?"":" "}return`\\
43
- `}function HD(e,t){const n=String(e);let s=n.indexOf(t),l=s,o=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;s!==-1;)s===l?++o>u&&(u=o):o=1,l=s+t.length,s=n.indexOf(t,l);return u}function ID(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^\n\r ]/.test(e.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function PD(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function FD(e,t,n,s){const l=PD(n),o=e.value||"";if(ID(e,n)){const _=n.enter("codeIndented"),S=n.indentLines(o,UD);return _(),S}const u=n.createTracker(s),h=l.repeat(Math.max(HD(o,l)+1,3)),p=n.enter("codeFenced"),d=l==="`"?"GraveAccent":"Tilde";let g=u.move(h);if(e.lang){const _=n.enter(`codeFencedLang${d}`);g+=u.move(n.safe(e.lang,{before:g,after:" ",encode:["`"],...u.current()})),_()}if(e.lang&&e.meta){const _=n.enter(`codeFencedMeta${d}`);g+=u.move(" "),g+=u.move(n.safe(e.meta,{before:g,after:`
44
- `,encode:["`"],...u.current()})),_()}return g+=u.move(`
45
- `),o&&(g+=u.move(o+`
46
- `)),g+=u.move(h),p(),g}function UD(e,t,n){return(n?"":" ")+e}function Vm(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function VD(e,t,n,s){const l=Vm(n),o=l==='"'?"Quote":"Apostrophe",u=n.enter("definition");let h=n.enter("label");const p=n.createTracker(s);let d=p.move("[");return d+=p.move(n.safe(n.associationId(e),{before:d,after:"]",...p.current()})),d+=p.move("]: "),h(),!e.url||/[\0- \u007F]/.test(e.url)?(h=n.enter("destinationLiteral"),d+=p.move("<"),d+=p.move(n.safe(e.url,{before:d,after:">",...p.current()})),d+=p.move(">")):(h=n.enter("destinationRaw"),d+=p.move(n.safe(e.url,{before:d,after:e.title?" ":`
47
- `,...p.current()}))),h(),e.title&&(h=n.enter(`title${o}`),d+=p.move(" "+l),d+=p.move(n.safe(e.title,{before:d,after:l,...p.current()})),d+=p.move(l),h()),u(),d}function qD(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function kh(e){const t=e.codePointAt(0);return t===void 0?"":String.fromCodePoint(t)}function na(e){const t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function ab(e){return"&#x"+e.toString(16).toUpperCase()+";"}function g4(e,t,n){const s=as(e),l=as(t);return s===void 0?l===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:s===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function $D(e){if(e.charCodeAt(0)!==60)return;const t=e.charCodeAt(1);if(t===33){const h=e.charCodeAt(2);return h===45?2:h===91?5:ii(h)?4:void 0}if(t===63)return 3;const n=t===47,s=n?2:1;let l=s,o=e.charCodeAt(l);if(!ii(o))return;for(;o===45||ri(o);)o=e.charCodeAt(++l);const u=e.slice(s,l).toLowerCase();return!n&&o!==47&&Q0.includes(u)?1:$6.includes(u)?6:7}const YD=new Map([["*",!1],["_",!0]]);function KD(e,t,n){const s=new Set;for(const o of e){const u=n.get(o);if(u&&o.attention&&t.some(h=>h.attention===o.attention))for(const h of u.tokens)s.add(h.attention)}const l=[];for(const o of e)o.attention&&s.delete(o.attention)&&l.push(o.attention);return l.reverse(),l}function ob(e,t,n){const s=[],l=new Map,o=new Map;let u=0;for(;u<e.length;){if(!e[u].attention){u++;continue}const h=e[u].value.charAt(0),p=YD.get(h);let d=u+1;for(;d<e.length&&e[d].attention&&e[d].value.charAt(0)===h;)d++;const g=u?e[u-1].value:t,_=as(g.charCodeAt(g.length-1)),S=as((d<e.length?e[d].value:n).charCodeAt(0)),v=!S||S===2&&!!_,w=!_||_===2&&!!S,C={tokens:e.slice(u,d),markers:[],start:0,end:0,open:p?v&&(!!_||!w):v,close:p?w&&(!!S||!v):w,split:p!==void 0};for(const E of C.tokens){l.set(E,[...C.tokens]),o.set(E,C);let M=E.value.length;for(;M--;)C.markers.push(E)}C.end=C.markers.length,s.push(C),u=d}for(GD(s,l),u=-1;++u<e.length;){const h=l.get(e[u]);if(h)return{attention:KD(e,h,o),index:u}}}function Xu(e,t){const n=e[t?0:e.length-1];if(!n||n.attention)return;const s=t?kh(n.value):na(n.value),l=ab(s.codePointAt(0));if(t)n.value=l+n.value.slice(s.length);else{let o=n.value.slice(0,n.value.length-s.length),u=0;for(;o.charCodeAt(o.length-1-u)===92;)u++;u%2&&(o+="\\"),n.value=o+l}}function WD(e,t,n,s,l){for(const o of n.attention){const u=t.get(o)||o.sequences[0];for(const h of o.sequences){if(h===u)continue;const p=new Map(t);p.set(o,h);const d=$m(e,p,s,l),g=ob(d,s,l);if(!g||g.index>n.index)return{chosen:p,mistake:g,tokens:d}}}}function GD(e,t){const n=new Map;for(const s of e){const l=s.tokens[0].value.charAt(0);let o=n.get(l);o||(o=[],n.set(l,o));let u=s.close?o.length:0;for(;u--&&s.start<s.end;){const h=o[u],p=h.end-h.start,d=s.end-s.start;if(s.split?(h.close||s.open)&&d%3&&!((p+d)%3):p!==h.markers.length||p!==d)continue;const g=s.split?p>1&&d>1?2:1:d,_=h.markers.slice(h.end-g,h.end),S=s.markers.slice(s.start,s.start+g),v=_[0],w=S[0];if(v===_[g-1]&&v.value.length===g&&w===S[g-1]&&w.value.length===g&&v.attention===w.attention)t.delete(v),t.delete(w);else{const C=[...new Set([..._,...S])];for(const E of C){const M=t.get(E);M&&M.push(...C)}}h.end-=g,s.start+=g,h.start===h.end&&o.splice(u,1),u=o.length}s.open&&s.start<s.end&&o.push(s)}}function XD(e,t,n){if(t.length===0)throw new Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw new Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(const l of n)if(!Number.isSafeInteger(l)||l<1)throw new Error("Cannot serialize `"+e+"` as attention with `"+l+"` as size, expected positive integer");const s=[];for(const l of t){if(l.length!==1)throw new Error("Cannot serialize `"+e+"` as attention with `"+l+"` as marker, expected a single ascii character");if(!B6(l.charCodeAt(0)))throw new Error("Cannot serialize `"+e+"` as attention with `"+l+"` as marker, expected ascii punctuation");for(const o of n)s.push(l.repeat(o))}return s}function ZD(e,t,n){const s=t.indexStack,l=e.children||[],o=[];let u=-1,h=n.before;s.push(-1);let p=t.createTracker(n);for(;++u<l.length;){const d=l[u];let g;if(s[s.length-1]=u,u+1<l.length){let v=t.handle.handlers[l[u+1].type];v&&v.peek&&(v=v.peek),g=v?kh(v(l[u+1],e,t,{before:"",after:"",...p.current()})):""}else g=n.after;const _=o[o.length-1];typeof _=="string"&&(h==="\r"||h===`
48
- `)&&d.type==="html"&&$D(d.value)!==7&&(o[o.length-1]=_.replace(/(\r?\n|\r)$/," "),h=" ",p=t.createTracker(n),p.move(cf(o,n.before,n.after)));const S=t.handle.handlers[d.type];if(S&&S.attention){const v=qm(d,S.attention,t,p);o.push(v),h=na(v.sequences[0])}else{const v=t.handle(d,e,t,{...p.current(),after:g,before:h});if(!v)continue;p.move(v),o.push(v),h=na(v)}}return s.pop(),o}function qm(e,t,n,s){const{construct:l,markers:o,sizes:u}=t(e,n),h=XD(e.type,o,u),p=h[0],d=n.enter(l);s.move(p);const g=ZD(e,n,{...s.current(),before:p,after:p});return s.move(cf(g,p,p)),s.move(p),d(),{children:g,sequences:h}}function $m(e,t,n,s){const l=[];let o,u=na(n),h=-1;for(;++h<e.length;){const p=e[h];if(typeof p=="string"){const B={value:p,attention:void 0};o&&o===kh(p)&&Xu([B],!0),o=void 0,l.push(B),B.value&&(u=na(B.value));continue}const d=t.get(p)||p.sequences[0],g=d.charAt(0),_=e[h+1],S=u,v=kh(_===void 0?s:typeof _=="string"?_:t.get(_)||_.sequences[0]),w=$m(p.children,t,d,d),C=w.length>0?w[0].value:"",E=g4(S.charCodeAt(S.length-1),C.charCodeAt(0),g);E.inside&&Xu(w,!0);const M=w.length>0?na(w[w.length-1].value):"",U=g4(v.charCodeAt(0),M.charCodeAt(M.length-1),g);U.inside&&Xu(w,!1),E.outside&&S!==`
49
- `&&S!=="\r"&&Xu(l,!1),U.outside&&(o=v),l.push({value:d,attention:p},...w,{value:d,attention:p}),u=d.charAt(d.length-1)}return l}function cf(e,t,n){let s=new Map;const l=$m(e,s,t,n);let o=l,u=ob(o,t,n);for(;u;){const p=WD(e,s,u,t,n);if(!p){o=l;break}s=p.chosen,o=p.tokens,u=p.mistake}let h="";for(const p of o)h+=p.value;return h}Ym.attention=cb;Ym.peek=QD;function Ym(e,t,n,s){const l=n.enter("phrasing"),o=qm(e,cb,n,n.createTracker(s)),u=cf([o],s.before,s.after);return l(),u}function cb(e,t){return{construct:"emphasis",markers:qD(t)==="*"?["*","_"]:["_","*"],sizes:[1]}}function QD(e,t,n){return n.options.emphasis||"*"}function JD(e,t){let n=!1;return Pm(e,function(s){if("value"in s&&/\r?\n|\r/.test(s.value)||s.type==="break")return n=!0,ah}),!!((!e.depth||e.depth<3)&&Lm(e)&&(t.options.setext||n))}function eO(e,t,n,s){const l=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(s);if(JD(e,n)){const _=n.enter("headingSetext"),S=n.enter("phrasing"),v=n.containerPhrasing(e,{...o.current(),before:`
50
- `,after:`
51
- `});return S(),_(),v+`
52
- `+(l===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
53
- `))+1))}const u="#".repeat(l),h=n.enter("headingAtx"),p=n.enter("phrasing");o.move(u+" ");let d=n.containerPhrasing(e,{before:"# ",after:`
54
- `,...o.current()});const g=d.charCodeAt(0);return(g===9||g===32)&&(d=ab(g)+d.slice(1)),d=d?u+" "+d:u,n.options.closeAtx&&(d+=" "+u),p(),h(),d}ub.peek=tO;function ub(e){return e.value||""}function tO(){return"<"}hb.peek=iO;function hb(e,t,n,s){const l=Vm(n),o=l==='"'?"Quote":"Apostrophe",u=n.enter("image");let h=n.enter("label");const p=n.createTracker(s);let d=p.move("![");return d+=p.move(n.safe(e.alt,{before:d,after:"]",...p.current()})),d+=p.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=n.enter("destinationLiteral"),d+=p.move("<"),d+=p.move(n.safe(e.url,{before:d,after:">",...p.current()})),d+=p.move(">")):(h=n.enter("destinationRaw"),d+=p.move(n.safe(e.url,{before:d,after:e.title?" ":")",...p.current()}))),h(),e.title&&(h=n.enter(`title${o}`),d+=p.move(" "+l),d+=p.move(n.safe(e.title,{before:d,after:l,...p.current()})),d+=p.move(l),h()),d+=p.move(")"),u(),d}function iO(){return"!"}fb.peek=nO;function fb(e,t,n,s){const l=e.referenceType,o=n.enter("imageReference");let u=n.enter("label");const h=n.createTracker(s);let p=h.move("![");const d=n.safe(e.alt,{before:p,after:"]",...h.current()});p+=h.move(d+"]["),u();const g=n.stack;n.stack=g.filter(function(S){return S!=="phrasing"}),u=n.enter("reference");const _=n.safe(n.associationId(e),{before:p,after:"]",...h.current()});return u(),n.stack=g,o(),l==="full"||!d||d!==_?p+=h.move(_+"]"):l==="shortcut"?p=p.slice(0,-1):p+=h.move("]"),p}function nO(){return"!"}db.peek=rO;function db(e,t,n){let s=e.value||"",l="`",o=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(s);)l+="`";for(/[^\n\r ]/.test(s)&&(/^[\n\r ]/.test(s)&&/[\n\r ]$/.test(s)||/^`|`$/.test(s))&&(s=" "+s+" ");++o<n.unsafe.length;){const u=n.unsafe[o],h=n.compilePattern(u);if(!u.atBreak)continue;let p;for(;p=h.exec(s);){let d=p.index;s.charCodeAt(d)===10&&s.charCodeAt(d-1)===13&&d--,s=s.slice(0,d)+" "+s.slice(p.index+1)}}return l+s+l}function rO(){return"`"}function pb(e,t){const n=Lm(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][+\-.a-z]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}mb.peek=sO;function mb(e,t,n,s){const l=Vm(n),o=l==='"'?"Quote":"Apostrophe",u=n.createTracker(s);if(pb(e,n)){const w=n.stack;n.stack=w.filter(function(M){return M!=="phrasing"});const C=n.enter("autolink");let E=u.move("<");return E+=u.move(n.containerPhrasing(e,{before:E,after:">",...u.current()})),E+=u.move(">"),C(),n.stack=w,E}const h=n.enter("link");let p=n.enter("label"),d=u.move("[");const g=n.containerPhrasing(e,{before:d,after:"](",...u.current()});d+=u.move(g),p(),d+=u.move("](");const _=/[\0- \u007F]/.test(e.url),S=s.before.charAt(s.before.length-1);let v=e.title||void 0;if(!v&&!_&&(S===`
55
- `||S==="\r")){let w=0;for(;w<g.length&&g.charCodeAt(w)!==93;)w+=g.charCodeAt(w)===92?2:1;g.charCodeAt(w+1)===58&&(v="")}return!e.url&&typeof v=="string"||_?(p=n.enter("destinationLiteral"),d+=u.move("<"),d+=u.move(n.safe(e.url,{before:d,after:">",...u.current()})),d+=u.move(">")):(p=n.enter("destinationRaw"),d+=u.move(n.safe(e.url,{before:d,after:typeof v=="string"?" ":")",...u.current()}))),p(),typeof v=="string"&&(p=n.enter(`title${o}`),d+=u.move(" "+l),d+=u.move(n.safe(v,{before:d,after:l,...u.current()})),d+=u.move(l),p()),d+=u.move(")"),h(),d}function sO(e,t,n){return pb(e,n)?"<":"["}_b.peek=lO;function _b(e,t,n,s){const l=e.referenceType,o=n.enter("linkReference");let u=n.enter("label");const h=n.createTracker(s);let p=h.move("[");const d=n.containerPhrasing(e,{before:p,after:"]",...h.current()});p+=h.move(d+"]["),u();const g=n.stack;n.stack=g.filter(function(S){return S!=="phrasing"}),u=n.enter("reference");const _=n.safe(n.associationId(e),{before:p,after:"]",...h.current()});return u(),n.stack=g,o(),l==="full"||!d||d!==_?p+=h.move(_+"]"):l==="shortcut"?p=p.slice(0,-1):p+=h.move("]"),p}function lO(){return"["}function Km(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function aO(e){const t=Km(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function oO(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function gb(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function cO(e,t,n,s){const l=n.enter("list"),o=n.bulletCurrent;let u=e.ordered?oO(n):Km(n);const h=e.ordered?u==="."?")":".":aO(n);let p=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&g&&(!g.children||!g.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(p=!0),gb(n)===u&&g){let _=-1;for(;++_<e.children.length;){const S=e.children[_];if(S&&S.type==="listItem"&&S.children&&S.children[0]&&S.children[0].type==="thematicBreak"){p=!0;break}}}}p&&(u=h),n.bulletCurrent=u;const d=n.containerFlow(e,s);return n.bulletLastUsed=u,n.bulletCurrent=o,l(),d}function uO(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function hO(e,t,n,s){const l=uO(n);let o=n.bulletCurrent||Km(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let u=o.length+1;(l==="tab"||l==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const h=n.createTracker(s);h.move(o+" ".repeat(u-o.length)),h.shift(u);const p=n.enter("listItem"),d=n.indentLines(n.containerFlow(e,h.current()),g);return p(),d;function g(_,S,v){return S?(v?"":" ".repeat(u))+_:(v?o:o+" ".repeat(u-o.length))+_}}function fO(e,t,n,s){const l=n.enter("paragraph"),o=n.enter("phrasing"),u=n.containerPhrasing(e,s);return o(),l(),u}function dO(e,t,n,s){if(!e.children.some(function(h){return ND(h)}))return n.containerFlow(e,s);const o=n.enter("phrasing"),u=n.containerPhrasing(e,s);return o(),u}function pO(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Wm.attention=vb;Wm.peek=mO;function Wm(e,t,n,s){const l=n.enter("phrasing"),o=qm(e,vb,n,n.createTracker(s)),u=cf([o],s.before,s.after);return l(),u}function vb(e,t){return{construct:"strong",markers:pO(t)==="*"?["*","_"]:["_","*"],sizes:[2]}}function mO(e,t,n){return n.options.strong||"*"}function _O(e,t,n,s){const l=t?t.children:[],o=n.indexStack[n.indexStack.length-1];return n.safe(e.value,{...s,afterNode:l[o+1],beforeNode:l[o-1]})}function gO(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function vO(e,t,n){const s=(gb(n)+(n.options.ruleSpaces?" ":"")).repeat(gO(n));return n.options.ruleSpaces?s.slice(0,-1):s}const yb={blockquote:zD,break:_4,code:FD,definition:VD,emphasis:Ym,hardBreak:_4,heading:eO,html:ub,image:hb,imageReference:fb,inlineCode:db,link:mb,linkReference:_b,list:cO,listItem:hO,paragraph:fO,root:dO,strong:Wm,text:_O,thematicBreak:vO};function yO(){return{enter:{table:SO,tableData:v4,tableHeader:v4,tableRow:wO},exit:{codeText:xO,table:bO,tableData:y0,tableHeader:y0,tableRow:y0}}}function SO(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function bO(e){this.exit(e),this.data.inTable=void 0}function wO(e){this.enter({type:"tableRow",children:[]},e)}function y0(e){this.exit(e)}function v4(e){this.enter({type:"tableCell",children:[]},e)}function xO(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,CO));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function CO(e,t){return t==="|"?t:e}function EO(e){const t=e||{},n=t.tableCellPadding,s=t.tablePipeAlign,l=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
56
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:S,table:u,tableCell:p,tableRow:h}};function u(v,w,C,E){return d(g(v,C,E),v.align)}function h(v,w,C,E){const M=_(v,C,E),U=d([M]);return U.slice(0,U.indexOf(`
57
- `))}function p(v,w,C,E){const M=C.enter("tableCell"),U=C.enter("phrasing"),B=C.containerPhrasing(v,{...E,before:o,after:o});return U(),M(),B}function d(v,w){return RD(v,{align:w,alignDelimiters:s,padding:n,stringLength:l})}function g(v,w,C){const E=v.children;let M=-1;const U=[],B=w.enter("table");for(;++M<E.length;)U[M]=_(E[M],w,C);return B(),U}function _(v,w,C){const E=v.children;let M=-1;const U=[],B=w.enter("tableRow");for(;++M<E.length;)U[M]=p(E[M],v,w,C);return B(),U}function S(v,w,C){let E=yb.inlineCode(v,w,C);return C.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function kO(){return{exit:{taskListCheckValueChecked:y4,taskListCheckValueUnchecked:y4,paragraph:MO}}}function TO(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:AO}}}function y4(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function MO(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const s=n.children[0];if(s&&s.type==="text"){const l=t.children;let o=-1,u;for(;++o<l.length;){const h=l[o];if(h.type==="paragraph"){u=h;break}}u===n&&(s.value=s.value.slice(1),s.value.length===0?n.children.shift():n.position&&s.position&&typeof s.position.start.offset=="number"&&(s.position.start.column++,s.position.start.offset++,n.position.start=Object.assign({},s.position.start)))}}this.exit(e)}function AO(e,t,n,s){const l=e.children[0],o=typeof e.checked=="boolean"&&l&&l.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",h=n.createTracker(s);o&&h.move(u);let p=yb.listItem(e,t,n,{...s,...h.current()});return o&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),p;function d(g){return g+u}}function DO(){return[eD(),bD(),ED(),yO(),kO()]}function OO(e){return{extensions:[tD(),wD(e),kD(),EO(e),TO()]}}const RO={tokenize:HO,partial:!0},Sb={tokenize:IO,partial:!0},bb={tokenize:PO,partial:!0},wb={tokenize:FO,partial:!0},LO={tokenize:UO,partial:!0},xb={name:"wwwAutolink",tokenize:BO,previous:Eb},Cb={name:"protocolAutolink",tokenize:jO,previous:kb},fr={name:"emailAutolink",tokenize:zO,previous:Tb},Pn={};function NO(){return{text:Pn}}let zs=48;for(;zs<123;)Pn[zs]=fr,zs++,zs===58?zs=65:zs===91&&(zs=97);Pn[43]=fr;Pn[45]=fr;Pn[46]=fr;Pn[95]=fr;Pn[72]=[fr,Cb];Pn[104]=[fr,Cb];Pn[87]=[fr,xb];Pn[119]=[fr,xb];function zO(e,t,n){const s=this;let l,o;return u;function u(_){return!sp(_)||!Tb.call(s,s.previous)||Gm(s.events)?n(_):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),h(_))}function h(_){return sp(_)?(e.consume(_),h):_===64?(e.consume(_),p):n(_)}function p(_){return _===46?e.check(LO,g,d)(_):_===45||_===95||ri(_)?(o=!0,e.consume(_),p):g(_)}function d(_){return e.consume(_),l=!0,p}function g(_){return o&&l&&ii(s.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(_)):n(_)}}function BO(e,t,n){const s=this;return l;function l(u){return u!==87&&u!==119||!Eb.call(s,s.previous)||Gm(s.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(RO,e.attempt(Sb,e.attempt(bb,o),n),n)(u))}function o(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function jO(e,t,n){const s=this;let l="",o=!1;return u;function u(_){return(_===72||_===104)&&kb.call(s,s.previous)&&!Gm(s.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(_),e.consume(_),h):n(_)}function h(_){if(ii(_)&&l.length<5)return l+=String.fromCodePoint(_),e.consume(_),h;if(_===58){const S=l.toLowerCase();if(S==="http"||S==="https")return e.consume(_),p}return n(_)}function p(_){return _===47?(e.consume(_),o?d:(o=!0,p)):n(_)}function d(_){return _===null||wh(_)||lt(_)||Ks(_)||rf(_)?n(_):e.attempt(Sb,e.attempt(bb,g),n)(_)}function g(_){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(_)}}function HO(e,t,n){let s=0;return l;function l(u){return(u===87||u===119)&&s<3?(s++,e.consume(u),l):u===46&&s===3?(e.consume(u),o):n(u)}function o(u){return u===null?n(u):t(u)}}function IO(e,t,n){let s,l,o;return u;function u(d){return d===46||d===95?e.check(wb,p,h)(d):d===null||lt(d)||Ks(d)||d!==45&&rf(d)?p(d):(o=!0,e.consume(d),u)}function h(d){return d===95?s=!0:(l=s,s=void 0),e.consume(d),u}function p(d){return l||s||!o?n(d):t(d)}}function PO(e,t){let n=0,s=0;return l;function l(u){return u===40?(n++,e.consume(u),l):u===41&&s<n?o(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(wb,t,o)(u):u===null||lt(u)||Ks(u)?t(u):(e.consume(u),l)}function o(u){return u===41&&s++,e.consume(u),l}}function FO(e,t,n){return s;function s(h){return h===33||h===34||h===39||h===41||h===42||h===44||h===46||h===58||h===59||h===63||h===95||h===126?(e.consume(h),s):h===38?(e.consume(h),o):h===93?(e.consume(h),l):h===60||h===null||lt(h)||Ks(h)?t(h):n(h)}function l(h){return h===null||h===40||h===91||lt(h)||Ks(h)?t(h):s(h)}function o(h){return ii(h)?u(h):n(h)}function u(h){return h===59?(e.consume(h),s):ii(h)?(e.consume(h),u):n(h)}}function UO(e,t,n){return s;function s(o){return e.consume(o),l}function l(o){return ri(o)?n(o):t(o)}}function Eb(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||lt(e)}function kb(e){return!ii(e)}function Tb(e){return!(e===47||sp(e))}function sp(e){return e===43||e===45||e===46||e===95||ri(e)}function Gm(e){let t=e.length,n=!1;for(;t--;){const s=e[t][1];if((s.type==="labelLink"||s.type==="labelImage")&&!s._balanced){n=!0;break}if(s._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const VO={tokenize:ZO,partial:!0};function qO(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:WO,continuation:{tokenize:GO},exit:XO}},text:{91:{name:"gfmFootnoteCall",tokenize:KO},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:$O,resolveTo:YO}}}}function $O(e,t,n){const s=this;let l=s.events.length;const o=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let u;for(;l--;){const p=s.events[l][1];if(p.type==="labelImage"){u=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return h;function h(p){if(!u||!u._balanced)return n(p);const d=_n(s.sliceSerialize({start:u.end,end:s.now()}));return d.codePointAt(0)!==94||!o.includes(d.slice(1))?n(p):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),t(p))}}function YO(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const s={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},h=[e[n+1],e[n+2],["enter",s,t],e[n+3],e[n+4],["enter",l,t],["exit",l,t],["enter",o,t],["enter",u,t],["exit",u,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",s,t]];return e.splice(n,e.length-n+1,...h),e}function KO(e,t,n){const s=this,l=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let o=0,u;return h;function h(_){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(_),e.exit("gfmFootnoteCallLabelMarker"),p}function p(_){return _!==94?n(_):(e.enter("gfmFootnoteCallMarker"),e.consume(_),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(_){if(o>999||_===93&&!u||_===null||_===91||lt(_))return n(_);if(_===93){e.exit("chunkString");const S=e.exit("gfmFootnoteCallString");return l.includes(_n(s.sliceSerialize(S)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(_),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(_)}return lt(_)||(u=!0),o++,e.consume(_),_===92?g:d}function g(_){return _===91||_===92||_===93?(e.consume(_),o++,d):d(_)}}function WO(e,t,n){const s=this,l=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let o,u=0,h;return p;function p(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):n(w)}function g(w){if(u>999||w===93&&!h||w===null||w===91||lt(w))return n(w);if(w===93){e.exit("chunkString");const C=e.exit("gfmFootnoteDefinitionLabelString");return o=_n(s.sliceSerialize(C)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),S}return lt(w)||(h=!0),u++,e.consume(w),w===92?_:g}function _(w){return w===91||w===92||w===93?(e.consume(w),u++,g):g(w)}function S(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),l.includes(o)||l.push(o),Ke(e,v,"gfmFootnoteDefinitionWhitespace")):n(w)}function v(w){return t(w)}}function GO(e,t,n){return e.check(cc,t,e.attempt(VO,t,n))}function XO(e){e.exit("gfmFootnoteDefinition")}function ZO(e,t,n){const s=this;return Ke(e,l,"gfmFootnoteDefinitionIndent",5);function l(o){const u=s.events[s.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(o):n(o)}}function QO(e){let n=(e||{}).singleTilde;const s={name:"strikethrough",tokenize:o,resolveAll:l};return n==null&&(n=!0),{text:{126:s},insideSpan:{null:[s]},attentionMarkers:{null:[126]}};function l(u,h){let p=-1;for(;++p<u.length;)if(u[p][0]==="enter"&&u[p][1].type==="strikethroughSequenceTemporary"&&u[p][1]._close){let d=p;for(;d--;)if(u[d][0]==="exit"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._open&&u[p][1].end.offset-u[p][1].start.offset===u[d][1].end.offset-u[d][1].start.offset){u[p][1].type="strikethroughSequence",u[d][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},u[d][1].start),end:Object.assign({},u[p][1].end)},_={type:"strikethroughText",start:Object.assign({},u[d][1].end),end:Object.assign({},u[p][1].start)},S=[["enter",g,h],["enter",u[d][1],h],["exit",u[d][1],h],["enter",_,h]],v=h.parser.constructs.insideSpan.null;v&&mn(S,S.length,0,sf(v,u.slice(d+1,p),h)),mn(S,S.length,0,[["exit",_,h],["enter",u[p][1],h],["exit",u[p][1],h],["exit",g,h]]),mn(u,d-1,p-d+3,S),p=d+S.length-2;break}}for(p=-1;++p<u.length;)u[p][1].type==="strikethroughSequenceTemporary"&&(u[p][1].type="data");return u}function o(u,h,p){const d=this.previous,g=this.events;let _=0;return S;function S(w){return d===126&&g[g.length-1][1].type!=="characterEscape"?p(w):(u.enter("strikethroughSequenceTemporary"),v(w))}function v(w){const C=as(d);if(w===126)return _>1?p(w):(u.consume(w),_++,v);if(_<2&&!n)return p(w);const E=u.exit("strikethroughSequenceTemporary"),M=as(w);return E._open=!M||M===2&&!!C,E._close=!C||C===2&&!!M,h(w)}}}class JO{constructor(){this.map=[],this.index=new Map}add(t,n,s){eR(this,t,n,s)}consume(t){if(this.map.sort(function(o,u){return o[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const s=[];for(;n>0;)n-=1,s.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];s.push(t.slice()),t.length=0;let l=s.pop();for(;l;){for(const o of l)t.push(o);l=s.pop()}this.map.length=0,this.index.clear()}}function eR(e,t,n,s){if(n===0&&s.length===0)return;const l=e.index.get(t);if(l){l[1]+=n,l[2].push(...s);return}const o=[t,n,s];e.map.push(o),e.index.set(t,o)}function tR(e,t){let n=!1;const s=[];for(;t<e.length;){const l=e[t];if(n){if(l[0]==="enter")l[1].type==="tableContent"&&s.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=s.length-1;s[o]=s[o]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return s}function iR(){return{flow:{null:{name:"table",tokenize:nR,resolveAll:rR}}}}function nR(e,t,n){const s=this;let l=0,o=0,u;return h;function h(k){let K=s.events.length-1;for(;K>-1;){const{type:Z}=s.events[K][1];if(Z==="lineEnding"||Z==="linePrefix")K--;else break}const W=K>-1?s.events[K][1].type:null,q=W==="tableHead"||W==="tableRow"?R:p;return q===R&&s.parser.lazy[s.now().line]?n(k):q(k)}function p(k){return e.enter("tableHead"),e.enter("tableRow"),d(k)}function d(k){return k===124||(u=!0,o+=1),g(k)}function g(k){return k===null?n(k):ke(k)?o>1?(o=0,s.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),v):n(k):Ie(k)?Ke(e,g,"whitespace")(k):(o+=1,u&&(u=!1,l+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),u=!0,g):(e.enter("data"),_(k)))}function _(k){return k===null||k===124||lt(k)?(e.exit("data"),g(k)):(e.consume(k),k===92?S:_)}function S(k){return k===92||k===124?(e.consume(k),_):_(k)}function v(k){return s.interrupt=!1,s.parser.lazy[s.now().line]?n(k):(e.enter("tableDelimiterRow"),u=!1,Ie(k)?Ke(e,w,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):w(k))}function w(k){return k===45||k===58?E(k):k===124?(u=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),C):Q(k)}function C(k){return Ie(k)?Ke(e,E,"whitespace")(k):E(k)}function E(k){return k===58?(o+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),M):k===45?(o+=1,M(k)):k===null||ke(k)?X(k):Q(k)}function M(k){return k===45?(e.enter("tableDelimiterFiller"),U(k)):Q(k)}function U(k){return k===45?(e.consume(k),U):k===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),B):(e.exit("tableDelimiterFiller"),B(k))}function B(k){return Ie(k)?Ke(e,X,"whitespace")(k):X(k)}function X(k){return k===124?w(k):k===null||ke(k)?!u||l!==o?Q(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):Q(k)}function Q(k){return n(k)}function R(k){return e.enter("tableRow"),V(k)}function V(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),V):k===null||ke(k)?(e.exit("tableRow"),t(k)):Ie(k)?Ke(e,V,"whitespace")(k):(e.enter("data"),se(k))}function se(k){return k===null||k===124||lt(k)?(e.exit("data"),V(k)):(e.consume(k),k===92?me:se)}function me(k){return k===92||k===124?(e.consume(k),se):se(k)}}function rR(e,t){let n=-1,s=!0,l=0,o=[0,0,0,0],u=[0,0,0,0],h=!1,p=0,d,g,_;const S=new JO;for(;++n<e.length;){const v=e[n],w=v[1];v[0]==="enter"?w.type==="tableHead"?(h=!1,p!==0&&(S4(S,t,p,d,g),g=void 0,p=0),d={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},S.add(n,0,[["enter",d,t]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(s=!0,_=void 0,o=[0,0,0,0],u=[0,n+1,0,0],h&&(h=!1,g={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},S.add(n,0,[["enter",g,t]])),l=w.type==="tableDelimiterRow"?2:g?3:1):l&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(s=!1,u[2]===0&&(o[1]!==0&&(u[0]=u[1],_=Zu(S,t,o,l,void 0,_),o=[0,0,0,0]),u[2]=n)):w.type==="tableCellDivider"&&(s?s=!1:(o[1]!==0&&(u[0]=u[1],_=Zu(S,t,o,l,void 0,_)),o=u,u=[o[1],n,0,0])):w.type==="tableHead"?(h=!0,p=n):w.type==="tableRow"||w.type==="tableDelimiterRow"?(p=n,o[1]!==0?(u[0]=u[1],_=Zu(S,t,o,l,n,_)):u[1]!==0&&(_=Zu(S,t,u,l,n,_)),l=0):l&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(u[3]=n)}for(p!==0&&S4(S,t,p,d,g),S.consume(t.events),n=-1;++n<t.events.length;){const v=t.events[n];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=tR(t.events,n))}return e}function Zu(e,t,n,s,l,o){const u=s===1?"tableHeader":s===2?"tableDelimiter":"tableData",h="tableContent";n[0]!==0&&(o.end=Object.assign({},ea(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const p=ea(t.events,n[1]);if(o={type:u,start:Object.assign({},p),end:Object.assign({},p)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const d=ea(t.events,n[2]),g=ea(t.events,n[3]),_={type:h,start:Object.assign({},d),end:Object.assign({},g)};if(e.add(n[2],0,[["enter",_,t]]),s!==2){const S=t.events[n[2]],v=t.events[n[3]];if(S[1].end=Object.assign({},v[1].end),S[1].type="chunkText",S[1].contentType="text",n[3]>n[2]+1){const w=n[2]+1,C=n[3]-n[2]-1;e.add(w,C,[])}}e.add(n[3]+1,0,[["exit",_,t]])}return l!==void 0&&(o.end=Object.assign({},ea(t.events,l)),e.add(l,0,[["exit",o,t]]),o=void 0),o}function S4(e,t,n,s,l){const o=[],u=ea(t.events,n);l&&(l.end=Object.assign({},u),o.push(["exit",l,t])),s.end=Object.assign({},u),o.push(["exit",s,t]),e.add(n+1,0,o)}function ea(e,t){const n=e[t],s=n[0]==="enter"?"start":"end";return n[1][s]}const sR={name:"tasklistCheck",tokenize:aR};function lR(){return{text:{91:sR}}}function aR(e,t,n){const s=this;return l;function l(p){return s.previous!==null||!s._gfmTasklistFirstContentOfListItem?n(p):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(p),e.exit("taskListCheckMarker"),o)}function o(p){return lt(p)?(e.enter("taskListCheckValueUnchecked"),e.consume(p),e.exit("taskListCheckValueUnchecked"),u):p===88||p===120?(e.enter("taskListCheckValueChecked"),e.consume(p),e.exit("taskListCheckValueChecked"),u):n(p)}function u(p){return p===93?(e.enter("taskListCheckMarker"),e.consume(p),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),h):n(p)}function h(p){return ke(p)?t(p):Ie(p)?e.check({tokenize:oR},t,n)(p):n(p)}}function oR(e,t,n){return Ke(e,s,"whitespace");function s(l){return l===null?n(l):t(l)}}function cR(e){return N6([NO(),qO(),QO(e),iR(),lR()])}const uR={};function hR(e){const t=this,n=e||uR,s=t.data(),l=s.micromarkExtensions||(s.micromarkExtensions=[]),o=s.fromMarkdownExtensions||(s.fromMarkdownExtensions=[]),u=s.toMarkdownExtensions||(s.toMarkdownExtensions=[]);l.push(cR(n)),o.push(DO()),u.push(OO(n))}function Zo(e,t,n=""){if(e==="")return"";const s=e.replace(/\\/g,"/");if(t!==""){const l=`${t.replace(/\\/g,"/").replace(/\/+$/,"")}/`,o=s.toLowerCase(),u=l.toLowerCase();if(o===u.slice(0,-1))return".";if(o.startsWith(u))return s.slice(l.length)}if(n!==""){const l=`${n.replace(/\\/g,"/").replace(/\/+$/,"")}/`,o=s.toLowerCase(),u=l.toLowerCase();if(o===u.slice(0,-1))return"~";if(o.startsWith(u))return`~/${s.slice(l.length)}`}return s}function Mb(e){const t=e.split(/[\\/]/);return t[t.length-1]??e}function Xm(e,t){return/[\\/]$/.test(e)?e+t:`${e}\\${t}`}const Zm=I.createContext({base:"",streaming:!1}),fR=[hR],b4=new Map;function dR({src:e,alt:t}){const{base:n,fsRead:s}=I.useContext(Zm),l=/^(https?:|data:|blob:)/i.test(e),o=l?e:Xm(n,decodeURIComponent(e)),u=l?void 0:b4.get(o),[h,p]=I.useState(l?e:u),[d,g]=I.useState(!1);return I.useEffect(()=>{if(l||h!==void 0||s===void 0)return;let _=!0;return s(o).then(S=>{const v=S;if(_)if(v.kind==="image"&&v.tooLarge!==!0&&v.base64!==void 0){const w=`data:${v.mime};base64,${v.base64}`;b4.set(o,w),p(w)}else g(!0)}).catch(()=>{_&&g(!0)}),()=>{_=!1}},[l,o,s,h]),d||!l&&h===void 0?y.jsxs("span",{className:"file-md-img-missing",children:["[图片:",t||e,"]"]}):y.jsx("img",{src:h,alt:t,loading:"lazy"})}const pR=200,Xl=new Map;function mR(e,t){return t+"\0"+e}function Ab({first:e,children:t}){return y.jsxs(y.Fragment,{children:[e?null:`
58
- `,t]})}function _R(e){return e.split(`
59
- `).map((t,n)=>y.jsx(Ab,{first:n===0,children:y.jsx("span",{className:"line",children:t})},n))}const gR=120;function vR({code:e,lang:t,streaming:n}){const s=mR(e,t),[l,o]=I.useState(()=>{const p=Xl.get(s);return p===void 0?null:{key:s,value:p}}),u=I.useRef(null);I.useEffect(()=>{const p=Xl.get(s);if(p!==void 0){u.current!==s&&(u.current=s,o({key:s,value:p}));return}let d=!0;const g=()=>{pm(e,t).then(S=>{if(!(!d||S===null)){if(Xl.size>=pR){const v=Xl.keys().next().value;v!==void 0&&Xl.delete(v)}Xl.set(s,S),u.current=s,o({key:s,value:S})}}).catch(()=>{})},_=n?window.setTimeout(g,gR):null;return _===null&&g(),()=>{d=!1,_!==null&&window.clearTimeout(_)}},[e,s,t,n]);const h=l!==null&&l.key===s?l.value:null;return y.jsx("div",{className:"file-code-body",children:y.jsx("pre",{className:"shiki",children:y.jsx("code",{children:h===null?_R(e):h.map((p,d)=>y.jsx(Ab,{first:d===0,children:y.jsx("span",{className:"line",children:p.map((g,_)=>y.jsx("span",{style:g.style,children:g.text},_))})},d))})})})}function yR({className:e,children:t,node:n}){const{streaming:s}=I.useContext(Zm),l=/language-([\w-]+)/.exec(e??""),o=String(t??"").replace(/\n$/,"");if(l===null)return y.jsx("code",{className:e,children:t});const u=n?.position?.start?.offset;return y.jsx(vR,{code:o,lang:l[1],streaming:s},u===void 0?void 0:"code:"+String(u))}const SR={img:({src:e,alt:t})=>{const n=typeof e=="string"?e:"";return n===""?y.jsx("span",{className:"file-md-img-missing",children:"[图片]"}):y.jsx(dR,{src:n,alt:t??""})},code:yR,pre:({children:e})=>y.jsx(y.Fragment,{children:e})},Db=I.memo(function({text:t,path:n,fsRead:s,streaming:l=!1}){const o=n.slice(0,Math.max(n.lastIndexOf("/"),n.lastIndexOf("\\"))),u=I.useMemo(()=>({base:o,fsRead:s,streaming:l}),[o,s,l]);return y.jsx(Zm.Provider,{value:u,children:y.jsx("div",{className:"file-md",children:y.jsx(qA,{remarkPlugins:fR,components:SR,children:t})})})}),Qm="这条能力来自桌面外壳的原生桥,浏览器里没有它";function bR(){const e=globalThis.dscNative;if(e===null||typeof e!="object")return null;const t=e;return typeof t.call=="function"?t:null}function Qs(){const e=bR(),t=e?.on;return{available:e!==null,version:e===null?null:typeof e.version=="number"?e.version:I0,invoke(n,s=[]){return e===null?Promise.reject(new Error(Qm)):e.call(n,[...s])},on(n,s){return t===void 0?()=>{}:t(n,s)}}}function Jm(){return I.useMemo(()=>Qs(),[])}const Th=200,Mh=420,Jr=480,e_=80,Ah=300,Dh=820,t_=420;function i_(){return oa("--dsc-jump-lane",36)+oa("--dsc-scrollbar-w",5)}const n_=3200,Lt={sidebarWidth:"dsc.sidebarWidth",sidebarCollapsed:"dsc.uiSidebarCollapsed",threadWidth:"dsc.threadWidth",dockWidth:"dsc.dockWidth",diffPaneWidth:"dsc.diffPaneWidth"},r_=(()=>{const e={};if(typeof window>"u")return e;const t=new URLSearchParams(window.location.search).get("panels");if(t===null)return e;for(const n of t.split(",")){const[s="",l=""]=n.split(":");if(s==="collapsed"){l==="1"&&(e.collapsed=!0);continue}const o=Number(l);Number.isFinite(o)&&(s==="sidebar"||s==="thread"||s==="dock"||s==="diff")&&(e[s]=o)}return e})(),s_={[Lt.sidebarWidth]:"sidebar",[Lt.threadWidth]:"thread",[Lt.dockWidth]:"dock",[Lt.diffPaneWidth]:"diff",[Lt.sidebarCollapsed]:"collapsed"};let ra={...r_},Ob=null;function Oh(e){ra={...e}}function l_(e){Ob=e}function Rb(e,t){const n=s_[e];n!==void 0&&(t===null?delete ra[n]:ra[n]=t,Ob?.({...ra}))}function sa(e,t,n){const s=h=>Number.isFinite(h)&&h>=t&&h<=n;try{const h=localStorage.getItem(e);if(h!==null){const p=Number(h);if(s(p))return p}}catch{}const l=s_[e];if(l===void 0)return null;const o=r_[l];if(typeof o=="number"&&s(o))return o;const u=ra[l];return typeof u=="number"&&s(u)?u:null}function ts(e,t){try{t===null?localStorage.removeItem(e):localStorage.setItem(e,String(t))}catch{}Rb(e,t)}function a_(e){try{const l=localStorage.getItem(e);if(l!==null)return l==="1"}catch{}const t=s_[e];if(t===void 0)return!1;const n=r_[t];if(typeof n=="boolean")return n;const s=ra[t];return typeof s=="boolean"?s:!1}function o_(e,t){try{localStorage.setItem(e,t?"1":"0")}catch{}Rb(e,t)}function Nn(e,t){const n=document.documentElement;t===null?n.style.removeProperty(e):n.style.setProperty(e,t)}function oa(e,t){const n=Number.parseFloat(getComputedStyle(document.documentElement).getPropertyValue(e));return Number.isFinite(n)&&n>0?n:t}function c_(){return oa("--dsc-sidebar-w",237)}function ca(e){const t=I.useRef(0),n=I.useRef(0),s=I.useRef(0),l=I.useRef(!1),o=I.useRef(null),u=I.useRef(e);u.current=e;const h=()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)},p=w=>u.current.clamp(t.current+u.current.sign*(w-n.current)),d=w=>{l.current=!1,h(),w.currentTarget.hasPointerCapture(w.pointerId)&&w.currentTarget.releasePointerCapture(w.pointerId),w.currentTarget.toggleAttribute("data-dragging",!1),document.body.classList.remove("resizing")},g=I.useCallback(w=>{w.button===0&&(w.preventDefault(),w.currentTarget.setPointerCapture(w.pointerId),t.current=u.current.getBase(),n.current=w.clientX,s.current=w.clientX,l.current=!0,w.currentTarget.toggleAttribute("data-dragging",!0),document.body.classList.add("resizing"))},[]),_=I.useCallback(w=>{if(!(!l.current||!w.currentTarget.hasPointerCapture(w.pointerId))){if(s.current=w.clientX,u.current.trackPointerY===!0){const C=w.currentTarget.getBoundingClientRect();w.currentTarget.style.setProperty("--dsc-handle-y",`${w.clientY-C.top}px`)}o.current??=requestAnimationFrame(()=>{o.current=null,u.current.onDrag(p(s.current))})}},[]),S=I.useCallback(w=>{if(!l.current)return;const C=w.clientX!==n.current,E=p(w.clientX);d(w),C&&u.current.onCommit(E)},[]),v=I.useCallback(w=>{l.current&&(d(w),u.current.onDrag(u.current.getBase()))},[]);return{onPointerDown:g,onPointerMove:_,onPointerUp:S,onPointerCancel:v}}const S0=50;function Lb({base64:e}){const[t,n]=I.useState([]),[s,l]=I.useState(0),[o,u]=I.useState(""),h=I.useRef(!1);return I.useEffect(()=>{if(h.current)return;h.current=!0;let p=!0;return(async()=>{const[{getDocument:d,GlobalWorkerOptions:g},_]=await Promise.all([ge(()=>import("./chunk-CUWRgxuq.js"),[],import.meta.url),ge(()=>import("./chunk-Dualf0xi.js"),[],import.meta.url)]);g.workerSrc=_.default;const S=Uint8Array.from(atob(e),C=>C.charCodeAt(0)),v=await d({data:S}).promise;if(!p)return;l(v.numPages);const w=Math.min(v.numPages,S0);for(let C=1;C<=w;C+=1){const E=await v.getPage(C),M=E.getViewport({scale:1.5}),U=document.createElement("canvas");U.width=Math.ceil(M.width),U.height=Math.ceil(M.height);const B=U.getContext("2d");if(await E.render({canvas:U,canvasContext:B,viewport:M}).promise,!p)return;const X=U.toDataURL("image/png");n(Q=>[...Q,X])}})().catch(d=>{p&&u(d instanceof Error?d.message:String(d))}),()=>{p=!1}},[e]),o!==""?y.jsx("div",{className:"file-preview-empty",children:`PDF 解析失败:${o}`}):y.jsxs("div",{className:"file-pdf",children:[t.length===0&&y.jsx("div",{className:"file-preview-empty",children:"渲染中…"}),t.map((p,d)=>y.jsx("img",{className:"file-pdf-page",src:p,alt:`第 ${d+1} 页`},d)),s>S0&&y.jsxs("div",{className:"tree-note","data-tree-note":"truncated",children:["共 ",s," 页,仅渲染前 ",S0," 页"]})]})}const uf="【改动前预览·尚未落盘】",Nb={create:"新建",update:"修改"};function wR(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const xR=new RegExp(`^${wR(uf)}(新建|修改) (.+)(([^()]*))$`);function CR(e){const t=/^\+(\d+) 行 \/ -(\d+) 行$/.exec(e);if(t===null)return null;const n=Number(t[1]),s=Number(t[2]);return Number.isFinite(n)&&Number.isFinite(s)?{added:n,removed:s}:null}function ER(e){return e==="新建"?"create":e==="修改"?"update":null}function u_(e){return e.startsWith("@@")?"hunk":e.startsWith("+")?"add":e.startsWith("-")?"remove":e.startsWith(" ")?"context":e.startsWith("(")||e.startsWith("…")?"note":e===""?"context":"note"}function h_(e){return e.startsWith(uf)}function zb(e){if(!h_(e))return null;const t=e.indexOf(`
60
- `),n=t===-1?e:e.slice(0,t),s=t===-1?"":e.slice(t+1),l=(s===""?[]:s.split(`
61
- `)).map(h=>({kind:u_(h),text:h})),o=xR.exec(n);if(o===null)return{head:n,action:null,path:null,counts:null,countsText:null,lines:l};const u=o[3]??"";return{head:n,action:ER(o[1]??""),path:o[2]??"",counts:CR(u),countsText:u,lines:l}}const kR={create:"新建文件",update:"编辑文件"};function Bb({notice:e,cwd:t}){const n=e.path,[s,l]=I.useState(!1),o=I.useId(),u=e.lines.length>0,h=e.action===null?null:kR[e.action];return y.jsxs("div",{className:"entry-review","data-review-notice":"","data-action":e.action??void 0,"data-open":s,children:[y.jsxs("button",{type:"button",className:"entry-review-head",...u?{"aria-expanded":s,"aria-controls":o}:{"aria-expanded":!1},"data-tip":u?s?"收起这份改动":"展开看改了什么":void 0,onClick:()=>{u&&l(p=>!p)},children:[y.jsx(ac,{name:n??"",size:14,className:"entry-review-icon"}),h===null?null:y.jsx("span",{className:"entry-review-verb",children:h}),y.jsx("span",{className:"entry-review-path",title:n??e.head,children:n===null?e.head:Zo(n,t)}),e.counts!==null?y.jsxs("span",{className:"changes-counts",children:[y.jsx("span",{className:"changes-added",children:`+${String(e.counts.added)} 行`}),y.jsx("span",{className:"changes-removed",children:`-${String(e.counts.removed)} 行`})]}):e.countsText===null||e.countsText===""?null:y.jsx("span",{className:"entry-review-counts",children:e.countsText}),u?y.jsx(Wh,{size:11,className:"entry-review-chevron"}):null]}),u?y.jsx("div",{className:"entry-review-diff",id:o,hidden:!s,children:e.lines.map((p,d)=>y.jsx("div",{className:"entry-review-line","data-kind":p.kind,children:p.text},String(d)))}):null]})}var f_=U5();const TR=da(f_),MR=Yh({__proto__:null,default:TR},[f_]),b0=4;function d_(e){const{value:t,options:n,onPick:s,className:l,disabled:o=!1,ariaLabel:u,displayLabel:h}=e,[p,d]=I.useState(!1),[g,_]=I.useState(0),S=I.useRef(null),v=I.useRef(null),[w,C]=I.useState(null),E=I.useId(),M=n.find(V=>V.value===t),U=h??M?.label??"",B=(V=!0)=>{d(!1),V&&S.current?.focus()},X=()=>{if(o||n.length===0)return;const V=Math.max(0,n.findIndex(se=>se.value===t));_(V),d(!0)};I.useLayoutEffect(()=>{if(!p){C(null);return}const V=S.current,se=v.current;if(V===null||se===null)return;const me=V.getBoundingClientRect(),k=se.offsetHeight,W=me.bottom+b0+k<=window.innerHeight?me.bottom+b0:Math.max(4,me.top-b0-k);C({left:me.left,top:W,width:me.width})},[p]),I.useEffect(()=>{if(!p)return;const V=me=>{const k=me.target instanceof Node?me.target:null;k!==null&&(v.current?.contains(k)===!0||S.current?.contains(k)===!0)||d(!1)},se=me=>{v.current?.contains(me.target)!==!0&&d(!1)};return document.addEventListener("pointerdown",V,!0),document.addEventListener("wheel",se,!0),()=>{document.removeEventListener("pointerdown",V,!0),document.removeEventListener("wheel",se,!0)}},[p]);const Q=V=>{V.value!==t&&s(V.value),B()},R=V=>{if(!p){(V.key==="ArrowDown"||V.key==="ArrowUp"||V.key==="Enter"||V.key===" ")&&(V.preventDefault(),X());return}const se=n.length-1;switch(V.key){case"ArrowDown":V.preventDefault(),_(me=>Math.min(se,me+1));break;case"ArrowUp":V.preventDefault(),_(me=>Math.max(0,me-1));break;case"Home":V.preventDefault(),_(0);break;case"End":V.preventDefault(),_(se);break;case"Enter":V.preventDefault(),n[g]!==void 0&&Q(n[g]);break;case"Escape":V.stopPropagation(),B();break;case"Tab":B(!1);break}};return I.useEffect(()=>{p&&v.current?.querySelector('[data-active="true"]')?.scrollIntoView({block:"nearest"})},[g,p]),y.jsxs(y.Fragment,{children:[y.jsxs("button",{ref:S,type:"button",className:`select-trigger${l!==void 0?` ${l}`:""}`,disabled:o,role:"combobox","aria-expanded":p,"aria-haspopup":"listbox","aria-controls":p?E:void 0,"aria-activedescendant":p?`${E}-${String(g)}`:void 0,"aria-label":u,"data-tip":U,onClick:()=>p?B():X(),onKeyDown:R,children:[y.jsx("span",{className:"select-value",children:U}),y.jsx(Wh,{size:14,className:"select-chevron"})]}),p&&f_.createPortal(y.jsx("div",{ref:v,id:E,className:"select-pop",role:"listbox",style:w===null?{visibility:"hidden"}:{left:`${String(w.left)}px`,top:`${String(w.top)}px`,minWidth:`${String(w.width)}px`},children:n.map((V,se)=>{const me=V.value===t;return y.jsxs("button",{type:"button",id:`${E}-${String(se)}`,role:"option",className:"select-opt","data-selected":me||void 0,"data-active":se===g||void 0,"aria-selected":me,onPointerEnter:()=>_(se),onClick:()=>Q(V),children:[y.jsx("span",{className:"select-opt-label",children:V.label}),me&&y.jsx(lm,{size:14,className:"select-opt-check"})]},V.value)})}),document.body)]})}const lp=500,ap=100;function Rh({message:e}){return y.jsx("div",{className:"file-preview-empty",children:e})}function AR(e){const t=e.length>lp||e.some(o=>o.length>ap),n=e.slice(0,lp).map(o=>o.slice(0,ap)),[s,...l]=n;return{head:s,body:l,truncated:t}}function jb({rows:e,lead:t}){const{head:n,body:s,truncated:l}=AR(e);return y.jsxs("div",{className:"file-table-wrap",children:[t,l&&y.jsxs("div",{className:"tree-note","data-tree-note":"truncated",children:["表格较大,仅显示前 ",lp," 行 × ",ap," 列"]}),y.jsxs("table",{className:"file-table",children:[n!==void 0&&y.jsx("thead",{children:y.jsx("tr",{children:n.map((o,u)=>y.jsx("th",{children:o},u))})}),y.jsx("tbody",{children:s.map((o,u)=>y.jsx("tr",{children:o.map((h,p)=>y.jsx("td",{children:h},p))},u))})]})]})}function Hb({text:e,path:t}){const[n,s]=I.useState(null),[l,o]=I.useState("");return I.useEffect(()=>{let u=!0;return s(null),o(""),ge(()=>import("./chunk-Cq7xGE-D.js").then(h=>h.p),[],import.meta.url).then(h=>{const p=h.parse(e.replace(/\r\n/g,`
62
- `),{delimiter:t.toLowerCase().endsWith(".tsv")?" ":void 0});u&&s(p.data)}).catch(h=>{u&&o(h instanceof Error?h.message:String(h))}),()=>{u=!1}},[e,t]),l!==""?y.jsx(Rh,{message:`解析失败:${l}`}):n===null?y.jsx(Rh,{message:"解析中…"}):y.jsx(jb,{rows:n})}function Ib({base64:e}){const[t,n]=I.useState(null),[s,l]=I.useState(0),[o,u]=I.useState([]),[h,p]=I.useState(""),d=I.useRef(null),g=v=>{ge(()=>import("./chunk-YQ4lDkt_.js"),[],import.meta.url).then(w=>{const C=d.current,E=C?.Sheets[C.SheetNames[v]??""];E!==void 0&&u(w.utils.sheet_to_json(E,{header:1,raw:!1,defval:""}).map(M=>M.map(U=>String(U??""))))})};I.useEffect(()=>{let v=!0;n(null),p(""),l(0);const w=Uint8Array.from(atob(e),C=>C.charCodeAt(0));return ge(()=>import("./chunk-YQ4lDkt_.js"),[],import.meta.url).then(C=>{const E=C.read(w,{type:"array"});v&&(d.current=E,n(E.SheetNames),g(0))}).catch(C=>{v&&p(C instanceof Error?C.message:String(C))}),()=>{v=!1}},[e]);const _=v=>{l(v),p(""),g(v)};if(h!=="")return y.jsx(Rh,{message:`解析失败:${h}`});if(t===null)return y.jsx(Rh,{message:"解析中…"});const S=t.length>1?y.jsx("div",{className:"file-sheets",children:t.map((v,w)=>y.jsx("button",{type:"button",className:`file-sheet${w===s?" on":""}`,onClick:()=>_(w),children:v},v))}):void 0;return y.jsx(jb,{rows:o,lead:S})}const DR="--dsc-thread-col-start",OR="--dsc-thread-col-end";function p_(e){const t=_=>{const S=n.current?.parentElement??null;if(S===null)return Jr;const v=Math.max(Jr,S.clientWidth-e_-i_());if(_===null){const w=S.querySelector(".chat-inner");return Math.min(Math.max(w?.offsetWidth??Jr,Jr),v)}return Math.min(Math.max(_,Jr),v)},n=I.useRef(null),s=I.useCallback(()=>n.current?.parentElement??null,[]),l=I.useCallback(()=>{const _=s();if(_===null)return;const S=_.querySelector(".chat-inner");if(S===null)return;const v=_.getBoundingClientRect(),w=S.getBoundingClientRect();_.style.setProperty(DR,`${String(w.left-v.left)}px`),_.style.setProperty(OR,`${String(w.right-v.left)}px`)},[s]);I.useLayoutEffect(()=>{l();const _=s();if(_===null)return;const S=new ResizeObserver(l);S.observe(_);const v=_.querySelector(".chat-inner");v!==null&&S.observe(v);const w=new MutationObserver(l);return w.observe(document.documentElement,{attributeFilter:["style"],attributes:!0}),window.addEventListener("resize",l),()=>{S.disconnect(),w.disconnect(),window.removeEventListener("resize",l)}},[l,s,e.width]);const o=I.useCallback(()=>t(e.width),[e.width]),u=I.useCallback(_=>t(_),[e.width]),h=I.useCallback(_=>{Nn("--dsc-thread-user-max",`${_}px`),l()},[l]),p={getBase:o,clamp:u,onDrag:h,trackPointerY:!0},d=ca({...p,sign:-2,onCommit:e.onCommit}),g=ca({...p,sign:2,onCommit:e.onCommit});return y.jsxs(y.Fragment,{children:[y.jsx("div",{ref:n,className:"thread-handle","data-side":"left","data-tip":"拖拽调整正文宽度,双击复位",onPointerDown:d.onPointerDown,onPointerMove:d.onPointerMove,onPointerUp:d.onPointerUp,onPointerCancel:d.onPointerCancel,onDoubleClick:e.onReset}),y.jsx("div",{className:"thread-handle","data-side":"right","data-tip":"拖拽调整正文宽度,双击复位",onPointerDown:g.onPointerDown,onPointerMove:g.onPointerMove,onPointerUp:g.onPointerUp,onPointerCancel:g.onPointerCancel,onDoubleClick:e.onReset})]})}function Pb(e){if(e===void 0)return null;const t=e.ts;return typeof t=="number"&&Number.isFinite(t)&&t>0?t:null}function Fb(e){if(e===null||!Number.isFinite(e)||e<=0)return null;const t=new Date(e);return Number.isNaN(t.getTime())?null:`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`}function Ub(e){if(e===null||!Number.isFinite(e)||e<=0)return null;const t=new Date(e);if(Number.isNaN(t.getTime()))return null;const n=s=>String(s).padStart(2,"0");return`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`}function Vb(e){if(e===null||!Number.isFinite(e)||e<0)return null;const t=Math.max(1,Math.round(e/1e3)),n=t%60,s=Math.floor(t/60)%60,l=Math.floor(t/3600),o=u=>String(u).padStart(2,"0");return l>0?`${String(l)}时${o(s)}分${o(n)}秒`:s>0?`${String(s)}分${String(n)}秒`:`${String(n)}秒`}function qb(e){if(e==null||!Number.isFinite(e)||e<0)return null;const t=Math.round(e/100)/10;if(t<60)return`${t.toFixed(1)}s`;const n=Math.round(e/1e3),s=h=>String(h).padStart(2,"0"),l=n%60,o=Math.floor(n/60)%60,u=Math.floor(n/3600);return u>0?`${String(u)}h${s(o)}m`:`${String(o)}m${s(l)}s`}const RR=2200,LR=6e3,NR=4,zR=200,BR='<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="8" cy="8" r="6.5"/><path d="M5.2 8.2 7.1 10.1 10.8 6"/></svg>',jR='<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true"><circle cx="8" cy="8" r="6.5"/><path d="M8 4.8v4"/><path d="M8 11.4h.01"/></svg>';let lr=null;function HR(){return lr!==null&&lr.isConnected||(lr=document.createElement("div"),lr.className="dsc-toasts",lr.setAttribute("role","status"),lr.setAttribute("aria-live","polite"),document.body.appendChild(lr)),lr}function w4(e){e.dataset.leaving!=="1"&&(e.dataset.leaving="1",e.style.transition="opacity var(--dsc-dur) var(--dsc-ease), transform var(--dsc-dur) var(--dsc-ease)",e.style.opacity="0",e.style.transform="translateY(4px)",window.setTimeout(()=>e.remove(),zR))}function $b(e,t,n,s){const l=HR();for(;l.children.length>=NR;){const h=l.firstElementChild;if(h===null||h.dataset.tone==="danger"&&e==="success")break;h.remove()}const o=document.createElement("div");o.className="dsc-toast",o.dataset.tone=e,o.innerHTML=`${e==="success"?BR:jR}<span class="dsc-toast__text"></span>`;const u=o.querySelector(".dsc-toast__text");if(u!==null&&(u.textContent=t),s){const h=document.createElement("button");h.className="dsc-toast__close",h.type="button",h.setAttribute("data-tip","关闭这条提示"),h.setAttribute("aria-label","关闭这条提示"),h.innerHTML='<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true"><path d="M4.5 4.5 11.5 11.5"/><path d="M11.5 4.5 4.5 11.5"/></svg>',h.addEventListener("click",()=>w4(o)),o.appendChild(h)}l.appendChild(o),window.setTimeout(()=>w4(o),n)}function Yb(e){$b("success",e,RR,!1)}function m_(e){$b("danger",e,LR,!0)}function Lh(e){const t=e>=100?e.toFixed(0):e.toFixed(1);return t.endsWith(".0")?t.slice(0,-2):t}function Kb(e){return!Number.isFinite(e)||e<=0?"0":e<1e3?String(Math.round(e)):e<1e6?`${Lh(e/1e3)}K`:`${Lh(e/1e6)}M`}function Wb(e){return!Number.isFinite(e)||e<=0?"¥0.00":e<.005?"<¥0.01":`¥${e.toFixed(2)}`}const __={write:["content"],edit:["old","new"],str_replace_editor:["file_text","old_str","new_str"],apply_patch:["patch","content"]};function IR(e){return e.replace(/\s+/g," ").trim()}function Gb(e,t){const n=__[typeof e=="string"?e.toLowerCase():""];if(n===void 0)return{mutating:!1,fields:[],omitted:[]};let s;try{s=JSON.parse(t)}catch{return{mutating:!0,fields:[],omitted:[]}}if(s===null||typeof s!="object"||Array.isArray(s))return{mutating:!0,fields:[],omitted:[]};const l=[],o=[];for(const[u,h]of Object.entries(s)){if(n.includes(u)){o.push(u);continue}const p=typeof h=="string"?h:JSON.stringify(h)??String(h);l.push({key:u,value:IR(p)})}return{mutating:!0,fields:l,omitted:o}}const g_={bash:["command","description"],shell:["command","description"],pwsh:["command","description"],read:["file_path","path"],read_file:["file_path","path"],read_image:["file_path","path"],write:["file_path","path"],edit:["file_path","path"],glob:["pattern","path"],grep:["pattern","path"],webfetch:["url"],fetch:["url"],web_search:["query"],session_search:["query"],run_code:["code"],ask_user:["question","prompt"],ask_user_question:["question","prompt"],skill:["name"],task:["description","prompt"],subagent:["description","prompt"]},v_=["file_path","path","command","pattern","query","url","description"];function Vo(e,t){const n=e.replace(/\s+/g," ").trim(),s=Array.from(n);return s.length>t?`${s.slice(0,t).join("")}…`:n}function y_(e){try{return new URL(e).host}catch{return e}}function PR(e){for(const t of e.split(`
63
- `)){const n=t.trim().replace(/^\/\/\s*/,"");if(n!=="")return n}return""}function Xb(e,t){let n;try{n=JSON.parse(t)}catch{return Vo(t,72)}if(typeof n!="object"||n===null)return"";const s=n,l=g_[e]??v_,o=[];for(const u of l){const h=s[u];if(typeof h!="string"||h==="")continue;const p=u==="url"?y_(h):u==="code"?PR(h):h;if(p!==""&&(o.push(Vo(p,48)),o.length===2))break}return Vo(o.join(" · "),72)}const Zb={preparing:"准备中",running:"进行中",done:"完成",failed:"失败",rejected:"被拒"},S_={bash:{verb:"运行命令",Icon:rs},shell:{verb:"运行命令",Icon:rs},run_code:{verb:"运行代码",Icon:Zh},pwsh:{verb:"运行命令",Icon:rs},read_image:{verb:"读取图片",Icon:ns},web_search:{verb:"搜索网页",Icon:aa},session_search:{verb:"搜索会话",Icon:Qr},todo_write:{verb:"更新计划",Icon:yh},ask_user:{verb:"提问",Icon:gh},ask_user_question:{verb:"提问",Icon:gh},skill:{verb:"读取技能",Icon:la},subagent:{verb:"子智能体",Icon:Qh},exit_plan_mode:{verb:"提交计划",Icon:yh},read:{verb:"读取",Icon:ns},read_file:{verb:"读取",Icon:ns},write:{verb:"写入",Icon:vh},edit:{verb:"编辑",Icon:vh},glob:{verb:"查找文件",Icon:Qr},grep:{verb:"搜索文件内容",Icon:Qr},webfetch:{verb:"网页获取",Icon:Qr},fetch:{verb:"网页获取",Icon:Qr},task:{verb:"子智能体",Icon:la}},b_=Zh,w_="工具调用";function Qb(e){const t=S_[e];return t!==void 0?{Icon:t.Icon,known:!0,base:t.verb}:{Icon:b_,known:!1,base:w_}}function Jb(e,t){return e}function e8(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}const FR=Object.freeze(Object.defineProperty({__proto__:null,CODE_FILE_ARTWORK:Sm,CODE_FILE_ICON_ID_TOKEN:ym,CODE_FILE_TYPES:bm,COMPLETION_SOUND_VARIANTS:_m,CodeFileIcon:km,CodeView:u6,CsvView:Hb,DEFAULT_FIELDS:v_,DOCK_DEFAULT_WIDTH:t_,DOCK_MAX_WIDTH:Dh,DOCK_MIN_WIDTH:Ah,DiffRows:vm,FileIcon:ac,FileTypeIcon:Em,IconActivity:BS,IconArchive:DS,IconArchiveOff:zS,IconArrowRight:aS,IconArrowUp:lS,IconBolt:om,IconBrain:wS,IconBranch:Xh,IconCalendar:NS,IconChart:RS,IconCheck:lm,IconChevronDown:Wh,IconChevronLeft:_h,IconChevronRight:rS,IconChevronUp:sS,IconCircle:_S,IconClock:fS,IconClose:CS,IconCode:Zh,IconCoins:vS,IconCopy:uS,IconCopyColor:KS,IconDatabase:jS,IconDiff:kS,IconEdit:vh,IconExpand:oS,IconFlatList:LS,IconFolder:ns,IconFolderColor:VS,IconFolderOpen:nS,IconFolderOpenColor:qS,IconGear:am,IconGlobe:aa,IconInfo:gh,IconKey:TS,IconLayers:SS,IconMore:MS,IconNewChat:FS,IconPackage:bS,IconPhone:yS,IconPin:OS,IconPlus:sm,IconPuzzle:Gh,IconQueue:yh,IconRefresh:pS,IconRestart:mS,IconSearch:Qr,IconShield:dS,IconSidebar:qs,IconSort:AS,IconSpark:la,IconStop:cS,IconStore:xS,IconSwap:hS,IconTarget:gS,IconTerminal:rs,IconTerminalColor:$S,IconThumbDown:IS,IconThumbUp:HS,IconTrash:ES,IconTree:Qh,IconTriangleRightFill:PS,IconVSCodeColor:YS,KNOWN_TOOLS:S_,LoadingStatus:XS,MUTATION_CONTENT_FIELDS:__,MarkdownView:Db,NATIVE_UNAVAILABLE:Qm,NO_ENTRIES:Jh,NO_SESSIONS:um,PANEL_KEYS:Lt,PdfView:Lb,REVIEW_ACTION_TEXT:Nb,REVIEW_NOTICE_BANNER:uf,ReviewNoticeCard:Bb,SHIKI_LANG_BY_EXT:hm,SIDEBAR_MAX:Mh,SIDEBAR_MIN:Th,STORED_MAX:n_,SUMMARY_FIELDS:g_,Select:d_,Skeleton:cm,SkeletonText:GS,THREAD_EDGE_BUDGET:e_,THREAD_MIN:Jr,TOOL_STATUS_TEXT:Zb,Text:o6,ThreadResizer:p_,UNKNOWN_TOOL_ICON:b_,UNKNOWN_TOOL_TITLE:w_,XlsxView:Ib,averageTtftMs:J5,baseNameOf:Mb,basename:lc,classifyCodeFileType:Cm,classifyFileType:nf,confirmAction:p6,createSignal:pa,displayPathOf:Zo,entryTs:Pb,errText:Z5,fileExtension:wm,fileIconName:v6,findLast:h6,formatBytes:ZS,formatClock:Fb,formatClockSeconds:Ub,formatCostCny:Wb,formatDuration:Vb,formatTokens:Kb,formatTokensPerSecond:eS,formatTraceDuration:qb,getHighlighter:ma,getHostNative:Qs,highlightLines:mm,highlightToHtml:dm,highlightToLines:pm,humanErrorLine:l6,humanErrorText:a6,humanizeError:ef,iconSizeStyle:rm,isCodeFileType:xm,isReviewNotice:h_,joinPath:Xm,langForPath:tf,loadLang:sc,matchTool:Qb,oneLine:Vo,parseReviewNotice:zb,parseUnifiedDiff:nm,playCompletionSound:d6,prettyJson:e8,primePanelGeometry:Oh,readCompactingSince:i6,readCssColor:Sh,readCssSolidColor:_6,readCssValue:m6,readCwd:QS,readEntries:n6,readLive:r6,readRightRailPx:i_,readRootPx:oa,readSessionId:s6,readSessionPath:e6,readSessions:JS,readSidebarDefaultPx:c_,readStoredFlag:a_,readStoredPx:sa,readTurnState:t6,reviewLineKindOf:u_,sameGitSurface:tS,setPanelGeometrySaver:l_,setRootVar:Nn,shortUrl:y_,splitUnifiedDiffByFile:iS,toHexColor:gm,toastErr:m_,toastOk:Yb,tokensPerSecond:Q5,toolArgFields:Gb,toolSummary:Xb,toolVerb:Jb,trimZero:Lh,useDialogFocus:WS,useHostNative:Jm,useHoverDelay:y6,useWidthDrag:ca,writeStoredFlag:o_,writeStoredPx:ts},Symbol.toStringTag,{value:"Module"})),UR=["files","git"],VR=10,t8=.2,i8=.8;let x4=0;function n8(){return x4+=1,`t${Date.now().toString(36)}${x4.toString(36)}${Math.floor(Math.random()*1296).toString(36)}`}function op(){return`p${n8()}`}function ln(e,t,n){const s=n===void 0||n===""?n8():n;return t===void 0?{id:s,kind:e}:{id:s,kind:e,path:t}}function x_(){const e=ln("guide"),t={id:op(),tabs:[e],activeTabId:e.id};return{panes:[t],activePaneId:t.id,fraction:.5,expanded:!1,mode:"push"}}function Js(e,t){return e.panes.find(n=>n.id===t)}function us(e){return Js(e,e.activePaneId)??e.panes[0]}function r8(e){return!e.tabs.some(t=>t.kind==="guide")}function C_(e,t,n){const s=Js(e,n?.paneId??e.activePaneId)??us(e);if(UR.includes(t)){const h=e.panes.flatMap(p=>p.tabs).find(p=>p.kind===t);if(h!==void 0)return ur(e,h.id)}if(n?.replaceGuide===!0){const h=s.tabs.findIndex(g=>g.kind==="guide");if(h===-1)return e;const p=ln(t),d=s.tabs.map((g,_)=>_===h?p:g);return pi(e,s.id,{...s,tabs:d,activeTabId:p.id})}const l=s.tabs.find(h=>h.kind==="guide");if(t==="guide"&&l!==void 0)return ur(e,l.id);const o=ln(t),u=[...s.tabs,o];return pi(e,s.id,{...s,tabs:u,activeTabId:o.id})}function s8(e,t,n){const s=n===void 0?{}:{line:n},l=e.panes.flatMap(d=>d.tabs).find(d=>d.kind==="preview"&&d.path===t);if(l!==void 0){const d=ur(e,l.id);return n===void 0?d:{...d,panes:d.panes.map(g=>({...g,tabs:g.tabs.map(_=>_.id===l.id?{..._,line:n}:_)}))}}const o=us(e);let u=[...o.tabs];const h=u.filter(d=>d.kind==="preview");if(h.length>=VR){const d=h[0];u=u.filter(g=>g.id!==d.id)}const p={...ln("preview",t),...s};return u=[...u,p],pi(e,o.id,{...o,tabs:u,activeTabId:p.id})}function l8(e,t){const n=e.panes.flatMap(o=>o.tabs).find(o=>o.kind==="patch"&&o.path===t);if(n!==void 0)return ur(e,n.id);const s=us(e),l=ln("patch",t);return pi(e,s.id,{...s,tabs:[...s.tabs,l],activeTabId:l.id})}function a8(e,t,n){const s=e.panes.flatMap(u=>u.tabs).find(u=>u.kind==="subagent"&&u.path===t);if(s!==void 0){const u=ur(e,s.id);return n===void 0?u:{...u,panes:u.panes.map(h=>({...h,tabs:h.tabs.map(p=>p.id===s.id?{...p,label:n}:p)}))}}const l=us(e),o={...ln("subagent",t),...n===void 0?{}:{label:n}};return pi(e,l.id,{...l,tabs:[...l.tabs,o],activeTabId:o.id})}function o8(e,t,n){const s=e.panes.flatMap(u=>u.tabs).find(u=>u.kind==="work-output"&&u.path===t);if(s!==void 0){const u=ur(e,s.id);return n===void 0?u:{...u,panes:u.panes.map(h=>({...h,tabs:h.tabs.map(p=>p.id===s.id?{...p,label:n}:p)}))}}const l=us(e),o={...ln("work-output",t),...n===void 0?{}:{label:n}};return pi(e,l.id,{...l,tabs:[...l.tabs,o],activeTabId:o.id})}function c8(e,t,n,s){if(s!==void 0&&s!==""){const u=e.panes.flatMap(h=>h.tabs).find(h=>h.id===s);if(u!==void 0)return ur(e,u.id)}const l=us(e),o={...ln("browser",t===void 0||t===""?void 0:t,s),...n===void 0||n===""?{}:{label:n}};return pi(e,l.id,{...l,tabs:[...l.tabs,o],activeTabId:o.id})}function u8(e,t,n){const s=e.panes.find(p=>p.tabs.some(d=>d.id===t));if(s===void 0)return e;const l=s.tabs.find(p=>p.id===t),o=n.label===void 0||n.label===""?l.label:n.label,u=n.path===void 0||n.path===""?l.path:n.path;if(o===l.label&&u===l.path)return e;const h={...l,...o===void 0?{}:{label:o},...u===void 0?{}:{path:u}};return pi(e,s.id,{...s,tabs:s.tabs.map(p=>p.id===t?h:p)})}function qR(e,t){return e.panes.find(n=>n.tabs.some(s=>s.id===t))?.id}function pi(e,t,n){return{...e,panes:e.panes.map(s=>s.id===t?n:s)}}function h8(e,t){const n=e.panes.find(p=>p.tabs.some(d=>d.id===t));if(n===void 0)return e;const s=n.tabs.findIndex(p=>p.id===t),l=n.tabs.filter(p=>p.id!==t),o=e.panes.reduce((p,d)=>p+d.tabs.length,0)===1;if(l.length===0){const p=ln("guide"),d=pi(e,n.id,{...n,tabs:[p],activeTabId:p.id});return o?Ln(d,!1):d}const u=n.activeTabId===t?(l[s]??l[l.length-1]).id:n.activeTabId,h=pi(e,n.id,{...n,tabs:l,activeTabId:u});return o?Ln(h,!1):h}function ur(e,t){const n=qR(e,t);return n===void 0?e:{...pi({...e,activePaneId:n},n,{...Js(e,n),activeTabId:t})}}function f8(e,t){return Js(e,t)===void 0?e:{...e,activePaneId:t}}function d8(e,t){if(e.panes.length>=2)return e;const n=Js(e,t??e.activePaneId)??us(e);if(n.tabs.length<=1&&n.tabs[0]?.kind==="guide")return e;const s=n.tabs.filter(h=>h.id!==n.activeTabId),l=n.tabs.find(h=>h.id===n.activeTabId)??n.tabs[0];if(s.length===0){const h=ln("guide"),p={...n,tabs:[h],activeTabId:h.id},d={id:op(),tabs:[l],activeTabId:l.id};return{...e,panes:[p,d],activePaneId:d.id}}const o={...n,tabs:s,activeTabId:s[s.length-1].id},u={id:op(),tabs:[l],activeTabId:l.id};return{...e,panes:[o,u],activePaneId:u.id}}function p8(e){if(e.panes.length<2)return e;const[t,n]=e.panes,s=t.tabs.some(u=>u.kind==="guide")?n.tabs.filter(u=>u.kind!=="guide"):n.tabs,l=[...t.tabs,...s],o={id:t.id,tabs:l,activeTabId:l.some(u=>u.id===t.activeTabId)?t.activeTabId:(l.find(u=>u.id===n.activeTabId)??l[0]).id};return{...e,panes:[o],activePaneId:o.id,fraction:.5}}function m8(e,t,n,s){const l=e.panes.find(_=>_.tabs.some(S=>S.id===t)),o=Js(e,n);if(l===void 0||o===void 0)return e;const u=l.tabs.find(_=>_.id===t);if(l.id===o.id){const _=l.tabs.filter(w=>w.id!==t),S=Math.max(0,Math.min(s??_.length,_.length)),v=[..._.slice(0,S),u,..._.slice(S)];return pi(e,o.id,{...o,tabs:v,activeTabId:t})}const h=l.tabs.filter(_=>_.id!==t),p=Math.max(0,Math.min(s??o.tabs.length,o.tabs.length)),d=[...o.tabs.slice(0,p),u,...o.tabs.slice(p)];let g=pi({...e,activePaneId:o.id},o.id,{...o,tabs:d,activeTabId:t});if(h.length===0){const _=ln("guide");g=pi(g,l.id,{...l,tabs:[_],activeTabId:_.id})}else g=pi(g,l.id,{...l,tabs:h,activeTabId:l.activeTabId===t?h[Math.max(0,l.tabs.findIndex(_=>_.id===t)-1)].id:l.activeTabId});return g}function Ln(e,t){return{...e,expanded:t}}function _8(e){return{...e,mode:e.mode==="push"?"fullscreen":"push"}}function g8(e,t){return Number.isFinite(t)?{...e,fraction:Math.min(i8,Math.max(t8,t))}:e}const v8="dsc.dock.surfaces",C4=30;function $R(e){if(typeof e!="object"||e===null)return null;const t=e;if(!Array.isArray(t.panes)||t.panes.length===0||t.panes.length>2)return null;const n=[];for(const s of t.panes){const l=s;if(!Array.isArray(l.tabs)||l.tabs.length===0)return null;const o=[];for(const u of l.tabs){const h=u;if(typeof h?.id!="string"||typeof h?.kind!="string"||!["guide","terminal","browser","files","git","preview","patch","subagent","work-output"].includes(h.kind))return null;if(h.kind==="preview"){if(typeof h.path!="string"||h.path==="")return null;o.push({id:h.id,kind:"preview",path:h.path,...typeof h.line=="number"?{line:h.line}:{}})}else if(h.kind==="patch"){if(typeof h.path!="string"||h.path==="")return null;o.push({id:h.id,kind:"patch",path:h.path})}else if(h.kind==="subagent"){if(typeof h.path!="string"||h.path==="")return null;o.push({id:h.id,kind:"subagent",path:h.path,...typeof h.label=="string"&&h.label!==""?{label:h.label}:{}})}else if(h.kind==="work-output"){if(typeof h.path!="string"||h.path==="")return null;o.push({id:h.id,kind:"work-output",path:h.path,...typeof h.label=="string"&&h.label!==""?{label:h.label}:{}})}else h.kind==="browser"?o.push({id:h.id,kind:"browser",...typeof h.path=="string"&&h.path!==""?{path:h.path}:{},...typeof h.label=="string"&&h.label!==""?{label:h.label}:{}}):o.push({id:h.id,kind:h.kind})}if(typeof l.id!="string"||typeof l.activeTabId!="string"||!o.some(u=>u.id===l.activeTabId))return null;n.push({id:l.id,tabs:o,activeTabId:l.activeTabId})}return typeof t.activePaneId!="string"||!n.some(s=>s.id===t.activePaneId)?null:{panes:n,activePaneId:t.activePaneId,fraction:typeof t.fraction=="number"&&Number.isFinite(t.fraction)?Math.min(i8,Math.max(t8,t.fraction)):.5,expanded:t.expanded===!0,mode:t.mode==="fullscreen"?"fullscreen":"push"}}function y8(){try{const e=localStorage.getItem(v8);if(e===null)return{};const t=JSON.parse(e),n={};for(const[s,l]of Object.entries(t)){const o=$R(l);o!==null&&(n[s]=o)}return n}catch{return{}}}function S8(e){try{const t=Object.keys(e),n=t.length<=C4?e:Object.fromEntries(t.slice(t.length-C4).map(s=>[s,e[s]]));localStorage.setItem(v8,JSON.stringify(n))}catch{}}let qo=y8(),cp="",ss=qo[""]??x_();const Ws=pa(0);function b8(e){e!==cp&&(cp=e,ss=qo[e]??x_(),Ws.notify())}function ti(e){const t=e(ss);t!==ss&&(ss=t,qo={...qo,[cp]:t},S8(qo),Ws.notify())}function va(e){return Ws.subscribe(e)}function Nh(){return ss}const Hn={openTab:(e,t)=>{ti(n=>C_(n,e,t))},openPreview:(e,t)=>{ti(n=>Ln(s8(n,e,t),!0))},openBrowserTab:(e,t,n)=>{ti(s=>Ln(c8(s,e,t,n),!0))},setTabInfo:(e,t)=>{ti(n=>u8(n,e,t))},openPatch:e=>{ti(t=>Ln(l8(t,e),!0))},openSubagent:(e,t)=>{ti(n=>Ln(a8(n,e,t),!0))},openWorkOutput:(e,t)=>{ti(n=>Ln(o8(n,e,t),!0))},closeTab:e=>{ti(t=>h8(t,e))},focusTab:e=>{ti(t=>ur(t,e))},focusPane:e=>{ti(t=>f8(t,e))},splitPane:e=>{ti(t=>d8(t,e))},unsplit:()=>{ti(e=>p8(e))},placeTab:(e,t)=>{ti(n=>m8(n,e,t))},setExpanded:e=>{ti(t=>Ln(t,e))},toggleMode:()=>{ti(e=>_8(e))},setFraction:e=>{ti(t=>g8(t,e))}};function $o(e){ti(t=>Ln(C_(t,e,{replaceGuide:!0}),!0))}function E_(e,t){Hn.openBrowserTab(e,void 0,t)}const zh=new Map;let w8=[];function E4(){w8=[...zh.values()]}function x8(e){return zh.set(e.kind,e),E4(),Ws.notify(),()=>{zh.delete(e.kind),E4(),Ws.notify()}}function YR(){return w8}function C8(e){return zh.get(e)}function E8(e){if(e.patch!==void 0){k8.set(e.path,e.patch),Ws.notify(),Hn.openPatch(e.path);return}Hn.openPreview(e.path)}const k8=new Map;function T8(e){return I.useSyncExternalStore(va,()=>k8.get(e)??null,()=>null)}function M8(e){Hn.openSubagent(e.path,e.label)}function A8(e){Hn.openWorkOutput(e.id,e.label)}let D8=null;function O8(){return D8}function k_(e){D8=e,Ws.notify()}function hc(){return I.useSyncExternalStore(va,Nh,Nh)}function hf(){return I.useSyncExternalStore(va,O8,()=>null)}function R8(){return I.useSyncExternalStore(va,()=>{const e=ss.panes.find(n=>n.id===ss.activePaneId)??ss.panes[0],t=e?.tabs.find(n=>n.id===e.activeTabId);return t?.kind==="preview"&&t.path!==void 0?t.path:null},()=>null)}const k4=768,KR=480;function WR(){const e=document.querySelector(".sidebar");return e instanceof HTMLElement?e.getBoundingClientRect().width:0}function GR(){const e=window.innerWidth-WR()-KR;return Math.min(820,Math.max(300,e))}const XR={guide:{title:"开始",icon:aa},terminal:{title:"终端",icon:rs},browser:{title:"浏览器",icon:aa},files:{title:"文件",icon:ns},git:{title:"Git",icon:Xh},subagent:{title:"子智能体",icon:Qh,titleFromPath:!0},"work-output":{title:"输出",icon:rs},ask:{title:"旁问",icon:la}},ZR=[{kind:"files",title:"工作区文件",description:"浏览会话工作区的文件",tone:"tone-folder",shortcut:"Ctrl + P"},{kind:"terminal",title:"新建终端",description:"在会话工作区运行命令",tone:"tone-terminal",shortcut:"Ctrl + `"},{kind:"browser",title:"浏览器",description:"浏览网页",tone:"tone-browser",shortcut:"Ctrl + T"},{kind:"git",title:"Git 管理",description:"分支、暂存与提交",tone:"tone-git"},{kind:"ask",title:"旁问",description:"只读问答,不写主会话",tone:"tone-ask",shortcut:"Ctrl + Shift + K"}];function L8(e){const t=hc(),n=Hn,[s,l]=I.useState(()=>window.innerWidth<k4);I.useEffect(()=>{const S=()=>l(window.innerWidth<k4);return window.addEventListener("resize",S),()=>window.removeEventListener("resize",S)},[]);const o=s||t.mode==="fullscreen",[u,h]=I.useState(null),p=I.useCallback((S,v,w)=>{h(S===null?null:{tabId:S,x:v??0,y:w??0})},[]),d=S=>{S.preventDefault();const v=S.clientX,w=e.width,C=GR(),E=U=>{e.onResize(Math.min(C,Math.max(300,w-(U.clientX-v))))},M=()=>{document.body.classList.remove("resizing"),window.removeEventListener("mousemove",E),window.removeEventListener("mouseup",M)};document.body.classList.add("resizing"),window.addEventListener("mousemove",E),window.addEventListener("mouseup",M)},g=I.useRef(null),_=S=>{S.preventDefault();const v=g.current;if(v===null)return;const w=E=>{const M=v.getBoundingClientRect();M.width!==0&&n.setFraction((E.clientX-M.left)/M.width)},C=()=>{document.body.classList.remove("resizing"),window.removeEventListener("mousemove",w),window.removeEventListener("mouseup",C)};document.body.classList.add("resizing"),window.addEventListener("mousemove",w),window.addEventListener("mouseup",C)};return y.jsxs("aside",{className:`dock${o?" mode-fullscreen":""}${t.expanded?"":" collapsed"}`,style:o?void 0:{width:e.width,marginRight:t.expanded?void 0:-e.width},"aria-hidden":!t.expanded||void 0,children:[!o&&y.jsx("div",{className:"dock-resizer","data-tip":"拖拽调整宽度,双击复位",onMouseDown:d,onDoubleClick:()=>e.onResize(420)}),!o&&y.jsx("div",{className:"caption-bar","aria-hidden":"true"}),y.jsxs("div",{className:"dock-panes",ref:g,children:[t.panes.map((S,v)=>y.jsx(QR,{surface:t,pane:S,active:S.id===t.activePaneId,actions:n,fraction:t.fraction,first:v===0,chrome:v===t.panes.length-1,menuTab:u,setMenuTab:p},S.id)),t.panes.length===2&&y.jsx("div",{className:"dock-split","data-tip":"拖拽调整分栏,双击收回分栏",onMouseDown:_,onDoubleClick:n.unsplit})]}),u!==null&&y.jsx("div",{className:"menu-backdrop",onClick:()=>h(null)}),u!==null&&y.jsxs("div",{className:"row-menu dock-tab-menu",style:{position:"fixed",left:Math.min(u.x,window.innerWidth-140),top:Math.min(u.y,window.innerHeight-120)},onClick:S=>S.stopPropagation(),children:[y.jsx("button",{className:"menu-item",onClick:()=>{n.splitPane(u.tabId),h(null)},children:"向右分栏"}),y.jsx("button",{className:"menu-item",onClick:()=>{n.unsplit(),h(null)},children:"收回分栏"}),y.jsx("div",{className:"menu-sep"}),y.jsx("button",{className:"menu-item",onClick:()=>{n.closeTab(u.tabId),h(null)},children:"关闭页签"})]})]})}function QR(e){const{surface:t,pane:n,actions:s}=e;return y.jsxs("section",{className:"dock-pane",style:t.panes.length===2?{flex:`0 0 calc(${((e.first?e.fraction:1-e.fraction)*100).toString()}% - 4px)`}:void 0,onMouseDown:()=>{e.active||s.focusPane(n.id)},onDragOver:l=>l.preventDefault(),onDrop:l=>{const o=l.dataTransfer.getData("text/plain");o!==""&&s.placeTab(o,n.id)},children:[y.jsxs("div",{className:"dock-strip",children:[n.tabs.map(l=>y.jsx(eL,{tab:l,on:e.active&&n.activeTabId===l.id,actions:s,onMenu:e.setMenuTab,menuOpen:e.menuTab?.tabId===l.id},l.id)),r8(n)&&y.jsx("button",{className:"dock-add","data-tip":"新标签页",onClick:()=>s.openTab("guide"),children:"+"}),y.jsx("span",{className:"dock-strip-fill"}),e.chrome&&y.jsxs(y.Fragment,{children:[y.jsx("button",{className:"dock-chrome-btn","data-tip":t.mode==="fullscreen"?"退出全屏":"全屏","aria-label":t.mode==="fullscreen"?"退出全屏":"全屏",onClick:s.toggleMode,children:t.mode==="fullscreen"?y.jsx(rL,{}):y.jsx(nL,{})}),y.jsx("button",{className:"dock-chrome-btn","data-tip":"收起侧边栏","aria-label":"收起侧边栏",onClick:()=>s.setExpanded(!1),children:y.jsx(qs,{size:15})})]})]}),y.jsx("div",{className:"dock-pane-body",children:n.tabs.map(l=>y.jsx(JR,{tab:l,active:e.active&&n.activeTabId===l.id,expanded:t.expanded,actions:s},l.id))})]})}function JR(e){const{tab:t,active:n,expanded:s}=e;if(t.kind==="guide")return n?y.jsx(tL,{actions:e.actions}):null;const l=C8(t.kind);return l===void 0?n&&s?y.jsx("div",{className:"dock-tab-body",children:y.jsxs("div",{className:"trace-empty",children:["这块面板的界面没有装上(kind:",t.kind,")。"]})}):null:l.keepMounted===!0?y.jsx("div",{className:"dock-tab-body",style:n?void 0:{display:"none"},children:y.jsx(l.component,{tab:t,active:n,expanded:s})}):n&&s?y.jsx("div",{className:"dock-tab-body",children:y.jsx(l.component,{tab:t,active:n,expanded:s})}):null}function eL(e){const t=e.tab.kind==="preview"||e.tab.kind==="patch"?void 0:XR[e.tab.kind],n=e.tab.label!==void 0&&e.tab.label!==""?e.tab.label:t===void 0||t.titleFromPath===!0?sL(e.tab.path??""):t.title;return y.jsxs("button",{className:`dock-chip${e.on?" on":""}${e.menuOpen?" menu":""}`,onClick:()=>e.actions.focusTab(e.tab.id),onAuxClick:s=>{s.button===1&&e.actions.closeTab(e.tab.id)},onContextMenu:s=>{s.preventDefault(),e.onMenu(e.menuOpen?null:e.tab.id,s.clientX,s.clientY)},draggable:!0,onDragStart:s=>s.dataTransfer.setData("text/plain",e.tab.id),title:n,children:[t!==void 0?y.jsx(t.icon,{size:13}):y.jsx(ac,{name:n,size:13,className:"dock-chip-fileicon"}),y.jsx("span",{className:"dock-chip-label",children:n}),y.jsx("span",{className:"dock-chip-close","data-tip":"关闭页签",onClick:s=>{s.stopPropagation(),e.actions.closeTab(e.tab.id)},children:"✕"})]})}function tL(e){return y.jsxs("div",{className:"dock-guide",children:[y.jsx("span",{className:"dock-guide-hero","aria-hidden":"true",children:y.jsx(iL,{})}),y.jsx("div",{className:"dock-guide-cards",children:ZR.map(t=>y.jsxs("button",{className:"dock-guide-entry",onClick:()=>e.actions.openTab(t.kind,{replaceGuide:!0}),children:[y.jsxs("span",{className:`dock-guide-icon ${t.tone}`,children:[t.kind==="files"&&y.jsx(ns,{size:17}),t.kind==="terminal"&&y.jsx(rs,{size:17}),t.kind==="browser"&&y.jsx(aa,{size:17}),t.kind==="git"&&y.jsx(Xh,{size:17}),t.kind==="ask"&&y.jsx(la,{size:17})]}),y.jsxs("span",{className:"dock-guide-text",children:[y.jsx("span",{className:"dock-guide-title",children:t.title}),y.jsx("span",{className:"dock-guide-desc",children:t.description})]}),t.shortcut!==void 0&&y.jsx("kbd",{className:"dock-guide-key",children:t.shortcut})]},t.kind))})]})}function iL(){return y.jsxs("svg",{width:"56",height:"56",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[y.jsx("circle",{cx:"12",cy:"12",r:"9.2",stroke:"currentColor",strokeWidth:"1.4",opacity:"0.45"}),y.jsx("path",{d:"M15.8 8.2 13.4 13.4 8.2 15.8 10.6 10.6Z",fill:"currentColor",opacity:"0.6"})]})}function nL(){return y.jsx("svg",{width:"15",height:"15",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:y.jsx("path",{d:"M2.33 10.4v2.76c0 .28.22.5.5.5h2.66v1H2.83a1.5 1.5 0 0 1-1.5-1.5V10.4h1Zm12.34 2.76a1.5 1.5 0 0 1-1.5 1.5h-2.67v-1h2.67a.5.5 0 0 0 .5-.5V10.4h1v2.76ZM13.17 1.33a1.5 1.5 0 0 1 1.5 1.5v2.57h-1V2.83a.5.5 0 0 0-.5-.5h-2.67v-1h2.67ZM5.5 2.33H2.83a.5.5 0 0 0-.5.5v2.57h-1V2.83a1.5 1.5 0 0 1 1.5-1.5H5.5v1Z",fill:"currentColor"})})}function rL(){return y.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[y.jsx("path",{d:"M9 2.5V6c0 .27.1.52.29.71.19.18.44.29.71.29h3.5",stroke:"currentColor"}),y.jsx("path",{d:"M7 13.5V10a1 1 0 0 0-1-1H2.5",stroke:"currentColor"})]})}function sL(e){const t=e.split(/[\\/]/);return t[t.length-1]??e}const lL=Object.freeze(Object.defineProperty({__proto__:null,Dock:L8,activePane:us,canAddTab:r8,closeTab:h8,defaultSurface:x_,dockActions:Hn,dockReview:O8,dockSurface:Nh,dockTabKinds:YR,dockTabMeta:C8,focusPane:f8,focusTab:ur,loadSurfaces:y8,makeTab:ln,openBrowserTab:c8,openDockBrowserTab:E_,openDockTab:$o,openPatch:l8,openPreview:s8,openSubagent:a8,openTab:C_,openWorkOutput:o8,paneOf:Js,placeTab:m8,registerDockTab:x8,saveSurfaces:S8,setDockPreview:E8,setDockReview:k_,setDockSession:b8,setDockSubagent:M8,setDockWorkOutput:A8,setExpanded:Ln,setFraction:g8,setTabInfo:u8,splitPane:d8,subscribeDock:va,toggleMode:_8,unsplitPane:p8,useActivePreviewPath:R8,useDockPatchSource:T8,useDockReview:hf,useDockSurface:hc},Symbol.toStringTag,{value:"Module"})),bt={header:"shell.header",headerLead:"shell.header.lead",sidebar:"shell.sidebar",page:"shell.page",main:"shell.main",thread:"shell.thread",composer:"shell.composer",statusbar:"shell.statusbar",notice:"shell.notice"},up={[bt.header]:"list",[bt.headerLead]:"list",[bt.sidebar]:"list",[bt.page]:"list",[bt.main]:"list",[bt.thread]:"list",[bt.composer]:"list",[bt.statusbar]:"list",[bt.notice]:"single"},ua=Object.freeze({});function Fi({slots:e,slot:t,owner:n}){const s=im(e,t);return y.jsx(y.Fragment,{children:s.map(l=>y.jsx(N8,{slots:e,entry:l,owner:n??ua},`${l.cell}|${l.id}|${String(l.priority)}|${String(l.seq)}`))})}function T_({slots:e,slot:t,owner:n}){im(e,t);const s=e.elect(t,n);return s===null?null:y.jsx(N8,{slots:e,entry:s.entry,owner:{...n,matched:s.matched}},`${s.entry.cell}|${s.entry.id}|${String(s.entry.priority)}|${String(s.entry.seq)}`)}function N8({slots:e,entry:t,owner:n}){const s=t.component,l=I.useCallback((p,d)=>{if(!t.children.includes(p))throw new jn(`条目 ${t.slot}/${t.id} 没有声明子槽「${p}」(声明过的:${t.children.length===0?"无":t.children.join("、")})`);return e.spec(p)==="chain"?y.jsx(T_,{slots:e,slot:p,owner:d??ua}):y.jsx(Fi,{slots:e,slot:p,owner:d??ua})},[e,t]),o=I.useCallback((p,d,g)=>y.jsx(M_,{slots:e,name:p,inputProps:d,selections:g?.slots,fallback:g?.fallback}),[e]),u=I.useMemo(()=>({renderSlot:l,childSlots:t.children,renderFactorySlot:o}),[l,o,t.children]),h=X5(e,t.store);return y.jsx(aL,{slot:t.slot,id:t.id,onFault:p=>{e.reportFault(t,p)},children:y.jsx("div",{className:"slot-entry","data-slot":t.slot,"data-entry":t.id,"data-cell":t.cell,children:y.jsx(s,{...n,...u,...h})})})}class aL extends I.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){if(t instanceof jn)throw t;return{error:t instanceof Error?t.message:String(t)}}componentDidCatch(t){this.props.onFault(t)}render(){return this.state.error!==null?y.jsxs("div",{className:"slot-crash","data-slot":this.props.slot,"data-entry":this.props.id,children:["界面块 ",this.props.id," 渲染失败:",this.state.error]}):this.props.children}}const oL=Object.freeze({}),T4=I.createContext(new Set);function cL(e,t){const n=I.useCallback(l=>e.subscribeFactory(t,l),[e,t]),s=I.useCallback(()=>e.factoryVersion(t),[e,t]);return I.useSyncExternalStore(n,s,s)}function M_({slots:e,name:t,inputProps:n,selections:s,fallback:l}){const o=cL(e,t),u=e.factory(t),h=I.useContext(T4),p=I.useMemo(()=>new Set(h).add(t),[h,t]);if(u===void 0)return y.jsx(y.Fragment,{children:l??null});if(h.has(t))throw new jn(`装配错误:Factory「${t}」递归渲染(定义在自己的 occurrence 里又出现)`);for(const d of Object.keys(s??{}))if(!u.slots.includes(d))throw new jn(`装配错误:Factory「${t}」没有声明局部位置「${d}」(声明过的:${u.slots.length===0?"无":u.slots.join("、")})`);return y.jsx(z8,{name:t,id:t,onFault:d=>{e.reportFactoryFault(t,t,d)},children:y.jsx(T4.Provider,{value:p,children:y.jsx(uL,{slots:e,definition:u,inputProps:n??ua,selections:s??oL})})},`${t}:${String(o)}`)}function uL({slots:e,definition:t,inputProps:n,selections:s}){const l=I.useMemo(()=>{const p=(g,_)=>{if(!t.children.includes(g))throw new jn(`装配错误:Factory「${t.name}」没有声明子槽「${g}」(声明过的:${t.children.length===0?"无":t.children.join("、")})`);return e.spec(g)==="chain"?y.jsx(T_,{slots:e,slot:g,owner:_??ua}):y.jsx(Fi,{slots:e,slot:g,owner:_??ua})},d=(g,_,S)=>y.jsx(M_,{slots:e,name:g,inputProps:_,selections:S?.slots,fallback:S?.fallback});return{renderSlot:p,childSlots:t.children,renderFactorySlot:d}},[e,t]),o=X5(e,t.store),u=I.useCallback((p,d)=>{if(!t.slots.includes(p))throw new jn(`装配错误:Factory「${t.name}」没有声明局部位置「${p}」(声明过的:${t.slots.length===0?"无":t.slots.join("、")})`);const g=s[p]??d;return I.useMemo(()=>S=>y.jsx(z8,{name:t.name,id:p,onFault:v=>{e.reportFactoryFault(t.name,p,v)},children:y.jsx(g,{...l,...o,...S})}),[g,l,o,t,p,e])},[t,s,l,o,e]),h=t.component;return y.jsx(h,{...l,...o,...n,useFactorySlot:u})}class z8 extends I.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){if(t instanceof jn)throw t;return{error:t instanceof Error?t.message:String(t)}}componentDidCatch(t){this.props.onFault(t)}render(){return this.state.error!==null?y.jsxs("div",{className:"factory-crash","data-factory":this.props.name,"data-factory-slot":this.props.id,children:["Factory ",this.props.name," 的 ",this.props.id," 渲染失败:",this.state.error]}):this.props.children}}const hL=Object.freeze(Object.defineProperty({__proto__:null,ChainOutlet:T_,FactoryOutlet:M_,SHELL_SLOTS:up,SLOT:bt,SlotOutlet:Fi,useSlot:im,useSlotFaults:W5},Symbol.toStringTag,{value:"Module"})),A_=pa(null);function B8(){return A_.get()}function Qo(e){A_.set(e)}function j8(e){return A_.subscribe(e)}function D_(){return I.useSyncExternalStore(j8,B8,()=>null)}const hr=pa({view:"chat",focusStep:null});function H8(){return hr.get().view}function oh(e){const t=hr.get();t.view!==e&&hr.set({view:e,focusStep:t.focusStep})}function fL(e){const t=hr.get(),n=e??null;t.view==="trace"&&t.focusStep===n||hr.set({view:"trace",focusStep:n})}function I8(){return hr.get().focusStep}function dL(){const e=hr.get();e.focusStep!==null&&hr.set({view:e.view,focusStep:null})}function O_(e){return hr.subscribe(e)}function P8(){return I.useSyncExternalStore(O_,H8,()=>"chat")}function pL(){return I.useSyncExternalStore(O_,I8,()=>null)}function mL(e){return e===void 0||e<=0?"":e<1024*1024?`${String(Math.round(e/1024))} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function _L(){const e=Jm(),[t,n]=I.useState(null),[s,l]=I.useState(null),[o,u]=I.useState(!1),[h,p]=I.useState("");if(I.useEffect(()=>{if(!e.available)return;let S=!0;e.invoke("checkUpdate").then(C=>{S&&n(C)}).catch(()=>{});const v=e.on("update-status",C=>{n(C),p("")}),w=e.on("update-progress",C=>{l(C.percent)});return()=>{S=!1,v(),w()}},[e]),!e.available||t===null||t.status!=="available")return null;const d=t.version??"",g=mL(t.size),_=h!==""?h:o?s===null?"正在下载安装包…":`正在下载安装包… ${String(s)}%`:`发现新版本${d===""?"":` ${d}`}${g===""?"":`(${g})`},点击下载并安装。`;return y.jsx("button",{type:"button",className:"update-btn","data-update-version":d,"data-tip":_,title:_,disabled:o,onClick:()=>{p(""),u(!0),e.invoke("installUpdate").then(S=>{S.ok||(p(S.error??"更新失败"),u(!1))}).catch(S=>{p(`更新失败:${S instanceof Error?S.message:String(S)}`),u(!1)})},children:o?s===null?"更新中":`${String(s)}%`:"更新"})}const F8=I.createContext(null);function gL({channel:e,children:t}){return y.jsx(F8.Provider,{value:e,children:t})}function dr(){const e=I.useContext(F8);if(e===null)throw new Error("useHostChannel 必须在 RuntimeProvider 里用");return e}function vL(){const e=dr();return I.useSyncExternalStore(t=>e.subscribe(t),()=>e.getSnapshot(),()=>e.getSnapshot())}function Jo(e,t=Object.is){const n=dr(),s=I.useRef(e);s.current=e;const l=I.useRef(t);l.current=t;const[o,u]=I.useState(()=>e(n.getSnapshot())),h=I.useRef(o);return I.useEffect(()=>{const p=()=>{const d=s.current(n.getSnapshot());l.current(h.current,d)||(h.current=d,u(d))};return p(),n.subscribe(p)},[n]),o}function R_(){const e=dr();return I.useSyncExternalStore(t=>e.subscribe(t),()=>e.getStatus(),()=>e.getStatus())}function yL(){const e=dr();return I.useSyncExternalStore(t=>e.subscribe(t),()=>e.getHello(),()=>e.getHello())}function U8(){const e=dr();return I.useSyncExternalStore(t=>e.subscribe(t),()=>e.getHostError(),()=>e.getHostError())}function SL(e){const t=dr(),n=I.useRef(e);n.current=e,I.useEffect(()=>t.onAsk(s=>{n.current(s)}),[t])}const M4="dsc.diffView",A4="dsc.diffWrap",Qu="--dsc-diff-pane-w",D4=320,O4=900;function bL(){const e=hf(),[t,n]=I.useState(0),[s,l]=I.useState(()=>localStorage.getItem(M4)==="split"),[o,u]=I.useState(()=>localStorage.getItem(A4)==="wrap");I.useEffect(()=>{e!==null&&n(Math.min(e.index,Math.max(0,e.files.length-1)))},[e]),I.useLayoutEffect(()=>{const v=sa(Lt.diffPaneWidth,D4,O4);v!==null&&Nn(Qu,`${String(v)}px`)},[]);const h=ca({getBase:()=>oa(Qu,480),sign:-1,clamp:v=>Math.min(O4,Math.max(D4,v)),onDrag:v=>Nn(Qu,`${String(v)}px`),onCommit:v=>ts(Lt.diffPaneWidth,v)}),p=()=>{ts(Lt.diffPaneWidth,null),Nn(Qu,null)},d=()=>{l(v=>{try{localStorage.setItem(M4,v?"unified":"split")}catch{}return!v})},g=()=>{u(v=>{try{localStorage.setItem(A4,v?"nowrap":"wrap")}catch{}return!v})};if(e===null)return null;const _=e.files[t]??e.files[0],S=Qs();return y.jsxs("aside",{className:"diff-pane","data-diff-pane":!0,children:[y.jsx("div",{className:"diff-resizer",...h,onDoubleClick:p,"data-tip":"拖拽调宽 · 双击复位","aria-label":"调整审查面板宽度"}),y.jsxs("div",{className:"diff-head",children:[e.files.length>1?y.jsx(d_,{className:"diff-file-select",ariaLabel:"选择要审查的文件",value:String(t),options:e.files.map((v,w)=>({value:String(w),label:Zo(v.path,e.cwd)})),onPick:v=>{n(Number(v))}}):_!==void 0&&y.jsx("span",{className:"diff-file-name",title:_.path,children:Zo(_.path,e.cwd)}),_!==void 0&&y.jsxs("span",{className:"changes-counts",children:[_.status==="added"&&y.jsx("span",{className:"diff-badge",children:"新增"}),y.jsx("span",{className:"changes-added",children:`+${String(_.added)}`}),y.jsx("span",{className:"changes-removed",children:`-${String(_.removed)}`})]}),y.jsxs("span",{className:"diff-tools",children:[y.jsx("button",{type:"button",className:"diff-tool","aria-pressed":s,"data-tip":"分栏 / 合并视图",onClick:d,children:s?"合并":"分栏"}),y.jsx("button",{type:"button",className:"diff-tool","aria-pressed":o,"data-tip":"长行自动换行",onClick:g,children:"换行"}),_!==void 0&&y.jsxs(y.Fragment,{children:[y.jsx(ac,{name:_.path,size:15}),S.available?y.jsx("button",{type:"button",className:"diff-tool","data-tip":"用系统默认程序打开。",onClick:()=>{S.invoke("openPath",[_.path]).catch(v=>{m_(`系统打开失败:${v instanceof Error?v.message:String(v)}`)})},children:"系统打开"}):null,y.jsx("button",{type:"button",className:"diff-tool","data-tip":"在预览中打开当前文件(内容是修改时的快照)。",onClick:()=>{Hn.openPreview(_.path)},children:"打开"})]}),y.jsx("button",{type:"button",className:"diff-tool","data-tip":"关闭审查",onClick:()=>{k_(null)},children:"关闭"})]})]}),_===void 0?y.jsx("p",{className:"diff-note",children:"这一轮没有可审查的改动。"}):y.jsx(wL,{file:_,split:s,wrap:o})]})}function wL({file:e,split:t,wrap:n}){return y.jsxs(y.Fragment,{children:[e.truncated===!0&&y.jsx("p",{className:"diff-note",children:"改动较大,这里只显示了前一部分(完整改动以文件当前内容为准)。"}),y.jsx(vm,{hunks:e.hunks,path:e.path,split:t,wrap:n})]})}const V8="(max-width: 860px)";function R4(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(V8).matches}function xL(e,t){const n=I.useMemo(()=>t===null?[]:[{id:"boot",ok:!1,error:t}],[t]),[s,l]=I.useState(()=>e?.getReports()??n);return I.useEffect(()=>{if(e===null){l(n);return}return l(e.getReports()),e.subscribe(()=>{l(e.getReports())})},[e,n]),s}function CL(e){const[t,n]=I.useState(()=>e?.getState()??null);return I.useEffect(()=>{if(e===null){n(null);return}return n(e.getState()),e.subscribe(()=>{n(e.getState())})},[e]),t}function EL(e){const[t,n]=I.useState(()=>e?.getFailures()??[]);return I.useEffect(()=>{if(e===null){n([]);return}return n(e.getFailures()),e.subscribe(()=>{n(e.getFailures())})},[e]),t}function kL({slots:e,boot:t,serviceRegistry:n,session:s,hmr:l,bootError:o,allowedModules:u}){const h=xL(s,o),p=CL(s),d=EL(l),g=n.names(),_=h.filter($=>!$.ok);hc();const S=hf(),v=Jo(IL),w=D_(),C=P8(),E=Jo(HL);I.useEffect(()=>{b8(v??"")},[v]);const M=I.useMemo(()=>new URLSearchParams(location.search).has("dock"),[]);I.useEffect(()=>{!M||v===null||$o("guide")},[M,v]);const[U,B]=I.useState(()=>sa(Lt.sidebarWidth,Th,Mh)),[X,Q]=I.useState(()=>R4()),[R,V]=I.useState(()=>a_(Lt.sidebarCollapsed)||R4()),[se,me]=I.useState(()=>sa(Lt.threadWidth,Jr,n_)),[k,K]=I.useState(()=>sa(Lt.dockWidth,Ah,Dh)??t_);I.useEffect(()=>{Nn("--dsc-sidebar-w",U===null?null:`${String(U)}px`)},[U]),I.useEffect(()=>(se!==null&&Nn("--dsc-thread-user-max",`${String(se)}px`),()=>Nn("--dsc-thread-user-max",null)),[se]),I.useEffect(()=>{const $=window.matchMedia(V8),oe=()=>{Q($.matches),$.matches&&V(!0)};return oe(),$.addEventListener("change",oe),()=>$.removeEventListener("change",oe)},[]),I.useEffect(()=>{X&&w!==null&&V(!0)},[X,w]),I.useEffect(()=>{const $=()=>{const oe=window.innerWidth-(U??0)-480,T=Math.min(Dh,Math.max(Ah,oe));K(ze=>ze>T?T:ze)};return window.addEventListener("resize",$),$(),()=>window.removeEventListener("resize",$)},[U]);const W=$=>{B($),ts(Lt.sidebarWidth,$)},q=$=>{me($),ts(Lt.threadWidth,$)},Z=()=>{me(null),ts(Lt.threadWidth,null)},P=$=>{K($),ts(Lt.dockWidth,$)},H=()=>{V($=>(o_(Lt.sidebarCollapsed,!$),!$))};I.useEffect(()=>{const $=T=>{!(T.ctrlKey||T.metaKey)||T.altKey||T.shiftKey||(T.key==="b"||T.key==="B"?(T.preventDefault(),H()):T.key==="p"||T.key==="P"?(T.preventDefault(),$o("files")):T.key==="`"||T.code==="Backquote"?(T.preventDefault(),$o("terminal")):(T.key==="t"||T.key==="T")&&(T.preventDefault(),E_()))},oe=()=>H();return window.addEventListener("keydown",$),window.addEventListener("shell.sidebar.toggle",oe),()=>{window.removeEventListener("keydown",$),window.removeEventListener("shell.sidebar.toggle",oe)}},[]);const ie=ca({sign:1,getBase:()=>U??c_(),clamp:$=>Math.min(Mh,Math.max(Th,$)),onDrag:$=>Nn("--dsc-sidebar-w",`${String($)}px`),onCommit:$=>W($)});return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"app","data-rail":R?"1":"0",children:[y.jsxs("aside",{className:`sidebar${R?" rail":""}`,children:[y.jsxs("div",{className:"sidebar-header","data-rail-hidden":R?"1":void 0,"aria-hidden":R||void 0,children:[y.jsx("img",{src:"icon.png",alt:"Pneuma",draggable:!1}),y.jsx("span",{className:"brand",children:t.host.name}),y.jsx(_L,{}),y.jsx("button",{type:"button",className:"icon-btn rail-toggle","data-tip":"收起侧边栏,快捷键 Ctrl+B",title:"收起侧边栏(Ctrl+B)","aria-label":"收起侧边栏",onClick:H,children:y.jsx(qs,{size:15})})]}),R&&!X?y.jsx(OL,{onExpand:H}):null,y.jsx("div",{className:"sidebar-slot","data-rail-hidden":R?"1":void 0,children:y.jsx(Fi,{slots:e,slot:bt.sidebar})}),R?null:y.jsx("div",{className:"sidebar-resizer","data-tip":"拖拽调整侧边栏宽度,双击复位",onPointerDown:ie.onPointerDown,onPointerMove:ie.onPointerMove,onPointerUp:ie.onPointerUp,onPointerCancel:ie.onPointerCancel,onDoubleClick:()=>W(null)})]}),X&&!R?y.jsx("div",{className:"sidebar-scrim",onClick:H,"aria-hidden":"true"}):null,y.jsxs("div",{className:"main",children:[y.jsx("div",{className:"caption-bar","aria-hidden":"true"}),w===null?y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"topbar",children:[y.jsxs("div",{className:"topbar-title-row",children:[X?y.jsx("button",{type:"button",className:"icon-btn topbar-nav-btn","data-tip":"会话","aria-label":"会话",onClick:H,children:y.jsx(qs,{size:16})}):null,y.jsx("span",{className:"title",children:y.jsx(TL,{})}),y.jsx("div",{className:"topbar-cluster",children:y.jsx(Fi,{slots:e,slot:bt.headerLead})}),y.jsx("div",{className:"drag-fill"}),y.jsx("button",{type:"button",className:"icon-btn topbar-search","data-tip":"搜索动作、会话与设置(Ctrl K)","aria-label":"搜索",onClick:()=>{window.dispatchEvent(new CustomEvent("shell.palette.open"))},children:y.jsx(Qr,{size:15})}),y.jsx(Fi,{slots:e,slot:bt.header}),X?y.jsx("button",{type:"button",className:`icon-btn topbar-nav-btn${w==="plugins"?" on":""}`,"data-tip":"插件","aria-label":"插件","aria-pressed":w==="plugins",onClick:()=>{Qo(w==="plugins"?null:"plugins")},children:y.jsx(Gh,{size:16})}):null,y.jsx(ML,{})]}),X?C==="trace"?y.jsx("nav",{className:"tabs","aria-label":"正文区视图",children:y.jsxs("button",{type:"button",onClick:()=>{oh("chat")},children:[y.jsx(_h,{size:14}),"对话"]})}):null:y.jsxs("nav",{className:"tabs",role:"tablist","aria-label":"正文区视图",children:[y.jsx("button",{type:"button",role:"tab","aria-selected":C==="chat",className:C==="chat"?"on":"",onClick:()=>{oh("chat")},children:"对话"}),y.jsx("button",{type:"button",role:"tab","aria-selected":C==="trace",className:C==="trace"?"on":"",onClick:()=>{oh("trace")},children:"轨迹"})]})]}),y.jsx(AL,{}),y.jsx(DL,{}),y.jsxs("div",{className:"thread-zone",...S!==null?{"data-review":"1"}:{},children:[y.jsxs("div",{"data-thread-area":"",className:C==="chat"&&E?"thread-main":C==="chat"?"thread-main thread-main-empty":"thread-main",children:[C==="trace"?y.jsx(Fi,{slots:e,slot:bt.thread}):y.jsx("div",{className:"chat-wrap",children:y.jsx("div",{className:"chat",children:y.jsx("div",{className:"chat-inner",children:y.jsx(Fi,{slots:e,slot:bt.main})})})}),y.jsxs("div",{className:"composer-zone",children:[y.jsx(Fi,{slots:e,slot:bt.composer}),y.jsx("div",{className:"statusbar",children:y.jsx(Fi,{slots:e,slot:bt.statusbar})})]})]}),S===null?y.jsx(p_,{width:se,onCommit:q,onReset:Z}):null,y.jsx(bL,{})]})]}):y.jsxs(y.Fragment,{children:[X?y.jsxs("div",{className:"page-strip",children:[y.jsx("button",{type:"button",className:"icon-btn topbar-nav-btn","data-tip":"返回对话","aria-label":"返回对话",onClick:()=>{Qo(null)},children:y.jsx(_h,{size:16})}),y.jsx("span",{className:"title",children:w==="plugins"?"插件":"技能"}),y.jsx("div",{className:"drag-fill"}),y.jsx("button",{type:"button",className:"icon-btn topbar-nav-btn","data-tip":"会话","aria-label":"会话",onClick:H,children:y.jsx(qs,{size:16})})]}):null,y.jsx(Fi,{slots:e,slot:bt.page})]}),w===null?null:y.jsx("div",{className:"statusbar",children:y.jsx(Fi,{slots:e,slot:bt.statusbar})})]}),v!==null?y.jsx(L8,{width:k,onResize:P}):null,y.jsx("div",{className:"dsc-toasts",children:y.jsx(Fi,{slots:e,slot:bt.notice})})]}),y.jsx(zL,{slots:e,boot:t,reports:h,services:g,failed:_.length,ledger:p,syncFailures:d,allowedModules:u,onRetrySync:l===null?null:()=>{l.retry()}})]})}function TL(){const e=Jo(jL);return y.jsx(y.Fragment,{children:e})}function ML(){return hc().expanded?null:y.jsx("button",{type:"button",className:"icon-btn dock-toggle","data-tip":"工作区面板:开始、终端、浏览器、文件、Git","aria-label":"工作区面板",onClick:()=>{Hn.setExpanded(!0)},children:y.jsx(qs,{size:15})})}function AL(){const e=dr(),t=R_(),[n,s]=I.useState(!1);if(I.useEffect(()=>{if(t==="open"){s(!1);return}const o=window.setTimeout(()=>{s(!0)},3e3);return()=>{window.clearTimeout(o)}},[t]),!n)return null;const l=t==="closed";return y.jsxs("div",{className:"conn-banner","data-conn":t,role:"status",children:[y.jsx("span",{className:"conn-dot","aria-hidden":"true"}),y.jsx("span",{className:"conn-text",children:l?"连接已断开":"连不上宿主"}),y.jsx("span",{className:"conn-hint",children:l?"这个窗口的重连已经被浏览器放弃(凭据失效或宿主换了端口)。":"宿主可能正在重启,浏览器每 3 秒重试一次。"}),y.jsx("button",{type:"button",className:"conn-retry",onClick:()=>{e.reconnect()},children:"立即重连"})]})}function DL(){const e=U8();return e===null?null:y.jsxs("p",{className:"host-error","data-host-error":"1",children:["宿主状态异常:",e]})}function OL({onExpand:e}){const t=D_(),n=Jo(RL);return y.jsxs(y.Fragment,{children:[y.jsx("button",{type:"button",className:"rail-logo","data-tip":"展开侧边栏,快捷键 Ctrl+B",title:"展开侧边栏(Ctrl+B)","aria-label":"展开侧边栏",onClick:e,children:y.jsx("img",{src:"icon.png",alt:"Pneuma",draggable:!1})}),y.jsx("button",{type:"button",className:"rail-btn","data-tip":"新会话","aria-label":"新会话",onClick:()=>{window.dispatchEvent(new CustomEvent("shell.session.new"))},children:y.jsx(sm,{size:18})}),y.jsxs("nav",{className:"rail-nav",children:[y.jsx("button",{type:"button",className:`rail-btn${t==="skills"?" on":""}`,"data-tip":"技能","aria-label":"技能","aria-pressed":t==="skills",onClick:()=>{Qo(t==="skills"?null:"skills")},children:y.jsx(om,{size:18})}),y.jsx("button",{type:"button",className:`rail-btn${t==="plugins"?" on":""}`,"data-tip":"插件","aria-label":"插件","aria-pressed":t==="plugins",onClick:()=>{Qo(t==="plugins"?null:"plugins")},children:y.jsx(Gh,{size:18})})]}),y.jsxs("div",{className:"rail-foot",children:[y.jsx("button",{type:"button",className:"rail-btn","data-tip":n===null?"展开侧边栏后可选择会话":`工作目录 ${n},展开侧边栏后可选择会话`,"aria-label":"展开侧边栏(查看工作目录)",onClick:e,children:y.jsx(ns,{size:18})}),y.jsx("button",{type:"button",className:"rail-btn","data-tip":"设置:外观、模型、模式、技能、插件","aria-label":"设置",onClick:()=>{window.dispatchEvent(new CustomEvent("shell.settings.open"))},children:y.jsx(am,{size:18})})]})]})}function RL(e){const t=e?.status;if(typeof t!="object"||t===null)return null;const n=t.cwd;return typeof n=="string"&&n!==""?n:null}const LL={0:"待装",1:"装载中",2:"已生效",3:"装载失败",4:"已卸载",5:"已卸载"};function NL(e){return e===void 0?"状态未知":LL[e]??`状态 ${String(e)}`}function zL({slots:e,boot:t,reports:n,services:s,failed:l,ledger:o,syncFailures:u,allowedModules:h,onRetrySync:p}){const d=W5(e),[g]=I.useState(()=>new URLSearchParams(location.search).has("diag")),_=Qs(),S=BL(),v=R_(),w=yL();if(!g&&l===0&&d.length===0&&u.length===0)return null;const C=E=>t.batches.find(M=>M.phase===E)?.rev??"";return y.jsxs("details",{className:"diagnostics",children:[y.jsxs("summary",{children:["诊断(",n.length," 个插件 / ",e.slots.length," 个槽",d.length===0?"":` / ${String(d.length)} 处故障`,")"]}),y.jsxs("ul",{className:"diag-plugins",children:[n.map(E=>y.jsxs("li",{className:E.ok?"ok":"bad","data-plugin":E.id,children:[y.jsx("code",{children:E.id})," ",E.ok?"已装上":`失败:${E.error??"未知原因"}`,E.name===void 0?"":`(${E.name})`,E.provides===void 0?"":`(提供:${E.provides.join("、")})`,E.ok&&(E.attempts??1)>1?`(重试 ${String(E.attempts)} 次才成功)`:"",y.jsxs("span",{"data-plugin-phase":o?.plugins[E.id]?.phase??"",children:[" ","· ",o?.plugins[E.id]?.phase==="early"?"首屏批":"应用批"]}),y.jsxs("span",{"data-plugin-via":o?.plugins[E.id]?.via??"","data-plugin-fiber":o?.plugins[E.id]?.fiber??"",children:[" ","· ",o?.plugins[E.id]?.via==="cordis"?`cordis(${NL(o?.plugins[E.id]?.fiber)})`:"退订账本"]})]},E.id)),n.length===0?y.jsx("li",{className:"empty",children:"启动清单里没有插件"}):null]}),o===null?null:y.jsxs("p",{className:"diag-line diag-batches",children:["批次:",o.batches.map(E=>{const M=E.entries.filter(B=>o.plugins[B]?.state==="loaded").length,U=E.doneAt??E.startedAt??E.scheduledAt;return y.jsxs("span",{"data-batch":E.phase,"data-batch-state":E.state,"data-batch-loaded":`${String(M)}/${String(E.entries.length)}`,"data-batch-rev":C(E.phase),style:{marginRight:10},children:[E.phase==="early"?"首屏":"应用"," ",M,"/",E.entries.length," ","(",E.state,U===void 0?"":` @${String(Math.round(U-o.startedAt))}ms`,C(E.phase)===""?"":`,rev ${C(E.phase)}`,")"]},E.phase)})]}),u.length===0?null:y.jsx("ul",{className:"diag-plugins",children:u.map(E=>y.jsxs("li",{className:"bad","data-sync-failure":E.id,children:[y.jsx("code",{children:E.id})," 页内同步失败:",E.message]},E.id))}),p===null?null:y.jsx("p",{className:"diag-line",children:y.jsx("button",{type:"button","data-sync-retry":"1",onClick:p,children:"重试页内同步"})}),d.length===0?null:y.jsx("ul",{className:"diag-plugins",children:d.map((E,M)=>y.jsxs("li",{className:"bad","data-fault":E.slot,children:[y.jsx("code",{children:E.slot}),E.id===""?"":` / ${E.id}`," 在",E.phase==="render"?"渲染":E.phase==="contribute"?"贡献槽位":"卸载","时出错:",E.error.message]},`${E.slot}|${E.id}|${String(M)}`))}),y.jsxs("p",{className:"diag-line",children:["清单 ",t.rev,":",t.entries.map(E=>E.id).join("、")||"空"]}),y.jsxs("p",{className:"diag-line",children:["槽:",e.slots.join("、")||"无"]}),y.jsxs("p",{className:"diag-line","data-services":s.join(","),children:["服务:",s.join("、")||"无"]}),y.jsxs("p",{className:"diag-line",children:["放行的模块:",h.join("、")]}),y.jsxs("p",{className:"diag-line diag-channel","data-channel":v,"data-protocol":w?.protocolVersion??"",children:["数据通道:",v==="open"?`已连接${w===null?"":`(协议 v${String(w.protocolVersion)},放行 ${String(w.methods.length)} 个方法)`}`:v==="connecting"?"连接中…":"已断开(请用宿主新打印的地址重开)"]}),y.jsxs("p",{className:"diag-line","data-native":_.available?"on":"off","data-native-probe":S.state,children:["原生桥:",_.available?`v${String(_.version??"?")} 已就绪(${String(P0.length)} 个操作:${P0.join("、")})`:"浏览器里没有(桌面窗口才有)",_.available&&_.version!==null&&_.version!==I0?` ⚠ 版本对不上:这一版壳按 v${String(I0)} 写,外壳的桥是 v${String(_.version)}(多半是壳产物没跟着外壳一起重建)`:"",S.detail===""?"":` · ${S.detail}`]})]})}function BL(){const[e,t]=I.useState({state:"pending",detail:""});return I.useEffect(()=>{const n=Qs();let s=!0;return n.invoke("recentCwds").then(l=>{s&&t({state:"ok",detail:`试点 recentCwds 回了 ${String(Array.isArray(l)?l.length:0)} 个最近工作区`})}).catch(l=>{if(!s)return;const o=l instanceof Error?l.message:String(l);t(n.available?{state:"error",detail:`试点未通过:${o}`}:{state:"off",detail:`降级正常:${o}`})}),()=>{s=!1}},[]),e}function jL(e){const t=e?.status,n=e?.sessions;if(typeof t!="object"||t===null||!Array.isArray(n))return"新会话";const s=t.sessionPath;if(typeof s!="string")return"新会话";for(const l of n){if(typeof l!="object"||l===null)continue;const o=l;if(o.id!==s)continue;const u=o.title;return typeof u=="string"&&u!==""?u:"新会话"}return"新会话"}function HL(e){const t=e?.entries;if(Array.isArray(t)&&t.some(s=>s.kind!=="system"))return!0;const n=e?.liveEntries;return Array.isArray(n)&&n.length>0}function IL(e){const t=e?.status;if(typeof t!="object"||t===null)return null;const n=t.sessionId;return typeof n=="string"&&n!==""?n:null}const PL=.85,FL=1.35,q8=1,UL={sm:.92,md:1,lg:1.12},Bh={themeMode:"claude",fontSize:q8,density:"standard"};function $8(e){const n=(typeof e=="string"?UL[e]:void 0)??(typeof e=="number"&&Number.isFinite(e)?e:q8);return Math.min(FL,Math.max(PL,Math.round(n*100)/100))}function VL(e){return e==="compact"||e==="roomy"?e:"standard"}const qL=["dark","light","claude","system"];function $L(e){return typeof e=="string"&&qL.includes(e)?e:"claude"}function Y8(e){return{themeMode:$L(e?.themeMode),fontSize:$8(e?.fontSize),density:VL(e?.density)}}const K8="dsc.appearance",Ju=typeof window>"u"?void 0:window.matchMedia?.("(prefers-color-scheme: light)");let Zl,L4=null,N4=Bh;function jh(e){N4=e;const t=document.documentElement,n=e.themeMode,s=n==="system"?Ju?.matches?"light":"dark":n;t.dataset.theme=s,t.dataset.density=e.density,t.style.setProperty("--dsc-font-scale",String($8(e.fontSize))),YL(n),Ju&&(n==="system"&&!Zl?(Zl=()=>{jh(N4)},Ju.addEventListener("change",Zl)):n!=="system"&&Zl&&(Ju.removeEventListener("change",Zl),Zl=void 0))}function YL(e){const t=Qs();if(!t.available)return;t.invoke("setThemeSource",[e]).catch(()=>{});const n=KL();if(n===null||n===L4)return;L4=n;const[s,l]=n.split(" ");t.invoke("setWindowChrome",[s,l]).catch(()=>{})}function KL(){const e=Sh("--dsc-chrome-bar"),t=Sh("--dsc-chrome-symbol");return e===null||t===null?null:`${e} ${t}`}function WL(){const e=GL();try{const t=localStorage.getItem(K8);if(t!==null){const n=Y8(JSON.parse(t));return e===null?n:{...n,themeMode:e}}}catch(t){console.warn("[ui-shell] 外观缓存读取失败,回退启动主题",t)}return e===null?Bh:{...Bh,themeMode:e}}function GL(){if(typeof window>"u")return null;const e=/[?&]theme=(dark|light|claude)/.exec(window.location.search);return e===null?null:e[1]}function W8(e){try{localStorage.setItem(K8,JSON.stringify(e))}catch(t){console.warn("[ui-shell] 外观缓存写入失败",t)}}const XL=3e4,ZL=33e4;class QL extends Error{reason;constructor(t,n){super(t==="timeout"?`调用宿主方法超时(${String(n)} 毫秒)`:"调用宿主方法已被中止"),this.name="HostInvokeAbortedError",this.reason=t}}function JL(){let e=null,t=null,n=null,s="connecting",l=null,o=null,u=!1;const h=new Set,p=new Set,d=new Set,g=()=>{for(const v of[...h])try{v()}catch{}},_=v=>{s!==v&&(s=v,g())},S=()=>{if(u)return;const v=new EventSource("/api/events");o=v,v.addEventListener("hello",w=>{if(v===o)try{t=JSON.parse(w.data),s="open",g()}catch(C){console.error("[ui-shell] 握手帧认不出",C)}}),v.addEventListener("frame",w=>{if(v===o)try{const C=JSON.parse(w.data);e=lC(e,C),s="open",g()}catch(C){if(C instanceof V5){console.warn("[ui-shell] 帧号跳号,重开数据通道换一帧全量:",C.message),o=null,v.close(),_("connecting"),S();return}console.error("[ui-shell] 帧认不出",C)}}),v.addEventListener("plugins",w=>{if(v===o){try{n=JSON.parse(w.data)}catch(C){console.error("[ui-shell] 启动图热更帧认不出",C);return}g();for(const C of[...p])try{C(n)}catch{}}}),v.addEventListener("ask",w=>{if(v!==o)return;let C;try{C=JSON.parse(w.data)}catch{return}if(!(typeof C.id!="string"||typeof C.delta!="string"))for(const E of[...d])try{E(C)}catch{}}),v.onopen=()=>{v===o&&_("open")},v.onerror=w=>{if(v!==o)return;const C=w.data;if(typeof C=="string"&&C!==""){try{const E=JSON.parse(C);l=typeof E.error=="string"?E.error:C}catch{l=C}console.error("[ui-shell] 宿主报错",l),g();return}_(v.readyState===EventSource.CLOSED?"closed":"connecting")}};return S(),{getSnapshot:()=>e,reconnect(){if(u)return;const v=o;o=null,v?.close(),_("connecting"),S()},getHello:()=>t,getStatus:()=>s,getHostError:()=>l,getPluginsFrame:()=>n,onPlugins(v){return p.add(v),()=>{p.delete(v)}},onAsk(v){return d.add(v),()=>{d.delete(v)}},subscribe(v){return h.add(v),()=>{h.delete(v)}},async invoke(v,w=[],C){const E=C?.timeoutMs??XL,M=new AbortController;let U=!1;const B=setTimeout(()=>{U=!0,M.abort()},E),X=C?.signal,Q=()=>{M.abort()};X?.addEventListener("abort",Q),X?.aborted===!0&&M.abort();try{let R;try{R=await fetch("/api/invoke",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({method:v,args:w}),signal:M.signal})}catch(se){throw M.signal.aborted?new QL(U?"timeout":"aborted",E):se}const V=await R.json().catch(()=>null);if(R.status===401&&(l=V?.error??"界面凭据已失效,请用宿主新打印的地址重开",_("closed")),!R.ok)throw new Error(V?.error??`HTTP ${String(R.status)}`);if(V?.ok!==!0)throw new Error(V?.error??"调用失败");return V.value}finally{clearTimeout(B),X?.removeEventListener("abort",Q)}},close(){u=!0,s="closed",o?.close(),o=null,g()}}}const eN={tokens:0,cost:null};function tN(e=null){const t=dr(),[n,s]=I.useState(eN);return I.useEffect(()=>{let l=!0;const o=()=>{t.invoke("usageStats").then(h=>{if(!l)return;const p=h.days[h.days.length-1];s({tokens:p===void 0?0:p.inputTokens+p.outputTokens,cost:p?.costCny??null})}).catch(()=>{})};o();const u=window.setInterval(o,6e4);return()=>{l=!1,window.clearInterval(u)}},[t,e]),n}const iN={noticeExtensions:"tui.notice.extensions"};function nN(e){return e}function rN(e){if(e===null)return null;const t=e.status;if(t===null||typeof t!="object")return null;const n=t,s=n.usage;return{sessionId:typeof n.sessionId=="string"?n.sessionId:null,model:typeof n.model=="string"?n.model:"",effort:typeof n.effort=="string"?n.effort:null,turnState:typeof n.turnState=="string"?n.turnState:"unknown",usage:s!==null&&typeof s=="object"?{inputTokens:Number(s.inputTokens??0),outputTokens:Number(s.outputTokens??0)}:null,...typeof n.contextWindow=="number"?{contextWindow:n.contextWindow}:{}}}const hp=new Set;function sN(e){for(const t of hp)t(e)}function G8(e){return hp.add(e),()=>{hp.delete(e)}}const X8="actions",lN=Object.freeze([]),aN=()=>()=>{},z4=()=>lN;function oN(){const e=K5(X8);return I.useSyncExternalStore(e?.subscribe??aN,e?.list??z4,z4)}const cN=Object.freeze(Object.defineProperty({__proto__:null,ACTIONS_SERVICE:X8,CODE_FILE_ARTWORK:Sm,CODE_FILE_ICON_ID_TOKEN:ym,CODE_FILE_TYPES:bm,COMPLETION_SOUND_VARIANTS:_m,CodeFileIcon:km,CodeView:u6,CsvView:Hb,DEFAULT_CAPS:HC,DEFAULT_FIELDS:v_,DOCK_DEFAULT_WIDTH:t_,DOCK_MAX_WIDTH:Dh,DOCK_MIN_WIDTH:Ah,DiffRows:vm,EFFORT_WIRE_HINT:zC,FileIcon:ac,FileTypeIcon:Em,HUMAN_WAIT_TIMEOUT_MS:ZL,IconActivity:BS,IconArchive:DS,IconArchiveOff:zS,IconArrowRight:aS,IconArrowUp:lS,IconBolt:om,IconBrain:wS,IconBranch:Xh,IconCalendar:NS,IconChart:RS,IconCheck:lm,IconChevronDown:Wh,IconChevronLeft:_h,IconChevronRight:rS,IconChevronUp:sS,IconCircle:_S,IconClock:fS,IconClose:CS,IconCode:Zh,IconCoins:vS,IconCopy:uS,IconCopyColor:KS,IconDatabase:jS,IconDiff:kS,IconEdit:vh,IconExpand:oS,IconFlatList:LS,IconFolder:ns,IconFolderColor:VS,IconFolderOpen:nS,IconFolderOpenColor:qS,IconGear:am,IconGlobe:aa,IconInfo:gh,IconKey:TS,IconLayers:SS,IconMore:MS,IconNewChat:FS,IconPackage:bS,IconPhone:yS,IconPin:OS,IconPlus:sm,IconPuzzle:Gh,IconQueue:yh,IconRefresh:pS,IconRestart:mS,IconSearch:Qr,IconShield:dS,IconSidebar:qs,IconSort:AS,IconSpark:la,IconStop:cS,IconStore:xS,IconSwap:hS,IconTarget:gS,IconTerminal:rs,IconTerminalColor:$S,IconThumbDown:IS,IconThumbUp:HS,IconTrash:ES,IconTree:Qh,IconTriangleRightFill:PS,IconVSCodeColor:YS,KNOWN_TOOLS:S_,LoadingStatus:XS,MODALITIES:OC,MODALITY_LABELS:BC,MUTATION_CONTENT_FIELDS:__,MarkdownView:Db,NATIVE_UNAVAILABLE:Qm,NO_ENTRIES:Jh,NO_SESSIONS:um,PANEL_KEYS:Lt,PdfView:Lb,REVIEW_ACTION_TEXT:Nb,REVIEW_NOTICE_BANNER:uf,ReviewNoticeCard:Bb,SHIKI_LANG_BY_EXT:hm,SIDEBAR_MAX:Mh,SIDEBAR_MIN:Th,SLOT:bt,STORED_MAX:n_,SUMMARY_FIELDS:g_,Select:d_,Skeleton:cm,SkeletonText:GS,THINKING_LEVELS:AC,THINKING_LEVEL_LABELS:NC,THINKING_PARAMS:DC,THINKING_PARAM_LABELS:jC,THREAD_EDGE_BUDGET:e_,THREAD_MIN:Jr,TOOL_STATUS_TEXT:Zb,TUI_SLOTS:iN,Text:o6,ThreadResizer:p_,UNKNOWN_TOOL_ICON:b_,UNKNOWN_TOOL_TITLE:w_,XlsxView:Ib,averageTtftMs:J5,baseNameOf:Mb,basename:lc,classifyCodeFileType:Cm,classifyFileType:nf,clearTraceFocus:dL,confirmAction:p6,createSignal:pa,defineStore:_C,defineUiPlugin:nN,diffLines:UC,displayPathOf:Zo,dockActions:Hn,dockSurface:Nh,entryTs:Pb,errText:Z5,estimateTextTokens:MC,fileExtension:wm,fileIconName:v6,findLast:h6,formatBytes:ZS,formatClock:Fb,formatClockSeconds:Ub,formatCostCny:Wb,formatDuration:Vb,formatTokens:Kb,formatTokensPerSecond:eS,formatTraceDuration:qb,getHighlighter:ma,getHostNative:Qs,highlightLines:mm,highlightToHtml:dm,highlightToLines:pm,hostStatus:rN,humanErrorLine:l6,humanErrorText:a6,humanizeError:ef,iconSizeStyle:rm,isCodeFileType:xm,isReviewNotice:h_,joinPath:Xm,langForPath:tf,loadLang:sc,matchTool:Qb,onAppearanceRequest:G8,oneLine:Vo,openDockBrowserTab:E_,openDockTab:$o,openTrace:fL,parseReviewNotice:zb,parseUnifiedDiff:nm,playCompletionSound:d6,prettyJson:e8,primePanelGeometry:Oh,readCompactingSince:i6,readCssColor:Sh,readCssSolidColor:_6,readCssValue:m6,readCwd:QS,readEntries:n6,readLive:r6,readRightRailPx:i_,readRootPx:oa,readSessionId:s6,readSessionPath:e6,readSessions:JS,readSidebarDefaultPx:c_,readStoredFlag:a_,readStoredPx:sa,readTurnState:t6,registerDockTab:x8,requestAppearance:sN,reviewLineKindOf:u_,sameGitSurface:tS,setDockPreview:E8,setDockReview:k_,setDockSubagent:M8,setDockWorkOutput:A8,setPanelGeometrySaver:l_,setRootVar:Nn,setShellPage:Qo,setThreadView:oh,shellPage:B8,shellThreadView:H8,shortUrl:y_,splitUnifiedDiffByFile:iS,subscribeDock:va,subscribePage:j8,subscribeThreadView:O_,toHexColor:gm,toastErr:m_,toastOk:Yb,tokensPerSecond:Q5,toolArgFields:Gb,toolSummary:Xb,toolVerb:Jb,traceFocusStep:I8,trimZero:Lh,useActions:oN,useActivePreviewPath:R8,useAskStream:SL,useChannelStatus:R_,useDialogFocus:WS,useDockPatchSource:T8,useDockReview:hf,useDockSurface:hc,useHostChannel:dr,useHostError:U8,useHostNative:Jm,useHostSelector:Jo,useHostSnapshot:vL,useHoverDelay:y6,useSeat:G5,useService:K5,useShellPage:D_,useThreadView:P8,useTodayUsage:tN,useTraceFocus:pL,useWidthDrag:ca,writeStoredFlag:o_,writeStoredPx:ts},Symbol.toStringTag,{value:"Module"}));var Z8=Object.defineProperty,uN=Object.getOwnPropertyDescriptor,hN=(e,t)=>{for(var n in t)Z8(e,n,{get:t[n],enumerable:!0})},vt=(e,t,n,s)=>{for(var l=s>1?void 0:s?uN(t,n):t,o=e.length-1,u;o>=0;o--)(u=e[o])&&(l=(s?u(t,n,l):u(l))||l);return s&&l&&Z8(t,n,l),l},pe=(e,t)=>(n,s)=>t(n,s,e),B4="Terminal input",fp={get:()=>B4,set:e=>B4=e},j4="Too much output to announce, navigate to rows manually to read",dp={get:()=>j4,set:e=>j4=e};function fN(e){return e.replace(/\r?\n/g,"\r")}function dN(e,t){return t?"\x1B[200~"+e+"\x1B[201~":e}function pN(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()}function mN(e,t,n,s){if(e.stopPropagation(),e.clipboardData){let l=e.clipboardData.getData("text/plain");Q8(l,t,n,s)}}function Q8(e,t,n,s){e=fN(e),e=dN(e,n.decPrivateModes.bracketedPasteMode&&s.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=""}function J8(e,t,n){let s=n.getBoundingClientRect(),l=e.clientX-s.left-10,o=e.clientY-s.top-10;t.style.width="20px",t.style.height="20px",t.style.left=`${l}px`,t.style.top=`${o}px`,t.style.zIndex="1000",t.focus()}function H4(e,t,n,s,l){J8(e,t,n),l&&s.rightClickSelect(e),t.value=s.selectionText,t.select()}function Zr(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function ff(e,t=0,n=e.length){let s="";for(let l=t;l<n;++l){let o=e[l];o>65535?(o-=65536,s+=String.fromCharCode((o>>10)+55296)+String.fromCharCode(o%1024+56320)):s+=String.fromCharCode(o)}return s}var _N=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let s=0,l=0;if(this._interim){let o=e.charCodeAt(l++);56320<=o&&o<=57343?t[s++]=(this._interim-55296)*1024+o-56320+65536:(t[s++]=this._interim,t[s++]=o),this._interim=0}for(let o=l;o<n;++o){let u=e.charCodeAt(o);if(55296<=u&&u<=56319){if(++o>=n)return this._interim=u,s;let h=e.charCodeAt(o);56320<=h&&h<=57343?t[s++]=(u-55296)*1024+h-56320+65536:(t[s++]=u,t[s++]=h);continue}u!==65279&&(t[s++]=u)}return s}},gN=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let s=0,l,o,u,h,p=0,d=0;if(this.interim[0]){let S=!1,v=this.interim[0];v&=(v&224)===192?31:(v&240)===224?15:7;let w=0,C;for(;(C=this.interim[++w]&63)&&w<4;)v<<=6,v|=C;let E=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,M=E-w;for(;d<M;){if(d>=n)return 0;if(C=e[d++],(C&192)!==128){d--,S=!0;break}else this.interim[w++]=C,v<<=6,v|=C&63}S||(E===2?v<128?d--:t[s++]=v:E===3?v<2048||v>=55296&&v<=57343||v===65279||(t[s++]=v):v<65536||v>1114111||(t[s++]=v)),this.interim.fill(0)}let g=n-4,_=d;for(;_<n;){for(;_<g&&!((l=e[_])&128)&&!((o=e[_+1])&128)&&!((u=e[_+2])&128)&&!((h=e[_+3])&128);)t[s++]=l,t[s++]=o,t[s++]=u,t[s++]=h,_+=4;if(l=e[_++],l<128)t[s++]=l;else if((l&224)===192){if(_>=n)return this.interim[0]=l,s;if(o=e[_++],(o&192)!==128){_--;continue}if(p=(l&31)<<6|o&63,p<128){_--;continue}t[s++]=p}else if((l&240)===224){if(_>=n)return this.interim[0]=l,s;if(o=e[_++],(o&192)!==128){_--;continue}if(_>=n)return this.interim[0]=l,this.interim[1]=o,s;if(u=e[_++],(u&192)!==128){_--;continue}if(p=(l&15)<<12|(o&63)<<6|u&63,p<2048||p>=55296&&p<=57343||p===65279)continue;t[s++]=p}else if((l&248)===240){if(_>=n)return this.interim[0]=l,s;if(o=e[_++],(o&192)!==128){_--;continue}if(_>=n)return this.interim[0]=l,this.interim[1]=o,s;if(u=e[_++],(u&192)!==128){_--;continue}if(_>=n)return this.interim[0]=l,this.interim[1]=o,this.interim[2]=u,s;if(h=e[_++],(h&192)!==128){_--;continue}if(p=(l&7)<<18|(o&63)<<12|(u&63)<<6|h&63,p<65536||p>1114111)continue;t[s++]=p}}return s}},e7="",is=" ",fc=class t7{constructor(){this.fg=0,this.bg=0,this.extended=new Hh}static toColorRGB(t){return[t>>>16&255,t>>>8&255,t&255]}static fromColorRGB(t){return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255}clone(){let t=new t7;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},Hh=class i7{constructor(t=0,n=0){this._ext=0,this._urlId=0,this._ext=t,this._urlId=n}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(t){this._ext&=-67108864,this._ext|=t&67108863}get urlId(){return this._urlId}set urlId(t){this._urlId=t}get underlineVariantOffset(){let t=(this._ext&3758096384)>>29;return t<0?t^4294967288:t}set underlineVariantOffset(t){this._ext&=536870911,this._ext|=t<<29&3758096384}clone(){return new i7(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},sn=class n7 extends fc{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new Hh,this.combinedData=""}static fromCharData(t){let n=new n7;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?Zr(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(t){this.fg=t[0],this.bg=0;let n=!1;if(t[1].length>2)n=!0;else if(t[1].length===2){let s=t[1].charCodeAt(0);if(55296<=s&&s<=56319){let l=t[1].charCodeAt(1);56320<=l&&l<=57343?this.content=(s-55296)*1024+l-56320+65536|t[2]<<22:n=!0}else n=!0}else this.content=t[1].charCodeAt(0)|t[2]<<22;n&&(this.combinedData=t[1],this.content=2097152|t[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},I4="di$target",pp="di$dependencies",w0=new Map;function vN(e){return e[pp]||[]}function $t(e){if(w0.has(e))return w0.get(e);let t=function(n,s,l){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");yN(t,n,l)};return t._id=e,w0.set(e,t),t}function yN(e,t,n){t[I4]===t?t[pp].push({id:e,index:n}):(t[pp]=[{id:e,index:n}],t[I4]=t)}var mi=$t("BufferService"),r7=$t("CoreMouseService"),el=$t("CoreService"),SN=$t("CharsetService"),L_=$t("InstantiationService"),s7=$t("LogService"),_i=$t("OptionsService"),l7=$t("OscLinkService"),bN=$t("UnicodeService"),dc=$t("DecorationService"),mp=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let s=[],l=this._optionsService.rawOptions.linkHandler,o=new sn,u=n.getTrimmedLength(),h=-1,p=-1,d=!1;for(let g=0;g<u;g++)if(!(p===-1&&!n.hasContent(g))){if(n.loadCell(g,o),o.hasExtendedAttrs()&&o.extended.urlId)if(p===-1){p=g,h=o.extended.urlId;continue}else d=o.extended.urlId!==h;else p!==-1&&(d=!0);if(d||p!==-1&&g===u-1){let _=this._oscLinkService.getLinkData(h)?.uri;if(_){let S={start:{x:p+1,y:e},end:{x:g+(!d&&g===u-1?1:0),y:e}},v=!1;if(!l?.allowNonHttpProtocols)try{let w=new URL(_);["http:","https:"].includes(w.protocol)||(v=!0)}catch{v=!0}v||s.push({text:_,range:S,activate:(w,C)=>l?l.activate(w,C,S):wN(w,C),hover:(w,C)=>l?.hover?.(w,C,S),leave:(w,C)=>l?.leave?.(w,C,S)})}d=!1,o.hasExtendedAttrs()&&o.extended.urlId?(p=g,h=o.extended.urlId):(p=-1,h=-1)}}t(s)}};mp=vt([pe(0,mi),pe(1,_i),pe(2,l7)],mp);function wN(e,t){if(confirm(`Do you want to navigate to ${t}?
64
-
65
- WARNING: This link could potentially be dangerous`)){let n=window.open();if(n){try{n.opener=null}catch{}n.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}}var df=$t("CharSizeService"),pr=$t("CoreBrowserService"),N_=$t("MouseService"),mr=$t("RenderService"),xN=$t("SelectionService"),a7=$t("CharacterJoinerService"),ya=$t("ThemeService"),o7=$t("LinkProviderService"),CN=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?P4.isErrorNoTelemetry(e)?new P4(e.message+`
66
-
67
- `+e.stack):new Error(e.message+`
68
-
69
- `+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},EN=new CN;function ch(e){kN(e)||EN.onUnexpectedError(e)}var _p="Canceled";function kN(e){return e instanceof TN?!0:e instanceof Error&&e.name===_p&&e.message===_p}var TN=class extends Error{constructor(){super(_p),this.name=this.message}};function MN(e){return new Error(`Illegal argument: ${e}`)}var P4=class gp extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof gp)return t;let n=new gp;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},vp=class c7 extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,c7.prototype)}};function Hi(e,t=0){return e[e.length-(1+t)]}var AN;(e=>{function t(o){return o<0}e.isLessThan=t;function n(o){return o<=0}e.isLessThanOrEqual=n;function s(o){return o>0}e.isGreaterThan=s;function l(o){return o===0}e.isNeitherLessOrGreaterThan=l,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(AN||={});function DN(e,t){let n=this,s=!1,l;return function(){return s||(s=!0,t||(l=e.apply(n,arguments))),l}}var u7;(e=>{function t(X){return X&&typeof X=="object"&&typeof X[Symbol.iterator]=="function"}e.is=t;let n=Object.freeze([]);function s(){return n}e.empty=s;function*l(X){yield X}e.single=l;function o(X){return t(X)?X:l(X)}e.wrap=o;function u(X){return X||n}e.from=u;function*h(X){for(let Q=X.length-1;Q>=0;Q--)yield X[Q]}e.reverse=h;function p(X){return!X||X[Symbol.iterator]().next().done===!0}e.isEmpty=p;function d(X){return X[Symbol.iterator]().next().value}e.first=d;function g(X,Q){let R=0;for(let V of X)if(Q(V,R++))return!0;return!1}e.some=g;function _(X,Q){for(let R of X)if(Q(R))return R}e.find=_;function*S(X,Q){for(let R of X)Q(R)&&(yield R)}e.filter=S;function*v(X,Q){let R=0;for(let V of X)yield Q(V,R++)}e.map=v;function*w(X,Q){let R=0;for(let V of X)yield*Q(V,R++)}e.flatMap=w;function*C(...X){for(let Q of X)yield*Q}e.concat=C;function E(X,Q,R){let V=R;for(let se of X)V=Q(V,se);return V}e.reduce=E;function*M(X,Q,R=X.length){for(Q<0&&(Q+=X.length),R<0?R+=X.length:R>X.length&&(R=X.length);Q<R;Q++)yield X[Q]}e.slice=M;function U(X,Q=Number.POSITIVE_INFINITY){let R=[];if(Q===0)return[R,X];let V=X[Symbol.iterator]();for(let se=0;se<Q;se++){let me=V.next();if(me.done)return[R,e.empty()];R.push(me.value)}return[R,{[Symbol.iterator](){return V}}]}e.consume=U;async function B(X){let Q=[];for await(let R of X)Q.push(R);return Promise.resolve(Q)}e.asyncToArray=B})(u7||={});function Gs(e){if(u7.is(e)){let t=[];for(let n of e)if(n)try{n.dispose()}catch(s){t.push(s)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function ON(...e){return ht(()=>Gs(e))}function ht(e){return{dispose:DN(()=>{e()})}}var h7=class f7{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Gs(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?f7.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),void 0)}};h7.DISABLE_DISPOSED_WARNING=!1;var ls=h7,Pe=class{constructor(){this._store=new ls,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};Pe.None=Object.freeze({dispose(){}});var ha=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e}},cr=typeof window=="object"?window:globalThis,yp=class Sp{constructor(t){this.element=t,this.next=Sp.Undefined,this.prev=Sp.Undefined}};yp.Undefined=new yp(void 0);var dt=yp,F4=class{constructor(){this._first=dt.Undefined,this._last=dt.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===dt.Undefined}clear(){let e=this._first;for(;e!==dt.Undefined;){let t=e.next;e.prev=dt.Undefined,e.next=dt.Undefined,e=t}this._first=dt.Undefined,this._last=dt.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let n=new dt(e);if(this._first===dt.Undefined)this._first=n,this._last=n;else if(t){let l=this._last;this._last=n,n.prev=l,l.next=n}else{let l=this._first;this._first=n,n.next=l,l.prev=n}this._size+=1;let s=!1;return()=>{s||(s=!0,this._remove(n))}}shift(){if(this._first!==dt.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==dt.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==dt.Undefined&&e.next!==dt.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===dt.Undefined&&e.next===dt.Undefined?(this._first=dt.Undefined,this._last=dt.Undefined):e.next===dt.Undefined?(this._last=this._last.prev,this._last.next=dt.Undefined):e.prev===dt.Undefined&&(this._first=this._first.next,this._first.prev=dt.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==dt.Undefined;)yield e.element,e=e.next}},RN=globalThis.performance&&typeof globalThis.performance.now=="function",LN=class d7{static create(t){return new d7(t)}constructor(t){this._now=RN&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},ni;(e=>{e.None=()=>Pe.None;function t(W,q){return _(W,()=>{},0,void 0,!0,void 0,q)}e.defer=t;function n(W){return(q,Z=null,P)=>{let H=!1,ie;return ie=W($=>{if(!H)return ie?ie.dispose():H=!0,q.call(Z,$)},null,P),H&&ie.dispose(),ie}}e.once=n;function s(W,q,Z){return d((P,H=null,ie)=>W($=>P.call(H,q($)),null,ie),Z)}e.map=s;function l(W,q,Z){return d((P,H=null,ie)=>W($=>{q($),P.call(H,$)},null,ie),Z)}e.forEach=l;function o(W,q,Z){return d((P,H=null,ie)=>W($=>q($)&&P.call(H,$),null,ie),Z)}e.filter=o;function u(W){return W}e.signal=u;function h(...W){return(q,Z=null,P)=>{let H=ON(...W.map(ie=>ie($=>q.call(Z,$))));return g(H,P)}}e.any=h;function p(W,q,Z,P){let H=Z;return s(W,ie=>(H=q(H,ie),H),P)}e.reduce=p;function d(W,q){let Z,P={onWillAddFirstListener(){Z=W(H.fire,H)},onDidRemoveLastListener(){Z?.dispose()}},H=new ue(P);return q?.add(H),H.event}function g(W,q){return q instanceof Array?q.push(W):q&&q.add(W),W}function _(W,q,Z=100,P=!1,H=!1,ie,$){let oe,T,ze,We=0,O,D={leakWarningThreshold:ie,onWillAddFirstListener(){oe=W(ae=>{We++,T=q(T,ae),P&&!ze&&(ne.fire(T),T=void 0),O=()=>{let de=T;T=void 0,ze=void 0,(!P||We>1)&&ne.fire(de),We=0},typeof Z=="number"?(clearTimeout(ze),ze=setTimeout(O,Z)):ze===void 0&&(ze=0,queueMicrotask(O))})},onWillRemoveListener(){H&&We>0&&O?.()},onDidRemoveLastListener(){O=void 0,oe.dispose()}},ne=new ue(D);return $?.add(ne),ne.event}e.debounce=_;function S(W,q=0,Z){return e.debounce(W,(P,H)=>P?(P.push(H),P):[H],q,void 0,!0,void 0,Z)}e.accumulate=S;function v(W,q=(P,H)=>P===H,Z){let P=!0,H;return o(W,ie=>{let $=P||!q(ie,H);return P=!1,H=ie,$},Z)}e.latch=v;function w(W,q,Z){return[e.filter(W,q,Z),e.filter(W,P=>!q(P),Z)]}e.split=w;function C(W,q=!1,Z=[],P){let H=Z.slice(),ie=W(T=>{H?H.push(T):oe.fire(T)});P&&P.add(ie);let $=()=>{H?.forEach(T=>oe.fire(T)),H=null},oe=new ue({onWillAddFirstListener(){ie||(ie=W(T=>oe.fire(T)),P&&P.add(ie))},onDidAddFirstListener(){H&&(q?setTimeout($):$())},onDidRemoveLastListener(){ie&&ie.dispose(),ie=null}});return P&&P.add(oe),oe.event}e.buffer=C;function E(W,q){return(Z,P,H)=>{let ie=q(new U);return W(function($){let oe=ie.evaluate($);oe!==M&&Z.call(P,oe)},void 0,H)}}e.chain=E;let M=Symbol("HaltChainable");class U{constructor(){this.steps=[]}map(q){return this.steps.push(q),this}forEach(q){return this.steps.push(Z=>(q(Z),Z)),this}filter(q){return this.steps.push(Z=>q(Z)?Z:M),this}reduce(q,Z){let P=Z;return this.steps.push(H=>(P=q(P,H),P)),this}latch(q=(Z,P)=>Z===P){let Z=!0,P;return this.steps.push(H=>{let ie=Z||!q(H,P);return Z=!1,P=H,ie?H:M}),this}evaluate(q){for(let Z of this.steps)if(q=Z(q),q===M)break;return q}}function B(W,q,Z=P=>P){let P=(...oe)=>$.fire(Z(...oe)),H=()=>W.on(q,P),ie=()=>W.removeListener(q,P),$=new ue({onWillAddFirstListener:H,onDidRemoveLastListener:ie});return $.event}e.fromNodeEventEmitter=B;function X(W,q,Z=P=>P){let P=(...oe)=>$.fire(Z(...oe)),H=()=>W.addEventListener(q,P),ie=()=>W.removeEventListener(q,P),$=new ue({onWillAddFirstListener:H,onDidRemoveLastListener:ie});return $.event}e.fromDOMEventEmitter=X;function Q(W){return new Promise(q=>n(W)(q))}e.toPromise=Q;function R(W){let q=new ue;return W.then(Z=>{q.fire(Z)},()=>{q.fire(void 0)}).finally(()=>{q.dispose()}),q.event}e.fromPromise=R;function V(W,q){return W(Z=>q.fire(Z))}e.forward=V;function se(W,q,Z){return q(Z),W(P=>q(P))}e.runAndSubscribe=se;class me{constructor(q,Z){this._observable=q,this._counter=0,this._hasChanged=!1;let P={onWillAddFirstListener:()=>{q.addObserver(this)},onDidRemoveLastListener:()=>{q.removeObserver(this)}};this.emitter=new ue(P),Z&&Z.add(this.emitter)}beginUpdate(q){this._counter++}handlePossibleChange(q){}handleChange(q,Z){this._hasChanged=!0}endUpdate(q){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function k(W,q){return new me(W,q).emitter.event}e.fromObservable=k;function K(W){return(q,Z,P)=>{let H=0,ie=!1,$={beginUpdate(){H++},endUpdate(){H--,H===0&&(W.reportChanges(),ie&&(ie=!1,q.call(Z)))},handlePossibleChange(){},handleChange(){ie=!0}};W.addObserver($),W.reportChanges();let oe={dispose(){W.removeObserver($)}};return P instanceof ls?P.add(oe):Array.isArray(P)&&P.push(oe),oe}}e.fromObservableLight=K})(ni||={});var bp=class wp{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${wp._idPool++}`,wp.all.add(this)}start(t){this._stopWatch=new LN,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};bp.all=new Set,bp._idPool=0;var NN=bp,zN=-1,p7=class m7{constructor(t,n,s=(m7._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=n,this.name=s,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,n){let s=this.threshold;if(s<=0||n<s)return;this._stacks||(this._stacks=new Map);let l=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,l+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=s*.5;let[o,u]=this.getMostFrequentStack(),h=`[${this.name}] potential listener LEAK detected, having ${n} listeners already. MOST frequent listener (${u}):`;console.warn(h),console.warn(o);let p=new HN(h,o);this._errorHandler(p)}return()=>{let o=this._stacks.get(t.value)||0;this._stacks.set(t.value,o-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,n=0;for(let[s,l]of this._stacks)(!t||n<l)&&(t=[s,l],n=l);return t}};p7._idPool=1;var BN=p7,jN=class _7{constructor(t){this.value=t}static create(){let t=new Error;return new _7(t.stack??"")}print(){console.warn(this.value.split(`
70
- `).slice(2).join(`
71
- `))}},HN=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},IN=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},PN=0,x0=class{constructor(e){this.value=e,this.id=PN++}},FN=2,UN,ue=class{constructor(e){this._size=0,this._options=e,this._leakageMon=this._options?.leakWarningThreshold?new BN(e?.onListenerError??ch,this._options?.leakWarningThreshold??zN):void 0,this._perfMon=this._options?._profName?new NN(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,t,n)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let u=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(u);let h=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],p=new IN(`${u}. HINT: Stack shows most frequent listener (${h[1]}-times)`,h[0]);return(this._options?.onListenerError||ch)(p),Pe.None}if(this._disposed)return Pe.None;t&&(e=e.bind(t));let s=new x0(e),l;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(s.stack=jN.create(),l=this._leakageMon.check(s.stack,this._size+1)),this._listeners?this._listeners instanceof x0?(this._deliveryQueue??=new VN,this._listeners=[this._listeners,s]):this._listeners.push(s):(this._options?.onWillAddFirstListener?.(this),this._listeners=s,this._options?.onDidAddFirstListener?.(this)),this._size++;let o=ht(()=>{l?.(),this._removeListener(s)});return n instanceof ls?n.add(o):Array.isArray(n)&&n.push(o),o},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,n=t.indexOf(e);if(n===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[n]=void 0;let s=this._deliveryQueue.current===this;if(this._size*FN<=t.length){let l=0;for(let o=0;o<t.length;o++)t[o]?t[l++]=t[o]:s&&(this._deliveryQueue.end--,l<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=l}}_deliver(e,t){if(!e)return;let n=this._options?.onListenerError||ch;if(!n){e.value(t);return}try{e.value(t)}catch(s){n(s)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof x0)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}this._perfMon?.stop()}hasListeners(){return this._size>0}},VN=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},xp=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new ue,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new ue,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(t){return this.mapWindowIdToZoomLevel.get(this.getWindowId(t))??0}setZoomLevel(t,n){if(this.getZoomLevel(n)===t)return;let s=this.getWindowId(n);this.mapWindowIdToZoomLevel.set(s,t),this._onDidChangeZoomLevel.fire(s)}getZoomFactor(t){return this.mapWindowIdToZoomFactor.get(this.getWindowId(t))??1}setZoomFactor(t,n){this.mapWindowIdToZoomFactor.set(this.getWindowId(n),t)}setFullscreen(t,n){if(this.isFullscreen(n)===t)return;let s=this.getWindowId(n);this.mapWindowIdToFullScreen.set(s,t),this._onDidChangeFullscreen.fire(s)}isFullscreen(t){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(t))}getWindowId(t){return t.vscodeWindowId}};xp.INSTANCE=new xp;var z_=xp;function qN(e,t,n){typeof t=="string"&&(t=e.matchMedia(t)),t.addEventListener("change",n)}z_.INSTANCE.onDidChangeZoomLevel;function $N(e){return z_.INSTANCE.getZoomFactor(e)}z_.INSTANCE.onDidChangeFullscreen;var Sa=typeof navigator=="object"?navigator.userAgent:"",Cp=Sa.indexOf("Firefox")>=0,YN=Sa.indexOf("AppleWebKit")>=0,B_=Sa.indexOf("Chrome")>=0,KN=!B_&&Sa.indexOf("Safari")>=0;Sa.indexOf("Electron/")>=0;Sa.indexOf("Android")>=0;var C0=!1;if(typeof cr.matchMedia=="function"){let e=cr.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=cr.matchMedia("(display-mode: fullscreen)");C0=e.matches,qN(cr,e,({matches:n})=>{C0&&t.matches||(C0=n)})}var ta="en",Ep=!1,kp=!1,uh=!1,g7=!1,eh,hh=ta,U4=ta,WN,or,Ys=globalThis,Ui;typeof Ys.vscode<"u"&&typeof Ys.vscode.process<"u"?Ui=Ys.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Ui=process);var GN=typeof Ui?.versions?.electron=="string",XN=GN&&Ui?.type==="renderer";if(typeof Ui=="object"){Ep=Ui.platform==="win32",kp=Ui.platform==="darwin",uh=Ui.platform==="linux",uh&&Ui.env.SNAP&&Ui.env.SNAP_REVISION,Ui.env.CI||Ui.env.BUILD_ARTIFACTSTAGINGDIRECTORY,eh=ta,hh=ta;let e=Ui.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);eh=t.userLocale,U4=t.osLocale,hh=t.resolvedLanguage||ta,WN=t.languagePack?.translationsConfigFile}catch{}g7=!0}else typeof navigator=="object"&&!XN?(or=navigator.userAgent,Ep=or.indexOf("Windows")>=0,kp=or.indexOf("Macintosh")>=0,(or.indexOf("Macintosh")>=0||or.indexOf("iPad")>=0||or.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,uh=or.indexOf("Linux")>=0,or?.indexOf("Mobi")>=0,hh=globalThis._VSCODE_NLS_LANGUAGE||ta,eh=navigator.language.toLowerCase(),U4=eh):console.error("Unable to resolve platform.");var v7=Ep,Bn=kp,ZN=uh,V4=g7,In=or,Wr=hh,QN;(e=>{function t(){return Wr}e.value=t;function n(){return Wr.length===2?Wr==="en":Wr.length>=3?Wr[0]==="e"&&Wr[1]==="n"&&Wr[2]==="-":!1}e.isDefaultVariant=n;function s(){return Wr==="en"}e.isDefault=s})(QN||={});var JN=typeof Ys.postMessage=="function"&&!Ys.importScripts;(()=>{if(JN){let e=[];Ys.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let s=0,l=e.length;s<l;s++){let o=e[s];if(o.id===n.data.vscodeScheduleAsyncWork){e.splice(s,1),o.callback();return}}});let t=0;return n=>{let s=++t;e.push({id:s,callback:n}),Ys.postMessage({vscodeScheduleAsyncWork:s},"*")}}return e=>setTimeout(e)})();var ez=!!(In&&In.indexOf("Chrome")>=0);In&&In.indexOf("Firefox")>=0;!ez&&In&&In.indexOf("Safari")>=0;In&&In.indexOf("Edg/")>=0;In&&In.indexOf("Android")>=0;var Ql=typeof navigator=="object"?navigator:{};V4||document.queryCommandSupported&&document.queryCommandSupported("copy")||Ql&&Ql.clipboard&&Ql.clipboard.writeText,V4||Ql&&Ql.clipboard&&Ql.clipboard.readText;var j_=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},E0=new j_,q4=new j_,$4=new j_,tz=new Array(230),y7;(e=>{function t(h){return E0.keyCodeToStr(h)}e.toString=t;function n(h){return E0.strToKeyCode(h)}e.fromString=n;function s(h){return q4.keyCodeToStr(h)}e.toUserSettingsUS=s;function l(h){return $4.keyCodeToStr(h)}e.toUserSettingsGeneral=l;function o(h){return q4.strToKeyCode(h)||$4.strToKeyCode(h)}e.fromUserSettings=o;function u(h){if(h>=98&&h<=113)return null;switch(h){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return E0.keyCodeToStr(h)}e.toElectronAccelerator=u})(y7||={});var iz=class S7{constructor(t,n,s,l,o){this.ctrlKey=t,this.shiftKey=n,this.altKey=s,this.metaKey=l,this.keyCode=o}equals(t){return t instanceof S7&&this.ctrlKey===t.ctrlKey&&this.shiftKey===t.shiftKey&&this.altKey===t.altKey&&this.metaKey===t.metaKey&&this.keyCode===t.keyCode}getHashCode(){let t=this.ctrlKey?"1":"0",n=this.shiftKey?"1":"0",s=this.altKey?"1":"0",l=this.metaKey?"1":"0";return`K${t}${n}${s}${l}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toKeybinding(){return new nz([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},nz=class{constructor(e){if(e.length===0)throw MN("chords");this.chords=e}getHashCode(){let e="";for(let t=0,n=this.chords.length;t<n;t++)t!==0&&(e+=";"),e+=this.chords[t].getHashCode();return e}equals(e){if(e===null||this.chords.length!==e.chords.length)return!1;for(let t=0;t<this.chords.length;t++)if(!this.chords[t].equals(e.chords[t]))return!1;return!0}};function rz(e){if(e.charCode){let n=String.fromCharCode(e.charCode).toUpperCase();return y7.fromString(n)}let t=e.keyCode;if(t===3)return 7;if(Cp)switch(t){case 59:return 85;case 60:if(ZN)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(Bn)return 57;break}else if(YN&&(Bn&&t===93||!Bn&&t===92))return 57;return tz[t]||0}var sz=Bn?256:2048,lz=512,az=1024,oz=Bn?2048:256,Y4=class{constructor(e){this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState?.("AltGraph"),this.keyCode=rz(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=sz),this.altKey&&(t|=lz),this.shiftKey&&(t|=az),this.metaKey&&(t|=oz),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new iz(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}},K4=new WeakMap;function cz(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,n=e.parent.location;if(t.origin!=="null"&&n.origin!=="null"&&t.origin!==n.origin)return null}catch{return null}return e.parent}var uz=class{static getSameOriginWindowChain(e){let t=K4.get(e);if(!t){t=[],K4.set(e,t);let n=e,s;do s=cz(n),s?t.push({window:new WeakRef(n),iframeElement:n.frameElement||null}):t.push({window:new WeakRef(n),iframeElement:null}),n=s;while(n)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let n=0,s=0,l=this.getSameOriginWindowChain(e);for(let o of l){let u=o.window.deref();if(n+=u?.scrollY??0,s+=u?.scrollX??0,u===t||!o.iframeElement)break;let h=o.iframeElement.getBoundingClientRect();n+=h.top,s+=h.left}return{top:n,left:s}}},th=class{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type==="dblclick"&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX=="number"?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let n=uz.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=n.left,this.posy-=n.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},W4=class{constructor(e,t=0,n=0){this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=n,this.deltaX=t;let s=!1;if(B_){let l=navigator.userAgent.match(/Chrome\/(\d+)/);s=(l?parseInt(l[1]):123)<=122}if(e){let l=e,o=e,u=e.view?.devicePixelRatio||1;if(typeof l.wheelDeltaY<"u")s?this.deltaY=l.wheelDeltaY/(120*u):this.deltaY=l.wheelDeltaY/120;else if(typeof o.VERTICAL_AXIS<"u"&&o.axis===o.VERTICAL_AXIS)this.deltaY=-o.detail/3;else if(e.type==="wheel"){let h=e;h.deltaMode===h.DOM_DELTA_LINE?Cp&&!Bn?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof l.wheelDeltaX<"u")KN&&v7?this.deltaX=-(l.wheelDeltaX/120):s?this.deltaX=l.wheelDeltaX/(120*u):this.deltaX=l.wheelDeltaX/120;else if(typeof o.HORIZONTAL_AXIS<"u"&&o.axis===o.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){let h=e;h.deltaMode===h.DOM_DELTA_LINE?Cp&&!Bn?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(s?this.deltaY=e.wheelDelta/(120*u):this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent?.preventDefault()}stopPropagation(){this.browserEvent?.stopPropagation()}},b7=Object.freeze(function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}),hz;(e=>{function t(n){return n===e.None||n===e.Cancelled||n instanceof fz?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:ni.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:b7})})(hz||={});var fz=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?b7:(this._emitter||(this._emitter=new ue),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},H_=class{constructor(e,t){this._isDisposed=!1,this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new vp("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw new vp("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},dz=class{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,t,n=globalThis){if(this.isDisposed)throw new vp("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let s=n.setInterval(()=>{e()},t);this.disposable=ht(()=>{n.clearInterval(s),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}},pz;(e=>{async function t(s){let l,o=await Promise.all(s.map(u=>u.then(h=>h,h=>{l||(l=h)})));if(typeof l<"u")throw l;return o}e.settled=t;function n(s){return new Promise(async(l,o)=>{try{await s(l,o)}catch(u){o(u)}})}e.withAsyncBody=n})(pz||={});var G4=class tn{static fromArray(t){return new tn(n=>{n.emitMany(t)})}static fromPromise(t){return new tn(async n=>{n.emitMany(await t)})}static fromPromises(t){return new tn(async n=>{await Promise.all(t.map(async s=>n.emitOne(await s)))})}static merge(t){return new tn(async n=>{await Promise.all(t.map(async s=>{for await(let l of s)n.emitOne(l)}))})}constructor(t,n){this._state=0,this._results=[],this._error=null,this._onReturn=n,this._onStateChanged=new ue,queueMicrotask(async()=>{let s={emitOne:l=>this.emitOne(l),emitMany:l=>this.emitMany(l),reject:l=>this.reject(l)};try{await Promise.resolve(t(s)),this.resolve()}catch(l){this.reject(l)}finally{s.emitOne=void 0,s.emitMany=void 0,s.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await ni.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,n){return new tn(async s=>{for await(let l of t)s.emitOne(n(l))})}map(t){return tn.map(this,t)}static filter(t,n){return new tn(async s=>{for await(let l of t)n(l)&&s.emitOne(l)})}filter(t){return tn.filter(this,t)}static coalesce(t){return tn.filter(t,n=>!!n)}coalesce(){return tn.coalesce(this)}static async toPromise(t){let n=[];for await(let s of t)n.push(s);return n}toPromise(){return tn.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};G4.EMPTY=G4.fromArray([]);var{getWindow:zn,getWindowId:mz,onDidRegisterWindow:_z}=(function(){let e=new Map,t={window:cr,disposables:new ls};e.set(cr.vscodeWindowId,t);let n=new ue,s=new ue,l=new ue;function o(u,h){return(typeof u=="number"?e.get(u):void 0)??(h?t:void 0)}return{onDidRegisterWindow:n.event,onWillUnregisterWindow:l.event,onDidUnregisterWindow:s.event,registerWindow(u){if(e.has(u.vscodeWindowId))return Pe.None;let h=new ls,p={window:u,disposables:h.add(new ls)};return e.set(u.vscodeWindowId,p),h.add(ht(()=>{e.delete(u.vscodeWindowId),s.fire(u)})),h.add(Ae(u,Ft.BEFORE_UNLOAD,()=>{l.fire(u)})),n.fire(p),h},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(u){return u.vscodeWindowId},hasWindow(u){return e.has(u)},getWindowById:o,getWindow(u){let h=u;if(h?.ownerDocument?.defaultView)return h.ownerDocument.defaultView.window;let p=u;return p?.view?p.view.window:cr},getDocument(u){return zn(u).document}}})(),gz=class{constructor(e,t,n,s){this._node=e,this._type=t,this._handler=n,this._options=s||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function Ae(e,t,n,s){return new gz(e,t,n,s)}var X4=function(e,t,n,s){return Ae(e,t,n,s)},I_,vz=class extends dz{constructor(e){super(),this.defaultTarget=e&&zn(e)}cancelAndSet(e,t,n){return super.cancelAndSet(e,t,n??this.defaultTarget)}},Z4=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){ch(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let e=new Map,t=new Map,n=new Map,s=new Map,l=o=>{n.set(o,!1);let u=e.get(o)??[];for(t.set(o,u),e.set(o,[]),s.set(o,!0);u.length>0;)u.sort(Z4.sort),u.shift().execute();s.set(o,!1)};I_=(o,u,h=0)=>{let p=mz(o),d=new Z4(u,h),g=e.get(p);return g||(g=[],e.set(p,g)),g.push(d),n.get(p)||(n.set(p,!0),o.requestAnimationFrame(()=>l(p))),d}})();function yz(e){let t=e.getBoundingClientRect(),n=zn(e);return{left:t.left+n.scrollX,top:t.top+n.scrollY,width:t.width,height:t.height}}var Ft={CLICK:"click",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",KEY_DOWN:"keydown",KEY_UP:"keyup",BEFORE_UNLOAD:"beforeunload",CHANGE:"change",FOCUS:"focus",BLUR:"blur",INPUT:"input"},Sz=class{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingTop="",this._paddingLeft="",this._paddingBottom="",this._paddingRight="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){let t=Ci(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=Ci(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=Ci(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=Ci(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=Ci(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=Ci(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=Ci(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingTop(e){let t=Ci(e);this._paddingTop!==t&&(this._paddingTop=t,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(e){let t=Ci(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(e){let t=Ci(e);this._paddingBottom!==t&&(this._paddingBottom=t,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(e){let t=Ci(e);this._paddingRight!==t&&(this._paddingRight=t,this.domNode.style.paddingRight=this._paddingRight)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){let t=Ci(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){let t=Ci(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=Ci(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}};function Ci(e){return typeof e=="number"?`${e}px`:e}function Yo(e){return new Sz(e)}var w7=class{constructor(){this._hooks=new ls,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let n=this._onStopCallback;this._onStopCallback=null,e&&n&&n(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,n,s,l){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=s,this._onStopCallback=l;let o=e;try{e.setPointerCapture(t),this._hooks.add(ht(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{o=zn(e)}this._hooks.add(Ae(o,Ft.POINTER_MOVE,u=>{if(u.buttons!==n){this.stopMonitoring(!0);return}u.preventDefault(),this._pointerMoveCallback(u)})),this._hooks.add(Ae(o,Ft.POINTER_UP,u=>this.stopMonitoring(!0)))}};function bz(e,t,n){let s=null,l=null;if(typeof n.value=="function"?(s="value",l=n.value,l.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof n.get=="function"&&(s="get",l=n.get),!l)throw new Error("not supported");let o=`$memoize$${t}`;n[s]=function(...u){return this.hasOwnProperty(o)||Object.defineProperty(this,o,{configurable:!1,enumerable:!1,writable:!1,value:l.apply(this,u)}),this[o]}}var On;(e=>(e.Tap="-xterm-gesturetap",e.Change="-xterm-gesturechange",e.Start="-xterm-gesturestart",e.End="-xterm-gesturesend",e.Contextmenu="-xterm-gesturecontextmenu"))(On||={});var No=class li extends Pe{constructor(){super(),this.dispatched=!1,this.targets=new F4,this.ignoreTargets=new F4,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(ni.runAndSubscribe(_z,({window:t,disposables:n})=>{n.add(Ae(t.document,"touchstart",s=>this.onTouchStart(s),{passive:!1})),n.add(Ae(t.document,"touchend",s=>this.onTouchEnd(t,s))),n.add(Ae(t.document,"touchmove",s=>this.onTouchMove(s),{passive:!1}))},{window:cr,disposables:this._store}))}static addTarget(t){if(!li.isTouchDevice())return Pe.None;li.INSTANCE||(li.INSTANCE=new li);let n=li.INSTANCE.targets.push(t);return ht(n)}static ignoreTarget(t){if(!li.isTouchDevice())return Pe.None;li.INSTANCE||(li.INSTANCE=new li);let n=li.INSTANCE.ignoreTargets.push(t);return ht(n)}static isTouchDevice(){return"ontouchstart"in cr||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(t){let n=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let s=0,l=t.targetTouches.length;s<l;s++){let o=t.targetTouches.item(s);this.activeTouches[o.identifier]={id:o.identifier,initialTarget:o.target,initialTimeStamp:n,initialPageX:o.pageX,initialPageY:o.pageY,rollingTimestamps:[n],rollingPageX:[o.pageX],rollingPageY:[o.pageY]};let u=this.newGestureEvent(On.Start,o.target);u.pageX=o.pageX,u.pageY=o.pageY,this.dispatchEvent(u)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}onTouchEnd(t,n){let s=Date.now(),l=Object.keys(this.activeTouches).length;for(let o=0,u=n.changedTouches.length;o<u;o++){let h=n.changedTouches.item(o);if(!this.activeTouches.hasOwnProperty(String(h.identifier))){console.warn("move of an UNKNOWN touch",h);continue}let p=this.activeTouches[h.identifier],d=Date.now()-p.initialTimeStamp;if(d<li.HOLD_DELAY&&Math.abs(p.initialPageX-Hi(p.rollingPageX))<30&&Math.abs(p.initialPageY-Hi(p.rollingPageY))<30){let g=this.newGestureEvent(On.Tap,p.initialTarget);g.pageX=Hi(p.rollingPageX),g.pageY=Hi(p.rollingPageY),this.dispatchEvent(g)}else if(d>=li.HOLD_DELAY&&Math.abs(p.initialPageX-Hi(p.rollingPageX))<30&&Math.abs(p.initialPageY-Hi(p.rollingPageY))<30){let g=this.newGestureEvent(On.Contextmenu,p.initialTarget);g.pageX=Hi(p.rollingPageX),g.pageY=Hi(p.rollingPageY),this.dispatchEvent(g)}else if(l===1){let g=Hi(p.rollingPageX),_=Hi(p.rollingPageY),S=Hi(p.rollingTimestamps)-p.rollingTimestamps[0],v=g-p.rollingPageX[0],w=_-p.rollingPageY[0],C=[...this.targets].filter(E=>p.initialTarget instanceof Node&&E.contains(p.initialTarget));this.inertia(t,C,s,Math.abs(v)/S,v>0?1:-1,g,Math.abs(w)/S,w>0?1:-1,_)}this.dispatchEvent(this.newGestureEvent(On.End,p.initialTarget)),delete this.activeTouches[h.identifier]}this.dispatched&&(n.preventDefault(),n.stopPropagation(),this.dispatched=!1)}newGestureEvent(t,n){let s=document.createEvent("CustomEvent");return s.initEvent(t,!1,!0),s.initialTarget=n,s.tapCount=0,s}dispatchEvent(t){if(t.type===On.Tap){let n=new Date().getTime(),s=0;n-this._lastSetTapCountTime>li.CLEAR_TAP_COUNT_TIME?s=1:s=2,this._lastSetTapCountTime=n,t.tapCount=s}else(t.type===On.Change||t.type===On.Contextmenu)&&(this._lastSetTapCountTime=0);if(t.initialTarget instanceof Node){for(let s of this.ignoreTargets)if(s.contains(t.initialTarget))return;let n=[];for(let s of this.targets)if(s.contains(t.initialTarget)){let l=0,o=t.initialTarget;for(;o&&o!==s;)l++,o=o.parentElement;n.push([l,s])}n.sort((s,l)=>s[0]-l[0]);for(let[s,l]of n)l.dispatchEvent(t),this.dispatched=!0}}inertia(t,n,s,l,o,u,h,p,d){this.handle=I_(t,()=>{let g=Date.now(),_=g-s,S=0,v=0,w=!0;l+=li.SCROLL_FRICTION*_,h+=li.SCROLL_FRICTION*_,l>0&&(w=!1,S=o*l*_),h>0&&(w=!1,v=p*h*_);let C=this.newGestureEvent(On.Change);C.translationX=S,C.translationY=v,n.forEach(E=>E.dispatchEvent(C)),w||this.inertia(t,n,g,l,o,u+S,h,p,d+v)})}onTouchMove(t){let n=Date.now();for(let s=0,l=t.changedTouches.length;s<l;s++){let o=t.changedTouches.item(s);if(!this.activeTouches.hasOwnProperty(String(o.identifier))){console.warn("end of an UNKNOWN touch",o);continue}let u=this.activeTouches[o.identifier],h=this.newGestureEvent(On.Change,u.initialTarget);h.translationX=o.pageX-Hi(u.rollingPageX),h.translationY=o.pageY-Hi(u.rollingPageY),h.pageX=o.pageX,h.pageY=o.pageY,this.dispatchEvent(h),u.rollingPageX.length>3&&(u.rollingPageX.shift(),u.rollingPageY.shift(),u.rollingTimestamps.shift()),u.rollingPageX.push(o.pageX),u.rollingPageY.push(o.pageY),u.rollingTimestamps.push(n)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}};No.SCROLL_FRICTION=-.005,No.HOLD_DELAY=700,No.CLEAR_TAP_COUNT_TIME=400,vt([bz],No,"isTouchDevice",1);var wz=No,P_=class extends Pe{onclick(e,t){this._register(Ae(e,Ft.CLICK,n=>t(new th(zn(e),n))))}onmousedown(e,t){this._register(Ae(e,Ft.MOUSE_DOWN,n=>t(new th(zn(e),n))))}onmouseover(e,t){this._register(Ae(e,Ft.MOUSE_OVER,n=>t(new th(zn(e),n))))}onmouseleave(e,t){this._register(Ae(e,Ft.MOUSE_LEAVE,n=>t(new th(zn(e),n))))}onkeydown(e,t){this._register(Ae(e,Ft.KEY_DOWN,n=>t(new Y4(n))))}onkeyup(e,t){this._register(Ae(e,Ft.KEY_UP,n=>t(new Y4(n))))}oninput(e,t){this._register(Ae(e,Ft.INPUT,t))}onblur(e,t){this._register(Ae(e,Ft.BLUR,t))}onfocus(e,t){this._register(Ae(e,Ft.FOCUS,t))}onchange(e,t){this._register(Ae(e,Ft.CHANGE,t))}ignoreGesture(e){return wz.ignoreTarget(e)}},Q4=11,xz=class extends P_{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.style.position="absolute",this.domNode.style.width=Q4+"px",this.domNode.style.height=Q4+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new w7),this._register(X4(this.bgDomNode,Ft.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(X4(this.domNode,Ft.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new vz),this._pointerdownScheduleRepeatTimer=this._register(new H_)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,zn(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,n=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}},Cz=class Tp{constructor(t,n,s,l,o,u,h){this._forceIntegerValues=t,this._scrollStateBrand=void 0,this._forceIntegerValues&&(n=n|0,s=s|0,l=l|0,o=o|0,u=u|0,h=h|0),this.rawScrollLeft=l,this.rawScrollTop=h,n<0&&(n=0),l+n>s&&(l=s-n),l<0&&(l=0),o<0&&(o=0),h+o>u&&(h=u-o),h<0&&(h=0),this.width=n,this.scrollWidth=s,this.scrollLeft=l,this.height=o,this.scrollHeight=u,this.scrollTop=h}equals(t){return this.rawScrollLeft===t.rawScrollLeft&&this.rawScrollTop===t.rawScrollTop&&this.width===t.width&&this.scrollWidth===t.scrollWidth&&this.scrollLeft===t.scrollLeft&&this.height===t.height&&this.scrollHeight===t.scrollHeight&&this.scrollTop===t.scrollTop}withScrollDimensions(t,n){return new Tp(this._forceIntegerValues,typeof t.width<"u"?t.width:this.width,typeof t.scrollWidth<"u"?t.scrollWidth:this.scrollWidth,n?this.rawScrollLeft:this.scrollLeft,typeof t.height<"u"?t.height:this.height,typeof t.scrollHeight<"u"?t.scrollHeight:this.scrollHeight,n?this.rawScrollTop:this.scrollTop)}withScrollPosition(t){return new Tp(this._forceIntegerValues,this.width,this.scrollWidth,typeof t.scrollLeft<"u"?t.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof t.scrollTop<"u"?t.scrollTop:this.rawScrollTop)}createScrollEvent(t,n){let s=this.width!==t.width,l=this.scrollWidth!==t.scrollWidth,o=this.scrollLeft!==t.scrollLeft,u=this.height!==t.height,h=this.scrollHeight!==t.scrollHeight,p=this.scrollTop!==t.scrollTop;return{inSmoothScrolling:n,oldWidth:t.width,oldScrollWidth:t.scrollWidth,oldScrollLeft:t.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:t.height,oldScrollHeight:t.scrollHeight,oldScrollTop:t.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:s,scrollWidthChanged:l,scrollLeftChanged:o,heightChanged:u,scrollHeightChanged:h,scrollTopChanged:p}}},Ez=class extends Pe{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new ue),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new Cz(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){let n=this._state.withScrollDimensions(e,t);this._setState(n,!!this._smoothScrolling),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};let n=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;let s;t?s=new e5(this._smoothScrolling.from,n,this._smoothScrolling.startTime,this._smoothScrolling.duration):s=this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=s}else{let n=this._state.withScrollPosition(e);this._smoothScrolling=e5.start(this._state,n,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let n=this._state;n.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(n,t)))}},J4=class{constructor(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n}};function k0(e,t){let n=t-e;return function(s){return e+n*Mz(s)}}function kz(e,t,n){return function(s){return s<n?e(s/n):t((s-n)/(1-n))}}var e5=class Mp{constructor(t,n,s,l){this.from=t,this.to=n,this.duration=l,this.startTime=s,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(t,n,s){if(Math.abs(t-n)>2.5*s){let l,o;return t<n?(l=t+.75*s,o=n-.75*s):(l=t-.75*s,o=n+.75*s),kz(k0(t,l),k0(o,n),.33)}return k0(t,n)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(t){this.to=t.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(t){let n=(t-this.startTime)/this.duration;if(n<1){let s=this.scrollLeft(n),l=this.scrollTop(n);return new J4(s,l,!1)}return new J4(this.to.scrollLeft,this.to.scrollTop,!0)}combine(t,n,s){return Mp.start(t,n,s)}static start(t,n,s){s=s+10;let l=Date.now()-10;return new Mp(t,n,l,s)}};function Tz(e){return Math.pow(e,3)}function Mz(e){return 1-Tz(1-e)}var Az=class extends Pe{constructor(e,t,n){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=n,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new H_)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode?.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode?.setClassName(this._invisibleClassName+(e?" fade":"")))}},Dz=140,x7=class extends P_{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new Az(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new w7),this._shouldRender=!0,this.domNode=Yo(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(Ae(this.domNode.domNode,Ft.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){let t=this._register(new xz(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,n,s){this.slider=Yo(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof n=="number"&&this.slider.setWidth(n),typeof s=="number"&&this.slider.setHeight(s),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(Ae(this.slider.domNode,Ft.POINTER_DOWN,l=>{l.button===0&&(l.preventDefault(),this._sliderPointerDown(l))})),this.onclick(this.slider.domNode,l=>{l.leftButton&&l.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,n=t+this._scrollbarState.getSliderPosition(),s=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),l=this._sliderPointerPosition(e);n<=l&&l<=s?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,n;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,n=e.offsetY;else{let l=yz(this.domNode.domNode);t=e.pageX-l.left,n=e.pageY-l.top}let s=this._pointerDownRelativePosition(t,n);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(s):this._scrollbarState.getDesiredScrollPositionFromOffset(s)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),n=this._sliderOrthogonalPointerPosition(e),s=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,l=>{let o=this._sliderOrthogonalPointerPosition(l),u=Math.abs(o-n);if(v7&&u>Dz){this._setDesiredScrollPositionNow(s.getScrollPosition());return}let h=this._sliderPointerPosition(l)-t;this._setDesiredScrollPositionNow(s.getDesiredScrollPositionFromDelta(h))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}},C7=class Ap{constructor(t,n,s,l,o,u){this._scrollbarSize=Math.round(n),this._oppositeScrollbarSize=Math.round(s),this._arrowSize=Math.round(t),this._visibleSize=l,this._scrollSize=o,this._scrollPosition=u,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new Ap(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(t){let n=Math.round(t);return this._visibleSize!==n?(this._visibleSize=n,this._refreshComputedValues(),!0):!1}setScrollSize(t){let n=Math.round(t);return this._scrollSize!==n?(this._scrollSize=n,this._refreshComputedValues(),!0):!1}setScrollPosition(t){let n=Math.round(t);return this._scrollPosition!==n?(this._scrollPosition=n,this._refreshComputedValues(),!0):!1}setScrollbarSize(t){this._scrollbarSize=Math.round(t)}setOppositeScrollbarSize(t){this._oppositeScrollbarSize=Math.round(t)}static _computeValues(t,n,s,l,o){let u=Math.max(0,s-t),h=Math.max(0,u-2*n),p=l>0&&l>s;if(!p)return{computedAvailableSize:Math.round(u),computedIsNeeded:p,computedSliderSize:Math.round(h),computedSliderRatio:0,computedSliderPosition:0};let d=Math.round(Math.max(20,Math.floor(s*h/l))),g=(h-d)/(l-s),_=o*g;return{computedAvailableSize:Math.round(u),computedIsNeeded:p,computedSliderSize:Math.round(d),computedSliderRatio:g,computedSliderPosition:Math.round(_)}}_refreshComputedValues(){let t=Ap._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(t){if(!this._computedIsNeeded)return 0;let n=t-this._arrowSize-this._computedSliderSize/2;return Math.round(n/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(t){if(!this._computedIsNeeded)return 0;let n=t-this._arrowSize,s=this._scrollPosition;return n<this._computedSliderPosition?s-=this._visibleSize:s+=this._visibleSize,s}getDesiredScrollPositionFromDelta(t){if(!this._computedIsNeeded)return 0;let n=this._computedSliderPosition+t;return Math.round(n/this._computedSliderRatio)}},Oz=class extends x7{constructor(e,t,n){let s=e.getScrollDimensions(),l=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new C7(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,s.width,s.scrollWidth,l.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}},Rz=class extends x7{constructor(e,t,n){let s=e.getScrollDimensions(),l=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new C7(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,s.height,s.scrollHeight,l.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}},Lz=500,t5=50,Nz=class{constructor(e,t,n){this.timestamp=e,this.deltaX=t,this.deltaY=n,this.score=0}},Dp=class{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let t=1,n=0,s=1,l=this._rear;do{let o=l===this._front?t:Math.pow(2,-s);if(t-=o,n+=this._memory[l].score*o,l===this._front)break;l=(this._capacity+l-1)%this._capacity,s++}while(!0);return n<=.5}acceptStandardWheelEvent(t){if(B_){let n=zn(t.browserEvent),s=$N(n);this.accept(Date.now(),t.deltaX*s,t.deltaY*s)}else this.accept(Date.now(),t.deltaX,t.deltaY)}accept(t,n,s){let l=null,o=new Nz(t,n,s);this._front===-1&&this._rear===-1?(this._memory[0]=o,this._front=0,this._rear=0):(l=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=o),o.score=this._computeScore(o,l)}_computeScore(t,n){if(Math.abs(t.deltaX)>0&&Math.abs(t.deltaY)>0)return 1;let s=.5;if((!this._isAlmostInt(t.deltaX)||!this._isAlmostInt(t.deltaY))&&(s+=.25),n){let l=Math.abs(t.deltaX),o=Math.abs(t.deltaY),u=Math.abs(n.deltaX),h=Math.abs(n.deltaY),p=Math.max(Math.min(l,u),1),d=Math.max(Math.min(o,h),1),g=Math.max(l,u),_=Math.max(o,h);g%p===0&&_%d===0&&(s-=.5)}return Math.min(Math.max(s,0),1)}_isAlmostInt(t){return Math.abs(Math.round(t)-t)<.01}};Dp.INSTANCE=new Dp;var zz=Dp,Bz=class extends P_{constructor(e,t,n){super(),this._onScroll=this._register(new ue),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new ue),this.onWillScroll=this._onWillScroll.event,this._options=Hz(t),this._scrollable=n,this._register(this._scrollable.onScroll(l=>{this._onWillScroll.fire(l),this._onDidScroll(l),this._onScroll.fire(l)}));let s={onMouseWheel:l=>this._onMouseWheel(l),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new Rz(this._scrollable,this._options,s)),this._horizontalScrollbar=this._register(new Oz(this._scrollable,this._options,s)),this._domNode=document.createElement("div"),this._domNode.className="xterm-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=Yo(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=Yo(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=Yo(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,l=>this._onMouseOver(l)),this.onmouseleave(this._listenOnDomNode,l=>this._onMouseLeave(l)),this._hideTimeout=this._register(new H_),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=Gs(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,Bn&&(this._options.className+=" mac"),this._domNode.className="xterm-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(e){this._revealOnScroll=e}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new W4(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=Gs(this._mouseWheelToDispose),e)){let t=n=>{this._onMouseWheel(new W4(n))};this._mouseWheelToDispose.push(Ae(this._listenOnDomNode,Ft.MOUSE_WHEEL,t,{passive:!1}))}}_onMouseWheel(e){if(e.browserEvent?.defaultPrevented)return;let t=zz.INSTANCE;t.acceptStandardWheelEvent(e);let n=!1;if(e.deltaY||e.deltaX){let l=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&o+l===0?o=l=0:Math.abs(l)>=Math.abs(o)?o=0:l=0),this._options.flipAxes&&([l,o]=[o,l]);let u=!Bn&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||u)&&!o&&(o=l,l=0),e.browserEvent&&e.browserEvent.altKey&&(o=o*this._options.fastScrollSensitivity,l=l*this._options.fastScrollSensitivity);let h=this._scrollable.getFutureScrollPosition(),p={};if(l){let d=t5*l,g=h.scrollTop-(d<0?Math.floor(d):Math.ceil(d));this._verticalScrollbar.writeScrollPosition(p,g)}if(o){let d=t5*o,g=h.scrollLeft-(d<0?Math.floor(d):Math.ceil(d));this._horizontalScrollbar.writeScrollPosition(p,g)}p=this._scrollable.validateScrollPosition(p),(h.scrollLeft!==p.scrollLeft||h.scrollTop!==p.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(p):this._scrollable.setScrollPositionNow(p),n=!0)}let s=n;!s&&this._options.alwaysConsumeMouseWheel&&(s=!0),!s&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(s=!0),s&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0,s=n?" left":"",l=t?" top":"",o=n||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${s}`),this._topShadowDomNode.setClassName(`shadow${l}`),this._topLeftShadowDomNode.setClassName(`shadow${o}${l}${s}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),Lz)}},jz=class extends Bz{constructor(e,t,n){super(e,t,n)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}};function Hz(e){let t={lazyRender:typeof e.lazyRender<"u"?e.lazyRender:!1,className:typeof e.className<"u"?e.className:"",useShadows:typeof e.useShadows<"u"?e.useShadows:!0,handleMouseWheel:typeof e.handleMouseWheel<"u"?e.handleMouseWheel:!0,flipAxes:typeof e.flipAxes<"u"?e.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof e.consumeMouseWheelIfScrollbarIsNeeded<"u"?e.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof e.alwaysConsumeMouseWheel<"u"?e.alwaysConsumeMouseWheel:!1,scrollYToX:typeof e.scrollYToX<"u"?e.scrollYToX:!1,mouseWheelScrollSensitivity:typeof e.mouseWheelScrollSensitivity<"u"?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof e.fastScrollSensitivity<"u"?e.fastScrollSensitivity:5,scrollPredominantAxis:typeof e.scrollPredominantAxis<"u"?e.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof e.mouseWheelSmoothScroll<"u"?e.mouseWheelSmoothScroll:!0,arrowSize:typeof e.arrowSize<"u"?e.arrowSize:11,listenOnDomNode:typeof e.listenOnDomNode<"u"?e.listenOnDomNode:null,horizontal:typeof e.horizontal<"u"?e.horizontal:1,horizontalScrollbarSize:typeof e.horizontalScrollbarSize<"u"?e.horizontalScrollbarSize:10,horizontalSliderSize:typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:0,horizontalHasArrows:typeof e.horizontalHasArrows<"u"?e.horizontalHasArrows:!1,vertical:typeof e.vertical<"u"?e.vertical:1,verticalScrollbarSize:typeof e.verticalScrollbarSize<"u"?e.verticalScrollbarSize:10,verticalHasArrows:typeof e.verticalHasArrows<"u"?e.verticalHasArrows:!1,verticalSliderSize:typeof e.verticalSliderSize<"u"?e.verticalSliderSize:0,scrollByPage:typeof e.scrollByPage<"u"?e.scrollByPage:!1};return t.horizontalSliderSize=typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=typeof e.verticalSliderSize<"u"?e.verticalSliderSize:t.verticalScrollbarSize,Bn&&(t.className+=" mac"),t}var Op=class extends Pe{constructor(e,t,n,s,l,o,u,h){super(),this._bufferService=n,this._optionsService=u,this._renderService=h,this._onRequestScrollLines=this._register(new ue),this.onRequestScrollLines=this._onRequestScrollLines.event,this._isSyncing=!1,this._isHandlingScroll=!1,this._suppressOnScrollHandler=!1;let p=this._register(new Ez({forceIntegerValues:!1,smoothScrollDuration:this._optionsService.rawOptions.smoothScrollDuration,scheduleAtNextAnimationFrame:d=>I_(s.window,d)}));this._register(this._optionsService.onSpecificOptionChange("smoothScrollDuration",()=>{p.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration)})),this._scrollableElement=this._register(new jz(t,{vertical:1,horizontal:2,useShadows:!1,mouseWheelSmoothScroll:!0,...this._getChangeOptions()},p)),this._register(this._optionsService.onMultipleOptionChange(["scrollSensitivity","fastScrollSensitivity","overviewRuler"],()=>this._scrollableElement.updateOptions(this._getChangeOptions()))),this._register(l.onProtocolChange(d=>{this._scrollableElement.updateOptions({handleMouseWheel:!(d&16)})})),this._scrollableElement.setScrollDimensions({height:0,scrollHeight:0}),this._register(ni.runAndSubscribe(o.onChangeColors,()=>{this._scrollableElement.getDomNode().style.backgroundColor=o.colors.background.css})),e.appendChild(this._scrollableElement.getDomNode()),this._register(ht(()=>this._scrollableElement.getDomNode().remove())),this._styleElement=s.mainDocument.createElement("style"),t.appendChild(this._styleElement),this._register(ht(()=>this._styleElement.remove())),this._register(ni.runAndSubscribe(o.onChangeColors,()=>{this._styleElement.textContent=[".xterm .xterm-scrollable-element > .scrollbar > .slider {",` background: ${o.colors.scrollbarSliderBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider:hover {",` background: ${o.colors.scrollbarSliderHoverBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider.active {",` background: ${o.colors.scrollbarSliderActiveBackground.css};`,"}"].join(`
72
- `)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._scrollableElement.onScroll(d=>this._handleScroll(d)))}scrollLines(e){let t=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:t.scrollTop+e*this._renderService.dimensions.css.cell.height})}scrollToLine(e,t){t&&(this._latestYDisp=e),this._scrollableElement.setScrollPosition({reuseAnimation:!t,scrollTop:e*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,verticalScrollbarSize:this._optionsService.rawOptions.overviewRuler?.width||14}}queueSync(e){e!==void 0&&(this._latestYDisp=e),this._queuedAnimationFrame===void 0&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(e=this._bufferService.buffer.ydisp){!this._renderService||this._isSyncing||(this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,e!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:e*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1)}_handleScroll(e){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let t=Math.round(e.scrollTop/this._renderService.dimensions.css.cell.height),n=t-this._bufferService.buffer.ydisp;n!==0&&(this._latestYDisp=t,this._onRequestScrollLines.fire(n)),this._isHandlingScroll=!1}};Op=vt([pe(2,mi),pe(3,pr),pe(4,r7),pe(5,ya),pe(6,_i),pe(7,mr)],Op);var Rp=class extends Pe{constructor(e,t,n,s,l){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=n,this._decorationService=s,this._renderService=l,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this._register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this._register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this._register(this._decorationService.onDecorationRemoved(o=>this._removeDecoration(o))),this._register(ht(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){let t=this._coreBrowserService.mainDocument.createElement("div");t.classList.add("xterm-decoration"),t.classList.toggle("xterm-decoration-top-layer",e?.options?.layer==="top"),t.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,t.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,t.style.top=`${(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height}px`,t.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let n=e.options.x??0;return n&&n>this._bufferService.cols&&(t.style.display="none"),this._refreshXPosition(e,t),t}_refreshStyle(e){let t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display="none",e.onRenderEmitter.fire(e.element));else{let n=this._decorationElements.get(e);n||(n=this._createElement(e),e.element=n,this._decorationElements.set(e,n),this._container.appendChild(n),e.onDispose(()=>{this._decorationElements.delete(e),n.remove()})),n.style.display=this._altBufferIsActive?"none":"block",this._altBufferIsActive||(n.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,n.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,n.style.top=`${t*this._renderService.dimensions.css.cell.height}px`,n.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`),e.onRenderEmitter.fire(n)}}_refreshXPosition(e,t=e.element){if(!t)return;let n=e.options.x??0;(e.options.anchor||"left")==="right"?t.style.right=n?`${n*this._renderService.dimensions.css.cell.width}px`:"":t.style.left=n?`${n*this._renderService.dimensions.css.cell.width}px`:""}_removeDecoration(e){this._decorationElements.get(e)?.remove(),this._decorationElements.delete(e),e.dispose()}};Rp=vt([pe(1,mi),pe(2,pr),pe(3,dc),pe(4,mr)],Rp);var Iz=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(e){if(e.options.overviewRulerOptions){for(let t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position)){this._addLineToZone(t,e.marker.line);return}}if(this._zonePoolIndex<this._zonePool.length){this._zonePool[this._zonePoolIndex].color=e.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=e.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=e.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=e.marker.line,this._zones.push(this._zonePool[this._zonePoolIndex++]);return}this._zones.push({color:e.options.overviewRulerOptions.color,position:e.options.overviewRulerOptions.position,startBufferLine:e.marker.line,endBufferLine:e.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(e){this._linePadding=e}_lineIntersectsZone(e,t){return t>=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,n){return t>=e.startBufferLine-this._linePadding[n||"full"]&&t<=e.endBufferLine+this._linePadding[n||"full"]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}},Mn={full:0,left:0,center:0,right:0},Gr={full:0,left:0,center:0,right:0},To={full:0,left:0,center:0,right:0},Ih=class extends Pe{constructor(e,t,n,s,l,o,u,h){super(),this._viewportElement=e,this._screenElement=t,this._bufferService=n,this._decorationService=s,this._renderService=l,this._optionsService=o,this._themeService=u,this._coreBrowserService=h,this._colorZoneStore=new Iz,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement),this._register(ht(()=>this._canvas?.remove()));let p=this._canvas.getContext("2d");if(p)this._ctx=p;else throw new Error("Ctx cannot be null");this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this._register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0))),this._register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this._register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})),this._register(this._renderService.onRender(()=>{(!this._containerHeight||this._containerHeight!==this._screenElement.clientHeight)&&(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._register(this._optionsService.onSpecificOptionChange("overviewRuler",()=>this._queueRefresh(!0))),this._register(this._themeService.onChangeColors(()=>this._queueRefresh())),this._queueRefresh(!0)}get _width(){return this._optionsService.options.overviewRuler?.width||0}_refreshDrawConstants(){let e=Math.floor((this._canvas.width-1)/3),t=Math.ceil((this._canvas.width-1)/3);Gr.full=this._canvas.width,Gr.left=e,Gr.center=t,Gr.right=e,this._refreshDrawHeightConstants(),To.full=1,To.left=1,To.center=1+Gr.left,To.right=1+Gr.left+Gr.center}_refreshDrawHeightConstants(){Mn.full=Math.round(2*this._coreBrowserService.dpr);let e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowserService.dpr);Mn.left=t,Mn.center=t,Mn.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Mn.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Mn.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Mn.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Mn.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(let t of this._decorationService.decorations)this._colorZoneStore.addDecoration(t);this._ctx.lineWidth=1,this._renderRulerOutline();let e=this._colorZoneStore.zones;for(let t of e)t.position!=="full"&&this._renderColorZone(t);for(let t of e)t.position==="full"&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderRulerOutline(){this._ctx.fillStyle=this._themeService.colors.overviewRulerBorder.css,this._ctx.fillRect(0,0,1,this._canvas.height),this._optionsService.rawOptions.overviewRuler.showTopBorder&&this._ctx.fillRect(1,0,this._canvas.width-1,1),this._optionsService.rawOptions.overviewRuler.showBottomBorder&&this._ctx.fillRect(1,this._canvas.height-1,this._canvas.width-1,this._canvas.height)}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(To[e.position||"full"],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-Mn[e.position||"full"]/2),Gr[e.position||"full"],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+Mn[e.position||"full"]))}_queueRefresh(e,t){this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};Ih=vt([pe(2,mi),pe(3,dc),pe(4,mr),pe(5,_i),pe(6,ya),pe(7,pr)],Ih);var re;(e=>(e.NUL="\0",e.SOH="",e.STX="",e.ETX="",e.EOT="",e.ENQ="",e.ACK="",e.BEL="\x07",e.BS="\b",e.HT=" ",e.LF=`
73
- `,e.VT="\v",e.FF="\f",e.CR="\r",e.SO="",e.SI="",e.DLE="",e.DC1="",e.DC2="",e.DC3="",e.DC4="",e.NAK="",e.SYN="",e.ETB="",e.CAN="",e.EM="",e.SUB="",e.ESC="\x1B",e.FS="",e.GS="",e.RS="",e.US="",e.SP=" ",e.DEL=""))(re||={});var fh;(e=>(e.PAD="€",e.HOP="",e.BPH="‚",e.NBH="ƒ",e.IND="„",e.NEL="…",e.SSA="†",e.ESA="‡",e.HTS="ˆ",e.HTJ="‰",e.VTS="Š",e.PLD="‹",e.PLU="Œ",e.RI="",e.SS2="Ž",e.SS3="",e.DCS="",e.PU1="‘",e.PU2="’",e.STS="“",e.CCH="”",e.MW="•",e.SPA="–",e.EPA="—",e.SOS="˜",e.SGCI="™",e.SCI="š",e.CSI="›",e.ST="œ",e.OSC="",e.PM="ž",e.APC="Ÿ"))(fh||={});var E7;(e=>e.ST=`${re.ESC}\\`)(E7||={});var Lp=class{constructor(e,t,n,s,l,o){this._textarea=e,this._compositionView=t,this._bufferService=n,this._optionsService=s,this._coreService=l,this._renderService=o,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===20||e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode===229?(this._handleAnyTextareaChanges(),!1):!0}_finalizeComposition(e){if(this._compositionView.classList.remove("active"),this._isComposing=!1,e){let t={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let n;t.start+=this._dataAlreadySent.length,this._isComposing?n=this._textarea.value.substring(t.start,this._compositionPosition.start):n=this._textarea.value.substring(t.start),n.length>0&&this._coreService.triggerDataEvent(n,!0)}},0)}else{this._isSendingComposition=!1;let t=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(t,!0)}}_handleAnyTextareaChanges(){let e=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let t=this._textarea.value,n=t.replace(e,"");this._dataAlreadySent=n,t.length>e.length?this._coreService.triggerDataEvent(n,!0):t.length<e.length?this._coreService.triggerDataEvent(`${re.DEL}`,!0):t.length===e.length&&t!==e&&this._coreService.triggerDataEvent(t,!0)}},0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let t=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),n=this._renderService.dimensions.css.cell.height,s=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,l=t*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=l+"px",this._compositionView.style.top=s+"px",this._compositionView.style.height=n+"px",this._compositionView.style.lineHeight=n+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";let o=this._compositionView.getBoundingClientRect();this._textarea.style.left=l+"px",this._textarea.style.top=s+"px",this._textarea.style.width=Math.max(o.width,1)+"px",this._textarea.style.height=Math.max(o.height,1)+"px",this._textarea.style.lineHeight=o.height+"px"}e||setTimeout(()=>this.updateCompositionElements(!0),0)}}};Lp=vt([pe(2,mi),pe(3,_i),pe(4,el),pe(5,mr)],Lp);var Ut=0,Vt=0,qt=0,gt=0,i5={css:"#00000000",rgba:0},At;(e=>{function t(l,o,u,h){return h!==void 0?`#${Bs(l)}${Bs(o)}${Bs(u)}${Bs(h)}`:`#${Bs(l)}${Bs(o)}${Bs(u)}`}e.toCss=t;function n(l,o,u,h=255){return(l<<24|o<<16|u<<8|h)>>>0}e.toRgba=n;function s(l,o,u,h){return{css:e.toCss(l,o,u,h),rgba:e.toRgba(l,o,u,h)}}e.toColor=s})(At||={});var ct;(e=>{function t(p,d){if(gt=(d.rgba&255)/255,gt===1)return{css:d.css,rgba:d.rgba};let g=d.rgba>>24&255,_=d.rgba>>16&255,S=d.rgba>>8&255,v=p.rgba>>24&255,w=p.rgba>>16&255,C=p.rgba>>8&255;Ut=v+Math.round((g-v)*gt),Vt=w+Math.round((_-w)*gt),qt=C+Math.round((S-C)*gt);let E=At.toCss(Ut,Vt,qt),M=At.toRgba(Ut,Vt,qt);return{css:E,rgba:M}}e.blend=t;function n(p){return(p.rgba&255)===255}e.isOpaque=n;function s(p,d,g){let _=dh.ensureContrastRatio(p.rgba,d.rgba,g);if(_)return At.toColor(_>>24&255,_>>16&255,_>>8&255)}e.ensureContrastRatio=s;function l(p){let d=(p.rgba|255)>>>0;return[Ut,Vt,qt]=dh.toChannels(d),{css:At.toCss(Ut,Vt,qt),rgba:d}}e.opaque=l;function o(p,d){return gt=Math.round(d*255),[Ut,Vt,qt]=dh.toChannels(p.rgba),{css:At.toCss(Ut,Vt,qt,gt),rgba:At.toRgba(Ut,Vt,qt,gt)}}e.opacity=o;function u(p,d){return gt=p.rgba&255,o(p,gt*d/255)}e.multiplyOpacity=u;function h(p){return[p.rgba>>24&255,p.rgba>>16&255,p.rgba>>8&255]}e.toColorRGB=h})(ct||={});var pt;(e=>{let t,n;try{let l=document.createElement("canvas");l.width=1,l.height=1;let o=l.getContext("2d",{willReadFrequently:!0});o&&(t=o,t.globalCompositeOperation="copy",n=t.createLinearGradient(0,0,1,1))}catch{}function s(l){if(l.match(/#[\da-f]{3,8}/i))switch(l.length){case 4:return Ut=parseInt(l.slice(1,2).repeat(2),16),Vt=parseInt(l.slice(2,3).repeat(2),16),qt=parseInt(l.slice(3,4).repeat(2),16),At.toColor(Ut,Vt,qt);case 5:return Ut=parseInt(l.slice(1,2).repeat(2),16),Vt=parseInt(l.slice(2,3).repeat(2),16),qt=parseInt(l.slice(3,4).repeat(2),16),gt=parseInt(l.slice(4,5).repeat(2),16),At.toColor(Ut,Vt,qt,gt);case 7:return{css:l,rgba:(parseInt(l.slice(1),16)<<8|255)>>>0};case 9:return{css:l,rgba:parseInt(l.slice(1),16)>>>0}}let o=l.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(o)return Ut=parseInt(o[1]),Vt=parseInt(o[2]),qt=parseInt(o[3]),gt=Math.round((o[5]===void 0?1:parseFloat(o[5]))*255),At.toColor(Ut,Vt,qt,gt);if(!t||!n)throw new Error("css.toColor: Unsupported css format");if(t.fillStyle=n,t.fillStyle=l,typeof t.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(t.fillRect(0,0,1,1),[Ut,Vt,qt,gt]=t.getImageData(0,0,1,1).data,gt!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:At.toRgba(Ut,Vt,qt,gt),css:l}}e.toColor=s})(pt||={});var di;(e=>{function t(s){return n(s>>16&255,s>>8&255,s&255)}e.relativeLuminance=t;function n(s,l,o){let u=s/255,h=l/255,p=o/255,d=u<=.03928?u/12.92:Math.pow((u+.055)/1.055,2.4),g=h<=.03928?h/12.92:Math.pow((h+.055)/1.055,2.4),_=p<=.03928?p/12.92:Math.pow((p+.055)/1.055,2.4);return d*.2126+g*.7152+_*.0722}e.relativeLuminance2=n})(di||={});var dh;(e=>{function t(u,h){if(gt=(h&255)/255,gt===1)return h;let p=h>>24&255,d=h>>16&255,g=h>>8&255,_=u>>24&255,S=u>>16&255,v=u>>8&255;return Ut=_+Math.round((p-_)*gt),Vt=S+Math.round((d-S)*gt),qt=v+Math.round((g-v)*gt),At.toRgba(Ut,Vt,qt)}e.blend=t;function n(u,h,p){let d=di.relativeLuminance(u>>8),g=di.relativeLuminance(h>>8);if(ar(d,g)<p){if(g<d){let v=s(u,h,p),w=ar(d,di.relativeLuminance(v>>8));if(w<p){let C=l(u,h,p),E=ar(d,di.relativeLuminance(C>>8));return w>E?v:C}return v}let _=l(u,h,p),S=ar(d,di.relativeLuminance(_>>8));if(S<p){let v=s(u,h,p),w=ar(d,di.relativeLuminance(v>>8));return S>w?_:v}return _}}e.ensureContrastRatio=n;function s(u,h,p){let d=u>>24&255,g=u>>16&255,_=u>>8&255,S=h>>24&255,v=h>>16&255,w=h>>8&255,C=ar(di.relativeLuminance2(S,v,w),di.relativeLuminance2(d,g,_));for(;C<p&&(S>0||v>0||w>0);)S-=Math.max(0,Math.ceil(S*.1)),v-=Math.max(0,Math.ceil(v*.1)),w-=Math.max(0,Math.ceil(w*.1)),C=ar(di.relativeLuminance2(S,v,w),di.relativeLuminance2(d,g,_));return(S<<24|v<<16|w<<8|255)>>>0}e.reduceLuminance=s;function l(u,h,p){let d=u>>24&255,g=u>>16&255,_=u>>8&255,S=h>>24&255,v=h>>16&255,w=h>>8&255,C=ar(di.relativeLuminance2(S,v,w),di.relativeLuminance2(d,g,_));for(;C<p&&(S<255||v<255||w<255);)S=Math.min(255,S+Math.ceil((255-S)*.1)),v=Math.min(255,v+Math.ceil((255-v)*.1)),w=Math.min(255,w+Math.ceil((255-w)*.1)),C=ar(di.relativeLuminance2(S,v,w),di.relativeLuminance2(d,g,_));return(S<<24|v<<16|w<<8|255)>>>0}e.increaseLuminance=l;function o(u){return[u>>24&255,u>>16&255,u>>8&255,u&255]}e.toChannels=o})(dh||={});function Bs(e){let t=e.toString(16);return t.length<2?"0"+t:t}function ar(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}var Pz=class extends fc{constructor(e,t,n){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=n}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},Ph=class{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new sn}register(e){let t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1}getJoinedCharacters(e){if(this._characterJoiners.length===0)return[];let t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];let n=[],s=t.translateToString(!0),l=0,o=0,u=0,h=t.getFg(0),p=t.getBg(0);for(let d=0;d<t.getTrimmedLength();d++)if(t.loadCell(d,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==h||this._workCell.bg!==p){if(d-l>1){let g=this._getJoinedRanges(s,u,o,t,l);for(let _=0;_<g.length;_++)n.push(g[_])}l=d,u=o,h=this._workCell.fg,p=this._workCell.bg}o+=this._workCell.getChars().length||is.length}if(this._bufferService.cols-l>1){let d=this._getJoinedRanges(s,u,o,t,l);for(let g=0;g<d.length;g++)n.push(d[g])}return n}_getJoinedRanges(e,t,n,s,l){let o=e.substring(t,n),u=[];try{u=this._characterJoiners[0].handler(o)}catch(h){console.error(h)}for(let h=1;h<this._characterJoiners.length;h++)try{let p=this._characterJoiners[h].handler(o);for(let d=0;d<p.length;d++)Ph._mergeRanges(u,p[d])}catch(p){console.error(p)}return this._stringRangesToCellRanges(u,s,l),u}_stringRangesToCellRanges(e,t,n){let s=0,l=!1,o=0,u=e[s];if(u){for(let h=n;h<this._bufferService.cols;h++){let p=t.getWidth(h),d=t.getString(h).length||is.length;if(p!==0){if(!l&&u[0]<=o&&(u[0]=h,l=!0),u[1]<=o){if(u[1]=h,u=e[++s],!u)break;u[0]<=o?(u[0]=h,l=!0):l=!1}o+=d}}u&&(u[1]=this._bufferService.cols)}}static _mergeRanges(e,t){let n=!1;for(let s=0;s<e.length;s++){let l=e[s];if(n){if(t[1]<=l[0])return e[s-1][1]=t[1],e;if(t[1]<=l[1])return e[s-1][1]=Math.max(t[1],l[1]),e.splice(s,1),e;e.splice(s,1),s--}else{if(t[1]<=l[0])return e.splice(s,0,t),e;if(t[1]<=l[1])return l[0]=Math.min(t[0],l[0]),e;t[0]<l[1]&&(l[0]=Math.min(t[0],l[0]),n=!0);continue}}return n?e[e.length-1][1]=t[1]:e.push(t),e}};Ph=vt([pe(0,mi)],Ph);function Fz(e){return 57508<=e&&e<=57558}function Uz(e){return 9472<=e&&e<=9631}function Vz(e){return Fz(e)||Uz(e)}function qz(){return{css:{canvas:ih(),cell:ih()},device:{canvas:ih(),cell:ih(),char:{width:0,height:0,left:0,top:0}}}}function ih(){return{width:0,height:0}}var Np=class{constructor(e,t,n,s,l,o,u){this._document=e,this._characterJoinerService=t,this._optionsService=n,this._coreBrowserService=s,this._coreService=l,this._decorationService=o,this._themeService=u,this._workCell=new sn,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(e,t,n){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=n}createRow(e,t,n,s,l,o,u,h,p,d,g){let _=[],S=this._characterJoinerService.getJoinedCharacters(t),v=this._themeService.colors,w=e.getNoBgTrimmedLength();n&&w<o+1&&(w=o+1);let C,E=0,M="",U=0,B=0,X=0,Q=0,R=!1,V=0,se=!1,me=0,k=0,K=[],W=d!==-1&&g!==-1;for(let q=0;q<w;q++){e.loadCell(q,this._workCell);let Z=this._workCell.getWidth();if(Z===0)continue;let P=!1,H=q>=k,ie=q,$=this._workCell;if(S.length>0&&q===S[0][0]&&H){let Be=S.shift(),Fn=this._isCellInSelection(Be[0],t);for(U=Be[0]+1;U<Be[1];U++)H&&=Fn===this._isCellInSelection(U,t);H&&=!n||o<Be[0]||o>=Be[1],H?(P=!0,$=new Pz(this._workCell,e.translateToString(!0,Be[0],Be[1]),Be[1]-Be[0]),ie=Be[1]-1,Z=$.getWidth()):k=Be[1]}let oe=this._isCellInSelection(q,t),T=n&&q===o,ze=W&&q>=d&&q<=g,We=!1;this._decorationService.forEachDecorationAtCell(q,t,void 0,Be=>{We=!0});let O=$.getChars()||is;if(O===" "&&($.isUnderline()||$.isOverline())&&(O=" "),me=Z*h-p.get(O,$.isBold(),$.isItalic()),!C)C=this._document.createElement("span");else if(E&&(oe&&se||!oe&&!se&&$.bg===B)&&(oe&&se&&v.selectionForeground||$.fg===X)&&$.extended.ext===Q&&ze===R&&me===V&&!T&&!P&&!We&&H){$.isInvisible()?M+=is:M+=O,E++;continue}else E&&(C.textContent=M),C=this._document.createElement("span"),E=0,M="";if(B=$.bg,X=$.fg,Q=$.extended.ext,R=ze,V=me,se=oe,P&&o>=q&&o<=ie&&(o=q),!this._coreService.isCursorHidden&&T&&this._coreService.isCursorInitialized){if(K.push("xterm-cursor"),this._coreBrowserService.isFocused)u&&K.push("xterm-cursor-blink"),K.push(s==="bar"?"xterm-cursor-bar":s==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(l)switch(l){case"outline":K.push("xterm-cursor-outline");break;case"block":K.push("xterm-cursor-block");break;case"bar":K.push("xterm-cursor-bar");break;case"underline":K.push("xterm-cursor-underline");break}}if($.isBold()&&K.push("xterm-bold"),$.isItalic()&&K.push("xterm-italic"),$.isDim()&&K.push("xterm-dim"),$.isInvisible()?M=is:M=$.getChars()||is,$.isUnderline()&&(K.push(`xterm-underline-${$.extended.underlineStyle}`),M===" "&&(M=" "),!$.isUnderlineColorDefault()))if($.isUnderlineColorRGB())C.style.textDecorationColor=`rgb(${fc.toColorRGB($.getUnderlineColor()).join(",")})`;else{let Be=$.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&$.isBold()&&Be<8&&(Be+=8),C.style.textDecorationColor=v.ansi[Be].css}$.isOverline()&&(K.push("xterm-overline"),M===" "&&(M=" ")),$.isStrikethrough()&&K.push("xterm-strikethrough"),ze&&(C.style.textDecoration="underline");let D=$.getFgColor(),ne=$.getFgColorMode(),ae=$.getBgColor(),de=$.getBgColorMode(),Ee=!!$.isInverse();if(Ee){let Be=D;D=ae,ae=Be;let Fn=ne;ne=de,de=Fn}let ve,Me,fe=!1;this._decorationService.forEachDecorationAtCell(q,t,void 0,Be=>{Be.options.layer!=="top"&&fe||(Be.backgroundColorRGB&&(de=50331648,ae=Be.backgroundColorRGB.rgba>>8&16777215,ve=Be.backgroundColorRGB),Be.foregroundColorRGB&&(ne=50331648,D=Be.foregroundColorRGB.rgba>>8&16777215,Me=Be.foregroundColorRGB),fe=Be.options.layer==="top")}),!fe&&oe&&(ve=this._coreBrowserService.isFocused?v.selectionBackgroundOpaque:v.selectionInactiveBackgroundOpaque,ae=ve.rgba>>8&16777215,de=50331648,fe=!0,v.selectionForeground&&(ne=50331648,D=v.selectionForeground.rgba>>8&16777215,Me=v.selectionForeground)),fe&&K.push("xterm-decoration-top");let Se;switch(de){case 16777216:case 33554432:Se=v.ansi[ae],K.push(`xterm-bg-${ae}`);break;case 50331648:Se=At.toColor(ae>>16,ae>>8&255,ae&255),this._addStyle(C,`background-color:#${n5((ae>>>0).toString(16),"0",6)}`);break;default:Ee?(Se=v.foreground,K.push("xterm-bg-257")):Se=v.background}switch(ve||$.isDim()&&(ve=ct.multiplyOpacity(Se,.5)),ne){case 16777216:case 33554432:$.isBold()&&D<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(D+=8),this._applyMinimumContrast(C,Se,v.ansi[D],$,ve,void 0)||K.push(`xterm-fg-${D}`);break;case 50331648:let Be=At.toColor(D>>16&255,D>>8&255,D&255);this._applyMinimumContrast(C,Se,Be,$,ve,Me)||this._addStyle(C,`color:#${n5(D.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(C,Se,v.foreground,$,ve,Me)||Ee&&K.push("xterm-fg-257")}K.length&&(C.className=K.join(" "),K.length=0),!T&&!P&&!We&&H?E++:C.textContent=M,me!==this.defaultSpacing&&(C.style.letterSpacing=`${me}px`),_.push(C),q=ie}return C&&E&&(C.textContent=M),_}_applyMinimumContrast(e,t,n,s,l,o){if(this._optionsService.rawOptions.minimumContrastRatio===1||Vz(s.getCode()))return!1;let u=this._getContrastCache(s),h;if(!l&&!o&&(h=u.getColor(t.rgba,n.rgba)),h===void 0){let p=this._optionsService.rawOptions.minimumContrastRatio/(s.isDim()?2:1);h=ct.ensureContrastRatio(l||t,o||n,p),u.setColor((l||t).rgba,(o||n).rgba,h??null)}return h?(this._addStyle(e,`color:${h.css}`),!0):!1}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute("style",`${e.getAttribute("style")||""}${t};`)}_isCellInSelection(e,t){let n=this._selectionStart,s=this._selectionEnd;return!n||!s?!1:this._columnSelectMode?n[0]<=s[0]?e>=n[0]&&t>=n[1]&&e<s[0]&&t<=s[1]:e<n[0]&&t>=n[1]&&e>=s[0]&&t<=s[1]:t>n[1]&&t<s[1]||n[1]===s[1]&&t===n[1]&&e>=n[0]&&e<s[0]||n[1]<s[1]&&t===s[1]&&e<s[0]||n[1]<s[1]&&t===n[1]&&e>=n[0]}};Np=vt([pe(1,a7),pe(2,_i),pe(3,pr),pe(4,el),pe(5,dc),pe(6,ya)],Np);function n5(e,t,n){for(;e.length<n;)e=t+e;return e}var $z=class{constructor(e,t){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=e.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";let n=e.createElement("span");n.classList.add("xterm-char-measure-element");let s=e.createElement("span");s.classList.add("xterm-char-measure-element"),s.style.fontWeight="bold";let l=e.createElement("span");l.classList.add("xterm-char-measure-element"),l.style.fontStyle="italic";let o=e.createElement("span");o.classList.add("xterm-char-measure-element"),o.style.fontWeight="bold",o.style.fontStyle="italic",this._measureElements=[n,s,l,o],this._container.appendChild(n),this._container.appendChild(s),this._container.appendChild(l),this._container.appendChild(o),t.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(e,t,n,s){e===this._font&&t===this._fontSize&&n===this._weight&&s===this._weightBold||(this._font=e,this._fontSize=t,this._weight=n,this._weightBold=s,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${n}`,this._measureElements[1].style.fontWeight=`${s}`,this._measureElements[2].style.fontWeight=`${n}`,this._measureElements[3].style.fontWeight=`${s}`,this.clear())}get(e,t,n){let s=0;if(!t&&!n&&e.length===1&&(s=e.charCodeAt(0))<256){if(this._flat[s]!==-9999)return this._flat[s];let u=this._measure(e,0);return u>0&&(this._flat[s]=u),u}let l=e;t&&(l+="B"),n&&(l+="I");let o=this._holey.get(l);if(o===void 0){let u=0;t&&(u|=1),n&&(u|=2),o=this._measure(e,u),o>0&&this._holey.set(l,o)}return o}_measure(e,t){let n=this._measureElements[t];return n.textContent=e.repeat(32),n.offsetWidth/32}},Yz=class{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(e,t,n,s=!1){if(this.selectionStart=t,this.selectionEnd=n,!t||!n||t[0]===n[0]&&t[1]===n[1]){this.clear();return}let l=e.buffers.active.ydisp,o=t[1]-l,u=n[1]-l,h=Math.max(o,0),p=Math.min(u,e.rows-1);if(h>=e.rows||p<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=s,this.viewportStartRow=o,this.viewportEndRow=u,this.viewportCappedStartRow=h,this.viewportCappedEndRow=p,this.startCol=t[0],this.endCol=n[0]}isCellSelected(e,t,n){return this.hasSelection?(n-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&n>=this.viewportCappedStartRow&&t<this.endCol&&n<=this.viewportCappedEndRow:t<this.startCol&&n>=this.viewportCappedStartRow&&t>=this.endCol&&n<=this.viewportCappedEndRow:n>this.viewportStartRow&&n<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&n===this.viewportStartRow&&t>=this.startCol&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&n===this.viewportEndRow&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&n===this.viewportStartRow&&t>=this.startCol):!1}};function Kz(){return new Yz}var T0="xterm-dom-renderer-owner-",en="xterm-rows",nh="xterm-fg-",r5="xterm-bg-",Mo="xterm-focus",rh="xterm-selection",Wz=1,zp=class extends Pe{constructor(e,t,n,s,l,o,u,h,p,d,g,_,S,v){super(),this._terminal=e,this._document=t,this._element=n,this._screenElement=s,this._viewportElement=l,this._helperContainer=o,this._linkifier2=u,this._charSizeService=p,this._optionsService=d,this._bufferService=g,this._coreService=_,this._coreBrowserService=S,this._themeService=v,this._terminalClass=Wz++,this._rowElements=[],this._selectionRenderModel=Kz(),this.onRequestRedraw=this._register(new ue).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(en),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(rh),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=qz(),this._updateDimensions(),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._themeService.onChangeColors(w=>this._injectCss(w))),this._injectCss(this._themeService.colors),this._rowFactory=h.createInstance(Np,document),this._element.classList.add(T0+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this._register(this._linkifier2.onShowLinkUnderline(w=>this._handleLinkHover(w))),this._register(this._linkifier2.onHideLinkUnderline(w=>this._handleLinkLeave(w))),this._register(ht(()=>{this._element.classList.remove(T0+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new $z(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){let e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(let n of this._rowElements)n.style.width=`${this.dimensions.css.canvas.width}px`,n.style.height=`${this.dimensions.css.cell.height}px`,n.style.lineHeight=`${this.dimensions.css.cell.height}px`,n.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));let t=`${this._terminalSelector} .${en} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=t,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let t=`${this._terminalSelector} .${en} { pointer-events: none; color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;t+=`${this._terminalSelector} .${en} .xterm-dim { color: ${ct.multiplyOpacity(e.foreground,.5).css};}`,t+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;let n=`blink_underline_${this._terminalClass}`,s=`blink_bar_${this._terminalClass}`,l=`blink_block_${this._terminalClass}`;t+=`@keyframes ${n} { 50% { border-bottom-style: hidden; }}`,t+=`@keyframes ${s} { 50% { box-shadow: none; }}`,t+=`@keyframes ${l} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .${en}.${Mo} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${n} 1s step-end infinite;}${this._terminalSelector} .${en}.${Mo} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${s} 1s step-end infinite;}${this._terminalSelector} .${en}.${Mo} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${l} 1s step-end infinite;}${this._terminalSelector} .${en} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${en} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${en} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${en} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${en} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .${rh} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${rh} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${rh} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(let[o,u]of e.ansi.entries())t+=`${this._terminalSelector} .${nh}${o} { color: ${u.css}; }${this._terminalSelector} .${nh}${o}.xterm-dim { color: ${ct.multiplyOpacity(u,.5).css}; }${this._terminalSelector} .${r5}${o} { background-color: ${u.css}; }`;t+=`${this._terminalSelector} .${nh}257 { color: ${ct.opaque(e.background).css}; }${this._terminalSelector} .${nh}257.xterm-dim { color: ${ct.multiplyOpacity(ct.opaque(e.background),.5).css}; }${this._terminalSelector} .${r5}257 { background-color: ${e.foreground.css}; }`,this._themeStyleElement.textContent=t}_setDefaultSpacing(){let e=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${e}px`,this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let n=this._rowElements.length;n<=t;n++){let s=this._document.createElement("div");this._rowContainer.appendChild(s),this._rowElements.push(s)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(e,t){this._refreshRowElements(e,t),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(Mo),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(Mo),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(e,t,n){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,n),this.renderRows(0,this._bufferService.rows-1),!e||!t||(this._selectionRenderModel.update(this._terminal,e,t,n),!this._selectionRenderModel.hasSelection))return;let s=this._selectionRenderModel.viewportStartRow,l=this._selectionRenderModel.viewportEndRow,o=this._selectionRenderModel.viewportCappedStartRow,u=this._selectionRenderModel.viewportCappedEndRow,h=this._document.createDocumentFragment();if(n){let p=e[0]>t[0];h.appendChild(this._createSelectionElement(o,p?t[0]:e[0],p?e[0]:t[0],u-o+1))}else{let p=s===o?e[0]:0,d=o===l?t[0]:this._bufferService.cols;h.appendChild(this._createSelectionElement(o,p,d));let g=u-o-1;if(h.appendChild(this._createSelectionElement(o+1,0,this._bufferService.cols,g)),o!==u){let _=l===u?t[0]:this._bufferService.cols;h.appendChild(this._createSelectionElement(u,0,_))}}this._selectionContainer.appendChild(h)}_createSelectionElement(e,t,n,s=1){let l=this._document.createElement("div"),o=t*this.dimensions.css.cell.width,u=this.dimensions.css.cell.width*(n-t);return o+u>this.dimensions.css.canvas.width&&(u=this.dimensions.css.canvas.width-o),l.style.height=`${s*this.dimensions.css.cell.height}px`,l.style.top=`${e*this.dimensions.css.cell.height}px`,l.style.left=`${o}px`,l.style.width=`${u}px`,l}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(let e of this._rowElements)e.replaceChildren()}renderRows(e,t){let n=this._bufferService.buffer,s=n.ybase+n.y,l=Math.min(n.x,this._bufferService.cols-1),o=this._coreService.decPrivateModes.cursorBlink??this._optionsService.rawOptions.cursorBlink,u=this._coreService.decPrivateModes.cursorStyle??this._optionsService.rawOptions.cursorStyle,h=this._optionsService.rawOptions.cursorInactiveStyle;for(let p=e;p<=t;p++){let d=p+n.ydisp,g=this._rowElements[p],_=n.lines.get(d);if(!g||!_)break;g.replaceChildren(...this._rowFactory.createRow(_,d,d===s,u,h,l,o,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${T0}${this._terminalClass}`}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,n,s,l,o){n<0&&(e=0),s<0&&(t=0);let u=this._bufferService.rows-1;n=Math.max(Math.min(n,u),0),s=Math.max(Math.min(s,u),0),l=Math.min(l,this._bufferService.cols);let h=this._bufferService.buffer,p=h.ybase+h.y,d=Math.min(h.x,l-1),g=this._optionsService.rawOptions.cursorBlink,_=this._optionsService.rawOptions.cursorStyle,S=this._optionsService.rawOptions.cursorInactiveStyle;for(let v=n;v<=s;++v){let w=v+h.ydisp,C=this._rowElements[v],E=h.lines.get(w);if(!C||!E)break;C.replaceChildren(...this._rowFactory.createRow(E,w,w===p,_,S,d,g,this.dimensions.css.cell.width,this._widthCache,o?v===n?e:0:-1,o?(v===s?t:l)-1:-1))}}};zp=vt([pe(7,L_),pe(8,df),pe(9,_i),pe(10,mi),pe(11,el),pe(12,pr),pe(13,ya)],zp);var Bp=class extends Pe{constructor(e,t,n){super(),this._optionsService=n,this.width=0,this.height=0,this._onCharSizeChange=this._register(new ue),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this._register(new Xz(this._optionsService))}catch{this._measureStrategy=this._register(new Gz(e,t,this._optionsService))}this._register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}get hasValidSize(){return this.width>0&&this.height>0}measure(){let e=this._measureStrategy.measure();(e.width!==this.width||e.height!==this.height)&&(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};Bp=vt([pe(2,_i)],Bp);var k7=class extends Pe{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){e!==void 0&&e>0&&t!==void 0&&t>0&&(this._result.width=e,this._result.height=t)}},Gz=class extends k7{constructor(e,t,n){super(),this._document=e,this._parentElement=t,this._optionsService=n,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}},Xz=class extends k7{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");let t=this._ctx.measureText("W");if(!("width"in t&&"fontBoundingBoxAscent"in t&&"fontBoundingBoxDescent"in t))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let e=this._ctx.measureText("W");return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}},Zz=class extends Pe{constructor(e,t,n){super(),this._textarea=e,this._window=t,this.mainDocument=n,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=this._register(new Qz(this._window)),this._onDprChange=this._register(new ue),this.onDprChange=this._onDprChange.event,this._onWindowChange=this._register(new ue),this.onWindowChange=this._onWindowChange.event,this._register(this.onWindowChange(s=>this._screenDprMonitor.setWindow(s))),this._register(ni.forward(this._screenDprMonitor.onDprChange,this._onDprChange)),this._register(Ae(this._textarea,"focus",()=>this._isFocused=!0)),this._register(Ae(this._textarea,"blur",()=>this._isFocused=!1))}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}},Qz=class extends Pe{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this._register(new ha),this._onDprChange=this._register(new ue),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this._register(ht(()=>this.clearListener()))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=Ae(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){!this._resolutionMediaMatchList||!this._outerListener||(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}},Jz=class extends Pe{constructor(){super(),this.linkProviders=[],this._register(ht(()=>this.linkProviders.length=0))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{let t=this.linkProviders.indexOf(e);t!==-1&&this.linkProviders.splice(t,1)}}}};function F_(e,t,n){let s=n.getBoundingClientRect(),l=e.getComputedStyle(n),o=parseInt(l.getPropertyValue("padding-left")),u=parseInt(l.getPropertyValue("padding-top"));return[t.clientX-s.left-o,t.clientY-s.top-u]}function eB(e,t,n,s,l,o,u,h,p){if(!o)return;let d=F_(e,t,n);if(d)return d[0]=Math.ceil((d[0]+(p?u/2:0))/u),d[1]=Math.ceil(d[1]/h),d[0]=Math.min(Math.max(d[0],1),s+(p?1:0)),d[1]=Math.min(Math.max(d[1],1),l),d}var jp=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,n,s,l){return eB(window,e,t,n,s,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,l)}getMouseReportCoords(e,t){let n=F_(window,e,t);if(this._charSizeService.hasValidSize)return n[0]=Math.min(Math.max(n[0],0),this._renderService.dimensions.css.canvas.width-1),n[1]=Math.min(Math.max(n[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(n[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(n[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(n[0]),y:Math.floor(n[1])}}};jp=vt([pe(0,mr),pe(1,df)],jp);var tB=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(e,t,n){this._rowCount=n,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t,!this._animationFrame&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0){this._runRefreshCallbacks();return}let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}},T7={};hN(T7,{getSafariVersion:()=>nB,isChromeOS:()=>O7,isFirefox:()=>M7,isIpad:()=>rB,isIphone:()=>sB,isLegacyEdge:()=>iB,isLinux:()=>U_,isMac:()=>Fh,isNode:()=>pf,isSafari:()=>A7,isWindows:()=>D7});var pf=typeof process<"u"&&"title"in process,pc=pf?"node":navigator.userAgent,mc=pf?"node":navigator.platform,M7=pc.includes("Firefox"),iB=pc.includes("Edge"),A7=/^((?!chrome|android).)*safari/i.test(pc);function nB(){if(!A7)return 0;let e=pc.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1])}var Fh=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(mc),rB=mc==="iPad",sB=mc==="iPhone",D7=["Windows","Win16","Win32","WinCE"].includes(mc),U_=mc.indexOf("Linux")>=0,O7=/\bCrOS\b/.test(pc),R7=class{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(e){this._idleCallback=void 0;let t=0,n=0,s=e.timeRemaining(),l=0;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),n=Math.max(t,n),l=e.timeRemaining(),n*1.5>l){s-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(s-t))}ms`),this._start();return}s=l}this.clear()}},lB=class extends R7{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},aB=class extends R7{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},Uh=!pf&&"requestIdleCallback"in window?aB:lB,oB=class{constructor(){this._queue=new Uh}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}},Hp=class extends Pe{constructor(e,t,n,s,l,o,u,h,p){super(),this._rowCount=e,this._optionsService=n,this._charSizeService=s,this._coreService=l,this._coreBrowserService=h,this._renderer=this._register(new ha),this._pausedResizeTask=new oB,this._observerDisposable=this._register(new ha),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this._register(new ue),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this._register(new ue),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this._register(new ue),this.onRender=this._onRender.event,this._onRefreshRequest=this._register(new ue),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new tB((d,g)=>this._renderRows(d,g),this._coreBrowserService),this._register(this._renderDebouncer),this._syncOutputHandler=new cB(this._coreBrowserService,this._coreService,()=>this._fullRefresh()),this._register(ht(()=>this._syncOutputHandler.dispose())),this._register(this._coreBrowserService.onDprChange(()=>this.handleDevicePixelRatioChange())),this._register(u.onResize(()=>this._fullRefresh())),this._register(u.buffers.onBufferActivate(()=>this._renderer.value?.clear())),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this._register(o.onDecorationRegistered(()=>this._fullRefresh())),this._register(o.onDecorationRemoved(()=>this._fullRefresh())),this._register(this._optionsService.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(u.cols,u.rows),this._fullRefresh()})),this._register(this._optionsService.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(u.buffer.y,u.buffer.y,!0))),this._register(p.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(this._coreBrowserService.window,t),this._register(this._coreBrowserService.onWindowChange(d=>this._registerIntersectionObserver(d,t)))}get dimensions(){return this._renderer.value.dimensions}_registerIntersectionObserver(e,t){if("IntersectionObserver"in e){let n=new e.IntersectionObserver(s=>this._handleIntersectionChange(s[s.length-1]),{threshold:0});n.observe(t),this._observerDisposable.value=ht(()=>n.disconnect())}}_handleIntersectionChange(e){this._isPaused=e.isIntersecting===void 0?e.intersectionRatio===0:!e.isIntersecting,!this._isPaused&&!this._charSizeService.hasValidSize&&this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(e,t,n=!1){if(this._isPaused){this._needsFullRefresh=!0;return}if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}let s=this._syncOutputHandler.flush();s&&(e=Math.min(e,s.start),t=Math.max(t,s.end)),n||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount)}_renderRows(e,t){if(this._renderer.value){if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0}}resize(e,t){this._rowCount=t,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw(t=>this.refreshRows(t.start,t.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>this._renderer.value?.handleResize(e,t)):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(e,t,n){this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=n,this._renderer.value?.handleSelectionChanged(e,t,n)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};Hp=vt([pe(2,_i),pe(3,df),pe(4,el),pe(5,dc),pe(6,mi),pe(7,pr),pe(8,ya)],Hp);var cB=class{constructor(e,t,n){this._coreBrowserService=e,this._coreService=t,this._onTimeout=n,this._start=0,this._end=0,this._isBuffering=!1}bufferRows(e,t){this._isBuffering?(this._start=Math.min(this._start,e),this._end=Math.max(this._end,t)):(this._start=e,this._end=t,this._isBuffering=!0),this._timeout===void 0&&(this._timeout=this._coreBrowserService.window.setTimeout(()=>{this._timeout=void 0,this._coreService.decPrivateModes.synchronizedOutput=!1,this._onTimeout()},1e3))}flush(){if(this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0),!this._isBuffering)return;let e={start:this._start,end:this._end};return this._isBuffering=!1,e}dispose(){this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0)}};function uB(e,t,n,s){let l=n.buffer.x,o=n.buffer.y;if(!n.buffer.hasScrollback)return dB(l,o,e,t,n,s)+mf(o,t,n,s)+pB(l,o,e,t,n,s);let u;if(o===t)return u=l>e?"D":"C",tc(Math.abs(l-e),ec(u,s));u=o>t?"D":"C";let h=Math.abs(o-t),p=fB(o>t?e:l,n)+(h-1)*n.cols+1+hB(o>t?l:e);return tc(p,ec(u,s))}function hB(e,t){return e-1}function fB(e,t){return t.cols-e}function dB(e,t,n,s,l,o){return mf(t,s,l,o).length===0?"":tc(N7(e,t,e,t-Xs(t,l),!1,l).length,ec("D",o))}function mf(e,t,n,s){let l=e-Xs(e,n),o=t-Xs(t,n),u=Math.abs(l-o)-mB(e,t,n);return tc(u,ec(L7(e,t),s))}function pB(e,t,n,s,l,o){let u;mf(t,s,l,o).length>0?u=s-Xs(s,l):u=t;let h=s,p=_B(e,t,n,s,l,o);return tc(N7(e,u,n,h,p==="C",l).length,ec(p,o))}function mB(e,t,n){let s=0,l=e-Xs(e,n),o=t-Xs(t,n);for(let u=0;u<Math.abs(l-o);u++){let h=L7(e,t)==="A"?-1:1;n.buffer.lines.get(l+h*u)?.isWrapped&&s++}return s}function Xs(e,t){let n=0,s=t.buffer.lines.get(e),l=s?.isWrapped;for(;l&&e>=0&&e<t.rows;)n++,s=t.buffer.lines.get(--e),l=s?.isWrapped;return n}function _B(e,t,n,s,l,o){let u;return mf(n,s,l,o).length>0?u=s-Xs(s,l):u=t,e<n&&u<=s||e>=n&&u<s?"C":"D"}function L7(e,t){return e>t?"A":"B"}function N7(e,t,n,s,l,o){let u=e,h=t,p="";for(;(u!==n||h!==s)&&h>=0&&h<o.buffer.lines.length;)u+=l?1:-1,l&&u>o.cols-1?(p+=o.buffer.translateBufferLineToString(h,!1,e,u),u=0,e=0,h++):!l&&u<0&&(p+=o.buffer.translateBufferLineToString(h,!1,0,e+1),u=o.cols-1,e=u,h--);return p+o.buffer.translateBufferLineToString(h,!1,e,u)}function ec(e,t){let n=t?"O":"[";return re.ESC+n+e}function tc(e,t){e=Math.floor(e);let n="";for(let s=0;s<e;s++)n+=t;return n}var gB=class{constructor(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:!this.selectionEnd||!this.selectionStart?this.selectionStart:this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols===0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let e=this.selectionStart,t=this.selectionEnd;return!e||!t?!1:e[1]>t[1]||e[1]===t[1]&&e[0]>t[0]}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}};function s5(e,t){if(e.start.y>e.end.y)throw new Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}var M0=50,vB=15,yB=50,SB=500,bB=" ",wB=new RegExp(bB,"g"),Ip=class extends Pe{constructor(e,t,n,s,l,o,u,h,p){super(),this._element=e,this._screenElement=t,this._linkifier=n,this._bufferService=s,this._coreService=l,this._mouseService=o,this._optionsService=u,this._renderService=h,this._coreBrowserService=p,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new sn,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this._register(new ue),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this._register(new ue),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this._register(new ue),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this._register(new ue),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=d=>this._handleMouseMove(d),this._mouseUpListener=d=>this._handleMouseUp(d),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(d=>this._handleTrim(d)),this._register(this._bufferService.buffers.onBufferActivate(d=>this._handleBufferActivate(d))),this.enable(),this._model=new gB(this._bufferService),this._activeSelectionMode=0,this._register(ht(()=>{this._removeMouseDownListeners()})),this._register(this._bufferService.onResize(d=>{d.rowsChanged&&this.clearSelection()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!e||!t?!1:e[0]!==t[0]||e[1]!==t[1]}get selectionText(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return"";let n=this._bufferService.buffer,s=[];if(this._activeSelectionMode===3){if(e[0]===t[0])return"";let l=e[0]<t[0]?e[0]:t[0],o=e[0]<t[0]?t[0]:e[0];for(let u=e[1];u<=t[1];u++){let h=n.translateBufferLineToString(u,!0,l,o);s.push(h)}}else{let l=e[1]===t[1]?t[0]:void 0;s.push(n.translateBufferLineToString(e[1],!0,e[0],l));for(let o=e[1]+1;o<=t[1]-1;o++){let u=n.lines.get(o),h=n.translateBufferLineToString(o,!0);u?.isWrapped?s[s.length-1]+=h:s.push(h)}if(e[1]!==t[1]){let o=n.lines.get(t[1]),u=n.translateBufferLineToString(t[1],!0,0,t[0]);o&&o.isWrapped?s[s.length-1]+=u:s.push(u)}}return s.map(l=>l.replace(wB," ")).join(D7?`\r
74
- `:`
75
- `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),U_&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(e){let t=this._getMouseBufferCoords(e),n=this._model.finalSelectionStart,s=this._model.finalSelectionEnd;return!n||!s||!t?!1:this._areCoordsInSelection(t,n,s)}isCellInSelection(e,t){let n=this._model.finalSelectionStart,s=this._model.finalSelectionEnd;return!n||!s?!1:this._areCoordsInSelection([e,t],n,s)}_areCoordsInSelection(e,t,n){return e[1]>t[1]&&e[1]<n[1]||t[1]===n[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<n[0]||t[1]<n[1]&&e[1]===n[1]&&e[0]<n[0]||t[1]<n[1]&&e[1]===t[1]&&e[0]>=t[0]}_selectWordAtCursor(e,t){let n=this._linkifier.currentLink?.link?.range;if(n)return this._model.selectionStart=[n.start.x-1,n.start.y-1],this._model.selectionStartLength=s5(n,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let s=this._getMouseBufferCoords(e);return s?(this._selectWordAt(s,t),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){let t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=F_(this._coreBrowserService.window,e,this._screenElement)[1],n=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=n?0:(t>n&&(t-=n),t=Math.min(Math.max(t,-M0),M0),t/=M0,t/Math.abs(t)+Math.round(t*(vB-1)))}shouldForceSelection(e){return Fh?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,!(e.button===2&&this.hasSelection)&&e.button===0){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):e.detail===1?this._handleSingleClick(e):e.detail===2?this._handleDoubleClick(e):e.detail===3&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),yB)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&t.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){let t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!(Fh&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;let t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd){this.refresh(!0);return}this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let n=this._bufferService.buffer;if(this._model.selectionEnd[1]<n.lines.length){let s=n.lines.get(this._model.selectionEnd[1]);s&&s.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}(!t||t[0]!==this._model.selectionEnd[0]||t[1]!==this._model.selectionEnd[1])&&this.refresh(!0)}_dragScroll(){if(!(!this._model.selectionEnd||!this._model.selectionStart)&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});let e=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}}_handleMouseUp(e){let t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<SB&&e.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let n=this._mouseService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(n&&n[0]!==void 0&&n[1]!==void 0){let s=uB(n[0]-1,n[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(s,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd,n=!!e&&!!t&&(e[0]!==t[0]||e[1]!==t[1]);if(!n){this._oldHasSelection&&this._fireOnSelectionChange(e,t,n);return}!e||!t||(!this._oldSelectionStart||!this._oldSelectionEnd||e[0]!==this._oldSelectionStart[0]||e[1]!==this._oldSelectionStart[1]||t[0]!==this._oldSelectionEnd[0]||t[1]!==this._oldSelectionEnd[1])&&this._fireOnSelectionChange(e,t,n)}_fireOnSelectionChange(e,t,n){this._oldSelectionStart=e,this._oldSelectionEnd=t,this._oldHasSelection=n,this._onSelectionChange.fire()}_handleBufferActivate(e){this.clearSelection(),this._trimListener.dispose(),this._trimListener=e.activeBuffer.lines.onTrim(t=>this._handleTrim(t))}_convertViewportColToCharacterIndex(e,t){let n=t;for(let s=0;t>=s;s++){let l=e.loadCell(s,this._workCell).getChars().length;this._workCell.getWidth()===0?n--:l>1&&t!==s&&(n+=l-1)}return n}setSelection(e,t,n){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=n,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(e,t,n=!0,s=!0){if(e[0]>=this._bufferService.cols)return;let l=this._bufferService.buffer,o=l.lines.get(e[1]);if(!o)return;let u=l.translateBufferLineToString(e[1],!1),h=this._convertViewportColToCharacterIndex(o,e[0]),p=h,d=e[0]-h,g=0,_=0,S=0,v=0;if(u.charAt(h)===" "){for(;h>0&&u.charAt(h-1)===" ";)h--;for(;p<u.length&&u.charAt(p+1)===" ";)p++}else{let E=e[0],M=e[0];o.getWidth(E)===0&&(g++,E--),o.getWidth(M)===2&&(_++,M++);let U=o.getString(M).length;for(U>1&&(v+=U-1,p+=U-1);E>0&&h>0&&!this._isCharWordSeparator(o.loadCell(E-1,this._workCell));){o.loadCell(E-1,this._workCell);let B=this._workCell.getChars().length;this._workCell.getWidth()===0?(g++,E--):B>1&&(S+=B-1,h-=B-1),h--,E--}for(;M<o.length&&p+1<u.length&&!this._isCharWordSeparator(o.loadCell(M+1,this._workCell));){o.loadCell(M+1,this._workCell);let B=this._workCell.getChars().length;this._workCell.getWidth()===2?(_++,M++):B>1&&(v+=B-1,p+=B-1),p++,M++}}p++;let w=h+d-g+S,C=Math.min(this._bufferService.cols,p-h+g+_-S-v);if(!(!t&&u.slice(h,p).trim()==="")){if(n&&w===0&&o.getCodePoint(0)!==32){let E=l.lines.get(e[1]-1);if(E&&o.isWrapped&&E.getCodePoint(this._bufferService.cols-1)!==32){let M=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(M){let U=this._bufferService.cols-M.start;w-=U,C+=U}}}if(s&&w+C===this._bufferService.cols&&o.getCodePoint(this._bufferService.cols-1)!==32){let E=l.lines.get(e[1]+1);if(E?.isWrapped&&E.getCodePoint(0)!==32){let M=this._getWordAt([0,e[1]+1],!1,!1,!0);M&&(C+=M.length)}}return{start:w,length:C}}}_selectWordAt(e,t){let n=this._getWordAt(e,t);if(n){for(;n.start<0;)n.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[n.start,e[1]],this._model.selectionStartLength=n.length}}_selectToWordAt(e){let t=this._getWordAt(e,!0);if(t){let n=e[1];for(;t.start<0;)t.start+=this._bufferService.cols,n--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,n++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,n]}}_isCharWordSeparator(e){return e.getWidth()===0?!1:this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0}_selectLineAt(e){let t=this._bufferService.buffer.getWrappedRangeForLine(e),n={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=s5(n,this._bufferService.cols)}};Ip=vt([pe(3,mi),pe(4,el),pe(5,N_),pe(6,_i),pe(7,mr),pe(8,pr)],Ip);var l5=class{constructor(){this._data={}}set(e,t,n){this._data[e]||(this._data[e]={}),this._data[e][t]=n}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},a5=class{constructor(){this._color=new l5,this._css=new l5}setCss(e,t,n){this._css.set(e,t,n)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,n){this._color.set(e,t,n)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}},Ot=Object.freeze((()=>{let e=[pt.toColor("#2e3436"),pt.toColor("#cc0000"),pt.toColor("#4e9a06"),pt.toColor("#c4a000"),pt.toColor("#3465a4"),pt.toColor("#75507b"),pt.toColor("#06989a"),pt.toColor("#d3d7cf"),pt.toColor("#555753"),pt.toColor("#ef2929"),pt.toColor("#8ae234"),pt.toColor("#fce94f"),pt.toColor("#729fcf"),pt.toColor("#ad7fa8"),pt.toColor("#34e2e2"),pt.toColor("#eeeeec")],t=[0,95,135,175,215,255];for(let n=0;n<216;n++){let s=t[n/36%6|0],l=t[n/6%6|0],o=t[n%6];e.push({css:At.toCss(s,l,o),rgba:At.toRgba(s,l,o)})}for(let n=0;n<24;n++){let s=8+n*10;e.push({css:At.toCss(s,s,s),rgba:At.toRgba(s,s,s)})}return e})()),Hs=pt.toColor("#ffffff"),zo=pt.toColor("#000000"),o5=pt.toColor("#ffffff"),c5=zo,Ao={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117},xB=Hs,Pp=class extends Pe{constructor(e){super(),this._optionsService=e,this._contrastCache=new a5,this._halfContrastCache=new a5,this._onChangeColors=this._register(new ue),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:Hs,background:zo,cursor:o5,cursorAccent:c5,selectionForeground:void 0,selectionBackgroundTransparent:Ao,selectionBackgroundOpaque:ct.blend(zo,Ao),selectionInactiveBackgroundTransparent:Ao,selectionInactiveBackgroundOpaque:ct.blend(zo,Ao),scrollbarSliderBackground:ct.opacity(Hs,.2),scrollbarSliderHoverBackground:ct.opacity(Hs,.4),scrollbarSliderActiveBackground:ct.opacity(Hs,.5),overviewRulerBorder:Hs,ansi:Ot.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this._register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this._register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}get colors(){return this._colors}_setTheme(e={}){let t=this._colors;if(t.foreground=it(e.foreground,Hs),t.background=it(e.background,zo),t.cursor=ct.blend(t.background,it(e.cursor,o5)),t.cursorAccent=ct.blend(t.background,it(e.cursorAccent,c5)),t.selectionBackgroundTransparent=it(e.selectionBackground,Ao),t.selectionBackgroundOpaque=ct.blend(t.background,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundTransparent=it(e.selectionInactiveBackground,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundOpaque=ct.blend(t.background,t.selectionInactiveBackgroundTransparent),t.selectionForeground=e.selectionForeground?it(e.selectionForeground,i5):void 0,t.selectionForeground===i5&&(t.selectionForeground=void 0),ct.isOpaque(t.selectionBackgroundTransparent)&&(t.selectionBackgroundTransparent=ct.opacity(t.selectionBackgroundTransparent,.3)),ct.isOpaque(t.selectionInactiveBackgroundTransparent)&&(t.selectionInactiveBackgroundTransparent=ct.opacity(t.selectionInactiveBackgroundTransparent,.3)),t.scrollbarSliderBackground=it(e.scrollbarSliderBackground,ct.opacity(t.foreground,.2)),t.scrollbarSliderHoverBackground=it(e.scrollbarSliderHoverBackground,ct.opacity(t.foreground,.4)),t.scrollbarSliderActiveBackground=it(e.scrollbarSliderActiveBackground,ct.opacity(t.foreground,.5)),t.overviewRulerBorder=it(e.overviewRulerBorder,xB),t.ansi=Ot.slice(),t.ansi[0]=it(e.black,Ot[0]),t.ansi[1]=it(e.red,Ot[1]),t.ansi[2]=it(e.green,Ot[2]),t.ansi[3]=it(e.yellow,Ot[3]),t.ansi[4]=it(e.blue,Ot[4]),t.ansi[5]=it(e.magenta,Ot[5]),t.ansi[6]=it(e.cyan,Ot[6]),t.ansi[7]=it(e.white,Ot[7]),t.ansi[8]=it(e.brightBlack,Ot[8]),t.ansi[9]=it(e.brightRed,Ot[9]),t.ansi[10]=it(e.brightGreen,Ot[10]),t.ansi[11]=it(e.brightYellow,Ot[11]),t.ansi[12]=it(e.brightBlue,Ot[12]),t.ansi[13]=it(e.brightMagenta,Ot[13]),t.ansi[14]=it(e.brightCyan,Ot[14]),t.ansi[15]=it(e.brightWhite,Ot[15]),e.extendedAnsi){let n=Math.min(t.ansi.length-16,e.extendedAnsi.length);for(let s=0;s<n;s++)t.ansi[s+16]=it(e.extendedAnsi[s],Ot[s+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(e){this._restoreColor(e),this._onChangeColors.fire(this.colors)}_restoreColor(e){if(e===void 0){for(let t=0;t<this._restoreColors.ansi.length;++t)this._colors.ansi[t]=this._restoreColors.ansi[t];return}switch(e){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[e]=this._restoreColors.ansi[e]}}modifyColors(e){e(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};Pp=vt([pe(0,_i)],Pp);function it(e,t){if(e!==void 0)try{return pt.toColor(e)}catch{}return t}var CB=class{constructor(...e){this._entries=new Map;for(let[t,n]of e)this.set(t,n)}set(e,t){let n=this._entries.get(e);return this._entries.set(e,t),n}forEach(e){for(let[t,n]of this._entries.entries())e(t,n)}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}},EB=class{constructor(){this._services=new CB,this._services.set(L_,this)}setService(e,t){this._services.set(e,t)}getService(e){return this._services.get(e)}createInstance(e,...t){let n=vN(e).sort((o,u)=>o.index-u.index),s=[];for(let o of n){let u=this._services.get(o.id);if(!u)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${o.id._id}.`);s.push(u)}let l=n.length>0?n[0].index:t.length;if(t.length!==l)throw new Error(`[createInstance] First service dependency of ${e.name} at position ${l+1} conflicts with ${t.length} static arguments`);return new e(...t,...s)}},kB={trace:0,debug:1,info:2,warn:3,error:4,off:5},TB="xterm.js: ",Fp=class extends Pe{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel()))}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=kB[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]=="function"&&(e[t]=e[t]())}_log(e,t,n){this._evalLazyOptionalParams(n),e.call(console,(this._optionsService.options.logger?"":TB)+t,...n)}trace(e,...t){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,e,t)}debug(e,...t){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,e,t)}info(e,...t){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,e,t)}warn(e,...t){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,e,t)}error(e,...t){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,e,t)}};Fp=vt([pe(0,_i)],Fp);var u5=class extends Pe{constructor(e){super(),this._maxLength=e,this.onDeleteEmitter=this._register(new ue),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this._register(new ue),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this._register(new ue),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(e){if(this._maxLength===e)return;let t=new Array(e);for(let n=0;n<Math.min(e,this.length);n++)t[n]=this._array[this._getCyclicIndex(n)];this._array=t,this._maxLength=e,this._startIndex=0}get length(){return this._length}set length(e){if(e>this._length)for(let t=this._length;t<e;t++)this._array[t]=void 0;this._length=e}get(e){return this._array[this._getCyclicIndex(e)]}set(e,t){this._array[this._getCyclicIndex(e)]=t}push(e){this._array[this._getCyclicIndex(this._length)]=e,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(e,t,...n){if(t){for(let s=e;s<this._length-t;s++)this._array[this._getCyclicIndex(s)]=this._array[this._getCyclicIndex(s+t)];this._length-=t,this.onDeleteEmitter.fire({index:e,amount:t})}for(let s=this._length-1;s>=e;s--)this._array[this._getCyclicIndex(s+n.length)]=this._array[this._getCyclicIndex(s)];for(let s=0;s<n.length;s++)this._array[this._getCyclicIndex(e+s)]=n[s];if(n.length&&this.onInsertEmitter.fire({index:e,amount:n.length}),this._length+n.length>this._maxLength){let s=this._length+n.length-this._maxLength;this._startIndex+=s,this._length=this._maxLength,this.onTrimEmitter.fire(s)}else this._length+=n.length}trimStart(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)}shiftElements(e,t,n){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+n<0)throw new Error("Cannot shift elements in list beyond index 0");if(n>0){for(let l=t-1;l>=0;l--)this.set(e+l+n,this.get(e+l));let s=e+t+n-this._length;if(s>0)for(this._length+=s;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let s=0;s<t;s++)this.set(e+s+n,this.get(e+s))}}_getCyclicIndex(e){return(this._startIndex+e)%this._maxLength}},He=3,Mt=Object.freeze(new fc),sh=0,A0=2,Bo=class z7{constructor(t,n,s=!1){this.isWrapped=s,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(t*He);let l=n||sn.fromCharData([0,e7,1,0]);for(let o=0;o<t;++o)this.setCell(o,l);this.length=t}get(t){let n=this._data[t*He+0],s=n&2097151;return[this._data[t*He+1],n&2097152?this._combined[t]:s?Zr(s):"",n>>22,n&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):s]}set(t,n){this._data[t*He+1]=n[0],n[1].length>1?(this._combined[t]=n[1],this._data[t*He+0]=t|2097152|n[2]<<22):this._data[t*He+0]=n[1].charCodeAt(0)|n[2]<<22}getWidth(t){return this._data[t*He+0]>>22}hasWidth(t){return this._data[t*He+0]&12582912}getFg(t){return this._data[t*He+1]}getBg(t){return this._data[t*He+2]}hasContent(t){return this._data[t*He+0]&4194303}getCodePoint(t){let n=this._data[t*He+0];return n&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):n&2097151}isCombined(t){return this._data[t*He+0]&2097152}getString(t){let n=this._data[t*He+0];return n&2097152?this._combined[t]:n&2097151?Zr(n&2097151):""}isProtected(t){return this._data[t*He+2]&536870912}loadCell(t,n){return sh=t*He,n.content=this._data[sh+0],n.fg=this._data[sh+1],n.bg=this._data[sh+2],n.content&2097152&&(n.combinedData=this._combined[t]),n.bg&268435456&&(n.extended=this._extendedAttrs[t]),n}setCell(t,n){n.content&2097152&&(this._combined[t]=n.combinedData),n.bg&268435456&&(this._extendedAttrs[t]=n.extended),this._data[t*He+0]=n.content,this._data[t*He+1]=n.fg,this._data[t*He+2]=n.bg}setCellFromCodepoint(t,n,s,l){l.bg&268435456&&(this._extendedAttrs[t]=l.extended),this._data[t*He+0]=n|s<<22,this._data[t*He+1]=l.fg,this._data[t*He+2]=l.bg}addCodepointToCell(t,n,s){let l=this._data[t*He+0];l&2097152?this._combined[t]+=Zr(n):l&2097151?(this._combined[t]=Zr(l&2097151)+Zr(n),l&=-2097152,l|=2097152):l=n|1<<22,s&&(l&=-12582913,l|=s<<22),this._data[t*He+0]=l}insertCells(t,n,s){if(t%=this.length,t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,s),n<this.length-t){let l=new sn;for(let o=this.length-t-n-1;o>=0;--o)this.setCell(t+n+o,this.loadCell(t+o,l));for(let o=0;o<n;++o)this.setCell(t+o,s)}else for(let l=t;l<this.length;++l)this.setCell(l,s);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,s)}deleteCells(t,n,s){if(t%=this.length,n<this.length-t){let l=new sn;for(let o=0;o<this.length-t-n;++o)this.setCell(t+o,this.loadCell(t+n+o,l));for(let o=this.length-n;o<this.length;++o)this.setCell(o,s)}else for(let l=t;l<this.length;++l)this.setCell(l,s);t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,s),this.getWidth(t)===0&&!this.hasContent(t)&&this.setCellFromCodepoint(t,0,1,s)}replaceCells(t,n,s,l=!1){if(l){for(t&&this.getWidth(t-1)===2&&!this.isProtected(t-1)&&this.setCellFromCodepoint(t-1,0,1,s),n<this.length&&this.getWidth(n-1)===2&&!this.isProtected(n)&&this.setCellFromCodepoint(n,0,1,s);t<n&&t<this.length;)this.isProtected(t)||this.setCell(t,s),t++;return}for(t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,s),n<this.length&&this.getWidth(n-1)===2&&this.setCellFromCodepoint(n,0,1,s);t<n&&t<this.length;)this.setCell(t++,s)}resize(t,n){if(t===this.length)return this._data.length*4*A0<this._data.buffer.byteLength;let s=t*He;if(t>this.length){if(this._data.buffer.byteLength>=s*4)this._data=new Uint32Array(this._data.buffer,0,s);else{let l=new Uint32Array(s);l.set(this._data),this._data=l}for(let l=this.length;l<t;++l)this.setCell(l,n)}else{this._data=this._data.subarray(0,s);let l=Object.keys(this._combined);for(let u=0;u<l.length;u++){let h=parseInt(l[u],10);h>=t&&delete this._combined[h]}let o=Object.keys(this._extendedAttrs);for(let u=0;u<o.length;u++){let h=parseInt(o[u],10);h>=t&&delete this._extendedAttrs[h]}}return this.length=t,s*4*A0<this._data.buffer.byteLength}cleanupMemory(){if(this._data.length*4*A0<this._data.buffer.byteLength){let t=new Uint32Array(this._data.length);return t.set(this._data),this._data=t,1}return 0}fill(t,n=!1){if(n){for(let s=0;s<this.length;++s)this.isProtected(s)||this.setCell(s,t);return}this._combined={},this._extendedAttrs={};for(let s=0;s<this.length;++s)this.setCell(s,t)}copyFrom(t){this.length!==t.length?this._data=new Uint32Array(t._data):this._data.set(t._data),this.length=t.length,this._combined={};for(let n in t._combined)this._combined[n]=t._combined[n];this._extendedAttrs={};for(let n in t._extendedAttrs)this._extendedAttrs[n]=t._extendedAttrs[n];this.isWrapped=t.isWrapped}clone(){let t=new z7(0);t._data=new Uint32Array(this._data),t.length=this.length;for(let n in this._combined)t._combined[n]=this._combined[n];for(let n in this._extendedAttrs)t._extendedAttrs[n]=this._extendedAttrs[n];return t.isWrapped=this.isWrapped,t}getTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*He+0]&4194303)return t+(this._data[t*He+0]>>22);return 0}getNoBgTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*He+0]&4194303||this._data[t*He+2]&50331648)return t+(this._data[t*He+0]>>22);return 0}copyCellsFrom(t,n,s,l,o){let u=t._data;if(o)for(let p=l-1;p>=0;p--){for(let d=0;d<He;d++)this._data[(s+p)*He+d]=u[(n+p)*He+d];u[(n+p)*He+2]&268435456&&(this._extendedAttrs[s+p]=t._extendedAttrs[n+p])}else for(let p=0;p<l;p++){for(let d=0;d<He;d++)this._data[(s+p)*He+d]=u[(n+p)*He+d];u[(n+p)*He+2]&268435456&&(this._extendedAttrs[s+p]=t._extendedAttrs[n+p])}let h=Object.keys(t._combined);for(let p=0;p<h.length;p++){let d=parseInt(h[p],10);d>=n&&(this._combined[d-n+s]=t._combined[d])}}translateToString(t,n,s,l){n=n??0,s=s??this.length,t&&(s=Math.min(s,this.getTrimmedLength())),l&&(l.length=0);let o="";for(;n<s;){let u=this._data[n*He+0],h=u&2097151,p=u&2097152?this._combined[n]:h?Zr(h):is;if(o+=p,l)for(let d=0;d<p.length;++d)l.push(n);n+=u>>22||1}return l&&l.push(n),o}};function MB(e,t,n,s,l,o){let u=[];for(let h=0;h<e.length-1;h++){let p=h,d=e.get(++p);if(!d.isWrapped)continue;let g=[e.get(h)];for(;p<e.length&&d.isWrapped;)g.push(d),d=e.get(++p);if(!o&&s>=h&&s<p){h+=g.length-1;continue}let _=0,S=ic(g,_,t),v=1,w=0;for(;v<g.length;){let E=ic(g,v,t),M=E-w,U=n-S,B=Math.min(M,U);g[_].copyCellsFrom(g[v],w,S,B,!1),S+=B,S===n&&(_++,S=0),w+=B,w===E&&(v++,w=0),S===0&&_!==0&&g[_-1].getWidth(n-1)===2&&(g[_].copyCellsFrom(g[_-1],n-1,S++,1,!1),g[_-1].setCell(n-1,l))}g[_].replaceCells(S,n,l);let C=0;for(let E=g.length-1;E>0&&(E>_||g[E].getTrimmedLength()===0);E--)C++;C>0&&(u.push(h+g.length-C),u.push(C)),h+=g.length-1}return u}function AB(e,t){let n=[],s=0,l=t[s],o=0;for(let u=0;u<e.length;u++)if(l===u){let h=t[++s];e.onDeleteEmitter.fire({index:u-o,amount:h}),u+=h-1,o+=h,l=t[++s]}else n.push(u);return{layout:n,countRemoved:o}}function DB(e,t){let n=[];for(let s=0;s<t.length;s++)n.push(e.get(t[s]));for(let s=0;s<n.length;s++)e.set(s,n[s]);e.length=t.length}function OB(e,t,n){let s=[],l=e.map((p,d)=>ic(e,d,t)).reduce((p,d)=>p+d),o=0,u=0,h=0;for(;h<l;){if(l-h<n){s.push(l-h);break}o+=n;let p=ic(e,u,t);o>p&&(o-=p,u++);let d=e[u].getWidth(o-1)===2;d&&o--;let g=d?n-1:n;s.push(g),h+=g}return s}function ic(e,t,n){if(t===e.length-1)return e[t].getTrimmedLength();let s=!e[t].hasContent(n-1)&&e[t].getWidth(n-1)===1,l=e[t+1].getWidth(0)===2;return s&&l?n-1:n}var B7=class j7{constructor(t){this.line=t,this.isDisposed=!1,this._disposables=[],this._id=j7._nextId++,this._onDispose=this.register(new ue),this.onDispose=this._onDispose.event}get id(){return this._id}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),Gs(this._disposables),this._disposables.length=0)}register(t){return this._disposables.push(t),t}};B7._nextId=1;var RB=B7,Nt={},Is=Nt.B;Nt[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"};Nt.A={"#":"£"};Nt.B=void 0;Nt[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"};Nt.C=Nt[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"};Nt.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"};Nt.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"};Nt.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"};Nt.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"};Nt.E=Nt[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"};Nt.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"};Nt.H=Nt[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"};Nt["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"};var h5=4294967295,f5=class{constructor(e,t,n){this._hasScrollback=e,this._optionsService=t,this._bufferService=n,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=Mt.clone(),this.savedCharset=Is,this.markers=[],this._nullCell=sn.fromCharData([0,e7,1,0]),this._whitespaceCell=sn.fromCharData([0,is,1,32]),this._isClearing=!1,this._memoryCleanupQueue=new Uh,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new u5(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new Hh),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new Hh),this._whitespaceCell}getBlankLine(e,t){return new Bo(this._bufferService.cols,this.getNullCell(e),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows}_getCorrectBufferLength(e){if(!this._hasScrollback)return e;let t=e+this._optionsService.rawOptions.scrollback;return t>h5?h5:t}fillViewportRows(e){if(this.lines.length===0){e===void 0&&(e=Mt);let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(e))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new u5(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){let n=this.getNullCell(Mt),s=0,l=this._getCorrectBufferLength(t);if(l>this.lines.maxLength&&(this.lines.maxLength=l),this.lines.length>0){if(this._cols<e)for(let u=0;u<this.lines.length;u++)s+=+this.lines.get(u).resize(e,n);let o=0;if(this._rows<t)for(let u=this._rows;u<t;u++)this.lines.length<t+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new Bo(e,n)):this.ybase>0&&this.lines.length<=this.ybase+this.y+o+1?(this.ybase--,o++,this.ydisp>0&&this.ydisp--):this.lines.push(new Bo(e,n)));else for(let u=this._rows;u>t;u--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(l<this.lines.maxLength){let u=this.lines.length-l;u>0&&(this.lines.trimStart(u),this.ybase=Math.max(this.ybase-u,0),this.ydisp=Math.max(this.ydisp-u,0),this.savedY=Math.max(this.savedY-u,0)),this.lines.maxLength=l}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),o&&(this.y+=o),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(let o=0;o<this.lines.length;o++)s+=+this.lines.get(o).resize(e,n);this._cols=e,this._rows=t,this._memoryCleanupQueue.clear(),s>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let e=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,e=!1);let t=0;for(;this._memoryCleanupPosition<this.lines.length;)if(t+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),t>100)return!0;return e}get _isReflowEnabled(){let e=this._optionsService.rawOptions.windowsPty;return e&&e.buildNumber?this._hasScrollback&&e.backend==="conpty"&&e.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))}_reflowLarger(e,t){let n=this._optionsService.rawOptions.reflowCursorLine,s=MB(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(Mt),n);if(s.length>0){let l=AB(this.lines,s);DB(this.lines,l.layout),this._reflowLargerAdjustViewport(e,t,l.countRemoved)}}_reflowLargerAdjustViewport(e,t,n){let s=this.getNullCell(Mt),l=n;for(;l-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<t&&this.lines.push(new Bo(e,s))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-n,0)}_reflowSmaller(e,t){let n=this._optionsService.rawOptions.reflowCursorLine,s=this.getNullCell(Mt),l=[],o=0;for(let u=this.lines.length-1;u>=0;u--){let h=this.lines.get(u);if(!h||!h.isWrapped&&h.getTrimmedLength()<=e)continue;let p=[h];for(;h.isWrapped&&u>0;)h=this.lines.get(--u),p.unshift(h);if(!n){let B=this.ybase+this.y;if(B>=u&&B<u+p.length)continue}let d=p[p.length-1].getTrimmedLength(),g=OB(p,this._cols,e),_=g.length-p.length,S;this.ybase===0&&this.y!==this.lines.length-1?S=Math.max(0,this.y-this.lines.maxLength+_):S=Math.max(0,this.lines.length-this.lines.maxLength+_);let v=[];for(let B=0;B<_;B++){let X=this.getBlankLine(Mt,!0);v.push(X)}v.length>0&&(l.push({start:u+p.length+o,newLines:v}),o+=v.length),p.push(...v);let w=g.length-1,C=g[w];C===0&&(w--,C=g[w]);let E=p.length-_-1,M=d;for(;E>=0;){let B=Math.min(M,C);if(p[w]===void 0)break;if(p[w].copyCellsFrom(p[E],M-B,C-B,B,!0),C-=B,C===0&&(w--,C=g[w]),M-=B,M===0){E--;let X=Math.max(E,0);M=ic(p,X,this._cols)}}for(let B=0;B<p.length;B++)g[B]<e&&p[B].setCell(g[B],s);let U=_-S;for(;U-- >0;)this.ybase===0?this.y<t-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+o)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+_,this.ybase+t-1)}if(l.length>0){let u=[],h=[];for(let C=0;C<this.lines.length;C++)h.push(this.lines.get(C));let p=this.lines.length,d=p-1,g=0,_=l[g];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+o);let S=0;for(let C=Math.min(this.lines.maxLength-1,p+o-1);C>=0;C--)if(_&&_.start>d+S){for(let E=_.newLines.length-1;E>=0;E--)this.lines.set(C--,_.newLines[E]);C++,u.push({index:d+1,amount:_.newLines.length}),S+=_.newLines.length,_=l[++g]}else this.lines.set(C,h[d--]);let v=0;for(let C=u.length-1;C>=0;C--)u[C].index+=v,this.lines.onInsertEmitter.fire(u[C]),v+=u[C].amount;let w=Math.max(0,p+o-this.lines.maxLength);w>0&&this.lines.onTrimEmitter.fire(w)}}translateBufferLineToString(e,t,n=0,s){let l=this.lines.get(e);return l?l.translateToString(t,n,s):""}getWrappedRangeForLine(e){let t=e,n=e;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;n+1<this.lines.length&&this.lines.get(n+1).isWrapped;)n++;return{first:t,last:n}}setupTabStops(e){for(e!=null?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.rawOptions.tabStopWidth)this.tabs[e]=!0}prevStop(e){for(e==null&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(e==null&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let t=0;t<this.markers.length;t++)this.markers[t].line===e&&(this.markers[t].dispose(),this.markers.splice(t--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let e=0;e<this.markers.length;e++)this.markers[e].dispose();this.markers.length=0,this._isClearing=!1}addMarker(e){let t=new RB(e);return this.markers.push(t),t.register(this.lines.onTrim(n=>{t.line-=n,t.line<0&&t.dispose()})),t.register(this.lines.onInsert(n=>{t.line>=n.index&&(t.line+=n.amount)})),t.register(this.lines.onDelete(n=>{t.line>=n.index&&t.line<n.index+n.amount&&t.dispose(),t.line>n.index&&(t.line-=n.amount)})),t.register(t.onDispose(()=>this._removeMarker(t))),t}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}},LB=class extends Pe{constructor(e,t){super(),this._optionsService=e,this._bufferService=t,this._onBufferActivate=this._register(new ue),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this._register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this._register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new f5(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new f5(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(e,t){this._normal.resize(e,t),this._alt.resize(e,t),this.setupTabStops(e)}setupTabStops(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)}},H7=2,I7=1,Up=class extends Pe{constructor(e){super(),this.isUserScrolling=!1,this._onResize=this._register(new ue),this.onResize=this._onResize.event,this._onScroll=this._register(new ue),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,H7),this.rows=Math.max(e.rawOptions.rows||0,I7),this.buffers=this._register(new LB(e,this)),this._register(this.buffers.onBufferActivate(t=>{this._onScroll.fire(t.activeBuffer.ydisp)}))}get buffer(){return this.buffers.active}resize(e,t){let n=this.cols!==e,s=this.rows!==t;this.cols=e,this.rows=t,this.buffers.resize(e,t),this._onResize.fire({cols:e,rows:t,colsChanged:n,rowsChanged:s})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,t=!1){let n=this.buffer,s;s=this._cachedBlankLine,(!s||s.length!==this.cols||s.getFg(0)!==e.fg||s.getBg(0)!==e.bg)&&(s=n.getBlankLine(e,t),this._cachedBlankLine=s),s.isWrapped=t;let l=n.ybase+n.scrollTop,o=n.ybase+n.scrollBottom;if(n.scrollTop===0){let u=n.lines.isFull;o===n.lines.length-1?u?n.lines.recycle().copyFrom(s):n.lines.push(s.clone()):n.lines.splice(o+1,0,s.clone()),u?this.isUserScrolling&&(n.ydisp=Math.max(n.ydisp-1,0)):(n.ybase++,this.isUserScrolling||n.ydisp++)}else{let u=o-l+1;n.lines.shiftElements(l+1,u-1,-1),n.lines.set(o,s.clone())}this.isUserScrolling||(n.ydisp=n.ybase),this._onScroll.fire(n.ydisp)}scrollLines(e,t){let n=this.buffer;if(e<0){if(n.ydisp===0)return;this.isUserScrolling=!0}else e+n.ydisp>=n.ybase&&(this.isUserScrolling=!1);let s=n.ydisp;n.ydisp=Math.max(Math.min(n.ydisp+e,n.ybase),0),s!==n.ydisp&&(t||this._onScroll.fire(n.ydisp))}};Up=vt([pe(0,_i)],Up);var Jl={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnEraseInDisplay:!1,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},reflowCursorLine:!1,rescaleOverlappingGlyphs:!1,rightClickSelectsWord:Fh,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRuler:{}},NB=["normal","bold","100","200","300","400","500","600","700","800","900"],zB=class extends Pe{constructor(e){super(),this._onOptionChange=this._register(new ue),this.onOptionChange=this._onOptionChange.event;let t={...Jl};for(let n in e)if(n in t)try{let s=e[n];t[n]=this._sanitizeAndValidateOption(n,s)}catch(s){console.error(s)}this.rawOptions=t,this.options={...t},this._setupOptions(),this._register(ht(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(e,t){return this.onOptionChange(n=>{n===e&&t(this.rawOptions[e])})}onMultipleOptionChange(e,t){return this.onOptionChange(n=>{e.indexOf(n)!==-1&&t()})}_setupOptions(){let e=n=>{if(!(n in Jl))throw new Error(`No option with key "${n}"`);return this.rawOptions[n]},t=(n,s)=>{if(!(n in Jl))throw new Error(`No option with key "${n}"`);s=this._sanitizeAndValidateOption(n,s),this.rawOptions[n]!==s&&(this.rawOptions[n]=s,this._onOptionChange.fire(n))};for(let n in this.rawOptions){let s={get:e.bind(this,n),set:t.bind(this,n)};Object.defineProperty(this.options,n,s)}}_sanitizeAndValidateOption(e,t){switch(e){case"cursorStyle":if(t||(t=Jl[e]),!BB(t))throw new Error(`"${t}" is not a valid value for ${e}`);break;case"wordSeparator":t||(t=Jl[e]);break;case"fontWeight":case"fontWeightBold":if(typeof t=="number"&&1<=t&&t<=1e3)break;t=NB.includes(t)?t:Jl[e];break;case"cursorWidth":t=Math.floor(t);case"lineHeight":case"tabStopWidth":if(t<1)throw new Error(`${e} cannot be less than 1, value: ${t}`);break;case"minimumContrastRatio":t=Math.max(1,Math.min(21,Math.round(t*10)/10));break;case"scrollback":if(t=Math.min(t,4294967295),t<0)throw new Error(`${e} cannot be less than 0, value: ${t}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(t<=0)throw new Error(`${e} cannot be less than or equal to 0, value: ${t}`);break;case"rows":case"cols":if(!t&&t!==0)throw new Error(`${e} must be numeric, value: ${t}`);break;case"windowsPty":t=t??{};break}return t}};function BB(e){return e==="block"||e==="underline"||e==="bar"}function jo(e,t=5){if(typeof e!="object")return e;let n=Array.isArray(e)?[]:{};for(let s in e)n[s]=t<=1?e[s]:e[s]&&jo(e[s],t-1);return n}var d5=Object.freeze({insertMode:!1}),p5=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,cursorBlink:void 0,cursorStyle:void 0,origin:!1,reverseWraparound:!1,sendFocus:!1,synchronizedOutput:!1,wraparound:!0}),Vp=class extends Pe{constructor(e,t,n){super(),this._bufferService=e,this._logService=t,this._optionsService=n,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this._register(new ue),this.onData=this._onData.event,this._onUserInput=this._register(new ue),this.onUserInput=this._onUserInput.event,this._onBinary=this._register(new ue),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this._register(new ue),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=jo(d5),this.decPrivateModes=jo(p5)}reset(){this.modes=jo(d5),this.decPrivateModes=jo(p5)}triggerDataEvent(e,t=!1){if(this._optionsService.rawOptions.disableStdin)return;let n=this._bufferService.buffer;t&&this._optionsService.rawOptions.scrollOnUserInput&&n.ybase!==n.ydisp&&this._onRequestScrollToBottom.fire(),t&&this._onUserInput.fire(),this._logService.debug(`sending data "${e}"`),this._logService.trace("sending data (codes)",()=>e.split("").map(s=>s.charCodeAt(0))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${e}"`),this._logService.trace("sending binary (codes)",()=>e.split("").map(t=>t.charCodeAt(0))),this._onBinary.fire(e))}};Vp=vt([pe(0,mi),pe(1,s7),pe(2,_i)],Vp);var m5={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:e=>e.button===4||e.action!==1?!1:(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)},VT200:{events:19,restrict:e=>e.action!==32},DRAG:{events:23,restrict:e=>!(e.action===32&&e.button===3)},ANY:{events:31,restrict:e=>!0}};function D0(e,t){let n=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return e.button===4?(n|=64,n|=e.action):(n|=e.button&3,e.button&4&&(n|=64),e.button&8&&(n|=128),e.action===32?n|=32:e.action===0&&!t&&(n|=3)),n}var O0=String.fromCharCode,_5={DEFAULT:e=>{let t=[D0(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?"":`\x1B[M${O0(t[0])}${O0(t[1])}${O0(t[2])}`},SGR:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${D0(e,!0)};${e.col};${e.row}${t}`},SGR_PIXELS:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${D0(e,!0)};${e.x};${e.y}${t}`}},qp=class extends Pe{constructor(e,t,n){super(),this._bufferService=e,this._coreService=t,this._optionsService=n,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._wheelPartialScroll=0,this._onProtocolChange=this._register(new ue),this.onProtocolChange=this._onProtocolChange.event;for(let s of Object.keys(m5))this.addProtocol(s,m5[s]);for(let s of Object.keys(_5))this.addEncoding(s,_5[s]);this.reset()}addProtocol(e,t){this._protocols[e]=t}addEncoding(e,t){this._encodings[e]=t}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(e){if(!this._protocols[e])throw new Error(`unknown protocol "${e}"`);this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(e){if(!this._encodings[e])throw new Error(`unknown encoding "${e}"`);this._activeEncoding=e}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null,this._wheelPartialScroll=0}consumeWheelEvent(e,t,n){if(e.deltaY===0||e.shiftKey||t===void 0||n===void 0)return 0;let s=t/n,l=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(l/=s+0,Math.abs(e.deltaY)<50&&(l*=.3),this._wheelPartialScroll+=l,l=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(l*=this._bufferService.rows),l}_applyScrollModifier(e,t){return t.altKey||t.ctrlKey||t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}triggerMouseEvent(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,e,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(e))return!1;let t=this._encodings[this._activeEncoding](e);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0}explainEvents(e){return{down:!!(e&1),up:!!(e&2),drag:!!(e&4),move:!!(e&8),wheel:!!(e&16)}}_equalEvents(e,t,n){if(n){if(e.x!==t.x||e.y!==t.y)return!1}else if(e.col!==t.col||e.row!==t.row)return!1;return!(e.button!==t.button||e.action!==t.action||e.ctrl!==t.ctrl||e.alt!==t.alt||e.shift!==t.shift)}};qp=vt([pe(0,mi),pe(1,el),pe(2,_i)],qp);var R0=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],jB=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],Rt;function HB(e,t){let n=0,s=t.length-1,l;if(e<t[0][0]||e>t[s][1])return!1;for(;s>=n;)if(l=n+s>>1,e>t[l][1])n=l+1;else if(e<t[l][0])s=l-1;else return!0;return!1}var IB=class{constructor(){if(this.version="6",!Rt){Rt=new Uint8Array(65536),Rt.fill(1),Rt[0]=0,Rt.fill(0,1,32),Rt.fill(0,127,160),Rt.fill(2,4352,4448),Rt[9001]=2,Rt[9002]=2,Rt.fill(2,11904,42192),Rt[12351]=1,Rt.fill(2,44032,55204),Rt.fill(2,63744,64256),Rt.fill(2,65040,65050),Rt.fill(2,65072,65136),Rt.fill(2,65280,65377),Rt.fill(2,65504,65511);for(let e=0;e<R0.length;++e)Rt.fill(0,R0[e][0],R0[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?Rt[e]:HB(e,jB)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let n=this.wcwidth(e),s=n===0&&t!==0;if(s){let l=Fs.extractWidth(t);l===0?s=!1:l>n&&(n=l)}return Fs.createPropertyValue(0,n,s)}},Fs=class ph{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new ue,this.onChange=this._onChange.event;let t=new IB;this.register(t),this._active=t.version,this._activeProvider=t}static extractShouldJoin(t){return(t&1)!==0}static extractWidth(t){return t>>1&3}static extractCharKind(t){return t>>3}static createPropertyValue(t,n,s=!1){return(t&16777215)<<3|(n&3)<<1|(s?1:0)}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(t){if(!this._providers[t])throw new Error(`unknown Unicode version "${t}"`);this._active=t,this._activeProvider=this._providers[t],this._onChange.fire(t)}register(t){this._providers[t.version]=t}wcwidth(t){return this._activeProvider.wcwidth(t)}getStringCellWidth(t){let n=0,s=0,l=t.length;for(let o=0;o<l;++o){let u=t.charCodeAt(o);if(55296<=u&&u<=56319){if(++o>=l)return n+this.wcwidth(u);let d=t.charCodeAt(o);56320<=d&&d<=57343?u=(u-55296)*1024+d-56320+65536:n+=this.wcwidth(d)}let h=this.charProperties(u,s),p=ph.extractWidth(h);ph.extractShouldJoin(h)&&(p-=ph.extractWidth(s)),n+=p,s=h}return n}charProperties(t,n){return this._activeProvider.charProperties(t,n)}},PB=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(e){this.glevel=e,this.charset=this._charsets[e]}setgCharset(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)}};function g5(e){let t=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1)?.get(e.cols-1),n=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);n&&t&&(n.isWrapped=t[3]!==0&&t[3]!==32)}var Do=2147483647,FB=256,P7=class $p{constructor(t=32,n=32){if(this.maxLength=t,this.maxSubParamsLength=n,n>FB)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(t),this.length=0,this._subParams=new Int32Array(n),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(t),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}static fromArray(t){let n=new $p;if(!t.length)return n;for(let s=Array.isArray(t[0])?1:0;s<t.length;++s){let l=t[s];if(Array.isArray(l))for(let o=0;o<l.length;++o)n.addSubParam(l[o]);else n.addParam(l)}return n}clone(){let t=new $p(this.maxLength,this.maxSubParamsLength);return t.params.set(this.params),t.length=this.length,t._subParams.set(this._subParams),t._subParamsLength=this._subParamsLength,t._subParamsIdx.set(this._subParamsIdx),t._rejectDigits=this._rejectDigits,t._rejectSubDigits=this._rejectSubDigits,t._digitIsSub=this._digitIsSub,t}toArray(){let t=[];for(let n=0;n<this.length;++n){t.push(this.params[n]);let s=this._subParamsIdx[n]>>8,l=this._subParamsIdx[n]&255;l-s>0&&t.push(Array.prototype.slice.call(this._subParams,s,l))}return t}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(t){if(this._digitIsSub=!1,this.length>=this.maxLength){this._rejectDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=t>Do?Do:t}addSubParam(t){if(this._digitIsSub=!0,!!this.length){if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength){this._rejectSubDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=t>Do?Do:t,this._subParamsIdx[this.length-1]++}}hasSubParams(t){return(this._subParamsIdx[t]&255)-(this._subParamsIdx[t]>>8)>0}getSubParams(t){let n=this._subParamsIdx[t]>>8,s=this._subParamsIdx[t]&255;return s-n>0?this._subParams.subarray(n,s):null}getSubParamsAll(){let t={};for(let n=0;n<this.length;++n){let s=this._subParamsIdx[n]>>8,l=this._subParamsIdx[n]&255;l-s>0&&(t[n]=this._subParams.slice(s,l))}return t}addDigit(t){let n;if(this._rejectDigits||!(n=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let s=this._digitIsSub?this._subParams:this.params,l=s[n-1];s[n-1]=~l?Math.min(l*10+t,Do):t}},Oo=[],UB=class{constructor(){this._state=0,this._active=Oo,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let n=this._handlers[e];return n.push(t),{dispose:()=>{let s=n.indexOf(t);s!==-1&&n.splice(s,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=Oo}reset(){if(this._state===2)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=Oo,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||Oo,!this._active.length)this._handlerFb(this._id,"START");else for(let e=this._active.length-1;e>=0;e--)this._active[e].start()}_put(e,t,n){if(!this._active.length)this._handlerFb(this._id,"PUT",ff(e,t,n));else for(let s=this._active.length-1;s>=0;s--)this._active[s].put(e,t,n)}start(){this.reset(),this._state=1}put(e,t,n){if(this._state!==3){if(this._state===1)for(;t<n;){let s=e[t++];if(s===59){this._state=2,this._start();break}if(s<48||57<s){this._state=3;return}this._id===-1&&(this._id=0),this._id=this._id*10+s-48}this._state===2&&n-t>0&&this._put(e,t,n)}}end(e,t=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),!this._active.length)this._handlerFb(this._id,"END",e);else{let n=!1,s=this._active.length-1,l=!1;if(this._stack.paused&&(s=this._stack.loopPosition-1,n=t,l=this._stack.fallThrough,this._stack.paused=!1),!l&&n===!1){for(;s>=0&&(n=this._active[s].end(e),n!==!0);s--)if(n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!1,n;s--}for(;s>=0;s--)if(n=this._active[s].end(!1),n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!0,n}this._active=Oo,this._id=-1,this._state=0}}},Ii=class{constructor(e){this._handler=e,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(e,t,n){this._hitLimit||(this._data+=ff(e,t,n),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data),t instanceof Promise))return t.then(n=>(this._data="",this._hitLimit=!1,n));return this._data="",this._hitLimit=!1,t}},Ro=[],VB=class{constructor(){this._handlers=Object.create(null),this._active=Ro,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=Ro}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let n=this._handlers[e];return n.push(t),{dispose:()=>{let s=n.indexOf(t);s!==-1&&n.splice(s,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=Ro,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||Ro,!this._active.length)this._handlerFb(this._ident,"HOOK",t);else for(let n=this._active.length-1;n>=0;n--)this._active[n].hook(t)}put(e,t,n){if(!this._active.length)this._handlerFb(this._ident,"PUT",ff(e,t,n));else for(let s=this._active.length-1;s>=0;s--)this._active[s].put(e,t,n)}unhook(e,t=!0){if(!this._active.length)this._handlerFb(this._ident,"UNHOOK",e);else{let n=!1,s=this._active.length-1,l=!1;if(this._stack.paused&&(s=this._stack.loopPosition-1,n=t,l=this._stack.fallThrough,this._stack.paused=!1),!l&&n===!1){for(;s>=0&&(n=this._active[s].unhook(e),n!==!0);s--)if(n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!1,n;s--}for(;s>=0;s--)if(n=this._active[s].unhook(!1),n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!0,n}this._active=Ro,this._ident=0}},Ho=new P7;Ho.addParam(0);var v5=class{constructor(e){this._handler=e,this._data="",this._params=Ho,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():Ho,this._data="",this._hitLimit=!1}put(e,t,n){this._hitLimit||(this._data+=ff(e,t,n),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}unhook(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data,this._params),t instanceof Promise))return t.then(n=>(this._params=Ho,this._data="",this._hitLimit=!1,n));return this._params=Ho,this._data="",this._hitLimit=!1,t}},qB=class{constructor(e){this.table=new Uint8Array(e)}setDefault(e,t){this.table.fill(e<<4|t)}add(e,t,n,s){this.table[t<<8|e]=n<<4|s}addMany(e,t,n,s){for(let l=0;l<e.length;l++)this.table[t<<8|e[l]]=n<<4|s}},nn=160,$B=(function(){let e=new qB(4095),t=Array.apply(null,Array(256)).map((h,p)=>p),n=(h,p)=>t.slice(h,p),s=n(32,127),l=n(0,24);l.push(25),l.push.apply(l,n(28,32));let o=n(0,14),u;e.setDefault(1,0),e.addMany(s,0,2,0);for(u in o)e.addMany([24,26,153,154],u,3,0),e.addMany(n(128,144),u,3,0),e.addMany(n(144,152),u,3,0),e.add(156,u,0,0),e.add(27,u,11,1),e.add(157,u,4,8),e.addMany([152,158,159],u,0,7),e.add(155,u,11,3),e.add(144,u,11,9);return e.addMany(l,0,3,0),e.addMany(l,1,3,1),e.add(127,1,0,1),e.addMany(l,8,0,8),e.addMany(l,3,3,3),e.add(127,3,0,3),e.addMany(l,4,3,4),e.add(127,4,0,4),e.addMany(l,6,3,6),e.addMany(l,5,3,5),e.add(127,5,0,5),e.addMany(l,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(s,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(n(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(s,7,0,7),e.addMany(l,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(n(64,127),3,7,0),e.addMany(n(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(n(48,60),4,8,4),e.addMany(n(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(n(32,64),6,0,6),e.add(127,6,0,6),e.addMany(n(64,127),6,0,0),e.addMany(n(32,48),3,9,5),e.addMany(n(32,48),5,9,5),e.addMany(n(48,64),5,0,6),e.addMany(n(64,127),5,7,0),e.addMany(n(32,48),4,9,5),e.addMany(n(32,48),1,9,2),e.addMany(n(32,48),2,9,2),e.addMany(n(48,127),2,10,0),e.addMany(n(48,80),1,10,0),e.addMany(n(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(n(96,127),1,10,0),e.add(80,1,11,9),e.addMany(l,9,0,9),e.add(127,9,0,9),e.addMany(n(28,32),9,0,9),e.addMany(n(32,48),9,9,12),e.addMany(n(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(l,11,0,11),e.addMany(n(32,128),11,0,11),e.addMany(n(28,32),11,0,11),e.addMany(l,10,0,10),e.add(127,10,0,10),e.addMany(n(28,32),10,0,10),e.addMany(n(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(n(32,48),10,9,12),e.addMany(l,12,0,12),e.add(127,12,0,12),e.addMany(n(28,32),12,0,12),e.addMany(n(32,48),12,9,12),e.addMany(n(48,64),12,0,11),e.addMany(n(64,127),12,12,13),e.addMany(n(64,127),10,12,13),e.addMany(n(64,127),9,12,13),e.addMany(l,13,13,13),e.addMany(s,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(nn,0,2,0),e.add(nn,8,5,8),e.add(nn,6,0,6),e.add(nn,11,0,11),e.add(nn,13,13,13),e})(),YB=class extends Pe{constructor(e=$B){super(),this._transitions=e,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new P7,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(t,n,s)=>{},this._executeHandlerFb=t=>{},this._csiHandlerFb=(t,n)=>{},this._escHandlerFb=t=>{},this._errorHandlerFb=t=>t,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this._register(ht(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this._register(new UB),this._dcsParser=this._register(new VB),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(e,t=[64,126]){let n=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if(n=e.prefix.charCodeAt(0),n&&60>n||n>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let l=0;l<e.intermediates.length;++l){let o=e.intermediates.charCodeAt(l);if(32>o||o>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");n<<=8,n|=o}}if(e.final.length!==1)throw new Error("final must be a single byte");let s=e.final.charCodeAt(0);if(t[0]>s||s>t[1])throw new Error(`final must be in range ${t[0]} .. ${t[1]}`);return n<<=8,n|=s,n}identToString(e){let t=[];for(;e;)t.push(String.fromCharCode(e&255)),e>>=8;return t.reverse().join("")}setPrintHandler(e){this._printHandler=e}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(e,t){let n=this._identifier(e,[48,126]);this._escHandlers[n]===void 0&&(this._escHandlers[n]=[]);let s=this._escHandlers[n];return s.push(t),{dispose:()=>{let l=s.indexOf(t);l!==-1&&s.splice(l,1)}}}clearEscHandler(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]}setEscHandlerFallback(e){this._escHandlerFb=e}setExecuteHandler(e,t){this._executeHandlers[e.charCodeAt(0)]=t}clearExecuteHandler(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]}setExecuteHandlerFallback(e){this._executeHandlerFb=e}registerCsiHandler(e,t){let n=this._identifier(e);this._csiHandlers[n]===void 0&&(this._csiHandlers[n]=[]);let s=this._csiHandlers[n];return s.push(t),{dispose:()=>{let l=s.indexOf(t);l!==-1&&s.splice(l,1)}}}clearCsiHandler(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]}setCsiHandlerFallback(e){this._csiHandlerFb=e}registerDcsHandler(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)}clearDcsHandler(e){this._dcsParser.clearHandler(this._identifier(e))}setDcsHandlerFallback(e){this._dcsParser.setHandlerFallback(e)}registerOscHandler(e,t){return this._oscParser.registerHandler(e,t)}clearOscHandler(e){this._oscParser.clearHandler(e)}setOscHandlerFallback(e){this._oscParser.setHandlerFallback(e)}setErrorHandler(e){this._errorHandler=e}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(e,t,n,s,l){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=n,this._parseStack.transition=s,this._parseStack.chunkPos=l}parse(e,t,n){let s=0,l=0,o=0,u;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,o=this._parseStack.chunkPos+1;else{if(n===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");let h=this._parseStack.handlers,p=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(n===!1&&p>-1){for(;p>=0&&(u=h[p](this._params),u!==!0);p--)if(u instanceof Promise)return this._parseStack.handlerPos=p,u}this._parseStack.handlers=[];break;case 4:if(n===!1&&p>-1){for(;p>=0&&(u=h[p](),u!==!0);p--)if(u instanceof Promise)return this._parseStack.handlerPos=p,u}this._parseStack.handlers=[];break;case 6:if(s=e[this._parseStack.chunkPos],u=this._dcsParser.unhook(s!==24&&s!==26,n),u)return u;s===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(s=e[this._parseStack.chunkPos],u=this._oscParser.end(s!==24&&s!==26,n),u)return u;s===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break}this._parseStack.state=0,o=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=this._parseStack.transition&15}for(let h=o;h<t;++h){switch(s=e[h],l=this._transitions.table[this.currentState<<8|(s<160?s:nn)],l>>4){case 2:for(let S=h+1;;++S){if(S>=t||(s=e[S])<32||s>126&&s<nn){this._printHandler(e,h,S),h=S-1;break}if(++S>=t||(s=e[S])<32||s>126&&s<nn){this._printHandler(e,h,S),h=S-1;break}if(++S>=t||(s=e[S])<32||s>126&&s<nn){this._printHandler(e,h,S),h=S-1;break}if(++S>=t||(s=e[S])<32||s>126&&s<nn){this._printHandler(e,h,S),h=S-1;break}}break;case 3:this._executeHandlers[s]?this._executeHandlers[s]():this._executeHandlerFb(s),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:h,code:s,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:let p=this._csiHandlers[this._collect<<8|s],d=p?p.length-1:-1;for(;d>=0&&(u=p[d](this._params),u!==!0);d--)if(u instanceof Promise)return this._preserveStack(3,p,d,l,h),u;d<0&&this._csiHandlerFb(this._collect<<8|s,this._params),this.precedingJoinState=0;break;case 8:do switch(s){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(s-48)}while(++h<t&&(s=e[h])>47&&s<60);h--;break;case 9:this._collect<<=8,this._collect|=s;break;case 10:let g=this._escHandlers[this._collect<<8|s],_=g?g.length-1:-1;for(;_>=0&&(u=g[_](),u!==!0);_--)if(u instanceof Promise)return this._preserveStack(4,g,_,l,h),u;_<0&&this._escHandlerFb(this._collect<<8|s),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|s,this._params);break;case 13:for(let S=h+1;;++S)if(S>=t||(s=e[S])===24||s===26||s===27||s>127&&s<nn){this._dcsParser.put(e,h,S),h=S-1;break}break;case 14:if(u=this._dcsParser.unhook(s!==24&&s!==26),u)return this._preserveStack(6,[],0,l,h),u;s===27&&(l|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let S=h+1;;S++)if(S>=t||(s=e[S])<32||s>127&&s<nn){this._oscParser.put(e,h,S),h=S-1;break}break;case 6:if(u=this._oscParser.end(s!==24&&s!==26),u)return this._preserveStack(5,[],0,l,h),u;s===27&&(l|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break}this.currentState=l&15}}},KB=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,WB=/^[\da-f]+$/;function y5(e){if(!e)return;let t=e.toLowerCase();if(t.indexOf("rgb:")===0){t=t.slice(4);let n=KB.exec(t);if(n){let s=n[1]?15:n[4]?255:n[7]?4095:65535;return[Math.round(parseInt(n[1]||n[4]||n[7]||n[10],16)/s*255),Math.round(parseInt(n[2]||n[5]||n[8]||n[11],16)/s*255),Math.round(parseInt(n[3]||n[6]||n[9]||n[12],16)/s*255)]}}else if(t.indexOf("#")===0&&(t=t.slice(1),WB.exec(t)&&[3,6,9,12].includes(t.length))){let n=t.length/3,s=[0,0,0];for(let l=0;l<3;++l){let o=parseInt(t.slice(n*l,n*l+n),16);s[l]=n===1?o<<4:n===2?o:n===3?o>>4:o>>8}return s}}function L0(e,t){let n=e.toString(16),s=n.length<2?"0"+n:n;switch(t){case 4:return n[0];case 8:return s;case 12:return(s+s).slice(0,3);default:return s+s}}function GB(e,t=16){let[n,s,l]=e;return`rgb:${L0(n,t)}/${L0(s,t)}/${L0(l,t)}`}var XB={"(":0,")":1,"*":2,"+":3,"-":1,".":2},Xr=131072,S5=10;function b5(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}var w5=5e3,x5=0,ZB=class extends Pe{constructor(e,t,n,s,l,o,u,h,p=new YB){super(),this._bufferService=e,this._charsetService=t,this._coreService=n,this._logService=s,this._optionsService=l,this._oscLinkService=o,this._coreMouseService=u,this._unicodeService=h,this._parser=p,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new _N,this._utf8Decoder=new gN,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=Mt.clone(),this._eraseAttrDataInternal=Mt.clone(),this._onRequestBell=this._register(new ue),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this._register(new ue),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this._register(new ue),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this._register(new ue),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this._register(new ue),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this._register(new ue),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this._register(new ue),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this._register(new ue),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this._register(new ue),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this._register(new ue),this.onLineFeed=this._onLineFeed.event,this._onScroll=this._register(new ue),this.onScroll=this._onScroll.event,this._onTitleChange=this._register(new ue),this.onTitleChange=this._onTitleChange.event,this._onColor=this._register(new ue),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this._register(this._parser),this._dirtyRowTracker=new Yp(this._bufferService),this._activeBuffer=this._bufferService.buffer,this._register(this._bufferService.buffers.onBufferActivate(d=>this._activeBuffer=d.activeBuffer)),this._parser.setCsiHandlerFallback((d,g)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(d),params:g.toArray()})}),this._parser.setEscHandlerFallback(d=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(d)})}),this._parser.setExecuteHandlerFallback(d=>{this._logService.debug("Unknown EXECUTE code: ",{code:d})}),this._parser.setOscHandlerFallback((d,g,_)=>{this._logService.debug("Unknown OSC code: ",{identifier:d,action:g,data:_})}),this._parser.setDcsHandlerFallback((d,g,_)=>{g==="HOOK"&&(_=_.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(d),action:g,payload:_})}),this._parser.setPrintHandler((d,g,_)=>this.print(d,g,_)),this._parser.registerCsiHandler({final:"@"},d=>this.insertChars(d)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},d=>this.scrollLeft(d)),this._parser.registerCsiHandler({final:"A"},d=>this.cursorUp(d)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},d=>this.scrollRight(d)),this._parser.registerCsiHandler({final:"B"},d=>this.cursorDown(d)),this._parser.registerCsiHandler({final:"C"},d=>this.cursorForward(d)),this._parser.registerCsiHandler({final:"D"},d=>this.cursorBackward(d)),this._parser.registerCsiHandler({final:"E"},d=>this.cursorNextLine(d)),this._parser.registerCsiHandler({final:"F"},d=>this.cursorPrecedingLine(d)),this._parser.registerCsiHandler({final:"G"},d=>this.cursorCharAbsolute(d)),this._parser.registerCsiHandler({final:"H"},d=>this.cursorPosition(d)),this._parser.registerCsiHandler({final:"I"},d=>this.cursorForwardTab(d)),this._parser.registerCsiHandler({final:"J"},d=>this.eraseInDisplay(d,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},d=>this.eraseInDisplay(d,!0)),this._parser.registerCsiHandler({final:"K"},d=>this.eraseInLine(d,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},d=>this.eraseInLine(d,!0)),this._parser.registerCsiHandler({final:"L"},d=>this.insertLines(d)),this._parser.registerCsiHandler({final:"M"},d=>this.deleteLines(d)),this._parser.registerCsiHandler({final:"P"},d=>this.deleteChars(d)),this._parser.registerCsiHandler({final:"S"},d=>this.scrollUp(d)),this._parser.registerCsiHandler({final:"T"},d=>this.scrollDown(d)),this._parser.registerCsiHandler({final:"X"},d=>this.eraseChars(d)),this._parser.registerCsiHandler({final:"Z"},d=>this.cursorBackwardTab(d)),this._parser.registerCsiHandler({final:"`"},d=>this.charPosAbsolute(d)),this._parser.registerCsiHandler({final:"a"},d=>this.hPositionRelative(d)),this._parser.registerCsiHandler({final:"b"},d=>this.repeatPrecedingCharacter(d)),this._parser.registerCsiHandler({final:"c"},d=>this.sendDeviceAttributesPrimary(d)),this._parser.registerCsiHandler({prefix:">",final:"c"},d=>this.sendDeviceAttributesSecondary(d)),this._parser.registerCsiHandler({final:"d"},d=>this.linePosAbsolute(d)),this._parser.registerCsiHandler({final:"e"},d=>this.vPositionRelative(d)),this._parser.registerCsiHandler({final:"f"},d=>this.hVPosition(d)),this._parser.registerCsiHandler({final:"g"},d=>this.tabClear(d)),this._parser.registerCsiHandler({final:"h"},d=>this.setMode(d)),this._parser.registerCsiHandler({prefix:"?",final:"h"},d=>this.setModePrivate(d)),this._parser.registerCsiHandler({final:"l"},d=>this.resetMode(d)),this._parser.registerCsiHandler({prefix:"?",final:"l"},d=>this.resetModePrivate(d)),this._parser.registerCsiHandler({final:"m"},d=>this.charAttributes(d)),this._parser.registerCsiHandler({final:"n"},d=>this.deviceStatus(d)),this._parser.registerCsiHandler({prefix:"?",final:"n"},d=>this.deviceStatusPrivate(d)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},d=>this.softReset(d)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},d=>this.setCursorStyle(d)),this._parser.registerCsiHandler({final:"r"},d=>this.setScrollRegion(d)),this._parser.registerCsiHandler({final:"s"},d=>this.saveCursor(d)),this._parser.registerCsiHandler({final:"t"},d=>this.windowOptions(d)),this._parser.registerCsiHandler({final:"u"},d=>this.restoreCursor(d)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},d=>this.insertColumns(d)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},d=>this.deleteColumns(d)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},d=>this.selectProtected(d)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},d=>this.requestMode(d,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},d=>this.requestMode(d,!1)),this._parser.setExecuteHandler(re.BEL,()=>this.bell()),this._parser.setExecuteHandler(re.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(re.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(re.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(re.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(re.BS,()=>this.backspace()),this._parser.setExecuteHandler(re.HT,()=>this.tab()),this._parser.setExecuteHandler(re.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(re.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(fh.IND,()=>this.index()),this._parser.setExecuteHandler(fh.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(fh.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new Ii(d=>(this.setTitle(d),this.setIconName(d),!0))),this._parser.registerOscHandler(1,new Ii(d=>this.setIconName(d))),this._parser.registerOscHandler(2,new Ii(d=>this.setTitle(d))),this._parser.registerOscHandler(4,new Ii(d=>this.setOrReportIndexedColor(d))),this._parser.registerOscHandler(8,new Ii(d=>this.setHyperlink(d))),this._parser.registerOscHandler(10,new Ii(d=>this.setOrReportFgColor(d))),this._parser.registerOscHandler(11,new Ii(d=>this.setOrReportBgColor(d))),this._parser.registerOscHandler(12,new Ii(d=>this.setOrReportCursorColor(d))),this._parser.registerOscHandler(104,new Ii(d=>this.restoreIndexedColor(d))),this._parser.registerOscHandler(110,new Ii(d=>this.restoreFgColor(d))),this._parser.registerOscHandler(111,new Ii(d=>this.restoreBgColor(d))),this._parser.registerOscHandler(112,new Ii(d=>this.restoreCursorColor(d))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(let d in Nt)this._parser.registerEscHandler({intermediates:"(",final:d},()=>this.selectCharset("("+d)),this._parser.registerEscHandler({intermediates:")",final:d},()=>this.selectCharset(")"+d)),this._parser.registerEscHandler({intermediates:"*",final:d},()=>this.selectCharset("*"+d)),this._parser.registerEscHandler({intermediates:"+",final:d},()=>this.selectCharset("+"+d)),this._parser.registerEscHandler({intermediates:"-",final:d},()=>this.selectCharset("-"+d)),this._parser.registerEscHandler({intermediates:".",final:d},()=>this.selectCharset("."+d)),this._parser.registerEscHandler({intermediates:"/",final:d},()=>this.selectCharset("/"+d));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(d=>(this._logService.error("Parsing error: ",d),d)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new v5((d,g)=>this.requestStatusString(d,g)))}getAttrData(){return this._curAttrData}_preserveStack(e,t,n,s){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=n,this._parseStack.position=s}_logSlowResolvingAsync(e){this._logService.logLevel<=3&&Promise.race([e,new Promise((t,n)=>setTimeout(()=>n("#SLOW_TIMEOUT"),w5))]).catch(t=>{if(t!=="#SLOW_TIMEOUT")throw t;console.warn(`async parser handler taking longer than ${w5} ms`)})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(e,t){let n,s=this._activeBuffer.x,l=this._activeBuffer.y,o=0,u=this._parseStack.paused;if(u){if(n=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(n),n;s=this._parseStack.cursorStartX,l=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>Xr&&(o=this._parseStack.position+Xr)}if(this._logService.logLevel<=1&&this._logService.debug(`parsing data ${typeof e=="string"?` "${e}"`:` "${Array.prototype.map.call(e,d=>String.fromCharCode(d)).join("")}"`}`),this._logService.logLevel===0&&this._logService.trace("parsing data (codes)",typeof e=="string"?e.split("").map(d=>d.charCodeAt(0)):e),this._parseBuffer.length<e.length&&this._parseBuffer.length<Xr&&(this._parseBuffer=new Uint32Array(Math.min(e.length,Xr))),u||this._dirtyRowTracker.clearRange(),e.length>Xr)for(let d=o;d<e.length;d+=Xr){let g=d+Xr<e.length?d+Xr:e.length,_=typeof e=="string"?this._stringDecoder.decode(e.substring(d,g),this._parseBuffer):this._utf8Decoder.decode(e.subarray(d,g),this._parseBuffer);if(n=this._parser.parse(this._parseBuffer,_))return this._preserveStack(s,l,_,d),this._logSlowResolvingAsync(n),n}else if(!u){let d=typeof e=="string"?this._stringDecoder.decode(e,this._parseBuffer):this._utf8Decoder.decode(e,this._parseBuffer);if(n=this._parser.parse(this._parseBuffer,d))return this._preserveStack(s,l,d,0),this._logSlowResolvingAsync(n),n}(this._activeBuffer.x!==s||this._activeBuffer.y!==l)&&this._onCursorMove.fire();let h=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),p=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);p<this._bufferService.rows&&this._onRequestRefreshRows.fire({start:Math.min(p,this._bufferService.rows-1),end:Math.min(h,this._bufferService.rows-1)})}print(e,t,n){let s,l,o=this._charsetService.charset,u=this._optionsService.rawOptions.screenReaderMode,h=this._bufferService.cols,p=this._coreService.decPrivateModes.wraparound,d=this._coreService.modes.insertMode,g=this._curAttrData,_=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&n-t>0&&_.getWidth(this._activeBuffer.x-1)===2&&_.setCellFromCodepoint(this._activeBuffer.x-1,0,1,g);let S=this._parser.precedingJoinState;for(let v=t;v<n;++v){if(s=e[v],s<127&&o){let M=o[String.fromCharCode(s)];M&&(s=M.charCodeAt(0))}let w=this._unicodeService.charProperties(s,S);l=Fs.extractWidth(w);let C=Fs.extractShouldJoin(w),E=C?Fs.extractWidth(S):0;if(S=w,u&&this._onA11yChar.fire(Zr(s)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+l-E>h){if(p){let M=_,U=this._activeBuffer.x-E;for(this._activeBuffer.x=E,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),_=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),E>0&&_ instanceof Bo&&_.copyCellsFrom(M,U,0,E,!1);U<h;)M.setCellFromCodepoint(U++,0,1,g)}else if(this._activeBuffer.x=h-1,l===2)continue}if(C&&this._activeBuffer.x){let M=_.getWidth(this._activeBuffer.x-1)?1:2;_.addCodepointToCell(this._activeBuffer.x-M,s,l);for(let U=l-E;--U>=0;)_.setCellFromCodepoint(this._activeBuffer.x++,0,0,g);continue}if(d&&(_.insertCells(this._activeBuffer.x,l-E,this._activeBuffer.getNullCell(g)),_.getWidth(h-1)===2&&_.setCellFromCodepoint(h-1,0,1,g)),_.setCellFromCodepoint(this._activeBuffer.x++,s,l,g),l>0)for(;--l;)_.setCellFromCodepoint(this._activeBuffer.x++,0,0,g)}this._parser.precedingJoinState=S,this._activeBuffer.x<h&&n-t>0&&_.getWidth(this._activeBuffer.x)===0&&!_.hasContent(this._activeBuffer.x)&&_.setCellFromCodepoint(this._activeBuffer.x,0,1,g),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(e,t){return e.final==="t"&&!e.prefix&&!e.intermediates?this._parser.registerCsiHandler(e,n=>b5(n.params[0],this._optionsService.rawOptions.windowOptions)?t(n):!0):this._parser.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new v5(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new Ii(t))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);e.hasWidth(this._activeBuffer.x)&&!e.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let e=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-e),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(e=this._bufferService.cols-1){this._activeBuffer.x=Math.min(e,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(e,t){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=e,this._activeBuffer.y=this._activeBuffer.scrollTop+t):(this._activeBuffer.x=e,this._activeBuffer.y=t),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(e,t){this._restrictCursor(),this._setCursor(this._activeBuffer.x+e,this._activeBuffer.y+t)}cursorUp(e){let t=this._activeBuffer.y-this._activeBuffer.scrollTop;return t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1)),!0}cursorDown(e){let t=this._activeBuffer.scrollBottom-this._activeBuffer.y;return t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1),!0}cursorForward(e){return this._moveCursor(e.params[0]||1,0),!0}cursorBackward(e){return this._moveCursor(-(e.params[0]||1),0),!0}cursorNextLine(e){return this.cursorDown(e),this._activeBuffer.x=0,!0}cursorPrecedingLine(e){return this.cursorUp(e),this._activeBuffer.x=0,!0}cursorCharAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(e){return this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1),!0}charPosAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(e){return this._moveCursor(e.params[0]||1,0),!0}linePosAbsolute(e){return this._setCursor(this._activeBuffer.x,(e.params[0]||1)-1),!0}vPositionRelative(e){return this._moveCursor(0,e.params[0]||1),!0}hVPosition(e){return this.cursorPosition(e),!0}tabClear(e){let t=e.params[0];return t===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:t===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(e){let t=e.params[0];return t===1&&(this._curAttrData.bg|=536870912),(t===2||t===0)&&(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(e,t,n,s=!1,l=!1){let o=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);o.replaceCells(t,n,this._activeBuffer.getNullCell(this._eraseAttrData()),l),s&&(o.isWrapped=!1)}_resetBufferLine(e,t=!1){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n&&(n.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),t),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),n.isWrapped=!1)}eraseInDisplay(e,t=!1){this._restrictCursor(this._bufferService.cols);let n;switch(e.params[0]){case 0:for(n=this._activeBuffer.y,this._dirtyRowTracker.markDirty(n),this._eraseInBufferLine(n++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);n<this._bufferService.rows;n++)this._resetBufferLine(n,t);this._dirtyRowTracker.markDirty(n);break;case 1:for(n=this._activeBuffer.y,this._dirtyRowTracker.markDirty(n),this._eraseInBufferLine(n,0,this._activeBuffer.x+1,!0,t),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(n+1).isWrapped=!1);n--;)this._resetBufferLine(n,t);this._dirtyRowTracker.markDirty(0);break;case 2:if(this._optionsService.rawOptions.scrollOnEraseInDisplay){for(n=this._bufferService.rows,this._dirtyRowTracker.markRangeDirty(0,n-1);n--&&!this._activeBuffer.lines.get(this._activeBuffer.ybase+n)?.getTrimmedLength(););for(;n>=0;n--)this._bufferService.scroll(this._eraseAttrData())}else{for(n=this._bufferService.rows,this._dirtyRowTracker.markDirty(n-1);n--;)this._resetBufferLine(n,t);this._dirtyRowTracker.markDirty(0)}break;case 3:let s=this._activeBuffer.lines.length-this._bufferService.rows;s>0&&(this._activeBuffer.lines.trimStart(s),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-s,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-s,0),this._onScroll.fire(0));break}return!0}eraseInLine(e,t=!1){switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,t);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,t);break}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let n=this._activeBuffer.ybase+this._activeBuffer.y,s=this._bufferService.rows-1-this._activeBuffer.scrollBottom,l=this._bufferService.rows-1+this._activeBuffer.ybase-s+1;for(;t--;)this._activeBuffer.lines.splice(l-1,1),this._activeBuffer.lines.splice(n,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let n=this._activeBuffer.ybase+this._activeBuffer.y,s;for(s=this._bufferService.rows-1-this._activeBuffer.scrollBottom,s=this._bufferService.rows-1+this._activeBuffer.ybase-s;t--;)this._activeBuffer.lines.splice(n,1),this._activeBuffer.lines.splice(s,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.insertCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.deleteCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(Mt));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let n=this._activeBuffer.scrollTop;n<=this._activeBuffer.scrollBottom;++n){let s=this._activeBuffer.lines.get(this._activeBuffer.ybase+n);s.deleteCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),s.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let n=this._activeBuffer.scrollTop;n<=this._activeBuffer.scrollBottom;++n){let s=this._activeBuffer.lines.get(this._activeBuffer.ybase+n);s.insertCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),s.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let n=this._activeBuffer.scrollTop;n<=this._activeBuffer.scrollBottom;++n){let s=this._activeBuffer.lines.get(this._activeBuffer.ybase+n);s.insertCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),s.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let n=this._activeBuffer.scrollTop;n<=this._activeBuffer.scrollBottom;++n){let s=this._activeBuffer.lines.get(this._activeBuffer.ybase+n);s.deleteCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),s.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(e.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(e){let t=this._parser.precedingJoinState;if(!t)return!0;let n=e.params[0]||1,s=Fs.extractWidth(t),l=this._activeBuffer.x-s,o=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(l),u=new Uint32Array(o.length*n),h=0;for(let d=0;d<o.length;){let g=o.codePointAt(d)||0;u[h++]=g,d+=g>65535?2:1}let p=h;for(let d=1;d<n;++d)u.copyWithin(p,0,h),p+=h;return this.print(u,0,p),!0}sendDeviceAttributesPrimary(e){return e.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(re.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(re.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(e){return e.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(re.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(re.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(re.ESC+"[>83;40003;0c")),!0}_is(e){return(this._optionsService.rawOptions.termName+"").indexOf(e)===0}setMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0;break}return!0}setModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,Is),this._charsetService.setgCharset(1,Is),this._charsetService.setgCharset(2,Is),this._charsetService.setgCharset(3,Is);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!0;break}return!0}resetMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1;break}return!0}resetModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),e.params[t]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!1,this._onRequestRefreshRows.fire(void 0);break}return!0}requestMode(e,t){let n;(C=>(C[C.NOT_RECOGNIZED=0]="NOT_RECOGNIZED",C[C.SET=1]="SET",C[C.RESET=2]="RESET",C[C.PERMANENTLY_SET=3]="PERMANENTLY_SET",C[C.PERMANENTLY_RESET=4]="PERMANENTLY_RESET"))(n||={});let s=this._coreService.decPrivateModes,{activeProtocol:l,activeEncoding:o}=this._coreMouseService,u=this._coreService,{buffers:h,cols:p}=this._bufferService,{active:d,alt:g}=h,_=this._optionsService.rawOptions,S=(C,E)=>(u.triggerDataEvent(`${re.ESC}[${t?"":"?"}${C};${E}$y`),!0),v=C=>C?1:2,w=e.params[0];return t?w===2?S(w,4):w===4?S(w,v(u.modes.insertMode)):w===12?S(w,3):w===20?S(w,v(_.convertEol)):S(w,0):w===1?S(w,v(s.applicationCursorKeys)):w===3?S(w,_.windowOptions.setWinLines?p===80?2:p===132?1:0:0):w===6?S(w,v(s.origin)):w===7?S(w,v(s.wraparound)):w===8?S(w,3):w===9?S(w,v(l==="X10")):w===12?S(w,v(_.cursorBlink)):w===25?S(w,v(!u.isCursorHidden)):w===45?S(w,v(s.reverseWraparound)):w===66?S(w,v(s.applicationKeypad)):w===67?S(w,4):w===1e3?S(w,v(l==="VT200")):w===1002?S(w,v(l==="DRAG")):w===1003?S(w,v(l==="ANY")):w===1004?S(w,v(s.sendFocus)):w===1005?S(w,4):w===1006?S(w,v(o==="SGR")):w===1015?S(w,4):w===1016?S(w,v(o==="SGR_PIXELS")):w===1048?S(w,1):w===47||w===1047||w===1049?S(w,v(d===g)):w===2004?S(w,v(s.bracketedPasteMode)):w===2026?S(w,v(s.synchronizedOutput)):S(w,0)}_updateAttrColor(e,t,n,s,l){return t===2?(e|=50331648,e&=-16777216,e|=fc.fromColorRGB([n,s,l])):t===5&&(e&=-50331904,e|=33554432|n&255),e}_extractColor(e,t,n){let s=[0,0,-1,0,0,0],l=0,o=0;do{if(s[o+l]=e.params[t+o],e.hasSubParams(t+o)){let u=e.getSubParams(t+o),h=0;do s[1]===5&&(l=1),s[o+h+1+l]=u[h];while(++h<u.length&&h+o+1+l<s.length);break}if(s[1]===5&&o+l>=2||s[1]===2&&o+l>=5)break;s[1]&&(l=1)}while(++o+t<e.length&&o+l<s.length);for(let u=2;u<s.length;++u)s[u]===-1&&(s[u]=0);switch(s[0]){case 38:n.fg=this._updateAttrColor(n.fg,s[1],s[3],s[4],s[5]);break;case 48:n.bg=this._updateAttrColor(n.bg,s[1],s[3],s[4],s[5]);break;case 58:n.extended=n.extended.clone(),n.extended.underlineColor=this._updateAttrColor(n.extended.underlineColor,s[1],s[3],s[4],s[5])}return o}_processUnderline(e,t){t.extended=t.extended.clone(),(!~e||e>5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,e===0&&(t.fg&=-268435457),t.updateExtended()}_processSGR0(e){e.fg=Mt.fg,e.bg=Mt.bg,e.extended=e.extended.clone(),e.extended.underlineStyle=0,e.extended.underlineColor&=-67108864,e.updateExtended()}charAttributes(e){if(e.length===1&&e.params[0]===0)return this._processSGR0(this._curAttrData),!0;let t=e.length,n,s=this._curAttrData;for(let l=0;l<t;l++)n=e.params[l],n>=30&&n<=37?(s.fg&=-50331904,s.fg|=16777216|n-30):n>=40&&n<=47?(s.bg&=-50331904,s.bg|=16777216|n-40):n>=90&&n<=97?(s.fg&=-50331904,s.fg|=16777216|n-90|8):n>=100&&n<=107?(s.bg&=-50331904,s.bg|=16777216|n-100|8):n===0?this._processSGR0(s):n===1?s.fg|=134217728:n===3?s.bg|=67108864:n===4?(s.fg|=268435456,this._processUnderline(e.hasSubParams(l)?e.getSubParams(l)[0]:1,s)):n===5?s.fg|=536870912:n===7?s.fg|=67108864:n===8?s.fg|=1073741824:n===9?s.fg|=2147483648:n===2?s.bg|=134217728:n===21?this._processUnderline(2,s):n===22?(s.fg&=-134217729,s.bg&=-134217729):n===23?s.bg&=-67108865:n===24?(s.fg&=-268435457,this._processUnderline(0,s)):n===25?s.fg&=-536870913:n===27?s.fg&=-67108865:n===28?s.fg&=-1073741825:n===29?s.fg&=2147483647:n===39?(s.fg&=-67108864,s.fg|=Mt.fg&16777215):n===49?(s.bg&=-67108864,s.bg|=Mt.bg&16777215):n===38||n===48||n===58?l+=this._extractColor(e,l,s):n===53?s.bg|=1073741824:n===55?s.bg&=-1073741825:n===59?(s.extended=s.extended.clone(),s.extended.underlineColor=-1,s.updateExtended()):n===100?(s.fg&=-67108864,s.fg|=Mt.fg&16777215,s.bg&=-67108864,s.bg|=Mt.bg&16777215):this._logService.debug("Unknown SGR attribute: %d.",n);return!0}deviceStatus(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(`${re.ESC}[0n`);break;case 6:let t=this._activeBuffer.y+1,n=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${re.ESC}[${t};${n}R`);break}return!0}deviceStatusPrivate(e){if(e.params[0]===6){let t=this._activeBuffer.y+1,n=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${re.ESC}[?${t};${n}R`)}return!0}softReset(e){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=Mt.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(e){let t=e.length===0?1:e.params[0];if(t===0)this._coreService.decPrivateModes.cursorStyle=void 0,this._coreService.decPrivateModes.cursorBlink=void 0;else{switch(t){case 1:case 2:this._coreService.decPrivateModes.cursorStyle="block";break;case 3:case 4:this._coreService.decPrivateModes.cursorStyle="underline";break;case 5:case 6:this._coreService.decPrivateModes.cursorStyle="bar";break}let n=t%2===1;this._coreService.decPrivateModes.cursorBlink=n}return!0}setScrollRegion(e){let t=e.params[0]||1,n;return(e.length<2||(n=e.params[1])>this._bufferService.rows||n===0)&&(n=this._bufferService.rows),n>t&&(this._activeBuffer.scrollTop=t-1,this._activeBuffer.scrollBottom=n-1,this._setCursor(0,0)),!0}windowOptions(e){if(!b5(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;let t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:t!==2&&this._onRequestWindowsOptionsReport.fire(0);break;case 16:this._onRequestWindowsOptionsReport.fire(1);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${re.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:(t===0||t===2)&&(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>S5&&this._windowTitleStack.shift()),(t===0||t===1)&&(this._iconNameStack.push(this._iconName),this._iconNameStack.length>S5&&this._iconNameStack.shift());break;case 23:(t===0||t===2)&&this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),(t===0||t===1)&&this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop());break}return!0}saveCursor(e){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(e){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(e){return this._windowTitle=e,this._onTitleChange.fire(e),!0}setIconName(e){return this._iconName=e,!0}setOrReportIndexedColor(e){let t=[],n=e.split(";");for(;n.length>1;){let s=n.shift(),l=n.shift();if(/^\d+$/.exec(s)){let o=parseInt(s);if(C5(o))if(l==="?")t.push({type:0,index:o});else{let u=y5(l);u&&t.push({type:1,index:o,color:u})}}}return t.length&&this._onColor.fire(t),!0}setHyperlink(e){let t=e.indexOf(";");if(t===-1)return!0;let n=e.slice(0,t).trim(),s=e.slice(t+1);return s?this._createHyperlink(n,s):n.trim()?!1:this._finishHyperlink()}_createHyperlink(e,t){this._getCurrentLinkId()&&this._finishHyperlink();let n=e.split(":"),s,l=n.findIndex(o=>o.startsWith("id="));return l!==-1&&(s=n[l].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:s,uri:t}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(e,t){let n=e.split(";");for(let s=0;s<n.length&&!(t>=this._specialColors.length);++s,++t)if(n[s]==="?")this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{let l=y5(n[s]);l&&this._onColor.fire([{type:1,index:this._specialColors[t],color:l}])}return!0}setOrReportFgColor(e){return this._setOrReportSpecialColor(e,0)}setOrReportBgColor(e){return this._setOrReportSpecialColor(e,1)}setOrReportCursorColor(e){return this._setOrReportSpecialColor(e,2)}restoreIndexedColor(e){if(!e)return this._onColor.fire([{type:2}]),!0;let t=[],n=e.split(";");for(let s=0;s<n.length;++s)if(/^\d+$/.exec(n[s])){let l=parseInt(n[s]);C5(l)&&t.push({type:2,index:l})}return t.length&&this._onColor.fire(t),!0}restoreFgColor(e){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(e){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(e){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,Is),!0}selectCharset(e){return e.length!==2?(this.selectDefaultCharset(),!0):(e[0]==="/"||this._charsetService.setgCharset(XB[e[0]],Nt[e[1]]||Is),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){let e=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,e,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=Mt.clone(),this._eraseAttrDataInternal=Mt.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=this._curAttrData.bg&67108863,this._eraseAttrDataInternal}setgLevel(e){return this._charsetService.setgLevel(e),!0}screenAlignmentPattern(){let e=new sn;e.content=1<<22|69,e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(let t=0;t<this._bufferService.rows;++t){let n=this._activeBuffer.ybase+this._activeBuffer.y+t,s=this._activeBuffer.lines.get(n);s&&(s.fill(e),s.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(e,t){let n=u=>(this._coreService.triggerDataEvent(`${re.ESC}${u}${re.ESC}\\`),!0),s=this._bufferService.buffer,l=this._optionsService.rawOptions;return n(e==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:e==='"p'?'P1$r61;1"p':e==="r"?`P1$r${s.scrollTop+1};${s.scrollBottom+1}r`:e==="m"?"P1$r0m":e===" q"?`P1$r${{block:2,underline:4,bar:6}[l.cursorStyle]-(l.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(e,t){this._dirtyRowTracker.markRangeDirty(e,t)}},Yp=class{constructor(e){this._bufferService=e,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(e){e<this.start?this.start=e:e>this.end&&(this.end=e)}markRangeDirty(e,t){e>t&&(x5=e,e=t,t=x5),e<this.start&&(this.start=e),t>this.end&&(this.end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};Yp=vt([pe(0,mi)],Yp);function C5(e){return 0<=e&&e<256}var QB=5e7,E5=12,JB=50,ej=class extends Pe{constructor(e){super(),this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this._register(new ue),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(e,t){if(t!==void 0&&this._syncCalls>t){this._syncCalls=0;return}if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;this._isSyncWriting=!0;let n;for(;n=this._writeBuffer.shift();){this._action(n);let s=this._callbacks.shift();s&&s()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(e,t){if(this._pendingData>QB)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput){this._didUserInput=!1,this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t),this._innerWrite();return}setTimeout(()=>this._innerWrite())}this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)}_innerWrite(e=0,t=!0){let n=e||performance.now();for(;this._writeBuffer.length>this._bufferOffset;){let s=this._writeBuffer[this._bufferOffset],l=this._action(s,t);if(l){let u=h=>performance.now()-n>=E5?setTimeout(()=>this._innerWrite(0,h)):this._innerWrite(n,h);l.catch(h=>(queueMicrotask(()=>{throw h}),Promise.resolve(!1))).then(u);return}let o=this._callbacks[this._bufferOffset];if(o&&o(),this._bufferOffset++,this._pendingData-=s.length,performance.now()-n>=E5)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>JB&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}},Kp=class{constructor(e){this._bufferService=e,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(e){let t=this._bufferService.buffer;if(e.id===void 0){let h=t.addMarker(t.ybase+t.y),p={data:e,id:this._nextId++,lines:[h]};return h.onDispose(()=>this._removeMarkerFromLink(p,h)),this._dataByLinkId.set(p.id,p),p.id}let n=e,s=this._getEntryIdKey(n),l=this._entriesWithId.get(s);if(l)return this.addLineToLink(l.id,t.ybase+t.y),l.id;let o=t.addMarker(t.ybase+t.y),u={id:this._nextId++,key:this._getEntryIdKey(n),data:n,lines:[o]};return o.onDispose(()=>this._removeMarkerFromLink(u,o)),this._entriesWithId.set(u.key,u),this._dataByLinkId.set(u.id,u),u.id}addLineToLink(e,t){let n=this._dataByLinkId.get(e);if(n&&n.lines.every(s=>s.line!==t)){let s=this._bufferService.buffer.addMarker(t);n.lines.push(s),s.onDispose(()=>this._removeMarkerFromLink(n,s))}}getLinkData(e){return this._dataByLinkId.get(e)?.data}_getEntryIdKey(e){return`${e.id};;${e.uri}`}_removeMarkerFromLink(e,t){let n=e.lines.indexOf(t);n!==-1&&(e.lines.splice(n,1),e.lines.length===0&&(e.data.id!==void 0&&this._entriesWithId.delete(e.key),this._dataByLinkId.delete(e.id)))}};Kp=vt([pe(0,mi)],Kp);var k5=!1,tj=class extends Pe{constructor(e){super(),this._windowsWrappingHeuristics=this._register(new ha),this._onBinary=this._register(new ue),this.onBinary=this._onBinary.event,this._onData=this._register(new ue),this.onData=this._onData.event,this._onLineFeed=this._register(new ue),this.onLineFeed=this._onLineFeed.event,this._onResize=this._register(new ue),this.onResize=this._onResize.event,this._onWriteParsed=this._register(new ue),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this._register(new ue),this._instantiationService=new EB,this.optionsService=this._register(new zB(e)),this._instantiationService.setService(_i,this.optionsService),this._bufferService=this._register(this._instantiationService.createInstance(Up)),this._instantiationService.setService(mi,this._bufferService),this._logService=this._register(this._instantiationService.createInstance(Fp)),this._instantiationService.setService(s7,this._logService),this.coreService=this._register(this._instantiationService.createInstance(Vp)),this._instantiationService.setService(el,this.coreService),this.coreMouseService=this._register(this._instantiationService.createInstance(qp)),this._instantiationService.setService(r7,this.coreMouseService),this.unicodeService=this._register(this._instantiationService.createInstance(Fs)),this._instantiationService.setService(bN,this.unicodeService),this._charsetService=this._instantiationService.createInstance(PB),this._instantiationService.setService(SN,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(Kp),this._instantiationService.setService(l7,this._oscLinkService),this._inputHandler=this._register(new ZB(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this._register(ni.forward(this._inputHandler.onLineFeed,this._onLineFeed)),this._register(this._inputHandler),this._register(ni.forward(this._bufferService.onResize,this._onResize)),this._register(ni.forward(this.coreService.onData,this._onData)),this._register(ni.forward(this.coreService.onBinary,this._onBinary)),this._register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom(!0))),this._register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this._register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this._register(this._bufferService.onScroll(()=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this._register(new ej((t,n)=>this._inputHandler.parse(t,n))),this._register(ni.forward(this._writeBuffer.onWriteParsed,this._onWriteParsed))}get onScroll(){return this._onScrollApi||(this._onScrollApi=this._register(new ue),this._onScroll.event(e=>{this._onScrollApi?.fire(e.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(e){for(let t in e)this.optionsService.options[t]=e[t]}write(e,t){this._writeBuffer.write(e,t)}writeSync(e,t){this._logService.logLevel<=3&&!k5&&(this._logService.warn("writeSync is unreliable and will be removed soon."),k5=!0),this._writeBuffer.writeSync(e,t)}input(e,t=!0){this.coreService.triggerDataEvent(e,t)}resize(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,H7),t=Math.max(t,I7),this._bufferService.resize(e,t))}scroll(e,t=!1){this._bufferService.scroll(e,t)}scrollLines(e,t){this._bufferService.scrollLines(e,t)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}registerEscHandler(e,t){return this._inputHandler.registerEscHandler(e,t)}registerDcsHandler(e,t){return this._inputHandler.registerDcsHandler(e,t)}registerCsiHandler(e,t){return this._inputHandler.registerCsiHandler(e,t)}registerOscHandler(e,t){return this._inputHandler.registerOscHandler(e,t)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let e=!1,t=this.optionsService.rawOptions.windowsPty;t&&t.buildNumber!==void 0&&t.buildNumber!==void 0?e=t.backend==="conpty"&&t.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(e=!0),e?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let e=[];e.push(this.onLineFeed(g5.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:"H"},()=>(g5(this._bufferService),!1))),this._windowsWrappingHeuristics.value=ht(()=>{for(let t of e)t.dispose()})}}},ij={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};function nj(e,t,n,s){let l={type:0,cancel:!1,key:void 0},o=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:e.key==="UIKeyInputUpArrow"?t?l.key=re.ESC+"OA":l.key=re.ESC+"[A":e.key==="UIKeyInputLeftArrow"?t?l.key=re.ESC+"OD":l.key=re.ESC+"[D":e.key==="UIKeyInputRightArrow"?t?l.key=re.ESC+"OC":l.key=re.ESC+"[C":e.key==="UIKeyInputDownArrow"&&(t?l.key=re.ESC+"OB":l.key=re.ESC+"[B");break;case 8:l.key=e.ctrlKey?"\b":re.DEL,e.altKey&&(l.key=re.ESC+l.key);break;case 9:if(e.shiftKey){l.key=re.ESC+"[Z";break}l.key=re.HT,l.cancel=!0;break;case 13:l.key=e.altKey?re.ESC+re.CR:re.CR,l.cancel=!0;break;case 27:l.key=re.ESC,e.altKey&&(l.key=re.ESC+re.ESC),l.cancel=!0;break;case 37:if(e.metaKey)break;o?l.key=re.ESC+"[1;"+(o+1)+"D":t?l.key=re.ESC+"OD":l.key=re.ESC+"[D";break;case 39:if(e.metaKey)break;o?l.key=re.ESC+"[1;"+(o+1)+"C":t?l.key=re.ESC+"OC":l.key=re.ESC+"[C";break;case 38:if(e.metaKey)break;o?l.key=re.ESC+"[1;"+(o+1)+"A":t?l.key=re.ESC+"OA":l.key=re.ESC+"[A";break;case 40:if(e.metaKey)break;o?l.key=re.ESC+"[1;"+(o+1)+"B":t?l.key=re.ESC+"OB":l.key=re.ESC+"[B";break;case 45:!e.shiftKey&&!e.ctrlKey&&(l.key=re.ESC+"[2~");break;case 46:o?l.key=re.ESC+"[3;"+(o+1)+"~":l.key=re.ESC+"[3~";break;case 36:o?l.key=re.ESC+"[1;"+(o+1)+"H":t?l.key=re.ESC+"OH":l.key=re.ESC+"[H";break;case 35:o?l.key=re.ESC+"[1;"+(o+1)+"F":t?l.key=re.ESC+"OF":l.key=re.ESC+"[F";break;case 33:e.shiftKey?l.type=2:e.ctrlKey?l.key=re.ESC+"[5;"+(o+1)+"~":l.key=re.ESC+"[5~";break;case 34:e.shiftKey?l.type=3:e.ctrlKey?l.key=re.ESC+"[6;"+(o+1)+"~":l.key=re.ESC+"[6~";break;case 112:o?l.key=re.ESC+"[1;"+(o+1)+"P":l.key=re.ESC+"OP";break;case 113:o?l.key=re.ESC+"[1;"+(o+1)+"Q":l.key=re.ESC+"OQ";break;case 114:o?l.key=re.ESC+"[1;"+(o+1)+"R":l.key=re.ESC+"OR";break;case 115:o?l.key=re.ESC+"[1;"+(o+1)+"S":l.key=re.ESC+"OS";break;case 116:o?l.key=re.ESC+"[15;"+(o+1)+"~":l.key=re.ESC+"[15~";break;case 117:o?l.key=re.ESC+"[17;"+(o+1)+"~":l.key=re.ESC+"[17~";break;case 118:o?l.key=re.ESC+"[18;"+(o+1)+"~":l.key=re.ESC+"[18~";break;case 119:o?l.key=re.ESC+"[19;"+(o+1)+"~":l.key=re.ESC+"[19~";break;case 120:o?l.key=re.ESC+"[20;"+(o+1)+"~":l.key=re.ESC+"[20~";break;case 121:o?l.key=re.ESC+"[21;"+(o+1)+"~":l.key=re.ESC+"[21~";break;case 122:o?l.key=re.ESC+"[23;"+(o+1)+"~":l.key=re.ESC+"[23~";break;case 123:o?l.key=re.ESC+"[24;"+(o+1)+"~":l.key=re.ESC+"[24~";break;default:if(e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey)e.keyCode>=65&&e.keyCode<=90?l.key=String.fromCharCode(e.keyCode-64):e.keyCode===32?l.key=re.NUL:e.keyCode>=51&&e.keyCode<=55?l.key=String.fromCharCode(e.keyCode-51+27):e.keyCode===56?l.key=re.DEL:e.keyCode===219?l.key=re.ESC:e.keyCode===220?l.key=re.FS:e.keyCode===221&&(l.key=re.GS);else if((!n||s)&&e.altKey&&!e.metaKey){let u=ij[e.keyCode]?.[e.shiftKey?1:0];if(u)l.key=re.ESC+u;else if(e.keyCode>=65&&e.keyCode<=90){let h=e.ctrlKey?e.keyCode-64:e.keyCode+32,p=String.fromCharCode(h);e.shiftKey&&(p=p.toUpperCase()),l.key=re.ESC+p}else if(e.keyCode===32)l.key=re.ESC+(e.ctrlKey?re.NUL:" ");else if(e.key==="Dead"&&e.code.startsWith("Key")){let h=e.code.slice(3,4);e.shiftKey||(h=h.toLowerCase()),l.key=re.ESC+h,l.cancel=!0}}else n&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.metaKey?e.keyCode===65&&(l.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&e.key.length===1?l.key=e.key:e.key&&e.ctrlKey&&(e.key==="_"&&(l.key=re.US),e.key==="@"&&(l.key=re.NUL));break}return l}var St=0,rj=class{constructor(e){this._getKey=e,this._array=[],this._insertedValues=[],this._flushInsertedTask=new Uh,this._isFlushingInserted=!1,this._deletedIndices=[],this._flushDeletedTask=new Uh,this._isFlushingDeleted=!1}clear(){this._array.length=0,this._insertedValues.length=0,this._flushInsertedTask.clear(),this._isFlushingInserted=!1,this._deletedIndices.length=0,this._flushDeletedTask.clear(),this._isFlushingDeleted=!1}insert(e){this._flushCleanupDeleted(),this._insertedValues.length===0&&this._flushInsertedTask.enqueue(()=>this._flushInserted()),this._insertedValues.push(e)}_flushInserted(){let e=this._insertedValues.sort((l,o)=>this._getKey(l)-this._getKey(o)),t=0,n=0,s=new Array(this._array.length+this._insertedValues.length);for(let l=0;l<s.length;l++)n>=this._array.length||this._getKey(e[t])<=this._getKey(this._array[n])?(s[l]=e[t],t++):s[l]=this._array[n++];this._array=s,this._insertedValues.length=0}_flushCleanupInserted(){!this._isFlushingInserted&&this._insertedValues.length>0&&this._flushInsertedTask.flush()}delete(e){if(this._flushCleanupInserted(),this._array.length===0)return!1;let t=this._getKey(e);if(t===void 0||(St=this._search(t),St===-1)||this._getKey(this._array[St])!==t)return!1;do if(this._array[St]===e)return this._deletedIndices.length===0&&this._flushDeletedTask.enqueue(()=>this._flushDeleted()),this._deletedIndices.push(St),!0;while(++St<this._array.length&&this._getKey(this._array[St])===t);return!1}_flushDeleted(){this._isFlushingDeleted=!0;let e=this._deletedIndices.sort((l,o)=>l-o),t=0,n=new Array(this._array.length-e.length),s=0;for(let l=0;l<this._array.length;l++)e[t]===l?t++:n[s++]=this._array[l];this._array=n,this._deletedIndices.length=0,this._isFlushingDeleted=!1}_flushCleanupDeleted(){!this._isFlushingDeleted&&this._deletedIndices.length>0&&this._flushDeletedTask.flush()}*getKeyIterator(e){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(St=this._search(e),!(St<0||St>=this._array.length)&&this._getKey(this._array[St])===e))do yield this._array[St];while(++St<this._array.length&&this._getKey(this._array[St])===e)}forEachByKey(e,t){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(St=this._search(e),!(St<0||St>=this._array.length)&&this._getKey(this._array[St])===e))do t(this._array[St]);while(++St<this._array.length&&this._getKey(this._array[St])===e)}values(){return this._flushCleanupInserted(),this._flushCleanupDeleted(),[...this._array].values()}_search(e){let t=0,n=this._array.length-1;for(;n>=t;){let s=t+n>>1,l=this._getKey(this._array[s]);if(l>e)n=s-1;else if(l<e)t=s+1;else{for(;s>0&&this._getKey(this._array[s-1])===e;)s--;return s}}return t}},N0=0,T5=0,sj=class extends Pe{constructor(){super(),this._decorations=new rj(e=>e?.marker.line),this._onDecorationRegistered=this._register(new ue),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this._register(new ue),this.onDecorationRemoved=this._onDecorationRemoved.event,this._register(ht(()=>this.reset()))}get decorations(){return this._decorations.values()}registerDecoration(e){if(e.marker.isDisposed)return;let t=new lj(e);if(t){let n=t.marker.onDispose(()=>t.dispose()),s=t.onDispose(()=>{s.dispose(),t&&(this._decorations.delete(t)&&this._onDecorationRemoved.fire(t),n.dispose())});this._decorations.insert(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(let e of this._decorations.values())e.dispose();this._decorations.clear()}*getDecorationsAtCell(e,t,n){let s=0,l=0;for(let o of this._decorations.getKeyIterator(t))s=o.options.x??0,l=s+(o.options.width??1),e>=s&&e<l&&(!n||(o.options.layer??"bottom")===n)&&(yield o)}forEachDecorationAtCell(e,t,n,s){this._decorations.forEachByKey(t,l=>{N0=l.options.x??0,T5=N0+(l.options.width??1),e>=N0&&e<T5&&(!n||(l.options.layer??"bottom")===n)&&s(l)})}},lj=class extends ls{constructor(e){super(),this.options=e,this.onRenderEmitter=this.add(new ue),this.onRender=this.onRenderEmitter.event,this._onDispose=this.add(new ue),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=e.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=pt.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=pt.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}dispose(){this._onDispose.fire(),super.dispose()}},aj=1e3,oj=class{constructor(e,t=aj){this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(e,t,n){this._rowCount=n,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t;let s=performance.now();if(s-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=s,this._innerRefresh();else if(!this._additionalRefreshRequested){let l=s-this._lastRefreshMs,o=this._debounceThresholdMS-l;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=performance.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},o)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}},M5=20,Vh=class extends Pe{constructor(e,t,n,s){super(),this._terminal=e,this._coreBrowserService=n,this._renderService=s,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="";let l=this._coreBrowserService.mainDocument;this._accessibilityContainer=l.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=l.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let o=0;o<this._terminal.rows;o++)this._rowElements[o]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[o]);if(this._topBoundaryFocusListener=o=>this._handleBoundaryFocus(o,0),this._bottomBoundaryFocusListener=o=>this._handleBoundaryFocus(o,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=l.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this._register(new oj(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this._register(this._terminal.onResize(o=>this._handleResize(o.rows))),this._register(this._terminal.onRender(o=>this._refreshRows(o.start,o.end))),this._register(this._terminal.onScroll(()=>this._refreshRows())),this._register(this._terminal.onA11yChar(o=>this._handleChar(o))),this._register(this._terminal.onLineFeed(()=>this._handleChar(`
76
- `))),this._register(this._terminal.onA11yTab(o=>this._handleTab(o))),this._register(this._terminal.onKey(o=>this._handleKey(o.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(Ae(l,"selectionchange",()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(ht(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<M5+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
77
- `&&(this._liveRegionLineCount++,this._liveRegionLineCount===M5+1&&(this._liveRegion.textContent+=dp.get())))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),/\p{Control}/u.test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let n=this._terminal.buffer,s=n.lines.length.toString();for(let l=e;l<=t;l++){let o=n.lines.get(n.ydisp+l),u=[],h=o?.translateToString(!0,void 0,void 0,u)||"",p=(n.ydisp+l+1).toString(),d=this._rowElements[l];d&&(h.length===0?(d.textContent=" ",this._rowColumns.set(d,[0,1])):(d.textContent=h,this._rowColumns.set(d,u)),d.setAttribute("aria-posinset",p),d.setAttribute("aria-setsize",s),this._alignRowWidth(d))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,t){let n=e.target,s=this._rowElements[t===0?1:this._rowElements.length-2],l=n.getAttribute("aria-posinset"),o=t===0?"1":`${this._terminal.buffer.lines.length}`;if(l===o||e.relatedTarget!==s)return;let u,h;if(t===0?(u=n,h=this._rowElements.pop(),this._rowContainer.removeChild(h)):(u=this._rowElements.shift(),h=n,this._rowContainer.removeChild(u)),u.removeEventListener("focus",this._topBoundaryFocusListener),h.removeEventListener("focus",this._bottomBoundaryFocusListener),t===0){let p=this._createAccessibilityTreeNode();this._rowElements.unshift(p),this._rowContainer.insertAdjacentElement("afterbegin",p)}else{let p=this._createAccessibilityTreeNode();this._rowElements.push(p),this._rowContainer.appendChild(p)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error("anchorNode and/or focusNode are null");return}let t={node:e.anchorNode,offset:e.anchorOffset},n={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(n.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===n.node&&t.offset>n.offset)&&([t,n]=[n,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let s=this._rowElements.slice(-1)[0];if(n.node.compareDocumentPosition(s)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(n={node:s,offset:s.textContent?.length??0}),!this._rowContainer.contains(n.node))return;let l=({node:h,offset:p})=>{let d=h instanceof Text?h.parentNode:h,g=parseInt(d?.getAttribute("aria-posinset"),10)-1;if(isNaN(g))return console.warn("row is invalid. Race condition?"),null;let _=this._rowColumns.get(d);if(!_)return console.warn("columns is null. Race condition?"),null;let S=p<_.length?_[p]:_.slice(-1)[0]+1;return S>=this._terminal.cols&&(++g,S=0),{row:g,column:S}},o=l(t),u=l(n);if(!(!o||!u)){if(o.row>u.row||o.row===u.row&&o.column>=u.column)throw new Error("invalid range");this._terminal.select(o.column,o.row,(u.row-o.row)*this._terminal.cols-o.column+u.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e]),this._alignRowWidth(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(e){e.style.transform="";let t=e.getBoundingClientRect().width,n=this._rowColumns.get(e)?.slice(-1)?.[0];if(!n)return;let s=n*this._renderService.dimensions.css.cell.width;e.style.transform=`scaleX(${s/t})`}};Vh=vt([pe(1,L_),pe(2,pr),pe(3,mr)],Vh);var Wp=class extends Pe{constructor(e,t,n,s,l){super(),this._element=e,this._mouseService=t,this._renderService=n,this._bufferService=s,this._linkProviderService=l,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this._register(new ue),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this._register(new ue),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this._register(ht(()=>{Gs(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(Ae(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(Ae(this._element,"mousemove",this._handleMouseMove.bind(this))),this._register(Ae(this._element,"mousedown",this._handleMouseDown.bind(this))),this._register(Ae(this._element,"mouseup",this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(e){this._lastMouseEvent=e;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;let n=e.composedPath();for(let s=0;s<n.length;s++){let l=n[s];if(l.classList.contains("xterm"))break;if(l.classList.contains("xterm-hover"))return}(!this._lastBufferCell||t.x!==this._lastBufferCell.x||t.y!==this._lastBufferCell.y)&&(this._handleHover(t),this._lastBufferCell=t)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized){this._clearCurrentLink(),this._askForLink(e,!1),this._wasResized=!1;return}this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,t){(!this._activeProviderReplies||!t)&&(this._activeProviderReplies?.forEach(s=>{s?.forEach(l=>{l.link.dispose&&l.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let n=!1;for(let[s,l]of this._linkProviderService.linkProviders.entries())t?this._activeProviderReplies?.get(s)&&(n=this._checkLinkProviderResult(s,e,n)):l.provideLinks(e.y,o=>{if(this._isMouseOut)return;let u=o?.map(h=>({link:h}));this._activeProviderReplies?.set(s,u),n=this._checkLinkProviderResult(s,e,n),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,t){let n=new Set;for(let s=0;s<t.size;s++){let l=t.get(s);if(l)for(let o=0;o<l.length;o++){let u=l[o],h=u.link.range.start.y<e?0:u.link.range.start.x,p=u.link.range.end.y>e?this._bufferService.cols:u.link.range.end.x;for(let d=h;d<=p;d++){if(n.has(d)){l.splice(o--,1);break}n.add(d)}}}}_checkLinkProviderResult(e,t,n){if(!this._activeProviderReplies)return n;let s=this._activeProviderReplies.get(e),l=!1;for(let o=0;o<e;o++)(!this._activeProviderReplies.has(o)||this._activeProviderReplies.get(o))&&(l=!0);if(!l&&s){let o=s.find(u=>this._linkAtPosition(u.link,t));o&&(n=!0,this._handleNewLink(o))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!n)for(let o=0;o<this._activeProviderReplies.size;o++){let u=this._activeProviderReplies.get(o)?.find(h=>this._linkAtPosition(h.link,t));if(u){n=!0,this._handleNewLink(u);break}}return n}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink&&cj(this._mouseDownLink.link,this._currentLink.link)&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){!this._currentLink||!this._lastMouseEvent||(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,Gs(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(e){if(!this._lastMouseEvent)return;let t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0?!0:e.link.decorations.underline,pointerCursor:e.link.decorations===void 0?!0:e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:n=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==n&&(this._currentLink.state.decorations.pointerCursor=n,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",n))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:n=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==n&&(this._currentLink.state.decorations.underline=n,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,n))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(n=>{if(!this._currentLink)return;let s=n.start===0?0:n.start+1+this._bufferService.buffer.ydisp,l=this._bufferService.buffer.ydisp+1+n.end;if(this._currentLink.link.range.start.y>=s&&this._currentLink.link.range.end.y<=l&&(this._clearCurrentLink(s,l),this._lastMouseEvent)){let o=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);o&&this._askForLink(o,!1)}})))}_linkHover(e,t,n){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),t.hover&&t.hover(n,t.text)}_fireUnderlineEvent(e,t){let n=e.range,s=this._bufferService.buffer.ydisp,l=this._createLinkUnderlineEvent(n.start.x-1,n.start.y-s-1,n.end.x,n.end.y-s-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(l)}_linkLeave(e,t,n){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),t.leave&&t.leave(n,t.text)}_linkAtPosition(e,t){let n=e.range.start.y*this._bufferService.cols+e.range.start.x,s=e.range.end.y*this._bufferService.cols+e.range.end.x,l=t.y*this._bufferService.cols+t.x;return n<=l&&l<=s}_positionFromMouseEvent(e,t,n){let s=n.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(s)return{x:s[0],y:s[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,n,s,l){return{x1:e,y1:t,x2:n,y2:s,cols:this._bufferService.cols,fg:l}}};Wp=vt([pe(1,N_),pe(2,mr),pe(3,mi),pe(4,o7)],Wp);function cj(e,t){return e.text===t.text&&e.range.start.x===t.range.start.x&&e.range.start.y===t.range.start.y&&e.range.end.x===t.range.end.x&&e.range.end.y===t.range.end.y}var uj=class extends tj{constructor(e={}){super(e),this._linkifier=this._register(new ha),this.browser=T7,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new ha),this._onCursorMove=this._register(new ue),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new ue),this.onKey=this._onKey.event,this._onRender=this._register(new ue),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new ue),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new ue),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new ue),this.onBell=this._onBell.event,this._onFocus=this._register(new ue),this._onBlur=this._register(new ue),this._onA11yCharEmitter=this._register(new ue),this._onA11yTabEmitter=this._register(new ue),this._onWillOpen=this._register(new ue),this._setup(),this._decorationService=this._instantiationService.createInstance(sj),this._instantiationService.setService(dc,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(Jz),this._instantiationService.setService(o7,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(mp)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(t=>this.refresh(t?.start??0,t?.end??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(t=>this._reportWindowsOptions(t))),this._register(this._inputHandler.onColor(t=>this._handleColorEvent(t))),this._register(ni.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(ni.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(ni.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(ni.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(t=>this._afterResize(t.cols,t.rows))),this._register(ht(()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}_handleColorEvent(e){if(this._themeService)for(let t of e){let n,s="";switch(t.index){case 256:n="foreground",s="10";break;case 257:n="background",s="11";break;case 258:n="cursor",s="12";break;default:n="ansi",s="4;"+t.index}switch(t.type){case 0:let l=ct.toColorRGB(n==="ansi"?this._themeService.colors.ansi[t.index]:this._themeService.colors[n]);this.coreService.triggerDataEvent(`${re.ESC}]${s};${GB(l)}${E7.ST}`);break;case 1:if(n==="ansi")this._themeService.modifyColors(o=>o.ansi[t.index]=At.toColor(...t.color));else{let o=n;this._themeService.modifyColors(u=>u[o]=At.toColor(...t.color))}break;case 2:this._themeService.restoreColor(t.index);break}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(Vh,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(re.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(re.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;let n=Math.min(this.buffer.x,this.cols-1),s=this._renderService.dimensions.css.cell.height,l=t.getWidth(n),o=this._renderService.dimensions.css.cell.width*l,u=this.buffer.y*this._renderService.dimensions.css.cell.height,h=n*this._renderService.dimensions.css.cell.width;this.textarea.style.left=h+"px",this.textarea.style.top=u+"px",this.textarea.style.width=o+"px",this.textarea.style.height=s+"px",this.textarea.style.lineHeight=s+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this._register(Ae(this.element,"copy",t=>{this.hasSelection()&&pN(t,this._selectionService)}));let e=t=>mN(t,this.textarea,this.coreService,this.optionsService);this._register(Ae(this.textarea,"paste",e)),this._register(Ae(this.element,"paste",e)),M7?this._register(Ae(this.element,"mousedown",t=>{t.button===2&&H4(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(Ae(this.element,"contextmenu",t=>{H4(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),U_&&this._register(Ae(this.element,"auxclick",t=>{t.button===1&&J8(t,this.textarea,this.screenElement)}))}_bindKeys(){this._register(Ae(this.textarea,"keyup",e=>this._keyUp(e),!0)),this._register(Ae(this.textarea,"keydown",e=>this._keyDown(e),!0)),this._register(Ae(this.textarea,"keypress",e=>this._keyPress(e),!0)),this._register(Ae(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this._register(Ae(this.textarea,"compositionupdate",e=>this._compositionHelper.compositionupdate(e))),this._register(Ae(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this._register(Ae(this.textarea,"input",e=>this._inputEvent(e),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(e){if(!e)throw new Error("Terminal requires a parent element.");if(e.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this.element?.ownerDocument.defaultView&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=e.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),e.appendChild(this.element);let t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),t.appendChild(this._viewportElement),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._register(Ae(this.screenElement,"mousemove",l=>this.updateCursorStyle(l))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement);let n=this.textarea=this._document.createElement("textarea");this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",fp.get()),O7||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._register(this.optionsService.onSpecificOptionChange("disableStdin",()=>n.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(Zz,this.textarea,e.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(pr,this._coreBrowserService),this._register(Ae(this.textarea,"focus",l=>this._handleTextAreaFocus(l))),this._register(Ae(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(Bp,this._document,this._helperContainer),this._instantiationService.setService(df,this._charSizeService),this._themeService=this._instantiationService.createInstance(Pp),this._instantiationService.setService(ya,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(Ph),this._instantiationService.setService(a7,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(Hp,this.rows,this.screenElement)),this._instantiationService.setService(mr,this._renderService),this._register(this._renderService.onRenderedViewportChange(l=>this._onRender.fire(l))),this.onResize(l=>this._renderService.resize(l.cols,l.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(Lp,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(jp),this._instantiationService.setService(N_,this._mouseService);let s=this._linkifier.value=this._register(this._instantiationService.createInstance(Wp,this.screenElement));this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this._register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this._register(this.onBlur(()=>this._renderService.handleBlur())),this._register(this.onFocus(()=>this._renderService.handleFocus())),this._viewport=this._register(this._instantiationService.createInstance(Op,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(l=>{super.scrollLines(l,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(Ip,this.element,this.screenElement,s)),this._instantiationService.setService(xN,this._selectionService),this._register(this._selectionService.onRequestScrollLines(l=>this.scrollLines(l.amount,l.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(l=>this._renderService.handleSelectionChanged(l.start,l.end,l.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(l=>{this.textarea.value=l,this.textarea.focus(),this.textarea.select()})),this._register(ni.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{this._selectionService.refresh(),this._viewport?.queueSync()})),this._register(this._instantiationService.createInstance(Rp,this.screenElement)),this._register(Ae(this.element,"mousedown",l=>this._selectionService.handleMouseDown(l))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(Vh,this)),this._register(this.optionsService.onSpecificOptionChange("screenReaderMode",l=>this._handleScreenReaderModeOptionChange(l))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(Ih,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRuler",l=>{!this._overviewRulerRenderer&&l&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(Ih,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(zp,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let e=this,t=this.element;function n(o){let u=e._mouseService.getMouseReportCoords(o,e.screenElement);if(!u)return!1;let h,p;switch(o.overrideType||o.type){case"mousemove":p=32,o.buttons===void 0?(h=3,o.button!==void 0&&(h=o.button<3?o.button:3)):h=o.buttons&1?0:o.buttons&4?1:o.buttons&2?2:3;break;case"mouseup":p=0,h=o.button<3?o.button:3;break;case"mousedown":p=1,h=o.button<3?o.button:3;break;case"wheel":if(e._customWheelEventHandler&&e._customWheelEventHandler(o)===!1)return!1;let d=o.deltaY;if(d===0||e.coreMouseService.consumeWheelEvent(o,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return!1;p=d<0?0:1,h=4;break;default:return!1}return p===void 0||h===void 0||h>4?!1:e.coreMouseService.triggerMouseEvent({col:u.col,row:u.row,x:u.x,y:u.y,button:h,action:p,ctrl:o.ctrlKey,alt:o.altKey,shift:o.shiftKey})}let s={mouseup:null,wheel:null,mousedrag:null,mousemove:null},l={mouseup:o=>(n(o),o.buttons||(this._document.removeEventListener("mouseup",s.mouseup),s.mousedrag&&this._document.removeEventListener("mousemove",s.mousedrag)),this.cancel(o)),wheel:o=>(n(o),this.cancel(o,!0)),mousedrag:o=>{o.buttons&&n(o)},mousemove:o=>{o.buttons||n(o)}};this._register(this.coreMouseService.onProtocolChange(o=>{o?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(o)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),o&8?s.mousemove||(t.addEventListener("mousemove",l.mousemove),s.mousemove=l.mousemove):(t.removeEventListener("mousemove",s.mousemove),s.mousemove=null),o&16?s.wheel||(t.addEventListener("wheel",l.wheel,{passive:!1}),s.wheel=l.wheel):(t.removeEventListener("wheel",s.wheel),s.wheel=null),o&2?s.mouseup||(s.mouseup=l.mouseup):(this._document.removeEventListener("mouseup",s.mouseup),s.mouseup=null),o&4?s.mousedrag||(s.mousedrag=l.mousedrag):(this._document.removeEventListener("mousemove",s.mousedrag),s.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(Ae(t,"mousedown",o=>{if(o.preventDefault(),this.focus(),!(!this.coreMouseService.areMouseEventsActive||this._selectionService.shouldForceSelection(o)))return n(o),s.mouseup&&this._document.addEventListener("mouseup",s.mouseup),s.mousedrag&&this._document.addEventListener("mousemove",s.mousedrag),this.cancel(o)})),this._register(Ae(t,"wheel",o=>{if(!s.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(o)===!1)return!1;if(!this.buffer.hasScrollback){if(o.deltaY===0)return!1;if(e.coreMouseService.consumeWheelEvent(o,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return this.cancel(o,!0);let u=re.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(o.deltaY<0?"A":"B");return this.coreService.triggerDataEvent(u,!0),this.cancel(o,!0)}}},{passive:!1}))}refresh(e,t){this._renderService?.refreshRows(e,t)}updateCursorStyle(e){this._selectionService?.shouldColumnSelect(e)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(e,t){this._viewport?this._viewport.scrollLines(e):super.scrollLines(e,t),this.refresh(0,this.rows-1)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){e&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}paste(e){Q8(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");let t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return this._selectionService?this._selectionService.hasSelection:!1}select(e,t,n){this._selectionService.setSelection(e,t,n)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(!(!this._selectionService||!this._selectionService.hasSelection))return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(e,t){this._selectionService?.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;let t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;!t&&(e.key==="Dead"||e.key==="AltGraph")&&(this._unprocessedDeadKey=!0);let n=nj(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),n.type===3||n.type===2){let s=this.rows-1;return this.scrollLines(n.type===2?-s:s),this.cancel(e,!0)}if(n.type===1&&this.selectAll(),this._isThirdLevelShift(this.browser,e)||(n.cancel&&this.cancel(e,!0),!n.key)||e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.key.length===1&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)return!0;if(this._unprocessedDeadKey)return this._unprocessedDeadKey=!1,!0;if((n.key===re.ETX||n.key===re.CR)&&(this.textarea.value=""),this._onKey.fire({key:n.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(n.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey)return this.cancel(e,!0);this._keyDownHandled=!0}_isThirdLevelShift(e,t){let n=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState("AltGraph");return t.type==="keypress"?n:n&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,!(this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)&&(hj(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(e.which===null||e.which===void 0)t=e.keyCode;else if(e.which!==0&&e.charCode!==0)t=e.which;else return!1;return!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)?!1:(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(e){if(e.data&&e.inputType==="insertText"&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){if(e===this.cols&&t===this.rows){this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure();return}super.resize(e,t)}_afterResize(e,t){this._charSizeService?.measure()}clear(){if(!(this.buffer.ybase===0&&this.buffer.y===0)){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(Mt));this._onScroll.fire({position:this.buffer.ydisp}),this.refresh(0,this.rows-1)}}reset(){this.options.rows=this.rows,this.options.cols=this.cols;let e=this._customKeyEventHandler;this._setup(),super.reset(),this._selectionService?.reset(),this._decorationService.reset(),this._customKeyEventHandler=e,this.refresh(0,this.rows-1)}clearTextureAtlas(){this._renderService?.clearTextureAtlas()}_reportFocus(){this.element?.classList.contains("focus")?this.coreService.triggerDataEvent(re.ESC+"[I"):this.coreService.triggerDataEvent(re.ESC+"[O")}_reportWindowsOptions(e){if(this._renderService)switch(e){case 0:let t=this._renderService.dimensions.css.canvas.width.toFixed(0),n=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${re.ESC}[4;${n};${t}t`);break;case 1:let s=this._renderService.dimensions.css.cell.width.toFixed(0),l=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${re.ESC}[6;${l};${s}t`);break}}cancel(e,t){if(!(!this.options.cancelEvents&&!t))return e.preventDefault(),e.stopPropagation(),!1}};function hj(e){return e.keyCode===16||e.keyCode===17||e.keyCode===18}var fj=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){let n={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(n),t.dispose=()=>this._wrappedAddonDispose(n),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let n=0;n<this._addons.length;n++)if(this._addons[n]===e){t=n;break}if(t===-1)throw new Error("Could not dispose an addon that has not been loaded");e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}},dj=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new sn)}translateToString(e,t,n){return this._line.translateToString(e,t,n)}},A5=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(e){let t=this._buffer.lines.get(e);if(t)return new dj(t)}getNullCell(){return new sn}},pj=class extends Pe{constructor(e){super(),this._core=e,this._onBufferChange=this._register(new ue),this.onBufferChange=this._onBufferChange.event,this._normal=new A5(this._core.buffers.normal,"normal"),this._alternate=new A5(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}},mj=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,n=>t(n.toArray()))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,(n,s)=>t(n,s.toArray()))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}},_j=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}},gj=["cols","rows"],An=0,vj=class extends Pe{constructor(e){super(),this._core=this._register(new uj(e)),this._addonManager=this._register(new fj),this._publicOptions={...this._core.options};let t=s=>this._core.options[s],n=(s,l)=>{this._checkReadonlyOptions(s),this._core.options[s]=l};for(let s in this._core.options){let l={get:t.bind(this,s),set:n.bind(this,s)};Object.defineProperty(this._publicOptions,s,l)}}_checkReadonlyOptions(e){if(gj.includes(e))throw new Error(`Option "${e}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new mj(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new _j(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this._register(new pj(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let e=this._core.coreService.decPrivateModes,t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any";break}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,synchronizedOutputMode:e.synchronizedOutput,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(let t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e,t=!0){this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._checkProposedApi(),this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,n){this._verifyIntegers(e,t,n),this._core.select(e,t,n)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write(`\r
78
- `,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return fp.get()},set promptLabel(e){fp.set(e)},get tooMuchOutput(){return dp.get()},set tooMuchOutput(e){dp.set(e)}}}_verifyIntegers(...e){for(An of e)if(An===1/0||isNaN(An)||An%1!==0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...e){for(An of e)if(An&&(An===1/0||isNaN(An)||An%1!==0||An<0))throw new Error("This API only accepts positive integers")}};const yj=Object.freeze(Object.defineProperty({__proto__:null,Terminal:vj},Symbol.toStringTag,{value:"Module"}));var Sj=2,bj=1,wj=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),s=parseInt(n.getPropertyValue("height")),l=Math.max(0,parseInt(n.getPropertyValue("width"))),o=window.getComputedStyle(this._terminal.element),u={top:parseInt(o.getPropertyValue("padding-top")),bottom:parseInt(o.getPropertyValue("padding-bottom")),right:parseInt(o.getPropertyValue("padding-right")),left:parseInt(o.getPropertyValue("padding-left"))},h=u.top+u.bottom,p=u.right+u.left,d=s-h,g=l-p-t;return{cols:Math.max(Sj,Math.floor(g/e.css.cell.width)),rows:Math.max(bj,Math.floor(d/e.css.cell.height))}}};const xj=Object.freeze(Object.defineProperty({__proto__:null,FitAddon:wj},Symbol.toStringTag,{value:"Module"}));function mh(e){return e==null}function os(e,t,n){return Object.defineProperty(e,t,{writable:!0,value:n,enumerable:!1})}function Gp(e,t){return arguments.length===1?n=>Gp(e,n):e in globalThis&&t instanceof globalThis[e]||Object.prototype.toString.call(t).slice(8,-1)===e}function F7(e){return Gp("ArrayBuffer",e)||Gp("SharedArrayBuffer",e)}function Cj(e){return F7(e)||ArrayBuffer.isView(e)}var fa;(function(e){e.is=F7,e.isSource=Cj;function t(u){return ArrayBuffer.isView(u)?u.buffer.slice(u.byteOffset,u.byteOffset+u.byteLength):u}e.fromSource=t;function n(u){if(u=t(u),typeof Buffer<"u")return Buffer.from(u).toString("base64");let h="";const p=new Uint8Array(u);for(let d=0;d<p.byteLength;d++)h+=String.fromCharCode(p[d]);return btoa(h)}e.toBase64=n;function s(u){return typeof Buffer<"u"?t(Buffer.from(u,"base64")):Uint8Array.from(atob(u),h=>h.charCodeAt(0))}e.fromBase64=s;function l(u){return u=t(u),typeof Buffer<"u"?Buffer.from(u).toString("hex"):Array.from(new Uint8Array(u),h=>h.toString(16).padStart(2,"0")).join("")}e.toHex=l;function o(u){if(typeof Buffer<"u")return t(Buffer.from(u,"hex"));const h=u.length%2===0?u:u.slice(0,u.length-1),p=[];for(let d=0;d<h.length;d+=2)p.push(parseInt(`${h[d]}${h[d+1]}`,16));return Uint8Array.from(p).buffer}e.fromHex=o})(fa||(fa={}));fa.fromBase64;fa.toBase64;fa.fromHex;fa.toHex;function Ej(e,t,n){const s=[];let l=0;for(let o=0;o<e.length;o++){const u=e.charCodeAt(o);if(u>=65&&u<=90){if(l===1){const h=e.charCodeAt(o+1);h>=97&&h<=122&&s.push(n),s.push(u+32)}else l!==0&&s.push(n),s.push(u+32);l=1}else u>=97&&u<=122?(s.push(u),l=2):t.includes(u)?(l!==0&&s.push(n),l=0):s.push(u)}return String.fromCharCode(...s)}function kj(e){return Ej(e,[45,95],45)}const Tj=kj;var D5;(function(e){e.millisecond=1,e.second=1e3,e.minute=e.second*60,e.hour=e.minute*60,e.day=e.hour*24,e.week=e.day*7;let t=new Date().getTimezoneOffset();function n(v){t=v}e.setTimezoneOffset=n;function s(){return t}e.getTimezoneOffset=s;function l(v=new Date,w){return typeof v=="number"&&(v=new Date(v)),w===void 0&&(w=t),Math.floor((v.valueOf()/e.minute-w)/1440)}e.getDateNumber=l;function o(v,w){const C=new Date(v*e.day);return w===void 0&&(w=t),new Date(+C+w*e.minute)}e.fromDateNumber=o;const u=/\d+(?:\.\d+)?/.source,h=new RegExp(`^${["w(?:eek(?:s)?)?","d(?:ay(?:s)?)?","h(?:our(?:s)?)?","m(?:in(?:ute)?(?:s)?)?","s(?:ec(?:ond)?(?:s)?)?"].map(v=>`(${u}${v})?`).join("")}$`);function p(v){const w=h.exec(v);return w?(parseFloat(w[1])*e.week||0)+(parseFloat(w[2])*e.day||0)+(parseFloat(w[3])*e.hour||0)+(parseFloat(w[4])*e.minute||0)+(parseFloat(w[5])*e.second||0):0}e.parseTime=p;function d(v){const w=p(v);return w?v=Date.now()+w:/^\d{1,2}(:\d{1,2}){1,2}$/.test(v)?v=`${new Date().toLocaleDateString()}-${v}`:/^\d{1,2}-\d{1,2}-\d{1,2}(:\d{1,2}){1,2}$/.test(v)&&(v=`${new Date().getFullYear()}-${v}`),v?new Date(v):new Date}e.parseDate=d;function g(v){const w=Math.abs(v);return w>=e.day-e.hour/2?Math.round(v/e.day)+"d":w>=e.hour-e.minute/2?Math.round(v/e.hour)+"h":w>=e.minute-e.second/2?Math.round(v/e.minute)+"m":w>=e.second?Math.round(v/e.second)+"s":v+"ms"}e.format=g;function _(v,w=2){return v.toString().padStart(w,"0")}e.toDigits=_;function S(v,w=new Date){return v.replace("yyyy",w.getFullYear().toString()).replace("yy",w.getFullYear().toString().slice(2)).replace("MM",_(w.getMonth()+1)).replace("dd",_(w.getDate())).replace("hh",_(w.getHours())).replace("mm",_(w.getMinutes())).replace("ss",_(w.getSeconds())).replace("SSS",_(w.getMilliseconds(),3))}e.template=S})(D5||(D5={}));var V_=class{sn=0;map=new Map;weak=new WeakMap;get length(){return this.map.size}push(e){const t=++this.sn;return this.map.set(t,e),this.weak.set(e,t),()=>this.map.delete(t)}delete(e){const t=this.weak.get(e);return t?this.map.delete(t):!1}clear(){const e=[...this.map.values()];return this.map.clear(),e.reverse()}[Symbol.iterator](){return this.map.values()}[Symbol.for("nodejs.util.inspect.custom")](){return[...this]}};const Ce={shadow:Symbol.for("cordis.shadow"),receiver:Symbol.for("cordis.receiver"),original:Symbol.for("cordis.original"),metadata:Symbol.for("cordis.metadata"),initHooks:Symbol.for("cordis.initHooks"),checkProto:Symbol.for("cordis.checkProto"),effect:Symbol.for("cordis.effect"),filter:Symbol.for("cordis.filter"),isolate:Symbol.for("cordis.isolate"),intercept:Symbol.for("cordis.intercept"),init:Symbol.for("cordis.init"),check:Symbol.for("cordis.check"),config:Symbol.for("cordis.config"),invoke:Symbol.for("cordis.invoke"),extend:Symbol.for("cordis.extend"),tracker:Symbol.for("cordis.tracker"),resolveConfig:Symbol.for("cordis.resolveConfig")},Mj=function*(){}.constructor,O5=async function*(){}.constructor;function Aj(e){return!(!e.prototype||e instanceof Mj||O5!==Function&&e instanceof O5)}function U7(e,t){if(e===Object.prototype)return t;const n=Object.create(U7(Object.getPrototypeOf(e),t));for(const s of Reflect.ownKeys(e))Object.defineProperty(n,s,Object.getOwnPropertyDescriptor(e,s));return n}function ia(e){return e&&(typeof e=="object"||typeof e=="function")}function Dj(e,t){let n=e;for(;n;){const s=Reflect.getOwnPropertyDescriptor(n,t);if(s)return s;n=Object.getPrototypeOf(n)}}function Us(e,t){if(!ia(t))return t;if(Object.hasOwn(t,Ce.shadow))return Object.getPrototypeOf(t);const n=t[Ce.tracker];return n?q_(e,t,n):t}function qh(e,t){return t?new Proxy(e,{get:(n,s,l)=>s in t&&s!=="constructor"?Reflect.get(t,s,l):Reflect.get(n,s,l),set:(n,s,l,o)=>s in t&&s!=="constructor"?Reflect.set(t,s,l,o):Reflect.set(n,s,l,o)}):e}function Xp(e,t,n){return qh(e,Object.defineProperty(Object.create(null),t,{value:n,writable:!1}))}function z0(e,t,n,s){if(!n)return s;const l=Reflect.getOwnPropertyDescriptor(t,n)?.value;return l?Xp(s,n,e.extend({[Ce.shadow]:l})):s}function Oj(e,t,n,s){return new Proxy(t,{apply:(l,o,u)=>(o===n&&(o=s),Us(e,Reflect.apply(l,o,u)))})}function q_(e,t,n){e[Ce.shadow]&&!n.noShadow&&(e=Object.getPrototypeOf(e));const s=new Proxy(t,{get:(l,o,u)=>{if(o===Ce.original)return l;if(o===n.property)return e;if(typeof o=="symbol")return Reflect.get(l,o,u);if(n.associate&&e.reflect.props[`${n.associate}.${o}`])return Reflect.get(e,`${n.associate}.${o}`,Xp(e,Ce.receiver,u));let h,p;const d=Dj(l,o);d&&"value"in d?p=d.value:(h=z0(e,l,n.property,u),p=Reflect.get(l,o,h));const g=p?.[Ce.tracker];return g?q_(e,p,g):!n.noShadow&&typeof p=="function"?(h??=z0(e,l,n.property,u),Oj(e,p,u,h)):p},set:(l,o,u,h)=>{if(o===Ce.original||o===n.property)return!1;if(typeof o=="symbol")return Reflect.set(l,o,u,h);if(n.associate&&e.reflect.props[`${n.associate}.${o}`])return Reflect.set(e,`${n.associate}.${o}`,u,Xp(e,Ce.receiver,h));const p=z0(e,l,n.property,h);return Reflect.set(l,o,u,p)},apply:(l,o,u)=>V7(s,l,o,u)});return s}function V7(e,t,n,s){return t[Ce.invoke]?t[Ce.invoke].apply(e,s):Reflect.apply(t,n,s)}function Rj(e,t,n){const s=function(...l){return V7(q_(s.ctx,s,n),s,this,l)};return os(s,"name",e),Object.setPrototypeOf(s,t)}function R5(e,t,n){const s=e.error.stack.split(`
79
- `);if(typeof t?.stack!="string"){const u=new Error(t),h=u.stack.split(`
80
- `);throw h.splice(1,1/0,...n()),u.stack=h.join(`
81
- `),u}const l=t.stack.split(`
82
- `);let o=l.indexOf(s[2]);if(o===-1)throw t;for(o-=e.offset;o>0&&l[o-1].endsWith(" (<anonymous>)");)o-=1;throw l.splice(o,1/0,...n()),t.stack=l.join(`
83
- `),t}function L5(e,t=$_()){const n={offset:1,error:new Error};try{const s=e(n);return ia(s)&&"then"in s?s.then(void 0,l=>R5(n,l,t)):s}catch(s){R5(n,s,t)}}function $_(e=0){const t=new Error;return()=>t.stack.split(`
84
- `).slice(3+e)}function N5(e){return e!==null&&e!==!1&&e!==void 0}var Lj=class{ctx;_hooks={};constructor(e){this.ctx=e,os(this,Ce.tracker,{property:"ctx",noShadow:!0}),this.on("internal/listener",function(t,n,s){if(t==="internal/update"&&!s.global)return(this.fiber._hooks["internal/update"]??=new V_)[s.prepend?"unshift":"push"](n)}),this.on("internal/update",function(t,n,s){const l=[...this._hooks["internal/update"]||[]],o=()=>(l.shift()??s).call(this,t,n,o);return o()},{global:!0,prepend:!0})}dispatch(e,t){const n=typeof t[0]=="object"||typeof t[0]=="function"?t.shift():null,s=t.shift();s.startsWith("internal/")||this.emit("internal/dispatch",e,s,t,n);const l=n?.[Ko.filter];return(this._hooks[s]||[]).filter(o=>o.global||!l||l.call(n,o.ctx)).map(o=>o.callback.bind(n))}async parallel(...e){const t=(await Promise.allSettled(this.dispatch("emit",e).map(async n=>n(...e)))).filter(n=>n.status==="rejected");if(t.length)throw new AggregateError(t.map(n=>n.reason))}emit(...e){this.dispatch("emit",e).map(t=>t(...e))}async serial(...e){for(const t of this.dispatch("serial",e)){const n=await t(...e);if(N5(n))return n}}bail(...e){for(const t of this.dispatch("bail",e)){const n=t(...e);if(N5(n))return n}}waterfall(...e){const t=this.dispatch("waterfall",e),n=e.pop(),s=()=>(t.shift()??n)(...e);return e.push(s),s()}register(e,t,n,s){const l=s.prepend?"unshift":"push";return this.ctx.fiber.effect(()=>(t[l]({ctx:this.ctx,callback:n,...s}),()=>this.unregister(t,n)),e)}unregister(e,t){const n=e.findIndex(s=>s.callback===t);if(n>=0)return e.splice(n,1),!0}on(e,t,n){typeof n!="object"&&(n={prepend:n}),this.ctx.fiber.assertActive(),t=this.ctx.reflect.bind(t);const s=this.bail(this.ctx,"internal/listener",e,t,n);if(s)return s;const l=this._hooks[e]||=[],o=`ctx.on(${typeof e=="string"?JSON.stringify(e):e.toString()})`;return this.register(o,l,t,n)}once(e,t,n){const s=this.on(e,function(...l){return s(),t.apply(this,l)},n);return s}};const z5={s:e=>String(e),d:e=>Math.trunc(Number(e)),i:e=>Math.trunc(Number(e)),f:e=>Number(e),o:e=>JSON.stringify(e),O:e=>JSON.stringify(e),c:()=>"",C:(e,t,n)=>Zp.color(t,Zp.code(n.name,t.colors),e)};function Nj(e){return e instanceof Error&&Array.isArray(e.errors)}var Zp=class{service;static color(e,t,n,s=""){return e.colors?`\x1B[3${t<8?t:"8;5;"+t}${e.colors>=2?s:""}m${n}\x1B[0m`:""+n}static code(e,t){let n=0;for(let l=0;l<e.length;l++)n=(n<<3)-n+e.charCodeAt(l)+13,n|=0;const s=t?t>=2?Bj:zj:[];return s[Math.abs(n)%s.length]}static format(e,t){const n=t.args.slice();n[0]instanceof Error?(n[0]=n[0].stack||n[0].message,n.unshift("%s")):typeof n[0]!="string"&&n.unshift("%o");let s=n.shift();s=s.replace(/%([a-zA-Z%])/g,(u,h)=>{if(u==="%%")return"%";const p=e.formatters?.[h]??z5[h];return typeof p=="function"?p(n.shift(),e,t):u});const l=e.formatters?.o??z5.o;for(let u of n)typeof u=="object"&&u&&(u=l(u,e,t)),s+=" "+u;const{maxLength:o=10240}=e;return s.split(/\r?\n/g).map(u=>u.slice(0,o)+(u.length>o?"...":"")).join(`
85
- `)}constructor(e,t){this.service=t,Object.assign(this,e),this.error=this._method("error",0),this.info=this._method("info",1),this.warn=this._method("warn",2),this.debug=this._method("debug",3)}_method(e,t){return(...n)=>{if(n.length===1&&n[0]instanceof Error){if(n[0].cause)this[e](n[0].cause);else if(Nj(n[0])){n[0].errors.forEach(o=>this[e](o));return}}const s=++this.service._snMessage,l=Date.now();for(const o of this.service.exporters.values()){if((o.levels?.[this.name]??o.levels?.default??this.level??1)<t)continue;const u={sn:s,ts:l,type:e,level:t,name:this.name,...this.meta,args:n};o.export(u)}}}};const zj=[6,2,3,4,5,1],Bj=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221];var jj=class q7{bufferSize=1e3;buffer=[];ctx;_snMessage=0;_snExporter=0;exporters=new Map;constructor(t){const n={property:"ctx",noShadow:!0},s=Rj("logger",U7(Object.getPrototypeOf(this),Function.prototype),n);return Object.assign(s,this),s.ctx=t,os(s,Ce.tracker,n),s.exporter({colors:3,export:l=>{s.buffer.push(l),s.buffer.length>s.bufferSize&&(s.buffer=s.buffer.slice(-s.bufferSize))}}),s}exporter(t){return this.ctx.effect(()=>{const n=++this._snExporter;return this.exporters.set(n,t),()=>this.exporters.delete(n)},"ctx.logger.exporter()")}_resolveConfig(){let t=this.ctx[Ce.intercept];const n=[];for(;"logger"in t;)Object.hasOwn(t,"logger")&&n.unshift(t.logger),t=Object.getPrototypeOf(t);return Object.assign({},...n)}[Ce.invoke](t){const n=this._resolveConfig(),s=(this.ctx[Ce.shadow]??this.ctx).fiber;return t??=n.name,t??=Tj(s.name),new Zp({name:t,level:n.level,meta:{fiber:new WeakRef(s)}},this)}static{for(const t of["error","info","warn","debug"])q7.prototype[t]=function(...n){return this()[t](...n)}}};function B0(e){const t=e.stack.split(`
86
- `);return t.splice(0,2,`Error: ${e.message}`),e.stack=t.join(`
87
- `),e}const Hj=["prototype","then"];function j0(e){return typeof e=="symbol"||Hj.includes(e)||parseInt(e).toString()===e||e.startsWith("_")}var B5=class{ctx;static handler={get:(e,t,n)=>{if(j0(t))return Reflect.get(e,t,n);if(Reflect.has(e,t))return Us(n,Reflect.get(e,t,n));const s=new Error(`cannot get property "${t}" without inject`);try{const l=e.reflect.props[t];return l?.type==="accessor"?l.get.call(n,n[Ce.receiver],s):n.fiber.runtime?n.events.waterfall("internal/get",n,t,s,()=>{const o=e[Ce.isolate][t];let u=(n[Ce.shadow]??n).fiber;for(;;){const h=u.store?.[t];if(h)return Us(n,h.value);if(t in u.inject)throw s.message=`cannot get required service "${t}" in inactive context`,s;if(!u.runtime||u.parent[Ce.isolate][t]!==o)throw s;u=u.parent.fiber}}):n.reflect.get(t,!1)}catch(l){throw l===s?B0(l):l}},set:(e,t,n,s)=>{if(j0(t))return Reflect.set(e,t,n,s);const l=new Error(`cannot set property "${t}" without provide`),o=e.reflect.props[t];if(!o){if(!s.fiber.runtime)return Reflect.set(e,t,n,s);throw B0(l)}try{return o.type==="accessor"?o.set?o.set.call(s,n,s[Ce.receiver],l):!1:s.events.waterfall("internal/set",s,t,n,l,()=>s.reflect.set(t,n,l))}catch(u){throw u===l?B0(u):u}},has:(e,t)=>j0(t)?Reflect.has(e,t):Reflect.has(e,t)?!0:!!e.reflect.props[t]};store=Object.create(null);props=Object.create(null);constructor(e){this.ctx=e,os(this,Ce.tracker,{property:"ctx",noShadow:!0}),this.mixin("reflect",["get","set","provide","accessor","mixin"]),this.mixin("fiber",["runtime","effect"]),this.mixin("registry",["inject","plugin"]),this.mixin("events",["on","once","parallel","emit","serial","bail","waterfall"])}get(e,t=!0){return Us(this.ctx,this._getImpl(e,t)?.value)}_getImpl(e,t=!0){const n=this.ctx[Ce.isolate][e],s=n&&this.store[n];if(s&&!(t&&s.fiber.state!==2))return s}set(e,t,n){const s=this.ctx[Ce.isolate][e],l=this.store[s];if(!l)throw new Error(`cannot set property "${e}" without provide`);if(l.fiber!==this.ctx.fiber)throw new Error(`cannot set property "${e}" in multiple fibers`);return l.value=t,!0}provide(e,t,n){return this.ctx.fiber.effect(()=>{if(!this.props[e])this.props[e]??={type:"service"};else if(this.props[e].type!=="service")throw new Error(`property "${e}" is already declared as ${this.props[e].type}`);this.props[e]={type:"service"},this.ctx.root[Ce.isolate][e]??=Symbol(e);const s=this.ctx[Ce.isolate][e],l={name:e,value:t,fiber:this.ctx.fiber,check:n};if(this.store[s])throw new Error(`service "${e}" has been registered at <${this.store[s].fiber.name}>`);return this.store[s]=l,this.ctx.fiber.store[e]=l,this.ctx.fiber.state===2&&this.notify([e]),async()=>{delete this.store[s];const o=this.notify([e]);await Promise.allSettled(o.map(u=>u.await())),delete this.ctx.fiber.store[e]}},`ctx.provide(${JSON.stringify(e)})`)}notify(e,t=(n,s)=>n[Ce.isolate][s]===this.ctx[Ce.isolate][s]){const n=[];for(const s of this.ctx.registry.values())for(const l of s.fibers){let o=!1;for(const u of e)u in l.inject&&t(l.ctx,u)&&(o=!0,l._checkImpl(u));o&&(l._refresh(),n.push(l))}for(const s of e){const l=Object.create(this.ctx);l[Ce.filter]=o=>t(o,s),this.ctx.events.emit(l,"internal/service",s,this._getImpl(s,!1)?.value)}return n}accessor(e,t){return this.ctx.fiber.effect(()=>{if(e in this.props)throw new Error(`property "${e}" is already declared as ${this.props[e].type}`);return this.props[e]={type:"accessor",...t},()=>delete this.props[e]},`ctx.accessor(${JSON.stringify(e)})`)}mixin(e,t){const n=this;return this.ctx.fiber.effect(function*(){const s=Array.isArray(t)?t.map(o=>[o,o]):Object.entries(t),l=(o,u)=>o[e];for(const[o,u]of s)yield n.accessor(u,{get(h,p){const d=l(this);if(mh(d))return d;const g=h?qh(h,d):d,_=Reflect.get(d,o,g);return typeof _!="function"?_:_.bind(g??d)},set(h,p,d){const g=l(this),_=p?qh(p,g):g;return Reflect.set(g,o,h,_)}})},`ctx.mixin(${JSON.stringify(e)})`)}trace(e){return Us(this.ctx,e)}bind(e){return new Proxy(e,{apply:(t,n,s)=>Reflect.apply(t,this.trace(n),s.map(l=>this.trace(l))),construct:(t,n,s)=>Reflect.construct(t,n.map(l=>this.trace(l)),s)})}};const Ij=Symbol.for("ValidationError");var $7=class extends TypeError{name="ValidationError";constructor(e){super(`invalid config:
88
- `+e.map(t=>t.path?` - ${t.message} (at ${t.path.join(".")})`:` - ${t.message}`).join(`
89
- `))}};Object.defineProperty($7.prototype,Ij,{value:!0});function Pj(e,t){if(!e.Config)return t;const n=e.Config["~standard"].validate(t);if("then"in n)throw new TypeError("Async config validation is not supported");if(n.issues)throw new $7(n.issues);return n.value}const Y7=new WeakMap;function H0(e){const t=e();return Y7.get(e)?.()??t}function Fj(e,t){const n=["internal/plugin",t];let s;try{s=e.events.dispatch("emit",n)}catch(l){e.logger.error(l);return}for(const l of s)try{const o=l(...n);Promise.resolve(o).catch(u=>e.logger.error(u))}catch(o){e.logger.error(o)}}var $h=class K7 extends Error{code;constructor(t,n){super(n??K7.Code[t]),this.code=t}};(function(e){e.Code={INACTIVE_EFFECT:"cannot create effect on inactive context"}})($h||($h={}));const Dn="__INACTIVE__";var W7=class{parent;inject;runtime;uid;ctx;config;_config;state=0;dispose;store;inertia;_hooks=Object.create(null);_disposables=new V_;context;_error;_runner;_store=Object.create(null);constructor(e,t,n,s,l){this.parent=e,this.inject=n,this.runtime=s,this._config=t;const o=u=>{this._disposables.push(u)};if(s){this.uid=e.registry.counter,this.ctx=this.context=e.extend({fiber:this});const u=Object.entries(this.inject);if(u.length){this.ctx[Ko.intercept]=Object.create(e[Ko.intercept]);for(const[h,p]of u)mh(p)||(this.ctx[Ko.intercept][h]=p)}this._runner={epoch:Dn,getOuterStack:l,execute:function(){if(Aj(s.callback)){const h=new s.callback(this.ctx,this.config);for(const p of h?.[Ce.initHooks]??[])p();return h?.[Ce.init]?.()}else return s.callback(this.ctx,this.config)},collect:o},this.dispose=e.fiber.effect(()=>{const h=s.fibers.push(this);return async()=>{for(this.uid=null,Fj(this.context,this),this.ctx.registry.has(s.callback)&&(h(),s.fibers.length||this.ctx.registry.delete(s.callback)),this._setEpoch(Dn),this.inertia||this._updateState(()=>(this.inertia=this._unload(),5));this.inertia;)await this.inertia}},"ctx.plugin()");try{this.context.emit("internal/plugin",this)}catch(h){throw Promise.resolve(this.dispose()).catch(p=>this.ctx.logger.error(p)),h}if(this.uid!==null&&e.fiber.state!==5){for(const h of Object.keys(this.inject))this._checkImpl(h);this._refresh()}}else this.uid=0,this.ctx=this.context=e,this.state=2,this.store=Object.create(null),this._runner={epoch:"",getOuterStack:l,execute:()=>{},collect:o},this.dispose=()=>this.restart()}get name(){let e=this;do{if(e.runtime?.name)return e.runtime.name;e=e.parent.fiber}while(e!==e.parent.fiber);return"root"}assertActive(){if(this.uid===null)throw new $h("INACTIVE_EFFECT")}_execute(e){const t=e.epoch;return L5(n=>{const s=o=>{if(typeof o=="function")e.collect(o);else if(!mh(o))throw new TypeError("Invalid effect")},l=e.execute.call(this);if(typeof l=="function")return e.collect(l);if(!mh(l))if(ia(l)){if("then"in l)return l.then(s);if(Symbol.iterator in l){n.error=new Error;const o=l[Symbol.iterator]();for(;;){const u=o.next();if(s(u.value),u.done)return}}else if(Symbol.asyncIterator in l){const o=l[Symbol.asyncIterator]();return(async()=>{for(await Promise.resolve(),n.error=new Error;;){if(e.epoch!==t)return;const u=await o.next();if(s(u.value),u.done)return}})()}else throw new TypeError("Invalid effect")}else throw new TypeError("Invalid effect")},e.getOuterStack)}effect(e,t="anonymous"){if(this.assertActive(),this.state===5)throw new $h("INACTIVE_EFFECT");const n=[];let s=!1,l;const o=()=>{if(s)return l;s=!0;let Q;for(const R of n.splice(0).reverse())if(Q)Q=Q.then(()=>H0(R));else{const V=H0(R);ia(V)&&"then"in V&&(Q=V)}return l=Q},u={label:t,children:[]},h={execute:e,epoch:!0,collect:Q=>{n.push(Q),this._disposables.delete(Q),Q[Ce.effect]&&u.children.push(Q[Ce.effect])},getOuterStack:$_()};let p,d=!0,g,_,S,v=!1,w,C=()=>!1;const E=()=>(S??=new Promise((Q,R)=>{g=Q,_=R}),S),M=Q=>Promise.resolve(Q).then(()=>o(),async R=>{throw await o(),R}),U=Q=>{let R;try{R=Q()}catch(V){throw C(),V}if(ia(R)&&"then"in R){const V=Promise.resolve(R).finally(()=>{C(),w===V&&(w=void 0)});return w=V}return C(),R},B=os(()=>h.epoch?(h.epoch=!1,U(()=>d?M(E()):p?M(p):o())):v?w:void 0,Ce.effect,u);Y7.set(B,()=>w),C=this._disposables.push(B);try{p=this._execute(h)}catch(Q){d=!1,v=!0,h.epoch=!1;let R;try{R=U(o)}finally{_?.(Q)}throw ia(R)&&"then"in R&&R.catch(V=>this.ctx.logger.error(V)),Q}d=!1,S&&Promise.resolve(p).then(g,_),p?.catch(()=>h.epoch?U(o):o()).catch(Q=>this.ctx.logger.error(Q));const X=()=>{if(h.epoch)return h.epoch=!1,U(o)};return B.then=async(Q,R)=>Promise.resolve(p).then(()=>X).then(Q,R),B}getEffects(){return[...this._disposables].map(e=>e[Ce.effect]).filter(Boolean)}_getState(){return this.uid===null?4:this._error?3:this._runner.epoch!==Dn?2:0}_updateState(e){const t=this.state;if(this.state=e()??this._getState(),t!==this.state&&(this.context.emit("internal/status",this,t),!(t!==2&&this.state!==2)))for(const n of Reflect.ownKeys(this.ctx.reflect.store)){const s=this.ctx.reflect.store[n];s.fiber===this&&this.ctx.reflect.notify([s.name])}}_checkImpl(e){const t=this.ctx.reflect._getImpl(e,!0);if(!t)return delete this._store[e];try{if(t.check&&!t.check.call(Us(this.ctx,t.value)))return delete this._store[e]}catch(n){return t.fiber.ctx.logger.error(n),delete this._store[e]}this._store[e]=t}_refresh(){let e=!1;e="";for(const t of Object.keys(this.inject)){const n=this._store[t];if(!n){e=Dn;break}e+=":"+n.fiber.uid}this._setEpoch(e)}_setEpoch(e){const t=this._runner.epoch;e!==t&&(this._runner.epoch=e,!this.inertia&&this._updateState(()=>e!==Dn&&t===Dn?(this.inertia=this._reload(),1):(this.inertia=this._unload(),5)))}_resolveConfig(e){return e=this.context.waterfall(this,"internal/config",e,()=>e),this.runtime?Pj(this.runtime,e):e}async _reload(){this.store={...this._store};const e=this._runner.epoch;try{await Promise.resolve(),this._runner.epoch===e&&(this.config=this._resolveConfig(this._config),await this._execute(this._runner),this._error=void 0)}catch(t){this.ctx.logger.error(t),this._error=t,this._runner.epoch=Dn}this._updateState(()=>{if(this._runner.epoch===e)this.inertia=void 0;else return this.inertia=this._unload(),5})}async _unload(){await Promise.all(this._disposables.clear().map(async e=>{try{await L5(async t=>{await Promise.resolve(),t.error=new Error,await H0(e)},this._runner.getOuterStack)}catch(t){this.ctx.logger.error(t)}})),this.store=void 0,this._updateState(()=>{if(this._runner.epoch===Dn)this.inertia=void 0;else return this.inertia=this._reload(),1})}async await(){for(;this.inertia;)await this.inertia;if(this._error)throw this._error;return this}async restart(){this.assertActive(),this._setEpoch(Dn),this._refresh(),await this.await()}update(e,t=!1){if(this.assertActive(),this._config=e,this.state!==2){this._error=void 0,this._setEpoch(Dn),this._refresh();return}e=this._resolveConfig(e),this.context.waterfall(this,"internal/update",e,t,()=>(this.config=e,this._error=void 0,this.restart()))}};function Uj(e){return e&&typeof e=="object"&&typeof e.apply=="function"}function Qp(e,t){return function(n,s){if(s.kind==="class")Object.hasOwn(n,"inject")||(os(n,"inject",Object.create(Object.getPrototypeOf(n).inject??null)),os(n.inject,Ce.checkProto,!0)),n.inject[e]=t;else if(s.kind==="method"){const l=(n[Ce.metadata]??={}).inject??=Object.create(null);l[e]=t,s.addInitializer(function(){const o=this[Ce.tracker]?.property;(this[Ce.initHooks]??=[]).push(()=>{this.ctx.inject(l,u=>n.call(o?qh(this,{[o]:u}):this))})})}else throw new Error("@Inject() can only be used on class or class methods")}}(function(e){function t(n,s=Object.create(null)){if(!n)return s;if(Array.isArray(n))for(const l of n)s[l]=null;else if(Reflect.has(n,Ce.checkProto)){Object.assign(s,t(Object.getPrototypeOf(n)));for(const l of Object.keys(n))s[l]=n[l]??null}else for(const l of Object.keys(n))s[l]=n[l]??null;return s}e.resolve=t})(Qp||(Qp={}));var Vj=class{ctx;_counter=0;_internal=new Map;constructor(e){this.ctx=e,os(this,Ce.tracker,{property:"ctx",noShadow:!0})}get counter(){return++this._counter}get size(){return this._internal.size}resolve(e){try{if(typeof e=="function")return e;if(Uj(e))return e.apply}catch{}}get(e){const t=this.resolve(e);return t&&this._internal.get(t)}has(e){const t=this.resolve(e);return!!t&&this._internal.has(t)}delete(e){const t=this.resolve(e),n=t&&this._internal.get(t);if(n){this._internal.delete(t);for(const s of n.fibers)s.dispose();return n}}keys(){return this._internal.keys()}values(){return this._internal.values()}entries(){return this._internal.entries()}forEach(e){return this._internal.forEach(e)}inject(e,t){return this.plugin({inject:e,apply:t,name:t.name})}plugin(e,t,n=$_()){const s=this.resolve(e);if(!s)throw new Error('invalid plugin, expect function or object with an "apply" method, received '+typeof e);this.ctx.fiber.assertActive();let l=this._internal.get(s);if(!l){let h=e.name;h==="apply"&&(h=void 0),l={name:h,callback:s,fibers:new V_,Config:e.Config},this._internal.set(s,l)}const o=new W7(this.ctx,t,Qp.resolve(e.inject),l,n),u=Object.create(o);return u.then=(h,p)=>o.await().then(h,p),u}},Ko=class Io{static effect=Ce.effect;static filter=Ce.filter;static isolate=Ce.isolate;static intercept=Ce.intercept;static is(t){return!!t?.[Io.is]}static{Io.is[Symbol.toPrimitive]=()=>Symbol.for("cordis.is"),Io.prototype[Io.is]=!0}constructor(){this[Ce.isolate]=Object.create(null),this[Ce.intercept]=Object.create(null);const t=new Proxy(this,B5.handler);return this.root=t,this.baseUrl=void 0,this.fiber=new W7(t,{},Object.create(null),null,()=>[]),this.reflect=new B5(t),this.registry=new Vj(t),this.events=new Lj(t),this.logger=new jj(t),this.fiber._disposables.clear(),t}[Symbol.for("nodejs.util.inspect.custom")](){return`Context <${this.fiber.name}>`}extend(t={}){const n=Reflect.getOwnPropertyDescriptor(this,Ce.shadow)?.value,s=Object.create(Us(this,this));for(const l of Reflect.ownKeys(t))Object.defineProperty(s,l,Reflect.getOwnPropertyDescriptor(t,l));return n?Object.assign(Object.create(s),{[Ce.shadow]:n}):s}isolate(t,n){const s=Object.create(this[Ce.isolate]);return s[t]=n??Symbol(t),this.extend({[Ce.isolate]:s})}intercept(t,n){const s=Object.create(this[Ce.intercept]);return s[t]=n,this.extend({[Ce.intercept]:s})}};function qj(e){const t=new Ko;t.provide("slots",e.slots),t.provide("host",e.host),t.provide("uiRuntime",e.runtime);const n=new Map,s=new Map,l=h=>Object.keys(h.inject??{}).filter(p=>h.store?.[p]===void 0),o=h=>{const p=s.get(h);if(p!==void 0)return p;const d=n.get(h);if(d===void 0)return Promise.resolve();n.delete(h);const g=d.dispose().catch(_=>{console.warn(`[ui-shell] 插件 ${h} 卸载时出错:`,_)}).finally(()=>{s.delete(h)});return s.set(h,g),g},u=(h,p,d)=>({id:p,slots:q5(h.slots,g=>(h.effect(()=>g),g)),host:h.host,runtime:h.uiRuntime,provide:(g,_)=>{const S=e.services.provide(g,_,p);h.effect(()=>S);try{h.provide(g,_)}catch(v){console.warn(`[ui-shell] 服务「${g}」没能在 cordis 里镜像:`,v)}d?.onProvide?.(g)},consume:g=>h.get(g)??e.services.consume(g)});return{ctx:t,mount:async(h,p,d)=>{await o(h);const g=t.plugin({name:h,...d?.inject===void 0||d.inject.length===0?{}:{inject:[...d.inject]},apply:_=>p(u(_,h,d))});try{await g}catch(_){throw await g.dispose().catch(()=>{}),_}if(n.set(h,g),d?.onState!==void 0){const _=d.onState,S=w=>{g.uid===null||w.uid!==g.uid||_(w.state,l(w))},v=t.on("internal/status",S);t.effect(()=>typeof v=="function"?v:()=>{})}return g},unmount:h=>o(h),stateOf:h=>n.get(h)?.state,missingOf:h=>{const p=n.get(h);return p===void 0?[]:l(p)},disposeAll:async()=>{await Promise.all([...n.keys()].map(async h=>{const p=n.get(h);n.delete(h),await p?.dispose().catch(()=>{})})),await Promise.all([...s.values()])}}}const $j=["react","react-dom","react-dom/client","react/jsx-runtime","@dsc/ui","@dsc/ui-slots","@dsc/ui-primitives","@dsc/ui-dockkit","@xterm/xterm","@xterm/addon-fit"],Yj="__DSC_BOOT__",j5="__DSC_UI_FACTORIES__",Kj="__DSC_UI_BOOT_STATE__",nc={react:G9,"react-dom":MR,"react-dom/client":iC,"react/jsx-runtime":Y9,"@dsc/ui":cN,"@dsc/ui-slots":hL,"@dsc/ui-primitives":FR,"@dsc/ui-dockkit":lL,"@xterm/xterm":yj,"@xterm/addon-fit":xj},G7=Object.keys(nc),H5=$j,I5=[...H5.filter(e=>!(e in nc)),...Object.keys(nc).filter(e=>!H5.includes(e))];I5.length>0&&console.error(`[ui-shell] 平台模块表与运行时 require 表对不上:${I5.join("、")}`);const X7=pa(0);function Wj(e){return X7.subscribe(()=>{try{e()}catch{}})}function P5(){X7.notify()}async function Gj(){const e=globalThis[Yj];if(e!=null)return e;const t=await fetch("/api/boot",{headers:{accept:"application/json"}});if(!t.ok)throw new Error(`取启动清单失败:HTTP ${String(t.status)}(这一页不是宿主伺服的页面?宿主启动时会打印一个带令牌的地址,用那个地址打开)`);return await t.json()}const Xj=!0;function Zj(){const e=globalThis.__DSC_CORDIS_PROBE__;if(e==="none")return()=>!1;if(e==="*")return()=>!0;if(Array.isArray(e)){const t=new Set(e.filter(n=>typeof n=="string"));return n=>t.has(n)}return()=>Xj}async function Qj(e,t){const n=Jj(e),s=new Map;for(const k of n)for(const K of k.entries)s.set(K,k);const l={rev:e.rev,host:{name:e.host.name,version:e.host.version},startedAt:Date.now(),firstFrameAt:null,batches:n.map(k=>({phase:k.phase,entries:[...k.entries],state:"pending",failures:[]})),plugins:{},requests:[]};for(const k of e.entries)l.plugins[k.id]={id:k.id,phase:s.get(k.id)?.phase??"application",rev:k.rev,state:"pending",attempts:0};const o=new Map;for(let k=0;k<n.length;k+=1)for(const K of n[k].entries)o.set(K,l.batches[k]);globalThis[Kj]=l,P5();const u=new aC,h=eH(),p=new Map;let d=Promise.resolve();const g=k=>{const K=d.then(k);return d=K.then(()=>{},()=>{}),K},_=new $5,S=qj({slots:t.slots,host:t.host,runtime:t.runtime,services:_}),v=Zj(),w=k=>[...k.services??[]],C=new Map,E=new Map,M=[...e.entries],U=()=>{P5()},B=(k,K)=>{const W=l.plugins[k];W!==void 0&&(Object.assign(W,K),U())},X=(k,K)=>({has:W=>typeof h[W]=="function",load:W=>{const q={url:W,kind:W.includes("??")?"batch":"single",id:k,phase:K,at:Date.now(),ok:!0};return l.requests.push(q),sH(W,k).catch(Z=>{throw q.ok=!1,U(),Z})}}),Q=async(k,K,W="batch")=>{if(E.get(k.id)===k.rev&&C.get(k.id)?.ok===!0)return null;const q=s.get(k.id),Z=q?.phase??"application",P=[],H=[],ie=()=>{for(const oe of[...P].reverse())try{oe()}catch(T){console.error(`插件 ${k.id} 回滚登记时出错:`,T)}P.length=0},$=yC({...k.inject===void 0?{}:{plugins:k.inject},...k.services===void 0?{}:{services:k.services}},oe=>C.get(oe),_,new Set(e.disabled??[]));if($.length>0){const oe=`等待:${$.join(";")}`;return C.set(k.id,{id:k.id,ok:!1,error:oe,attempts:K}),B(k.id,{state:"failed",at:Date.now(),attempts:K,error:oe}),oe}B(k.id,{state:"loading",phase:Z,rev:k.rev,attempts:K,via:v(k.id)?"cordis":"ledger"});try{const oe=W==="single"?k.url:q?.url??k.url,T=oe===k.url?void 0:k.url;await u.arrive({id:k.id,preferred:oe,...T===void 0?{}:{fallback:T}},X(k.id,Z));const ze=h[k.id];if(typeof ze!="function")throw new Error(`插件 ${k.id} 的脚本没有注册工厂(bundle 形状不对?)`);const We=rH(ze,k.id),O=We?.default??We,D=O?.apply;if(typeof D!="function")throw new Error("插件没有导出 apply(ui)");let ne;if(v(k.id)){const de=await S.mount(k.id,D,{onProvide:ve=>H.push(ve),inject:w(k),onState:(ve,Me)=>{if(ve===2){B(k.id,{fiber:2,state:"loaded",error:void 0,at:Date.now()});const fe=C.get(k.id);fe!==void 0&&fe.ok!==!0&&C.set(k.id,{...fe,ok:!0,error:void 0});return}if(ve===3){const fe="cordis 纤维装载失败(细节见控制台)";C.set(k.id,{id:k.id,ok:!1,error:fe,attempts:K}),B(k.id,{fiber:3,state:"failed",error:fe,at:Date.now()});return}B(k.id,{fiber:ve,...Me.length===0?{}:{error:`等待服务:${Me.join("、")}`}})}}),Ee=S.missingOf(k.id);if(de.state!==2){const ve=Ee.length===0?"等待依赖就绪":`等待服务:${Ee.join("、")}`;return C.set(k.id,{id:k.id,ok:!1,error:ve,attempts:K}),B(k.id,{via:"cordis",fiber:de.state,state:"loading",error:ve}),p.set(k.id,ie),E.set(k.id,k.rev),P.push(()=>{S.unmount(k.id)}),null}B(k.id,{via:"cordis",fiber:de.state}),ne=()=>{S.unmount(k.id)}}else{const de={id:k.id,slots:q5(t.slots,ve=>F5(P,ve)),host:t.host,runtime:t.runtime,provide:(ve,Me)=>{F5(P,_.provide(ve,Me,k.id)),H.push(ve)},consume:ve=>_.consume(ve)},Ee=D(de);ne=typeof Ee=="function"?Ee:void 0}typeof ne=="function"&&P.push(ne),p.set(k.id,ie),E.set(k.id,k.rev);const ae=O?.name;return C.set(k.id,{id:k.id,ok:!0,attempts:K,...typeof ae=="string"&&ae!==""?{name:ae}:{},...H.length===0?{}:{provides:[...H]}}),B(k.id,{state:"loaded",at:Date.now(),attempts:K,error:void 0}),null}catch(oe){ie();const T=oe instanceof Error?oe.message:String(oe);return C.set(k.id,{id:k.id,ok:!1,error:T,attempts:K}),B(k.id,{state:"failed",error:T,at:Date.now(),attempts:K}),T}},R=async(k,K)=>{K!==void 0&&(K.state="loading",K.startedAt=Date.now(),K.failures=[],U());const W=[];for(const q of k.entries){const Z=e.entries.find(P=>P.id===q);Z!==void 0&&await Q(Z,1)!==null&&W.push(Z)}for(const q of W)C.get(q.id)?.ok!==!0&&await Q(q,2);K!==void 0&&(K.failures=k.entries.filter(q=>C.get(q)?.ok===!1),K.state=K.failures.length>0?"failed":"done",K.doneAt=Date.now(),U())},V=async k=>{const K=s.get(k.id),W=K?.url??k.url,q=W===k.url?void 0:k.url;try{await u.arrive({id:k.id,preferred:W,...q===void 0?{}:{fallback:q}},X(k.id,K?.phase??"application"))}catch{}};await Promise.all(e.entries.filter(k=>k.immediately===!0&&l.plugins[k.id]?.state==="pending").map(k=>V(k)));for(let k=0;k<n.length;k+=1)n[k].phase==="early"&&await R(n[k],l.batches[k]);let se=!1;const me={graph:e,getReports:()=>M.map(k=>C.get(k.id)).filter(k=>k!==void 0),getState:()=>l,subscribe:Wj,markFirstFrame:()=>{l.firstFrameAt===null&&(l.firstFrameAt=Date.now(),U())},startApplication:()=>{if(se)return;se=!0;const k=()=>{const W=[];for(let q=0;q<n.length;q+=1){if(n[q].phase!=="application")continue;const Z=l.batches[q];Z!==void 0&&Z.state==="pending"&&(Z.state="scheduled",Z.scheduledAt=Date.now()),W.push({batch:n[q],batchState:Z})}U(),g(async()=>{for(const q of W)await R(q.batch,q.batchState)}).catch(q=>{console.error("[ui-shell] 应用批安装出错",q)})},K=globalThis.requestIdleCallback;typeof K=="function"?K(k,{timeout:2e3}):setTimeout(k,0)},reload:async k=>(M.some(K=>K.id===k.id)||M.push(k),me.uninstall(k.id),await S.unmount(k.id),Q(k,1,"single")),uninstall:k=>{const K=p.get(k);if(K!==void 0)try{K()}catch(W){console.error(`插件 ${k} 卸载时出错:`,W)}p.delete(k),E.delete(k),delete h[k],nH(k),C.delete(k),B(k,{state:"removed",at:Date.now(),error:void 0})},installedRev:k=>E.get(k),enqueue:g,awaitingBatch:k=>{const K=o.get(k);return K!==void 0&&(K.state==="pending"||K.state==="scheduled")},services:_,disposeAll:()=>{for(const[k,K]of[...p].reverse())try{K()}catch(W){console.error(`插件 ${k} 卸载时出错:`,W)}p.clear(),E.clear(),S.disposeAll()}};return me}function Jj(e){const t=new Set(e.entries.map(u=>u.id)),n=[];for(const u of e.batches??[]){const h=u.entries.filter(p=>t.has(p));h.length>0&&n.push({...u,entries:h})}const s=new Set(n.flatMap(u=>u.entries)),l=e.entries.filter(u=>!s.has(u.id)).map(u=>u.id);l.length>0&&n.push({phase:"application",entries:l});const o=u=>u==="early"?0:1;return[...n].sort((u,h)=>o(u.phase)-o(h.phase))}function F5(e,t){return e.push(t),t}function eH(){const e=globalThis,t=e[j5];if(t!==void 0&&typeof t=="object"&&t!==null)return t;const n={};return e[j5]=n,n}function tH(){const e=new Set;if(typeof document>"u")return e;for(const t of document.querySelectorAll("style:not([data-dsc-plugin])"))e.add(t);return e}function iH(e,t){if(!(typeof document>"u"))for(const n of document.querySelectorAll("style:not([data-dsc-plugin])"))e.has(n)||n.setAttribute("data-dsc-plugin",t)}function nH(e){if(!(typeof document>"u"))for(const t of document.querySelectorAll("style[data-dsc-plugin]"))t.getAttribute("data-dsc-plugin")===e&&t.remove()}function rH(e,t){const n=tH(),s={exports:{}},l=o=>{if(!(o in nc))throw new Error(`插件 ${t} 请求了白名单外的模块「${o}」(允许:${G7.join("、")})`);return nc[o]};try{return e(l,s,s.exports),s.exports}finally{iH(n,t)}}function sH(e,t){return new Promise((n,s)=>{const l=document.createElement("script");l.src=e,l.async=!1,l.dataset.dscPlugin=t,l.addEventListener("load",()=>{l.remove(),n()}),l.addEventListener("error",()=>{l.remove(),s(new Error(`取 bundle 失败:${e}`))}),document.head.append(l)})}function lH(e){const t=new Map,n=new Set;let s=!1,l=null;const o=()=>{for(const d of[...n])try{d()}catch{}},u=async d=>{const g=new Set(d.graph.entries.map(_=>_.id));for(const[_,S]of Object.entries(e.session.getState().plugins))S.state!=="loaded"||g.has(_)||(e.session.uninstall(_),t.delete(_));for(const _ of d.graph.entries){if(e.session.installedRev(_.id)===_.rev){t.delete(_.id);continue}if(e.session.awaitingBatch(_.id))continue;const S=await e.session.reload(_);S===null?t.delete(_.id):t.set(_.id,{id:_.id,message:S,at:Date.now()})}o()},h=d=>{l=d,e.session.enqueue(async()=>{if(s)return;const g=l;g!==null&&await u(g)}).catch(g=>{console.error("[ui-shell] 插件热更对账出错",g)})},p=e.channel.onPlugins(d=>{h(d)});return{getFailures:()=>[...t.values()],retry:()=>{h(l??{rev:e.session.graph.rev,changed:[],removed:[],graph:e.session.graph})},subscribe:d=>(n.add(d),()=>{n.delete(d)}),stop:()=>{s=!0,p(),n.clear()}}}const aH={rev:"unavailable",entries:[],batches:[],host:{name:"Pneuma",version:"未知版本"}};async function oH(e){jh(WL());const t=await e;t!==null&&(Vs=Y8(t),jh(Vs),W8(Vs))}async function cH(e,t){return Promise.race([e,new Promise(n=>{window.setTimeout(()=>{n(null)},t)})])}let Vs=Bh;G8(e=>{Vs={...Vs,...e},jh(Vs),W8(Vs)});function uH(){requestAnimationFrame(()=>{requestAnimationFrame(()=>{const e=document.getElementById("boot-splash");e!==null&&(e.classList.add("boot-splash--done"),window.setTimeout(()=>{e.remove()},240))})})}async function hH(){const e=document.getElementById("root");if(e===null)throw new Error("页面里没有 #root");const t=new dC;Object.keys(up).map(_=>t.declare(_,up[_]));const n=JL(),s=n.invoke("getUiPrefs").catch(_=>(console.warn("[ui-shell] 读界面偏好失败,沿用上次的外观镜像与默认宽度",_),null));oH(s);let l=aH,o=null,u=null;try{l=await Gj(),o=await Qj(l,{slots:t,host:l.host,runtime:n})}catch(_){u=_ instanceof Error?_.message:String(_)}const h=o===null?null:lH({channel:n,session:o}),p=o?.services??new $5,d=await cH(s,1500);Oh(d?.panelWidths??{});const g=()=>{l_(_=>{n.invoke("setUiPrefs",[{panelWidths:_}]).catch(S=>{console.warn("[ui-shell] 面板几何没写成,下次启动会回默认宽",S)})})};d!==null?g():s.then(_=>{_!==null&&(Oh(_.panelWidths??{}),g())}),em.createRoot(e).render(y.jsx(I.StrictMode,{children:y.jsx(gL,{channel:n,children:y.jsx(SC,{services:p,children:y.jsx(kL,{slots:t,boot:l,serviceRegistry:p,session:o,hmr:h,bootError:u,allowedModules:G7})})})})),o?.markFirstFrame(),o?.startApplication(),uH()}hH();export{jE as a,JE as b,d4 as c,GE as f,da as g,QE as h,Mm as s,UE as w};