@surething/cockpit 1.0.217 → 1.0.219

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 (577) hide show
  1. package/.next-prod/BUILD_ID +1 -1
  2. package/.next-prod/app-path-routes-manifest.json +3 -2
  3. package/.next-prod/build-manifest.json +3 -3
  4. package/.next-prod/prerender-manifest.json +3 -3
  5. package/.next-prod/react-loadable-manifest.json +0 -1
  6. package/.next-prod/routes-manifest.json +6 -0
  7. package/.next-prod/server/app/_global-error/page.js +3 -3
  8. package/.next-prod/server/app/_global-error/page.js.nft.json +1 -1
  9. package/.next-prod/server/app/_global-error/page_client-reference-manifest.js +1 -1
  10. package/.next-prod/server/app/_global-error.html +1 -1
  11. package/.next-prod/server/app/_global-error.rsc +1 -1
  12. package/.next-prod/server/app/_global-error.segments/_full.segment.rsc +1 -1
  13. package/.next-prod/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  14. package/.next-prod/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  15. package/.next-prod/server/app/_global-error.segments/_head.segment.rsc +1 -1
  16. package/.next-prod/server/app/_global-error.segments/_index.segment.rsc +1 -1
  17. package/.next-prod/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  18. package/.next-prod/server/app/_not-found/page.js +2 -2
  19. package/.next-prod/server/app/_not-found/page.js.nft.json +1 -1
  20. package/.next-prod/server/app/_not-found/page_client-reference-manifest.js +1 -1
  21. package/.next-prod/server/app/_not-found.html +1 -1
  22. package/.next-prod/server/app/_not-found.rsc +3 -3
  23. package/.next-prod/server/app/_not-found.segments/_full.segment.rsc +3 -3
  24. package/.next-prod/server/app/_not-found.segments/_head.segment.rsc +1 -1
  25. package/.next-prod/server/app/_not-found.segments/_index.segment.rsc +3 -3
  26. package/.next-prod/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  27. package/.next-prod/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  28. package/.next-prod/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  29. package/.next-prod/server/app/api/agent/test/route.js +1 -1
  30. package/.next-prod/server/app/api/agent/test/route.js.nft.json +1 -1
  31. package/.next-prod/server/app/api/bash/route.js +1 -1
  32. package/.next-prod/server/app/api/bash/route.js.nft.json +1 -1
  33. package/.next-prod/server/app/api/chat/codex/route.js +2 -2
  34. package/.next-prod/server/app/api/chat/codex/route.js.nft.json +1 -1
  35. package/.next-prod/server/app/api/chat/deepseek/route.js +2 -2
  36. package/.next-prod/server/app/api/chat/deepseek/route.js.nft.json +1 -1
  37. package/.next-prod/server/app/api/chat/kimi/route.js +2 -2
  38. package/.next-prod/server/app/api/chat/kimi/route.js.nft.json +1 -1
  39. package/.next-prod/server/app/api/chat/ollama/route.js +2 -2
  40. package/.next-prod/server/app/api/chat/ollama/route.js.nft.json +1 -1
  41. package/.next-prod/server/app/api/chat/pty-input/route.js +1 -0
  42. package/.next-prod/server/app/api/chat/pty-input/route.js.nft.json +1 -0
  43. package/.next-prod/server/app/api/chat/pty-input/route_client-reference-manifest.js +1 -0
  44. package/.next-prod/server/app/api/chat/route.js +19 -3
  45. package/.next-prod/server/app/api/chat/route.js.nft.json +1 -1
  46. package/.next-prod/server/app/api/claude-stats/route.js +1 -1
  47. package/.next-prod/server/app/api/claude-stats/route.js.nft.json +1 -1
  48. package/.next-prod/server/app/api/commands/route.js +1 -1
  49. package/.next-prod/server/app/api/commands/route.js.nft.json +1 -1
  50. package/.next-prod/server/app/api/comments/route.js +1 -1
  51. package/.next-prod/server/app/api/comments/route.js.nft.json +1 -1
  52. package/.next-prod/server/app/api/db/columns/route.js +1 -1
  53. package/.next-prod/server/app/api/db/columns/route.js.nft.json +1 -1
  54. package/.next-prod/server/app/api/db/connect/route.js +1 -1
  55. package/.next-prod/server/app/api/db/connect/route.js.nft.json +1 -1
  56. package/.next-prod/server/app/api/db/disconnect/route.js +1 -1
  57. package/.next-prod/server/app/api/db/disconnect/route.js.nft.json +1 -1
  58. package/.next-prod/server/app/api/db/export/route.js +1 -1
  59. package/.next-prod/server/app/api/db/export/route.js.nft.json +1 -1
  60. package/.next-prod/server/app/api/db/query/route.js +1 -1
  61. package/.next-prod/server/app/api/db/query/route.js.nft.json +1 -1
  62. package/.next-prod/server/app/api/db/schemas/route.js +1 -1
  63. package/.next-prod/server/app/api/db/schemas/route.js.nft.json +1 -1
  64. package/.next-prod/server/app/api/dev/spans/route.js +1 -1
  65. package/.next-prod/server/app/api/dev/spans/route.js.nft.json +1 -1
  66. package/.next-prod/server/app/api/extension/version/route.js +1 -1
  67. package/.next-prod/server/app/api/extension/version/route.js.nft.json +1 -1
  68. package/.next-prod/server/app/api/file/route.js +1 -1
  69. package/.next-prod/server/app/api/file/route.js.nft.json +1 -1
  70. package/.next-prod/server/app/api/files/blame/route.js +1 -1
  71. package/.next-prod/server/app/api/files/blame/route.js.nft.json +1 -1
  72. package/.next-prod/server/app/api/files/clipboard/route.js +1 -1
  73. package/.next-prod/server/app/api/files/clipboard/route.js.nft.json +1 -1
  74. package/.next-prod/server/app/api/files/copy/route.js +1 -1
  75. package/.next-prod/server/app/api/files/copy/route.js.nft.json +1 -1
  76. package/.next-prod/server/app/api/files/delete/route.js +1 -1
  77. package/.next-prod/server/app/api/files/delete/route.js.nft.json +1 -1
  78. package/.next-prod/server/app/api/files/expanded/route.js +1 -1
  79. package/.next-prod/server/app/api/files/expanded/route.js.nft.json +1 -1
  80. package/.next-prod/server/app/api/files/index/route.js +1 -1
  81. package/.next-prod/server/app/api/files/index/route.js.nft.json +1 -1
  82. package/.next-prod/server/app/api/files/init/route.js +1 -1
  83. package/.next-prod/server/app/api/files/init/route.js.nft.json +1 -1
  84. package/.next-prod/server/app/api/files/paste/route.js +1 -1
  85. package/.next-prod/server/app/api/files/paste/route.js.nft.json +1 -1
  86. package/.next-prod/server/app/api/files/read/route.js +1 -1
  87. package/.next-prod/server/app/api/files/read/route.js.nft.json +1 -1
  88. package/.next-prod/server/app/api/files/readdir/route.js +1 -1
  89. package/.next-prod/server/app/api/files/readdir/route.js.nft.json +1 -1
  90. package/.next-prod/server/app/api/files/recent/route.js +1 -1
  91. package/.next-prod/server/app/api/files/recent/route.js.nft.json +1 -1
  92. package/.next-prod/server/app/api/files/save/route.js +1 -1
  93. package/.next-prod/server/app/api/files/save/route.js.nft.json +1 -1
  94. package/.next-prod/server/app/api/files/search/route.js +1 -1
  95. package/.next-prod/server/app/api/files/search/route.js.nft.json +1 -1
  96. package/.next-prod/server/app/api/files/stat/route.js +1 -1
  97. package/.next-prod/server/app/api/files/stat/route.js.nft.json +1 -1
  98. package/.next-prod/server/app/api/files/text/route.js +1 -1
  99. package/.next-prod/server/app/api/files/text/route.js.nft.json +1 -1
  100. package/.next-prod/server/app/api/git/branch-diff/route.js +1 -1
  101. package/.next-prod/server/app/api/git/branch-diff/route.js.nft.json +1 -1
  102. package/.next-prod/server/app/api/git/branches/route.js +1 -1
  103. package/.next-prod/server/app/api/git/branches/route.js.nft.json +1 -1
  104. package/.next-prod/server/app/api/git/commit-diff/route.js +1 -1
  105. package/.next-prod/server/app/api/git/commit-diff/route.js.nft.json +1 -1
  106. package/.next-prod/server/app/api/git/commits/route.js +1 -1
  107. package/.next-prod/server/app/api/git/commits/route.js.nft.json +1 -1
  108. package/.next-prod/server/app/api/git/diff/route.js +1 -1
  109. package/.next-prod/server/app/api/git/diff/route.js.nft.json +1 -1
  110. package/.next-prod/server/app/api/git/discard/route.js +1 -1
  111. package/.next-prod/server/app/api/git/discard/route.js.nft.json +1 -1
  112. package/.next-prod/server/app/api/git/stage/route.js +1 -1
  113. package/.next-prod/server/app/api/git/stage/route.js.nft.json +1 -1
  114. package/.next-prod/server/app/api/git/status/route.js +1 -1
  115. package/.next-prod/server/app/api/git/status/route.js.nft.json +1 -1
  116. package/.next-prod/server/app/api/git/unstage/route.js +1 -1
  117. package/.next-prod/server/app/api/git/unstage/route.js.nft.json +1 -1
  118. package/.next-prod/server/app/api/git/worktree/route.js +1 -1
  119. package/.next-prod/server/app/api/git/worktree/route.js.nft.json +1 -1
  120. package/.next-prod/server/app/api/global-state/route.js +1 -1
  121. package/.next-prod/server/app/api/global-state/route.js.nft.json +1 -1
  122. package/.next-prod/server/app/api/jupyter/load/route.js +1 -1
  123. package/.next-prod/server/app/api/jupyter/load/route.js.nft.json +1 -1
  124. package/.next-prod/server/app/api/jupyter/save/route.js +1 -1
  125. package/.next-prod/server/app/api/jupyter/save/route.js.nft.json +1 -1
  126. package/.next-prod/server/app/api/jupyter/shutdown/route.js +1 -1
  127. package/.next-prod/server/app/api/jupyter/shutdown/route.js.nft.json +1 -1
  128. package/.next-prod/server/app/api/lsp/definition/route.js +1 -1
  129. package/.next-prod/server/app/api/lsp/definition/route.js.nft.json +1 -1
  130. package/.next-prod/server/app/api/lsp/hover/route.js +1 -1
  131. package/.next-prod/server/app/api/lsp/hover/route.js.nft.json +1 -1
  132. package/.next-prod/server/app/api/lsp/references/route.js +1 -1
  133. package/.next-prod/server/app/api/lsp/references/route.js.nft.json +1 -1
  134. package/.next-prod/server/app/api/lsp/status/route.js +1 -1
  135. package/.next-prod/server/app/api/lsp/status/route.js.nft.json +1 -1
  136. package/.next-prod/server/app/api/lsp/warmup/route.js +1 -1
  137. package/.next-prod/server/app/api/lsp/warmup/route.js.nft.json +1 -1
  138. package/.next-prod/server/app/api/mysql/columns/route.js +2 -2
  139. package/.next-prod/server/app/api/mysql/columns/route.js.nft.json +1 -1
  140. package/.next-prod/server/app/api/mysql/connect/route.js +1 -1
  141. package/.next-prod/server/app/api/mysql/connect/route.js.nft.json +1 -1
  142. package/.next-prod/server/app/api/mysql/disconnect/route.js +1 -1
  143. package/.next-prod/server/app/api/mysql/disconnect/route.js.nft.json +1 -1
  144. package/.next-prod/server/app/api/mysql/export/route.js +1 -1
  145. package/.next-prod/server/app/api/mysql/export/route.js.nft.json +1 -1
  146. package/.next-prod/server/app/api/mysql/query/route.js +1 -1
  147. package/.next-prod/server/app/api/mysql/query/route.js.nft.json +1 -1
  148. package/.next-prod/server/app/api/mysql/schemas/route.js +2 -2
  149. package/.next-prod/server/app/api/mysql/schemas/route.js.nft.json +1 -1
  150. package/.next-prod/server/app/api/neo4j/connect/route.js +1 -1
  151. package/.next-prod/server/app/api/neo4j/connect/route.js.nft.json +1 -1
  152. package/.next-prod/server/app/api/neo4j/disconnect/route.js +1 -1
  153. package/.next-prod/server/app/api/neo4j/disconnect/route.js.nft.json +1 -1
  154. package/.next-prod/server/app/api/neo4j/query/route.js +1 -1
  155. package/.next-prod/server/app/api/neo4j/query/route.js.nft.json +1 -1
  156. package/.next-prod/server/app/api/neo4j/schema/route.js +1 -1
  157. package/.next-prod/server/app/api/neo4j/schema/route.js.nft.json +1 -1
  158. package/.next-prod/server/app/api/note/route.js +1 -1
  159. package/.next-prod/server/app/api/note/route.js.nft.json +1 -1
  160. package/.next-prod/server/app/api/ollama/models/route.js +1 -1
  161. package/.next-prod/server/app/api/ollama/models/route.js.nft.json +1 -1
  162. package/.next-prod/server/app/api/ollama/start/route.js +1 -1
  163. package/.next-prod/server/app/api/ollama/start/route.js.nft.json +1 -1
  164. package/.next-prod/server/app/api/open-cursor/route.js +1 -1
  165. package/.next-prod/server/app/api/open-cursor/route.js.nft.json +1 -1
  166. package/.next-prod/server/app/api/open-vscode/route.js +1 -1
  167. package/.next-prod/server/app/api/open-vscode/route.js.nft.json +1 -1
  168. package/.next-prod/server/app/api/pick-folder/route.js +1 -1
  169. package/.next-prod/server/app/api/pick-folder/route.js.nft.json +1 -1
  170. package/.next-prod/server/app/api/pinned-sessions/route.js +1 -1
  171. package/.next-prod/server/app/api/pinned-sessions/route.js.nft.json +1 -1
  172. package/.next-prod/server/app/api/project-settings/route.js +1 -1
  173. package/.next-prod/server/app/api/project-settings/route.js.nft.json +1 -1
  174. package/.next-prod/server/app/api/project-state/route.js +1 -1
  175. package/.next-prod/server/app/api/project-state/route.js.nft.json +1 -1
  176. package/.next-prod/server/app/api/projectGraph/affected/route.js +1 -1
  177. package/.next-prod/server/app/api/projectGraph/affected/route.js.nft.json +1 -1
  178. package/.next-prod/server/app/api/projectGraph/callees/route.js +1 -1
  179. package/.next-prod/server/app/api/projectGraph/callees/route.js.nft.json +1 -1
  180. package/.next-prod/server/app/api/projectGraph/callers/route.js +1 -1
  181. package/.next-prod/server/app/api/projectGraph/callers/route.js.nft.json +1 -1
  182. package/.next-prod/server/app/api/projectGraph/coedit/route.js +1 -1
  183. package/.next-prod/server/app/api/projectGraph/coedit/route.js.nft.json +1 -1
  184. package/.next-prod/server/app/api/projectGraph/context/route.js +1 -1
  185. package/.next-prod/server/app/api/projectGraph/context/route.js.nft.json +1 -1
  186. package/.next-prod/server/app/api/projectGraph/file/route.js +1 -1
  187. package/.next-prod/server/app/api/projectGraph/file/route.js.nft.json +1 -1
  188. package/.next-prod/server/app/api/projectGraph/file-functions/route.js +1 -1
  189. package/.next-prod/server/app/api/projectGraph/file-functions/route.js.nft.json +1 -1
  190. package/.next-prod/server/app/api/projectGraph/impact/route.js +1 -1
  191. package/.next-prod/server/app/api/projectGraph/impact/route.js.nft.json +1 -1
  192. package/.next-prod/server/app/api/projectGraph/related/route.js +1 -1
  193. package/.next-prod/server/app/api/projectGraph/related/route.js.nft.json +1 -1
  194. package/.next-prod/server/app/api/projectGraph/risk/route.js +1 -1
  195. package/.next-prod/server/app/api/projectGraph/risk/route.js.nft.json +1 -1
  196. package/.next-prod/server/app/api/projectGraph/search/route.js +1 -1
  197. package/.next-prod/server/app/api/projectGraph/search/route.js.nft.json +1 -1
  198. package/.next-prod/server/app/api/projects/route.js +1 -1
  199. package/.next-prod/server/app/api/projects/route.js.nft.json +1 -1
  200. package/.next-prod/server/app/api/redis/command/route.js +1 -1
  201. package/.next-prod/server/app/api/redis/command/route.js.nft.json +1 -1
  202. package/.next-prod/server/app/api/redis/connect/route.js +1 -1
  203. package/.next-prod/server/app/api/redis/connect/route.js.nft.json +1 -1
  204. package/.next-prod/server/app/api/redis/delete/route.js +1 -1
  205. package/.next-prod/server/app/api/redis/delete/route.js.nft.json +1 -1
  206. package/.next-prod/server/app/api/redis/disconnect/route.js +1 -1
  207. package/.next-prod/server/app/api/redis/disconnect/route.js.nft.json +1 -1
  208. package/.next-prod/server/app/api/redis/get/route.js +1 -1
  209. package/.next-prod/server/app/api/redis/get/route.js.nft.json +1 -1
  210. package/.next-prod/server/app/api/redis/keys/route.js +1 -1
  211. package/.next-prod/server/app/api/redis/keys/route.js.nft.json +1 -1
  212. package/.next-prod/server/app/api/redis/set/route.js +1 -1
  213. package/.next-prod/server/app/api/redis/set/route.js.nft.json +1 -1
  214. package/.next-prod/server/app/api/review/[id]/comments/route.js +1 -1
  215. package/.next-prod/server/app/api/review/[id]/comments/route.js.nft.json +1 -1
  216. package/.next-prod/server/app/api/review/[id]/replies/route.js +1 -1
  217. package/.next-prod/server/app/api/review/[id]/replies/route.js.nft.json +1 -1
  218. package/.next-prod/server/app/api/review/[id]/route.js +1 -1
  219. package/.next-prod/server/app/api/review/[id]/route.js.nft.json +1 -1
  220. package/.next-prod/server/app/api/review/identify/route.js +1 -1
  221. package/.next-prod/server/app/api/review/identify/route.js.nft.json +1 -1
  222. package/.next-prod/server/app/api/review/order/route.js +1 -1
  223. package/.next-prod/server/app/api/review/order/route.js.nft.json +1 -1
  224. package/.next-prod/server/app/api/review/route.js +1 -1
  225. package/.next-prod/server/app/api/review/route.js.nft.json +1 -1
  226. package/.next-prod/server/app/api/review/share-info/route.js +1 -1
  227. package/.next-prod/server/app/api/review/share-info/route.js.nft.json +1 -1
  228. package/.next-prod/server/app/api/review/users/route.js +1 -1
  229. package/.next-prod/server/app/api/review/users/route.js.nft.json +1 -1
  230. package/.next-prod/server/app/api/scheduled-tasks/route.js +1 -1
  231. package/.next-prod/server/app/api/scheduled-tasks/route.js.nft.json +1 -1
  232. package/.next-prod/server/app/api/services/config/route.js +1 -1
  233. package/.next-prod/server/app/api/services/config/route.js.nft.json +1 -1
  234. package/.next-prod/server/app/api/services/scripts/route.js +1 -1
  235. package/.next-prod/server/app/api/services/scripts/route.js.nft.json +1 -1
  236. package/.next-prod/server/app/api/session/[sessionId]/fork/route.js +1 -1
  237. package/.next-prod/server/app/api/session/[sessionId]/fork/route.js.nft.json +1 -1
  238. package/.next-prod/server/app/api/session/[sessionId]/history/route.js +1 -1
  239. package/.next-prod/server/app/api/session/[sessionId]/history/route.js.nft.json +1 -1
  240. package/.next-prod/server/app/api/session-by-path/route.js +1 -1
  241. package/.next-prod/server/app/api/session-by-path/route.js.nft.json +1 -1
  242. package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js +1 -1
  243. package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js.nft.json +1 -1
  244. package/.next-prod/server/app/api/sessions/projects/route.js +1 -1
  245. package/.next-prod/server/app/api/sessions/projects/route.js.nft.json +1 -1
  246. package/.next-prod/server/app/api/sessions/route.js +1 -1
  247. package/.next-prod/server/app/api/sessions/route.js.nft.json +1 -1
  248. package/.next-prod/server/app/api/settings/route.js +1 -1
  249. package/.next-prod/server/app/api/settings/route.js.nft.json +1 -1
  250. package/.next-prod/server/app/api/skills/[id]/route.js +1 -1
  251. package/.next-prod/server/app/api/skills/[id]/route.js.nft.json +1 -1
  252. package/.next-prod/server/app/api/skills/content/route.js +1 -1
  253. package/.next-prod/server/app/api/skills/content/route.js.nft.json +1 -1
  254. package/.next-prod/server/app/api/skills/route.js +1 -1
  255. package/.next-prod/server/app/api/skills/route.js.nft.json +1 -1
  256. package/.next-prod/server/app/api/terminal/aliases/route.js +1 -1
  257. package/.next-prod/server/app/api/terminal/aliases/route.js.nft.json +1 -1
  258. package/.next-prod/server/app/api/terminal/autocomplete/route.js +1 -1
  259. package/.next-prod/server/app/api/terminal/autocomplete/route.js.nft.json +1 -1
  260. package/.next-prod/server/app/api/terminal/bubble-order/route.js +1 -1
  261. package/.next-prod/server/app/api/terminal/bubble-order/route.js.nft.json +1 -1
  262. package/.next-prod/server/app/api/terminal/env/route.js +1 -1
  263. package/.next-prod/server/app/api/terminal/env/route.js.nft.json +1 -1
  264. package/.next-prod/server/app/api/terminal/history/route.js +1 -1
  265. package/.next-prod/server/app/api/terminal/history/route.js.nft.json +1 -1
  266. package/.next-prod/server/app/api/version/route.js +1 -1
  267. package/.next-prod/server/app/api/version/route.js.nft.json +1 -1
  268. package/.next-prod/server/app/favicon.ico/route.js +1 -1
  269. package/.next-prod/server/app/favicon.ico/route.js.nft.json +1 -1
  270. package/.next-prod/server/app/manifest.webmanifest/route.js +2 -2
  271. package/.next-prod/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  272. package/.next-prod/server/app/page.js +2 -2
  273. package/.next-prod/server/app/page.js.nft.json +1 -1
  274. package/.next-prod/server/app/page_client-reference-manifest.js +1 -1
  275. package/.next-prod/server/app/project/page.js +2 -2
  276. package/.next-prod/server/app/project/page.js.nft.json +1 -1
  277. package/.next-prod/server/app/project/page_client-reference-manifest.js +1 -1
  278. package/.next-prod/server/app/review/[id]/page.js +2 -2
  279. package/.next-prod/server/app/review/[id]/page.js.nft.json +1 -1
  280. package/.next-prod/server/app/review/[id]/page_client-reference-manifest.js +1 -1
  281. package/.next-prod/server/app-paths-manifest.json +3 -2
  282. package/.next-prod/server/chunks/1921.js +131 -0
  283. package/.next-prod/server/chunks/2939.js +1 -1
  284. package/.next-prod/server/chunks/3792.js +9 -0
  285. package/.next-prod/server/chunks/3863.js +4 -1
  286. package/.next-prod/server/chunks/6244.js +1 -0
  287. package/.next-prod/server/chunks/8916.js +1 -1
  288. package/.next-prod/server/chunks/9658.js +9 -9
  289. package/.next-prod/server/middleware-build-manifest.js +1 -1
  290. package/.next-prod/server/middleware-react-loadable-manifest.js +1 -1
  291. package/.next-prod/server/pages/404.html +1 -1
  292. package/.next-prod/server/pages/500.html +1 -1
  293. package/.next-prod/server/server-reference-manifest.json +1 -1
  294. package/.next-prod/static/2xsVtkHy1Q-18e5b3DPua/_buildManifest.js +1 -0
  295. package/.next-prod/static/chunks/6321-a2227f1f162bd000.js +29 -0
  296. package/.next-prod/static/chunks/6345-d9033e1e3d07c277.js +14 -0
  297. package/.next-prod/static/chunks/app/_global-error/page-ccd4c8b73711effa.js +1 -0
  298. package/.next-prod/static/chunks/app/api/agent/test/route-ccd4c8b73711effa.js +1 -0
  299. package/.next-prod/static/chunks/app/api/bash/route-ccd4c8b73711effa.js +1 -0
  300. package/.next-prod/static/chunks/app/api/chat/codex/route-ccd4c8b73711effa.js +1 -0
  301. package/.next-prod/static/chunks/app/api/chat/deepseek/route-ccd4c8b73711effa.js +1 -0
  302. package/.next-prod/static/chunks/app/api/chat/kimi/route-ccd4c8b73711effa.js +1 -0
  303. package/.next-prod/static/chunks/app/api/chat/ollama/route-ccd4c8b73711effa.js +1 -0
  304. package/.next-prod/static/chunks/app/api/chat/pty-input/route-ccd4c8b73711effa.js +1 -0
  305. package/.next-prod/static/chunks/app/api/chat/route-ccd4c8b73711effa.js +1 -0
  306. package/.next-prod/static/chunks/app/api/claude-stats/route-ccd4c8b73711effa.js +1 -0
  307. package/.next-prod/static/chunks/app/api/commands/route-ccd4c8b73711effa.js +1 -0
  308. package/.next-prod/static/chunks/app/api/comments/route-ccd4c8b73711effa.js +1 -0
  309. package/.next-prod/static/chunks/app/api/db/columns/route-ccd4c8b73711effa.js +1 -0
  310. package/.next-prod/static/chunks/app/api/db/connect/route-ccd4c8b73711effa.js +1 -0
  311. package/.next-prod/static/chunks/app/api/db/disconnect/route-ccd4c8b73711effa.js +1 -0
  312. package/.next-prod/static/chunks/app/api/db/export/route-ccd4c8b73711effa.js +1 -0
  313. package/.next-prod/static/chunks/app/api/db/query/route-ccd4c8b73711effa.js +1 -0
  314. package/.next-prod/static/chunks/app/api/db/schemas/route-ccd4c8b73711effa.js +1 -0
  315. package/.next-prod/static/chunks/app/api/dev/spans/route-ccd4c8b73711effa.js +1 -0
  316. package/.next-prod/static/chunks/app/api/extension/version/route-ccd4c8b73711effa.js +1 -0
  317. package/.next-prod/static/chunks/app/api/file/route-ccd4c8b73711effa.js +1 -0
  318. package/.next-prod/static/chunks/app/api/files/blame/route-ccd4c8b73711effa.js +1 -0
  319. package/.next-prod/static/chunks/app/api/files/clipboard/route-ccd4c8b73711effa.js +1 -0
  320. package/.next-prod/static/chunks/app/api/files/copy/route-ccd4c8b73711effa.js +1 -0
  321. package/.next-prod/static/chunks/app/api/files/delete/route-ccd4c8b73711effa.js +1 -0
  322. package/.next-prod/static/chunks/app/api/files/expanded/route-ccd4c8b73711effa.js +1 -0
  323. package/.next-prod/static/chunks/app/api/files/index/route-ccd4c8b73711effa.js +1 -0
  324. package/.next-prod/static/chunks/app/api/files/init/route-ccd4c8b73711effa.js +1 -0
  325. package/.next-prod/static/chunks/app/api/files/paste/route-ccd4c8b73711effa.js +1 -0
  326. package/.next-prod/static/chunks/app/api/files/read/route-ccd4c8b73711effa.js +1 -0
  327. package/.next-prod/static/chunks/app/api/files/readdir/route-ccd4c8b73711effa.js +1 -0
  328. package/.next-prod/static/chunks/app/api/files/recent/route-ccd4c8b73711effa.js +1 -0
  329. package/.next-prod/static/chunks/app/api/files/save/route-ccd4c8b73711effa.js +1 -0
  330. package/.next-prod/static/chunks/app/api/files/search/route-ccd4c8b73711effa.js +1 -0
  331. package/.next-prod/static/chunks/app/api/files/stat/route-ccd4c8b73711effa.js +1 -0
  332. package/.next-prod/static/chunks/app/api/files/text/route-ccd4c8b73711effa.js +1 -0
  333. package/.next-prod/static/chunks/app/api/git/branch-diff/route-ccd4c8b73711effa.js +1 -0
  334. package/.next-prod/static/chunks/app/api/git/branches/route-ccd4c8b73711effa.js +1 -0
  335. package/.next-prod/static/chunks/app/api/git/commit-diff/route-ccd4c8b73711effa.js +1 -0
  336. package/.next-prod/static/chunks/app/api/git/commits/route-ccd4c8b73711effa.js +1 -0
  337. package/.next-prod/static/chunks/app/api/git/diff/route-ccd4c8b73711effa.js +1 -0
  338. package/.next-prod/static/chunks/app/api/git/discard/route-ccd4c8b73711effa.js +1 -0
  339. package/.next-prod/static/chunks/app/api/git/stage/route-ccd4c8b73711effa.js +1 -0
  340. package/.next-prod/static/chunks/app/api/git/status/route-ccd4c8b73711effa.js +1 -0
  341. package/.next-prod/static/chunks/app/api/git/unstage/route-ccd4c8b73711effa.js +1 -0
  342. package/.next-prod/static/chunks/app/api/git/worktree/route-ccd4c8b73711effa.js +1 -0
  343. package/.next-prod/static/chunks/app/api/global-state/route-ccd4c8b73711effa.js +1 -0
  344. package/.next-prod/static/chunks/app/api/jupyter/load/route-ccd4c8b73711effa.js +1 -0
  345. package/.next-prod/static/chunks/app/api/jupyter/save/route-ccd4c8b73711effa.js +1 -0
  346. package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-ccd4c8b73711effa.js +1 -0
  347. package/.next-prod/static/chunks/app/api/lsp/definition/route-ccd4c8b73711effa.js +1 -0
  348. package/.next-prod/static/chunks/app/api/lsp/hover/route-ccd4c8b73711effa.js +1 -0
  349. package/.next-prod/static/chunks/app/api/lsp/references/route-ccd4c8b73711effa.js +1 -0
  350. package/.next-prod/static/chunks/app/api/lsp/status/route-ccd4c8b73711effa.js +1 -0
  351. package/.next-prod/static/chunks/app/api/lsp/warmup/route-ccd4c8b73711effa.js +1 -0
  352. package/.next-prod/static/chunks/app/api/mysql/columns/route-ccd4c8b73711effa.js +1 -0
  353. package/.next-prod/static/chunks/app/api/mysql/connect/route-ccd4c8b73711effa.js +1 -0
  354. package/.next-prod/static/chunks/app/api/mysql/disconnect/route-ccd4c8b73711effa.js +1 -0
  355. package/.next-prod/static/chunks/app/api/mysql/export/route-ccd4c8b73711effa.js +1 -0
  356. package/.next-prod/static/chunks/app/api/mysql/query/route-ccd4c8b73711effa.js +1 -0
  357. package/.next-prod/static/chunks/app/api/mysql/schemas/route-ccd4c8b73711effa.js +1 -0
  358. package/.next-prod/static/chunks/app/api/neo4j/connect/route-ccd4c8b73711effa.js +1 -0
  359. package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-ccd4c8b73711effa.js +1 -0
  360. package/.next-prod/static/chunks/app/api/neo4j/query/route-ccd4c8b73711effa.js +1 -0
  361. package/.next-prod/static/chunks/app/api/neo4j/schema/route-ccd4c8b73711effa.js +1 -0
  362. package/.next-prod/static/chunks/app/api/note/route-ccd4c8b73711effa.js +1 -0
  363. package/.next-prod/static/chunks/app/api/ollama/models/route-ccd4c8b73711effa.js +1 -0
  364. package/.next-prod/static/chunks/app/api/ollama/start/route-ccd4c8b73711effa.js +1 -0
  365. package/.next-prod/static/chunks/app/api/open-cursor/route-ccd4c8b73711effa.js +1 -0
  366. package/.next-prod/static/chunks/app/api/open-vscode/route-ccd4c8b73711effa.js +1 -0
  367. package/.next-prod/static/chunks/app/api/pick-folder/route-ccd4c8b73711effa.js +1 -0
  368. package/.next-prod/static/chunks/app/api/pinned-sessions/route-ccd4c8b73711effa.js +1 -0
  369. package/.next-prod/static/chunks/app/api/project-settings/route-ccd4c8b73711effa.js +1 -0
  370. package/.next-prod/static/chunks/app/api/project-state/route-ccd4c8b73711effa.js +1 -0
  371. package/.next-prod/static/chunks/app/api/projectGraph/affected/route-ccd4c8b73711effa.js +1 -0
  372. package/.next-prod/static/chunks/app/api/projectGraph/callees/route-ccd4c8b73711effa.js +1 -0
  373. package/.next-prod/static/chunks/app/api/projectGraph/callers/route-ccd4c8b73711effa.js +1 -0
  374. package/.next-prod/static/chunks/app/api/projectGraph/coedit/route-ccd4c8b73711effa.js +1 -0
  375. package/.next-prod/static/chunks/app/api/projectGraph/context/route-ccd4c8b73711effa.js +1 -0
  376. package/.next-prod/static/chunks/app/api/projectGraph/file/route-ccd4c8b73711effa.js +1 -0
  377. package/.next-prod/static/chunks/app/api/projectGraph/file-functions/route-ccd4c8b73711effa.js +1 -0
  378. package/.next-prod/static/chunks/app/api/projectGraph/impact/route-ccd4c8b73711effa.js +1 -0
  379. package/.next-prod/static/chunks/app/api/projectGraph/related/route-ccd4c8b73711effa.js +1 -0
  380. package/.next-prod/static/chunks/app/api/projectGraph/risk/route-ccd4c8b73711effa.js +1 -0
  381. package/.next-prod/static/chunks/app/api/projectGraph/search/route-ccd4c8b73711effa.js +1 -0
  382. package/.next-prod/static/chunks/app/api/projects/route-ccd4c8b73711effa.js +1 -0
  383. package/.next-prod/static/chunks/app/api/redis/command/route-ccd4c8b73711effa.js +1 -0
  384. package/.next-prod/static/chunks/app/api/redis/connect/route-ccd4c8b73711effa.js +1 -0
  385. package/.next-prod/static/chunks/app/api/redis/delete/route-ccd4c8b73711effa.js +1 -0
  386. package/.next-prod/static/chunks/app/api/redis/disconnect/route-ccd4c8b73711effa.js +1 -0
  387. package/.next-prod/static/chunks/app/api/redis/get/route-ccd4c8b73711effa.js +1 -0
  388. package/.next-prod/static/chunks/app/api/redis/keys/route-ccd4c8b73711effa.js +1 -0
  389. package/.next-prod/static/chunks/app/api/redis/set/route-ccd4c8b73711effa.js +1 -0
  390. package/.next-prod/static/chunks/app/api/review/[id]/comments/route-ccd4c8b73711effa.js +1 -0
  391. package/.next-prod/static/chunks/app/api/review/[id]/replies/route-ccd4c8b73711effa.js +1 -0
  392. package/.next-prod/static/chunks/app/api/review/[id]/route-ccd4c8b73711effa.js +1 -0
  393. package/.next-prod/static/chunks/app/api/review/identify/route-ccd4c8b73711effa.js +1 -0
  394. package/.next-prod/static/chunks/app/api/review/order/route-ccd4c8b73711effa.js +1 -0
  395. package/.next-prod/static/chunks/app/api/review/route-ccd4c8b73711effa.js +1 -0
  396. package/.next-prod/static/chunks/app/api/review/share-info/route-ccd4c8b73711effa.js +1 -0
  397. package/.next-prod/static/chunks/app/api/review/users/route-ccd4c8b73711effa.js +1 -0
  398. package/.next-prod/static/chunks/app/api/scheduled-tasks/route-ccd4c8b73711effa.js +1 -0
  399. package/.next-prod/static/chunks/app/api/services/config/route-ccd4c8b73711effa.js +1 -0
  400. package/.next-prod/static/chunks/app/api/services/scripts/route-ccd4c8b73711effa.js +1 -0
  401. package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-ccd4c8b73711effa.js +1 -0
  402. package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-ccd4c8b73711effa.js +1 -0
  403. package/.next-prod/static/chunks/app/api/session-by-path/route-ccd4c8b73711effa.js +1 -0
  404. package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-ccd4c8b73711effa.js +1 -0
  405. package/.next-prod/static/chunks/app/api/sessions/projects/route-ccd4c8b73711effa.js +1 -0
  406. package/.next-prod/static/chunks/app/api/sessions/route-ccd4c8b73711effa.js +1 -0
  407. package/.next-prod/static/chunks/app/api/settings/route-ccd4c8b73711effa.js +1 -0
  408. package/.next-prod/static/chunks/app/api/skills/[id]/route-ccd4c8b73711effa.js +1 -0
  409. package/.next-prod/static/chunks/app/api/skills/content/route-ccd4c8b73711effa.js +1 -0
  410. package/.next-prod/static/chunks/app/api/skills/route-ccd4c8b73711effa.js +1 -0
  411. package/.next-prod/static/chunks/app/api/terminal/aliases/route-ccd4c8b73711effa.js +1 -0
  412. package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-ccd4c8b73711effa.js +1 -0
  413. package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-ccd4c8b73711effa.js +1 -0
  414. package/.next-prod/static/chunks/app/api/terminal/env/route-ccd4c8b73711effa.js +1 -0
  415. package/.next-prod/static/chunks/app/api/terminal/history/route-ccd4c8b73711effa.js +1 -0
  416. package/.next-prod/static/chunks/app/api/version/route-ccd4c8b73711effa.js +1 -0
  417. package/.next-prod/static/chunks/app/{layout-8e3a54b794cb35b6.js → layout-a21c32c2b18fbae2.js} +1 -1
  418. package/.next-prod/static/chunks/app/manifest.webmanifest/route-ccd4c8b73711effa.js +1 -0
  419. package/.next-prod/static/chunks/app/{page-3ab0a0f28cbdc8e2.js → page-c5dc8ea6f9fc740b.js} +1 -1
  420. package/.next-prod/static/chunks/app/project/{page-3ab0a0f28cbdc8e2.js → page-c5dc8ea6f9fc740b.js} +1 -1
  421. package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-ccd4c8b73711effa.js +1 -0
  422. package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-ccd4c8b73711effa.js +1 -0
  423. package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-ccd4c8b73711effa.js +1 -0
  424. package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-ccd4c8b73711effa.js +1 -0
  425. package/.next-prod/static/chunks/webpack-cb3881d9a37f80b7.js +1 -0
  426. package/.next-prod/static/css/ad6271f3f61ab845.css +1 -0
  427. package/.next-prod/trace +13 -13
  428. package/.next-prod/trace-build +1 -1
  429. package/.next-prod/types/app/api/chat/pty-input/route.ts +351 -0
  430. package/.next-prod/types/routes.d.ts +2 -1
  431. package/.next-prod/types/validator.ts +9 -0
  432. package/README.md +5 -5
  433. package/README.zh.md +5 -5
  434. package/bin/cock-browser.messages.mjs +176 -0
  435. package/bin/cock-browser.mjs +290 -18
  436. package/chrome-extension/automation.js +684 -32
  437. package/chrome-extension/manifest.json +1 -1
  438. package/chrome-extension/messages.js +45 -0
  439. package/dist/{chunk-W6G6X3FP.mjs → chunk-WOM47O75.mjs} +49 -1
  440. package/dist/httpApi.mjs +66 -6
  441. package/dist/scheduledTasks.mjs +6 -1
  442. package/dist/{server-ZBUZ24TC.mjs → server-SNB4H35J.mjs} +5 -1
  443. package/dist/wsServer.mjs +5 -2
  444. package/package.json +3 -5
  445. package/.next-prod/server/chunks/4034.js +0 -114
  446. package/.next-prod/server/chunks/8764.js +0 -26
  447. package/.next-prod/static/7pu1LXbRRLfg05VN3u39s/_buildManifest.js +0 -1
  448. package/.next-prod/static/chunks/6345-d477b8d5c682b1fb.js +0 -14
  449. package/.next-prod/static/chunks/6917-0a22d7764ca45244.js +0 -29
  450. package/.next-prod/static/chunks/app/_global-error/page-8ae56b9359db0996.js +0 -1
  451. package/.next-prod/static/chunks/app/api/agent/test/route-8ae56b9359db0996.js +0 -1
  452. package/.next-prod/static/chunks/app/api/bash/route-8ae56b9359db0996.js +0 -1
  453. package/.next-prod/static/chunks/app/api/chat/codex/route-8ae56b9359db0996.js +0 -1
  454. package/.next-prod/static/chunks/app/api/chat/deepseek/route-8ae56b9359db0996.js +0 -1
  455. package/.next-prod/static/chunks/app/api/chat/kimi/route-8ae56b9359db0996.js +0 -1
  456. package/.next-prod/static/chunks/app/api/chat/ollama/route-8ae56b9359db0996.js +0 -1
  457. package/.next-prod/static/chunks/app/api/chat/route-8ae56b9359db0996.js +0 -1
  458. package/.next-prod/static/chunks/app/api/claude-stats/route-8ae56b9359db0996.js +0 -1
  459. package/.next-prod/static/chunks/app/api/commands/route-8ae56b9359db0996.js +0 -1
  460. package/.next-prod/static/chunks/app/api/comments/route-8ae56b9359db0996.js +0 -1
  461. package/.next-prod/static/chunks/app/api/db/columns/route-8ae56b9359db0996.js +0 -1
  462. package/.next-prod/static/chunks/app/api/db/connect/route-8ae56b9359db0996.js +0 -1
  463. package/.next-prod/static/chunks/app/api/db/disconnect/route-8ae56b9359db0996.js +0 -1
  464. package/.next-prod/static/chunks/app/api/db/export/route-8ae56b9359db0996.js +0 -1
  465. package/.next-prod/static/chunks/app/api/db/query/route-8ae56b9359db0996.js +0 -1
  466. package/.next-prod/static/chunks/app/api/db/schemas/route-8ae56b9359db0996.js +0 -1
  467. package/.next-prod/static/chunks/app/api/dev/spans/route-8ae56b9359db0996.js +0 -1
  468. package/.next-prod/static/chunks/app/api/extension/version/route-8ae56b9359db0996.js +0 -1
  469. package/.next-prod/static/chunks/app/api/file/route-8ae56b9359db0996.js +0 -1
  470. package/.next-prod/static/chunks/app/api/files/blame/route-8ae56b9359db0996.js +0 -1
  471. package/.next-prod/static/chunks/app/api/files/clipboard/route-8ae56b9359db0996.js +0 -1
  472. package/.next-prod/static/chunks/app/api/files/copy/route-8ae56b9359db0996.js +0 -1
  473. package/.next-prod/static/chunks/app/api/files/delete/route-8ae56b9359db0996.js +0 -1
  474. package/.next-prod/static/chunks/app/api/files/expanded/route-8ae56b9359db0996.js +0 -1
  475. package/.next-prod/static/chunks/app/api/files/index/route-8ae56b9359db0996.js +0 -1
  476. package/.next-prod/static/chunks/app/api/files/init/route-8ae56b9359db0996.js +0 -1
  477. package/.next-prod/static/chunks/app/api/files/paste/route-8ae56b9359db0996.js +0 -1
  478. package/.next-prod/static/chunks/app/api/files/read/route-8ae56b9359db0996.js +0 -1
  479. package/.next-prod/static/chunks/app/api/files/readdir/route-8ae56b9359db0996.js +0 -1
  480. package/.next-prod/static/chunks/app/api/files/recent/route-8ae56b9359db0996.js +0 -1
  481. package/.next-prod/static/chunks/app/api/files/save/route-8ae56b9359db0996.js +0 -1
  482. package/.next-prod/static/chunks/app/api/files/search/route-8ae56b9359db0996.js +0 -1
  483. package/.next-prod/static/chunks/app/api/files/stat/route-8ae56b9359db0996.js +0 -1
  484. package/.next-prod/static/chunks/app/api/files/text/route-8ae56b9359db0996.js +0 -1
  485. package/.next-prod/static/chunks/app/api/git/branch-diff/route-8ae56b9359db0996.js +0 -1
  486. package/.next-prod/static/chunks/app/api/git/branches/route-8ae56b9359db0996.js +0 -1
  487. package/.next-prod/static/chunks/app/api/git/commit-diff/route-8ae56b9359db0996.js +0 -1
  488. package/.next-prod/static/chunks/app/api/git/commits/route-8ae56b9359db0996.js +0 -1
  489. package/.next-prod/static/chunks/app/api/git/diff/route-8ae56b9359db0996.js +0 -1
  490. package/.next-prod/static/chunks/app/api/git/discard/route-8ae56b9359db0996.js +0 -1
  491. package/.next-prod/static/chunks/app/api/git/stage/route-8ae56b9359db0996.js +0 -1
  492. package/.next-prod/static/chunks/app/api/git/status/route-8ae56b9359db0996.js +0 -1
  493. package/.next-prod/static/chunks/app/api/git/unstage/route-8ae56b9359db0996.js +0 -1
  494. package/.next-prod/static/chunks/app/api/git/worktree/route-8ae56b9359db0996.js +0 -1
  495. package/.next-prod/static/chunks/app/api/global-state/route-8ae56b9359db0996.js +0 -1
  496. package/.next-prod/static/chunks/app/api/jupyter/load/route-8ae56b9359db0996.js +0 -1
  497. package/.next-prod/static/chunks/app/api/jupyter/save/route-8ae56b9359db0996.js +0 -1
  498. package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-8ae56b9359db0996.js +0 -1
  499. package/.next-prod/static/chunks/app/api/lsp/definition/route-8ae56b9359db0996.js +0 -1
  500. package/.next-prod/static/chunks/app/api/lsp/hover/route-8ae56b9359db0996.js +0 -1
  501. package/.next-prod/static/chunks/app/api/lsp/references/route-8ae56b9359db0996.js +0 -1
  502. package/.next-prod/static/chunks/app/api/lsp/status/route-8ae56b9359db0996.js +0 -1
  503. package/.next-prod/static/chunks/app/api/lsp/warmup/route-8ae56b9359db0996.js +0 -1
  504. package/.next-prod/static/chunks/app/api/mysql/columns/route-8ae56b9359db0996.js +0 -1
  505. package/.next-prod/static/chunks/app/api/mysql/connect/route-8ae56b9359db0996.js +0 -1
  506. package/.next-prod/static/chunks/app/api/mysql/disconnect/route-8ae56b9359db0996.js +0 -1
  507. package/.next-prod/static/chunks/app/api/mysql/export/route-8ae56b9359db0996.js +0 -1
  508. package/.next-prod/static/chunks/app/api/mysql/query/route-8ae56b9359db0996.js +0 -1
  509. package/.next-prod/static/chunks/app/api/mysql/schemas/route-8ae56b9359db0996.js +0 -1
  510. package/.next-prod/static/chunks/app/api/neo4j/connect/route-8ae56b9359db0996.js +0 -1
  511. package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-8ae56b9359db0996.js +0 -1
  512. package/.next-prod/static/chunks/app/api/neo4j/query/route-8ae56b9359db0996.js +0 -1
  513. package/.next-prod/static/chunks/app/api/neo4j/schema/route-8ae56b9359db0996.js +0 -1
  514. package/.next-prod/static/chunks/app/api/note/route-8ae56b9359db0996.js +0 -1
  515. package/.next-prod/static/chunks/app/api/ollama/models/route-8ae56b9359db0996.js +0 -1
  516. package/.next-prod/static/chunks/app/api/ollama/start/route-8ae56b9359db0996.js +0 -1
  517. package/.next-prod/static/chunks/app/api/open-cursor/route-8ae56b9359db0996.js +0 -1
  518. package/.next-prod/static/chunks/app/api/open-vscode/route-8ae56b9359db0996.js +0 -1
  519. package/.next-prod/static/chunks/app/api/pick-folder/route-8ae56b9359db0996.js +0 -1
  520. package/.next-prod/static/chunks/app/api/pinned-sessions/route-8ae56b9359db0996.js +0 -1
  521. package/.next-prod/static/chunks/app/api/project-settings/route-8ae56b9359db0996.js +0 -1
  522. package/.next-prod/static/chunks/app/api/project-state/route-8ae56b9359db0996.js +0 -1
  523. package/.next-prod/static/chunks/app/api/projectGraph/affected/route-8ae56b9359db0996.js +0 -1
  524. package/.next-prod/static/chunks/app/api/projectGraph/callees/route-8ae56b9359db0996.js +0 -1
  525. package/.next-prod/static/chunks/app/api/projectGraph/callers/route-8ae56b9359db0996.js +0 -1
  526. package/.next-prod/static/chunks/app/api/projectGraph/coedit/route-8ae56b9359db0996.js +0 -1
  527. package/.next-prod/static/chunks/app/api/projectGraph/context/route-8ae56b9359db0996.js +0 -1
  528. package/.next-prod/static/chunks/app/api/projectGraph/file/route-8ae56b9359db0996.js +0 -1
  529. package/.next-prod/static/chunks/app/api/projectGraph/file-functions/route-8ae56b9359db0996.js +0 -1
  530. package/.next-prod/static/chunks/app/api/projectGraph/impact/route-8ae56b9359db0996.js +0 -1
  531. package/.next-prod/static/chunks/app/api/projectGraph/related/route-8ae56b9359db0996.js +0 -1
  532. package/.next-prod/static/chunks/app/api/projectGraph/risk/route-8ae56b9359db0996.js +0 -1
  533. package/.next-prod/static/chunks/app/api/projectGraph/search/route-8ae56b9359db0996.js +0 -1
  534. package/.next-prod/static/chunks/app/api/projects/route-8ae56b9359db0996.js +0 -1
  535. package/.next-prod/static/chunks/app/api/redis/command/route-8ae56b9359db0996.js +0 -1
  536. package/.next-prod/static/chunks/app/api/redis/connect/route-8ae56b9359db0996.js +0 -1
  537. package/.next-prod/static/chunks/app/api/redis/delete/route-8ae56b9359db0996.js +0 -1
  538. package/.next-prod/static/chunks/app/api/redis/disconnect/route-8ae56b9359db0996.js +0 -1
  539. package/.next-prod/static/chunks/app/api/redis/get/route-8ae56b9359db0996.js +0 -1
  540. package/.next-prod/static/chunks/app/api/redis/keys/route-8ae56b9359db0996.js +0 -1
  541. package/.next-prod/static/chunks/app/api/redis/set/route-8ae56b9359db0996.js +0 -1
  542. package/.next-prod/static/chunks/app/api/review/[id]/comments/route-8ae56b9359db0996.js +0 -1
  543. package/.next-prod/static/chunks/app/api/review/[id]/replies/route-8ae56b9359db0996.js +0 -1
  544. package/.next-prod/static/chunks/app/api/review/[id]/route-8ae56b9359db0996.js +0 -1
  545. package/.next-prod/static/chunks/app/api/review/identify/route-8ae56b9359db0996.js +0 -1
  546. package/.next-prod/static/chunks/app/api/review/order/route-8ae56b9359db0996.js +0 -1
  547. package/.next-prod/static/chunks/app/api/review/route-8ae56b9359db0996.js +0 -1
  548. package/.next-prod/static/chunks/app/api/review/share-info/route-8ae56b9359db0996.js +0 -1
  549. package/.next-prod/static/chunks/app/api/review/users/route-8ae56b9359db0996.js +0 -1
  550. package/.next-prod/static/chunks/app/api/scheduled-tasks/route-8ae56b9359db0996.js +0 -1
  551. package/.next-prod/static/chunks/app/api/services/config/route-8ae56b9359db0996.js +0 -1
  552. package/.next-prod/static/chunks/app/api/services/scripts/route-8ae56b9359db0996.js +0 -1
  553. package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-8ae56b9359db0996.js +0 -1
  554. package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-8ae56b9359db0996.js +0 -1
  555. package/.next-prod/static/chunks/app/api/session-by-path/route-8ae56b9359db0996.js +0 -1
  556. package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-8ae56b9359db0996.js +0 -1
  557. package/.next-prod/static/chunks/app/api/sessions/projects/route-8ae56b9359db0996.js +0 -1
  558. package/.next-prod/static/chunks/app/api/sessions/route-8ae56b9359db0996.js +0 -1
  559. package/.next-prod/static/chunks/app/api/settings/route-8ae56b9359db0996.js +0 -1
  560. package/.next-prod/static/chunks/app/api/skills/[id]/route-8ae56b9359db0996.js +0 -1
  561. package/.next-prod/static/chunks/app/api/skills/content/route-8ae56b9359db0996.js +0 -1
  562. package/.next-prod/static/chunks/app/api/skills/route-8ae56b9359db0996.js +0 -1
  563. package/.next-prod/static/chunks/app/api/terminal/aliases/route-8ae56b9359db0996.js +0 -1
  564. package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-8ae56b9359db0996.js +0 -1
  565. package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-8ae56b9359db0996.js +0 -1
  566. package/.next-prod/static/chunks/app/api/terminal/env/route-8ae56b9359db0996.js +0 -1
  567. package/.next-prod/static/chunks/app/api/terminal/history/route-8ae56b9359db0996.js +0 -1
  568. package/.next-prod/static/chunks/app/api/version/route-8ae56b9359db0996.js +0 -1
  569. package/.next-prod/static/chunks/app/manifest.webmanifest/route-8ae56b9359db0996.js +0 -1
  570. package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-8ae56b9359db0996.js +0 -1
  571. package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-8ae56b9359db0996.js +0 -1
  572. package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-8ae56b9359db0996.js +0 -1
  573. package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-8ae56b9359db0996.js +0 -1
  574. package/.next-prod/static/chunks/webpack-b618ac52d349e5ca.js +0 -1
  575. package/.next-prod/static/css/fc2730c2dbe4866e.css +0 -1
  576. /package/.next-prod/static/{7pu1LXbRRLfg05VN3u39s → 2xsVtkHy1Q-18e5b3DPua}/_ssgManifest.js +0 -0
  577. /package/.next-prod/static/chunks/{e868780c.39804e9ab925f132.js → e868780c-39804e9ab925f132.js} +0 -0
