@waq666/pneuma 0.7.1 → 0.8.1

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 (416) hide show
  1. package/README.md +242 -206
  2. package/bin/dsc.js +9 -3
  3. package/bin/headless.cjs +1 -1
  4. package/lib/adapter/transcript.d.ts +19 -2
  5. package/lib/adapter/transcript.js +71 -14
  6. package/lib/app/AgentsOverlay.js +7 -6
  7. package/lib/app/App.js +1 -1
  8. package/lib/app/ApprovalCard.js +15 -9
  9. package/lib/app/ChatView.d.ts +3 -1
  10. package/lib/app/ChatView.js +21 -17
  11. package/lib/app/Composer.js +22 -4
  12. package/lib/app/MarkdownView.js +2 -1
  13. package/lib/app/ModelPicker.js +7 -6
  14. package/lib/app/PickerFrame.d.ts +4 -0
  15. package/lib/app/PickerFrame.js +18 -0
  16. package/lib/app/PlanReviewCard.js +2 -1
  17. package/lib/app/PresetPicker.js +8 -7
  18. package/lib/app/SessionPicker.js +21 -20
  19. package/lib/app/SettingsOverlay.js +1 -1
  20. package/lib/app/SkillsPicker.js +7 -6
  21. package/lib/app/StatusBar.js +3 -15
  22. package/lib/app/TaskStrips.js +1 -4
  23. package/lib/app/TimelineRail.js +2 -1
  24. package/lib/app/ToolCard.js +2 -6
  25. package/lib/app/Welcome.d.ts +1 -0
  26. package/lib/app/Welcome.js +1 -4
  27. package/lib/app/click.d.ts +0 -2
  28. package/lib/app/click.js +2 -21
  29. package/lib/app/display-width.d.ts +16 -0
  30. package/lib/app/display-width.js +33 -0
  31. package/lib/app/markdown.d.ts +1 -3
  32. package/lib/app/markdown.js +2 -19
  33. package/lib/app/scroll-model.js +1 -1
  34. package/lib/contract/approval.d.ts +91 -0
  35. package/lib/contract/approval.js +1 -0
  36. package/lib/contract/mode.d.ts +69 -0
  37. package/lib/contract/mode.js +1 -0
  38. package/lib/contract/plugin.d.ts +240 -0
  39. package/lib/contract/plugin.js +1 -0
  40. package/lib/contract/runtime.d.ts +282 -0
  41. package/lib/contract/runtime.js +1 -0
  42. package/lib/contract/session.d.ts +208 -0
  43. package/lib/contract/session.js +36 -0
  44. package/lib/contract/settings.d.ts +242 -0
  45. package/lib/contract/settings.js +1 -0
  46. package/lib/contract/snapshot.d.ts +453 -0
  47. package/lib/contract/snapshot.js +1 -0
  48. package/lib/contract/task.d.ts +189 -0
  49. package/lib/contract/task.js +10 -0
  50. package/lib/contract/transcript.d.ts +358 -0
  51. package/lib/contract/transcript.js +1 -0
  52. package/lib/contract/usage.d.ts +132 -0
  53. package/lib/contract/usage.js +10 -0
  54. package/lib/contract.d.ts +20 -1968
  55. package/lib/contract.js +19 -30
  56. package/lib/core/agent-roles.d.ts +1 -1
  57. package/lib/core/agent-roles.js +6 -5
  58. package/lib/core/approval-floor.d.ts +9 -0
  59. package/lib/core/approval-floor.js +152 -25
  60. package/lib/core/attachments.d.ts +185 -0
  61. package/lib/core/attachments.js +425 -0
  62. package/lib/core/bytes.d.ts +14 -0
  63. package/lib/core/bytes.js +28 -0
  64. package/lib/core/call-meaning.d.ts +20 -0
  65. package/lib/core/call-meaning.js +347 -0
  66. package/lib/core/cdp/actions.js +6 -0
  67. package/lib/core/cdp/launch.js +2 -2
  68. package/lib/core/cdp/report.d.ts +27 -0
  69. package/lib/core/cdp/report.js +50 -0
  70. package/lib/core/cdp/ring-buffer.d.ts +25 -0
  71. package/lib/core/cdp/ring-buffer.js +44 -0
  72. package/lib/core/cdp/snapshot.js +5 -9
  73. package/lib/core/cdp/transport.js +1 -1
  74. package/lib/core/clamp.d.ts +20 -0
  75. package/lib/core/clamp.js +24 -0
  76. package/lib/core/clock.d.ts +16 -0
  77. package/lib/core/clock.js +20 -0
  78. package/lib/core/command-policy.js +33 -1
  79. package/lib/core/commands-completion.d.ts +28 -0
  80. package/lib/core/commands-completion.js +108 -30
  81. package/lib/core/compact.d.ts +36 -6
  82. package/lib/core/compact.js +89 -17
  83. package/lib/core/desktop-control.js +1 -3
  84. package/lib/core/dsh-compat/llm-usage-event.d.ts +78 -0
  85. package/lib/core/dsh-compat/llm-usage-event.js +91 -0
  86. package/lib/core/dsh-compat/presentation.d.ts +84 -0
  87. package/lib/core/dsh-compat/presentation.js +105 -0
  88. package/lib/core/dsh-compat/resolve-hook.d.ts +3 -3
  89. package/lib/core/dsh-compat/resolve-hook.js +41 -13
  90. package/lib/core/dsh-compat/service-map.d.ts +52 -0
  91. package/lib/core/dsh-compat/service-map.js +87 -0
  92. package/lib/core/dsh-compat/session-bridge.d.ts +107 -0
  93. package/lib/core/dsh-compat/session-bridge.js +376 -0
  94. package/lib/core/dsh-compat/session-events.d.ts +54 -0
  95. package/lib/core/dsh-compat/session-events.js +297 -0
  96. package/lib/core/dsh-compat/shims/credentials.d.ts +62 -0
  97. package/lib/core/dsh-compat/shims/credentials.js +86 -0
  98. package/lib/core/dsh-compat/shims/home-paths.d.ts +77 -0
  99. package/lib/core/dsh-compat/shims/home-paths.js +143 -0
  100. package/lib/core/dsh-compat/tools-facade.d.ts +31 -1
  101. package/lib/core/dsh-compat/tools-facade.js +207 -3
  102. package/lib/core/err-text.d.ts +5 -0
  103. package/lib/core/err-text.js +5 -0
  104. package/lib/core/events.d.ts +31 -2
  105. package/lib/core/git-info.d.ts +127 -15
  106. package/lib/core/git-info.js +315 -34
  107. package/lib/core/git-surface.d.ts +17 -0
  108. package/lib/core/git-surface.js +7 -0
  109. package/lib/core/hooks.d.ts +19 -2
  110. package/lib/core/hooks.js +57 -13
  111. package/lib/core/host-methods.d.ts +1 -1
  112. package/lib/core/host-methods.js +4 -0
  113. package/lib/core/image-diet.js +1 -4
  114. package/lib/core/json-text.d.ts +11 -0
  115. package/lib/core/json-text.js +18 -0
  116. package/lib/core/learnings/skill-write.d.ts +1 -7
  117. package/lib/core/learnings/skill-write.js +3 -37
  118. package/lib/core/lifecycle-hooks.d.ts +11 -3
  119. package/lib/core/lifecycle-hooks.js +33 -42
  120. package/lib/core/llm.d.ts +42 -0
  121. package/lib/core/llm.js +40 -25
  122. package/lib/core/loop.d.ts +11 -1
  123. package/lib/core/loop.js +95 -28
  124. package/lib/core/lsp/client.js +30 -17
  125. package/lib/core/lsp/normalize.d.ts +0 -2
  126. package/lib/core/lsp/normalize.js +1 -6
  127. package/lib/core/lsp/servers.js +1 -4
  128. package/lib/core/mcp.d.ts +18 -0
  129. package/lib/core/mcp.js +60 -16
  130. package/lib/core/microcompact.d.ts +45 -0
  131. package/lib/core/microcompact.js +128 -0
  132. package/lib/core/native-bridge.js +2 -10
  133. package/lib/core/path-policy.d.ts +13 -1
  134. package/lib/core/path-policy.js +87 -18
  135. package/lib/core/permission-presets.d.ts +9 -5
  136. package/lib/core/permission-presets.js +14 -7
  137. package/lib/core/permission-scope.d.ts +65 -0
  138. package/lib/core/permission-scope.js +109 -0
  139. package/lib/core/plugin-bundle.d.ts +95 -0
  140. package/lib/core/plugin-bundle.js +137 -0
  141. package/lib/core/plugin-loader.d.ts +36 -1
  142. package/lib/core/plugin-loader.js +336 -12
  143. package/lib/core/plugin-patch.d.ts +64 -0
  144. package/lib/core/plugin-patch.js +146 -0
  145. package/lib/core/plugin-registry.d.ts +14 -0
  146. package/lib/core/plugin-registry.js +2 -0
  147. package/lib/core/prefs.js +40 -2
  148. package/lib/core/presets.d.ts +11 -0
  149. package/lib/core/presets.js +61 -22
  150. package/lib/core/profile-dir.d.ts +5 -0
  151. package/lib/core/profile-dir.js +40 -0
  152. package/lib/core/prompt.js +55 -19
  153. package/lib/core/ptc.d.ts +8 -2
  154. package/lib/core/ptc.js +18 -4
  155. package/lib/core/records.d.ts +16 -0
  156. package/lib/core/records.js +22 -0
  157. package/lib/core/remote/notify.js +1 -3
  158. package/lib/core/remote/push.js +2 -6
  159. package/lib/core/sandbox/execpolicy.js +27 -3
  160. package/lib/core/sandbox/net-proxy.js +2 -2
  161. package/lib/core/sandbox/policy.d.ts +1 -1
  162. package/lib/core/sandbox/policy.js +21 -15
  163. package/lib/core/sandbox/win/account.js +1 -4
  164. package/lib/core/sandbox/win/acl.js +1 -6
  165. package/lib/core/sandbox/win/backend.d.ts +24 -3
  166. package/lib/core/sandbox/win/backend.js +73 -23
  167. package/lib/core/sandbox/win/doctor.js +1 -4
  168. package/lib/core/sandbox/win/runner-entry.js +1 -6
  169. package/lib/core/sandbox/win/setup.js +1 -4
  170. package/lib/core/sandbox/win/utf16.d.ts +11 -0
  171. package/lib/core/sandbox/win/utf16.js +15 -0
  172. package/lib/core/sandbox/win/wfp.js +1 -4
  173. package/lib/core/schedule/rule.d.ts +0 -17
  174. package/lib/core/schedule/rule.js +1 -3
  175. package/lib/core/schedule/runner.d.ts +5 -2
  176. package/lib/core/schedule/runner.js +32 -9
  177. package/lib/core/schedule/store.d.ts +0 -2
  178. package/lib/core/schedule/store.js +2 -9
  179. package/lib/core/session-index.d.ts +50 -0
  180. package/lib/core/session-index.js +169 -3
  181. package/lib/core/session.d.ts +89 -13
  182. package/lib/core/session.js +385 -32
  183. package/lib/core/shell-quote.d.ts +21 -0
  184. package/lib/core/shell-quote.js +24 -0
  185. package/lib/core/side-ask.d.ts +52 -0
  186. package/lib/core/side-ask.js +89 -0
  187. package/lib/core/skills.d.ts +16 -0
  188. package/lib/core/skills.js +45 -8
  189. package/lib/core/snapshot-throttle.d.ts +8 -0
  190. package/lib/core/snapshot-throttle.js +24 -0
  191. package/lib/core/spill.d.ts +11 -5
  192. package/lib/core/spill.js +35 -36
  193. package/lib/core/strings.d.ts +21 -0
  194. package/lib/core/strings.js +33 -0
  195. package/lib/core/terminal-env.d.ts +61 -0
  196. package/lib/core/terminal-env.js +327 -0
  197. package/lib/core/text-format.d.ts +17 -0
  198. package/lib/core/text-format.js +26 -0
  199. package/lib/core/todo-reminder.d.ts +19 -14
  200. package/lib/core/todo-reminder.js +14 -23
  201. package/lib/core/token-estimate.d.ts +18 -2
  202. package/lib/core/token-estimate.js +10 -2
  203. package/lib/core/tool-result-prune.d.ts +42 -0
  204. package/lib/core/tool-result-prune.js +47 -0
  205. package/lib/core/tool-search.d.ts +3 -2
  206. package/lib/core/tool-search.js +3 -2
  207. package/lib/core/tools/bash.d.ts +35 -3
  208. package/lib/core/tools/bash.js +168 -41
  209. package/lib/core/tools/fs-tools.js +18 -17
  210. package/lib/core/tools/image-tool.d.ts +2 -0
  211. package/lib/core/tools/image-tool.js +59 -0
  212. package/lib/core/tools/path-args.d.ts +4 -0
  213. package/lib/core/tools/path-args.js +22 -0
  214. package/lib/core/tools/search-tools.d.ts +30 -0
  215. package/lib/core/tools/search-tools.js +321 -34
  216. package/lib/core/tools.d.ts +82 -0
  217. package/lib/core/tools.js +21 -0
  218. package/lib/core/transcript-text.d.ts +19 -0
  219. package/lib/core/transcript-text.js +44 -0
  220. package/lib/core/ui-boot-source.d.ts +5 -0
  221. package/lib/core/ui-boot-source.js +10 -3
  222. package/lib/core/ui-bundles.d.ts +80 -6
  223. package/lib/core/ui-bundles.js +700 -76
  224. package/lib/core/ui-events.d.ts +10 -0
  225. package/lib/core/ui-events.js +25 -0
  226. package/lib/core/ui-methods.d.ts +1 -1
  227. package/lib/core/ui-methods.js +42 -13
  228. package/lib/core/ui-route.js +11 -7
  229. package/lib/core/ui-server.d.ts +6 -0
  230. package/lib/core/ui-server.js +106 -1
  231. package/lib/core/unified-diff.d.ts +35 -0
  232. package/lib/core/unified-diff.js +86 -0
  233. package/lib/core/usage-log.js +39 -0
  234. package/lib/core/web-http.d.ts +1 -1
  235. package/lib/core/web-http.js +1 -3
  236. package/lib/host/kernel.js +57 -41
  237. package/lib/plugins/agent.js +101 -20
  238. package/lib/plugins/approval-floor.js +12 -8
  239. package/lib/plugins/approval.js +252 -80
  240. package/lib/plugins/ask.js +60 -8
  241. package/lib/plugins/browser.js +32 -84
  242. package/lib/plugins/commands.js +167 -57
  243. package/lib/plugins/compact.d.ts +2 -2
  244. package/lib/plugins/compact.js +200 -30
  245. package/lib/plugins/computer-use.js +34 -18
  246. package/lib/plugins/dock-browser.js +24 -65
  247. package/lib/plugins/dsh-compat.js +7 -0
  248. package/lib/plugins/file-review.js +59 -15
  249. package/lib/plugins/git.js +16 -8
  250. package/lib/plugins/goal.js +9 -8
  251. package/lib/plugins/hooks.js +4 -2
  252. package/lib/plugins/host-stdio.js +14 -16
  253. package/lib/plugins/lifecycle-hooks.d.ts +5 -4
  254. package/lib/plugins/lifecycle-hooks.js +12 -10
  255. package/lib/plugins/llm.js +74 -33
  256. package/lib/plugins/lsp.js +22 -27
  257. package/lib/plugins/mcp.js +16 -17
  258. package/lib/plugins/memory.js +3 -24
  259. package/lib/plugins/microcompact.d.ts +4 -1
  260. package/lib/plugins/microcompact.js +117 -19
  261. package/lib/plugins/mode.js +30 -11
  262. package/lib/plugins/permission-presets.d.ts +2 -1
  263. package/lib/plugins/permission-presets.js +55 -35
  264. package/lib/plugins/plugin-manager.js +4 -6
  265. package/lib/plugins/presets.js +56 -27
  266. package/lib/plugins/prompt.js +54 -11
  267. package/lib/plugins/ptc.d.ts +13 -0
  268. package/lib/plugins/ptc.js +121 -24
  269. package/lib/plugins/remote/types.d.ts +1 -1
  270. package/lib/plugins/remote/types.js +11 -0
  271. package/lib/plugins/remote.js +14 -15
  272. package/lib/plugins/runtime.js +91 -14
  273. package/lib/plugins/sandbox.js +181 -60
  274. package/lib/plugins/schedule.js +12 -11
  275. package/lib/plugins/self-improve.js +28 -18
  276. package/lib/plugins/session-search.js +18 -13
  277. package/lib/plugins/session-title.js +1 -1
  278. package/lib/plugins/session.js +103 -25
  279. package/lib/plugins/settings.js +16 -40
  280. package/lib/plugins/skills.js +18 -1
  281. package/lib/plugins/spill.js +18 -11
  282. package/lib/plugins/subagent.js +208 -42
  283. package/lib/plugins/team.js +11 -5
  284. package/lib/plugins/todo.d.ts +1 -1
  285. package/lib/plugins/todo.js +25 -19
  286. package/lib/plugins/tool-search.js +47 -28
  287. package/lib/plugins/tools-default.js +89 -5
  288. package/lib/plugins/tools.js +3 -3
  289. package/lib/plugins/transcript.js +116 -9
  290. package/lib/plugins/web-search.d.ts +1 -1
  291. package/lib/plugins/web-search.js +25 -16
  292. package/lib/plugins/webserver.js +40 -7
  293. package/lib/remote/assets/app-B3Id1EBq.js +14 -0
  294. package/lib/remote/assets/index.html +2 -2
  295. package/lib/remote/assets/{style-DIB6729x.css → style-NtlpbKOI.css} +1 -1
  296. package/lib/services/types.d.ts +247 -29
  297. package/lib/tools/plugin-cli.d.ts +1 -0
  298. package/lib/tools/plugin-cli.js +209 -0
  299. package/lib/ui/assets/app-B-Jx5dnh.js +90 -0
  300. package/lib/ui/assets/{chunk-BajyYBss.js → chunk-Bfdlo8Me.js} +1 -1
  301. package/lib/ui/assets/chunk-DGX-i4eb.js +12 -0
  302. package/lib/ui/assets/index.html +62 -14
  303. package/lib/ui/assets/style-WzxwEPaE.css +1 -0
  304. package/lib/ui/frames.js +1 -3
  305. package/lib/ui/index.d.ts +30 -1
  306. package/lib/ui/index.js +29 -0
  307. package/lib/ui/manifest.d.ts +24 -6
  308. package/lib/ui/manifest.js +3 -2
  309. package/lib/ui/plugins/actions/bundle.json +8 -0
  310. package/lib/ui/plugins/actions/client.js +43 -0
  311. package/lib/ui/plugins/ask/bundle.json +8 -0
  312. package/lib/ui/plugins/ask/client.js +415 -0
  313. package/lib/ui/plugins/browser/bundle.json +8 -0
  314. package/lib/ui/plugins/composer/bundle.json +9 -0
  315. package/lib/ui/plugins/composer/client.js +1806 -1087
  316. package/lib/ui/plugins/files/bundle.json +8 -0
  317. package/lib/ui/plugins/files/client.js +13 -98
  318. package/lib/ui/plugins/manifest.json +1 -104
  319. package/lib/ui/plugins/palette/bundle.json +8 -0
  320. package/lib/ui/plugins/palette/client.js +360 -0
  321. package/lib/ui/plugins/plugins/bundle.json +8 -0
  322. package/lib/ui/plugins/plugins/client.js +116 -38
  323. package/lib/ui/plugins/preview/bundle.json +8 -0
  324. package/lib/ui/plugins/preview/client.js +6 -16
  325. package/lib/ui/plugins/prompt/bundle.json +8 -0
  326. package/lib/ui/plugins/prompt/client.js +81 -47
  327. package/lib/ui/plugins/sessions/bundle.json +8 -0
  328. package/lib/ui/plugins/sessions/client.js +157 -111
  329. package/lib/ui/plugins/settings/bundle.json +8 -0
  330. package/lib/ui/plugins/settings/client.js +184 -170
  331. package/lib/ui/plugins/skills/bundle.json +8 -0
  332. package/lib/ui/plugins/skills/client.js +161 -79
  333. package/lib/ui/plugins/status/bundle.json +8 -0
  334. package/lib/ui/plugins/status/client.js +165 -26
  335. package/lib/ui/plugins/statusbar/bundle.json +9 -0
  336. package/lib/ui/plugins/statusbar/client.js +100 -144
  337. package/lib/ui/plugins/tasks/bundle.json +8 -0
  338. package/lib/ui/plugins/team/bundle.json +8 -0
  339. package/lib/ui/plugins/team/client.js +60 -58
  340. package/lib/ui/plugins/terminal/bundle.json +8 -0
  341. package/lib/ui/plugins/terminal/client.js +1 -7
  342. package/lib/ui/plugins/trace/bundle.json +11 -0
  343. package/lib/ui/plugins/trace/client.js +86 -179
  344. package/lib/ui/plugins/transcript/bundle.json +8 -0
  345. package/lib/ui/plugins/transcript/client.js +1608 -1243
  346. package/lib/ui/sdk/@dsc/ui/index.d.ts +54 -16
  347. package/lib/ui/sdk/@dsc/ui/package.json +1 -1
  348. package/lib/ui/sdk/@dsc/ui-core/contract.d.ts +20 -1968
  349. package/lib/ui/sdk/@dsc/ui-core/core/attachments.d.ts +185 -0
  350. package/lib/ui/sdk/@dsc/ui-core/core/bytes.d.ts +14 -0
  351. package/lib/ui/sdk/@dsc/ui-core/core/err-text.d.ts +18 -0
  352. package/lib/ui/sdk/@dsc/ui-core/core/git-surface.d.ts +17 -0
  353. package/lib/ui/sdk/@dsc/ui-core/core/json-text.d.ts +11 -0
  354. package/lib/ui/sdk/@dsc/ui-core/core/path-policy.d.ts +44 -0
  355. package/lib/ui/sdk/@dsc/ui-core/core/records.d.ts +16 -0
  356. package/lib/ui/sdk/@dsc/ui-core/core/throughput.d.ts +46 -0
  357. package/lib/ui/sdk/@dsc/ui-core/core/token-estimate.d.ts +18 -2
  358. package/lib/ui/sdk/@dsc/ui-core/core/unified-diff.d.ts +35 -0
  359. package/lib/ui/sdk/@dsc/ui-core/package.json +1 -1
  360. package/lib/ui/sdk/@dsc/ui-core/ui/index.d.ts +30 -1
  361. package/lib/ui/sdk/@dsc/ui-core/ui/manifest.d.ts +24 -6
  362. package/lib/ui/sdk/@dsc/ui-core/ui/services.d.ts +19 -8
  363. package/lib/ui/sdk/@dsc/ui-core/ui/signal.d.ts +49 -0
  364. package/lib/ui/sdk/@dsc/ui-dockkit/dock-model.d.ts +17 -3
  365. package/lib/ui/sdk/@dsc/ui-dockkit/dock-state.d.ts +1 -1
  366. package/lib/ui/sdk/@dsc/ui-dockkit/package.json +1 -1
  367. package/lib/ui/sdk/@dsc/ui-layout/app.d.ts +4 -0
  368. package/lib/ui/sdk/@dsc/ui-layout/appearance.d.ts +6 -1
  369. package/lib/ui/sdk/@dsc/ui-layout/host-channel.d.ts +21 -0
  370. package/lib/ui/sdk/@dsc/ui-layout/index.d.ts +1 -0
  371. package/lib/ui/sdk/@dsc/ui-layout/package.json +1 -1
  372. package/lib/ui/sdk/@dsc/ui-layout/page-state.d.ts +1 -1
  373. package/lib/ui/sdk/@dsc/ui-layout/runtime-context.d.ts +10 -1
  374. package/lib/ui/sdk/@dsc/ui-layout/thread-view.d.ts +1 -1
  375. package/lib/ui/sdk/@dsc/ui-layout/usage-today.d.ts +11 -0
  376. package/lib/ui/sdk/@dsc/ui-primitives/dialog-focus.d.ts +30 -0
  377. package/lib/ui/sdk/@dsc/ui-primitives/error-text.d.ts +12 -0
  378. package/lib/ui/sdk/@dsc/ui-primitives/git-surface.d.ts +9 -0
  379. package/lib/ui/sdk/@dsc/ui-primitives/highlight.d.ts +23 -0
  380. package/lib/ui/sdk/@dsc/ui-primitives/humanize-error.d.ts +35 -0
  381. package/lib/ui/sdk/@dsc/ui-primitives/icons-workspace.d.ts +33 -0
  382. package/lib/ui/sdk/@dsc/ui-primitives/icons.d.ts +21 -3
  383. package/lib/ui/sdk/@dsc/ui-primitives/image-lightbox.d.ts +21 -0
  384. package/lib/ui/sdk/@dsc/ui-primitives/index.d.ts +16 -0
  385. package/lib/ui/sdk/@dsc/ui-primitives/markdown.d.ts +10 -14
  386. package/lib/ui/sdk/@dsc/ui-primitives/package.json +1 -1
  387. package/lib/ui/sdk/@dsc/ui-primitives/panels.d.ts +31 -8
  388. package/lib/ui/sdk/@dsc/ui-primitives/paths.d.ts +2 -0
  389. package/lib/ui/sdk/@dsc/ui-primitives/review-findings-card.d.ts +25 -0
  390. package/lib/ui/sdk/@dsc/ui-primitives/review-findings.d.ts +64 -0
  391. package/lib/ui/sdk/@dsc/ui-primitives/review-notice-card.d.ts +27 -0
  392. package/lib/ui/sdk/@dsc/ui-primitives/review-notice.d.ts +80 -0
  393. package/lib/ui/sdk/@dsc/ui-primitives/signal.d.ts +9 -0
  394. package/lib/ui/sdk/@dsc/ui-primitives/sizes.d.ts +15 -0
  395. package/lib/ui/sdk/@dsc/ui-primitives/skeleton.d.ts +39 -0
  396. package/lib/ui/sdk/@dsc/ui-primitives/snapshot.d.ts +46 -0
  397. package/lib/ui/sdk/@dsc/ui-primitives/thread-resizer.d.ts +3 -3
  398. package/lib/ui/sdk/@dsc/ui-primitives/throughput.d.ts +13 -0
  399. package/lib/ui/sdk/@dsc/ui-primitives/tokens.d.ts +9 -0
  400. package/lib/ui/sdk/@dsc/ui-primitives/tool-args.d.ts +1 -1
  401. package/lib/ui/sdk/@dsc/ui-primitives/tool-summary.d.ts +30 -6
  402. package/lib/ui/sdk/@dsc/ui-primitives/unified-diff.d.ts +10 -0
  403. package/lib/ui/sdk/@dsc/ui-renderer/boot.d.ts +10 -1
  404. package/lib/ui/sdk/@dsc/ui-renderer/cordis-host.d.ts +113 -0
  405. package/lib/ui/sdk/@dsc/ui-renderer/package.json +1 -1
  406. package/lib/ui/sdk/@dsc/ui-slots/package.json +1 -1
  407. package/lib/ui/services.d.ts +19 -8
  408. package/lib/ui/services.js +20 -12
  409. package/lib/ui/signal.d.ts +49 -0
  410. package/lib/ui/signal.js +57 -0
  411. package/lib/ui/tui-plugins.js +36 -16
  412. package/package.json +71 -58
  413. package/lib/remote/assets/app-DAcUCOEn.js +0 -14
  414. package/lib/ui/assets/app-B70nVIKd.js +0 -69
  415. package/lib/ui/assets/chunk-BGcgwlCI.js +0 -12
  416. package/lib/ui/assets/style-Bq01xH_b.css +0 -1
@@ -1,69 +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 vh(e,t){for(var n=0;n<t.length;n++){const s=t[n];if(typeof s!="string"&&!Array.isArray(s)){for(const a in s)if(a!=="default"&&!(a in e)){const u=Object.getOwnPropertyDescriptor(s,a);u&&Object.defineProperty(e,a,u.get?u:{enumerable:!0,get:()=>s[a]})}}}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 a of document.querySelectorAll('link[rel="modulepreload"]'))s(a);new MutationObserver(a=>{for(const u of a)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function n(a){const u={};return a.integrity&&(u.integrity=a.integrity),a.referrerPolicy&&(u.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?u.credentials="include":a.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function s(a){if(a.ep)return;a.ep=!0;const u=n(a);fetch(a.href,u)}})();function Jl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var c1={exports:{}},eo={};var f3;function P9(){if(f3)return eo;f3=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(s,a,u){var c=null;if(u!==void 0&&(c=""+u),a.key!==void 0&&(c=""+a.key),"key"in a){u={};for(var f in a)f!=="key"&&(u[f]=a[f])}else u=a;return a=u.ref,{$$typeof:e,type:s,key:c,ref:a!==void 0?a:null,props:u}}return eo.Fragment=t,eo.jsx=n,eo.jsxs=n,eo}var d3;function F9(){return d3||(d3=1,c1.exports=P9()),c1.exports}var y=F9();const U9=Jl(y),V9=vh({__proto__:null,default:U9},[y]);var h1={exports:{}},Me={};var p3;function q9(){if(p3)return Me;p3=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),v=Symbol.for("react.view_transition"),b=Symbol.iterator;function w(A){return A===null||typeof A!="object"?null:(A=b&&A[b]||A["@@iterator"],typeof A=="function"?A:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,D={};function K(A,ne,oe){this.props=A,this.context=ne,this.refs=D,this.updater=oe||C}K.prototype.isReactComponent={},K.prototype.setState=function(A,ne){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,ne,"setState")},K.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function V(){}V.prototype=K.prototype;function Z(A,ne,oe){this.props=A,this.context=ne,this.refs=D,this.updater=oe||C}var se=Z.prototype=new V;se.constructor=Z,E(se,K.prototype),se.isPureReactComponent=!0;var z=Array.isArray;function T(){}var $={H:null,A:null,T:null,S:null},ae=Object.prototype.hasOwnProperty;function N(A,ne,oe){var pe=oe.ref;return{$$typeof:e,type:A,key:ne,ref:pe!==void 0?pe:null,props:oe}}function J(A,ne){return N(A.type,ne,A.props)}function W(A){return typeof A=="object"&&A!==null&&A.$$typeof===e}function G(A){var ne={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(oe){return ne[oe]})}var Q=/\/+/g;function P(A,ne){return typeof A=="object"&&A!==null&&A.key!=null?G(""+A.key):ne.toString(36)}function B(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(T,T):(A.status="pending",A.then(function(ne){A.status==="pending"&&(A.status="fulfilled",A.value=ne)},function(ne){A.status==="pending"&&(A.status="rejected",A.reason=ne)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function ee(A,ne,oe,pe,Te){var Ee=typeof A;(Ee==="undefined"||Ee==="boolean")&&(A=null);var Oe=!1;if(A===null)Oe=!0;else switch(Ee){case"bigint":case"string":case"number":Oe=!0;break;case"object":switch(A.$$typeof){case e:case t:Oe=!0;break;case g:return Oe=A._init,ee(Oe(A._payload),ne,oe,pe,Te)}}if(Oe)return Te=Te(A),Oe=pe===""?"."+P(A,0):pe,z(Te)?(oe="",Oe!=null&&(oe=Oe.replace(Q,"$&/")+"/"),ee(Te,ne,oe,"",function(ze){return ze})):Te!=null&&(W(Te)&&(Te=J(Te,oe+(Te.key==null||A&&A.key===Te.key?"":(""+Te.key).replace(Q,"$&/")+"/")+Oe)),ne.push(Te)),1;Oe=0;var me=pe===""?".":pe+":";if(z(A))for(var ye=0;ye<A.length;ye++)pe=A[ye],Ee=me+P(pe,ye),Oe+=ee(pe,ne,oe,Ee,Te);else if(ye=w(A),typeof ye=="function")for(A=ye.call(A),ye=0;!(pe=A.next()).done;)pe=pe.value,Ee=me+P(pe,ye++),Oe+=ee(pe,ne,oe,Ee,Te);else if(Ee==="object"){if(typeof A.then=="function")return ee(B(A),ne,oe,pe,Te);throw ne=String(A),Error("Objects are not valid as a React child (found: "+(ne==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":ne)+"). If you meant to render a collection of children, use an array instead.")}return Oe}function U(A,ne,oe){if(A==null)return A;var pe=[],Te=0;return ee(A,pe,"","",function(Ee){return ne.call(oe,Ee,Te++)}),pe}function fe(A){if(A._status===-1){var ne=A._result,oe=ne();oe.then(function(pe){(A._status===0||A._status===-1)&&(A._status=1,A._result=pe,oe.status===void 0&&(oe.status="fulfilled",oe.value=pe))},function(pe){(A._status===0||A._status===-1)&&(A._status=2,A._result=pe,oe.status===void 0&&(oe.status="rejected",oe.reason=pe))}),A._status===-1&&(A._status=0,A._result=oe)}if(A._status===1)return A._result.default;throw A._result}var k=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ne=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(ne))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)};function Ie(A){var ne=$.T,oe={};oe.types=ne!==null?ne.types:null,$.T=oe;try{var pe=A(),Te=$.S;Te!==null&&Te(oe,pe),typeof pe=="object"&&pe!==null&&typeof pe.then=="function"&&pe.then(T,k)}catch(Ee){k(Ee)}finally{ne!==null&&oe.types!==null&&(ne.types=oe.types),$.T=ne}}function We(A){var ne=$.T;if(ne!==null){var oe=ne.types;oe===null?ne.types=[A]:oe.indexOf(A)===-1&&oe.push(A)}else Ie(We.bind(null,A))}var O={map:U,forEach:function(A,ne,oe){U(A,function(){ne.apply(this,arguments)},oe)},count:function(A){var ne=0;return U(A,function(){ne++}),ne},toArray:function(A){return U(A,function(ne){return ne})||[]},only:function(A){if(!W(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return Me.Activity=_,Me.Children=O,Me.Component=K,Me.Fragment=n,Me.Profiler=a,Me.PureComponent=Z,Me.StrictMode=s,Me.Suspense=m,Me.ViewTransition=v,Me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,Me.__COMPILER_RUNTIME={__proto__:null,c:function(A){return $.H.useMemoCache(A)}},Me.addTransitionType=We,Me.cache=function(A){return function(){return A.apply(null,arguments)}},Me.cacheSignal=function(){return null},Me.cloneElement=function(A,ne,oe){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var pe=E({},A.props),Te=A.key;if(ne!=null)for(Ee in ne.key!==void 0&&(Te=""+ne.key),ne)!ae.call(ne,Ee)||Ee==="key"||Ee==="__self"||Ee==="__source"||Ee==="ref"&&ne.ref===void 0||(pe[Ee]=ne[Ee]);var Ee=arguments.length-2;if(Ee===1)pe.children=oe;else if(1<Ee){for(var Oe=Array(Ee),me=0;me<Ee;me++)Oe[me]=arguments[me+2];pe.children=Oe}return N(A.type,Te,pe)},Me.createContext=function(A){return A={$$typeof:c,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:u,_context:A},A},Me.createElement=function(A,ne,oe){var pe,Te={},Ee=null;if(ne!=null)for(pe in ne.key!==void 0&&(Ee=""+ne.key),ne)ae.call(ne,pe)&&pe!=="key"&&pe!=="__self"&&pe!=="__source"&&(Te[pe]=ne[pe]);var Oe=arguments.length-2;if(Oe===1)Te.children=oe;else if(1<Oe){for(var me=Array(Oe),ye=0;ye<Oe;ye++)me[ye]=arguments[ye+2];Te.children=me}if(A&&A.defaultProps)for(pe in Oe=A.defaultProps,Oe)Te[pe]===void 0&&(Te[pe]=Oe[pe]);return N(A,Ee,Te)},Me.createRef=function(){return{current:null}},Me.forwardRef=function(A){return{$$typeof:f,render:A}},Me.isValidElement=W,Me.lazy=function(A){return{$$typeof:g,_payload:{_status:-1,_result:A},_init:fe}},Me.memo=function(A,ne){return{$$typeof:p,type:A,compare:ne===void 0?null:ne}},Me.startTransition=Ie,Me.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},Me.use=function(A){return $.H.use(A)},Me.useActionState=function(A,ne,oe){return $.H.useActionState(A,ne,oe)},Me.useCallback=function(A,ne){return $.H.useCallback(A,ne)},Me.useContext=function(A){return $.H.useContext(A)},Me.useDebugValue=function(){},Me.useDeferredValue=function(A,ne){return $.H.useDeferredValue(A,ne)},Me.useEffect=function(A,ne){return $.H.useEffect(A,ne)},Me.useEffectEvent=function(A){return $.H.useEffectEvent(A)},Me.useId=function(){return $.H.useId()},Me.useImperativeHandle=function(A,ne,oe){return $.H.useImperativeHandle(A,ne,oe)},Me.useInsertionEffect=function(A,ne){return $.H.useInsertionEffect(A,ne)},Me.useLayoutEffect=function(A,ne){return $.H.useLayoutEffect(A,ne)},Me.useMemo=function(A,ne){return $.H.useMemo(A,ne)},Me.useOptimistic=function(A,ne){return $.H.useOptimistic(A,ne)},Me.useReducer=function(A,ne,oe){return $.H.useReducer(A,ne,oe)},Me.useRef=function(A){return $.H.useRef(A)},Me.useState=function(A){return $.H.useState(A)},Me.useSyncExternalStore=function(A,ne,oe){return $.H.useSyncExternalStore(A,ne,oe)},Me.useTransition=function(){return $.H.useTransition()},Me.version="19.3.0",Me}var m3;function fp(){return m3||(m3=1,h1.exports=q9()),h1.exports}var Y=fp();const Y9=Jl(Y),$9=vh({__proto__:null,default:Y9},[Y]);var f1={exports:{}},to={},d1={exports:{}},p1={};var _3;function K9(){return _3||(_3=1,(function(e){function t(B,ee){var U=B.length;B.push(ee);e:for(;0<U;){var fe=U-1>>>1,k=B[fe];if(0<a(k,ee))B[fe]=ee,B[U]=k,U=fe;else break e}}function n(B){return B.length===0?null:B[0]}function s(B){if(B.length===0)return null;var ee=B[0],U=B.pop();if(U!==ee){B[0]=U;e:for(var fe=0,k=B.length,Ie=k>>>1;fe<Ie;){var We=2*(fe+1)-1,O=B[We],A=We+1,ne=B[A];if(0>a(O,U))A<k&&0>a(ne,O)?(B[fe]=ne,B[A]=U,fe=A):(B[fe]=O,B[We]=U,fe=We);else if(A<k&&0>a(ne,U))B[fe]=ne,B[A]=U,fe=A;else break e}}return ee}function a(B,ee){var U=B.sortIndex-ee.sortIndex;return U!==0?U:B.id-ee.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var m=[],p=[],g=1,_=null,v=3,b=!1,w=!1,C=!1,E=!1,D=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function Z(B){for(var ee=n(p);ee!==null;){if(ee.callback===null)s(p);else if(ee.startTime<=B)s(p),ee.sortIndex=ee.expirationTime,t(m,ee);else break;ee=n(p)}}function se(B){if(C=!1,Z(B),!w)if(n(m)!==null)w=!0,z||(z=!0,W());else{var ee=n(p);ee!==null&&P(se,ee.startTime-B)}}var z=!1,T=-1,$=5,ae=-1;function N(){return E?!0:!(e.unstable_now()-ae<$)}function J(){if(E=!1,z){var B=e.unstable_now();ae=B;var ee=!0;try{e:{w=!1,C&&(C=!1,K(T),T=-1),b=!0;var U=v;try{t:{for(Z(B),_=n(m);_!==null&&!(_.expirationTime>B&&N());){var fe=_.callback;if(typeof fe=="function"){_.callback=null,v=_.priorityLevel;var k=fe(_.expirationTime<=B);if(B=e.unstable_now(),typeof k=="function"){_.callback=k,Z(B),ee=!0;break t}_===n(m)&&s(m),Z(B)}else s(m);_=n(m)}if(_!==null)ee=!0;else{var Ie=n(p);Ie!==null&&P(se,Ie.startTime-B),ee=!1}}break e}finally{_=null,v=U,b=!1}ee=void 0}}finally{ee?W():z=!1}}}var W;if(typeof V=="function")W=function(){V(J)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,Q=G.port2;G.port1.onmessage=J,W=function(){Q.postMessage(null)}}else W=function(){D(J,0)};function P(B,ee){T=D(function(){B(e.unstable_now())},ee)}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(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(B){switch(v){case 1:case 2:case 3:var ee=3;break;default:ee=v}var U=v;v=ee;try{return B()}finally{v=U}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(B,ee){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var U=v;v=B;try{return ee()}finally{v=U}},e.unstable_scheduleCallback=function(B,ee,U){var fe=e.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?fe+U:fe):U=fe,B){case 1:var k=-1;break;case 2:k=250;break;case 5:k=1073741823;break;case 4:k=1e4;break;default:k=5e3}return k=U+k,B={id:g++,callback:ee,priorityLevel:B,startTime:U,expirationTime:k,sortIndex:-1},U>fe?(B.sortIndex=U,t(p,B),n(m)===null&&B===n(p)&&(C?(K(T),T=-1):C=!0,P(se,U-fe))):(B.sortIndex=k,t(m,B),w||b||(w=!0,z||(z=!0,W()))),B},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(B){var ee=v;return function(){var U=v;v=ee;try{return B.apply(this,arguments)}finally{v=U}}}})(p1)),p1}var g3;function W9(){return g3||(g3=1,d1.exports=K9()),d1.exports}var m1={exports:{}},Qt={};var v3;function G9(){if(v3)return Qt;v3=1;var e=fp();function t(g){var _="https://react.dev/errors/"+g;if(1<arguments.length){_+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)_+="&args[]="+encodeURIComponent(arguments[v])}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},a=Symbol.for("react.portal"),u=Symbol.for("react.recoverable"),c=Symbol.for("react.optimistic_key");function f(g,_,v){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:b==null?null:b===c?c:""+b,children:g,containerInfo:_,implementation:v}}var m=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(g,_){if(g==="font")return"";if(typeof _=="string")return _==="use-credentials"?_:""}return Qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,Qt.browser=function(g){return{$$typeof:u,_reason:g}},Qt.createPortal=function(g,_){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_||_.nodeType!==1&&_.nodeType!==9&&_.nodeType!==11)throw Error(t(299));return f(g,_,null,v)},Qt.flushSync=function(g){var _=m.T,v=s.p;try{if(m.T=null,s.p=2,g)return g()}finally{m.T=_,s.p=v,s.d.f()}},Qt.preconnect=function(g,_){typeof g=="string"&&(_?(_=_.crossOrigin,_=typeof _=="string"?_==="use-credentials"?_:"":void 0):_=null,s.d.C(g,_))},Qt.prefetchDNS=function(g){typeof g=="string"&&s.d.D(g)},Qt.preinit=function(g,_){if(typeof g=="string"&&_&&typeof _.as=="string"){var v=_.as,b=p(v,_.crossOrigin),w=typeof _.integrity=="string"?_.integrity:void 0,C=typeof _.fetchPriority=="string"?_.fetchPriority:void 0;v==="style"?s.d.S(g,typeof _.precedence=="string"?_.precedence:void 0,{crossOrigin:b,integrity:w,fetchPriority:C}):v==="script"&&s.d.X(g,{crossOrigin:b,integrity:w,fetchPriority:C,nonce:typeof _.nonce=="string"?_.nonce:void 0})}},Qt.preinitModule=function(g,_){if(typeof g=="string")if(typeof _=="object"&&_!==null){if(_.as==null||_.as==="script"){var v=p(_.as,_.crossOrigin);s.d.M(g,{crossOrigin:v,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)},Qt.preload=function(g,_){if(typeof g=="string"&&typeof _=="object"&&_!==null&&typeof _.as=="string"){var v=_.as,b=p(v,_.crossOrigin);s.d.L(g,v,{crossOrigin:b,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})}},Qt.preloadModule=function(g,_){if(typeof g=="string")if(_){var v=p(_.as,_.crossOrigin);s.d.m(g,{as:typeof _.as=="string"&&_.as!=="script"?_.as:void 0,crossOrigin:v,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)},Qt.requestFormReset=function(g){s.d.r(g)},Qt.unstable_batchedUpdates=function(g,_){return g(_)},Qt.useFormState=function(g,_,v){return m.H.useFormState(g,_,v)},Qt.useFormStatus=function(){return m.H.useHostTransitionStatus()},Qt.version="19.3.0",Qt}var y3;function L4(){if(y3)return m1.exports;y3=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(),m1.exports=G9(),m1.exports}var S3;function X9(){if(S3)return to;S3=1;var e=W9(),t=fp(),n=L4();function s(i){var r="https://react.dev/errors/"+i;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)r+="&args[]="+encodeURIComponent(arguments[l])}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 a(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function u(i){for(var r=i,l=r;l&&!l.alternate;)r=l,(r.flags&4098)!==0&&(i=r.return),l=r.return;for(;r.return;)r=r.return;return r.tag===3?i:null}function c(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 f(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 m(i){if(u(i)!==i)throw Error(s(188))}function p(i){var r=i.alternate;if(!r){if(r=u(i),r===null)throw Error(s(188));return r!==i?null:i}for(var l=i,o=r;;){var h=l.return;if(h===null)break;var d=h.alternate;if(d===null){if(o=h.return,o!==null){l=o;continue}break}if(h.child===d.child){for(d=h.child;d;){if(d===l)return m(h),i;if(d===o)return m(h),r;d=d.sibling}throw Error(s(188))}if(l.return!==o.return)l=h,o=d;else{for(var S=!1,x=h.child;x;){if(x===l){S=!0,l=h,o=d;break}if(x===o){S=!0,o=h,l=d;break}x=x.sibling}if(!S){for(x=d.child;x;){if(x===l){S=!0,l=d,o=h;break}if(x===o){S=!0,o=d,l=h;break}x=x.sibling}if(!S)throw Error(s(189))}}if(l.alternate!==o)throw Error(s(190))}if(l.tag!==3)throw Error(s(188));return l.stateNode.current===l?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,l,o,h,d){for(;i!==null;){if((i.tag===5||i.tag===27||i.tag===6)&&l(i,o,h,d)||(i.tag!==22||i.memoizedState===null)&&(r||i.tag!==5&&i.tag!==27)&&_(i.child,r,l,o,h,d))return!0;i=i.sibling}return!1}function v(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 b(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],l=v(i);return l===null||C(r,i,l.child,{foundSelf:!1}),r}function C(i,r,l,o){for(;l!==null;){if(l===r)o.foundSelf=!0;else if(l.tag===5||l.tag===27||l.tag===6){if(o.foundSelf)return i[1]=l,!0;i[0]=l}else if((l.tag!==22||l.memoizedState===null)&&C(i,r,l.child,o))return!0;l=l.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 D=null,K=null;function V(i,r,l){return i===l?!0:i===r?(D=i,!0):!1}function Z(i,r,l){return i===l?(K=i,!1):i===r?(K!==null&&(D=i),!0):!1}function se(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 z(i,r,l){for(var o=0,h=i;h;h=l(h))o++;h=0;for(var d=r;d;d=l(d))h++;for(;0<o-h;)i=l(i),o--;for(;0<h-o;)r=l(r),h--;for(;o--;){if(i===r||r!==null&&i===r.alternate)return i;i=l(i),r=l(r)}return null}var T=Object.assign,$=Symbol.for("react.element"),ae=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),J=Symbol.for("react.fragment"),W=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),P=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),fe=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),Ie=Symbol.for("react.activity"),We=Symbol.for("react.legacy_hidden"),O=Symbol.for("react.memo_cache_sentinel"),A=Symbol.for("react.view_transition"),ne=Symbol.for("react.recoverable"),oe=Symbol.iterator;function pe(i){return i===null||typeof i!="object"?null:(i=oe&&i[oe]||i["@@iterator"],typeof i=="function"?i:null)}var Te=Symbol.for("react.client.reference");function Ee(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===Te?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case J:return"Fragment";case G:return"Profiler";case W:return"StrictMode";case ee:return"Suspense";case U:return"SuspenseList";case Ie:return"Activity";case A:return"ViewTransition"}if(typeof i=="object")switch(i.$$typeof){case N:return"Portal";case P:return i.displayName||"Context";case Q:return(i._context.displayName||"Context")+".Consumer";case B:var r=i.render;return i=i.displayName,i||(i=r.displayName||r.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case fe:return r=i.displayName||null,r!==null?r:Ee(i.type)||"Memo";case k:r=i._payload,i=i._init;try{return Ee(i(r))}catch{}}return null}var Oe=Array.isArray,me=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ye=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ze={pending:!1,data:null,method:null,action:null},Hn=[],hr=-1;function ki(i){return{current:i}}function St(i){0>hr||(i.current=Hn[hr],Hn[hr]=null,hr--)}function Xe(i,r){hr++,Hn[hr]=i.current,i.current=r}var Fi=ki(null),fr=ki(null),ln=ki(null),$s=ki(null);function Ks(i,r){switch(Xe(ln,r),Xe(fr,i),Xe(Fi,null),r.nodeType){case 9:case 11:i=(i=r.documentElement)&&(i=i.namespaceURI)?bv(i):0;break;default:if(i=r.tagName,r=r.namespaceURI)r=bv(r),i=wv(r,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}St(Fi),Xe(Fi,i)}function dr(){St(Fi),St(fr),St(ln)}function la(i){var r=i.memoizedState;r!==null&&(Nl._currentValue=r.memoizedState,Xe($s,i)),r=Fi.current;var l=wv(r,i.type);r!==l&&(Xe(fr,i),Xe(Fi,l))}function Ws(i){fr.current===i&&(St(Fi),St(fr)),$s.current===i&&(St($s),Nl._currentValue=ze)}var X,ue;function we(i){if(X===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);X=r&&r[1]||"",ue=-1<l.stack.indexOf(`
3
- at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
4
- `+X+i+ue}var Ae=!1;function Lt(i,r){if(!i||Ae)return"";Ae=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(r){var ie=function(){throw Error()};if(Object.defineProperty(ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ie,[])}catch(he){var L=he}Reflect.construct(i,[],ie)}else{try{ie.call()}catch(he){L=he}ie=!1;try{var F=Object.getOwnPropertyDescriptor(i.prototype,"props");Object.defineProperty(i.prototype,"props",{configurable:!0,set:function(){throw Error()}}),ie=!0,new i}finally{ie&&(F!==void 0?Object.defineProperty(i.prototype,"props",F):delete i.prototype.props)}}}else{try{throw Error()}catch(he){L=he}(ie=i())&&typeof ie.catch=="function"&&ie.catch(function(){})}}catch(he){if(he&&L&&typeof he.stack=="string")return[he.stack,L.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=o.DetermineComponentFrameRoot(),S=d[0],x=d[1];if(S&&x){var M=S.split(`
5
- `),H=x.split(`
6
- `);for(h=o=0;o<M.length&&!M[o].includes("DetermineComponentFrameRoot");)o++;for(;h<H.length&&!H[h].includes("DetermineComponentFrameRoot");)h++;if(o===M.length||h===H.length)for(o=M.length-1,h=H.length-1;1<=o&&0<=h&&M[o]!==H[h];)h--;for(;1<=o&&0<=h;o--,h--)if(M[o]!==H[h]){if(o!==1||h!==1)do if(o--,h--,0>h||M[o]!==H[h]){var q=`
7
- `+M[o].replace(" at new "," at ");return i.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",i.displayName)),q}while(1<=o&&0<=h);break}}}finally{Ae=!1,Error.prepareStackTrace=l}return(l=i?i.displayName||i.name:"")?we(l):""}function it(i,r){switch(i.tag){case 26:case 27:case 5:return we(i.type);case 16:return we("Lazy");case 13:return i.child!==r&&r!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return Lt(i.type,!1);case 11:return Lt(i.type.render,!1);case 1:return Lt(i.type,!0);case 31:return we("Activity");case 30:return we("ViewTransition");default:return""}}function qt(i){try{var r="",l=null;do r+=it(i,l),l=i,i=i.return;while(i);return r}catch(o){return`
8
- Error generating stack: `+o.message+`
9
- `+o.stack}}var mi=Object.prototype.hasOwnProperty,In=e.unstable_scheduleCallback,Pn=e.unstable_cancelCallback,is=e.unstable_shouldYield,Qo=e.unstable_requestPaint,Yt=e.unstable_now,si=e.unstable_getCurrentPriorityLevel,Fn=e.unstable_ImmediatePriority,Ui=e.unstable_UserBlockingPriority,Jo=e.unstable_NormalPriority,W8=e.unstable_LowPriority,$m=e.unstable_IdlePriority,G8=e.log,X8=e.unstable_setDisableYieldValue,aa=null,Ti=null;function pr(i){if(typeof G8=="function"&&X8(i),Ti&&typeof Ti.setStrictMode=="function")try{Ti.setStrictMode(aa,i)}catch{}}var Mi=Math.clz32?Math.clz32:J8,Z8=Math.log,Q8=Math.LN2;function J8(i){return i>>>=0,i===0?32:31-(Z8(i)/Q8|0)|0}var eu=256,tu=262144,iu=4194304;function ns(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 nu(i,r,l){var o=i.pendingLanes;if(o===0)return 0;var h=0,d=i.suspendedLanes,S=i.pingedLanes;i=i.warmLanes;var x=o&134217727;return x!==0?(o=x&~d,o!==0?h=ns(o):(S&=x,S!==0?h=ns(S):l||(l=x&~i,l!==0&&(h=ns(l))))):(x=o&~d,x!==0?h=ns(x):S!==0?h=ns(S):l||(l=o&~i,l!==0&&(h=ns(l)))),h===0?0:r!==0&&r!==h&&(r&d)===0&&(d=h&-h,l=r&-r,d>=l||d===32&&(l&4194048)!==0)?r:h}function oa(i,r){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&r)===0}function Km(i,r){(r&8)!==0&&(r|=r&32);var l=i.entangledLanes;if(l!==0)for(i=i.entanglements,l&=r;0<l;){var o=31-Mi(l),h=1<<o;r|=i[o],l&=~h}return r}function eb(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 Wm(){var i=iu;return iu<<=1,(iu&62914560)===0&&(iu=4194304),i}function Bh(i){for(var r=[],l=0;31>l;l++)r.push(i);return r}function ua(i,r){i.pendingLanes|=r,r!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function tb(i,r,l,o,h,d){var S=i.pendingLanes;i.pendingLanes=l,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=l,i.entangledLanes&=l,i.errorRecoveryDisabledLanes&=l,i.shellSuspendCounter=0;var x=i.entanglements,M=i.expirationTimes,H=i.hiddenUpdates;for(l=S&~l;0<l;){var q=31-Mi(l),ie=1<<q;x[q]=0,M[q]=-1;var L=H[q];if(L!==null)for(H[q]=null,q=0;q<L.length;q++){var F=L[q];F!==null&&(F.lane&=-536870913)}l&=~ie}o!==0&&Gm(i,o,0),d!==0&&h===0&&i.tag!==0&&(i.suspendedLanes|=d&~(S&~r))}function Gm(i,r,l){i.pendingLanes|=r,i.suspendedLanes&=~r;var o=31-Mi(r);i.entangledLanes|=r,i.entanglements[o]=i.entanglements[o]|1073741824|l&261930}function Xm(i,r){var l=i.entangledLanes|=r;for(i=i.entanglements;l;){var o=31-Mi(l),h=1<<o;h&r|i[o]&r&&(i[o]|=r),l&=~h}}function Zm(i,r){var l=r&-r;return l=(l&42)!==0?1:jh(l),(l&(i.suspendedLanes|r))!==0?0:l}function jh(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 Hh(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function Qm(){var i=ye.p;return i!==0?i:(i=window.event,i===void 0?32:s3(i.type))}function Jm(i,r){var l=ye.p;try{return ye.p=i,r()}finally{ye.p=l}}var Un=Math.random().toString(36).slice(2),$t="__reactFiber$"+Un,_i="__reactProps$"+Un,Gs="__reactContainer$"+Un,e_="__reactEvents$"+Un,ib="__reactListeners$"+Un,nb="__reactHandles$"+Un,t_="__reactResources$"+Un,ca="__reactMarker$"+Un,ru="__reactLoad$"+Un;function su(i){delete i[$t],delete i[_i],delete i[ib],delete i[nb]}function rs(i){var r;if(r=i[$t])return r;for(var l=i.parentNode;l;){if(r=l[Gs]||l[$t]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(i=Iv(i);i!==null;){if(l=i[$t])return l;i=Iv(i)}return r}i=l,l=i.parentNode}return null}function Xs(i){if(i=i[$t]||i[Gs]){var r=i.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return i}return null}function ha(i){var r=i.tag;if(r===5||r===26||r===27||r===6)return i.stateNode;throw Error(s(33))}function Zs(i){var r=i[t_];return r||(r=i[t_]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function zt(i){i[ca]=!0}function i_(i){i[ru]=void 0}var n_=new Set,r_={};function ss(i,r){Qs(i,r),Qs(i+"Capture",r)}function Qs(i,r){for(r_[i]=r,i=0;i<r.length;i++)n_.add(r[i])}var rb=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]*$"),s_={},l_={};function sb(i){return mi.call(l_,i)?!0:mi.call(s_,i)?!1:rb.test(i)?l_[i]=!0:(s_[i]=!0,!1)}var Ye=!1;function a_(){var i=Ye;return Ye=!1,i}function lu(i,r,l){if(sb(r))if(l===null)i.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":i.removeAttribute(r);return;case"boolean":var o=r.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){i.removeAttribute(r);return}}i.setAttribute(r,l)}}function au(i,r,l){if(l===null)i.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(r);return}i.setAttribute(r,l)}}function Vn(i,r,l,o){if(o===null)i.removeAttribute(l);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(l);return}i.setAttributeNS(r,l,o)}}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 o_(i){var r=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function lb(i,r,l){var o=Object.getOwnPropertyDescriptor(i.constructor.prototype,r);if(!i.hasOwnProperty(r)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var h=o.get,d=o.set;return Object.defineProperty(i,r,{configurable:!0,get:function(){return h.call(this)},set:function(S){l=""+S,d.call(this,S)}}),Object.defineProperty(i,r,{enumerable:o.enumerable}),{getValue:function(){return l},setValue:function(S){l=""+S},stopTracking:function(){i._valueTracker=null,delete i[r]}}}}function Ih(i){if(!i._valueTracker){var r=o_(i)?"checked":"value";i._valueTracker=lb(i,r,""+i[r])}}function u_(i){if(!i)return!1;var r=i._valueTracker;if(!r)return!0;var l=r.getValue(),o="";return i&&(o=o_(i)?i.checked?"true":"false":i.value),i=o,i!==l?(r.setValue(i),!0):!1}var ab=/[\n"\\]/g;function Vi(i){return i.replace(ab,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Ph(i,r,l,o,h,d,S,x){i.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?i.type=S:i.removeAttribute("type"),r!=null?S==="number"?(r===0&&i.value===""||i.value!=r)&&(i.value=""+Di(r)):i.value!==""+Di(r)&&(i.value=""+Di(r)):S!=="submit"&&S!=="reset"||i.removeAttribute("value"),r!=null?S==="number"&&i.value==r?Fh(i,Di(i.value)):Fh(i,Di(r)):l!=null?Fh(i,Di(l)):o!=null&&i.removeAttribute("value"),h==null&&d!=null&&(i.defaultChecked=!!d),h!=null&&(i.checked=h&&typeof h!="function"&&typeof h!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?i.name=""+Di(x):i.removeAttribute("name")}function c_(i,r,l,o,h,d,S,x){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(i.type=d),r!=null||l!=null){if(!(d!=="submit"&&d!=="reset"||r!=null)){Ih(i);return}l=l!=null?""+Di(l):"",r=r!=null?""+Di(r):l,x||r===i.value||(i.value=r),i.defaultValue=r}o=o??h,o=typeof o!="function"&&typeof o!="symbol"&&!!o,i.checked=x?i.checked:!!o,i.defaultChecked=!!o,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(i.name=S),Ih(i)}function Fh(i,r){i.defaultValue!==""+r&&(i.defaultValue=""+r)}function Js(i,r,l,o){if(i=i.options,r){r={};for(var h=0;h<l.length;h++)r["$"+l[h]]=!0;for(l=0;l<i.length;l++)h=r.hasOwnProperty("$"+i[l].value),i[l].selected!==h&&(i[l].selected=h),h&&o&&(i[l].defaultSelected=!0)}else{for(l=""+Di(l),r=null,h=0;h<i.length;h++){if(i[h].value===l){i[h].selected=!0,o&&(i[h].defaultSelected=!0);return}r!==null||i[h].disabled||(r=i[h])}r!==null&&(r.selected=!0)}}function h_(i,r,l){if(r!=null&&(r=""+Di(r),r!==i.value&&(i.value=r),l==null)){i.defaultValue!==r&&(i.defaultValue=r);return}i.defaultValue=l!=null?""+Di(l):""}function f_(i,r,l,o){if(r==null){if(o!=null){if(l!=null)throw Error(s(92));if(Oe(o)){if(1<o.length)throw Error(s(93));o=o[0]}l=o}l==null&&(l=""),r=l}l=Di(r),i.defaultValue=l,o=i.textContent,o===l&&o!==""&&o!==null&&(i.value=o),Ih(i)}function el(i,r){if(r){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=r;return}}i.textContent=r}var ob=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 d_(i,r,l){var o=r.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?o?i.setProperty(r,""):r==="float"?i.cssFloat="":i[r]="":o?i.setProperty(r,l):typeof l!="number"||l===0||ob.has(r)?r==="float"?i.cssFloat=l:i[r]=(""+l).trim():i[r]=l+"px"}function p_(i,r,l){if(r!=null&&typeof r!="object")throw Error(s(62));if(i=i.style,l!=null){for(var o in l)!l.hasOwnProperty(o)||r!=null&&r.hasOwnProperty(o)||(o.indexOf("--")===0?i.setProperty(o,""):o==="float"?i.cssFloat="":i[o]="",Ye=!0);for(var h in r)o=r[h],r.hasOwnProperty(h)&&l[h]!==o&&(d_(i,h,o),Ye=!0)}else for(var d in r)r.hasOwnProperty(d)&&d_(i,d,r[d])}function Uh(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 ub=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"]]),cb=/^[\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 ou(i){return cb.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function _n(){}var Vh=null;function qh(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var tl=null,il=null;function m_(i){var r=Xs(i);if(r&&(i=r.stateNode)){var l=i[_i]||null;e:switch(i=r.stateNode,r.type){case"input":if(Ph(i,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),r=l.name,l.type==="radio"&&r!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Vi(""+r)+'"][type="radio"]'),r=0;r<l.length;r++){var o=l[r];if(o!==i&&o.form===i.form){var h=o[_i]||null;if(!h)throw Error(s(90));Ph(o,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(r=0;r<l.length;r++)o=l[r],o.form===i.form&&u_(o)}break e;case"textarea":h_(i,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&Js(i,!!l.multiple,r,!1)}}}var Yh=!1;function __(i,r,l){if(Yh)return i(r,l);Yh=!0;try{var o=i(r);return o}finally{if(Yh=!1,(tl!==null||il!==null)&&(oc(),tl&&(r=tl,i=il,il=tl=null,m_(r),i)))for(r=0;r<i.length;r++)m_(i[r])}}function fa(i,r){var l=i.stateNode;if(l===null)return null;var o=l[_i]||null;if(o===null)return null;l=o[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":(o=!o.disabled)||(i=i.type,o=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!o;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(s(231,r,typeof l));return l}var qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$h=!1;if(qn)try{var da={};Object.defineProperty(da,"passive",{get:function(){$h=!0}}),window.addEventListener("test",da,da),window.removeEventListener("test",da,da)}catch{$h=!1}var mr=null,Kh=null,uu=null;function g_(){if(uu)return uu;var i,r=Kh,l=r.length,o,h="value"in mr?mr.value:mr.textContent,d=h.length;for(i=0;i<l&&r[i]===h[i];i++);var S=l-i;for(o=1;o<=S&&r[l-o]===h[d-o];o++);return uu=h.slice(i,1<o?1-o:void 0)}function cu(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 hu(){return!0}function v_(){return!1}function li(i){function r(l,o,h,d,S){this._reactName=l,this._targetInst=h,this.type=o,this.nativeEvent=d,this.target=S,this.currentTarget=null;for(var x in i)i.hasOwnProperty(x)&&(l=i[x],this[x]=l?l(d):d[x]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?hu:v_,this.isPropagationStopped=v_,this}return T(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=hu)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=hu)},persist:function(){},isPersistent:hu}),r}var _r={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fu=li(_r),pa=T({},_r,{view:0,detail:0}),hb=li(pa),Wh,Gh,ma,du=T({},pa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zh,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!==ma&&(ma&&i.type==="mousemove"?(Wh=i.screenX-ma.screenX,Gh=i.screenY-ma.screenY):Gh=Wh=0,ma=i),Wh)},movementY:function(i){return"movementY"in i?i.movementY:Gh}}),y_=li(du),fb=T({},du,{dataTransfer:0}),db=li(fb),pb=T({},pa,{relatedTarget:0}),Xh=li(pb),mb=T({},_r,{animationName:0,elapsedTime:0,pseudoElement:0}),_b=li(mb),gb=T({},_r,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),vb=li(gb),yb=T({},_r,{data:0}),S_=li(yb),Sb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bb={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"},wb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xb(i){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(i):(i=wb[i])?!!r[i]:!1}function Zh(){return xb}var Cb=T({},pa,{key:function(i){if(i.key){var r=Sb[i.key]||i.key;if(r!=="Unidentified")return r}return i.type==="keypress"?(i=cu(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?bb[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zh,charCode:function(i){return i.type==="keypress"?cu(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?cu(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),Eb=li(Cb),kb=T({},du,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),b_=li(kb),Tb=T({},_r,{submitter:0}),Mb=li(Tb),Db=T({},pa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zh}),Ab=li(Db),Ob=T({},_r,{propertyName:0,elapsedTime:0,pseudoElement:0}),Rb=li(Ob),Lb=T({},du,{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}),zb=li(Lb),Nb=T({},_r,{newState:0,oldState:0,source:0}),Bb=li(Nb),jb=[9,13,27,32],Qh=qn&&"CompositionEvent"in window,_a=null;qn&&"documentMode"in document&&(_a=document.documentMode);var Hb=qn&&"TextEvent"in window&&!_a,w_=qn&&(!Qh||_a&&8<_a&&11>=_a),x_=" ",C_=!1;function E_(i,r){switch(i){case"keyup":return jb.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function k_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var nl=!1;function Ib(i,r){switch(i){case"compositionend":return k_(r);case"keypress":return r.which!==32?null:(C_=!0,x_);case"textInput":return i=r.data,i===x_&&C_?null:i;default:return null}}function Pb(i,r){if(nl)return i==="compositionend"||!Qh&&E_(i,r)?(i=g_(),uu=Kh=mr=null,nl=!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 w_&&r.locale!=="ko"?null:r.data;default:return null}}var Fb={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 T_(i){var r=i&&i.nodeName&&i.nodeName.toLowerCase();return r==="input"?!!Fb[i.type]:r==="textarea"}function M_(i,r,l,o){tl?il?il.push(o):il=[o]:tl=o,r=pc(r,"onChange"),0<r.length&&(l=new fu("onChange","change",null,l,o),i.push({event:l,listeners:r}))}var ga=null,va=null;function Ub(i){mv(i,0)}function pu(i){var r=ha(i);if(u_(r))return i}function D_(i,r){if(i==="change")return r}var A_=!1;if(qn){var Jh;if(qn){var ef="oninput"in document;if(!ef){var O_=document.createElement("div");O_.setAttribute("oninput","return;"),ef=typeof O_.oninput=="function"}Jh=ef}else Jh=!1;A_=Jh&&(!document.documentMode||9<document.documentMode)}function R_(){ga&&(ga.detachEvent("onpropertychange",L_),va=ga=null)}function L_(i){if(i.propertyName==="value"&&pu(va)){var r=[];M_(r,va,i,qh(i)),__(Ub,r)}}function Vb(i,r,l){i==="focusin"?(R_(),ga=r,va=l,ga.attachEvent("onpropertychange",L_)):i==="focusout"&&R_()}function qb(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return pu(va)}function Yb(i,r){if(i==="click")return pu(r)}function $b(i,r){if(i==="input"||i==="change")return pu(r)}function Kb(i,r){return i===r&&(i!==0||1/i===1/r)||i!==i&&r!==r}var Ai=typeof Object.is=="function"?Object.is:Kb;function ya(i,r){if(Ai(i,r))return!0;if(typeof i!="object"||i===null||typeof r!="object"||r===null)return!1;var l=Object.keys(i),o=Object.keys(r);if(l.length!==o.length)return!1;for(o=0;o<l.length;o++){var h=l[o];if(!mi.call(r,h)||!Ai(i[h],r[h]))return!1}return!0}function tf(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 z_(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function N_(i,r){var l=z_(i);i=0;for(var o;l;){if(l.nodeType===3){if(o=i+l.textContent.length,i<=r&&o>=r)return{node:l,offset:r-i};i=o}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=z_(l)}}function B_(i,r){return i&&r?i===r?!0:i&&i.nodeType===3?!1:r&&r.nodeType===3?B_(i,r.parentNode):"contains"in i?i.contains(r):i.compareDocumentPosition?!!(i.compareDocumentPosition(r)&16):!1:!1}function j_(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var r=tf(i.document);r instanceof i.HTMLIFrameElement;){try{var l=typeof r.contentWindow.location.href=="string"}catch{l=!1}if(l)i=r.contentWindow;else break;r=tf(i.document)}return r}function nf(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 Wb=qn&&"documentMode"in document&&11>=document.documentMode,rl=null,rf=null,Sa=null,sf=!1;function H_(i,r,l){var o=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;sf||rl==null||rl!==tf(o)||(o=rl,"selectionStart"in o&&nf(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Sa&&ya(Sa,o)||(Sa=o,o=pc(rf,"onSelect"),0<o.length&&(r=new fu("onSelect","select",null,r,l),i.push({event:r,listeners:o}),r.target=rl)))}function ls(i,r){var l={};return l[i.toLowerCase()]=r.toLowerCase(),l["Webkit"+i]="webkit"+r,l["Moz"+i]="moz"+r,l}var sl={animationend:ls("Animation","AnimationEnd"),animationiteration:ls("Animation","AnimationIteration"),animationstart:ls("Animation","AnimationStart"),transitionrun:ls("Transition","TransitionRun"),transitionstart:ls("Transition","TransitionStart"),transitioncancel:ls("Transition","TransitionCancel"),transitionend:ls("Transition","TransitionEnd")},lf={},I_={};qn&&(I_=document.createElement("div").style,"AnimationEvent"in window||(delete sl.animationend.animation,delete sl.animationiteration.animation,delete sl.animationstart.animation),"TransitionEvent"in window||delete sl.transitionend.transition);function as(i){if(lf[i])return lf[i];if(!sl[i])return i;var r=sl[i],l;for(l in r)if(r.hasOwnProperty(l)&&l in I_)return lf[i]=r[l];return i}var P_=as("animationend"),F_=as("animationiteration"),U_=as("animationstart"),Gb=as("transitionrun"),Xb=as("transitionstart"),Zb=as("transitioncancel"),V_=as("transitionend"),q_=new Map,af="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(" ");af.push("scrollEnd");function an(i,r){q_.set(i,r),ss(r,[i])}var Qb=0;function Yn(i,r){if(i.name!=null&&i.name!=="auto")return i.name;if(r.autoName!==null)return r.autoName;i=hn.identifierPrefix;var l=Qb++;return i="_"+i+"t_"+l.toString(32)+"_",r.autoName=i}function Y_(i){if(i==null||typeof i=="string")return i;var r=null,l=El;if(l!==null)for(var o=0;o<l.length;o++){var h=i[l[o]];if(h!=null){if(h==="none")return"none";r=r==null?h:r+(" "+h)}}return r??i.default}function $n(i,r){return i=Y_(i),r=Y_(r),r==null?i==="auto"?null:i:r==="auto"?null:r}var mu=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)},qi=[],ll=0,of=0;function _u(){for(var i=ll,r=of=ll=0;r<i;){var l=qi[r];qi[r++]=null;var o=qi[r];qi[r++]=null;var h=qi[r];qi[r++]=null;var d=qi[r];if(qi[r++]=null,o!==null&&h!==null){var S=o.pending;S===null?h.next=h:(h.next=S.next,S.next=h),o.pending=h}d!==0&&$_(l,h,d)}}function gu(i,r,l,o){qi[ll++]=i,qi[ll++]=r,qi[ll++]=l,qi[ll++]=o,of|=o,i.lanes|=o,i=i.alternate,i!==null&&(i.lanes|=o)}function uf(i,r,l,o){return gu(i,r,l,o),vu(i)}function os(i,r){return gu(i,null,null,r),vu(i)}function $_(i,r,l){i.lanes|=l;var o=i.alternate;o!==null&&(o.lanes|=l);for(var h=!1,d=i.return;d!==null;)d.childLanes|=l,o=d.alternate,o!==null&&(o.childLanes|=l),d.tag===22&&(i=d.stateNode,i===null||i._visibility&1||(h=!0)),i=d,d=d.return;return i.tag===3?(d=i.stateNode,h&&r!==null&&(h=31-Mi(l),i=d.hiddenUpdates,o=i[h],o===null?i[h]=[r]:o.push(r),r.lane=l|536870912),d):null}function vu(i){if(50<Ua)throw Ua=0,ac=null,Error(s(185));for(var r=i.return;r!==null;)i=r,r=i.return;return i.tag===3?i.stateNode:null}var al={};function Jb(i,r,l,o){this.tag=i,this.key=l,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=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gi(i,r,l,o){return new Jb(i,r,l,o)}function cf(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Kn(i,r){var l=i.alternate;return l===null?(l=gi(i.tag,r,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=r,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&1206910976,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,r=i.dependencies,l.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l.refCleanup=i.refCleanup,l}function K_(i,r){i.flags&=1206910978;var l=i.alternate;return l===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=l.childLanes,i.lanes=l.lanes,i.child=l.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=l.memoizedProps,i.memoizedState=l.memoizedState,i.updateQueue=l.updateQueue,i.type=l.type,r=l.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),i}function yu(i,r,l,o,h,d){var S=0;if(o=i,typeof o=="function")cf(o)&&(S=1);else if(typeof o=="string")S=T9(i,l,Fi.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(o){case Ie:return i=gi(31,l,r,h),i.elementType=Ie,i.lanes=d,i;case J:return us(l.children,h,d,r);case W:S=8,h|=24;break;case G:return i=gi(12,l,r,h|2),i.elementType=G,i.lanes=d,i;case ee:return i=gi(13,l,r,h),i.elementType=ee,i.lanes=d,i;case U:return i=gi(19,l,r,h),i.elementType=U,i.lanes=d,i;case We:case A:return i=h|32,i=gi(30,l,r,i),i.elementType=A,i.lanes=d,i.stateNode={autoName:null,paired:null,clones:null,ref:null},i;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case P:S=10;break e;case Q:S=9;break e;case B:S=11;break e;case fe:S=14;break e;case k:S=16,o=null;break e}S=29,l=Error(s(130,i===null?"null":typeof i,"")),o=null}return r=gi(S,l,r,h),r.elementType=i,r.type=o,r.lanes=d,r}function us(i,r,l,o){return i=gi(7,i,o,r),i.lanes=l,i}function hf(i,r,l){return i=gi(6,i,null,r),i.lanes=l,i}function W_(i){var r=gi(18,null,null,0);return r.stateNode=i,r}function ff(i,r,l){return r=gi(4,i.children!==null?i.children:[],i.key,r),r.lanes=l,r.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},r}var G_=new WeakMap;function Yi(i,r){if(typeof i=="object"&&i!==null){var l=G_.get(i);return l!==void 0?l:(r={value:i,source:r,stack:qt(r)},G_.set(i,r),r)}return{value:i,source:r,stack:qt(r)}}var ol=[],ul=0,Su=null,ba=0,$i=[],Ki=0,gr=null,gn=1,vn="";function Wn(i,r){ol[ul++]=ba,ol[ul++]=Su,Su=i,ba=r}function X_(i,r,l){$i[Ki++]=gn,$i[Ki++]=vn,$i[Ki++]=gr,gr=i;var o=gn;i=vn;var h=32-Mi(o)-1;o&=~(1<<h),l+=1;var d=32-Mi(r)+h;if(30<d){var S=h-h%5;d=(o&(1<<S)-1).toString(32),o>>=S,h-=S,gn=1<<32-Mi(r)+h|l<<h|o,vn=d+i}else gn=1<<d|l<<h|o,vn=i}function bu(i){i.return!==null&&(Wn(i,1),X_(i,1,0))}function df(i){for(;i===Su;)Su=ol[--ul],ol[ul]=null,ba=ol[--ul],ol[ul]=null;for(;i===gr;)gr=$i[--Ki],$i[Ki]=null,vn=$i[--Ki],$i[Ki]=null,gn=$i[--Ki],$i[Ki]=null}function Z_(i,r){$i[Ki++]=gn,$i[Ki++]=vn,$i[Ki++]=gr,gn=r.id,vn=r.overflow,gr=i}var Nt=null,lt=null,Ne=!1,vr=null,Wi=!1,pf=Error(s(519));function yr(i){var r=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw wa(Yi(r,i)),pf}function Q_(i){var r=i.stateNode,l=i.type,o=i.memoizedProps;switch(r[$t]=i,r[_i]=o,l){case"dialog":Fe("cancel",r),Fe("close",r);break;case"iframe":case"object":case"embed":Fe("load",r);break;case"video":case"audio":for(l=0;l<qa.length;l++)Fe(qa[l],r);break;case"source":Fe("error",r);break;case"img":case"image":case"link":Fe("error",r),Fe("load",r);break;case"details":Fe("toggle",r);break;case"input":Fe("invalid",r),c_(r,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Fe("invalid",r);break;case"textarea":Fe("invalid",r),f_(r,o.value,o.defaultValue,o.children)}l=o.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||r.textContent===""+l||o.suppressHydrationWarning===!0||yv(r.textContent,l)?(o.popover!=null&&(Fe("beforetoggle",r),Fe("toggle",r)),o.onScroll!=null&&Fe("scroll",r),o.onScrollEnd!=null&&Fe("scrollend",r),o.onClick!=null&&(r.onclick=_n),r=!0):r=!1,r||yr(i,!0)}function wu(i){for(Nt=i.return;Nt;)switch(Nt.tag){case 5:case 31:case 13:Wi=!1;return;case 27:case 3:Wi=!0;return;default:Nt=Nt.return}}function cl(i){if(i!==Nt)return!1;if(!Ne)return wu(i),Ne=!0,!1;var r=i.tag,l;if((l=r!==3&&r!==27)&&((l=r===5)&&(l=i.type,l=!(l!=="form"&&l!=="button")||qd(i.type,i.memoizedProps)),l=!l),l&&lt&&yr(i),wu(i),r===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(s(317));lt=Hv(i)}else if(r===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(s(317));lt=Hv(i)}else r===27?(r=lt,Nr(i.type)?(i=Jd,Jd=null,lt=i):lt=r):lt=Nt?Xi(i.stateNode.nextSibling):null;return!0}function cs(){lt=Nt=null,Ne=!1}function mf(){var i=vr;return i!==null&&(Si===null?Si=i:Si.push.apply(Si,i),vr=null),i}function wa(i){vr===null?vr=[i]:vr.push(i)}var _f=ki(null),hs=null,Gn=null;function Sr(i,r,l){Xe(_f,r._currentValue),r._currentValue=l}function Xn(i){i._currentValue=_f.current,St(_f)}function xu(i,r,l){for(;i!==null;){var o=i.alternate;if((i.childLanes&r)!==r?(i.childLanes|=r,o!==null&&(o.childLanes|=r)):o!==null&&(o.childLanes&r)!==r&&(o.childLanes|=r),i===l)break;i=i.return}}function gf(i,r,l,o){var h=i.child;for(h!==null&&(h.return=i);h!==null;){var d=h.dependencies;if(d!==null){var S=h.child;d=d.firstContext;e:for(;d!==null;){var x=d;d=h;for(var M=0;M<r.length;M++)if(x.context===r[M]){d.lanes|=l,x=d.alternate,x!==null&&(x.lanes|=l),xu(d.return,l,i),o||(S=null);break e}d=x.next}}else if(h.tag===18){if(S=h.return,S===null)throw Error(s(341));S.lanes|=l,d=S.alternate,d!==null&&(d.lanes|=l),xu(S,l,i),S=null}else h.tag===13&&h.memoizedState!==null&&h.memoizedState.dehydrated===null?(h.lanes|=l,S=h.alternate,S!==null&&(S.lanes|=l),xu(h.return,l,i),S=h.child,S=S!==null?S.sibling:null):S=h.child;if(S!==null)S.return=h;else for(S=h;S!==null;){if(S===i){S=null;break}if(h=S.sibling,h!==null){h.return=S.return,S=h;break}S=S.return}h=S}}function fs(i,r,l,o){i=null;for(var h=r,d=!1;h!==null;){if(!d){if((h.flags&524288)!==0)d=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var S=h.alternate;if(S===null)throw Error(s(387));if(S=S.memoizedProps,S!==null){var x=h.type;Ai(h.pendingProps.value,S.value)||(i!==null?i.push(x):i=[x])}}else if(h===$s.current){if(S=h.alternate,S===null)throw Error(s(387));S.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(i!==null?i.push(Nl):i=[Nl])}h=h.return}return i!==null&&gf(r,i,l,o),r.flags|=262144,i!==null}function Cu(i){for(i=i.firstContext;i!==null;){if(!Ai(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function ds(i){hs=i,Gn=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Kt(i){return J_(hs,i)}function Eu(i,r){return hs===null&&ds(i),J_(i,r)}function J_(i,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},Gn===null){if(i===null)throw Error(s(308));Gn=r,i.dependencies={lanes:0,firstContext:r},i.flags|=524288}else Gn=Gn.next=r;return l}var e7=typeof AbortController<"u"?AbortController:function(){var i=[],r=this.signal={aborted:!1,addEventListener:function(l,o){i.push(o)}};this.abort=function(){r.aborted=!0,i.forEach(function(l){return l()})}},t7=e.unstable_scheduleCallback,i7=e.unstable_NormalPriority,bt={$$typeof:P,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vf(){return{controller:new e7,data:new Map,refCount:0}}function xa(i){i.refCount--,i.refCount===0&&t7(i7,function(){i.controller.abort()})}function eg(i,r){if((i.pendingLanes&4194048)!==0){var l=i.transitionTypes;for(l===null&&(l=i.transitionTypes=[]),i=0;i<r.length;i++){var o=r[i];l.indexOf(o)===-1&&l.push(o)}}}var Ca=null;function n7(i){var r=i.transitionTypes;return i.transitionTypes=null,r}var Ea=null,yf=0,ps=0,hl=null;function r7(i,r){if(Ea===null){var l=Ea=[];yf=0,ps=Nd(),hl={status:"pending",value:void 0,then:function(o){l.push(o)}}}return yf++,r.then(tg,tg),r}function tg(){if(--yf===0&&(Ca=null,Ea!==null)){hl!==null&&(hl.status="fulfilled");var i=Ea;Ea=null,ps=0,hl=null;for(var r=0;r<i.length;r++)(0,i[r])()}}function s7(i,r){var l=[],o={status:"pending",value:null,reason:null,then:function(h){l.push(h)}};return i.then(function(){o.status="fulfilled",o.value=r;for(var h=0;h<l.length;h++)(0,l[h])(r)},function(h){for(o.status="rejected",o.reason=h,h=0;h<l.length;h++)(0,l[h])(void 0)}),o}var ig=me.S;me.S=function(i,r){if(W2=Yt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r7(i,r),Ca!==null)for(var l=Dl;l!==null;)eg(l,Ca),l=l.next;if(l=i.types,l!==null){for(var o=Dl;o!==null;)eg(o,l),o=o.next;if(ps!==0){o=Ca,o===null&&(o=Ca=[]);for(var h=0;h<l.length;h++){var d=l[h];o.indexOf(d)===-1&&o.push(d)}}}ig!==null&&ig(i,r)};var ms=ki(null);function Sf(){var i=ms.current;return i!==null?i:nt.pooledCache}function ku(i,r){r===null?Xe(ms,ms.current):Xe(ms,r.pool)}function ng(){var i=Sf();return i===null?null:{parent:bt._currentValue,pool:i}}var fl=Error(s(460)),bf=Error(s(474)),Tu=Error(s(542)),Mu={then:function(){}};function rg(i){return i=i.status,i==="fulfilled"||i==="rejected"}function sg(i,r,l){switch(l=i[l],l===void 0?i.push(r):l!==r&&(r.then(_n,_n),r=l),r.status){case"fulfilled":return r.value;case"rejected":throw i=r.reason,ag(i),i===void 0&&!("reason"in r)?Error(s(600)):i;default:if(typeof r.status=="string")r.then(_n,_n);else{if(i=nt,i!==null&&100<i.shellSuspendCounter)throw Error(s(482));i=r,i.status="pending",i.then(function(o){if(r.status==="pending"){var h=r;h.status="fulfilled",h.value=o}},function(o){if(r.status==="pending"){var h=r;h.status="rejected",h.reason=o}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw i=r.reason,ag(i),i}throw gs=r,fl}}function _s(i){try{var r=i._init;return r(i._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(gs=l,fl):l}}var gs=null;function lg(){if(gs===null)throw Error(s(459));var i=gs;return gs=null,i}function ag(i){if(i===fl||i===Tu)throw Error(s(483))}var dl=null,ka=0;function Du(i){var r=ka;return ka+=1,dl===null&&(dl=[]),sg(dl,i,r)}function br(i,r){r=r.props.ref,i.ref=r!==void 0?r:null}function Au(i,r){throw r.$$typeof===$?Error(s(525)):(i=Object.prototype.toString.call(r),Error(s(31,i==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":i)))}function og(i){function r(j,R){if(i){var I=j.deletions;I===null?(j.deletions=[R],j.flags|=16):I.push(R)}}function l(j,R){if(!i)return null;for(;R!==null;)r(j,R),R=R.sibling;return null}function o(j){for(var R=new Map;j!==null;)j.key===null?R.set(j.index,j):R.set(j.key,j),j=j.sibling;return R}function h(j,R){return j=Kn(j,R),j.index=0,j.sibling=null,j}function d(j,R,I){return j.index=I,i?(I=j.alternate,I!==null?(I=I.index,I<R?(j.flags|=2,R):I):(j.flags|=134217730,R)):(j.flags|=1048576,R)}function S(j){return i&&j.alternate===null&&(j.flags|=134217730),j}function x(j,R,I,te){return R===null||R.tag!==6?(R=hf(I,j.mode,te),R.return=j,R):(R=h(R,I),R.return=j,R)}function M(j,R,I,te){var _e=I.type;return _e===J?(j=q(j,R,I.props.children,te,I.key),br(j,I),j):R!==null&&(R.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===k&&_s(_e)===R.type)?(R=h(R,I.props),br(R,I),R.return=j,R):(R=yu(I.type,I.key,I.props,null,j.mode,te),br(R,I),R.return=j,R)}function H(j,R,I,te){return R===null||R.tag!==4||R.stateNode.containerInfo!==I.containerInfo||R.stateNode.implementation!==I.implementation?(R=ff(I,j.mode,te),R.return=j,R):(R=h(R,I.children||[]),R.return=j,R)}function q(j,R,I,te,_e){return R===null||R.tag!==7?(R=us(I,j.mode,te,_e),R.return=j,R):(R=h(R,I),R.return=j,R)}function ie(j,R,I){if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return R=hf(""+R,j.mode,I),R.return=j,R;if(typeof R=="object"&&R!==null){switch(R.$$typeof){case ae:return I=yu(R.type,R.key,R.props,null,j.mode,I),br(I,R),I.return=j,I;case N:return R=ff(R,j.mode,I),R.return=j,R;case k:return R=_s(R),ie(j,R,I)}if(Oe(R)||pe(R))return R=us(R,j.mode,I,null),R.return=j,R;if(typeof R.then=="function")return ie(j,Du(R),I);if(R.$$typeof===P)return ie(j,Eu(j,R),I);Au(j,R)}return null}function L(j,R,I,te){var _e=R!==null?R.key:null;if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return _e!==null?null:x(j,R,""+I,te);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case ae:return I.key===_e?M(j,R,I,te):null;case N:return I.key===_e?H(j,R,I,te):null;case k:return I=_s(I),L(j,R,I,te)}if(Oe(I)||pe(I))return _e!==null?null:q(j,R,I,te,null);if(typeof I.then=="function")return L(j,R,Du(I),te);if(I.$$typeof===P)return L(j,R,Eu(j,I),te);Au(j,I)}return null}function F(j,R,I,te,_e){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return j=j.get(I)||null,x(R,j,""+te,_e);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case ae:return j=j.get(te.key===null?I:te.key)||null,M(R,j,te,_e);case N:return j=j.get(te.key===null?I:te.key)||null,H(R,j,te,_e);case k:return te=_s(te),F(j,R,I,te,_e)}if(Oe(te)||pe(te))return j=j.get(I)||null,q(R,j,te,_e,null);if(typeof te.then=="function")return F(j,R,I,Du(te),_e);if(te.$$typeof===P)return F(j,R,I,Eu(R,te),_e);Au(R,te)}return null}function he(j,R,I,te){for(var _e=null,Ve=null,Se=R,Ce=R=0,Ct=null;Se!==null&&Ce<I.length;Ce++){Se.index>Ce?(Ct=Se,Se=null):Ct=Se.sibling;var qe=L(j,Se,I[Ce],te);if(qe===null){Se===null&&(Se=Ct);break}i&&Se&&qe.alternate===null&&r(j,Se),R=d(qe,R,Ce),Ve===null?_e=qe:Ve.sibling=qe,Ve=qe,Se=Ct}if(Ce===I.length)return l(j,Se),Ne&&Wn(j,Ce),_e;if(Se===null){for(;Ce<I.length;Ce++)Se=ie(j,I[Ce],te),Se!==null&&(R=d(Se,R,Ce),Ve===null?_e=Se:Ve.sibling=Se,Ve=Se);return Ne&&Wn(j,Ce),_e}for(Se=o(Se);Ce<I.length;Ce++)Ct=F(Se,j,Ce,I[Ce],te),Ct!==null&&(i&&(qe=Ct.alternate,qe!==null&&Se.delete(qe.key===null?Ce:qe.key)),R=d(Ct,R,Ce),Ve===null?_e=Ct:Ve.sibling=Ct,Ve=Ct);return i&&Se.forEach(function(Pr){return r(j,Pr)}),Ne&&Wn(j,Ce),_e}function ve(j,R,I,te){if(I==null)throw Error(s(151));for(var _e=null,Ve=null,Se=R,Ce=R=0,Ct=null,qe=I.next();Se!==null&&!qe.done;Ce++,qe=I.next()){Se.index>Ce?(Ct=Se,Se=null):Ct=Se.sibling;var Pr=L(j,Se,qe.value,te);if(Pr===null){Se===null&&(Se=Ct);break}i&&Se&&Pr.alternate===null&&r(j,Se),R=d(Pr,R,Ce),Ve===null?_e=Pr:Ve.sibling=Pr,Ve=Pr,Se=Ct}if(qe.done)return l(j,Se),Ne&&Wn(j,Ce),_e;if(Se===null){for(;!qe.done;Ce++,qe=I.next())qe=ie(j,qe.value,te),qe!==null&&(R=d(qe,R,Ce),Ve===null?_e=qe:Ve.sibling=qe,Ve=qe);return Ne&&Wn(j,Ce),_e}for(Se=o(Se);!qe.done;Ce++,qe=I.next())qe=F(Se,j,Ce,qe.value,te),qe!==null&&(i&&(Ct=qe.alternate,Ct!==null&&Se.delete(Ct.key===null?Ce:Ct.key)),R=d(qe,R,Ce),Ve===null?_e=qe:Ve.sibling=qe,Ve=qe);return i&&Se.forEach(function(I9){return r(j,I9)}),Ne&&Wn(j,Ce),_e}function Le(j,R,I,te){if(typeof I=="object"&&I!==null&&I.type===J&&I.key===null&&I.props.ref===void 0&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case ae:e:{for(var _e=I.key;R!==null;){if(R.key===_e){if(_e=I.type,_e===J){if(R.tag===7){l(j,R.sibling),te=h(R,I.props.children),br(te,I),te.return=j,j=te;break e}}else if(R.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===k&&_s(_e)===R.type){l(j,R.sibling),te=h(R,I.props),br(te,I),te.return=j,j=te;break e}l(j,R);break}else r(j,R);R=R.sibling}I.type===J?(te=us(I.props.children,j.mode,te,I.key),br(te,I),te.return=j,j=te):(te=yu(I.type,I.key,I.props,null,j.mode,te),br(te,I),te.return=j,j=te)}return S(j);case N:e:{for(_e=I.key;R!==null;){if(R.key===_e)if(R.tag===4&&R.stateNode.containerInfo===I.containerInfo&&R.stateNode.implementation===I.implementation){l(j,R.sibling),te=h(R,I.children||[]),te.return=j,j=te;break e}else{l(j,R);break}else r(j,R);R=R.sibling}te=ff(I,j.mode,te),te.return=j,j=te}return S(j);case k:return I=_s(I),Le(j,R,I,te)}if(Oe(I))return he(j,R,I,te);if(pe(I)){if(_e=pe(I),typeof _e!="function")throw Error(s(150));return I=_e.call(I),ve(j,R,I,te)}if(typeof I.then=="function")return Le(j,R,Du(I),te);if(I.$$typeof===P)return Le(j,R,Eu(j,I),te);Au(j,I)}return typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint"?(I=""+I,R!==null&&R.tag===6?(l(j,R.sibling),te=h(R,I),te.return=j,j=te):(l(j,R),te=hf(I,j.mode,te),te.return=j,j=te),S(j)):l(j,R)}return function(j,R,I,te){try{ka=0;var _e=Le(j,R,I,te);return dl=null,_e}catch(Se){if(Se===fl||Se===Tu)throw Se;var Ve=gi(29,Se,null,j.mode);return Ve.lanes=te,Ve.return=j,Ve}}}var vs=og(!0),ug=og(!1),wr=!1;function wf(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function xf(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 xr(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Cr(i,r,l){var o=i.updateQueue;if(o===null)return null;if(o=o.shared,(Ke&2)!==0){var h=o.pending;return h===null?r.next=r:(r.next=h.next,h.next=r),o.pending=r,r=vu(i),$_(i,null,l),r}return gu(i,o,r,l),vu(i)}function Ta(i,r,l){if(r=r.updateQueue,r!==null&&(r=r.shared,(l&4194048)!==0)){var o=r.lanes;o&=i.pendingLanes,l|=o,r.lanes=l,Xm(i,l)}}function Cf(i,r){var l=i.updateQueue,o=i.alternate;if(o!==null&&(o=o.updateQueue,l===o)){var h=null,d=null;if(l=l.firstBaseUpdate,l!==null){do{var S={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};d===null?h=d=S:d=d.next=S,l=l.next}while(l!==null);d===null?h=d=r:d=d.next=r}else h=d=r;l={baseState:o.baseState,firstBaseUpdate:h,lastBaseUpdate:d,shared:o.shared,callbacks:o.callbacks},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=r:i.next=r,l.lastBaseUpdate=r}var Ef=!1;function Ma(){if(Ef){var i=hl;if(i!==null)throw i}}function Da(i,r,l,o){Ef=!1;var h=i.updateQueue;wr=!1;var d=h.firstBaseUpdate,S=h.lastBaseUpdate,x=h.shared.pending;if(x!==null){h.shared.pending=null;var M=x,H=M.next;M.next=null,S===null?d=H:S.next=H,S=M;var q=i.alternate;q!==null&&(q=q.updateQueue,x=q.lastBaseUpdate,x!==S&&(x===null?q.firstBaseUpdate=H:x.next=H,q.lastBaseUpdate=M))}if(d!==null){var ie=h.baseState;S=0,q=H=M=null,x=d;do{var L=x.lane&-536870913,F=L!==x.lane;if(F?(Ue&L)===L:(o&L)===L){L!==0&&L===ps&&(Ef=!0),q!==null&&(q=q.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var he=i,ve=x;L=r;var Le=l;switch(ve.tag){case 1:if(he=ve.payload,typeof he=="function"){ie=he.call(Le,ie,L);break e}ie=he;break e;case 3:he.flags=he.flags&-65537|128;case 0:if(he=ve.payload,L=typeof he=="function"?he.call(Le,ie,L):he,L==null)break e;ie=T({},ie,L);break e;case 2:wr=!0}}L=x.callback,L!==null&&(i.flags|=64,F&&(i.flags|=8192),F=h.callbacks,F===null?h.callbacks=[L]:F.push(L))}else F={lane:L,tag:x.tag,payload:x.payload,callback:x.callback,next:null},q===null?(H=q=F,M=ie):q=q.next=F,S|=L;if(x=x.next,x===null){if(x=h.shared.pending,x===null)break;F=x,x=F.next,F.next=null,h.lastBaseUpdate=F,h.shared.pending=null}}while(!0);q===null&&(M=ie),h.baseState=M,h.firstBaseUpdate=H,h.lastBaseUpdate=q,d===null&&(h.shared.lanes=0),Or|=S,i.lanes=S,i.memoizedState=ie}}function cg(i,r){if(typeof i!="function")throw Error(s(191,i));i.call(r)}function hg(i,r){var l=i.callbacks;if(l!==null)for(i.callbacks=null,i=0;i<l.length;i++)cg(l[i],r)}var Er=ki(null),Ou=ki(0);function fg(i,r){i=tr,Xe(Ou,i),Xe(Er,r),tr=i|r.baseLanes}function kf(){Xe(Ou,tr),Xe(Er,Er.current)}function Tf(){tr=Ou.current,St(Er),St(Ou)}var Wt=ki(null),ti=null;function kr(i){var r=i.alternate;Xe(Gt,Gt.current&1),Xe(Wt,i),ti===null&&(r===null||Er.current!==null||r.memoizedState!==null)&&(ti=i)}function Mf(i){Xe(Gt,Gt.current),Xe(Wt,i),ti===null&&(ti=i)}function dg(i){i.tag===22?(Xe(Gt,Gt.current),Xe(Wt,i),ti===null&&(ti=i)):Tr()}function Tr(){Xe(Gt,Gt.current),Xe(Wt,Wt.current)}function Oi(i){St(Wt),ti===i&&(ti=null),St(Gt)}var Gt=ki(0);function Aa(i,r){Xe(Wt,Wt.current),Xe(Gt,r)}function Df(i){St(Gt),St(Wt),ti===i&&(ti=null)}function Ru(i){for(var r=i;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Zd(l)||Qd(l)))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 Zn=0,Re=null,et=null,wt=null,Lu=!1,pl=!1,ys=!1,zu=0,Oa=0,ml=null,l7=0;function pt(){throw Error(s(321))}function Af(i,r){if(r===null)return!1;for(var l=0;l<r.length&&l<i.length;l++)if(!Ai(i[l],r[l]))return!1;return!0}function Of(i,r,l,o,h,d){return Zn=d,Re=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,me.H=i===null||i.memoizedState===null?Xg:Zg,ys=!1,d=l(o,h),ys=!1,pl&&(d=mg(r,l,o,h)),pg(i),d}function pg(i){me.H=Fu;var r=et!==null&&et.next!==null;if(Zn=0,wt=et=Re=null,Lu=!1,Oa=0,ml=null,r)throw Error(s(300));i===null||xt||(i=i.dependencies,i!==null&&Cu(i)&&(xt=!0))}function mg(i,r,l,o){Re=i;var h=0;do{if(pl&&(ml=null),Oa=0,pl=!1,25<=h)throw Error(s(301));if(h+=1,wt=et=null,i.updateQueue!=null){var d=i.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}me.H=p7,d=r(l,o)}while(pl);return d}function a7(){var i=me.H,r=i.useState()[0];return r=typeof r.then=="function"?Ra(r):r,i=i.useState()[0],(et!==null?et.memoizedState:null)!==i&&(Re.flags|=1024),r}function Rf(){var i=zu!==0;return zu=0,i}function Lf(i,r,l){r.updateQueue=i.updateQueue,r.flags&=-2053,i.lanes&=~l}function zf(i){if(Lu){for(i=i.memoizedState;i!==null;){var r=i.queue;r!==null&&(r.pending=null),i=i.next}Lu=!1}Zn=0,wt=et=Re=null,pl=!1,Oa=zu=0,ml=null}function ai(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?Re.memoizedState=wt=i:wt=wt.next=i,wt}function vt(){if(et===null){var i=Re.alternate;i=i!==null?i.memoizedState:null}else i=et.next;var r=wt===null?Re.memoizedState:wt.next;if(r!==null)wt=r,et=i;else{if(i===null)throw Re.alternate===null?Error(s(467)):Error(s(310));et=i,i={memoizedState:et.memoizedState,baseState:et.baseState,baseQueue:et.baseQueue,queue:et.queue,next:null},wt===null?Re.memoizedState=wt=i:wt=wt.next=i}return wt}function Nu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ra(i){var r=Oa;return Oa+=1,ml===null&&(ml=[]),i=sg(ml,i,r),r=Re,(wt===null?r.memoizedState:wt.next)===null&&(r=r.alternate,me.H=r===null||r.memoizedState===null?Xg:Zg),i}function Bu(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Ra(i);if(i.$$typeof===ne)return;if(i.$$typeof===P)return Kt(i)}throw Error(s(438,String(i)))}function Nf(i){var r=null,l=Re.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var o=Re.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(r={data:o.data.map(function(h){return h.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=Nu(),Re.updateQueue=l),l.memoCache=r,l=r.data[r.index],l===void 0)for(l=r.data[r.index]=Array(i),o=0;o<i;o++)l[o]=O;return r.index++,l}function Qn(i,r){return typeof r=="function"?r(i):r}function ju(i){var r=vt();return Bf(r,et,i)}function Bf(i,r,l){var o=i.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=l;var h=i.baseQueue,d=o.pending;if(d!==null){if(h!==null){var S=h.next;h.next=d.next,d.next=S}r.baseQueue=h=d,o.pending=null}if(d=i.baseState,h===null)i.memoizedState=d;else{r=h.next;var x=S=null,M=null,H=r,q=!1;do{var ie=H.lane&-536870913;if(ie!==H.lane?(Ue&ie)===ie:(Zn&ie)===ie){var L=H.revertLane;if(L===0)M!==null&&(M=M.next={lane:0,revertLane:0,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),ie===ps&&(q=!0);else if((Zn&L)===L){H=H.next,L===ps&&(q=!0);continue}else ie={lane:0,revertLane:H.revertLane,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},M===null?(x=M=ie,S=d):M=M.next=ie,Re.lanes|=L,Or|=L;ie=H.action,ys&&l(d,ie),d=H.hasEagerState?H.eagerState:l(d,ie)}else L={lane:ie,revertLane:H.revertLane,gesture:H.gesture,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},M===null?(x=M=L,S=d):M=M.next=L,Re.lanes|=ie,Or|=ie;H=H.next}while(H!==null&&H!==r);if(M===null?S=d:M.next=x,!Ai(d,i.memoizedState)&&(xt=!0,q&&(l=hl,l!==null)))throw l;i.memoizedState=d,i.baseState=S,i.baseQueue=M,o.lastRenderedState=d}return h===null&&(o.lanes=0),[i.memoizedState,o.dispatch]}function jf(i){var r=vt(),l=r.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=i;var o=l.dispatch,h=l.pending,d=r.memoizedState;if(h!==null){l.pending=null;var S=h=h.next;do d=i(d,S.action),S=S.next;while(S!==h);Ai(d,r.memoizedState)||(xt=!0),r.memoizedState=d,r.baseQueue===null&&(r.baseState=d),l.lastRenderedState=d}return[d,o]}function _g(i,r,l){var o=Re,h=vt(),d=Ne;if(d){if(l===void 0)throw Error(s(407));l=l()}else l=r();var S=!Ai((et||h).memoizedState,l);if(S&&(h.memoizedState=l,xt=!0),h=h.queue,Pf(yg.bind(null,o,h,i),[i]),i=h.getSnapshot!==r||S||wt!==null&&(wt.memoizedState.tag&1)!==0,_l(i?9:8,{destroy:void 0},vg.bind(null,o,h,l,r),null),i){if(o.flags|=2048,nt===null)throw Error(s(349));d||(Zn&127)!==0||gg(o,r,l)}return l}function gg(i,r,l){i.flags|=16384,i={getSnapshot:r,value:l},r=Re.updateQueue,r===null?(r=Nu(),Re.updateQueue=r,r.stores=[i]):(l=r.stores,l===null?r.stores=[i]:l.push(i))}function vg(i,r,l,o){r.value=l,r.getSnapshot=o,Sg(r)&&bg(i)}function yg(i,r,l){return l(function(){Sg(r)&&bg(i)})}function Sg(i){var r=i.getSnapshot;i=i.value;try{var l=r();return!Ai(i,l)}catch{return!0}}function bg(i){var r=os(i,2);r!==null&&bi(r,i,2)}function Hf(i){var r=ai();if(typeof i=="function"){var l=i;if(i=l(),ys){pr(!0);try{l()}finally{pr(!1)}}}return r.memoizedState=r.baseState=i,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:i},r}function wg(i,r,l,o){return i.baseState=l,Bf(i,et,typeof o=="function"?o:Qn)}function o7(i,r,l,o,h){if(Pu(i))throw Error(s(485));if(i=r.action,i!==null){var d={payload:h,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){d.listeners.push(S)}};me.T!==null?l(!0):d.isTransition=!1,o(d),l=r.pending,l===null?(d.next=r.pending=d,xg(r,d)):(d.next=l.next,r.pending=l.next=d)}}function xg(i,r){var l=r.action,o=r.payload,h=i.state;if(r.isTransition){var d=me.T,S={};S.types=d!==null?d.types:null,me.T=S;try{var x=l(h,o),M=me.S;M!==null&&M(S,x),Cg(i,r,x)}catch(H){If(i,r,H)}finally{d!==null&&S.types!==null&&(d.types=S.types),me.T=d}}else try{d=l(h,o),Cg(i,r,d)}catch(H){If(i,r,H)}}function Cg(i,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(o){Eg(i,r,o)},function(o){return If(i,r,o)}):Eg(i,r,l)}function Eg(i,r,l){r.status="fulfilled",r.value=l,kg(r),i.state=l,r=i.pending,r!==null&&(l=r.next,l===r?i.pending=null:(l=l.next,r.next=l,xg(i,l)))}function If(i,r,l){var o=i.pending;if(i.pending=null,o!==null){o=o.next;do r.status="rejected",r.reason=l,kg(r),r=r.next;while(r!==o)}i.action=null}function kg(i){i=i.listeners;for(var r=0;r<i.length;r++)(0,i[r])()}function Tg(i,r){return r}function Mg(i,r){if(Ne){var l=nt.formState;if(l!==null){e:{var o=Re;if(Ne){if(lt){t:{for(var h=lt,d=Wi;h.nodeType!==8;){if(!d){h=null;break t}if(h=Xi(h.nextSibling),h===null){h=null;break t}}d=h.data,h=d==="F!"||d==="F"?h:null}if(h){lt=Xi(h.nextSibling),o=h.data==="F!";break e}}yr(o)}o=!1}o&&(r=l[0])}}return l=ai(),l.memoizedState=l.baseState=r,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tg,lastRenderedState:r},l.queue=o,l=Kg.bind(null,Re,o),o.dispatch=l,o=Hf(!1),d=Yf.bind(null,Re,!1,o.queue),o=ai(),h={state:r,dispatch:null,action:i,pending:null},o.queue=h,l=o7.bind(null,Re,h,d,l),h.dispatch=l,o.memoizedState=i,[r,l,!1]}function Dg(i){var r=vt();return Ag(r,et,i)}function Ag(i,r,l){if(r=Bf(i,r,Tg)[0],i=ju(Qn)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var o=Ra(r)}catch(S){throw S===fl?Tu:S}else o=r;r=vt();var h=r.queue,d=h.dispatch;return l!==r.memoizedState&&(Re.flags|=2048,_l(9,{destroy:void 0},u7.bind(null,h,l),null)),[o,d,i]}function u7(i,r){i.action=r}function Og(i){var r=vt(),l=et;if(l!==null)return Ag(r,l,i);vt(),r=r.memoizedState,l=vt();var o=l.queue.dispatch;return l.memoizedState=i,[r,o,!1]}function _l(i,r,l,o){return i={tag:i,create:l,deps:o,inst:r,next:null},r=Re.updateQueue,r===null&&(r=Nu(),Re.updateQueue=r),l=r.lastEffect,l===null?r.lastEffect=i.next=i:(o=l.next,l.next=i,i.next=o,r.lastEffect=i),i}function Rg(){return vt().memoizedState}function Hu(i,r,l,o){var h=ai();Re.flags|=i,h.memoizedState=_l(1|r,{destroy:void 0},l,o===void 0?null:o)}function Iu(i,r,l,o){var h=vt();o=o===void 0?null:o;var d=h.memoizedState.inst;et!==null&&o!==null&&Af(o,et.memoizedState.deps)?h.memoizedState=_l(r,d,l,o):(Re.flags|=i,h.memoizedState=_l(1|r,d,l,o))}function Lg(i,r){Hu(8390656,8,i,r)}function Pf(i,r){Iu(2048,8,i,r)}function c7(i){Re.flags|=4;var r=Re.updateQueue;if(r===null)r=Nu(),Re.updateQueue=r,r.events=[i];else{var l=r.events;l===null?r.events=[i]:l.push(i)}}function zg(i){var r=vt().memoizedState;return c7({ref:r,nextImpl:i}),function(){if((Ke&2)!==0)throw Error(s(440));return r.impl.apply(void 0,arguments)}}function Ng(i,r){return Iu(4,2,i,r)}function Bg(i,r){return Iu(4,4,i,r)}function jg(i,r){if(typeof r=="function"){i=i();var l=r(i);return function(){typeof l=="function"?l():r(null)}}if(r!=null)return i=i(),r.current=i,function(){r.current=null}}function Hg(i,r,l){l=l!=null?l.concat([i]):null,Iu(4,4,jg.bind(null,r,i),l)}function Ff(){}function Ig(i,r){var l=vt();r=r===void 0?null:r;var o=l.memoizedState;return r!==null&&Af(r,o[1])?o[0]:(l.memoizedState=[i,r],i)}function Pg(i,r){var l=vt();r=r===void 0?null:r;var o=l.memoizedState;if(r!==null&&Af(r,o[1]))return o[0];if(o=i(),ys){pr(!0);try{i()}finally{pr(!1)}}return l.memoizedState=[o,r],o}function Uf(i,r,l){return l===void 0||(Zn&1073741824)!==0&&(Ue&261930)===0?i.memoizedState=r:(i.memoizedState=l,i=X2(),Re.lanes|=i,Or|=i,l)}function Fg(i,r,l,o){return Ai(l,r)?l:Er.current!==null?(i=Uf(i,l,o),Ai(i,r)||(xt=!0),i):(Zn&106)===0||(Zn&1073741824)!==0&&(Ue&261930)===0?(xt=!0,i.memoizedState=l):(i=X2(),Re.lanes|=i,Or|=i,r)}function Ug(i,r,l,o,h){var d=ye.p;ye.p=d!==0&&8>d?d:8;var S=me.T,x={};x.types=S!==null?S.types:null,me.T=x,Yf(i,!1,r,l);try{var M=h(),H=me.S;if(H!==null&&H(x,M),M!==null&&typeof M=="object"&&typeof M.then=="function"){var q=s7(M,o);La(i,r,q,Ni(i))}else La(i,r,o,Ni(i))}catch(ie){La(i,r,{then:function(){},status:"rejected",reason:ie},Ni())}finally{ye.p=d,S!==null&&x.types!==null&&(S.types=x.types),me.T=S}}function h7(){}function Vf(i,r,l,o){if(i.tag!==5)throw Error(s(476));var h=Vg(i).queue;Ug(i,h,r,ze,l===null?h7:function(){return qg(i),l(o)})}function Vg(i){var r=i.memoizedState;if(r!==null)return r;r={memoizedState:ze,baseState:ze,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:ze},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:l},next:null},i.memoizedState=r,i=i.alternate,i!==null&&(i.memoizedState=r),r}function qg(i){var r=Vg(i);r.next===null&&(r=i.alternate.memoizedState),La(i,r.next.queue,{},Ni())}function qf(){return Kt(Nl)}function Yg(){return vt().memoizedState}function $g(){return vt().memoizedState}function f7(i){for(var r=i.return;r!==null;){switch(r.tag){case 24:case 3:var l=Ni();i=xr(l);var o=Cr(r,i,l);o!==null&&(bi(o,r,l),Ta(o,r,l)),r={cache:vf()},i.payload=r;return}r=r.return}}function d7(i,r,l){var o=Ni();l={lane:o,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Pu(i)?Wg(r,l):(l=uf(i,r,l,o),l!==null&&(bi(l,i,o),Gg(l,r,o)))}function Kg(i,r,l){var o=Ni();La(i,r,l,o)}function La(i,r,l,o){var h={lane:o,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Pu(i))Wg(r,h);else{var d=i.alternate;if(i.lanes===0&&(d===null||d.lanes===0)&&(d=r.lastRenderedReducer,d!==null))try{var S=r.lastRenderedState,x=d(S,l);if(h.hasEagerState=!0,h.eagerState=x,Ai(x,S))return gu(i,r,h,0),nt===null&&_u(),!1}catch{}if(l=uf(i,r,h,o),l!==null)return bi(l,i,o),Gg(l,r,o),!0}return!1}function Yf(i,r,l,o){if(o={lane:2,revertLane:Nd(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Pu(i)){if(r)throw Error(s(479))}else r=uf(i,l,o,2),r!==null&&bi(r,i,2)}function Pu(i){var r=i.alternate;return i===Re||r!==null&&r===Re}function Wg(i,r){pl=Lu=!0;var l=i.pending;l===null?r.next=r:(r.next=l.next,l.next=r),i.pending=r}function Gg(i,r,l){if((l&4194048)!==0){var o=r.lanes;o&=i.pendingLanes,l|=o,r.lanes=l,Xm(i,l)}}var Fu={readContext:Kt,use:Bu,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useLayoutEffect:pt,useInsertionEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useSyncExternalStore:pt,useId:pt,useHostTransitionStatus:pt,useFormState:pt,useActionState:pt,useOptimistic:pt,useMemoCache:pt,useCacheRefresh:pt,useEffectEvent:pt},Xg={readContext:Kt,use:Bu,useCallback:function(i,r){return ai().memoizedState=[i,r===void 0?null:r],i},useContext:Kt,useEffect:Lg,useImperativeHandle:function(i,r,l){l=l!=null?l.concat([i]):null,Hu(4194308,4,jg.bind(null,r,i),l)},useLayoutEffect:function(i,r){return Hu(4194308,4,i,r)},useInsertionEffect:function(i,r){Hu(4,2,i,r)},useMemo:function(i,r){var l=ai();r=r===void 0?null:r;var o=i();if(ys){pr(!0);try{i()}finally{pr(!1)}}return l.memoizedState=[o,r],o},useReducer:function(i,r,l){var o=ai();if(l!==void 0){var h=l(r);if(ys){pr(!0);try{l(r)}finally{pr(!1)}}}else h=r;return o.memoizedState=o.baseState=h,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:h},o.queue=i,i=i.dispatch=d7.bind(null,Re,i),[o.memoizedState,i]},useRef:function(i){var r=ai();return i={current:i},r.memoizedState=i},useState:function(i){i=Hf(i);var r=i.queue,l=Kg.bind(null,Re,r);return r.dispatch=l,[i.memoizedState,l]},useDebugValue:Ff,useDeferredValue:function(i,r){var l=ai();return Uf(l,i,r)},useTransition:function(){var i=Hf(!1);return i=Ug.bind(null,Re,i.queue,!0,!1),ai().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,r,l){var o=Re,h=ai();if(Ne){if(l===void 0)throw Error(s(407));l=l()}else{if(l=r(),nt===null)throw Error(s(349));(Ue&127)!==0||gg(o,r,l)}h.memoizedState=l;var d={value:l,getSnapshot:r};return h.queue=d,Lg(yg.bind(null,o,d,i),[i]),o.flags|=2048,_l(9,{destroy:void 0},vg.bind(null,o,d,l,r),null),l},useId:function(){var i=ai(),r=nt.identifierPrefix;if(Ne){var l=vn,o=gn;l=(o&~(1<<32-Mi(o)-1)).toString(32)+l,r="_"+r+"R_"+l,l=zu++,0<l&&(r+="H"+l.toString(32)),r+="_"}else l=l7++,r="_"+r+"r_"+l.toString(32)+"_";return i.memoizedState=r},useHostTransitionStatus:qf,useFormState:Mg,useActionState:Mg,useOptimistic:function(i){var r=ai();r.memoizedState=r.baseState=i;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=l,r=Yf.bind(null,Re,!0,l),l.dispatch=r,[i,r]},useMemoCache:Nf,useCacheRefresh:function(){return ai().memoizedState=f7.bind(null,Re)},useEffectEvent:function(i){var r=ai(),l={impl:i};return r.memoizedState=l,function(){if((Ke&2)!==0)throw Error(s(440));return l.impl.apply(void 0,arguments)}}},Zg={readContext:Kt,use:Bu,useCallback:Ig,useContext:Kt,useEffect:Pf,useImperativeHandle:Hg,useInsertionEffect:Ng,useLayoutEffect:Bg,useMemo:Pg,useReducer:ju,useRef:Rg,useState:function(){return ju(Qn)},useDebugValue:Ff,useDeferredValue:function(i,r){var l=vt();return Fg(l,et.memoizedState,i,r)},useTransition:function(){var i=ju(Qn)[0],r=vt().memoizedState;return[typeof i=="boolean"?i:Ra(i),r]},useSyncExternalStore:_g,useId:Yg,useHostTransitionStatus:qf,useFormState:Dg,useActionState:Dg,useOptimistic:function(i,r){var l=vt();return wg(l,et,i,r)},useMemoCache:Nf,useCacheRefresh:$g,useEffectEvent:zg},p7={readContext:Kt,use:Bu,useCallback:Ig,useContext:Kt,useEffect:Pf,useImperativeHandle:Hg,useInsertionEffect:Ng,useLayoutEffect:Bg,useMemo:Pg,useReducer:jf,useRef:Rg,useState:function(){return jf(Qn)},useDebugValue:Ff,useDeferredValue:function(i,r){var l=vt();return et===null?Uf(l,i,r):Fg(l,et.memoizedState,i,r)},useTransition:function(){var i=jf(Qn)[0],r=vt().memoizedState;return[typeof i=="boolean"?i:Ra(i),r]},useSyncExternalStore:_g,useId:Yg,useHostTransitionStatus:qf,useFormState:Og,useActionState:Og,useOptimistic:function(i,r){var l=vt();return et!==null?wg(l,et,i,r):(l.baseState=i,[i,l.queue.dispatch])},useMemoCache:Nf,useCacheRefresh:$g,useEffectEvent:zg};function $f(i,r,l,o){r=i.memoizedState,l=l(o,r),l=l==null?r:T({},r,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var Kf={enqueueSetState:function(i,r,l){i=i._reactInternals;var o=Ni(),h=xr(o);h.payload=r,l!=null&&(h.callback=l),r=Cr(i,h,o),r!==null&&(bi(r,i,o),Ta(r,i,o))},enqueueReplaceState:function(i,r,l){i=i._reactInternals;var o=Ni(),h=xr(o);h.tag=1,h.payload=r,l!=null&&(h.callback=l),r=Cr(i,h,o),r!==null&&(bi(r,i,o),Ta(r,i,o))},enqueueForceUpdate:function(i,r){i=i._reactInternals;var l=Ni(),o=xr(l);o.tag=2,r!=null&&(o.callback=r),r=Cr(i,o,l),r!==null&&(bi(r,i,l),Ta(r,i,l))}};function Qg(i,r,l,o,h,d,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(o,d,S):r.prototype&&r.prototype.isPureReactComponent?!ya(l,o)||!ya(h,d):!0}function Jg(i,r,l,o){i=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(l,o),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(l,o),r.state!==i&&Kf.enqueueReplaceState(r,r.state,null)}function Ss(i,r){var l=r;if("ref"in r){l={};for(var o in r)o!=="ref"&&(l[o]=r[o])}if(i=i.defaultProps){l===r&&(l=T({},l));for(var h in i)l[h]===void 0&&(l[h]=i[h])}return l}function e2(i){mu(i)}function t2(i){console.error(i)}function i2(i){mu(i)}function Uu(i,r){try{var l=i.onUncaughtError;l(r.value,{componentStack:r.stack})}catch(o){setTimeout(function(){throw o})}}function n2(i,r,l){try{var o=i.onCaughtError;o(l.value,{componentStack:l.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function Wf(i,r,l){return l=xr(l),l.tag=3,l.payload={element:null},l.callback=function(){Uu(i,r)},l}function r2(i){return i=xr(i),i.tag=3,i}function s2(i,r,l,o){var h=l.type.getDerivedStateFromError;if(typeof h=="function"){var d=o.value;i.payload=function(){return h(d)},i.callback=function(){n2(r,l,o)}}var S=l.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(i.callback=function(){n2(r,l,o),typeof h!="function"&&(Rr===null?Rr=new Set([this]):Rr.add(this));var x=o.stack;this.componentDidCatch(o.value,{componentStack:x!==null?x:""})})}function m7(i,r,l,o,h){if(l.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(r=l.alternate,r!==null&&fs(r,l,h,!0),l=Wt.current,l!==null){switch(l.tag){case 31:case 13:case 19:return ti===null?uc():l.alternate===null&&mt===0&&(mt=3),l.flags&=-257,l.flags|=65536,l.lanes=h,o===Mu?l.flags|=16384:(r=l.updateQueue,r===null?l.updateQueue=new Set([o]):r.add(o),Rd(i,o,h)),!1;case 22:return l.flags|=65536,o===Mu?l.flags|=16384:(r=l.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([o])},l.updateQueue=r):(l=r.retryQueue,l===null?r.retryQueue=new Set([o]):l.add(o)),Rd(i,o,h)),!1}throw Error(s(435,l.tag))}return Rd(i,o,h),uc(),!1}if(Ne)return r=Wt.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=h,o!==pf&&(i=Error(s(422),{cause:o}),wa(Yi(i,l)))):(o!==pf&&(r=Error(s(423),{cause:o}),wa(Yi(r,l))),i=i.current.alternate,i.flags|=65536,h&=-h,i.lanes|=h,o=Yi(o,l),h=Wf(i.stateNode,o,h),Cf(i,h),mt!==4&&(mt=2)),!1;var d=Error(s(520),{cause:o});if(d=Yi(d,l),Fa===null?Fa=[d]:Fa.push(d),mt!==4&&(mt=2),r===null)return!0;o=Yi(o,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,i=h&-h,l.lanes|=i,i=Wf(l.stateNode,o,i),Cf(l,i),!1;case 1:if(r=l.type,d=l.stateNode,(l.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Rr===null||!Rr.has(d))))return l.flags|=65536,h&=-h,l.lanes|=h,h=r2(h),s2(h,i,l,o),Cf(l,h),!1;break;case 22:if(l.memoizedState!==null)return l.flags|=65536,!1}l=l.return}while(l!==null);return!1}var Gf=Error(s(461)),xt=!1;function Dt(i,r,l,o){r.child=i===null?ug(r,null,l,o):vs(r,i.child,l,o)}function l2(i,r,l,o,h){l=l.render;var d=r.ref;if("ref"in o){var S={};for(var x in o)x!=="ref"&&(S[x]=o[x])}else S=o;return ds(r),o=Of(i,r,l,S,d,h),x=Rf(),i!==null&&!xt?(Lf(i,r,h),Jn(i,r,h)):(Ne&&x&&bu(r),r.flags|=1,Dt(i,r,o,h),r.child)}function a2(i,r,l,o,h){if(i===null){var d=l.type;return typeof d=="function"&&!cf(d)&&d.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=d,o2(i,r,d,o,h)):(i=yu(l.type,null,o,r,r.mode,h),i.ref=r.ref,i.return=r,r.child=i)}if(d=i.child,!nd(i,h)){var S=d.memoizedProps;if(l=l.compare,l=l!==null?l:ya,l(S,o)&&i.ref===r.ref)return Jn(i,r,h)}return r.flags|=1,i=Kn(d,o),i.ref=r.ref,i.return=r,r.child=i}function o2(i,r,l,o,h){if(i!==null){var d=i.memoizedProps;if(ya(d,o)&&i.ref===r.ref)if(xt=!1,r.pendingProps=o=d,nd(i,h))(i.flags&131072)!==0&&(xt=!0);else return r.lanes=i.lanes,Jn(i,r,h)}return Xf(i,r,l,o,h)}function u2(i,r,l,o){var h=o.children,d=i!==null?i.memoizedState:null;if(i===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((r.flags&128)!==0){if(d=d!==null?d.baseLanes|l:l,i!==null){for(o=r.child=i.child,h=0;o!==null;)h=h|o.lanes|o.childLanes,o=o.sibling;o=h&~d}else o=0,r.child=null;return c2(i,r,d,l,o)}if((l&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},i!==null&&ku(r,d!==null?d.cachePool:null),d!==null?fg(r,d):kf(),dg(r);else return o=r.lanes=536870912,c2(i,r,d!==null?d.baseLanes|l:l,l,o)}else d!==null?(ku(r,d.cachePool),fg(r,d),Tr(),r.memoizedState=null):(i!==null&&ku(r,null),kf(),Tr());return Dt(i,r,h,l),r.child}function za(i,r){return i!==null&&i.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function c2(i,r,l,o,h){var d=Sf();return d=d===null?null:{parent:bt._currentValue,pool:d},r.memoizedState={baseLanes:l,cachePool:d},i!==null&&ku(r,null),kf(),dg(r),i!==null&&fs(i,r,o,!0),r.childLanes=h,null}function Vu(i,r){return r=qu({mode:r.mode,children:r.children},i.mode),r.ref=i.ref,i.child=r,r.return=i,r}function h2(i,r,l){return vs(r,i.child,null,l),i=Vu(r,r.pendingProps),i.flags|=2,Oi(r),r.memoizedState=null,i}function _7(i,r,l){var o=r.pendingProps,h=(r.flags&128)!==0;if(r.flags&=-129,i===null){if(Ne){if(o.mode==="hidden")return i=Vu(r,o),r.lanes=536870912,i.memoizedState={baseLanes:0,cachePool:null},za(null,i);if(Mf(r),(i=lt)?(i=jv(i,Wi),i=i!==null&&i.data==="&"?i:null,i!==null&&(r.memoizedState={dehydrated:i,treeContext:gr!==null?{id:gn,overflow:vn}:null,retryLane:536870912,hydrationErrors:null},l=W_(i),l.return=r,r.child=l,Nt=r,lt=null)):i=null,i===null)throw yr(r);return r.lanes=536870912,null}return Vu(r,o)}var d=i.memoizedState;if(d!==null){var S=d.dehydrated;if(Mf(r),h)if(r.flags&256)r.flags&=-257,r=h2(i,r,l);else if(r.memoizedState!==null)r.child=i.child,r.flags|=128,r=null;else throw Error(s(558));else if(xt||fs(i,r,l,!1),h=(l&i.childLanes)!==0,xt||h){if(Er.current===null){if(o=nt,o!==null&&(S=Zm(o,l),S!==0&&S!==d.retryLane))throw d.retryLane=S,os(i,S),bi(o,i,S),Gf;uc()}r=h2(i,r,l)}else i=d.treeContext,lt=Xi(S.nextSibling),Nt=r,Ne=!0,vr=null,Wi=!1,i!==null&&Z_(r,i),r=Vu(r,o),r.flags|=134221824;return r}return i=Kn(i.child,{mode:o.mode,children:o.children}),i.ref=r.ref,r.child=i,i.return=r,i}function gl(i,r){var l=r.ref;if(l===null)i!==null&&i.ref!==null&&(r.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(s(284));(i===null||i.ref!==l)&&(r.flags|=4194816)}}function Xf(i,r,l,o,h){return ds(r),l=Of(i,r,l,o,void 0,h),o=Rf(),i!==null&&!xt?(Lf(i,r,h),Jn(i,r,h)):(Ne&&o&&bu(r),r.flags|=1,Dt(i,r,l,h),r.child)}function f2(i,r,l,o,h,d){return ds(r),r.updateQueue=null,l=mg(r,o,l,h),pg(i),o=Rf(),i!==null&&!xt?(Lf(i,r,d),Jn(i,r,d)):(Ne&&o&&bu(r),r.flags|=1,Dt(i,r,l,d),r.child)}function d2(i,r,l,o,h){if(ds(r),r.stateNode===null){var d=al,S=l.contextType;typeof S=="object"&&S!==null&&(d=Kt(S)),d=new l(o,d),r.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Kf,r.stateNode=d,d._reactInternals=r,d=r.stateNode,d.props=o,d.state=r.memoizedState,d.refs={},wf(r),S=l.contextType,d.context=typeof S=="object"&&S!==null?Kt(S):al,d.state=r.memoizedState,S=l.getDerivedStateFromProps,typeof S=="function"&&($f(r,l,S,o),d.state=r.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(S=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),S!==d.state&&Kf.enqueueReplaceState(d,d.state,null),Da(r,o,d,h),Ma(),d.state=r.memoizedState),typeof d.componentDidMount=="function"&&(r.flags|=4194308),o=!0}else if(i===null){d=r.stateNode;var x=r.memoizedProps,M=Ss(l,x);d.props=M;var H=d.context,q=l.contextType;S=al,typeof q=="object"&&q!==null&&(S=Kt(q));var ie=l.getDerivedStateFromProps;q=typeof ie=="function"||typeof d.getSnapshotBeforeUpdate=="function",x=r.pendingProps!==x,q||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(x||H!==S)&&Jg(r,d,o,S),wr=!1;var L=r.memoizedState;d.state=L,Da(r,o,d,h),Ma(),H=r.memoizedState,x||L!==H||wr?(typeof ie=="function"&&($f(r,l,ie,o),H=r.memoizedState),(M=wr||Qg(r,l,M,o,L,H,S))?(q||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(r.flags|=4194308)):(typeof d.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=o,r.memoizedState=H),d.props=o,d.state=H,d.context=S,o=M):(typeof d.componentDidMount=="function"&&(r.flags|=4194308),o=!1)}else{d=r.stateNode,xf(i,r),S=r.memoizedProps,q=Ss(l,S),d.props=q,ie=r.pendingProps,L=d.context,H=l.contextType,M=al,typeof H=="object"&&H!==null&&(M=Kt(H)),x=l.getDerivedStateFromProps,(H=typeof x=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(S!==ie||L!==M)&&Jg(r,d,o,M),wr=!1,L=r.memoizedState,d.state=L,Da(r,o,d,h),Ma();var F=r.memoizedState;S!==ie||L!==F||wr||i!==null&&i.dependencies!==null&&Cu(i.dependencies)?(typeof x=="function"&&($f(r,l,x,o),F=r.memoizedState),(q=wr||Qg(r,l,q,o,L,F,M)||i!==null&&i.dependencies!==null&&Cu(i.dependencies))?(H||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(o,F,M),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(o,F,M)),typeof d.componentDidUpdate=="function"&&(r.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof d.componentDidUpdate!="function"||S===i.memoizedProps&&L===i.memoizedState||(r.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||S===i.memoizedProps&&L===i.memoizedState||(r.flags|=1024),r.memoizedProps=o,r.memoizedState=F),d.props=o,d.state=F,d.context=M,o=q):(typeof d.componentDidUpdate!="function"||S===i.memoizedProps&&L===i.memoizedState||(r.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||S===i.memoizedProps&&L===i.memoizedState||(r.flags|=1024),o=!1)}return d=o,gl(i,r),o=(r.flags&128)!==0,d||o?(d=r.stateNode,l=o&&typeof l.getDerivedStateFromError!="function"?null:d.render(),r.flags|=1,i!==null&&o?(r.child=vs(r,i.child,null,h),r.child=vs(r,null,l,h)):Dt(i,r,l,h),r.memoizedState=d.state,i=r.child):i=Jn(i,r,h),i}function p2(i,r,l,o){return cs(),r.flags|=256,Dt(i,r,l,o),r.child}var Zf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Qf(i){return{baseLanes:i,cachePool:ng()}}function Jf(i,r,l){return i=i!==null?i.childLanes&~l:0,r&&(i|=zi),i}function m2(i,r,l){var o=r.pendingProps,h=!1,d=(r.flags&128)!==0,S;if((S=d)||(S=i!==null&&i.memoizedState===null?!1:(Gt.current&2)!==0),S&&(h=!0,r.flags&=-129),S=(r.flags&32)!==0,r.flags&=-33,i===null){if(Ne){if(h?kr(r):Tr(),(i=lt)?(i=jv(i,Wi),i=i!==null&&i.data!=="&"?i:null,i!==null&&(r.memoizedState={dehydrated:i,treeContext:gr!==null?{id:gn,overflow:vn}:null,retryLane:536870912,hydrationErrors:null},l=W_(i),l.return=r,r.child=l,Nt=r,lt=null)):i=null,i===null)throw yr(r);return Qd(i)?r.lanes=32:r.lanes=536870912,null}return d=o.children,o=o.fallback,h?(Tr(),h=r.mode,d=qu({mode:"hidden",children:d},h),o=us(o,h,l,null),d.return=r,o.return=r,d.sibling=o,r.child=d,o=r.child,o.memoizedState=Qf(l),o.childLanes=Jf(i,S,l),r.memoizedState=Zf,za(null,o)):(kr(r),ed(r,d))}var x=i.memoizedState;if(x!==null){var M=x.dehydrated;if(M!==null)return g7(i,r,d,S,o,M,x,l)}return h?(Tr(),h=o.fallback,d=r.mode,x=i.child,M=x.sibling,o=Kn(x,{mode:"hidden",children:o.children}),o.subtreeFlags=x.subtreeFlags&1206910976,M!==null?h=Kn(M,h):(h=us(h,d,l,null),h.flags|=2),h.return=r,o.return=r,o.sibling=h,r.child=o,za(null,o),o=r.child,h=i.child.memoizedState,h===null?h=Qf(l):(d=h.cachePool,d!==null?(x=bt._currentValue,d=d.parent!==x?{parent:x,pool:x}:d):d=ng(),h={baseLanes:h.baseLanes|l,cachePool:d}),o.memoizedState=h,o.childLanes=Jf(i,S,l),r.memoizedState=Zf,za(i.child,o)):(kr(r),l=i.child,i=l.sibling,l=Kn(l,{mode:"visible",children:o.children}),l.return=r,l.sibling=null,i!==null&&(S=r.deletions,S===null?(r.deletions=[i],r.flags|=16):S.push(i)),r.child=l,r.memoizedState=null,l)}function ed(i,r){return r=qu({mode:"visible",children:r},i.mode),r.return=i,i.child=r}function qu(i,r){return i=gi(22,i,null,r),i.lanes=0,i}function Yu(i,r,l){return vs(r,i.child,null,l),i=ed(r,r.pendingProps.children),i.flags|=2,r.memoizedState=null,i}function g7(i,r,l,o,h,d,S,x){if(l)return r.flags&256?(kr(r),r.flags&=-257,Yu(i,r,x)):r.memoizedState!==null?(Tr(),r.child=i.child,r.flags|=128,null):(Tr(),d=h.fallback,S=r.mode,h=qu({mode:"visible",children:h.children},S),d=us(d,S,x,null),d.flags|=2,h.return=r,d.return=r,h.sibling=d,r.child=h,vs(r,i.child,null,x),h=r.child,h.memoizedState=Qf(x),h.childLanes=Jf(i,o,x),r.memoizedState=Zf,za(null,h));if(kr(r),Qd(d)){if(o=d.nextSibling&&d.nextSibling.dataset,o)var M=o.dgst;return o=M,o!==""&&(h=Error(s(419)),h.stack="",h.digest=o,wa({value:h,source:null,stack:null})),Yu(i,r,x)}if(xt||fs(i,r,x,!1),o=(x&i.childLanes)!==0,xt||o){if(Er.current!==null)return Yu(i,r,x);if(o=nt,o!==null&&(h=Zm(o,x),h!==0&&h!==S.retryLane))throw S.retryLane=h,os(i,h),bi(o,i,h),Gf;return Zd(d)||uc(),Yu(i,r,x)}return Zd(d)?(r.flags|=192,r.child=i.child,null):(i=S.treeContext,lt=Xi(d.nextSibling),Nt=r,Ne=!0,vr=null,Wi=!1,i!==null&&Z_(r,i),r=ed(r,h.children),r.flags|=134221824,r)}function _2(i,r,l){i.lanes|=r;var o=i.alternate;o!==null&&(o.lanes|=r),xu(i.return,r,l)}function g2(i){for(var r=null;i!==null;){var l=i.alternate;l!==null&&Ru(l)===null&&(r=i),i=i.sibling}return r}function $u(i,r,l,o,h,d){var S=i.memoizedState;S===null?i.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:o,tail:l,tailMode:h,treeForkCount:d}:(S.isBackwards=r,S.rendering=null,S.renderingStartTime=0,S.last=o,S.tail=l,S.tailMode=h,S.treeForkCount=d)}function td(i){var r=i.child;for(i.child=null;r!==null;){var l=r.sibling;r.sibling=i.child,i.child=r,r=l}}function id(i,r,l){var o=r.pendingProps,h=o.revealOrder,d=o.tail;o=o.children;var S=Gt.current;if(r.flags&128)return Aa(r,S),null;var x=(S&2)!==0;if(x?(S=S&1|2,r.flags|=128):S&=1,Aa(r,S),h==="backwards"&&i!==null?(td(i),Dt(i,r,o,l),td(i)):Dt(i,r,o,l),o=Ne?ba:0,!x&&i!==null&&(i.flags&128)!==0)e:for(i=r.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&_2(i,l,r);else if(i.tag===19)_2(i,l,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(h){case"backwards":l=g2(r.child),l===null?(h=r.child,r.child=null):(h=l.sibling,l.sibling=null,td(r)),$u(r,!0,h,null,d,o);break;case"unstable_legacy-backwards":for(l=null,h=r.child,r.child=null;h!==null;){if(i=h.alternate,i!==null&&Ru(i)===null){r.child=h;break}i=h.sibling,h.sibling=l,l=h,h=i}$u(r,!0,l,null,d,o);break;case"together":$u(r,!1,null,null,void 0,o);break;case"independent":r.memoizedState=null;break;default:l=g2(r.child),l===null?(h=r.child,r.child=null):(h=l.sibling,l.sibling=null),$u(r,!1,h,l,d,o)}return r.child}function v2(i,r,l){var o=r.pendingProps;return Sr(r,r.type,o.value),Dt(i,r,o.children,l),r.child}function Jn(i,r,l){if(i!==null&&(r.dependencies=i.dependencies),Or|=r.lanes,(l&r.childLanes)===0)if(i!==null){if(fs(i,r,l,!1),(l&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,l=Kn(i,i.pendingProps),r.child=l,l.return=r;i.sibling!==null;)i=i.sibling,l=l.sibling=Kn(i,i.pendingProps),l.return=r;l.sibling=null}return r.child}function nd(i,r){return(i.lanes&r)!==0?!0:(i=i.dependencies,!!(i!==null&&Cu(i)))}function v7(i,r,l){switch(r.tag){case 3:Ks(r,r.stateNode.containerInfo),Sr(r,bt,i.memoizedState.cache),cs();break;case 27:case 5:la(r);break;case 4:Ks(r,r.stateNode.containerInfo);break;case 10:Sr(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Mf(r),null;break;case 13:var o=r.memoizedState;if(o!==null){if(o.dehydrated!==null)return kr(r),r.flags|=128,null;o=fs(i,r,l,!1);var h=r.child.childLanes;return o||(l&h)!==0?m2(i,r,l):(kr(r),i=Jn(i,r,l),i!==null?i.sibling:null)}kr(r);break;case 19:if(r.flags&128)return id(i,r,l);if(h=(i.flags&128)!==0,o=(l&r.childLanes)!==0,o||(fs(i,r,l,!1),o=(l&r.childLanes)!==0),h){if(o)return id(i,r,l);r.flags|=128}if(h=r.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),Aa(r,Gt.current),o)break;return null;case 22:return r.lanes=0,u2(i,r,l,r.pendingProps);case 24:Sr(r,bt,i.memoizedState.cache)}return Jn(i,r,l)}function y2(i,r,l){if(i!==null)if(i.memoizedProps!==r.pendingProps)xt=!0;else{if(!nd(i,l)&&(r.flags&128)===0)return xt=!1,v7(i,r,l);xt=(i.flags&131072)!==0}else xt=!1,Ne&&(r.flags&1048576)!==0&&X_(r,ba,r.index);switch(r.lanes=0,r.tag){case 16:e:{var o=r.pendingProps;if(i=_s(r.elementType),r.type=i,typeof i=="function")cf(i)?(o=Ss(i,o),r.tag=1,r=d2(null,r,i,o,l)):(r.tag=0,r=Xf(null,r,i,o,l));else{if(i!=null){var h=i.$$typeof;if(h===B){r.tag=11,r=l2(null,r,i,o,l);break e}else if(h===fe){r.tag=14,r=a2(null,r,i,o,l);break e}else if(h===P){r.tag=10,r.type=i,r=v2(null,r,l);break e}}throw r=Ee(i)||i,Error(s(306,r,""))}}return r;case 0:return Xf(i,r,r.type,r.pendingProps,l);case 1:return o=r.type,h=Ss(o,r.pendingProps),d2(i,r,o,h,l);case 3:e:{if(Ks(r,r.stateNode.containerInfo),i===null)throw Error(s(387));o=r.pendingProps;var d=r.memoizedState;h=d.element,xf(i,r),Da(r,o,null,l);var S=r.memoizedState;if(o=S.cache,Sr(r,bt,o),o!==d.cache&&gf(r,[bt],l,!0),Ma(),o=S.element,d.isDehydrated)if(d={element:o,isDehydrated:!1,cache:S.cache},r.updateQueue.baseState=d,r.memoizedState=d,r.flags&256){r=p2(i,r,o,l);break e}else if(o!==h){h=Yi(Error(s(424)),r),wa(h),r=p2(i,r,o,l);break e}else for(i=r.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,lt=Xi(i.firstChild),Nt=r,Ne=!0,vr=null,Wi=!0,l=ug(r,null,o,l),r.child=l;l;)l.flags=l.flags&-3|134221824,l=l.sibling;else{if(cs(),o===h){r=Jn(i,r,l);break e}Dt(i,r,o,l)}r=r.child}return r;case 26:return gl(i,r),i===null?(l=qv(r.type,null,r.pendingProps,null))?r.memoizedState=l:Ne||(r.stateNode=xv(r.type,r.pendingProps,ln.current,r)):r.memoizedState=qv(r.type,i.memoizedProps,r.pendingProps,i.memoizedState),null;case 27:return la(r),i===null&&Ne&&(o=r.stateNode=Pv(r.type,r.pendingProps,ln.current),Nt=r,Wi=!0,h=lt,Nr(r.type)?(Jd=h,lt=Xi(o.firstChild)):lt=h),Dt(i,r,r.pendingProps.children,l),gl(i,r),i===null&&(r.flags|=4194304),r.child;case 5:return i===null&&Ne&&((h=o=lt)&&(o=f9(o,r.type,r.pendingProps,Wi),o!==null?(r.stateNode=o,Nt=r,lt=Xi(o.firstChild),Wi=!1,h=!0):h=!1),h||yr(r)),la(r),h=r.type,d=r.pendingProps,S=i!==null?i.memoizedProps:null,o=d.children,qd(h,d)?o=null:S!==null&&qd(h,S)&&(r.flags|=32),r.memoizedState!==null&&(h=Of(i,r,a7,null,null,l),Nl._currentValue=h),gl(i,r),Dt(i,r,o,l),r.child;case 6:return i===null&&Ne&&((i=l=lt)&&(l=d9(l,r.pendingProps,Wi),l!==null?(r.stateNode=l,Nt=r,lt=null,i=!0):i=!1),i||yr(r)),null;case 13:return m2(i,r,l);case 4:return Ks(r,r.stateNode.containerInfo),o=r.pendingProps,i===null?r.child=vs(r,null,o,l):Dt(i,r,o,l),r.child;case 11:return l2(i,r,r.type,r.pendingProps,l);case 7:return o=r.pendingProps,gl(i,r),Dt(i,r,o,l),r.child;case 8:return Dt(i,r,r.pendingProps.children,l),r.child;case 12:return Dt(i,r,r.pendingProps.children,l),r.child;case 10:return v2(i,r,l);case 9:return h=r.type._context,o=r.pendingProps.children,ds(r),h=Kt(h),o=o(h),r.flags|=1,Dt(i,r,o,l),r.child;case 14:return a2(i,r,r.type,r.pendingProps,l);case 15:return o2(i,r,r.type,r.pendingProps,l);case 19:return id(i,r,l);case 31:return _7(i,r,l);case 22:return u2(i,r,l,r.pendingProps);case 24:return ds(r),o=Kt(bt),i===null?(h=Sf(),h===null&&(h=nt,d=vf(),h.pooledCache=d,d.refCount++,d!==null&&(h.pooledCacheLanes|=l),h=d),r.memoizedState={parent:o,cache:h},wf(r),Sr(r,bt,h)):((i.lanes&l)!==0&&(xf(i,r),Da(r,null,null,l),Ma()),h=i.memoizedState,d=r.memoizedState,h.parent!==o?(h={parent:o,cache:o},r.memoizedState=h,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=h),Sr(r,bt,o)):(o=d.cache,Sr(r,bt,o),o!==h.cache&&gf(r,[bt],l,!0))),Dt(i,r,r.pendingProps.children,l),r.child;case 30:return r.stateNode===null&&(r.stateNode={autoName:null,paired:null,clones:null,ref:null}),o=r.pendingProps,o.name!=null&&o.name!=="auto"?r.flags|=i===null?18882560:18874368:Ne&&bu(r),i!==null&&i.memoizedProps.name!==o.name?r.flags|=4194816:gl(i,r),Dt(i,r,o.children,l),r.child;case 29:throw r.pendingProps}throw Error(s(156,r.tag))}function er(i){i.flags|=4}function rd(i,r,l,o,h){var d;if((d=(i.mode&32)!==0)&&(d=l===null?Wv(r,o):Wv(r,o)&&(o.src!==l.src||o.srcSet!==l.srcSet)),d){if(i.flags|=16777216,(h&335544128)===h)if(i.stateNode.complete)i.flags|=8192;else if(ev())i.flags|=8192;else throw gs=Mu,bf}else i.flags&=-16777217}function S2(i,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!Gv(r))if(ev())i.flags|=8192;else throw gs=Mu,bf}function Ku(i,r){r!==null&&(i.flags|=4),i.flags&16384&&(r=i.tag!==22?Wm():536870912,i.lanes|=r,wl|=r)}function Na(i,r){if(!Ne)switch(i.tailMode){case"visible":break;case"collapsed":for(var l=i.tail,o=null;l!==null;)l.alternate!==null&&(o=l),l=l.sibling;o===null?r||i.tail===null?i.tail=null:i.tail.sibling=null:o.sibling=null;break;default:for(r=i.tail,l=null;r!==null;)r.alternate!==null&&(l=r),r=r.sibling;l===null?i.tail=null:l.sibling=null}}function at(i){var r=i.alternate!==null&&i.alternate.child===i.child,l=0,o=0;if(r)for(var h=i.child;h!==null;)l|=h.lanes|h.childLanes,o|=h.subtreeFlags&1206910976,o|=h.flags&1206910976,h.return=i,h=h.sibling;else for(h=i.child;h!==null;)l|=h.lanes|h.childLanes,o|=h.subtreeFlags,o|=h.flags,h.return=i,h=h.sibling;return i.subtreeFlags|=o,i.childLanes=l,r}function y7(i,r,l){var o=r.pendingProps;switch(df(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return at(r),null;case 1:return at(r),null;case 3:return l=r.stateNode,o=null,i!==null&&(o=i.memoizedState.cache),r.memoizedState.cache!==o&&(r.flags|=2048),Xn(bt),dr(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(i===null||i.child===null)&&(cl(r)?er(r):i===null||i.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,mf())),at(r),null;case 26:var h=r.type,d=r.memoizedState;return i===null?(er(r),d!==null?(at(r),S2(r,d)):(at(r),rd(r,h,null,o,l))):d?d!==i.memoizedState?(er(r),at(r),S2(r,d)):(at(r),r.flags&=-16777217):(i=i.memoizedProps,i!==o&&er(r),at(r),rd(r,h,i,o,l)),null;case 27:if(Ws(r),l=ln.current,h=r.type,i!==null&&r.stateNode!=null)i.memoizedProps!==o&&er(r);else{if(!o){if(r.stateNode===null)throw Error(s(166));return at(r),r.subtreeFlags&=-33554433,null}i=Fi.current,cl(r)?Q_(r):(i=Pv(h,o,l),r.stateNode=i,er(r))}return at(r),r.subtreeFlags&=-33554433,null;case 5:if(Ws(r),h=r.type,i!==null&&r.stateNode!=null)i.memoizedProps!==o&&er(r);else{if(!o){if(r.stateNode===null)throw Error(s(166));return at(r),r.subtreeFlags&=-33554433,null}if(d=Fi.current,cl(r))Q_(r);else{var S=$a(ln.current);switch(d){case 1:d=S.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:d=S.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":d=S.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":d=S.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":d=S.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof o.is=="string"?S.createElement("select",{is:o.is}):S.createElement("select"),o.multiple?d.multiple=!0:o.size&&(d.size=o.size);break;default:d=typeof o.is=="string"?S.createElement(h,{is:o.is}):S.createElement(h)}}d[$t]=r,d[_i]=o;e:for(S=r.child;S!==null;){if(S.tag===5||S.tag===6)d.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===r)break e;for(;S.sibling===null;){if(S.return===null||S.return===r)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}r.stateNode=d;e:switch(Zt(d,h,o),h){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&er(r)}}return at(r),r.subtreeFlags&=-33554433,rd(r,r.type,i===null?null:i.memoizedProps,r.pendingProps,l),null;case 6:if(i&&r.stateNode!=null)i.memoizedProps!==o&&er(r);else{if(typeof o!="string"&&r.stateNode===null)throw Error(s(166));if(i=ln.current,cl(r)){if(i=r.stateNode,l=r.memoizedProps,o=null,h=Nt,h!==null)switch(h.tag){case 27:case 5:o=h.memoizedProps}i[$t]=r,i=!!(i.nodeValue===l||o!==null&&o.suppressHydrationWarning===!0||yv(i.nodeValue,l)),i||yr(r,!0)}else i=$a(i).createTextNode(o),i[$t]=r,r.stateNode=i}return at(r),null;case 31:if(l=r.memoizedState,i===null||i.memoizedState!==null){if(o=cl(r),l!==null){if(i===null){if(!o)throw Error(s(318));if(i=r.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(s(557));i[$t]=r}else cs(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;at(r),i=!1}else l=mf(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=l),i=!0;if(!i)return r.flags&256?(Oi(r),r):(Oi(r),null);if((r.flags&128)!==0)throw Error(s(558))}return at(r),null;case 13:if(o=r.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(h=cl(r),o!==null&&o.dehydrated!==null){if(i===null){if(!h)throw Error(s(318));if(h=r.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(s(317));h[$t]=r}else cs(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;at(r),h=!1}else h=mf(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=h),h=!0;if(!h)return r.flags&256?(Oi(r),r):(Oi(r),null)}return Oi(r),(r.flags&128)!==0?(r.lanes=l,r):(l=o!==null,i=i!==null&&i.memoizedState!==null,l&&(o=r.child,h=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(h=o.alternate.memoizedState.cachePool.pool),d=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==h&&(o.flags|=2048)),l!==i&&l&&(r.child.flags|=8192),Ku(r,r.updateQueue),at(r),null);case 4:return dr(),i===null&&Id(r.stateNode.containerInfo),r.flags|=67108864,at(r),null;case 10:return Xn(r.type),at(r),null;case 19:if(Df(r),o=r.memoizedState,o===null)return at(r),null;if(h=(r.flags&128)!==0,d=o.rendering,d===null)if(h)Na(o,!1);else{if(mt!==0||i!==null&&(i.flags&128)!==0)for(i=r.child;i!==null;){if(d=Ru(i),d!==null){for(r.flags|=128,Na(o,!1),i=d.updateQueue,r.updateQueue=i,Ku(r,i),r.subtreeFlags=0,i=l,l=r.child;l!==null;)K_(l,i),l=l.sibling;return Aa(r,Gt.current&1|2),Ne&&Wn(r,o.treeForkCount),r.child}i=i.sibling}o.tail!==null&&Yt()>sc&&(r.flags|=128,h=!0,Na(o,!1),r.lanes=4194304)}else{if(!h)if(i=Ru(d),i!==null){if(r.flags|=128,h=!0,i=i.updateQueue,r.updateQueue=i,Ku(r,i),Na(o,!0),o.tail===null&&o.tailMode!=="collapsed"&&o.tailMode!=="visible"&&!d.alternate&&!Ne)return at(r),null}else 2*Yt()-o.renderingStartTime>sc&&l!==536870912&&(r.flags|=128,h=!0,Na(o,!1),r.lanes=4194304);o.isBackwards?(d.sibling=r.child,r.child=d):(i=o.last,i!==null?i.sibling=d:r.child=d,o.last=d)}if(o.tail!==null){i=o.tail;e:{for(l=i;l!==null;){if(l.alternate!==null){l=!1;break e}l=l.sibling}l=!0}return o.rendering=i,o.tail=i.sibling,o.renderingStartTime=Yt(),i.sibling=null,d=Gt.current,d=h?d&1|2:d&1,o.tailMode==="visible"||o.tailMode==="collapsed"||!l||Ne?Aa(r,d):(l=d,Xe(Wt,r),Xe(Gt,l),ti===null&&(ti=r)),Ne&&Wn(r,o.treeForkCount),i}return at(r),null;case 22:case 23:return Oi(r),Tf(),o=r.memoizedState!==null,i!==null?i.memoizedState!==null!==o&&(r.flags|=8192):o&&(r.flags|=8192),o?(l&536870912)!==0&&(r.flags&128)===0&&(at(r),r.subtreeFlags&6&&(r.flags|=8192)):at(r),l=r.updateQueue,l!==null&&Ku(r,l.retryQueue),l=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==l&&(r.flags|=2048),i!==null&&St(ms),null;case 24:return l=null,i!==null&&(l=i.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),Xn(bt),at(r),null;case 25:return null;case 30:return r.flags|=33554432,at(r),null}throw Error(s(156,r.tag))}function S7(i,r){switch(df(r),r.tag){case 1:return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 3:return Xn(bt),dr(),i=r.flags,(i&65536)!==0&&(i&128)===0?(r.flags=i&-65537|128,r):null;case 26:case 27:case 5:return Ws(r),null;case 31:if(r.memoizedState!==null){if(Oi(r),r.alternate===null)throw Error(s(340));cs()}return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 13:if(Oi(r),i=r.memoizedState,i!==null&&i.dehydrated!==null){if(r.alternate===null)throw Error(s(340));cs()}return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 19:return Df(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 dr(),null;case 10:return Xn(r.type),null;case 22:case 23:return Oi(r),Tf(),i!==null&&St(ms),i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 24:return Xn(bt),null;case 25:return null;default:return null}}function b2(i,r){switch(df(r),r.tag){case 3:Xn(bt),dr();break;case 26:case 27:case 5:Ws(r);break;case 4:dr();break;case 31:r.memoizedState!==null&&Oi(r);break;case 13:Oi(r);break;case 19:Df(r);break;case 10:Xn(r.type);break;case 22:case 23:Oi(r),Tf(),i!==null&&St(ms);break;case 24:Xn(bt)}}function Ba(i,r){try{var l=r.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var h=o.next;l=h;do{if((l.tag&i)===i){o=void 0;var d=l.create,S=l.inst;o=d(),S.destroy=o}l=l.next}while(l!==h)}}catch(x){Qe(r,r.return,x)}}function Mr(i,r,l){try{var o=r.updateQueue,h=o!==null?o.lastEffect:null;if(h!==null){var d=h.next;o=d;do{if((o.tag&i)===i){var S=o.inst,x=S.destroy;if(x!==void 0){S.destroy=void 0,h=r;var M=l,H=x;try{H()}catch(q){Qe(h,M,q)}}}o=o.next}while(o!==d)}}catch(q){Qe(r,r.return,q)}}function w2(i){var r=i.updateQueue;if(r!==null){var l=i.stateNode;try{hg(r,l)}catch(o){Qe(i,i.return,o)}}}function x2(i,r,l){l.props=Ss(i.type,i.memoizedProps),l.state=i.memoizedState;try{l.componentWillUnmount()}catch(o){Qe(i,r,o)}}function yn(i,r){try{var l=i.ref;if(l!==null){switch(i.tag){case 26:case 27:case 5:var o=i.stateNode;break;case 30:var h=i.stateNode,d=Yn(i.memoizedProps,h);(h.ref===null||h.ref.name!==d)&&(h.ref=Av(d)),o=h.ref;break;case 7:if(i.stateNode===null){var S=new Bi(i);_(i.child,!1,c9,S,void 0,void 0),i.stateNode=S}o=i.stateNode;break;default:o=i.stateNode}typeof l=="function"?i.refCleanup=l(o):l.current=o}}catch(x){Qe(i,r,x)}}function Xt(i,r){var l=i.ref,o=i.refCleanup;if(l!==null)if(typeof o=="function")try{o()}catch(h){Qe(i,r,h)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(h){Qe(i,r,h)}else l.current=null}function Wu(i,r){if((i.tag===5||i.tag===27||i.tag===6)&&i.alternate===null&&r!==null)for(var l=0;l<r.length;l++)Bv(i.stateNode,r[l])}function C2(i){for(var r=i.return;r!==null&&(ld(r)&&Bv(i.stateNode,r.stateNode),!sd(r));)r=r.return}function ja(i){for(var r=i.return;r!==null&&(ld(r)&&h9(i.stateNode,r.stateNode),!sd(r));)r=r.return}function sd(i){return i.tag===5||i.tag===3||i.tag===27}function ld(i){return i&&i.tag===7&&i.stateNode!==null}function ad(i){var r=i.type,l=i.memoizedProps,o=i.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":l.autoFocus&&o.focus();break e;case"img":l.src?o.src=l.src:l.srcSet&&(o.srcset=l.srcSet)}}catch(h){Qe(i,i.return,h)}}function od(i,r,l){try{var o=i.stateNode;$7(o,i.type,l,r),o[_i]=r}catch(h){Qe(i,i.return,h)}}function E2(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Nr(i.type)||i.tag===4}function ud(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||E2(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&&Nr(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 cd(i,r,l,o){var h=i.tag;if(h===5||h===6)h=i.stateNode,r?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(h,r):(r=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,r.appendChild(h),l=l._reactRootContainer,l!=null||r.onclick!==null||(r.onclick=_n)),Wu(i,o),Ye=!0;else if(h!==4&&(h===27&&(Wu(i,o),o=null,Nr(i.type)&&(l=i.stateNode,r=null)),i=i.child,i!==null))for(cd(i,r,l,o),i=i.sibling;i!==null;)cd(i,r,l,o),i=i.sibling}function Gu(i,r,l,o){var h=i.tag;if(h===5||h===6)h=i.stateNode,r?l.insertBefore(h,r):l.appendChild(h),Wu(i,o),Ye=!0;else if(h!==4&&(h===27&&(Wu(i,o),o=null,Nr(i.type)&&(l=i.stateNode)),i=i.child,i!==null))for(Gu(i,r,l,o),i=i.sibling;i!==null;)Gu(i,r,l,o),i=i.sibling}function k2(i){var r=i.stateNode,l=i.memoizedProps;try{for(var o=i.type,h=r.attributes;h.length;)r.removeAttributeNode(h[0]);Zt(r,o,l),r[$t]=i,r[_i]=l}catch(d){Qe(i,i.return,d)}}var Xu=!1,Ri=null;function T2(i){(i.tag===30||(i.subtreeFlags&33554432)!==0)&&(Xu=!0)}var Sn=null;function M2(){var i=Sn;return Sn=null,i}var vi=0;function vl(i,r,l,o,h){return vi=0,D2(i.child,r,l,o,h)}function D2(i,r,l,o,h){for(var d=!1;i!==null;){if(i.tag===5){var S=i.stateNode;if(o!==null){var x=Kd(S);o.push(x),x.view&&(d=!0)}else d||Kd(S).view&&(d=!0);Xu=!0,Mv(S,vi===0?r:r+"_"+vi,l),vi++}else(i.tag!==22||i.memoizedState===null)&&(i.tag===30&&h||D2(i.child,r,l,o,h)&&(d=!0));i=i.sibling}return d}function bn(i,r){for(;i!==null;)i.tag===5?Dv(i.stateNode,i.memoizedProps):(i.tag!==22||i.memoizedState===null)&&(i.tag===30&&r||bn(i.child,r)),i=i.sibling}function Zu(i){if((i.subtreeFlags&18874368)!==0)for(i=i.child;i!==null;){if((i.tag!==22||i.memoizedState===null)&&(Zu(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 l=r.name;r=$n(r.default,r.share),r!=="none"&&(vl(i,l,r,null,!1)||bn(i.child,!1))}i=i.sibling}}function hd(i,r){if(i.tag===30){var l=i.stateNode,o=i.memoizedProps,h=Yn(o,l),d=$n(o.default,l.paired?o.share:o.enter);d!=="none"?vl(i,h,d,null,!1)?(Zu(i),l.paired||r||kl(i,o.onEnter)):bn(i.child,!1):Zu(i)}else if((i.subtreeFlags&33554432)!==0)for(i=i.child;i!==null;)hd(i,r),i=i.sibling;else Zu(i)}function fd(i){if(Ri!==null&&Ri.size!==0){var r=Ri;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 l=i.memoizedProps,o=l.name;if(o!=null&&o!=="auto"){var h=r.get(o);if(h!==void 0){var d=$n(l.default,l.share);if(d!=="none"&&(vl(i,o,d,null,!1)?(d=i.stateNode,h.paired=d,d.paired=h,kl(i,l.onShare)):bn(i.child,!1)),r.delete(o),r.size===0)break}}}fd(i)}i=i.sibling}}}function dd(i){if(i.tag===30){var r=i.memoizedProps,l=Yn(r,i.stateNode),o=Ri!==null?Ri.get(l):void 0,h=$n(r.default,o!==void 0?r.share:r.exit);h!=="none"&&(vl(i,l,h,null,!1)?o!==void 0?(h=i.stateNode,o.paired=h,h.paired=o,Ri.delete(l),kl(i,r.onShare)):kl(i,r.onExit):bn(i.child,!1)),Ri!==null&&fd(i)}else if((i.subtreeFlags&33554432)!==0)for(i=i.child;i!==null;)dd(i),i=i.sibling;else Ri!==null&&fd(i)}function A2(i){for(i=i.child;i!==null;){if(i.tag===30){var r=i.memoizedProps,l=Yn(r,i.stateNode);r=$n(r.default,r.update),i.flags&=-5,r!=="none"&&vl(i,l,r,i.memoizedState=[],!1)}else(i.subtreeFlags&33554432)!==0&&A2(i);i=i.sibling}}function pd(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,bn(i.child,!1))}pd(i)}i=i.sibling}}function Qu(i){if(i.tag===30)i.stateNode.paired=null,bn(i.child,!1),pd(i);else if((i.subtreeFlags&33554432)!==0)for(i=i.child;i!==null;)Qu(i),i=i.sibling;else pd(i)}function O2(i){for(i=i.child;i!==null;)i.tag===30?bn(i.child,!1):(i.subtreeFlags&33554432)!==0&&O2(i),i=i.sibling}function md(i,r,l,o,h,d,S){for(var x=!1;r!==null;){if(r.tag===5){var M=r.stateNode;if(d!==null&&vi<d.length){var H=d[vi],q=Kd(M);(H.view||q.view)&&(x=!0);var ie;if(ie=(i.flags&4)===0)if(q.clip)ie=!0;else{ie=H.rect;var L=q.rect;ie=ie.y!==L.y||ie.x!==L.x||ie.height!==L.height||ie.width!==L.width}ie&&(i.flags|=4),q.abs?q=!H.abs:(H=H.rect,q=q.rect,q=H.height!==q.height||H.width!==q.width),q&&(i.flags|=32)}else i.flags|=32;(i.flags&4)!==0&&Mv(M,vi===0?l:l+"_"+vi,h),x&&(i.flags&4)!==0||(Sn===null&&(Sn=[]),Sn.push(M,vi===0?o:o+"_"+vi,r.memoizedProps)),vi++}else(r.tag!==22||r.memoizedState===null)&&(r.tag===30&&S?i.flags|=r.flags&32:md(i,r.child,l,o,h,d,S)&&(x=!0));r=r.sibling}return x}function R2(i,r){for(i=i.child;i!==null;){if(i.tag===30){var l=i.memoizedProps,o=i.stateNode,h=Yn(l,o),d=$n(l.default,l.update),S;S=i.memoizedState,i.memoizedState=null,o=i;var x=i.child;vi=0,h=md(o,x,h,h,d,S,!1),(i.flags&4)!==0&&h&&kl(i,l.onUpdate)}else(i.subtreeFlags&33554432)!==0&&R2(i);i=i.sibling}}var Bt=!1,Ge=!1,wn=!1,_d=!1,L2=typeof WeakSet=="function"?WeakSet:Set,jt=null,xn=!1,Ha=!1,Ju=!1,gd=!1;function b7(i,r,l){if(i=i.containerInfo,Ud=Bl,i=j_(i),nf(i)){if("selectionStart"in i)var o={start:i.selectionStart,end:i.selectionEnd};else e:{o=(o=i.ownerDocument)&&o.defaultView||window;var h=o.getSelection&&o.getSelection();if(h&&h.rangeCount!==0){o=h.anchorNode;var d=h.anchorOffset,S=h.focusNode;h=h.focusOffset;try{o.nodeType,S.nodeType}catch{o=null;break e}var x=0,M=-1,H=-1,q=0,ie=0,L=i,F=null;t:for(;;){for(var he;L!==o||d!==0&&L.nodeType!==3||(M=x+d),L!==S||h!==0&&L.nodeType!==3||(H=x+h),L.nodeType===3&&(x+=L.nodeValue.length),(he=L.firstChild)!==null;)F=L,L=he;for(;;){if(L===i)break t;if(F===o&&++q===d&&(M=x),F===S&&++ie===h&&(H=x),(he=L.nextSibling)!==null)break;L=F,F=L.parentNode}L=he}o=M===-1||H===-1?null:{start:M,end:H}}else o=null}o=o||{start:0,end:0}}else o=null;for(Vd={focusedElem:i,selectionRange:o},Bl=!1,l=(l&335544064)===l,jt=r,r=l?9270:1024;jt!==null;){if(i=jt,l&&(o=i.deletions,o!==null))for(d=0;d<o.length;d++)l&&dd(o[d]);if(i.alternate===null&&(i.flags&2)!==0)l&&T2(i),ec(l);else{if(i.tag===22){if(o=i.alternate,i.memoizedState!==null){o!==null&&o.memoizedState===null&&l&&dd(o),ec(l);continue}else if(o!==null&&o.memoizedState!==null){l&&T2(i),ec(l);continue}}o=i.child,(i.subtreeFlags&r)!==0&&o!==null?(o.return=i,jt=o):(l&&A2(i),ec(l))}}Ri=null}function ec(i){for(;jt!==null;){var r=jt,l=i,o=r.alternate,h=r.flags;switch(r.tag){case 0:case 11:case 15:break;case 1:if((h&1024)!==0&&o!==null){l=void 0,h=o.memoizedProps,o=o.memoizedState;var d=r.stateNode;try{var S=Ss(r.type,h);l=d.getSnapshotBeforeUpdate(S,o),d.__reactInternalSnapshotBeforeUpdate=l}catch(x){Qe(r,r.return,x)}}break;case 3:if((h&1024)!==0){if(o=r.stateNode.containerInfo,l=o.nodeType,l===9)Xd(o);else if(l===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":Xd(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:l&&o!==null&&(l=Yn(o.memoizedProps,o.stateNode),h=r.memoizedProps,h=$n(h.default,h.update),h!=="none"&&vl(o,l,h,o.memoizedState=[],!0));break;default:if((h&1024)!==0)throw Error(s(163))}if(o=r.sibling,o!==null){o.return=r.return,jt=o;break}jt=r.return}}function z2(i,r,l){var o=l.flags;switch(l.tag){case 0:case 11:case 15:Cn(i,l),o&4&&Ba(5,l);break;case 1:if(Cn(i,l),o&4)if(i=l.stateNode,r===null)try{i.componentDidMount()}catch(S){Qe(l,l.return,S)}else{var h=Ss(l.type,r.memoizedProps);r=r.memoizedState;try{i.componentDidUpdate(h,r,i.__reactInternalSnapshotBeforeUpdate)}catch(S){Qe(l,l.return,S)}}o&64&&w2(l),o&512&&yn(l,l.return);break;case 3:if(Cn(i,l),o&64&&(i=l.updateQueue,i!==null)){if(r=null,l.child!==null)switch(l.child.tag){case 27:case 5:r=l.child.stateNode;break;case 1:r=l.child.stateNode}try{hg(i,r)}catch(S){Qe(l,l.return,S)}}break;case 27:r===null&&o&4&&k2(l);case 26:case 5:Cn(i,l),r===null&&o&4&&ad(l),o&512&&yn(l,l.return);break;case 12:Cn(i,l);break;case 31:Cn(i,l),o&4&&H2(i,l);break;case 13:Cn(i,l),o&4&&I2(i,l),o&64&&(i=l.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(l=L7.bind(null,l),p9(i,l))));break;case 22:if(o=l.memoizedState!==null||Bt,!o){var d=r!==null&&r.memoizedState!==null||Ge;r=Bt,h=Ge,Bt=o,(Ge=d)&&!h?(o=2,(l.subtreeFlags&8772)!==0&&(o|=1),cn(i,l,o)):Cn(i,l),Bt=r,Ge=h}break;case 30:Cn(i,l),o&512&&yn(l,l.return);break;case 7:o&512&&yn(l,l.return);default:Cn(i,l)}}function vd(i,r){for(i=i.child;i!==null;)N2(i,r),i=i.sibling}function N2(i,r){switch(i.tag){case 5:case 26:try{var l=i.stateNode;if(r){var o=l.style;typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"}else{var h=i.stateNode,d=i.memoizedProps.style,S=d!=null&&d.hasOwnProperty("display")?d.display:null;h.style.display=S==null||typeof S=="boolean"?"":(""+S).trim()}}catch(M){Qe(i,i.return,M)}yd(i,r);break;case 6:try{i.stateNode.nodeValue=r?"":i.memoizedProps,Ye=!0}catch(M){Qe(i,i.return,M)}break;case 18:try{var x=i.stateNode;r?Tv(x,!0):Tv(i.stateNode,!1)}catch(M){Qe(i,i.return,M)}break;case 22:case 23:i.memoizedState===null&&vd(i,r);break;default:vd(i,r)}}function yd(i,r){if(i.subtreeFlags&67108864)for(i=i.child;i!==null;){e:{var l=i,o=r;switch(l.tag){case 4:N2(l,o);break e;case 22:l.memoizedState===null&&yd(l,o);break e;default:yd(l,o)}}i=i.sibling}}function B2(i){var r=i.alternate;r!==null&&(i.alternate=null,B2(r)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(r=i.stateNode,r!==null&&su(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,yi=!1;function on(i,r,l){for(l=l.child;l!==null;)j2(i,r,l),l=l.sibling}function j2(i,r,l){if(Ti&&typeof Ti.onCommitFiberUnmount=="function")try{Ti.onCommitFiberUnmount(aa,l)}catch{}switch(l.tag){case 26:Ge||Xt(l,r),on(i,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&!Ge&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Ge||Xt(l,r),ja(l);var o=ut,h=yi;Nr(l.type)&&(ut=l.stateNode,yi=!1),on(i,r,l),Fv(l.stateNode,l.type,l.memoizedProps),ut=o,yi=h;break;case 5:Ge||Xt(l,r),ja(l);case 6:if(l.tag===6&&ja(l),o=ut,h=yi,ut=null,on(i,r,l),ut=o,yi=h,ut!==null)if(yi)try{(ut.nodeType===9?ut.body:ut.nodeName==="HTML"?ut.ownerDocument.body:ut).removeChild(l.stateNode),Ye=!0}catch(d){Qe(l,r,d)}else try{ut.removeChild(l.stateNode),Ye=!0}catch(d){Qe(l,r,d)}break;case 18:ut!==null&&(yi?(i=ut,kv(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,l.stateNode),jl(i)):kv(ut,l.stateNode));break;case 4:o=ut,h=yi,ut=l.stateNode.containerInfo,yi=!0,on(i,r,l),ut=o,yi=h;break;case 0:case 11:case 14:case 15:Mr(2,l,r),Ge||Mr(4,l,r),on(i,r,l);break;case 1:Ge||(Xt(l,r),o=l.stateNode,typeof o.componentWillUnmount=="function"&&x2(l,r,o)),on(i,r,l);break;case 21:on(i,r,l);break;case 22:Ge=(o=Ge)||l.memoizedState!==null,on(i,r,l),Ge=o;break;case 30:Xt(l,r),on(i,r,l);break;case 7:Ge||Xt(l,r),on(i,r,l);break;default:on(i,r,l)}}function H2(i,r){if(r.memoizedState===null&&(i=r.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{jl(i)}catch(l){Qe(r,r.return,l)}}}function I2(i,r){if(r.memoizedState===null&&(i=r.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{jl(i)}catch(l){Qe(r,r.return,l)}}function w7(i){switch(i.tag){case 31:case 13:case 19:var r=i.stateNode;return r===null&&(r=i.stateNode=new L2),r;case 22:return i=i.stateNode,r=i._retryCache,r===null&&(r=i._retryCache=new L2),r;default:throw Error(s(435,i.tag))}}function tc(i,r){var l=w7(i);r.forEach(function(o){if(!l.has(o)){l.add(o);var h=z7.bind(null,i,o);o.then(h,h)}})}function oi(i,r,l){var o=r.deletions;if(o!==null)for(var h=0;h<o.length;h++){var d=o[h],S=i,x=r,M=x;e:for(;M!==null;){switch(M.tag){case 27:if(Nr(M.type)){ut=M.stateNode,yi=!1;break e}break;case 5:ut=M.stateNode,yi=!1;break e;case 3:case 4:ut=M.stateNode.containerInfo,yi=!0;break e}M=M.return}if(ut===null)throw Error(s(160));j2(S,x,d),ut=null,yi=!1,S=d.alternate,S!==null&&(S.return=null),d.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)P2(r,i,l),r=r.sibling}var un=null;function P2(i,r,l){var o=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(h&4&&(o=i.updateQueue,o=o!==null?o.events:null,o!==null))for(var d=0;d<o.length;d++){var S=o[d];S.ref.impl=S.nextImpl}oi(r,i,l),ui(i),h&4&&(Mr(3,i,i.return),Ba(3,i),Mr(5,i,i.return));break;case 1:oi(r,i,l),ui(i),h&512&&(Ge||o===null||Xt(o,o.return)),h&64&&Bt&&(i=i.updateQueue,i!==null&&(r=i.callbacks,r!==null&&(l=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=l===null?r:l.concat(r))));break;case 26:if(d=un,oi(r,i,l),ui(i),h&512&&(Ge||o===null||Xt(o,o.return)),h&4)if(h=o!==null?o.memoizedState:null,l=i.memoizedState,o===null)if(l===null)if(i.stateNode===null)if(Bt)i.stateNode=xv(i.type,i.memoizedProps,r.containerInfo,i);else{e:{r=i.type,l=i.memoizedProps,h=d.ownerDocument||d;t:switch(r){case"title":o=h.getElementsByTagName("title")[0],(!o||o[ca]||o[$t]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=h.createElement(r),h.head.insertBefore(o,h.querySelector("head > title"))),Zt(o,r,l),o[$t]=i,zt(o),r=o;break e;case"link":if(d=Kv("link","href",h).get(r+(l.href||""))){for(S=0;S<d.length;S++)if(o=d[S],o.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&o.getAttribute("rel")===(l.rel==null?null:l.rel)&&o.getAttribute("title")===(l.title==null?null:l.title)&&o.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){d.splice(S,1);break t}}o=h.createElement(r),Zt(o,r,l),h.head.appendChild(o);break;case"meta":if(d=Kv("meta","content",h).get(r+(l.content||""))){for(S=0;S<d.length;S++)if(o=d[S],o.getAttribute("content")===(l.content==null?null:""+l.content)&&o.getAttribute("name")===(l.name==null?null:l.name)&&o.getAttribute("property")===(l.property==null?null:l.property)&&o.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&o.getAttribute("charset")===(l.charSet==null?null:l.charSet)){d.splice(S,1);break t}}o=h.createElement(r),Zt(o,r,l),h.head.appendChild(o);break;default:throw Error(s(468,r))}o[$t]=i,zt(o),r=o}i.stateNode=r}else Bt||n1(d,i.type,i.stateNode);else i.stateNode=$v(d,l,i.memoizedProps);else h!==l?(h===null?(r=o.stateNode,r===null||Ge||r.parentNode.removeChild(r)):h.count--,l===null?Bt||n1(d,i.type,i.stateNode):$v(d,l,i.memoizedProps)):l===null&&i.stateNode!==null&&od(i,i.memoizedProps,o.memoizedProps);break;case 27:oi(r,i,l),ui(i),h&512&&(Ge||o===null||Xt(o,o.return)),o!==null&&h&4&&od(i,i.memoizedProps,o.memoizedProps);break;case 5:if(d=wn,wn=!1,oi(r,i,l),wn=d,ui(i),h&512&&(Ge||o===null||Xt(o,o.return)),i.flags&32){r=i.stateNode;try{el(r,""),Ye=!0}catch(q){Qe(i,i.return,q)}}h&4&&i.stateNode!=null&&(r=i.memoizedProps,od(i,r,o!==null?o.memoizedProps:r)),h&1024&&(_d=!0);break;case 6:if(oi(r,i,l),ui(i),h&4){if(i.stateNode===null)throw Error(s(162));r=i.memoizedProps,l=i.stateNode;try{l.nodeValue=r,Ye=!0}catch(q){Qe(i,i.return,q)}}break;case 3:if(Ye=!1,_c=null,d=un,un=Ka(r.containerInfo),oi(r,i,l),un=d,ui(i),h&4&&o!==null&&o.memoizedState.isDehydrated)try{jl(r.containerInfo)}catch(q){Qe(i,i.return,q)}_d&&(_d=!1,F2(i)),Ye=!1;break;case 4:h=wn,wn=Bt,o=a_(),d=un,un=Ka(i.stateNode.containerInfo),oi(r,i,l),ui(i),un=d,Ye&&Ha&&(Ju=!0),Ye=o,wn=h;break;case 12:oi(r,i,l),ui(i);break;case 31:oi(r,i,l),ui(i),h&4&&(r=i.updateQueue,r!==null&&(i.updateQueue=null,tc(i,r)));break;case 13:oi(r,i,l),ui(i),i.child.flags&8192&&i.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(rc=Yt()),h&4&&(r=i.updateQueue,r!==null&&(i.updateQueue=null,tc(i,r)));break;case 22:d=i.memoizedState!==null,S=o!==null&&o.memoizedState!==null;var x=Bt,M=Ge,H=wn;Bt=x||d,wn=H||d,Ge=M||S,oi(r,i,l),Ge=M,wn=H,Bt=x,ui(i),h&8192&&(r=i.stateNode,r._visibility=d?r._visibility&-2:r._visibility|1,!d||o===null||S||Bt||Ge||(r=S||Ge,l=Bt,o=Ge,Bt=d||Bt,Ge=r,Dr(i,2),Bt=l,Ge=o),!d&&wn||vd(i,d)),h&4&&(r=i.updateQueue,r!==null&&(l=r.retryQueue,l!==null&&(r.retryQueue=null,tc(i,l))));break;case 19:oi(r,i,l),ui(i),h&4&&(r=i.updateQueue,r!==null&&(i.updateQueue=null,tc(i,r)));break;case 30:h&512&&(Ge||o===null||Xt(o,o.return)),h=a_(),d=Ha,S=(l&335544064)===l,x=i.memoizedProps,Ha=S&&$n(x.default,x.update)!=="none",oi(r,i,l),ui(i),S&&o!==null&&Ye&&(i.flags|=4),Ha=d,Ye=h;break;case 21:break;case 7:h&512&&(Ge||o===null||Xt(o,o.return)),o&&o.stateNode!==null&&(o.stateNode._fragmentFiber=i);default:oi(r,i,l),ui(i)}}function ui(i){var r=i.flags;if(r&2){try{for(var l,o=i.return;o!==null;){if(E2(o)){l=o;break}o=o.return}o=null;for(var h=i.return;h!==null;){if(ld(h)){var d=h.stateNode;o===null?o=[d]:o.push(d)}if(sd(h))break;h=h.return}var S=o;if(l==null)throw Error(s(160));switch(l.tag){case 27:var x=l.stateNode,M=ud(i);Gu(i,M,x,S);break;case 5:var H=l.stateNode;l.flags&32&&(el(H,""),l.flags&=-33);var q=ud(i);Gu(i,q,H,S);break;case 3:case 4:var ie=l.stateNode.containerInfo,L=ud(i);cd(i,L,ie,S);break;default:throw Error(s(161))}}catch(F){Qe(i,i.return,F)}i.flags&=-3}r&4096&&(i.flags&=-4097)}function F2(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var r=i;F2(r),r.tag===5&&r.flags&1024&&(r=r.stateNode,Bl=!0,r.reset(),Bl=!1),i=i.sibling}}function yl(i,r){if(r.subtreeFlags&9270)for(r=r.child;r!==null;)U2(r,i),r=r.sibling;else R2(r)}function U2(i,r){var l=i.alternate;if(l===null)hd(i,!1);else switch(i.tag){case 3:if(gd=xn=!1,M2(),yl(r,i),!xn&&!Ju){if(i=Sn,i!==null)for(var o=0;o<i.length;o+=3){l=i[o];var h=i[o+1];Dv(l,i[o+2]),l=l.ownerDocument.documentElement,l!==null&&l.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+h+")"})}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"})),gd=!0}Sn=null;break;case 5:yl(r,i);break;case 4:o=xn,xn=!1,yl(r,i),xn&&(Ju=!0),xn=o;break;case 22:i.memoizedState===null&&(l.memoizedState!==null?hd(i,!1):yl(r,i));break;case 30:o=xn,h=M2(),xn=!1,yl(r,i),xn&&(i.flags|=4);var d=i.memoizedProps,S=i.stateNode;r=Yn(d,S),S=Yn(l.memoizedProps,S);var x=$n(d.default,d.update);x==="none"?r=!1:(d=l.memoizedState,l.memoizedState=null,l=i.child,vi=0,r=md(i,l,r,S,x,d,!0),vi!==(d===null?0:d.length)&&(i.flags|=32)),(i.flags&4)!==0&&r?(kl(i,i.memoizedProps.onUpdate),Sn=h):h!==null&&(h.push.apply(h,Sn),Sn=h),xn=(i.flags&32)!==0?!0:o;break;default:yl(r,i)}}function Cn(i,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)z2(i,r.alternate,r),r=r.sibling}function Dr(i,r){for(i=i.child;i!==null;){var l=i,o=r;switch(l.tag){case 0:case 11:case 14:case 15:Mr(4,l,l.return),Dr(l,o);break;case 1:Xt(l,l.return);var h=l.stateNode;typeof h.componentWillUnmount=="function"&&x2(l,l.return,h),Dr(l,o);break;case 27:(o&2)!==0&&Fv(l.stateNode,l.type,l.memoizedProps);case 5:Xt(l,l.return),l.tag!==5&&l.tag!==27||ja(l),Dr(l,o);break;case 6:ja(l);break;case 26:Xt(l,l.return),h=l.stateNode,l.memoizedState!==null||h===null||Ge||h.parentNode.removeChild(h),Dr(l,o);break;case 22:l.memoizedState===null&&Dr(l,o);break;case 30:Xt(l,l.return),Dr(l,o);break;case 7:Xt(l,l.return);default:Dr(l,o)}i=i.sibling}}function cn(i,r,l){for(l=(r.subtreeFlags&8772)!==0?l:l&-2,r=r.child;r!==null;){var o=r.alternate,h=i,d=r,S=d.flags,x=(l&1)!==0;switch(d.tag){case 0:case 11:case 15:cn(h,d,l),Ba(4,d);break;case 1:if(cn(h,d,l),o=d,h=o.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(q){Qe(o,o.return,q)}if(o=d,h=o.updateQueue,h!==null){var M=o.stateNode;try{var H=h.shared.hiddenCallbacks;if(H!==null)for(h.shared.hiddenCallbacks=null,h=0;h<H.length;h++)cg(H[h],M)}catch(q){Qe(o,o.return,q)}}x&&S&64&&w2(d),yn(d,d.return);break;case 27:(l&2)!==0&&k2(d);case 5:d.tag!==5&&d.tag!==27||C2(d),cn(h,d,l),x&&o===null&&S&4&&ad(d),yn(d,d.return);break;case 6:C2(d);break;case 26:M=d.stateNode,d.memoizedState!==null||M===null||Bt||n1(Ka(M.ownerDocument),d.type,M),cn(h,d,l),x&&o===null&&S&4&&ad(d),yn(d,d.return);break;case 12:cn(h,d,l);break;case 31:cn(h,d,l),x&&S&4&&H2(h,d);break;case 13:cn(h,d,l),x&&S&4&&I2(h,d);break;case 22:d.memoizedState===null&&cn(h,d,l),yn(d,d.return);break;case 30:cn(h,d,l),yn(d,d.return);break;case 7:yn(d,d.return);default:cn(h,d,l)}r=r.sibling}}function Sd(i,r){var l=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),i=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==l&&(i!=null&&i.refCount++,l!=null&&xa(l))}function bd(i,r){i=null,r.alternate!==null&&(i=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==i&&(r.refCount++,i!=null&&xa(i))}function Gi(i,r,l,o){var h=(l&335544064)===l;if(r.subtreeFlags&(h?10262:10256))for(r=r.child;r!==null;)V2(i,r,l,o),r=r.sibling;else h&&O2(r)}function V2(i,r,l,o){var h=(l&335544064)===l;h&&r.alternate===null&&r.return!==null&&r.return.alternate!==null&&Qu(r);var d=r.flags;switch(r.tag){case 0:case 11:case 15:Gi(i,r,l,o),d&2048&&Ba(9,r);break;case 1:Gi(i,r,l,o);break;case 3:Gi(i,r,l,o),h&&gd&&(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="")),d&2048&&(d=null,r.alternate!==null&&(d=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==d&&(r.refCount++,d!=null&&xa(d)));break;case 12:if(d&2048){Gi(i,r,l,o),d=r.stateNode;try{var S=r.memoizedProps,x=S.id,M=S.onPostCommit;typeof M=="function"&&M(x,r.alternate===null?"mount":"update",d.passiveEffectDuration,-0)}catch(H){Qe(r,r.return,H)}}else Gi(i,r,l,o);break;case 31:Gi(i,r,l,o);break;case 13:Gi(i,r,l,o);break;case 23:break;case 22:S=r.stateNode,x=r.alternate,r.memoizedState!==null?(h&&x!==null&&x.memoizedState===null&&Qu(x),S._visibility&2?Gi(i,r,l,o):Ia(i,r)):(h&&x!==null&&x.memoizedState!==null&&Qu(r),S._visibility&2?Gi(i,r,l,o):(S._visibility|=2,Sl(i,r,l,o,(r.subtreeFlags&10256)!==0||!1))),d&2048&&Sd(x,r);break;case 24:Gi(i,r,l,o),d&2048&&bd(r.alternate,r);break;case 30:h&&(d=r.alternate,d!==null&&(bn(d.child,!0),bn(r.child,!0))),Gi(i,r,l,o);break;default:Gi(i,r,l,o)}}function Sl(i,r,l,o,h){for(h=h&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var d=i,S=r,x=l,M=o,H=S.flags;switch(S.tag){case 0:case 11:case 15:Sl(d,S,x,M,h),Ba(8,S);break;case 23:break;case 22:var q=S.stateNode;S.memoizedState!==null?q._visibility&2?Sl(d,S,x,M,h):Ia(d,S):(q._visibility|=2,Sl(d,S,x,M,h)),h&&H&2048&&Sd(S.alternate,S);break;case 24:Sl(d,S,x,M,h),h&&H&2048&&bd(S.alternate,S);break;default:Sl(d,S,x,M,h)}r=r.sibling}}function Ia(i,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var l=i,o=r,h=o.flags;switch(o.tag){case 22:Ia(l,o),h&2048&&Sd(o.alternate,o);break;case 24:Ia(l,o),h&2048&&bd(o.alternate,o);break;default:Ia(l,o)}r=r.sibling}}var bs=8192;function ws(i,r,l){if(i.subtreeFlags&bs)for(i=i.child;i!==null;)q2(i,r,l),i=i.sibling}function q2(i,r,l){switch(i.tag){case 26:ws(i,r,l),i.flags&bs&&(i.memoizedState!==null?M9(l,un,i.memoizedState,i.memoizedProps):(i=i.stateNode,(r&335544128)===r&&Zv(l,i)));break;case 5:ws(i,r,l),i.flags&bs&&(i=i.stateNode,(r&335544128)===r&&Zv(l,i));break;case 3:case 4:var o=un;un=Ka(i.stateNode.containerInfo),ws(i,r,l),un=o;break;case 22:i.memoizedState===null&&(o=i.alternate,o!==null&&o.memoizedState!==null?(o=bs,bs=16777216,ws(i,r,l),bs=o):ws(i,r,l));break;case 30:if((i.flags&bs)!==0&&(o=i.memoizedProps.name,o!=null&&o!=="auto")){var h=i.stateNode;h.paired=null,Ri===null&&(Ri=new Map),Ri.set(o,h)}ws(i,r,l);break;default:ws(i,r,l)}}function Y2(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 Pa(i){var r=i.deletions;if((i.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var o=r[l];jt=o,K2(o,i)}Y2(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)$2(i),i=i.sibling}function $2(i){switch(i.tag){case 0:case 11:case 15:Pa(i),i.flags&2048&&Mr(9,i,i.return);break;case 3:Pa(i);break;case 12:Pa(i);break;case 22:var r=i.stateNode;i.memoizedState!==null&&r._visibility&2&&(i.return===null||i.return.tag!==13)?(r._visibility&=-3,ic(i)):Pa(i);break;default:Pa(i)}}function ic(i){var r=i.deletions;if((i.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var o=r[l];jt=o,K2(o,i)}Y2(i)}for(i=i.child;i!==null;){switch(r=i,r.tag){case 0:case 11:case 15:Mr(8,r,r.return),ic(r);break;case 22:l=r.stateNode,l._visibility&2&&(l._visibility&=-3,ic(r));break;default:ic(r)}i=i.sibling}}function K2(i,r){for(;jt!==null;){var l=jt;switch(l.tag){case 0:case 11:case 15:Mr(8,l,r);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var o=l.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:xa(l.memoizedState.cache)}if(o=l.child,o!==null)o.return=l,jt=o;else e:for(l=i;jt!==null;){o=jt;var h=o.sibling,d=o.return;if(B2(o),o===l){jt=null;break e}if(h!==null){h.return=d,jt=h;break e}jt=d}}}var x7={getCacheForType:function(i){var r=Kt(bt),l=r.data.get(i);return l===void 0&&(l=i(),r.data.set(i,l)),l},cacheSignal:function(){return Kt(bt).controller.signal}},C7=typeof WeakMap=="function"?WeakMap:Map,Ke=0,nt=null,Pe=null,Ue=0,Ze=0,Li=null,Ar=!1,bl=!1,wd=!1,tr=0,mt=0,Or=0,xs=0,nc=0,zi=0,wl=0,Fa=null,Si=null,xd=!1,rc=0,W2=0,sc=1/0,lc=null,Rr=null,ht=0,hn=null,Cs=null,En=0,Cd=0,Ed=null,G2=null,xl=null,Cl=null,El=null,Ua=0,ac=null;function Ni(){return(Ke&2)!==0&&Ue!==0?Ue&-Ue:me.T!==null?Nd():Qm()}function X2(){if(zi===0)if((Ue&536870912)===0||Ne){var i=tu;tu<<=1,(tu&3932160)===0&&(tu=262144),zi=i}else zi=536870912;return i=Wt.current,i!==null&&(i.flags|=32),zi}function kl(i,r){if(r!=null){var l=i.stateNode,o=l.ref;o===null&&(o=l.ref=Av(Yn(i.memoizedProps,l))),Cl===null&&(Cl=[]),Cl.push(r.bind(null,o))}}function bi(i,r,l){(i===nt&&(Ze===2||Ze===9)||i.cancelPendingCommit!==null)&&(Tl(i,0),Lr(i,Ue,zi,!1)),ua(i,l),((Ke&2)===0||i!==nt)&&(i===nt&&((Ke&2)===0&&(xs|=l),mt===4&&Lr(i,Ue,zi,!1)),kn(i))}function Z2(i,r,l){if((Ke&6)!==0)throw Error(s(327));var o=!l&&(r&127)===0&&(r&i.expiredLanes)===0||oa(i,r),h=o?T7(i,r):Td(i,r,!0),d=o;do{if(h===0){bl&&!o&&Lr(i,r,0,!1);break}else{if(l=i.current.alternate,d&&!E7(l)){h=Td(i,r,!1),d=!1;continue}if(h===2){if(d=r,i.errorRecoveryDisabledLanes&d)var S=0;else S=i.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){r=S;e:{var x=i;h=Fa;var M=x.current.memoizedState.isDehydrated;if(M&&(Tl(x,S).flags|=256),S=Td(x,S,!1),S!==2&&S!==6){if(wd&&!M){x.errorRecoveryDisabledLanes|=d,xs|=d,h=4;break e}d=Si,Si=h,d!==null&&(Si===null?Si=d:Si.push.apply(Si,d))}h=S}if(d=!1,h!==2)continue}}if(h===1){Tl(i,0),Lr(i,r,0,!0);break}e:{switch(o=i,d=h,d){case 0:case 1:throw Error(s(345));case 4:if((r&4194048)!==r&&(r&62914560)!==r)break;case 6:Lr(o,r,zi,!Ar);break e;case 2:Si=null;break;case 3:case 5:break;default:throw Error(s(329))}if((r&62914560)===r&&(h=rc+300-Yt(),10<h)){if(Lr(o,r,zi,!Ar),nu(o,0,!0)!==0)break e;En=r,o.timeoutHandle=$d(Q2.bind(null,o,l,Si,lc,xd,r,zi,xs,wl,Ar,d,"Throttled",-0,0),h);break e}Q2(o,l,Si,lc,xd,r,zi,xs,wl,Ar,d,null,-0,0)}}break}while(!0);kn(i)}function Q2(i,r,l,o,h,d,S,x,M,H,q,ie,L,F){i.timeoutHandle=-1;var he=r.subtreeFlags,ve=(d&335544064)===d;if(ie=null,(ve||he&8192||(he&16785408)===16785408)&&(ie={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:_n},Ri=null,q2(r,d,ie),ve&&(he=ie,ve=i.containerInfo,ve=(ve.nodeType===9?ve:ve.ownerDocument).__reactViewTransition,ve!=null&&(he.count++,he.waitingForViewTransition=!0,he=Xa.bind(he),ve.finished.then(he,he))),he=(d&62914560)===d?rc-Yt():(d&4194048)===d?W2-Yt():0,he=D9(ie,he),he!==null)){En=d,i.cancelPendingCommit=he(lv.bind(null,i,r,d,l,o,h,S,x,M,H,q,ie,null,L,F)),Lr(i,d,S,!H);return}lv(i,r,d,l,o,h,S,x,M,H,q,ie)}function E7(i){for(var r=i;;){var l=r.tag;if((l===0||l===11||l===15)&&r.flags&16384&&(l=r.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var o=0;o<l.length;o++){var h=l[o],d=h.getSnapshot;h=h.value;try{if(!Ai(d(),h))return!1}catch{return!1}}if(l=r.child,r.subtreeFlags&16384&&l!==null)l.return=r,r=l;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 Lr(i,r,l,o){r=Km(i,r),r&=~nc,r&=~xs,i.suspendedLanes|=r,i.pingedLanes&=~r,o&&(i.warmLanes|=r),o=i.expirationTimes;for(var h=r;0<h;){var d=31-Mi(h),S=1<<d;o[d]=-1,h&=~S}l!==0&&Gm(i,l,r)}function oc(){return(Ke&6)===0?(Va(0),!1):!0}function kd(){if(Pe!==null){if(Ze===0)var i=Pe.return;else i=Pe,Gn=hs=null,zf(i),dl=null,ka=0,i=Pe;for(;i!==null;)b2(i.alternate,i),i=i.return;Pe=null}}function Tl(i,r){var l=i.timeoutHandle;return l!==-1&&(i.timeoutHandle=-1,G7(l)),l=i.cancelPendingCommit,l!==null&&(i.cancelPendingCommit=null,l()),En=0,kd(),nt=i,Pe=l=Kn(i.current,null),Ue=r,Ze=0,Li=null,Ar=!1,bl=oa(i,r),wd=!1,wl=zi=nc=xs=Or=mt=0,Si=Fa=null,xd=!1,tr=Km(i,r),_u(),l}function J2(i,r){Re=null,me.H=Fu,r===fl||r===Tu?(r=lg(),Ze=3):r===bf?(r=lg(),Ze=4):Ze=r===Gf?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Li=r,Pe===null&&(mt=1,Uu(i,Yi(r,i.current)))}function ev(){var i=Wt.current;return i===null?!0:(Ue&4194048)===Ue?ti===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?i===ti:!1}function tv(){var i=me.H;return me.H=Fu,i===null?Fu:i}function iv(){var i=me.A;return me.A=x7,i}function uc(){mt=4,Ar||(Ue&4194048)!==Ue&&Wt.current!==null||(bl=!0),(Or&134217727)===0&&(xs&134217727)===0||nt===null||Lr(nt,Ue,zi,!1)}function Td(i,r,l){var o=Ke;Ke|=2;var h=tv(),d=iv();(nt!==i||Ue!==r)&&(lc=null,Tl(i,r)),r=!1;var S=mt;e:do try{if(Ze!==0&&Pe!==null){var x=Pe,M=Li;switch(Ze){case 8:kd(),S=6;break e;case 3:case 2:case 9:case 6:Wt.current===null&&(r=!0);var H=Ze;if(Ze=0,Li=null,Ml(i,x,M,H),l&&bl){S=0;break e}break;default:H=Ze,Ze=0,Li=null,Ml(i,x,M,H)}}k7(),S=mt;break}catch(q){J2(i,q)}while(!0);return r&&i.shellSuspendCounter++,Gn=hs=null,Ke=o,me.H=h,me.A=d,Pe===null&&(nt=null,Ue=0,_u()),S}function k7(){for(;Pe!==null;)nv(Pe)}function T7(i,r){var l=Ke;Ke|=2;var o=tv(),h=iv();nt!==i||Ue!==r?(lc=null,sc=Yt()+500,Tl(i,r)):bl=oa(i,r);e:do try{if(Ze!==0&&Pe!==null){r=Pe;var d=Li;t:switch(Ze){case 1:Ze=0,Li=null,Ml(i,r,d,1);break;case 2:case 9:if(rg(d)){Ze=0,Li=null,rv(r);break}r=function(){Ze!==2&&Ze!==9||nt!==i||(Ze=7),kn(i)},d.then(r,r);break e;case 3:Ze=7;break e;case 4:Ze=5;break e;case 7:rg(d)?(Ze=0,Li=null,rv(r)):(Ze=0,Li=null,Ml(i,r,d,7));break;case 5:var S=null;switch(Pe.tag){case 26:S=Pe.memoizedState;case 5:case 27:var x=Pe;if(S?Gv(S):x.stateNode.complete){Ze=0,Li=null;var M=x.sibling;if(M!==null)Pe=M;else{var H=x.return;H!==null?(Pe=H,cc(H)):Pe=null}break t}}Ze=0,Li=null,Ml(i,r,d,5);break;case 6:Ze=0,Li=null,Ml(i,r,d,6);break;case 8:kd(),mt=6;break e;default:throw Error(s(462))}}M7();break}catch(q){J2(i,q)}while(!0);return Gn=hs=null,me.H=o,me.A=h,Ke=l,Pe!==null?0:(nt=null,Ue=0,_u(),mt)}function M7(){for(;Pe!==null&&!is();)nv(Pe)}function nv(i){var r=y2(i.alternate,i,tr);i.memoizedProps=i.pendingProps,r===null?cc(i):Pe=r}function rv(i){var r=i,l=r.alternate;switch(r.tag){case 15:case 0:r=f2(l,r,r.pendingProps,r.type,void 0,Ue);break;case 11:r=f2(l,r,r.pendingProps,r.type.render,r.ref,Ue);break;case 5:zf(r);var o=r;o===Nt&&(Ne?(wu(o),o.tag===5&&o.stateNode!=null&&(lt=o.stateNode)):(wu(o),Ne=!0));default:b2(l,r),r=Pe=K_(r,tr),r=y2(l,r,tr)}i.memoizedProps=i.pendingProps,r===null?cc(i):Pe=r}function Ml(i,r,l,o){Gn=hs=null,zf(r),dl=null,ka=0;var h=r.return;try{if(m7(i,h,r,l,Ue)){mt=1,Uu(i,Yi(l,i.current)),Pe=null;return}}catch(d){if(h!==null)throw Pe=h,d;mt=1,Uu(i,Yi(l,i.current)),Pe=null;return}r.flags&32768?(Ne||o===1?i=!0:bl||(Ue&536870912)!==0?i=!1:(Ar=i=!0,(o===2||o===9||o===3||o===6)&&(o=Wt.current,o!==null&&o.tag===13&&(o.flags|=16384))),sv(r,i)):cc(r)}function cc(i){var r=i;do{if((r.flags&32768)!==0){sv(r,Ar);return}i=r.return;var l=y7(r.alternate,r,tr);if(l!==null){Pe=l;return}if(r=r.sibling,r!==null){Pe=r;return}Pe=r=i}while(r!==null);mt===0&&(mt=5)}function sv(i,r){do{var l=S7(i.alternate,i);if(l!==null){l.flags&=32767,Pe=l;return}if(l=i.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!r&&(i=i.sibling,i!==null)){Pe=i;return}Pe=i=l}while(i!==null);mt=6,Pe=null}function lv(i,r,l,o,h,d,S,x,M,H,q,ie){i.cancelPendingCommit=null;do hc();while(ht!==0);if((Ke&6)!==0)throw Error(s(327));if(r!==null){if(r===i.current)throw Error(s(177));i===nt&&(Pe=nt=null,Ue=0),Cs=r,hn=i,En=l,Ed=h,G2=o,D7(i,r,l,S,x,M,ie)}}function D7(i,r,l,o,h,d,S){var x=r.lanes|r.childLanes;if(Cd=x,x|=of,tb(i,l,x,o,h,d),Cl=null,(l&335544064)===l?(El=n7(i),o=10262):(El=null,o=10256),(r.subtreeFlags&o)!==0||(r.flags&o)!==0?(i.callbackNode=null,i.callbackPriority=0,N7(Jo,function(){return Od(),null})):(i.callbackNode=null,i.callbackPriority=0),Xu=!1,o=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||o){o=me.T,me.T=null,h=ye.p,ye.p=2,d=Ke,Ke|=4;try{b7(i,r,l)}finally{Ke=d,ye.p=h,me.T=o}}ht=1,Xu?xl=t9(S,i.containerInfo,El,Md,Dd,O7,Ad,Od,A7):(Md(),Dd(),Ad())}function A7(i){if(ht!==0){var r=hn.onRecoverableError;r(i,{componentStack:null})}}function O7(){ht===3&&(ht=0,U2(Cs,hn),ht=4)}function Md(){if(ht===1){ht=0;var i=hn,r=Cs,l=En,o=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||o){o=me.T,me.T=null;var h=ye.p;ye.p=2;var d=Ke;Ke|=4;try{Ha=Ju=!1,P2(r,i,l),l=Vd;var S=j_(i.containerInfo),x=l.focusedElem,M=l.selectionRange;if(S!==x&&x&&x.ownerDocument&&B_(x.ownerDocument.documentElement,x)){if(M!==null&&nf(x)){var H=M.start,q=M.end;if(q===void 0&&(q=H),"selectionStart"in x)x.selectionStart=H,x.selectionEnd=Math.min(q,x.value.length);else{var ie=x.ownerDocument||document,L=ie&&ie.defaultView||window;if(L.getSelection){var F=L.getSelection(),he=x.textContent.length,ve=Math.min(M.start,he),Le=M.end===void 0?ve:Math.min(M.end,he);!F.extend&&ve>Le&&(S=Le,Le=ve,ve=S);var j=N_(x,ve),R=N_(x,Le);if(j&&R&&(F.rangeCount!==1||F.anchorNode!==j.node||F.anchorOffset!==j.offset||F.focusNode!==R.node||F.focusOffset!==R.offset)){var I=ie.createRange();I.setStart(j.node,j.offset),F.removeAllRanges(),ve>Le?(F.addRange(I),F.extend(R.node,R.offset)):(I.setEnd(R.node,R.offset),F.addRange(I))}}}}for(ie=[],F=x;F=F.parentNode;)F.nodeType===1&&ie.push({element:F,left:F.scrollLeft,top:F.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<ie.length;x++){var te=ie[x];te.element.scrollLeft=te.left,te.element.scrollTop=te.top}}Bl=!!Ud,Vd=Ud=null}finally{Ke=d,ye.p=h,me.T=o}}i.current=r,ht=2}}function Dd(){if(ht===2){ht=0;var i=hn,r=Cs,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=me.T,me.T=null;var o=ye.p;ye.p=2;var h=Ke;Ke|=4;try{z2(i,r.alternate,r)}finally{Ke=h,ye.p=o,me.T=l}}ht=3}}function Ad(){if(ht===4||ht===3){ht=0;var i=xl;xl=null,Qo();var r=hn,l=Cs,o=En,h=G2,d=(o&335544064)===o?10262:10256;if((l.subtreeFlags&d)!==0||(l.flags&d)!==0?ht=5:(ht=0,Cs=hn=null,av(r,r.pendingLanes)),d=r.pendingLanes,d===0&&(Rr=null),Hh(o),l=l.stateNode,Ti&&typeof Ti.onCommitFiberRoot=="function")try{Ti.onCommitFiberRoot(aa,l,void 0,(l.current.flags&128)===128)}catch{}if(h!==null){l=me.T,d=ye.p,ye.p=2,me.T=null;try{for(var S=r.onRecoverableError,x=0;x<h.length;x++){var M=h[x];S(M.value,{componentStack:M.stack})}}finally{me.T=l,ye.p=d}}if(h=Cl,S=El,El=null,h!==null&&(Cl=null,S===null&&(S=[]),i!==null))for(M=0;M<h.length;M++)l=(0,h[M])(S),l!==void 0&&i.finished.finally(l);(En&3)!==0&&hc(),kn(r),d=r.pendingLanes,(o&261930)!==0&&(d&42)!==0?r===ac?Ua++:(Ua=0,ac=r):(Ua=0,ac=null),Va(0)}}function av(i,r){(i.pooledCacheLanes&=r)===0&&(r=i.pooledCache,r!=null&&(i.pooledCache=null,xa(r)))}function hc(){return xl!==null&&(xl.skipTransition(),xl=null),Md(),Dd(),Ad(),Od()}function Od(){if(ht!==5)return!1;var i=hn,r=Cd;Cd=0;var l=Hh(En),o=me.T,h=ye.p;try{ye.p=32>l?32:l,me.T=null,l=Ed,Ed=null;var d=hn,S=En;if(ht=0,Cs=hn=null,En=0,(Ke&6)!==0)throw Error(s(331));var x=Ke;if(Ke|=4,$2(d.current),V2(d,d.current,S,l),Ke=x,Va(0,!1),Ti&&typeof Ti.onPostCommitFiberRoot=="function")try{Ti.onPostCommitFiberRoot(aa,d)}catch{}return!0}finally{ye.p=h,me.T=o,av(i,r)}}function ov(i,r,l){r=Yi(l,r),r=Wf(i.stateNode,r,2),i=Cr(i,r,2),i!==null&&(ua(i,2),kn(i))}function Qe(i,r,l){if(i.tag===3)ov(i,i,l);else for(;r!==null;){if(r.tag===3){ov(r,i,l);break}else if(r.tag===1){var o=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Rr===null||!Rr.has(o))){i=Yi(l,i),l=r2(2),o=Cr(r,l,2),o!==null&&(s2(l,o,r,i),ua(o,2),kn(o));break}}r=r.return}}function Rd(i,r,l){var o=i.pingCache;if(o===null){o=i.pingCache=new C7;var h=new Set;o.set(r,h)}else h=o.get(r),h===void 0&&(h=new Set,o.set(r,h));h.has(l)||(wd=!0,h.add(l),i=R7.bind(null,i,r,l),r.then(i,i))}function R7(i,r,l){var o=i.pingCache;o!==null&&o.delete(r),i.pingedLanes|=i.suspendedLanes&l,i.warmLanes&=~l,nt===i&&(Ue&l)===l&&((mt===4||mt===3&&(Ue&62914560)===Ue&&300>Yt()-rc)&&(Ke&2)===0?Tl(i,0):nc|=l,wl===Ue&&(wl=0)),kn(i)}function uv(i,r){r===0&&(r=Wm()),i=os(i,r),i!==null&&(ua(i,r),kn(i))}function L7(i){var r=i.memoizedState,l=0;r!==null&&(l=r.retryLane),uv(i,l)}function z7(i,r){var l=0;switch(i.tag){case 31:case 13:var o=i.stateNode,h=i.memoizedState;h!==null&&(l=h.retryLane);break;case 19:o=i.stateNode;break;case 22:o=i.stateNode._retryCache;break;default:throw Error(s(314))}o!==null&&o.delete(r),uv(i,l)}function N7(i,r){return In(i,r)}var Dl=null,Al=null,Ld=!1,fc=!1,zd=!1,zr=0;function kn(i){i!==Al&&i.next===null&&(Al===null?Dl=Al=i:Al=Al.next=i),fc=!0,Ld||(Ld=!0,j7())}function Va(i,r){if(!zd&&fc){zd=!0;do for(var l=!1,o=Dl;o!==null;){if(i!==0){var h=o.pendingLanes;if(h===0)var d=0;else{var S=o.suspendedLanes,x=o.pingedLanes;d=(1<<31-Mi(42|i)+1)-1,d&=h&~(S&~x),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(l=!0,dv(o,d))}else d=Ue,d=nu(o,o===nt?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(d&3)===0||oa(o,d)||(l=!0,dv(o,d));o=o.next}while(l);zd=!1}}function B7(){cv()}function cv(){fc=Ld=!1;var i=0;zr!==0&&W7()&&(i=zr);for(var r=Yt(),l=null,o=Dl;o!==null;){var h=o.next,d=hv(o,r);d===0?(o.next=null,l===null?Dl=h:l.next=h,h===null&&(Al=l)):(l=o,(i!==0||(d&3)!==0)&&(fc=!0)),o=h}ht!==0&&ht!==5||Va(i),zr!==0&&(zr=0)}function hv(i,r){for(var l=i.suspendedLanes,o=i.pingedLanes,h=i.expirationTimes,d=i.pendingLanes&-62914561;0<d;){var S=31-Mi(d),x=1<<S,M=h[S];M===-1?((x&l)===0||(x&o)!==0)&&(h[S]=eb(x,r)):M<=r&&(i.expiredLanes|=x),d&=~x}if(r=nt,l=Ue,l=nu(i,i===r?l:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),o=i.callbackNode,l===0||i===r&&(Ze===2||Ze===9)||i.cancelPendingCommit!==null)return o!==null&&o!==null&&Pn(o),i.callbackNode=null,i.callbackPriority=0;if((l&3)===0||oa(i,l)){if(r=l&-l,r===i.callbackPriority)return r;switch(o!==null&&Pn(o),Hh(l)){case 2:case 8:l=Ui;break;case 32:l=Jo;break;case 268435456:l=$m;break;default:l=Jo}return o=fv.bind(null,i),l=In(l,o),i.callbackPriority=r,i.callbackNode=l,r}return o!==null&&o!==null&&Pn(o),i.callbackPriority=2,i.callbackNode=null,2}function fv(i,r){if(ht!==0&&ht!==5)return i.callbackNode=null,i.callbackPriority=0,null;var l=i.callbackNode;if(hc()&&i.callbackNode!==l)return null;var o=Ue;return o=nu(i,i===nt?o:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),o===0?null:(Z2(i,o,r),hv(i,Yt()),i.callbackNode!=null&&i.callbackNode===l?fv.bind(null,i):null)}function dv(i,r){if(hc())return null;Z2(i,r,!0)}function j7(){X7(function(){(Ke&6)!==0?In(Fn,B7):cv()})}function Nd(){if(zr===0){var i=ps;i===0&&(i=eu,eu<<=1,(eu&261888)===0&&(eu=256)),zr=i}return zr}function pv(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:ou(i)}function H7(i,r,l,o,h){if(r==="submit"&&l&&l.stateNode===h){var d=pv((h[_i]||null).action),S=o.submitter;S&&(r=(r=S[_i]||null)?pv(r.formAction):S.getAttribute("formAction"),r!==null&&(d=r,S=null));var x=new fu("action","action",null,o,h);i.push({event:x,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(zr!==0){var M=new FormData(h,S);Vf(l,{pending:!0,data:M,method:h.method,action:d},null,M)}}else typeof d=="function"&&(x.preventDefault(),M=new FormData(h,S),Vf(l,{pending:!0,data:M,method:h.method,action:d},d,M))},currentTarget:h}]})}}for(var Bd=0;Bd<af.length;Bd++){var jd=af[Bd],I7=jd.toLowerCase(),P7=jd[0].toUpperCase()+jd.slice(1);an(I7,"on"+P7)}an(P_,"onAnimationEnd"),an(F_,"onAnimationIteration"),an(U_,"onAnimationStart"),an("dblclick","onDoubleClick"),an("focusin","onFocus"),an("focusout","onBlur"),an(Gb,"onTransitionRun"),an(Xb,"onTransitionStart"),an(Zb,"onTransitionCancel"),an(V_,"onTransitionEnd"),Qs("onMouseEnter",["mouseout","mouseover"]),Qs("onMouseLeave",["mouseout","mouseover"]),Qs("onPointerEnter",["pointerout","pointerover"]),Qs("onPointerLeave",["pointerout","pointerover"]),ss("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ss("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ss("onBeforeInput",["compositionend","keypress","textInput","paste"]),ss("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ss("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ss("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qa="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(" "),F7=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(qa));function mv(i,r){r=(r&4)!==0;for(var l=0;l<i.length;l++){var o=i[l],h=o.event;o=o.listeners;e:{var d=void 0;if(r)for(var S=o.length-1;0<=S;S--){var x=o[S],M=x.instance,H=x.currentTarget;if(x=x.listener,M!==d&&h.isPropagationStopped())break e;d=x,h.currentTarget=H;try{d(h)}catch(q){mu(q)}h.currentTarget=null,d=M}else for(S=0;S<o.length;S++){if(x=o[S],M=x.instance,H=x.currentTarget,x=x.listener,M!==d&&h.isPropagationStopped())break e;d=x,h.currentTarget=H;try{d(h)}catch(q){mu(q)}h.currentTarget=null,d=M}}}}function Fe(i,r){var l=r[e_];l===void 0&&(l=r[e_]=new Set);var o=i+"__bubble";l.has(o)||(_v(r,i,2,!1),l.add(o))}function Hd(i,r,l){var o=0;r&&(o|=4),_v(l,i,o,r)}var dc="_reactListening"+Math.random().toString(36).slice(2);function Id(i){if(!i[dc]){i[dc]=!0,n_.forEach(function(l){l!=="selectionchange"&&(F7.has(l)||Hd(l,!1,i),Hd(l,!0,i))});var r=i.nodeType===9?i:i.ownerDocument;r===null||r[dc]||(r[dc]=!0,Hd("selectionchange",!1,r))}}function _v(i,r,l,o){switch(s3(r)){case 2:var h=L9;break;case 8:h=z9;break;default:h=s1}l=h.bind(null,r,l,i),h=void 0,!$h||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(h=!0),o?h!==void 0?i.addEventListener(r,l,{capture:!0,passive:h}):i.addEventListener(r,l,!0):h!==void 0?i.addEventListener(r,l,{passive:h}):i.addEventListener(r,l,!1)}function Pd(i,r,l,o,h){var d=o;if((r&1)===0&&(r&2)===0&&o!==null)e:for(;;){if(o===null)return;var S=o.tag;if(S===3||S===4){var x=o.stateNode.containerInfo;if(x===h)break;if(S===4)for(S=o.return;S!==null;){var M=S.tag;if((M===3||M===4)&&S.stateNode.containerInfo===h)return;S=S.return}for(;x!==null;){if(S=rs(x),S===null)return;if(M=S.tag,M===5||M===6||M===26||M===27){o=d=S;continue e}x=x.parentNode}}o=o.return}__(function(){var H=d,q=qh(l),ie=[];e:{var L=q_.get(i);if(L!==void 0){var F=fu,he=i;switch(i){case"keypress":if(cu(l)===0)break e;case"keydown":case"keyup":F=Eb;break;case"focusin":he="focus",F=Xh;break;case"focusout":he="blur",F=Xh;break;case"beforeblur":case"afterblur":F=Xh;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":F=y_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":F=db;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":F=Ab;break;case P_:case F_:case U_:F=_b;break;case V_:F=Rb;break;case"scroll":case"scrollend":F=hb;break;case"wheel":F=zb;break;case"copy":case"cut":case"paste":F=vb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":F=b_;break;case"submit":F=Mb;break;case"toggle":case"beforetoggle":F=Bb}var ve=(r&4)!==0,Le=!ve&&(i==="scroll"||i==="scrollend"),j=ve?L!==null?L+"Capture":null:L;ve=[];for(var R=H,I;R!==null;){var te=R;if(I=te.stateNode,te=te.tag,te!==5&&te!==26&&te!==27||I===null||j===null||(te=fa(R,j),te!=null&&ve.push(Ya(R,te,I))),Le)break;R=R.return}0<ve.length&&(L=new F(L,he,null,l,q),ie.push({event:L,listeners:ve}))}}if((r&7)===0){e:{if(F=i==="mouseover"||i==="pointerover",L=i==="mouseout"||i==="pointerout",F&&l!==Vh&&(he=l.relatedTarget||l.fromElement)&&(rs(he)||he[Gs]))break e;(L||F)&&(he=q.window===q?q:(F=q.ownerDocument)?F.defaultView||F.parentWindow:window,L?(F=l.relatedTarget||l.toElement,L=H,F=F?rs(F):null,F!==null&&(Le=u(F),ve=F.tag,F!==Le||ve!==5&&ve!==27&&ve!==6)&&(F=null)):(L=null,F=H),L!==F&&(ve=y_,te="onMouseLeave",j="onMouseEnter",R="mouse",(i==="pointerout"||i==="pointerover")&&(ve=b_,te="onPointerLeave",j="onPointerEnter",R="pointer"),Le=L==null?he:ha(L),I=F==null?he:ha(F),he=new ve(te,R+"leave",L,l,q),he.target=Le,he.relatedTarget=I,te=null,rs(q)===H&&(ve=new ve(j,R+"enter",F,l,q),ve.target=I,ve.relatedTarget=Le,te=ve),Le=te,ve=L&&F?z(L,F,U7):null,L!==null&&gv(ie,he,L,ve,!1),F!==null&&Le!==null&&gv(ie,Le,F,ve,!0)))}e:{if(L=H?ha(H):window,F=L.nodeName&&L.nodeName.toLowerCase(),F==="select"||F==="input"&&L.type==="file")var _e=D_;else if(T_(L))if(A_)_e=$b;else{_e=qb;var Ve=Vb}else F=L.nodeName,!F||F.toLowerCase()!=="input"||L.type!=="checkbox"&&L.type!=="radio"?H&&Uh(H.elementType)&&(_e=D_):_e=Yb;if(_e&&(_e=_e(i,H))){M_(ie,_e,l,q);break e}Ve&&Ve(i,L,H)}switch(Ve=H?ha(H):window,i){case"focusin":(T_(Ve)||Ve.contentEditable==="true")&&(rl=Ve,rf=H,Sa=null);break;case"focusout":Sa=rf=rl=null;break;case"mousedown":sf=!0;break;case"contextmenu":case"mouseup":case"dragend":sf=!1,H_(ie,l,q);break;case"selectionchange":if(Wb)break;case"keydown":case"keyup":H_(ie,l,q)}var Se;if(Qh)e:{switch(i){case"compositionstart":var Ce="onCompositionStart";break e;case"compositionend":Ce="onCompositionEnd";break e;case"compositionupdate":Ce="onCompositionUpdate";break e}Ce=void 0}else nl?E_(i,l)&&(Ce="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(Ce="onCompositionStart");Ce&&(w_&&l.locale!=="ko"&&(nl||Ce!=="onCompositionStart"?Ce==="onCompositionEnd"&&nl&&(Se=g_()):(mr=q,Kh="value"in mr?mr.value:mr.textContent,nl=!0)),Ve=pc(H,Ce),0<Ve.length&&(Ce=new S_(Ce,i,null,l,q),ie.push({event:Ce,listeners:Ve}),Se?Ce.data=Se:(Se=k_(l),Se!==null&&(Ce.data=Se)))),(Se=Hb?Ib(i,l):Pb(i,l))&&(Ce=pc(H,"onBeforeInput"),0<Ce.length&&(Ve=new S_("onBeforeInput","beforeinput",null,l,q),ie.push({event:Ve,listeners:Ce}),Ve.data=Se)),H7(ie,i,H,l,q)}mv(ie,r)})}function Ya(i,r,l){return{instance:i,listener:r,currentTarget:l}}function pc(i,r){for(var l=r+"Capture",o=[];i!==null;){var h=i,d=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||d===null||(h=fa(i,l),h!=null&&o.unshift(Ya(i,h,d)),h=fa(i,r),h!=null&&o.push(Ya(i,h,d))),i.tag===3)return o;i=i.return}return[]}function U7(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function gv(i,r,l,o,h){for(var d=r._reactName,S=[];l!==null&&l!==o;){var x=l,M=x.alternate,H=x.stateNode;if(x=x.tag,M!==null&&M===o)break;x!==5&&x!==26&&x!==27||H===null||(M=H,h?(H=fa(l,d),H!=null&&S.unshift(Ya(l,H,M))):h||(H=fa(l,d),H!=null&&S.push(Ya(l,H,M)))),l=l.return}S.length!==0&&i.push({event:r,listeners:S})}var V7=/\r\n?/g,q7=/\u0000|\uFFFD/g;function vv(i){return(typeof i=="string"?i:""+i).replace(V7,`
10
- `).replace(q7,"")}function yv(i,r){return r=vv(r),vv(i)===r}function Je(i,r,l,o,h,d){switch(l){case"children":if(typeof o=="string")r==="body"||r==="textarea"&&o===""||el(i,o);else if(typeof o=="number"||typeof o=="bigint")r!=="body"&&el(i,""+o);else return;break;case"className":au(i,"class",o);break;case"tabIndex":au(i,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":au(i,l,o);break;case"style":p_(i,o,d);return;case"data":if(r!=="object"){au(i,"data",o);break}case"src":case"href":if(o===""&&(r!=="a"||l!=="href")){i.removeAttribute(l);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){i.removeAttribute(l);break}o=ou(o),i.setAttribute(l,o);break;case"action":case"formAction":if(typeof o=="function"){i.setAttribute(l,"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 d=="function"&&(l==="formAction"?(r!=="input"&&Je(i,r,"name",h.name,h,null),Je(i,r,"formEncType",h.formEncType,h,null),Je(i,r,"formMethod",h.formMethod,h,null),Je(i,r,"formTarget",h.formTarget,h,null)):(Je(i,r,"encType",h.encType,h,null),Je(i,r,"method",h.method,h,null),Je(i,r,"target",h.target,h,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){i.removeAttribute(l);break}o=ou(o),i.setAttribute(l,o);break;case"onClick":o!=null&&(i.onclick=_n);return;case"onScroll":o!=null&&Fe("scroll",i);return;case"onScrollEnd":o!=null&&Fe("scrollend",i);return;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(s(61));if(l=o.__html,l!=null){if(h.children!=null)throw Error(s(60));d?.__html!==l&&(i.innerHTML=l)}}break;case"multiple":i.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":i.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){i.removeAttribute("xlink:href");break}l=ou(o),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?i.setAttribute(l,o):i.removeAttribute(l);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":o&&typeof o!="function"&&typeof o!="symbol"?i.setAttribute(l,""):i.removeAttribute(l);break;case"capture":case"download":o===!0?i.setAttribute(l,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?i.setAttribute(l,o):i.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?i.setAttribute(l,o):i.removeAttribute(l);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?i.removeAttribute(l):i.setAttribute(l,o);break;case"popover":Fe("beforetoggle",i),Fe("toggle",i),lu(i,"popover",o);break;case"xlinkActuate":Vn(i,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Vn(i,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Vn(i,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Vn(i,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Vn(i,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Vn(i,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Vn(i,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Vn(i,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Vn(i,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":lu(i,"is",o);break;case"innerText":case"textContent":return;default:if(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")l=ub.get(l)||l,lu(i,l,o);else return}Ye=!0}function Fd(i,r,l,o,h,d){switch(l){case"style":p_(i,o,d);return;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(s(61));if(l=o.__html,l!=null){if(h.children!=null)throw Error(s(60));d?.__html!==l&&(i.innerHTML=l)}}break;case"children":if(typeof o=="string")el(i,o);else if(typeof o=="number"||typeof o=="bigint")el(i,""+o);else return;break;case"onScroll":o!=null&&Fe("scroll",i);return;case"onScrollEnd":o!=null&&Fe("scrollend",i);return;case"onClick":o!=null&&(i.onclick=_n);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!r_.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(h=l.endsWith("Capture"),d=l.slice(2,h?l.length-7:void 0),r=i[_i]||null,r=r!=null?r[l]:null,typeof r=="function"&&i.removeEventListener(d,r,h),typeof o=="function")){typeof r!="function"&&r!==null&&(l in i?i[l]=null:i.hasAttribute(l)&&i.removeAttribute(l)),i.addEventListener(d,o,h);break e}Ye=!0,l in i?i[l]=o:o===!0?i.setAttribute(l,""):lu(i,l,o)}return}Ye=!0}function Zt(i,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Fe("error",i),Fe("load",i);var o=!1,h=!1,d;for(d in l)if(l.hasOwnProperty(d)){var S=l[d];if(S!=null)switch(d){case"src":o=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:Je(i,r,d,S,l,null)}}h&&Je(i,r,"srcSet",l.srcSet,l,null),o&&Je(i,r,"src",l.src,l,null);return;case"input":Fe("invalid",i);var x=d=S=h=null,M=null,H=null;for(o in l)if(l.hasOwnProperty(o)){var q=l[o];if(q!=null)switch(o){case"name":h=q;break;case"type":S=q;break;case"checked":M=q;break;case"defaultChecked":H=q;break;case"value":d=q;break;case"defaultValue":x=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(s(137,r));break;default:Je(i,r,o,q,l,null)}}c_(i,d,x,M,H,S,h,!1);return;case"select":Fe("invalid",i),o=S=d=null;for(h in l)if(l.hasOwnProperty(h)&&(x=l[h],x!=null))switch(h){case"value":d=x;break;case"defaultValue":S=x;break;case"multiple":o=x;default:Je(i,r,h,x,l,null)}r=d,l=S,i.multiple=!!o,r!=null?Js(i,!!o,r,!1):l!=null&&Js(i,!!o,l,!0);return;case"textarea":Fe("invalid",i),d=h=o=null;for(S in l)if(l.hasOwnProperty(S)&&(x=l[S],x!=null))switch(S){case"value":o=x;break;case"defaultValue":h=x;break;case"children":d=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(s(91));break;default:Je(i,r,S,x,l,null)}f_(i,o,h,d);return;case"option":for(M in l)l.hasOwnProperty(M)&&(o=l[M],o!=null)&&(M==="selected"?i.selected=o&&typeof o!="function"&&typeof o!="symbol":Je(i,r,M,o,l,null));return;case"dialog":Fe("beforetoggle",i),Fe("toggle",i),Fe("cancel",i),Fe("close",i);break;case"iframe":case"object":Fe("load",i);break;case"video":case"audio":for(o=0;o<qa.length;o++)Fe(qa[o],i);break;case"image":Fe("error",i),Fe("load",i);break;case"details":Fe("toggle",i);break;case"embed":case"source":case"link":Fe("error",i),Fe("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(H in l)if(l.hasOwnProperty(H)&&(o=l[H],o!=null))switch(H){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:Je(i,r,H,o,l,null)}return;default:if(Uh(r)){for(q in l)l.hasOwnProperty(q)&&(o=l[q],o!==void 0&&Fd(i,r,q,o,l,void 0));return}}for(x in l)l.hasOwnProperty(x)&&(o=l[x],o!=null&&Je(i,r,x,o,l,null))}var Y7={};function $7(i,r,l,o){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,d=null,S=null,x=null,M=null,H=null,q=null;for(F in l){var ie=l[F];if(l.hasOwnProperty(F)&&ie!=null)switch(F){case"checked":break;case"value":break;case"defaultValue":M=ie;default:o.hasOwnProperty(F)||Je(i,r,F,null,o,ie)}}for(var L in o){var F=o[L];if(ie=l[L],o.hasOwnProperty(L)&&(F!=null||ie!=null))switch(L){case"type":F!==ie&&(Ye=!0),d=F;break;case"name":F!==ie&&(Ye=!0),h=F;break;case"checked":F!==ie&&(Ye=!0),H=F;break;case"defaultChecked":F!==ie&&(Ye=!0),q=F;break;case"value":F!==ie&&(Ye=!0),S=F;break;case"defaultValue":F!==ie&&(Ye=!0),x=F;break;case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(s(137,r));break;default:F!==ie&&Je(i,r,L,F,o,ie)}}Ph(i,S,x,M,H,q,d,h);return;case"select":F=S=x=L=null;for(d in l)if(M=l[d],l.hasOwnProperty(d)&&M!=null)switch(d){case"value":break;case"multiple":F=M;default:o.hasOwnProperty(d)||Je(i,r,d,null,o,M)}for(h in o)if(d=o[h],M=l[h],o.hasOwnProperty(h)&&(d!=null||M!=null))switch(h){case"value":d!==M&&(Ye=!0),L=d;break;case"defaultValue":d!==M&&(Ye=!0),x=d;break;case"multiple":d!==M&&(Ye=!0),S=d;default:d!==M&&Je(i,r,h,d,o,M)}r=x,l=S,o=F,L!=null?Js(i,!!l,L,!1):!!o!=!!l&&(r!=null?Js(i,!!l,r,!0):Js(i,!!l,l?[]:"",!1));return;case"textarea":F=L=null;for(x in l)if(h=l[x],l.hasOwnProperty(x)&&h!=null&&!o.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:Je(i,r,x,null,o,h)}for(S in o)if(h=o[S],d=l[S],o.hasOwnProperty(S)&&(h!=null||d!=null))switch(S){case"value":h!==d&&(Ye=!0),L=h;break;case"defaultValue":h!==d&&(Ye=!0),F=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(s(91));break;default:h!==d&&Je(i,r,S,h,o,d)}h_(i,L,F);return;case"option":for(var he in l)L=l[he],l.hasOwnProperty(he)&&L!=null&&!o.hasOwnProperty(he)&&(he==="selected"?i.selected=!1:Je(i,r,he,null,o,L));for(M in o)L=o[M],F=l[M],o.hasOwnProperty(M)&&L!==F&&(L!=null||F!=null)&&(M==="selected"?(L!==F&&(Ye=!0),i.selected=L&&typeof L!="function"&&typeof L!="symbol"):Je(i,r,M,L,o,F));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 ve in l)L=l[ve],l.hasOwnProperty(ve)&&L!=null&&!o.hasOwnProperty(ve)&&Je(i,r,ve,null,o,L);for(H in o)if(L=o[H],F=l[H],o.hasOwnProperty(H)&&L!==F&&(L!=null||F!=null))switch(H){case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(s(137,r));break;default:Je(i,r,H,L,o,F)}return;default:if(Uh(r)){for(var Le in l)L=l[Le],l.hasOwnProperty(Le)&&L!==void 0&&!o.hasOwnProperty(Le)&&Fd(i,r,Le,void 0,o,L);for(q in o)L=o[q],F=l[q],!o.hasOwnProperty(q)||L===F||L===void 0&&F===void 0||Fd(i,r,q,L,o,F);return}}for(var j in l)L=l[j],l.hasOwnProperty(j)&&L!=null&&!o.hasOwnProperty(j)&&Je(i,r,j,null,o,L);for(ie in o)L=o[ie],F=l[ie],!o.hasOwnProperty(ie)||L===F||L==null&&F==null||Je(i,r,ie,L,o,F)}function Sv(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function K7(){if(typeof performance.getEntriesByType=="function"){for(var i=0,r=0,l=performance.getEntriesByType("resource"),o=0;o<l.length;o++){var h=l[o],d=h.transferSize,S=h.initiatorType,x=h.duration;if(d&&x&&Sv(S)){for(S=0,x=h.responseEnd,o+=1;o<l.length;o++){var M=l[o],H=M.startTime;if(H>x)break;var q=M.transferSize,ie=M.initiatorType;q&&Sv(ie)&&(M=M.responseEnd,S+=q*(M<x?1:(x-H)/(M-H)))}if(--o,r+=8*(d+S)/(h.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 Ud=null,Vd=null;function $a(i){return i.nodeType===9?i:i.ownerDocument}function bv(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 wv(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 xv(i,r,l,o){return l=$a(l).createElement(i),l[$t]=o,l[_i]=r,Zt(l,i,r),zt(l),l}function qd(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 Yd=null;function W7(){var i=window.event;return i&&i.type==="popstate"?i===Yd?!1:(Yd=i,!0):(Yd=null,!1)}var $d=typeof setTimeout=="function"?setTimeout:void 0,G7=typeof clearTimeout=="function"?clearTimeout:void 0,Cv=typeof Promise=="function"?Promise:void 0,Ev=typeof requestAnimationFrame=="function"?requestAnimationFrame:$d,X7=typeof queueMicrotask=="function"?queueMicrotask:typeof Cv<"u"?function(i){return Cv.resolve(null).then(i).catch(Z7)}:$d;function Z7(i){setTimeout(function(){throw i})}function Nr(i){return i==="head"}function kv(i,r){var l=r,o=0;do{var h=l.nextSibling;if(i.removeChild(l),h&&h.nodeType===8)if(l=h.data,l==="/$"||l==="/&"){if(o===0){i.removeChild(h),jl(r);return}o--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")o++;else if(l==="html")e1(i.ownerDocument.documentElement);else if(l==="head"){l=i.ownerDocument.head,e1(l);for(var d=l.firstChild;d;){var S=d.nextSibling,x=d.nodeName;d[ca]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&d.rel.toLowerCase()==="stylesheet"||l.removeChild(d),d=S}}else l==="body"&&e1(i.ownerDocument.body);l=h}while(l);jl(r)}function Tv(i,r){var l=i;i=0;do{var o=l.nextSibling;if(l.nodeType===1?r?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(r?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),o&&o.nodeType===8)if(l=o.data,l==="/$"){if(i===0)break;i--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||i++;l=o}while(l)}function Mv(i,r,l){if(r=CSS.escape(r)!==r?"r-"+btoa(r).replace(/=/g,""):r,i.style.viewTransitionName=r,l!=null&&(i.style.viewTransitionClass=l),l=getComputedStyle(i),l.display==="inline"){if(r=i.getClientRects(),r.length===1)var o=1;else for(var h=o=0;h<r.length;h++){var d=r[h];0<d.width&&0<d.height&&o++}o===1&&(i=i.style,i.display=r.length===1?"inline-block":"block",i.marginTop="-"+l.paddingTop,i.marginBottom="-"+l.paddingBottom)}}function Dv(i,r){i=i.style,r=r.style;var l=r!=null?r.hasOwnProperty("viewTransitionName")?r.viewTransitionName:r.hasOwnProperty("view-transition-name")?r["view-transition-name"]:null:null;i.viewTransitionName=l==null||typeof l=="boolean"?"":(""+l).trim(),l=r!=null?r.hasOwnProperty("viewTransitionClass")?r.viewTransitionClass:r.hasOwnProperty("view-transition-class")?r["view-transition-class"]:null:null,i.viewTransitionClass=l==null||typeof l=="boolean"?"":(""+l).trim(),i.display==="inline-block"&&(r==null?i.display=i.margin="":(l=r.display,i.display=l==null||typeof l=="boolean"?"":l,l=r.margin,l!=null?i.margin=l:(l=r.hasOwnProperty("marginTop")?r.marginTop:r["margin-top"],i.marginTop=l==null||typeof l=="boolean"?"":l,r=r.hasOwnProperty("marginBottom")?r.marginBottom:r["margin-bottom"],i.marginBottom=r==null||typeof r=="boolean"?"":r)))}function Q7(i,r,l){return l=l.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<=l.innerHeight&&i.left<=l.innerWidth}}function Kd(i){var r=i.getBoundingClientRect(),l=getComputedStyle(i);return Q7(r,l,i)}function J7(i){return i.documentElement.clientHeight}function e9(i){this.addEventListener("load",i),this.addEventListener("error",i)}function t9(i,r,l,o,h,d,S,x,M){var H=r.nodeType===9?r:r.ownerDocument;try{var q=H.startViewTransition({update:function(){var L=H.defaultView,F=L.navigation&&L.navigation.transition,he=H.fonts.status;o();var ve=[];if(he==="loaded"&&(J7(H),H.fonts.status==="loading"&&ve.push(H.fonts.ready)),he=ve.length,i!==null)for(var Le=i.suspenseyImages,j=0,R=0;R<Le.length;R++){var I=Le[R];if(!I.complete){var te=I.getBoundingClientRect();if(0<te.bottom&&0<te.right&&te.top<L.innerHeight&&te.left<L.innerWidth){if(j+=Xv(I),j>gc){ve.length=he;break}I=new Promise(e9.bind(I)),ve.push(I)}}}if(0<ve.length)return L=Promise.race([Promise.all(ve),new Promise(function(_e){return setTimeout(_e,500)})]).then(h,h),(F?Promise.allSettled([F.finished,L]):L).then(d,d);if(h(),F)return F.finished.then(d,d);d()},types:l});H.__reactViewTransition=q;var ie=[];return q.ready.then(function(){for(var L=H.documentElement.getAnimations({subtree:!0}),F=0;F<L.length;F++){var he=L[F],ve=he.effect,Le=ve.pseudoElement;if(Le!=null&&Le.startsWith("::view-transition")){ie.push(he),he=ve.getKeyframes();for(var j=Le=void 0,R=!0,I=0;I<he.length;I++){var te=he[I],_e=te.width;if(Le===void 0)Le=_e;else if(Le!==_e){R=!1;break}if(_e=te.height,j===void 0)j=_e;else if(j!==_e){R=!1;break}delete te.width,delete te.height,te.transform==="none"&&delete te.transform}R&&Le!==void 0&&j!==void 0&&(ve.setKeyframes(he),R=getComputedStyle(ve.target,ve.pseudoElement),R.width!==Le||R.height!==j)&&(R=he[0],R.width=Le,R.height=j,R=he[he.length-1],R.width=Le,R.height=j,ve.setKeyframes(he))}}S()},function(L){H.__reactViewTransition===q&&(H.__reactViewTransition=null);try{typeof L=="object"&&L!==null&&L.name==="InvalidStateError"&&(L.message==="View transition was skipped because document visibility state is hidden."||L.message==="Skipping view transition because document visibility state has become hidden."||L.message==="Skipping view transition because viewport size changed."||L.message==="Transition was aborted because of invalid state")&&(L=null),L!==null&&M(L)}finally{o(),h(),S()}}),q.finished.finally(function(){for(var L=0;L<ie.length;L++)ie[L].cancel();H.__reactViewTransition===q&&(H.__reactViewTransition=null),x()}),q}catch{return o(),h(),S(),null}}function Es(i,r){this._scope=document.documentElement,this._selector="::view-transition-"+i+"("+r+")"}Es.prototype.animate=function(i,r){return r=typeof r=="number"?{duration:r}:T({},r),r.pseudoElement=this._selector,this._scope.animate(i,r)},Es.prototype.getAnimations=function(){for(var i=this._scope,r=this._selector,l=i.getAnimations({subtree:!0}),o=[],h=0;h<l.length;h++){var d=l[h].effect;d!==null&&d.target===i&&d.pseudoElement===r&&o.push(l[h])}return o},Es.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Av(i){return{name:i,group:new Es("group",i),imagePair:new Es("image-pair",i),old:new Es("old",i),new:new Es("new",i)}}function Bi(i){this._fragmentFiber=i,this._observers=this._eventListeners=null}Bi.prototype.addEventListener=function(i,r,l){var o=null,h=null;if(!(l!=null&&typeof l!="boolean"&&(o=l.signal||null,o!==null&&o.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var d=this._eventListeners;if(Rv(d,i,r,l)===-1){var S=this,x=r;l!=null&&typeof l!="boolean"&&l.once===!0&&(x=function(M){S.removeEventListener(i,r,l),typeof r=="function"?r.call(this,M):r.handleEvent(M)}),o!==null&&(h=S.removeEventListener.bind(S,i,r,l),o.addEventListener("abort",h,{once:!0}),h=o.removeEventListener.bind(o,"abort",h)),o=Ol(l),d.push({type:i,listener:r,optionsOrUseCapture:l,attachedListener:x,cleanup:h}),_(this._fragmentFiber.child,!1,i9,i,x,o)}this._eventListeners=d}};function i9(i,r,l,o){return E(i).addEventListener(r,l,o),!1}Bi.prototype.removeEventListener=function(i,r,l){var o=this._eventListeners;if(o!==null&&(r=Rv(o,i,r,l),r!==-1)){var h=o[r];l=h.attachedListener;var d=h.cleanup;h=Ol(h.optionsOrUseCapture),_(this._fragmentFiber.child,!1,n9,i,l,h),o.splice(r,1),d!==null&&d()}};function n9(i,r,l,o){return E(i).removeEventListener(r,l,o),!1}function Ol(i){return i!=null&&typeof i!="boolean"&&(i.once===!0||i.signal instanceof AbortSignal)?{capture:i.capture,passive:i.passive}:i}function Ov(i){return i==null?"c=0":typeof i=="boolean"?"c="+(i?"1":"0"):"c="+(i.capture?"1":"0")}function Rv(i,r,l,o){if(i.length===0)return-1;o=Ov(o);for(var h=0;h<i.length;h++){var d=i[h];if(d.type===r&&d.listener===l&&Ov(d.optionsOrUseCapture)===o)return h}return-1}Bi.prototype.dispatchEvent=function(i){var r=v(this._fragmentFiber);if(r===null)return!0;r=E(r);var l=this._eventListeners;if(l!==null&&0<l.length||!i.bubbles){var o=r.nodeType===9?r.createComment(""):document.createTextNode("");if(l)for(var h=0;h<l.length;h++){var d=l[h];o.addEventListener(d.type,d.attachedListener,Ol(d.optionsOrUseCapture))}if(r.appendChild(o),i=o.dispatchEvent(i),l)for(h=0;h<l.length;h++)d=l[h],o.removeEventListener(d.type,d.attachedListener,Ol(d.optionsOrUseCapture));return r.removeChild(o),i}return r.dispatchEvent(i)},Bi.prototype.focus=function(i){_(this._fragmentFiber.child,!0,Lv,i,void 0,void 0)};function Lv(i,r){return i.tag===6?!1:(i=E(i),m9(i,r))}Bi.prototype.focusLast=function(i){var r=[];_(this._fragmentFiber.child,!0,Wd,r,void 0,void 0);for(var l=r.length-1;0<=l&&!Lv(r[l],i);l--);};function Wd(i,r){return r.push(i),!1}Bi.prototype.blur=function(){var i=v(this._fragmentFiber);i!==null&&(i=E(i),i=$a(i).activeElement,i!==null&&_(this._fragmentFiber.child,!1,r9,i,void 0,void 0))};function r9(i,r){return i.tag===6?!1:(i=E(i),i===r||i.contains(r)?(r.blur(),!0):!1)}Bi.prototype.observeUsing=function(i){this._observers===null&&(this._observers=new Set),this._observers.add(i),_(this._fragmentFiber.child,!1,s9,i,void 0,void 0)};function s9(i,r){return i.tag===6||(i=E(i),r.observe(i)),!1}Bi.prototype.unobserveUsing=function(i){var r=this._observers;if(r!==null&&r.has(i)){r.delete(i),_(this._fragmentFiber.child,!1,l9,i,void 0,void 0);for(var l=r=0;l<fn.length;l++){var o=fn[l];o.fragmentInstance===this&&o.observer===i?i.unobserve(o.instance):fn[r++]=o}fn.length=r}};function l9(i,r){return i.tag===6||(i=E(i),r.unobserve(i)),!1}var fn=[],Gd=!1;function a9(i,r,l){fn.push({fragmentInstance:i,observer:r,instance:l}),Gd||(Gd=!0,_9(function(){Gd=!1;var o=fn;fn=[];for(var h=0;h<o.length;h++){var d=o[h];d.observer.unobserve(d.instance)}}))}Bi.prototype.getClientRects=function(){var i=[];return _(this._fragmentFiber.child,!1,o9,i,void 0,void 0),i};function o9(i,r){if(i.tag===6){i=i.stateNode;var l=i.ownerDocument.createRange();l.selectNodeContents(i),r.push.apply(r,l.getClientRects())}else i=E(i),r.push.apply(r,i.getClientRects());return!1}Bi.prototype.getRootNode=function(i){var r=v(this._fragmentFiber);return r===null?this:E(r).getRootNode(i)},Bi.prototype.compareDocumentPosition=function(i){var r=v(this._fragmentFiber);if(r===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var l=[];_(this._fragmentFiber.child,!1,Wd,l,void 0,void 0);var o=E(r);if(l.length===0){if(l=o,b(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&&(l=r)}r=this._fragmentFiber;var h=o=l.compareDocumentPosition(i);return l===i?h=Node.DOCUMENT_POSITION_CONTAINS:o&Node.DOCUMENT_POSITION_CONTAINED_BY&&(l=w(r)[1],l===null?h=Node.DOCUMENT_POSITION_PRECEDING:(i=E(l).compareDocumentPosition(i),h=i===0||i&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),h|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}r=E(l[0]),h=E(l[l.length-1]);var d=b(this._fragmentFiber)?r.parentElement:o;if(d==null)return Node.DOCUMENT_POSITION_DISCONNECTED;o=d.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_CONTAINED_BY,d=d.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_CONTAINED_BY;var S=r.compareDocumentPosition(i),x=h.compareDocumentPosition(i),M=S&Node.DOCUMENT_POSITION_CONTAINED_BY||x&Node.DOCUMENT_POSITION_CONTAINED_BY;return x=o&&d&&S&Node.DOCUMENT_POSITION_FOLLOWING&&x&Node.DOCUMENT_POSITION_PRECEDING,r=o&&r===i||d&&h===i||M||x?Node.DOCUMENT_POSITION_CONTAINED_BY:!o&&r===i||!d&&h===i?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:S,r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||u9(r,this._fragmentFiber,l[0],l[l.length-1],i)?r:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function u9(i,r,l,o,h){var d=rs(h);if(i&Node.DOCUMENT_POSITION_CONTAINED_BY){if(l=!!d)e:{for(;d!==null;){if(d.tag===7&&(d===r||d.alternate===r)){l=!0;break e}d=d.return}l=!1}return l}if(i&Node.DOCUMENT_POSITION_CONTAINS){if(d===null)return d=h.ownerDocument,h===d||h===d.documentElement||h===d.body;e:{for(d=r,r=v(r);d!==null;){if(!(d.tag!==5&&d.tag!==3&&d.tag!==27||d!==r&&d.alternate!==r)){d=!0;break e}d=d.return}d=!1}return d}return i&Node.DOCUMENT_POSITION_PRECEDING?((r=!!d)&&!(r=d===l)&&(r=z(l,d,se),r===null?r=!1:(_(r,!0,V,d,l),d=D,D=null,r=d!==null)),r):i&Node.DOCUMENT_POSITION_FOLLOWING?((r=!!d)&&!(r=d===o)&&(r=z(o,d,se),r===null?r=!1:(_(r,!0,Z,d,o),d=D,K=D=null,r=d!==null)),r):!1}function zv(i,r){var l=i.ownerDocument.createRange();l.selectNodeContents(i),i=l.getBoundingClientRect(),window.scrollTo(window.scrollX+i.left,r?window.scrollY+i.top:window.scrollY+i.bottom-window.innerHeight)}Bi.prototype.scrollIntoView=function(i){if(typeof i=="object")throw Error(s(566));var r=[];_(this._fragmentFiber.child,!1,Wd,r,void 0,void 0);var l=i!==!1;if(r.length===0){var o=w(this._fragmentFiber);if(o=l?o[1]||o[0]||v(this._fragmentFiber):o[0]||o[1],o===null)return;if(o.tag===6){i=E(o),zv(i,l);return}if(o=E(o),o.nodeType!==9){if(o.nodeType===11){l="host"in o?o.host:null,l!==null&&l.scrollIntoView(i);return}o.scrollIntoView(i)}}for(o=l?r.length-1:0;o!==(l?-1:r.length);){var h=r[o];h.tag===6?(h=E(h),zv(h,l)):E(h).scrollIntoView(i),o+=l?-1:1}};function c9(i,r){return i=E(i),Nv(i,r),!1}function Nv(i,r){i.reactFragments==null&&(i.reactFragments=new Set),i.reactFragments.add(r)}function Bv(i,r){var l=r._eventListeners;if(l!==null)for(var o=0;o<l.length;o++){var h=l[o];i.addEventListener(h.type,h.attachedListener,Ol(h.optionsOrUseCapture))}i.nodeType!==3&&(l=r._observers,l!==null&&l.forEach(function(d){for(var S=0,x=0;x<fn.length;x++){var M=fn[x];(M.fragmentInstance!==r||M.observer!==d||M.instance!==i)&&(fn[S++]=M)}fn.length=S,d.observe(i)}),Nv(i,r))}function h9(i,r){var l=r._eventListeners;if(l!==null)for(var o=0;o<l.length;o++){var h=l[o];i.removeEventListener(h.type,h.attachedListener,Ol(h.optionsOrUseCapture))}i.nodeType!==3&&(l=r._observers,l!==null&&l.forEach(function(d){typeof d.rootMargin=="string"?a9(r,d,i):d.unobserve(i)}),i.reactFragments!=null&&i.reactFragments.delete(r))}function Xd(i){var r=i.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var l=r;switch(r=r.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Xd(l),su(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}i.removeChild(l)}}function f9(i,r,l,o){for(;i.nodeType===1;){var h=l;if(i.nodeName.toLowerCase()!==r.toLowerCase()){if(!o&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(o){if(!i[ca])switch(r){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(d=i.getAttribute("rel"),d==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(d!==h.rel||i.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||i.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||i.getAttribute("title")!==(h.title==null?null:h.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(d=i.getAttribute("src"),(d!==(h.src==null?null:h.src)||i.getAttribute("type")!==(h.type==null?null:h.type)||i.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&d&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(r==="input"&&i.type==="hidden"){var d=h.name==null?null:""+h.name;if(h.type==="hidden"&&i.getAttribute("name")===d)return i}else return i;if(i=Xi(i.nextSibling),i===null)break}return null}function d9(i,r,l){if(r==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!l||(i=Xi(i.nextSibling),i===null))return null;return i}function jv(i,r){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!r||(i=Xi(i.nextSibling),i===null))return null;return i}function Zd(i){return i.data==="$?"||i.data==="$~"}function Qd(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function p9(i,r){var l=i.ownerDocument;if(i.data==="$~")i._reactRetry=r;else if(i.data!=="$?"||l.readyState!=="loading")r();else{var o=function(){r(),l.removeEventListener("DOMContentLoaded",o)};l.addEventListener("DOMContentLoaded",o),i._reactRetry=o}}function Xi(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 Jd=null;function Hv(i){i=i.nextSibling;for(var r=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"||l==="/&"){if(r===0)return Xi(i.nextSibling);r--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||r++}i=i.nextSibling}return null}function Iv(i){i=i.previousSibling;for(var r=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(r===0)return i;r--}else l!=="/$"&&l!=="/&"||r++}i=i.previousSibling}return null}function m9(i,r){function l(){o=!0}if(i.ownerDocument.activeElement===i)return!0;var o=!1;try{i.ownerDocument.addEventListener("focus",l,!0),(i.focus||HTMLElement.prototype.focus).call(i,r)}finally{i.ownerDocument.removeEventListener("focus",l,!0)}return o}function _9(i){Ev(function(){Ev(function(r){return i(r)})})}function Pv(i,r,l){switch(r=$a(l),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 Fv(i,r,l){for(var o in l){var h=l[o];l.hasOwnProperty(o)&&h!=null&&Je(i,r,o,null,Y7,h)}l.dangerouslySetInnerHTML!=null&&(i.textContent=""),i.onclick===_n&&(i.onclick=null),su(i)}function e1(i){for(var r=i.attributes;r.length;)i.removeAttributeNode(r[0]);su(i)}var Zi=new Map,Uv=new Set;function Ka(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 ir=ye.d;ye.d={f:g9,r:v9,D:y9,C:S9,L:b9,m:w9,X:C9,S:x9,M:E9};function g9(){var i=ir.f(),r=oc();return i||r}function v9(i){var r=Xs(i);r!==null&&r.tag===5&&r.type==="form"?qg(r):ir.r(i)}var Rl=typeof document>"u"?null:document;function Vv(i,r,l){var o=Rl;if(o&&typeof r=="string"&&r){var h=Vi(r);h='link[rel="'+i+'"][href="'+h+'"]',typeof l=="string"&&(h+='[crossorigin="'+l+'"]'),Uv.has(h)||(Uv.add(h),i={rel:i,crossOrigin:l,href:r},o.querySelector(h)===null&&(r=o.createElement("link"),Zt(r,"link",i),zt(r),o.head.appendChild(r)))}}function y9(i){ir.D(i),Vv("dns-prefetch",i,null)}function S9(i,r){ir.C(i,r),Vv("preconnect",i,r)}function b9(i,r,l){ir.L(i,r,l);var o=Rl;if(o&&i&&r){var h='link[rel="preload"][as="'+Vi(r)+'"]';r==="image"&&l&&l.imageSrcSet?(h+='[imagesrcset="'+Vi(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(h+='[imagesizes="'+Vi(l.imageSizes)+'"]')):h+='[href="'+Vi(i)+'"]';var d=h;switch(r){case"style":d=Ll(i);break;case"script":d=zl(i)}if(!(Zi.has(d)||(i=T({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:i,as:r},l),Zi.set(d,i),o.querySelector(h)!==null||r==="style"&&o.querySelector(Wa(d))||r==="script"&&o.querySelector(Ga(d))))){var S=o.createElement("link");Zt(S,"link",i),r==="style"&&(S[ru]=!0,S.onload=S.onerror=function(){i_(S)}),zt(S),o.head.appendChild(S)}}}function w9(i,r){ir.m(i,r);var l=Rl;if(l&&i){var o=r&&typeof r.as=="string"?r.as:"script",h='link[rel="modulepreload"][as="'+Vi(o)+'"][href="'+Vi(i)+'"]',d=h;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=zl(i)}if(!Zi.has(d)&&(i=T({rel:"modulepreload",href:i},r),Zi.set(d,i),l.querySelector(h)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Ga(d)))return}o=l.createElement("link"),Zt(o,"link",i),zt(o),l.head.appendChild(o)}}}function x9(i,r,l){ir.S(i,r,l);var o=Rl;if(o&&i){var h=Zs(o).hoistableStyles,d=Ll(i);r=r||"default";var S=h.get(d);if(!S){var x={loading:0,preload:null};if(S=o.querySelector(Wa(d)))x.loading=5;else{i=T({rel:"stylesheet",href:i,"data-precedence":r},l),(l=Zi.get(d))&&t1(i,l);var M=S=o.createElement("link");zt(M),Zt(M,"link",i),M._p=new Promise(function(H,q){M.onload=H,M.onerror=q}),M.addEventListener("load",function(){x.loading|=1}),M.addEventListener("error",function(){x.loading|=2}),x.loading|=4,mc(S,r,o)}S={type:"stylesheet",instance:S,count:1,state:x},h.set(d,S)}}}function C9(i,r){ir.X(i,r);var l=Rl;if(l&&i){var o=Zs(l).hoistableScripts,h=zl(i),d=o.get(h);d||(d=l.querySelector(Ga(h)),d||(i=T({src:i,async:!0},r),(r=Zi.get(h))&&i1(i,r),d=l.createElement("script"),zt(d),Zt(d,"link",i),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(h,d))}}function E9(i,r){ir.M(i,r);var l=Rl;if(l&&i){var o=Zs(l).hoistableScripts,h=zl(i),d=o.get(h);d||(d=l.querySelector(Ga(h)),d||(i=T({src:i,async:!0,type:"module"},r),(r=Zi.get(h))&&i1(i,r),d=l.createElement("script"),zt(d),Zt(d,"link",i),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(h,d))}}function qv(i,r,l,o){var h=(h=ln.current)?Ka(h):null;if(!h)throw Error(s(446));switch(i){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=Ll(l.href),r=Zs(h).hoistableStyles,o=r.get(l),o||(o={type:"style",instance:null,count:0,state:null},r.set(l,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){i=Ll(l.href);var d=Zs(h).hoistableStyles,S=d.get(i);if(S||(h=h.ownerDocument||h,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(i,S),(d=h.querySelector(Wa(i)))?d._p||(S.instance=d,S.state.loading=5):(d=Zi.get(i),d||(d={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Zi.set(i,d)),k9(h,i,d,S.state))),r&&o===null)throw Error(s(528,""));return S}if(r&&o!==null)throw Error(s(529,""));return null;case"script":return r=l.async,l=l.src,typeof l=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(l=zl(l),r=Zs(h).hoistableScripts,o=r.get(l),o||(o={type:"script",instance:null,count:0,state:null},r.set(l,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,i))}}function Ll(i){return'href="'+Vi(i)+'"'}function Wa(i){return'link[rel="stylesheet"]['+i+"]"}function Yv(i){return T({},i,{"data-precedence":i.precedence,precedence:null})}function k9(i,r,l,o){if(r=i.querySelector('link[rel="preload"][as="style"]['+r+"]")){if(r[ru]!==!0){o.loading=1;return}}else r=i.createElement("link"),r[ru]=!0,r.onload=r.onerror=i_.bind(null,r),Zt(r,"link",l),zt(r),i.head.appendChild(r);o.preload=r,r.addEventListener("load",function(){return o.loading|=1}),r.addEventListener("error",function(){return o.loading|=2})}function zl(i){return'[src="'+Vi(i)+'"]'}function Ga(i){return"script[async]"+i}function $v(i,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var o=i.querySelector('style[data-href~="'+Vi(l.href)+'"]');if(o)return r.instance=o,zt(o),o;var h=T({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return o=(i.ownerDocument||i).createElement("style"),zt(o),Zt(o,"style",h),mc(o,l.precedence,i),r.instance=o;case"stylesheet":h=Ll(l.href);var d=i.querySelector(Wa(h));if(d)return r.state.loading|=4,r.instance=d,zt(d),d;o=Yv(l),(h=Zi.get(h))&&t1(o,h),d=(i.ownerDocument||i).createElement("link"),zt(d);var S=d;return S._p=new Promise(function(x,M){S.onload=x,S.onerror=M}),Zt(d,"link",o),r.state.loading|=4,mc(d,l.precedence,i),r.instance=d;case"script":return d=zl(l.src),(h=i.querySelector(Ga(d)))?(r.instance=h,zt(h),h):(o=l,(h=Zi.get(d))&&(o=T({},l),i1(o,h)),i=i.ownerDocument||i,h=i.createElement("script"),zt(h),Zt(h,"link",o),i.head.appendChild(h),r.instance=h);case"void":return null;default:throw Error(s(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(o=r.instance,r.state.loading|=4,mc(o,l.precedence,i));return r.instance}function mc(i,r,l){for(var o=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=o.length?o[o.length-1]:null,d=h,S=0;S<o.length;S++){var x=o[S];if(x.dataset.precedence===r)d=x;else if(d!==h)break}d?d.parentNode.insertBefore(i,d.nextSibling):(r=l.nodeType===9?l.head:l,r.insertBefore(i,r.firstChild))}function t1(i,r){i.crossOrigin==null&&(i.crossOrigin=r.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=r.referrerPolicy),i.title==null&&(i.title=r.title)}function i1(i,r){i.crossOrigin==null&&(i.crossOrigin=r.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=r.referrerPolicy),i.integrity==null&&(i.integrity=r.integrity)}var _c=null;function Kv(i,r,l){if(_c===null){var o=new Map,h=_c=new Map;h.set(l,o)}else h=_c,o=h.get(l),o||(o=new Map,h.set(l,o));if(o.has(i))return o;for(o.set(i,null),l=l.getElementsByTagName(i),h=0;h<l.length;h++){var d=l[h];if(!(d[ca]||d[$t]||i==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var S=d.getAttribute(r)||"";S=i+S;var x=o.get(S);x?x.push(d):o.set(S,[d])}}return o}function n1(i,r,l){i=i.ownerDocument||i,i.head.insertBefore(l,r==="title"?i.querySelector("head > title"):null)}function T9(i,r,l){if(l===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 Wv(i,r){return i==="img"&&r.src!=null&&r.src!==""&&r.onLoad==null&&r.loading!=="lazy"}function Gv(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function Xv(i){return(i.width||100)*(i.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function Zv(i,r){typeof r.decode=="function"&&(i.imgCount++,r.complete||(i.imgBytes+=Xv(r),i.suspenseyImages.push(r)),i=A9.bind(i),r.decode().then(i,i))}function M9(i,r,l,o){if(l.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var h=Ll(o.href),d=r.querySelector(Wa(h));if(d){r=d._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(i.count++,i=Xa.bind(i),r.then(i,i)),l.state.loading|=4,l.instance=d,zt(d);return}d=r.ownerDocument||r,o=Yv(o),(h=Zi.get(h))&&t1(o,h),d=d.createElement("link"),zt(d);var S=d;S._p=new Promise(function(x,M){S.onload=x,S.onerror=M}),Zt(d,"link",o),l.instance=d}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(l,r),(r=l.state.preload)&&(l.state.loading&3)===0&&(i.count++,l=Xa.bind(i),r.addEventListener("load",l),r.addEventListener("error",l))}}var gc=0;function D9(i,r){return i.stylesheets&&i.count===0&&yc(i,i.stylesheets),0<i.count||0<i.imgCount?function(l){var o=setTimeout(function(){if(i.stylesheets&&yc(i,i.stylesheets),i.unsuspend){var d=i.unsuspend;i.unsuspend=null,d()}},6e4+r);0<i.imgBytes&&gc===0&&(gc=62500*K7());var h=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&yc(i,i.stylesheets),i.unsuspend)){var d=i.unsuspend;i.unsuspend=null,d()}},(i.imgBytes>gc?50:800)+r);return i.unsuspend=l,function(){i.unsuspend=null,clearTimeout(o),clearTimeout(h)}}:null}function Qv(i){if(i.count===0&&(i.imgCount===0||!i.waitingForImages)){if(i.stylesheets)yc(i,i.stylesheets);else if(i.unsuspend){var r=i.unsuspend;i.unsuspend=null,r()}}}function Xa(){this.count--,Qv(this)}function A9(){this.imgCount--,Qv(this)}var vc=null;function yc(i,r){i.stylesheets=null,i.unsuspend!==null&&(i.count++,vc=new Map,r.forEach(O9,i),vc=null,Xa.call(i))}function O9(i,r){if(!(r.state.loading&4)){var l=vc.get(i);if(l)var o=l.get(null);else{l=new Map,vc.set(i,l);for(var h=i.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<h.length;d++){var S=h[d];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(l.set(S.dataset.precedence,S),o=S)}o&&l.set(null,o)}h=r.instance,S=h.getAttribute("data-precedence"),d=l.get(S)||o,d===o&&l.set(null,h),l.set(S,h),this.count++,o=Xa.bind(this),h.addEventListener("load",o),h.addEventListener("error",o),d?d.parentNode.insertBefore(h,d.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(h,i.firstChild)),r.state.loading|=4}}var Nl={$$typeof:P,Provider:null,Consumer:null,_currentValue:ze,_currentValue2:ze,_threadCount:0};function R9(i,r,l,o,h,d,S,x,M){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=Bh(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bh(0),this.hiddenUpdates=Bh(null),this.identifierPrefix=o,this.onUncaughtError=h,this.onCaughtError=d,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=M,this.transitionTypes=null,this.incompleteTransitions=new Map}function Jv(i,r,l,o,h,d,S,x,M,H,q,ie){return i=new R9(i,r,l,S,M,H,q,ie,x),r=1,d===!0&&(r|=24),d=gi(3,null,null,r),i.current=d,d.stateNode=i,r=vf(),r.refCount++,i.pooledCache=r,r.refCount++,d.memoizedState={element:o,isDehydrated:l,cache:r},wf(d),i}function e3(i){return i?(i=al,i):al}function t3(i,r,l,o,h,d){h=e3(h),o.context===null?o.context=h:o.pendingContext=h,o=xr(r),o.payload={element:l},d=d===void 0?null:d,d!==null&&(o.callback=d),l=Cr(i,o,r),l!==null&&(bi(l,i,r),Ta(l,i,r))}function i3(i,r){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<r?l:r}}function r1(i,r){i3(i,r),(i=i.alternate)&&i3(i,r)}function n3(i){if(i.tag===13||i.tag===31){var r=os(i,67108864);r!==null&&bi(r,i,67108864),r1(i,67108864)}}function r3(i){if(i.tag===13||i.tag===31){var r=Ni();r=jh(r);var l=os(i,r);l!==null&&bi(l,i,r),r1(i,r)}}var Bl=!0;function L9(i,r,l,o){var h=me.T;me.T=null;var d=ye.p;try{ye.p=2,s1(i,r,l,o)}finally{ye.p=d,me.T=h}}function z9(i,r,l,o){var h=me.T;me.T=null;var d=ye.p;try{ye.p=8,s1(i,r,l,o)}finally{ye.p=d,me.T=h}}function s1(i,r,l,o){if(Bl){var h=l1(o);if(h===null)Pd(i,r,o,Sc,l),l3(i,o);else if(B9(h,i,r,l,o))o.stopPropagation();else if(l3(i,o),r&4&&-1<N9.indexOf(i)){for(;h!==null;){var d=Xs(h);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var S=ns(d.pendingLanes);if(S!==0){var x=d;for(x.pendingLanes|=2,x.entangledLanes|=2;S;){var M=1<<31-Mi(S);x.entanglements[1]|=M,S&=~M}kn(d),(Ke&6)===0&&(sc=Yt()+500,Va(0))}}break;case 31:case 13:x=os(d,2),x!==null&&bi(x,d,2),oc(),r1(d,2)}if(d=l1(o),d===null&&Pd(i,r,o,Sc,l),d===h)break;h=d}h!==null&&o.stopPropagation()}else Pd(i,r,o,null,l)}}function l1(i){return i=qh(i),a1(i)}var Sc=null;function a1(i){if(Sc=null,i=rs(i),i!==null){var r=u(i);if(r===null)i=null;else{var l=r.tag;if(l===13){if(i=c(r),i!==null)return i;i=null}else if(l===31){if(i=f(r),i!==null)return i;i=null}else if(l===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;i=null}else r!==i&&(i=null)}}return Sc=i,null}function s3(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(si()){case Fn:return 2;case Ui:return 8;case Jo:case W8:return 32;case $m:return 268435456;default:return 32}default:return 32}}var o1=!1,Br=null,jr=null,Hr=null,Za=new Map,Qa=new Map,Ir=[],N9="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 l3(i,r){switch(i){case"focusin":case"focusout":Br=null;break;case"dragenter":case"dragleave":jr=null;break;case"mouseover":case"mouseout":Hr=null;break;case"pointerover":case"pointerout":Za.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qa.delete(r.pointerId)}}function Ja(i,r,l,o,h,d){return i===null||i.nativeEvent!==d?(i={blockedOn:r,domEventName:l,eventSystemFlags:o,nativeEvent:d,targetContainers:[h]},r!==null&&(r=Xs(r),r!==null&&n3(r)),i):(i.eventSystemFlags|=o,r=i.targetContainers,h!==null&&r.indexOf(h)===-1&&r.push(h),i)}function B9(i,r,l,o,h){switch(r){case"focusin":return Br=Ja(Br,i,r,l,o,h),!0;case"dragenter":return jr=Ja(jr,i,r,l,o,h),!0;case"mouseover":return Hr=Ja(Hr,i,r,l,o,h),!0;case"pointerover":var d=h.pointerId;return Za.set(d,Ja(Za.get(d)||null,i,r,l,o,h)),!0;case"gotpointercapture":return d=h.pointerId,Qa.set(d,Ja(Qa.get(d)||null,i,r,l,o,h)),!0}return!1}function a3(i){var r=rs(i.target);if(r!==null){var l=u(r);if(l!==null){if(r=l.tag,r===13){if(r=c(l),r!==null){i.blockedOn=r,Jm(i.priority,function(){r3(l)});return}}else if(r===31){if(r=f(l),r!==null){i.blockedOn=r,Jm(i.priority,function(){r3(l)});return}}else if(r===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function bc(i){if(i.blockedOn!==null)return!1;for(var r=i.targetContainers;0<r.length;){var l=l1(i.nativeEvent);if(l===null){l=i.nativeEvent;var o=new l.constructor(l.type,l);Vh=o,l.target.dispatchEvent(o),Vh=null}else return r=Xs(l),r!==null&&n3(r),i.blockedOn=l,!1;r.shift()}return!0}function o3(i,r,l){bc(i)&&l.delete(r)}function j9(){o1=!1,Br!==null&&bc(Br)&&(Br=null),jr!==null&&bc(jr)&&(jr=null),Hr!==null&&bc(Hr)&&(Hr=null),Za.forEach(o3),Qa.forEach(o3)}function wc(i,r){i.blockedOn===r&&(i.blockedOn=null,o1||(o1=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,j9)))}var xc=null;function u3(i){xc!==i&&(xc=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){xc===i&&(xc=null);for(var r=0;r<i.length;r+=3){var l=i[r],o=i[r+1],h=i[r+2];if(typeof o!="function"){if(a1(o||l)===null)continue;break}var d=Xs(l);d!==null&&(i.splice(r,3),r-=3,Vf(d,{pending:!0,data:h,method:l.method,action:o},o,h))}}))}function jl(i){function r(M){return wc(M,i)}Br!==null&&wc(Br,i),jr!==null&&wc(jr,i),Hr!==null&&wc(Hr,i),Za.forEach(r),Qa.forEach(r);for(var l=0;l<Ir.length;l++){var o=Ir[l];o.blockedOn===i&&(o.blockedOn=null)}for(;0<Ir.length&&(l=Ir[0],l.blockedOn===null);)a3(l),l.blockedOn===null&&Ir.shift();if(l=(i.ownerDocument||i).$$reactFormReplay,l!=null)for(o=0;o<l.length;o+=3){var h=l[o],d=l[o+1],S=h[_i]||null;if(typeof d=="function")S||u3(l);else if(S){var x=null;if(d&&d.hasAttribute("formAction")){if(h=d,S=d[_i]||null)x=S.formAction;else if(a1(h)!==null)continue}else x=S.action;typeof x=="function"?l[o+1]=x:(l.splice(o,3),o-=3),u3(l)}}}function c3(){function i(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(S){return h=S})},focusReset:"manual",scroll:"manual"})}function r(){h!==null&&(h(),h=null),o||setTimeout(l,20)}function l(){if(!o&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,h=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(l,100),function(){o=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),h!==null&&(h(),h=null)}}}function u1(i){this._internalRoot=i}Cc.prototype.render=u1.prototype.render=function(i){var r=this._internalRoot;if(r===null)throw Error(s(409));var l=r.current,o=Ni();t3(l,o,i,r,null,null)},Cc.prototype.unmount=u1.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var r=i.containerInfo;t3(i.current,2,null,i,null,null),oc(),r[Gs]=null}};function Cc(i){this._internalRoot=i}Cc.prototype.unstable_scheduleHydration=function(i){if(i){var r=Qm();i={blockedOn:null,target:i,priority:r};for(var l=0;l<Ir.length&&r!==0&&r<Ir[l].priority;l++);Ir.splice(l,0,i),l===0&&a3(i)}};var h3=t.version;if(h3!=="19.3.0")throw Error(s(527,h3,"19.3.0"));ye.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=p(r),i=i!==null?g(i):null,i=i===null?null:i.stateNode,i};var H9={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:me,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ec=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ec.isDisabled&&Ec.supportsFiber)try{aa=Ec.inject(H9),Ti=Ec}catch{}}return to.createRoot=function(i,r){if(!a(i))throw Error(s(299));var l=!1,o="",h=e2,d=t2,S=i2;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(d=r.onCaughtError),r.onRecoverableError!==void 0&&(S=r.onRecoverableError)),r=Jv(i,1,!1,null,null,l,o,null,h,d,S,c3),i[Gs]=r.current,Id(i),new u1(r)},to.hydrateRoot=function(i,r,l){if(!a(i))throw Error(s(299));var o=!1,h="",d=e2,S=t2,x=i2,M=null;return l!=null&&(l.unstable_strictMode===!0&&(o=!0),l.identifierPrefix!==void 0&&(h=l.identifierPrefix),l.onUncaughtError!==void 0&&(d=l.onUncaughtError),l.onCaughtError!==void 0&&(S=l.onCaughtError),l.onRecoverableError!==void 0&&(x=l.onRecoverableError),l.formState!==void 0&&(M=l.formState)),r=Jv(i,1,!0,r,l??null,o,h,M,d,S,x,c3),r.context=e3(null),l=r.current,o=Ni(),o=jh(o),h=xr(o),h.callback=null,Cr(l,h,o),l=o,r.current.lanes=l,ua(r,l),kn(r),i[Gs]=r.current,Id(i),new Cc(r)},to.version="19.3.0",to}var b3;function Z9(){if(b3)return f1.exports;b3=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(),f1.exports=X9(),f1.exports}var dp=Z9();const Q9=Jl(dp),J9=vh({__proto__:null,default:Q9},[dp]);class Gr extends Error{}class z4 extends Gr{}function Oo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?e:null}function ew(e){const t=Oo(e);return t===null?!1:t.full===!0?!0:t.full===!1?!1:t.type==="snapshot"}function tw(e){const t=Oo(e);if(t===null)return null;const n=t.seq;return typeof n=="number"&&Number.isFinite(n)?n:null}function io(e){if(e===void 0)return[];if(!Array.isArray(e))throw new Gr("条目字段不是数组");const t=[];for(const n of e){const s=Oo(n),a=s?.id;if(s===null||typeof a!="number"||!Number.isFinite(a))throw new Gr("条目缺少数字 id");t.push(s)}return t}function iw(e){if(e===void 0)return[];if(!Array.isArray(e))throw new Gr("removedIds 不是数组");const t=[];for(const n of e)typeof n=="number"&&Number.isFinite(n)&&t.push(n);return t}function nw(e,t){const n=Oo(t);if(n===null)throw new Gr("帧不是对象");const s=tw(n);if(s===null)throw new Gr("帧缺少 seq");const a=ew(n);if(e===null&&!a)throw new Gr("第一帧必须是全量帧");if(e!==null){if(s<=e.seq)return e;if(!a&&s>e.seq+1)throw new z4(`帧号跳号:手上有 seq ${String(e.seq)},收到 seq ${String(s)}`)}if(a){const p={};for(const[g,_]of Object.entries(n))g==="entries"||g==="liveEntries"||g==="type"||g==="full"||(p[g]=_);return{...p,seq:s,entries:io(n.entries),liveEntries:io(n.liveEntries)}}const u=Oo(n.meta);if(u===null)throw new Gr("增量帧缺少 meta");const c=new Map;for(const p of e?.entries??[])c.set(p.id,p);for(const p of iw(n.removedIds))c.delete(p);for(const p of io(n.updated))c.set(p.id,p);for(const p of io(n.added))c.set(p.id,p);const f=[...c.values()].sort((p,g)=>p.id-g.id),m="liveEntries"in n?io(n.liveEntries):e?.liveEntries??[];return{...e??{},...u,seq:s,entries:f,liveEntries:m}}class rw{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 a=async c=>{s.requests.push(c);try{await this.loadShared(c,n)}catch(f){return s.failures.push(`${c}: ${f instanceof Error?f.message:String(f)}`),"transport-failed"}return n.has(t.id)?"registered":(s.failures.push(`${c}: 脚本执行了却没有注册「${t.id}」的工厂`),"not-registered")};let u="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}」,不再重放`),u="not-registered",this.failed.add(t.preferred)):(u=await a(t.preferred),u==="transport-failed"&&(u=await a(t.preferred)),u!=="registered"&&t.fallback!==void 0&&this.failed.add(t.preferred)),u!=="registered"&&t.fallback!==void 0&&(u=await a(t.fallback)),u!=="registered")throw new Error(`插件「${t.id}」取不回来:${s.failures.join(";")}`);return s}}class sw extends Error{constructor(t,n){super(`槽位 ${t} 没有被声明(已声明:${n.length===0?"无":n.join("、")})`)}}class lw extends Error{constructor(t,n,s){super(`槽位 ${t} 已经声明成 ${n},不能再声明成 ${s}`)}}class aw extends Error{constructor(t,n,s,a,u){const c=n===""?"这个槽":`格子 ${n}`;super(`槽位 ${t} 的${c}里已经有 ${a}(priority ${String(s)})。想替换它就把 ${u} 的 priority 调小(例如 ${String(s-1)}),或者换个 id。`)}}class ow extends Error{constructor(t){super(`槽位 ${t} 是 keyed 形态,register 必须给 key(决定这条登记负责哪一格)`)}}class uw extends Error{constructor(t){super(`槽位 ${t} 是 chain 形态,register 必须给 select(这条登记靠它参与选举)`)}}class zn extends Error{}class cw{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 lw(t,s.kind,n);s.refs+=1}else this.kinds.set(t,{kind:n,refs:1}),this.runWaiters(t);let a=!1;return()=>{if(a)return;a=!0;const u=this.kinds.get(t);u!==void 0&&(u.refs-=1,!(u.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},a=this.waiters.get(t)??new Set;return a.add(s),this.waiters.set(t,a),this.kinds.has(t)&&this.runWaiter(t,s),()=>{a.delete(s),a.size===0&&this.waiters.delete(t),this.suspendWaiter(t,s)}}register(t,n,s){const a=this.kinds.get(t);if(a===void 0)throw new sw(t,this.slots);const u=a.kind==="keyed"?n.key:null;if(a.kind==="keyed"&&(u===void 0||u===""))throw new ow(t);if(a.kind==="chain"&&n.select===void 0)throw new uw(t);const c=n.priority??0,f=a.kind==="chain"?"":a.kind==="list"?n.id:a.kind==="keyed"?u:"",m=this.entries.get(t)??[],p=a.kind==="chain"?void 0:m.find(b=>b.cell===f&&b.priority===c);if(p!==void 0)throw new aw(t,f,c,p.id,n.id);const g=this.declareChildren(n.children),_=n.store??null;_!==null&&this.holdSeat(_);const v={slot:t,id:n.id,order:n.order??0,priority:c,key:u??null,cell:f,children:Object.keys(n.children??{}),select:n.select??null,component:s,store:_,seq:this.seq};return this.seq+=1,this.entries.set(t,[...m,v].sort(pp)),this.bump(t),()=>{const b=this.entries.get(t);if(b!==void 0){const w=b.filter(C=>C!==v);w.length!==b.length&&(this.entries.set(t,w),this.broken.delete(v),this.bump(t))}v.store!==null&&this.releaseSeat(v.store);for(const w of g)w()}}elect(t,n){if(this.kinds.get(t)?.kind!=="chain")throw new zn(`槽位 ${t} 不是 chain 形态(elect 只对 chain 有意义)`);const s=[...this.entries.get(t)??Os].sort(w3);for(const a of s)if(!this.broken.has(a))try{const u=a.select,c=u===null?null:u(n);if(c!=null)return{entry:a,matched:c}}catch(u){this.broken.add(a),this.record({slot:t,id:a.id,phase:"render",error:no(u)}),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:no(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)??Os}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 a=this.kinds.get(t)?.kind,u=this.kinds.has(t)?a==="chain"?[...this.entries.get(t)??Os].filter(c=>!this.broken.has(c)).sort(w3):hw(this.entries.get(t)??Os,this.broken):Os;return this.winnersCache.set(t,{version:n,list:u}),u}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 zn(`装配错误:Factory「${t.name}」已经定义(先注册者还在账上),一个名字只许一个定义`);const a=this.declareChildren(t.children),u=t.store??null;u!==null&&this.holdSeat(u);const c={name:t.name,component:n,children:Object.freeze(Object.keys(t.children??{})),slots:Object.freeze(Object.keys(t.slots??{})),store:u};this.factories.set(t.name,c),this.bumpFactory(t.name);let f=!1;return()=>{if(!f&&(f=!0,this.factories.get(t.name)===c)){this.factories.delete(t.name),this.bumpFactory(t.name),c.store!==null&&this.releaseSeat(c.store);for(const m of a)m()}}}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:no(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(a){console.error(`Factory ${t} 的订阅者抛异常:`,a)}}declareChildren(t){if(t===void 0)return[];const n=[];for(const[s,a]of Object.entries(t))a!==void 0&&n.push(this.declare(s,a));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:no(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(a){this.record({slot:t,id:"",phase:"dispose",error:no(a)})}}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 Os=Object.freeze([]);function hw(e,t){if(e.length===0)return Os;const n=new Map;for(const s of e){if(t.has(s))continue;const a=n.get(s.cell);(a===void 0||fw(s,a)<0)&&n.set(s.cell,s)}return n.size===0?Os:[...n.values()].sort(pp)}function pp(e,t){return e.order===t.order?e.seq-t.seq:e.order-t.order}function fw(e,t){return e.priority!==t.priority?e.priority-t.priority:pp(e,t)}function w3(e,t){return e.priority===t.priority?e.seq-t.seq:e.priority-t.priority}function no(e){return e instanceof Error?e:new Error(String(e))}function dw(e){return{spec:e,create(){let t=e.init();const n=new Set,s=u=>{t=u;for(const c of[...n])c()},a={};for(const u of Object.keys(e.actions)){const c=e.actions[u];a[u]=(...f)=>{const m={...t};c(m,...f),s(m)}}return{getSnapshot:()=>t,subscribe:u=>(n.add(u),()=>{n.delete(u)}),actions:a,set:s}}}}function pw(e,t){return{get slots(){return e.slots},spec:n=>e.spec(n),declare:(n,s)=>t(e.declare(n,s)),register:(n,s,a)=>t(e.register(n,s,a)),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 mw extends Error{constructor(t,n,s){super(`服务「${t}」已经由插件 ${n} 提供,插件 ${s} 不能重复提供(一个名字只能有一个提供者)`)}}class _w extends Error{constructor(t){const n=typeof t=="string"?`「${t}」`:String(t);super(`服务名必须是非空字符串,收到的是 ${n}`)}}class N4{records=new Map;listeners=new Set;provide(t,n,s){if(typeof t!="string"||t==="")throw new _w(t);const a=this.records.get(t);if(a!==void 0)throw new mw(t,a.provider,s);const u={name:t,value:n,provider:s};this.records.set(t,u),this.notify();let c=!1;return()=>{c||(c=!0,this.records.get(t)===u&&(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 gw(e,t,n){const s=[];for(const a of e??[]){const u=t(a);if(u!==void 0){u.ok!==!0&&s.push(`插件 ${a} 没装上:${u.error??"未知原因"}`);continue}n.has(a)||s.push(`服务 ${a} 还没有提供者`)}return s}const B4=Y.createContext(null);function vw({services:e,children:t}){return y.jsx(B4.Provider,{value:e,children:t})}function yw(e){const t=Y.useContext(B4),n=Y.useCallback(a=>t===null?()=>{}:t.subscribe(a),[t]),s=Y.useCallback(()=>t===null?void 0:t.consume(e),[t,e]);return Y.useSyncExternalStore(n,s,s)}function mp(e,t){const n=Y.useCallback(a=>e.subscribe(a,t),[e,t]),s=Y.useCallback(()=>e.winners(t),[e,t]);return Y.useSyncExternalStore(n,s,s)}function j4(e){const t=Y.useCallback(s=>e.subscribe(s),[e]),n=Y.useCallback(()=>e.faults,[e]);return Y.useSyncExternalStore(t,n,n)}function H4(e,t,n=Object.is){const s=Y.useRef(t);s.current=t;const a=Y.useRef(n);a.current=n;const[u,c]=Y.useState(()=>e===void 0?void 0:t(e.getSnapshot())),f=Y.useRef(u);return Y.useEffect(()=>{if(e===void 0){f.current!==void 0&&(f.current=void 0,c(void 0));return}const m=()=>{const p=s.current(e.getSnapshot());f.current!==void 0&&a.current(f.current,p)||(f.current=p,c(p))};return m(),e.subscribe(m)},[e]),u}function I4(e,t){const n=Y.useMemo(()=>t===null?void 0:e.seat(t),[e,t]),s=Y.useCallback((a,u)=>H4(n,a,u),[n]);return Y.useMemo(()=>{if(t===null)return Sw;if(n===void 0)throw new zn("席位的实例不在账上:登记的持有者还在,实例却已释放(装配错误)");return{useStore:s,actions:n.actions}},[t,n,s])}const Sw=Object.freeze({}),bw="browser-tab-open-request",ww="browser-tab-close-request",xw=["git-stage","git-unstage","git-commit","git-checkout","git-branch-create"],Cw=["term-spawn","term-input","term-kill"];new Set(Cw);new Set(xw);const t0=3,i0=["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"],Ew=["dock-data","browser-state","browser-open-requested","update-status","update-progress",bw,ww];new Set(Ew);new Set(i0);const kw=/[\u1100-\u11FF\u2E80-\u9FFF\uA000-\uA4CF\uAC00-\uD7FF\uF900-\uFAFF\uFE30-\uFE4F\uFF00-\uFFEF]/;function Tw(e){let t=0,n=0;for(const s of e)kw.test(s)?t+=1:n+=1;return t*.65+n*.33}const Mw=["off","low","high","max"],Dw=["thinking","reasoning-effort","none"],Aw=["text","image","video"],Ow="thinking",Rw=["off","low","high","max"],Lw={off:"关",low:"低",high:"高",max:"最大"},zw={off:"none",low:"low",high:"high",max:"max"},Nw={text:"文本",image:"照片",video:"视频"},Bw={thinking:{label:"thinking 开关",help:"DeepSeek / GLM 风格:只有开与关,低·高·最大都发 enabled"},"reasoning-effort":{label:"reasoning_effort",help:"OpenAI 与多数网关风格:按档位发线上值,可逐档改名字"},none:{label:"不发思考字段",help:"端点没有思考参数:选哪档都不发,只有「默认」有意义"}},jw={thinkingLevels:[...Rw],thinkingParam:Ow,effortMap:{},modalities:["text"]},Hw=4e6;function x3(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 Iw(e,t){const n=u=>u===""?"none":u.includes(`\r
13
- `)?"crlf":"lf",s=n(e),a=n(t);return s!=="none"&&a!=="none"&&s!==a}function Pw(e,t,n){let s=0;const a=Math.min(e.length,t.length);for(;s<a&&e[s]===t[s];)s+=1;let u=0;for(;u<a-s&&e[e.length-1-u]===t[t.length-1-u];)u+=1;const c=e.length-s-u,f=t.length-s-u,m=s<a||c>0?`第 ${String(s+1)} 行起`:"文件末尾";return{ok:!1,hunks:[],added:Math.max(0,f),removed:Math.max(0,c),note:`${n};从${m}开始不一样:删 ${String(Math.max(0,c))} 行、加 ${String(Math.max(0,f))} 行`,identical:!1,oversize:!0}}function Fw(e,t,n){const s=x3(e),a=x3(t),u=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 c=Iw(e,t)?"(顺带改了换行风格:CRLF ↔ LF)":"",f=Math.min(s.length,a.length);let m=0;for(;m<f&&s[m]===a[m];)m+=1;let p=0;for(;p<f-m&&s[s.length-1-p]===a[a.length-1-p];)p+=1;const g=s.slice(m,s.length-p),_=a.slice(m,a.length-p),v=(g.length+1)*(_.length+1);if(g.length>0&&_.length>0&&v>Hw)return Pw(s,a,`改动区间过大(约 ${String(g.length)} 行 vs ${String(_.length)} 行),只给摘要`);const b=Uw(g,_),w=[];let C=m,E=m;for(const z of b)z==="context"?(w.push({kind:"context",text:g[C-m]??"",oldLine:C+1,newLine:E+1}),C+=1,E+=1):z==="remove"?(w.push({kind:"remove",text:g[C-m]??"",oldLine:C+1,newLine:null}),C+=1):(w.push({kind:"add",text:_[E-m]??"",oldLine:null,newLine:E+1}),E+=1);const D=[...s.slice(0,m).map((z,T)=>({kind:"context",text:z,oldLine:T+1,newLine:T+1})),...w,...s.slice(s.length-p).map((z,T)=>({kind:"context",text:z,oldLine:s.length-p+T+1,newLine:a.length-p+T+1}))],K=Vw(D,u),V=w.reduce((z,T)=>z+(T.kind==="add"?1:0),0),Z=w.reduce((z,T)=>z+(T.kind==="remove"?1:0),0),se=c===""?void 0:`${c}(逐行差异已忽略行尾风格)`;return{ok:!0,hunks:K,added:V,removed:Z,identical:!1,oversize:!1,...se!==void 0?{note:se}:{}}}function Uw(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 a=s+1,u=new Int32Array((n+1)*a);for(let p=n-1;p>=0;p-=1)for(let g=s-1;g>=0;g-=1)u[p*a+g]=e[p]===t[g]?(u[(p+1)*a+g+1]??0)+1:Math.max(u[(p+1)*a+g]??0,u[p*a+g+1]??0);const c=[];let f=0,m=0;for(;f<n&&m<s;)e[f]===t[m]?(c.push("context"),f+=1,m+=1):(u[(f+1)*a+m]??0)>=(u[f*a+m+1]??0)?(c.push("remove"),f+=1):(c.push("add"),m+=1);for(;f<n;)c.push("remove"),f+=1;for(;m<s;)c.push("add"),m+=1;return c}function Vw(e,t){const n=e.map((a,u)=>a.kind==="context"?-1:u).filter(a=>a>=0);if(n.length===0)return[];const s=[];for(const a of n){const u=Math.max(0,a-t),c=Math.min(e.length-1,a+t),f=s[s.length-1];f!==void 0&&u<=f.to+1?f.to=Math.max(f.to,c):s.push({from:u,to:c})}return s.map(a=>{const u=e.slice(a.from,a.to+1),c=u[0];return{oldStart:c.oldLine??e[a.from-1]?.oldLine??0,oldCount:u.reduce((f,m)=>f+(m.kind==="add"?0:1),0),newStart:c.newLine??e[a.from-1]?.newLine??0,newCount:u.reduce((f,m)=>f+(m.kind==="remove"?0:1),0),lines:u}})}function _p(e){return{"--dsc-icon-size":`${e}px`}}function be(e,{size:t=16,className:n},s="0 0 24 24"){return y.jsx("svg",{width:t,height:t,style:_p(t),viewBox:s,fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",className:n,"aria-hidden":!0,children:e})}function gp(e){return be(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M12 5v14"}),y.jsx("path",{d:"M5 12h14"})]}),e)}function js(e){return be(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 P4(e){return be(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 Yl(e){return be(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 vp(e){return be(y.jsx("path",{d:"m6 9.5 6 6 6-6"}),e)}function F4(e){return be(y.jsx("path",{d:"m9.5 6 6 6-6 6"}),e)}function Wc(e){return be(y.jsx("path",{d:"m14.5 6-6 6 6 6"}),e)}function U4(e){return be(y.jsx("path",{d:"m6 14.5 6-6 6 6"}),e)}function V4(e){return be(y.jsxs(y.Fragment,{children:[y.jsx("path",{d:"M12 19V5"}),y.jsx("path",{d:"m6 11 6-6 6 6"})]}),e)}function q4(e){return be(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 Y4(e){return be(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 $4(e){return be(y.jsx("rect",{x:"7",y:"7",width:"10",height:"10",rx:"2",fill:"currentColor",stroke:"none"}),e)}function K4(e){return be(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 W4(e){return be(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 zs(e){return be(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 G4(e){return be(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 X4(e){return be(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 yh(e){return be(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 Z4(e){return be(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 Q4(e){return be(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 yp(e){return be(y.jsx("path",{d:"m5 12.5 4.5 4.5L19 7.5"}),e)}function J4(e){return be(y.jsx("circle",{cx:"12",cy:"12",r:"7.5"}),e)}function ey(e){return be(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 ty(e){return be(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 Sp(e){return be(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 iy(e){return be(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 bp(e){return be(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 wp(e){return be(y.jsx("path",{d:"M13.2 2.8 5.4 13.4h5l-1.2 7.8 7.8-10.6h-5Z"}),e)}function ny(e){return be(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 ry(e){return be(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 sy(e){return be(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 ly(e){return be(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 Ro(e){return be(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 ay(e){return be(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 oy(e){return be(y.jsx("path",{d:"M6 6l12 12M18 6 6 18"}),e)}function uy(e){return be(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 Gc(e){return be(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 Sh(e){return be(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 cy(e){return be(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 hy(e){return be(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 fy(e){return be(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 dy(e){return be(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 py(e){return be(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 my(e){return be(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 Hs(e){return be(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 xp(e){return be(y.jsx("path",{d:"m9 8-4 4 4 4M15 8l4 4-4 4"}),e)}function _y(e){return be(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 Cp(e){return be(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 gy(e){return be(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 vy(e){return be(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 yy(e){return be(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 Sy(e){return be(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 by(e){return be(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 wy(e){return be(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 xy(e){return be(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 Cy(e){return be(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 Ey(e){const t=e.size??14;return y.jsx("svg",{width:t,height:t,style:_p(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 ky(e){const t=e.size??16;return y.jsxs("svg",{width:t,height:t,style:_p(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"})]})}function Ty(e){return y.jsx("span",{className:e.className,children:e.children})}const qw="modulepreload",Yw=function(e,t){return new URL(e,t).href},C3={},ge=function(t,n,s){let a=Promise.resolve();if(n&&n.length>0){let p=function(g){return Promise.all(g.map(_=>Promise.resolve(_).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};const c=document.getElementsByTagName("link"),f=document.querySelector("meta[property=csp-nonce]"),m=f?.nonce||f?.getAttribute("nonce");a=p(n.map(g=>{if(g=Yw(g,s),g in C3)return;C3[g]=!0;const _=g.endsWith(".css"),v=_?'[rel="stylesheet"]':"";if(s)for(let w=c.length-1;w>=0;w--){const C=c[w];if(C.href===g&&(!_||C.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${g}"]${v}`))return;const b=document.createElement("link");if(b.rel=_?"stylesheet":qw,_||(b.as="script"),b.crossOrigin="",b.href=g,m&&b.setAttribute("nonce",m),document.head.appendChild(b),_)return new Promise((w,C)=>{b.addEventListener("load",w),b.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${g}`)))})}))}function u(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return a.then(c=>{for(const f of c||[])f.status==="rejected"&&u(f.reason);return t().catch(u)})},Ep={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 $w(e){return e.slice(Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"))+1)}function bh(e){const t=$w(e).toLowerCase(),n=t.includes(".")?t.slice(t.lastIndexOf(".")+1):t;return Ep[n]}const kp={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 E3=null;const Xc=new Set,Kw={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 Ww(e){return kp[e]!==void 0?e:Kw[e]??e}function Uo(){return E3??=ge(()=>import("./chunk-BGcgwlCI.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()})),E3}async function wh(e){if(Xc.has(e))return;const t=kp[e];if(t===void 0)return;const n=await t();await(await Uo()).loadLanguage(n.default),Xc.add(e)}async function xh(e,t){const n=await Uo(),s=t===void 0?void 0:Ww(t),a=s!==void 0&&(Xc.has(s)||kp[s]!==void 0),u=a&&s!==void 0?s:"text";return a&&s!==void 0&&!Xc.has(s)&&await wh(s),n.codeToHtml(e,{lang:u,themes:{light:"github-light",dark:"one-dark-pro"},defaultColor:!1})}const Gw=2e3,Xw=512*1024;async function Tp(e,t){const n=bh(t);if(n===void 0||e.split(`
14
- `).length>Gw||e.length>Xw)return null;try{return await wh(n),(await Uo()).codeToTokens(e,{lang:n,themes:{light:"github-light",dark:"one-dark-pro"},defaultColor:!1}).tokens.map(c=>({segments:c.map(f=>{const m=f.htmlStyle??{color:f.color};return`<span style="${Object.entries(m).map(([g,_])=>`${g}:${_}`).join(";")}">${Qw(f.content)}</span>`})}))}catch{return null}}const Zw={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Qw(e){return e.replace(/[&<>"']/g,t=>Zw[t]??t)}const _1=5e3;function My({text:e,path:t,targetLine:n}){const s=Y.useMemo(()=>bh(t),[t]),a=Y.useMemo(()=>e.split(`
15
- `),[e]),u=a.length>_1,c=Y.useMemo(()=>u?a.slice(0,_1).join(`
16
- `):e,[a,e,u]),[f,m]=Y.useState(null),p=Y.useRef(null);Y.useEffect(()=>{let _=!0;return xh(c,s).then(v=>{_&&m(v)}).catch(()=>{}),()=>{_=!1}},[c,s]),Y.useEffect(()=>{if(n===void 0)return;const _=p.current;if(_===null)return;_.querySelectorAll(".file-code-line-target").forEach(C=>C.classList.remove("file-code-line-target"));const v=_.querySelectorAll(".line"),b=Math.min(Math.max(n,1),v.length),w=v[b-1];w!==void 0&&(w.classList.add("file-code-line-target"),w.scrollIntoView({block:"center"}))},[f,n,c]);const g=n!==void 0;return y.jsxs("div",{className:g?"file-code file-code--numbered":"file-code",children:[u&&y.jsxs("div",{className:"tree-note","data-tree-note":"truncated",children:["文件较大,仅高亮前 ",_1," 行"]}),f!==null?y.jsx("div",{ref:_=>{p.current=_},className:"file-code-body",dangerouslySetInnerHTML:{__html:f}}):y.jsx("pre",{ref:_=>{p.current=_},className:"file-code-plain",children:c.split(`
17
- `).map((_,v)=>y.jsx("span",{className:"line",children:`${_}
18
- `},v))})]})}function Dy(e,t){for(let n=e.length-1;n>=0;n-=1){const s=e[n];if(t(s,n))return s}}function Ht(e,t,n,s){const a=e.createOscillator(),u=e.createGain(),c=n+(s.start??0),f=s.gain??.5,m=s.attack??.006,p=c+s.dur;a.type=s.type??"sine",a.frequency.setValueAtTime(s.freq,c),u.gain.setValueAtTime(1e-4,c),u.gain.exponentialRampToValueAtTime(Math.max(f,2e-4),c+m),u.gain.exponentialRampToValueAtTime(1e-4,p),a.connect(u),u.connect(t),a.start(c),a.stop(p+.02)}function k3(e,t,n,s){const a=e.createOscillator(),u=e.createGain(),c=n+(s.start??0),f=s.attack??.004,m=s.glide??.16,p=c+s.decay;a.type="triangle",a.frequency.setValueAtTime(s.freqFrom,c),a.frequency.exponentialRampToValueAtTime(s.freqTo,c+m),u.gain.setValueAtTime(1e-4,c),u.gain.exponentialRampToValueAtTime(Math.max(s.gain,2e-4),c+f),u.gain.exponentialRampToValueAtTime(1e-4,p),a.connect(u),u.connect(t),a.start(c),a.stop(p+.02)}function Fr(e,t,n,s){const a=e.createOscillator(),u=e.createGain(),c=n+(s.start??0),f=s.hold??.08,m=c+s.attack+f+s.decay;a.type=s.type??"sine",a.frequency.setValueAtTime(s.freq,c),s.freqTo!==void 0&&a.frequency.exponentialRampToValueAtTime(s.freqTo,c+s.attack+f*.6),a.detune.setValueAtTime(s.detune??0,c),u.gain.setValueAtTime(1e-4,c),u.gain.exponentialRampToValueAtTime(Math.max(s.gain,2e-4),c+s.attack),u.gain.setValueAtTime(Math.max(s.gain,2e-4),c+s.attack+f),u.gain.exponentialRampToValueAtTime(1e-4,m),a.connect(u),u.connect(t),a.start(c),a.stop(m+.02)}function Ay(e,t){const n=Math.floor(e.sampleRate*t),s=e.createBuffer(1,n,e.sampleRate),a=s.getChannelData(0);for(let c=0;c<n;c+=1)a[c]=Math.random()*2-1;const u=e.createBufferSource();return u.buffer=s,u}function T3(e,t,n,s){const a=Ay(e,.12),u=e.createBiquadFilter(),c=e.createGain(),f=n+(s.start??0),m=f+s.decay;u.type="bandpass",u.frequency.setValueAtTime(s.freq,f),u.Q.setValueAtTime(s.q??1.2,f),c.gain.setValueAtTime(1e-4,f),c.gain.exponentialRampToValueAtTime(Math.max(s.gain,2e-4),f+.018),c.gain.exponentialRampToValueAtTime(1e-4,m),a.connect(u),u.connect(c),c.connect(t),a.start(f),a.stop(m+.02)}function Jw(e,t,n,s){const a=Ay(e,.4),u=e.createBiquadFilter(),c=e.createGain(),f=n+(s.start??0),m=f+s.decay;u.type="bandpass",u.frequency.setValueAtTime(s.freqFrom,f),u.frequency.exponentialRampToValueAtTime(s.freqTo,m),u.Q.setValueAtTime(s.q??.8,f),c.gain.setValueAtTime(1e-4,f),c.gain.exponentialRampToValueAtTime(Math.max(s.gain,2e-4),f+.03),c.gain.exponentialRampToValueAtTime(1e-4,m),a.connect(u),u.connect(c),c.connect(t),a.start(f),a.stop(m+.02)}function M3(e,t,n,s){const a=e.createOscillator(),u=e.createGain(),c=n+(s.start??0),f=s.attack??.003,m=c+s.decay;a.type=s.type??"triangle",a.frequency.setValueAtTime(s.freqFrom,c),a.frequency.exponentialRampToValueAtTime(s.freqTo,m-.02),u.gain.setValueAtTime(1e-4,c),u.gain.exponentialRampToValueAtTime(Math.max(s.gain,2e-4),c+f),u.gain.exponentialRampToValueAtTime(1e-4,m),a.connect(u),u.connect(t),a.start(c),a.stop(m+.02)}let kc=null;function ex(e){if(kc===null){const s=Math.floor(e.sampleRate*1.6);kc=e.createBuffer(2,s,e.sampleRate);for(let a=0;a<2;a+=1){const u=kc.getChannelData(a);for(let c=0;c<s;c+=1)u[c]=(Math.random()*2-1)*(1-c/s)**2.6}}const t=e.createConvolver();return t.buffer=kc,t}const tx=110,g1=220,ix=440,v1=880,nx=987.77,rx=130.81,y1=261.63,S1=329.63,Hl=659.25,sx=1318.51,lx=392,Il=783.99,b1=523.25,ro=1046.5,Mp=[{id:1,name:"双音轻抚",play:(e,t,n)=>{Ht(e,t,n,{freq:S1,dur:.22,gain:.05,attack:.03,type:"sine"}),Ht(e,t,n+.08,{freq:y1,dur:.52,gain:.07,attack:.08,type:"sine"}),Ht(e,t,n+.08,{freq:rx,dur:.46,gain:.02,attack:.1,type:"sine"})}},{id:2,name:"玻璃清鸣",play:(e,t,n)=>{Ht(e,t,n,{freq:ro,dur:.55,gain:.032,attack:.002,type:"sine"}),Ht(e,t,n+.01,{freq:Hl,dur:.42,gain:.018,attack:.004,type:"sine"}),T3(e,t,n,{freq:3200,gain:.004,decay:.1,q:1.4})}},{id:3,name:"柔木琴",play:(e,t,n)=>{k3(e,t,n,{freqFrom:Hl,freqTo:Il,gain:.03,decay:.14,glide:.08}),Fr(e,t,n+.04,{freq:b1,gain:.028,attack:.08,hold:.04,decay:.62}),Fr(e,t,n+.06,{freq:lx,gain:.014,attack:.12,hold:.06,decay:.55})}},{id:4,name:"三音讯号",play:(e,t,n)=>{Ht(e,t,n,{freq:ro,dur:.14,gain:.045,attack:.004,type:"sine"}),Ht(e,t,n+.1,{freq:v1,dur:.16,gain:.04,attack:.004,type:"sine"}),Ht(e,t,n+.2,{freq:Il,dur:.22,gain:.035,attack:.006,type:"sine"})}},{id:5,name:"风声掠过",play:(e,t,n)=>{Jw(e,t,n,{freqFrom:4200,freqTo:900,gain:.022,decay:.28,q:.7}),Ht(e,t,n+.12,{freq:v1,dur:.35,gain:.02,attack:.02,type:"sine"})}},{id:6,name:"发现之簇",play:(e,t,n)=>{[-14,-5,0,7,12].forEach((a,u)=>{Fr(e,t,n+u*.03,{freq:g1,gain:.012,attack:.38,hold:.12,decay:1.05,detune:a})}),Fr(e,t,n+.1,{freq:S1,gain:.008,attack:.45,hold:.08,decay:.9,detune:3})}},{id:7,name:"系统上线",play:(e,t,n)=>{Ht(e,t,n,{freq:b1,dur:.16,gain:.04,attack:.006,type:"sine"}),Ht(e,t,n+.09,{freq:Il,dur:.28,gain:.042,attack:.008,type:"sine"}),Ht(e,t,n+.09,{freq:y1,dur:.24,gain:.012,attack:.01,type:"sine"})}},{id:8,name:"老式终端",play:(e,t,n)=>{Ht(e,t,n,{freq:nx,dur:.12,gain:.038,attack:.002,type:"square"}),Ht(e,t,n+.14,{freq:Hl,dur:.1,gain:.028,attack:.002,type:"square"})}},{id:9,name:"调制解调",play:(e,t,n)=>{M3(e,t,n,{freqFrom:320,freqTo:2200,gain:.024,decay:.16,type:"triangle"}),M3(e,t,n+.1,{freqFrom:480,freqTo:1400,gain:.014,decay:.12,type:"sine"})}},{id:10,name:"风铃",play:(e,t,n)=>{[Il,ro,Hl,v1].forEach((a,u)=>{Ht(e,t,n+u*.13,{freq:a,dur:.72,gain:.028-u*.003,attack:.003,type:"sine"})})}},{id:11,name:"颂钵",play:(e,t,n)=>{Fr(e,t,n,{freq:g1,gain:.022,attack:.58,hold:.16,decay:1.35}),Fr(e,t,n+.08,{freq:S1,gain:.01,attack:.62,hold:.12,decay:1.2,detune:4}),Fr(e,t,n+.14,{freq:ix,gain:.006,attack:.68,hold:.08,decay:1.05,detune:-3})}},{id:12,name:"竖琴拾音",play:(e,t,n)=>{[b1,Hl,Il,ro].forEach((a,u)=>{Ht(e,t,n+u*.075,{freq:a,dur:.38,gain:.034-u*.004,attack:.012,type:"sine"})}),Fr(e,t,n+.2,{freq:y1,gain:.01,attack:.18,hold:.06,decay:.7})}},{id:13,name:"声呐",play:(e,t,n)=>{Ht(e,t,n,{freq:tx,dur:.95,gain:.036,attack:.008,type:"sine"}),Ht(e,t,n+.42,{freq:g1,dur:.55,gain:.014,attack:.01,type:"sine"}),T3(e,t,n,{freq:600,gain:.005,decay:.2,q:.5})}},{id:14,name:"八音盒",play:(e,t,n)=>{[sx,ro,Il,Hl].forEach((a,u)=>{k3(e,t,n+u*.09,{freqFrom:a,freqTo:a*.998,gain:.02-u*.002,decay:.2,glide:.06})})}}];let so=null;function ax(){if(typeof window>"u")return null;try{if(so===null){const e=window.AudioContext??window.webkitAudioContext;if(e===void 0)return null;so=new e}return so.state==="suspended"&&so.resume().catch(()=>{}),so}catch{return null}}function ox(e){const t=Mp.find(m=>m.id===e);if(t===void 0)return;const n=ax();if(n===null)return;const s=n.createGain(),a=n.createBiquadFilter();a.type="lowpass",a.frequency.setValueAtTime(3800,n.currentTime),a.Q.setValueAtTime(.32,n.currentTime),s.gain.setValueAtTime(.48,n.currentTime),s.connect(a);const u=n.createGain();u.gain.setValueAtTime(.88,n.currentTime),a.connect(u),u.connect(n.destination);const c=ex(n),f=n.createGain();f.gain.setValueAtTime(.34,n.currentTime),a.connect(c),c.connect(f),f.connect(n.destination),t.play(n,s,n.currentTime+.01)}function Oy(e){ox(e)}let Tc=null;function Ry(e){return Tc?.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 a=document.createElement("div");a.className="dsc-overlay__card",a.style.setProperty("--card-w","24rem");const u=document.createElement("div");u.className="dsc-confirm__body";const c=document.createElement("h3");c.className="dsc-confirm__title",c.id="dsc-confirm-title",c.textContent=e.title;const f=document.createElement("p");f.className="dsc-confirm__detail",f.id="dsc-confirm-detail",f.textContent=e.detail,u.append(c,f);const m=document.createElement("div");m.className="dsc-confirm__actions";const p=document.createElement("button");p.className="dsc-btn",p.type="button",p.dataset.variant="secondary",p.dataset.size="sm",p.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,m.append(p,g),a.append(u,m),s.append(a),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===p?g:p).focus())},v=E=>{E.target===s&&C(!1)},b={settle:()=>C(!1)};let w=!1;const C=E=>{w||(w=!0,document.removeEventListener("keydown",_,!0),s.removeEventListener("pointerdown",v),s.remove(),Tc===b&&(Tc=null),n!==null&&n.isConnected&&n.focus(),t(E))};Tc=b,document.addEventListener("keydown",_,!0),s.addEventListener("pointerdown",v),p.addEventListener("click",()=>C(!1)),g.addEventListener("click",()=>C(!0)),document.body.appendChild(s),p.focus()})}let lo;function ux(){return lo===void 0&&(lo=document.createElement("div"),lo.style.cssText="position:absolute;top:0;left:0;width:0;height:0;visibility:hidden;pointer-events:none",document.documentElement.append(lo)),lo}function Zc(e){return typeof document>"u"?null:Dp(s0(e))}function Ly(e,t){if(typeof document>"u")return t;const n=getComputedStyle(document.documentElement).getPropertyValue(e).trim();return n===""?t:n}function n0(e){const t=/^(rgb|color)\((.+)\)$/i.exec(e.trim());if(!t)return null;const n=t[1].toLowerCase()==="color",a=(n?t[2].replace(/^\s*srgb\s+/i,""):t[2]).split(/[,/\s]+/).filter(f=>f!=="").map(Number);if(a.length<3||a.slice(0,4).some(f=>!Number.isFinite(f)))return null;const u=n?255:1,c=f=>Math.min(255,Math.max(0,f*u));return{r:c(a[0]),g:c(a[1]),b:c(a[2]),a:a.length>3?Math.min(1,Math.max(0,a[3])):1}}function r0(e){const t=n=>Math.round(n).toString(16).padStart(2,"0");return`#${t(e.r)}${t(e.g)}${t(e.b)}`}function cx(e,t){const n=(s,a)=>s*e.a+a*(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 Dp(e){const t=n0(e);return t===null||t.a<.999?null:r0(t)}function s0(e){const t=ux();return t.style.backgroundColor=`var(${e})`,getComputedStyle(t).backgroundColor}function zy(e,t,n){if(typeof document>"u")return n;const s=n0(s0(e));if(s===null)return n;if(s.a>=.999)return r0(s);const a=n0(s0(t));return r0(a===null?s:cx(s,a))}function Ny({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 hx({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(Ny,{text:e.text,highlight:t})]})}function fx(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 a=0,u=n;for(;u<e.length&&e[u].kind==="remove";)a+=1,u+=1;let c=0;for(;u<e.length&&e[u].kind==="add";)c+=1,u+=1;const f=Math.max(a,c);for(let m=0;m<f;m+=1)t.push({left:m<a?e[n+m]:null,right:m<c?e[n+a+m]:null});n=u}return t}function D3({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(Ny,{text:e.text,highlight:n})]})}function dx({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?fx(e.lines).map((a,u)=>y.jsxs("span",{className:"diff-split-row",children:[y.jsx(D3,{line:a.left,show:"old",highlight:n?.[s+u]}),y.jsx(D3,{line:a.right,show:"new",highlight:n?.[s+u]})]},String(u))):e.lines.map((a,u)=>y.jsx(hx,{line:a,highlight:n?.[s+u]},String(u)))]})}function Ap({hunks:e,path:t,split:n=!1,wrap:s=!1}){const[a,u]=Y.useState(null),c=e.map(m=>m.lines.map(p=>p.text).join(`
19
- `)).join(`
20
- `);Y.useEffect(()=>{let m=!0;return u(null),Tp(c,t).then(p=>{m&&u(p)}),()=>{m=!1}},[c,t]);let f=0;return y.jsx("div",{className:"diff-body","data-split":n||void 0,"data-wrap":s||void 0,children:e.map((m,p)=>{const g=f;return f+=m.lines.length,y.jsx(dx,{hunk:m,split:n,highlights:a,head:g},String(p))})})}const Op="__DSC_CODE_ICON_INSTANCE__",Rp=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">
21
- <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"/>
22
- <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"/>
23
- <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"/>
24
- <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"/>
25
- </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>'}),Lp=["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"],px=new Set(Lp),mx={".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"},_x=[["dockerfile.","docker"],[".env.","env"]],gx=[[".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"]],vx={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"},yx={"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"},Sx={changelog:"markdown",contributing:"markdown",readme:"markdown"};function Vo(e){return e.slice(Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"))+1)}function zp(e){const t=Vo(e),n=t.lastIndexOf(".");return n<0?"":t.slice(n+1)}function Np(e){return px.has(e)}function Bp(e,t,n){const s=mx[e];if(s!==void 0)return s;for(const[a,u]of _x)if(e.startsWith(a))return u;for(const[a,u]of gx)if(e.endsWith(a))return u;return t==="dart"&&n!==void 0&&Object.entries(n.files).find(([u])=>Vo(u).toLowerCase()==="pubspec.yaml")?.[1]?.includes("flutter:")===!0?"flutter":vx[t]??null}function Ch(e,t){const n=Vo(e).toLowerCase(),s=zp(n).toLowerCase();return Bp(n,s,t)??Sx[n]??yx[s]??"other"}const Qc=28,bx="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",wx="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",w1="translate(14 16) scale(1.12) translate(-14 -16)",vo="translate(14 16) scale(1.22) translate(-14 -16)",xx="translate(14 13.0693) scale(1.12) translate(-14 -13.0693)";function Cx(e){return e?{fill:"#ffffff",fillOpacity:.36}:{fill:"#ffffff",fillOpacity:.72}}function dn({size:e,className:t,children:n,markTransform:s,muted:a=!1}){return y.jsxs("svg",{width:e,height:e,className:t,viewBox:`0 0 ${String(Qc)} ${String(Qc)}`,fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:[y.jsx("path",{d:bx,fill:"currentColor"}),y.jsx("path",{d:wx,...Cx(a)}),n!==void 0&&y.jsx("g",{color:"#ffffff",transform:s,children:n})]})}function Ex({size:e,className:t}){return y.jsxs("svg",{width:e,height:e,className:t,viewBox:`0 0 ${String(Qc)} ${String(Qc)}`,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:xx,children:y.jsx("path",{d:"M6.31445 13.0693H21.6893",stroke:"currentColor",strokeWidth:"2.38"})})]})}function kx({size:e,className:t}){return y.jsx(dn,{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 Tx({size:e,className:t}){return y.jsxs(dn,{size:e,className:t,markTransform:vo,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 Mx(e,t,n){switch(e){case"archive":return y.jsx(Tx,{size:t,className:n});case"code":return y.jsxs(dn,{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(kx,{size:t,className:n});case"folder":return y.jsx(Ex,{size:t,className:n});case"html":return y.jsx(dn,{size:t,className:n,markTransform:w1,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(dn,{size:t,className:n,markTransform:w1,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(dn,{size:t,className:n,markTransform:vo,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(dn,{size:t,className:n,muted:!0});case"pdf":return y.jsx(dn,{size:t,className:n,markTransform:vo,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(dn,{size:t,className:n,markTransform:vo,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(dn,{size:t,className:n,markTransform:w1,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(dn,{size:t,className:n,markTransform:vo,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 Dx(e)}}function Dx(e){throw new Error(`没有字形的传统档:${String(e)}`)}function Ax(e,t,n){const s=`${e} dsc-fti--${t}`;return n===void 0||n===""?s:`${s} ${n}`}function jp(e){const{size:t=16,className:n}=e,s="path"in e?Ch(e.path,e.context):e.kind;return Np(s)?y.jsx(Hp,{type:s,size:t,className:n}):Mx(s,t,Ax("dsc-fti",s,n))}function Hp({type:e,size:t=20,className:n}){const s=`dsc-code-icon-${Y.useId().replace(/[^a-zA-Z0-9]/g,"")}`,a=Rp[e].replaceAll(Op,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:a}})}function By(e){return Ch(e)}function Eh({name:e,size:t=16,className:n}){return y.jsx(jp,{path:e,size:t,className:n})}const Ox=500,Rx=1e3;function jy(){const[e,t]=Y.useState(null),n=Y.useRef(null),s=Y.useRef(null),a=()=>{n.current!==null&&(window.clearTimeout(n.current),n.current=null)},u=()=>{s.current!==null&&(window.clearTimeout(s.current),s.current=null)};return Y.useEffect(()=>()=>{a(),u()},[]),{hover:e,arm:(m,p,g=520)=>{a(),u(),n.current=window.setTimeout(()=>t({item:m,anchor:p,cardWidth:g}),Ox)},disarm:()=>{a(),u(),s.current=window.setTimeout(()=>t(null),Rx)},keep:u,close:()=>{a(),u(),t(null)}}}function Lx(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const zx=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Nx=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Bx={};function A3(e,t){return(Bx.jsx?Nx:zx).test(e)}const jx=/[ \t\n\f\r]/g;function Hx(e){return typeof e=="object"?e.type==="text"?O3(e.value):!1:O3(e)}function O3(e){return e.replace(jx,"")===""}class qo{constructor(t,n,s){this.normal=n,this.property=t,s&&(this.space=s)}}qo.prototype.normal={};qo.prototype.property={};qo.prototype.space=void 0;function Hy(e,t){const n={},s={};for(const a of e)Object.assign(n,a.property),Object.assign(s,a.normal);return new qo(n,s,t)}function l0(e){return e.toLowerCase()}class Ei{constructor(t,n){this.attribute=n,this.property=t}}Ei.prototype.attribute="";Ei.prototype.booleanish=!1;Ei.prototype.boolean=!1;Ei.prototype.commaOrSpaceSeparated=!1;Ei.prototype.commaSeparated=!1;Ei.prototype.defined=!1;Ei.prototype.mustUseProperty=!1;Ei.prototype.number=!1;Ei.prototype.overloadedBoolean=!1;Ei.prototype.property="";Ei.prototype.spaceSeparated=!1;Ei.prototype.space=void 0;let Ix=0;const De=Us(),Et=Us(),a0=Us(),le=Us(),rt=Us(),Ns=Us(),Ii=Us();function Us(){return 2**++Ix}const o0=Object.freeze(Object.defineProperty({__proto__:null,boolean:De,booleanish:Et,commaOrSpaceSeparated:Ii,commaSeparated:Ns,number:le,overloadedBoolean:a0,spaceSeparated:rt},Symbol.toStringTag,{value:"Module"})),x1=Object.keys(o0);class Ip extends Ei{constructor(t,n,s,a){let u=-1;if(super(t,n),R3(this,"space",a),typeof s=="number")for(;++u<x1.length;){const c=x1[u];R3(this,x1[u],(s&o0[c])===o0[c])}}}Ip.prototype.defined=!0;function R3(e,t,n){n&&(e[t]=n)}function ea(e){const t={},n={};for(const[s,a]of Object.entries(e.properties)){const u=new Ip(s,e.transform(e.attributes||{},s),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(u.mustUseProperty=!0),t[s]=u,n[l0(s)]=s,n[l0(u.attribute)]=s}return new qo(t,n,e.space)}const Iy=ea({properties:{ariaActiveDescendant:null,ariaAtomic:Et,ariaAutoComplete:null,ariaBusy:Et,ariaChecked:Et,ariaColCount:le,ariaColIndex:le,ariaColSpan:le,ariaControls:rt,ariaCurrent:null,ariaDescribedBy:rt,ariaDetails:null,ariaDisabled:Et,ariaDropEffect:rt,ariaErrorMessage:null,ariaExpanded:Et,ariaFlowTo:rt,ariaGrabbed:Et,ariaHasPopup:null,ariaHidden:Et,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:rt,ariaLevel:le,ariaLive:null,ariaModal:Et,ariaMultiLine:Et,ariaMultiSelectable:Et,ariaOrientation:null,ariaOwns:rt,ariaPlaceholder:null,ariaPosInSet:le,ariaPressed:Et,ariaReadOnly:Et,ariaRelevant:null,ariaRequired:Et,ariaRoleDescription:rt,ariaRowCount:le,ariaRowIndex:le,ariaRowSpan:le,ariaSelected:Et,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 Py(e,t){return t in e?e[t]:t}function Fy(e,t){return Py(e,t.toLowerCase())}const Px=ea({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ns,acceptCharset:rt,accessKey:rt,action:null,allow:null,allowFullScreen:De,allowPaymentRequest:De,allowUserMedia:De,alpha:De,alt:null,as:null,async:De,autoCapitalize:null,autoComplete:rt,autoFocus:De,autoPlay:De,blocking:rt,capture:null,charSet:null,checked:De,cite:null,className:rt,closedBy:null,colorSpace:null,cols:le,colSpan:le,command:null,commandFor:null,content:null,contentEditable:Et,controls:De,controlsList:rt,coords:le|Ns,crossOrigin:null,data:null,dateTime:null,decoding:null,default:De,defer:De,dir:null,dirName:null,disabled:De,download:a0,draggable:Et,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:De,formTarget:null,headers:rt,height:le,hidden:a0,high:le,href:null,hrefLang:null,htmlFor:rt,httpEquiv:rt,id:null,imageSizes:null,imageSrcSet:null,inert:De,inputMode:null,integrity:null,is:null,isMap:De,itemId:null,itemProp:rt,itemRef:rt,itemScope:De,itemType:rt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:De,low:le,manifest:null,max:null,maxLength:le,media:null,method:null,min:null,minLength:le,multiple:De,muted:De,name:null,nonce:null,noModule:De,noValidate:De,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:De,optimum:le,pattern:null,ping:rt,placeholder:null,playsInline:De,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:De,referrerPolicy:null,rel:rt,required:De,reversed:De,rows:le,rowSpan:le,sandbox:rt,scope:null,scoped:De,seamless:De,selected:De,shadowRootClonable:De,shadowRootCustomElementRegistry:De,shadowRootDelegatesFocus:De,shadowRootMode:null,shadowRootSerializable:De,shape:null,size:le,sizes:null,slot:null,span:le,spellCheck:Et,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:De,useMap:null,value:Et,width:le,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:rt,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:De,declare:De,event:null,face:null,frame:null,frameBorder:null,hSpace:le,leftMargin:le,link:null,longDesc:null,lowSrc:null,marginHeight:le,marginWidth:le,noResize:De,noHref:De,noShade:De,noWrap:De,object:null,profile:null,prompt:null,rev:null,rightMargin:le,rules:null,scheme:null,scrolling:Et,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:De,disablePictureInPicture:De,disableRemotePlayback:De,exportParts:Ns,part:rt,prefix:null,property:null,results:le,security:null,unselectable:null},space:"html",transform:Fy}),Fx=ea({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:Ii,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:rt,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:De,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:Ns,g2:Ns,glyphName:Ns,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:Ii,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:rt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:le,pointsAtY:le,pointsAtZ:le,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ii,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ii,rev:Ii,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ii,requiredFeatures:Ii,requiredFonts:Ii,requiredFormats:Ii,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:Ii,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:Ii,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:Ii,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:Py}),Uy=ea({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()}}),Vy=ea({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Fy}),qy=ea({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Ux={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"},Vx=/[A-Z]/g,L3=/-[a-z]/g,qx=/^data[-\w.:]+$/i;function Yx(e,t){const n=l0(t);let s=t,a=Ei;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&qx.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(L3,Kx);s="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!L3.test(u)){let c=u.replace(Vx,$x);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}a=Ip}return new a(s,t)}function $x(e){return"-"+e.toLowerCase()}function Kx(e){return e.charAt(1).toUpperCase()}const Wx=Hy([Iy,Px,Uy,Vy,qy],"html"),Pp=Hy([Iy,Fx,Uy,Vy,qy],"svg");function Gx(e){return e.join(" ").trim()}var Pl={},C1,z3;function Xx(){if(z3)return C1;z3=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,m=`
26
- `,p="/",g="*",_="",v="comment",b="declaration";function w(E,D){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];D=D||{};var K=1,V=1;function Z(Q){var P=Q.match(t);P&&(K+=P.length);var B=Q.lastIndexOf(m);V=~B?Q.length-B:V+Q.length}function se(){var Q={line:K,column:V};return function(P){return P.position=new z(Q),ae(),P}}function z(Q){this.start=Q,this.end={line:K,column:V},this.source=D.source}z.prototype.content=E;function T(Q){var P=new Error(D.source+":"+K+":"+V+": "+Q);if(P.reason=Q,P.filename=D.source,P.line=K,P.column=V,P.source=E,!D.silent)throw P}function $(Q){var P=Q.exec(E);if(P){var B=P[0];return Z(B),E=E.slice(B.length),P}}function ae(){$(n)}function N(Q){var P;for(Q=Q||[];P=J();)P!==!1&&Q.push(P);return Q}function J(){var Q=se();if(!(p!=E.charAt(0)||g!=E.charAt(1))){for(var P=2;_!=E.charAt(P)&&(g!=E.charAt(P)||p!=E.charAt(P+1));)++P;if(P+=2,_===E.charAt(P-1))return T("End of comment missing");var B=E.slice(2,P-2);return V+=2,Z(B),E=E.slice(P),V+=2,Q({type:v,comment:B})}}function W(){var Q=se(),P=$(s);if(P){if(J(),!$(a))return T("property missing ':'");var B=$(u),ee=Q({type:b,property:C(P[0].replace(e,_)),value:B?C(B[0].replace(e,_)):_});return $(c),ee}}function G(){var Q=[];N(Q);for(var P;P=W();)P!==!1&&(Q.push(P),N(Q));return Q}return ae(),G()}function C(E){return E?E.replace(f,_):_}return C1=w,C1}var N3;function Zx(){if(N3)return Pl;N3=1;var e=Pl&&Pl.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Pl,"__esModule",{value:!0}),Pl.default=n;const t=e(Xx());function n(s,a){let u=null;if(!s||typeof s!="string")return u;const c=(0,t.default)(s),f=typeof a=="function";return c.forEach(m=>{if(m.type!=="declaration")return;const{property:p,value:g}=m;f?a(p,g,m):g&&(u=u||{},u[p]=g)}),u}return Pl}var ao={},B3;function Qx(){if(B3)return ao;B3=1,Object.defineProperty(ao,"__esModule",{value:!0}),ao.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,s=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,u=function(p){return!p||n.test(p)||e.test(p)},c=function(p,g){return g.toUpperCase()},f=function(p,g){return"".concat(g,"-")},m=function(p,g){return g===void 0&&(g={}),u(p)?p:(p=p.toLowerCase(),g.reactCompat?p=p.replace(a,f):p=p.replace(s,f),p.replace(t,c))};return ao.camelCase=m,ao}var oo,j3;function Jx(){if(j3)return oo;j3=1;var e=oo&&oo.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(Zx()),n=Qx();function s(a,u){var c={};return!a||typeof a!="string"||(0,t.default)(a,function(f,m){f&&m&&(c[(0,n.camelCase)(f,u)]=m)}),c}return s.default=s,oo=s,oo}var eC=Jx();const tC=Jl(eC),Yy=$y("end"),Fp=$y("start");function $y(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 iC(e){const t=Fp(e),n=Yy(e);if(t&&n)return{start:t,end:n}}function Co(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?H3(e.position):"start"in e||"end"in e?H3(e):"line"in e||"column"in e?u0(e):""}function u0(e){return I3(e&&e.line)+":"+I3(e&&e.column)}function H3(e){return u0(e&&e.start)+"-"+u0(e&&e.end)}function I3(e){return e&&typeof e=="number"?e:1}class ri extends Error{constructor(t,n,s){super(),typeof n=="string"&&(s=n,n=void 0);let a="",u={},c=!1;if(n&&("line"in n&&"column"in n?u={place:n}:"start"in n&&"end"in n?u={place:n}:"type"in n?u={ancestors:[n],place:n.position}:u={...n}),typeof t=="string"?a=t:!u.cause&&t&&(c=!0,a=t.message,u.cause=t),!u.ruleId&&!u.source&&typeof s=="string"){const m=s.indexOf(":");m===-1?u.ruleId=s:(u.source=s.slice(0,m),u.ruleId=s.slice(m+1))}if(!u.place&&u.ancestors&&u.ancestors){const m=u.ancestors[u.ancestors.length-1];m&&(u.place=m.position)}const f=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=f?f.line:void 0,this.name=Co(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=c&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ri.prototype.file="";ri.prototype.name="";ri.prototype.reason="";ri.prototype.message="";ri.prototype.stack="";ri.prototype.column=void 0;ri.prototype.line=void 0;ri.prototype.ancestors=void 0;ri.prototype.cause=void 0;ri.prototype.fatal=void 0;ri.prototype.place=void 0;ri.prototype.ruleId=void 0;ri.prototype.source=void 0;const Up={}.hasOwnProperty,nC=new Map,rC=/[A-Z]/g,sC=new Set(["table","tbody","thead","tfoot","tr"]),lC=new Set(["td","th"]),Ky="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function aC(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=mC(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=pC(n,t.jsx,t.jsxs)}const a={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"?Pp:Wx,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},u=Wy(a,e,void 0);return u&&typeof u!="string"?u:a.create(e,a.Fragment,{children:u||void 0},void 0)}function Wy(e,t,n){if(t.type==="element")return oC(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return uC(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return hC(e,t,n);if(t.type==="mdxjsEsm")return cC(e,t);if(t.type==="root")return fC(e,t,n);if(t.type==="text")return dC(e,t)}function oC(e,t,n){const s=e.schema;let a=s;t.tagName.toLowerCase()==="svg"&&s.space==="html"&&(a=Pp,e.schema=a),e.ancestors.push(t);const u=Xy(e,t.tagName,!1),c=_C(e,t);let f=qp(e,t);return sC.has(t.tagName)&&(f=f.filter(function(m){return typeof m=="string"?!Hx(m):!0})),Gy(e,c,u,t),Vp(c,f),e.ancestors.pop(),e.schema=s,e.create(t,u,c,n)}function uC(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)}Lo(e,t.position)}function cC(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Lo(e,t.position)}function hC(e,t,n){const s=e.schema;let a=s;t.name==="svg"&&s.space==="html"&&(a=Pp,e.schema=a),e.ancestors.push(t);const u=t.name===null?e.Fragment:Xy(e,t.name,!0),c=gC(e,t),f=qp(e,t);return Gy(e,c,u,t),Vp(c,f),e.ancestors.pop(),e.schema=s,e.create(t,u,c,n)}function fC(e,t,n){const s={};return Vp(s,qp(e,t)),e.create(t,e.Fragment,s,n)}function dC(e,t){return t.value}function Gy(e,t,n,s){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=s)}function Vp(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function pC(e,t,n){return s;function s(a,u,c,f){const p=Array.isArray(c.children)?n:t;return f?p(u,c,f):p(u,c)}}function mC(e,t){return n;function n(s,a,u,c){const f=Array.isArray(u.children),m=Fp(s);return t(a,u,c,f,{columnNumber:m?m.column-1:void 0,fileName:e,lineNumber:m?m.line:void 0},void 0)}}function _C(e,t){const n={};let s,a;for(a in t.properties)if(a!=="children"&&Up.call(t.properties,a)){const u=vC(e,a,t.properties[a]);if(u){const[c,f]=u;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&lC.has(t.tagName)?s=f:n[c]=f}}if(s){const u=n.style||(n.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=s}return n}function gC(e,t){const n={};for(const s of t.attributes)if(s.type==="mdxJsxExpressionAttribute")if(s.data&&s.data.estree&&e.evaluater){const u=s.data.estree.body[0];u.type;const c=u.expression;c.type;const f=c.properties[0];f.type,Object.assign(n,e.evaluater.evaluateExpression(f.argument))}else Lo(e,t.position);else{const a=s.name;let u;if(s.value&&typeof s.value=="object")if(s.value.data&&s.value.data.estree&&e.evaluater){const f=s.value.data.estree.body[0];f.type,u=e.evaluater.evaluateExpression(f.expression)}else Lo(e,t.position);else u=s.value===null?!0:s.value;n[a]=u}return n}function qp(e,t){const n=[];let s=-1;const a=e.passKeys?new Map:nC;for(;++s<t.children.length;){const u=t.children[s];let c;if(e.passKeys){const m=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(m){const p=a.get(m)||0;c=m+"-"+p,a.set(m,p+1)}}const f=Wy(e,u,c);f!==void 0&&n.push(f)}return n}function vC(e,t,n){const s=Yx(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=s.commaSeparated?Lx(n):Gx(n)),s.property==="style"){let a=typeof n=="object"?n:yC(e,String(n));return e.stylePropertyNameCase==="css"&&(a=SC(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&s.space?Ux[s.property]||s.property:s.attribute,n]}}function yC(e,t){try{return tC(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const s=n,a=new ri("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:s,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=Ky+"#cannot-parse-style-attribute",a}}function Xy(e,t,n){let s;if(!n)s={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let u=-1,c;for(;++u<a.length;){const f=A3(a[u])?{type:"Identifier",name:a[u]}:{type:"Literal",value:a[u]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(u&&f.type==="Literal"),optional:!1}:f}s=c}else s=A3(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(s.type==="Literal"){const a=s.value;return Up.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(s);Lo(e)}function Lo(e,t){const n=new ri("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=Ky+"#cannot-handle-mdx-estrees-without-createevaluater",n}function SC(e){const t={};let n;for(n in e)Up.call(e,n)&&(t[bC(n)]=e[n]);return t}function bC(e){let t=e.replace(rC,wC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function wC(e){return"-"+e.toLowerCase()}const E1={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"]},xC={};function Yp(e,t){const n=xC,s=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Zy(e,s,a)}function Zy(e,t,n){if(CC(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 P3(e.children,t,n)}return Array.isArray(e)?P3(e,t,n):""}function P3(e,t,n){const s=[];let a=-1;for(;++a<e.length;)s[a]=Zy(e[a],t,n);return s.join("")}function CC(e){return!!(e&&typeof e=="object")}const F3=document.createElement("i");function $p(e){const t="&"+e+";";F3.innerHTML=t;const n=F3.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function pn(e,t,n,s){const a=e.length;let u=0,c;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,s.length<1e4)c=Array.from(s),c.unshift(t,n),e.splice(...c);else for(n&&e.splice(t,n);u<s.length;)c=s.slice(u,u+1e4),c.unshift(t,0),e.splice(...c),u+=1e4,t+=1e4}function nn(e,t){return e.length>0?(pn(e,e.length,0,t),e):t}const U3={}.hasOwnProperty;function Qy(e){const t={};let n=-1;for(;++n<e.length;)EC(t,e[n]);return t}function EC(e,t){let n;for(n in t){const a=(U3.call(e,n)?e[n]:void 0)||(e[n]={}),u=t[n];let c;if(u)for(c in u){U3.call(a,c)||(a[c]=[]);const f=u[c];kC(a[c],Array.isArray(f)?f:f?[f]:[])}}}function kC(e,t){let n=-1;const s=[];for(;++n<t.length;)(t[n].add==="after"?e:s).push(t[n]);pn(e,0,0,s)}function Jy(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 mn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const hi=es(/[A-Za-z]/),ni=es(/[\dA-Za-z]/),TC=es(/[#-'*+\--9=?A-Z^-~]/);function Jc(e){return e!==null&&(e<32||e===127)}const c0=es(/\d/),MC=es(/[\dA-Fa-f]/),DC=es(/[!-/:-@[-`{-~]/);function xe(e){return e!==null&&e<-2}function st(e){return e!==null&&(e<0||e===32)}function je(e){return e===-2||e===-1||e===32}const kh=es(/\p{P}|\p{S}/u),Is=es(/\s/);function es(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ta(e){const t=[];let n=-1,s=0,a=0;for(;++n<e.length;){const u=e.charCodeAt(n);let c="";if(u===37&&ni(e.charCodeAt(n+1))&&ni(e.charCodeAt(n+2)))a=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(c=String.fromCharCode(u));else if(u>55295&&u<57344){const f=e.charCodeAt(n+1);u<56320&&f>56319&&f<57344?(c=String.fromCharCode(u,f),a=1):c="�"}else c=String.fromCharCode(u);c&&(t.push(e.slice(s,n),encodeURIComponent(c)),s=n+a+1,c=""),a&&(n+=a,a=0)}return t.join("")+e.slice(s)}function $e(e,t,n,s){const a=s?s-1:1/0;let u=0;return c;function c(m){return je(m)?(e.enter(n),f(m)):t(m)}function f(m){return je(m)&&u++<a?(e.consume(m),f):(e.exit(n),t(m))}}function e6(e,t,n,s,a,u){let c=0;return f;function f(g){return je(g)?(e.enter(s),m(g)):p(g)}function m(g){return je(g)&&c<u?(e.consume(g),c++,m):(e.exit(s),p(g))}function p(g){return c>=a?t(g):n(g)}}const AC={tokenize:OC};function OC(e){const t=e.attempt(this.parser.constructs.contentInitial,s,a);let n;return t;function s(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),$e(e,t,"linePrefix")}function a(f){return e.enter("paragraph"),u(f)}function u(f){const m=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=m),n=m,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return xe(f)?(e.consume(f),e.exit("chunkText"),u):(e.consume(f),c)}}let eh=class{constructor(){this.index=new Map,this.map=[]}add(t,n,s){V3(this,t,n,s,!1)}addBefore(t,n,s){V3(this,t,n,s,!0)}consume(t){if(this.map.sort(function(u,c){return u[0]-c[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 a=s.pop();for(;a;){for(const u of a)t.push(u);a=s.pop()}this.map.length=0,this.index.clear()}};function V3(e,t,n,s,a){if(n===0&&s.length===0)return;const u=e.index.get(t);if(u){u[1]+=n,a?(s.push(...u[2]),u[2]=s):u[2].push(...s);return}const c=[t,n,s];e.map.push(c),e.index.set(t,c)}const RC={tokenize:LC},q3={tokenize:zC};function LC(e){const t=this,n=[];let s=0,a,u,c;return f;function f(V){if(s<n.length){const Z=n[s];return t.containerState=Z[1],e.attempt(Z[0].continuation,m,p)(V)}return p(V)}function m(V){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&K();const Z=t.events.length;let se=Z,z;for(;se--;)if(t.events[se][0]==="exit"&&t.events[se][1].type==="chunkFlow"){z=t.events[se][1].end;break}D(s);let T=Z;for(;T<t.events.length;)t.events[T][1].end={...z},T++;const $=new eh;return $.add(se+1,0,t.events.slice(Z)),$.add(Z,T-Z,[]),$.consume(t.events),p(V)}return f(V)}function p(V){if(s===n.length){if(!a)return v(V);if(a.currentConstruct&&a.currentConstruct.concrete)return w(V);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(q3,g,_)(V)}function g(V){return a&&K(),D(s),v(V)}function _(V){return t.parser.lazy[t.now().line]=s!==n.length,c=t.now().offset,w(V)}function v(V){return t.containerState={},e.attempt(q3,b,w)(V)}function b(V){return s++,n.push([t.currentConstruct,t.containerState]),v(V)}function w(V){if(V===null){a&&K(),D(0),e.consume(V);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:u}),C(V)}function C(V){if(V===null){E(e.exit("chunkFlow"),!0),D(0),e.consume(V);return}return xe(V)?(e.consume(V),E(e.exit("chunkFlow")),s=0,t.interrupt=void 0,f):(e.consume(V),C)}function E(V,Z){const se=t.sliceStream(V);if(Z&&se.push(null),V.previous=u,u&&(u.next=V),u=V,a.defineSkip(V.start),a.write(se),t.parser.lazy[V.start.line]){let z=a.events.length;for(;z--;)if(a.events[z][1].start.offset<c&&(!a.events[z][1].end||a.events[z][1].end.offset>c))return;const T=t.events.length;let $=T,ae,N;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){if(ae){N=t.events[$][1].end;break}ae=!0}for(D(s),z=T;z<t.events.length;)t.events[z][1].end={...N},z++;const J=new eh;J.add($+1,0,t.events.slice(T)),J.add(T,z-T,[]),J.consume(t.events)}}function D(V){let Z=n.length;for(;Z-- >V;){const se=n[Z];t.containerState=se[1],se[0].exit.call(t,e)}n.length=V}function K(){a.write([null]),u=void 0,a=void 0,t.containerState._closeFlow=void 0}}function zC(e,t,n){return $e(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function th(e){if(e===null||st(e)||Is(e))return 1;if(kh(e))return 2}function Th(e,t,n){const s=[];let a=-1;for(;++a<e.length;){const u=e[a].resolveAll;u&&!s.includes(u)&&(t=u(t,n),s.push(u))}return t}const h0={name:"attention",resolveAll:NC,tokenize:BC};function NC(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 a=n;for(;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[a][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;const u=e[a][1].end.offset-e[a][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,c={...e[a][1].end},f={...e[n][1].start};Y3(c,-u),Y3(f,u);const m={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...e[a][1].end}},p={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},g={type:u>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[n][1].start}},_={type:u>1?"strong":"emphasis",start:{...m.start},end:{...p.end}};e[a][1].end={...m.start},e[n][1].start={...p.end},s=[],e[a][1].end.offset-e[a][1].start.offset&&(s=nn(s,[["enter",e[a][1],t],["exit",e[a][1],t]])),s=nn(s,[["enter",_,t],["enter",m,t],["exit",m,t],["enter",g,t]]),s=nn(s,Th(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),s=nn(s,[["exit",g,t],["enter",p,t],["exit",p,t],["exit",_,t]]);let v=0;e[n][1].end.offset-e[n][1].start.offset&&(v=2,s=nn(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),pn(e,a-1,n-a+3,s),n=a+s.length-v-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function BC(e,t){const n=this.parser.constructs.attentionMarkers.null,s=this.previous,a=th(s);let u;return c;function c(m){return u=m,e.enter("attentionSequence"),f(m)}function f(m){if(m===u)return e.consume(m),f;const p=e.exit("attentionSequence"),g=th(m),_=!g||g===2&&a||n.includes(m)&&m!==42&&m!==95,v=!a||a===2&&g||n.includes(s)&&s!==42&&s!==95;return p._open=!!(u===42?_:_&&(a||!v)),p._close=!!(u===42?v:v&&(g||!_)),t(m)}}function Y3(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const jC={name:"autolink",tokenize:HC};function HC(e,t,n){let s=0;return a;function a(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(b){return hi(b)?(e.consume(b),c):b===64?n(b):p(b)}function c(b){return b===43||b===45||b===46||ni(b)?(s=1,f(b)):p(b)}function f(b){return b===58?(e.consume(b),s=0,m):(b===43||b===45||b===46||ni(b))&&s++<32?(e.consume(b),f):(s=0,p(b))}function m(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||Jc(b)?n(b):(e.consume(b),m)}function p(b){return b===64?(e.consume(b),g):TC(b)?(e.consume(b),p):n(b)}function g(b){return ni(b)?_(b):n(b)}function _(b){return b===46?(e.consume(b),s=0,g):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):v(b)}function v(b){if((b===45||ni(b))&&s++<63){const w=b===45?v:_;return e.consume(b),w}return n(b)}}const Yo={partial:!0,tokenize:IC};function IC(e,t,n){return s;function s(u){return je(u)?$e(e,a,"linePrefix")(u):a(u)}function a(u){return u===null||xe(u)?t(u):n(u)}}const t6={continuation:{tokenize:FC},exit:UC,name:"blockQuote",tokenize:PC};function PC(e,t,n){const s=this;return a;function a(c){if(c===62){const f=s.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),u}return n(c)}function u(c){return je(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function FC(e,t,n){const s=this;return a;function a(c){return je(c)?$e(e,u,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):u(c)}function u(c){return e.attempt(t6,t,n)(c)}}function UC(e){e.exit("blockQuote")}const i6={name:"characterEscape",tokenize:VC};function VC(e,t,n){return s;function s(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),a}function a(u){return DC(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(u)}}const n6={name:"characterReference",tokenize:qC};function qC(e,t,n){const s=this;let a=0,u,c;return f;function f(_){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(_),e.exit("characterReferenceMarker"),m}function m(_){return _===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(_),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),u=31,c=ni,g(_))}function p(_){return _===88||_===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(_),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,c=MC,g):(e.enter("characterReferenceValue"),u=7,c=c0,g(_))}function g(_){if(_===59&&a){const v=e.exit("characterReferenceValue");return c===ni&&!$p(s.sliceSerialize(v))?n(_):(e.enter("characterReferenceMarker"),e.consume(_),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(_)&&a++<u?(e.consume(_),g):n(_)}}const f0={partial:!0,tokenize:YC};function YC(e,t,n){const s=this;return a;function a(c){return c===null?n(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u)}function u(c){return s.parser.lazy[s.now().line]?n(c):t(c)}}const $3={concrete:!0,name:"codeFenced",tokenize:$C};function $C(e,t,n){const s=this,a={partial:!0,tokenize:se};let u=0,c=0,f;return m;function m(z){return p(z)}function p(z){const T=s.events[s.events.length-1];return u=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,f=z,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(z)}function g(z){return z===f?(c++,e.consume(z),g):c<3?n(z):(e.exit("codeFencedFenceSequence"),je(z)?$e(e,_,"whitespace")(z):_(z))}function _(z){return z===null||xe(z)?(e.exit("codeFencedFence"),s.interrupt?t(z):e.check(f0,C,Z)(z)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(z))}function v(z){return z===null||xe(z)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),_(z)):je(z)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),$e(e,b,"whitespace")(z)):z===96&&z===f?n(z):(e.consume(z),v)}function b(z){return z===null||xe(z)?_(z):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(z))}function w(z){return z===null||xe(z)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),_(z)):z===96&&z===f?n(z):(e.consume(z),w)}function C(z){return e.attempt(a,Z,E)(z)}function E(z){return e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),D}function D(z){return u>0&&je(z)?$e(e,K,"linePrefix",u+1)(z):K(z)}function K(z){return z===null||xe(z)?e.check(f0,C,Z)(z):(e.enter("codeFlowValue"),V(z))}function V(z){return z===null||xe(z)?(e.exit("codeFlowValue"),K(z)):(e.consume(z),V)}function Z(z){return e.exit("codeFenced"),t(z)}function se(z,T,$){let ae=0;return N;function N(P){return z.enter("lineEnding"),z.consume(P),z.exit("lineEnding"),J}function J(P){return z.enter("codeFencedFence"),je(P)?$e(z,W,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):W(P)}function W(P){return P===f?(z.enter("codeFencedFenceSequence"),G(P)):$(P)}function G(P){return P===f?(ae++,z.consume(P),G):ae>=c?(z.exit("codeFencedFenceSequence"),je(P)?$e(z,Q,"whitespace")(P):Q(P)):$(P)}function Q(P){return P===null||xe(P)?(z.exit("codeFencedFence"),T(P)):$(P)}}}const k1={name:"codeIndented",tokenize:WC},KC={partial:!0,tokenize:GC};function WC(e,t,n){return s;function s(f){return e.enter("codeIndented"),e6(e,a,n,"linePrefix",4,4)(f)}function a(f){return f===null?c(f):xe(f)?e.attempt(KC,a,c)(f):(e.enter("codeFlowValue"),u(f))}function u(f){return f===null||xe(f)?(e.exit("codeFlowValue"),a(f)):(e.consume(f),u)}function c(f){return e.exit("codeIndented"),t(f)}}function GC(e,t,n){const s=this;return a;function a(c){return s.parser.lazy[s.now().line]?n(c):xe(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a):e6(e,t,u,"linePrefix",4,4)(c)}function u(c){return xe(c)?a(c):n(c)}}const XC={name:"codeText",previous:QC,resolve:ZC,tokenize:JC};function ZC(e){let t=e.length-4,n=3,s,a;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;)a===void 0?s!==t&&e[s][1].type!=="lineEnding"&&(a=s):(s===t||e[s][1].type==="lineEnding")&&(e[a][1].type="codeTextData",s!==a+2&&(e[a][1].end=e[s-1][1].end,e.splice(a+2,s-a-2),t-=s-a-2,s=a+2),a=void 0);return e}function QC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function JC(e,t,n){let s=0,a,u;return c;function c(_){return e.enter("codeText"),e.enter("codeTextSequence"),f(_)}function f(_){return _===96?(e.consume(_),s++,f):(e.exit("codeTextSequence"),m(_))}function m(_){return _===null?n(_):_===32?(e.enter("space"),e.consume(_),e.exit("space"),m):_===96?(u=e.enter("codeTextSequence"),a=0,g(_)):xe(_)?(e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),m):(e.enter("codeTextData"),p(_))}function p(_){return _===null||_===32||_===96||xe(_)?(e.exit("codeTextData"),m(_)):(e.consume(_),p)}function g(_){return _===96?(e.consume(_),a++,g):a===s?(e.exit("codeTextSequence"),e.exit("codeText"),t(_)):(u.type="codeTextData",p(_))}}class eE{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 a=n||0;this.setCursor(Math.trunc(t));const u=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return s&&uo(this.left,s),u.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),uo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),uo(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);uo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);uo(this.left,n.reverse())}}}function uo(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 r6(e){const t={};let n=-1,s,a,u,c,f,m,p;const g=new eE(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"&&(m=s[1]._tokenizer.events,u=0,u<m.length&&m[u][1].type==="lineEndingBlank"&&(u+=2),u<m.length&&m[u][1].type==="content"))for(;++u<m.length&&m[u][1].type!=="content";)m[u][1].type==="chunkText"&&(m[u][1]._isInFirstContentOfListItem=!0,u++);if(s[0]==="enter")s[1].contentType&&(Object.assign(t,tE(g,n)),n=t[n],p=!0);else if(s[1]._container){for(u=n,a=void 0;u--;)if(c=g.get(u),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(a&&(g.get(a)[1].type="lineEndingBlank"),c[1].type="lineEnding",a=u);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;a&&(s[1].end={...g.get(a)[1].start},f=g.slice(a,n),f.unshift(s),g.splice(a,n-a+1,f))}}return pn(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!p}function tE(e,t){const n=e.get(t)[1],s=e.get(t)[2];let a=t-1;const u=[];let c=n._tokenizer;c||(c=s.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,m=[],p={};let g,_,v=-1,b=n,w=0,C=0;const E=[C];for(;b;){for(;e.get(++a)[1]!==b;);u.push(a),b._tokenizer||(g=s.sliceStream(b),b.next||g.push(null),_&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),_=b,b=b.next}for(b=n;++v<f.length;)f[v][0]==="exit"&&f[v-1][0]==="enter"&&f[v][1].type===f[v-1][1].type&&f[v][1].start.line!==f[v][1].end.line&&(C=v+1,E.push(C),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):E.pop(),v=E.length;v--;){const D=f.slice(E[v],E[v+1]),K=u.pop();m.push([K,K+D.length-1]),e.splice(K,2,D)}for(m.reverse(),v=-1;++v<m.length;)p[w+m[v][0]]=w+m[v][1],w+=m[v][1]-m[v][0]-1;return p}const iE={resolve:rE,tokenize:sE},nE={partial:!0,tokenize:lE};function rE(e){return r6(e),e}function sE(e,t){let n;return s;function s(f){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(f)}function a(f){return f===null?u(f):xe(f)?e.check(nE,c,u)(f):(e.consume(f),a)}function u(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function c(f){return e.consume(f),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function lE(e,t,n){const s=this;return a;function a(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),$e(e,u,"linePrefix")}function u(c){if(c===null||xe(c))return n(c);const f=s.events[s.events.length-1];return!s.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):e.interrupt(s.parser.constructs.flow,n,t)(c)}}function s6(e,t,n,s,a,u,c,f,m){const p=m||Number.POSITIVE_INFINITY;let g=0;return _;function _(D){return D===60?(e.enter(s),e.enter(a),e.enter(u),e.consume(D),e.exit(u),v):D===null||D===32||D===41||Jc(D)?n(D):(e.enter(s),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),C(D))}function v(D){return D===62?(e.enter(u),e.consume(D),e.exit(u),e.exit(a),e.exit(s),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),b(D))}function b(D){return D===62?(e.exit("chunkString"),e.exit(f),v(D)):D===null||D===60||xe(D)?n(D):(e.consume(D),D===92?w:b)}function w(D){return D===60||D===62||D===92?(e.consume(D),b):b(D)}function C(D){return!g&&(D===null||D===41||st(D))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(s),t(D)):g<p&&D===40?(e.consume(D),g++,C):D===41?(e.consume(D),g--,C):D===null||D===32||D===40||Jc(D)?n(D):(e.consume(D),D===92?E:C)}function E(D){return D===40||D===41||D===92?(e.consume(D),C):C(D)}}function l6(e,t,n,s,a,u){const c=this;let f=0,m;return p;function p(b){return e.enter(s),e.enter(a),e.consume(b),e.exit(a),e.enter(u),g}function g(b){return f>999||b===null||b===91||b===93&&!m||b===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?n(b):b===93?(e.exit(u),e.enter(a),e.consume(b),e.exit(a),e.exit(s),t):xe(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),_(b))}function _(b){return b===null||b===91||b===93||xe(b)||f++>999?(e.exit("chunkString"),g(b)):(e.consume(b),m||(m=!je(b)),b===92?v:_)}function v(b){return b===91||b===92||b===93?(e.consume(b),f++,_):_(b)}}function a6(e,t,n,s,a,u){let c;return f;function f(v){return v===34||v===39||v===40?(e.enter(s),e.enter(a),e.consume(v),e.exit(a),c=v===40?41:v,m):n(v)}function m(v){return v===c?(e.enter(a),e.consume(v),e.exit(a),e.exit(s),t):(e.enter(u),p(v))}function p(v){return v===c?(e.exit(u),m(c)):v===null?n(v):xe(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),$e(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===c||v===null||xe(v)?(e.exit("chunkString"),p(v)):(e.consume(v),v===92?_:g)}function _(v){return v===c||v===92?(e.consume(v),g):g(v)}}function Eo(e,t){let n;return s;function s(a){return xe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,s):je(a)?$e(e,s,n?"linePrefix":"lineSuffix")(a):t(a)}}const aE={name:"definition",tokenize:uE},oE={partial:!0,tokenize:cE};function uE(e,t,n){const s=this;let a;return u;function u(b){return e.enter("definition"),c(b)}function c(b){return l6.call(s,e,f,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function f(b){return a=mn(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),m):n(b)}function m(b){return st(b)?Eo(e,p)(b):p(b)}function p(b){return s6(e,g,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function g(b){return e.attempt(oE,_,_)(b)}function _(b){return je(b)?$e(e,v,"whitespace")(b):v(b)}function v(b){return b===null||xe(b)?(e.exit("definition"),s.parser.defined.push(a),t(b)):n(b)}}function cE(e,t,n){return s;function s(f){return st(f)?Eo(e,a)(f):n(f)}function a(f){return a6(e,u,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function u(f){return je(f)?$e(e,c,"whitespace")(f):c(f)}function c(f){return f===null||xe(f)?t(f):n(f)}}const hE={name:"hardBreakEscape",tokenize:fE};function fE(e,t,n){return s;function s(u){return e.enter("hardBreakEscape"),e.consume(u),a}function a(u){return xe(u)?(e.exit("hardBreakEscape"),t(u)):n(u)}}const dE={name:"headingAtx",resolve:pE,tokenize:mE};function pE(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 a={type:"atxHeadingText",start:e[s][1].start,end:e[n][1].end},u={type:"chunkText",start:e[s][1].start,end:e[n][1].end,contentType:"text"};pn(e,s,n-s+1,[["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t]])}return e}function mE(e,t,n){let s=0;return a;function a(g){return e.enter("atxHeading"),u(g)}function u(g){return e.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&s++<6?(e.consume(g),c):g===null||st(g)?(e.exit("atxHeadingSequence"),f(g)):n(g)}function f(g){return g===35?(e.enter("atxHeadingSequence"),m(g)):g===null||xe(g)?(e.exit("atxHeading"),t(g)):je(g)?$e(e,f,"whitespace")(g):(e.enter("atxHeadingText"),p(g))}function m(g){return g===35?(e.consume(g),m):(e.exit("atxHeadingSequence"),f(g))}function p(g){return g===null||g===35||st(g)?(e.exit("atxHeadingText"),f(g)):(e.consume(g),p)}}const _E=["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"],K3=["pre","script","style","textarea"],gE={concrete:!0,name:"htmlFlow",resolveTo:yE,tokenize:SE},vE={partial:!0,tokenize:bE};function yE(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 SE(e,t,n){const s=this;let a,u,c,f,m;return p;function p(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),v):O===47?(e.consume(O),u=!0,C):O===63?(e.consume(O),a=3,s.interrupt?t:k):hi(O)?(e.consume(O),c=String.fromCharCode(O),E):n(O)}function v(O){return O===45?(e.consume(O),a=2,b):O===91?(e.consume(O),a=5,f=0,w):hi(O)?(e.consume(O),a=4,s.interrupt?t:k):n(O)}function b(O){return O===45?(e.consume(O),s.interrupt?t:k):n(O)}function w(O){const A="CDATA[";return O===A.charCodeAt(f++)?(e.consume(O),f===A.length?s.interrupt?t:W:w):n(O)}function C(O){return hi(O)?(e.consume(O),c=String.fromCharCode(O),E):n(O)}function E(O){if(O===null||O===47||O===62||st(O)){const A=O===47,ne=c.toLowerCase();return!A&&!u&&K3.includes(ne)?(a=1,s.interrupt?t(O):W(O)):_E.includes(c.toLowerCase())?(a=6,A?(e.consume(O),D):s.interrupt?t(O):W(O)):(a=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(O):u?K(O):V(O))}return O===45||ni(O)?(e.consume(O),c+=String.fromCharCode(O),E):n(O)}function D(O){return O===62?(e.consume(O),s.interrupt?t:W):n(O)}function K(O){return je(O)?(e.consume(O),K):N(O)}function V(O){return O===47?(e.consume(O),N):O===58||O===95||hi(O)?(e.consume(O),Z):je(O)?(e.consume(O),V):N(O)}function Z(O){return O===45||O===46||O===58||O===95||ni(O)?(e.consume(O),Z):se(O)}function se(O){return O===61?(e.consume(O),z):je(O)?(e.consume(O),se):V(O)}function z(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),m=O,T):je(O)?(e.consume(O),z):$(O)}function T(O){return O===m?(e.consume(O),m=null,ae):O===null||xe(O)?n(O):(e.consume(O),T)}function $(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||st(O)?se(O):(e.consume(O),$)}function ae(O){return O===47||O===62||je(O)?V(O):n(O)}function N(O){return O===62?(e.consume(O),J):n(O)}function J(O){return O===null||xe(O)?W(O):je(O)?(e.consume(O),J):n(O)}function W(O){return O===45&&a===2?(e.consume(O),B):O===60&&a===1?(e.consume(O),ee):O===62&&a===4?(e.consume(O),Ie):O===63&&a===3?(e.consume(O),k):O===93&&a===5?(e.consume(O),fe):xe(O)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(vE,We,G)(O)):O===null||xe(O)?(e.exit("htmlFlowData"),G(O)):(e.consume(O),W)}function G(O){return e.check(f0,Q,We)(O)}function Q(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),P}function P(O){return O===null||xe(O)?G(O):(e.enter("htmlFlowData"),W(O))}function B(O){return O===45?(e.consume(O),k):W(O)}function ee(O){return O===47?(e.consume(O),c="",U):W(O)}function U(O){if(O===62){const A=c.toLowerCase();return K3.includes(A)?(e.consume(O),Ie):W(O)}return hi(O)&&c.length<8?(e.consume(O),c+=String.fromCharCode(O),U):W(O)}function fe(O){return O===93?(e.consume(O),k):W(O)}function k(O){return O===62?(e.consume(O),Ie):O===45&&a===2?(e.consume(O),k):W(O)}function Ie(O){return O===null||xe(O)?(e.exit("htmlFlowData"),We(O)):(e.consume(O),Ie)}function We(O){return e.exit("htmlFlow"),t(O)}}function bE(e,t,n){return s;function s(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(Yo,t,n)}}const wE={name:"htmlText",tokenize:xE};function xE(e,t,n){const s=this;let a,u,c;return f;function f(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),m}function m(k){return k===33?(e.consume(k),p):k===47?(e.consume(k),se):k===63?(e.consume(k),V):hi(k)?(e.consume(k),$):n(k)}function p(k){return k===45?(e.consume(k),g):k===91?(e.consume(k),u=0,w):hi(k)?(e.consume(k),K):n(k)}function g(k){return k===45?(e.consume(k),b):n(k)}function _(k){return k===null?n(k):k===45?(e.consume(k),v):xe(k)?(c=_,ee(k)):(e.consume(k),_)}function v(k){return k===45?(e.consume(k),b):_(k)}function b(k){return k===62?B(k):k===45?v(k):_(k)}function w(k){const Ie="CDATA[";return k===Ie.charCodeAt(u++)?(e.consume(k),u===Ie.length?C:w):n(k)}function C(k){return k===null?n(k):k===93?(e.consume(k),E):xe(k)?(c=C,ee(k)):(e.consume(k),C)}function E(k){return k===93?(e.consume(k),D):C(k)}function D(k){return k===62?B(k):k===93?(e.consume(k),D):C(k)}function K(k){return k===null||k===62?B(k):xe(k)?(c=K,ee(k)):(e.consume(k),K)}function V(k){return k===null?n(k):k===63?(e.consume(k),Z):xe(k)?(c=V,ee(k)):(e.consume(k),V)}function Z(k){return k===62?B(k):V(k)}function se(k){return hi(k)?(e.consume(k),z):n(k)}function z(k){return k===45||ni(k)?(e.consume(k),z):T(k)}function T(k){return xe(k)?(c=T,ee(k)):je(k)?(e.consume(k),T):B(k)}function $(k){return k===45||ni(k)?(e.consume(k),$):k===47||k===62||st(k)?ae(k):n(k)}function ae(k){return k===47?(e.consume(k),B):k===58||k===95||hi(k)?(e.consume(k),N):xe(k)?(c=ae,ee(k)):je(k)?(e.consume(k),ae):B(k)}function N(k){return k===45||k===46||k===58||k===95||ni(k)?(e.consume(k),N):J(k)}function J(k){return k===61?(e.consume(k),W):xe(k)?(c=J,ee(k)):je(k)?(e.consume(k),J):ae(k)}function W(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),a=k,G):xe(k)?(c=W,ee(k)):je(k)?(e.consume(k),W):(e.consume(k),Q)}function G(k){return k===a?(e.consume(k),a=void 0,P):k===null?n(k):xe(k)?(c=G,ee(k)):(e.consume(k),G)}function Q(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||st(k)?ae(k):(e.consume(k),Q)}function P(k){return k===47||k===62||st(k)?ae(k):n(k)}function B(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function ee(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),U}function U(k){return je(k)?$e(e,fe,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):fe(k)}function fe(k){return e.enter("htmlTextData"),c(k)}}const Kp={name:"labelEnd",resolveAll:TE,resolveTo:ME,tokenize:DE},CE={tokenize:AE},EE={tokenize:OE},kE={tokenize:RE};function TE(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 a=s.type==="labelImage"?4:2;s.type="data",t+=a}}return e.length!==n.length&&pn(e,0,e.length,n),e}function ME(e,t){let n=e.length,s=0,a,u,c;for(;n--;){const g=e[n][1];if(a){if(g.type==="link"||g.type==="labelLink"&&g._inactive)break;e[n][0]==="enter"&&g.type==="labelLink"&&(g._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(g.type==="labelImage"||g.type==="labelLink")&&!g._balanced&&(a=n,g.type!=="labelLink")){s=2;break}}else g.type==="labelEnd"&&(u=n)}const f={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},m={type:"label",start:{...e[a][1].start},end:{...e[u][1].end}},p={type:"labelText",start:{...e[a+s+2][1].end},end:{...e[u-2][1].start}};return c=[["enter",f,t],["enter",m,t]],c=nn(c,e.slice(a+1,a+s+3)),c=nn(c,[["enter",p,t]]),c=nn(c,Th(t.parser.constructs.insideSpan.null,e.slice(a+s+4,u-3),t)),c=nn(c,[["exit",p,t],e[u-2],e[u-1],["exit",m,t]]),c=nn(c,e.slice(u+1)),c=nn(c,[["exit",f,t]]),pn(e,a,e.length,c),e}function DE(e,t,n){const s=this,a=s._labelStarts;let u,c;if(a){for(;a.length>0&&a[a.length-1]._balanced;)a.pop();u=a[a.length-1]}return f;function f(v){return u?u._inactive?_(v):(c=s.parser.defined.includes(mn(s.sliceSerialize({start:u.end,end:s.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),m):n(v)}function m(v){return v===40?e.attempt(CE,g,c?g:_)(v):v===91?e.attempt(EE,g,c?p:_)(v):c?g(v):_(v)}function p(v){return e.attempt(kE,g,_)(v)}function g(v){return a.pop(),t(v)}function _(v){return u._balanced=!0,n(v)}}function AE(e,t,n){return s;function s(_){return e.enter("resource"),e.enter("resourceMarker"),e.consume(_),e.exit("resourceMarker"),a}function a(_){return st(_)?Eo(e,u)(_):u(_)}function u(_){return _===41?g(_):s6(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(_)}function c(_){return st(_)?Eo(e,m)(_):g(_)}function f(_){return n(_)}function m(_){return _===34||_===39||_===40?a6(e,p,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(_):g(_)}function p(_){return st(_)?Eo(e,g)(_):g(_)}function g(_){return _===41?(e.enter("resourceMarker"),e.consume(_),e.exit("resourceMarker"),e.exit("resource"),t):n(_)}}function OE(e,t,n){const s=this;return a;function a(f){return l6.call(s,e,u,c,"reference","referenceMarker","referenceString")(f)}function u(f){return s.parser.defined.includes(mn(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)))?t(f):n(f)}function c(f){return n(f)}}function RE(e,t,n){return s;function s(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),a}function a(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),t):n(u)}}const LE={name:"labelStartImage",resolveAll:Kp.resolveAll,tokenize:zE};function zE(e,t,n){const s=this;let a;return u;function u(m){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(m),e.exit("labelImageMarker"),c}function c(m){return m===91?(e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),a=e.exit("labelImage"),f):n(m)}function f(m){return m===94&&"_hiddenFootnoteSupport"in s.parser.constructs?n(m):(s._labelStarts=s._labelStarts||[],s._labelStarts.push(a),t(m))}}const NE={name:"labelStartLink",resolveAll:Kp.resolveAll,tokenize:BE};function BE(e,t,n){const s=this;let a;return u;function u(f){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),a=e.exit("labelLink"),c}function c(f){return f===94&&"_hiddenFootnoteSupport"in s.parser.constructs?n(f):(s._labelStarts=s._labelStarts||[],s._labelStarts.push(a),t(f))}}const T1={name:"lineEnding",tokenize:jE};function jE(e,t){return n;function n(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),$e(e,t,"linePrefix")}}const Pc={name:"thematicBreak",tokenize:HE};function HE(e,t,n){let s=0,a;return u;function u(p){return e.enter("thematicBreak"),c(p)}function c(p){return a=p,f(p)}function f(p){return p===a?(e.enter("thematicBreakSequence"),m(p)):s>=3&&(p===null||xe(p))?(e.exit("thematicBreak"),t(p)):n(p)}function m(p){return p===a?(e.consume(p),s++,m):(e.exit("thematicBreakSequence"),je(p)?$e(e,f,"whitespace")(p):f(p))}}const xi={continuation:{tokenize:UE},exit:qE,name:"list",tokenize:FE},IE={partial:!0,tokenize:YE},PE={partial:!0,tokenize:VE};function FE(e,t,n){const s=this,a=s.events[s.events.length-1];let u=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,c=0;return f;function f(b){const w=s.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!s.containerState.marker||b===s.containerState.marker:c0(b)){if(s.containerState.type||(s.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(Pc,n,p)(b):p(b);if(!s.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),m(b)}return n(b)}function m(b){return c0(b)&&++c<10?(e.consume(b),m):(!s.interrupt||c<2)&&(s.containerState.marker?b===s.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),p(b)):n(b)}function p(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),s.containerState.marker=s.containerState.marker||b,e.check(Yo,s.interrupt?n:g,e.attempt(IE,v,_))}function g(b){return s.containerState.initialBlankLine=!0,u++,v(b)}function _(b){return je(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),v):n(b)}function v(b){return s.containerState.size=u+s.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function UE(e,t,n){const s=this;return s.containerState._closeFlow=void 0,e.check(Yo,a,u);function a(f){return s.containerState.furtherBlankLines=s.containerState.furtherBlankLines||s.containerState.initialBlankLine,$e(e,t,"listItemIndent",s.containerState.size+1)(f)}function u(f){return s.containerState.furtherBlankLines||!je(f)?(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,c(f)):(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,e.attempt(PE,t,c)(f))}function c(f){return s.containerState._closeFlow=!0,s.interrupt=void 0,$e(e,e.attempt(xi,t,n),"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function VE(e,t,n){const s=this;return $e(e,a,"listItemIndent",s.containerState.size+1);function a(u){const c=s.events[s.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===s.containerState.size?t(u):n(u)}}function qE(e){e.exit(this.containerState.type)}function YE(e,t,n){const s=this;return $e(e,a,"listItemPrefixWhitespace",s.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(u){const c=s.events[s.events.length-1];return!je(u)&&c&&c[1].type==="listItemPrefixWhitespace"?t(u):n(u)}}const W3={name:"setextUnderline",resolveTo:$E,tokenize:KE};function $E(e,t){const n=new eh;let s=e.length,a,u,c;for(;s--;)if(e[s][0]==="enter"){if(e[s][1].type==="content"){a=s;break}e[s][1].type==="paragraph"&&(u=s)}else e[s][1].type==="content"&&n.add(s,1,[]),!c&&e[s][1].type==="definition"&&(c=s);const f={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[u][1].type="setextHeadingText",c?(n.add(u,0,[["enter",f,t]]),n.add(c+1,0,[["exit",e[a][1],t]]),e[a][1].end={...e[c][1].end}):e[a][1]=f,n.add(e.length,0,[["exit",f,t]]),n.consume(e),e}function KE(e,t,n){const s=this;let a;return u;function u(p){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"),a=p,c(p)):n(p)}function c(p){return e.enter("setextHeadingLineSequence"),f(p)}function f(p){return p===a?(e.consume(p),f):(e.exit("setextHeadingLineSequence"),je(p)?$e(e,m,"lineSuffix")(p):m(p))}function m(p){return p===null||xe(p)?(e.exit("setextHeadingLine"),t(p)):n(p)}}const WE={tokenize:GE};function GE(e){const t=this,n=e.attempt(Yo,s,e.attempt(this.parser.constructs.flowInitial,a,$e(e,e.attempt(this.parser.constructs.flow,a,e.attempt(iE,a)),"linePrefix")));return n;function s(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const XE={resolveAll:u6()},ZE=o6("string"),QE=o6("text");function o6(e){return{resolveAll:u6(e==="text"?JE:void 0),tokenize:t};function t(n){const s=this,a=this.parser.constructs[e],u=n.attempt(a,c,f);return c;function c(g){return p(g)?u(g):f(g)}function f(g){if(g===null){n.consume(g);return}return n.enter("data"),n.consume(g),m}function m(g){return p(g)?(n.exit("data"),u(g)):(n.consume(g),m)}function p(g){if(g===null)return!0;const _=a[g];let v=-1;if(_)for(;++v<_.length;){const b=_[v];if(!b.previous||b.previous.call(s,s.previous))return!0}return!1}}}function u6(e){return t;function t(n,s){let a=-1,u;for(;++a<=n.length;)u===void 0?n[a]&&n[a][1].type==="data"&&(u=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==u+2&&(n[u][1].end=n[a-1][1].end,n.splice(u+2,a-u-2),a=u+2),u=void 0);return e?e(n,s):n}}function JE(e,t){const n=new eh;let s=0;for(;++s<=e.length;)if((s===e.length||e[s][1].type==="lineEnding")&&e[s-1][1].type==="data"){const a=e[s-1][1],u=t.sliceStream(a);let c=u.length,f=-1,m=0,p;for(;c--;){const g=u[c];if(typeof g=="string"){for(f=g.length;g.charCodeAt(f-1)===32;)m++,f--;if(f)break;f=-1}else if(g===-2)p=!0,m++;else if(g!==-1){c++;break}}if(t._contentTypeTextTrailing&&s===e.length&&(m=0),m){const g={type:s===e.length||p||m<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:c?f:a.start._bufferIndex+f,_index:a.start._index+c,line:a.end.line,column:a.end.column-m,offset:a.end.offset-m},end:{...a.end}};a.end={...g.start},a.start.offset===a.end.offset?Object.assign(a,g):n.add(s,0,[["enter",g,t],["exit",g,t]])}s++}return n.consume(e),e}const ek={42:xi,43:xi,45:xi,48:xi,49:xi,50:xi,51:xi,52:xi,53:xi,54:xi,55:xi,56:xi,57:xi,62:t6},tk={91:aE},ik={[-2]:k1,[-1]:k1,32:k1},nk={35:dE,42:Pc,45:[W3,Pc],60:gE,61:W3,95:Pc,96:$3,126:$3},rk={38:n6,92:i6},sk={[-5]:T1,[-4]:T1,[-3]:T1,33:LE,38:n6,42:h0,60:[jC,wE],91:NE,92:[hE,i6],93:Kp,95:h0,96:XC},lk={null:[h0,XE]},ak={null:[42,95]},ok={null:[]},uk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ak,contentInitial:tk,disable:ok,document:ek,flow:nk,flowInitial:ik,insideSpan:lk,string:rk,text:sk},Symbol.toStringTag,{value:"Module"}));function ck(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 a={},u=[];let c=[],f=[];const m={attempt:T(se),check:T(z),consume:K,enter:V,exit:Z,interrupt:T(z,{interrupt:!0})},p={code:null,containerState:{},defineSkip:C,events:[],now:w,parser:e,previous:null,sliceSerialize:v,sliceStream:b,write:_};let g=t.tokenize.call(p,m);return t.resolveAll&&u.push(t),p;function _(J){return c=nn(c,J),E(),c[c.length-1]!==null?[]:($(t,0),p.events=Th(u,p.events,p),p.events)}function v(J,W){return fk(b(J),W)}function b(J){return hk(c,J)}function w(){const{_bufferIndex:J,_index:W,line:G,column:Q,offset:P}=s;return{_bufferIndex:J,_index:W,line:G,column:Q,offset:P}}function C(J){a[J.line]=J.column,N()}function E(){for(;s._index<c.length;){const J=c[s._index];if(typeof J=="string"){const W=s._index;for(s._bufferIndex<0&&(s._bufferIndex=0);s._index===W&&s._bufferIndex<J.length;)D(J.charCodeAt(s._bufferIndex))}else D(J)}}function D(J){g=g(J)}function K(J){xe(J)?(s.line++,s.column=1,s.offset+=J===-3?2:1,N()):J!==-1&&(s.column++,s.offset++),s._bufferIndex<0?s._index++:(s._bufferIndex++,s._bufferIndex===c[s._index].length&&(s._bufferIndex=-1,s._index++)),p.previous=J}function V(J,W){const G=W||{};return G.type=J,G.start=w(),p.events.push(["enter",G,p]),f.push(G),G}function Z(J){const W=f.pop();return W.end=w(),p.events.push(["exit",W,p]),W}function se(J,W){$(J,W.from)}function z(J,W){W.restore()}function T(J,W){return G;function G(Q,P,B){let ee,U,fe,k;return Array.isArray(Q)?We(Q):"tokenize"in Q?We([Q]):Ie(Q);function Ie(oe){return pe;function pe(Te){const Ee=Te!==null&&oe[Te],Oe=Te!==null&&oe.null,me=[...Array.isArray(Ee)?Ee:Ee?[Ee]:[],...Array.isArray(Oe)?Oe:Oe?[Oe]:[]];return We(me)(Te)}}function We(oe){return ee=oe,U=0,oe.length===0?B:O(oe[U])}function O(oe){return pe;function pe(Te){return k=ae(),fe=oe,oe.partial||(p.currentConstruct=oe),oe.name&&p.parser.constructs.disable.null.includes(oe.name)?ne():oe.tokenize.call(W?Object.assign(Object.create(p),W):p,m,A,ne)(Te)}}function A(oe){return J(fe,k),P}function ne(oe){return k.restore(),++U<ee.length?O(ee[U]):B}}}function $(J,W){J.resolveAll&&!u.includes(J)&&u.push(J),J.resolve&&pn(p.events,W,p.events.length-W,J.resolve(p.events.slice(W),p)),J.resolveTo&&(p.events=J.resolveTo(p.events,p))}function ae(){const J=w(),W=p.previous,G=p.currentConstruct,Q=p.events.length,P=Array.from(f);return{from:Q,restore:B};function B(){s=J,p.previous=W,p.currentConstruct=G,p.events.length=Q,f=P,N()}}function N(){s.line in a&&s.column<2&&(s.column=a[s.line],s.offset+=a[s.line]-1)}}function hk(e,t){const n=t.start._index,s=t.start._bufferIndex,a=t.end._index,u=t.end._bufferIndex;let c;if(n===a)c=[e[n].slice(s,u)];else{if(c=e.slice(n,a),s>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(s):c.shift()}u>0&&c.push(e[a].slice(0,u))}return c}function fk(e,t){let n=-1;const s=[];let a;for(;++n<e.length;){const u=e[n];let c;if(typeof u=="string")c=u;else switch(u){case-5:{c="\r";break}case-4:{c=`
27
- `;break}case-3:{c=`\r
28
- `;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&a)continue;c=" ";break}default:c=String.fromCharCode(u)}a=u===-2,s.push(c)}return s.join("")}function dk(e){const s={constructs:Qy([uk,...(e||{}).extensions||[]]),content:a(AC),defined:[],document:a(RC),flow:a(WE),lazy:{},string:a(ZE),text:a(QE)};return s;function a(u){return c;function c(f){return ck(s,u,f)}}}function pk(e){for(;!r6(e););return e}const G3=/[\0\t\n\r]/g;function mk(){let e=1,t="",n=!0,s;return a;function a(u,c,f){u=t+(typeof u=="string"?u.toString():new TextDecoder(c||void 0).decode(u));const m=[];let p=0;for(t="",n&&(u.charCodeAt(0)===65279&&p++,n=void 0);p<u.length;){G3.lastIndex=p;const g=G3.exec(u),_=g&&g.index!==void 0?g.index:u.length,v=u.charCodeAt(_);if(!g){t=u.slice(p);break}if(v===10&&p===_&&s)m.push(-3),s=void 0;else switch(s&&(m.push(-5),s=void 0),p<_&&(m.push(u.slice(p,_)),e+=_-p),v){case 0:{m.push(65533),e++;break}case 9:{const b=Math.ceil(e/4)*4;for(m.push(-2);e++<b;)m.push(-1);break}case 10:{m.push(-4),e=1;break}default:s=!0,e=1}p=_+1}return f&&(s&&m.push(-5),t&&m.push(t),m.push(null)),m}}const _k=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function gk(e){return e.replace(_k,vk)}function vk(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),u=a===120||a===88;return Jy(n.slice(u?2:1),u?16:10)}return $p(n)||e}const c6={}.hasOwnProperty;function yk(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Sk(n)(pk(dk(n).document().write(mk()(e,t,!0))))}function Sk(e){const t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:c(fr),autolinkProtocol:N,autolinkEmail:N,atxHeading:c(ki),blockQuote:c(me),characterEscape:N,characterReference:N,codeFenced:c(ye),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:c(ye,f),codeText:c(ze,f),codeTextData:N,data:N,codeFlowValue:N,definition:c(Hn),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:c(hr),hardBreakEscape:c(St),hardBreakTrailing:c(St),htmlFlow:c(Xe,f),htmlFlowData:N,htmlText:c(Xe,f),htmlTextData:N,image:c(Fi),label:f,link:c(fr),listItem:c($s),listItemValue:b,listOrdered:c(ln,v),listUnordered:c(ln),paragraph:c(Ks),reference:A,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:c(ki),strong:c(dr),thematicBreak:c(Ws)},exit:{atxHeading:p(),atxHeadingSequence:z,autolink:p(),autolinkEmail:Oe,autolinkProtocol:Ee,blockQuote:p(),characterEscapeValue:J,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:pe,characterReference:Te,codeFenced:p(D),codeFencedFence:E,codeFencedFenceInfo:w,codeFencedFenceMeta:C,codeFlowValue:J,codeIndented:p(K),codeText:p(B),codeTextData:J,data:J,definition:p(),definitionDestinationString:se,definitionLabelString:V,definitionTitleString:Z,emphasis:p(),hardBreakEscape:p(G),hardBreakTrailing:p(G),htmlFlow:p(Q),htmlFlowData:J,htmlText:p(P),htmlTextData:J,image:p(U),label:k,labelText:fe,lineEnding:W,link:p(ee),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:ne,resourceDestinationString:Ie,resourceTitleString:We,resource:O,setextHeading:p(ae),setextHeadingLineSequence:$,setextHeadingText:T,strong:p(),thematicBreak:p()}};h6(t,(e||{}).mdastExtensions||[]);const n={};return s;function s(X){let ue={type:"root",children:[],position:void 0};const we={stack:[ue],tokenStack:[],config:t,enter:m,exit:g,buffer:f,resume:_,data:n},Ae=[],Lt=[];let it=-1;for(;++it<X.length;)if(Lt.push(X[it]),X[it][1].type==="listOrdered"||X[it][1].type==="listUnordered")if(X[it][0]==="enter")Ae.push(Lt.length-1);else{const qt=Ae.pop();u(Lt,qt)}for(X=Lt,it=-1;++it<X.length;){const qt=t[X[it][0]];X[it][0]==="enter"&&t.beforeEnter.length>0&&a(t.beforeEnter,{...we,sliceSerialize:X[it][2].sliceSerialize},X[it][1]),c6.call(qt,X[it][1].type)&&qt[X[it][1].type].call({...we,sliceSerialize:X[it][2].sliceSerialize},X[it][1]),X[it][0]==="exit"&&t.afterExit.length>0&&a(t.afterExit,{...we,sliceSerialize:X[it][2].sliceSerialize},X[it][1])}if(we.tokenStack.length>0){const qt=we.tokenStack[we.tokenStack.length-1];(qt[1]||X3).call(we,void 0,qt[0])}for(ue.position={start:Ur(X.length>0?X[0][1].start:{line:1,column:1,offset:0}),end:Ur(X.length>0?X[X.length-2][1].end:{line:1,column:1,offset:0})},it=-1;++it<t.transforms.length;)ue=t.transforms[it](ue)||ue;return ue}function a(X,ue,we){let Ae=-1;for(;++Ae<X.length;)X[Ae].call(ue,we)}function u(X,ue){const we=X.length-1;let Ae=ue-1,Lt=-1,it=!1,qt,mi,In,Pn;const is=[];for(;++Ae<=we;){const si=X[Ae];switch(si[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{si[0]==="enter"?Lt++:Lt--,Pn=void 0;break}case"lineEndingBlank":{si[0]==="enter"&&(qt&&!Pn&&!Lt&&!In&&(In=Ae),Pn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Pn=void 0}if(!Lt&&si[0]==="enter"&&si[1].type==="listItemPrefix"||Lt===-1&&si[0]==="exit"&&(si[1].type==="listUnordered"||si[1].type==="listOrdered")){if(qt){let Fn=Ae;for(mi=void 0;Fn--;){const Ui=X[Fn];if(Ui[1].type==="lineEnding"||Ui[1].type==="lineEndingBlank"){if(Ui[0]==="exit")continue;mi&&(X[mi][1].type="lineEndingBlank",it=!0),Ui[1].type="lineEnding",mi=Fn}else if(!(Ui[1].type==="linePrefix"||Ui[1].type==="blockQuotePrefix"||Ui[1].type==="blockQuotePrefixWhitespace"||Ui[1].type==="blockQuoteMarker"||Ui[1].type==="listItemIndent"))break}In&&(!mi||In<mi)&&(qt._spread=!0),qt.end=Object.assign({},mi?X[mi][1].start:si[1].end),is.push({at:mi||Ae,event:["exit",qt,si[2]]})}if(si[1].type==="listItemPrefix"){const Fn={type:"listItem",_spread:!1,start:Object.assign({},si[1].start),end:void 0};qt=Fn,is.push({at:Ae,event:["enter",Fn,si[2]]}),In=void 0,Pn=!0}}}const Qo=X.splice(ue);let Yt=0;for(Ae=-1;++Ae<Qo.length;){for(;Yt<is.length&&is[Yt].at===ue+Ae;)X.push(is[Yt++].event);X.push(Qo[Ae])}X[ue][1]._spread=it}function c(X,ue){return we;function we(Ae){m.call(this,X(Ae),Ae),ue&&ue.call(this,Ae)}}function f(){this.stack.push({type:"fragment",children:[]})}function m(X,ue,we){this.stack[this.stack.length-1].children.push(X),this.stack.push(X),this.tokenStack.push([ue,we||void 0]),X.position={start:Ur(ue.start),end:void 0}}function p(X){return ue;function ue(we){X&&X.call(this,we),g.call(this,we)}}function g(X,ue){const we=this.stack.pop(),Ae=this.tokenStack.pop();if(!Ae)throw new Error("Cannot close `"+X.type+"` ("+Co({start:X.start,end:X.end})+"): it’s not open");Ae[0].type!==X.type&&(ue?ue.call(this,X,Ae[0]):(Ae[1]||X3).call(this,X,Ae[0])),we.position.end=Ur(X.end)}function _(){return Yp(this.stack.pop())}function v(){this.data.expectingFirstListItemValue=!0}function b(X){if(this.data.expectingFirstListItemValue){const ue=this.stack[this.stack.length-2];ue.start=Number.parseInt(this.sliceSerialize(X),10),this.data.expectingFirstListItemValue=void 0}}function w(){const X=this.resume(),ue=this.stack[this.stack.length-1];ue.lang=X}function C(){const X=this.resume(),ue=this.stack[this.stack.length-1];ue.meta=X}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function D(){const X=this.resume(),ue=this.stack[this.stack.length-1];ue.value=X.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function K(){const X=this.resume(),ue=this.stack[this.stack.length-1];ue.value=X.replace(/(\r?\n|\r)$/g,"")}function V(X){const ue=this.resume(),we=this.stack[this.stack.length-1];we.label=ue,we.identifier=mn(this.sliceSerialize(X)).toLowerCase()}function Z(){const X=this.resume(),ue=this.stack[this.stack.length-1];ue.title=X}function se(){const X=this.resume(),ue=this.stack[this.stack.length-1];ue.url=X}function z(X){const ue=this.stack[this.stack.length-1];if(!ue.depth){const we=this.sliceSerialize(X).length;ue.depth=we}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function $(X){const ue=this.stack[this.stack.length-1];ue.depth=this.sliceSerialize(X).codePointAt(0)===61?1:2}function ae(){this.data.setextHeadingSlurpLineEnding=void 0}function N(X){const we=this.stack[this.stack.length-1].children;let Ae=we[we.length-1];(!Ae||Ae.type!=="text")&&(Ae=la(),Ae.position={start:Ur(X.start),end:void 0},we.push(Ae)),this.stack.push(Ae)}function J(X){const ue=this.stack.pop();ue.value+=this.sliceSerialize(X),ue.position.end=Ur(X.end)}function W(X){const ue=this.stack[this.stack.length-1];if(this.data.atHardBreak){const we=ue.children[ue.children.length-1];we.position.end=Ur(X.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ue.type)&&(N.call(this,X),J.call(this,X))}function G(){this.data.atHardBreak=!0}function Q(){const X=this.resume(),ue=this.stack[this.stack.length-1];ue.value=X}function P(){const X=this.resume(),ue=this.stack[this.stack.length-1];ue.value=X}function B(){const X=this.resume(),ue=this.stack[this.stack.length-1];ue.value=X}function ee(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=ue,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function U(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=ue,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function fe(X){const ue=this.sliceSerialize(X),we=this.stack[this.stack.length-2];we.label=gk(ue),we.identifier=mn(ue).toLowerCase()}function k(){const X=this.stack[this.stack.length-1],ue=this.resume(),we=this.stack[this.stack.length-1];if(this.data.inReference=!0,we.type==="link"){const Ae=X.children;we.children=Ae}else we.alt=ue}function Ie(){const X=this.resume(),ue=this.stack[this.stack.length-1];ue.url=X}function We(){const X=this.resume(),ue=this.stack[this.stack.length-1];ue.title=X}function O(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function ne(X){const ue=this.resume(),we=this.stack[this.stack.length-1];we.label=ue,we.identifier=mn(this.sliceSerialize(X)).toLowerCase(),this.data.referenceType="full"}function oe(X){this.data.characterReferenceType=X.type}function pe(X){const ue=this.sliceSerialize(X),we=this.data.characterReferenceType;let Ae;we?(Ae=Jy(ue,we==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ae=$p(ue);const Lt=this.stack[this.stack.length-1];Lt.value+=Ae}function Te(X){const ue=this.stack.pop();ue.position.end=Ur(X.end)}function Ee(X){J.call(this,X);const ue=this.stack[this.stack.length-1];ue.url=this.sliceSerialize(X)}function Oe(X){J.call(this,X);const ue=this.stack[this.stack.length-1];ue.url="mailto:"+this.sliceSerialize(X)}function me(){return{type:"blockquote",children:[],position:void 0}}function ye(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function ze(){return{type:"inlineCode",value:"",position:void 0}}function Hn(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function hr(){return{type:"emphasis",children:[],position:void 0}}function ki(){return{type:"heading",depth:0,children:[],position:void 0}}function St(){return{type:"break",position:void 0}}function Xe(){return{type:"html",value:"",position:void 0}}function Fi(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function fr(){return{type:"link",title:null,url:"",children:[],position:void 0}}function ln(X){return{type:"list",ordered:X.type==="listOrdered",start:null,spread:X._spread,children:[],position:void 0}}function $s(X){return{type:"listItem",spread:X._spread,checked:null,children:[],position:void 0}}function Ks(){return{type:"paragraph",children:[],position:void 0}}function dr(){return{type:"strong",children:[],position:void 0}}function la(){return{type:"text",value:"",position:void 0}}function Ws(){return{type:"thematicBreak",position:void 0}}}function Ur(e){return{line:e.line,column:e.column,offset:e.offset}}function h6(e,t){let n=-1;for(;++n<t.length;){const s=t[n];Array.isArray(s)?h6(e,s):bk(e,s)}}function bk(e,t){let n;for(n in t)if(c6.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 X3(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Co({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Co({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Co({start:t.start,end:t.end})+") is still open")}function wk(e){const t=this;t.parser=n;function n(s){return yk(s,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function xk(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 Ck(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
29
- `}]}function Ek(e,t){const n=t.value?t.value+`
30
- `:"",s={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(s.className=["language-"+a[0]]);let u={type:"element",tagName:"code",properties:s,children:[{type:"text",value:n}]};return t.meta&&(u.data={meta:t.meta}),e.patch(t,u),u=e.applyData(t,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(t,u),u}function kk(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Tk(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Mk(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",s=String(t.identifier).toUpperCase(),a=ta(s.toLowerCase()),u=e.footnoteOrder.indexOf(s);let c,f=e.footnoteCounts.get(s);f===void 0?(f=0,e.footnoteOrder.push(s),c=e.footnoteOrder.length):c=u+1,f+=1,e.footnoteCounts.set(s,f);const m={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,m);const p={type:"element",tagName:"sup",properties:{},children:[m]};return e.patch(t,p),e.applyData(t,p)}function Dk(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 Ak(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function f6(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 a=e.all(t),u=a[0];u&&u.type==="text"?u.value="["+u.value:a.unshift({type:"text",value:"["});const c=a[a.length-1];return c&&c.type==="text"?c.value+=s:a.push({type:"text",value:s}),a}function Ok(e,t){const n=String(t.identifier).toUpperCase(),s=e.definitionById.get(n);if(!s)return f6(e,t);const a={src:ta(s.url||""),alt:t.alt};s.title!==null&&s.title!==void 0&&(a.title=s.title);const u={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,u),e.applyData(t,u)}function Rk(e,t){const n={src:ta(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 Lk(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 zk(e,t){const n=String(t.identifier).toUpperCase(),s=e.definitionById.get(n);if(!s)return f6(e,t);const a={href:ta(s.url||"")};s.title!==null&&s.title!==void 0&&(a.title=s.title);const u={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,u),e.applyData(t,u)}function Nk(e,t){const n={href:ta(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 Bk(e,t,n){const s=e.all(t),a=n?jk(n):d6(t),u={},c=[];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:[]}),u.className=["task-list-item"]}let f=-1;for(;++f<s.length;){const g=s[f];(a||f!==0||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
31
- `}),g.type==="element"&&g.tagName==="p"&&!a?c.push(...g.children):c.push(g)}const m=s[s.length-1];m&&(a||m.type!=="element"||m.tagName!=="p")&&c.push({type:"text",value:`
32
- `});const p={type:"element",tagName:"li",properties:u,children:c};return e.patch(t,p),e.applyData(t,p)}function jk(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=d6(n[s])}return t}function d6(e){const t=e.spread;return t??e.children.length>1}function Hk(e,t){const n={},s=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<s.length;){const c=s[a];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const u={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(s,!0)};return e.patch(t,u),e.applyData(t,u)}function Ik(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Pk(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Fk(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Uk(e,t){const n=e.all(t),s=n.shift(),a=[];if(s){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([s],!0)};e.patch(t.children[0],c),a.push(c)}if(n.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},f=Fp(t.children[1]),m=Yy(t.children[t.children.length-1]);f&&m&&(c.position={start:f,end:m}),a.push(c)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,u),e.applyData(t,u)}function Vk(e,t,n){const s=n?n.children:void 0,u=(s?s.indexOf(t):1)===0?"th":"td",c=n&&n.type==="table"?n.align:void 0,f=c?c.length:t.children.length;let m=-1;const p=[];for(;++m<f;){const _=t.children[m],v={},b=c?c[m]:void 0;b&&(v.align=b);let w={type:"element",tagName:u,properties:v,children:[]};_&&(w.children=e.all(_),e.patch(_,w),w=e.applyData(_,w)),p.push(w)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(t,g),e.applyData(t,g)}function qk(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Z3=9,Q3=32;function Yk(e){const t=String(e),n=/\r?\n|\r/g;let s=n.exec(t),a=0;const u=[];for(;s;)u.push(J3(t.slice(a,s.index),a>0,!0),s[0]),a=s.index+s[0].length,s=n.exec(t);return u.push(J3(t.slice(a),a>0,!1)),u.join("")}function J3(e,t,n){let s=0,a=e.length;if(t){let u=e.codePointAt(s);for(;u===Z3||u===Q3;)s++,u=e.codePointAt(s)}if(n){let u=e.codePointAt(a-1);for(;u===Z3||u===Q3;)a--,u=e.codePointAt(a-1)}return a>s?e.slice(s,a):""}function $k(e,t){const n={type:"text",value:Yk(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Kk(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Wk={blockquote:xk,break:Ck,code:Ek,delete:kk,emphasis:Tk,footnoteReference:Mk,heading:Dk,html:Ak,imageReference:Ok,image:Rk,inlineCode:Lk,linkReference:zk,link:Nk,listItem:Bk,list:Hk,paragraph:Ik,root:Pk,strong:Fk,table:Uk,tableCell:qk,tableRow:Vk,text:$k,thematicBreak:Kk,toml:Mc,yaml:Mc,definition:Mc,footnoteDefinition:Mc};function Mc(){}const p6=-1,Mh=0,ko=1,ih=2,Wp=3,Gp=4,Xp=5,Zp=6,m6=7,_6=8,{defineProperty:Gk}=Object,g6=typeof self=="object"?self:globalThis,e5=(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 g6[e](t)},Xk=(e,t)=>{const n=(a,u)=>(e.set(u,a),a),s=a=>{if(e.has(a))return e.get(a);const[u,c]=t[a];switch(u){case Mh:case p6:return n(c,a);case ko:{const f=n([],a);for(const m of c)f.push(s(m));return f}case ih:{const f=n({},a);for(const[m,p]of c){const g=s(m),_=s(p);g==="__proto__"?Gk(f,g,{value:_,configurable:!0,enumerable:!0,writable:!0}):f[g]=_}return f}case Wp:return n(new Date(c),a);case Gp:{const{source:f,flags:m}=c;return n(new RegExp(f,m),a)}case Xp:{const f=n(new Map,a);for(const[m,p]of c)f.set(s(m),s(p));return f}case Zp:{const f=n(new Set,a);for(const m of c)f.add(s(m));return f}case m6:{const{name:f,message:m}=c;return n(typeof g6[f]=="function"?e5(f,m):new Error(m),a)}case _6:return n(BigInt(c),a);case"BigInt":return n(Object(BigInt(c)),a);case"ArrayBuffer":return n(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return n(new DataView(f),c)}case"-0":return-0}return n(e5(u,c),a)};return s},t5=e=>Xk(new Map,e)(0),Ms="",{toString:Zk}={},{keys:Qk,is:Jk}=Object,co=e=>{const t=typeof e;if(t!=="object"||!e)return[Mh,t];const n=Zk.call(e).slice(8,-1);switch(n){case"Array":return[ko,Ms];case"Object":return[ih,Ms];case"Date":return[Wp,Ms];case"RegExp":return[Gp,Ms];case"Map":return[Xp,Ms];case"Set":return[Zp,Ms];case"DataView":return[ko,n]}return n.includes("Array")?[ko,n]:e instanceof Error?[m6,e.name||"Error"]:[ih,n]},Dc=([e,t])=>e===Mh&&(t==="function"||t==="symbol"),eT=(e,t,n,s)=>{const a=(c,f)=>{const m=s.push(c)-1;return n.set(f,m),m},u=c=>{if(n.has(c))return n.get(c);let[f,m]=co(c);switch(f){case Mh:{let g=c;switch(m){case"bigint":f=_6,g=c.toString();break;case"number":if(!c&&Jk(c,-0))return s.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+m);g=null;break;case"undefined":return a([p6],c)}return a([f,g],c)}case ko:{if(m){let v=c;return m==="DataView"?v=new Uint8Array(c.buffer):m==="ArrayBuffer"&&(v=new Uint8Array(c)),a([m,[...v]],c)}const g=[],_=a([f,g],c);for(const v of c)g.push(u(v));return _}case ih:{if(m)switch(m){case"BigInt":return a([m,c.toString()],c);case"Boolean":case"Number":case"String":return a([m,c.valueOf()],c)}if(t&&"toJSON"in c)return u(c.toJSON());const g=[],_=a([f,g],c);for(const v of Qk(c))(e||!Dc(co(c[v])))&&g.push([u(v),u(c[v])]);return _}case Wp:return a([f,isNaN(c.getTime())?Ms:c.toISOString()],c);case Gp:{const{source:g,flags:_}=c;return a([f,{source:g,flags:_}],c)}case Xp:{const g=[],_=a([f,g],c);for(const[v,b]of c)(e||!(Dc(co(v))||Dc(co(b))))&&g.push([u(v),u(b)]);return _}case Zp:{const g=[],_=a([f,g],c);for(const v of c)(e||!Dc(co(v)))&&g.push(u(v));return _}}const{message:p}=c;return a([f,{name:m,message:p}],c)};return u},i5=(e,{json:t,lossy:n}={})=>{const s=[];return eT(!(t||n),!!t,new Map,s)(e),s},nh=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?t5(i5(e,t)):structuredClone(e):(e,t)=>t5(i5(e,t));function tT(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 iT(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function nT(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||tT,s=e.options.footnoteBackLabel||iT,a=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let m=-1;for(;++m<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[m]);if(!p)continue;const g=e.all(p),_=String(p.identifier).toUpperCase(),v=ta(_.toLowerCase());let b=0;const w=[],C=e.footnoteCounts.get(_);for(;C!==void 0&&++b<=C;){w.length>0&&w.push({type:"text",value:" "});let K=typeof n=="string"?n:n(m,b);typeof K=="string"&&(K={type:"text",value:K}),w.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof s=="string"?s:s(m,b),className:["data-footnote-backref"]},children:Array.isArray(K)?K:[K]})}const E=g[g.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const K=E.children[E.children.length-1];K&&K.type==="text"?K.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...w)}else g.push(...w);const D={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(g,!0)};e.patch(p,D),f.push(D)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...nh(c),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
33
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
34
- `}]}}const Dh=(function(e){if(e==null)return aT;if(typeof e=="function")return Ah(e);if(typeof e=="object")return Array.isArray(e)?rT(e):sT(e);if(typeof e=="string")return lT(e);throw new Error("Expected function, string, or object as test")});function rT(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Dh(e[n]);return Ah(s);function s(...a){let u=-1;for(;++u<t.length;)if(t[u].apply(this,a))return!0;return!1}}function sT(e){const t=e;return Ah(n);function n(s){const a=s;let u;for(u in e)if(a[u]!==t[u])return!1;return!0}}function lT(e){return Ah(t);function t(n){return n&&n.type===e}}function Ah(e){return t;function t(n,s,a){return!!(oT(n)&&e.call(this,n,typeof s=="number"?s:void 0,a||void 0))}}function aT(){return!0}function oT(e){return e!==null&&typeof e=="object"&&"type"in e}const v6=[],uT=!0,d0=!1,cT="skip";function y6(e,t,n,s){let a;typeof t=="function"&&typeof n!="function"?(s=n,n=t):a=t;const u=Dh(a),c=s?-1:1;f(e,void 0,[])();function f(m,p,g){const _=m&&typeof m=="object"?m:{};if(typeof _.type=="string"){const b=typeof _.tagName=="string"?_.tagName:typeof _.name=="string"?_.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(m.type+(b?"<"+b+">":""))+")"})}return v;function v(){let b=v6,w,C,E;if((!t||u(m,p,g[g.length-1]||void 0))&&(b=hT(n(m,g)),b[0]===d0))return b;if("children"in m&&m.children){const D=m;if(D.children&&b[0]!==cT)for(C=(s?D.children.length:-1)+c,E=g.concat(D);C>-1&&C<D.children.length;){const K=D.children[C];if(w=f(K,C,E)(),w[0]===d0)return w;C=typeof w[1]=="number"?w[1]:C+c}}return b}}}function hT(e){return Array.isArray(e)?e:typeof e=="number"?[uT,e]:e==null?v6:[e]}function Qp(e,t,n,s){let a,u,c;typeof t=="function"&&typeof n!="function"?(u=void 0,c=t,a=n):(u=t,c=n,a=s),y6(e,u,f,a);function f(m,p){const g=p[p.length-1],_=g?g.children.indexOf(m):void 0;return c(m,_,g)}}const p0={}.hasOwnProperty,fT={};function dT(e,t){const n=t||fT,s=new Map,a=new Map,u=new Map,c={...Wk,...n.handlers},f={all:p,applyData:mT,definitionById:s,footnoteById:a,footnoteCounts:u,footnoteOrder:[],handlers:c,one:m,options:n,patch:pT,wrap:gT};return Qp(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const _=g.type==="definition"?s:a,v=String(g.identifier).toUpperCase();_.has(v)||_.set(v,g)}}),f;function m(g,_){const v=g.type,b=f.handlers[v];if(p0.call(f.handlers,v)&&b)return b(f,g,_);if(f.options.passThrough&&f.options.passThrough.includes(v)){if("children"in g){const{children:C,...E}=g,D=nh(E);return D.children=f.all(g),D}return nh(g)}return(f.options.unknownHandler||_T)(f,g,_)}function p(g){const _=[];if("children"in g){const v=g.children;let b=-1;for(;++b<v.length;){const w=f.one(v[b],g);if(w){if(b&&v[b-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=n5(w.value)),!Array.isArray(w)&&w.type==="element")){const C=w.children[0];C&&C.type==="text"&&(C.value=n5(C.value))}Array.isArray(w)?_.push(...w):_.push(w)}}}return _}}function pT(e,t){e.position&&(t.position=iC(e))}function mT(e,t){let n=t;if(e&&e.data){const s=e.data.hName,a=e.data.hChildren,u=e.data.hProperties;if(typeof s=="string")if(n.type==="element")n.tagName=s;else{const c="children"in n?n.children:[n];n={type:"element",tagName:s,properties:{},children:c}}n.type==="element"&&u&&Object.assign(n.properties,nh(u)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function _T(e,t){const n=t.data||{},s="value"in t&&!(p0.call(n,"hProperties")||p0.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 gT(e,t){const n=[];let s=-1;for(t&&n.push({type:"text",value:`
35
- `});++s<e.length;)s&&n.push({type:"text",value:`
36
- `}),n.push(e[s]);return t&&e.length>0&&n.push({type:"text",value:`
37
- `}),n}function n5(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function r5(e,t){const n=dT(e,t),s=n.one(e,void 0),a=nT(n),u=Array.isArray(s)?{type:"root",children:s}:s||{type:"root",children:[]};return a&&u.children.push({type:"text",value:`
38
- `},a),u}function vT(e,t){return e&&"run"in e?async function(n,s){const a=r5(n,{file:s,...t});await e.run(a,s)}:function(n,s){return r5(n,{file:s,...e||t})}}function s5(e){if(e)throw e}var M1,l5;function yT(){if(l5)return M1;l5=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,s=Object.getOwnPropertyDescriptor,a=function(p){return typeof Array.isArray=="function"?Array.isArray(p):t.call(p)==="[object Array]"},u=function(p){if(!p||t.call(p)!=="[object Object]")return!1;var g=e.call(p,"constructor"),_=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!g&&!_)return!1;var v;for(v in p);return typeof v>"u"||e.call(p,v)},c=function(p,g){n&&g.name==="__proto__"?n(p,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):p[g.name]=g.newValue},f=function(p,g){if(g==="__proto__")if(e.call(p,g)){if(s)return s(p,g).value}else return;return p[g]};return M1=function m(){var p,g,_,v,b,w,C=arguments[0],E=1,D=arguments.length,K=!1;for(typeof C=="boolean"&&(K=C,C=arguments[1]||{},E=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});E<D;++E)if(p=arguments[E],p!=null)for(g in p)_=f(C,g),v=f(p,g),C!==v&&(K&&v&&(u(v)||(b=a(v)))?(b?(b=!1,w=_&&a(_)?_:[]):w=_&&u(_)?_:{},c(C,{name:g,newValue:m(K,w,v)})):typeof v<"u"&&c(C,{name:g,newValue:v}));return C},M1}var ST=yT();const D1=Jl(ST);function m0(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 bT(){const e=[],t={run:n,use:s};return t;function n(...a){let u=-1;const c=a.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...a);function f(m,...p){const g=e[++u];let _=-1;if(m){c(m);return}for(;++_<a.length;)(p[_]===null||p[_]===void 0)&&(p[_]=a[_]);a=p,g?wT(g,f)(...p):c(null,...p)}}function s(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function wT(e,t){let n;return s;function s(...c){const f=e.length>c.length;let m;f&&c.push(a);try{m=e.apply(this,c)}catch(p){const g=p;if(f&&n)throw g;return a(g)}f||(m&&m.then&&typeof m.then=="function"?m.then(u,a):m instanceof Error?a(m):u(m))}function a(c,...f){n||(n=!0,t(c,...f))}function u(c){a(null,c)}}const An={basename:xT,dirname:CT,extname:ET,join:kT,sep:"/"};function xT(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');$o(e);let n=0,s=-1,a=e.length,u;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(u){n=a+1;break}}else s<0&&(u=!0,s=a+1);return s<0?"":e.slice(n,s)}if(t===e)return"";let c=-1,f=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(u){n=a+1;break}}else c<0&&(u=!0,c=a+1),f>-1&&(e.codePointAt(a)===t.codePointAt(f--)?f<0&&(s=a):(f=-1,s=c));return n===s?s=c:s<0&&(s=e.length),e.slice(n,s)}function CT(e){if($o(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 ET(e){$o(e);let t=e.length,n=-1,s=0,a=-1,u=0,c;for(;t--;){const f=e.codePointAt(t);if(f===47){if(c){s=t+1;break}continue}n<0&&(c=!0,n=t+1),f===46?a<0?a=t:u!==1&&(u=1):a>-1&&(u=-1)}return a<0||n<0||u===0||u===1&&a===n-1&&a===s+1?"":e.slice(a,n)}function kT(...e){let t=-1,n;for(;++t<e.length;)$o(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":TT(n)}function TT(e){$o(e);const t=e.codePointAt(0)===47;let n=MT(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function MT(e,t){let n="",s=0,a=-1,u=0,c=-1,f,m;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(a===c-1||u===1))if(a!==c-1&&u===2){if(n.length<2||s!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(m=n.lastIndexOf("/"),m!==n.length-1){m<0?(n="",s=0):(n=n.slice(0,m),s=n.length-1-n.lastIndexOf("/")),a=c,u=0;continue}}else if(n.length>0){n="",s=0,a=c,u=0;continue}}t&&(n=n.length>0?n+"/..":"..",s=2)}else n.length>0?n+="/"+e.slice(a+1,c):n=e.slice(a+1,c),s=c-a-1;a=c,u=0}else f===46&&u>-1?u++:u=-1}return n}function $o(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const DT={cwd:AT};function AT(){return"/"}function _0(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function OT(e){if(typeof e=="string")e=new URL(e);else if(!_0(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 RT(e)}function RT(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 a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const A1=["history","path","basename","stem","extname","dirname"];class S6{constructor(t){let n;t?_0(t)?n={path:t}:typeof t=="string"||LT(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":DT.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let s=-1;for(;++s<A1.length;){const u=A1[s];u in n&&n[u]!==void 0&&n[u]!==null&&(this[u]=u==="history"?[...n[u]]:n[u])}let a;for(a in n)A1.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?An.basename(this.path):void 0}set basename(t){R1(t,"basename"),O1(t,"basename"),this.path=An.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?An.dirname(this.path):void 0}set dirname(t){a5(this.basename,"dirname"),this.path=An.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?An.extname(this.path):void 0}set extname(t){if(O1(t,"extname"),a5(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=An.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){_0(t)&&(t=OT(t)),R1(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?An.basename(this.path,this.extname):void 0}set stem(t){R1(t,"stem"),O1(t,"stem"),this.path=An.join(this.dirname||"",t+(this.extname||""))}fail(t,n,s){const a=this.message(t,n,s);throw a.fatal=!0,a}info(t,n,s){const a=this.message(t,n,s);return a.fatal=void 0,a}message(t,n,s){const a=new ri(t,n,s);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function O1(e,t){if(e&&e.includes(An.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+An.sep+"`")}function R1(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function a5(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function LT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const zT=(function(e){const s=this.constructor.prototype,a=s[e],u=function(){return a.apply(u,arguments)};return Object.setPrototypeOf(u,s),u}),NT={}.hasOwnProperty;class Jp extends zT{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=bT()}copy(){const t=new Jp;let n=-1;for(;++n<this.attachers.length;){const s=this.attachers[n];t.use(...s)}return t.data(D1(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(N1("data",this.frozen),this.namespace[t]=n,this):NT.call(this.namespace,t)&&this.namespace[t]||void 0:t?(N1("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 a=n.call(t,...s);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ac(t),s=this.parser||this.Parser;return L1("parse",s),s(String(n),n)}process(t,n){const s=this;return this.freeze(),L1("process",this.parser||this.Parser),z1("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(u,c){const f=Ac(t),m=s.parse(f);s.run(m,f,function(g,_,v){if(g||!_||!v)return p(g);const b=_,w=s.stringify(b,v);HT(w)?v.value=w:v.result=w,p(g,v)});function p(g,_){g||!_?c(g):u?u(_):n(void 0,_)}}}processSync(t){let n=!1,s;return this.freeze(),L1("processSync",this.parser||this.Parser),z1("processSync",this.compiler||this.Compiler),this.process(t,a),u5("processSync","process",n),s;function a(u,c){n=!0,s5(u),s=c}}run(t,n,s){o5(t),this.freeze();const a=this.transformers;return!s&&typeof n=="function"&&(s=n,n=void 0),s?u(void 0,s):new Promise(u);function u(c,f){const m=Ac(n);a.run(t,m,p);function p(g,_,v){const b=_||t;g?f(g):c?c(b):s(void 0,b,v)}}}runSync(t,n){let s=!1,a;return this.run(t,n,u),u5("runSync","run",s),a;function u(c,f){s5(c),a=f,s=!0}}stringify(t,n){this.freeze();const s=Ac(n),a=this.compiler||this.Compiler;return z1("stringify",a),o5(t),a(t,s)}use(t,...n){const s=this.attachers,a=this.namespace;if(N1("use",this.frozen),t!=null)if(typeof t=="function")m(t,n);else if(typeof t=="object")Array.isArray(t)?f(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function u(p){if(typeof p=="function")m(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[g,..._]=p;m(g,_)}else c(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function c(p){if(!("plugins"in p)&&!("settings"in p))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");f(p.plugins),p.settings&&(a.settings=D1(!0,a.settings,p.settings))}function f(p){let g=-1;if(p!=null)if(Array.isArray(p))for(;++g<p.length;){const _=p[g];u(_)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function m(p,g){let _=-1,v=-1;for(;++_<s.length;)if(s[_][0]===p){v=_;break}if(v===-1)s.push([p,...g]);else if(g.length>0){let[b,...w]=g;const C=s[v][1];m0(C)&&m0(b)&&(b=D1(!0,C,b)),s[v]=[p,b,...w]}}}}const BT=new Jp().freeze();function L1(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function z1(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function N1(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 o5(e){if(!m0(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function u5(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ac(e){return jT(e)?e:new S6(e)}function jT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function HT(e){return typeof e=="string"||IT(e)}function IT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const PT="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",c5=[],h5={allowDangerousHtml:!0},FT=/^(https?|ircs?|mailto|xmpp)$/i,UT=[{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 VT(e){const t=qT(e),n=YT(e);return $T(t.runSync(t.parse(n),n),e)}function qT(e){const t=e.rehypePlugins||c5,n=e.remarkPlugins||c5,s=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...h5}:h5;return BT().use(wk).use(n).use(vT,s).use(t)}function YT(e){const t=e.children||"",n=new S6;return typeof t=="string"&&(n.value=t),n}function $T(e,t){const n=t.allowedElements,s=t.allowElement,a=t.components,u=t.disallowedElements,c=t.skipHtml,f=t.unwrapDisallowed,m=t.urlTransform||KT;for(const g of UT)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+PT+g.id,void 0);return Qp(e,p),aC(e,{Fragment:y.Fragment,components:a,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function p(g,_,v){if(g.type==="raw"&&v&&typeof _=="number")return c?v.children.splice(_,1):v.children[_]={type:"text",value:g.value},_;if(g.type==="element"){let b;for(b in E1)if(Object.hasOwn(E1,b)&&Object.hasOwn(g.properties,b)){const w=g.properties[b],C=E1[b];(C===null||C.includes(g.tagName))&&(g.properties[b]=m(String(w||""),b,g))}}if(g.type==="element"){let b=n?!n.includes(g.tagName):u?u.includes(g.tagName):!1;if(!b&&s&&typeof _=="number"&&(b=!s(g,_,v)),b&&v&&typeof _=="number")return f&&g.children?v.children.splice(_,1,...g.children):v.children.splice(_,1),_}}}function KT(e){const t=e.indexOf(":"),n=e.indexOf("?"),s=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||n!==-1&&t>n||s!==-1&&t>s||FT.test(e.slice(0,t))?e:""}function f5(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let s=0,a=n.indexOf(t);for(;a!==-1;)s++,a=n.indexOf(t,a+t.length);return s}function WT(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function GT(e,t,n){const a=Dh((n||{}).ignore||[]),u=XT(t);let c=-1;for(;++c<u.length;)y6(e,"text",f);function f(p,g){let _=-1,v;for(;++_<g.length;){const b=g[_],w=v?v.children:void 0;if(a(b,w?w.indexOf(b):void 0,v))return;v=b}if(v)return m(p,g)}function m(p,g){const _=g[g.length-1],v=u[c][0],b=u[c][1];let w=0;const E=_.children.indexOf(p);let D=!1,K=[];v.lastIndex=0;let V=v.exec(p.value);for(;V;){const se=V.index,z={index:V.index,input:V.input,stack:[...g,p]};let T=b(...V,z);if(typeof T=="string"&&(T=T.length>0?{type:"text",value:T}:void 0),T===!1)v.lastIndex=se+1;else{if(w!==se&&Z({type:"text",value:p.value.slice(w,se)}),Array.isArray(T))for(const $ of T)Z($);else T&&Z(T);w=se+V[0].length,D=!0}if(!v.global)break;V=v.exec(p.value)}return D?(w<p.value.length&&Z({type:"text",value:p.value.slice(w)}),_.children.splice(E,1,...K)):K=[p],E+K.length;function Z(se){const z=K[K.length-1];z&&z.type==="text"&&se.type==="text"?z.value+=se.value:K.push(se)}}}function XT(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 a=n[s];t.push([ZT(a[0]),QT(a[1])])}return t}function ZT(e){return typeof e=="string"?new RegExp(WT(e),"g"):e}function QT(e){return typeof e=="function"?e:function(){return e}}const B1="phrasing",j1=["autolink","link","image","label"];function JT(){return{transforms:[lM],enter:{literalAutolink:tM,literalAutolinkEmail:H1,literalAutolinkHttp:H1,literalAutolinkWww:H1},exit:{literalAutolink:sM,literalAutolinkEmail:rM,literalAutolinkHttp:iM,literalAutolinkWww:nM}}}function eM(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:B1,notInConstruct:j1},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:B1,notInConstruct:j1},{character:":",before:"[ps]",after:"\\/",inConstruct:B1,notInConstruct:j1}]}}function tM(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function H1(e){this.config.enter.autolinkProtocol.call(this,e)}function iM(e){this.config.exit.autolinkProtocol.call(this,e)}function nM(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 rM(e){this.config.exit.autolinkEmail.call(this,e)}function sM(e){this.exit(e)}function lM(e){GT(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,aM],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,oM]],{ignore:["link","linkReference"]})}function aM(e,t,n,s,a){let u="";if(!b6(a)||(/^w/i.test(t)&&(n=t+n,t="",u="http://"),!uM(n)))return!1;const c=cM(n+s);if(!c[0])return!1;const f={type:"link",title:null,url:u+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function oM(e,t,n,s){return!b6(s,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function uM(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 cM(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 a=f5(e,"(");let u=f5(e,")");for(;s!==-1&&a>u;)e+=n.slice(0,s+1),n=n.slice(s+1),s=n.indexOf(")"),u++;return[e,n]}function b6(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Is(n)||kh(n))&&(!t||n!==47)}w6.peek=yM;function hM(){this.buffer()}function fM(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function dM(){this.buffer()}function pM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function mM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function _M(e){this.exit(e)}function gM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function vM(e){this.exit(e)}function yM(){return"["}function w6(e,t,n,s){const a=n.createTracker(s);let u=a.move("[^");const c=n.enter("footnoteReference"),f=n.enter("reference");return u+=a.move(n.safe(n.associationId(e),{after:"]",before:u})),f(),c(),u+=a.move("]"),u}function SM(){return{enter:{gfmFootnoteCallString:hM,gfmFootnoteCall:fM,gfmFootnoteDefinitionLabelString:dM,gfmFootnoteDefinition:pM},exit:{gfmFootnoteCallString:mM,gfmFootnoteCall:_M,gfmFootnoteDefinitionLabelString:gM,gfmFootnoteDefinition:vM}}}function bM(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:w6},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(s,a,u,c){const f=u.createTracker(c);let m=f.move("[^");const p=u.enter("footnoteDefinition"),g=u.enter("label");return m+=f.move(u.safe(u.associationId(s),{before:m,after:"]"})),g(),m+=f.move("]:"),s.children&&s.children.length>0&&(f.shift(4),m+=f.move((t?`
39
- `:" ")+u.indentLines(u.containerFlow(s,f.current()),t?x6:wM))),p(),m}}function wM(e,t,n){return t===0?e:x6(e,t,n)}function x6(e,t,n){return(n?"":" ")+e}const xM=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];em.attention=MM;em.peek=DM;function CM(){return{canContainEols:["delete"],enter:{strikethrough:kM},exit:{strikethrough:TM}}}function EM(){return{handlers:{delete:em},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:xM}]}}function kM(e){this.enter({type:"delete",children:[],position:void 0},e)}function TM(e){this.exit(e)}function em(e,t,n,s){const a=n.createTracker(s),u=n.stack.includes("strikethrough")?"~":"~~",c=n.enter("strikethrough");let f=a.move(u);return f+=n.containerPhrasing(e,{...a.current(),before:f,after:"~"}),f+=a.move(u),c(),f}function MM(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function DM(){return"~"}function AM(e){return e.length}function OM(e,t){const n=t||{},s=(n.align||[]).concat(),a=n.stringLength||AM,u=[],c=[],f=[],m=[];let p=0,g=-1;for(;++g<e.length;){const C=[],E=[];let D=-1;for(e[g].length>p&&(p=e[g].length);++D<e[g].length;){const K=RM(e[g][D]);if(n.alignDelimiters!==!1){const V=a(K);E[D]=V,(m[D]===void 0||V>m[D])&&(m[D]=V)}C.push(K)}c[g]=C,f[g]=E}let _=-1;if(typeof s=="object"&&"length"in s)for(;++_<p;)u[_]=d5(s[_]);else{const C=d5(s);for(;++_<p;)u[_]=C}_=-1;const v=[],b=[];for(;++_<p;){const C=u[_];let E="",D="";C===99?(E=":",D=":"):C===108?E=":":C===114&&(D=":");let K=n.alignDelimiters===!1?1:Math.max(1,m[_]-E.length-D.length);const V=E+"-".repeat(K)+D;n.alignDelimiters!==!1&&(K=E.length+K+D.length,K>m[_]&&(m[_]=K),b[_]=K),v[_]=V}c.splice(1,0,v),f.splice(1,0,b),g=-1;const w=[];for(;++g<c.length;){const C=c[g],E=f[g];_=-1;const D=[];for(;++_<p;){const K=C[_]||"";let V="",Z="";if(n.alignDelimiters!==!1){const se=m[_]-(E[_]||0),z=u[_];z===114?V=" ".repeat(se):z===99?se%2?(V=" ".repeat(se/2+.5),Z=" ".repeat(se/2-.5)):(V=" ".repeat(se/2),Z=V):Z=" ".repeat(se)}n.delimiterStart!==!1&&!_&&D.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&K==="")&&(n.delimiterStart!==!1||_)&&D.push(" "),n.alignDelimiters!==!1&&D.push(V),D.push(K),n.alignDelimiters!==!1&&D.push(Z),n.padding!==!1&&D.push(" "),(n.delimiterEnd!==!1||_!==p-1)&&D.push("|")}w.push(n.delimiterEnd===!1?D.join("").replace(/ +$/,""):D.join(""))}return w.join(`
40
- `)}function RM(e){return e==null?"":String(e)}function d5(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 LM=Dh(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function zM(e,t,n,s){const a=n.enter("blockquote"),u=n.createTracker(s);u.move("> "),u.shift(2);const c=n.indentLines(n.containerFlow(e,u.current()),NM);return a(),c}function NM(e,t,n){return">"+(n?"":" ")+e}function BM(e,t){return p5(e,t.inConstruct,!0)&&!p5(e,t.notInConstruct,!1)}function p5(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 m5(e,t,n,s){let a=-1;for(;++a<n.unsafe.length;){const u=n.unsafe[a];if(u.character===`
41
- `&&!u.before&&!u.after&&BM(n.stack,u))return/[\t ]/.test(s.before)?"":" "}return`\\
42
- `}function jM(e,t){const n=String(e);let s=n.indexOf(t),a=s,u=0,c=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;s!==-1;)s===a?++u>c&&(c=u):u=1,a=s+t.length,s=n.indexOf(t,a);return c}function HM(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 IM(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 PM(e,t,n,s){const a=IM(n),u=e.value||"";if(HM(e,n)){const _=n.enter("codeIndented"),v=n.indentLines(u,FM);return _(),v}const c=n.createTracker(s),f=a.repeat(Math.max(jM(u,a)+1,3)),m=n.enter("codeFenced"),p=a==="`"?"GraveAccent":"Tilde";let g=c.move(f);if(e.lang){const _=n.enter(`codeFencedLang${p}`);g+=c.move(n.safe(e.lang,{before:g,after:" ",encode:["`"],...c.current()})),_()}if(e.lang&&e.meta){const _=n.enter(`codeFencedMeta${p}`);g+=c.move(" "),g+=c.move(n.safe(e.meta,{before:g,after:`
43
- `,encode:["`"],...c.current()})),_()}return g+=c.move(`
44
- `),u&&(g+=c.move(u+`
45
- `)),g+=c.move(f),m(),g}function FM(e,t,n){return(n?"":" ")+e}function tm(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 UM(e,t,n,s){const a=tm(n),u=a==='"'?"Quote":"Apostrophe",c=n.enter("definition");let f=n.enter("label");const m=n.createTracker(s);let p=m.move("[");return p+=m.move(n.safe(n.associationId(e),{before:p,after:"]",...m.current()})),p+=m.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),p+=m.move("<"),p+=m.move(n.safe(e.url,{before:p,after:">",...m.current()})),p+=m.move(">")):(f=n.enter("destinationRaw"),p+=m.move(n.safe(e.url,{before:p,after:e.title?" ":`
46
- `,...m.current()}))),f(),e.title&&(f=n.enter(`title${u}`),p+=m.move(" "+a),p+=m.move(n.safe(e.title,{before:p,after:a,...m.current()})),p+=m.move(a),f()),c(),p}function VM(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}im.attention=qM;im.peek=YM;function im(e,t,n,s){const a=n.enter("phrasing"),u=n.containerPhrasing({type:"root",children:[e]},s);return a(),u}function qM(e,t){return{construct:"emphasis",markers:VM(t)==="*"?["*","_"]:["_","*"],sizes:[1]}}function YM(e,t,n){return n.options.emphasis||"*"}function $M(e){return"&#x"+e.toString(16).toUpperCase()+";"}function KM(e,t){let n=!1;return Qp(e,function(s){if("value"in s&&/\r?\n|\r/.test(s.value)||s.type==="break")return n=!0,d0}),!!((!e.depth||e.depth<3)&&Yp(e)&&(t.options.setext||n))}function WM(e,t,n,s){const a=Math.max(Math.min(6,e.depth||1),1),u=n.createTracker(s);if(KM(e,n)){const _=n.enter("headingSetext"),v=n.enter("phrasing"),b=n.containerPhrasing(e,{...u.current(),before:`
47
- `,after:`
48
- `});return v(),_(),b+`
49
- `+(a===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
50
- `))+1))}const c="#".repeat(a),f=n.enter("headingAtx"),m=n.enter("phrasing");u.move(c+" ");let p=n.containerPhrasing(e,{before:"# ",after:`
51
- `,...u.current()});const g=p.charCodeAt(0);return(g===9||g===32)&&(p=$M(g)+p.slice(1)),p=p?c+" "+p:c,n.options.closeAtx&&(p+=" "+c),m(),f(),p}C6.peek=GM;function C6(e){return e.value||""}function GM(){return"<"}E6.peek=XM;function E6(e,t,n,s){const a=tm(n),u=a==='"'?"Quote":"Apostrophe",c=n.enter("image");let f=n.enter("label");const m=n.createTracker(s);let p=m.move("![");return p+=m.move(n.safe(e.alt,{before:p,after:"]",...m.current()})),p+=m.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),p+=m.move("<"),p+=m.move(n.safe(e.url,{before:p,after:">",...m.current()})),p+=m.move(">")):(f=n.enter("destinationRaw"),p+=m.move(n.safe(e.url,{before:p,after:e.title?" ":")",...m.current()}))),f(),e.title&&(f=n.enter(`title${u}`),p+=m.move(" "+a),p+=m.move(n.safe(e.title,{before:p,after:a,...m.current()})),p+=m.move(a),f()),p+=m.move(")"),c(),p}function XM(){return"!"}k6.peek=ZM;function k6(e,t,n,s){const a=e.referenceType,u=n.enter("imageReference");let c=n.enter("label");const f=n.createTracker(s);let m=f.move("![");const p=n.safe(e.alt,{before:m,after:"]",...f.current()});m+=f.move(p+"]["),c();const g=n.stack;n.stack=g.filter(function(v){return v!=="phrasing"}),c=n.enter("reference");const _=n.safe(n.associationId(e),{before:m,after:"]",...f.current()});return c(),n.stack=g,u(),a==="full"||!p||p!==_?m+=f.move(_+"]"):a==="shortcut"?m=m.slice(0,-1):m+=f.move("]"),m}function ZM(){return"!"}T6.peek=QM;function T6(e,t,n){let s=e.value||"",a="`",u=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(s);)a+="`";for(/[^\n\r ]/.test(s)&&(/^[\n\r ]/.test(s)&&/[\n\r ]$/.test(s)||/^`|`$/.test(s))&&(s=" "+s+" ");++u<n.unsafe.length;){const c=n.unsafe[u],f=n.compilePattern(c);if(!c.atBreak)continue;let m;for(;m=f.exec(s);){let p=m.index;s.charCodeAt(p)===10&&s.charCodeAt(p-1)===13&&p--,s=s.slice(0,p)+" "+s.slice(m.index+1)}}return a+s+a}function QM(){return"`"}function M6(e,t){const n=Yp(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))}D6.peek=JM;function D6(e,t,n,s){const a=tm(n),u=a==='"'?"Quote":"Apostrophe",c=n.createTracker(s);if(M6(e,n)){const g=n.stack;n.stack=g.filter(function(b){return b!=="phrasing"});const _=n.enter("autolink");let v=c.move("<");return v+=c.move(n.containerPhrasing(e,{before:v,after:">",...c.current()})),v+=c.move(">"),_(),n.stack=g,v}const f=n.enter("link");let m=n.enter("label"),p=c.move("[");return p+=c.move(n.containerPhrasing(e,{before:p,after:"](",...c.current()})),p+=c.move("]("),m(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(m=n.enter("destinationLiteral"),p+=c.move("<"),p+=c.move(n.safe(e.url,{before:p,after:">",...c.current()})),p+=c.move(">")):(m=n.enter("destinationRaw"),p+=c.move(n.safe(e.url,{before:p,after:e.title?" ":")",...c.current()}))),m(),e.title&&(m=n.enter(`title${u}`),p+=c.move(" "+a),p+=c.move(n.safe(e.title,{before:p,after:a,...c.current()})),p+=c.move(a),m()),p+=c.move(")"),f(),p}function JM(e,t,n){return M6(e,n)?"<":"["}A6.peek=eD;function A6(e,t,n,s){const a=e.referenceType,u=n.enter("linkReference");let c=n.enter("label");const f=n.createTracker(s);let m=f.move("[");const p=n.containerPhrasing(e,{before:m,after:"]",...f.current()});m+=f.move(p+"]["),c();const g=n.stack;n.stack=g.filter(function(v){return v!=="phrasing"}),c=n.enter("reference");const _=n.safe(n.associationId(e),{before:m,after:"]",...f.current()});return c(),n.stack=g,u(),a==="full"||!p||p!==_?m+=f.move(_+"]"):a==="shortcut"?m=m.slice(0,-1):m+=f.move("]"),m}function eD(){return"["}function nm(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 tD(e){const t=nm(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 iD(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 O6(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 nD(e,t,n,s){const a=n.enter("list"),u=n.bulletCurrent;let c=e.ordered?iD(n):nm(n);const f=e.ordered?c==="."?")":".":tD(n);let m=t&&n.bulletLastUsed?c===n.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&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&&(m=!0),O6(n)===c&&g){let _=-1;for(;++_<e.children.length;){const v=e.children[_];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.children[0].type==="thematicBreak"){m=!0;break}}}}m&&(c=f),n.bulletCurrent=c;const p=n.containerFlow(e,s);return n.bulletLastUsed=c,n.bulletCurrent=u,a(),p}function rD(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 sD(e,t,n,s){const a=rD(n);let u=n.bulletCurrent||nm(n);t&&t.type==="list"&&t.ordered&&(u=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+u);let c=u.length+1;(a==="tab"||a==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=n.createTracker(s);f.move(u+" ".repeat(c-u.length)),f.shift(c);const m=n.enter("listItem"),p=n.indentLines(n.containerFlow(e,f.current()),g);return m(),p;function g(_,v,b){return v?(b?"":" ".repeat(c))+_:(b?u:u+" ".repeat(c-u.length))+_}}function lD(e,t,n,s){const a=n.enter("paragraph"),u=n.enter("phrasing"),c=n.containerPhrasing(e,s);return u(),a(),c}function aD(e,t,n,s){if(!e.children.some(function(f){return LM(f)}))return n.containerFlow(e,s);const u=n.enter("phrasing"),c=n.containerPhrasing(e,s);return u(),c}function oD(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}rm.attention=uD;rm.peek=cD;function rm(e,t,n,s){const a=n.enter("phrasing"),u=n.containerPhrasing({type:"root",children:[e]},s);return a(),u}function uD(e,t){return{construct:"strong",markers:oD(t)==="*"?["*","_"]:["_","*"],sizes:[2]}}function cD(e,t,n){return n.options.strong||"*"}function hD(e,t,n,s){const a=t?t.children:[],u=a.indexOf(e);return n.safe(e.value,{...s,afterNode:a[u+1],beforeNode:a[u-1]})}function fD(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 dD(e,t,n){const s=(O6(n)+(n.options.ruleSpaces?" ":"")).repeat(fD(n));return n.options.ruleSpaces?s.slice(0,-1):s}const R6={blockquote:zM,break:m5,code:PM,definition:UM,emphasis:im,hardBreak:m5,heading:WM,html:C6,image:E6,imageReference:k6,inlineCode:T6,link:D6,linkReference:A6,list:nD,listItem:sD,paragraph:lD,root:aD,strong:rm,text:hD,thematicBreak:dD};function pD(){return{enter:{table:mD,tableData:_5,tableHeader:_5,tableRow:gD},exit:{codeText:vD,table:_D,tableData:I1,tableHeader:I1,tableRow:I1}}}function mD(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 _D(e){this.exit(e),this.data.inTable=void 0}function gD(e){this.enter({type:"tableRow",children:[]},e)}function I1(e){this.exit(e)}function _5(e){this.enter({type:"tableCell",children:[]},e)}function vD(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,yD));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function yD(e,t){return t==="|"?t:e}function SD(e){const t=e||{},n=t.tableCellPadding,s=t.tablePipeAlign,a=t.stringLength,u=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
52
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:c,tableCell:m,tableRow:f}};function c(b,w,C,E){return p(g(b,C,E),b.align)}function f(b,w,C,E){const D=_(b,C,E),K=p([D]);return K.slice(0,K.indexOf(`
53
- `))}function m(b,w,C,E){const D=C.enter("tableCell"),K=C.enter("phrasing"),V=C.containerPhrasing(b,{...E,before:u,after:u});return K(),D(),V}function p(b,w){return OM(b,{align:w,alignDelimiters:s,padding:n,stringLength:a})}function g(b,w,C){const E=b.children;let D=-1;const K=[],V=w.enter("table");for(;++D<E.length;)K[D]=_(E[D],w,C);return V(),K}function _(b,w,C){const E=b.children;let D=-1;const K=[],V=w.enter("tableRow");for(;++D<E.length;)K[D]=m(E[D],b,w,C);return V(),K}function v(b,w,C){let E=R6.inlineCode(b,w,C);return C.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function bD(){return{exit:{taskListCheckValueChecked:g5,taskListCheckValueUnchecked:g5,paragraph:xD}}}function wD(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:CD}}}function g5(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function xD(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 a=t.children;let u=-1,c;for(;++u<a.length;){const f=a[u];if(f.type==="paragraph"){c=f;break}}c===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 CD(e,t,n,s){const a=e.children[0],u=typeof e.checked=="boolean"&&a&&a.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=n.createTracker(s);u&&f.move(c);let m=R6.listItem(e,t,n,{...s,...f.current()});return u&&(m=m.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),m;function p(g){return g+c}}function ED(){return[JT(),SM(),CM(),pD(),bD()]}function kD(e){return{extensions:[eM(),bM(e),EM(),SD(e),wD()]}}const TD={tokenize:LD,partial:!0},L6={tokenize:zD,partial:!0},z6={tokenize:ND,partial:!0},N6={tokenize:BD,partial:!0},MD={tokenize:jD,partial:!0},B6={name:"wwwAutolink",tokenize:OD,previous:H6},j6={name:"protocolAutolink",tokenize:RD,previous:I6},or={name:"emailAutolink",tokenize:AD,previous:P6},jn={};function DD(){return{text:jn}}let ks=48;for(;ks<123;)jn[ks]=or,ks++,ks===58?ks=65:ks===91&&(ks=97);jn[43]=or;jn[45]=or;jn[46]=or;jn[95]=or;jn[72]=[or,j6];jn[104]=[or,j6];jn[87]=[or,B6];jn[119]=[or,B6];function AD(e,t,n){const s=this;let a,u;return c;function c(_){return!g0(_)||!P6.call(s,s.previous)||sm(s.events)?n(_):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(_))}function f(_){return g0(_)?(e.consume(_),f):_===64?(e.consume(_),m):n(_)}function m(_){return _===46?e.check(MD,g,p)(_):_===45||_===95||ni(_)?(u=!0,e.consume(_),m):g(_)}function p(_){return e.consume(_),a=!0,m}function g(_){return u&&a&&hi(s.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(_)):n(_)}}function OD(e,t,n){const s=this;return a;function a(c){return c!==87&&c!==119||!H6.call(s,s.previous)||sm(s.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(TD,e.attempt(L6,e.attempt(z6,u),n),n)(c))}function u(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function RD(e,t,n){const s=this;let a="",u=!1;return c;function c(_){return(_===72||_===104)&&I6.call(s,s.previous)&&!sm(s.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(_),e.consume(_),f):n(_)}function f(_){if(hi(_)&&a.length<5)return a+=String.fromCodePoint(_),e.consume(_),f;if(_===58){const v=a.toLowerCase();if(v==="http"||v==="https")return e.consume(_),m}return n(_)}function m(_){return _===47?(e.consume(_),u?p:(u=!0,m)):n(_)}function p(_){return _===null||Jc(_)||st(_)||Is(_)||kh(_)?n(_):e.attempt(L6,e.attempt(z6,g),n)(_)}function g(_){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(_)}}function LD(e,t,n){let s=0;return a;function a(c){return(c===87||c===119)&&s<3?(s++,e.consume(c),a):c===46&&s===3?(e.consume(c),u):n(c)}function u(c){return c===null?n(c):t(c)}}function zD(e,t,n){let s,a,u;return c;function c(p){return p===46||p===95?e.check(N6,m,f)(p):p===null||st(p)||Is(p)||p!==45&&kh(p)?m(p):(u=!0,e.consume(p),c)}function f(p){return p===95?s=!0:(a=s,s=void 0),e.consume(p),c}function m(p){return a||s||!u?n(p):t(p)}}function ND(e,t){let n=0,s=0;return a;function a(c){return c===40?(n++,e.consume(c),a):c===41&&s<n?u(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(N6,t,u)(c):c===null||st(c)||Is(c)?t(c):(e.consume(c),a)}function u(c){return c===41&&s++,e.consume(c),a}}function BD(e,t,n){return s;function s(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),s):f===38?(e.consume(f),u):f===93?(e.consume(f),a):f===60||f===null||st(f)||Is(f)?t(f):n(f)}function a(f){return f===null||f===40||f===91||st(f)||Is(f)?t(f):s(f)}function u(f){return hi(f)?c(f):n(f)}function c(f){return f===59?(e.consume(f),s):hi(f)?(e.consume(f),c):n(f)}}function jD(e,t,n){return s;function s(u){return e.consume(u),a}function a(u){return ni(u)?n(u):t(u)}}function H6(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||st(e)}function I6(e){return!hi(e)}function P6(e){return!(e===47||g0(e))}function g0(e){return e===43||e===45||e===46||e===95||ni(e)}function sm(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 HD={tokenize:$D,partial:!0};function ID(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:VD,continuation:{tokenize:qD},exit:YD}},text:{91:{name:"gfmFootnoteCall",tokenize:UD},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:PD,resolveTo:FD}}}}function PD(e,t,n){const s=this;let a=s.events.length;const u=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let c;for(;a--;){const m=s.events[a][1];if(m.type==="labelImage"){c=m;break}if(m.type==="gfmFootnoteCall"||m.type==="labelLink"||m.type==="label"||m.type==="image"||m.type==="link")break}return f;function f(m){if(!c||!c._balanced)return n(m);const p=mn(s.sliceSerialize({start:c.end,end:s.now()}));return p.codePointAt(0)!==94||!u.includes(p.slice(1))?n(m):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),t(m))}}function FD(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)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},f=[e[n+1],e[n+2],["enter",s,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",u,t],["enter",c,t],["exit",c,t],["exit",u,t],e[e.length-2],e[e.length-1],["exit",s,t]];return e.splice(n,e.length-n+1,...f),e}function UD(e,t,n){const s=this,a=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let u=0,c;return f;function f(_){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(_),e.exit("gfmFootnoteCallLabelMarker"),m}function m(_){return _!==94?n(_):(e.enter("gfmFootnoteCallMarker"),e.consume(_),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(_){if(u>999||_===93&&!c||_===null||_===91||st(_))return n(_);if(_===93){e.exit("chunkString");const v=e.exit("gfmFootnoteCallString");return a.includes(mn(s.sliceSerialize(v)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(_),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(_)}return st(_)||(c=!0),u++,e.consume(_),_===92?g:p}function g(_){return _===91||_===92||_===93?(e.consume(_),u++,p):p(_)}}function VD(e,t,n){const s=this,a=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let u,c=0,f;return m;function m(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(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(c>999||w===93&&!f||w===null||w===91||st(w))return n(w);if(w===93){e.exit("chunkString");const C=e.exit("gfmFootnoteDefinitionLabelString");return u=mn(s.sliceSerialize(C)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return st(w)||(f=!0),c++,e.consume(w),w===92?_:g}function _(w){return w===91||w===92||w===93?(e.consume(w),c++,g):g(w)}function v(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),a.includes(u)||a.push(u),$e(e,b,"gfmFootnoteDefinitionWhitespace")):n(w)}function b(w){return t(w)}}function qD(e,t,n){return e.check(Yo,t,e.attempt(HD,t,n))}function YD(e){e.exit("gfmFootnoteDefinition")}function $D(e,t,n){const s=this;return $e(e,a,"gfmFootnoteDefinitionIndent",5);function a(u){const c=s.events[s.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(u):n(u)}}function KD(e){let n=(e||{}).singleTilde;const s={name:"strikethrough",tokenize:u,resolveAll:a};return n==null&&(n=!0),{text:{126:s},insideSpan:{null:[s]},attentionMarkers:{null:[126]}};function a(c,f){let m=-1;for(;++m<c.length;)if(c[m][0]==="enter"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._close){let p=m;for(;p--;)if(c[p][0]==="exit"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._open&&c[m][1].end.offset-c[m][1].start.offset===c[p][1].end.offset-c[p][1].start.offset){c[m][1].type="strikethroughSequence",c[p][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},c[p][1].start),end:Object.assign({},c[m][1].end)},_={type:"strikethroughText",start:Object.assign({},c[p][1].end),end:Object.assign({},c[m][1].start)},v=[["enter",g,f],["enter",c[p][1],f],["exit",c[p][1],f],["enter",_,f]],b=f.parser.constructs.insideSpan.null;b&&pn(v,v.length,0,Th(b,c.slice(p+1,m),f)),pn(v,v.length,0,[["exit",_,f],["enter",c[m][1],f],["exit",c[m][1],f],["exit",g,f]]),pn(c,p-1,m-p+3,v),m=p+v.length-2;break}}for(m=-1;++m<c.length;)c[m][1].type==="strikethroughSequenceTemporary"&&(c[m][1].type="data");return c}function u(c,f,m){const p=this.previous,g=this.events;let _=0;return v;function v(w){return p===126&&g[g.length-1][1].type!=="characterEscape"?m(w):(c.enter("strikethroughSequenceTemporary"),b(w))}function b(w){const C=th(p);if(w===126)return _>1?m(w):(c.consume(w),_++,b);if(_<2&&!n)return m(w);const E=c.exit("strikethroughSequenceTemporary"),D=th(w);return E._open=!D||D===2&&!!C,E._close=!C||C===2&&!!D,f(w)}}}class WD{constructor(){this.map=[],this.index=new Map}add(t,n,s){GD(this,t,n,s)}consume(t){if(this.map.sort(function(u,c){return u[0]-c[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 a=s.pop();for(;a;){for(const u of a)t.push(u);a=s.pop()}this.map.length=0,this.index.clear()}}function GD(e,t,n,s){if(n===0&&s.length===0)return;const a=e.index.get(t);if(a){a[1]+=n,a[2].push(...s);return}const u=[t,n,s];e.map.push(u),e.index.set(t,u)}function XD(e,t){let n=!1;const s=[];for(;t<e.length;){const a=e[t];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&s.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const u=s.length-1;s[u]=s[u]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return s}function ZD(){return{flow:{null:{name:"table",tokenize:QD,resolveAll:JD}}}}function QD(e,t,n){const s=this;let a=0,u=0,c;return f;function f(N){let J=s.events.length-1;for(;J>-1;){const{type:Q}=s.events[J][1];if(Q==="lineEnding"||Q==="linePrefix")J--;else break}const W=J>-1?s.events[J][1].type:null,G=W==="tableHead"||W==="tableRow"?z:m;return G===z&&s.parser.lazy[s.now().line]?n(N):G(N)}function m(N){return e.enter("tableHead"),e.enter("tableRow"),p(N)}function p(N){return N===124||(c=!0,u+=1),g(N)}function g(N){return N===null?n(N):xe(N)?u>1?(u=0,s.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),b):n(N):je(N)?$e(e,g,"whitespace")(N):(u+=1,c&&(c=!1,a+=1),N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),c=!0,g):(e.enter("data"),_(N)))}function _(N){return N===null||N===124||st(N)?(e.exit("data"),g(N)):(e.consume(N),N===92?v:_)}function v(N){return N===92||N===124?(e.consume(N),_):_(N)}function b(N){return s.interrupt=!1,s.parser.lazy[s.now().line]?n(N):(e.enter("tableDelimiterRow"),c=!1,je(N)?$e(e,w,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):w(N))}function w(N){return N===45||N===58?E(N):N===124?(c=!0,e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),C):se(N)}function C(N){return je(N)?$e(e,E,"whitespace")(N):E(N)}function E(N){return N===58?(u+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),D):N===45?(u+=1,D(N)):N===null||xe(N)?Z(N):se(N)}function D(N){return N===45?(e.enter("tableDelimiterFiller"),K(N)):se(N)}function K(N){return N===45?(e.consume(N),K):N===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),V):(e.exit("tableDelimiterFiller"),V(N))}function V(N){return je(N)?$e(e,Z,"whitespace")(N):Z(N)}function Z(N){return N===124?w(N):N===null||xe(N)?!c||a!==u?se(N):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(N)):se(N)}function se(N){return n(N)}function z(N){return e.enter("tableRow"),T(N)}function T(N){return N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),T):N===null||xe(N)?(e.exit("tableRow"),t(N)):je(N)?$e(e,T,"whitespace")(N):(e.enter("data"),$(N))}function $(N){return N===null||N===124||st(N)?(e.exit("data"),T(N)):(e.consume(N),N===92?ae:$)}function ae(N){return N===92||N===124?(e.consume(N),$):$(N)}}function JD(e,t){let n=-1,s=!0,a=0,u=[0,0,0,0],c=[0,0,0,0],f=!1,m=0,p,g,_;const v=new WD;for(;++n<e.length;){const b=e[n],w=b[1];b[0]==="enter"?w.type==="tableHead"?(f=!1,m!==0&&(v5(v,t,m,p,g),g=void 0,m=0),p={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},v.add(n,0,[["enter",p,t]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(s=!0,_=void 0,u=[0,0,0,0],c=[0,n+1,0,0],f&&(f=!1,g={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},v.add(n,0,[["enter",g,t]])),a=w.type==="tableDelimiterRow"?2:g?3:1):a&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(s=!1,c[2]===0&&(u[1]!==0&&(c[0]=c[1],_=Oc(v,t,u,a,void 0,_),u=[0,0,0,0]),c[2]=n)):w.type==="tableCellDivider"&&(s?s=!1:(u[1]!==0&&(c[0]=c[1],_=Oc(v,t,u,a,void 0,_)),u=c,c=[u[1],n,0,0])):w.type==="tableHead"?(f=!0,m=n):w.type==="tableRow"||w.type==="tableDelimiterRow"?(m=n,u[1]!==0?(c[0]=c[1],_=Oc(v,t,u,a,n,_)):c[1]!==0&&(_=Oc(v,t,c,a,n,_)),a=0):a&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(c[3]=n)}for(m!==0&&v5(v,t,m,p,g),v.consume(t.events),n=-1;++n<t.events.length;){const b=t.events[n];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=XD(t.events,n))}return e}function Oc(e,t,n,s,a,u){const c=s===1?"tableHeader":s===2?"tableDelimiter":"tableData",f="tableContent";n[0]!==0&&(u.end=Object.assign({},ql(t.events,n[0])),e.add(n[0],0,[["exit",u,t]]));const m=ql(t.events,n[1]);if(u={type:c,start:Object.assign({},m),end:Object.assign({},m)},e.add(n[1],0,[["enter",u,t]]),n[2]!==0){const p=ql(t.events,n[2]),g=ql(t.events,n[3]),_={type:f,start:Object.assign({},p),end:Object.assign({},g)};if(e.add(n[2],0,[["enter",_,t]]),s!==2){const v=t.events[n[2]],b=t.events[n[3]];if(v[1].end=Object.assign({},b[1].end),v[1].type="chunkText",v[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 a!==void 0&&(u.end=Object.assign({},ql(t.events,a)),e.add(a,0,[["exit",u,t]]),u=void 0),u}function v5(e,t,n,s,a){const u=[],c=ql(t.events,n);a&&(a.end=Object.assign({},c),u.push(["exit",a,t])),s.end=Object.assign({},c),u.push(["exit",s,t]),e.add(n+1,0,u)}function ql(e,t){const n=e[t],s=n[0]==="enter"?"start":"end";return n[1][s]}const eA={name:"tasklistCheck",tokenize:iA};function tA(){return{text:{91:eA}}}function iA(e,t,n){const s=this;return a;function a(m){return s.previous!==null||!s._gfmTasklistFirstContentOfListItem?n(m):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),u)}function u(m){return st(m)?(e.enter("taskListCheckValueUnchecked"),e.consume(m),e.exit("taskListCheckValueUnchecked"),c):m===88||m===120?(e.enter("taskListCheckValueChecked"),e.consume(m),e.exit("taskListCheckValueChecked"),c):n(m)}function c(m){return m===93?(e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):n(m)}function f(m){return xe(m)?t(m):je(m)?e.check({tokenize:nA},t,n)(m):n(m)}}function nA(e,t,n){return $e(e,s,"whitespace");function s(a){return a===null?n(a):t(a)}}function rA(e){return Qy([DD(),ID(),KD(e),ZD(),tA()])}const sA={};function lA(e){const t=this,n=e||sA,s=t.data(),a=s.micromarkExtensions||(s.micromarkExtensions=[]),u=s.fromMarkdownExtensions||(s.fromMarkdownExtensions=[]),c=s.toMarkdownExtensions||(s.toMarkdownExtensions=[]);a.push(rA(n)),u.push(ED()),c.push(kD(n))}function aA(e,t){return/[\\/]$/.test(e)?e+t:`${e}\\${t}`}const y5=new Map;function oA(e){const{src:t,alt:n,base:s,fsRead:a}=e,u=/^(https?:|data:|blob:)/i.test(t),c=u?t:aA(s,decodeURIComponent(t)),f=u?void 0:y5.get(c),[m,p]=Y.useState(u?t:f),[g,_]=Y.useState(!1);return Y.useEffect(()=>{if(u||m!==void 0||a===void 0)return;let v=!0;return a(c).then(b=>{const w=b;if(v)if(w.kind==="image"&&w.tooLarge!==!0&&w.base64!==void 0){const C=`data:${w.mime};base64,${w.base64}`;y5.set(c,C),p(C)}else _(!0)}).catch(()=>{v&&_(!0)}),()=>{v=!1}},[u,c,a,m]),g||!u&&m===void 0?y.jsxs("span",{className:"file-md-img-missing",children:["[图片:",n||t,"]"]}):y.jsx("img",{src:m,alt:n,loading:"lazy"})}function F6({text:e,path:t,fsRead:n}){const s=t.slice(0,Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\")));return y.jsx("div",{className:"file-md",children:y.jsx(VT,{remarkPlugins:[lA],components:{img:({src:a,alt:u})=>{const c=typeof a=="string"?a:"";return c===""?y.jsx("span",{className:"file-md-img-missing",children:"[图片]"}):y.jsx(oA,{src:c,alt:u??"",base:s,fsRead:n})},code:({className:a,children:u})=>{const c=/language-([\w-]+)/.exec(a??""),f=String(u??"").replace(/\n$/,"");return c===null?y.jsx("code",{className:a,children:u}):y.jsx(uA,{code:f,lang:c[1]})},pre:({children:a})=>y.jsx(y.Fragment,{children:a})},children:e})})}function uA({code:e,lang:t}){const[n,s]=Y.useState(null);return Y.useEffect(()=>{let a=!0;return xh(e,t).then(u=>{a&&s(u)}).catch(()=>{}),()=>{a=!1}},[e,t]),n===null?y.jsx("pre",{className:"file-code-plain",children:y.jsx("code",{children:e})}):y.jsx("div",{className:"file-code-body",dangerouslySetInnerHTML:{__html:n}})}const lm="这条能力来自桌面外壳的原生桥,浏览器里没有它";function cA(){const e=globalThis.dscNative;if(e===null||typeof e!="object")return null;const t=e;return typeof t.call=="function"?t:null}function Vs(){const e=cA(),t=e?.on;return{available:e!==null,version:e===null?null:typeof e.version=="number"?e.version:t0,invoke(n,s=[]){return e===null?Promise.reject(new Error(lm)):e.call(n,[...s])},on(n,s){return t===void 0?()=>{}:t(n,s)}}}function am(){return Y.useMemo(()=>Vs(),[])}const rh=200,sh=420,Wr=480,om=80,um=300,cm=820,hm=420;function fm(){return Wl("--dsc-jump-lane",36)+Wl("--dsc-scrollbar-w",5)}const dm=3200,Ci={sidebarWidth:"dsc.sidebarWidth",sidebarCollapsed:"dsc.uiSidebarCollapsed",threadWidth:"dsc.threadWidth",dockWidth:"dsc.dockWidth",diffPaneWidth:"dsc.diffPaneWidth"};function Kl(e,t,n){try{const s=localStorage.getItem(e);if(s===null)return null;const a=Number(s);return Number.isFinite(a)&&a>=t&&a<=n?a:null}catch{return null}}function Xr(e,t){try{t===null?localStorage.removeItem(e):localStorage.setItem(e,String(t))}catch{}}function pm(e){try{return localStorage.getItem(e)==="1"}catch{return!1}}function mm(e,t){try{localStorage.setItem(e,t?"1":"0")}catch{}}function On(e,t){const n=document.documentElement;t===null?n.style.removeProperty(e):n.style.setProperty(e,t)}function Wl(e,t){const n=Number.parseFloat(getComputedStyle(document.documentElement).getPropertyValue(e));return Number.isFinite(n)&&n>0?n:t}function _m(){return Wl("--dsc-sidebar-w",237)}function Gl(e){const t=Y.useRef(0),n=Y.useRef(0),s=Y.useRef(0),a=Y.useRef(!1),u=Y.useRef(null),c=Y.useRef(e);c.current=e;const f=()=>{u.current!==null&&(cancelAnimationFrame(u.current),u.current=null)},m=w=>c.current.clamp(t.current+c.current.sign*(w-n.current)),p=w=>{a.current=!1,f(),w.currentTarget.hasPointerCapture(w.pointerId)&&w.currentTarget.releasePointerCapture(w.pointerId),w.currentTarget.toggleAttribute("data-dragging",!1),document.body.classList.remove("resizing")},g=Y.useCallback(w=>{w.button===0&&(w.preventDefault(),w.currentTarget.setPointerCapture(w.pointerId),t.current=c.current.getBase(),n.current=w.clientX,s.current=w.clientX,a.current=!0,w.currentTarget.toggleAttribute("data-dragging",!0),document.body.classList.add("resizing"))},[]),_=Y.useCallback(w=>{if(!(!a.current||!w.currentTarget.hasPointerCapture(w.pointerId))){if(s.current=w.clientX,c.current.trackPointerY===!0){const C=w.currentTarget.getBoundingClientRect();w.currentTarget.style.setProperty("--dsc-handle-y",`${w.clientY-C.top}px`)}u.current??=requestAnimationFrame(()=>{u.current=null,c.current.onDrag(m(s.current))})}},[]),v=Y.useCallback(w=>{if(!a.current)return;const C=w.clientX!==n.current,E=m(w.clientX);p(w),C&&c.current.onCommit(E)},[]),b=Y.useCallback(w=>{a.current&&(p(w),c.current.onDrag(c.current.getBase()))},[]);return{onPointerDown:g,onPointerMove:_,onPointerUp:v,onPointerCancel:b}}function lh(e,t,n=""){if(e==="")return"";const s=e.replace(/\\/g,"/");if(t!==""){const a=`${t.replace(/\\/g,"/").replace(/\/+$/,"")}/`,u=s.toLowerCase(),c=a.toLowerCase();if(u===c.slice(0,-1))return".";if(u.startsWith(c))return s.slice(a.length)}if(n!==""){const a=`${n.replace(/\\/g,"/").replace(/\/+$/,"")}/`,u=s.toLowerCase(),c=a.toLowerCase();if(u===c.slice(0,-1))return"~";if(u.startsWith(c))return`~/${s.slice(a.length)}`}return s}function U6(e){const t=e.split(/[\\/]/);return t[t.length-1]??e}const P1=50;function V6({base64:e}){const[t,n]=Y.useState([]),[s,a]=Y.useState(0),[u,c]=Y.useState(""),f=Y.useRef(!1);return Y.useEffect(()=>{if(f.current)return;f.current=!0;let m=!0;return(async()=>{const[{getDocument:p,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 v=Uint8Array.from(atob(e),C=>C.charCodeAt(0)),b=await p({data:v}).promise;if(!m)return;a(b.numPages);const w=Math.min(b.numPages,P1);for(let C=1;C<=w;C+=1){const E=await b.getPage(C),D=E.getViewport({scale:1.5}),K=document.createElement("canvas");K.width=Math.ceil(D.width),K.height=Math.ceil(D.height);const V=K.getContext("2d");if(await E.render({canvas:K,canvasContext:V,viewport:D}).promise,!m)return;const Z=K.toDataURL("image/png");n(se=>[...se,Z])}})().catch(p=>{m&&c(p instanceof Error?p.message:String(p))}),()=>{m=!1}},[e]),u!==""?y.jsx("div",{className:"file-preview-empty",children:`PDF 解析失败:${u}`}):y.jsxs("div",{className:"file-pdf",children:[t.length===0&&y.jsx("div",{className:"file-preview-empty",children:"渲染中…"}),t.map((m,p)=>y.jsx("img",{className:"file-pdf-page",src:m,alt:`第 ${p+1} 页`},p)),s>P1&&y.jsxs("div",{className:"tree-note","data-tree-note":"truncated",children:["共 ",s," 页,仅渲染前 ",P1," 页"]})]})}var gm=L4();const hA=Jl(gm),fA=vh({__proto__:null,default:hA},[gm]),F1=4;function vm(e){const{value:t,options:n,onPick:s,className:a,disabled:u=!1,ariaLabel:c,displayLabel:f}=e,[m,p]=Y.useState(!1),[g,_]=Y.useState(0),v=Y.useRef(null),b=Y.useRef(null),[w,C]=Y.useState(null),E=Y.useId(),D=n.find(T=>T.value===t),K=f??D?.label??"",V=(T=!0)=>{p(!1),T&&v.current?.focus()},Z=()=>{if(u||n.length===0)return;const T=Math.max(0,n.findIndex($=>$.value===t));_(T),p(!0)};Y.useLayoutEffect(()=>{if(!m){C(null);return}const T=v.current,$=b.current;if(T===null||$===null)return;const ae=T.getBoundingClientRect(),N=$.offsetHeight,W=ae.bottom+F1+N<=window.innerHeight?ae.bottom+F1:Math.max(4,ae.top-F1-N);C({left:ae.left,top:W,width:ae.width})},[m]),Y.useEffect(()=>{if(!m)return;const T=ae=>{const N=ae.target instanceof Node?ae.target:null;N!==null&&(b.current?.contains(N)===!0||v.current?.contains(N)===!0)||p(!1)},$=ae=>{b.current?.contains(ae.target)!==!0&&p(!1)};return document.addEventListener("pointerdown",T,!0),document.addEventListener("wheel",$,!0),()=>{document.removeEventListener("pointerdown",T,!0),document.removeEventListener("wheel",$,!0)}},[m]);const se=T=>{T.value!==t&&s(T.value),V()},z=T=>{if(!m){(T.key==="ArrowDown"||T.key==="ArrowUp"||T.key==="Enter"||T.key===" ")&&(T.preventDefault(),Z());return}const $=n.length-1;switch(T.key){case"ArrowDown":T.preventDefault(),_(ae=>Math.min($,ae+1));break;case"ArrowUp":T.preventDefault(),_(ae=>Math.max(0,ae-1));break;case"Home":T.preventDefault(),_(0);break;case"End":T.preventDefault(),_($);break;case"Enter":T.preventDefault(),n[g]!==void 0&&se(n[g]);break;case"Escape":T.stopPropagation(),V();break;case"Tab":V(!1);break}};return Y.useEffect(()=>{m&&b.current?.querySelector('[data-active="true"]')?.scrollIntoView({block:"nearest"})},[g,m]),y.jsxs(y.Fragment,{children:[y.jsxs("button",{ref:v,type:"button",className:`select-trigger${a!==void 0?` ${a}`:""}`,disabled:u,role:"combobox","aria-expanded":m,"aria-haspopup":"listbox","aria-controls":m?E:void 0,"aria-activedescendant":m?`${E}-${String(g)}`:void 0,"aria-label":c,"data-tip":K,onClick:()=>m?V():Z(),onKeyDown:z,children:[y.jsx("span",{className:"select-value",children:K}),y.jsx(vp,{size:14,className:"select-chevron"})]}),m&&gm.createPortal(y.jsx("div",{ref:b,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((T,$)=>{const ae=T.value===t;return y.jsxs("button",{type:"button",id:`${E}-${String($)}`,role:"option",className:"select-opt","data-selected":ae||void 0,"data-active":$===g||void 0,"aria-selected":ae,onPointerEnter:()=>_($),onClick:()=>se(T),children:[y.jsx("span",{className:"select-opt-label",children:T.label}),ae&&y.jsx(yp,{size:14,className:"select-opt-check"})]},T.value)})}),document.body)]})}const v0=500,y0=100;function ah({message:e}){return y.jsx("div",{className:"file-preview-empty",children:e})}function dA(e){const t=e.length>v0||e.some(u=>u.length>y0),n=e.slice(0,v0).map(u=>u.slice(0,y0)),[s,...a]=n;return{head:s,body:a,truncated:t}}function q6({rows:e,lead:t}){const{head:n,body:s,truncated:a}=dA(e);return y.jsxs("div",{className:"file-table-wrap",children:[t,a&&y.jsxs("div",{className:"tree-note","data-tree-note":"truncated",children:["表格较大,仅显示前 ",v0," 行 × ",y0," 列"]}),y.jsxs("table",{className:"file-table",children:[n!==void 0&&y.jsx("thead",{children:y.jsx("tr",{children:n.map((u,c)=>y.jsx("th",{children:u},c))})}),y.jsx("tbody",{children:s.map((u,c)=>y.jsx("tr",{children:u.map((f,m)=>y.jsx("td",{children:f},m))},c))})]})]})}function Y6({text:e,path:t}){const[n,s]=Y.useState(null),[a,u]=Y.useState("");return Y.useEffect(()=>{let c=!0;return s(null),u(""),ge(()=>import("./chunk-BajyYBss.js").then(f=>f.p),[],import.meta.url).then(f=>{const m=f.parse(e.replace(/\r\n/g,`
54
- `),{delimiter:t.toLowerCase().endsWith(".tsv")?" ":void 0});c&&s(m.data)}).catch(f=>{c&&u(f instanceof Error?f.message:String(f))}),()=>{c=!1}},[e,t]),a!==""?y.jsx(ah,{message:`解析失败:${a}`}):n===null?y.jsx(ah,{message:"解析中…"}):y.jsx(q6,{rows:n})}function $6({base64:e}){const[t,n]=Y.useState(null),[s,a]=Y.useState(0),[u,c]=Y.useState([]),[f,m]=Y.useState(""),p=Y.useRef(null),g=b=>{ge(()=>import("./chunk-YQ4lDkt_.js"),[],import.meta.url).then(w=>{const C=p.current,E=C?.Sheets[C.SheetNames[b]??""];E!==void 0&&c(w.utils.sheet_to_json(E,{header:1,raw:!1,defval:""}).map(D=>D.map(K=>String(K??""))))})};Y.useEffect(()=>{let b=!0;n(null),m(""),a(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"});b&&(p.current=E,n(E.SheetNames),g(0))}).catch(C=>{b&&m(C instanceof Error?C.message:String(C))}),()=>{b=!1}},[e]);const _=b=>{a(b),m(""),g(b)};if(f!=="")return y.jsx(ah,{message:`解析失败:${f}`});if(t===null)return y.jsx(ah,{message:"解析中…"});const v=t.length>1?y.jsx("div",{className:"file-sheets",children:t.map((b,w)=>y.jsx("button",{type:"button",className:`file-sheet${w===s?" on":""}`,onClick:()=>_(w),children:b},b))}):void 0;return y.jsx(q6,{rows:u,lead:v})}const pA="--dsc-thread-col-start",mA="--dsc-thread-col-end";function ym(e){const t=_=>{const v=n.current?.parentElement??null;if(v===null)return Wr;const b=Math.max(Wr,v.clientWidth-om-fm());if(_===null){const w=v.querySelector(".chat-inner");return Math.min(Math.max(w?.offsetWidth??Wr,Wr),b)}return Math.min(Math.max(_,Wr),b)},n=Y.useRef(null),s=Y.useCallback(()=>n.current?.parentElement??null,[]),a=Y.useCallback(()=>{const _=s();if(_===null)return;const v=_.querySelector(".chat-inner");if(v===null)return;const b=_.getBoundingClientRect(),w=v.getBoundingClientRect();_.style.setProperty(pA,`${String(w.left-b.left)}px`),_.style.setProperty(mA,`${String(w.right-b.left)}px`)},[s]);Y.useLayoutEffect(()=>{a();const _=s();if(_===null)return;const v=new ResizeObserver(a);v.observe(_);const b=_.querySelector(".chat-inner");b!==null&&v.observe(b);const w=new MutationObserver(a);return w.observe(document.documentElement,{attributeFilter:["style"],attributes:!0}),window.addEventListener("resize",a),()=>{v.disconnect(),w.disconnect(),window.removeEventListener("resize",a)}},[a,s,e.width]);const u=Y.useCallback(()=>t(e.width),[e.width]),c=Y.useCallback(_=>t(_),[e.width]),f=Y.useCallback(_=>{On("--dsc-thread-max",`${_}px`),a()},[a]),m={getBase:u,clamp:c,onDrag:f,trackPointerY:!0},p=Gl({...m,sign:-2,onCommit:e.onCommit}),g=Gl({...m,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:p.onPointerDown,onPointerMove:p.onPointerMove,onPointerUp:p.onPointerUp,onPointerCancel:p.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 K6(e){if(e===void 0)return null;const t=e.ts;return typeof t=="number"&&Number.isFinite(t)&&t>0?t:null}function W6(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 G6(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 X6(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,a=Math.floor(t/3600),u=c=>String(c).padStart(2,"0");return a>0?`${String(a)}时${u(s)}分${u(n)}秒`:s>0?`${String(s)}分${String(n)}秒`:`${String(n)}秒`}function Z6(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=f=>String(f).padStart(2,"0"),a=n%60,u=Math.floor(n/60)%60,c=Math.floor(n/3600);return c>0?`${String(c)}h${s(u)}m`:`${String(u)}m${s(a)}s`}const _A=2200,gA=6e3,vA=4,yA=200,SA='<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>',bA='<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 nr=null;function wA(){return nr!==null&&nr.isConnected||(nr=document.createElement("div"),nr.className="dsc-toasts",nr.setAttribute("role","status"),nr.setAttribute("aria-live","polite"),document.body.appendChild(nr)),nr}function S5(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(),yA))}function Q6(e,t,n,s){const a=wA();for(;a.children.length>=vA;){const f=a.firstElementChild;if(f===null||f.dataset.tone==="danger"&&e==="success")break;f.remove()}const u=document.createElement("div");u.className="dsc-toast",u.dataset.tone=e,u.innerHTML=`${e==="success"?SA:bA}<span class="dsc-toast__text"></span>`;const c=u.querySelector(".dsc-toast__text");if(c!==null&&(c.textContent=t),s){const f=document.createElement("button");f.className="dsc-toast__close",f.type="button",f.setAttribute("data-tip","关闭这条提示"),f.setAttribute("aria-label","关闭这条提示"),f.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>',f.addEventListener("click",()=>S5(u)),u.appendChild(f)}a.appendChild(u),window.setTimeout(()=>S5(u),n)}function J6(e){Q6("success",e,_A,!1)}function Sm(e){Q6("danger",e,gA,!0)}function b5(e){const t=e>=100?e.toFixed(0):e.toFixed(1);return t.endsWith(".0")?t.slice(0,-2):t}function eS(e){return!Number.isFinite(e)||e<=0?"0":e<1e3?String(Math.round(e)):e<1e6?`${b5(e/1e3)}K`:`${b5(e/1e6)}M`}const bm={write:["content"],edit:["old","new"],str_replace_editor:["file_text","old_str","new_str"],apply_patch:["patch","content"]};function xA(e){return e.replace(/\s+/g," ").trim()}function tS(e,t){const n=bm[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 a=[],u=[];for(const[c,f]of Object.entries(s)){if(n.includes(c)){u.push(c);continue}const m=typeof f=="string"?f:JSON.stringify(f)??String(f);a.push({key:c,value:xA(m)})}return{mutating:!0,fields:a,omitted:u}}const wm={bash:["command","description"],shell:["command","description"],read:["file_path","path"],read_file:["file_path","path"],write:["file_path","path"],edit:["file_path","path"],glob:["pattern","path"],grep:["pattern","path"],webfetch:["url"],fetch:["url"],task:["description","prompt"]},xm=["file_path","path","command","pattern","query","url","description"];function To(e,t){const n=e.replace(/\s+/g," ").trim(),s=Array.from(n);return s.length>t?`${s.slice(0,t).join("")}…`:n}function Cm(e){try{return new URL(e).host}catch{return e}}function iS(e,t){let n;try{n=JSON.parse(t)}catch{return To(t,72)}if(typeof n!="object"||n===null)return"";const s=n,a=wm[e]??xm,u=[];for(const c of a){const f=s[c];if(!(typeof f!="string"||f==="")&&(u.push(To(c==="url"?Cm(f):f,48)),u.length===2))break}return To(u.join(" · "),72)}const nS={preparing:"准备中",running:"进行中",done:"完成",failed:"失败",rejected:"被拒"},Em={bash:{verb:"跑",Icon:Hs},shell:{verb:"跑",Icon:Hs},read:{verb:"读",Icon:js},read_file:{verb:"读",Icon:js},write:{verb:"写",Icon:Gc},edit:{verb:"改",Icon:Gc},glob:{verb:"搜",Icon:Yl},grep:{verb:"搜",Icon:Yl},webfetch:{verb:"取",Icon:Yl},fetch:{verb:"取",Icon:Yl},task:{verb:"派",Icon:bp}},km=xp;function rS(e){const t=Em[e];return t!==void 0?{Icon:t.Icon,known:!0,base:t.verb}:{Icon:km,known:!1,base:"调用"}}function sS(e,t){return t==="running"?`正在${e}`:t==="preparing"?`准备${e}`:`${e}了`}function lS(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}const CA=Object.freeze(Object.defineProperty({__proto__:null,CODE_FILE_ARTWORK:Rp,CODE_FILE_ICON_ID_TOKEN:Op,CODE_FILE_TYPES:Lp,COMPLETION_SOUND_VARIANTS:Mp,CodeFileIcon:Hp,CodeView:My,CsvView:Y6,DEFAULT_FIELDS:xm,DOCK_DEFAULT_WIDTH:hm,DOCK_MAX_WIDTH:cm,DOCK_MIN_WIDTH:um,DiffRows:Ap,FileIcon:Eh,FileTypeIcon:jp,IconActivity:by,IconArchive:py,IconArchiveOff:yy,IconArrowRight:q4,IconArrowUp:V4,IconBolt:wp,IconBrain:sy,IconBranch:Sh,IconCalendar:vy,IconChart:_y,IconCheck:yp,IconChevronDown:vp,IconChevronLeft:Wc,IconChevronRight:F4,IconChevronUp:U4,IconCircle:J4,IconClock:G4,IconClose:oy,IconCode:xp,IconCoins:ty,IconCopy:K4,IconDatabase:wy,IconDiff:cy,IconEdit:Gc,IconExpand:Y4,IconFlatList:gy,IconFolder:js,IconFolderOpen:P4,IconGear:Sp,IconGlobe:Ro,IconInfo:ly,IconKey:hy,IconLayers:ny,IconMore:fy,IconNewChat:ky,IconPackage:ry,IconPhone:iy,IconPin:my,IconPlus:gp,IconPuzzle:yh,IconQueue:Sy,IconRefresh:Z4,IconRestart:Q4,IconSearch:Yl,IconShield:X4,IconSidebar:zs,IconSort:dy,IconSpark:bp,IconStop:$4,IconStore:ay,IconSwap:W4,IconTarget:ey,IconTerminal:Hs,IconThumbDown:Cy,IconThumbUp:xy,IconTrash:uy,IconTree:Cp,IconTriangleRightFill:Ey,KNOWN_TOOLS:Em,MUTATION_CONTENT_FIELDS:bm,MarkdownView:F6,NATIVE_UNAVAILABLE:lm,PANEL_KEYS:Ci,PdfView:V6,SHIKI_LANG_BY_EXT:Ep,SIDEBAR_MAX:sh,SIDEBAR_MIN:rh,STORED_MAX:dm,SUMMARY_FIELDS:wm,Select:vm,THREAD_EDGE_BUDGET:om,THREAD_MIN:Wr,TOOL_STATUS_TEXT:nS,Text:Ty,ThreadResizer:ym,UNKNOWN_TOOL_ICON:km,XlsxView:$6,baseNameOf:U6,basename:Vo,classifyCodeFileType:Bp,classifyFileType:Ch,confirmAction:Ry,displayPathOf:lh,entryTs:K6,fileExtension:zp,fileIconName:By,findLast:Dy,formatClock:W6,formatClockSeconds:G6,formatDuration:X6,formatTokens:eS,formatTraceDuration:Z6,getHighlighter:Uo,getHostNative:Vs,highlightLines:Tp,highlightToHtml:xh,isCodeFileType:Np,langForPath:bh,loadLang:wh,matchTool:rS,oneLine:To,playCompletionSound:Oy,prettyJson:lS,readCssColor:Zc,readCssSolidColor:zy,readCssValue:Ly,readRightRailPx:fm,readRootPx:Wl,readSidebarDefaultPx:_m,readStoredFlag:pm,readStoredPx:Kl,setRootVar:On,shortUrl:Cm,toHexColor:Dp,toastErr:Sm,toastOk:J6,toolArgFields:tS,toolSummary:iS,toolVerb:sS,useHostNative:am,useHoverDelay:jy,useWidthDrag:Gl,writeStoredFlag:mm,writeStoredPx:Xr},Symbol.toStringTag,{value:"Module"})),EA=["files","git"],kA=10,aS=.2,oS=.8;let w5=0;function uS(){return w5+=1,`t${Date.now().toString(36)}${w5.toString(36)}${Math.floor(Math.random()*1296).toString(36)}`}function S0(){return`p${uS()}`}function sn(e,t,n){const s=n===void 0||n===""?uS():n;return t===void 0?{id:s,kind:e}:{id:s,kind:e,path:t}}function Tm(){const e=sn("guide"),t={id:S0(),tabs:[e],activeTabId:e.id};return{panes:[t],activePaneId:t.id,fraction:.5,expanded:!1,mode:"push"}}function qs(e,t){return e.panes.find(n=>n.id===t)}function ts(e){return qs(e,e.activePaneId)??e.panes[0]}function cS(e){return!e.tabs.some(t=>t.kind==="guide")}function Mm(e,t,n){const s=qs(e,n?.paneId??e.activePaneId)??ts(e);if(EA.includes(t)){const f=e.panes.flatMap(m=>m.tabs).find(m=>m.kind===t);if(f!==void 0)return ar(e,f.id)}if(n?.replaceGuide===!0){const f=s.tabs.findIndex(g=>g.kind==="guide");if(f===-1)return e;const m=sn(t),p=s.tabs.map((g,_)=>_===f?m:g);return fi(e,s.id,{...s,tabs:p,activeTabId:m.id})}const a=s.tabs.find(f=>f.kind==="guide");if(t==="guide"&&a!==void 0)return ar(e,a.id);const u=sn(t),c=[...s.tabs,u];return fi(e,s.id,{...s,tabs:c,activeTabId:u.id})}function hS(e,t,n){const s=n===void 0?{}:{line:n},a=e.panes.flatMap(p=>p.tabs).find(p=>p.kind==="preview"&&p.path===t);if(a!==void 0){const p=ar(e,a.id);return n===void 0?p:{...p,panes:p.panes.map(g=>({...g,tabs:g.tabs.map(_=>_.id===a.id?{..._,line:n}:_)}))}}const u=ts(e);let c=[...u.tabs];const f=c.filter(p=>p.kind==="preview");if(f.length>=kA){const p=f[0];c=c.filter(g=>g.id!==p.id)}const m={...sn("preview",t),...s};return c=[...c,m],fi(e,u.id,{...u,tabs:c,activeTabId:m.id})}function fS(e,t){const n=e.panes.flatMap(u=>u.tabs).find(u=>u.kind==="patch"&&u.path===t);if(n!==void 0)return ar(e,n.id);const s=ts(e),a=sn("patch",t);return fi(e,s.id,{...s,tabs:[...s.tabs,a],activeTabId:a.id})}function dS(e,t,n){const s=e.panes.flatMap(c=>c.tabs).find(c=>c.kind==="subagent"&&c.path===t);if(s!==void 0){const c=ar(e,s.id);return n===void 0?c:{...c,panes:c.panes.map(f=>({...f,tabs:f.tabs.map(m=>m.id===s.id?{...m,label:n}:m)}))}}const a=ts(e),u={...sn("subagent",t),...n===void 0?{}:{label:n}};return fi(e,a.id,{...a,tabs:[...a.tabs,u],activeTabId:u.id})}function pS(e,t,n){const s=e.panes.flatMap(c=>c.tabs).find(c=>c.kind==="work-output"&&c.path===t);if(s!==void 0){const c=ar(e,s.id);return n===void 0?c:{...c,panes:c.panes.map(f=>({...f,tabs:f.tabs.map(m=>m.id===s.id?{...m,label:n}:m)}))}}const a=ts(e),u={...sn("work-output",t),...n===void 0?{}:{label:n}};return fi(e,a.id,{...a,tabs:[...a.tabs,u],activeTabId:u.id})}function mS(e,t,n,s){if(s!==void 0&&s!==""){const c=e.panes.flatMap(f=>f.tabs).find(f=>f.id===s);if(c!==void 0)return ar(e,c.id)}const a=ts(e),u={...sn("browser",t===void 0||t===""?void 0:t,s),...n===void 0||n===""?{}:{label:n}};return fi(e,a.id,{...a,tabs:[...a.tabs,u],activeTabId:u.id})}function _S(e,t,n){const s=e.panes.find(m=>m.tabs.some(p=>p.id===t));if(s===void 0)return e;const a=s.tabs.find(m=>m.id===t),u=n.label===void 0||n.label===""?a.label:n.label,c=n.path===void 0||n.path===""?a.path:n.path;if(u===a.label&&c===a.path)return e;const f={...a,...u===void 0?{}:{label:u},...c===void 0?{}:{path:c}};return fi(e,s.id,{...s,tabs:s.tabs.map(m=>m.id===t?f:m)})}function TA(e,t){return e.panes.find(n=>n.tabs.some(s=>s.id===t))?.id}function fi(e,t,n){return{...e,panes:e.panes.map(s=>s.id===t?n:s)}}function gS(e,t){const n=e.panes.find(c=>c.tabs.some(f=>f.id===t));if(n===void 0)return e;const s=n.tabs.findIndex(c=>c.id===t),a=n.tabs.filter(c=>c.id!==t);if(a.length===0){const c=sn("guide");return fi(e,n.id,{...n,tabs:[c],activeTabId:c.id})}const u=n.activeTabId===t?(a[s]??a[a.length-1]).id:n.activeTabId;return fi(e,n.id,{...n,tabs:a,activeTabId:u})}function ar(e,t){const n=TA(e,t);return n===void 0?e:{...fi({...e,activePaneId:n},n,{...qs(e,n),activeTabId:t})}}function vS(e,t){return qs(e,t)===void 0?e:{...e,activePaneId:t}}function yS(e,t){if(e.panes.length>=2)return e;const n=qs(e,t??e.activePaneId)??ts(e);if(n.tabs.length<=1&&n.tabs[0]?.kind==="guide")return e;const s=n.tabs.filter(f=>f.id!==n.activeTabId),a=n.tabs.find(f=>f.id===n.activeTabId)??n.tabs[0];if(s.length===0){const f=sn("guide"),m={...n,tabs:[f],activeTabId:f.id},p={id:S0(),tabs:[a],activeTabId:a.id};return{...e,panes:[m,p],activePaneId:p.id}}const u={...n,tabs:s,activeTabId:s[s.length-1].id},c={id:S0(),tabs:[a],activeTabId:a.id};return{...e,panes:[u,c],activePaneId:c.id}}function SS(e){if(e.panes.length<2)return e;const[t,n]=e.panes,s=t.tabs.some(c=>c.kind==="guide")?n.tabs.filter(c=>c.kind!=="guide"):n.tabs,a=[...t.tabs,...s],u={id:t.id,tabs:a,activeTabId:a.some(c=>c.id===t.activeTabId)?t.activeTabId:(a.find(c=>c.id===n.activeTabId)??a[0]).id};return{...e,panes:[u],activePaneId:u.id,fraction:.5}}function bS(e,t,n,s){const a=e.panes.find(_=>_.tabs.some(v=>v.id===t)),u=qs(e,n);if(a===void 0||u===void 0)return e;const c=a.tabs.find(_=>_.id===t);if(a.id===u.id){const _=a.tabs.filter(w=>w.id!==t),v=Math.max(0,Math.min(s??_.length,_.length)),b=[..._.slice(0,v),c,..._.slice(v)];return fi(e,u.id,{...u,tabs:b,activeTabId:t})}const f=a.tabs.filter(_=>_.id!==t),m=Math.max(0,Math.min(s??u.tabs.length,u.tabs.length)),p=[...u.tabs.slice(0,m),c,...u.tabs.slice(m)];let g=fi({...e,activePaneId:u.id},u.id,{...u,tabs:p,activeTabId:t});if(f.length===0){const _=sn("guide");g=fi(g,a.id,{...a,tabs:[_],activeTabId:_.id})}else g=fi(g,a.id,{...a,tabs:f,activeTabId:a.activeTabId===t?f[Math.max(0,a.tabs.findIndex(_=>_.id===t)-1)].id:a.activeTabId});return g}function $r(e,t){return{...e,expanded:t}}function wS(e){return{...e,mode:e.mode==="push"?"fullscreen":"push"}}function xS(e,t){return Number.isFinite(t)?{...e,fraction:Math.min(oS,Math.max(aS,t))}:e}const CS="dsc.dock.surfaces",x5=30;function MA(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 a=s;if(!Array.isArray(a.tabs)||a.tabs.length===0)return null;const u=[];for(const c of a.tabs){const f=c;if(typeof f?.id!="string"||typeof f?.kind!="string"||!["guide","terminal","browser","files","git","preview","patch","subagent","work-output"].includes(f.kind))return null;if(f.kind==="preview"){if(typeof f.path!="string"||f.path==="")return null;u.push({id:f.id,kind:"preview",path:f.path,...typeof f.line=="number"?{line:f.line}:{}})}else if(f.kind==="patch"){if(typeof f.path!="string"||f.path==="")return null;u.push({id:f.id,kind:"patch",path:f.path})}else if(f.kind==="subagent"){if(typeof f.path!="string"||f.path==="")return null;u.push({id:f.id,kind:"subagent",path:f.path,...typeof f.label=="string"&&f.label!==""?{label:f.label}:{}})}else if(f.kind==="work-output"){if(typeof f.path!="string"||f.path==="")return null;u.push({id:f.id,kind:"work-output",path:f.path,...typeof f.label=="string"&&f.label!==""?{label:f.label}:{}})}else f.kind==="browser"?u.push({id:f.id,kind:"browser",...typeof f.path=="string"&&f.path!==""?{path:f.path}:{},...typeof f.label=="string"&&f.label!==""?{label:f.label}:{}}):u.push({id:f.id,kind:f.kind})}if(typeof a.id!="string"||typeof a.activeTabId!="string"||!u.some(c=>c.id===a.activeTabId))return null;n.push({id:a.id,tabs:u,activeTabId:a.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(oS,Math.max(aS,t.fraction)):.5,expanded:t.expanded===!0,mode:t.mode==="fullscreen"?"fullscreen":"push"}}function ES(){try{const e=localStorage.getItem(CS);if(e===null)return{};const t=JSON.parse(e),n={};for(const[s,a]of Object.entries(t)){const u=MA(a);u!==null&&(n[s]=u)}return n}catch{return{}}}function kS(e){try{const t=Object.keys(e),n=t.length<=x5?e:Object.fromEntries(t.slice(t.length-x5).map(s=>[s,e[s]]));localStorage.setItem(CS,JSON.stringify(n))}catch{}}let Mo=ES(),b0="",Qr=Mo[""]??Tm();const w0=new Set;function Xl(){for(const e of w0)e()}function TS(e){e!==b0&&(b0=e,Qr=Mo[e]??Tm(),Xl())}function Jt(e){const t=e(Qr);t!==Qr&&(Qr=t,Mo={...Mo,[b0]:t},kS(Mo),Xl())}function ia(e){return w0.add(e),()=>{w0.delete(e)}}function oh(){return Qr}const Nn={openTab:(e,t)=>{Jt(n=>Mm(n,e,t))},openPreview:(e,t)=>{Jt(n=>$r(hS(n,e,t),!0))},openBrowserTab:(e,t,n)=>{Jt(s=>$r(mS(s,e,t,n),!0))},setTabInfo:(e,t)=>{Jt(n=>_S(n,e,t))},openPatch:e=>{Jt(t=>$r(fS(t,e),!0))},openSubagent:(e,t)=>{Jt(n=>$r(dS(n,e,t),!0))},openWorkOutput:(e,t)=>{Jt(n=>$r(pS(n,e,t),!0))},closeTab:e=>{Jt(t=>gS(t,e))},focusTab:e=>{Jt(t=>ar(t,e))},focusPane:e=>{Jt(t=>vS(t,e))},splitPane:e=>{Jt(t=>yS(t,e))},unsplit:()=>{Jt(e=>SS(e))},placeTab:(e,t)=>{Jt(n=>bS(n,e,t))},setExpanded:e=>{Jt(t=>$r(t,e))},toggleMode:()=>{Jt(e=>wS(e))},setFraction:e=>{Jt(t=>xS(t,e))}};function Do(e){Jt(t=>$r(Mm(t,e,{replaceGuide:!0}),!0))}function Dm(e,t){Nn.openBrowserTab(e,void 0,t)}const uh=new Map;let MS=[];function C5(){MS=[...uh.values()]}function DS(e){return uh.set(e.kind,e),C5(),Xl(),()=>{uh.delete(e.kind),C5(),Xl()}}function DA(){return MS}function AS(e){return uh.get(e)}function OS(e){if(e.patch!==void 0){RS.set(e.path,e.patch),Xl(),Nn.openPatch(e.path);return}Nn.openPreview(e.path)}const RS=new Map;function LS(e){return Y.useSyncExternalStore(ia,()=>RS.get(e)??null,()=>null)}function zS(e){Nn.openSubagent(e.path,e.label)}function NS(e){Nn.openWorkOutput(e.id,e.label)}let BS=null;function jS(){return BS}function Am(e){BS=e,Xl()}function Ko(){return Y.useSyncExternalStore(ia,oh,oh)}function Oh(){return Y.useSyncExternalStore(ia,jS,()=>null)}function HS(){return Y.useSyncExternalStore(ia,()=>{const e=Qr.panes.find(n=>n.id===Qr.activePaneId)??Qr.panes[0],t=e?.tabs.find(n=>n.id===e.activeTabId);return t?.kind==="preview"&&t.path!==void 0?t.path:null},()=>null)}const E5=768,AA={guide:{title:"开始",icon:Ro},terminal:{title:"终端",icon:Hs},browser:{title:"浏览器",icon:Ro},files:{title:"文件",icon:js},git:{title:"Git",icon:Sh},subagent:{title:"子智能体",icon:Cp,titleFromPath:!0},"work-output":{title:"输出",icon:Hs}},OA=[{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"}];function IS(e){const t=Ko(),n=Nn,[s,a]=Y.useState(()=>window.innerWidth<E5);Y.useEffect(()=>{const v=()=>a(window.innerWidth<E5);return window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)},[]);const u=s||t.mode==="fullscreen",[c,f]=Y.useState(null),m=Y.useCallback((v,b,w)=>{f(v===null?null:{tabId:v,x:b??0,y:w??0})},[]),p=v=>{v.preventDefault();const b=v.clientX,w=e.width,C=D=>{e.onResize(Math.min(820,Math.max(300,w-(D.clientX-b))))},E=()=>{document.body.classList.remove("resizing"),window.removeEventListener("mousemove",C),window.removeEventListener("mouseup",E)};document.body.classList.add("resizing"),window.addEventListener("mousemove",C),window.addEventListener("mouseup",E)},g=Y.useRef(null),_=v=>{v.preventDefault();const b=g.current;if(b===null)return;const w=E=>{const D=b.getBoundingClientRect();D.width!==0&&n.setFraction((E.clientX-D.left)/D.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${u?" mode-fullscreen":""}${t.expanded?"":" collapsed"}`,style:u?void 0:{width:e.width,marginRight:t.expanded?void 0:-e.width},"aria-hidden":!t.expanded||void 0,children:[!u&&y.jsx("div",{className:"dock-resizer","data-tip":"拖拽调整宽度,双击复位",onMouseDown:p,onDoubleClick:()=>e.onResize(420)}),!u&&y.jsx("div",{className:"caption-bar","aria-hidden":"true"}),y.jsxs("div",{className:"dock-panes",ref:g,children:[t.panes.map((v,b)=>y.jsx(RA,{surface:t,pane:v,active:v.id===t.activePaneId,actions:n,fraction:t.fraction,first:b===0,chrome:b===t.panes.length-1,menuTab:c,setMenuTab:m},v.id)),t.panes.length===2&&y.jsx("div",{className:"dock-split","data-tip":"拖拽调整分栏,双击收回分栏",onMouseDown:_,onDoubleClick:n.unsplit})]}),c!==null&&y.jsx("div",{className:"menu-backdrop",onClick:()=>f(null)}),c!==null&&y.jsxs("div",{className:"row-menu dock-tab-menu",style:{position:"fixed",left:Math.min(c.x,window.innerWidth-140),top:Math.min(c.y,window.innerHeight-120)},onClick:v=>v.stopPropagation(),children:[y.jsx("button",{className:"menu-item",onClick:()=>{n.splitPane(c.tabId),f(null)},children:"向右分栏"}),y.jsx("button",{className:"menu-item",onClick:()=>{n.unsplit(),f(null)},children:"收回分栏"}),y.jsx("div",{className:"menu-sep"}),y.jsx("button",{className:"menu-item",onClick:()=>{n.closeTab(c.tabId),f(null)},children:"关闭页签"})]})]})}function RA(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:a=>a.preventDefault(),onDrop:a=>{const u=a.dataTransfer.getData("text/plain");u!==""&&s.placeTab(u,n.id)},children:[y.jsxs("div",{className:"dock-strip",children:[n.tabs.map(a=>y.jsx(zA,{tab:a,on:e.active&&n.activeTabId===a.id,actions:s,onMenu:e.setMenuTab,menuOpen:e.menuTab?.tabId===a.id},a.id)),cS(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(HA,{}):y.jsx(jA,{})}),y.jsx("button",{className:"dock-chrome-btn","data-tip":"收起侧边栏","aria-label":"收起侧边栏",onClick:()=>s.setExpanded(!1),children:y.jsx(zs,{size:15})})]})]}),y.jsx("div",{className:"dock-pane-body",children:n.tabs.map(a=>y.jsx(LA,{tab:a,active:e.active&&n.activeTabId===a.id,expanded:t.expanded,actions:s},a.id))})]})}function LA(e){const{tab:t,active:n,expanded:s}=e;if(t.kind==="guide")return n?y.jsx(NA,{actions:e.actions}):null;const a=AS(t.kind);return a===void 0?n&&s?y.jsx("div",{className:"dock-tab-body",children:y.jsxs("div",{className:"trace-empty",children:["这块面板的界面没有装上(kind:",t.kind,")。"]})}):null:a.keepMounted===!0?y.jsx("div",{className:"dock-tab-body",style:n?void 0:{display:"none"},children:y.jsx(a.component,{tab:t,active:n,expanded:s})}):n&&s?y.jsx("div",{className:"dock-tab-body",children:y.jsx(a.component,{tab:t,active:n,expanded:s})}):null}function zA(e){const t=e.tab.kind==="preview"||e.tab.kind==="patch"?void 0:AA[e.tab.kind],n=e.tab.label!==void 0&&e.tab.label!==""?e.tab.label:t===void 0||t.titleFromPath===!0?IA(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(Eh,{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 NA(e){return y.jsxs("div",{className:"dock-guide",children:[y.jsx("span",{className:"dock-guide-hero","aria-hidden":"true",children:y.jsx(BA,{})}),y.jsx("div",{className:"dock-guide-cards",children:OA.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(js,{size:17}),t.kind==="terminal"&&y.jsx(Hs,{size:17}),t.kind==="browser"&&y.jsx(Ro,{size:17}),t.kind==="git"&&y.jsx(Sh,{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 BA(){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 jA(){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 HA(){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 IA(e){const t=e.split(/[\\/]/);return t[t.length-1]??e}const PA=Object.freeze(Object.defineProperty({__proto__:null,Dock:IS,activePane:ts,canAddTab:cS,closeTab:gS,defaultSurface:Tm,dockActions:Nn,dockReview:jS,dockSurface:oh,dockTabKinds:DA,dockTabMeta:AS,focusPane:vS,focusTab:ar,loadSurfaces:ES,makeTab:sn,openBrowserTab:mS,openDockBrowserTab:Dm,openDockTab:Do,openPatch:fS,openPreview:hS,openSubagent:dS,openTab:Mm,openWorkOutput:pS,paneOf:qs,placeTab:bS,registerDockTab:DS,saveSurfaces:kS,setDockPreview:OS,setDockReview:Am,setDockSession:TS,setDockSubagent:zS,setDockWorkOutput:NS,setExpanded:$r,setFraction:xS,setTabInfo:_S,splitPane:yS,subscribeDock:ia,toggleMode:wS,unsplitPane:SS,useActivePreviewPath:HS,useDockPatchSource:LS,useDockReview:Oh,useDockSurface:Ko},Symbol.toStringTag,{value:"Module"})),Tt={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"},x0={[Tt.header]:"list",[Tt.headerLead]:"list",[Tt.sidebar]:"list",[Tt.page]:"list",[Tt.main]:"list",[Tt.thread]:"list",[Tt.composer]:"list",[Tt.statusbar]:"list",[Tt.notice]:"single"},Zl=Object.freeze({});function en({slots:e,slot:t,owner:n}){const s=mp(e,t);return y.jsx(y.Fragment,{children:s.map(a=>y.jsx(PS,{slots:e,entry:a,owner:n??Zl},`${a.cell}|${a.id}|${String(a.priority)}|${String(a.seq)}`))})}function Om({slots:e,slot:t,owner:n}){mp(e,t);const s=e.elect(t,n);return s===null?null:y.jsx(PS,{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 PS({slots:e,entry:t,owner:n}){const s=t.component,a=Y.useCallback((m,p)=>{if(!t.children.includes(m))throw new zn(`条目 ${t.slot}/${t.id} 没有声明子槽「${m}」(声明过的:${t.children.length===0?"无":t.children.join("、")})`);return e.spec(m)==="chain"?y.jsx(Om,{slots:e,slot:m,owner:p??Zl}):y.jsx(en,{slots:e,slot:m,owner:p??Zl})},[e,t]),u=Y.useCallback((m,p,g)=>y.jsx(Rm,{slots:e,name:m,inputProps:p,selections:g?.slots,fallback:g?.fallback}),[e]),c=Y.useMemo(()=>({renderSlot:a,childSlots:t.children,renderFactorySlot:u}),[a,u,t.children]),f=I4(e,t.store);return y.jsx(FA,{slot:t.slot,id:t.id,onFault:m=>{e.reportFault(t,m)},children:y.jsx("div",{className:"slot-entry","data-slot":t.slot,"data-entry":t.id,"data-cell":t.cell,children:y.jsx(s,{...n,...c,...f})})})}class FA extends Y.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){if(t instanceof zn)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 UA=Object.freeze({}),k5=Y.createContext(new Set);function VA(e,t){const n=Y.useCallback(a=>e.subscribeFactory(t,a),[e,t]),s=Y.useCallback(()=>e.factoryVersion(t),[e,t]);return Y.useSyncExternalStore(n,s,s)}function Rm({slots:e,name:t,inputProps:n,selections:s,fallback:a}){const u=VA(e,t),c=e.factory(t),f=Y.useContext(k5),m=Y.useMemo(()=>new Set(f).add(t),[f,t]);if(c===void 0)return y.jsx(y.Fragment,{children:a??null});if(f.has(t))throw new zn(`装配错误:Factory「${t}」递归渲染(定义在自己的 occurrence 里又出现)`);for(const p of Object.keys(s??{}))if(!c.slots.includes(p))throw new zn(`装配错误:Factory「${t}」没有声明局部位置「${p}」(声明过的:${c.slots.length===0?"无":c.slots.join("、")})`);return y.jsx(FS,{name:t,id:t,onFault:p=>{e.reportFactoryFault(t,t,p)},children:y.jsx(k5.Provider,{value:m,children:y.jsx(qA,{slots:e,definition:c,inputProps:n??Zl,selections:s??UA})})},`${t}:${String(u)}`)}function qA({slots:e,definition:t,inputProps:n,selections:s}){const a=Y.useMemo(()=>{const m=(g,_)=>{if(!t.children.includes(g))throw new zn(`装配错误:Factory「${t.name}」没有声明子槽「${g}」(声明过的:${t.children.length===0?"无":t.children.join("、")})`);return e.spec(g)==="chain"?y.jsx(Om,{slots:e,slot:g,owner:_??Zl}):y.jsx(en,{slots:e,slot:g,owner:_??Zl})},p=(g,_,v)=>y.jsx(Rm,{slots:e,name:g,inputProps:_,selections:v?.slots,fallback:v?.fallback});return{renderSlot:m,childSlots:t.children,renderFactorySlot:p}},[e,t]),u=I4(e,t.store),c=Y.useCallback((m,p)=>{if(!t.slots.includes(m))throw new zn(`装配错误:Factory「${t.name}」没有声明局部位置「${m}」(声明过的:${t.slots.length===0?"无":t.slots.join("、")})`);const g=s[m]??p;return Y.useMemo(()=>v=>y.jsx(FS,{name:t.name,id:m,onFault:b=>{e.reportFactoryFault(t.name,m,b)},children:y.jsx(g,{...a,...u,...v})}),[g,a,u,t,m,e])},[t,s,a,u,e]),f=t.component;return y.jsx(f,{...a,...u,...n,useFactorySlot:c})}class FS extends Y.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){if(t instanceof zn)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 YA=Object.freeze(Object.defineProperty({__proto__:null,ChainOutlet:Om,FactoryOutlet:Rm,SHELL_SLOTS:x0,SLOT:Tt,SlotOutlet:en,useSlot:mp,useSlotFaults:j4},Symbol.toStringTag,{value:"Module"}));let C0=null;const E0=new Set;function US(){return C0}function zo(e){if(e!==C0){C0=e;for(const t of E0)t()}}function VS(e){return E0.add(e),()=>{E0.delete(e)}}function Lm(){return Y.useSyncExternalStore(VS,US,()=>null)}let No="chat",Bo=null;const k0=new Set;function zm(){for(const e of k0)e()}function qS(){return No}function Fc(e){e!==No&&(No=e,zm())}function $A(e){const t=e??null;No==="trace"&&Bo===t||(No="trace",Bo=t,zm())}function YS(){return Bo}function KA(){Bo!==null&&(Bo=null,zm())}function Nm(e){return k0.add(e),()=>{k0.delete(e)}}function $S(){return Y.useSyncExternalStore(Nm,qS,()=>"chat")}function WA(){return Y.useSyncExternalStore(Nm,YS,()=>null)}function GA(e){return e===void 0||e<=0?"":e<1024*1024?`${String(Math.round(e/1024))} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function XA(){const e=am(),[t,n]=Y.useState(null),[s,a]=Y.useState(null),[u,c]=Y.useState(!1),[f,m]=Y.useState("");if(Y.useEffect(()=>{if(!e.available)return;let v=!0;e.invoke("checkUpdate").then(C=>{v&&n(C)}).catch(()=>{});const b=e.on("update-status",C=>{n(C),m("")}),w=e.on("update-progress",C=>{a(C.percent)});return()=>{v=!1,b(),w()}},[e]),!e.available||t===null||t.status!=="available")return null;const p=t.version??"",g=GA(t.size),_=f!==""?f:u?s===null?"正在下载安装包…":`正在下载安装包… ${String(s)}%`:`发现新版本${p===""?"":` ${p}`}${g===""?"":`(${g})`},点击下载并安装。`;return y.jsx("button",{type:"button",className:"update-btn","data-update-version":p,"data-tip":_,title:_,disabled:u,onClick:()=>{m(""),c(!0),e.invoke("installUpdate").then(v=>{v.ok||(m(v.error??"更新失败"),c(!1))}).catch(v=>{m(`更新失败:${v instanceof Error?v.message:String(v)}`),c(!1)})},children:u?s===null?"更新中":`${String(s)}%`:"更新"})}const KS=Y.createContext(null);function ZA({channel:e,children:t}){return y.jsx(KS.Provider,{value:e,children:t})}function na(){const e=Y.useContext(KS);if(e===null)throw new Error("useHostChannel 必须在 RuntimeProvider 里用");return e}function QA(){const e=na();return Y.useSyncExternalStore(t=>e.subscribe(t),()=>e.getSnapshot(),()=>e.getSnapshot())}function jo(e,t=Object.is){const n=na(),s=Y.useRef(e);s.current=e;const a=Y.useRef(t);a.current=t;const[u,c]=Y.useState(()=>e(n.getSnapshot())),f=Y.useRef(u);return Y.useEffect(()=>{const m=()=>{const p=s.current(n.getSnapshot());a.current(f.current,p)||(f.current=p,c(p))};return m(),n.subscribe(m)},[n]),u}function WS(){const e=na();return Y.useSyncExternalStore(t=>e.subscribe(t),()=>e.getStatus(),()=>e.getStatus())}function JA(){const e=na();return Y.useSyncExternalStore(t=>e.subscribe(t),()=>e.getHello(),()=>e.getHello())}function GS(){const e=na();return Y.useSyncExternalStore(t=>e.subscribe(t),()=>e.getHostError(),()=>e.getHostError())}const T5="dsc.diffView",M5="dsc.diffWrap",Rc="--dsc-diff-pane-w",D5=320,A5=900;function eO(){const e=Oh(),[t,n]=Y.useState(0),[s,a]=Y.useState(()=>localStorage.getItem(T5)==="split"),[u,c]=Y.useState(()=>localStorage.getItem(M5)==="wrap");Y.useEffect(()=>{e!==null&&n(Math.min(e.index,Math.max(0,e.files.length-1)))},[e]),Y.useEffect(()=>{const b=Kl(Ci.diffPaneWidth,D5,A5);b!==null&&On(Rc,`${String(b)}px`)},[]);const f=Gl({getBase:()=>Wl(Rc,480),sign:-1,clamp:b=>Math.min(A5,Math.max(D5,b)),onDrag:b=>On(Rc,`${String(b)}px`),onCommit:b=>Xr(Ci.diffPaneWidth,b)}),m=()=>{Xr(Ci.diffPaneWidth,null),On(Rc,null)},p=()=>{a(b=>{try{localStorage.setItem(T5,b?"unified":"split")}catch{}return!b})},g=()=>{c(b=>{try{localStorage.setItem(M5,b?"nowrap":"wrap")}catch{}return!b})};if(e===null)return null;const _=e.files[t]??e.files[0],v=Vs();return y.jsxs("aside",{className:"diff-pane","data-diff-pane":!0,children:[y.jsx("div",{className:"diff-resizer",...f,onDoubleClick:m,"data-tip":"拖拽调宽 · 双击复位","aria-label":"调整审查面板宽度"}),y.jsxs("div",{className:"diff-head",children:[e.files.length>1?y.jsx(vm,{className:"diff-file-select",ariaLabel:"选择要审查的文件",value:String(t),options:e.files.map((b,w)=>({value:String(w),label:lh(b.path,e.cwd)})),onPick:b=>{n(Number(b))}}):_!==void 0&&y.jsx("span",{className:"diff-file-name",title:_.path,children:lh(_.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:p,children:s?"合并":"分栏"}),y.jsx("button",{type:"button",className:"diff-tool","aria-pressed":u,"data-tip":"长行自动换行",onClick:g,children:"换行"}),_!==void 0&&y.jsxs(y.Fragment,{children:[y.jsx(Eh,{name:_.path,size:15}),v.available?y.jsx("button",{type:"button",className:"diff-tool","data-tip":"用系统默认程序打开。",onClick:()=>{v.invoke("openPath",[_.path]).catch(b=>{Sm(`系统打开失败:${b instanceof Error?b.message:String(b)}`)})},children:"系统打开"}):null,y.jsx("button",{type:"button",className:"diff-tool","data-tip":"在预览中打开当前文件(内容是修改时的快照)。",onClick:()=>{Nn.openPreview(_.path)},children:"打开"})]}),y.jsx("button",{type:"button",className:"diff-tool","data-tip":"关闭审查",onClick:()=>{Am(null)},children:"关闭"})]})]}),_===void 0?y.jsx("p",{className:"diff-note",children:"这一轮没有可审查的改动。"}):y.jsx(tO,{file:_,split:s,wrap:u})]})}function tO({file:e,split:t,wrap:n}){return y.jsxs(y.Fragment,{children:[e.truncated===!0&&y.jsx("p",{className:"diff-note",children:"改动较大,这里只显示了前一部分(完整改动以文件当前内容为准)。"}),y.jsx(Ap,{hunks:e.hunks,path:e.path,split:t,wrap:n})]})}const XS="(max-width: 860px)";function O5(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(XS).matches}function iO(e,t){const n=Y.useMemo(()=>t===null?[]:[{id:"boot",ok:!1,error:t}],[t]),[s,a]=Y.useState(()=>e?.getReports()??n);return Y.useEffect(()=>{if(e===null){a(n);return}return a(e.getReports()),e.subscribe(()=>{a(e.getReports())})},[e,n]),s}function nO(e){const[t,n]=Y.useState(()=>e?.getState()??null);return Y.useEffect(()=>{if(e===null){n(null);return}return n(e.getState()),e.subscribe(()=>{n(e.getState())})},[e]),t}function rO(e){const[t,n]=Y.useState(()=>e?.getFailures()??[]);return Y.useEffect(()=>{if(e===null){n([]);return}return n(e.getFailures()),e.subscribe(()=>{n(e.getFailures())})},[e]),t}function sO({slots:e,boot:t,serviceRegistry:n,session:s,hmr:a,bootError:u,allowedModules:c}){const f=iO(s,u),m=nO(s),p=rO(a),g=n.names(),_=f.filter(U=>!U.ok);Ko();const v=Oh(),b=jo(mO),w=Lm(),C=$S(),E=jo(pO);Y.useEffect(()=>{TS(b??"")},[b]);const D=Y.useMemo(()=>new URLSearchParams(location.search).has("dock"),[]);Y.useEffect(()=>{!D||b===null||Do("guide")},[D,b]);const[K,V]=Y.useState(()=>Kl(Ci.sidebarWidth,rh,sh)),[Z,se]=Y.useState(()=>O5()),[z,T]=Y.useState(()=>pm(Ci.sidebarCollapsed)||O5()),[$,ae]=Y.useState(()=>Kl(Ci.threadWidth,Wr,dm)),[N,J]=Y.useState(()=>Kl(Ci.dockWidth,um,cm)??hm);Y.useEffect(()=>{On("--dsc-sidebar-w",K===null?null:`${String(K)}px`)},[K]),Y.useEffect(()=>($!==null&&On("--dsc-thread-max",`${String($)}px`),()=>On("--dsc-thread-max",null)),[$]),Y.useEffect(()=>{const U=window.matchMedia(XS),fe=()=>{se(U.matches),U.matches&&T(!0)};return fe(),U.addEventListener("change",fe),()=>U.removeEventListener("change",fe)},[]),Y.useEffect(()=>{Z&&w!==null&&T(!0)},[Z,w]);const W=U=>{V(U),Xr(Ci.sidebarWidth,U)},G=U=>{ae(U),Xr(Ci.threadWidth,U)},Q=()=>{ae(null),Xr(Ci.threadWidth,null)},P=U=>{J(U),Xr(Ci.dockWidth,U)},B=()=>{T(U=>(mm(Ci.sidebarCollapsed,!U),!U))};Y.useEffect(()=>{const U=k=>{!(k.ctrlKey||k.metaKey)||k.altKey||k.shiftKey||(k.key==="b"||k.key==="B"?(k.preventDefault(),B()):k.key==="p"||k.key==="P"?(k.preventDefault(),Do("files")):k.key==="`"||k.code==="Backquote"?(k.preventDefault(),Do("terminal")):(k.key==="t"||k.key==="T")&&(k.preventDefault(),Dm()))},fe=()=>B();return window.addEventListener("keydown",U),window.addEventListener("shell.sidebar.toggle",fe),()=>{window.removeEventListener("keydown",U),window.removeEventListener("shell.sidebar.toggle",fe)}},[]);const ee=Gl({sign:1,getBase:()=>K??_m(),clamp:U=>Math.min(sh,Math.max(rh,U)),onDrag:U=>On("--dsc-sidebar-w",`${String(U)}px`),onCommit:U=>W(U)});return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"app","data-rail":z?"1":"0",children:[y.jsxs("aside",{className:`sidebar${z?" rail":""}`,children:[y.jsxs("div",{className:"sidebar-header","data-rail-hidden":z?"1":void 0,"aria-hidden":z||void 0,children:[y.jsx("img",{src:"icon.png",alt:"Pneuma",draggable:!1}),y.jsx("span",{className:"brand",children:t.host.name}),y.jsx(XA,{}),y.jsx("button",{type:"button",className:"icon-btn rail-toggle","data-tip":"收起侧边栏,快捷键 Ctrl+B",title:"收起侧边栏(Ctrl+B)","aria-label":"收起侧边栏",onClick:B,children:y.jsx(zs,{size:15})})]}),z&&!Z?y.jsx(uO,{onExpand:B}):null,y.jsx("div",{className:"sidebar-slot","data-rail-hidden":z?"1":void 0,children:y.jsx(en,{slots:e,slot:Tt.sidebar})}),z?null:y.jsx("div",{className:"sidebar-resizer","data-tip":"拖拽调整侧边栏宽度,双击复位",onPointerDown:ee.onPointerDown,onPointerMove:ee.onPointerMove,onPointerUp:ee.onPointerUp,onPointerCancel:ee.onPointerCancel,onDoubleClick:()=>W(null)})]}),Z&&!z?y.jsx("div",{className:"sidebar-scrim",onClick:B,"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:[Z?y.jsx("button",{type:"button",className:"icon-btn topbar-nav-btn","data-tip":"会话","aria-label":"会话",onClick:B,children:y.jsx(zs,{size:16})}):null,y.jsx("span",{className:"title",children:y.jsx(lO,{})}),y.jsx("div",{className:"topbar-cluster",children:y.jsx(en,{slots:e,slot:Tt.headerLead})}),y.jsx("div",{className:"drag-fill"}),y.jsx(en,{slots:e,slot:Tt.header}),Z?y.jsx("button",{type:"button",className:`icon-btn topbar-nav-btn${w==="plugins"?" on":""}`,"data-tip":"插件","aria-label":"插件","aria-pressed":w==="plugins",onClick:()=>{zo(w==="plugins"?null:"plugins")},children:y.jsx(yh,{size:16})}):null,y.jsx(aO,{})]}),Z?C==="trace"?y.jsx("nav",{className:"tabs","aria-label":"正文区视图",children:y.jsxs("button",{type:"button",onClick:()=>{Fc("chat")},children:[y.jsx(Wc,{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:()=>{Fc("chat")},children:"对话"}),y.jsx("button",{type:"button",role:"tab","aria-selected":C==="trace",className:C==="trace"?"on":"",onClick:()=>{Fc("trace")},children:"轨迹"})]})]}),y.jsx(oO,{}),y.jsxs("div",{className:"thread-zone",...v!==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(en,{slots:e,slot:Tt.thread}):y.jsx("div",{className:"chat-wrap",children:y.jsx("div",{className:"chat",children:y.jsx("div",{className:"chat-inner",children:y.jsx(en,{slots:e,slot:Tt.main})})})}),y.jsx("div",{className:"composer-zone",children:y.jsx(en,{slots:e,slot:Tt.composer})})]}),v===null?y.jsx(ym,{width:$,onCommit:G,onReset:Q}):null,y.jsx(eO,{})]})]}):y.jsxs(y.Fragment,{children:[Z?y.jsxs("div",{className:"page-strip",children:[y.jsx("button",{type:"button",className:"icon-btn topbar-nav-btn","data-tip":"返回对话","aria-label":"返回对话",onClick:()=>{zo(null)},children:y.jsx(Wc,{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:B,children:y.jsx(zs,{size:16})})]}):null,y.jsx(en,{slots:e,slot:Tt.page})]}),y.jsx("div",{className:"statusbar",children:y.jsx(en,{slots:e,slot:Tt.statusbar})})]}),b!==null?y.jsx(IS,{width:N,onResize:P}):null,y.jsx("div",{className:"dsc-toasts",children:y.jsx(en,{slots:e,slot:Tt.notice})})]}),y.jsx(hO,{slots:e,boot:t,reports:f,services:g,failed:_.length,ledger:m,syncFailures:p,allowedModules:c,onRetrySync:a===null?null:()=>{a.retry()}})]})}function lO(){const e=jo(dO);return y.jsx(y.Fragment,{children:e})}function aO(){return Ko().expanded?null:y.jsx("button",{type:"button",className:"icon-btn dock-toggle","data-tip":"工作区面板:开始、终端、浏览器、文件、Git","aria-label":"工作区面板",onClick:()=>{Nn.setExpanded(!0)},children:y.jsx(zs,{size:15})})}function oO(){const e=GS();return e===null?null:y.jsxs("p",{className:"host-error","data-host-error":"1",children:["宿主状态异常:",e]})}function uO({onExpand:e}){const t=Lm(),n=jo(cO);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(gp,{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:()=>{zo(t==="skills"?null:"skills")},children:y.jsx(wp,{size:18})}),y.jsx("button",{type:"button",className:`rail-btn${t==="plugins"?" on":""}`,"data-tip":"插件","aria-label":"插件","aria-pressed":t==="plugins",onClick:()=>{zo(t==="plugins"?null:"plugins")},children:y.jsx(yh,{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(js,{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(Sp,{size:18})})]})]})}function cO(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 hO({slots:e,boot:t,reports:n,services:s,failed:a,ledger:u,syncFailures:c,allowedModules:f,onRetrySync:m}){const p=j4(e),[g]=Y.useState(()=>new URLSearchParams(location.search).has("diag")),_=Vs(),v=fO(),b=WS(),w=JA();if(!g&&a===0&&p.length===0&&c.length===0)return null;const C=E=>t.batches.find(D=>D.phase===E)?.rev??"";return y.jsxs("details",{className:"diagnostics",children:[y.jsxs("summary",{children:["诊断(",n.length," 个插件 / ",e.slots.length," 个槽",p.length===0?"":` / ${String(p.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":u?.plugins[E.id]?.phase??"",children:[" ","· ",u?.plugins[E.id]?.phase==="early"?"首屏批":"应用批"]})]},E.id)),n.length===0?y.jsx("li",{className:"empty",children:"启动清单里没有插件"}):null]}),u===null?null:y.jsxs("p",{className:"diag-line diag-batches",children:["批次:",u.batches.map(E=>{const D=E.entries.filter(V=>u.plugins[V]?.state==="loaded").length,K=E.doneAt??E.startedAt??E.scheduledAt;return y.jsxs("span",{"data-batch":E.phase,"data-batch-state":E.state,"data-batch-loaded":`${String(D)}/${String(E.entries.length)}`,"data-batch-rev":C(E.phase),style:{marginRight:10},children:[E.phase==="early"?"首屏":"应用"," ",D,"/",E.entries.length," ","(",E.state,K===void 0?"":` @${String(Math.round(K-u.startedAt))}ms`,C(E.phase)===""?"":`,rev ${C(E.phase)}`,")"]},E.phase)})]}),c.length===0?null:y.jsx("ul",{className:"diag-plugins",children:c.map(E=>y.jsxs("li",{className:"bad","data-sync-failure":E.id,children:[y.jsx("code",{children:E.id})," 页内同步失败:",E.message]},E.id))}),m===null?null:y.jsx("p",{className:"diag-line",children:y.jsx("button",{type:"button","data-sync-retry":"1",onClick:m,children:"重试页内同步"})}),p.length===0?null:y.jsx("ul",{className:"diag-plugins",children:p.map((E,D)=>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(D)}`))}),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:["放行的模块:",f.join("、")]}),y.jsxs("p",{className:"diag-line diag-channel","data-channel":b,"data-protocol":w?.protocolVersion??"",children:["数据通道:",b==="open"?`已连接${w===null?"":`(协议 v${String(w.protocolVersion)},放行 ${String(w.methods.length)} 个方法)`}`:b==="connecting"?"连接中…":"已断开(请用宿主新打印的地址重开)"]}),y.jsxs("p",{className:"diag-line","data-native":_.available?"on":"off","data-native-probe":v.state,children:["原生桥:",_.available?`v${String(_.version??"?")} 已就绪(${String(i0.length)} 个操作:${i0.join("、")})`:"浏览器里没有(桌面窗口才有)",_.available&&_.version!==null&&_.version!==t0?` ⚠ 版本对不上:这一版壳按 v${String(t0)} 写,外壳的桥是 v${String(_.version)}(多半是壳产物没跟着外壳一起重建)`:"",v.detail===""?"":` · ${v.detail}`]})]})}function fO(){const[e,t]=Y.useState({state:"pending",detail:""});return Y.useEffect(()=>{const n=Vs();let s=!0;return n.invoke("recentCwds").then(a=>{s&&t({state:"ok",detail:`试点 recentCwds 回了 ${String(Array.isArray(a)?a.length:0)} 个最近工作区`})}).catch(a=>{if(!s)return;const u=a instanceof Error?a.message:String(a);t(n.available?{state:"error",detail:`试点未通过:${u}`}:{state:"off",detail:`降级正常:${u}`})}),()=>{s=!1}},[]),e}function dO(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 a of n){if(typeof a!="object"||a===null)continue;const u=a;if(u.id!==s)continue;const c=u.title;return typeof c=="string"&&c!==""?c:"新会话"}return"新会话"}function pO(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 mO(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 _O=.85,gO=1.35,ZS=1,vO={sm:.92,md:1,lg:1.12},ch={themeMode:"dark",fontSize:ZS,density:"standard"};function QS(e){const n=(typeof e=="string"?vO[e]:void 0)??(typeof e=="number"&&Number.isFinite(e)?e:ZS);return Math.min(gO,Math.max(_O,Math.round(n*100)/100))}function yO(e){return e==="compact"||e==="roomy"?e:"standard"}function SO(e){return e==="light"||e==="system"?e:"dark"}function JS(e){return{themeMode:SO(e?.themeMode),fontSize:QS(e?.fontSize),density:yO(e?.density)}}const e8="dsc.appearance",Lc=typeof window>"u"?void 0:window.matchMedia?.("(prefers-color-scheme: light)");let Fl,R5=null,L5=ch;function hh(e){L5=e;const t=document.documentElement,n=e.themeMode,s=n==="system"?Lc?.matches?"light":"dark":n;t.dataset.theme=s,t.dataset.density=e.density,t.style.setProperty("--dsc-font-scale",String(QS(e.fontSize))),bO(n),Lc&&(n==="system"&&!Fl?(Fl=()=>{hh(L5)},Lc.addEventListener("change",Fl)):n!=="system"&&Fl&&(Lc.removeEventListener("change",Fl),Fl=void 0))}function bO(e){const t=Vs();if(!t.available)return;t.invoke("setThemeSource",[e]).catch(()=>{});const n=wO();if(n===null||n===R5)return;R5=n;const[s,a]=n.split(" ");t.invoke("setWindowChrome",[s,a]).catch(()=>{})}function wO(){const e=Zc("--dsc-chrome-bar"),t=Zc("--dsc-chrome-symbol");return e===null||t===null?null:`${e} ${t}`}function xO(){try{const e=localStorage.getItem(e8);return e?JS(JSON.parse(e)):ch}catch(e){return console.warn("[ui-shell] 外观缓存读取失败,回退默认外观",e),ch}}function t8(e){try{localStorage.setItem(e8,JSON.stringify(e))}catch(t){console.warn("[ui-shell] 外观缓存写入失败",t)}}const CO=3e4,EO=33e4;class kO extends Error{reason;constructor(t,n){super(t==="timeout"?`调用宿主方法超时(${String(n)} 毫秒)`:"调用宿主方法已被中止"),this.name="HostInvokeAbortedError",this.reason=t}}function TO(){let e=null,t=null,n=null,s="connecting",a=null,u=null,c=!1;const f=new Set,m=new Set,p=()=>{for(const v of[...f])try{v()}catch{}},g=v=>{s!==v&&(s=v,p())},_=()=>{if(c)return;const v=new EventSource("/api/events");u=v,v.addEventListener("hello",b=>{if(v===u)try{t=JSON.parse(b.data),s="open",p()}catch(w){console.error("[ui-shell] 握手帧认不出",w)}}),v.addEventListener("frame",b=>{if(v===u)try{const w=JSON.parse(b.data);e=nw(e,w),s="open",p()}catch(w){if(w instanceof z4){console.warn("[ui-shell] 帧号跳号,重开数据通道换一帧全量:",w.message),u=null,v.close(),g("connecting"),_();return}console.error("[ui-shell] 帧认不出",w)}}),v.addEventListener("plugins",b=>{if(v===u){try{n=JSON.parse(b.data)}catch(w){console.error("[ui-shell] 启动图热更帧认不出",w);return}p();for(const w of[...m])try{w(n)}catch{}}}),v.onopen=()=>{v===u&&g("open")},v.onerror=b=>{if(v!==u)return;const w=b.data;if(typeof w=="string"&&w!==""){try{const C=JSON.parse(w);a=typeof C.error=="string"?C.error:w}catch{a=w}console.error("[ui-shell] 宿主报错",a),p();return}g(v.readyState===EventSource.CLOSED?"closed":"connecting")}};return _(),{getSnapshot:()=>e,getHello:()=>t,getStatus:()=>s,getHostError:()=>a,getPluginsFrame:()=>n,onPlugins(v){return m.add(v),()=>{m.delete(v)}},subscribe(v){return f.add(v),()=>{f.delete(v)}},async invoke(v,b=[],w){const C=w?.timeoutMs??CO,E=new AbortController;let D=!1;const K=setTimeout(()=>{D=!0,E.abort()},C),V=w?.signal,Z=()=>{E.abort()};V?.addEventListener("abort",Z),V?.aborted===!0&&E.abort();try{let se;try{se=await fetch("/api/invoke",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({method:v,args:b}),signal:E.signal})}catch(T){throw E.signal.aborted?new kO(D?"timeout":"aborted",C):T}const z=await se.json().catch(()=>null);if(se.status===401&&(a=z?.error??"界面凭据已失效,请用宿主新打印的地址重开",g("closed")),!se.ok)throw new Error(z?.error??`HTTP ${String(se.status)}`);if(z?.ok!==!0)throw new Error(z?.error??"调用失败");return z.value}finally{clearTimeout(K),V?.removeEventListener("abort",Z)}},close(){c=!0,s="closed",u?.close(),u=null,p()}}}const MO={noticeExtensions:"tui.notice.extensions"};function DO(e){return e}function AO(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 T0=new Set;function OO(e){for(const t of T0)t(e)}function i8(e){return T0.add(e),()=>{T0.delete(e)}}const RO=Object.freeze(Object.defineProperty({__proto__:null,CODE_FILE_ARTWORK:Rp,CODE_FILE_ICON_ID_TOKEN:Op,CODE_FILE_TYPES:Lp,COMPLETION_SOUND_VARIANTS:Mp,CodeFileIcon:Hp,CodeView:My,CsvView:Y6,DEFAULT_CAPS:jw,DEFAULT_FIELDS:xm,DOCK_DEFAULT_WIDTH:hm,DOCK_MAX_WIDTH:cm,DOCK_MIN_WIDTH:um,DiffRows:Ap,EFFORT_WIRE_HINT:zw,FileIcon:Eh,FileTypeIcon:jp,HUMAN_WAIT_TIMEOUT_MS:EO,IconActivity:by,IconArchive:py,IconArchiveOff:yy,IconArrowRight:q4,IconArrowUp:V4,IconBolt:wp,IconBrain:sy,IconBranch:Sh,IconCalendar:vy,IconChart:_y,IconCheck:yp,IconChevronDown:vp,IconChevronLeft:Wc,IconChevronRight:F4,IconChevronUp:U4,IconCircle:J4,IconClock:G4,IconClose:oy,IconCode:xp,IconCoins:ty,IconCopy:K4,IconDatabase:wy,IconDiff:cy,IconEdit:Gc,IconExpand:Y4,IconFlatList:gy,IconFolder:js,IconFolderOpen:P4,IconGear:Sp,IconGlobe:Ro,IconInfo:ly,IconKey:hy,IconLayers:ny,IconMore:fy,IconNewChat:ky,IconPackage:ry,IconPhone:iy,IconPin:my,IconPlus:gp,IconPuzzle:yh,IconQueue:Sy,IconRefresh:Z4,IconRestart:Q4,IconSearch:Yl,IconShield:X4,IconSidebar:zs,IconSort:dy,IconSpark:bp,IconStop:$4,IconStore:ay,IconSwap:W4,IconTarget:ey,IconTerminal:Hs,IconThumbDown:Cy,IconThumbUp:xy,IconTrash:uy,IconTree:Cp,IconTriangleRightFill:Ey,KNOWN_TOOLS:Em,MODALITIES:Aw,MODALITY_LABELS:Nw,MUTATION_CONTENT_FIELDS:bm,MarkdownView:F6,NATIVE_UNAVAILABLE:lm,PANEL_KEYS:Ci,PdfView:V6,SHIKI_LANG_BY_EXT:Ep,SIDEBAR_MAX:sh,SIDEBAR_MIN:rh,SLOT:Tt,STORED_MAX:dm,SUMMARY_FIELDS:wm,Select:vm,THINKING_LEVELS:Mw,THINKING_LEVEL_LABELS:Lw,THINKING_PARAMS:Dw,THINKING_PARAM_LABELS:Bw,THREAD_EDGE_BUDGET:om,THREAD_MIN:Wr,TOOL_STATUS_TEXT:nS,TUI_SLOTS:MO,Text:Ty,ThreadResizer:ym,UNKNOWN_TOOL_ICON:km,XlsxView:$6,baseNameOf:U6,basename:Vo,classifyCodeFileType:Bp,classifyFileType:Ch,clearTraceFocus:KA,confirmAction:Ry,defineStore:dw,defineUiPlugin:DO,diffLines:Fw,displayPathOf:lh,dockActions:Nn,dockSurface:oh,entryTs:K6,estimateTextTokens:Tw,fileExtension:zp,fileIconName:By,findLast:Dy,formatClock:W6,formatClockSeconds:G6,formatDuration:X6,formatTokens:eS,formatTraceDuration:Z6,getHighlighter:Uo,getHostNative:Vs,highlightLines:Tp,highlightToHtml:xh,hostStatus:AO,isCodeFileType:Np,langForPath:bh,loadLang:wh,matchTool:rS,onAppearanceRequest:i8,oneLine:To,openDockBrowserTab:Dm,openDockTab:Do,openTrace:$A,playCompletionSound:Oy,prettyJson:lS,readCssColor:Zc,readCssSolidColor:zy,readCssValue:Ly,readRightRailPx:fm,readRootPx:Wl,readSidebarDefaultPx:_m,readStoredFlag:pm,readStoredPx:Kl,registerDockTab:DS,requestAppearance:OO,setDockPreview:OS,setDockReview:Am,setDockSubagent:zS,setDockWorkOutput:NS,setRootVar:On,setShellPage:zo,setThreadView:Fc,shellPage:US,shellThreadView:qS,shortUrl:Cm,subscribeDock:ia,subscribePage:VS,subscribeThreadView:Nm,toHexColor:Dp,toastErr:Sm,toastOk:J6,toolArgFields:tS,toolSummary:iS,toolVerb:sS,traceFocusStep:YS,useActivePreviewPath:HS,useChannelStatus:WS,useDockPatchSource:LS,useDockReview:Oh,useDockSurface:Ko,useHostChannel:na,useHostError:GS,useHostNative:am,useHostSelector:jo,useHostSnapshot:QA,useHoverDelay:jy,useSeat:H4,useService:yw,useShellPage:Lm,useThreadView:$S,useTraceFocus:WA,useWidthDrag:Gl,writeStoredFlag:mm,writeStoredPx:Xr},Symbol.toStringTag,{value:"Module"}));var n8=Object.defineProperty,LO=Object.getOwnPropertyDescriptor,zO=(e,t)=>{for(var n in t)n8(e,n,{get:t[n],enumerable:!0})},gt=(e,t,n,s)=>{for(var a=s>1?void 0:s?LO(t,n):t,u=e.length-1,c;u>=0;u--)(c=e[u])&&(a=(s?c(t,n,a):c(a))||a);return s&&a&&n8(t,n,a),a},de=(e,t)=>(n,s)=>t(n,s,e),z5="Terminal input",M0={get:()=>z5,set:e=>z5=e},N5="Too much output to announce, navigate to rows manually to read",D0={get:()=>N5,set:e=>N5=e};function NO(e){return e.replace(/\r?\n/g,"\r")}function BO(e,t){return t?"\x1B[200~"+e+"\x1B[201~":e}function jO(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()}function HO(e,t,n,s){if(e.stopPropagation(),e.clipboardData){let a=e.clipboardData.getData("text/plain");r8(a,t,n,s)}}function r8(e,t,n,s){e=NO(e),e=BO(e,n.decPrivateModes.bracketedPasteMode&&s.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=""}function s8(e,t,n){let s=n.getBoundingClientRect(),a=e.clientX-s.left-10,u=e.clientY-s.top-10;t.style.width="20px",t.style.height="20px",t.style.left=`${a}px`,t.style.top=`${u}px`,t.style.zIndex="1000",t.focus()}function B5(e,t,n,s,a){s8(e,t,n),a&&s.rightClickSelect(e),t.value=s.selectionText,t.select()}function Kr(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function Rh(e,t=0,n=e.length){let s="";for(let a=t;a<n;++a){let u=e[a];u>65535?(u-=65536,s+=String.fromCharCode((u>>10)+55296)+String.fromCharCode(u%1024+56320)):s+=String.fromCharCode(u)}return s}var IO=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let s=0,a=0;if(this._interim){let u=e.charCodeAt(a++);56320<=u&&u<=57343?t[s++]=(this._interim-55296)*1024+u-56320+65536:(t[s++]=this._interim,t[s++]=u),this._interim=0}for(let u=a;u<n;++u){let c=e.charCodeAt(u);if(55296<=c&&c<=56319){if(++u>=n)return this._interim=c,s;let f=e.charCodeAt(u);56320<=f&&f<=57343?t[s++]=(c-55296)*1024+f-56320+65536:(t[s++]=c,t[s++]=f);continue}c!==65279&&(t[s++]=c)}return s}},PO=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,a,u,c,f,m=0,p=0;if(this.interim[0]){let v=!1,b=this.interim[0];b&=(b&224)===192?31:(b&240)===224?15:7;let w=0,C;for(;(C=this.interim[++w]&63)&&w<4;)b<<=6,b|=C;let E=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,D=E-w;for(;p<D;){if(p>=n)return 0;if(C=e[p++],(C&192)!==128){p--,v=!0;break}else this.interim[w++]=C,b<<=6,b|=C&63}v||(E===2?b<128?p--:t[s++]=b:E===3?b<2048||b>=55296&&b<=57343||b===65279||(t[s++]=b):b<65536||b>1114111||(t[s++]=b)),this.interim.fill(0)}let g=n-4,_=p;for(;_<n;){for(;_<g&&!((a=e[_])&128)&&!((u=e[_+1])&128)&&!((c=e[_+2])&128)&&!((f=e[_+3])&128);)t[s++]=a,t[s++]=u,t[s++]=c,t[s++]=f,_+=4;if(a=e[_++],a<128)t[s++]=a;else if((a&224)===192){if(_>=n)return this.interim[0]=a,s;if(u=e[_++],(u&192)!==128){_--;continue}if(m=(a&31)<<6|u&63,m<128){_--;continue}t[s++]=m}else if((a&240)===224){if(_>=n)return this.interim[0]=a,s;if(u=e[_++],(u&192)!==128){_--;continue}if(_>=n)return this.interim[0]=a,this.interim[1]=u,s;if(c=e[_++],(c&192)!==128){_--;continue}if(m=(a&15)<<12|(u&63)<<6|c&63,m<2048||m>=55296&&m<=57343||m===65279)continue;t[s++]=m}else if((a&248)===240){if(_>=n)return this.interim[0]=a,s;if(u=e[_++],(u&192)!==128){_--;continue}if(_>=n)return this.interim[0]=a,this.interim[1]=u,s;if(c=e[_++],(c&192)!==128){_--;continue}if(_>=n)return this.interim[0]=a,this.interim[1]=u,this.interim[2]=c,s;if(f=e[_++],(f&192)!==128){_--;continue}if(m=(a&7)<<18|(u&63)<<12|(c&63)<<6|f&63,m<65536||m>1114111)continue;t[s++]=m}}return s}},l8="",Zr=" ",Wo=class a8{constructor(){this.fg=0,this.bg=0,this.extended=new fh}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 a8;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}},fh=class o8{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 o8(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},rn=class u8 extends Wo{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new fh,this.combinedData=""}static fromCharData(t){let n=new u8;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?Kr(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 a=t[1].charCodeAt(1);56320<=a&&a<=57343?this.content=(s-55296)*1024+a-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()]}},j5="di$target",A0="di$dependencies",U1=new Map;function FO(e){return e[A0]||[]}function Vt(e){if(U1.has(e))return U1.get(e);let t=function(n,s,a){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");UO(t,n,a)};return t._id=e,U1.set(e,t),t}function UO(e,t,n){t[j5]===t?t[A0].push({id:e,index:n}):(t[A0]=[{id:e,index:n}],t[j5]=t)}var di=Vt("BufferService"),c8=Vt("CoreMouseService"),Ys=Vt("CoreService"),VO=Vt("CharsetService"),Bm=Vt("InstantiationService"),h8=Vt("LogService"),pi=Vt("OptionsService"),f8=Vt("OscLinkService"),qO=Vt("UnicodeService"),Go=Vt("DecorationService"),O0=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=[],a=this._optionsService.rawOptions.linkHandler,u=new rn,c=n.getTrimmedLength(),f=-1,m=-1,p=!1;for(let g=0;g<c;g++)if(!(m===-1&&!n.hasContent(g))){if(n.loadCell(g,u),u.hasExtendedAttrs()&&u.extended.urlId)if(m===-1){m=g,f=u.extended.urlId;continue}else p=u.extended.urlId!==f;else m!==-1&&(p=!0);if(p||m!==-1&&g===c-1){let _=this._oscLinkService.getLinkData(f)?.uri;if(_){let v={start:{x:m+1,y:e},end:{x:g+(!p&&g===c-1?1:0),y:e}},b=!1;if(!a?.allowNonHttpProtocols)try{let w=new URL(_);["http:","https:"].includes(w.protocol)||(b=!0)}catch{b=!0}b||s.push({text:_,range:v,activate:(w,C)=>a?a.activate(w,C,v):YO(w,C),hover:(w,C)=>a?.hover?.(w,C,v),leave:(w,C)=>a?.leave?.(w,C,v)})}p=!1,u.hasExtendedAttrs()&&u.extended.urlId?(m=g,f=u.extended.urlId):(m=-1,f=-1)}}t(s)}};O0=gt([de(0,di),de(1,pi),de(2,f8)],O0);function YO(e,t){if(confirm(`Do you want to navigate to ${t}?
55
-
56
- 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 Lh=Vt("CharSizeService"),ur=Vt("CoreBrowserService"),jm=Vt("MouseService"),cr=Vt("RenderService"),$O=Vt("SelectionService"),d8=Vt("CharacterJoinerService"),ra=Vt("ThemeService"),p8=Vt("LinkProviderService"),KO=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?H5.isErrorNoTelemetry(e)?new H5(e.message+`
57
-
58
- `+e.stack):new Error(e.message+`
59
-
60
- `+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)}},WO=new KO;function Uc(e){GO(e)||WO.onUnexpectedError(e)}var R0="Canceled";function GO(e){return e instanceof XO?!0:e instanceof Error&&e.name===R0&&e.message===R0}var XO=class extends Error{constructor(){super(R0),this.name=this.message}};function ZO(e){return new Error(`Illegal argument: ${e}`)}var H5=class L0 extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof L0)return t;let n=new L0;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},z0=class m8 extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,m8.prototype)}};function ji(e,t=0){return e[e.length-(1+t)]}var QO;(e=>{function t(u){return u<0}e.isLessThan=t;function n(u){return u<=0}e.isLessThanOrEqual=n;function s(u){return u>0}e.isGreaterThan=s;function a(u){return u===0}e.isNeitherLessOrGreaterThan=a,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(QO||={});function JO(e,t){let n=this,s=!1,a;return function(){return s||(s=!0,t||(a=e.apply(n,arguments))),a}}var _8;(e=>{function t(Z){return Z&&typeof Z=="object"&&typeof Z[Symbol.iterator]=="function"}e.is=t;let n=Object.freeze([]);function s(){return n}e.empty=s;function*a(Z){yield Z}e.single=a;function u(Z){return t(Z)?Z:a(Z)}e.wrap=u;function c(Z){return Z||n}e.from=c;function*f(Z){for(let se=Z.length-1;se>=0;se--)yield Z[se]}e.reverse=f;function m(Z){return!Z||Z[Symbol.iterator]().next().done===!0}e.isEmpty=m;function p(Z){return Z[Symbol.iterator]().next().value}e.first=p;function g(Z,se){let z=0;for(let T of Z)if(se(T,z++))return!0;return!1}e.some=g;function _(Z,se){for(let z of Z)if(se(z))return z}e.find=_;function*v(Z,se){for(let z of Z)se(z)&&(yield z)}e.filter=v;function*b(Z,se){let z=0;for(let T of Z)yield se(T,z++)}e.map=b;function*w(Z,se){let z=0;for(let T of Z)yield*se(T,z++)}e.flatMap=w;function*C(...Z){for(let se of Z)yield*se}e.concat=C;function E(Z,se,z){let T=z;for(let $ of Z)T=se(T,$);return T}e.reduce=E;function*D(Z,se,z=Z.length){for(se<0&&(se+=Z.length),z<0?z+=Z.length:z>Z.length&&(z=Z.length);se<z;se++)yield Z[se]}e.slice=D;function K(Z,se=Number.POSITIVE_INFINITY){let z=[];if(se===0)return[z,Z];let T=Z[Symbol.iterator]();for(let $=0;$<se;$++){let ae=T.next();if(ae.done)return[z,e.empty()];z.push(ae.value)}return[z,{[Symbol.iterator](){return T}}]}e.consume=K;async function V(Z){let se=[];for await(let z of Z)se.push(z);return Promise.resolve(se)}e.asyncToArray=V})(_8||={});function Ps(e){if(_8.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 eR(...e){return ct(()=>Ps(e))}function ct(e){return{dispose:JO(()=>{e()})}}var g8=class v8{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{Ps(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?v8.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)}};g8.DISABLE_DISPOSED_WARNING=!1;var Jr=g8,He=class{constructor(){this._store=new Jr,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)}};He.None=Object.freeze({dispose(){}});var Ql=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}},lr=typeof window=="object"?window:globalThis,N0=class B0{constructor(t){this.element=t,this.next=B0.Undefined,this.prev=B0.Undefined}};N0.Undefined=new N0(void 0);var ft=N0,I5=class{constructor(){this._first=ft.Undefined,this._last=ft.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===ft.Undefined}clear(){let e=this._first;for(;e!==ft.Undefined;){let t=e.next;e.prev=ft.Undefined,e.next=ft.Undefined,e=t}this._first=ft.Undefined,this._last=ft.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let n=new ft(e);if(this._first===ft.Undefined)this._first=n,this._last=n;else if(t){let a=this._last;this._last=n,n.prev=a,a.next=n}else{let a=this._first;this._first=n,n.next=a,a.prev=n}this._size+=1;let s=!1;return()=>{s||(s=!0,this._remove(n))}}shift(){if(this._first!==ft.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==ft.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==ft.Undefined&&e.next!==ft.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===ft.Undefined&&e.next===ft.Undefined?(this._first=ft.Undefined,this._last=ft.Undefined):e.next===ft.Undefined?(this._last=this._last.prev,this._last.next=ft.Undefined):e.prev===ft.Undefined&&(this._first=this._first.next,this._first.prev=ft.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==ft.Undefined;)yield e.element,e=e.next}},tR=globalThis.performance&&typeof globalThis.performance.now=="function",iR=class y8{static create(t){return new y8(t)}constructor(t){this._now=tR&&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}},ei;(e=>{e.None=()=>He.None;function t(W,G){return _(W,()=>{},0,void 0,!0,void 0,G)}e.defer=t;function n(W){return(G,Q=null,P)=>{let B=!1,ee;return ee=W(U=>{if(!B)return ee?ee.dispose():B=!0,G.call(Q,U)},null,P),B&&ee.dispose(),ee}}e.once=n;function s(W,G,Q){return p((P,B=null,ee)=>W(U=>P.call(B,G(U)),null,ee),Q)}e.map=s;function a(W,G,Q){return p((P,B=null,ee)=>W(U=>{G(U),P.call(B,U)},null,ee),Q)}e.forEach=a;function u(W,G,Q){return p((P,B=null,ee)=>W(U=>G(U)&&P.call(B,U),null,ee),Q)}e.filter=u;function c(W){return W}e.signal=c;function f(...W){return(G,Q=null,P)=>{let B=eR(...W.map(ee=>ee(U=>G.call(Q,U))));return g(B,P)}}e.any=f;function m(W,G,Q,P){let B=Q;return s(W,ee=>(B=G(B,ee),B),P)}e.reduce=m;function p(W,G){let Q,P={onWillAddFirstListener(){Q=W(B.fire,B)},onDidRemoveLastListener(){Q?.dispose()}},B=new ce(P);return G?.add(B),B.event}function g(W,G){return G instanceof Array?G.push(W):G&&G.add(W),W}function _(W,G,Q=100,P=!1,B=!1,ee,U){let fe,k,Ie,We=0,O,A={leakWarningThreshold:ee,onWillAddFirstListener(){fe=W(oe=>{We++,k=G(k,oe),P&&!Ie&&(ne.fire(k),k=void 0),O=()=>{let pe=k;k=void 0,Ie=void 0,(!P||We>1)&&ne.fire(pe),We=0},typeof Q=="number"?(clearTimeout(Ie),Ie=setTimeout(O,Q)):Ie===void 0&&(Ie=0,queueMicrotask(O))})},onWillRemoveListener(){B&&We>0&&O?.()},onDidRemoveLastListener(){O=void 0,fe.dispose()}},ne=new ce(A);return U?.add(ne),ne.event}e.debounce=_;function v(W,G=0,Q){return e.debounce(W,(P,B)=>P?(P.push(B),P):[B],G,void 0,!0,void 0,Q)}e.accumulate=v;function b(W,G=(P,B)=>P===B,Q){let P=!0,B;return u(W,ee=>{let U=P||!G(ee,B);return P=!1,B=ee,U},Q)}e.latch=b;function w(W,G,Q){return[e.filter(W,G,Q),e.filter(W,P=>!G(P),Q)]}e.split=w;function C(W,G=!1,Q=[],P){let B=Q.slice(),ee=W(k=>{B?B.push(k):fe.fire(k)});P&&P.add(ee);let U=()=>{B?.forEach(k=>fe.fire(k)),B=null},fe=new ce({onWillAddFirstListener(){ee||(ee=W(k=>fe.fire(k)),P&&P.add(ee))},onDidAddFirstListener(){B&&(G?setTimeout(U):U())},onDidRemoveLastListener(){ee&&ee.dispose(),ee=null}});return P&&P.add(fe),fe.event}e.buffer=C;function E(W,G){return(Q,P,B)=>{let ee=G(new K);return W(function(U){let fe=ee.evaluate(U);fe!==D&&Q.call(P,fe)},void 0,B)}}e.chain=E;let D=Symbol("HaltChainable");class K{constructor(){this.steps=[]}map(G){return this.steps.push(G),this}forEach(G){return this.steps.push(Q=>(G(Q),Q)),this}filter(G){return this.steps.push(Q=>G(Q)?Q:D),this}reduce(G,Q){let P=Q;return this.steps.push(B=>(P=G(P,B),P)),this}latch(G=(Q,P)=>Q===P){let Q=!0,P;return this.steps.push(B=>{let ee=Q||!G(B,P);return Q=!1,P=B,ee?B:D}),this}evaluate(G){for(let Q of this.steps)if(G=Q(G),G===D)break;return G}}function V(W,G,Q=P=>P){let P=(...fe)=>U.fire(Q(...fe)),B=()=>W.on(G,P),ee=()=>W.removeListener(G,P),U=new ce({onWillAddFirstListener:B,onDidRemoveLastListener:ee});return U.event}e.fromNodeEventEmitter=V;function Z(W,G,Q=P=>P){let P=(...fe)=>U.fire(Q(...fe)),B=()=>W.addEventListener(G,P),ee=()=>W.removeEventListener(G,P),U=new ce({onWillAddFirstListener:B,onDidRemoveLastListener:ee});return U.event}e.fromDOMEventEmitter=Z;function se(W){return new Promise(G=>n(W)(G))}e.toPromise=se;function z(W){let G=new ce;return W.then(Q=>{G.fire(Q)},()=>{G.fire(void 0)}).finally(()=>{G.dispose()}),G.event}e.fromPromise=z;function T(W,G){return W(Q=>G.fire(Q))}e.forward=T;function $(W,G,Q){return G(Q),W(P=>G(P))}e.runAndSubscribe=$;class ae{constructor(G,Q){this._observable=G,this._counter=0,this._hasChanged=!1;let P={onWillAddFirstListener:()=>{G.addObserver(this)},onDidRemoveLastListener:()=>{G.removeObserver(this)}};this.emitter=new ce(P),Q&&Q.add(this.emitter)}beginUpdate(G){this._counter++}handlePossibleChange(G){}handleChange(G,Q){this._hasChanged=!0}endUpdate(G){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function N(W,G){return new ae(W,G).emitter.event}e.fromObservable=N;function J(W){return(G,Q,P)=>{let B=0,ee=!1,U={beginUpdate(){B++},endUpdate(){B--,B===0&&(W.reportChanges(),ee&&(ee=!1,G.call(Q)))},handlePossibleChange(){},handleChange(){ee=!0}};W.addObserver(U),W.reportChanges();let fe={dispose(){W.removeObserver(U)}};return P instanceof Jr?P.add(fe):Array.isArray(P)&&P.push(fe),fe}}e.fromObservableLight=J})(ei||={});var j0=class H0{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${H0._idPool++}`,H0.all.add(this)}start(t){this._stopWatch=new iR,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}}};j0.all=new Set,j0._idPool=0;var nR=j0,rR=-1,S8=class b8{constructor(t,n,s=(b8._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 a=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,a+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=s*.5;let[u,c]=this.getMostFrequentStack(),f=`[${this.name}] potential listener LEAK detected, having ${n} listeners already. MOST frequent listener (${c}):`;console.warn(f),console.warn(u);let m=new aR(f,u);this._errorHandler(m)}return()=>{let u=this._stacks.get(t.value)||0;this._stacks.set(t.value,u-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,n=0;for(let[s,a]of this._stacks)(!t||n<a)&&(t=[s,a],n=a);return t}};S8._idPool=1;var sR=S8,lR=class w8{constructor(t){this.value=t}static create(){let t=new Error;return new w8(t.stack??"")}print(){console.warn(this.value.split(`
61
- `).slice(2).join(`
62
- `))}},aR=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},oR=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},uR=0,V1=class{constructor(e){this.value=e,this.id=uR++}},cR=2,hR,ce=class{constructor(e){this._size=0,this._options=e,this._leakageMon=this._options?.leakWarningThreshold?new sR(e?.onListenerError??Uc,this._options?.leakWarningThreshold??rR):void 0,this._perfMon=this._options?._profName?new nR(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 c=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(c);let f=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],m=new oR(`${c}. HINT: Stack shows most frequent listener (${f[1]}-times)`,f[0]);return(this._options?.onListenerError||Uc)(m),He.None}if(this._disposed)return He.None;t&&(e=e.bind(t));let s=new V1(e),a;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(s.stack=lR.create(),a=this._leakageMon.check(s.stack,this._size+1)),this._listeners?this._listeners instanceof V1?(this._deliveryQueue??=new fR,this._listeners=[this._listeners,s]):this._listeners.push(s):(this._options?.onWillAddFirstListener?.(this),this._listeners=s,this._options?.onDidAddFirstListener?.(this)),this._size++;let u=ct(()=>{a?.(),this._removeListener(s)});return n instanceof Jr?n.add(u):Array.isArray(n)&&n.push(u),u},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*cR<=t.length){let a=0;for(let u=0;u<t.length;u++)t[u]?t[a++]=t[u]:s&&(this._deliveryQueue.end--,a<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=a}}_deliver(e,t){if(!e)return;let n=this._options?.onListenerError||Uc;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 V1)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}},fR=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}},I0=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new ce,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new ce,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}};I0.INSTANCE=new I0;var Hm=I0;function dR(e,t,n){typeof t=="string"&&(t=e.matchMedia(t)),t.addEventListener("change",n)}Hm.INSTANCE.onDidChangeZoomLevel;function pR(e){return Hm.INSTANCE.getZoomFactor(e)}Hm.INSTANCE.onDidChangeFullscreen;var sa=typeof navigator=="object"?navigator.userAgent:"",P0=sa.indexOf("Firefox")>=0,mR=sa.indexOf("AppleWebKit")>=0,Im=sa.indexOf("Chrome")>=0,_R=!Im&&sa.indexOf("Safari")>=0;sa.indexOf("Electron/")>=0;sa.indexOf("Android")>=0;var q1=!1;if(typeof lr.matchMedia=="function"){let e=lr.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=lr.matchMedia("(display-mode: fullscreen)");q1=e.matches,dR(lr,e,({matches:n})=>{q1&&t.matches||(q1=n)})}var $l="en",F0=!1,U0=!1,Vc=!1,x8=!1,zc,qc=$l,P5=$l,gR,sr,Bs=globalThis,Pi;typeof Bs.vscode<"u"&&typeof Bs.vscode.process<"u"?Pi=Bs.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Pi=process);var vR=typeof Pi?.versions?.electron=="string",yR=vR&&Pi?.type==="renderer";if(typeof Pi=="object"){F0=Pi.platform==="win32",U0=Pi.platform==="darwin",Vc=Pi.platform==="linux",Vc&&Pi.env.SNAP&&Pi.env.SNAP_REVISION,Pi.env.CI||Pi.env.BUILD_ARTIFACTSTAGINGDIRECTORY,zc=$l,qc=$l;let e=Pi.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);zc=t.userLocale,P5=t.osLocale,qc=t.resolvedLanguage||$l,gR=t.languagePack?.translationsConfigFile}catch{}x8=!0}else typeof navigator=="object"&&!yR?(sr=navigator.userAgent,F0=sr.indexOf("Windows")>=0,U0=sr.indexOf("Macintosh")>=0,(sr.indexOf("Macintosh")>=0||sr.indexOf("iPad")>=0||sr.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Vc=sr.indexOf("Linux")>=0,sr?.indexOf("Mobi")>=0,qc=globalThis._VSCODE_NLS_LANGUAGE||$l,zc=navigator.language.toLowerCase(),P5=zc):console.error("Unable to resolve platform.");var C8=F0,Ln=U0,SR=Vc,F5=x8,Bn=sr,Vr=qc,bR;(e=>{function t(){return Vr}e.value=t;function n(){return Vr.length===2?Vr==="en":Vr.length>=3?Vr[0]==="e"&&Vr[1]==="n"&&Vr[2]==="-":!1}e.isDefaultVariant=n;function s(){return Vr==="en"}e.isDefault=s})(bR||={});var wR=typeof Bs.postMessage=="function"&&!Bs.importScripts;(()=>{if(wR){let e=[];Bs.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let s=0,a=e.length;s<a;s++){let u=e[s];if(u.id===n.data.vscodeScheduleAsyncWork){e.splice(s,1),u.callback();return}}});let t=0;return n=>{let s=++t;e.push({id:s,callback:n}),Bs.postMessage({vscodeScheduleAsyncWork:s},"*")}}return e=>setTimeout(e)})();var xR=!!(Bn&&Bn.indexOf("Chrome")>=0);Bn&&Bn.indexOf("Firefox")>=0;!xR&&Bn&&Bn.indexOf("Safari")>=0;Bn&&Bn.indexOf("Edg/")>=0;Bn&&Bn.indexOf("Android")>=0;var Ul=typeof navigator=="object"?navigator:{};F5||document.queryCommandSupported&&document.queryCommandSupported("copy")||Ul&&Ul.clipboard&&Ul.clipboard.writeText,F5||Ul&&Ul.clipboard&&Ul.clipboard.readText;var Pm=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}},Y1=new Pm,U5=new Pm,V5=new Pm,CR=new Array(230),E8;(e=>{function t(f){return Y1.keyCodeToStr(f)}e.toString=t;function n(f){return Y1.strToKeyCode(f)}e.fromString=n;function s(f){return U5.keyCodeToStr(f)}e.toUserSettingsUS=s;function a(f){return V5.keyCodeToStr(f)}e.toUserSettingsGeneral=a;function u(f){return U5.strToKeyCode(f)||V5.strToKeyCode(f)}e.fromUserSettings=u;function c(f){if(f>=98&&f<=113)return null;switch(f){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return Y1.keyCodeToStr(f)}e.toElectronAccelerator=c})(E8||={});var ER=class k8{constructor(t,n,s,a,u){this.ctrlKey=t,this.shiftKey=n,this.altKey=s,this.metaKey=a,this.keyCode=u}equals(t){return t instanceof k8&&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",a=this.metaKey?"1":"0";return`K${t}${n}${s}${a}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toKeybinding(){return new kR([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},kR=class{constructor(e){if(e.length===0)throw ZO("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 TR(e){if(e.charCode){let n=String.fromCharCode(e.charCode).toUpperCase();return E8.fromString(n)}let t=e.keyCode;if(t===3)return 7;if(P0)switch(t){case 59:return 85;case 60:if(SR)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(Ln)return 57;break}else if(mR&&(Ln&&t===93||!Ln&&t===92))return 57;return CR[t]||0}var MR=Ln?256:2048,DR=512,AR=1024,OR=Ln?2048:256,q5=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=TR(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|=MR),this.altKey&&(t|=DR),this.shiftKey&&(t|=AR),this.metaKey&&(t|=OR),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new ER(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}},Y5=new WeakMap;function RR(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 LR=class{static getSameOriginWindowChain(e){let t=Y5.get(e);if(!t){t=[],Y5.set(e,t);let n=e,s;do s=RR(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,a=this.getSameOriginWindowChain(e);for(let u of a){let c=u.window.deref();if(n+=c?.scrollY??0,s+=c?.scrollX??0,c===t||!u.iframeElement)break;let f=u.iframeElement.getBoundingClientRect();n+=f.top,s+=f.left}return{top:n,left:s}}},Nc=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=LR.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=n.left,this.posy-=n.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},$5=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(Im){let a=navigator.userAgent.match(/Chrome\/(\d+)/);s=(a?parseInt(a[1]):123)<=122}if(e){let a=e,u=e,c=e.view?.devicePixelRatio||1;if(typeof a.wheelDeltaY<"u")s?this.deltaY=a.wheelDeltaY/(120*c):this.deltaY=a.wheelDeltaY/120;else if(typeof u.VERTICAL_AXIS<"u"&&u.axis===u.VERTICAL_AXIS)this.deltaY=-u.detail/3;else if(e.type==="wheel"){let f=e;f.deltaMode===f.DOM_DELTA_LINE?P0&&!Ln?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof a.wheelDeltaX<"u")_R&&C8?this.deltaX=-(a.wheelDeltaX/120):s?this.deltaX=a.wheelDeltaX/(120*c):this.deltaX=a.wheelDeltaX/120;else if(typeof u.HORIZONTAL_AXIS<"u"&&u.axis===u.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){let f=e;f.deltaMode===f.DOM_DELTA_LINE?P0&&!Ln?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*c):this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent?.preventDefault()}stopPropagation(){this.browserEvent?.stopPropagation()}},T8=Object.freeze(function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}),zR;(e=>{function t(n){return n===e.None||n===e.Cancelled||n instanceof NR?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:ei.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:T8})})(zR||={});var NR=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?T8:(this._emitter||(this._emitter=new ce),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},Fm=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 z0("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw new z0("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},BR=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 z0("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let s=n.setInterval(()=>{e()},t);this.disposable=ct(()=>{n.clearInterval(s),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}},jR;(e=>{async function t(s){let a,u=await Promise.all(s.map(c=>c.then(f=>f,f=>{a||(a=f)})));if(typeof a<"u")throw a;return u}e.settled=t;function n(s){return new Promise(async(a,u)=>{try{await s(a,u)}catch(c){u(c)}})}e.withAsyncBody=n})(jR||={});var K5=class Ji{static fromArray(t){return new Ji(n=>{n.emitMany(t)})}static fromPromise(t){return new Ji(async n=>{n.emitMany(await t)})}static fromPromises(t){return new Ji(async n=>{await Promise.all(t.map(async s=>n.emitOne(await s)))})}static merge(t){return new Ji(async n=>{await Promise.all(t.map(async s=>{for await(let a of s)n.emitOne(a)}))})}constructor(t,n){this._state=0,this._results=[],this._error=null,this._onReturn=n,this._onStateChanged=new ce,queueMicrotask(async()=>{let s={emitOne:a=>this.emitOne(a),emitMany:a=>this.emitMany(a),reject:a=>this.reject(a)};try{await Promise.resolve(t(s)),this.resolve()}catch(a){this.reject(a)}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 ei.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,n){return new Ji(async s=>{for await(let a of t)s.emitOne(n(a))})}map(t){return Ji.map(this,t)}static filter(t,n){return new Ji(async s=>{for await(let a of t)n(a)&&s.emitOne(a)})}filter(t){return Ji.filter(this,t)}static coalesce(t){return Ji.filter(t,n=>!!n)}coalesce(){return Ji.coalesce(this)}static async toPromise(t){let n=[];for await(let s of t)n.push(s);return n}toPromise(){return Ji.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())}};K5.EMPTY=K5.fromArray([]);var{getWindow:Rn,getWindowId:HR,onDidRegisterWindow:IR}=(function(){let e=new Map,t={window:lr,disposables:new Jr};e.set(lr.vscodeWindowId,t);let n=new ce,s=new ce,a=new ce;function u(c,f){return(typeof c=="number"?e.get(c):void 0)??(f?t:void 0)}return{onDidRegisterWindow:n.event,onWillUnregisterWindow:a.event,onDidUnregisterWindow:s.event,registerWindow(c){if(e.has(c.vscodeWindowId))return He.None;let f=new Jr,m={window:c,disposables:f.add(new Jr)};return e.set(c.vscodeWindowId,m),f.add(ct(()=>{e.delete(c.vscodeWindowId),s.fire(c)})),f.add(ke(c,It.BEFORE_UNLOAD,()=>{a.fire(c)})),n.fire(m),f},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(c){return c.vscodeWindowId},hasWindow(c){return e.has(c)},getWindowById:u,getWindow(c){let f=c;if(f?.ownerDocument?.defaultView)return f.ownerDocument.defaultView.window;let m=c;return m?.view?m.view.window:lr},getDocument(c){return Rn(c).document}}})(),PR=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 ke(e,t,n,s){return new PR(e,t,n,s)}var W5=function(e,t,n,s){return ke(e,t,n,s)},Um,FR=class extends BR{constructor(e){super(),this.defaultTarget=e&&Rn(e)}cancelAndSet(e,t,n){return super.cancelAndSet(e,t,n??this.defaultTarget)}},G5=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){Uc(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let e=new Map,t=new Map,n=new Map,s=new Map,a=u=>{n.set(u,!1);let c=e.get(u)??[];for(t.set(u,c),e.set(u,[]),s.set(u,!0);c.length>0;)c.sort(G5.sort),c.shift().execute();s.set(u,!1)};Um=(u,c,f=0)=>{let m=HR(u),p=new G5(c,f),g=e.get(m);return g||(g=[],e.set(m,g)),g.push(p),n.get(m)||(n.set(m,!0),u.requestAnimationFrame(()=>a(m))),p}})();function UR(e){let t=e.getBoundingClientRect(),n=Rn(e);return{left:t.left+n.scrollX,top:t.top+n.scrollY,width:t.width,height:t.height}}var It={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"},VR=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=wi(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=wi(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=wi(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=wi(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=wi(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=wi(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=wi(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingTop(e){let t=wi(e);this._paddingTop!==t&&(this._paddingTop=t,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(e){let t=wi(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(e){let t=wi(e);this._paddingBottom!==t&&(this._paddingBottom=t,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(e){let t=wi(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=wi(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=wi(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=wi(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 wi(e){return typeof e=="number"?`${e}px`:e}function Ao(e){return new VR(e)}var M8=class{constructor(){this._hooks=new Jr,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,a){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=s,this._onStopCallback=a;let u=e;try{e.setPointerCapture(t),this._hooks.add(ct(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{u=Rn(e)}this._hooks.add(ke(u,It.POINTER_MOVE,c=>{if(c.buttons!==n){this.stopMonitoring(!0);return}c.preventDefault(),this._pointerMoveCallback(c)})),this._hooks.add(ke(u,It.POINTER_UP,c=>this.stopMonitoring(!0)))}};function qR(e,t,n){let s=null,a=null;if(typeof n.value=="function"?(s="value",a=n.value,a.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof n.get=="function"&&(s="get",a=n.get),!a)throw new Error("not supported");let u=`$memoize$${t}`;n[s]=function(...c){return this.hasOwnProperty(u)||Object.defineProperty(this,u,{configurable:!1,enumerable:!1,writable:!1,value:a.apply(this,c)}),this[u]}}var Dn;(e=>(e.Tap="-xterm-gesturetap",e.Change="-xterm-gesturechange",e.Start="-xterm-gesturestart",e.End="-xterm-gesturesend",e.Contextmenu="-xterm-gesturecontextmenu"))(Dn||={});var yo=class ii extends He{constructor(){super(),this.dispatched=!1,this.targets=new I5,this.ignoreTargets=new I5,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(ei.runAndSubscribe(IR,({window:t,disposables:n})=>{n.add(ke(t.document,"touchstart",s=>this.onTouchStart(s),{passive:!1})),n.add(ke(t.document,"touchend",s=>this.onTouchEnd(t,s))),n.add(ke(t.document,"touchmove",s=>this.onTouchMove(s),{passive:!1}))},{window:lr,disposables:this._store}))}static addTarget(t){if(!ii.isTouchDevice())return He.None;ii.INSTANCE||(ii.INSTANCE=new ii);let n=ii.INSTANCE.targets.push(t);return ct(n)}static ignoreTarget(t){if(!ii.isTouchDevice())return He.None;ii.INSTANCE||(ii.INSTANCE=new ii);let n=ii.INSTANCE.ignoreTargets.push(t);return ct(n)}static isTouchDevice(){return"ontouchstart"in lr||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,a=t.targetTouches.length;s<a;s++){let u=t.targetTouches.item(s);this.activeTouches[u.identifier]={id:u.identifier,initialTarget:u.target,initialTimeStamp:n,initialPageX:u.pageX,initialPageY:u.pageY,rollingTimestamps:[n],rollingPageX:[u.pageX],rollingPageY:[u.pageY]};let c=this.newGestureEvent(Dn.Start,u.target);c.pageX=u.pageX,c.pageY=u.pageY,this.dispatchEvent(c)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}onTouchEnd(t,n){let s=Date.now(),a=Object.keys(this.activeTouches).length;for(let u=0,c=n.changedTouches.length;u<c;u++){let f=n.changedTouches.item(u);if(!this.activeTouches.hasOwnProperty(String(f.identifier))){console.warn("move of an UNKNOWN touch",f);continue}let m=this.activeTouches[f.identifier],p=Date.now()-m.initialTimeStamp;if(p<ii.HOLD_DELAY&&Math.abs(m.initialPageX-ji(m.rollingPageX))<30&&Math.abs(m.initialPageY-ji(m.rollingPageY))<30){let g=this.newGestureEvent(Dn.Tap,m.initialTarget);g.pageX=ji(m.rollingPageX),g.pageY=ji(m.rollingPageY),this.dispatchEvent(g)}else if(p>=ii.HOLD_DELAY&&Math.abs(m.initialPageX-ji(m.rollingPageX))<30&&Math.abs(m.initialPageY-ji(m.rollingPageY))<30){let g=this.newGestureEvent(Dn.Contextmenu,m.initialTarget);g.pageX=ji(m.rollingPageX),g.pageY=ji(m.rollingPageY),this.dispatchEvent(g)}else if(a===1){let g=ji(m.rollingPageX),_=ji(m.rollingPageY),v=ji(m.rollingTimestamps)-m.rollingTimestamps[0],b=g-m.rollingPageX[0],w=_-m.rollingPageY[0],C=[...this.targets].filter(E=>m.initialTarget instanceof Node&&E.contains(m.initialTarget));this.inertia(t,C,s,Math.abs(b)/v,b>0?1:-1,g,Math.abs(w)/v,w>0?1:-1,_)}this.dispatchEvent(this.newGestureEvent(Dn.End,m.initialTarget)),delete this.activeTouches[f.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===Dn.Tap){let n=new Date().getTime(),s=0;n-this._lastSetTapCountTime>ii.CLEAR_TAP_COUNT_TIME?s=1:s=2,this._lastSetTapCountTime=n,t.tapCount=s}else(t.type===Dn.Change||t.type===Dn.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 a=0,u=t.initialTarget;for(;u&&u!==s;)a++,u=u.parentElement;n.push([a,s])}n.sort((s,a)=>s[0]-a[0]);for(let[s,a]of n)a.dispatchEvent(t),this.dispatched=!0}}inertia(t,n,s,a,u,c,f,m,p){this.handle=Um(t,()=>{let g=Date.now(),_=g-s,v=0,b=0,w=!0;a+=ii.SCROLL_FRICTION*_,f+=ii.SCROLL_FRICTION*_,a>0&&(w=!1,v=u*a*_),f>0&&(w=!1,b=m*f*_);let C=this.newGestureEvent(Dn.Change);C.translationX=v,C.translationY=b,n.forEach(E=>E.dispatchEvent(C)),w||this.inertia(t,n,g,a,u,c+v,f,m,p+b)})}onTouchMove(t){let n=Date.now();for(let s=0,a=t.changedTouches.length;s<a;s++){let u=t.changedTouches.item(s);if(!this.activeTouches.hasOwnProperty(String(u.identifier))){console.warn("end of an UNKNOWN touch",u);continue}let c=this.activeTouches[u.identifier],f=this.newGestureEvent(Dn.Change,c.initialTarget);f.translationX=u.pageX-ji(c.rollingPageX),f.translationY=u.pageY-ji(c.rollingPageY),f.pageX=u.pageX,f.pageY=u.pageY,this.dispatchEvent(f),c.rollingPageX.length>3&&(c.rollingPageX.shift(),c.rollingPageY.shift(),c.rollingTimestamps.shift()),c.rollingPageX.push(u.pageX),c.rollingPageY.push(u.pageY),c.rollingTimestamps.push(n)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}};yo.SCROLL_FRICTION=-.005,yo.HOLD_DELAY=700,yo.CLEAR_TAP_COUNT_TIME=400,gt([qR],yo,"isTouchDevice",1);var YR=yo,Vm=class extends He{onclick(e,t){this._register(ke(e,It.CLICK,n=>t(new Nc(Rn(e),n))))}onmousedown(e,t){this._register(ke(e,It.MOUSE_DOWN,n=>t(new Nc(Rn(e),n))))}onmouseover(e,t){this._register(ke(e,It.MOUSE_OVER,n=>t(new Nc(Rn(e),n))))}onmouseleave(e,t){this._register(ke(e,It.MOUSE_LEAVE,n=>t(new Nc(Rn(e),n))))}onkeydown(e,t){this._register(ke(e,It.KEY_DOWN,n=>t(new q5(n))))}onkeyup(e,t){this._register(ke(e,It.KEY_UP,n=>t(new q5(n))))}oninput(e,t){this._register(ke(e,It.INPUT,t))}onblur(e,t){this._register(ke(e,It.BLUR,t))}onfocus(e,t){this._register(ke(e,It.FOCUS,t))}onchange(e,t){this._register(ke(e,It.CHANGE,t))}ignoreGesture(e){return YR.ignoreTarget(e)}},X5=11,$R=class extends Vm{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=X5+"px",this.domNode.style.height=X5+"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 M8),this._register(W5(this.bgDomNode,It.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(W5(this.domNode,It.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new FR),this._pointerdownScheduleRepeatTimer=this._register(new Fm)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,Rn(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()}},KR=class V0{constructor(t,n,s,a,u,c,f){this._forceIntegerValues=t,this._scrollStateBrand=void 0,this._forceIntegerValues&&(n=n|0,s=s|0,a=a|0,u=u|0,c=c|0,f=f|0),this.rawScrollLeft=a,this.rawScrollTop=f,n<0&&(n=0),a+n>s&&(a=s-n),a<0&&(a=0),u<0&&(u=0),f+u>c&&(f=c-u),f<0&&(f=0),this.width=n,this.scrollWidth=s,this.scrollLeft=a,this.height=u,this.scrollHeight=c,this.scrollTop=f}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 V0(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 V0(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,a=this.scrollWidth!==t.scrollWidth,u=this.scrollLeft!==t.scrollLeft,c=this.height!==t.height,f=this.scrollHeight!==t.scrollHeight,m=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:a,scrollLeftChanged:u,heightChanged:c,scrollHeightChanged:f,scrollTopChanged:m}}},WR=class extends He{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new ce),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new KR(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 Q5(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=Q5.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)))}},Z5=class{constructor(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n}};function $1(e,t){let n=t-e;return function(s){return e+n*ZR(s)}}function GR(e,t,n){return function(s){return s<n?e(s/n):t((s-n)/(1-n))}}var Q5=class q0{constructor(t,n,s,a){this.from=t,this.to=n,this.duration=a,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 a,u;return t<n?(a=t+.75*s,u=n-.75*s):(a=t-.75*s,u=n+.75*s),GR($1(t,a),$1(u,n),.33)}return $1(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),a=this.scrollTop(n);return new Z5(s,a,!1)}return new Z5(this.to.scrollLeft,this.to.scrollTop,!0)}combine(t,n,s){return q0.start(t,n,s)}static start(t,n,s){s=s+10;let a=Date.now()-10;return new q0(t,n,a,s)}};function XR(e){return Math.pow(e,3)}function ZR(e){return 1-XR(1-e)}var QR=class extends He{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 Fm)}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":"")))}},JR=140,D8=class extends Vm{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 QR(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new M8),this._shouldRender=!0,this.domNode=Ao(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(ke(this.domNode.domNode,It.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){let t=this._register(new $R(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,n,s){this.slider=Ao(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(ke(this.slider.domNode,It.POINTER_DOWN,a=>{a.button===0&&(a.preventDefault(),this._sliderPointerDown(a))})),this.onclick(this.slider.domNode,a=>{a.leftButton&&a.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(),a=this._sliderPointerPosition(e);n<=a&&a<=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 a=UR(this.domNode.domNode);t=e.pageX-a.left,n=e.pageY-a.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,a=>{let u=this._sliderOrthogonalPointerPosition(a),c=Math.abs(u-n);if(C8&&c>JR){this._setDesiredScrollPositionNow(s.getScrollPosition());return}let f=this._sliderPointerPosition(a)-t;this._setDesiredScrollPositionNow(s.getDesiredScrollPositionFromDelta(f))},()=>{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()}},A8=class Y0{constructor(t,n,s,a,u,c){this._scrollbarSize=Math.round(n),this._oppositeScrollbarSize=Math.round(s),this._arrowSize=Math.round(t),this._visibleSize=a,this._scrollSize=u,this._scrollPosition=c,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new Y0(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,a,u){let c=Math.max(0,s-t),f=Math.max(0,c-2*n),m=a>0&&a>s;if(!m)return{computedAvailableSize:Math.round(c),computedIsNeeded:m,computedSliderSize:Math.round(f),computedSliderRatio:0,computedSliderPosition:0};let p=Math.round(Math.max(20,Math.floor(s*f/a))),g=(f-p)/(a-s),_=u*g;return{computedAvailableSize:Math.round(c),computedIsNeeded:m,computedSliderSize:Math.round(p),computedSliderRatio:g,computedSliderPosition:Math.round(_)}}_refreshComputedValues(){let t=Y0._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)}},eL=class extends D8{constructor(e,t,n){let s=e.getScrollDimensions(),a=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new A8(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,s.width,s.scrollWidth,a.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}},tL=class extends D8{constructor(e,t,n){let s=e.getScrollDimensions(),a=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new A8(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,s.height,s.scrollHeight,a.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}},iL=500,J5=50,nL=class{constructor(e,t,n){this.timestamp=e,this.deltaX=t,this.deltaY=n,this.score=0}},$0=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,a=this._rear;do{let u=a===this._front?t:Math.pow(2,-s);if(t-=u,n+=this._memory[a].score*u,a===this._front)break;a=(this._capacity+a-1)%this._capacity,s++}while(!0);return n<=.5}acceptStandardWheelEvent(t){if(Im){let n=Rn(t.browserEvent),s=pR(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 a=null,u=new nL(t,n,s);this._front===-1&&this._rear===-1?(this._memory[0]=u,this._front=0,this._rear=0):(a=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]=u),u.score=this._computeScore(u,a)}_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 a=Math.abs(t.deltaX),u=Math.abs(t.deltaY),c=Math.abs(n.deltaX),f=Math.abs(n.deltaY),m=Math.max(Math.min(a,c),1),p=Math.max(Math.min(u,f),1),g=Math.max(a,c),_=Math.max(u,f);g%m===0&&_%p===0&&(s-=.5)}return Math.min(Math.max(s,0),1)}_isAlmostInt(t){return Math.abs(Math.round(t)-t)<.01}};$0.INSTANCE=new $0;var rL=$0,sL=class extends Vm{constructor(e,t,n){super(),this._onScroll=this._register(new ce),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new ce),this.onWillScroll=this._onWillScroll.event,this._options=aL(t),this._scrollable=n,this._register(this._scrollable.onScroll(a=>{this._onWillScroll.fire(a),this._onDidScroll(a),this._onScroll.fire(a)}));let s={onMouseWheel:a=>this._onMouseWheel(a),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new tL(this._scrollable,this._options,s)),this._horizontalScrollbar=this._register(new eL(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=Ao(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=Ao(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=Ao(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,a=>this._onMouseOver(a)),this.onmouseleave(this._listenOnDomNode,a=>this._onMouseLeave(a)),this._hideTimeout=this._register(new Fm),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=Ps(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,Ln&&(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 $5(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=Ps(this._mouseWheelToDispose),e)){let t=n=>{this._onMouseWheel(new $5(n))};this._mouseWheelToDispose.push(ke(this._listenOnDomNode,It.MOUSE_WHEEL,t,{passive:!1}))}}_onMouseWheel(e){if(e.browserEvent?.defaultPrevented)return;let t=rL.INSTANCE;t.acceptStandardWheelEvent(e);let n=!1;if(e.deltaY||e.deltaX){let a=e.deltaY*this._options.mouseWheelScrollSensitivity,u=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&u+a===0?u=a=0:Math.abs(a)>=Math.abs(u)?u=0:a=0),this._options.flipAxes&&([a,u]=[u,a]);let c=!Ln&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||c)&&!u&&(u=a,a=0),e.browserEvent&&e.browserEvent.altKey&&(u=u*this._options.fastScrollSensitivity,a=a*this._options.fastScrollSensitivity);let f=this._scrollable.getFutureScrollPosition(),m={};if(a){let p=J5*a,g=f.scrollTop-(p<0?Math.floor(p):Math.ceil(p));this._verticalScrollbar.writeScrollPosition(m,g)}if(u){let p=J5*u,g=f.scrollLeft-(p<0?Math.floor(p):Math.ceil(p));this._horizontalScrollbar.writeScrollPosition(m,g)}m=this._scrollable.validateScrollPosition(m),(f.scrollLeft!==m.scrollLeft||f.scrollTop!==m.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(m):this._scrollable.setScrollPositionNow(m),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":"",a=t?" top":"",u=n||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${s}`),this._topShadowDomNode.setClassName(`shadow${a}`),this._topLeftShadowDomNode.setClassName(`shadow${u}${a}${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(),iL)}},lL=class extends sL{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 aL(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,Ln&&(t.className+=" mac"),t}var K0=class extends He{constructor(e,t,n,s,a,u,c,f){super(),this._bufferService=n,this._optionsService=c,this._renderService=f,this._onRequestScrollLines=this._register(new ce),this.onRequestScrollLines=this._onRequestScrollLines.event,this._isSyncing=!1,this._isHandlingScroll=!1,this._suppressOnScrollHandler=!1;let m=this._register(new WR({forceIntegerValues:!1,smoothScrollDuration:this._optionsService.rawOptions.smoothScrollDuration,scheduleAtNextAnimationFrame:p=>Um(s.window,p)}));this._register(this._optionsService.onSpecificOptionChange("smoothScrollDuration",()=>{m.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration)})),this._scrollableElement=this._register(new lL(t,{vertical:1,horizontal:2,useShadows:!1,mouseWheelSmoothScroll:!0,...this._getChangeOptions()},m)),this._register(this._optionsService.onMultipleOptionChange(["scrollSensitivity","fastScrollSensitivity","overviewRuler"],()=>this._scrollableElement.updateOptions(this._getChangeOptions()))),this._register(a.onProtocolChange(p=>{this._scrollableElement.updateOptions({handleMouseWheel:!(p&16)})})),this._scrollableElement.setScrollDimensions({height:0,scrollHeight:0}),this._register(ei.runAndSubscribe(u.onChangeColors,()=>{this._scrollableElement.getDomNode().style.backgroundColor=u.colors.background.css})),e.appendChild(this._scrollableElement.getDomNode()),this._register(ct(()=>this._scrollableElement.getDomNode().remove())),this._styleElement=s.mainDocument.createElement("style"),t.appendChild(this._styleElement),this._register(ct(()=>this._styleElement.remove())),this._register(ei.runAndSubscribe(u.onChangeColors,()=>{this._styleElement.textContent=[".xterm .xterm-scrollable-element > .scrollbar > .slider {",` background: ${u.colors.scrollbarSliderBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider:hover {",` background: ${u.colors.scrollbarSliderHoverBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider.active {",` background: ${u.colors.scrollbarSliderActiveBackground.css};`,"}"].join(`
63
- `)})),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(p=>this._handleScroll(p)))}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}};K0=gt([de(2,di),de(3,ur),de(4,c8),de(5,ra),de(6,pi),de(7,cr)],K0);var W0=class extends He{constructor(e,t,n,s,a){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=n,this._decorationService=s,this._renderService=a,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(u=>this._removeDecoration(u))),this._register(ct(()=>{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()}};W0=gt([de(1,di),de(2,ur),de(3,Go),de(4,cr)],W0);var oL=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)}},Tn={full:0,left:0,center:0,right:0},qr={full:0,left:0,center:0,right:0},ho={full:0,left:0,center:0,right:0},dh=class extends He{constructor(e,t,n,s,a,u,c,f){super(),this._viewportElement=e,this._screenElement=t,this._bufferService=n,this._decorationService=s,this._renderService=a,this._optionsService=u,this._themeService=c,this._coreBrowserService=f,this._colorZoneStore=new oL,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(ct(()=>this._canvas?.remove()));let m=this._canvas.getContext("2d");if(m)this._ctx=m;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);qr.full=this._canvas.width,qr.left=e,qr.center=t,qr.right=e,this._refreshDrawHeightConstants(),ho.full=1,ho.left=1,ho.center=1+qr.left,ho.right=1+qr.left+qr.center}_refreshDrawHeightConstants(){Tn.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);Tn.left=t,Tn.center=t,Tn.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Tn.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Tn.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Tn.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Tn.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(ho[e.position||"full"],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-Tn[e.position||"full"]/2),qr[e.position||"full"],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+Tn[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}))}};dh=gt([de(2,di),de(3,Go),de(4,cr),de(5,pi),de(6,ra),de(7,ur)],dh);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=`
64
- `,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 Yc;(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="Ÿ"))(Yc||={});var O8;(e=>e.ST=`${re.ESC}\\`)(O8||={});var G0=class{constructor(e,t,n,s,a,u){this._textarea=e,this._compositionView=t,this._bufferService=n,this._optionsService=s,this._coreService=a,this._renderService=u,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,a=t*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=a+"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 u=this._compositionView.getBoundingClientRect();this._textarea.style.left=a+"px",this._textarea.style.top=s+"px",this._textarea.style.width=Math.max(u.width,1)+"px",this._textarea.style.height=Math.max(u.height,1)+"px",this._textarea.style.lineHeight=u.height+"px"}e||setTimeout(()=>this.updateCompositionElements(!0),0)}}};G0=gt([de(2,di),de(3,pi),de(4,Ys),de(5,cr)],G0);var Pt=0,Ft=0,Ut=0,_t=0,e4={css:"#00000000",rgba:0},Mt;(e=>{function t(a,u,c,f){return f!==void 0?`#${Ts(a)}${Ts(u)}${Ts(c)}${Ts(f)}`:`#${Ts(a)}${Ts(u)}${Ts(c)}`}e.toCss=t;function n(a,u,c,f=255){return(a<<24|u<<16|c<<8|f)>>>0}e.toRgba=n;function s(a,u,c,f){return{css:e.toCss(a,u,c,f),rgba:e.toRgba(a,u,c,f)}}e.toColor=s})(Mt||={});var ot;(e=>{function t(m,p){if(_t=(p.rgba&255)/255,_t===1)return{css:p.css,rgba:p.rgba};let g=p.rgba>>24&255,_=p.rgba>>16&255,v=p.rgba>>8&255,b=m.rgba>>24&255,w=m.rgba>>16&255,C=m.rgba>>8&255;Pt=b+Math.round((g-b)*_t),Ft=w+Math.round((_-w)*_t),Ut=C+Math.round((v-C)*_t);let E=Mt.toCss(Pt,Ft,Ut),D=Mt.toRgba(Pt,Ft,Ut);return{css:E,rgba:D}}e.blend=t;function n(m){return(m.rgba&255)===255}e.isOpaque=n;function s(m,p,g){let _=$c.ensureContrastRatio(m.rgba,p.rgba,g);if(_)return Mt.toColor(_>>24&255,_>>16&255,_>>8&255)}e.ensureContrastRatio=s;function a(m){let p=(m.rgba|255)>>>0;return[Pt,Ft,Ut]=$c.toChannels(p),{css:Mt.toCss(Pt,Ft,Ut),rgba:p}}e.opaque=a;function u(m,p){return _t=Math.round(p*255),[Pt,Ft,Ut]=$c.toChannels(m.rgba),{css:Mt.toCss(Pt,Ft,Ut,_t),rgba:Mt.toRgba(Pt,Ft,Ut,_t)}}e.opacity=u;function c(m,p){return _t=m.rgba&255,u(m,_t*p/255)}e.multiplyOpacity=c;function f(m){return[m.rgba>>24&255,m.rgba>>16&255,m.rgba>>8&255]}e.toColorRGB=f})(ot||={});var dt;(e=>{let t,n;try{let a=document.createElement("canvas");a.width=1,a.height=1;let u=a.getContext("2d",{willReadFrequently:!0});u&&(t=u,t.globalCompositeOperation="copy",n=t.createLinearGradient(0,0,1,1))}catch{}function s(a){if(a.match(/#[\da-f]{3,8}/i))switch(a.length){case 4:return Pt=parseInt(a.slice(1,2).repeat(2),16),Ft=parseInt(a.slice(2,3).repeat(2),16),Ut=parseInt(a.slice(3,4).repeat(2),16),Mt.toColor(Pt,Ft,Ut);case 5:return Pt=parseInt(a.slice(1,2).repeat(2),16),Ft=parseInt(a.slice(2,3).repeat(2),16),Ut=parseInt(a.slice(3,4).repeat(2),16),_t=parseInt(a.slice(4,5).repeat(2),16),Mt.toColor(Pt,Ft,Ut,_t);case 7:return{css:a,rgba:(parseInt(a.slice(1),16)<<8|255)>>>0};case 9:return{css:a,rgba:parseInt(a.slice(1),16)>>>0}}let u=a.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(u)return Pt=parseInt(u[1]),Ft=parseInt(u[2]),Ut=parseInt(u[3]),_t=Math.round((u[5]===void 0?1:parseFloat(u[5]))*255),Mt.toColor(Pt,Ft,Ut,_t);if(!t||!n)throw new Error("css.toColor: Unsupported css format");if(t.fillStyle=n,t.fillStyle=a,typeof t.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(t.fillRect(0,0,1,1),[Pt,Ft,Ut,_t]=t.getImageData(0,0,1,1).data,_t!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:Mt.toRgba(Pt,Ft,Ut,_t),css:a}}e.toColor=s})(dt||={});var ci;(e=>{function t(s){return n(s>>16&255,s>>8&255,s&255)}e.relativeLuminance=t;function n(s,a,u){let c=s/255,f=a/255,m=u/255,p=c<=.03928?c/12.92:Math.pow((c+.055)/1.055,2.4),g=f<=.03928?f/12.92:Math.pow((f+.055)/1.055,2.4),_=m<=.03928?m/12.92:Math.pow((m+.055)/1.055,2.4);return p*.2126+g*.7152+_*.0722}e.relativeLuminance2=n})(ci||={});var $c;(e=>{function t(c,f){if(_t=(f&255)/255,_t===1)return f;let m=f>>24&255,p=f>>16&255,g=f>>8&255,_=c>>24&255,v=c>>16&255,b=c>>8&255;return Pt=_+Math.round((m-_)*_t),Ft=v+Math.round((p-v)*_t),Ut=b+Math.round((g-b)*_t),Mt.toRgba(Pt,Ft,Ut)}e.blend=t;function n(c,f,m){let p=ci.relativeLuminance(c>>8),g=ci.relativeLuminance(f>>8);if(rr(p,g)<m){if(g<p){let b=s(c,f,m),w=rr(p,ci.relativeLuminance(b>>8));if(w<m){let C=a(c,f,m),E=rr(p,ci.relativeLuminance(C>>8));return w>E?b:C}return b}let _=a(c,f,m),v=rr(p,ci.relativeLuminance(_>>8));if(v<m){let b=s(c,f,m),w=rr(p,ci.relativeLuminance(b>>8));return v>w?_:b}return _}}e.ensureContrastRatio=n;function s(c,f,m){let p=c>>24&255,g=c>>16&255,_=c>>8&255,v=f>>24&255,b=f>>16&255,w=f>>8&255,C=rr(ci.relativeLuminance2(v,b,w),ci.relativeLuminance2(p,g,_));for(;C<m&&(v>0||b>0||w>0);)v-=Math.max(0,Math.ceil(v*.1)),b-=Math.max(0,Math.ceil(b*.1)),w-=Math.max(0,Math.ceil(w*.1)),C=rr(ci.relativeLuminance2(v,b,w),ci.relativeLuminance2(p,g,_));return(v<<24|b<<16|w<<8|255)>>>0}e.reduceLuminance=s;function a(c,f,m){let p=c>>24&255,g=c>>16&255,_=c>>8&255,v=f>>24&255,b=f>>16&255,w=f>>8&255,C=rr(ci.relativeLuminance2(v,b,w),ci.relativeLuminance2(p,g,_));for(;C<m&&(v<255||b<255||w<255);)v=Math.min(255,v+Math.ceil((255-v)*.1)),b=Math.min(255,b+Math.ceil((255-b)*.1)),w=Math.min(255,w+Math.ceil((255-w)*.1)),C=rr(ci.relativeLuminance2(v,b,w),ci.relativeLuminance2(p,g,_));return(v<<24|b<<16|w<<8|255)>>>0}e.increaseLuminance=a;function u(c){return[c>>24&255,c>>16&255,c>>8&255,c&255]}e.toChannels=u})($c||={});function Ts(e){let t=e.toString(16);return t.length<2?"0"+t:t}function rr(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}var uL=class extends Wo{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 rn}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),a=0,u=0,c=0,f=t.getFg(0),m=t.getBg(0);for(let p=0;p<t.getTrimmedLength();p++)if(t.loadCell(p,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==f||this._workCell.bg!==m){if(p-a>1){let g=this._getJoinedRanges(s,c,u,t,a);for(let _=0;_<g.length;_++)n.push(g[_])}a=p,c=u,f=this._workCell.fg,m=this._workCell.bg}u+=this._workCell.getChars().length||Zr.length}if(this._bufferService.cols-a>1){let p=this._getJoinedRanges(s,c,u,t,a);for(let g=0;g<p.length;g++)n.push(p[g])}return n}_getJoinedRanges(e,t,n,s,a){let u=e.substring(t,n),c=[];try{c=this._characterJoiners[0].handler(u)}catch(f){console.error(f)}for(let f=1;f<this._characterJoiners.length;f++)try{let m=this._characterJoiners[f].handler(u);for(let p=0;p<m.length;p++)ph._mergeRanges(c,m[p])}catch(m){console.error(m)}return this._stringRangesToCellRanges(c,s,a),c}_stringRangesToCellRanges(e,t,n){let s=0,a=!1,u=0,c=e[s];if(c){for(let f=n;f<this._bufferService.cols;f++){let m=t.getWidth(f),p=t.getString(f).length||Zr.length;if(m!==0){if(!a&&c[0]<=u&&(c[0]=f,a=!0),c[1]<=u){if(c[1]=f,c=e[++s],!c)break;c[0]<=u?(c[0]=f,a=!0):a=!1}u+=p}}c&&(c[1]=this._bufferService.cols)}}static _mergeRanges(e,t){let n=!1;for(let s=0;s<e.length;s++){let a=e[s];if(n){if(t[1]<=a[0])return e[s-1][1]=t[1],e;if(t[1]<=a[1])return e[s-1][1]=Math.max(t[1],a[1]),e.splice(s,1),e;e.splice(s,1),s--}else{if(t[1]<=a[0])return e.splice(s,0,t),e;if(t[1]<=a[1])return a[0]=Math.min(t[0],a[0]),e;t[0]<a[1]&&(a[0]=Math.min(t[0],a[0]),n=!0);continue}}return n?e[e.length-1][1]=t[1]:e.push(t),e}};ph=gt([de(0,di)],ph);function cL(e){return 57508<=e&&e<=57558}function hL(e){return 9472<=e&&e<=9631}function fL(e){return cL(e)||hL(e)}function dL(){return{css:{canvas:Bc(),cell:Bc()},device:{canvas:Bc(),cell:Bc(),char:{width:0,height:0,left:0,top:0}}}}function Bc(){return{width:0,height:0}}var X0=class{constructor(e,t,n,s,a,u,c){this._document=e,this._characterJoinerService=t,this._optionsService=n,this._coreBrowserService=s,this._coreService=a,this._decorationService=u,this._themeService=c,this._workCell=new rn,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(e,t,n){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=n}createRow(e,t,n,s,a,u,c,f,m,p,g){let _=[],v=this._characterJoinerService.getJoinedCharacters(t),b=this._themeService.colors,w=e.getNoBgTrimmedLength();n&&w<u+1&&(w=u+1);let C,E=0,D="",K=0,V=0,Z=0,se=0,z=!1,T=0,$=!1,ae=0,N=0,J=[],W=p!==-1&&g!==-1;for(let G=0;G<w;G++){e.loadCell(G,this._workCell);let Q=this._workCell.getWidth();if(Q===0)continue;let P=!1,B=G>=N,ee=G,U=this._workCell;if(v.length>0&&G===v[0][0]&&B){let ze=v.shift(),Hn=this._isCellInSelection(ze[0],t);for(K=ze[0]+1;K<ze[1];K++)B&&=Hn===this._isCellInSelection(K,t);B&&=!n||u<ze[0]||u>=ze[1],B?(P=!0,U=new uL(this._workCell,e.translateToString(!0,ze[0],ze[1]),ze[1]-ze[0]),ee=ze[1]-1,Q=U.getWidth()):N=ze[1]}let fe=this._isCellInSelection(G,t),k=n&&G===u,Ie=W&&G>=p&&G<=g,We=!1;this._decorationService.forEachDecorationAtCell(G,t,void 0,ze=>{We=!0});let O=U.getChars()||Zr;if(O===" "&&(U.isUnderline()||U.isOverline())&&(O=" "),ae=Q*f-m.get(O,U.isBold(),U.isItalic()),!C)C=this._document.createElement("span");else if(E&&(fe&&$||!fe&&!$&&U.bg===V)&&(fe&&$&&b.selectionForeground||U.fg===Z)&&U.extended.ext===se&&Ie===z&&ae===T&&!k&&!P&&!We&&B){U.isInvisible()?D+=Zr:D+=O,E++;continue}else E&&(C.textContent=D),C=this._document.createElement("span"),E=0,D="";if(V=U.bg,Z=U.fg,se=U.extended.ext,z=Ie,T=ae,$=fe,P&&u>=G&&u<=ee&&(u=G),!this._coreService.isCursorHidden&&k&&this._coreService.isCursorInitialized){if(J.push("xterm-cursor"),this._coreBrowserService.isFocused)c&&J.push("xterm-cursor-blink"),J.push(s==="bar"?"xterm-cursor-bar":s==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(a)switch(a){case"outline":J.push("xterm-cursor-outline");break;case"block":J.push("xterm-cursor-block");break;case"bar":J.push("xterm-cursor-bar");break;case"underline":J.push("xterm-cursor-underline");break}}if(U.isBold()&&J.push("xterm-bold"),U.isItalic()&&J.push("xterm-italic"),U.isDim()&&J.push("xterm-dim"),U.isInvisible()?D=Zr:D=U.getChars()||Zr,U.isUnderline()&&(J.push(`xterm-underline-${U.extended.underlineStyle}`),D===" "&&(D=" "),!U.isUnderlineColorDefault()))if(U.isUnderlineColorRGB())C.style.textDecorationColor=`rgb(${Wo.toColorRGB(U.getUnderlineColor()).join(",")})`;else{let ze=U.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&U.isBold()&&ze<8&&(ze+=8),C.style.textDecorationColor=b.ansi[ze].css}U.isOverline()&&(J.push("xterm-overline"),D===" "&&(D=" ")),U.isStrikethrough()&&J.push("xterm-strikethrough"),Ie&&(C.style.textDecoration="underline");let A=U.getFgColor(),ne=U.getFgColorMode(),oe=U.getBgColor(),pe=U.getBgColorMode(),Te=!!U.isInverse();if(Te){let ze=A;A=oe,oe=ze;let Hn=ne;ne=pe,pe=Hn}let Ee,Oe,me=!1;this._decorationService.forEachDecorationAtCell(G,t,void 0,ze=>{ze.options.layer!=="top"&&me||(ze.backgroundColorRGB&&(pe=50331648,oe=ze.backgroundColorRGB.rgba>>8&16777215,Ee=ze.backgroundColorRGB),ze.foregroundColorRGB&&(ne=50331648,A=ze.foregroundColorRGB.rgba>>8&16777215,Oe=ze.foregroundColorRGB),me=ze.options.layer==="top")}),!me&&fe&&(Ee=this._coreBrowserService.isFocused?b.selectionBackgroundOpaque:b.selectionInactiveBackgroundOpaque,oe=Ee.rgba>>8&16777215,pe=50331648,me=!0,b.selectionForeground&&(ne=50331648,A=b.selectionForeground.rgba>>8&16777215,Oe=b.selectionForeground)),me&&J.push("xterm-decoration-top");let ye;switch(pe){case 16777216:case 33554432:ye=b.ansi[oe],J.push(`xterm-bg-${oe}`);break;case 50331648:ye=Mt.toColor(oe>>16,oe>>8&255,oe&255),this._addStyle(C,`background-color:#${t4((oe>>>0).toString(16),"0",6)}`);break;default:Te?(ye=b.foreground,J.push("xterm-bg-257")):ye=b.background}switch(Ee||U.isDim()&&(Ee=ot.multiplyOpacity(ye,.5)),ne){case 16777216:case 33554432:U.isBold()&&A<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(A+=8),this._applyMinimumContrast(C,ye,b.ansi[A],U,Ee,void 0)||J.push(`xterm-fg-${A}`);break;case 50331648:let ze=Mt.toColor(A>>16&255,A>>8&255,A&255);this._applyMinimumContrast(C,ye,ze,U,Ee,Oe)||this._addStyle(C,`color:#${t4(A.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(C,ye,b.foreground,U,Ee,Oe)||Te&&J.push("xterm-fg-257")}J.length&&(C.className=J.join(" "),J.length=0),!k&&!P&&!We&&B?E++:C.textContent=D,ae!==this.defaultSpacing&&(C.style.letterSpacing=`${ae}px`),_.push(C),G=ee}return C&&E&&(C.textContent=D),_}_applyMinimumContrast(e,t,n,s,a,u){if(this._optionsService.rawOptions.minimumContrastRatio===1||fL(s.getCode()))return!1;let c=this._getContrastCache(s),f;if(!a&&!u&&(f=c.getColor(t.rgba,n.rgba)),f===void 0){let m=this._optionsService.rawOptions.minimumContrastRatio/(s.isDim()?2:1);f=ot.ensureContrastRatio(a||t,u||n,m),c.setColor((a||t).rgba,(u||n).rgba,f??null)}return f?(this._addStyle(e,`color:${f.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]}};X0=gt([de(1,d8),de(2,pi),de(3,ur),de(4,Ys),de(5,Go),de(6,ra)],X0);function t4(e,t,n){for(;e.length<n;)e=t+e;return e}var pL=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 a=e.createElement("span");a.classList.add("xterm-char-measure-element"),a.style.fontStyle="italic";let u=e.createElement("span");u.classList.add("xterm-char-measure-element"),u.style.fontWeight="bold",u.style.fontStyle="italic",this._measureElements=[n,s,a,u],this._container.appendChild(n),this._container.appendChild(s),this._container.appendChild(a),this._container.appendChild(u),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 c=this._measure(e,0);return c>0&&(this._flat[s]=c),c}let a=e;t&&(a+="B"),n&&(a+="I");let u=this._holey.get(a);if(u===void 0){let c=0;t&&(c|=1),n&&(c|=2),u=this._measure(e,c),u>0&&this._holey.set(a,u)}return u}_measure(e,t){let n=this._measureElements[t];return n.textContent=e.repeat(32),n.offsetWidth/32}},mL=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 a=e.buffers.active.ydisp,u=t[1]-a,c=n[1]-a,f=Math.max(u,0),m=Math.min(c,e.rows-1);if(f>=e.rows||m<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=s,this.viewportStartRow=u,this.viewportEndRow=c,this.viewportCappedStartRow=f,this.viewportCappedEndRow=m,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 _L(){return new mL}var K1="xterm-dom-renderer-owner-",Qi="xterm-rows",jc="xterm-fg-",i4="xterm-bg-",fo="xterm-focus",Hc="xterm-selection",gL=1,Z0=class extends He{constructor(e,t,n,s,a,u,c,f,m,p,g,_,v,b){super(),this._terminal=e,this._document=t,this._element=n,this._screenElement=s,this._viewportElement=a,this._helperContainer=u,this._linkifier2=c,this._charSizeService=m,this._optionsService=p,this._bufferService=g,this._coreService=_,this._coreBrowserService=v,this._themeService=b,this._terminalClass=gL++,this._rowElements=[],this._selectionRenderModel=_L(),this.onRequestRedraw=this._register(new ce).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(Qi),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(Hc),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=dL(),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=f.createInstance(X0,document),this._element.classList.add(K1+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(ct(()=>{this._element.classList.remove(K1+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new pL(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} .${Qi} 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} .${Qi} { 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} .${Qi} .xterm-dim { color: ${ot.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}`,a=`blink_block_${this._terminalClass}`;t+=`@keyframes ${n} { 50% { border-bottom-style: hidden; }}`,t+=`@keyframes ${s} { 50% { box-shadow: none; }}`,t+=`@keyframes ${a} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .${Qi}.${fo} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${n} 1s step-end infinite;}${this._terminalSelector} .${Qi}.${fo} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${s} 1s step-end infinite;}${this._terminalSelector} .${Qi}.${fo} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${a} 1s step-end infinite;}${this._terminalSelector} .${Qi} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${Qi} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${Qi} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${Qi} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${Qi} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .${Hc} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${Hc} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${Hc} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(let[u,c]of e.ansi.entries())t+=`${this._terminalSelector} .${jc}${u} { color: ${c.css}; }${this._terminalSelector} .${jc}${u}.xterm-dim { color: ${ot.multiplyOpacity(c,.5).css}; }${this._terminalSelector} .${i4}${u} { background-color: ${c.css}; }`;t+=`${this._terminalSelector} .${jc}257 { color: ${ot.opaque(e.background).css}; }${this._terminalSelector} .${jc}257.xterm-dim { color: ${ot.multiplyOpacity(ot.opaque(e.background),.5).css}; }${this._terminalSelector} .${i4}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(fo),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(fo),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,a=this._selectionRenderModel.viewportEndRow,u=this._selectionRenderModel.viewportCappedStartRow,c=this._selectionRenderModel.viewportCappedEndRow,f=this._document.createDocumentFragment();if(n){let m=e[0]>t[0];f.appendChild(this._createSelectionElement(u,m?t[0]:e[0],m?e[0]:t[0],c-u+1))}else{let m=s===u?e[0]:0,p=u===a?t[0]:this._bufferService.cols;f.appendChild(this._createSelectionElement(u,m,p));let g=c-u-1;if(f.appendChild(this._createSelectionElement(u+1,0,this._bufferService.cols,g)),u!==c){let _=a===c?t[0]:this._bufferService.cols;f.appendChild(this._createSelectionElement(c,0,_))}}this._selectionContainer.appendChild(f)}_createSelectionElement(e,t,n,s=1){let a=this._document.createElement("div"),u=t*this.dimensions.css.cell.width,c=this.dimensions.css.cell.width*(n-t);return u+c>this.dimensions.css.canvas.width&&(c=this.dimensions.css.canvas.width-u),a.style.height=`${s*this.dimensions.css.cell.height}px`,a.style.top=`${e*this.dimensions.css.cell.height}px`,a.style.left=`${u}px`,a.style.width=`${c}px`,a}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,a=Math.min(n.x,this._bufferService.cols-1),u=this._coreService.decPrivateModes.cursorBlink??this._optionsService.rawOptions.cursorBlink,c=this._coreService.decPrivateModes.cursorStyle??this._optionsService.rawOptions.cursorStyle,f=this._optionsService.rawOptions.cursorInactiveStyle;for(let m=e;m<=t;m++){let p=m+n.ydisp,g=this._rowElements[m],_=n.lines.get(p);if(!g||!_)break;g.replaceChildren(...this._rowFactory.createRow(_,p,p===s,c,f,a,u,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${K1}${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,a,u){n<0&&(e=0),s<0&&(t=0);let c=this._bufferService.rows-1;n=Math.max(Math.min(n,c),0),s=Math.max(Math.min(s,c),0),a=Math.min(a,this._bufferService.cols);let f=this._bufferService.buffer,m=f.ybase+f.y,p=Math.min(f.x,a-1),g=this._optionsService.rawOptions.cursorBlink,_=this._optionsService.rawOptions.cursorStyle,v=this._optionsService.rawOptions.cursorInactiveStyle;for(let b=n;b<=s;++b){let w=b+f.ydisp,C=this._rowElements[b],E=f.lines.get(w);if(!C||!E)break;C.replaceChildren(...this._rowFactory.createRow(E,w,w===m,_,v,p,g,this.dimensions.css.cell.width,this._widthCache,u?b===n?e:0:-1,u?(b===s?t:a)-1:-1))}}};Z0=gt([de(7,Bm),de(8,Lh),de(9,pi),de(10,di),de(11,Ys),de(12,ur),de(13,ra)],Z0);var Q0=class extends He{constructor(e,t,n){super(),this._optionsService=n,this.width=0,this.height=0,this._onCharSizeChange=this._register(new ce),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this._register(new yL(this._optionsService))}catch{this._measureStrategy=this._register(new vL(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())}};Q0=gt([de(2,pi)],Q0);var R8=class extends He{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)}},vL=class extends R8{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}},yL=class extends R8{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}},SL=class extends He{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 bL(this._window)),this._onDprChange=this._register(new ce),this.onDprChange=this._onDprChange.event,this._onWindowChange=this._register(new ce),this.onWindowChange=this._onWindowChange.event,this._register(this.onWindowChange(s=>this._screenDprMonitor.setWindow(s))),this._register(ei.forward(this._screenDprMonitor.onDprChange,this._onDprChange)),this._register(ke(this._textarea,"focus",()=>this._isFocused=!0)),this._register(ke(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}},bL=class extends He{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this._register(new Ql),this._onDprChange=this._register(new ce),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this._register(ct(()=>this.clearListener()))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=ke(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)}},wL=class extends He{constructor(){super(),this.linkProviders=[],this._register(ct(()=>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 qm(e,t,n){let s=n.getBoundingClientRect(),a=e.getComputedStyle(n),u=parseInt(a.getPropertyValue("padding-left")),c=parseInt(a.getPropertyValue("padding-top"));return[t.clientX-s.left-u,t.clientY-s.top-c]}function xL(e,t,n,s,a,u,c,f,m){if(!u)return;let p=qm(e,t,n);if(p)return p[0]=Math.ceil((p[0]+(m?c/2:0))/c),p[1]=Math.ceil(p[1]/f),p[0]=Math.min(Math.max(p[0],1),s+(m?1:0)),p[1]=Math.min(Math.max(p[1],1),a),p}var J0=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,n,s,a){return xL(window,e,t,n,s,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,a)}getMouseReportCoords(e,t){let n=qm(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])}}};J0=gt([de(0,cr),de(1,Lh)],J0);var CL=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=[]}},L8={};zO(L8,{getSafariVersion:()=>kL,isChromeOS:()=>j8,isFirefox:()=>z8,isIpad:()=>TL,isIphone:()=>ML,isLegacyEdge:()=>EL,isLinux:()=>Ym,isMac:()=>mh,isNode:()=>zh,isSafari:()=>N8,isWindows:()=>B8});var zh=typeof process<"u"&&"title"in process,Xo=zh?"node":navigator.userAgent,Zo=zh?"node":navigator.platform,z8=Xo.includes("Firefox"),EL=Xo.includes("Edge"),N8=/^((?!chrome|android).)*safari/i.test(Xo);function kL(){if(!N8)return 0;let e=Xo.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1])}var mh=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(Zo),TL=Zo==="iPad",ML=Zo==="iPhone",B8=["Windows","Win16","Win32","WinCE"].includes(Zo),Ym=Zo.indexOf("Linux")>=0,j8=/\bCrOS\b/.test(Xo),H8=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(),a=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),a=e.timeRemaining(),n*1.5>a){s-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(s-t))}ms`),this._start();return}s=a}this.clear()}},DL=class extends H8{_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())}}},AL=class extends H8{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},_h=!zh&&"requestIdleCallback"in window?AL:DL,OL=class{constructor(){this._queue=new _h}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}},ep=class extends He{constructor(e,t,n,s,a,u,c,f,m){super(),this._rowCount=e,this._optionsService=n,this._charSizeService=s,this._coreService=a,this._coreBrowserService=f,this._renderer=this._register(new Ql),this._pausedResizeTask=new OL,this._observerDisposable=this._register(new Ql),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 ce),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this._register(new ce),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this._register(new ce),this.onRender=this._onRender.event,this._onRefreshRequest=this._register(new ce),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new CL((p,g)=>this._renderRows(p,g),this._coreBrowserService),this._register(this._renderDebouncer),this._syncOutputHandler=new RL(this._coreBrowserService,this._coreService,()=>this._fullRefresh()),this._register(ct(()=>this._syncOutputHandler.dispose())),this._register(this._coreBrowserService.onDprChange(()=>this.handleDevicePixelRatioChange())),this._register(c.onResize(()=>this._fullRefresh())),this._register(c.buffers.onBufferActivate(()=>this._renderer.value?.clear())),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this._register(u.onDecorationRegistered(()=>this._fullRefresh())),this._register(u.onDecorationRemoved(()=>this._fullRefresh())),this._register(this._optionsService.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(c.cols,c.rows),this._fullRefresh()})),this._register(this._optionsService.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(c.buffer.y,c.buffer.y,!0))),this._register(m.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(this._coreBrowserService.window,t),this._register(this._coreBrowserService.onWindowChange(p=>this._registerIntersectionObserver(p,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=ct(()=>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()}};ep=gt([de(2,pi),de(3,Lh),de(4,Ys),de(5,Go),de(6,di),de(7,ur),de(8,ra)],ep);var RL=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 LL(e,t,n,s){let a=n.buffer.x,u=n.buffer.y;if(!n.buffer.hasScrollback)return BL(a,u,e,t,n,s)+Nh(u,t,n,s)+jL(a,u,e,t,n,s);let c;if(u===t)return c=a>e?"D":"C",Io(Math.abs(a-e),Ho(c,s));c=u>t?"D":"C";let f=Math.abs(u-t),m=NL(u>t?e:a,n)+(f-1)*n.cols+1+zL(u>t?a:e);return Io(m,Ho(c,s))}function zL(e,t){return e-1}function NL(e,t){return t.cols-e}function BL(e,t,n,s,a,u){return Nh(t,s,a,u).length===0?"":Io(P8(e,t,e,t-Fs(t,a),!1,a).length,Ho("D",u))}function Nh(e,t,n,s){let a=e-Fs(e,n),u=t-Fs(t,n),c=Math.abs(a-u)-HL(e,t,n);return Io(c,Ho(I8(e,t),s))}function jL(e,t,n,s,a,u){let c;Nh(t,s,a,u).length>0?c=s-Fs(s,a):c=t;let f=s,m=IL(e,t,n,s,a,u);return Io(P8(e,c,n,f,m==="C",a).length,Ho(m,u))}function HL(e,t,n){let s=0,a=e-Fs(e,n),u=t-Fs(t,n);for(let c=0;c<Math.abs(a-u);c++){let f=I8(e,t)==="A"?-1:1;n.buffer.lines.get(a+f*c)?.isWrapped&&s++}return s}function Fs(e,t){let n=0,s=t.buffer.lines.get(e),a=s?.isWrapped;for(;a&&e>=0&&e<t.rows;)n++,s=t.buffer.lines.get(--e),a=s?.isWrapped;return n}function IL(e,t,n,s,a,u){let c;return Nh(n,s,a,u).length>0?c=s-Fs(s,a):c=t,e<n&&c<=s||e>=n&&c<s?"C":"D"}function I8(e,t){return e>t?"A":"B"}function P8(e,t,n,s,a,u){let c=e,f=t,m="";for(;(c!==n||f!==s)&&f>=0&&f<u.buffer.lines.length;)c+=a?1:-1,a&&c>u.cols-1?(m+=u.buffer.translateBufferLineToString(f,!1,e,c),c=0,e=0,f++):!a&&c<0&&(m+=u.buffer.translateBufferLineToString(f,!1,0,e+1),c=u.cols-1,e=c,f--);return m+u.buffer.translateBufferLineToString(f,!1,e,c)}function Ho(e,t){let n=t?"O":"[";return re.ESC+n+e}function Io(e,t){e=Math.floor(e);let n="";for(let s=0;s<e;s++)n+=t;return n}var PL=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 n4(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 W1=50,FL=15,UL=50,VL=500,qL=" ",YL=new RegExp(qL,"g"),tp=class extends He{constructor(e,t,n,s,a,u,c,f,m){super(),this._element=e,this._screenElement=t,this._linkifier=n,this._bufferService=s,this._coreService=a,this._mouseService=u,this._optionsService=c,this._renderService=f,this._coreBrowserService=m,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new rn,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this._register(new ce),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this._register(new ce),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this._register(new ce),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this._register(new ce),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=p=>this._handleMouseMove(p),this._mouseUpListener=p=>this._handleMouseUp(p),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(p=>this._handleTrim(p)),this._register(this._bufferService.buffers.onBufferActivate(p=>this._handleBufferActivate(p))),this.enable(),this._model=new PL(this._bufferService),this._activeSelectionMode=0,this._register(ct(()=>{this._removeMouseDownListeners()})),this._register(this._bufferService.onResize(p=>{p.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 a=e[0]<t[0]?e[0]:t[0],u=e[0]<t[0]?t[0]:e[0];for(let c=e[1];c<=t[1];c++){let f=n.translateBufferLineToString(c,!0,a,u);s.push(f)}}else{let a=e[1]===t[1]?t[0]:void 0;s.push(n.translateBufferLineToString(e[1],!0,e[0],a));for(let u=e[1]+1;u<=t[1]-1;u++){let c=n.lines.get(u),f=n.translateBufferLineToString(u,!0);c?.isWrapped?s[s.length-1]+=f:s.push(f)}if(e[1]!==t[1]){let u=n.lines.get(t[1]),c=n.translateBufferLineToString(t[1],!0,0,t[0]);u&&u.isWrapped?s[s.length-1]+=c:s.push(c)}}return s.map(a=>a.replace(YL," ")).join(B8?`\r
65
- `:`
66
- `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),Ym&&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=n4(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=qm(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,-W1),W1),t/=W1,t/Math.abs(t)+Math.round(t*(FL-1)))}shouldForceSelection(e){return mh?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(),UL)}_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&&!(mh&&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<VL&&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=LL(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 a=e.loadCell(s,this._workCell).getChars().length;this._workCell.getWidth()===0?n--:a>1&&t!==s&&(n+=a-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 a=this._bufferService.buffer,u=a.lines.get(e[1]);if(!u)return;let c=a.translateBufferLineToString(e[1],!1),f=this._convertViewportColToCharacterIndex(u,e[0]),m=f,p=e[0]-f,g=0,_=0,v=0,b=0;if(c.charAt(f)===" "){for(;f>0&&c.charAt(f-1)===" ";)f--;for(;m<c.length&&c.charAt(m+1)===" ";)m++}else{let E=e[0],D=e[0];u.getWidth(E)===0&&(g++,E--),u.getWidth(D)===2&&(_++,D++);let K=u.getString(D).length;for(K>1&&(b+=K-1,m+=K-1);E>0&&f>0&&!this._isCharWordSeparator(u.loadCell(E-1,this._workCell));){u.loadCell(E-1,this._workCell);let V=this._workCell.getChars().length;this._workCell.getWidth()===0?(g++,E--):V>1&&(v+=V-1,f-=V-1),f--,E--}for(;D<u.length&&m+1<c.length&&!this._isCharWordSeparator(u.loadCell(D+1,this._workCell));){u.loadCell(D+1,this._workCell);let V=this._workCell.getChars().length;this._workCell.getWidth()===2?(_++,D++):V>1&&(b+=V-1,m+=V-1),m++,D++}}m++;let w=f+p-g+v,C=Math.min(this._bufferService.cols,m-f+g+_-v-b);if(!(!t&&c.slice(f,m).trim()==="")){if(n&&w===0&&u.getCodePoint(0)!==32){let E=a.lines.get(e[1]-1);if(E&&u.isWrapped&&E.getCodePoint(this._bufferService.cols-1)!==32){let D=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(D){let K=this._bufferService.cols-D.start;w-=K,C+=K}}}if(s&&w+C===this._bufferService.cols&&u.getCodePoint(this._bufferService.cols-1)!==32){let E=a.lines.get(e[1]+1);if(E?.isWrapped&&E.getCodePoint(0)!==32){let D=this._getWordAt([0,e[1]+1],!1,!1,!0);D&&(C+=D.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=n4(n,this._bufferService.cols)}};tp=gt([de(3,di),de(4,Ys),de(5,jm),de(6,pi),de(7,cr),de(8,ur)],tp);var r4=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={}}},s4=class{constructor(){this._color=new r4,this._css=new r4}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()}},At=Object.freeze((()=>{let e=[dt.toColor("#2e3436"),dt.toColor("#cc0000"),dt.toColor("#4e9a06"),dt.toColor("#c4a000"),dt.toColor("#3465a4"),dt.toColor("#75507b"),dt.toColor("#06989a"),dt.toColor("#d3d7cf"),dt.toColor("#555753"),dt.toColor("#ef2929"),dt.toColor("#8ae234"),dt.toColor("#fce94f"),dt.toColor("#729fcf"),dt.toColor("#ad7fa8"),dt.toColor("#34e2e2"),dt.toColor("#eeeeec")],t=[0,95,135,175,215,255];for(let n=0;n<216;n++){let s=t[n/36%6|0],a=t[n/6%6|0],u=t[n%6];e.push({css:Mt.toCss(s,a,u),rgba:Mt.toRgba(s,a,u)})}for(let n=0;n<24;n++){let s=8+n*10;e.push({css:Mt.toCss(s,s,s),rgba:Mt.toRgba(s,s,s)})}return e})()),Ds=dt.toColor("#ffffff"),So=dt.toColor("#000000"),l4=dt.toColor("#ffffff"),a4=So,po={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117},$L=Ds,ip=class extends He{constructor(e){super(),this._optionsService=e,this._contrastCache=new s4,this._halfContrastCache=new s4,this._onChangeColors=this._register(new ce),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:Ds,background:So,cursor:l4,cursorAccent:a4,selectionForeground:void 0,selectionBackgroundTransparent:po,selectionBackgroundOpaque:ot.blend(So,po),selectionInactiveBackgroundTransparent:po,selectionInactiveBackgroundOpaque:ot.blend(So,po),scrollbarSliderBackground:ot.opacity(Ds,.2),scrollbarSliderHoverBackground:ot.opacity(Ds,.4),scrollbarSliderActiveBackground:ot.opacity(Ds,.5),overviewRulerBorder:Ds,ansi:At.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=tt(e.foreground,Ds),t.background=tt(e.background,So),t.cursor=ot.blend(t.background,tt(e.cursor,l4)),t.cursorAccent=ot.blend(t.background,tt(e.cursorAccent,a4)),t.selectionBackgroundTransparent=tt(e.selectionBackground,po),t.selectionBackgroundOpaque=ot.blend(t.background,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundTransparent=tt(e.selectionInactiveBackground,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundOpaque=ot.blend(t.background,t.selectionInactiveBackgroundTransparent),t.selectionForeground=e.selectionForeground?tt(e.selectionForeground,e4):void 0,t.selectionForeground===e4&&(t.selectionForeground=void 0),ot.isOpaque(t.selectionBackgroundTransparent)&&(t.selectionBackgroundTransparent=ot.opacity(t.selectionBackgroundTransparent,.3)),ot.isOpaque(t.selectionInactiveBackgroundTransparent)&&(t.selectionInactiveBackgroundTransparent=ot.opacity(t.selectionInactiveBackgroundTransparent,.3)),t.scrollbarSliderBackground=tt(e.scrollbarSliderBackground,ot.opacity(t.foreground,.2)),t.scrollbarSliderHoverBackground=tt(e.scrollbarSliderHoverBackground,ot.opacity(t.foreground,.4)),t.scrollbarSliderActiveBackground=tt(e.scrollbarSliderActiveBackground,ot.opacity(t.foreground,.5)),t.overviewRulerBorder=tt(e.overviewRulerBorder,$L),t.ansi=At.slice(),t.ansi[0]=tt(e.black,At[0]),t.ansi[1]=tt(e.red,At[1]),t.ansi[2]=tt(e.green,At[2]),t.ansi[3]=tt(e.yellow,At[3]),t.ansi[4]=tt(e.blue,At[4]),t.ansi[5]=tt(e.magenta,At[5]),t.ansi[6]=tt(e.cyan,At[6]),t.ansi[7]=tt(e.white,At[7]),t.ansi[8]=tt(e.brightBlack,At[8]),t.ansi[9]=tt(e.brightRed,At[9]),t.ansi[10]=tt(e.brightGreen,At[10]),t.ansi[11]=tt(e.brightYellow,At[11]),t.ansi[12]=tt(e.brightBlue,At[12]),t.ansi[13]=tt(e.brightMagenta,At[13]),t.ansi[14]=tt(e.brightCyan,At[14]),t.ansi[15]=tt(e.brightWhite,At[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]=tt(e.extendedAnsi[s],At[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()}}};ip=gt([de(0,pi)],ip);function tt(e,t){if(e!==void 0)try{return dt.toColor(e)}catch{}return t}var KL=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)}},WL=class{constructor(){this._services=new KL,this._services.set(Bm,this)}setService(e,t){this._services.set(e,t)}getService(e){return this._services.get(e)}createInstance(e,...t){let n=FO(e).sort((u,c)=>u.index-c.index),s=[];for(let u of n){let c=this._services.get(u.id);if(!c)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${u.id._id}.`);s.push(c)}let a=n.length>0?n[0].index:t.length;if(t.length!==a)throw new Error(`[createInstance] First service dependency of ${e.name} at position ${a+1} conflicts with ${t.length} static arguments`);return new e(...t,...s)}},GL={trace:0,debug:1,info:2,warn:3,error:4,off:5},XL="xterm.js: ",np=class extends He{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=GL[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?"":XL)+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)}};np=gt([de(0,pi)],np);var o4=class extends He{constructor(e){super(),this._maxLength=e,this.onDeleteEmitter=this._register(new ce),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this._register(new ce),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this._register(new ce),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 a=t-1;a>=0;a--)this.set(e+a+n,this.get(e+a));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}},Be=3,kt=Object.freeze(new Wo),Ic=0,G1=2,bo=class F8{constructor(t,n,s=!1){this.isWrapped=s,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(t*Be);let a=n||rn.fromCharData([0,l8,1,0]);for(let u=0;u<t;++u)this.setCell(u,a);this.length=t}get(t){let n=this._data[t*Be+0],s=n&2097151;return[this._data[t*Be+1],n&2097152?this._combined[t]:s?Kr(s):"",n>>22,n&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):s]}set(t,n){this._data[t*Be+1]=n[0],n[1].length>1?(this._combined[t]=n[1],this._data[t*Be+0]=t|2097152|n[2]<<22):this._data[t*Be+0]=n[1].charCodeAt(0)|n[2]<<22}getWidth(t){return this._data[t*Be+0]>>22}hasWidth(t){return this._data[t*Be+0]&12582912}getFg(t){return this._data[t*Be+1]}getBg(t){return this._data[t*Be+2]}hasContent(t){return this._data[t*Be+0]&4194303}getCodePoint(t){let n=this._data[t*Be+0];return n&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):n&2097151}isCombined(t){return this._data[t*Be+0]&2097152}getString(t){let n=this._data[t*Be+0];return n&2097152?this._combined[t]:n&2097151?Kr(n&2097151):""}isProtected(t){return this._data[t*Be+2]&536870912}loadCell(t,n){return Ic=t*Be,n.content=this._data[Ic+0],n.fg=this._data[Ic+1],n.bg=this._data[Ic+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*Be+0]=n.content,this._data[t*Be+1]=n.fg,this._data[t*Be+2]=n.bg}setCellFromCodepoint(t,n,s,a){a.bg&268435456&&(this._extendedAttrs[t]=a.extended),this._data[t*Be+0]=n|s<<22,this._data[t*Be+1]=a.fg,this._data[t*Be+2]=a.bg}addCodepointToCell(t,n,s){let a=this._data[t*Be+0];a&2097152?this._combined[t]+=Kr(n):a&2097151?(this._combined[t]=Kr(a&2097151)+Kr(n),a&=-2097152,a|=2097152):a=n|1<<22,s&&(a&=-12582913,a|=s<<22),this._data[t*Be+0]=a}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 a=new rn;for(let u=this.length-t-n-1;u>=0;--u)this.setCell(t+n+u,this.loadCell(t+u,a));for(let u=0;u<n;++u)this.setCell(t+u,s)}else for(let a=t;a<this.length;++a)this.setCell(a,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 a=new rn;for(let u=0;u<this.length-t-n;++u)this.setCell(t+u,this.loadCell(t+n+u,a));for(let u=this.length-n;u<this.length;++u)this.setCell(u,s)}else for(let a=t;a<this.length;++a)this.setCell(a,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,a=!1){if(a){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*G1<this._data.buffer.byteLength;let s=t*Be;if(t>this.length){if(this._data.buffer.byteLength>=s*4)this._data=new Uint32Array(this._data.buffer,0,s);else{let a=new Uint32Array(s);a.set(this._data),this._data=a}for(let a=this.length;a<t;++a)this.setCell(a,n)}else{this._data=this._data.subarray(0,s);let a=Object.keys(this._combined);for(let c=0;c<a.length;c++){let f=parseInt(a[c],10);f>=t&&delete this._combined[f]}let u=Object.keys(this._extendedAttrs);for(let c=0;c<u.length;c++){let f=parseInt(u[c],10);f>=t&&delete this._extendedAttrs[f]}}return this.length=t,s*4*G1<this._data.buffer.byteLength}cleanupMemory(){if(this._data.length*4*G1<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 F8(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*Be+0]&4194303)return t+(this._data[t*Be+0]>>22);return 0}getNoBgTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*Be+0]&4194303||this._data[t*Be+2]&50331648)return t+(this._data[t*Be+0]>>22);return 0}copyCellsFrom(t,n,s,a,u){let c=t._data;if(u)for(let m=a-1;m>=0;m--){for(let p=0;p<Be;p++)this._data[(s+m)*Be+p]=c[(n+m)*Be+p];c[(n+m)*Be+2]&268435456&&(this._extendedAttrs[s+m]=t._extendedAttrs[n+m])}else for(let m=0;m<a;m++){for(let p=0;p<Be;p++)this._data[(s+m)*Be+p]=c[(n+m)*Be+p];c[(n+m)*Be+2]&268435456&&(this._extendedAttrs[s+m]=t._extendedAttrs[n+m])}let f=Object.keys(t._combined);for(let m=0;m<f.length;m++){let p=parseInt(f[m],10);p>=n&&(this._combined[p-n+s]=t._combined[p])}}translateToString(t,n,s,a){n=n??0,s=s??this.length,t&&(s=Math.min(s,this.getTrimmedLength())),a&&(a.length=0);let u="";for(;n<s;){let c=this._data[n*Be+0],f=c&2097151,m=c&2097152?this._combined[n]:f?Kr(f):Zr;if(u+=m,a)for(let p=0;p<m.length;++p)a.push(n);n+=c>>22||1}return a&&a.push(n),u}};function ZL(e,t,n,s,a,u){let c=[];for(let f=0;f<e.length-1;f++){let m=f,p=e.get(++m);if(!p.isWrapped)continue;let g=[e.get(f)];for(;m<e.length&&p.isWrapped;)g.push(p),p=e.get(++m);if(!u&&s>=f&&s<m){f+=g.length-1;continue}let _=0,v=Po(g,_,t),b=1,w=0;for(;b<g.length;){let E=Po(g,b,t),D=E-w,K=n-v,V=Math.min(D,K);g[_].copyCellsFrom(g[b],w,v,V,!1),v+=V,v===n&&(_++,v=0),w+=V,w===E&&(b++,w=0),v===0&&_!==0&&g[_-1].getWidth(n-1)===2&&(g[_].copyCellsFrom(g[_-1],n-1,v++,1,!1),g[_-1].setCell(n-1,a))}g[_].replaceCells(v,n,a);let C=0;for(let E=g.length-1;E>0&&(E>_||g[E].getTrimmedLength()===0);E--)C++;C>0&&(c.push(f+g.length-C),c.push(C)),f+=g.length-1}return c}function QL(e,t){let n=[],s=0,a=t[s],u=0;for(let c=0;c<e.length;c++)if(a===c){let f=t[++s];e.onDeleteEmitter.fire({index:c-u,amount:f}),c+=f-1,u+=f,a=t[++s]}else n.push(c);return{layout:n,countRemoved:u}}function JL(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 ez(e,t,n){let s=[],a=e.map((m,p)=>Po(e,p,t)).reduce((m,p)=>m+p),u=0,c=0,f=0;for(;f<a;){if(a-f<n){s.push(a-f);break}u+=n;let m=Po(e,c,t);u>m&&(u-=m,c++);let p=e[c].getWidth(u-1)===2;p&&u--;let g=p?n-1:n;s.push(g),f+=g}return s}function Po(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,a=e[t+1].getWidth(0)===2;return s&&a?n-1:n}var U8=class V8{constructor(t){this.line=t,this.isDisposed=!1,this._disposables=[],this._id=V8._nextId++,this._onDispose=this.register(new ce),this.onDispose=this._onDispose.event}get id(){return this._id}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),Ps(this._disposables),this._disposables.length=0)}register(t){return this._disposables.push(t),t}};U8._nextId=1;var tz=U8,Rt={},As=Rt.B;Rt[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:"≥","{":"π","|":"≠","}":"£","~":"·"};Rt.A={"#":"£"};Rt.B=void 0;Rt[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"};Rt.C=Rt[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"};Rt.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"};Rt.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"};Rt.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"};Rt.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"};Rt.E=Rt[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"};Rt.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"};Rt.H=Rt[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"};Rt["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"};var u4=4294967295,c4=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=kt.clone(),this.savedCharset=As,this.markers=[],this._nullCell=rn.fromCharData([0,l8,1,0]),this._whitespaceCell=rn.fromCharData([0,Zr,1,32]),this._isClearing=!1,this._memoryCleanupQueue=new _h,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new o4(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 fh),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 fh),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>u4?u4:t}fillViewportRows(e){if(this.lines.length===0){e===void 0&&(e=kt);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 o4(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){let n=this.getNullCell(kt),s=0,a=this._getCorrectBufferLength(t);if(a>this.lines.maxLength&&(this.lines.maxLength=a),this.lines.length>0){if(this._cols<e)for(let c=0;c<this.lines.length;c++)s+=+this.lines.get(c).resize(e,n);let u=0;if(this._rows<t)for(let c=this._rows;c<t;c++)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+u+1?(this.ybase--,u++,this.ydisp>0&&this.ydisp--):this.lines.push(new bo(e,n)));else for(let c=this._rows;c>t;c--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(a<this.lines.maxLength){let c=this.lines.length-a;c>0&&(this.lines.trimStart(c),this.ybase=Math.max(this.ybase-c,0),this.ydisp=Math.max(this.ydisp-c,0),this.savedY=Math.max(this.savedY-c,0)),this.lines.maxLength=a}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),u&&(this.y+=u),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 u=0;u<this.lines.length;u++)s+=+this.lines.get(u).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=ZL(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(kt),n);if(s.length>0){let a=QL(this.lines,s);JL(this.lines,a.layout),this._reflowLargerAdjustViewport(e,t,a.countRemoved)}}_reflowLargerAdjustViewport(e,t,n){let s=this.getNullCell(kt),a=n;for(;a-- >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(kt),a=[],u=0;for(let c=this.lines.length-1;c>=0;c--){let f=this.lines.get(c);if(!f||!f.isWrapped&&f.getTrimmedLength()<=e)continue;let m=[f];for(;f.isWrapped&&c>0;)f=this.lines.get(--c),m.unshift(f);if(!n){let V=this.ybase+this.y;if(V>=c&&V<c+m.length)continue}let p=m[m.length-1].getTrimmedLength(),g=ez(m,this._cols,e),_=g.length-m.length,v;this.ybase===0&&this.y!==this.lines.length-1?v=Math.max(0,this.y-this.lines.maxLength+_):v=Math.max(0,this.lines.length-this.lines.maxLength+_);let b=[];for(let V=0;V<_;V++){let Z=this.getBlankLine(kt,!0);b.push(Z)}b.length>0&&(a.push({start:c+m.length+u,newLines:b}),u+=b.length),m.push(...b);let w=g.length-1,C=g[w];C===0&&(w--,C=g[w]);let E=m.length-_-1,D=p;for(;E>=0;){let V=Math.min(D,C);if(m[w]===void 0)break;if(m[w].copyCellsFrom(m[E],D-V,C-V,V,!0),C-=V,C===0&&(w--,C=g[w]),D-=V,D===0){E--;let Z=Math.max(E,0);D=Po(m,Z,this._cols)}}for(let V=0;V<m.length;V++)g[V]<e&&m[V].setCell(g[V],s);let K=_-v;for(;K-- >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+u)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+_,this.ybase+t-1)}if(a.length>0){let c=[],f=[];for(let C=0;C<this.lines.length;C++)f.push(this.lines.get(C));let m=this.lines.length,p=m-1,g=0,_=a[g];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+u);let v=0;for(let C=Math.min(this.lines.maxLength-1,m+u-1);C>=0;C--)if(_&&_.start>p+v){for(let E=_.newLines.length-1;E>=0;E--)this.lines.set(C--,_.newLines[E]);C++,c.push({index:p+1,amount:_.newLines.length}),v+=_.newLines.length,_=a[++g]}else this.lines.set(C,f[p--]);let b=0;for(let C=c.length-1;C>=0;C--)c[C].index+=b,this.lines.onInsertEmitter.fire(c[C]),b+=c[C].amount;let w=Math.max(0,m+u-this.lines.maxLength);w>0&&this.lines.onTrimEmitter.fire(w)}}translateBufferLineToString(e,t,n=0,s){let a=this.lines.get(e);return a?a.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 tz(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)}},iz=class extends He{constructor(e,t){super(),this._optionsService=e,this._bufferService=t,this._onBufferActivate=this._register(new ce),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 c4(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new c4(!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)}},q8=2,Y8=1,rp=class extends He{constructor(e){super(),this.isUserScrolling=!1,this._onResize=this._register(new ce),this.onResize=this._onResize.event,this._onScroll=this._register(new ce),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,q8),this.rows=Math.max(e.rawOptions.rows||0,Y8),this.buffers=this._register(new iz(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 a=n.ybase+n.scrollTop,u=n.ybase+n.scrollBottom;if(n.scrollTop===0){let c=n.lines.isFull;u===n.lines.length-1?c?n.lines.recycle().copyFrom(s):n.lines.push(s.clone()):n.lines.splice(u+1,0,s.clone()),c?this.isUserScrolling&&(n.ydisp=Math.max(n.ydisp-1,0)):(n.ybase++,this.isUserScrolling||n.ydisp++)}else{let c=u-a+1;n.lines.shiftElements(a+1,c-1,-1),n.lines.set(u,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))}};rp=gt([de(0,pi)],rp);var Vl={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:mh,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRuler:{}},nz=["normal","bold","100","200","300","400","500","600","700","800","900"],rz=class extends He{constructor(e){super(),this._onOptionChange=this._register(new ce),this.onOptionChange=this._onOptionChange.event;let t={...Vl};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(ct(()=>{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 Vl))throw new Error(`No option with key "${n}"`);return this.rawOptions[n]},t=(n,s)=>{if(!(n in Vl))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=Vl[e]),!sz(t))throw new Error(`"${t}" is not a valid value for ${e}`);break;case"wordSeparator":t||(t=Vl[e]);break;case"fontWeight":case"fontWeightBold":if(typeof t=="number"&&1<=t&&t<=1e3)break;t=nz.includes(t)?t:Vl[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 sz(e){return e==="block"||e==="underline"||e==="bar"}function wo(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]&&wo(e[s],t-1);return n}var h4=Object.freeze({insertMode:!1}),f4=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,cursorBlink:void 0,cursorStyle:void 0,origin:!1,reverseWraparound:!1,sendFocus:!1,synchronizedOutput:!1,wraparound:!0}),sp=class extends He{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 ce),this.onData=this._onData.event,this._onUserInput=this._register(new ce),this.onUserInput=this._onUserInput.event,this._onBinary=this._register(new ce),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this._register(new ce),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=wo(h4),this.decPrivateModes=wo(f4)}reset(){this.modes=wo(h4),this.decPrivateModes=wo(f4)}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))}};sp=gt([de(0,di),de(1,h8),de(2,pi)],sp);var d4={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 X1(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 Z1=String.fromCharCode,p4={DEFAULT:e=>{let t=[X1(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?"":`\x1B[M${Z1(t[0])}${Z1(t[1])}${Z1(t[2])}`},SGR:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${X1(e,!0)};${e.col};${e.row}${t}`},SGR_PIXELS:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${X1(e,!0)};${e.x};${e.y}${t}`}},lp=class extends He{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 ce),this.onProtocolChange=this._onProtocolChange.event;for(let s of Object.keys(d4))this.addProtocol(s,d4[s]);for(let s of Object.keys(p4))this.addEncoding(s,p4[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,a=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(a/=s+0,Math.abs(e.deltaY)<50&&(a*=.3),this._wheelPartialScroll+=a,a=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(a*=this._bufferService.rows),a}_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)}};lp=gt([de(0,di),de(1,Ys),de(2,pi)],lp);var Q1=[[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]],lz=[[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]],Ot;function az(e,t){let n=0,s=t.length-1,a;if(e<t[0][0]||e>t[s][1])return!1;for(;s>=n;)if(a=n+s>>1,e>t[a][1])n=a+1;else if(e<t[a][0])s=a-1;else return!0;return!1}var oz=class{constructor(){if(this.version="6",!Ot){Ot=new Uint8Array(65536),Ot.fill(1),Ot[0]=0,Ot.fill(0,1,32),Ot.fill(0,127,160),Ot.fill(2,4352,4448),Ot[9001]=2,Ot[9002]=2,Ot.fill(2,11904,42192),Ot[12351]=1,Ot.fill(2,44032,55204),Ot.fill(2,63744,64256),Ot.fill(2,65040,65050),Ot.fill(2,65072,65136),Ot.fill(2,65280,65377),Ot.fill(2,65504,65511);for(let e=0;e<Q1.length;++e)Ot.fill(0,Q1[e][0],Q1[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?Ot[e]:az(e,lz)?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 a=Rs.extractWidth(t);a===0?s=!1:a>n&&(n=a)}return Rs.createPropertyValue(0,n,s)}},Rs=class Kc{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new ce,this.onChange=this._onChange.event;let t=new oz;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,a=t.length;for(let u=0;u<a;++u){let c=t.charCodeAt(u);if(55296<=c&&c<=56319){if(++u>=a)return n+this.wcwidth(c);let p=t.charCodeAt(u);56320<=p&&p<=57343?c=(c-55296)*1024+p-56320+65536:n+=this.wcwidth(p)}let f=this.charProperties(c,s),m=Kc.extractWidth(f);Kc.extractShouldJoin(f)&&(m-=Kc.extractWidth(s)),n+=m,s=f}return n}charProperties(t,n){return this._activeProvider.charProperties(t,n)}},uz=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 m4(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 mo=2147483647,cz=256,$8=class ap{constructor(t=32,n=32){if(this.maxLength=t,this.maxSubParamsLength=n,n>cz)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 ap;if(!t.length)return n;for(let s=Array.isArray(t[0])?1:0;s<t.length;++s){let a=t[s];if(Array.isArray(a))for(let u=0;u<a.length;++u)n.addSubParam(a[u]);else n.addParam(a)}return n}clone(){let t=new ap(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,a=this._subParamsIdx[n]&255;a-s>0&&t.push(Array.prototype.slice.call(this._subParams,s,a))}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>mo?mo: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>mo?mo: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,a=this._subParamsIdx[n]&255;a-s>0&&(t[n]=this._subParams.slice(s,a))}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,a=s[n-1];s[n-1]=~a?Math.min(a*10+t,mo):t}},_o=[],hz=class{constructor(){this._state=0,this._active=_o,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=_o}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=_o,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||_o,!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",Rh(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,a=!1;if(this._stack.paused&&(s=this._stack.loopPosition-1,n=t,a=this._stack.fallThrough,this._stack.paused=!1),!a&&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=_o,this._id=-1,this._state=0}}},Hi=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+=Rh(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}},go=[],fz=class{constructor(){this._handlers=Object.create(null),this._active=go,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=go}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=go,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||go,!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",Rh(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,a=!1;if(this._stack.paused&&(s=this._stack.loopPosition-1,n=t,a=this._stack.fallThrough,this._stack.paused=!1),!a&&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=go,this._ident=0}},xo=new $8;xo.addParam(0);var _4=class{constructor(e){this._handler=e,this._data="",this._params=xo,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():xo,this._data="",this._hitLimit=!1}put(e,t,n){this._hitLimit||(this._data+=Rh(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=xo,this._data="",this._hitLimit=!1,n));return this._params=xo,this._data="",this._hitLimit=!1,t}},dz=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 a=0;a<e.length;a++)this.table[t<<8|e[a]]=n<<4|s}},tn=160,pz=(function(){let e=new dz(4095),t=Array.apply(null,Array(256)).map((f,m)=>m),n=(f,m)=>t.slice(f,m),s=n(32,127),a=n(0,24);a.push(25),a.push.apply(a,n(28,32));let u=n(0,14),c;e.setDefault(1,0),e.addMany(s,0,2,0);for(c in u)e.addMany([24,26,153,154],c,3,0),e.addMany(n(128,144),c,3,0),e.addMany(n(144,152),c,3,0),e.add(156,c,0,0),e.add(27,c,11,1),e.add(157,c,4,8),e.addMany([152,158,159],c,0,7),e.add(155,c,11,3),e.add(144,c,11,9);return e.addMany(a,0,3,0),e.addMany(a,1,3,1),e.add(127,1,0,1),e.addMany(a,8,0,8),e.addMany(a,3,3,3),e.add(127,3,0,3),e.addMany(a,4,3,4),e.add(127,4,0,4),e.addMany(a,6,3,6),e.addMany(a,5,3,5),e.add(127,5,0,5),e.addMany(a,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(a,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(a,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(a,11,0,11),e.addMany(n(32,128),11,0,11),e.addMany(n(28,32),11,0,11),e.addMany(a,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(a,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(a,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(tn,0,2,0),e.add(tn,8,5,8),e.add(tn,6,0,6),e.add(tn,11,0,11),e.add(tn,13,13,13),e})(),mz=class extends He{constructor(e=pz){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 $8,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(ct(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this._register(new hz),this._dcsParser=this._register(new fz),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 a=0;a<e.intermediates.length;++a){let u=e.intermediates.charCodeAt(a);if(32>u||u>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");n<<=8,n|=u}}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 a=s.indexOf(t);a!==-1&&s.splice(a,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 a=s.indexOf(t);a!==-1&&s.splice(a,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,a){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=n,this._parseStack.transition=s,this._parseStack.chunkPos=a}parse(e,t,n){let s=0,a=0,u=0,c;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,u=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 f=this._parseStack.handlers,m=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(n===!1&&m>-1){for(;m>=0&&(c=f[m](this._params),c!==!0);m--)if(c instanceof Promise)return this._parseStack.handlerPos=m,c}this._parseStack.handlers=[];break;case 4:if(n===!1&&m>-1){for(;m>=0&&(c=f[m](),c!==!0);m--)if(c instanceof Promise)return this._parseStack.handlerPos=m,c}this._parseStack.handlers=[];break;case 6:if(s=e[this._parseStack.chunkPos],c=this._dcsParser.unhook(s!==24&&s!==26,n),c)return c;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],c=this._oscParser.end(s!==24&&s!==26,n),c)return c;s===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break}this._parseStack.state=0,u=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=this._parseStack.transition&15}for(let f=u;f<t;++f){switch(s=e[f],a=this._transitions.table[this.currentState<<8|(s<160?s:tn)],a>>4){case 2:for(let v=f+1;;++v){if(v>=t||(s=e[v])<32||s>126&&s<tn){this._printHandler(e,f,v),f=v-1;break}if(++v>=t||(s=e[v])<32||s>126&&s<tn){this._printHandler(e,f,v),f=v-1;break}if(++v>=t||(s=e[v])<32||s>126&&s<tn){this._printHandler(e,f,v),f=v-1;break}if(++v>=t||(s=e[v])<32||s>126&&s<tn){this._printHandler(e,f,v),f=v-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:f,code:s,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:let m=this._csiHandlers[this._collect<<8|s],p=m?m.length-1:-1;for(;p>=0&&(c=m[p](this._params),c!==!0);p--)if(c instanceof Promise)return this._preserveStack(3,m,p,a,f),c;p<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(++f<t&&(s=e[f])>47&&s<60);f--;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&&(c=g[_](),c!==!0);_--)if(c instanceof Promise)return this._preserveStack(4,g,_,a,f),c;_<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 v=f+1;;++v)if(v>=t||(s=e[v])===24||s===26||s===27||s>127&&s<tn){this._dcsParser.put(e,f,v),f=v-1;break}break;case 14:if(c=this._dcsParser.unhook(s!==24&&s!==26),c)return this._preserveStack(6,[],0,a,f),c;s===27&&(a|=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 v=f+1;;v++)if(v>=t||(s=e[v])<32||s>127&&s<tn){this._oscParser.put(e,f,v),f=v-1;break}break;case 6:if(c=this._oscParser.end(s!==24&&s!==26),c)return this._preserveStack(5,[],0,a,f),c;s===27&&(a|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break}this.currentState=a&15}}},_z=/^([\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})$/,gz=/^[\da-f]+$/;function g4(e){if(!e)return;let t=e.toLowerCase();if(t.indexOf("rgb:")===0){t=t.slice(4);let n=_z.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),gz.exec(t)&&[3,6,9,12].includes(t.length))){let n=t.length/3,s=[0,0,0];for(let a=0;a<3;++a){let u=parseInt(t.slice(n*a,n*a+n),16);s[a]=n===1?u<<4:n===2?u:n===3?u>>4:u>>8}return s}}function J1(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 vz(e,t=16){let[n,s,a]=e;return`rgb:${J1(n,t)}/${J1(s,t)}/${J1(a,t)}`}var yz={"(":0,")":1,"*":2,"+":3,"-":1,".":2},Yr=131072,v4=10;function y4(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 S4=5e3,b4=0,Sz=class extends He{constructor(e,t,n,s,a,u,c,f,m=new mz){super(),this._bufferService=e,this._charsetService=t,this._coreService=n,this._logService=s,this._optionsService=a,this._oscLinkService=u,this._coreMouseService=c,this._unicodeService=f,this._parser=m,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new IO,this._utf8Decoder=new PO,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=kt.clone(),this._eraseAttrDataInternal=kt.clone(),this._onRequestBell=this._register(new ce),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this._register(new ce),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this._register(new ce),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this._register(new ce),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this._register(new ce),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this._register(new ce),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this._register(new ce),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this._register(new ce),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this._register(new ce),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this._register(new ce),this.onLineFeed=this._onLineFeed.event,this._onScroll=this._register(new ce),this.onScroll=this._onScroll.event,this._onTitleChange=this._register(new ce),this.onTitleChange=this._onTitleChange.event,this._onColor=this._register(new ce),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 op(this._bufferService),this._activeBuffer=this._bufferService.buffer,this._register(this._bufferService.buffers.onBufferActivate(p=>this._activeBuffer=p.activeBuffer)),this._parser.setCsiHandlerFallback((p,g)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(p),params:g.toArray()})}),this._parser.setEscHandlerFallback(p=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(p)})}),this._parser.setExecuteHandlerFallback(p=>{this._logService.debug("Unknown EXECUTE code: ",{code:p})}),this._parser.setOscHandlerFallback((p,g,_)=>{this._logService.debug("Unknown OSC code: ",{identifier:p,action:g,data:_})}),this._parser.setDcsHandlerFallback((p,g,_)=>{g==="HOOK"&&(_=_.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(p),action:g,payload:_})}),this._parser.setPrintHandler((p,g,_)=>this.print(p,g,_)),this._parser.registerCsiHandler({final:"@"},p=>this.insertChars(p)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},p=>this.scrollLeft(p)),this._parser.registerCsiHandler({final:"A"},p=>this.cursorUp(p)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},p=>this.scrollRight(p)),this._parser.registerCsiHandler({final:"B"},p=>this.cursorDown(p)),this._parser.registerCsiHandler({final:"C"},p=>this.cursorForward(p)),this._parser.registerCsiHandler({final:"D"},p=>this.cursorBackward(p)),this._parser.registerCsiHandler({final:"E"},p=>this.cursorNextLine(p)),this._parser.registerCsiHandler({final:"F"},p=>this.cursorPrecedingLine(p)),this._parser.registerCsiHandler({final:"G"},p=>this.cursorCharAbsolute(p)),this._parser.registerCsiHandler({final:"H"},p=>this.cursorPosition(p)),this._parser.registerCsiHandler({final:"I"},p=>this.cursorForwardTab(p)),this._parser.registerCsiHandler({final:"J"},p=>this.eraseInDisplay(p,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},p=>this.eraseInDisplay(p,!0)),this._parser.registerCsiHandler({final:"K"},p=>this.eraseInLine(p,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},p=>this.eraseInLine(p,!0)),this._parser.registerCsiHandler({final:"L"},p=>this.insertLines(p)),this._parser.registerCsiHandler({final:"M"},p=>this.deleteLines(p)),this._parser.registerCsiHandler({final:"P"},p=>this.deleteChars(p)),this._parser.registerCsiHandler({final:"S"},p=>this.scrollUp(p)),this._parser.registerCsiHandler({final:"T"},p=>this.scrollDown(p)),this._parser.registerCsiHandler({final:"X"},p=>this.eraseChars(p)),this._parser.registerCsiHandler({final:"Z"},p=>this.cursorBackwardTab(p)),this._parser.registerCsiHandler({final:"`"},p=>this.charPosAbsolute(p)),this._parser.registerCsiHandler({final:"a"},p=>this.hPositionRelative(p)),this._parser.registerCsiHandler({final:"b"},p=>this.repeatPrecedingCharacter(p)),this._parser.registerCsiHandler({final:"c"},p=>this.sendDeviceAttributesPrimary(p)),this._parser.registerCsiHandler({prefix:">",final:"c"},p=>this.sendDeviceAttributesSecondary(p)),this._parser.registerCsiHandler({final:"d"},p=>this.linePosAbsolute(p)),this._parser.registerCsiHandler({final:"e"},p=>this.vPositionRelative(p)),this._parser.registerCsiHandler({final:"f"},p=>this.hVPosition(p)),this._parser.registerCsiHandler({final:"g"},p=>this.tabClear(p)),this._parser.registerCsiHandler({final:"h"},p=>this.setMode(p)),this._parser.registerCsiHandler({prefix:"?",final:"h"},p=>this.setModePrivate(p)),this._parser.registerCsiHandler({final:"l"},p=>this.resetMode(p)),this._parser.registerCsiHandler({prefix:"?",final:"l"},p=>this.resetModePrivate(p)),this._parser.registerCsiHandler({final:"m"},p=>this.charAttributes(p)),this._parser.registerCsiHandler({final:"n"},p=>this.deviceStatus(p)),this._parser.registerCsiHandler({prefix:"?",final:"n"},p=>this.deviceStatusPrivate(p)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},p=>this.softReset(p)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},p=>this.setCursorStyle(p)),this._parser.registerCsiHandler({final:"r"},p=>this.setScrollRegion(p)),this._parser.registerCsiHandler({final:"s"},p=>this.saveCursor(p)),this._parser.registerCsiHandler({final:"t"},p=>this.windowOptions(p)),this._parser.registerCsiHandler({final:"u"},p=>this.restoreCursor(p)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},p=>this.insertColumns(p)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},p=>this.deleteColumns(p)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},p=>this.selectProtected(p)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},p=>this.requestMode(p,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},p=>this.requestMode(p,!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(Yc.IND,()=>this.index()),this._parser.setExecuteHandler(Yc.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(Yc.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new Hi(p=>(this.setTitle(p),this.setIconName(p),!0))),this._parser.registerOscHandler(1,new Hi(p=>this.setIconName(p))),this._parser.registerOscHandler(2,new Hi(p=>this.setTitle(p))),this._parser.registerOscHandler(4,new Hi(p=>this.setOrReportIndexedColor(p))),this._parser.registerOscHandler(8,new Hi(p=>this.setHyperlink(p))),this._parser.registerOscHandler(10,new Hi(p=>this.setOrReportFgColor(p))),this._parser.registerOscHandler(11,new Hi(p=>this.setOrReportBgColor(p))),this._parser.registerOscHandler(12,new Hi(p=>this.setOrReportCursorColor(p))),this._parser.registerOscHandler(104,new Hi(p=>this.restoreIndexedColor(p))),this._parser.registerOscHandler(110,new Hi(p=>this.restoreFgColor(p))),this._parser.registerOscHandler(111,new Hi(p=>this.restoreBgColor(p))),this._parser.registerOscHandler(112,new Hi(p=>this.restoreCursorColor(p))),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 p in Rt)this._parser.registerEscHandler({intermediates:"(",final:p},()=>this.selectCharset("("+p)),this._parser.registerEscHandler({intermediates:")",final:p},()=>this.selectCharset(")"+p)),this._parser.registerEscHandler({intermediates:"*",final:p},()=>this.selectCharset("*"+p)),this._parser.registerEscHandler({intermediates:"+",final:p},()=>this.selectCharset("+"+p)),this._parser.registerEscHandler({intermediates:"-",final:p},()=>this.selectCharset("-"+p)),this._parser.registerEscHandler({intermediates:".",final:p},()=>this.selectCharset("."+p)),this._parser.registerEscHandler({intermediates:"/",final:p},()=>this.selectCharset("/"+p));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(p=>(this._logService.error("Parsing error: ",p),p)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new _4((p,g)=>this.requestStatusString(p,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"),S4))]).catch(t=>{if(t!=="#SLOW_TIMEOUT")throw t;console.warn(`async parser handler taking longer than ${S4} ms`)})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(e,t){let n,s=this._activeBuffer.x,a=this._activeBuffer.y,u=0,c=this._parseStack.paused;if(c){if(n=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(n),n;s=this._parseStack.cursorStartX,a=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>Yr&&(u=this._parseStack.position+Yr)}if(this._logService.logLevel<=1&&this._logService.debug(`parsing data ${typeof e=="string"?` "${e}"`:` "${Array.prototype.map.call(e,p=>String.fromCharCode(p)).join("")}"`}`),this._logService.logLevel===0&&this._logService.trace("parsing data (codes)",typeof e=="string"?e.split("").map(p=>p.charCodeAt(0)):e),this._parseBuffer.length<e.length&&this._parseBuffer.length<Yr&&(this._parseBuffer=new Uint32Array(Math.min(e.length,Yr))),c||this._dirtyRowTracker.clearRange(),e.length>Yr)for(let p=u;p<e.length;p+=Yr){let g=p+Yr<e.length?p+Yr:e.length,_=typeof e=="string"?this._stringDecoder.decode(e.substring(p,g),this._parseBuffer):this._utf8Decoder.decode(e.subarray(p,g),this._parseBuffer);if(n=this._parser.parse(this._parseBuffer,_))return this._preserveStack(s,a,_,p),this._logSlowResolvingAsync(n),n}else if(!c){let p=typeof e=="string"?this._stringDecoder.decode(e,this._parseBuffer):this._utf8Decoder.decode(e,this._parseBuffer);if(n=this._parser.parse(this._parseBuffer,p))return this._preserveStack(s,a,p,0),this._logSlowResolvingAsync(n),n}(this._activeBuffer.x!==s||this._activeBuffer.y!==a)&&this._onCursorMove.fire();let f=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),m=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);m<this._bufferService.rows&&this._onRequestRefreshRows.fire({start:Math.min(m,this._bufferService.rows-1),end:Math.min(f,this._bufferService.rows-1)})}print(e,t,n){let s,a,u=this._charsetService.charset,c=this._optionsService.rawOptions.screenReaderMode,f=this._bufferService.cols,m=this._coreService.decPrivateModes.wraparound,p=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 v=this._parser.precedingJoinState;for(let b=t;b<n;++b){if(s=e[b],s<127&&u){let D=u[String.fromCharCode(s)];D&&(s=D.charCodeAt(0))}let w=this._unicodeService.charProperties(s,v);a=Rs.extractWidth(w);let C=Rs.extractShouldJoin(w),E=C?Rs.extractWidth(v):0;if(v=w,c&&this._onA11yChar.fire(Kr(s)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+a-E>f){if(m){let D=_,K=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(D,K,0,E,!1);K<f;)D.setCellFromCodepoint(K++,0,1,g)}else if(this._activeBuffer.x=f-1,a===2)continue}if(C&&this._activeBuffer.x){let D=_.getWidth(this._activeBuffer.x-1)?1:2;_.addCodepointToCell(this._activeBuffer.x-D,s,a);for(let K=a-E;--K>=0;)_.setCellFromCodepoint(this._activeBuffer.x++,0,0,g);continue}if(p&&(_.insertCells(this._activeBuffer.x,a-E,this._activeBuffer.getNullCell(g)),_.getWidth(f-1)===2&&_.setCellFromCodepoint(f-1,0,1,g)),_.setCellFromCodepoint(this._activeBuffer.x++,s,a,g),a>0)for(;--a;)_.setCellFromCodepoint(this._activeBuffer.x++,0,0,g)}this._parser.precedingJoinState=v,this._activeBuffer.x<f&&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=>y4(n.params[0],this._optionsService.rawOptions.windowOptions)?t(n):!0):this._parser.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new _4(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new Hi(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,a=!1){let u=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);u.replaceCells(t,n,this._activeBuffer.getNullCell(this._eraseAttrData()),a),s&&(u.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,a=this._bufferService.rows-1+this._activeBuffer.ybase-s+1;for(;t--;)this._activeBuffer.lines.splice(a-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(kt));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=Rs.extractWidth(t),a=this._activeBuffer.x-s,u=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(a),c=new Uint32Array(u.length*n),f=0;for(let p=0;p<u.length;){let g=u.codePointAt(p)||0;c[f++]=g,p+=g>65535?2:1}let m=f;for(let p=1;p<n;++p)c.copyWithin(m,0,f),m+=f;return this.print(c,0,m),!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,As),this._charsetService.setgCharset(1,As),this._charsetService.setgCharset(2,As),this._charsetService.setgCharset(3,As);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:a,activeEncoding:u}=this._coreMouseService,c=this._coreService,{buffers:f,cols:m}=this._bufferService,{active:p,alt:g}=f,_=this._optionsService.rawOptions,v=(C,E)=>(c.triggerDataEvent(`${re.ESC}[${t?"":"?"}${C};${E}$y`),!0),b=C=>C?1:2,w=e.params[0];return t?w===2?v(w,4):w===4?v(w,b(c.modes.insertMode)):w===12?v(w,3):w===20?v(w,b(_.convertEol)):v(w,0):w===1?v(w,b(s.applicationCursorKeys)):w===3?v(w,_.windowOptions.setWinLines?m===80?2:m===132?1:0:0):w===6?v(w,b(s.origin)):w===7?v(w,b(s.wraparound)):w===8?v(w,3):w===9?v(w,b(a==="X10")):w===12?v(w,b(_.cursorBlink)):w===25?v(w,b(!c.isCursorHidden)):w===45?v(w,b(s.reverseWraparound)):w===66?v(w,b(s.applicationKeypad)):w===67?v(w,4):w===1e3?v(w,b(a==="VT200")):w===1002?v(w,b(a==="DRAG")):w===1003?v(w,b(a==="ANY")):w===1004?v(w,b(s.sendFocus)):w===1005?v(w,4):w===1006?v(w,b(u==="SGR")):w===1015?v(w,4):w===1016?v(w,b(u==="SGR_PIXELS")):w===1048?v(w,1):w===47||w===1047||w===1049?v(w,b(p===g)):w===2004?v(w,b(s.bracketedPasteMode)):w===2026?v(w,b(s.synchronizedOutput)):v(w,0)}_updateAttrColor(e,t,n,s,a){return t===2?(e|=50331648,e&=-16777216,e|=Wo.fromColorRGB([n,s,a])):t===5&&(e&=-50331904,e|=33554432|n&255),e}_extractColor(e,t,n){let s=[0,0,-1,0,0,0],a=0,u=0;do{if(s[u+a]=e.params[t+u],e.hasSubParams(t+u)){let c=e.getSubParams(t+u),f=0;do s[1]===5&&(a=1),s[u+f+1+a]=c[f];while(++f<c.length&&f+u+1+a<s.length);break}if(s[1]===5&&u+a>=2||s[1]===2&&u+a>=5)break;s[1]&&(a=1)}while(++u+t<e.length&&u+a<s.length);for(let c=2;c<s.length;++c)s[c]===-1&&(s[c]=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 u}_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=kt.fg,e.bg=kt.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 a=0;a<t;a++)n=e.params[a],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(a)?e.getSubParams(a)[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|=kt.fg&16777215):n===49?(s.bg&=-67108864,s.bg|=kt.bg&16777215):n===38||n===48||n===58?a+=this._extractColor(e,a,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|=kt.fg&16777215,s.bg&=-67108864,s.bg|=kt.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=kt.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(!y4(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>v4&&this._windowTitleStack.shift()),(t===0||t===1)&&(this._iconNameStack.push(this._iconName),this._iconNameStack.length>v4&&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(),a=n.shift();if(/^\d+$/.exec(s)){let u=parseInt(s);if(w4(u))if(a==="?")t.push({type:0,index:u});else{let c=g4(a);c&&t.push({type:1,index:u,color:c})}}}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,a=n.findIndex(u=>u.startsWith("id="));return a!==-1&&(s=n[a].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 a=g4(n[s]);a&&this._onColor.fire([{type:1,index:this._specialColors[t],color:a}])}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 a=parseInt(n[s]);w4(a)&&t.push({type:2,index:a})}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,As),!0}selectCharset(e){return e.length!==2?(this.selectDefaultCharset(),!0):(e[0]==="/"||this._charsetService.setgCharset(yz[e[0]],Rt[e[1]]||As),!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=kt.clone(),this._eraseAttrDataInternal=kt.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 rn;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=c=>(this._coreService.triggerDataEvent(`${re.ESC}${c}${re.ESC}\\`),!0),s=this._bufferService.buffer,a=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}[a.cursorStyle]-(a.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(e,t){this._dirtyRowTracker.markRangeDirty(e,t)}},op=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&&(b4=e,e=t,t=b4),e<this.start&&(this.start=e),t>this.end&&(this.end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};op=gt([de(0,di)],op);function w4(e){return 0<=e&&e<256}var bz=5e7,x4=12,wz=50,xz=class extends He{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 ce),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>bz)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],a=this._action(s,t);if(a){let c=f=>performance.now()-n>=x4?setTimeout(()=>this._innerWrite(0,f)):this._innerWrite(n,f);a.catch(f=>(queueMicrotask(()=>{throw f}),Promise.resolve(!1))).then(c);return}let u=this._callbacks[this._bufferOffset];if(u&&u(),this._bufferOffset++,this._pendingData-=s.length,performance.now()-n>=x4)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>wz&&(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()}},up=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 f=t.addMarker(t.ybase+t.y),m={data:e,id:this._nextId++,lines:[f]};return f.onDispose(()=>this._removeMarkerFromLink(m,f)),this._dataByLinkId.set(m.id,m),m.id}let n=e,s=this._getEntryIdKey(n),a=this._entriesWithId.get(s);if(a)return this.addLineToLink(a.id,t.ybase+t.y),a.id;let u=t.addMarker(t.ybase+t.y),c={id:this._nextId++,key:this._getEntryIdKey(n),data:n,lines:[u]};return u.onDispose(()=>this._removeMarkerFromLink(c,u)),this._entriesWithId.set(c.key,c),this._dataByLinkId.set(c.id,c),c.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)))}};up=gt([de(0,di)],up);var C4=!1,Cz=class extends He{constructor(e){super(),this._windowsWrappingHeuristics=this._register(new Ql),this._onBinary=this._register(new ce),this.onBinary=this._onBinary.event,this._onData=this._register(new ce),this.onData=this._onData.event,this._onLineFeed=this._register(new ce),this.onLineFeed=this._onLineFeed.event,this._onResize=this._register(new ce),this.onResize=this._onResize.event,this._onWriteParsed=this._register(new ce),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this._register(new ce),this._instantiationService=new WL,this.optionsService=this._register(new rz(e)),this._instantiationService.setService(pi,this.optionsService),this._bufferService=this._register(this._instantiationService.createInstance(rp)),this._instantiationService.setService(di,this._bufferService),this._logService=this._register(this._instantiationService.createInstance(np)),this._instantiationService.setService(h8,this._logService),this.coreService=this._register(this._instantiationService.createInstance(sp)),this._instantiationService.setService(Ys,this.coreService),this.coreMouseService=this._register(this._instantiationService.createInstance(lp)),this._instantiationService.setService(c8,this.coreMouseService),this.unicodeService=this._register(this._instantiationService.createInstance(Rs)),this._instantiationService.setService(qO,this.unicodeService),this._charsetService=this._instantiationService.createInstance(uz),this._instantiationService.setService(VO,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(up),this._instantiationService.setService(f8,this._oscLinkService),this._inputHandler=this._register(new Sz(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this._register(ei.forward(this._inputHandler.onLineFeed,this._onLineFeed)),this._register(this._inputHandler),this._register(ei.forward(this._bufferService.onResize,this._onResize)),this._register(ei.forward(this.coreService.onData,this._onData)),this._register(ei.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 xz((t,n)=>this._inputHandler.parse(t,n))),this._register(ei.forward(this._writeBuffer.onWriteParsed,this._onWriteParsed))}get onScroll(){return this._onScrollApi||(this._onScrollApi=this._register(new ce),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&&!C4&&(this._logService.warn("writeSync is unreliable and will be removed soon."),C4=!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,q8),t=Math.max(t,Y8),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(m4.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:"H"},()=>(m4(this._bufferService),!1))),this._windowsWrappingHeuristics.value=ct(()=>{for(let t of e)t.dispose()})}}},Ez={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 kz(e,t,n,s){let a={type:0,cancel:!1,key:void 0},u=(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?a.key=re.ESC+"OA":a.key=re.ESC+"[A":e.key==="UIKeyInputLeftArrow"?t?a.key=re.ESC+"OD":a.key=re.ESC+"[D":e.key==="UIKeyInputRightArrow"?t?a.key=re.ESC+"OC":a.key=re.ESC+"[C":e.key==="UIKeyInputDownArrow"&&(t?a.key=re.ESC+"OB":a.key=re.ESC+"[B");break;case 8:a.key=e.ctrlKey?"\b":re.DEL,e.altKey&&(a.key=re.ESC+a.key);break;case 9:if(e.shiftKey){a.key=re.ESC+"[Z";break}a.key=re.HT,a.cancel=!0;break;case 13:a.key=e.altKey?re.ESC+re.CR:re.CR,a.cancel=!0;break;case 27:a.key=re.ESC,e.altKey&&(a.key=re.ESC+re.ESC),a.cancel=!0;break;case 37:if(e.metaKey)break;u?a.key=re.ESC+"[1;"+(u+1)+"D":t?a.key=re.ESC+"OD":a.key=re.ESC+"[D";break;case 39:if(e.metaKey)break;u?a.key=re.ESC+"[1;"+(u+1)+"C":t?a.key=re.ESC+"OC":a.key=re.ESC+"[C";break;case 38:if(e.metaKey)break;u?a.key=re.ESC+"[1;"+(u+1)+"A":t?a.key=re.ESC+"OA":a.key=re.ESC+"[A";break;case 40:if(e.metaKey)break;u?a.key=re.ESC+"[1;"+(u+1)+"B":t?a.key=re.ESC+"OB":a.key=re.ESC+"[B";break;case 45:!e.shiftKey&&!e.ctrlKey&&(a.key=re.ESC+"[2~");break;case 46:u?a.key=re.ESC+"[3;"+(u+1)+"~":a.key=re.ESC+"[3~";break;case 36:u?a.key=re.ESC+"[1;"+(u+1)+"H":t?a.key=re.ESC+"OH":a.key=re.ESC+"[H";break;case 35:u?a.key=re.ESC+"[1;"+(u+1)+"F":t?a.key=re.ESC+"OF":a.key=re.ESC+"[F";break;case 33:e.shiftKey?a.type=2:e.ctrlKey?a.key=re.ESC+"[5;"+(u+1)+"~":a.key=re.ESC+"[5~";break;case 34:e.shiftKey?a.type=3:e.ctrlKey?a.key=re.ESC+"[6;"+(u+1)+"~":a.key=re.ESC+"[6~";break;case 112:u?a.key=re.ESC+"[1;"+(u+1)+"P":a.key=re.ESC+"OP";break;case 113:u?a.key=re.ESC+"[1;"+(u+1)+"Q":a.key=re.ESC+"OQ";break;case 114:u?a.key=re.ESC+"[1;"+(u+1)+"R":a.key=re.ESC+"OR";break;case 115:u?a.key=re.ESC+"[1;"+(u+1)+"S":a.key=re.ESC+"OS";break;case 116:u?a.key=re.ESC+"[15;"+(u+1)+"~":a.key=re.ESC+"[15~";break;case 117:u?a.key=re.ESC+"[17;"+(u+1)+"~":a.key=re.ESC+"[17~";break;case 118:u?a.key=re.ESC+"[18;"+(u+1)+"~":a.key=re.ESC+"[18~";break;case 119:u?a.key=re.ESC+"[19;"+(u+1)+"~":a.key=re.ESC+"[19~";break;case 120:u?a.key=re.ESC+"[20;"+(u+1)+"~":a.key=re.ESC+"[20~";break;case 121:u?a.key=re.ESC+"[21;"+(u+1)+"~":a.key=re.ESC+"[21~";break;case 122:u?a.key=re.ESC+"[23;"+(u+1)+"~":a.key=re.ESC+"[23~";break;case 123:u?a.key=re.ESC+"[24;"+(u+1)+"~":a.key=re.ESC+"[24~";break;default:if(e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey)e.keyCode>=65&&e.keyCode<=90?a.key=String.fromCharCode(e.keyCode-64):e.keyCode===32?a.key=re.NUL:e.keyCode>=51&&e.keyCode<=55?a.key=String.fromCharCode(e.keyCode-51+27):e.keyCode===56?a.key=re.DEL:e.keyCode===219?a.key=re.ESC:e.keyCode===220?a.key=re.FS:e.keyCode===221&&(a.key=re.GS);else if((!n||s)&&e.altKey&&!e.metaKey){let c=Ez[e.keyCode]?.[e.shiftKey?1:0];if(c)a.key=re.ESC+c;else if(e.keyCode>=65&&e.keyCode<=90){let f=e.ctrlKey?e.keyCode-64:e.keyCode+32,m=String.fromCharCode(f);e.shiftKey&&(m=m.toUpperCase()),a.key=re.ESC+m}else if(e.keyCode===32)a.key=re.ESC+(e.ctrlKey?re.NUL:" ");else if(e.key==="Dead"&&e.code.startsWith("Key")){let f=e.code.slice(3,4);e.shiftKey||(f=f.toLowerCase()),a.key=re.ESC+f,a.cancel=!0}}else n&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.metaKey?e.keyCode===65&&(a.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&e.key.length===1?a.key=e.key:e.key&&e.ctrlKey&&(e.key==="_"&&(a.key=re.US),e.key==="@"&&(a.key=re.NUL));break}return a}var yt=0,Tz=class{constructor(e){this._getKey=e,this._array=[],this._insertedValues=[],this._flushInsertedTask=new _h,this._isFlushingInserted=!1,this._deletedIndices=[],this._flushDeletedTask=new _h,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((a,u)=>this._getKey(a)-this._getKey(u)),t=0,n=0,s=new Array(this._array.length+this._insertedValues.length);for(let a=0;a<s.length;a++)n>=this._array.length||this._getKey(e[t])<=this._getKey(this._array[n])?(s[a]=e[t],t++):s[a]=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||(yt=this._search(t),yt===-1)||this._getKey(this._array[yt])!==t)return!1;do if(this._array[yt]===e)return this._deletedIndices.length===0&&this._flushDeletedTask.enqueue(()=>this._flushDeleted()),this._deletedIndices.push(yt),!0;while(++yt<this._array.length&&this._getKey(this._array[yt])===t);return!1}_flushDeleted(){this._isFlushingDeleted=!0;let e=this._deletedIndices.sort((a,u)=>a-u),t=0,n=new Array(this._array.length-e.length),s=0;for(let a=0;a<this._array.length;a++)e[t]===a?t++:n[s++]=this._array[a];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&&(yt=this._search(e),!(yt<0||yt>=this._array.length)&&this._getKey(this._array[yt])===e))do yield this._array[yt];while(++yt<this._array.length&&this._getKey(this._array[yt])===e)}forEachByKey(e,t){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(yt=this._search(e),!(yt<0||yt>=this._array.length)&&this._getKey(this._array[yt])===e))do t(this._array[yt]);while(++yt<this._array.length&&this._getKey(this._array[yt])===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,a=this._getKey(this._array[s]);if(a>e)n=s-1;else if(a<e)t=s+1;else{for(;s>0&&this._getKey(this._array[s-1])===e;)s--;return s}}return t}},e0=0,E4=0,Mz=class extends He{constructor(){super(),this._decorations=new Tz(e=>e?.marker.line),this._onDecorationRegistered=this._register(new ce),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this._register(new ce),this.onDecorationRemoved=this._onDecorationRemoved.event,this._register(ct(()=>this.reset()))}get decorations(){return this._decorations.values()}registerDecoration(e){if(e.marker.isDisposed)return;let t=new Dz(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,a=0;for(let u of this._decorations.getKeyIterator(t))s=u.options.x??0,a=s+(u.options.width??1),e>=s&&e<a&&(!n||(u.options.layer??"bottom")===n)&&(yield u)}forEachDecorationAtCell(e,t,n,s){this._decorations.forEachByKey(t,a=>{e0=a.options.x??0,E4=e0+(a.options.width??1),e>=e0&&e<E4&&(!n||(a.options.layer??"bottom")===n)&&s(a)})}},Dz=class extends Jr{constructor(e){super(),this.options=e,this.onRenderEmitter=this.add(new ce),this.onRender=this.onRenderEmitter.event,this._onDispose=this.add(new ce),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=dt.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=dt.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}dispose(){this._onDispose.fire(),super.dispose()}},Az=1e3,Oz=class{constructor(e,t=Az){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 a=s-this._lastRefreshMs,u=this._debounceThresholdMS-a;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=performance.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},u)}}_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)}},k4=20,gh=class extends He{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 a=this._coreBrowserService.mainDocument;this._accessibilityContainer=a.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=a.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let u=0;u<this._terminal.rows;u++)this._rowElements[u]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[u]);if(this._topBoundaryFocusListener=u=>this._handleBoundaryFocus(u,0),this._bottomBoundaryFocusListener=u=>this._handleBoundaryFocus(u,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=a.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this._register(new Oz(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(u=>this._handleResize(u.rows))),this._register(this._terminal.onRender(u=>this._refreshRows(u.start,u.end))),this._register(this._terminal.onScroll(()=>this._refreshRows())),this._register(this._terminal.onA11yChar(u=>this._handleChar(u))),this._register(this._terminal.onLineFeed(()=>this._handleChar(`
67
- `))),this._register(this._terminal.onA11yTab(u=>this._handleTab(u))),this._register(this._terminal.onKey(u=>this._handleKey(u.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(ke(a,"selectionchange",()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(ct(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<k4+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
68
- `&&(this._liveRegionLineCount++,this._liveRegionLineCount===k4+1&&(this._liveRegion.textContent+=D0.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 a=e;a<=t;a++){let u=n.lines.get(n.ydisp+a),c=[],f=u?.translateToString(!0,void 0,void 0,c)||"",m=(n.ydisp+a+1).toString(),p=this._rowElements[a];p&&(f.length===0?(p.textContent=" ",this._rowColumns.set(p,[0,1])):(p.textContent=f,this._rowColumns.set(p,c)),p.setAttribute("aria-posinset",m),p.setAttribute("aria-setsize",s),this._alignRowWidth(p))}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],a=n.getAttribute("aria-posinset"),u=t===0?"1":`${this._terminal.buffer.lines.length}`;if(a===u||e.relatedTarget!==s)return;let c,f;if(t===0?(c=n,f=this._rowElements.pop(),this._rowContainer.removeChild(f)):(c=this._rowElements.shift(),f=n,this._rowContainer.removeChild(c)),c.removeEventListener("focus",this._topBoundaryFocusListener),f.removeEventListener("focus",this._bottomBoundaryFocusListener),t===0){let m=this._createAccessibilityTreeNode();this._rowElements.unshift(m),this._rowContainer.insertAdjacentElement("afterbegin",m)}else{let m=this._createAccessibilityTreeNode();this._rowElements.push(m),this._rowContainer.appendChild(m)}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 a=({node:f,offset:m})=>{let p=f instanceof Text?f.parentNode:f,g=parseInt(p?.getAttribute("aria-posinset"),10)-1;if(isNaN(g))return console.warn("row is invalid. Race condition?"),null;let _=this._rowColumns.get(p);if(!_)return console.warn("columns is null. Race condition?"),null;let v=m<_.length?_[m]:_.slice(-1)[0]+1;return v>=this._terminal.cols&&(++g,v=0),{row:g,column:v}},u=a(t),c=a(n);if(!(!u||!c)){if(u.row>c.row||u.row===c.row&&u.column>=c.column)throw new Error("invalid range");this._terminal.select(u.column,u.row,(c.row-u.row)*this._terminal.cols-u.column+c.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})`}};gh=gt([de(1,Bm),de(2,ur),de(3,cr)],gh);var cp=class extends He{constructor(e,t,n,s,a){super(),this._element=e,this._mouseService=t,this._renderService=n,this._bufferService=s,this._linkProviderService=a,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this._register(new ce),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this._register(new ce),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this._register(ct(()=>{Ps(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(ke(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(ke(this._element,"mousemove",this._handleMouseMove.bind(this))),this._register(ke(this._element,"mousedown",this._handleMouseDown.bind(this))),this._register(ke(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 a=n[s];if(a.classList.contains("xterm"))break;if(a.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(a=>{a.link.dispose&&a.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let n=!1;for(let[s,a]of this._linkProviderService.linkProviders.entries())t?this._activeProviderReplies?.get(s)&&(n=this._checkLinkProviderResult(s,e,n)):a.provideLinks(e.y,u=>{if(this._isMouseOut)return;let c=u?.map(f=>({link:f}));this._activeProviderReplies?.set(s,c),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 a=t.get(s);if(a)for(let u=0;u<a.length;u++){let c=a[u],f=c.link.range.start.y<e?0:c.link.range.start.x,m=c.link.range.end.y>e?this._bufferService.cols:c.link.range.end.x;for(let p=f;p<=m;p++){if(n.has(p)){a.splice(u--,1);break}n.add(p)}}}}_checkLinkProviderResult(e,t,n){if(!this._activeProviderReplies)return n;let s=this._activeProviderReplies.get(e),a=!1;for(let u=0;u<e;u++)(!this._activeProviderReplies.has(u)||this._activeProviderReplies.get(u))&&(a=!0);if(!a&&s){let u=s.find(c=>this._linkAtPosition(c.link,t));u&&(n=!0,this._handleNewLink(u))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!n)for(let u=0;u<this._activeProviderReplies.size;u++){let c=this._activeProviderReplies.get(u)?.find(f=>this._linkAtPosition(f.link,t));if(c){n=!0,this._handleNewLink(c);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&&Rz(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,Ps(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,a=this._bufferService.buffer.ydisp+1+n.end;if(this._currentLink.link.range.start.y>=s&&this._currentLink.link.range.end.y<=a&&(this._clearCurrentLink(s,a),this._lastMouseEvent)){let u=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);u&&this._askForLink(u,!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,a=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(a)}_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,a=t.y*this._bufferService.cols+t.x;return n<=a&&a<=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,a){return{x1:e,y1:t,x2:n,y2:s,cols:this._bufferService.cols,fg:a}}};cp=gt([de(1,jm),de(2,cr),de(3,di),de(4,p8)],cp);function Rz(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 Lz=class extends Cz{constructor(e={}){super(e),this._linkifier=this._register(new Ql),this.browser=L8,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new Ql),this._onCursorMove=this._register(new ce),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new ce),this.onKey=this._onKey.event,this._onRender=this._register(new ce),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new ce),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new ce),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new ce),this.onBell=this._onBell.event,this._onFocus=this._register(new ce),this._onBlur=this._register(new ce),this._onA11yCharEmitter=this._register(new ce),this._onA11yTabEmitter=this._register(new ce),this._onWillOpen=this._register(new ce),this._setup(),this._decorationService=this._instantiationService.createInstance(Mz),this._instantiationService.setService(Go,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(wL),this._instantiationService.setService(p8,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(O0)),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(ei.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(ei.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(ei.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(ei.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(t=>this._afterResize(t.cols,t.rows))),this._register(ct(()=>{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 a=ot.toColorRGB(n==="ansi"?this._themeService.colors.ansi[t.index]:this._themeService.colors[n]);this.coreService.triggerDataEvent(`${re.ESC}]${s};${vz(a)}${O8.ST}`);break;case 1:if(n==="ansi")this._themeService.modifyColors(u=>u.ansi[t.index]=Mt.toColor(...t.color));else{let u=n;this._themeService.modifyColors(c=>c[u]=Mt.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(gh,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,a=t.getWidth(n),u=this._renderService.dimensions.css.cell.width*a,c=this.buffer.y*this._renderService.dimensions.css.cell.height,f=n*this._renderService.dimensions.css.cell.width;this.textarea.style.left=f+"px",this.textarea.style.top=c+"px",this.textarea.style.width=u+"px",this.textarea.style.height=s+"px",this.textarea.style.lineHeight=s+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this._register(ke(this.element,"copy",t=>{this.hasSelection()&&jO(t,this._selectionService)}));let e=t=>HO(t,this.textarea,this.coreService,this.optionsService);this._register(ke(this.textarea,"paste",e)),this._register(ke(this.element,"paste",e)),z8?this._register(ke(this.element,"mousedown",t=>{t.button===2&&B5(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(ke(this.element,"contextmenu",t=>{B5(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),Ym&&this._register(ke(this.element,"auxclick",t=>{t.button===1&&s8(t,this.textarea,this.screenElement)}))}_bindKeys(){this._register(ke(this.textarea,"keyup",e=>this._keyUp(e),!0)),this._register(ke(this.textarea,"keydown",e=>this._keyDown(e),!0)),this._register(ke(this.textarea,"keypress",e=>this._keyPress(e),!0)),this._register(ke(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this._register(ke(this.textarea,"compositionupdate",e=>this._compositionHelper.compositionupdate(e))),this._register(ke(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this._register(ke(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(ke(this.screenElement,"mousemove",a=>this.updateCursorStyle(a))),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",M0.get()),j8||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(SL,this.textarea,e.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(ur,this._coreBrowserService),this._register(ke(this.textarea,"focus",a=>this._handleTextAreaFocus(a))),this._register(ke(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(Q0,this._document,this._helperContainer),this._instantiationService.setService(Lh,this._charSizeService),this._themeService=this._instantiationService.createInstance(ip),this._instantiationService.setService(ra,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(ph),this._instantiationService.setService(d8,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(ep,this.rows,this.screenElement)),this._instantiationService.setService(cr,this._renderService),this._register(this._renderService.onRenderedViewportChange(a=>this._onRender.fire(a))),this.onResize(a=>this._renderService.resize(a.cols,a.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(G0,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(J0),this._instantiationService.setService(jm,this._mouseService);let s=this._linkifier.value=this._register(this._instantiationService.createInstance(cp,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(K0,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(a=>{super.scrollLines(a,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(tp,this.element,this.screenElement,s)),this._instantiationService.setService($O,this._selectionService),this._register(this._selectionService.onRequestScrollLines(a=>this.scrollLines(a.amount,a.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(a=>this._renderService.handleSelectionChanged(a.start,a.end,a.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(a=>{this.textarea.value=a,this.textarea.focus(),this.textarea.select()})),this._register(ei.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{this._selectionService.refresh(),this._viewport?.queueSync()})),this._register(this._instantiationService.createInstance(W0,this.screenElement)),this._register(ke(this.element,"mousedown",a=>this._selectionService.handleMouseDown(a))),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(gh,this)),this._register(this.optionsService.onSpecificOptionChange("screenReaderMode",a=>this._handleScreenReaderModeOptionChange(a))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(dh,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRuler",a=>{!this._overviewRulerRenderer&&a&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(dh,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(Z0,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let e=this,t=this.element;function n(u){let c=e._mouseService.getMouseReportCoords(u,e.screenElement);if(!c)return!1;let f,m;switch(u.overrideType||u.type){case"mousemove":m=32,u.buttons===void 0?(f=3,u.button!==void 0&&(f=u.button<3?u.button:3)):f=u.buttons&1?0:u.buttons&4?1:u.buttons&2?2:3;break;case"mouseup":m=0,f=u.button<3?u.button:3;break;case"mousedown":m=1,f=u.button<3?u.button:3;break;case"wheel":if(e._customWheelEventHandler&&e._customWheelEventHandler(u)===!1)return!1;let p=u.deltaY;if(p===0||e.coreMouseService.consumeWheelEvent(u,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return!1;m=p<0?0:1,f=4;break;default:return!1}return m===void 0||f===void 0||f>4?!1:e.coreMouseService.triggerMouseEvent({col:c.col,row:c.row,x:c.x,y:c.y,button:f,action:m,ctrl:u.ctrlKey,alt:u.altKey,shift:u.shiftKey})}let s={mouseup:null,wheel:null,mousedrag:null,mousemove:null},a={mouseup:u=>(n(u),u.buttons||(this._document.removeEventListener("mouseup",s.mouseup),s.mousedrag&&this._document.removeEventListener("mousemove",s.mousedrag)),this.cancel(u)),wheel:u=>(n(u),this.cancel(u,!0)),mousedrag:u=>{u.buttons&&n(u)},mousemove:u=>{u.buttons||n(u)}};this._register(this.coreMouseService.onProtocolChange(u=>{u?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(u)),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()),u&8?s.mousemove||(t.addEventListener("mousemove",a.mousemove),s.mousemove=a.mousemove):(t.removeEventListener("mousemove",s.mousemove),s.mousemove=null),u&16?s.wheel||(t.addEventListener("wheel",a.wheel,{passive:!1}),s.wheel=a.wheel):(t.removeEventListener("wheel",s.wheel),s.wheel=null),u&2?s.mouseup||(s.mouseup=a.mouseup):(this._document.removeEventListener("mouseup",s.mouseup),s.mouseup=null),u&4?s.mousedrag||(s.mousedrag=a.mousedrag):(this._document.removeEventListener("mousemove",s.mousedrag),s.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(ke(t,"mousedown",u=>{if(u.preventDefault(),this.focus(),!(!this.coreMouseService.areMouseEventsActive||this._selectionService.shouldForceSelection(u)))return n(u),s.mouseup&&this._document.addEventListener("mouseup",s.mouseup),s.mousedrag&&this._document.addEventListener("mousemove",s.mousedrag),this.cancel(u)})),this._register(ke(t,"wheel",u=>{if(!s.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(u)===!1)return!1;if(!this.buffer.hasScrollback){if(u.deltaY===0)return!1;if(e.coreMouseService.consumeWheelEvent(u,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return this.cancel(u,!0);let c=re.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(u.deltaY<0?"A":"B");return this.coreService.triggerDataEvent(c,!0),this.cancel(u,!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){r8(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=kz(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)&&(zz(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(kt));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),a=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${re.ESC}[6;${a};${s}t`);break}}cancel(e,t){if(!(!this.options.cancelEvents&&!t))return e.preventDefault(),e.stopPropagation(),!1}};function zz(e){return e.keyCode===16||e.keyCode===17||e.keyCode===18}var Nz=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)}},Bz=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 rn)}translateToString(e,t,n){return this._line.translateToString(e,t,n)}},T4=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 Bz(t)}getNullCell(){return new rn}},jz=class extends He{constructor(e){super(),this._core=e,this._onBufferChange=this._register(new ce),this.onBufferChange=this._onBufferChange.event,this._normal=new T4(this._core.buffers.normal,"normal"),this._alternate=new T4(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)}},Hz=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)}},Iz=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}},Pz=["cols","rows"],Mn=0,Fz=class extends He{constructor(e){super(),this._core=this._register(new Lz(e)),this._addonManager=this._register(new Nz),this._publicOptions={...this._core.options};let t=s=>this._core.options[s],n=(s,a)=>{this._checkReadonlyOptions(s),this._core.options[s]=a};for(let s in this._core.options){let a={get:t.bind(this,s),set:n.bind(this,s)};Object.defineProperty(this._publicOptions,s,a)}}_checkReadonlyOptions(e){if(Pz.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 Hz(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new Iz(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 jz(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
69
- `,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 M0.get()},set promptLabel(e){M0.set(e)},get tooMuchOutput(){return D0.get()},set tooMuchOutput(e){D0.set(e)}}}_verifyIntegers(...e){for(Mn of e)if(Mn===1/0||isNaN(Mn)||Mn%1!==0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...e){for(Mn of e)if(Mn&&(Mn===1/0||isNaN(Mn)||Mn%1!==0||Mn<0))throw new Error("This API only accepts positive integers")}};const Uz=Object.freeze(Object.defineProperty({__proto__:null,Terminal:Fz},Symbol.toStringTag,{value:"Module"}));var Vz=2,qz=1,Yz=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")),a=Math.max(0,parseInt(n.getPropertyValue("width"))),u=window.getComputedStyle(this._terminal.element),c={top:parseInt(u.getPropertyValue("padding-top")),bottom:parseInt(u.getPropertyValue("padding-bottom")),right:parseInt(u.getPropertyValue("padding-right")),left:parseInt(u.getPropertyValue("padding-left"))},f=c.top+c.bottom,m=c.right+c.left,p=s-f,g=a-m-t;return{cols:Math.max(Vz,Math.floor(g/e.css.cell.width)),rows:Math.max(qz,Math.floor(p/e.css.cell.height))}}};const $z=Object.freeze(Object.defineProperty({__proto__:null,FitAddon:Yz},Symbol.toStringTag,{value:"Module"})),Kz=["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"],Wz="__DSC_BOOT__",M4="__DSC_UI_FACTORIES__",Gz="__DSC_UI_BOOT_STATE__",Fo={react:$9,"react-dom":fA,"react-dom/client":J9,"react/jsx-runtime":V9,"@dsc/ui":RO,"@dsc/ui-slots":YA,"@dsc/ui-primitives":CA,"@dsc/ui-dockkit":PA,"@xterm/xterm":Uz,"@xterm/addon-fit":$z},K8=Object.keys(Fo),D4=Kz,A4=[...D4.filter(e=>!(e in Fo)),...Object.keys(Fo).filter(e=>!D4.includes(e))];A4.length>0&&console.error(`[ui-shell] 平台模块表与运行时 require 表对不上:${A4.join("、")}`);const hp=new Set;function O4(){for(const e of[...hp])try{e()}catch{}}async function Xz(){const e=globalThis[Wz];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()}async function Zz(e,t){const n=Qz(e),s=new Map;for(const T of n)for(const $ of T.entries)s.set($,T);const a={rev:e.rev,host:{name:e.host.name,version:e.host.version},startedAt:Date.now(),firstFrameAt:null,batches:n.map(T=>({phase:T.phase,entries:[...T.entries],state:"pending",failures:[]})),plugins:{},requests:[]};for(const T of e.entries)a.plugins[T.id]={id:T.id,phase:s.get(T.id)?.phase??"application",rev:T.rev,state:"pending",attempts:0};const u=new Map;for(let T=0;T<n.length;T+=1)for(const $ of n[T].entries)u.set($,a.batches[T]);globalThis[Gz]=a,O4();const c=new rw,f=Jz(),m=new Map;let p=Promise.resolve();const g=T=>{const $=p.then(T);return p=$.then(()=>{},()=>{}),$},_=new N4,v=new Map,b=new Map,w=[...e.entries],C=()=>{O4()},E=(T,$)=>{const ae=a.plugins[T];ae!==void 0&&(Object.assign(ae,$),C())},D=(T,$)=>({has:ae=>typeof f[ae]=="function",load:ae=>{const N={url:ae,kind:ae.includes("??")?"batch":"single",id:T,phase:$,at:Date.now(),ok:!0};return a.requests.push(N),rN(ae,T).catch(J=>{throw N.ok=!1,C(),J})}}),K=async(T,$,ae="batch")=>{if(b.get(T.id)===T.rev&&v.get(T.id)?.ok===!0)return null;const N=s.get(T.id),J=N?.phase??"application",W=[],G=[],Q=()=>{for(const B of[...W].reverse())try{B()}catch(ee){console.error(`插件 ${T.id} 回滚登记时出错:`,ee)}W.length=0},P=gw(T.inject,B=>v.get(B),_);if(P.length>0){const B=`等待:${P.join(";")}`;return v.set(T.id,{id:T.id,ok:!1,error:B,attempts:$}),E(T.id,{state:"failed",at:Date.now(),attempts:$,error:B}),B}E(T.id,{state:"loading",phase:J,rev:T.rev,attempts:$});try{const B=ae==="single"?T.url:N?.url??T.url,ee=B===T.url?void 0:T.url;await c.arrive({id:T.id,preferred:B,...ee===void 0?{}:{fallback:ee}},D(T.id,J));const U=f[T.id];if(typeof U!="function")throw new Error(`插件 ${T.id} 的脚本没有注册工厂(bundle 形状不对?)`);const fe=nN(U,T.id),k=fe?.default??fe,Ie=k?.apply;if(typeof Ie!="function")throw new Error("插件没有导出 apply(ui)");const We={id:T.id,slots:pw(t.slots,ne=>R4(W,ne)),host:t.host,runtime:t.runtime,provide:(ne,oe)=>{R4(W,_.provide(ne,oe,T.id)),G.push(ne)},consume:ne=>_.consume(ne)},O=Ie(We);typeof O=="function"&&W.push(O),m.set(T.id,Q),b.set(T.id,T.rev);const A=k?.name;return v.set(T.id,{id:T.id,ok:!0,attempts:$,...typeof A=="string"&&A!==""?{name:A}:{},...G.length===0?{}:{provides:[...G]}}),E(T.id,{state:"loaded",at:Date.now(),attempts:$,error:void 0}),null}catch(B){Q();const ee=B instanceof Error?B.message:String(B);return v.set(T.id,{id:T.id,ok:!1,error:ee,attempts:$}),E(T.id,{state:"failed",error:ee,at:Date.now(),attempts:$}),ee}},V=async(T,$)=>{$!==void 0&&($.state="loading",$.startedAt=Date.now(),$.failures=[],C());const ae=[];for(const N of T.entries){const J=e.entries.find(W=>W.id===N);J!==void 0&&await K(J,1)!==null&&ae.push(J)}for(const N of ae)v.get(N.id)?.ok!==!0&&await K(N,2);$!==void 0&&($.failures=T.entries.filter(N=>v.get(N)?.ok===!1),$.state=$.failures.length>0?"failed":"done",$.doneAt=Date.now(),C())},Z=async T=>{const $=s.get(T.id),ae=$?.url??T.url,N=ae===T.url?void 0:T.url;try{await c.arrive({id:T.id,preferred:ae,...N===void 0?{}:{fallback:N}},D(T.id,$?.phase??"application"))}catch{}};await Promise.all(e.entries.filter(T=>T.immediately===!0&&a.plugins[T.id]?.state==="pending").map(T=>Z(T)));for(let T=0;T<n.length;T+=1)n[T].phase==="early"&&await V(n[T],a.batches[T]);let se=!1;const z={graph:e,getReports:()=>w.map(T=>v.get(T.id)).filter(T=>T!==void 0),getState:()=>a,subscribe:T=>(hp.add(T),()=>{hp.delete(T)}),markFirstFrame:()=>{a.firstFrameAt===null&&(a.firstFrameAt=Date.now(),C())},startApplication:()=>{if(se)return;se=!0;const T=()=>{const ae=[];for(let N=0;N<n.length;N+=1){if(n[N].phase!=="application")continue;const J=a.batches[N];J!==void 0&&J.state==="pending"&&(J.state="scheduled",J.scheduledAt=Date.now()),ae.push({batch:n[N],batchState:J})}C(),g(async()=>{for(const N of ae)await V(N.batch,N.batchState)}).catch(N=>{console.error("[ui-shell] 应用批安装出错",N)})},$=globalThis.requestIdleCallback;typeof $=="function"?$(T,{timeout:2e3}):setTimeout(T,0)},reload:async T=>(w.some($=>$.id===T.id)||w.push(T),z.uninstall(T.id),K(T,1,"single")),uninstall:T=>{const $=m.get(T);if($!==void 0)try{$()}catch(ae){console.error(`插件 ${T} 卸载时出错:`,ae)}m.delete(T),b.delete(T),delete f[T],iN(T),v.delete(T),E(T,{state:"removed",at:Date.now(),error:void 0})},installedRev:T=>b.get(T),enqueue:g,awaitingBatch:T=>{const $=u.get(T);return $!==void 0&&($.state==="pending"||$.state==="scheduled")},services:_,disposeAll:()=>{for(const[T,$]of[...m].reverse())try{$()}catch(ae){console.error(`插件 ${T} 卸载时出错:`,ae)}m.clear(),b.clear()}};return z}function Qz(e){const t=new Set(e.entries.map(c=>c.id)),n=[];for(const c of e.batches??[]){const f=c.entries.filter(m=>t.has(m));f.length>0&&n.push({...c,entries:f})}const s=new Set(n.flatMap(c=>c.entries)),a=e.entries.filter(c=>!s.has(c.id)).map(c=>c.id);a.length>0&&n.push({phase:"application",entries:a});const u=c=>c==="early"?0:1;return[...n].sort((c,f)=>u(c.phase)-u(f.phase))}function R4(e,t){return e.push(t),t}function Jz(){const e=globalThis,t=e[M4];if(t!==void 0&&typeof t=="object"&&t!==null)return t;const n={};return e[M4]=n,n}function eN(){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 tN(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 iN(e){if(!(typeof document>"u"))for(const t of document.querySelectorAll("style[data-dsc-plugin]"))t.getAttribute("data-dsc-plugin")===e&&t.remove()}function nN(e,t){const n=eN(),s={exports:{}},a=u=>{if(!(u in Fo))throw new Error(`插件 ${t} 请求了白名单外的模块「${u}」(允许:${K8.join("、")})`);return Fo[u]};try{return e(a,s,s.exports),s.exports}finally{tN(n,t)}}function rN(e,t){return new Promise((n,s)=>{const a=document.createElement("script");a.src=e,a.async=!1,a.dataset.dscPlugin=t,a.addEventListener("load",()=>{a.remove(),n()}),a.addEventListener("error",()=>{a.remove(),s(new Error(`取 bundle 失败:${e}`))}),document.head.append(a)})}function sN(e){const t=new Map,n=new Set;let s=!1,a=null;const u=()=>{for(const p of[...n])try{p()}catch{}},c=async p=>{const g=new Set(p.graph.entries.map(_=>_.id));for(const[_,v]of Object.entries(e.session.getState().plugins))v.state!=="loaded"||g.has(_)||(e.session.uninstall(_),t.delete(_));for(const _ of p.graph.entries){if(e.session.installedRev(_.id)===_.rev){t.delete(_.id);continue}if(e.session.awaitingBatch(_.id))continue;const v=await e.session.reload(_);v===null?t.delete(_.id):t.set(_.id,{id:_.id,message:v,at:Date.now()})}u()},f=p=>{a=p,e.session.enqueue(async()=>{if(s)return;const g=a;g!==null&&await c(g)}).catch(g=>{console.error("[ui-shell] 插件热更对账出错",g)})},m=e.channel.onPlugins(p=>{f(p)});return{getFailures:()=>[...t.values()],retry:()=>{f(a??{rev:e.session.graph.rev,changed:[],removed:[],graph:e.session.graph})},subscribe:p=>(n.add(p),()=>{n.delete(p)}),stop:()=>{s=!0,m(),n.clear()}}}const lN={rev:"unavailable",entries:[],batches:[],host:{name:"Pneuma",version:"未知版本"}};async function aN(e){hh(xO());try{const t=await e.invoke("getUiPrefs");Ls=JS(t),hh(Ls),t8(Ls)}catch(t){console.warn("[ui-shell] 读界面偏好失败,沿用上次的外观镜像",t)}}let Ls=ch;i8(e=>{Ls={...Ls,...e},hh(Ls),t8(Ls)});async function oN(){const e=document.getElementById("root");if(e===null)throw new Error("页面里没有 #root");const t=new cw;Object.keys(x0).map(m=>t.declare(m,x0[m]));const n=TO();aN(n);let s=lN,a=null,u=null;try{s=await Xz(),a=await Zz(s,{slots:t,host:s.host,runtime:n})}catch(m){u=m instanceof Error?m.message:String(m)}const c=a===null?null:sN({channel:n,session:a}),f=a?.services??new N4;dp.createRoot(e).render(y.jsx(Y.StrictMode,{children:y.jsx(ZA,{channel:n,children:y.jsx(vw,{services:f,children:y.jsx(sO,{slots:t,boot:s,serviceRegistry:f,session:a,hmr:c,bootError:u,allowedModules:K8})})})})),a?.markFirstFrame(),a?.startApplication()}oN();export{Lx as a,Gx as b,f5 as c,Yx as f,Jl as g,Wx as h,Pp as s,Hx as w};