@@ -1 +1 @@
1
- "use strict";exports.id=2939,exports.ids=[2939],exports.modules={4253:(a,b,c)=>{c.d(b,{L8:()=>p,No:()=>h,Pe:()=>o,VA:()=>q,hC:()=>m,hH:()=>l,hn:()=>s,iF:()=>r,lU:()=>t,nw:()=>n,pZ:()=>g});var d=c(79748),e=c(33873),f=c.n(e);let g=0xa00000,h=0x3200000,i=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".ico",".bmp",".avif"]),j=new Set([".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".zip",".tar",".gz",".rar",".7z",".exe",".dll",".so",".dylib",".mp3",".mp4",".avi",".mov",".mkv",".wav",".flac",".ttf",".otf",".woff",".woff2",".eot",".db",".sqlite",".sqlite3",".pyc",".class",".o",".a"]),k={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".svg":"image/svg+xml",".ico":"image/x-icon",".bmp":"image/bmp",".avif":"image/avif"};function l(a){return k[a.toLowerCase()]||"application/octet-stream"}function m(a,b){if("string"!=typeof b||0===b.length)return null;let c=f().resolve(a),d=f().resolve(c,b);return d===c||d.startsWith(c+f().sep)?d:null}async function n(a){let b;if("string"!=typeof a||0===a.length)return{ok:!1,reason:"Missing cwd parameter"};if(!f().isAbsolute(a))return{ok:!1,reason:"cwd must be an absolute path"};let c=f().resolve(a);try{b=await (0,d.stat)(c)}catch{return{ok:!1,reason:"cwd does not exist"}}return b.isDirectory()?{ok:!0,abs:c}:{ok:!1,reason:"cwd is not a directory"}}function o(a,b){return`"${a.toString(36)}-${Math.floor(b).toString(36)}"`}function p(a,b){let c=a.startsWith(".")?a.toLowerCase():f().extname(a).toLowerCase();return i.has(c)?b>h?"too-large":"image":j.has(c)?"binary":b>g?"too-large":"text"}function q(a){let b=0,c=Math.min(a.length,1e3);for(let d=0;d<c;d++){let c=a.charCodeAt(d);if(0===c)return!0;c<32&&9!==c&&10!==c&&13!==c&&b++}return c>0&&b/c>.1}async function r(a){let b,c=!1;try{(await (0,d.lstat)(a)).isSymbolicLink()&&(c=!0,b=await (0,d.readlink)(a))}catch{}let e=await (0,d.stat)(a);return{size:e.size,mtimeMs:e.mtimeMs,isDirectory:e.isDirectory(),isSymlink:c,symlinkTarget:b}}function s(a,b){return{ETag:a,"Last-Modified":new Date(b).toUTCString(),"Cache-Control":"no-cache, must-revalidate"}}function t(a,b){return!!a&&a.split(",").map(a=>a.trim().replace(/^W\//,"")).includes(b)}},7939:(a,b,c)=>{c.d(b,{$A:()=>L,A0:()=>W,An:()=>Z,BF:()=>H,Ct:()=>P,Eu:()=>G,Ex:()=>t,GB:()=>q,JE:()=>Y,JY:()=>K,Ki:()=>B,Kk:()=>Q,Kv:()=>j,LN:()=>k,Mx:()=>C,O0:()=>A,Sr:()=>I,Tb:()=>r,Ux:()=>aa,Wd:()=>X,aO:()=>m,at:()=>x,ec:()=>n,eg:()=>U,h9:()=>w,i4:()=>F,iK:()=>o,im:()=>S,iy:()=>O,jp:()=>s,lT:()=>y,lq:()=>E,ls:()=>J,mT:()=>v,oK:()=>N,oZ:()=>R,of:()=>D,po:()=>M,tP:()=>p,th:()=>u,v4:()=>l,vI:()=>V,yw:()=>T});var d=c(21820),e=c(33873),f=c(79748),g=c(29021),h=c(79646);let i=(0,d.homedir)(),j=(0,e.join)(i,".cockpit"),k=(0,e.join)(j,"projects"),l=(0,e.join)(j,"state.json"),m=(0,e.join)(j,"pinned-sessions.json"),n=(0,e.join)(j,"note.md"),o=(0,e.join)(j,"scheduled-tasks.json"),p=(0,e.join)(j,"settings.json"),q=(0,e.join)(j,"skills.json"),r=(0,e.join)(j,"review"),s=(0,e.join)(r,"_signal");function t(){try{(0,g.existsSync)(r)||(0,g.mkdirSync)(r,{recursive:!0}),(0,g.writeFileSync)(s,Date.now().toString())}catch{}}let u=(0,e.join)(i,".claude"),v=(0,e.join)(u,"projects"),w=(0,e.join)(i,".claude2"),x=(0,e.join)(w,"projects"),y=(0,e.join)(j,"deepseek"),z=(0,e.join)(y,"projects");function A(a){return a.replace(/[/.]/g,"-")}function B(a){return(0,e.join)(k,A(a))}function C(a){return(0,e.join)(B(a),"session.json")}function D(a){return(0,e.join)(B(a),"recent-files.json")}function E(a){return(0,e.join)(B(a),"expanded-paths.json")}function F(a){return(0,e.join)(B(a),"comments.json")}function G(a){return(0,e.join)(B(a),"services.json")}function H(a){return(0,e.join)(B(a),"note.md")}function I(a,b){return(0,e.join)(B(a),`terminal-history-${b}.jsonl`)}function J(a,b){return(0,e.join)(B(a),`terminal-output-${b}.txt`)}function K(a,b){let c=b?`terminal-env-${b}.json`:"terminal-env-global.json";return(0,e.join)(B(a),c)}function L(){return(0,e.join)(j,"terminal-aliases.json")}function M(){return(0,e.join)(j,"services.json")}function N(a){return(0,e.join)(B(a),"project-settings.json")}function O(a,b){return(0,e.join)(B(a),`terminal-bubble-order-${b}.json`)}function P(a){return(0,e.join)(r,`${a}.json`)}function Q(a,b){return(0,e.join)((0,e.join)(v,A(a)),`${b}.jsonl`)}function R(a,b){return(0,e.join)((0,e.join)(x,A(a)),`${b}.jsonl`)}function S(a,b){return(0,e.join)((0,e.join)(z,A(a)),`${b}.jsonl`)}function T(a,b){return(0,e.join)((0,e.join)(j,"ollama-sessions",A(a)),`${b}.jsonl`)}function U(a){let b=(0,e.join)(i,".codex","sessions");if(!(0,g.existsSync)(b))return null;try{let c=(0,h.execSync)(`find ${JSON.stringify(b)} -name "*${a}.jsonl" -type f 2>/dev/null`,{encoding:"utf8",timeout:3e3}).trim();if(c)return c.split("\n")[0]}catch{}return null}function V(a){let b=(0,e.join)(i,".kimi","sessions");if(!(0,g.existsSync)(b))return null;try{for(let c of(0,g.readdirSync)(b)){let d=(0,e.join)(b,c,a,"context.jsonl");if((0,g.existsSync)(d))return d}}catch{}return null}async function W(a){(0,g.existsSync)(a)||await (0,f.mkdir)(a,{recursive:!0})}async function X(a){let b=(0,e.join)(a,"..");await W(b)}async function Y(a,b){try{let b=await (0,f.readFile)(a,"utf-8");return JSON.parse(b)}catch{return b}}async function Z(a,b){await X(a),await (0,f.writeFile)(a,JSON.stringify(b,null,2),"utf-8")}let $=globalThis,_=$.__cockpitFileLocks??($.__cockpitFileLocks=new Map);function aa(a,b){let c=(_.get(a)??Promise.resolve()).then(b),d=c.then(()=>{},()=>{});return _.set(a,d),d.then(()=>{_.get(a)===d&&_.delete(a)}),c}},25344:(a,b,c)=>{c.d(b,{BE:()=>l,IS:()=>v,KP:()=>r,ZT:()=>x,_0:()=>s,iU:()=>n,jH:()=>o,zC:()=>t});var d=c(31421),e=c(73024),f=c(76760),g=c.n(f),h=c(57975),i=c(28677);let j=(0,h.promisify)(d.exec),k=new Set([".git","node_modules"]),l=8e3;function m(a){let b=a.toLowerCase(),c=b.lastIndexOf(".");if(c<0)return!1;let d=b.slice(c);for(let a of(0,i.cn)())if(a.toLowerCase()===d)return!0;return!1}async function n(a){try{await j("git rev-parse --git-dir",{cwd:a})}catch{return null}let{stdout:b}=await j("git -c core.quotePath=false ls-files --cached --others --exclude-standard",{cwd:a,maxBuffer:0x3200000}),c=[];for(let a of b.split("\n")){let b=a.trim();if(b&&m(b.slice(b.lastIndexOf("/")+1))&&(c.push(b),c.length>=l))break}return c}async function o(a,b,c){let d;if(!(c.length>=l)){try{d=await e.promises.readdir(a,{withFileTypes:!0})}catch{return}for(let e of d){if(c.length>=l)return;if(k.has(e.name)||e.name.startsWith(".git"))continue;let d=g().join(a,e.name);e.isDirectory()?await o(d,b,c):e.isFile()&&m(e.name)&&c.push(g().relative(b,d))}}}let p=[".ts",".tsx",".js",".jsx",".mjs",".cjs"],q=[".js",".jsx",".mjs",".cjs"];function r(a,b,c){let d=g().relative(b,a);if(d.startsWith(".."))return null;for(let a of q)if(d.endsWith(a)){d=d.slice(0,-a.length);break}if(c.has(d))return d;for(let a of p){let b=d+a;if(c.has(b))return b}for(let a of p){let b=g().join(d,"index"+a);if(c.has(b))return b}return null}function s(a,b){return""===b||a===b||a.startsWith(b+"/")}async function t(a,b){let c=await u(a);if(0===c.length)return new Map;let d=[];try{let{stdout:b}=await j("git -c core.quotePath=false ls-files --cached --others --exclude-standard",{cwd:a,maxBuffer:0x3200000});d=b.split("\n").map(a=>a.trim()).filter(a=>a.endsWith("/package.json")&&!a.includes("node_modules/"))}catch{return new Map}let f=d.filter(a=>{let b=a.slice(0,-13);return c.some(a=>{var c;return c=b,RegExp("^"+a.replace(/\\/g,"/").replace(/[.+^${}()|[\]]/g,"\\$&").replace(/\*\*/g,"___DOUBLESTAR___").replace(/\*/g,"[^/]*").replace(/___DOUBLESTAR___/g,".*")+"$").test(c)})}),h=new Map;for(let c of f){let d;try{d=JSON.parse(await e.promises.readFile(g().join(a,c),"utf8"))}catch{continue}if("string"!=typeof d.name)continue;let f=g().dirname(c),i=function(a,b,c){let d,e=b=>{let d=b.replace(/^\.\//,"");return v(g().posix.join(a,d),c)},f=b.exports;if("string"==typeof f)d=f;else if(f&&"object"==typeof f&&f["."]){let a=f["."];"string"==typeof a?d=a:a&&"object"==typeof a&&(d=a.types??a.import??a.default??a.require)}if("string"==typeof d){let a=e(d);if(a)return a}if("string"==typeof b.main){let a=e(b.main);if(a)return a}for(let b of["src/index.ts","src/index.tsx","index.ts","index.tsx","src/index.js","index.js"])if(c.has(g().posix.join(a,b)))return g().posix.join(a,b);return null}(f,d,b);h.set(d.name,{name:d.name,dir:f,entryFile:i})}return h}async function u(a){try{var b=await e.promises.readFile(g().join(a,"pnpm-workspace.yaml"),"utf8");let c=[],d=!1;for(let a of b.split("\n")){let b=a.replace(/#.*$/,"");if(/^packages\s*:/.test(b)){d=!0;continue}if(!d)continue;let e=b.match(/^\s*-\s*['"]?([^'"#\s]+)['"]?\s*$/);e?c.push(e[1]):/^\S/.test(b)&&(d=!1)}return c}catch{}try{let b=JSON.parse(await e.promises.readFile(g().join(a,"package.json"),"utf8")),c=b?.workspaces;if(Array.isArray(c))return c.filter(a=>"string"==typeof a);if(c&&Array.isArray(c.packages))return c.packages.filter(a=>"string"==typeof a)}catch{}return[]}function v(a,b){if(a.startsWith("..")||a.startsWith("/"))return null;for(let b of q)if(a.endsWith(b)){a=a.slice(0,-b.length);break}if(b.has(a))return a;for(let c of p){let d=a+c;if(b.has(d))return d}for(let c of p){let d=g().posix.join(a,"index"+c);if(b.has(d))return d}return null}async function w(a,b){let c,d=new Map;try{let b=(await e.promises.readFile(a,"utf8")).replace(/^\s*\/\/.*$/gm,"");c=JSON.parse(b)}catch{return d}let f=c?.compilerOptions?.baseUrl??".",h=c?.compilerOptions?.paths??{},i=g().resolve(g().dirname(a),f),j=g().relative(b,i)||".";for(let[a,b]of Object.entries(h)){if(!Array.isArray(b)||0===b.length)continue;let c=a.replace(/\/\*$/,""),e=b[0].replace(/\/\*$/,"");d.set(c,g().join(j,e))}return d}async function x(a){let b=[],c=[];try{let{stdout:b}=await j("git -c core.quotePath=false ls-files --cached --others --exclude-standard",{cwd:a,maxBuffer:0x3200000});c=b.split("\n").map(a=>a.trim()).filter(a=>/(^|\/)tsconfig[^/]*\.json$/.test(a)&&!a.includes("node_modules/"))}catch{try{await e.promises.access(g().join(a,"tsconfig.json")),c=["tsconfig.json"]}catch{}}for(let d of c){let c=await w(g().join(a,d),a);if(0===c.size)continue;let e=g().dirname(d);b.push({scope:"."===e?"":e,aliases:c,sortedAliases:y(c)})}let d=b.find(a=>""===a.scope);return d||(d={scope:"",aliases:new Map,sortedAliases:[]},b.push(d)),d.aliases.has("@")||(d.aliases.set("@","./src"),d.sortedAliases=y(d.aliases)),b.sort((a,b)=>b.scope.length-a.scope.length)}function y(a){return[...a.entries()].sort(([a],[b])=>b.length-a.length)}},27485:(a,b,c)=>{c.d(b,{_:()=>e});let d=new Set(["function","class","method"]);function e(a){return d.has(a.kind)}},28677:(a,b,c)=>{c.d(b,{Bu:()=>f,cn:()=>g,ik:()=>e});let d=new Map;function e(a){d.set(a.grammarId,a)}function f(a){let b=d.get(a);if(!b)throw Error(`[codeMap] no handler registered for grammar '${a}' — did the handler module get imported (handlers/index.ts barrel)?`);return b}function g(){let a=new Set;for(let b of d.values())for(let c of b.extensions)a.add(c.toLowerCase());return[...a]}},33265:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{E:()=>A,J:()=>G,Mv:()=>F,Xn:()=>E,bQ:()=>C,cl:()=>u,ih:()=>r,s7:()=>z,u$:()=>t,xl:()=>v});var e=c(73024),f=c(76760),g=c.n(f),h=c(87956),i=c(86236),j=c(25344),k=c(27485),l=c(37765),m=a([h]);async function n(a,b,c){let d=Array(a.length),e=0;async function f(){for(;e<a.length;){let b=e++;d[b]=await c(a[b])}}return await Promise.all(Array.from({length:Math.min(b,a.length)},f)),d}h=(m.then?(await m)():m)[0];let H=/(['"`])([A-Za-z][A-Za-z0-9_.-]{2,63})\1/g;async function o(a,b){let c,d,f,g=(0,h.M)(b);if(!g)return null;try{[c,d]=await Promise.all([e.promises.readFile(a,"utf8"),e.promises.stat(a).then(a=>a.mtimeMs)])}catch{return null}if(c.length>1e6)return null;let i=await (0,h.b)(g);try{f=i.parse(c)}catch(a){return console.error("[codeIndex] parse failed for",b,a),null}if(!f)return null;try{let a,e=(0,l.Bu)(g),h=e.extractSymbols(f.rootNode,c),i=(a=[],!function c(d){for(let e of d)a.push({filePath:b,qualifiedName:e.qualifiedName,name:e.name,kind:e.kind,startLine:e.startLine,endLine:e.endLine,params:e.params}),c(e.children)}(h),a),{specs:j,bindings:k}=e.extractImports(f.rootNode),m=e.extractCallSites(f.rootNode,i),n=function(a,b){let c,d=[],e=new Set,f=[0];for(let b=0;b<a.length;b++)10===a.charCodeAt(b)&&f.push(b+1);for(H.lastIndex=0;null!==(c=H.exec(a))&&!(d.length>=500);){let a=c[2],g=function(a){let b=0,c=f.length-1;for(;b<c;){let d=b+c+1>>>1;f[d]<=a?b=d:c=d-1}return b+1}(c.index),h=`${a}\0${g}`;if(e.has(h))continue;e.add(h);let i=p(b,g);d.push({value:a,line:g,...i?{enclosingQname:i.qualifiedName}:{}})}return d}(c,i);return{path:b,language:g,mtime:d,symbolsTree:h,flatSymbols:i,importBindings:k,importSpecifiers:j,rawCalls:m,literals:n}}finally{f.delete()}}function p(a,b){let c=null;for(let d of a)d.startLine<=b&&b<=d.endLine&&(!c||d.endLine-d.startLine<c.endLine-c.startLine)&&(c=d);return c}async function q(a){let b=Date.now(),c=await (0,j.iU)(a);c||(c=[],await (0,j.jH)(a,a,c));let d=c.length>j.BE;d&&(c=c.slice(0,j.BE));let e=new Set(c),f=await (0,j.ZT)(a),h=await (0,j.zC)(a,e),k=new Map;for(let b of i.I){let c=(0,l.Bu)(b);k.set(b,await c.buildProjectContext(a,e))}let m=(await n(c,50,b=>o(g().join(a,b),b))).filter(a=>null!==a),q=new Map;for(let a of m){let b=(0,l.Bu)(a.language),c=k.get(a.language),d=new Map,f=new Set;for(let g of a.importSpecifiers){if(d.has(g))continue;let h=b.resolveSpecifier(g,a.path,c,e);h&&h!==a.path&&(d.set(g,h),f.add(h))}let g=new Map,h=new Map;for(let b of a.flatSymbols){h.set(b.qualifiedName,b);let a=g.get(b.name);a?a.push(b):g.set(b.name,[b])}let i=new Map,j=new Map;for(let b of a.importBindings)b.isReexport?j.set(b.localName,b):i.set(b.localName,b);q.set(a.path,{path:a.path,language:a.language,mtime:a.mtime,symbolsTree:a.symbolsTree,flatSymbols:a.flatSymbols,literals:a.literals,importedFiles:f,importedBy:new Set,importBindings:a.importBindings,resolvedImports:d,intraCalls:[],outgoingCalls:[],incomingCalls:[],externalCalls:[],methodCalls:[],symbolsByName:g,symbolsByQname:h,bindingsByLocalName:i,reexportsByLocalName:j})}for(let a of q.values())for(let b of a.importedFiles){let c=q.get(b);c&&c.importedBy.add(a.path)}for(let a of m){let b=q.get(a.path),c=(0,l.Bu)(a.language),d=k.get(a.language),e=new Map,f=new Map,g=new Map,h=new Map;for(let i of a.rawCalls){let a=p(b.flatSymbols,i.line);if(a){for(let j of c.resolveCall(i,a,b,q,d))if("symbol"===j.kind)if(j.addr.filePath===b.path){let c=`${a.qualifiedName}${j.addr.qualifiedName}`,d=e.get(c);if(d)d.lines.push(i.line);else{let d={from:a.qualifiedName,to:j.addr.qualifiedName,lines:[i.line]};e.set(c,d),b.intraCalls.push(d)}}else{let c=`${a.qualifiedName}${j.addr.filePath}${j.addr.qualifiedName}`,d=f.get(c);if(d)d.lines.push(i.line);else{let d={from:a.qualifiedName,to:{filePath:j.addr.filePath,qualifiedName:j.addr.qualifiedName},lines:[i.line]};f.set(c,d),b.outgoingCalls.push(d)}}else if("external"===j.kind){let c=`${a.qualifiedName}${j.packageSpec}${j.name}`,d=g.get(c);if(d)d.lines.push(i.line);else{let d={from:a.qualifiedName,packageSpec:j.packageSpec,importedName:j.name,lines:[i.line]};g.set(c,d),b.externalCalls.push(d)}}else if("method-unresolved"===j.kind){let c=b.bindingsByLocalName.get(j.receiverName),d=c?b.resolvedImports.get(c.specifier)??"":"",e=`${a.qualifiedName}${j.receiverName}${j.methodName}`,f=h.get(e);if(f)f.lines.push(i.line);else{let c={from:a.qualifiedName,receiverName:j.receiverName,methodName:j.methodName,receiverFilePath:d,lines:[i.line]};h.set(e,c),b.methodCalls.push(c)}}}}for(let a of b.intraCalls)a.lines.sort((a,b)=>a-b);for(let a of b.outgoingCalls)a.lines.sort((a,b)=>a-b);for(let a of b.externalCalls)a.lines.sort((a,b)=>a-b);for(let a of b.methodCalls)a.lines.sort((a,b)=>a-b)}for(let a of q.values())for(let b of a.outgoingCalls){let c=q.get(b.to.filePath);c&&c.incomingCalls.push({from:{filePath:a.path,qualifiedName:b.from},to:b.to.qualifiedName,lines:b.lines})}return{cwd:a,files:q,truncated:d,fileCountCap:d?j.BE:void 0,tsconfigs:f,workspaces:h,projectContexts:k,fileSet:e,generatedAt:Date.now(),buildMs:Date.now()-b}}let I=new Map,J=new Map,K=new Set,L=new Set,M=null;function r(a){if(M=a,a)for(let b of L)a(b,()=>K.add(b))}async function s(a,b){let c=Array.from(b.files.keys()),d=0,e=async()=>{for(;d<c.length;){let e=d++;try{await v(a,c[e],b)}catch{}}};await Promise.all(Array.from({length:Math.min(8,c.length)},e))}async function t(a,b={}){!L.has(a)&&(L.add(a),M&&M(a,()=>K.add(a))),b.forceRefresh&&(I.delete(a),K.delete(a));let d=I.get(a);if(d){if(K.has(a)){K.delete(a);try{await s(a,d)}catch{}}return d}let e=J.get(a);if(e)return e;let f=q(a).then(b=>(I.set(a,b),J.delete(a),K.delete(a),Promise.all([c.e(4008),c.e(2540)]).then(c.bind(c,92540)).then(c=>c.precomputeAnalytics(a,b)).catch(a=>{console.error("[codeIndex] analytics precompute failed:",a)}),b));return J.set(a,f),f}function u(a){if(Promise.all([c.e(4008),c.e(2540)]).then(c.bind(c,92540)).then(b=>b.invalidateAnalytics(a)).catch(()=>{}),!a){I.clear(),J.clear(),K.clear();return}I.delete(a),J.delete(a),K.delete(a)}async function v(a,b,c){let d,f=c.files.get(b);if(!f)return!1;try{d=(await e.promises.stat(g().join(a,b))).mtimeMs}catch{return!1}if(d===f.mtime)return!1;let h=await o(g().join(a,b),b);if(!h)return!1;let i=(0,l.Bu)(h.language),j=c.projectContexts.get(h.language),k=new Map,m=new Set;for(let a of h.importSpecifiers){if(k.has(a))continue;let b=i.resolveSpecifier(a,h.path,j,c.fileSet);b&&b!==h.path&&(k.set(a,b),m.add(b))}let n=new Map,q=new Map;for(let a of h.flatSymbols){q.set(a.qualifiedName,a);let b=n.get(a.name);b?b.push(a):n.set(a.name,[a])}let r=new Map,s=new Map;for(let a of h.importBindings)a.isReexport?s.set(a.localName,a):r.set(a.localName,a);let t={path:h.path,language:h.language,mtime:h.mtime,symbolsTree:h.symbolsTree,flatSymbols:h.flatSymbols,literals:h.literals,importedFiles:m,importedBy:f.importedBy,importBindings:h.importBindings,resolvedImports:k,intraCalls:[],outgoingCalls:[],incomingCalls:f.incomingCalls,externalCalls:[],methodCalls:[],symbolsByName:n,symbolsByQname:q,bindingsByLocalName:r,reexportsByLocalName:s},u=new Map,v=new Map,w=new Map,x=new Map;for(let a of(c.files.set(h.path,t),h.rawCalls)){let b=p(t.flatSymbols,a.line);if(b){for(let d of i.resolveCall(a,b,t,c.files,j))if("symbol"===d.kind)if(d.addr.filePath===t.path){let c=`${b.qualifiedName}${d.addr.qualifiedName}`,e=u.get(c);if(e)e.lines.push(a.line);else{let e={from:b.qualifiedName,to:d.addr.qualifiedName,lines:[a.line]};u.set(c,e),t.intraCalls.push(e)}}else{let c=`${b.qualifiedName}${d.addr.filePath}${d.addr.qualifiedName}`,e=v.get(c);if(e)e.lines.push(a.line);else{let e={from:b.qualifiedName,to:{filePath:d.addr.filePath,qualifiedName:d.addr.qualifiedName},lines:[a.line]};v.set(c,e),t.outgoingCalls.push(e)}}else if("external"===d.kind){let c=`${b.qualifiedName}${d.packageSpec}${d.name}`,e=w.get(c);if(e)e.lines.push(a.line);else{let e={from:b.qualifiedName,packageSpec:d.packageSpec,importedName:d.name,lines:[a.line]};w.set(c,e),t.externalCalls.push(e)}}else if("method-unresolved"===d.kind){let c=t.bindingsByLocalName.get(d.receiverName),e=c?t.resolvedImports.get(c.specifier)??"":"",f=`${b.qualifiedName}${d.receiverName}${d.methodName}`,g=x.get(f);if(g)g.lines.push(a.line);else{let c={from:b.qualifiedName,receiverName:d.receiverName,methodName:d.methodName,receiverFilePath:e,lines:[a.line]};x.set(f,c),t.methodCalls.push(c)}}}}for(let a of t.intraCalls)a.lines.sort((a,b)=>a-b);for(let a of t.outgoingCalls)a.lines.sort((a,b)=>a-b);for(let a of t.externalCalls)a.lines.sort((a,b)=>a-b);for(let a of t.methodCalls)a.lines.sort((a,b)=>a-b);return!0}function w(a){return{filePath:a.filePath,qualifiedName:a.qualifiedName,name:a.name,kind:a.kind,startLine:a.startLine,endLine:a.endLine,params:a.params}}function x(a){let b=a.indexOf(">");return b>=0?a.slice(0,b):a}function y(a){if(a.length<2)return a;let b=[a[0]];for(let c=1;c<a.length;c++)a[c]!==a[c-1]&&b.push(a[c]);return b}function z(a,b){let c=a.files.get(b);if(!c)return null;let d=c.flatSymbols.filter(a=>!a.qualifiedName.includes(">")).map(w).sort((a,b)=>a.startLine-b.startLine),e=new Set(d.map(a=>a.qualifiedName)),f=new Map,g=[];for(let a of c.intraCalls){let b=x(a.from),c=x(a.to);if(b===c||!e.has(b)||!e.has(c))continue;let d=`${b}|${c}`,h=f.get(d);if(h)for(let b of a.lines)h.lines.push(b);else{let e={from:b,to:c,lines:a.lines.slice()};f.set(d,e),g.push(e)}}for(let a of g)a.lines.sort((a,b)=>a-b),a.lines=y(a.lines);let h=[],i=new Map;for(let b of c.outgoingCalls){let d=x(b.from);if(!e.has(d)||b.to.filePath===c.path)continue;let f=a.files.get(b.to.filePath);if(!f)continue;let g=f.symbolsByQname.get(b.to.qualifiedName);if(!g||!(0,k._)(g))continue;let j=`${g.filePath}|${g.qualifiedName}|${d}`,l=i.get(j);if(l)for(let a of b.lines)l.lines.push(a);else{let a={external:w(g),focalQname:d,lines:b.lines.slice()};i.set(j,a),h.push(a)}}let j=[],l=new Map;for(let b of c.incomingCalls){let d=x(b.to);if(!e.has(d)||b.from.filePath===c.path)continue;let f=a.files.get(b.from.filePath);if(!f)continue;let g=f.symbolsByQname.get(b.from.qualifiedName);if(!g||!(0,k._)(g))continue;let h=`${g.filePath}|${g.qualifiedName}|${d}`,i=l.get(h);if(i)for(let a of b.lines)i.lines.push(a);else{let a={external:w(g),focalQname:d,lines:b.lines.slice()};l.set(h,a),j.push(a)}}for(let a of h)a.lines.sort((a,b)=>a-b),a.lines=y(a.lines);for(let a of j)a.lines.sort((a,b)=>a-b),a.lines=y(a.lines);let m=[],n=new Map;for(let a of c.externalCalls){let b=x(a.from);if(!e.has(b))continue;let c=`${b}|${a.packageSpec}|${a.importedName}`,d=n.get(c);if(d)for(let b of a.lines)d.lines.push(b);else{let d={external:{name:a.importedName,packageSpec:a.packageSpec},focalQname:b,lines:a.lines.slice()};n.set(c,d),m.push(d)}}for(let a of m)a.lines.sort((a,b)=>a-b),a.lines=y(a.lines);let o=[],p=new Map;for(let a of c.methodCalls){let b=x(a.from);if(!e.has(b))continue;let c=`${b}|${a.receiverName}|${a.methodName}`,d=p.get(c);if(d)for(let b of a.lines)d.lines.push(b);else{let d={focalQname:b,receiverName:a.receiverName,methodName:a.methodName,receiverFilePath:a.receiverFilePath,lines:a.lines.slice()};p.set(c,d),o.push(d)}}for(let a of o)a.lines.sort((a,b)=>a-b),a.lines=y(a.lines);let q=(a,b)=>a.external.filePath.localeCompare(b.external.filePath)||a.external.qualifiedName.localeCompare(b.external.qualifiedName);return j.sort(q),h.sort(q),m.sort((a,b)=>a.external.packageSpec.localeCompare(b.external.packageSpec)||a.external.name.localeCompare(b.external.name)),o.sort((a,b)=>a.receiverName.localeCompare(b.receiverName)||a.methodName.localeCompare(b.methodName)),{filePath:c.path,language:c.language,fileCount:a.files.size,mtimeMs:c.mtime,functions:d,intraCalls:g,externalCalls:m,methodCalls:o,upstreamCalls:j,downstreamCalls:h}}function A(a,b){let c=a.files.get(b);return c?{filePath:c.path,language:c.language,symbols:function a(b){let c=[];for(let d of b)"unknown"!==d.kind&&c.push({...d,children:a(d.children)});return c}(c.symbolsTree)}:null}function B(a){let b="";for(let c=0;c<a.length;c++){let d=a.charCodeAt(c);95!==d&&45!==d&&46!==d&&32!==d&&(b+=d>=65&&d<=90?String.fromCharCode(d+32):a[c])}return b}function C(a,b,c,d={}){let e=b.trim();if(!e)return d.includeLiterals?{files:[],symbols:[],literals:[]}:{files:[],symbols:[]};let f=B(e),g=[];for(let b of a.files.values()){if(g.length>=c)break;B(b.path).includes(f)&&g.push({type:"file",label:function(a){let b=a.lastIndexOf("/");return b>=0?a.slice(b+1):a}(b.path),hint:b.path,target:{kind:"file",filePath:b.path}})}let h=[];for(let b of a.files.values()){let a=!1;if(!function a(b,c){for(let d of b)if(c(d)||a(d.children,c))return!0;return!1}(b.symbolsTree,d=>h.length>=c?(a=!0,!0):"unknown"!==d.kind&&(B(d.name).includes(f)&&h.push({type:"symbol",label:d.name,hint:`${d.kind} \xb7 ${b.path}`,target:{kind:"symbol",filePath:b.path,line:d.startLine,symbolName:d.name,symbolKind:d.kind,qualifiedName:d.qualifiedName}}),!1)),a)break}if(!d.includeLiterals)return{files:g,symbols:h};let i=[];a:for(let b of a.files.values())for(let a of b.literals){if(i.length>=c)break a;B(a.value).includes(f)&&i.push({type:"literal",value:a.value,filePath:b.path,line:a.line,...a.enclosingQname?{enclosingSymbol:a.enclosingQname}:{}})}return{files:g,symbols:h,literals:i}}function D(a,b,c){if(c){let d=a.files.get(c);return d&&d.symbolsByQname.has(b)?[d]:[]}let d=[];for(let c of a.files.values())c.symbolsByQname.has(b)&&d.push(c);return d}function E(a,b,c){let d=D(a,b,c);if(0===d.length)return{qname:b,target:null,callers:[]};let e=[],f=new Map;for(let c of d){for(let a of c.intraCalls){if(a.to!==b)continue;let d=c.symbolsByQname.get(a.from);if(!d)continue;let g=`${c.path}|${a.from}`,h=f.get(g);if(h)for(let b of a.lines)h.callLines.push(b);else{let b={caller:w(d),callLines:a.lines.slice()};f.set(g,b),e.push(b)}}for(let d of c.incomingCalls){if(d.to!==b)continue;let c=a.files.get(d.from.filePath),g=c?.symbolsByQname.get(d.from.qualifiedName);if(!g)continue;let h=`${d.from.filePath}|${d.from.qualifiedName}`,i=f.get(h);if(i)for(let a of d.lines)i.callLines.push(a);else{let a={caller:w(g),callLines:d.lines.slice()};f.set(h,a),e.push(a)}}}for(let a of e)a.callLines.sort((a,b)=>a-b),a.callLines=y(a.callLines);e.sort((a,b)=>a.caller.filePath.localeCompare(b.caller.filePath)||a.caller.qualifiedName.localeCompare(b.caller.qualifiedName));let g=w(d[0].symbolsByQname.get(b)),h=d.length>1?d.map(a=>a.path):void 0;return{qname:b,target:g,callers:e,ambiguousIn:h}}function F(a,b,c){let d=D(a,b,c);if(0===d.length)return{qname:b,source:null,callees:[]};let e=[],f=new Map;for(let c of d){for(let a of c.intraCalls){if(a.from!==b)continue;let d=c.symbolsByQname.get(a.to);if(!d)continue;let g=`${c.path}|${a.to}`,h=f.get(g);if(h)for(let b of a.lines)h.callLines.push(b);else{let b={callee:w(d),callLines:a.lines.slice()};f.set(g,b),e.push(b)}}for(let d of c.outgoingCalls){if(d.from!==b)continue;let c=a.files.get(d.to.filePath),g=c?.symbolsByQname.get(d.to.qualifiedName);if(!g)continue;let h=`${d.to.filePath}|${d.to.qualifiedName}`,i=f.get(h);if(i)for(let a of d.lines)i.callLines.push(a);else{let a={callee:w(g),callLines:d.lines.slice()};f.set(h,a),e.push(a)}}}for(let a of e)a.callLines.sort((a,b)=>a-b),a.callLines=y(a.callLines);e.sort((a,b)=>a.callee.filePath.localeCompare(b.callee.filePath)||a.callee.qualifiedName.localeCompare(b.callee.qualifiedName));let g=w(d[0].symbolsByQname.get(b)),h=d.length>1?d.map(a=>a.path):void 0;return{qname:b,source:g,callees:e,ambiguousIn:h}}function G(a,b,c,d){let e=D(a,b,d);if(0===e.length)return{qname:b,target:null,nodes:[],truncated:!1};let f=Math.min(Math.max(c,1),5),g=w(e[0].symbolsByQname.get(b)),h=e.length>1?e.map(a=>a.path):void 0,i=e.map(a=>({filePath:a.path,qname:b})),j=new Set(i.map(a=>`${a.filePath}|${a.qname}`)),k=i.map(b=>{let c=a.files.get(b.filePath).symbolsByQname.get(b.qname);return{symbol:w(c),depth:0}}),l=i.slice(),m=!1;for(let b=1;b<=f;b++){let c=[];for(let d of l){let e=a.files.get(d.filePath);if(e){for(let a of e.intraCalls){if(a.to!==d.qname)continue;let f=e.symbolsByQname.get(a.from);if(!f)continue;let g=`${e.path}|${a.from}`;if(!j.has(g)&&(j.add(g),k.push({symbol:w(f),depth:b}),c.push({filePath:e.path,qname:a.from}),k.length>=500)){m=!0;break}}if(m)break;for(let f of e.incomingCalls){if(f.to!==d.qname)continue;let e=a.files.get(f.from.filePath),g=e?.symbolsByQname.get(f.from.qualifiedName);if(!g)continue;let h=`${f.from.filePath}|${f.from.qualifiedName}`;if(!j.has(h)&&(j.add(h),k.push({symbol:w(g),depth:b}),c.push({filePath:f.from.filePath,qname:f.from.qualifiedName}),k.length>=500)){m=!0;break}}if(m)break}}if(m||0===c.length)break;l=c}return k.sort((a,b)=>a.depth-b.depth||a.symbol.filePath.localeCompare(b.symbol.filePath)||a.symbol.qualifiedName.localeCompare(b.symbol.qualifiedName)),{qname:b,target:g,nodes:k,truncated:m,ambiguousIn:h}}d()}catch(a){d(a)}})},37765:(a,b,c)=>{c.d(b,{Bu:()=>d.Bu});var d=c(28677),e=c(76760),f=c.n(e);function g(a){let b=0xdeadbeef,c=0x41c6ce57;for(let d=0;d<a.length;d++){let e=a.charCodeAt(d);b=Math.imul(b^e,0x9e3779b1),c=Math.imul(c^e,0x5f356495)}return b=Math.imul(b^b>>>16,0x85ebca6b)^Math.imul(c^c>>>13,0xc2b2ae35),(0x100000000*(2097151&(c=Math.imul(c^c>>>16,0x85ebca6b)^Math.imul(b^b>>>13,0xc2b2ae35)))+(b>>>0)>>>0).toString(16)}function h(a){return a.replace(/\s+/g," ").trim()}function i(a,b){return a?`${a}>${b}`:b}function j(a){let b=a.childForFieldName("name");if(b)return b.text;for(let b=0;b<a.namedChildCount;b++){let c=a.namedChild(b);if(c&&("identifier"===c.type||"type_identifier"===c.type||"property_identifier"===c.type))return c.text}return"<anonymous>"}function k(a,b,c,d,e=[],f){return{qualifiedName:i(d,b),name:b,kind:c,startLine:a.startPosition.row+1,endLine:a.endPosition.row+1,contentHash:g(h(a.text)),children:e,params:f}}function l(a){let b=a.childForFieldName("parameter");if(b)return[b.text];let c=a.childForFieldName("parameters");if(!c)return;let d=[];for(let a=0;a<c.namedChildCount;a++){let b=c.namedChild(a);b&&d.push(function a(b){switch(b.type){case"required_parameter":case"optional_parameter":{let c=b.childForFieldName("pattern");return c?a(c):b.text}case"assignment_pattern":{let c=b.childForFieldName("left");return c?a(c):b.text}case"default_parameter":case"typed_default_parameter":{let a=b.childForFieldName("name");return a?a.text:b.text}case"typed_parameter":for(let a=0;a<b.namedChildCount;a++){let c=b.namedChild(a);if(c?.type==="identifier")return c.text}return b.text;default:return b.text}}(b))}return d}function m(a,b){let c=a.text.split("\n"),d=c.length;if(0===d)return[];let e=new Uint8Array(d+2);for(let a of b){let b=Math.max(1,a.startLine),c=Math.min(d,a.endLine);for(let a=b;a<=c;a++)e[a]=1}let f=[],i=(a,b)=>{let d=!1;for(let e=a;e<=b;e++){let a=c[e-1];if(a&&a.trim().length>0){d=!0;break}}if(!d)return;let e=c.slice(a-1,b).join("\n");f.push({qualifiedName:`__code_${a}_${b}__`,name:"code",kind:"unknown",startLine:a,endLine:b,contentHash:g(h(e)),children:[]})},j=-1;for(let a=1;a<=d;a++)e[a]?j>=0&&(i(j,a-1),j=-1):j<0&&(j=a);return j>=0&&i(j,d),f}function n(a){let b=[],c=function(a){let b=[],c=-1,d=-1;for(let e=0;e<a.namedChildCount;e++){let f=a.namedChild(e);if(f){if("import_statement"===f.type||"export_statement"===f.type&&null!==f.childForFieldName("source")||"import_from_statement"===f.type||"future_import_statement"===f.type)b.push(f),c<0&&(c=f.startPosition.row+1),d=f.endPosition.row+1;else if(c>=0)break}}return c<0?null:{qualifiedName:"__imports__",name:"imports",kind:"unknown",startLine:c,endLine:d,contentHash:g(h(b.map(a=>a.text).join("\n"))),children:[]}}(a);c&&b.push(c);for(let c=0;c<a.namedChildCount;c++){let d=a.namedChild(c);d&&b.push(...function a(b,c,d=!1){switch(b.type){case"export_statement":case"export_default_declaration":{let d=[];for(let e=0;e<b.namedChildCount;e++){let f=b.namedChild(e);f&&d.push(...a(f,c,!0))}return d}case"function_declaration":case"generator_function_declaration":case"function_definition":return[k(b,j(b),"function",c,[],l(b))];case"class_declaration":case"abstract_class_declaration":{let a=j(b),d=i(c,a),e=function(a,b){if(!a)return[];let c=[];for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(e){if("method_definition"===e.type)c.push(k(e,j(e),"method",b,[],l(e)));else if("public_field_definition"===e.type){let a=e.childForFieldName("value");a&&("arrow_function"===a.type||"function_expression"===a.type)&&c.push(k(e,j(e),"method",b,[],l(a)))}}}return c}(b.childForFieldName("body"),d);return[k(b,a,"class",c,e)]}case"interface_declaration":return[k(b,j(b),"interface",c)];case"type_alias_declaration":return[k(b,j(b),"type",c)];case"enum_declaration":return[k(b,j(b),"enum",c)];case"lexical_declaration":case"variable_declaration":return function(a,b){let c=[];for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(!e||"variable_declarator"!==e.type)continue;let f=e.childForFieldName("name"),g=e.childForFieldName("value");if(!f)continue;let h=f.text,i=g&&("arrow_function"===g.type||"function_expression"===g.type),m=i&&g?l(g):void 0;if(c.push(k(a,h,i?"function":"const",b,[],m)),g&&"object"===g.type&&!i){let a=b?`${b}>${h}`:h;for(let b=0;b<g.namedChildCount;b++){let d=g.namedChild(b);if(d){if("pair"===d.type){let b=d.childForFieldName("key"),e=d.childForFieldName("value");if(!b||!e||"property_identifier"!==b.type&&"identifier"!==b.type||"arrow_function"!==e.type&&"function_expression"!==e.type)continue;c.push(k(d,b.text,"method",a,[],l(e)))}else if("method_definition"===d.type){let b=j(d);b&&c.push(k(d,b,"method",a,[],l(d)))}}}}}return c}(b,c);case"class_definition":{let a=j(b),d=i(c,a),e=function a(b,c){if(!b)return[];let d=[];for(let e=0;e<b.namedChildCount;e++){let f=b.namedChild(e);if(f){if("function_definition"===f.type)d.push(k(f,j(f),"method",c,[],l(f)));else if("decorated_definition"===f.type){let b=f.childForFieldName("definition");if(b?.type==="function_definition")d.push({...k(b,j(b),"method",c,[],l(b)),startLine:f.startPosition.row+1,contentHash:g(h(f.text))});else if(b?.type==="class_definition"){let e=j(b),l=i(c,e),m=a(b.childForFieldName("body"),l);d.push({...k(b,e,"class",c,m),startLine:f.startPosition.row+1,contentHash:g(h(f.text))})}}else if("class_definition"===f.type){let b=j(f),e=i(c,b),g=a(f.childForFieldName("body"),e);d.push(k(f,b,"class",c,g))}}}return d}(b.childForFieldName("body"),d);return[k(b,a,"class",c,e)]}case"decorated_definition":{let d=b.childForFieldName("definition");if(!d)return[];return a(d,c,!1).map(a=>({...a,startLine:b.startPosition.row+1,contentHash:g(h(b.text))}))}case"expression_statement":{let a=[];for(let d=0;d<b.namedChildCount;d++){let e=b.namedChild(d);if(e?.type==="assignment"){let d=function(a,b,c){let d=b.childForFieldName("left");if(!d||"identifier"!==d.type)return null;let e=d.text;return{qualifiedName:i(c,e),name:e,kind:"const",startLine:a.startPosition.row+1,endLine:a.endPosition.row+1,contentHash:g(h(a.text)),children:[]}}(b,e,c);d&&a.push(d)}}return a.push(...function(a,b){let c=null;for(let b=0;b<a.namedChildCount;b++){let d=a.namedChild(b);if(d){if("call_expression"===d.type){c=d;break}if("await_expression"===d.type){for(let a=0;a<d.namedChildCount;a++){let b=d.namedChild(a);if(b?.type==="call_expression"){c=b;break}}break}}}if(!c)return[];let d=c.childForFieldName("function"),e=c.childForFieldName("arguments");if(!d||!e)return[];let f=null,g=[];for(let a=0;a<e.namedChildCount;a++){let b=e.namedChild(a);if(b){if(null===f&&("string"===b.type||"template_string"===b.type)){let a=b.text;f=a.length>=2&&/^["'`]/.test(a)?a.slice(1,-1):a}("arrow_function"===b.type||"function_expression"===b.type)&&g.push(b)}}if(0===g.length||!f)return[];let h=function a(b){if("identifier"===b.type)return b.text;if("member_expression"===b.type){let a=b.childForFieldName("property");return a?.text??""}if("call_expression"===b.type){let c=b.childForFieldName("function");return c?a(c):""}return""}(d),i=h?`${h} ${f}`:f;return g.map((a,c)=>k(a,g.length>1?`${i} #${c+1}`:i,"function",b,[],l(a)))}(b,c)),a}default:return[]}}(d,void 0,!1))}return b.push(...m(a,b)),b}function o(a){let b=[];return!function a(c){if("call_expression"===c.type||"call"===c.type){let a=c.childForFieldName("function"),d=function a(b){if(!b)return null;if("identifier"===b.type||"shorthand_property_identifier"===b.type)return b.text;if("member_expression"===b.type){let a=b.childForFieldName("property");return a?.text??null}if("attribute"===b.type){let a=b.childForFieldName("attribute");return a?.text??null}return"call_expression"===b.type||"call"===b.type?a(b.childForFieldName("function")):null}(a);if(d){let e=function(a){if(!a||"member_expression"!==a.type&&"attribute"!==a.type)return;let b=a;for(;b;){if("identifier"===b.type)return b.text;if("this"===b.type||"super"===b.type)break;if("member_expression"===b.type||"attribute"===b.type){b=b.childForFieldName("object");continue}break}}(a);b.push({calleeName:d,line:c.startPosition.row+1,...e?{receiverName:e}:{}})}}else if("jsx_opening_element"===c.type||"jsx_self_closing_element"===c.type){let a=function a(b){return b?"identifier"===b.type?/^[A-Z]/.test(b.text)?b.text:null:"member_expression"===b.type||"jsx_member_expression"===b.type?a(b.childForFieldName("object")??b.namedChild(0)):null:null}(c.childForFieldName("name"));a&&b.push({calleeName:a,line:c.startPosition.row+1})}for(let b=0;b<c.childCount;b++){let d=c.child(b);d&&a(d)}}(a),b}function p(a){let b=[];for(let c=0;c<a.namedChildCount;c++){let d=a.namedChild(c);if(d)if("import_statement"===d.type){let a=d.childForFieldName("source");a?function(a,b,c){let d=q(b.text),e=null;for(let b=0;b<a.namedChildCount;b++){let c=a.namedChild(b);if(c?.type==="import_clause"){e=c;break}}if(e)for(let a=0;a<e.namedChildCount;a++){let b=e.namedChild(a);if(b){if("identifier"===b.type)c.push({specifier:d,importedName:"default",localName:b.text});else if("namespace_import"===b.type){let a=function(a,b){for(let c=0;c<a.namedChildCount;c++){let d=a.namedChild(c);if(d?.type===b)return d}return null}(b,"identifier");a&&c.push({specifier:d,importedName:"*",localName:a.text})}else if("named_imports"===b.type)for(let a=0;a<b.namedChildCount;a++){let e=b.namedChild(a);if(!e||"import_specifier"!==e.type)continue;let f=e.childForFieldName("name"),g=e.childForFieldName("alias");f&&c.push({specifier:d,importedName:f.text,localName:g?.text??f.text})}}}}(d,a,b):function(a,b){for(let c=0;c<a.childCount;c++){let d=a.child(c);if(d&&"name"===a.fieldNameForChild(c)){if("dotted_name"===d.type){let a=d.text,c=a.split(".")[0];b.push({specifier:a,importedName:"*",localName:c})}else if("aliased_import"===d.type){let a=d.childForFieldName("name"),c=d.childForFieldName("alias");a?.type==="dotted_name"&&c&&b.push({specifier:a.text,importedName:"*",localName:c.text})}}}}(d,b)}else"import_from_statement"===d.type&&function(a,b){let c=a.childForFieldName("module_name"),d="";if(c){if("dotted_name"===c.type)d=c.text;else if("relative_import"===c.type){let a="",b="";for(let d=0;d<c.namedChildCount;d++){let e=c.namedChild(d);e&&("import_prefix"===e.type?a=e.text:"dotted_name"===e.type&&(b=e.text))}d=a+b}}if(!d)return;let e=!1;for(let c=0;c<a.childCount;c++){let f=a.child(c);if(!f)continue;let g=a.fieldNameForChild(c);if("wildcard_import"===f.type){e=!0;continue}if("name"===g){if("dotted_name"===f.type){let a=f.text;b.push({specifier:d,importedName:a,localName:a})}else if("aliased_import"===f.type){let a=f.childForFieldName("name"),c=f.childForFieldName("alias");a?.type==="dotted_name"&&c&&b.push({specifier:d,importedName:a.text,localName:c.text})}}}e&&b.push({specifier:d,importedName:"*",localName:"*"})}(d,b)}return b}function q(a){return a.length>=2&&('"'===a[0]||"'"===a[0])&&a[a.length-1]===a[0]?a.slice(1,-1):a}function r(a){let b=[];function c(a){if(!a||"string"!==a.type)return null;for(let b=0;b<a.namedChildCount;b++){let c=a.namedChild(b);if(c&&"string_fragment"===c.type)return c.text}return""}return!function a(d){switch(d.type){case"import_statement":case"export_statement":{let a=c(d.childForFieldName("source"));a&&b.push(a);return}case"call_expression":{let a=d.childForFieldName("function");if(a){let e="import"===a.type,f="identifier"===a.type&&"require"===a.text;if(e||f){let a=d.childForFieldName("arguments");if(a&&a.namedChildCount>0){let d=c(a.namedChild(0));d&&b.push(d)}}}}}for(let b=0;b<d.namedChildCount;b++){let c=d.namedChild(b);c&&a(c)}}(a),b}let s={typescript:r,tsx:r,javascript:r,python:function(a){let b=[];return!function a(c){switch(c.type){case"import_statement":for(let a=0;a<c.childCount;a++){let d=c.child(a);if(d&&"name"===c.fieldNameForChild(a)){if("dotted_name"===d.type)b.push(d.text);else if("aliased_import"===d.type){let a=d.childForFieldName("name");a?.type==="dotted_name"&&b.push(a.text)}}}return;case"import_from_statement":{let a=function(a){let b=a.childForFieldName("module_name");if(!b)return"";if("dotted_name"===b.type)return b.text;if("relative_import"===b.type){let a="",c="";for(let d=0;d<b.namedChildCount;d++){let e=b.namedChild(d);e&&("import_prefix"===e.type?a=e.text:"dotted_name"===e.type&&(c=e.text))}return a+c}return""}(c);a&&b.push(a);return}}for(let b=0;b<c.namedChildCount;b++){let d=c.namedChild(b);d&&a(d)}}(a),b}};function t(a,b){let c=s[b];return c?c(a):[]}var u=c(25344);function v(a){return"function"===a||"class"===a||"method"===a}function w(a,b){return{grammarId:a,extensions:b,extractSymbols:(a,b)=>n(a),extractImports:b=>({specs:t(b,a),bindings:[...p(b),...function(a){let b=[];for(let c=0;c<a.namedChildCount;c++){let d=a.namedChild(c);if(!d||"export_statement"!==d.type)continue;let e=d.childForFieldName("source");if(!e)continue;let f=q(e.text),g=null;for(let a=0;a<d.namedChildCount;a++){let b=d.namedChild(a);if(b?.type==="export_clause"){g=b;break}}if(g)for(let a=0;a<g.namedChildCount;a++){let c=g.namedChild(a);if(!c||"export_specifier"!==c.type)continue;let d=c.childForFieldName("name"),e=c.childForFieldName("alias");if(!d)continue;let h=d.text,i=e?.text??h;b.push({localName:i,specifier:f,importedName:h,isReexport:!0})}}return b}(b)]}),extractCallSites:(a,b)=>o(a),async buildProjectContext(a,b){let c=new Set(b),d=await (0,u.ZT)(a),e=await (0,u.zC)(a,c),f=[...e.keys()].sort((a,b)=>b.length-a.length);return{cwd:a,tsconfigs:d,workspaces:e,sortedWsNames:f,owningScopesCache:new Map}},resolveSpecifier(a,b,c,d){let e=c.owningScopesCache.get(b);if(e||(e=c.tsconfigs.filter(a=>(0,u._0)(b,a.scope)),c.owningScopesCache.set(b,e)),a.startsWith("./")||a.startsWith("../"))return(0,u.KP)(f().resolve(c.cwd,f().dirname(b),a),c.cwd,d);if(a.startsWith("/"))return(0,u.KP)(f().resolve(c.cwd,a.slice(1)),c.cwd,d);for(let b of e){let e=b.sortedAliases.find(([b])=>a===b||a.startsWith(b+"/"));if(!e)continue;let[g,h]=e,i=a===g?"":a.slice(g.length+1),j=(0,u.KP)(f().resolve(c.cwd,h,i),c.cwd,d);if(j)return j}for(let b of c.sortedWsNames){if(a!==b&&!a.startsWith(b+"/"))continue;let e=c.workspaces.get(b);if(a===b)return e.entryFile;let g=a.slice(b.length+1);return(0,u.IS)(f().posix.join(e.dir,g),d)??(0,u.IS)(f().posix.join(e.dir,"src",g),d)}return null},resolveCall(a,b,c,d,e){if(a.receiverName){let b=c.bindingsByLocalName.get(a.receiverName);if(!b)return[];let e=c.resolvedImports.get(b.specifier);if(!e)return[];let f=d.get(e);if(!f)return[];let g=function a(b,c,d,e,f,g){if(e>5||f.has(b.path))return null;if(f.add(b.path),"*"!==c){let a=`${c}>${d}`,e=b.symbolsByQname.get(a);if(e&&v(e.kind))return e}if("*"===c){let a=b.symbolsByName.get(d);if(a){let b=null;for(let c of a)!c.qualifiedName.includes(">")&&v(c.kind)&&(!b||c.endLine-c.startLine>b.endLine-b.startLine)&&(b=c);if(b)return b}}let h=b.reexportsByLocalName.get(c);if(h){let c=b.resolvedImports.get(h.specifier);if(c){let b=g.get(c);if(b){let c=a(b,h.importedName,d,e+1,f,g);if(c)return c}}}return null}(f,b.importedName,a.calleeName,0,new Set,d);return g?[{kind:"symbol",addr:{filePath:g.filePath,qualifiedName:g.qualifiedName}}]:[{kind:"method-unresolved",receiverName:a.receiverName,methodName:a.calleeName}]}let f=c.symbolsByName.get(a.calleeName);if(f&&f.length>0){let a=[];for(let c of f)c.qualifiedName!==b.qualifiedName&&v(c.kind)&&a.push({kind:"symbol",addr:{filePath:c.filePath,qualifiedName:c.qualifiedName}});return a}let g=c.bindingsByLocalName.get(a.calleeName);if(!g)return[];let h=c.resolvedImports.get(g.specifier);if(!h)return[{kind:"external",name:g.importedName,packageSpec:g.specifier}];let i=d.get(h);if(!i)return[];let j=function a(b,c,d,e,f){if(d>5||e.has(b.path))return null;e.add(b.path);let g=b.symbolsByName.get(c);if(g){let a=null;for(let b of g)v(b.kind)&&(!a||b.endLine-b.startLine>a.endLine-a.startLine)&&(a=b);if(a)return a}let h=b.reexportsByLocalName.get(c);if(h){let c=b.resolvedImports.get(h.specifier);if(c){let b=f.get(c);if(b){let c=a(b,h.importedName,d+1,e,f);if(c)return c}}}return null}(i,g.importedName,0,new Set,d);return j?[{kind:"symbol",addr:{filePath:j.filePath,qualifiedName:j.qualifiedName}}]:[]},moduleForFile:(a,b)=>a}}let x=w("typescript",[".ts"]),y=w("tsx",[".tsx",".jsx"]),z=w("javascript",[".js",".mjs",".cjs"]);function A(a){return"function"===a||"class"===a||"method"===a}function B(a,b,c){let d=b.replace(/\./g,"/"),e=(...a)=>a.filter(a=>""!==a&&"."!==a).join("/");if(!d){let b=e(a,"__init__.py");return c.has(b)?b:null}let f=e(a,d+".py");if(c.has(f))return f;let g=e(a,d,"__init__.py");return c.has(g)?g:null}var C=c(73024);function D(a,b,c,d,e=[],f){return{qualifiedName:d?`${d}>${b}`:b,name:b,kind:c,startLine:a.startPosition.row+1,endLine:a.endPosition.row+1,contentHash:g(h(a.text)),children:e,params:f}}function E(a){let b=a.childForFieldName("parameters");if(!b)return;let c=[];for(let a=0;a<b.namedChildCount;a++){let d=b.namedChild(a);if(d){if("parameter_declaration"===d.type){let a=d.childForFieldName("name");if(!a){c.push("_");continue}if("identifier"===a.type)c.push(a.text);else if("identifier_list"===a.type)for(let b=0;b<a.namedChildCount;b++){let d=a.namedChild(b);d?.type==="identifier"&&c.push(d.text)}else c.push(a.text)}else if("variadic_parameter_declaration"===d.type){let a=d.childForFieldName("name");a?.type==="identifier"?c.push(`...${a.text}`):c.push("...")}}}return c}async function F(a){try{let b=await C.promises.readFile(f().join(a,"go.mod"),"utf8"),c=/^\s*module\s+(\S+)/m.exec(b);return c?c[1].trim():null}catch{return null}}function G(a){return"function"===a||"class"===a||"method"===a}function H(a,b,c,d,e=[],f){return{qualifiedName:d?`${d}>${b}`:b,name:b,kind:c,startLine:a.startPosition.row+1,endLine:a.endPosition.row+1,contentHash:g(h(a.text)),children:e,params:f}}function I(a){let b=a.childForFieldName("parameters");if(!b)return;let c=[];for(let a=0;a<b.namedChildCount;a++){let d=b.namedChild(a);if(d)if("self_parameter"===d.type)c.push(d.text);else if("parameter"===d.type){let a=d.childForFieldName("pattern");a?c.push(a.text):c.push("_")}else"variadic_parameter"===d.type&&c.push("...")}return c}async function J(a,b){let c=new Map,d=new Map,e=new Set;async function g(h,i){let j;if(e.has(i))return;e.add(i),c.set(h,i),d.set(i,h);try{j=await C.promises.readFile(f().join(a,i),"utf8")}catch{return}let k=function(a){let b,c=a.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/.*$/gm,"").replace(/"(?:\\.|[^"\\\n])*"/g,'""'),d=[],e=/\b(?:pub(?:\s*\([^)]*\))?\s+)?mod\s+(\w+)\s*;/g;for(;null!==(b=e.exec(c));)d.push(b[1]);return d}(j);if(0===k.length)return;let l=f().dirname(i),m=f().basename(i,".rs"),n="mod"===m||"lib"===m||"main"===m?[l]:[l,f().join(l,m)];for(let a of k){let c=`${h}::${a}`,d=null;for(let c of n){for(let e of[f().join(c,`${a}.rs`),f().join(c,a,"mod.rs")]){let a=e.startsWith("./")?e.slice(2):e;if(b.has(a)){d=a;break}}if(d)break}d&&await g(c,d)}}for(let a of function(a){let b=[];for(let c of a)("src/lib.rs"===c||"src/main.rs"===c||c.endsWith("/src/lib.rs")||c.endsWith("/src/main.rs")||/^src\/bin\/[^/]+\.rs$/.test(c)||/\/src\/bin\/[^/]+\.rs$/.test(c))&&b.push(c);return b}(b))if("src/lib.rs"===a||"src/main.rs"===a)await g("crate",a);else if(a.startsWith("src/bin/"))await g("crate",a);else{let b=a.split("/"),c=b.indexOf("src");if(c>0){let d=b[c-1];await g(d,a)}}return{modTree:c,fileToMod:d}}function K(a){return"function"===a||"class"===a||"method"===a}(0,d.ik)(x),(0,d.ik)(y),(0,d.ik)(z),(0,d.ik)({grammarId:"python",extensions:[".py",".pyi"],extractSymbols:(a,b)=>n(a),extractImports:a=>({specs:t(a,"python"),bindings:p(a)}),extractCallSites:(a,b)=>o(a),buildProjectContext(a,b){let c=[a],d=!1;if(b.has("src/__init__.py"))d=!0;else for(let a of b)if(a.startsWith("src/")&&a.endsWith(".py")){d=!0;break}return d&&c.push(f().join(a,"src")),{cwd:a,pythonRoots:c}},resolveSpecifier(a,b,c,d){let e=/^(\.+)/.exec(a);if(e){let c=e[1].length,g=a.slice(c),h=f().dirname(b);for(let a=1;a<c;a++)h=f().dirname(h);return B(h||".",g,d)}for(let b of c.pythonRoots){let e=B(f().relative(c.cwd,b)||".",a,d);if(e)return e}return null},resolveCall(a,b,c,d,e){if(a.receiverName){let b=c.bindingsByLocalName.get(a.receiverName);if(!b)return[];let e=c.resolvedImports.get(b.specifier);if(!e)return[];let f=d.get(e);if(!f)return[];let g=function(a,b,c){if("*"!==b){let d=`${b}>${c}`,e=a.symbolsByQname.get(d);if(e&&A(e.kind))return e}if("*"===b){let b=a.symbolsByName.get(c);if(b){let a=null;for(let c of b)!c.qualifiedName.includes(">")&&A(c.kind)&&(!a||c.endLine-c.startLine>a.endLine-a.startLine)&&(a=c);if(a)return a}}return null}(f,b.importedName,a.calleeName);return g?[{kind:"symbol",addr:{filePath:g.filePath,qualifiedName:g.qualifiedName}}]:[{kind:"method-unresolved",receiverName:a.receiverName,methodName:a.calleeName}]}let f=c.symbolsByName.get(a.calleeName);if(f&&f.length>0){let a=[];for(let c of f)c.qualifiedName!==b.qualifiedName&&A(c.kind)&&a.push({kind:"symbol",addr:{filePath:c.filePath,qualifiedName:c.qualifiedName}});return a}let g=c.bindingsByLocalName.get(a.calleeName);if(!g)return[];let h=c.resolvedImports.get(g.specifier);if(!h)return[{kind:"external",name:g.importedName,packageSpec:g.specifier}];let i=d.get(h);if(!i)return[];let j=function(a,b){let c=a.symbolsByName.get(b);if(!c)return null;let d=null;for(let a of c)A(a.kind)&&(!d||a.endLine-a.startLine>d.endLine-d.startLine)&&(d=a);return d}(i,g.importedName);return j?[{kind:"symbol",addr:{filePath:j.filePath,qualifiedName:j.qualifiedName}}]:[]},moduleForFile:(a,b)=>a}),(0,d.ik)({grammarId:"go",extensions:[".go"],extractSymbols(a,b){let c=[],d=function(a){let b=[],c=-1,d=-1;for(let e=0;e<a.namedChildCount;e++){let f=a.namedChild(e);if(f){if("import_declaration"===f.type)b.push(f),c<0&&(c=f.startPosition.row+1),d=f.endPosition.row+1;else if("package_clause"===f.type)continue;else if(c>=0)break}}return c<0?null:{qualifiedName:"__imports__",name:"imports",kind:"unknown",startLine:c,endLine:d,contentHash:g(h(b.map(a=>a.text).join("\n"))),children:[]}}(a);d&&c.push(d);let{symbols:e,pendingMethods:f}=function(a){let b=[],c=[];for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(e)switch(e.type){case"function_declaration":{let a=e.childForFieldName("name");if(!a)break;b.push(D(e,a.text,"function",void 0,[],E(e)));break}case"method_declaration":{let a=e.childForFieldName("name");if(!a)break;let d=function(a){let b=a.childForFieldName("receiver");if(!b)return null;for(let a=0;a<b.namedChildCount;a++){let c=b.namedChild(a);if(c?.type!=="parameter_declaration")continue;let d=c.childForFieldName("type");if(!d)break;return function a(b){if("type_identifier"===b.type)return b.text;if("pointer_type"===b.type){for(let c=0;c<b.namedChildCount;c++){let d=b.namedChild(c);if(d){let b=a(d);if(b)return b}}return null}if("generic_type"===b.type){let c=b.childForFieldName("type");if(c)return a(c)}return null}(d)}return null}(e),f=D(e,a.text,"method",d??void 0,[],E(e));d?c.push({receiverType:d,symbol:f}):b.push(f);break}case"type_declaration":b.push(...function(a,b){let c=[];for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(e&&("type_spec"===e.type||"type_alias"===e.type)){let a=e.childForFieldName("name"),d=e.childForFieldName("type");if(!a)continue;let f=a.text,g=d?.type==="interface_type"?"interface":"class";c.push(D(e,f,g,b))}}return c}(e,void 0));break;case"var_declaration":case"const_declaration":b.push(...function(a,b){let c=[];for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(e&&("var_spec"===e.type||"const_spec"===e.type)){let a=e.childForFieldName("name");if(!a)continue;if("identifier_list"===a.type)for(let d=0;d<a.namedChildCount;d++){let f=a.namedChild(d);f?.type==="identifier"&&c.push(D(e,f.text,"const",b))}else"identifier"===a.type&&c.push(D(e,a.text,"const",b))}}return c}(e,void 0))}}return{symbols:b,pendingMethods:c}}(a);return c.push(...function(a,b){if(0===b.length)return a;let c=new Map;for(let b of a)("class"===b.kind||"interface"===b.kind)&&c.set(b.name,b);let d=[];for(let a of b){let b=c.get(a.receiverType);b?b.children=[...b.children,a.symbol]:d.push(a.symbol)}return[...a,...d]}(e,f)),c.push(...m(a,c)),c},extractImports:a=>(function(a){let b=[],c=[];function d(a){var d;let e,f=a.childForFieldName("path");if(!f)return;let g=(d=f.text).length>=2&&('"'===d[0]||"'"===d[0]||"`"===d[0])&&d[d.length-1]===d[0]?d.slice(1,-1):d;if(!g)return;b.push(g);let h=a.childForFieldName("name");if(h)e=h.text;else{let a=g.split("/");e=a[a.length-1]||g}c.push({specifier:g,importedName:"*",localName:e})}return!function a(b){if("import_declaration"===b.type){for(let a=0;a<b.namedChildCount;a++){let c=b.namedChild(a);if(c){if("import_spec"===c.type)d(c);else if("import_spec_list"===c.type)for(let a=0;a<c.namedChildCount;a++){let b=c.namedChild(a);b?.type==="import_spec"&&d(b)}}}return}for(let c=0;c<b.namedChildCount;c++){let d=b.namedChild(c);d&&a(d)}}(a),{specs:b,bindings:c}})(a),extractCallSites:(a,b)=>{let c;return c=[],!function a(b){if("call_expression"===b.type){let a=b.childForFieldName("function"),d=function a(b){if(!b)return null;if("identifier"===b.type)return b.text;if("selector_expression"===b.type){let a=b.childForFieldName("field");return a?.text??null}return"call_expression"===b.type?a(b.childForFieldName("function")):null}(a);if(d){let e=function(a){if(!a||"selector_expression"!==a.type)return;let b=a;for(;b;){if("identifier"===b.type)return b.text;if("selector_expression"===b.type){b=b.childForFieldName("operand");continue}break}}(a);c.push({calleeName:d,line:b.startPosition.row+1,...e?{receiverName:e}:{}})}}for(let c=0;c<b.childCount;c++){let d=b.child(c);d&&a(d)}}(a),c},async buildProjectContext(a,b){let c=await F(a);return{cwd:a,modulePath:c,dirToGoFiles:function(a){let b=new Map;for(let c of a){if(!c.endsWith(".go"))continue;let a=f().dirname(c),d=b.get(a);d?d.push(c):b.set(a,[c])}return b}(b)}},resolveSpecifier(a,b,c,d){if(!c.modulePath)return null;if(a===c.modulePath){let a=c.dirToGoFiles.get(".");return a?.[0]??null}if(a.startsWith(c.modulePath+"/")){let b=a.slice(c.modulePath.length+1),d=c.dirToGoFiles.get(b);return d?.[0]??null}return null},resolveCall(a,b,c,d,e){let g=f().dirname(c.path),h=e.dirToGoFiles.get(g)??[c.path];if(a.receiverName){let b=c.bindingsByLocalName.get(a.receiverName);if(b){let g=c.resolvedImports.get(b.specifier);if(!g)return[{kind:"external",name:a.calleeName,packageSpec:b.specifier}];let h=f().dirname(g);for(let b of e.dirToGoFiles.get(h)??[]){let c,e=d.get(b);if(!e)continue;let f=e.symbolsByName.get(a.calleeName);if(f){for(let a of f)if(!a.qualifiedName.includes(">")&&G(a.kind)){c=a;break}if(c)return[{kind:"symbol",addr:{filePath:c.filePath,qualifiedName:c.qualifiedName}}]}}return[{kind:"external",name:a.calleeName,packageSpec:b.specifier}]}let g=`${a.receiverName}>${a.calleeName}`;for(let a of h){let b=d.get(a);if(!b)continue;let c=b.symbolsByQname.get(g);if(c&&G(c.kind))return[{kind:"symbol",addr:{filePath:c.filePath,qualifiedName:c.qualifiedName}}]}return[{kind:"method-unresolved",receiverName:a.receiverName,methodName:a.calleeName}]}let i=[];for(let c of h){let e=d.get(c);if(!e)continue;let f=e.symbolsByName.get(a.calleeName);if(f)for(let a of f)!(a.qualifiedName===b.qualifiedName||a.qualifiedName.includes(">"))&&G(a.kind)&&i.push({kind:"symbol",addr:{filePath:a.filePath,qualifiedName:a.qualifiedName}})}return i},moduleForFile(a,b){let c=f().dirname(a);return b?.modulePath?"."===c?b.modulePath:`${b.modulePath}/${c}`:c}}),(0,d.ik)({grammarId:"rust",extensions:[".rs"],extractSymbols(a,b){let c=[],d=function(a){let b=[],c=-1,d=-1;for(let e=0;e<a.namedChildCount;e++){let f=a.namedChild(e);if(f){if("use_declaration"===f.type||"extern_crate_declaration"===f.type)b.push(f),c<0&&(c=f.startPosition.row+1),d=f.endPosition.row+1;else if(c>=0)break}}return c<0?null:{qualifiedName:"__imports__",name:"imports",kind:"unknown",startLine:c,endLine:d,contentHash:g(h(b.map(a=>a.text).join("\n"))),children:[]}}(a);d&&c.push(d);let{symbols:e,pendingImpls:f}=function(a){let b=[],c=[];for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(e)switch(e.type){case"function_item":{let a=e.childForFieldName("name");if(!a)break;b.push(H(e,a.text,"function",void 0,[],I(e)));break}case"struct_item":case"union_item":{let a=e.childForFieldName("name");if(!a)break;b.push(H(e,a.text,"class",void 0));break}case"enum_item":{let a=e.childForFieldName("name");if(!a)break;b.push(H(e,a.text,"enum",void 0));break}case"trait_item":{let a=e.childForFieldName("name");if(!a)break;let c=function(a,b){let c=a.childForFieldName("body");if(!c)return[];let d=[];for(let a=0;a<c.namedChildCount;a++){let e=c.namedChild(a);if(e&&("function_item"===e.type||"function_signature_item"===e.type)){let a=e.childForFieldName("name");if(!a)continue;d.push(H(e,a.text,"method",b,[],I(e)))}}return d}(e,a.text);b.push(H(e,a.text,"interface",void 0,c));break}case"impl_item":{let a=function(a){let b=a.childForFieldName("type");return b?function a(b){if("type_identifier"===b.type)return b.text;if("generic_type"===b.type){let c=b.childForFieldName("type");if(c)return a(c)}if("reference_type"===b.type)for(let c=0;c<b.namedChildCount;c++){let d=b.namedChild(c);if(d){let b=a(d);if(b)return b}}if("scoped_type_identifier"===b.type){let a=b.childForFieldName("name");if(a?.type==="type_identifier")return a.text}return null}(b):null}(e);if(!a)break;let b=function(a,b){let c=a.childForFieldName("body");if(!c)return[];let d=[];for(let a=0;a<c.namedChildCount;a++){let e=c.namedChild(a);if(e){if("function_item"===e.type){let a=e.childForFieldName("name");if(!a)continue;d.push(H(e,a.text,"method",b,[],I(e)))}else if("function_signature_item"===e.type){let a=e.childForFieldName("name");if(!a)continue;d.push(H(e,a.text,"method",b,[],I(e)))}}}return d}(e,a);b.length>0&&c.push({targetType:a,methods:b});break}case"const_item":case"static_item":{let a=e.childForFieldName("name");if(!a)break;b.push(H(e,a.text,"const",void 0));break}case"type_item":{let a=e.childForFieldName("name");if(!a)break;b.push(H(e,a.text,"type",void 0));break}case"mod_item":{let a=e.childForFieldName("name"),c=e.childForFieldName("body");if(!a||!c)break;b.push(H(e,a.text,"class",void 0))}}}return{symbols:b,pendingImpls:c}}(a);return c.push(...function(a,b){if(0===b.length)return a;let c=new Map;for(let b of a)("class"===b.kind||"enum"===b.kind||"interface"===b.kind)&&c.set(b.name,b);let d=[];for(let a of b){let b=c.get(a.targetType);b?b.children=[...b.children,...a.methods]:d.push(...a.methods)}return[...a,...d]}(e,f)),c.push(...m(a,c)),c},extractImports:a=>(function(a){let b=[],c=[];function d(a){if("identifier"===a.type||"crate"===a.type||"self"===a.type||"super"===a.type)return a.text;if("scoped_identifier"===a.type){let b=a.childForFieldName("path"),c=a.childForFieldName("name"),e=b?d(b):"",f=c?.text??"";return e?`${e}::${f}`:f}return a.text}function e(a,b){return a?b?`${a}::${b}`:a:b}function f(a){let b=a.split("::");return b[b.length-1]??a}return!function a(g){if("use_declaration"===g.type)return void function(a){for(let g=0;g<a.namedChildCount;g++){let h=a.namedChild(g);h&&function a(g,h){switch(g.type){case"use_as_clause":{let a=g.childForFieldName("path"),i=g.childForFieldName("alias");if(a&&i){let g=e(h,d(a));b.push(g),c.push({specifier:g,importedName:f(g),localName:i.text})}break}case"use_list":for(let b=0;b<g.namedChildCount;b++){let c=g.namedChild(b);c&&a(c,h)}break;case"scoped_use_list":{let b=g.childForFieldName("path"),c=g.childForFieldName("list"),f=b?e(h,d(b)):h;if(c)for(let b=0;b<c.namedChildCount;b++){let d=c.namedChild(b);d&&a(d,f)}break}case"use_wildcard":{let a=g.childForFieldName("path"),f=a?e(h,d(a)):h;f&&(b.push(f),c.push({specifier:f,importedName:"*",localName:"*"}));break}case"identifier":case"self":case"super":case"crate":case"scoped_identifier":{let a=e(h,d(g));a&&(b.push(a),c.push({specifier:a,importedName:f(a),localName:f(a)}))}}}(h,"")}}(g);if("extern_crate_declaration"===g.type){let a=g.childForFieldName("name");a&&(b.push(a.text),c.push({specifier:a.text,importedName:"*",localName:a.text}));return}if("mod_item"===g.type){let a=g.childForFieldName("body"),c=g.childForFieldName("name");!a&&c&&b.push(c.text);return}for(let b=0;b<g.namedChildCount;b++){let c=g.namedChild(b);c&&a(c)}}(a),{specs:b,bindings:c}})(a),extractCallSites:(a,b)=>{let c;return c=[],!function a(b){if("call_expression"===b.type){let a=b.childForFieldName("function"),d=function(a){if(!a)return null;if("identifier"===a.type)return a.text;if("scoped_identifier"===a.type){let b=a.childForFieldName("name");return b?.text??null}if("field_expression"===a.type){let b=a.childForFieldName("field");return b?.text??null}return null}(a);if(d){let e=function(a){if(a){if("scoped_identifier"===a.type){let b=a;for(;b;){if("identifier"===b.type)return b.text;if("scoped_identifier"===b.type){b=b.childForFieldName("path");continue}break}}if("field_expression"===a.type){let b=a.childForFieldName("value");if(b?.type==="identifier")return b.text}}}(a);c.push({calleeName:d,line:b.startPosition.row+1,...e?{receiverName:e}:{}})}}else if("method_call_expression"===b.type){let a=b.childForFieldName("method"),d=b.childForFieldName("value");if(a){let e=d?.type==="identifier"?d.text:void 0;c.push({calleeName:a.text,line:b.startPosition.row+1,...e?{receiverName:e}:{}})}}for(let c=0;c<b.childCount;c++){let d=b.child(c);d&&a(d)}}(a),c},async buildProjectContext(a,b){let{modTree:c,fileToMod:d}=await J(a,b);return{cwd:a,modTree:c,fileToMod:d}},resolveSpecifier(a,b,c,d){let e=c.fileToMod.get(b);if(!e)return null;let f=function(a,b){if(a.startsWith("crate::"))return a;if("crate"===a)return"crate";if(a.startsWith("self::"))return`${b}::${a.slice(6)}`;if("self"===a)return b;if(a.startsWith("super::")){let c=b,d=a;for(;d.startsWith("super::");){let a=c.lastIndexOf("::");if(a<0)return null;c=c.slice(0,a),d=d.slice(7)}if("super"===d){let a=c.lastIndexOf("::");return a<0?null:c.slice(0,a)}return d?`${c}::${d}`:c}return null}(a,e);if(!f)return null;if(c.modTree.has(f))return c.modTree.get(f);let g=f.split("::");for(;g.length>1;){g.pop();let a=g.join("::"),b=c.modTree.get(a);if(b)return b}return null},resolveCall(a,b,c,d,e){let f;if(a.receiverName){let b=c.bindingsByLocalName.get(a.receiverName);if(b){let e=c.resolvedImports.get(b.specifier);if(!e)return[{kind:"external",name:a.calleeName,packageSpec:b.specifier}];let f=d.get(e);if(!f)return[];let g=f.symbolsByName.get(a.calleeName);if(g){for(let a of g)if(!a.qualifiedName.includes(">")&&K(a.kind))return[{kind:"symbol",addr:{filePath:a.filePath,qualifiedName:a.qualifiedName}}]}let h=`${b.importedName}>${a.calleeName}`,i=f.symbolsByQname.get(h);return i&&K(i.kind)?[{kind:"symbol",addr:{filePath:i.filePath,qualifiedName:i.qualifiedName}}]:[{kind:"method-unresolved",receiverName:a.receiverName,methodName:a.calleeName}]}let e=`${a.receiverName}>${a.calleeName}`,f=c.symbolsByQname.get(e);if(f)return[{kind:"symbol",addr:{filePath:f.filePath,qualifiedName:f.qualifiedName}}];let g=[],h=c.symbolsByName.get(a.calleeName);if(h)for(let a of h)"method"===a.kind&&g.push({kind:"symbol",addr:{filePath:a.filePath,qualifiedName:a.qualifiedName}});return g.length>0?g:[{kind:"method-unresolved",receiverName:a.receiverName,methodName:a.calleeName}]}let g=[],h=c.symbolsByName.get(a.calleeName);if(h)for(let a of h)!(a.qualifiedName===b.qualifiedName||a.qualifiedName.includes(">"))&&K(a.kind)&&g.push({kind:"symbol",addr:{filePath:a.filePath,qualifiedName:a.qualifiedName}});if(g.length>0)return g;let i=c.bindingsByLocalName.get(a.calleeName);if(!i)return[];let j=c.resolvedImports.get(i.specifier);if(!j)return[{kind:"external",name:i.importedName,packageSpec:i.specifier}];let k=d.get(j);if(!k)return[];let l=k.symbolsByName.get(i.importedName);if(l){for(let a of l)if(!a.qualifiedName.includes(">")&&K(a.kind)){f=a;break}}return f?[{kind:"symbol",addr:{filePath:f.filePath,qualifiedName:f.qualifiedName}}]:[]},moduleForFile:(a,b)=>b?.fileToMod.get(a)??f().dirname(a)})},64949:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{g:()=>h});var e=c(33265),f=c(88395),g=a([e]);e=(g.then?(await g)():g)[0];let i=!1;function h(){i||(i=!0,(0,e.ih)((a,b)=>{f.t.subscribe(a,a=>{a.some(a=>"file"===a.type||"git"===a.type)&&b()})}))}d()}catch(a){d(a)}})},72891:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{OZ:()=>o,RL:()=>n,k9:()=>p,ok:()=>l});var e=c(37625),f=c(52693),g=c(18412),h=c(89705),i=c(94506),j=c(770),k=a([i]);i=(k.then?(await k)():k)[0];let l=(a,b=200)=>new Response(JSON.stringify(a),{status:b,headers:{"content-type":"application/json"}}),m=a=>{let b=e.od(a);if(f.Ru(b)){let a=b.value,c=(0,j.Sh)(a);return new Response(JSON.stringify({error:(a=>{let b=a.message;if("string"==typeof b&&b.length>0)return b;let c=a.cause;if(c instanceof Error&&c.message.length>0)return c.message;switch(a._tag){case"ValidationError":return`Invalid ${a.field}: ${a.reason}`;case"NotFoundError":return`${a.resource} not found: ${a.id}`;case"PermissionError":return`Permission denied: ${a.action} on ${a.resource}`;case"DBError":return`${a.db} ${a.op} failed`;case"FSError":return`${a.op} ${a.path} failed`;case"WSError":return`${a.proto} ${a.kind} failed`;case"AgentError":return`${a.provider} ${a.kind} failed`;default:return a._tag}})(a),tag:a._tag}),{status:c,headers:{"content-type":"application/json"}})}return console.error("[handler] uncaught defect:\n"+e.j9(a)),new Response(JSON.stringify({error:"Internal Server Error",tag:"InternalError"}),{status:500,headers:{"content-type":"application/json"}})},n=a=>async b=>{let c=await i.s9.runPromiseExit(a(b));return g.YW(c,{onFailure:a=>m(a),onSuccess:a=>a})},o=a=>async(b,c)=>{let d=await c.params,e=await i.s9.runPromiseExit(a(b,d));return g.YW(e,{onFailure:a=>m(a),onSuccess:a=>a})},p=a=>h.$mh({try:()=>a.json(),catch:()=>new j.yI({field:"body",reason:"invalid JSON"})});d()}catch(a){d(a)}})},86236:(a,b,c)=>{c.d(b,{I:()=>d});let d=new Set(["typescript","tsx","javascript","python","go","rust"])},87956:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{M:()=>j,b:()=>i});var e=c(12629),f=c(76760),g=c.n(f),h=a([e]);e=(h.then?(await h)():h)[0];let k=g().join(process.cwd(),"public","tree-sitter"),l=null,m=new Map,n=new Map;async function i(a){let b,c=n.get(a);if(c)return c;let d=await (!(b=m.get(a))&&(b=(async()=>(await (!l&&(l=e.Parser.init({locateFile:a=>g().join(k,a)})),l),e.Language.load(g().join(k,`tree-sitter-${a}.wasm`))))(),m.set(a,b)),b);return(c=new e.Parser).setLanguage(d),n.set(a,c),c}function j(a){switch(a.slice(a.lastIndexOf(".")).toLowerCase()){case".ts":return"typescript";case".tsx":case".jsx":return"tsx";case".js":case".mjs":case".cjs":return"javascript";case".py":case".pyi":return"python";case".go":return"go";case".rs":return"rust";default:return null}}d()}catch(a){d(a)}})},88395:(a,b,c)=>{c.d(b,{t:()=>l});var d=c(29021),e=c(33873),f=c(7939);let g=[".git/HEAD",".git/MERGE_HEAD",".git/REBASE_HEAD"],h=[".git/refs"];class i{subscribe(a,b){let c=this.watchers.get(a);return c||(c=this.createWatcher(a),this.watchers.set(a,c)),c.listeners.add(b),()=>{this.unsubscribe(a,b)}}unsubscribe(a,b){let c=this.watchers.get(a);if(c&&(c.listeners.delete(b),0===c.listeners.size)){for(let a of(c.debounceTimer&&clearTimeout(c.debounceTimer),c.throttleTimer&&clearTimeout(c.throttleTimer),c.cwdRestartTimer&&clearTimeout(c.cwdRestartTimer),c.watchers))try{a.close()}catch{}this.watchers.delete(a)}}createWatcher(a){let b={watchers:[],listeners:new Set,pendingEvents:[],debounceTimer:null,throttleTimer:null,cwdRestartTimer:null},c=a=>{b.pendingEvents.some(b=>b.type===a.type)||b.pendingEvents.push(a),b.debounceTimer&&clearTimeout(b.debounceTimer),b.debounceTimer=setTimeout(()=>{this.flush(b)},500),b.throttleTimer||(b.throttleTimer=setTimeout(()=>{this.flush(b)},3e3))},f=()=>{try{let e=(0,d.watch)(a,{recursive:!0},(a,b)=>{if(b&&!(b.startsWith(".next/")||b.startsWith("node_modules/"))){if(b.startsWith(".git/")){(".git/HEAD"===b||b.startsWith(".git/refs/"))&&c({type:"git"});return}c({type:"file"})}});e.on("error",c=>{console.error(`File watcher error for ${a}:`,c);let d=b.watchers.indexOf(e);-1!==d&&b.watchers.splice(d,1);try{e.close()}catch{}b.listeners.size>0&&!b.cwdRestartTimer&&(b.cwdRestartTimer=setTimeout(()=>{b.cwdRestartTimer=null,b.listeners.size>0&&f()},2e3))}),b.watchers.push(e)}catch(b){console.error(`Failed to watch ${a}:`,b)}};f();let i=function(a){let b=(0,e.join)(a,".git");try{if((0,d.statSync)(b).isDirectory())return b;let c=(0,d.readFileSync)(b,"utf-8").trim().match(/^gitdir:\s*(.+)$/);if(c)return(0,e.resolve)(a,c[1])}catch{}return b}(a),j=a=>{try{let e=(0,d.watch)(a,()=>{c({type:"git"});try{e.close()}catch{}let d=b.watchers.indexOf(e);-1!==d&&b.watchers.splice(d,1),b.listeners.size>0&&setTimeout(()=>j(a),50)});e.on("error",()=>{let c=b.watchers.indexOf(e);-1!==c&&b.watchers.splice(c,1),b.listeners.size>0&&(0,d.existsSync)(a)&&setTimeout(()=>j(a),500)}),b.watchers.push(e)}catch{}};for(let a of g){let b=a.replace(".git/","");j((0,e.join)(i,b))}for(let a of h){let f=a.replace(".git/","");try{let a=(0,d.watch)((0,e.join)(i,f),{recursive:!0},()=>{c({type:"git"})});a.on("error",()=>{}),b.watchers.push(a)}catch{}}return b}flush(a){if(a.debounceTimer&&(clearTimeout(a.debounceTimer),a.debounceTimer=null),a.throttleTimer&&(clearTimeout(a.throttleTimer),a.throttleTimer=null),0===a.pendingEvents.length)return;let b=[...a.pendingEvents];for(let c of(a.pendingEvents=[],a.listeners))try{c(b)}catch(a){console.error("File watcher callback error:",a)}}constructor(){this.watchers=new Map}}class j{subscribe(a){return this.listeners.add(a),this.watcher||this.start(),()=>{this.listeners.delete(a),0===this.listeners.size&&this.stop()}}start(){try{(0,d.existsSync)(f.Tb)||(0,d.mkdirSync)(f.Tb,{recursive:!0}),(0,d.existsSync)(f.jp)||(0,d.writeFileSync)(f.jp,"0"),this.watcher=(0,d.watch)(f.jp,()=>{this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.notify(),300)}),this.watcher.on("error",()=>{this.stop(),setTimeout(()=>{this.listeners.size>0&&this.start()},2e3)})}catch{}}stop(){if(this.watcher){try{this.watcher.close()}catch{}this.watcher=null}this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}notify(){for(let a of this.listeners)try{a()}catch(a){console.error("ReviewWatcher callback error:",a)}}constructor(){this.listeners=new Set,this.watcher=null,this.debounceTimer=null}}let k=globalThis,l=k.__cockpitFileWatcher??(k.__cockpitFileWatcher=new i);k.__cockpitReviewWatcher??(k.__cockpitReviewWatcher=new j)}};
1
+ "use strict";exports.id=2939,exports.ids=[2939],exports.modules={4253:(a,b,c)=>{c.d(b,{L8:()=>p,No:()=>h,Pe:()=>o,VA:()=>q,hC:()=>m,hH:()=>l,hn:()=>s,iF:()=>r,lU:()=>t,nw:()=>n,pZ:()=>g});var d=c(79748),e=c(33873),f=c.n(e);let g=0xa00000,h=0x3200000,i=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".ico",".bmp",".avif"]),j=new Set([".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".zip",".tar",".gz",".rar",".7z",".exe",".dll",".so",".dylib",".mp3",".mp4",".avi",".mov",".mkv",".wav",".flac",".ttf",".otf",".woff",".woff2",".eot",".db",".sqlite",".sqlite3",".pyc",".class",".o",".a"]),k={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".svg":"image/svg+xml",".ico":"image/x-icon",".bmp":"image/bmp",".avif":"image/avif"};function l(a){return k[a.toLowerCase()]||"application/octet-stream"}function m(a,b){if("string"!=typeof b||0===b.length)return null;let c=f().resolve(a),d=f().resolve(c,b);return d===c||d.startsWith(c+f().sep)?d:null}async function n(a){let b;if("string"!=typeof a||0===a.length)return{ok:!1,reason:"Missing cwd parameter"};if(!f().isAbsolute(a))return{ok:!1,reason:"cwd must be an absolute path"};let c=f().resolve(a);try{b=await (0,d.stat)(c)}catch{return{ok:!1,reason:"cwd does not exist"}}return b.isDirectory()?{ok:!0,abs:c}:{ok:!1,reason:"cwd is not a directory"}}function o(a,b){return`"${a.toString(36)}-${Math.floor(b).toString(36)}"`}function p(a,b){let c=a.startsWith(".")?a.toLowerCase():f().extname(a).toLowerCase();return i.has(c)?b>h?"too-large":"image":j.has(c)?"binary":b>g?"too-large":"text"}function q(a){let b=0,c=Math.min(a.length,1e3);for(let d=0;d<c;d++){let c=a.charCodeAt(d);if(0===c)return!0;c<32&&9!==c&&10!==c&&13!==c&&b++}return c>0&&b/c>.1}async function r(a){let b,c=!1;try{(await (0,d.lstat)(a)).isSymbolicLink()&&(c=!0,b=await (0,d.readlink)(a))}catch{}let e=await (0,d.stat)(a);return{size:e.size,mtimeMs:e.mtimeMs,isDirectory:e.isDirectory(),isSymlink:c,symlinkTarget:b}}function s(a,b){return{ETag:a,"Last-Modified":new Date(b).toUTCString(),"Cache-Control":"no-cache, must-revalidate"}}function t(a,b){return!!a&&a.split(",").map(a=>a.trim().replace(/^W\//,"")).includes(b)}},7939:(a,b,c)=>{c.d(b,{$A:()=>L,A0:()=>W,An:()=>Z,BF:()=>H,Ct:()=>P,Eu:()=>G,Ex:()=>t,GB:()=>q,JE:()=>Y,JY:()=>K,Ki:()=>B,Kk:()=>Q,Kv:()=>j,LN:()=>k,Mx:()=>C,O0:()=>A,Sr:()=>I,Tb:()=>r,Ux:()=>aa,Wd:()=>X,aO:()=>m,at:()=>x,ec:()=>n,eg:()=>U,h9:()=>w,i4:()=>F,iK:()=>o,im:()=>S,iy:()=>O,jp:()=>s,lT:()=>y,lq:()=>E,ls:()=>J,mT:()=>v,oK:()=>N,oZ:()=>R,of:()=>D,po:()=>M,tP:()=>p,th:()=>u,v4:()=>l,vI:()=>V,yw:()=>T});var d=c(21820),e=c(33873),f=c(79748),g=c(29021),h=c(79646);let i=(0,d.homedir)(),j=(0,e.join)(i,".cockpit"),k=(0,e.join)(j,"projects"),l=(0,e.join)(j,"state.json"),m=(0,e.join)(j,"pinned-sessions.json"),n=(0,e.join)(j,"note.md"),o=(0,e.join)(j,"scheduled-tasks.json"),p=(0,e.join)(j,"settings.json"),q=(0,e.join)(j,"skills.json"),r=(0,e.join)(j,"review"),s=(0,e.join)(r,"_signal");function t(){try{(0,g.existsSync)(r)||(0,g.mkdirSync)(r,{recursive:!0}),(0,g.writeFileSync)(s,Date.now().toString())}catch{}}let u=(0,e.join)(i,".claude"),v=(0,e.join)(u,"projects"),w=(0,e.join)(i,".claude2"),x=(0,e.join)(w,"projects"),y=(0,e.join)(j,"deepseek"),z=(0,e.join)(y,"projects");function A(a){return a.replace(/[/.]/g,"-")}function B(a){return(0,e.join)(k,A(a))}function C(a){return(0,e.join)(B(a),"session.json")}function D(a){return(0,e.join)(B(a),"recent-files.json")}function E(a){return(0,e.join)(B(a),"expanded-paths.json")}function F(a){return(0,e.join)(B(a),"comments.json")}function G(a){return(0,e.join)(B(a),"services.json")}function H(a){return(0,e.join)(B(a),"note.md")}function I(a,b){return(0,e.join)(B(a),`terminal-history-${b}.jsonl`)}function J(a,b){return(0,e.join)(B(a),`terminal-output-${b}.txt`)}function K(a,b){let c=b?`terminal-env-${b}.json`:"terminal-env-global.json";return(0,e.join)(B(a),c)}function L(){return(0,e.join)(j,"terminal-aliases.json")}function M(){return(0,e.join)(j,"services.json")}function N(a){return(0,e.join)(B(a),"project-settings.json")}function O(a,b){return(0,e.join)(B(a),`terminal-bubble-order-${b}.json`)}function P(a){return(0,e.join)(r,`${a}.json`)}function Q(a,b){return(0,e.join)((0,e.join)(v,A(a)),`${b}.jsonl`)}function R(a,b){return(0,e.join)((0,e.join)(x,A(a)),`${b}.jsonl`)}function S(a,b){return(0,e.join)((0,e.join)(z,A(a)),`${b}.jsonl`)}function T(a,b){return(0,e.join)((0,e.join)(j,"ollama-sessions",A(a)),`${b}.jsonl`)}function U(a){let b=(0,e.join)(i,".codex","sessions");if(!(0,g.existsSync)(b))return null;try{let c=(0,h.execSync)(`find ${JSON.stringify(b)} -name "*${a}.jsonl" -type f 2>/dev/null`,{encoding:"utf8",timeout:3e3}).trim();if(c)return c.split("\n")[0]}catch{}return null}function V(a){let b=(0,e.join)(i,".kimi","sessions");if(!(0,g.existsSync)(b))return null;try{for(let c of(0,g.readdirSync)(b)){let d=(0,e.join)(b,c,a,"context.jsonl");if((0,g.existsSync)(d))return d}}catch{}return null}async function W(a){(0,g.existsSync)(a)||await (0,f.mkdir)(a,{recursive:!0})}async function X(a){let b=(0,e.join)(a,"..");await W(b)}async function Y(a,b){try{let b=await (0,f.readFile)(a,"utf-8");return JSON.parse(b)}catch{return b}}async function Z(a,b){await X(a),await (0,f.writeFile)(a,JSON.stringify(b,null,2),"utf-8")}let $=globalThis,_=$.__cockpitFileLocks??($.__cockpitFileLocks=new Map);function aa(a,b){let c=(_.get(a)??Promise.resolve()).then(b),d=c.then(()=>{},()=>{});return _.set(a,d),d.then(()=>{_.get(a)===d&&_.delete(a)}),c}},25344:(a,b,c)=>{c.d(b,{BE:()=>l,IS:()=>v,KP:()=>r,ZT:()=>x,_0:()=>s,iU:()=>n,jH:()=>o,zC:()=>t});var d=c(31421),e=c(73024),f=c(76760),g=c.n(f),h=c(57975),i=c(28677);let j=(0,h.promisify)(d.exec),k=new Set([".git","node_modules"]),l=8e3;function m(a){let b=a.toLowerCase(),c=b.lastIndexOf(".");if(c<0)return!1;let d=b.slice(c);for(let a of(0,i.cn)())if(a.toLowerCase()===d)return!0;return!1}async function n(a){try{await j("git rev-parse --git-dir",{cwd:a})}catch{return null}let{stdout:b}=await j("git -c core.quotePath=false ls-files --cached --others --exclude-standard",{cwd:a,maxBuffer:0x3200000}),c=[];for(let a of b.split("\n")){let b=a.trim();if(b&&m(b.slice(b.lastIndexOf("/")+1))&&(c.push(b),c.length>=l))break}return c}async function o(a,b,c){let d;if(!(c.length>=l)){try{d=await e.promises.readdir(a,{withFileTypes:!0})}catch{return}for(let e of d){if(c.length>=l)return;if(k.has(e.name)||e.name.startsWith(".git"))continue;let d=g().join(a,e.name);e.isDirectory()?await o(d,b,c):e.isFile()&&m(e.name)&&c.push(g().relative(b,d))}}}let p=[".ts",".tsx",".js",".jsx",".mjs",".cjs"],q=[".js",".jsx",".mjs",".cjs"];function r(a,b,c){let d=g().relative(b,a);if(d.startsWith(".."))return null;for(let a of q)if(d.endsWith(a)){d=d.slice(0,-a.length);break}if(c.has(d))return d;for(let a of p){let b=d+a;if(c.has(b))return b}for(let a of p){let b=g().join(d,"index"+a);if(c.has(b))return b}return null}function s(a,b){return""===b||a===b||a.startsWith(b+"/")}async function t(a,b){let c=await u(a);if(0===c.length)return new Map;let d=[];try{let{stdout:b}=await j("git -c core.quotePath=false ls-files --cached --others --exclude-standard",{cwd:a,maxBuffer:0x3200000});d=b.split("\n").map(a=>a.trim()).filter(a=>a.endsWith("/package.json")&&!a.includes("node_modules/"))}catch{return new Map}let f=d.filter(a=>{let b=a.slice(0,-13);return c.some(a=>{var c;return c=b,RegExp("^"+a.replace(/\\/g,"/").replace(/[.+^${}()|[\]]/g,"\\$&").replace(/\*\*/g,"___DOUBLESTAR___").replace(/\*/g,"[^/]*").replace(/___DOUBLESTAR___/g,".*")+"$").test(c)})}),h=new Map;for(let c of f){let d;try{d=JSON.parse(await e.promises.readFile(g().join(a,c),"utf8"))}catch{continue}if("string"!=typeof d.name)continue;let f=g().dirname(c),i=function(a,b,c){let d,e=b=>{let d=b.replace(/^\.\//,"");return v(g().posix.join(a,d),c)},f=b.exports;if("string"==typeof f)d=f;else if(f&&"object"==typeof f&&f["."]){let a=f["."];"string"==typeof a?d=a:a&&"object"==typeof a&&(d=a.types??a.import??a.default??a.require)}if("string"==typeof d){let a=e(d);if(a)return a}if("string"==typeof b.main){let a=e(b.main);if(a)return a}for(let b of["src/index.ts","src/index.tsx","index.ts","index.tsx","src/index.js","index.js"])if(c.has(g().posix.join(a,b)))return g().posix.join(a,b);return null}(f,d,b);h.set(d.name,{name:d.name,dir:f,entryFile:i})}return h}async function u(a){try{var b=await e.promises.readFile(g().join(a,"pnpm-workspace.yaml"),"utf8");let c=[],d=!1;for(let a of b.split("\n")){let b=a.replace(/#.*$/,"");if(/^packages\s*:/.test(b)){d=!0;continue}if(!d)continue;let e=b.match(/^\s*-\s*['"]?([^'"#\s]+)['"]?\s*$/);e?c.push(e[1]):/^\S/.test(b)&&(d=!1)}return c}catch{}try{let b=JSON.parse(await e.promises.readFile(g().join(a,"package.json"),"utf8")),c=b?.workspaces;if(Array.isArray(c))return c.filter(a=>"string"==typeof a);if(c&&Array.isArray(c.packages))return c.packages.filter(a=>"string"==typeof a)}catch{}return[]}function v(a,b){if(a.startsWith("..")||a.startsWith("/"))return null;for(let b of q)if(a.endsWith(b)){a=a.slice(0,-b.length);break}if(b.has(a))return a;for(let c of p){let d=a+c;if(b.has(d))return d}for(let c of p){let d=g().posix.join(a,"index"+c);if(b.has(d))return d}return null}async function w(a,b){let c,d=new Map;try{let b=(await e.promises.readFile(a,"utf8")).replace(/^\s*\/\/.*$/gm,"");c=JSON.parse(b)}catch{return d}let f=c?.compilerOptions?.baseUrl??".",h=c?.compilerOptions?.paths??{},i=g().resolve(g().dirname(a),f),j=g().relative(b,i)||".";for(let[a,b]of Object.entries(h)){if(!Array.isArray(b)||0===b.length)continue;let c=a.replace(/\/\*$/,""),e=b[0].replace(/\/\*$/,"");d.set(c,g().join(j,e))}return d}async function x(a){let b=[],c=[];try{let{stdout:b}=await j("git -c core.quotePath=false ls-files --cached --others --exclude-standard",{cwd:a,maxBuffer:0x3200000});c=b.split("\n").map(a=>a.trim()).filter(a=>/(^|\/)tsconfig[^/]*\.json$/.test(a)&&!a.includes("node_modules/"))}catch{try{await e.promises.access(g().join(a,"tsconfig.json")),c=["tsconfig.json"]}catch{}}for(let d of c){let c=await w(g().join(a,d),a);if(0===c.size)continue;let e=g().dirname(d);b.push({scope:"."===e?"":e,aliases:c,sortedAliases:y(c)})}let d=b.find(a=>""===a.scope);return d||(d={scope:"",aliases:new Map,sortedAliases:[]},b.push(d)),d.aliases.has("@")||(d.aliases.set("@","./src"),d.sortedAliases=y(d.aliases)),b.sort((a,b)=>b.scope.length-a.scope.length)}function y(a){return[...a.entries()].sort(([a],[b])=>b.length-a.length)}},27485:(a,b,c)=>{c.d(b,{_:()=>e});let d=new Set(["function","class","method"]);function e(a){return d.has(a.kind)}},28677:(a,b,c)=>{c.d(b,{Bu:()=>f,cn:()=>g,ik:()=>e});let d=new Map;function e(a){d.set(a.grammarId,a)}function f(a){let b=d.get(a);if(!b)throw Error(`[codeMap] no handler registered for grammar '${a}' — did the handler module get imported (handlers/index.ts barrel)?`);return b}function g(){let a=new Set;for(let b of d.values())for(let c of b.extensions)a.add(c.toLowerCase());return[...a]}},33265:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{E:()=>G,J:()=>M,Mv:()=>L,Xn:()=>K,bQ:()=>I,cl:()=>w,ih:()=>t,s7:()=>F,u$:()=>v,xl:()=>B});var e=c(73024),f=c(76760),g=c.n(f),h=c(31421),i=c(57975),j=c(87956),k=c(86236),l=c(25344),m=c(27485),n=c(37765),o=a([j]);async function p(a,b,c){let d=Array(a.length),e=0;async function f(){for(;e<a.length;){let b=e++;d[b]=await c(a[b])}}return await Promise.all(Array.from({length:Math.min(b,a.length)},f)),d}j=(o.then?(await o)():o)[0];let N=/(['"`])([A-Za-z][A-Za-z0-9_.-]{2,63})\1/g;async function q(a,b){let c,d,f,g=(0,j.M)(b);if(!g)return null;try{[c,d]=await Promise.all([e.promises.readFile(a,"utf8"),e.promises.stat(a).then(a=>a.mtimeMs)])}catch{return null}if(c.length>1e6)return null;let h=await (0,j.b)(g);try{f=h.parse(c)}catch(a){return console.error("[codeIndex] parse failed for",b,a),null}if(!f)return null;try{let a,e=(0,n.Bu)(g),h=e.extractSymbols(f.rootNode,c),i=(a=[],!function c(d){for(let e of d)a.push({filePath:b,qualifiedName:e.qualifiedName,name:e.name,kind:e.kind,startLine:e.startLine,endLine:e.endLine,params:e.params}),c(e.children)}(h),a),{specs:j,bindings:k}=e.extractImports(f.rootNode),l=e.extractCallSites(f.rootNode,i),m=function(a,b){let c,d=[],e=new Set,f=[0];for(let b=0;b<a.length;b++)10===a.charCodeAt(b)&&f.push(b+1);for(N.lastIndex=0;null!==(c=N.exec(a))&&!(d.length>=500);){let a=c[2],g=function(a){let b=0,c=f.length-1;for(;b<c;){let d=b+c+1>>>1;f[d]<=a?b=d:c=d-1}return b+1}(c.index),h=`${a}\0${g}`;if(e.has(h))continue;e.add(h);let i=r(b,g);d.push({value:a,line:g,...i?{enclosingQname:i.qualifiedName}:{}})}return d}(c,i);return{path:b,language:g,mtime:d,symbolsTree:h,flatSymbols:i,importBindings:k,importSpecifiers:j,rawCalls:l,literals:m}}finally{f.delete()}}function r(a,b){let c=null;for(let d of a)d.startLine<=b&&b<=d.endLine&&(!c||d.endLine-d.startLine<c.endLine-c.startLine)&&(c=d);return c}async function s(a){let b=Date.now(),c=await (0,l.iU)(a);c||(c=[],await (0,l.jH)(a,a,c));let d=c.length>l.BE;d&&(c=c.slice(0,l.BE));let e=new Set(c),f=await (0,l.ZT)(a),h=await (0,l.zC)(a,e),i=new Map;for(let b of k.I){let c=(0,n.Bu)(b);i.set(b,await c.buildProjectContext(a,e))}let j=(await p(c,50,b=>q(g().join(a,b),b))).filter(a=>null!==a),m=new Map;for(let a of j){let b=(0,n.Bu)(a.language),c=i.get(a.language),d=new Map,f=new Set;for(let g of a.importSpecifiers){if(d.has(g))continue;let h=b.resolveSpecifier(g,a.path,c,e);h&&h!==a.path&&(d.set(g,h),f.add(h))}let g=new Map,h=new Map;for(let b of a.flatSymbols){h.set(b.qualifiedName,b);let a=g.get(b.name);a?a.push(b):g.set(b.name,[b])}let j=new Map,k=new Map;for(let b of a.importBindings)b.isReexport?k.set(b.localName,b):j.set(b.localName,b);m.set(a.path,{path:a.path,language:a.language,mtime:a.mtime,symbolsTree:a.symbolsTree,flatSymbols:a.flatSymbols,literals:a.literals,importedFiles:f,importedBy:new Set,importBindings:a.importBindings,resolvedImports:d,intraCalls:[],outgoingCalls:[],incomingCalls:[],externalCalls:[],methodCalls:[],symbolsByName:g,symbolsByQname:h,bindingsByLocalName:j,reexportsByLocalName:k})}for(let a of m.values())for(let b of a.importedFiles){let c=m.get(b);c&&c.importedBy.add(a.path)}for(let a of j){let b=m.get(a.path),c=(0,n.Bu)(a.language),d=i.get(a.language),e=new Map,f=new Map,g=new Map,h=new Map;for(let i of a.rawCalls){let a=r(b.flatSymbols,i.line);if(a){for(let j of c.resolveCall(i,a,b,m,d))if("symbol"===j.kind)if(j.addr.filePath===b.path){let c=`${a.qualifiedName}${j.addr.qualifiedName}`,d=e.get(c);if(d)d.lines.push(i.line);else{let d={from:a.qualifiedName,to:j.addr.qualifiedName,lines:[i.line]};e.set(c,d),b.intraCalls.push(d)}}else{let c=`${a.qualifiedName}${j.addr.filePath}${j.addr.qualifiedName}`,d=f.get(c);if(d)d.lines.push(i.line);else{let d={from:a.qualifiedName,to:{filePath:j.addr.filePath,qualifiedName:j.addr.qualifiedName},lines:[i.line]};f.set(c,d),b.outgoingCalls.push(d)}}else if("external"===j.kind){let c=`${a.qualifiedName}${j.packageSpec}${j.name}`,d=g.get(c);if(d)d.lines.push(i.line);else{let d={from:a.qualifiedName,packageSpec:j.packageSpec,importedName:j.name,lines:[i.line]};g.set(c,d),b.externalCalls.push(d)}}else if("method-unresolved"===j.kind){let c=b.bindingsByLocalName.get(j.receiverName),d=c?b.resolvedImports.get(c.specifier)??"":"",e=`${a.qualifiedName}${j.receiverName}${j.methodName}`,f=h.get(e);if(f)f.lines.push(i.line);else{let c={from:a.qualifiedName,receiverName:j.receiverName,methodName:j.methodName,receiverFilePath:d,lines:[i.line]};h.set(e,c),b.methodCalls.push(c)}}}}for(let a of b.intraCalls)a.lines.sort((a,b)=>a-b);for(let a of b.outgoingCalls)a.lines.sort((a,b)=>a-b);for(let a of b.externalCalls)a.lines.sort((a,b)=>a-b);for(let a of b.methodCalls)a.lines.sort((a,b)=>a-b)}for(let a of m.values())for(let b of a.outgoingCalls){let c=m.get(b.to.filePath);c&&c.incomingCalls.push({from:{filePath:a.path,qualifiedName:b.from},to:b.to.qualifiedName,lines:b.lines})}return{cwd:a,files:m,truncated:d,fileCountCap:d?l.BE:void 0,tsconfigs:f,workspaces:h,projectContexts:i,fileSet:e,generatedAt:Date.now(),buildMs:Date.now()-b}}let O=new Map,P=new Map,Q=new Set,R=new Set,S=null;function t(a){if(S=a,a)for(let b of R)a(b,()=>Q.add(b))}async function u(a,b){let c=Array.from(b.files.keys()),d=0,e=async()=>{for(;d<c.length;){let e=d++;try{await B(a,c[e],b)}catch{}}};await Promise.all(Array.from({length:Math.min(8,c.length)},e))}async function v(a,b={}){!R.has(a)&&(R.add(a),S&&S(a,()=>Q.add(a))),b.forceRefresh&&(O.delete(a),Q.delete(a));let d=O.get(a);if(d){if(Q.has(a)){Q.delete(a);try{await u(a,d)}catch{}}return d}let e=P.get(a);if(e)return e;let f=s(a).then(b=>(O.set(a,b),P.delete(a),Q.delete(a),Promise.all([c.e(4008),c.e(2540)]).then(c.bind(c,92540)).then(c=>c.precomputeAnalytics(a,b)).catch(a=>{console.error("[codeIndex] analytics precompute failed:",a)}),b));return P.set(a,f),f}function w(a){if(Promise.all([c.e(4008),c.e(2540)]).then(c.bind(c,92540)).then(b=>b.invalidateAnalytics(a)).catch(()=>{}),!a){O.clear(),P.clear(),Q.clear();return}O.delete(a),P.delete(a),Q.delete(a)}let T=(0,i.promisify)(h.exec);async function x(a,b){let c=!0;try{await T("git rev-parse --git-dir",{cwd:a})}catch{c=!1}if(!c)return!(b.startsWith(".git")||b.startsWith("node_modules/")||b.includes("/node_modules/"));try{return await T(`git -c core.quotePath=false ls-files --cached --others --exclude-standard --error-unmatch -- '${b.replace(/'/g,"'\\''")}'`,{cwd:a}),!0}catch{return!1}}function y(a){Promise.all([c.e(4008),c.e(2540)]).then(c.bind(c,92540)).then(b=>b.invalidateAnalytics(a)).catch(()=>{})}async function z(a,b,c){if(!(0,j.M)(b)||c.files.size>=l.BE||!await x(a,b))return!1;let d=await q(g().join(a,b),b);return!!d&&(c.fileSet.add(d.path),await A(d,null,c),y(a),!0)}async function A(a,b,c){let d=(0,n.Bu)(a.language),e=c.projectContexts.get(a.language),f=new Map,g=new Set;for(let b of a.importSpecifiers){if(f.has(b))continue;let h=d.resolveSpecifier(b,a.path,e,c.fileSet);h&&h!==a.path&&(f.set(b,h),g.add(h))}let h=new Map,i=new Map;for(let b of a.flatSymbols){i.set(b.qualifiedName,b);let a=h.get(b.name);a?a.push(b):h.set(b.name,[b])}let j=new Map,k=new Map;for(let b of a.importBindings)b.isReexport?k.set(b.localName,b):j.set(b.localName,b);let l={path:a.path,language:a.language,mtime:a.mtime,symbolsTree:a.symbolsTree,flatSymbols:a.flatSymbols,literals:a.literals,importedFiles:g,importedBy:b?.importedBy??new Set,importBindings:a.importBindings,resolvedImports:f,intraCalls:[],outgoingCalls:[],incomingCalls:b?.incomingCalls??[],externalCalls:[],methodCalls:[],symbolsByName:h,symbolsByQname:i,bindingsByLocalName:j,reexportsByLocalName:k},m=new Map,o=new Map,p=new Map,q=new Map;for(let b of(c.files.set(a.path,l),a.rawCalls)){let a=r(l.flatSymbols,b.line);if(a){for(let f of d.resolveCall(b,a,l,c.files,e))if("symbol"===f.kind)if(f.addr.filePath===l.path){let c=`${a.qualifiedName}${f.addr.qualifiedName}`,d=m.get(c);if(d)d.lines.push(b.line);else{let d={from:a.qualifiedName,to:f.addr.qualifiedName,lines:[b.line]};m.set(c,d),l.intraCalls.push(d)}}else{let c=`${a.qualifiedName}${f.addr.filePath}${f.addr.qualifiedName}`,d=o.get(c);if(d)d.lines.push(b.line);else{let d={from:a.qualifiedName,to:{filePath:f.addr.filePath,qualifiedName:f.addr.qualifiedName},lines:[b.line]};o.set(c,d),l.outgoingCalls.push(d)}}else if("external"===f.kind){let c=`${a.qualifiedName}${f.packageSpec}${f.name}`,d=p.get(c);if(d)d.lines.push(b.line);else{let d={from:a.qualifiedName,packageSpec:f.packageSpec,importedName:f.name,lines:[b.line]};p.set(c,d),l.externalCalls.push(d)}}else if("method-unresolved"===f.kind){let c=l.bindingsByLocalName.get(f.receiverName),d=c?l.resolvedImports.get(c.specifier)??"":"",e=`${a.qualifiedName}${f.receiverName}${f.methodName}`,g=q.get(e);if(g)g.lines.push(b.line);else{let c={from:a.qualifiedName,receiverName:f.receiverName,methodName:f.methodName,receiverFilePath:d,lines:[b.line]};q.set(e,c),l.methodCalls.push(c)}}}}for(let a of l.intraCalls)a.lines.sort((a,b)=>a-b);for(let a of l.outgoingCalls)a.lines.sort((a,b)=>a-b);for(let a of l.externalCalls)a.lines.sort((a,b)=>a-b);for(let a of l.methodCalls)a.lines.sort((a,b)=>a-b);return l}async function B(a,b,c){let d,f=c.files.get(b);if(!f)return z(a,b,c);try{d=(await e.promises.stat(g().join(a,b))).mtimeMs}catch{return!1}if(d===f.mtime)return!1;let h=await q(g().join(a,b),b);return!!h&&(await A(h,f,c),y(a),!0)}function C(a){return{filePath:a.filePath,qualifiedName:a.qualifiedName,name:a.name,kind:a.kind,startLine:a.startLine,endLine:a.endLine,params:a.params}}function D(a){let b=a.indexOf(">");return b>=0?a.slice(0,b):a}function E(a){if(a.length<2)return a;let b=[a[0]];for(let c=1;c<a.length;c++)a[c]!==a[c-1]&&b.push(a[c]);return b}function F(a,b){let c=a.files.get(b);if(!c)return null;let d=c.flatSymbols.filter(a=>!a.qualifiedName.includes(">")).map(C).sort((a,b)=>a.startLine-b.startLine),e=new Set(d.map(a=>a.qualifiedName)),f=new Map,g=[];for(let a of c.intraCalls){let b=D(a.from),c=D(a.to);if(b===c||!e.has(b)||!e.has(c))continue;let d=`${b}|${c}`,h=f.get(d);if(h)for(let b of a.lines)h.lines.push(b);else{let e={from:b,to:c,lines:a.lines.slice()};f.set(d,e),g.push(e)}}for(let a of g)a.lines.sort((a,b)=>a-b),a.lines=E(a.lines);let h=[],i=new Map;for(let b of c.outgoingCalls){let d=D(b.from);if(!e.has(d)||b.to.filePath===c.path)continue;let f=a.files.get(b.to.filePath);if(!f)continue;let g=f.symbolsByQname.get(b.to.qualifiedName);if(!g||!(0,m._)(g))continue;let j=`${g.filePath}|${g.qualifiedName}|${d}`,k=i.get(j);if(k)for(let a of b.lines)k.lines.push(a);else{let a={external:C(g),focalQname:d,lines:b.lines.slice()};i.set(j,a),h.push(a)}}let j=[],k=new Map;for(let b of c.incomingCalls){let d=D(b.to);if(!e.has(d)||b.from.filePath===c.path)continue;let f=a.files.get(b.from.filePath);if(!f)continue;let g=f.symbolsByQname.get(b.from.qualifiedName);if(!g||!(0,m._)(g))continue;let h=`${g.filePath}|${g.qualifiedName}|${d}`,i=k.get(h);if(i)for(let a of b.lines)i.lines.push(a);else{let a={external:C(g),focalQname:d,lines:b.lines.slice()};k.set(h,a),j.push(a)}}for(let a of h)a.lines.sort((a,b)=>a-b),a.lines=E(a.lines);for(let a of j)a.lines.sort((a,b)=>a-b),a.lines=E(a.lines);let l=[],n=new Map;for(let a of c.externalCalls){let b=D(a.from);if(!e.has(b))continue;let c=`${b}|${a.packageSpec}|${a.importedName}`,d=n.get(c);if(d)for(let b of a.lines)d.lines.push(b);else{let d={external:{name:a.importedName,packageSpec:a.packageSpec},focalQname:b,lines:a.lines.slice()};n.set(c,d),l.push(d)}}for(let a of l)a.lines.sort((a,b)=>a-b),a.lines=E(a.lines);let o=[],p=new Map;for(let a of c.methodCalls){let b=D(a.from);if(!e.has(b))continue;let c=`${b}|${a.receiverName}|${a.methodName}`,d=p.get(c);if(d)for(let b of a.lines)d.lines.push(b);else{let d={focalQname:b,receiverName:a.receiverName,methodName:a.methodName,receiverFilePath:a.receiverFilePath,lines:a.lines.slice()};p.set(c,d),o.push(d)}}for(let a of o)a.lines.sort((a,b)=>a-b),a.lines=E(a.lines);let q=(a,b)=>a.external.filePath.localeCompare(b.external.filePath)||a.external.qualifiedName.localeCompare(b.external.qualifiedName);return j.sort(q),h.sort(q),l.sort((a,b)=>a.external.packageSpec.localeCompare(b.external.packageSpec)||a.external.name.localeCompare(b.external.name)),o.sort((a,b)=>a.receiverName.localeCompare(b.receiverName)||a.methodName.localeCompare(b.methodName)),{filePath:c.path,language:c.language,fileCount:a.files.size,mtimeMs:c.mtime,functions:d,intraCalls:g,externalCalls:l,methodCalls:o,upstreamCalls:j,downstreamCalls:h}}function G(a,b){let c=a.files.get(b);return c?{filePath:c.path,language:c.language,symbols:function a(b){let c=[];for(let d of b)"unknown"!==d.kind&&c.push({...d,children:a(d.children)});return c}(c.symbolsTree)}:null}function H(a){let b="";for(let c=0;c<a.length;c++){let d=a.charCodeAt(c);95!==d&&45!==d&&46!==d&&32!==d&&(b+=d>=65&&d<=90?String.fromCharCode(d+32):a[c])}return b}function I(a,b,c,d={}){let e=b.trim();if(!e)return d.includeLiterals?{files:[],symbols:[],literals:[]}:{files:[],symbols:[]};let f=H(e),g=[];for(let b of a.files.values()){if(g.length>=c)break;H(b.path).includes(f)&&g.push({type:"file",label:function(a){let b=a.lastIndexOf("/");return b>=0?a.slice(b+1):a}(b.path),hint:b.path,target:{kind:"file",filePath:b.path}})}let h=[];for(let b of a.files.values()){let a=!1;if(!function a(b,c){for(let d of b)if(c(d)||a(d.children,c))return!0;return!1}(b.symbolsTree,d=>h.length>=c?(a=!0,!0):"unknown"!==d.kind&&(H(d.name).includes(f)&&h.push({type:"symbol",label:d.name,hint:`${d.kind} \xb7 ${b.path}`,target:{kind:"symbol",filePath:b.path,line:d.startLine,symbolName:d.name,symbolKind:d.kind,qualifiedName:d.qualifiedName}}),!1)),a)break}if(!d.includeLiterals)return{files:g,symbols:h};let i=[];a:for(let b of a.files.values())for(let a of b.literals){if(i.length>=c)break a;H(a.value).includes(f)&&i.push({type:"literal",value:a.value,filePath:b.path,line:a.line,...a.enclosingQname?{enclosingSymbol:a.enclosingQname}:{}})}return{files:g,symbols:h,literals:i}}function J(a,b,c){if(c){let d=a.files.get(c);return d&&d.symbolsByQname.has(b)?[d]:[]}let d=[];for(let c of a.files.values())c.symbolsByQname.has(b)&&d.push(c);return d}function K(a,b,c){let d=J(a,b,c);if(0===d.length)return{qname:b,target:null,callers:[]};let e=[],f=new Map;for(let c of d){for(let a of c.intraCalls){if(a.to!==b)continue;let d=c.symbolsByQname.get(a.from);if(!d)continue;let g=`${c.path}|${a.from}`,h=f.get(g);if(h)for(let b of a.lines)h.callLines.push(b);else{let b={caller:C(d),callLines:a.lines.slice()};f.set(g,b),e.push(b)}}for(let d of c.incomingCalls){if(d.to!==b)continue;let c=a.files.get(d.from.filePath),g=c?.symbolsByQname.get(d.from.qualifiedName);if(!g)continue;let h=`${d.from.filePath}|${d.from.qualifiedName}`,i=f.get(h);if(i)for(let a of d.lines)i.callLines.push(a);else{let a={caller:C(g),callLines:d.lines.slice()};f.set(h,a),e.push(a)}}}for(let a of e)a.callLines.sort((a,b)=>a-b),a.callLines=E(a.callLines);e.sort((a,b)=>a.caller.filePath.localeCompare(b.caller.filePath)||a.caller.qualifiedName.localeCompare(b.caller.qualifiedName));let g=C(d[0].symbolsByQname.get(b)),h=d.length>1?d.map(a=>a.path):void 0;return{qname:b,target:g,callers:e,ambiguousIn:h}}function L(a,b,c){let d=J(a,b,c);if(0===d.length)return{qname:b,source:null,callees:[]};let e=[],f=new Map;for(let c of d){for(let a of c.intraCalls){if(a.from!==b)continue;let d=c.symbolsByQname.get(a.to);if(!d)continue;let g=`${c.path}|${a.to}`,h=f.get(g);if(h)for(let b of a.lines)h.callLines.push(b);else{let b={callee:C(d),callLines:a.lines.slice()};f.set(g,b),e.push(b)}}for(let d of c.outgoingCalls){if(d.from!==b)continue;let c=a.files.get(d.to.filePath),g=c?.symbolsByQname.get(d.to.qualifiedName);if(!g)continue;let h=`${d.to.filePath}|${d.to.qualifiedName}`,i=f.get(h);if(i)for(let a of d.lines)i.callLines.push(a);else{let a={callee:C(g),callLines:d.lines.slice()};f.set(h,a),e.push(a)}}}for(let a of e)a.callLines.sort((a,b)=>a-b),a.callLines=E(a.callLines);e.sort((a,b)=>a.callee.filePath.localeCompare(b.callee.filePath)||a.callee.qualifiedName.localeCompare(b.callee.qualifiedName));let g=C(d[0].symbolsByQname.get(b)),h=d.length>1?d.map(a=>a.path):void 0;return{qname:b,source:g,callees:e,ambiguousIn:h}}function M(a,b,c,d){let e=J(a,b,d);if(0===e.length)return{qname:b,target:null,nodes:[],truncated:!1};let f=Math.min(Math.max(c,1),5),g=C(e[0].symbolsByQname.get(b)),h=e.length>1?e.map(a=>a.path):void 0,i=e.map(a=>({filePath:a.path,qname:b})),j=new Set(i.map(a=>`${a.filePath}|${a.qname}`)),k=i.map(b=>{let c=a.files.get(b.filePath).symbolsByQname.get(b.qname);return{symbol:C(c),depth:0}}),l=i.slice(),m=!1;for(let b=1;b<=f;b++){let c=[];for(let d of l){let e=a.files.get(d.filePath);if(e){for(let a of e.intraCalls){if(a.to!==d.qname)continue;let f=e.symbolsByQname.get(a.from);if(!f)continue;let g=`${e.path}|${a.from}`;if(!j.has(g)&&(j.add(g),k.push({symbol:C(f),depth:b}),c.push({filePath:e.path,qname:a.from}),k.length>=500)){m=!0;break}}if(m)break;for(let f of e.incomingCalls){if(f.to!==d.qname)continue;let e=a.files.get(f.from.filePath),g=e?.symbolsByQname.get(f.from.qualifiedName);if(!g)continue;let h=`${f.from.filePath}|${f.from.qualifiedName}`;if(!j.has(h)&&(j.add(h),k.push({symbol:C(g),depth:b}),c.push({filePath:f.from.filePath,qname:f.from.qualifiedName}),k.length>=500)){m=!0;break}}if(m)break}}if(m||0===c.length)break;l=c}return k.sort((a,b)=>a.depth-b.depth||a.symbol.filePath.localeCompare(b.symbol.filePath)||a.symbol.qualifiedName.localeCompare(b.symbol.qualifiedName)),{qname:b,target:g,nodes:k,truncated:m,ambiguousIn:h}}d()}catch(a){d(a)}})},37765:(a,b,c)=>{c.d(b,{Bu:()=>d.Bu});var d=c(28677),e=c(76760),f=c.n(e);function g(a){let b=0xdeadbeef,c=0x41c6ce57;for(let d=0;d<a.length;d++){let e=a.charCodeAt(d);b=Math.imul(b^e,0x9e3779b1),c=Math.imul(c^e,0x5f356495)}return b=Math.imul(b^b>>>16,0x85ebca6b)^Math.imul(c^c>>>13,0xc2b2ae35),(0x100000000*(2097151&(c=Math.imul(c^c>>>16,0x85ebca6b)^Math.imul(b^b>>>13,0xc2b2ae35)))+(b>>>0)>>>0).toString(16)}function h(a){return a.replace(/\s+/g," ").trim()}function i(a,b){return a?`${a}>${b}`:b}function j(a){let b=a.childForFieldName("name");if(b)return b.text;for(let b=0;b<a.namedChildCount;b++){let c=a.namedChild(b);if(c&&("identifier"===c.type||"type_identifier"===c.type||"property_identifier"===c.type))return c.text}return"<anonymous>"}function k(a,b,c,d,e=[],f){return{qualifiedName:i(d,b),name:b,kind:c,startLine:a.startPosition.row+1,endLine:a.endPosition.row+1,contentHash:g(h(a.text)),children:e,params:f}}function l(a){let b=a.childForFieldName("parameter");if(b)return[b.text];let c=a.childForFieldName("parameters");if(!c)return;let d=[];for(let a=0;a<c.namedChildCount;a++){let b=c.namedChild(a);b&&d.push(function a(b){switch(b.type){case"required_parameter":case"optional_parameter":{let c=b.childForFieldName("pattern");return c?a(c):b.text}case"assignment_pattern":{let c=b.childForFieldName("left");return c?a(c):b.text}case"default_parameter":case"typed_default_parameter":{let a=b.childForFieldName("name");return a?a.text:b.text}case"typed_parameter":for(let a=0;a<b.namedChildCount;a++){let c=b.namedChild(a);if(c?.type==="identifier")return c.text}return b.text;default:return b.text}}(b))}return d}function m(a,b){let c=a.text.split("\n"),d=c.length;if(0===d)return[];let e=new Uint8Array(d+2);for(let a of b){let b=Math.max(1,a.startLine),c=Math.min(d,a.endLine);for(let a=b;a<=c;a++)e[a]=1}let f=[],i=(a,b)=>{let d=!1;for(let e=a;e<=b;e++){let a=c[e-1];if(a&&a.trim().length>0){d=!0;break}}if(!d)return;let e=c.slice(a-1,b).join("\n");f.push({qualifiedName:`__code_${a}_${b}__`,name:"code",kind:"unknown",startLine:a,endLine:b,contentHash:g(h(e)),children:[]})},j=-1;for(let a=1;a<=d;a++)e[a]?j>=0&&(i(j,a-1),j=-1):j<0&&(j=a);return j>=0&&i(j,d),f}function n(a){let b=[],c=function(a){let b=[],c=-1,d=-1;for(let e=0;e<a.namedChildCount;e++){let f=a.namedChild(e);if(f){if("import_statement"===f.type||"export_statement"===f.type&&null!==f.childForFieldName("source")||"import_from_statement"===f.type||"future_import_statement"===f.type)b.push(f),c<0&&(c=f.startPosition.row+1),d=f.endPosition.row+1;else if(c>=0)break}}return c<0?null:{qualifiedName:"__imports__",name:"imports",kind:"unknown",startLine:c,endLine:d,contentHash:g(h(b.map(a=>a.text).join("\n"))),children:[]}}(a);c&&b.push(c);for(let c=0;c<a.namedChildCount;c++){let d=a.namedChild(c);d&&b.push(...function a(b,c,d=!1){switch(b.type){case"export_statement":case"export_default_declaration":{let d=[];for(let e=0;e<b.namedChildCount;e++){let f=b.namedChild(e);f&&d.push(...a(f,c,!0))}return d}case"function_declaration":case"generator_function_declaration":case"function_definition":return[k(b,j(b),"function",c,[],l(b))];case"class_declaration":case"abstract_class_declaration":{let a=j(b),d=i(c,a),e=function(a,b){if(!a)return[];let c=[];for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(e){if("method_definition"===e.type)c.push(k(e,j(e),"method",b,[],l(e)));else if("public_field_definition"===e.type){let a=e.childForFieldName("value");a&&("arrow_function"===a.type||"function_expression"===a.type)&&c.push(k(e,j(e),"method",b,[],l(a)))}}}return c}(b.childForFieldName("body"),d);return[k(b,a,"class",c,e)]}case"interface_declaration":return[k(b,j(b),"interface",c)];case"type_alias_declaration":return[k(b,j(b),"type",c)];case"enum_declaration":return[k(b,j(b),"enum",c)];case"lexical_declaration":case"variable_declaration":return function(a,b){let c=[];for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(!e||"variable_declarator"!==e.type)continue;let f=e.childForFieldName("name"),g=e.childForFieldName("value");if(!f)continue;let h=f.text,i=g&&("arrow_function"===g.type||"function_expression"===g.type),m=i&&g?l(g):void 0;if(c.push(k(a,h,i?"function":"const",b,[],m)),g&&"object"===g.type&&!i){let a=b?`${b}>${h}`:h;for(let b=0;b<g.namedChildCount;b++){let d=g.namedChild(b);if(d){if("pair"===d.type){let b=d.childForFieldName("key"),e=d.childForFieldName("value");if(!b||!e||"property_identifier"!==b.type&&"identifier"!==b.type||"arrow_function"!==e.type&&"function_expression"!==e.type)continue;c.push(k(d,b.text,"method",a,[],l(e)))}else if("method_definition"===d.type){let b=j(d);b&&c.push(k(d,b,"method",a,[],l(d)))}}}}}return c}(b,c);case"class_definition":{let a=j(b),d=i(c,a),e=function a(b,c){if(!b)return[];let d=[];for(let e=0;e<b.namedChildCount;e++){let f=b.namedChild(e);if(f){if("function_definition"===f.type)d.push(k(f,j(f),"method",c,[],l(f)));else if("decorated_definition"===f.type){let b=f.childForFieldName("definition");if(b?.type==="function_definition")d.push({...k(b,j(b),"method",c,[],l(b)),startLine:f.startPosition.row+1,contentHash:g(h(f.text))});else if(b?.type==="class_definition"){let e=j(b),l=i(c,e),m=a(b.childForFieldName("body"),l);d.push({...k(b,e,"class",c,m),startLine:f.startPosition.row+1,contentHash:g(h(f.text))})}}else if("class_definition"===f.type){let b=j(f),e=i(c,b),g=a(f.childForFieldName("body"),e);d.push(k(f,b,"class",c,g))}}}return d}(b.childForFieldName("body"),d);return[k(b,a,"class",c,e)]}case"decorated_definition":{let d=b.childForFieldName("definition");if(!d)return[];return a(d,c,!1).map(a=>({...a,startLine:b.startPosition.row+1,contentHash:g(h(b.text))}))}case"expression_statement":{let a=[];for(let d=0;d<b.namedChildCount;d++){let e=b.namedChild(d);if(e?.type==="assignment"){let d=function(a,b,c){let d=b.childForFieldName("left");if(!d||"identifier"!==d.type)return null;let e=d.text;return{qualifiedName:i(c,e),name:e,kind:"const",startLine:a.startPosition.row+1,endLine:a.endPosition.row+1,contentHash:g(h(a.text)),children:[]}}(b,e,c);d&&a.push(d)}}return a.push(...function(a,b){let c=null;for(let b=0;b<a.namedChildCount;b++){let d=a.namedChild(b);if(d){if("call_expression"===d.type){c=d;break}if("await_expression"===d.type){for(let a=0;a<d.namedChildCount;a++){let b=d.namedChild(a);if(b?.type==="call_expression"){c=b;break}}break}}}if(!c)return[];let d=c.childForFieldName("function"),e=c.childForFieldName("arguments");if(!d||!e)return[];let f=null,g=[];for(let a=0;a<e.namedChildCount;a++){let b=e.namedChild(a);if(b){if(null===f&&("string"===b.type||"template_string"===b.type)){let a=b.text;f=a.length>=2&&/^["'`]/.test(a)?a.slice(1,-1):a}("arrow_function"===b.type||"function_expression"===b.type)&&g.push(b)}}if(0===g.length||!f)return[];let h=function a(b){if("identifier"===b.type)return b.text;if("member_expression"===b.type){let a=b.childForFieldName("property");return a?.text??""}if("call_expression"===b.type){let c=b.childForFieldName("function");return c?a(c):""}return""}(d),i=h?`${h} ${f}`:f;return g.map((a,c)=>k(a,g.length>1?`${i} #${c+1}`:i,"function",b,[],l(a)))}(b,c)),a}default:return[]}}(d,void 0,!1))}return b.push(...m(a,b)),b}function o(a){let b=[];return!function a(c){if("call_expression"===c.type||"call"===c.type){let a=c.childForFieldName("function"),d=function a(b){if(!b)return null;if("identifier"===b.type||"shorthand_property_identifier"===b.type)return b.text;if("member_expression"===b.type){let a=b.childForFieldName("property");return a?.text??null}if("attribute"===b.type){let a=b.childForFieldName("attribute");return a?.text??null}return"call_expression"===b.type||"call"===b.type?a(b.childForFieldName("function")):null}(a);if(d){let e=function(a){if(!a||"member_expression"!==a.type&&"attribute"!==a.type)return;let b=a;for(;b;){if("identifier"===b.type)return b.text;if("this"===b.type||"super"===b.type)break;if("member_expression"===b.type||"attribute"===b.type){b=b.childForFieldName("object");continue}break}}(a);b.push({calleeName:d,line:c.startPosition.row+1,...e?{receiverName:e}:{}})}}else if("jsx_opening_element"===c.type||"jsx_self_closing_element"===c.type){let a=function a(b){return b?"identifier"===b.type?/^[A-Z]/.test(b.text)?b.text:null:"member_expression"===b.type||"jsx_member_expression"===b.type?a(b.childForFieldName("object")??b.namedChild(0)):null:null}(c.childForFieldName("name"));a&&b.push({calleeName:a,line:c.startPosition.row+1})}for(let b=0;b<c.childCount;b++){let d=c.child(b);d&&a(d)}}(a),b}function p(a){let b=[];for(let c=0;c<a.namedChildCount;c++){let d=a.namedChild(c);if(d)if("import_statement"===d.type){let a=d.childForFieldName("source");a?function(a,b,c){let d=q(b.text),e=null;for(let b=0;b<a.namedChildCount;b++){let c=a.namedChild(b);if(c?.type==="import_clause"){e=c;break}}if(e)for(let a=0;a<e.namedChildCount;a++){let b=e.namedChild(a);if(b){if("identifier"===b.type)c.push({specifier:d,importedName:"default",localName:b.text});else if("namespace_import"===b.type){let a=function(a,b){for(let c=0;c<a.namedChildCount;c++){let d=a.namedChild(c);if(d?.type===b)return d}return null}(b,"identifier");a&&c.push({specifier:d,importedName:"*",localName:a.text})}else if("named_imports"===b.type)for(let a=0;a<b.namedChildCount;a++){let e=b.namedChild(a);if(!e||"import_specifier"!==e.type)continue;let f=e.childForFieldName("name"),g=e.childForFieldName("alias");f&&c.push({specifier:d,importedName:f.text,localName:g?.text??f.text})}}}}(d,a,b):function(a,b){for(let c=0;c<a.childCount;c++){let d=a.child(c);if(d&&"name"===a.fieldNameForChild(c)){if("dotted_name"===d.type){let a=d.text,c=a.split(".")[0];b.push({specifier:a,importedName:"*",localName:c})}else if("aliased_import"===d.type){let a=d.childForFieldName("name"),c=d.childForFieldName("alias");a?.type==="dotted_name"&&c&&b.push({specifier:a.text,importedName:"*",localName:c.text})}}}}(d,b)}else"import_from_statement"===d.type&&function(a,b){let c=a.childForFieldName("module_name"),d="";if(c){if("dotted_name"===c.type)d=c.text;else if("relative_import"===c.type){let a="",b="";for(let d=0;d<c.namedChildCount;d++){let e=c.namedChild(d);e&&("import_prefix"===e.type?a=e.text:"dotted_name"===e.type&&(b=e.text))}d=a+b}}if(!d)return;let e=!1;for(let c=0;c<a.childCount;c++){let f=a.child(c);if(!f)continue;let g=a.fieldNameForChild(c);if("wildcard_import"===f.type){e=!0;continue}if("name"===g){if("dotted_name"===f.type){let a=f.text;b.push({specifier:d,importedName:a,localName:a})}else if("aliased_import"===f.type){let a=f.childForFieldName("name"),c=f.childForFieldName("alias");a?.type==="dotted_name"&&c&&b.push({specifier:d,importedName:a.text,localName:c.text})}}}e&&b.push({specifier:d,importedName:"*",localName:"*"})}(d,b)}return b}function q(a){return a.length>=2&&('"'===a[0]||"'"===a[0])&&a[a.length-1]===a[0]?a.slice(1,-1):a}function r(a){let b=[];function c(a){if(!a||"string"!==a.type)return null;for(let b=0;b<a.namedChildCount;b++){let c=a.namedChild(b);if(c&&"string_fragment"===c.type)return c.text}return""}return!function a(d){switch(d.type){case"import_statement":case"export_statement":{let a=c(d.childForFieldName("source"));a&&b.push(a);return}case"call_expression":{let a=d.childForFieldName("function");if(a){let e="import"===a.type,f="identifier"===a.type&&"require"===a.text;if(e||f){let a=d.childForFieldName("arguments");if(a&&a.namedChildCount>0){let d=c(a.namedChild(0));d&&b.push(d)}}}}}for(let b=0;b<d.namedChildCount;b++){let c=d.namedChild(b);c&&a(c)}}(a),b}let s={typescript:r,tsx:r,javascript:r,python:function(a){let b=[];return!function a(c){switch(c.type){case"import_statement":for(let a=0;a<c.childCount;a++){let d=c.child(a);if(d&&"name"===c.fieldNameForChild(a)){if("dotted_name"===d.type)b.push(d.text);else if("aliased_import"===d.type){let a=d.childForFieldName("name");a?.type==="dotted_name"&&b.push(a.text)}}}return;case"import_from_statement":{let a=function(a){let b=a.childForFieldName("module_name");if(!b)return"";if("dotted_name"===b.type)return b.text;if("relative_import"===b.type){let a="",c="";for(let d=0;d<b.namedChildCount;d++){let e=b.namedChild(d);e&&("import_prefix"===e.type?a=e.text:"dotted_name"===e.type&&(c=e.text))}return a+c}return""}(c);a&&b.push(a);return}}for(let b=0;b<c.namedChildCount;b++){let d=c.namedChild(b);d&&a(d)}}(a),b}};function t(a,b){let c=s[b];return c?c(a):[]}var u=c(25344);function v(a){return"function"===a||"class"===a||"method"===a}function w(a,b){return{grammarId:a,extensions:b,extractSymbols:(a,b)=>n(a),extractImports:b=>({specs:t(b,a),bindings:[...p(b),...function(a){let b=[];for(let c=0;c<a.namedChildCount;c++){let d=a.namedChild(c);if(!d||"export_statement"!==d.type)continue;let e=d.childForFieldName("source");if(!e)continue;let f=q(e.text),g=null;for(let a=0;a<d.namedChildCount;a++){let b=d.namedChild(a);if(b?.type==="export_clause"){g=b;break}}if(g)for(let a=0;a<g.namedChildCount;a++){let c=g.namedChild(a);if(!c||"export_specifier"!==c.type)continue;let d=c.childForFieldName("name"),e=c.childForFieldName("alias");if(!d)continue;let h=d.text,i=e?.text??h;b.push({localName:i,specifier:f,importedName:h,isReexport:!0})}}return b}(b)]}),extractCallSites:(a,b)=>o(a),async buildProjectContext(a,b){let c=new Set(b),d=await (0,u.ZT)(a),e=await (0,u.zC)(a,c),f=[...e.keys()].sort((a,b)=>b.length-a.length);return{cwd:a,tsconfigs:d,workspaces:e,sortedWsNames:f,owningScopesCache:new Map}},resolveSpecifier(a,b,c,d){let e=c.owningScopesCache.get(b);if(e||(e=c.tsconfigs.filter(a=>(0,u._0)(b,a.scope)),c.owningScopesCache.set(b,e)),a.startsWith("./")||a.startsWith("../"))return(0,u.KP)(f().resolve(c.cwd,f().dirname(b),a),c.cwd,d);if(a.startsWith("/"))return(0,u.KP)(f().resolve(c.cwd,a.slice(1)),c.cwd,d);for(let b of e){let e=b.sortedAliases.find(([b])=>a===b||a.startsWith(b+"/"));if(!e)continue;let[g,h]=e,i=a===g?"":a.slice(g.length+1),j=(0,u.KP)(f().resolve(c.cwd,h,i),c.cwd,d);if(j)return j}for(let b of c.sortedWsNames){if(a!==b&&!a.startsWith(b+"/"))continue;let e=c.workspaces.get(b);if(a===b)return e.entryFile;let g=a.slice(b.length+1);return(0,u.IS)(f().posix.join(e.dir,g),d)??(0,u.IS)(f().posix.join(e.dir,"src",g),d)}return null},resolveCall(a,b,c,d,e){if(a.receiverName){let b=c.bindingsByLocalName.get(a.receiverName);if(!b)return[];let e=c.resolvedImports.get(b.specifier);if(!e)return[];let f=d.get(e);if(!f)return[];let g=function a(b,c,d,e,f,g){if(e>5||f.has(b.path))return null;if(f.add(b.path),"*"!==c){let a=`${c}>${d}`,e=b.symbolsByQname.get(a);if(e&&v(e.kind))return e}if("*"===c){let a=b.symbolsByName.get(d);if(a){let b=null;for(let c of a)!c.qualifiedName.includes(">")&&v(c.kind)&&(!b||c.endLine-c.startLine>b.endLine-b.startLine)&&(b=c);if(b)return b}}let h=b.reexportsByLocalName.get(c);if(h){let c=b.resolvedImports.get(h.specifier);if(c){let b=g.get(c);if(b){let c=a(b,h.importedName,d,e+1,f,g);if(c)return c}}}return null}(f,b.importedName,a.calleeName,0,new Set,d);return g?[{kind:"symbol",addr:{filePath:g.filePath,qualifiedName:g.qualifiedName}}]:[{kind:"method-unresolved",receiverName:a.receiverName,methodName:a.calleeName}]}let f=c.symbolsByName.get(a.calleeName);if(f&&f.length>0){let a=[];for(let c of f)c.qualifiedName!==b.qualifiedName&&v(c.kind)&&a.push({kind:"symbol",addr:{filePath:c.filePath,qualifiedName:c.qualifiedName}});return a}let g=c.bindingsByLocalName.get(a.calleeName);if(!g)return[];let h=c.resolvedImports.get(g.specifier);if(!h)return[{kind:"external",name:g.importedName,packageSpec:g.specifier}];let i=d.get(h);if(!i)return[];let j=function a(b,c,d,e,f){if(d>5||e.has(b.path))return null;e.add(b.path);let g=b.symbolsByName.get(c);if(g){let a=null;for(let b of g)v(b.kind)&&(!a||b.endLine-b.startLine>a.endLine-a.startLine)&&(a=b);if(a)return a}let h=b.reexportsByLocalName.get(c);if(h){let c=b.resolvedImports.get(h.specifier);if(c){let b=f.get(c);if(b){let c=a(b,h.importedName,d+1,e,f);if(c)return c}}}return null}(i,g.importedName,0,new Set,d);return j?[{kind:"symbol",addr:{filePath:j.filePath,qualifiedName:j.qualifiedName}}]:[]},moduleForFile:(a,b)=>a}}let x=w("typescript",[".ts"]),y=w("tsx",[".tsx",".jsx"]),z=w("javascript",[".js",".mjs",".cjs"]);function A(a){return"function"===a||"class"===a||"method"===a}function B(a,b,c){let d=b.replace(/\./g,"/"),e=(...a)=>a.filter(a=>""!==a&&"."!==a).join("/");if(!d){let b=e(a,"__init__.py");return c.has(b)?b:null}let f=e(a,d+".py");if(c.has(f))return f;let g=e(a,d,"__init__.py");return c.has(g)?g:null}var C=c(73024);function D(a,b,c,d,e=[],f){return{qualifiedName:d?`${d}>${b}`:b,name:b,kind:c,startLine:a.startPosition.row+1,endLine:a.endPosition.row+1,contentHash:g(h(a.text)),children:e,params:f}}function E(a){let b=a.childForFieldName("parameters");if(!b)return;let c=[];for(let a=0;a<b.namedChildCount;a++){let d=b.namedChild(a);if(d){if("parameter_declaration"===d.type){let a=d.childForFieldName("name");if(!a){c.push("_");continue}if("identifier"===a.type)c.push(a.text);else if("identifier_list"===a.type)for(let b=0;b<a.namedChildCount;b++){let d=a.namedChild(b);d?.type==="identifier"&&c.push(d.text)}else c.push(a.text)}else if("variadic_parameter_declaration"===d.type){let a=d.childForFieldName("name");a?.type==="identifier"?c.push(`...${a.text}`):c.push("...")}}}return c}async function F(a){try{let b=await C.promises.readFile(f().join(a,"go.mod"),"utf8"),c=/^\s*module\s+(\S+)/m.exec(b);return c?c[1].trim():null}catch{return null}}function G(a){return"function"===a||"class"===a||"method"===a}function H(a,b,c,d,e=[],f){return{qualifiedName:d?`${d}>${b}`:b,name:b,kind:c,startLine:a.startPosition.row+1,endLine:a.endPosition.row+1,contentHash:g(h(a.text)),children:e,params:f}}function I(a){let b=a.childForFieldName("parameters");if(!b)return;let c=[];for(let a=0;a<b.namedChildCount;a++){let d=b.namedChild(a);if(d)if("self_parameter"===d.type)c.push(d.text);else if("parameter"===d.type){let a=d.childForFieldName("pattern");a?c.push(a.text):c.push("_")}else"variadic_parameter"===d.type&&c.push("...")}return c}async function J(a,b){let c=new Map,d=new Map,e=new Set;async function g(h,i){let j;if(e.has(i))return;e.add(i),c.set(h,i),d.set(i,h);try{j=await C.promises.readFile(f().join(a,i),"utf8")}catch{return}let k=function(a){let b,c=a.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/.*$/gm,"").replace(/"(?:\\.|[^"\\\n])*"/g,'""'),d=[],e=/\b(?:pub(?:\s*\([^)]*\))?\s+)?mod\s+(\w+)\s*;/g;for(;null!==(b=e.exec(c));)d.push(b[1]);return d}(j);if(0===k.length)return;let l=f().dirname(i),m=f().basename(i,".rs"),n="mod"===m||"lib"===m||"main"===m?[l]:[l,f().join(l,m)];for(let a of k){let c=`${h}::${a}`,d=null;for(let c of n){for(let e of[f().join(c,`${a}.rs`),f().join(c,a,"mod.rs")]){let a=e.startsWith("./")?e.slice(2):e;if(b.has(a)){d=a;break}}if(d)break}d&&await g(c,d)}}for(let a of function(a){let b=[];for(let c of a)("src/lib.rs"===c||"src/main.rs"===c||c.endsWith("/src/lib.rs")||c.endsWith("/src/main.rs")||/^src\/bin\/[^/]+\.rs$/.test(c)||/\/src\/bin\/[^/]+\.rs$/.test(c))&&b.push(c);return b}(b))if("src/lib.rs"===a||"src/main.rs"===a)await g("crate",a);else if(a.startsWith("src/bin/"))await g("crate",a);else{let b=a.split("/"),c=b.indexOf("src");if(c>0){let d=b[c-1];await g(d,a)}}return{modTree:c,fileToMod:d}}function K(a){return"function"===a||"class"===a||"method"===a}(0,d.ik)(x),(0,d.ik)(y),(0,d.ik)(z),(0,d.ik)({grammarId:"python",extensions:[".py",".pyi"],extractSymbols:(a,b)=>n(a),extractImports:a=>({specs:t(a,"python"),bindings:p(a)}),extractCallSites:(a,b)=>o(a),buildProjectContext(a,b){let c=[a],d=!1;if(b.has("src/__init__.py"))d=!0;else for(let a of b)if(a.startsWith("src/")&&a.endsWith(".py")){d=!0;break}return d&&c.push(f().join(a,"src")),{cwd:a,pythonRoots:c}},resolveSpecifier(a,b,c,d){let e=/^(\.+)/.exec(a);if(e){let c=e[1].length,g=a.slice(c),h=f().dirname(b);for(let a=1;a<c;a++)h=f().dirname(h);return B(h||".",g,d)}for(let b of c.pythonRoots){let e=B(f().relative(c.cwd,b)||".",a,d);if(e)return e}return null},resolveCall(a,b,c,d,e){if(a.receiverName){let b=c.bindingsByLocalName.get(a.receiverName);if(!b)return[];let e=c.resolvedImports.get(b.specifier);if(!e)return[];let f=d.get(e);if(!f)return[];let g=function(a,b,c){if("*"!==b){let d=`${b}>${c}`,e=a.symbolsByQname.get(d);if(e&&A(e.kind))return e}if("*"===b){let b=a.symbolsByName.get(c);if(b){let a=null;for(let c of b)!c.qualifiedName.includes(">")&&A(c.kind)&&(!a||c.endLine-c.startLine>a.endLine-a.startLine)&&(a=c);if(a)return a}}return null}(f,b.importedName,a.calleeName);return g?[{kind:"symbol",addr:{filePath:g.filePath,qualifiedName:g.qualifiedName}}]:[{kind:"method-unresolved",receiverName:a.receiverName,methodName:a.calleeName}]}let f=c.symbolsByName.get(a.calleeName);if(f&&f.length>0){let a=[];for(let c of f)c.qualifiedName!==b.qualifiedName&&A(c.kind)&&a.push({kind:"symbol",addr:{filePath:c.filePath,qualifiedName:c.qualifiedName}});return a}let g=c.bindingsByLocalName.get(a.calleeName);if(!g)return[];let h=c.resolvedImports.get(g.specifier);if(!h)return[{kind:"external",name:g.importedName,packageSpec:g.specifier}];let i=d.get(h);if(!i)return[];let j=function(a,b){let c=a.symbolsByName.get(b);if(!c)return null;let d=null;for(let a of c)A(a.kind)&&(!d||a.endLine-a.startLine>d.endLine-d.startLine)&&(d=a);return d}(i,g.importedName);return j?[{kind:"symbol",addr:{filePath:j.filePath,qualifiedName:j.qualifiedName}}]:[]},moduleForFile:(a,b)=>a}),(0,d.ik)({grammarId:"go",extensions:[".go"],extractSymbols(a,b){let c=[],d=function(a){let b=[],c=-1,d=-1;for(let e=0;e<a.namedChildCount;e++){let f=a.namedChild(e);if(f){if("import_declaration"===f.type)b.push(f),c<0&&(c=f.startPosition.row+1),d=f.endPosition.row+1;else if("package_clause"===f.type)continue;else if(c>=0)break}}return c<0?null:{qualifiedName:"__imports__",name:"imports",kind:"unknown",startLine:c,endLine:d,contentHash:g(h(b.map(a=>a.text).join("\n"))),children:[]}}(a);d&&c.push(d);let{symbols:e,pendingMethods:f}=function(a){let b=[],c=[];for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(e)switch(e.type){case"function_declaration":{let a=e.childForFieldName("name");if(!a)break;b.push(D(e,a.text,"function",void 0,[],E(e)));break}case"method_declaration":{let a=e.childForFieldName("name");if(!a)break;let d=function(a){let b=a.childForFieldName("receiver");if(!b)return null;for(let a=0;a<b.namedChildCount;a++){let c=b.namedChild(a);if(c?.type!=="parameter_declaration")continue;let d=c.childForFieldName("type");if(!d)break;return function a(b){if("type_identifier"===b.type)return b.text;if("pointer_type"===b.type){for(let c=0;c<b.namedChildCount;c++){let d=b.namedChild(c);if(d){let b=a(d);if(b)return b}}return null}if("generic_type"===b.type){let c=b.childForFieldName("type");if(c)return a(c)}return null}(d)}return null}(e),f=D(e,a.text,"method",d??void 0,[],E(e));d?c.push({receiverType:d,symbol:f}):b.push(f);break}case"type_declaration":b.push(...function(a,b){let c=[];for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(e&&("type_spec"===e.type||"type_alias"===e.type)){let a=e.childForFieldName("name"),d=e.childForFieldName("type");if(!a)continue;let f=a.text,g=d?.type==="interface_type"?"interface":"class";c.push(D(e,f,g,b))}}return c}(e,void 0));break;case"var_declaration":case"const_declaration":b.push(...function(a,b){let c=[];for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(e&&("var_spec"===e.type||"const_spec"===e.type)){let a=e.childForFieldName("name");if(!a)continue;if("identifier_list"===a.type)for(let d=0;d<a.namedChildCount;d++){let f=a.namedChild(d);f?.type==="identifier"&&c.push(D(e,f.text,"const",b))}else"identifier"===a.type&&c.push(D(e,a.text,"const",b))}}return c}(e,void 0))}}return{symbols:b,pendingMethods:c}}(a);return c.push(...function(a,b){if(0===b.length)return a;let c=new Map;for(let b of a)("class"===b.kind||"interface"===b.kind)&&c.set(b.name,b);let d=[];for(let a of b){let b=c.get(a.receiverType);b?b.children=[...b.children,a.symbol]:d.push(a.symbol)}return[...a,...d]}(e,f)),c.push(...m(a,c)),c},extractImports:a=>(function(a){let b=[],c=[];function d(a){var d;let e,f=a.childForFieldName("path");if(!f)return;let g=(d=f.text).length>=2&&('"'===d[0]||"'"===d[0]||"`"===d[0])&&d[d.length-1]===d[0]?d.slice(1,-1):d;if(!g)return;b.push(g);let h=a.childForFieldName("name");if(h)e=h.text;else{let a=g.split("/");e=a[a.length-1]||g}c.push({specifier:g,importedName:"*",localName:e})}return!function a(b){if("import_declaration"===b.type){for(let a=0;a<b.namedChildCount;a++){let c=b.namedChild(a);if(c){if("import_spec"===c.type)d(c);else if("import_spec_list"===c.type)for(let a=0;a<c.namedChildCount;a++){let b=c.namedChild(a);b?.type==="import_spec"&&d(b)}}}return}for(let c=0;c<b.namedChildCount;c++){let d=b.namedChild(c);d&&a(d)}}(a),{specs:b,bindings:c}})(a),extractCallSites:(a,b)=>{let c;return c=[],!function a(b){if("call_expression"===b.type){let a=b.childForFieldName("function"),d=function a(b){if(!b)return null;if("identifier"===b.type)return b.text;if("selector_expression"===b.type){let a=b.childForFieldName("field");return a?.text??null}return"call_expression"===b.type?a(b.childForFieldName("function")):null}(a);if(d){let e=function(a){if(!a||"selector_expression"!==a.type)return;let b=a;for(;b;){if("identifier"===b.type)return b.text;if("selector_expression"===b.type){b=b.childForFieldName("operand");continue}break}}(a);c.push({calleeName:d,line:b.startPosition.row+1,...e?{receiverName:e}:{}})}}for(let c=0;c<b.childCount;c++){let d=b.child(c);d&&a(d)}}(a),c},async buildProjectContext(a,b){let c=await F(a);return{cwd:a,modulePath:c,dirToGoFiles:function(a){let b=new Map;for(let c of a){if(!c.endsWith(".go"))continue;let a=f().dirname(c),d=b.get(a);d?d.push(c):b.set(a,[c])}return b}(b)}},resolveSpecifier(a,b,c,d){if(!c.modulePath)return null;if(a===c.modulePath){let a=c.dirToGoFiles.get(".");return a?.[0]??null}if(a.startsWith(c.modulePath+"/")){let b=a.slice(c.modulePath.length+1),d=c.dirToGoFiles.get(b);return d?.[0]??null}return null},resolveCall(a,b,c,d,e){let g=f().dirname(c.path),h=e.dirToGoFiles.get(g)??[c.path];if(a.receiverName){let b=c.bindingsByLocalName.get(a.receiverName);if(b){let g=c.resolvedImports.get(b.specifier);if(!g)return[{kind:"external",name:a.calleeName,packageSpec:b.specifier}];let h=f().dirname(g);for(let b of e.dirToGoFiles.get(h)??[]){let c,e=d.get(b);if(!e)continue;let f=e.symbolsByName.get(a.calleeName);if(f){for(let a of f)if(!a.qualifiedName.includes(">")&&G(a.kind)){c=a;break}if(c)return[{kind:"symbol",addr:{filePath:c.filePath,qualifiedName:c.qualifiedName}}]}}return[{kind:"external",name:a.calleeName,packageSpec:b.specifier}]}let g=`${a.receiverName}>${a.calleeName}`;for(let a of h){let b=d.get(a);if(!b)continue;let c=b.symbolsByQname.get(g);if(c&&G(c.kind))return[{kind:"symbol",addr:{filePath:c.filePath,qualifiedName:c.qualifiedName}}]}return[{kind:"method-unresolved",receiverName:a.receiverName,methodName:a.calleeName}]}let i=[];for(let c of h){let e=d.get(c);if(!e)continue;let f=e.symbolsByName.get(a.calleeName);if(f)for(let a of f)!(a.qualifiedName===b.qualifiedName||a.qualifiedName.includes(">"))&&G(a.kind)&&i.push({kind:"symbol",addr:{filePath:a.filePath,qualifiedName:a.qualifiedName}})}return i},moduleForFile(a,b){let c=f().dirname(a);return b?.modulePath?"."===c?b.modulePath:`${b.modulePath}/${c}`:c}}),(0,d.ik)({grammarId:"rust",extensions:[".rs"],extractSymbols(a,b){let c=[],d=function(a){let b=[],c=-1,d=-1;for(let e=0;e<a.namedChildCount;e++){let f=a.namedChild(e);if(f){if("use_declaration"===f.type||"extern_crate_declaration"===f.type)b.push(f),c<0&&(c=f.startPosition.row+1),d=f.endPosition.row+1;else if(c>=0)break}}return c<0?null:{qualifiedName:"__imports__",name:"imports",kind:"unknown",startLine:c,endLine:d,contentHash:g(h(b.map(a=>a.text).join("\n"))),children:[]}}(a);d&&c.push(d);let{symbols:e,pendingImpls:f}=function(a){let b=[],c=[];for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(e)switch(e.type){case"function_item":{let a=e.childForFieldName("name");if(!a)break;b.push(H(e,a.text,"function",void 0,[],I(e)));break}case"struct_item":case"union_item":{let a=e.childForFieldName("name");if(!a)break;b.push(H(e,a.text,"class",void 0));break}case"enum_item":{let a=e.childForFieldName("name");if(!a)break;b.push(H(e,a.text,"enum",void 0));break}case"trait_item":{let a=e.childForFieldName("name");if(!a)break;let c=function(a,b){let c=a.childForFieldName("body");if(!c)return[];let d=[];for(let a=0;a<c.namedChildCount;a++){let e=c.namedChild(a);if(e&&("function_item"===e.type||"function_signature_item"===e.type)){let a=e.childForFieldName("name");if(!a)continue;d.push(H(e,a.text,"method",b,[],I(e)))}}return d}(e,a.text);b.push(H(e,a.text,"interface",void 0,c));break}case"impl_item":{let a=function(a){let b=a.childForFieldName("type");return b?function a(b){if("type_identifier"===b.type)return b.text;if("generic_type"===b.type){let c=b.childForFieldName("type");if(c)return a(c)}if("reference_type"===b.type)for(let c=0;c<b.namedChildCount;c++){let d=b.namedChild(c);if(d){let b=a(d);if(b)return b}}if("scoped_type_identifier"===b.type){let a=b.childForFieldName("name");if(a?.type==="type_identifier")return a.text}return null}(b):null}(e);if(!a)break;let b=function(a,b){let c=a.childForFieldName("body");if(!c)return[];let d=[];for(let a=0;a<c.namedChildCount;a++){let e=c.namedChild(a);if(e){if("function_item"===e.type){let a=e.childForFieldName("name");if(!a)continue;d.push(H(e,a.text,"method",b,[],I(e)))}else if("function_signature_item"===e.type){let a=e.childForFieldName("name");if(!a)continue;d.push(H(e,a.text,"method",b,[],I(e)))}}}return d}(e,a);b.length>0&&c.push({targetType:a,methods:b});break}case"const_item":case"static_item":{let a=e.childForFieldName("name");if(!a)break;b.push(H(e,a.text,"const",void 0));break}case"type_item":{let a=e.childForFieldName("name");if(!a)break;b.push(H(e,a.text,"type",void 0));break}case"mod_item":{let a=e.childForFieldName("name"),c=e.childForFieldName("body");if(!a||!c)break;b.push(H(e,a.text,"class",void 0))}}}return{symbols:b,pendingImpls:c}}(a);return c.push(...function(a,b){if(0===b.length)return a;let c=new Map;for(let b of a)("class"===b.kind||"enum"===b.kind||"interface"===b.kind)&&c.set(b.name,b);let d=[];for(let a of b){let b=c.get(a.targetType);b?b.children=[...b.children,...a.methods]:d.push(...a.methods)}return[...a,...d]}(e,f)),c.push(...m(a,c)),c},extractImports:a=>(function(a){let b=[],c=[];function d(a){if("identifier"===a.type||"crate"===a.type||"self"===a.type||"super"===a.type)return a.text;if("scoped_identifier"===a.type){let b=a.childForFieldName("path"),c=a.childForFieldName("name"),e=b?d(b):"",f=c?.text??"";return e?`${e}::${f}`:f}return a.text}function e(a,b){return a?b?`${a}::${b}`:a:b}function f(a){let b=a.split("::");return b[b.length-1]??a}return!function a(g){if("use_declaration"===g.type)return void function(a){for(let g=0;g<a.namedChildCount;g++){let h=a.namedChild(g);h&&function a(g,h){switch(g.type){case"use_as_clause":{let a=g.childForFieldName("path"),i=g.childForFieldName("alias");if(a&&i){let g=e(h,d(a));b.push(g),c.push({specifier:g,importedName:f(g),localName:i.text})}break}case"use_list":for(let b=0;b<g.namedChildCount;b++){let c=g.namedChild(b);c&&a(c,h)}break;case"scoped_use_list":{let b=g.childForFieldName("path"),c=g.childForFieldName("list"),f=b?e(h,d(b)):h;if(c)for(let b=0;b<c.namedChildCount;b++){let d=c.namedChild(b);d&&a(d,f)}break}case"use_wildcard":{let a=g.childForFieldName("path"),f=a?e(h,d(a)):h;f&&(b.push(f),c.push({specifier:f,importedName:"*",localName:"*"}));break}case"identifier":case"self":case"super":case"crate":case"scoped_identifier":{let a=e(h,d(g));a&&(b.push(a),c.push({specifier:a,importedName:f(a),localName:f(a)}))}}}(h,"")}}(g);if("extern_crate_declaration"===g.type){let a=g.childForFieldName("name");a&&(b.push(a.text),c.push({specifier:a.text,importedName:"*",localName:a.text}));return}if("mod_item"===g.type){let a=g.childForFieldName("body"),c=g.childForFieldName("name");!a&&c&&b.push(c.text);return}for(let b=0;b<g.namedChildCount;b++){let c=g.namedChild(b);c&&a(c)}}(a),{specs:b,bindings:c}})(a),extractCallSites:(a,b)=>{let c;return c=[],!function a(b){if("call_expression"===b.type){let a=b.childForFieldName("function"),d=function(a){if(!a)return null;if("identifier"===a.type)return a.text;if("scoped_identifier"===a.type){let b=a.childForFieldName("name");return b?.text??null}if("field_expression"===a.type){let b=a.childForFieldName("field");return b?.text??null}return null}(a);if(d){let e=function(a){if(a){if("scoped_identifier"===a.type){let b=a;for(;b;){if("identifier"===b.type)return b.text;if("scoped_identifier"===b.type){b=b.childForFieldName("path");continue}break}}if("field_expression"===a.type){let b=a.childForFieldName("value");if(b?.type==="identifier")return b.text}}}(a);c.push({calleeName:d,line:b.startPosition.row+1,...e?{receiverName:e}:{}})}}else if("method_call_expression"===b.type){let a=b.childForFieldName("method"),d=b.childForFieldName("value");if(a){let e=d?.type==="identifier"?d.text:void 0;c.push({calleeName:a.text,line:b.startPosition.row+1,...e?{receiverName:e}:{}})}}for(let c=0;c<b.childCount;c++){let d=b.child(c);d&&a(d)}}(a),c},async buildProjectContext(a,b){let{modTree:c,fileToMod:d}=await J(a,b);return{cwd:a,modTree:c,fileToMod:d}},resolveSpecifier(a,b,c,d){let e=c.fileToMod.get(b);if(!e)return null;let f=function(a,b){if(a.startsWith("crate::"))return a;if("crate"===a)return"crate";if(a.startsWith("self::"))return`${b}::${a.slice(6)}`;if("self"===a)return b;if(a.startsWith("super::")){let c=b,d=a;for(;d.startsWith("super::");){let a=c.lastIndexOf("::");if(a<0)return null;c=c.slice(0,a),d=d.slice(7)}if("super"===d){let a=c.lastIndexOf("::");return a<0?null:c.slice(0,a)}return d?`${c}::${d}`:c}return null}(a,e);if(!f)return null;if(c.modTree.has(f))return c.modTree.get(f);let g=f.split("::");for(;g.length>1;){g.pop();let a=g.join("::"),b=c.modTree.get(a);if(b)return b}return null},resolveCall(a,b,c,d,e){let f;if(a.receiverName){let b=c.bindingsByLocalName.get(a.receiverName);if(b){let e=c.resolvedImports.get(b.specifier);if(!e)return[{kind:"external",name:a.calleeName,packageSpec:b.specifier}];let f=d.get(e);if(!f)return[];let g=f.symbolsByName.get(a.calleeName);if(g){for(let a of g)if(!a.qualifiedName.includes(">")&&K(a.kind))return[{kind:"symbol",addr:{filePath:a.filePath,qualifiedName:a.qualifiedName}}]}let h=`${b.importedName}>${a.calleeName}`,i=f.symbolsByQname.get(h);return i&&K(i.kind)?[{kind:"symbol",addr:{filePath:i.filePath,qualifiedName:i.qualifiedName}}]:[{kind:"method-unresolved",receiverName:a.receiverName,methodName:a.calleeName}]}let e=`${a.receiverName}>${a.calleeName}`,f=c.symbolsByQname.get(e);if(f)return[{kind:"symbol",addr:{filePath:f.filePath,qualifiedName:f.qualifiedName}}];let g=[],h=c.symbolsByName.get(a.calleeName);if(h)for(let a of h)"method"===a.kind&&g.push({kind:"symbol",addr:{filePath:a.filePath,qualifiedName:a.qualifiedName}});return g.length>0?g:[{kind:"method-unresolved",receiverName:a.receiverName,methodName:a.calleeName}]}let g=[],h=c.symbolsByName.get(a.calleeName);if(h)for(let a of h)!(a.qualifiedName===b.qualifiedName||a.qualifiedName.includes(">"))&&K(a.kind)&&g.push({kind:"symbol",addr:{filePath:a.filePath,qualifiedName:a.qualifiedName}});if(g.length>0)return g;let i=c.bindingsByLocalName.get(a.calleeName);if(!i)return[];let j=c.resolvedImports.get(i.specifier);if(!j)return[{kind:"external",name:i.importedName,packageSpec:i.specifier}];let k=d.get(j);if(!k)return[];let l=k.symbolsByName.get(i.importedName);if(l){for(let a of l)if(!a.qualifiedName.includes(">")&&K(a.kind)){f=a;break}}return f?[{kind:"symbol",addr:{filePath:f.filePath,qualifiedName:f.qualifiedName}}]:[]},moduleForFile:(a,b)=>b?.fileToMod.get(a)??f().dirname(a)})},64949:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{g:()=>h});var e=c(33265),f=c(88395),g=a([e]);e=(g.then?(await g)():g)[0];let i=!1;function h(){i||(i=!0,(0,e.ih)((a,b)=>{f.t.subscribe(a,a=>{a.some(a=>"file"===a.type||"git"===a.type)&&b()})}))}d()}catch(a){d(a)}})},72891:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{OZ:()=>o,RL:()=>n,k9:()=>p,ok:()=>l});var e=c(37625),f=c(52693),g=c(18412),h=c(89705),i=c(94506),j=c(770),k=a([i]);i=(k.then?(await k)():k)[0];let l=(a,b=200)=>new Response(JSON.stringify(a),{status:b,headers:{"content-type":"application/json"}}),m=a=>{let b=e.od(a);if(f.Ru(b)){let a=b.value,c=(0,j.Sh)(a);return new Response(JSON.stringify({error:(a=>{let b=a.message;if("string"==typeof b&&b.length>0)return b;let c=a.cause;if(c instanceof Error&&c.message.length>0)return c.message;switch(a._tag){case"ValidationError":return`Invalid ${a.field}: ${a.reason}`;case"NotFoundError":return`${a.resource} not found: ${a.id}`;case"PermissionError":return`Permission denied: ${a.action} on ${a.resource}`;case"DBError":return`${a.db} ${a.op} failed`;case"FSError":return`${a.op} ${a.path} failed`;case"WSError":return`${a.proto} ${a.kind} failed`;case"AgentError":return`${a.provider} ${a.kind} failed`;default:return a._tag}})(a),tag:a._tag}),{status:c,headers:{"content-type":"application/json"}})}return console.error("[handler] uncaught defect:\n"+e.j9(a)),new Response(JSON.stringify({error:"Internal Server Error",tag:"InternalError"}),{status:500,headers:{"content-type":"application/json"}})},n=a=>async b=>{let c=await i.s9.runPromiseExit(a(b));return g.YW(c,{onFailure:a=>m(a),onSuccess:a=>a})},o=a=>async(b,c)=>{let d=await c.params,e=await i.s9.runPromiseExit(a(b,d));return g.YW(e,{onFailure:a=>m(a),onSuccess:a=>a})},p=a=>h.$mh({try:()=>a.json(),catch:()=>new j.yI({field:"body",reason:"invalid JSON"})});d()}catch(a){d(a)}})},86236:(a,b,c)=>{c.d(b,{I:()=>d});let d=new Set(["typescript","tsx","javascript","python","go","rust"])},87956:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{M:()=>j,b:()=>i});var e=c(12629),f=c(76760),g=c.n(f),h=a([e]);e=(h.then?(await h)():h)[0];let k=g().join(process.cwd(),"public","tree-sitter"),l=null,m=new Map,n=new Map;async function i(a){let b,c=n.get(a);if(c)return c;let d=await (!(b=m.get(a))&&(b=(async()=>(await (!l&&(l=e.Parser.init({locateFile:a=>g().join(k,a)})),l),e.Language.load(g().join(k,`tree-sitter-${a}.wasm`))))(),m.set(a,b)),b);return(c=new e.Parser).setLanguage(d),n.set(a,c),c}function j(a){switch(a.slice(a.lastIndexOf(".")).toLowerCase()){case".ts":return"typescript";case".tsx":case".jsx":return"tsx";case".js":case".mjs":case".cjs":return"javascript";case".py":case".pyi":return"python";case".go":return"go";case".rs":return"rust";default:return null}}d()}catch(a){d(a)}})},88395:(a,b,c)=>{c.d(b,{t:()=>l});var d=c(29021),e=c(33873),f=c(7939);let g=[".git/HEAD",".git/MERGE_HEAD",".git/REBASE_HEAD"],h=[".git/refs"];class i{subscribe(a,b){let c=this.watchers.get(a);return c||(c=this.createWatcher(a),this.watchers.set(a,c)),c.listeners.add(b),()=>{this.unsubscribe(a,b)}}unsubscribe(a,b){let c=this.watchers.get(a);if(c&&(c.listeners.delete(b),0===c.listeners.size)){for(let a of(c.debounceTimer&&clearTimeout(c.debounceTimer),c.throttleTimer&&clearTimeout(c.throttleTimer),c.cwdRestartTimer&&clearTimeout(c.cwdRestartTimer),c.watchers))try{a.close()}catch{}this.watchers.delete(a)}}createWatcher(a){let b={watchers:[],listeners:new Set,pendingEvents:[],debounceTimer:null,throttleTimer:null,cwdRestartTimer:null},c=a=>{b.pendingEvents.some(b=>b.type===a.type)||b.pendingEvents.push(a),b.debounceTimer&&clearTimeout(b.debounceTimer),b.debounceTimer=setTimeout(()=>{this.flush(b)},500),b.throttleTimer||(b.throttleTimer=setTimeout(()=>{this.flush(b)},3e3))},f=()=>{try{let e=(0,d.watch)(a,{recursive:!0},(a,b)=>{if(b&&!(b.startsWith(".next/")||b.startsWith("node_modules/"))){if(b.startsWith(".git/")){(".git/HEAD"===b||b.startsWith(".git/refs/"))&&c({type:"git"});return}c({type:"file"})}});e.on("error",c=>{console.error(`File watcher error for ${a}:`,c);let d=b.watchers.indexOf(e);-1!==d&&b.watchers.splice(d,1);try{e.close()}catch{}b.listeners.size>0&&!b.cwdRestartTimer&&(b.cwdRestartTimer=setTimeout(()=>{b.cwdRestartTimer=null,b.listeners.size>0&&f()},2e3))}),b.watchers.push(e)}catch(b){console.error(`Failed to watch ${a}:`,b)}};f();let i=function(a){let b=(0,e.join)(a,".git");try{if((0,d.statSync)(b).isDirectory())return b;let c=(0,d.readFileSync)(b,"utf-8").trim().match(/^gitdir:\s*(.+)$/);if(c)return(0,e.resolve)(a,c[1])}catch{}return b}(a),j=a=>{try{let e=(0,d.watch)(a,()=>{c({type:"git"});try{e.close()}catch{}let d=b.watchers.indexOf(e);-1!==d&&b.watchers.splice(d,1),b.listeners.size>0&&setTimeout(()=>j(a),50)});e.on("error",()=>{let c=b.watchers.indexOf(e);-1!==c&&b.watchers.splice(c,1),b.listeners.size>0&&(0,d.existsSync)(a)&&setTimeout(()=>j(a),500)}),b.watchers.push(e)}catch{}};for(let a of g){let b=a.replace(".git/","");j((0,e.join)(i,b))}for(let a of h){let f=a.replace(".git/","");try{let a=(0,d.watch)((0,e.join)(i,f),{recursive:!0},()=>{c({type:"git"})});a.on("error",()=>{}),b.watchers.push(a)}catch{}}return b}flush(a){if(a.debounceTimer&&(clearTimeout(a.debounceTimer),a.debounceTimer=null),a.throttleTimer&&(clearTimeout(a.throttleTimer),a.throttleTimer=null),0===a.pendingEvents.length)return;let b=[...a.pendingEvents];for(let c of(a.pendingEvents=[],a.listeners))try{c(b)}catch(a){console.error("File watcher callback error:",a)}}constructor(){this.watchers=new Map}}class j{subscribe(a){return this.listeners.add(a),this.watcher||this.start(),()=>{this.listeners.delete(a),0===this.listeners.size&&this.stop()}}start(){try{(0,d.existsSync)(f.Tb)||(0,d.mkdirSync)(f.Tb,{recursive:!0}),(0,d.existsSync)(f.jp)||(0,d.writeFileSync)(f.jp,"0"),this.watcher=(0,d.watch)(f.jp,()=>{this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.notify(),300)}),this.watcher.on("error",()=>{this.stop(),setTimeout(()=>{this.listeners.size>0&&this.start()},2e3)})}catch{}}stop(){if(this.watcher){try{this.watcher.close()}catch{}this.watcher=null}this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}notify(){for(let a of this.listeners)try{a()}catch(a){console.error("ReviewWatcher callback error:",a)}}constructor(){this.listeners=new Set,this.watcher=null,this.debounceTimer=null}}let k=globalThis,l=k.__cockpitFileWatcher??(k.__cockpitFileWatcher=new i);k.__cockpitReviewWatcher??(k.__cockpitReviewWatcher=new j)}};
@@ -0,0 +1,9 @@
1
+ "use strict";exports.id=3792,exports.ids=[3792],exports.modules={33792:(a,b,c)=>{c.r(b),c.d(b,{XtermRenderer:()=>am});var d,e,f,g=c(48249),h=c(67484),i=c(31002),j=class{activate(a){this._terminal=a}dispose(){}fit(){let a=this.proposeDimensions();if(!a||!this._terminal||isNaN(a.cols)||isNaN(a.rows))return;let b=this._terminal._core;(this._terminal.rows!==a.rows||this._terminal.cols!==a.cols)&&(b._renderService.clear(),this._terminal.resize(a.cols,a.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let a=this._terminal._core._renderService.dimensions;if(0===a.css.cell.width||0===a.css.cell.height)return;let b=0===this._terminal.options.scrollback?0:this._terminal.options.overviewRuler?.width||14,c=window.getComputedStyle(this._terminal.element.parentElement),d=parseInt(c.getPropertyValue("height")),e=Math.max(0,parseInt(c.getPropertyValue("width"))),f=window.getComputedStyle(this._terminal.element),g={top:parseInt(f.getPropertyValue("padding-top")),bottom:parseInt(f.getPropertyValue("padding-bottom")),right:parseInt(f.getPropertyValue("padding-right")),left:parseInt(f.getPropertyValue("padding-left"))},h=g.top+g.bottom;return{cols:Math.max(2,Math.floor((e-(g.right+g.left)-b)/a.css.cell.width)),rows:Math.max(1,Math.floor((d-h)/a.css.cell.height))}}},k=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(a){setTimeout(()=>{throw a.stack?o.isErrorNoTelemetry(a)?new o(a.message+`
2
+
3
+ `+a.stack):Error(a.message+`
4
+
5
+ `+a.stack):a},0)}}addListener(a){return this.listeners.push(a),()=>{this._removeListener(a)}}emit(a){this.listeners.forEach(b=>{b(a)})}_removeListener(a){this.listeners.splice(this.listeners.indexOf(a),1)}setUnexpectedErrorHandler(a){this.unexpectedErrorHandler=a}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(a){this.unexpectedErrorHandler(a),this.emit(a)}onUnexpectedExternalError(a){this.unexpectedErrorHandler(a)}};function l(a){var b;(b=a)instanceof n||b instanceof Error&&b.name===m&&b.message===m||k.onUnexpectedError(a)}var m="Canceled",n=class extends Error{constructor(){super(m),this.name=this.message}},o=class a extends Error{constructor(a){super(a),this.name="CodeExpectedError"}static fromError(b){if(b instanceof a)return b;let c=new a;return c.message=b.message,c.stack=b.stack,c}static isErrorNoTelemetry(a){return"CodeExpectedError"===a.name}};(E=F||={}).isLessThan=function(a){return a<0},E.isLessThanOrEqual=function(a){return a<=0},E.isGreaterThan=function(a){return a>0},E.isNeitherLessOrGreaterThan=function(a){return 0===a},E.greaterThan=1,E.lessThan=-1,E.neitherLessOrGreaterThan=0;var p=class a{constructor(a){this.iterate=a}forEach(a){this.iterate(b=>(a(b),!0))}toArray(){let a=[];return this.iterate(b=>(a.push(b),!0)),a}filter(b){return new a(a=>this.iterate(c=>!b(c)||a(c)))}map(b){return new a(a=>this.iterate(c=>a(b(c))))}some(a){let b=!1;return this.iterate(c=>!(b=a(c))),b}findFirst(a){let b;return this.iterate(c=>!a(c)||(b=c,!1)),b}findLast(a){let b;return this.iterate(c=>(a(c)&&(b=c),!0)),b}findLastMaxBy(a){let b,c=!0;return this.iterate(d=>((c||F.isGreaterThan(a(d,b)))&&(c=!1,b=d),!0)),b}};p.empty=new p(a=>{});(a=>{function b(a){return a&&"object"==typeof a&&"function"==typeof a[Symbol.iterator]}a.is=b;let c=Object.freeze([]);function*d(a){yield a}a.empty=function(){return c},a.single=d,a.wrap=function(a){return b(a)?a:d(a)},a.from=function(a){return a||c},a.reverse=function*(a){for(let b=a.length-1;b>=0;b--)yield a[b]},a.isEmpty=function(a){return!a||!0===a[Symbol.iterator]().next().done},a.first=function(a){return a[Symbol.iterator]().next().value},a.some=function(a,b){let c=0;for(let d of a)if(b(d,c++))return!0;return!1},a.find=function(a,b){for(let c of a)if(b(c))return c},a.filter=function*(a,b){for(let c of a)b(c)&&(yield c)},a.map=function*(a,b){let c=0;for(let d of a)yield b(d,c++)},a.flatMap=function*(a,b){let c=0;for(let d of a)yield*b(d,c++)},a.concat=function*(...a){for(let b of a)yield*b},a.reduce=function(a,b,c){let d=c;for(let c of a)d=b(d,c);return d},a.slice=function*(a,b,c=a.length){for(b<0&&(b+=a.length),c<0?c+=a.length:c>a.length&&(c=a.length);b<c;b++)yield a[b]},a.consume=function(b,c=1/0){let d=[];if(0===c)return[d,b];let e=b[Symbol.iterator]();for(let b=0;b<c;b++){let b=e.next();if(b.done)return[d,a.empty()];d.push(b.value)}return[d,{[Symbol.iterator]:()=>e}]},a.asyncToArray=async function(a){let b=[];for await(let c of a)b.push(c);return Promise.resolve(b)}})(G||={});function q(a){return a}function r(a){}function s(a,b){}function t(a){if(G.is(a)){let b=[];for(let c of a)if(c)try{c.dispose()}catch(a){b.push(a)}if(1===b.length)throw b[0];if(b.length>1)throw AggregateError(b,"Encountered errors while disposing of store");return Array.isArray(a)?[]:a}if(a)return a.dispose(),a}function u(...a){let b=v(()=>t(a));return function(a,b){!1}(a,b),b}function v(a){let b=q({dispose:function(a,b){let c=this,d=!1,e;return function(){if(d)return e;if(d=!0,b)try{e=a.apply(c,arguments)}finally{b()}else e=a.apply(c,arguments);return e}}(()=>{r(b),a()})});return b}var w=class a{constructor(){this._toDispose=new Set,this._isDisposed=!1,q(this)}dispose(){this._isDisposed||(r(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(0!==this._toDispose.size)try{t(this._toDispose)}finally{this._toDispose.clear()}}add(b){if(!b)return b;if(b===this)throw Error("Cannot register a disposable on itself!");return s(b,this),this._isDisposed?a.DISABLE_DISPOSED_WARNING||console.warn(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(b),b}delete(a){if(a){if(a===this)throw Error("Cannot dispose a disposable on itself!");this._toDispose.delete(a),a.dispose()}}deleteAndLeak(a){a&&this._toDispose.has(a)&&(this._toDispose.delete(a),s(a,null))}};w.DISABLE_DISPOSED_WARNING=!1;var x=class{constructor(){this._store=new w,q(this),s(this._store,this)}dispose(){r(this),this._store.dispose()}_register(a){if(a===this)throw Error("Cannot register a disposable on itself!");return this._store.add(a)}};x.None=Object.freeze({dispose(){}});var y=class{constructor(){this._isDisposed=!1,q(this)}get value(){return this._isDisposed?void 0:this._value}set value(a){this._isDisposed||a===this._value||(this._value?.dispose(),a&&s(a,this),this._value=a)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,r(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let a=this._value;return this._value=void 0,a&&s(a,null),a}},z=class a{constructor(b){this.element=b,this.next=a.Undefined,this.prev=a.Undefined}};z.Undefined=new z(void 0);var A=globalThis.performance&&"function"==typeof globalThis.performance.now,B=class a{static create(b){return new a(b)}constructor(a){this._now=A&&!1===a?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 -1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}};(a=>{function b(a){}function c(a){return(b,c=null,d)=>{let e=!1,f;return f=a(a=>{if(!e)return f?f.dispose():e=!0,b.call(c,a)},null,d),e&&f.dispose(),f}}function d(a,b,c){return f((c,d=null,e)=>a(a=>c.call(d,b(a)),null,e),c)}function e(a,b,c){return f((c,d=null,e)=>a(a=>b(a)&&c.call(d,a),null,e),c)}function f(a,c){let d,e={onWillAddFirstListener(){d=a(f.fire,f)},onDidRemoveLastListener(){d?.dispose()}};c||b(e);let f=new P(e);return c?.add(f),f.event}function g(a,c,d=100,e=!1,f=!1,h,i){let j,k,l,m=0,n,o={leakWarningThreshold:h,onWillAddFirstListener(){j=a(a=>{m++,k=c(k,a),e&&!l&&(p.fire(k),k=void 0),n=()=>{let a=k;k=void 0,l=void 0,(!e||m>1)&&p.fire(a),m=0},"number"==typeof d?(clearTimeout(l),l=setTimeout(n,d)):void 0===l&&(l=0,queueMicrotask(n))})},onWillRemoveListener(){f&&m>0&&n?.()},onDidRemoveLastListener(){n=void 0,j.dispose()}};i||b(o);let p=new P(o);return i?.add(p),p.event}a.None=()=>x.None,a.defer=function(a,b){return g(a,()=>{},0,void 0,!0,void 0,b)},a.once=c,a.map=d,a.forEach=function(a,b,c){return f((c,d=null,e)=>a(a=>{b(a),c.call(d,a)},null,e),c)},a.filter=e,a.signal=function(a){return a},a.any=function(...a){return(b,c=null,d)=>{var e,f;return e=u(...a.map(a=>a(a=>b.call(c,a)))),(f=d)instanceof Array?f.push(e):f&&f.add(e),e}},a.reduce=function(a,b,c,e){let f=c;return d(a,a=>f=b(f,a),e)},a.debounce=g,a.accumulate=function(b,c=0,d){return a.debounce(b,(a,b)=>a?(a.push(b),a):[b],c,void 0,!0,void 0,d)},a.latch=function(a,b=(a,b)=>a===b,c){let d=!0,f;return e(a,a=>{let c=d||!b(a,f);return d=!1,f=a,c},c)},a.split=function(b,c,d){return[a.filter(b,c,d),a.filter(b,a=>!c(a),d)]},a.buffer=function(a,b=!1,c=[],d){let e=c.slice(),f=a(a=>{e?e.push(a):h.fire(a)});d&&d.add(f);let g=()=>{e?.forEach(a=>h.fire(a)),e=null},h=new P({onWillAddFirstListener(){f||(f=a(a=>h.fire(a)),d&&d.add(f))},onDidAddFirstListener(){e&&(b?setTimeout(g):g())},onDidRemoveLastListener(){f&&f.dispose(),f=null}});return d&&d.add(h),h.event},a.chain=function(a,b){return(c,d,e)=>{let f=b(new i);return a(function(a){let b=f.evaluate(a);b!==h&&c.call(d,b)},void 0,e)}};let h=Symbol("HaltChainable");class i{constructor(){this.steps=[]}map(a){return this.steps.push(a),this}forEach(a){return this.steps.push(b=>(a(b),b)),this}filter(a){return this.steps.push(b=>a(b)?b:h),this}reduce(a,b){let c=b;return this.steps.push(b=>c=a(c,b)),this}latch(a=(a,b)=>a===b){let b=!0,c;return this.steps.push(d=>{let e=b||!a(d,c);return b=!1,c=d,e?d:h}),this}evaluate(a){for(let b of this.steps)if((a=b(a))===h)break;return a}}a.fromNodeEventEmitter=function(a,b,c=a=>a){let d=(...a)=>e.fire(c(...a)),e=new P({onWillAddFirstListener:()=>a.on(b,d),onDidRemoveLastListener:()=>a.removeListener(b,d)});return e.event},a.fromDOMEventEmitter=function(a,b,c=a=>a){let d=(...a)=>e.fire(c(...a)),e=new P({onWillAddFirstListener:()=>a.addEventListener(b,d),onDidRemoveLastListener:()=>a.removeEventListener(b,d)});return e.event},a.toPromise=function(a){return new Promise(b=>c(a)(b))},a.fromPromise=function(a){let b=new P;return a.then(a=>{b.fire(a)},()=>{b.fire(void 0)}).finally(()=>{b.dispose()}),b.event},a.forward=function(a,b){return a(a=>b.fire(a))},a.runAndSubscribe=function(a,b,c){return b(c),a(a=>b(a))};class j{constructor(a,c){this._observable=a,this._counter=0,this._hasChanged=!1;let d={onWillAddFirstListener:()=>{a.addObserver(this)},onDidRemoveLastListener:()=>{a.removeObserver(this)}};c||b(d),this.emitter=new P(d),c&&c.add(this.emitter)}beginUpdate(a){this._counter++}handlePossibleChange(a){}handleChange(a,b){this._hasChanged=!0}endUpdate(a){this._counter--,0===this._counter&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}a.fromObservable=function(a,b){return new j(a,b).emitter.event},a.fromObservableLight=function(a){return(b,c,d)=>{let e=0,f=!1,g={beginUpdate(){e++},endUpdate(){0==--e&&(a.reportChanges(),f&&(f=!1,b.call(c)))},handlePossibleChange(){},handleChange(){f=!0}};a.addObserver(g),a.reportChanges();let h={dispose(){a.removeObserver(g)}};return d instanceof w?d.add(h):Array.isArray(d)&&d.push(h),h}}})(H||={});var C=class a{constructor(b){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${b}_${a._idPool++}`,a.all.add(this)}start(a){this._stopWatch=new B,this.listenerCount=a}stop(){if(this._stopWatch){let a=this._stopWatch.elapsed();this.durations.push(a),this.elapsedOverall+=a,this.invocationCount+=1,this._stopWatch=void 0}}};C.all=new Set,C._idPool=0;var D=class a{constructor(b,c,d=(a._idPool++).toString(16).padStart(3,"0")){this._errorHandler=b,this.threshold=c,this.name=d,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(a,b){let c=this.threshold;if(c<=0||b<c)return;this._stacks||(this._stacks=new Map);let d=this._stacks.get(a.value)||0;if(this._stacks.set(a.value,d+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=.5*c;let[a,d]=this.getMostFrequentStack(),e=`[${this.name}] potential listener LEAK detected, having ${b} listeners already. MOST frequent listener (${d}):`;console.warn(e),console.warn(a);let f=new K(e,a);this._errorHandler(f)}return()=>{let b=this._stacks.get(a.value)||0;this._stacks.set(a.value,b-1)}}getMostFrequentStack(){if(!this._stacks)return;let a,b=0;for(let[c,d]of this._stacks)(!a||b<d)&&(a=[c,d],b=d);return a}};D._idPool=1;var E,F,G,H,I,J=class a{constructor(a){this.value=a}static create(){return new a(Error().stack??"")}print(){console.warn(this.value.split(`
6
+ `).slice(2).join(`
7
+ `))}},K=class extends Error{constructor(a,b){super(a),this.name="ListenerLeakError",this.stack=b}},L=class extends Error{constructor(a,b){super(a),this.name="ListenerRefusalError",this.stack=b}},M=0,N=class{constructor(a){this.value=a,this.id=M++}},O,P=class{constructor(a){this._size=0,this._options=a,this._leakageMon=this._options?.leakWarningThreshold?new D(a?.onListenerError??l,this._options?.leakWarningThreshold??-1):void 0,this._perfMon=this._options?._profName?new C(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??=(a,b,c)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let a=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(a);let b=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new L(`${a}. HINT: Stack shows most frequent listener (${b[1]}-times)`,b[0]);return(this._options?.onListenerError||l)(c),x.None}if(this._disposed)return x.None;b&&(a=a.bind(b));let d=new N(a),e;this._leakageMon&&this._size>=Math.ceil(.2*this._leakageMon.threshold)&&(d.stack=J.create(),e=this._leakageMon.check(d.stack,this._size+1)),this._listeners?this._listeners instanceof N?(this._deliveryQueue??=new Q,this._listeners=[this._listeners,d]):this._listeners.push(d):(this._options?.onWillAddFirstListener?.(this),this._listeners=d,this._options?.onDidAddFirstListener?.(this)),this._size++;let f=v(()=>{I?.unregister(f),e?.(),this._removeListener(d)});if(c instanceof w?c.add(f):Array.isArray(c)&&c.push(f),I){let a=Error().stack.split(`
8
+ `).slice(2,3).join(`
9
+ `).trim(),b=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(a);I.register(f,b?.[2]??a,f)}return f},this._event}_removeListener(a){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(1===this._size){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let b=this._listeners,c=b.indexOf(a);if(-1===c)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),Error("Attempted to dispose unknown listener");this._size--,b[c]=void 0;let d=this._deliveryQueue.current===this;if(2*this._size<=b.length){let a=0;for(let c=0;c<b.length;c++)b[c]?b[a++]=b[c]:d&&(this._deliveryQueue.end--,a<this._deliveryQueue.i&&this._deliveryQueue.i--);b.length=a}}_deliver(a,b){if(!a)return;let c=this._options?.onListenerError||l;if(!c)return void a.value(b);try{a.value(b)}catch(a){c(a)}}_deliverQueue(a){let b=a.current._listeners;for(;a.i<a.end;)this._deliver(b[a.i++],a.value);a.reset()}fire(a){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof N)this._deliver(this._listeners,a);else{let b=this._deliveryQueue;b.enqueue(this,a,this._listeners.length),this._deliverQueue(b)}this._perfMon?.stop()}hasListeners(){return this._size>0}},Q=class{constructor(){this.i=-1,this.end=0}enqueue(a,b,c){this.i=0,this.end=c,this.current=a,this.value=b}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},R=Object.freeze(function(a,b){let c=setTimeout(a.bind(b),0);return{dispose(){clearTimeout(c)}}});(S=O||={}).isCancellationToken=function(a){return a===S.None||a===S.Cancelled||a instanceof V||!!a&&"object"==typeof a&&"boolean"==typeof a.isCancellationRequested&&"function"==typeof a.onCancellationRequested},S.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:H.None}),S.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:R});var S,T,U,V=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?R:(this._emitter||(this._emitter=new P),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},W=!1,X="en",Y=globalThis;"u">typeof Y.vscode&&"u">typeof Y.vscode.process?U=Y.vscode.process:"u">typeof process&&"string"==typeof process?.versions?.node&&(U=process);var Z="string"==typeof U?.versions?.electron&&U?.type==="renderer";if("object"==typeof U){U.platform,U.platform,"linux"===U.platform&&U.env.SNAP&&U.env.SNAP_REVISION,U.env.CI||U.env.BUILD_ARTIFACTSTAGINGDIRECTORY,X="en";let a=U.env.VSCODE_NLS_CONFIG;if(a)try{let b=JSON.parse(a);b.userLocale,b.osLocale,X=b.resolvedLanguage||"en",b.languagePack?.translationsConfigFile}catch{}}else"object"!=typeof navigator||Z?console.error("Unable to resolve platform."):((T=navigator.userAgent).indexOf("Windows"),T.indexOf("Macintosh"),(T.indexOf("Macintosh")>=0||T.indexOf("iPad")>=0||T.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints,T.indexOf("Linux"),T?.indexOf("Mobi"),W=!0,X=globalThis._VSCODE_NLS_LANGUAGE||"en",navigator.language.toLowerCase());W&&"function"==typeof Y.importScripts&&Y.origin;var $,_=T,aa=X;(d=$||={}).value=function(){return aa},d.isDefaultVariant=function(){return 2===aa.length?"en"===aa:aa.length>=3&&"e"===aa[0]&&"n"===aa[1]&&"-"===aa[2]},d.isDefault=function(){return"en"===aa};var ab="function"==typeof Y.postMessage&&!Y.importScripts,ac=(()=>{if(ab){let a=[];Y.addEventListener("message",b=>{if(b.data&&b.data.vscodeScheduleAsyncWork)for(let c=0,d=a.length;c<d;c++){let d=a[c];if(d.id===b.data.vscodeScheduleAsyncWork){a.splice(c,1),d.callback();return}}});let b=0;return c=>{let d=++b;a.push({id:d,callback:c}),Y.postMessage({vscodeScheduleAsyncWork:d},"*")}}return a=>setTimeout(a)})(),ad=!!(_&&_.indexOf("Chrome")>=0);function ae(a,b=0,c){let d=setTimeout(()=>{a(),c&&e.dispose()},b),e=v(()=>{clearTimeout(d),c?.deleteAndLeak(e)});return c?.add(e),e}_&&_.indexOf("Firefox"),!ad&&_&&_.indexOf("Safari"),_&&_.indexOf("Edg/"),_&&_.indexOf("Android"),Symbol("MicrotaskDelay"),(e=f||={}).settled=async function(a){let b,c=await Promise.all(a.map(a=>a.then(a=>a,a=>{b||(b=a)})));if("u">typeof b)throw b;return c},e.withAsyncBody=function(a){return new Promise(async(b,c)=>{try{await a(b,c)}catch(a){c(a)}})};var af=class a{static fromArray(b){return new a(a=>{a.emitMany(b)})}static fromPromise(b){return new a(async a=>{a.emitMany(await b)})}static fromPromises(b){return new a(async a=>{await Promise.all(b.map(async b=>a.emitOne(await b)))})}static merge(b){return new a(async a=>{await Promise.all(b.map(async b=>{for await(let c of b)a.emitOne(c)}))})}constructor(a,b){this._state=0,this._results=[],this._error=null,this._onReturn=b,this._onStateChanged=new P,queueMicrotask(async()=>{let b={emitOne:a=>this.emitOne(a),emitMany:a=>this.emitMany(a),reject:a=>this.reject(a)};try{await Promise.resolve(a(b)),this.resolve()}catch(a){this.reject(a)}finally{b.emitOne=void 0,b.emitMany=void 0,b.reject=void 0}})}[Symbol.asyncIterator](){let a=0;return{next:async()=>{for(;;){if(2===this._state)throw this._error;if(a<this._results.length)return{done:!1,value:this._results[a++]};if(1===this._state)return{done:!0,value:void 0};await H.toPromise(this._onStateChanged.event)}},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(b,c){return new a(async a=>{for await(let d of b)a.emitOne(c(d))})}map(b){return a.map(this,b)}static filter(b,c){return new a(async a=>{for await(let d of b)c(d)&&a.emitOne(d)})}filter(b){return a.filter(this,b)}static coalesce(b){return a.filter(b,a=>!!a)}coalesce(){return a.coalesce(this)}static async toPromise(a){let b=[];for await(let c of a)b.push(c);return b}toPromise(){return a.toPromise(this)}emitOne(a){0===this._state&&(this._results.push(a),this._onStateChanged.fire())}emitMany(a){0===this._state&&(this._results=this._results.concat(a),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(a){0===this._state&&(this._state=2,this._error=a,this._onStateChanged.fire())}};af.EMPTY=af.fromArray([]);var ag=class extends x{constructor(a){super(),this._terminal=a,this._linesCacheTimeout=this._register(new y),this._linesCacheDisposables=this._register(new y),this._register(v(()=>this._destroyLinesCache()))}initLinesCache(){this._linesCache||(this._linesCache=Array(this._terminal.buffer.active.length),this._linesCacheDisposables.value=u(this._terminal.onLineFeed(()=>this._destroyLinesCache()),this._terminal.onCursorMove(()=>this._destroyLinesCache()),this._terminal.onResize(()=>this._destroyLinesCache()))),this._linesCacheTimeout.value=ae(()=>this._destroyLinesCache(),15e3)}_destroyLinesCache(){this._linesCache=void 0,this._linesCacheDisposables.clear(),this._linesCacheTimeout.clear()}getLineFromCache(a){return this._linesCache?.[a]}setLineInCache(a,b){this._linesCache&&(this._linesCache[a]=b)}translateBufferLineToStringWithWrap(a,b){let c=[],d=[0],e=this._terminal.buffer.active.getLine(a);for(;e;){let f=this._terminal.buffer.active.getLine(a+1),g=!!f&&f.isWrapped,h=e.translateToString(!g&&b);if(g&&f){let a=e.getCell(e.length-1);a&&0===a.getCode()&&1===a.getWidth()&&f.getCell(0)?.getWidth()===2&&(h=h.slice(0,-1))}if(c.push(h),g)d.push(d[d.length-1]+h.length);else break;a++,e=f}return[c.join(""),d]}},ah=class{get cachedSearchTerm(){return this._cachedSearchTerm}set cachedSearchTerm(a){this._cachedSearchTerm=a}get lastSearchOptions(){return this._lastSearchOptions}set lastSearchOptions(a){this._lastSearchOptions=a}isValidSearchTerm(a){return!!(a&&a.length>0)}didOptionsChange(a){return!this._lastSearchOptions||!!a&&(this._lastSearchOptions.caseSensitive!==a.caseSensitive||this._lastSearchOptions.regex!==a.regex||this._lastSearchOptions.wholeWord!==a.wholeWord)}shouldUpdateHighlighting(a,b){return!!b?.decorations&&(void 0===this._cachedSearchTerm||a!==this._cachedSearchTerm||this.didOptionsChange(b))}clearCachedTerm(){this._cachedSearchTerm=void 0}reset(){this._cachedSearchTerm=void 0,this._lastSearchOptions=void 0}},ai=class{constructor(a,b){this._terminal=a,this._lineCache=b}find(a,b,c,d){if(!a||0===a.length)return void this._terminal.clearSelection();if(c>this._terminal.cols)throw Error(`Invalid col: ${c} to search in terminal of ${this._terminal.cols} cols`);this._lineCache.initLinesCache();let e={startRow:b,startCol:c},f=this._findInLine(a,e,d);if(!f)for(let c=b+1;c<this._terminal.buffer.active.baseY+this._terminal.rows&&(e.startRow=c,e.startCol=0,!(f=this._findInLine(a,e,d)));c++);return f}findNextWithSelection(a,b,c){if(!a||0===a.length)return void this._terminal.clearSelection();let d=this._terminal.getSelectionPosition();this._terminal.clearSelection();let e=0,f=0;d&&(c===a?(e=d.end.x,f=d.end.y):(e=d.start.x,f=d.start.y)),this._lineCache.initLinesCache();let g={startRow:f,startCol:e},h=this._findInLine(a,g,b);if(!h)for(let c=f+1;c<this._terminal.buffer.active.baseY+this._terminal.rows&&(g.startRow=c,g.startCol=0,!(h=this._findInLine(a,g,b)));c++);if(!h&&0!==f)for(let c=0;c<f&&(g.startRow=c,g.startCol=0,!(h=this._findInLine(a,g,b)));c++);return!h&&d&&(g.startRow=d.start.y,g.startCol=0,h=this._findInLine(a,g,b)),h}findPreviousWithSelection(a,b,c){if(!a||0===a.length)return void this._terminal.clearSelection();let d=this._terminal.getSelectionPosition();this._terminal.clearSelection();let e=this._terminal.buffer.active.baseY+this._terminal.rows-1,f=this._terminal.cols;this._lineCache.initLinesCache();let g={startRow:e,startCol:f},h;if(d&&(g.startRow=e=d.start.y,g.startCol=f=d.start.x,c!==a&&((h=this._findInLine(a,g,b,!1))||(g.startRow=e=d.end.y,g.startCol=f=d.end.x))),h||(h=this._findInLine(a,g,b,!0)),!h){g.startCol=Math.max(g.startCol,this._terminal.cols);for(let c=e-1;c>=0&&(g.startRow=c,!(h=this._findInLine(a,g,b,!0)));c--);}if(!h&&e!==this._terminal.buffer.active.baseY+this._terminal.rows-1)for(let c=this._terminal.buffer.active.baseY+this._terminal.rows-1;c>=e&&(g.startRow=c,!(h=this._findInLine(a,g,b,!0)));c--);return h}_isWholeWord(a,b,c){return(0===a||" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?".includes(b[a-1]))&&(a+c.length===b.length||" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?".includes(b[a+c.length]))}_findInLine(a,b,c={},d=!1){let e=b.startRow,f=b.startCol;if(this._terminal.buffer.active.getLine(e)?.isWrapped){if(d){b.startCol+=this._terminal.cols;return}return b.startRow--,b.startCol+=this._terminal.cols,this._findInLine(a,b,c)}let g=this._lineCache.getLineFromCache(e);g||(g=this._lineCache.translateBufferLineToStringWithWrap(e,!0),this._lineCache.setLineInCache(e,g));let[h,i]=g,j=this._bufferColsToStringOffset(e,f),k=a,l=h;c.regex||(k=c.caseSensitive?a:a.toLowerCase(),l=c.caseSensitive?h:h.toLowerCase());let m=-1;if(c.regex){let b=RegExp(k,c.caseSensitive?"g":"gi"),e;if(d)for(;e=b.exec(l.slice(0,j));)m=b.lastIndex-e[0].length,a=e[0],b.lastIndex-=a.length-1;else(e=b.exec(l.slice(j)))&&e[0].length>0&&(m=j+(b.lastIndex-e[0].length),a=e[0])}else d?j-k.length>=0&&(m=l.lastIndexOf(k,j-k.length)):m=l.indexOf(k,j);if(m>=0){if(c.wholeWord&&!this._isWholeWord(m,l,a))return;let b=0;for(;b<i.length-1&&m>=i[b+1];)b++;let d=b;for(;d<i.length-1&&m+a.length>=i[d+1];)d++;let f=m-i[b],g=m+a.length-i[d],h=this._stringLengthToBufferSize(e+b,f),j=this._stringLengthToBufferSize(e+d,g)-h+this._terminal.cols*(d-b);return{term:a,col:h,row:e+b,size:j}}}_stringLengthToBufferSize(a,b){let c=this._terminal.buffer.active.getLine(a);if(!c)return 0;for(let a=0;a<b;a++){let d=c.getCell(a);if(!d)break;let e=d.getChars();e.length>1&&(b-=e.length-1);let f=c.getCell(a+1);f&&0===f.getWidth()&&b++}return b}_bufferColsToStringOffset(a,b){let c=a,d=0,e=this._terminal.buffer.active.getLine(c);for(;b>0&&e;){for(let a=0;a<b&&a<this._terminal.cols;a++){let b=e.getCell(a);if(!b)break;b.getWidth()&&(d+=0===b.getCode()?1:b.getChars().length)}if(c++,(e=this._terminal.buffer.active.getLine(c))&&!e.isWrapped)break;b-=this._terminal.cols}return d}},aj=class extends x{constructor(a){super(),this._terminal=a,this._highlightDecorations=[],this._highlightedLines=new Set,this._register(v(()=>this.clearHighlightDecorations()))}createHighlightDecorations(a,b){for(let c of(this.clearHighlightDecorations(),a)){let a=this._createResultDecorations(c,b,!1);if(a)for(let b of a)this._storeDecoration(b,c)}}createActiveDecoration(a,b){let c=this._createResultDecorations(a,b,!0);if(c)return{decorations:c,match:a,dispose(){t(c)}}}clearHighlightDecorations(){t(this._highlightDecorations),this._highlightDecorations=[],this._highlightedLines.clear()}_storeDecoration(a,b){this._highlightedLines.add(a.marker.line),this._highlightDecorations.push({decoration:a,match:b,dispose(){a.dispose()}})}_applyStyles(a,b,c){a.classList.contains("xterm-find-result-decoration")||(a.classList.add("xterm-find-result-decoration"),b&&(a.style.outline=`1px solid ${b}`)),c&&a.classList.add("xterm-find-active-result-decoration")}_createResultDecorations(a,b,c){let d=[],e=a.col,f=a.size,g=-this._terminal.buffer.active.baseY-this._terminal.buffer.active.cursorY+a.row;for(;f>0;){let a=Math.min(this._terminal.cols-e,f);d.push([g,e,a]),e=0,f-=a,g++}let h=[];for(let a of d){let d=this._terminal.registerMarker(a[0]),e=this._terminal.registerDecoration({marker:d,x:a[1],width:a[2],backgroundColor:c?b.activeMatchBackground:b.matchBackground,overviewRulerOptions:this._highlightedLines.has(d.line)?void 0:{color:c?b.activeMatchColorOverviewRuler:b.matchOverviewRuler,position:"center"}});if(e){let a=[];a.push(d),a.push(e.onRender(a=>this._applyStyles(a,c?b.activeMatchBorder:b.matchBorder,!1))),a.push(e.onDispose(()=>t(a))),h.push(e)}}return 0===h.length?void 0:h}},ak=class extends x{constructor(){super(...arguments),this._searchResults=[],this._onDidChangeResults=this._register(new P)}get onDidChangeResults(){return this._onDidChangeResults.event}get searchResults(){return this._searchResults}get selectedDecoration(){return this._selectedDecoration}set selectedDecoration(a){this._selectedDecoration=a}updateResults(a,b){this._searchResults=a.slice(0,b)}clearResults(){this._searchResults=[]}clearSelectedDecoration(){this._selectedDecoration&&(this._selectedDecoration.dispose(),this._selectedDecoration=void 0)}findResultIndex(a){for(let b=0;b<this._searchResults.length;b++){let c=this._searchResults[b];if(c.row===a.row&&c.col===a.col&&c.size===a.size)return b}return -1}fireResultsChanged(a){if(!a)return;let b=-1;this._selectedDecoration&&(b=this.findResultIndex(this._selectedDecoration.match)),this._onDidChangeResults.fire({resultIndex:b,resultCount:this._searchResults.length})}reset(){this.clearSelectedDecoration(),this.clearResults()}},al=class extends x{constructor(a){super(),this._highlightTimeout=this._register(new y),this._lineCache=this._register(new y),this._state=new ah,this._resultTracker=this._register(new ak),this._highlightLimit=a?.highlightLimit??1e3}get onDidChangeResults(){return this._resultTracker.onDidChangeResults}activate(a){this._terminal=a,this._lineCache.value=new ag(a),this._engine=new ai(a,this._lineCache.value),this._decorationManager=new aj(a),this._register(this._terminal.onWriteParsed(()=>this._updateMatches())),this._register(this._terminal.onResize(()=>this._updateMatches())),this._register(v(()=>this.clearDecorations()))}_updateMatches(){this._highlightTimeout.clear(),this._state.cachedSearchTerm&&this._state.lastSearchOptions?.decorations&&(this._highlightTimeout.value=ae(()=>{let a=this._state.cachedSearchTerm;this._state.clearCachedTerm(),this.findPrevious(a,{...this._state.lastSearchOptions,incremental:!0},{noScroll:!0})},200))}clearDecorations(a){this._resultTracker.clearSelectedDecoration(),this._decorationManager?.clearHighlightDecorations(),this._resultTracker.clearResults(),a||this._state.clearCachedTerm()}clearActiveDecoration(){this._resultTracker.clearSelectedDecoration()}findNext(a,b,c){if(!this._terminal||!this._engine)throw Error("Cannot use addon until it has been loaded");this._state.lastSearchOptions=b,this._state.shouldUpdateHighlighting(a,b)&&this._highlightAllMatches(a,b);let d=this._findNextAndSelect(a,b,c);return this._fireResults(b),this._state.cachedSearchTerm=a,d}_highlightAllMatches(a,b){if(!this._terminal||!this._engine||!this._decorationManager)throw Error("Cannot use addon until it has been loaded");if(!this._state.isValidSearchTerm(a))return void this.clearDecorations();this.clearDecorations(!0);let c=[],d,e=this._engine.find(a,0,0,b);for(;e&&(d?.row!==e.row||d?.col!==e.col)&&!(c.length>=this._highlightLimit);)d=e,c.push(d),e=this._engine.find(a,d.col+d.term.length>=this._terminal.cols?d.row+1:d.row,d.col+d.term.length>=this._terminal.cols?0:d.col+1,b);this._resultTracker.updateResults(c,this._highlightLimit),b.decorations&&this._decorationManager.createHighlightDecorations(c,b.decorations)}_findNextAndSelect(a,b,c){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(a))return this._terminal.clearSelection(),this.clearDecorations(),!1;let d=this._engine.findNextWithSelection(a,b,this._state.cachedSearchTerm);return this._selectResult(d,b?.decorations,c?.noScroll)}findPrevious(a,b,c){if(!this._terminal||!this._engine)throw Error("Cannot use addon until it has been loaded");this._state.lastSearchOptions=b,this._state.shouldUpdateHighlighting(a,b)&&this._highlightAllMatches(a,b);let d=this._findPreviousAndSelect(a,b,c);return this._fireResults(b),this._state.cachedSearchTerm=a,d}_fireResults(a){this._resultTracker.fireResultsChanged(!!a?.decorations)}_findPreviousAndSelect(a,b,c){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(a))return this._terminal.clearSelection(),this.clearDecorations(),!1;let d=this._engine.findPreviousWithSelection(a,b,this._state.cachedSearchTerm);return this._selectResult(d,b?.decorations,c?.noScroll)}_selectResult(a,b,c){if(!this._terminal||!this._decorationManager)return!1;if(this._resultTracker.clearSelectedDecoration(),!a)return this._terminal.clearSelection(),!1;if(this._terminal.select(a.col,a.row,a.size),b){let c=this._decorationManager.createActiveDecoration(a,b);c&&(this._resultTracker.selectedDecoration=c)}if(!c&&(a.row>=this._terminal.buffer.active.viewportY+this._terminal.rows||a.row<this._terminal.buffer.active.viewportY)){let b=a.row-this._terminal.buffer.active.viewportY;b-=Math.floor(this._terminal.rows/2),this._terminal.scrollLines(b)}return!0}};let am=(0,h.memo)((0,h.forwardRef)(function({output:a,isRunning:b,onInput:c,onResize:d,maximized:e,height:f,directWrite:k},l){let m=(0,h.useRef)(null),n=(0,h.useRef)(null),o=(0,h.useRef)(null),p=(0,h.useRef)(null),q=(0,h.useRef)(0),r=(0,h.useRef)(c),s=(0,h.useRef)(d);(0,h.useEffect)(()=>{r.current=c},[c]),(0,h.useEffect)(()=>{s.current=d},[d]),(0,h.useImperativeHandle)(l,()=>({findNext:a=>p.current?.findNext(a,{caseSensitive:!1,decorations:{matchBackground:"#facc1550",matchBorder:"#facc15",matchOverviewRuler:"#facc15",activeMatchBackground:"#facc1590",activeMatchBorder:"#facc15",activeMatchColorOverviewRuler:"#facc15"}})??!1,findPrevious:a=>p.current?.findPrevious(a,{caseSensitive:!1,decorations:{matchBackground:"#facc1550",matchBorder:"#facc15",matchOverviewRuler:"#facc15",activeMatchBackground:"#facc1590",activeMatchBorder:"#facc15",activeMatchColorOverviewRuler:"#facc15"}})??!1,clearSearch:()=>{p.current?.clearDecorations()},write:a=>{n.current?.write(a)},reset:()=>{n.current?.reset()}}),[]),(0,h.useEffect)(()=>{if(!m.current)return;let a=new i.B({convertEol:!1,scrollback:5e3,fontSize:13,fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace',cursorStyle:"block",cursorBlink:!0,disableStdin:!1,allowProposedApi:!0,theme:{background:"transparent",foreground:"#d4d4d8",cursor:"#d4d4d8",cursorAccent:"#1a1a2e",selectionBackground:"#3b82f680",black:"#27272a",red:"#f87171",green:"#4ade80",yellow:"#facc15",blue:"#60a5fa",magenta:"#c084fc",cyan:"#22d3ee",white:"#e4e4e7",brightBlack:"#52525b",brightRed:"#fca5a5",brightGreen:"#86efac",brightYellow:"#fde047",brightBlue:"#93c5fd",brightMagenta:"#d8b4fe",brightCyan:"#67e8f9",brightWhite:"#fafafa"}}),b=new j,c=new al;a.loadAddon(b),a.loadAddon(c),a.open(m.current);let d=b=>a.parser.registerOscHandler(b,()=>!0);d(10),d(11),d(12),d(4),d(52);let e=(b,c)=>a.parser.registerCsiHandler({prefix:c,final:b},()=>!0);e("n"),e("n","?"),e("c"),e("c",">"),e("c","=");let f=/\x1b\][0-9]+;[^\x07\x1b]*(?:\x07|\x1b\\)|\x1b\[[\d;?>=]*[Rc]/g;a.onData(a=>{let b=a.replace(f,"");b&&r.current&&r.current(b)});try{b.fit(),s.current&&s.current(a.cols,a.rows)}catch{}return n.current=a,o.current=b,p.current=c,q.current=0,()=>{a.dispose(),n.current=null,o.current=null,p.current=null,q.current=0}},[]),(0,h.useEffect)(()=>{if(k)return;let b=n.current;if(!b)return;let c=!1;if(a.length<q.current&&(b.reset(),q.current=0,c=!0),a.length>q.current){let c=a.slice(q.current);b.write(c),q.current=a.length}c&&r.current&&requestAnimationFrame(()=>b.focus())},[a,k]),(0,h.useEffect)(()=>{b&&n.current&&n.current.focus()},[b]);let t=(0,h.useCallback)(()=>{let a=n.current,b=o.current;if(a&&b)try{b.fit(),s.current&&s.current(a.cols,a.rows)}catch{}},[]);return(0,h.useEffect)(()=>{requestAnimationFrame(()=>{t(),requestAnimationFrame(t)})},[e,t]),(0,h.useEffect)(()=>{let a=m.current;if(!a)return;let b=new ResizeObserver(t);return b.observe(a),()=>b.disconnect()},[t]),(0,g.jsx)("div",{ref:m,className:"xterm-renderer px-2",style:{height:f??"100%",overflow:"hidden"}})}))}};