@surething/cockpit 1.0.272 → 1.0.273

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 (674) hide show
  1. package/.next-prod/BUILD_ID +1 -1
  2. package/.next-prod/app-path-routes-manifest.json +5 -4
  3. package/.next-prod/build-manifest.json +2 -2
  4. package/.next-prod/cockpit-build.json +1 -1
  5. package/.next-prod/prerender-manifest.json +3 -3
  6. package/.next-prod/routes-manifest.json +6 -0
  7. package/.next-prod/server/app/_global-error/page.js +2 -2
  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/_tree.segment.rsc +1 -1
  15. package/.next-prod/server/app/_not-found/page.js +1 -1
  16. package/.next-prod/server/app/_not-found/page.js.nft.json +1 -1
  17. package/.next-prod/server/app/_not-found/page_client-reference-manifest.js +1 -1
  18. package/.next-prod/server/app/_not-found.html +2 -2
  19. package/.next-prod/server/app/_not-found.rsc +3 -3
  20. package/.next-prod/server/app/_not-found.segments/_full.segment.rsc +3 -3
  21. package/.next-prod/server/app/_not-found.segments/_index.segment.rsc +3 -3
  22. package/.next-prod/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  23. package/.next-prod/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  24. package/.next-prod/server/app/api/agent/test/route.js +1 -1
  25. package/.next-prod/server/app/api/agent/test/route.js.nft.json +1 -1
  26. package/.next-prod/server/app/api/bash/route.js +1 -1
  27. package/.next-prod/server/app/api/bash/route.js.nft.json +1 -1
  28. package/.next-prod/server/app/api/chat/codex/route.js +1 -1
  29. package/.next-prod/server/app/api/chat/codex/route.js.nft.json +1 -1
  30. package/.next-prod/server/app/api/chat/deepseek/route.js +1 -1
  31. package/.next-prod/server/app/api/chat/deepseek/route.js.nft.json +1 -1
  32. package/.next-prod/server/app/api/chat/glm/route.js +1 -1
  33. package/.next-prod/server/app/api/chat/glm/route.js.nft.json +1 -1
  34. package/.next-prod/server/app/api/chat/kimi/route.js +1 -1
  35. package/.next-prod/server/app/api/chat/kimi/route.js.nft.json +1 -1
  36. package/.next-prod/server/app/api/chat/ollama/route.js +1 -1
  37. package/.next-prod/server/app/api/chat/ollama/route.js.nft.json +1 -1
  38. package/.next-prod/server/app/api/chat/route.js +1 -1
  39. package/.next-prod/server/app/api/chat/route.js.nft.json +1 -1
  40. package/.next-prod/server/app/api/chat/stop/route.js +1 -1
  41. package/.next-prod/server/app/api/chat/stop/route.js.nft.json +1 -1
  42. package/.next-prod/server/app/api/claude-stats/route.js +1 -1
  43. package/.next-prod/server/app/api/claude-stats/route.js.nft.json +1 -1
  44. package/.next-prod/server/app/api/commands/route.js +1 -1
  45. package/.next-prod/server/app/api/commands/route.js.nft.json +1 -1
  46. package/.next-prod/server/app/api/comments/route.js +1 -1
  47. package/.next-prod/server/app/api/comments/route.js.nft.json +1 -1
  48. package/.next-prod/server/app/api/db/columns/route.js +1 -1
  49. package/.next-prod/server/app/api/db/columns/route.js.nft.json +1 -1
  50. package/.next-prod/server/app/api/db/connect/route.js +2 -2
  51. package/.next-prod/server/app/api/db/connect/route.js.nft.json +1 -1
  52. package/.next-prod/server/app/api/db/disconnect/route.js +1 -1
  53. package/.next-prod/server/app/api/db/disconnect/route.js.nft.json +1 -1
  54. package/.next-prod/server/app/api/db/export/route.js +1 -1
  55. package/.next-prod/server/app/api/db/export/route.js.nft.json +1 -1
  56. package/.next-prod/server/app/api/db/query/route.js +1 -1
  57. package/.next-prod/server/app/api/db/query/route.js.nft.json +1 -1
  58. package/.next-prod/server/app/api/db/schemas/route.js +2 -2
  59. package/.next-prod/server/app/api/db/schemas/route.js.nft.json +1 -1
  60. package/.next-prod/server/app/api/deepseek/balance/route.js +1 -1
  61. package/.next-prod/server/app/api/deepseek/balance/route.js.nft.json +1 -1
  62. package/.next-prod/server/app/api/deepseek/credentials/route.js +1 -1
  63. package/.next-prod/server/app/api/deepseek/credentials/route.js.nft.json +1 -1
  64. package/.next-prod/server/app/api/deepseek/models/route.js +1 -1
  65. package/.next-prod/server/app/api/deepseek/models/route.js.nft.json +1 -1
  66. package/.next-prod/server/app/api/dev/spans/route.js +1 -1
  67. package/.next-prod/server/app/api/dev/spans/route.js.nft.json +1 -1
  68. package/.next-prod/server/app/api/extension/version/route.js +1 -1
  69. package/.next-prod/server/app/api/extension/version/route.js.nft.json +1 -1
  70. package/.next-prod/server/app/api/file/route.js +1 -1
  71. package/.next-prod/server/app/api/file/route.js.nft.json +1 -1
  72. package/.next-prod/server/app/api/files/blame/route.js +1 -1
  73. package/.next-prod/server/app/api/files/blame/route.js.nft.json +1 -1
  74. package/.next-prod/server/app/api/files/clipboard/route.js +1 -1
  75. package/.next-prod/server/app/api/files/clipboard/route.js.nft.json +1 -1
  76. package/.next-prod/server/app/api/files/copy/route.js +1 -1
  77. package/.next-prod/server/app/api/files/copy/route.js.nft.json +1 -1
  78. package/.next-prod/server/app/api/files/delete/route.js +1 -1
  79. package/.next-prod/server/app/api/files/delete/route.js.nft.json +1 -1
  80. package/.next-prod/server/app/api/files/expanded/route.js +1 -1
  81. package/.next-prod/server/app/api/files/expanded/route.js.nft.json +1 -1
  82. package/.next-prod/server/app/api/files/index/route.js +1 -1
  83. package/.next-prod/server/app/api/files/index/route.js.nft.json +1 -1
  84. package/.next-prod/server/app/api/files/init/route.js +1 -1
  85. package/.next-prod/server/app/api/files/init/route.js.nft.json +1 -1
  86. package/.next-prod/server/app/api/files/paste/route.js +1 -1
  87. package/.next-prod/server/app/api/files/paste/route.js.nft.json +1 -1
  88. package/.next-prod/server/app/api/files/read/route.js +1 -1
  89. package/.next-prod/server/app/api/files/read/route.js.nft.json +1 -1
  90. package/.next-prod/server/app/api/files/readdir/route.js +1 -1
  91. package/.next-prod/server/app/api/files/readdir/route.js.nft.json +1 -1
  92. package/.next-prod/server/app/api/files/recent/route.js +1 -1
  93. package/.next-prod/server/app/api/files/recent/route.js.nft.json +1 -1
  94. package/.next-prod/server/app/api/files/save/route.js +1 -1
  95. package/.next-prod/server/app/api/files/save/route.js.nft.json +1 -1
  96. package/.next-prod/server/app/api/files/search/route.js +1 -1
  97. package/.next-prod/server/app/api/files/search/route.js.nft.json +1 -1
  98. package/.next-prod/server/app/api/files/stat/route.js +1 -1
  99. package/.next-prod/server/app/api/files/stat/route.js.nft.json +1 -1
  100. package/.next-prod/server/app/api/files/text/route.js +1 -1
  101. package/.next-prod/server/app/api/files/text/route.js.nft.json +1 -1
  102. package/.next-prod/server/app/api/git/blob/route.js +1 -1
  103. package/.next-prod/server/app/api/git/blob/route.js.nft.json +1 -1
  104. package/.next-prod/server/app/api/git/branch-diff/route.js +1 -1
  105. package/.next-prod/server/app/api/git/branch-diff/route.js.nft.json +1 -1
  106. package/.next-prod/server/app/api/git/branches/route.js +1 -1
  107. package/.next-prod/server/app/api/git/branches/route.js.nft.json +1 -1
  108. package/.next-prod/server/app/api/git/commit-diff/route.js +1 -1
  109. package/.next-prod/server/app/api/git/commit-diff/route.js.nft.json +1 -1
  110. package/.next-prod/server/app/api/git/commits/route.js +1 -1
  111. package/.next-prod/server/app/api/git/commits/route.js.nft.json +1 -1
  112. package/.next-prod/server/app/api/git/current-branch/route.js +1 -1
  113. package/.next-prod/server/app/api/git/current-branch/route.js.nft.json +1 -1
  114. package/.next-prod/server/app/api/git/diff/route.js +1 -1
  115. package/.next-prod/server/app/api/git/diff/route.js.nft.json +1 -1
  116. package/.next-prod/server/app/api/git/discard/route.js +1 -1
  117. package/.next-prod/server/app/api/git/discard/route.js.nft.json +1 -1
  118. package/.next-prod/server/app/api/git/stage/route.js +1 -1
  119. package/.next-prod/server/app/api/git/stage/route.js.nft.json +1 -1
  120. package/.next-prod/server/app/api/git/status/route.js +1 -1
  121. package/.next-prod/server/app/api/git/status/route.js.nft.json +1 -1
  122. package/.next-prod/server/app/api/git/unstage/route.js +1 -1
  123. package/.next-prod/server/app/api/git/unstage/route.js.nft.json +1 -1
  124. package/.next-prod/server/app/api/git/worktree/route.js +1 -1
  125. package/.next-prod/server/app/api/git/worktree/route.js.nft.json +1 -1
  126. package/.next-prod/server/app/api/glm/credentials/route.js +1 -1
  127. package/.next-prod/server/app/api/glm/credentials/route.js.nft.json +1 -1
  128. package/.next-prod/server/app/api/glm/models/route.js +1 -1
  129. package/.next-prod/server/app/api/glm/models/route.js.nft.json +1 -1
  130. package/.next-prod/server/app/api/glm/usage/route.js +1 -1
  131. package/.next-prod/server/app/api/glm/usage/route.js.nft.json +1 -1
  132. package/.next-prod/server/app/api/global-state/route.js +1 -1
  133. package/.next-prod/server/app/api/global-state/route.js.nft.json +1 -1
  134. package/.next-prod/server/app/api/health/route.js +1 -1
  135. package/.next-prod/server/app/api/health/route.js.nft.json +1 -1
  136. package/.next-prod/server/app/api/html-apps/[id]/route.js +1 -1
  137. package/.next-prod/server/app/api/html-apps/[id]/route.js.nft.json +1 -1
  138. package/.next-prod/server/app/api/html-apps/route.js +1 -1
  139. package/.next-prod/server/app/api/html-apps/route.js.nft.json +1 -1
  140. package/.next-prod/server/app/api/kimi/credentials/route.js +1 -1
  141. package/.next-prod/server/app/api/kimi/credentials/route.js.nft.json +1 -1
  142. package/.next-prod/server/app/api/kimi/models/route.js +1 -1
  143. package/.next-prod/server/app/api/kimi/models/route.js.nft.json +1 -1
  144. package/.next-prod/server/app/api/kimi/usage/route.js +1 -1
  145. package/.next-prod/server/app/api/kimi/usage/route.js.nft.json +1 -1
  146. package/.next-prod/server/app/api/lsp/definition/route.js +1 -1
  147. package/.next-prod/server/app/api/lsp/definition/route.js.nft.json +1 -1
  148. package/.next-prod/server/app/api/lsp/hover/route.js +1 -1
  149. package/.next-prod/server/app/api/lsp/hover/route.js.nft.json +1 -1
  150. package/.next-prod/server/app/api/lsp/references/route.js +1 -1
  151. package/.next-prod/server/app/api/lsp/references/route.js.nft.json +1 -1
  152. package/.next-prod/server/app/api/lsp/status/route.js +1 -1
  153. package/.next-prod/server/app/api/lsp/status/route.js.nft.json +1 -1
  154. package/.next-prod/server/app/api/lsp/warmup/route.js +1 -1
  155. package/.next-prod/server/app/api/lsp/warmup/route.js.nft.json +1 -1
  156. package/.next-prod/server/app/api/mysql/columns/route.js +2 -2
  157. package/.next-prod/server/app/api/mysql/columns/route.js.nft.json +1 -1
  158. package/.next-prod/server/app/api/mysql/connect/route.js +1 -1
  159. package/.next-prod/server/app/api/mysql/connect/route.js.nft.json +1 -1
  160. package/.next-prod/server/app/api/mysql/disconnect/route.js +1 -1
  161. package/.next-prod/server/app/api/mysql/disconnect/route.js.nft.json +1 -1
  162. package/.next-prod/server/app/api/mysql/export/route.js +1 -1
  163. package/.next-prod/server/app/api/mysql/export/route.js.nft.json +1 -1
  164. package/.next-prod/server/app/api/mysql/query/route.js +1 -1
  165. package/.next-prod/server/app/api/mysql/query/route.js.nft.json +1 -1
  166. package/.next-prod/server/app/api/mysql/schemas/route.js +2 -2
  167. package/.next-prod/server/app/api/mysql/schemas/route.js.nft.json +1 -1
  168. package/.next-prod/server/app/api/neo4j/connect/route.js +1 -1
  169. package/.next-prod/server/app/api/neo4j/connect/route.js.nft.json +1 -1
  170. package/.next-prod/server/app/api/neo4j/disconnect/route.js +1 -1
  171. package/.next-prod/server/app/api/neo4j/disconnect/route.js.nft.json +1 -1
  172. package/.next-prod/server/app/api/neo4j/query/route.js +1 -1
  173. package/.next-prod/server/app/api/neo4j/query/route.js.nft.json +1 -1
  174. package/.next-prod/server/app/api/neo4j/schema/route.js +1 -1
  175. package/.next-prod/server/app/api/neo4j/schema/route.js.nft.json +1 -1
  176. package/.next-prod/server/app/api/note/route.js +1 -1
  177. package/.next-prod/server/app/api/note/route.js.nft.json +1 -1
  178. package/.next-prod/server/app/api/ollama/config/route.js +1 -1
  179. package/.next-prod/server/app/api/ollama/config/route.js.nft.json +1 -1
  180. package/.next-prod/server/app/api/ollama/models/route.js +1 -1
  181. package/.next-prod/server/app/api/ollama/models/route.js.nft.json +1 -1
  182. package/.next-prod/server/app/api/ollama/start/route.js +1 -1
  183. package/.next-prod/server/app/api/ollama/start/route.js.nft.json +1 -1
  184. package/.next-prod/server/app/api/open-cursor/route.js +1 -1
  185. package/.next-prod/server/app/api/open-cursor/route.js.nft.json +1 -1
  186. package/.next-prod/server/app/api/open-vscode/route.js +1 -1
  187. package/.next-prod/server/app/api/open-vscode/route.js.nft.json +1 -1
  188. package/.next-prod/server/app/api/pick-folder/route.js +1 -1
  189. package/.next-prod/server/app/api/pick-folder/route.js.nft.json +1 -1
  190. package/.next-prod/server/app/api/pinned-sessions/route.js +1 -1
  191. package/.next-prod/server/app/api/pinned-sessions/route.js.nft.json +1 -1
  192. package/.next-prod/server/app/api/project-settings/route.js +1 -1
  193. package/.next-prod/server/app/api/project-settings/route.js.nft.json +1 -1
  194. package/.next-prod/server/app/api/project-state/route.js +1 -1
  195. package/.next-prod/server/app/api/project-state/route.js.nft.json +1 -1
  196. package/.next-prod/server/app/api/projectGraph/affected/route.js +1 -1
  197. package/.next-prod/server/app/api/projectGraph/affected/route.js.nft.json +1 -1
  198. package/.next-prod/server/app/api/projectGraph/callees/route.js +1 -1
  199. package/.next-prod/server/app/api/projectGraph/callees/route.js.nft.json +1 -1
  200. package/.next-prod/server/app/api/projectGraph/callers/route.js +1 -1
  201. package/.next-prod/server/app/api/projectGraph/callers/route.js.nft.json +1 -1
  202. package/.next-prod/server/app/api/projectGraph/coedit/route.js +1 -1
  203. package/.next-prod/server/app/api/projectGraph/coedit/route.js.nft.json +1 -1
  204. package/.next-prod/server/app/api/projectGraph/context/route.js +1 -1
  205. package/.next-prod/server/app/api/projectGraph/context/route.js.nft.json +1 -1
  206. package/.next-prod/server/app/api/projectGraph/file/route.js +1 -1
  207. package/.next-prod/server/app/api/projectGraph/file/route.js.nft.json +1 -1
  208. package/.next-prod/server/app/api/projectGraph/file-functions/route.js +1 -1
  209. package/.next-prod/server/app/api/projectGraph/file-functions/route.js.nft.json +1 -1
  210. package/.next-prod/server/app/api/projectGraph/impact/route.js +1 -1
  211. package/.next-prod/server/app/api/projectGraph/impact/route.js.nft.json +1 -1
  212. package/.next-prod/server/app/api/projectGraph/related/route.js +1 -1
  213. package/.next-prod/server/app/api/projectGraph/related/route.js.nft.json +1 -1
  214. package/.next-prod/server/app/api/projectGraph/risk/route.js +1 -1
  215. package/.next-prod/server/app/api/projectGraph/risk/route.js.nft.json +1 -1
  216. package/.next-prod/server/app/api/projectGraph/search/route.js +1 -1
  217. package/.next-prod/server/app/api/projectGraph/search/route.js.nft.json +1 -1
  218. package/.next-prod/server/app/api/projects/route.js +1 -1
  219. package/.next-prod/server/app/api/projects/route.js.nft.json +1 -1
  220. package/.next-prod/server/app/api/prompts/config/route.js +1 -1
  221. package/.next-prod/server/app/api/prompts/config/route.js.nft.json +1 -1
  222. package/.next-prod/server/app/api/push/public-key/route.js +1 -1
  223. package/.next-prod/server/app/api/push/public-key/route.js.nft.json +1 -1
  224. package/.next-prod/server/app/api/push/subscribe/route.js +1 -1
  225. package/.next-prod/server/app/api/push/subscribe/route.js.nft.json +1 -1
  226. package/.next-prod/server/app/api/push/unsubscribe/route.js +1 -1
  227. package/.next-prod/server/app/api/push/unsubscribe/route.js.nft.json +1 -1
  228. package/.next-prod/server/app/api/redis/command/route.js +1 -1
  229. package/.next-prod/server/app/api/redis/command/route.js.nft.json +1 -1
  230. package/.next-prod/server/app/api/redis/connect/route.js +1 -1
  231. package/.next-prod/server/app/api/redis/connect/route.js.nft.json +1 -1
  232. package/.next-prod/server/app/api/redis/delete/route.js +1 -1
  233. package/.next-prod/server/app/api/redis/delete/route.js.nft.json +1 -1
  234. package/.next-prod/server/app/api/redis/disconnect/route.js +1 -1
  235. package/.next-prod/server/app/api/redis/disconnect/route.js.nft.json +1 -1
  236. package/.next-prod/server/app/api/redis/get/route.js +1 -1
  237. package/.next-prod/server/app/api/redis/get/route.js.nft.json +1 -1
  238. package/.next-prod/server/app/api/redis/keys/route.js +1 -1
  239. package/.next-prod/server/app/api/redis/keys/route.js.nft.json +1 -1
  240. package/.next-prod/server/app/api/redis/set/route.js +1 -1
  241. package/.next-prod/server/app/api/redis/set/route.js.nft.json +1 -1
  242. package/.next-prod/server/app/api/restart/route.js +1 -1
  243. package/.next-prod/server/app/api/restart/route.js.nft.json +1 -1
  244. package/.next-prod/server/app/api/review/[id]/comments/route.js +1 -1
  245. package/.next-prod/server/app/api/review/[id]/comments/route.js.nft.json +1 -1
  246. package/.next-prod/server/app/api/review/[id]/replies/route.js +1 -1
  247. package/.next-prod/server/app/api/review/[id]/replies/route.js.nft.json +1 -1
  248. package/.next-prod/server/app/api/review/[id]/route.js +1 -1
  249. package/.next-prod/server/app/api/review/[id]/route.js.nft.json +1 -1
  250. package/.next-prod/server/app/api/review/identify/route.js +1 -1
  251. package/.next-prod/server/app/api/review/identify/route.js.nft.json +1 -1
  252. package/.next-prod/server/app/api/review/order/route.js +1 -1
  253. package/.next-prod/server/app/api/review/order/route.js.nft.json +1 -1
  254. package/.next-prod/server/app/api/review/route.js +1 -1
  255. package/.next-prod/server/app/api/review/route.js.nft.json +1 -1
  256. package/.next-prod/server/app/api/review/share-info/route.js +1 -1
  257. package/.next-prod/server/app/api/review/share-info/route.js.nft.json +1 -1
  258. package/.next-prod/server/app/api/review/users/route.js +1 -1
  259. package/.next-prod/server/app/api/review/users/route.js.nft.json +1 -1
  260. package/.next-prod/server/app/api/scheduled-tasks/route.js +2 -2
  261. package/.next-prod/server/app/api/scheduled-tasks/route.js.nft.json +1 -1
  262. package/.next-prod/server/app/api/services/config/route.js +1 -1
  263. package/.next-prod/server/app/api/services/config/route.js.nft.json +1 -1
  264. package/.next-prod/server/app/api/services/scripts/route.js +1 -1
  265. package/.next-prod/server/app/api/services/scripts/route.js.nft.json +1 -1
  266. package/.next-prod/server/app/api/session/[sessionId]/fork/route.js +1 -1
  267. package/.next-prod/server/app/api/session/[sessionId]/fork/route.js.nft.json +1 -1
  268. package/.next-prod/server/app/api/session/[sessionId]/history/route.js +1 -1
  269. package/.next-prod/server/app/api/session/[sessionId]/history/route.js.nft.json +1 -1
  270. package/.next-prod/server/app/api/session/user-messages/route.js +1 -0
  271. package/.next-prod/server/app/api/session/user-messages/route.js.nft.json +1 -0
  272. package/.next-prod/server/app/api/session/user-messages/route_client-reference-manifest.js +1 -0
  273. package/.next-prod/server/app/api/session-by-path/route.js +1 -3
  274. package/.next-prod/server/app/api/session-by-path/route.js.nft.json +1 -1
  275. package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js +1 -1
  276. package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js.nft.json +1 -1
  277. package/.next-prod/server/app/api/sessions/projects/route.js +1 -1
  278. package/.next-prod/server/app/api/sessions/projects/route.js.nft.json +1 -1
  279. package/.next-prod/server/app/api/sessions/route.js +1 -1
  280. package/.next-prod/server/app/api/sessions/route.js.nft.json +1 -1
  281. package/.next-prod/server/app/api/settings/route.js +1 -1
  282. package/.next-prod/server/app/api/settings/route.js.nft.json +1 -1
  283. package/.next-prod/server/app/api/shutdown/route.js +1 -1
  284. package/.next-prod/server/app/api/shutdown/route.js.nft.json +1 -1
  285. package/.next-prod/server/app/api/skills/[id]/route.js +1 -1
  286. package/.next-prod/server/app/api/skills/[id]/route.js.nft.json +1 -1
  287. package/.next-prod/server/app/api/skills/content/route.js +1 -1
  288. package/.next-prod/server/app/api/skills/content/route.js.nft.json +1 -1
  289. package/.next-prod/server/app/api/skills/route.js +1 -1
  290. package/.next-prod/server/app/api/skills/route.js.nft.json +1 -1
  291. package/.next-prod/server/app/api/snapshots/blob/route.js +1 -1
  292. package/.next-prod/server/app/api/snapshots/blob/route.js.nft.json +1 -1
  293. package/.next-prod/server/app/api/snapshots/diff/route.js +1 -1
  294. package/.next-prod/server/app/api/snapshots/diff/route.js.nft.json +1 -1
  295. package/.next-prod/server/app/api/snapshots/route.js +1 -1
  296. package/.next-prod/server/app/api/snapshots/route.js.nft.json +1 -1
  297. package/.next-prod/server/app/api/terminal/aliases/route.js +1 -1
  298. package/.next-prod/server/app/api/terminal/aliases/route.js.nft.json +1 -1
  299. package/.next-prod/server/app/api/terminal/autocomplete/route.js +1 -1
  300. package/.next-prod/server/app/api/terminal/autocomplete/route.js.nft.json +1 -1
  301. package/.next-prod/server/app/api/terminal/bubble-order/route.js +1 -1
  302. package/.next-prod/server/app/api/terminal/bubble-order/route.js.nft.json +1 -1
  303. package/.next-prod/server/app/api/terminal/env/route.js +1 -1
  304. package/.next-prod/server/app/api/terminal/env/route.js.nft.json +1 -1
  305. package/.next-prod/server/app/api/terminal/history/route.js +1 -1
  306. package/.next-prod/server/app/api/terminal/history/route.js.nft.json +1 -1
  307. package/.next-prod/server/app/api/update/route.js +1 -1
  308. package/.next-prod/server/app/api/update/route.js.nft.json +1 -1
  309. package/.next-prod/server/app/api/update-state/route.js +1 -1
  310. package/.next-prod/server/app/api/update-state/route.js.nft.json +1 -1
  311. package/.next-prod/server/app/api/version/route.js +1 -1
  312. package/.next-prod/server/app/api/version/route.js.nft.json +1 -1
  313. package/.next-prod/server/app/apps/[...path]/route.js +1 -1
  314. package/.next-prod/server/app/apps/[...path]/route.js.nft.json +1 -1
  315. package/.next-prod/server/app/favicon.ico/route.js +1 -1
  316. package/.next-prod/server/app/favicon.ico/route.js.nft.json +1 -1
  317. package/.next-prod/server/app/m/page.js +1 -1
  318. package/.next-prod/server/app/m/page.js.nft.json +1 -1
  319. package/.next-prod/server/app/m/page_client-reference-manifest.js +1 -1
  320. package/.next-prod/server/app/manifest.webmanifest/route.js +2 -2
  321. package/.next-prod/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  322. package/.next-prod/server/app/page.js +1 -1
  323. package/.next-prod/server/app/page.js.nft.json +1 -1
  324. package/.next-prod/server/app/page_client-reference-manifest.js +1 -1
  325. package/.next-prod/server/app/project/page.js +1 -1
  326. package/.next-prod/server/app/project/page.js.nft.json +1 -1
  327. package/.next-prod/server/app/project/page_client-reference-manifest.js +1 -1
  328. package/.next-prod/server/app/review/[id]/page.js +1 -1
  329. package/.next-prod/server/app/review/[id]/page.js.nft.json +1 -1
  330. package/.next-prod/server/app/review/[id]/page_client-reference-manifest.js +1 -1
  331. package/.next-prod/server/app-paths-manifest.json +5 -4
  332. package/.next-prod/server/chunks/1237.js +1 -0
  333. package/.next-prod/server/chunks/4949.js +1 -1
  334. package/.next-prod/server/chunks/{5766.js → 5433.js} +4 -4
  335. package/.next-prod/server/chunks/5750.js +13 -13
  336. package/.next-prod/server/chunks/6548.js +1 -1
  337. package/.next-prod/server/chunks/8616.js +3 -0
  338. package/.next-prod/server/middleware-build-manifest.js +1 -1
  339. package/.next-prod/server/pages/404.html +2 -2
  340. package/.next-prod/server/pages/500.html +1 -1
  341. package/.next-prod/server/server-reference-manifest.json +1 -1
  342. package/.next-prod/static/chunks/5390-e2c2386e8288a254.js +32 -0
  343. package/.next-prod/static/chunks/7184-8b7ad4ccea8b15a3.js +17 -0
  344. package/.next-prod/static/chunks/{9200-2d063007a9a86cd2.js → 7570-ebe01cce6f28a79f.js} +2 -2
  345. package/.next-prod/static/chunks/9092-a942df8114966b59.js +716 -0
  346. package/.next-prod/static/chunks/app/_global-error/page-0bc5d188dc4650ab.js +1 -0
  347. package/.next-prod/static/chunks/app/api/agent/test/route-0bc5d188dc4650ab.js +1 -0
  348. package/.next-prod/static/chunks/app/api/bash/route-0bc5d188dc4650ab.js +1 -0
  349. package/.next-prod/static/chunks/app/api/chat/codex/route-0bc5d188dc4650ab.js +1 -0
  350. package/.next-prod/static/chunks/app/api/chat/deepseek/route-0bc5d188dc4650ab.js +1 -0
  351. package/.next-prod/static/chunks/app/api/chat/glm/route-0bc5d188dc4650ab.js +1 -0
  352. package/.next-prod/static/chunks/app/api/chat/kimi/route-0bc5d188dc4650ab.js +1 -0
  353. package/.next-prod/static/chunks/app/api/chat/ollama/route-0bc5d188dc4650ab.js +1 -0
  354. package/.next-prod/static/chunks/app/api/chat/route-0bc5d188dc4650ab.js +1 -0
  355. package/.next-prod/static/chunks/app/api/chat/stop/route-0bc5d188dc4650ab.js +1 -0
  356. package/.next-prod/static/chunks/app/api/claude-stats/route-0bc5d188dc4650ab.js +1 -0
  357. package/.next-prod/static/chunks/app/api/commands/route-0bc5d188dc4650ab.js +1 -0
  358. package/.next-prod/static/chunks/app/api/comments/route-0bc5d188dc4650ab.js +1 -0
  359. package/.next-prod/static/chunks/app/api/db/columns/route-0bc5d188dc4650ab.js +1 -0
  360. package/.next-prod/static/chunks/app/api/db/connect/route-0bc5d188dc4650ab.js +1 -0
  361. package/.next-prod/static/chunks/app/api/db/disconnect/route-0bc5d188dc4650ab.js +1 -0
  362. package/.next-prod/static/chunks/app/api/db/export/route-0bc5d188dc4650ab.js +1 -0
  363. package/.next-prod/static/chunks/app/api/db/query/route-0bc5d188dc4650ab.js +1 -0
  364. package/.next-prod/static/chunks/app/api/db/schemas/route-0bc5d188dc4650ab.js +1 -0
  365. package/.next-prod/static/chunks/app/api/deepseek/balance/route-0bc5d188dc4650ab.js +1 -0
  366. package/.next-prod/static/chunks/app/api/deepseek/credentials/route-0bc5d188dc4650ab.js +1 -0
  367. package/.next-prod/static/chunks/app/api/deepseek/models/route-0bc5d188dc4650ab.js +1 -0
  368. package/.next-prod/static/chunks/app/api/dev/spans/route-0bc5d188dc4650ab.js +1 -0
  369. package/.next-prod/static/chunks/app/api/extension/version/route-0bc5d188dc4650ab.js +1 -0
  370. package/.next-prod/static/chunks/app/api/file/route-0bc5d188dc4650ab.js +1 -0
  371. package/.next-prod/static/chunks/app/api/files/blame/route-0bc5d188dc4650ab.js +1 -0
  372. package/.next-prod/static/chunks/app/api/files/clipboard/route-0bc5d188dc4650ab.js +1 -0
  373. package/.next-prod/static/chunks/app/api/files/copy/route-0bc5d188dc4650ab.js +1 -0
  374. package/.next-prod/static/chunks/app/api/files/delete/route-0bc5d188dc4650ab.js +1 -0
  375. package/.next-prod/static/chunks/app/api/files/expanded/route-0bc5d188dc4650ab.js +1 -0
  376. package/.next-prod/static/chunks/app/api/files/index/route-0bc5d188dc4650ab.js +1 -0
  377. package/.next-prod/static/chunks/app/api/files/init/route-0bc5d188dc4650ab.js +1 -0
  378. package/.next-prod/static/chunks/app/api/files/paste/route-0bc5d188dc4650ab.js +1 -0
  379. package/.next-prod/static/chunks/app/api/files/read/route-0bc5d188dc4650ab.js +1 -0
  380. package/.next-prod/static/chunks/app/api/files/readdir/route-0bc5d188dc4650ab.js +1 -0
  381. package/.next-prod/static/chunks/app/api/files/recent/route-0bc5d188dc4650ab.js +1 -0
  382. package/.next-prod/static/chunks/app/api/files/save/route-0bc5d188dc4650ab.js +1 -0
  383. package/.next-prod/static/chunks/app/api/files/search/route-0bc5d188dc4650ab.js +1 -0
  384. package/.next-prod/static/chunks/app/api/files/stat/route-0bc5d188dc4650ab.js +1 -0
  385. package/.next-prod/static/chunks/app/api/files/text/route-0bc5d188dc4650ab.js +1 -0
  386. package/.next-prod/static/chunks/app/api/git/blob/route-0bc5d188dc4650ab.js +1 -0
  387. package/.next-prod/static/chunks/app/api/git/branch-diff/route-0bc5d188dc4650ab.js +1 -0
  388. package/.next-prod/static/chunks/app/api/git/branches/route-0bc5d188dc4650ab.js +1 -0
  389. package/.next-prod/static/chunks/app/api/git/commit-diff/route-0bc5d188dc4650ab.js +1 -0
  390. package/.next-prod/static/chunks/app/api/git/commits/route-0bc5d188dc4650ab.js +1 -0
  391. package/.next-prod/static/chunks/app/api/git/current-branch/route-0bc5d188dc4650ab.js +1 -0
  392. package/.next-prod/static/chunks/app/api/git/diff/route-0bc5d188dc4650ab.js +1 -0
  393. package/.next-prod/static/chunks/app/api/git/discard/route-0bc5d188dc4650ab.js +1 -0
  394. package/.next-prod/static/chunks/app/api/git/stage/route-0bc5d188dc4650ab.js +1 -0
  395. package/.next-prod/static/chunks/app/api/git/status/route-0bc5d188dc4650ab.js +1 -0
  396. package/.next-prod/static/chunks/app/api/git/unstage/route-0bc5d188dc4650ab.js +1 -0
  397. package/.next-prod/static/chunks/app/api/git/worktree/route-0bc5d188dc4650ab.js +1 -0
  398. package/.next-prod/static/chunks/app/api/glm/credentials/route-0bc5d188dc4650ab.js +1 -0
  399. package/.next-prod/static/chunks/app/api/glm/models/route-0bc5d188dc4650ab.js +1 -0
  400. package/.next-prod/static/chunks/app/api/glm/usage/route-0bc5d188dc4650ab.js +1 -0
  401. package/.next-prod/static/chunks/app/api/global-state/route-0bc5d188dc4650ab.js +1 -0
  402. package/.next-prod/static/chunks/app/api/health/route-0bc5d188dc4650ab.js +1 -0
  403. package/.next-prod/static/chunks/app/api/html-apps/[id]/route-0bc5d188dc4650ab.js +1 -0
  404. package/.next-prod/static/chunks/app/api/html-apps/route-0bc5d188dc4650ab.js +1 -0
  405. package/.next-prod/static/chunks/app/api/kimi/credentials/route-0bc5d188dc4650ab.js +1 -0
  406. package/.next-prod/static/chunks/app/api/kimi/models/route-0bc5d188dc4650ab.js +1 -0
  407. package/.next-prod/static/chunks/app/api/kimi/usage/route-0bc5d188dc4650ab.js +1 -0
  408. package/.next-prod/static/chunks/app/api/lsp/definition/route-0bc5d188dc4650ab.js +1 -0
  409. package/.next-prod/static/chunks/app/api/lsp/hover/route-0bc5d188dc4650ab.js +1 -0
  410. package/.next-prod/static/chunks/app/api/lsp/references/route-0bc5d188dc4650ab.js +1 -0
  411. package/.next-prod/static/chunks/app/api/lsp/status/route-0bc5d188dc4650ab.js +1 -0
  412. package/.next-prod/static/chunks/app/api/lsp/warmup/route-0bc5d188dc4650ab.js +1 -0
  413. package/.next-prod/static/chunks/app/api/mysql/columns/route-0bc5d188dc4650ab.js +1 -0
  414. package/.next-prod/static/chunks/app/api/mysql/connect/route-0bc5d188dc4650ab.js +1 -0
  415. package/.next-prod/static/chunks/app/api/mysql/disconnect/route-0bc5d188dc4650ab.js +1 -0
  416. package/.next-prod/static/chunks/app/api/mysql/export/route-0bc5d188dc4650ab.js +1 -0
  417. package/.next-prod/static/chunks/app/api/mysql/query/route-0bc5d188dc4650ab.js +1 -0
  418. package/.next-prod/static/chunks/app/api/mysql/schemas/route-0bc5d188dc4650ab.js +1 -0
  419. package/.next-prod/static/chunks/app/api/neo4j/connect/route-0bc5d188dc4650ab.js +1 -0
  420. package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-0bc5d188dc4650ab.js +1 -0
  421. package/.next-prod/static/chunks/app/api/neo4j/query/route-0bc5d188dc4650ab.js +1 -0
  422. package/.next-prod/static/chunks/app/api/neo4j/schema/route-0bc5d188dc4650ab.js +1 -0
  423. package/.next-prod/static/chunks/app/api/note/route-0bc5d188dc4650ab.js +1 -0
  424. package/.next-prod/static/chunks/app/api/ollama/config/route-0bc5d188dc4650ab.js +1 -0
  425. package/.next-prod/static/chunks/app/api/ollama/models/route-0bc5d188dc4650ab.js +1 -0
  426. package/.next-prod/static/chunks/app/api/ollama/start/route-0bc5d188dc4650ab.js +1 -0
  427. package/.next-prod/static/chunks/app/api/open-cursor/route-0bc5d188dc4650ab.js +1 -0
  428. package/.next-prod/static/chunks/app/api/open-vscode/route-0bc5d188dc4650ab.js +1 -0
  429. package/.next-prod/static/chunks/app/api/pick-folder/route-0bc5d188dc4650ab.js +1 -0
  430. package/.next-prod/static/chunks/app/api/pinned-sessions/route-0bc5d188dc4650ab.js +1 -0
  431. package/.next-prod/static/chunks/app/api/project-settings/route-0bc5d188dc4650ab.js +1 -0
  432. package/.next-prod/static/chunks/app/api/project-state/route-0bc5d188dc4650ab.js +1 -0
  433. package/.next-prod/static/chunks/app/api/projectGraph/affected/route-0bc5d188dc4650ab.js +1 -0
  434. package/.next-prod/static/chunks/app/api/projectGraph/callees/route-0bc5d188dc4650ab.js +1 -0
  435. package/.next-prod/static/chunks/app/api/projectGraph/callers/route-0bc5d188dc4650ab.js +1 -0
  436. package/.next-prod/static/chunks/app/api/projectGraph/coedit/route-0bc5d188dc4650ab.js +1 -0
  437. package/.next-prod/static/chunks/app/api/projectGraph/context/route-0bc5d188dc4650ab.js +1 -0
  438. package/.next-prod/static/chunks/app/api/projectGraph/file/route-0bc5d188dc4650ab.js +1 -0
  439. package/.next-prod/static/chunks/app/api/projectGraph/file-functions/route-0bc5d188dc4650ab.js +1 -0
  440. package/.next-prod/static/chunks/app/api/projectGraph/impact/route-0bc5d188dc4650ab.js +1 -0
  441. package/.next-prod/static/chunks/app/api/projectGraph/related/route-0bc5d188dc4650ab.js +1 -0
  442. package/.next-prod/static/chunks/app/api/projectGraph/risk/route-0bc5d188dc4650ab.js +1 -0
  443. package/.next-prod/static/chunks/app/api/projectGraph/search/route-0bc5d188dc4650ab.js +1 -0
  444. package/.next-prod/static/chunks/app/api/projects/route-0bc5d188dc4650ab.js +1 -0
  445. package/.next-prod/static/chunks/app/api/prompts/config/route-0bc5d188dc4650ab.js +1 -0
  446. package/.next-prod/static/chunks/app/api/push/public-key/route-0bc5d188dc4650ab.js +1 -0
  447. package/.next-prod/static/chunks/app/api/push/subscribe/route-0bc5d188dc4650ab.js +1 -0
  448. package/.next-prod/static/chunks/app/api/push/unsubscribe/route-0bc5d188dc4650ab.js +1 -0
  449. package/.next-prod/static/chunks/app/api/redis/command/route-0bc5d188dc4650ab.js +1 -0
  450. package/.next-prod/static/chunks/app/api/redis/connect/route-0bc5d188dc4650ab.js +1 -0
  451. package/.next-prod/static/chunks/app/api/redis/delete/route-0bc5d188dc4650ab.js +1 -0
  452. package/.next-prod/static/chunks/app/api/redis/disconnect/route-0bc5d188dc4650ab.js +1 -0
  453. package/.next-prod/static/chunks/app/api/redis/get/route-0bc5d188dc4650ab.js +1 -0
  454. package/.next-prod/static/chunks/app/api/redis/keys/route-0bc5d188dc4650ab.js +1 -0
  455. package/.next-prod/static/chunks/app/api/redis/set/route-0bc5d188dc4650ab.js +1 -0
  456. package/.next-prod/static/chunks/app/api/restart/route-0bc5d188dc4650ab.js +1 -0
  457. package/.next-prod/static/chunks/app/api/review/[id]/comments/route-0bc5d188dc4650ab.js +1 -0
  458. package/.next-prod/static/chunks/app/api/review/[id]/replies/route-0bc5d188dc4650ab.js +1 -0
  459. package/.next-prod/static/chunks/app/api/review/[id]/route-0bc5d188dc4650ab.js +1 -0
  460. package/.next-prod/static/chunks/app/api/review/identify/route-0bc5d188dc4650ab.js +1 -0
  461. package/.next-prod/static/chunks/app/api/review/order/route-0bc5d188dc4650ab.js +1 -0
  462. package/.next-prod/static/chunks/app/api/review/route-0bc5d188dc4650ab.js +1 -0
  463. package/.next-prod/static/chunks/app/api/review/share-info/route-0bc5d188dc4650ab.js +1 -0
  464. package/.next-prod/static/chunks/app/api/review/users/route-0bc5d188dc4650ab.js +1 -0
  465. package/.next-prod/static/chunks/app/api/scheduled-tasks/route-0bc5d188dc4650ab.js +1 -0
  466. package/.next-prod/static/chunks/app/api/services/config/route-0bc5d188dc4650ab.js +1 -0
  467. package/.next-prod/static/chunks/app/api/services/scripts/route-0bc5d188dc4650ab.js +1 -0
  468. package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-0bc5d188dc4650ab.js +1 -0
  469. package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-0bc5d188dc4650ab.js +1 -0
  470. package/.next-prod/static/chunks/app/api/session/user-messages/route-0bc5d188dc4650ab.js +1 -0
  471. package/.next-prod/static/chunks/app/api/session-by-path/route-0bc5d188dc4650ab.js +1 -0
  472. package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-0bc5d188dc4650ab.js +1 -0
  473. package/.next-prod/static/chunks/app/api/sessions/projects/route-0bc5d188dc4650ab.js +1 -0
  474. package/.next-prod/static/chunks/app/api/sessions/route-0bc5d188dc4650ab.js +1 -0
  475. package/.next-prod/static/chunks/app/api/settings/route-0bc5d188dc4650ab.js +1 -0
  476. package/.next-prod/static/chunks/app/api/shutdown/route-0bc5d188dc4650ab.js +1 -0
  477. package/.next-prod/static/chunks/app/api/skills/[id]/route-0bc5d188dc4650ab.js +1 -0
  478. package/.next-prod/static/chunks/app/api/skills/content/route-0bc5d188dc4650ab.js +1 -0
  479. package/.next-prod/static/chunks/app/api/skills/route-0bc5d188dc4650ab.js +1 -0
  480. package/.next-prod/static/chunks/app/api/snapshots/blob/route-0bc5d188dc4650ab.js +1 -0
  481. package/.next-prod/static/chunks/app/api/snapshots/diff/route-0bc5d188dc4650ab.js +1 -0
  482. package/.next-prod/static/chunks/app/api/snapshots/route-0bc5d188dc4650ab.js +1 -0
  483. package/.next-prod/static/chunks/app/api/terminal/aliases/route-0bc5d188dc4650ab.js +1 -0
  484. package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-0bc5d188dc4650ab.js +1 -0
  485. package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-0bc5d188dc4650ab.js +1 -0
  486. package/.next-prod/static/chunks/app/api/terminal/env/route-0bc5d188dc4650ab.js +1 -0
  487. package/.next-prod/static/chunks/app/api/terminal/history/route-0bc5d188dc4650ab.js +1 -0
  488. package/.next-prod/static/chunks/app/api/update/route-0bc5d188dc4650ab.js +1 -0
  489. package/.next-prod/static/chunks/app/api/update-state/route-0bc5d188dc4650ab.js +1 -0
  490. package/.next-prod/static/chunks/app/api/version/route-0bc5d188dc4650ab.js +1 -0
  491. package/.next-prod/static/chunks/app/apps/[...path]/route-0bc5d188dc4650ab.js +1 -0
  492. package/.next-prod/static/chunks/app/{layout-4d9685b25807b4c6.js → layout-915635f208cba4b3.js} +1 -1
  493. package/.next-prod/static/chunks/app/m/{page-af6600597536f9a9.js → page-8442a2605d0feb3f.js} +1 -1
  494. package/.next-prod/static/chunks/app/manifest.webmanifest/route-0bc5d188dc4650ab.js +1 -0
  495. package/.next-prod/static/chunks/app/{page-af99426a6c82e466.js → page-48dc2d6146301fd7.js} +1 -1
  496. package/.next-prod/static/chunks/app/project/{page-af99426a6c82e466.js → page-48dc2d6146301fd7.js} +1 -1
  497. package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-0bc5d188dc4650ab.js +1 -0
  498. package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-0bc5d188dc4650ab.js +1 -0
  499. package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-0bc5d188dc4650ab.js +1 -0
  500. package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-0bc5d188dc4650ab.js +1 -0
  501. package/.next-prod/static/css/ec2765469545dfce.css +1 -0
  502. package/.next-prod/static/qoIca6xp2OKAJtDEvMaXC/_buildManifest.js +1 -0
  503. package/.next-prod/trace +14 -14
  504. package/.next-prod/trace-build +1 -1
  505. package/.next-prod/types/app/api/session/user-messages/route.ts +353 -0
  506. package/.next-prod/types/routes.d.ts +2 -1
  507. package/.next-prod/types/validator.ts +9 -0
  508. package/dist/{cache-GIQJA4HL.mjs → cache-VBRI47HG.mjs} +28 -0
  509. package/dist/chunk-UG6WUXIQ.mjs +2907 -0
  510. package/dist/scheduledTasks.mjs +30 -4
  511. package/dist/wsServer.mjs +20 -2807
  512. package/package.json +1 -1
  513. package/public/html-lib/markdown.css +114 -70
  514. package/public/html-lib/markdown.js +12 -12
  515. package/public/tree-sitter/tree-sitter-lean.wasm +0 -0
  516. package/scripts/copy-tree-sitter-wasms.mjs +33 -3
  517. package/skills/cg/SKILL.md +140 -14
  518. package/.next-prod/server/chunks/2540.js +0 -1
  519. package/.next-prod/static/ZqxwSTxy2HJcALhnBemS7/_buildManifest.js +0 -1
  520. package/.next-prod/static/chunks/6024-31a42934bf55e9e9.js +0 -32
  521. package/.next-prod/static/chunks/7184-2a5621de437121a2.js +0 -17
  522. package/.next-prod/static/chunks/9092-f7267cbb4deb6fd5.js +0 -716
  523. package/.next-prod/static/chunks/app/_global-error/page-891e1a9c2b8144f7.js +0 -1
  524. package/.next-prod/static/chunks/app/api/agent/test/route-891e1a9c2b8144f7.js +0 -1
  525. package/.next-prod/static/chunks/app/api/bash/route-891e1a9c2b8144f7.js +0 -1
  526. package/.next-prod/static/chunks/app/api/chat/codex/route-891e1a9c2b8144f7.js +0 -1
  527. package/.next-prod/static/chunks/app/api/chat/deepseek/route-891e1a9c2b8144f7.js +0 -1
  528. package/.next-prod/static/chunks/app/api/chat/glm/route-891e1a9c2b8144f7.js +0 -1
  529. package/.next-prod/static/chunks/app/api/chat/kimi/route-891e1a9c2b8144f7.js +0 -1
  530. package/.next-prod/static/chunks/app/api/chat/ollama/route-891e1a9c2b8144f7.js +0 -1
  531. package/.next-prod/static/chunks/app/api/chat/route-891e1a9c2b8144f7.js +0 -1
  532. package/.next-prod/static/chunks/app/api/chat/stop/route-891e1a9c2b8144f7.js +0 -1
  533. package/.next-prod/static/chunks/app/api/claude-stats/route-891e1a9c2b8144f7.js +0 -1
  534. package/.next-prod/static/chunks/app/api/commands/route-891e1a9c2b8144f7.js +0 -1
  535. package/.next-prod/static/chunks/app/api/comments/route-891e1a9c2b8144f7.js +0 -1
  536. package/.next-prod/static/chunks/app/api/db/columns/route-891e1a9c2b8144f7.js +0 -1
  537. package/.next-prod/static/chunks/app/api/db/connect/route-891e1a9c2b8144f7.js +0 -1
  538. package/.next-prod/static/chunks/app/api/db/disconnect/route-891e1a9c2b8144f7.js +0 -1
  539. package/.next-prod/static/chunks/app/api/db/export/route-891e1a9c2b8144f7.js +0 -1
  540. package/.next-prod/static/chunks/app/api/db/query/route-891e1a9c2b8144f7.js +0 -1
  541. package/.next-prod/static/chunks/app/api/db/schemas/route-891e1a9c2b8144f7.js +0 -1
  542. package/.next-prod/static/chunks/app/api/deepseek/balance/route-891e1a9c2b8144f7.js +0 -1
  543. package/.next-prod/static/chunks/app/api/deepseek/credentials/route-891e1a9c2b8144f7.js +0 -1
  544. package/.next-prod/static/chunks/app/api/deepseek/models/route-891e1a9c2b8144f7.js +0 -1
  545. package/.next-prod/static/chunks/app/api/dev/spans/route-891e1a9c2b8144f7.js +0 -1
  546. package/.next-prod/static/chunks/app/api/extension/version/route-891e1a9c2b8144f7.js +0 -1
  547. package/.next-prod/static/chunks/app/api/file/route-891e1a9c2b8144f7.js +0 -1
  548. package/.next-prod/static/chunks/app/api/files/blame/route-891e1a9c2b8144f7.js +0 -1
  549. package/.next-prod/static/chunks/app/api/files/clipboard/route-891e1a9c2b8144f7.js +0 -1
  550. package/.next-prod/static/chunks/app/api/files/copy/route-891e1a9c2b8144f7.js +0 -1
  551. package/.next-prod/static/chunks/app/api/files/delete/route-891e1a9c2b8144f7.js +0 -1
  552. package/.next-prod/static/chunks/app/api/files/expanded/route-891e1a9c2b8144f7.js +0 -1
  553. package/.next-prod/static/chunks/app/api/files/index/route-891e1a9c2b8144f7.js +0 -1
  554. package/.next-prod/static/chunks/app/api/files/init/route-891e1a9c2b8144f7.js +0 -1
  555. package/.next-prod/static/chunks/app/api/files/paste/route-891e1a9c2b8144f7.js +0 -1
  556. package/.next-prod/static/chunks/app/api/files/read/route-891e1a9c2b8144f7.js +0 -1
  557. package/.next-prod/static/chunks/app/api/files/readdir/route-891e1a9c2b8144f7.js +0 -1
  558. package/.next-prod/static/chunks/app/api/files/recent/route-891e1a9c2b8144f7.js +0 -1
  559. package/.next-prod/static/chunks/app/api/files/save/route-891e1a9c2b8144f7.js +0 -1
  560. package/.next-prod/static/chunks/app/api/files/search/route-891e1a9c2b8144f7.js +0 -1
  561. package/.next-prod/static/chunks/app/api/files/stat/route-891e1a9c2b8144f7.js +0 -1
  562. package/.next-prod/static/chunks/app/api/files/text/route-891e1a9c2b8144f7.js +0 -1
  563. package/.next-prod/static/chunks/app/api/git/blob/route-891e1a9c2b8144f7.js +0 -1
  564. package/.next-prod/static/chunks/app/api/git/branch-diff/route-891e1a9c2b8144f7.js +0 -1
  565. package/.next-prod/static/chunks/app/api/git/branches/route-891e1a9c2b8144f7.js +0 -1
  566. package/.next-prod/static/chunks/app/api/git/commit-diff/route-891e1a9c2b8144f7.js +0 -1
  567. package/.next-prod/static/chunks/app/api/git/commits/route-891e1a9c2b8144f7.js +0 -1
  568. package/.next-prod/static/chunks/app/api/git/current-branch/route-891e1a9c2b8144f7.js +0 -1
  569. package/.next-prod/static/chunks/app/api/git/diff/route-891e1a9c2b8144f7.js +0 -1
  570. package/.next-prod/static/chunks/app/api/git/discard/route-891e1a9c2b8144f7.js +0 -1
  571. package/.next-prod/static/chunks/app/api/git/stage/route-891e1a9c2b8144f7.js +0 -1
  572. package/.next-prod/static/chunks/app/api/git/status/route-891e1a9c2b8144f7.js +0 -1
  573. package/.next-prod/static/chunks/app/api/git/unstage/route-891e1a9c2b8144f7.js +0 -1
  574. package/.next-prod/static/chunks/app/api/git/worktree/route-891e1a9c2b8144f7.js +0 -1
  575. package/.next-prod/static/chunks/app/api/glm/credentials/route-891e1a9c2b8144f7.js +0 -1
  576. package/.next-prod/static/chunks/app/api/glm/models/route-891e1a9c2b8144f7.js +0 -1
  577. package/.next-prod/static/chunks/app/api/glm/usage/route-891e1a9c2b8144f7.js +0 -1
  578. package/.next-prod/static/chunks/app/api/global-state/route-891e1a9c2b8144f7.js +0 -1
  579. package/.next-prod/static/chunks/app/api/health/route-891e1a9c2b8144f7.js +0 -1
  580. package/.next-prod/static/chunks/app/api/html-apps/[id]/route-891e1a9c2b8144f7.js +0 -1
  581. package/.next-prod/static/chunks/app/api/html-apps/route-891e1a9c2b8144f7.js +0 -1
  582. package/.next-prod/static/chunks/app/api/kimi/credentials/route-891e1a9c2b8144f7.js +0 -1
  583. package/.next-prod/static/chunks/app/api/kimi/models/route-891e1a9c2b8144f7.js +0 -1
  584. package/.next-prod/static/chunks/app/api/kimi/usage/route-891e1a9c2b8144f7.js +0 -1
  585. package/.next-prod/static/chunks/app/api/lsp/definition/route-891e1a9c2b8144f7.js +0 -1
  586. package/.next-prod/static/chunks/app/api/lsp/hover/route-891e1a9c2b8144f7.js +0 -1
  587. package/.next-prod/static/chunks/app/api/lsp/references/route-891e1a9c2b8144f7.js +0 -1
  588. package/.next-prod/static/chunks/app/api/lsp/status/route-891e1a9c2b8144f7.js +0 -1
  589. package/.next-prod/static/chunks/app/api/lsp/warmup/route-891e1a9c2b8144f7.js +0 -1
  590. package/.next-prod/static/chunks/app/api/mysql/columns/route-891e1a9c2b8144f7.js +0 -1
  591. package/.next-prod/static/chunks/app/api/mysql/connect/route-891e1a9c2b8144f7.js +0 -1
  592. package/.next-prod/static/chunks/app/api/mysql/disconnect/route-891e1a9c2b8144f7.js +0 -1
  593. package/.next-prod/static/chunks/app/api/mysql/export/route-891e1a9c2b8144f7.js +0 -1
  594. package/.next-prod/static/chunks/app/api/mysql/query/route-891e1a9c2b8144f7.js +0 -1
  595. package/.next-prod/static/chunks/app/api/mysql/schemas/route-891e1a9c2b8144f7.js +0 -1
  596. package/.next-prod/static/chunks/app/api/neo4j/connect/route-891e1a9c2b8144f7.js +0 -1
  597. package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-891e1a9c2b8144f7.js +0 -1
  598. package/.next-prod/static/chunks/app/api/neo4j/query/route-891e1a9c2b8144f7.js +0 -1
  599. package/.next-prod/static/chunks/app/api/neo4j/schema/route-891e1a9c2b8144f7.js +0 -1
  600. package/.next-prod/static/chunks/app/api/note/route-891e1a9c2b8144f7.js +0 -1
  601. package/.next-prod/static/chunks/app/api/ollama/config/route-891e1a9c2b8144f7.js +0 -1
  602. package/.next-prod/static/chunks/app/api/ollama/models/route-891e1a9c2b8144f7.js +0 -1
  603. package/.next-prod/static/chunks/app/api/ollama/start/route-891e1a9c2b8144f7.js +0 -1
  604. package/.next-prod/static/chunks/app/api/open-cursor/route-891e1a9c2b8144f7.js +0 -1
  605. package/.next-prod/static/chunks/app/api/open-vscode/route-891e1a9c2b8144f7.js +0 -1
  606. package/.next-prod/static/chunks/app/api/pick-folder/route-891e1a9c2b8144f7.js +0 -1
  607. package/.next-prod/static/chunks/app/api/pinned-sessions/route-891e1a9c2b8144f7.js +0 -1
  608. package/.next-prod/static/chunks/app/api/project-settings/route-891e1a9c2b8144f7.js +0 -1
  609. package/.next-prod/static/chunks/app/api/project-state/route-891e1a9c2b8144f7.js +0 -1
  610. package/.next-prod/static/chunks/app/api/projectGraph/affected/route-891e1a9c2b8144f7.js +0 -1
  611. package/.next-prod/static/chunks/app/api/projectGraph/callees/route-891e1a9c2b8144f7.js +0 -1
  612. package/.next-prod/static/chunks/app/api/projectGraph/callers/route-891e1a9c2b8144f7.js +0 -1
  613. package/.next-prod/static/chunks/app/api/projectGraph/coedit/route-891e1a9c2b8144f7.js +0 -1
  614. package/.next-prod/static/chunks/app/api/projectGraph/context/route-891e1a9c2b8144f7.js +0 -1
  615. package/.next-prod/static/chunks/app/api/projectGraph/file/route-891e1a9c2b8144f7.js +0 -1
  616. package/.next-prod/static/chunks/app/api/projectGraph/file-functions/route-891e1a9c2b8144f7.js +0 -1
  617. package/.next-prod/static/chunks/app/api/projectGraph/impact/route-891e1a9c2b8144f7.js +0 -1
  618. package/.next-prod/static/chunks/app/api/projectGraph/related/route-891e1a9c2b8144f7.js +0 -1
  619. package/.next-prod/static/chunks/app/api/projectGraph/risk/route-891e1a9c2b8144f7.js +0 -1
  620. package/.next-prod/static/chunks/app/api/projectGraph/search/route-891e1a9c2b8144f7.js +0 -1
  621. package/.next-prod/static/chunks/app/api/projects/route-891e1a9c2b8144f7.js +0 -1
  622. package/.next-prod/static/chunks/app/api/prompts/config/route-891e1a9c2b8144f7.js +0 -1
  623. package/.next-prod/static/chunks/app/api/push/public-key/route-891e1a9c2b8144f7.js +0 -1
  624. package/.next-prod/static/chunks/app/api/push/subscribe/route-891e1a9c2b8144f7.js +0 -1
  625. package/.next-prod/static/chunks/app/api/push/unsubscribe/route-891e1a9c2b8144f7.js +0 -1
  626. package/.next-prod/static/chunks/app/api/redis/command/route-891e1a9c2b8144f7.js +0 -1
  627. package/.next-prod/static/chunks/app/api/redis/connect/route-891e1a9c2b8144f7.js +0 -1
  628. package/.next-prod/static/chunks/app/api/redis/delete/route-891e1a9c2b8144f7.js +0 -1
  629. package/.next-prod/static/chunks/app/api/redis/disconnect/route-891e1a9c2b8144f7.js +0 -1
  630. package/.next-prod/static/chunks/app/api/redis/get/route-891e1a9c2b8144f7.js +0 -1
  631. package/.next-prod/static/chunks/app/api/redis/keys/route-891e1a9c2b8144f7.js +0 -1
  632. package/.next-prod/static/chunks/app/api/redis/set/route-891e1a9c2b8144f7.js +0 -1
  633. package/.next-prod/static/chunks/app/api/restart/route-891e1a9c2b8144f7.js +0 -1
  634. package/.next-prod/static/chunks/app/api/review/[id]/comments/route-891e1a9c2b8144f7.js +0 -1
  635. package/.next-prod/static/chunks/app/api/review/[id]/replies/route-891e1a9c2b8144f7.js +0 -1
  636. package/.next-prod/static/chunks/app/api/review/[id]/route-891e1a9c2b8144f7.js +0 -1
  637. package/.next-prod/static/chunks/app/api/review/identify/route-891e1a9c2b8144f7.js +0 -1
  638. package/.next-prod/static/chunks/app/api/review/order/route-891e1a9c2b8144f7.js +0 -1
  639. package/.next-prod/static/chunks/app/api/review/route-891e1a9c2b8144f7.js +0 -1
  640. package/.next-prod/static/chunks/app/api/review/share-info/route-891e1a9c2b8144f7.js +0 -1
  641. package/.next-prod/static/chunks/app/api/review/users/route-891e1a9c2b8144f7.js +0 -1
  642. package/.next-prod/static/chunks/app/api/scheduled-tasks/route-891e1a9c2b8144f7.js +0 -1
  643. package/.next-prod/static/chunks/app/api/services/config/route-891e1a9c2b8144f7.js +0 -1
  644. package/.next-prod/static/chunks/app/api/services/scripts/route-891e1a9c2b8144f7.js +0 -1
  645. package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-891e1a9c2b8144f7.js +0 -1
  646. package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-891e1a9c2b8144f7.js +0 -1
  647. package/.next-prod/static/chunks/app/api/session-by-path/route-891e1a9c2b8144f7.js +0 -1
  648. package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-891e1a9c2b8144f7.js +0 -1
  649. package/.next-prod/static/chunks/app/api/sessions/projects/route-891e1a9c2b8144f7.js +0 -1
  650. package/.next-prod/static/chunks/app/api/sessions/route-891e1a9c2b8144f7.js +0 -1
  651. package/.next-prod/static/chunks/app/api/settings/route-891e1a9c2b8144f7.js +0 -1
  652. package/.next-prod/static/chunks/app/api/shutdown/route-891e1a9c2b8144f7.js +0 -1
  653. package/.next-prod/static/chunks/app/api/skills/[id]/route-891e1a9c2b8144f7.js +0 -1
  654. package/.next-prod/static/chunks/app/api/skills/content/route-891e1a9c2b8144f7.js +0 -1
  655. package/.next-prod/static/chunks/app/api/skills/route-891e1a9c2b8144f7.js +0 -1
  656. package/.next-prod/static/chunks/app/api/snapshots/blob/route-891e1a9c2b8144f7.js +0 -1
  657. package/.next-prod/static/chunks/app/api/snapshots/diff/route-891e1a9c2b8144f7.js +0 -1
  658. package/.next-prod/static/chunks/app/api/snapshots/route-891e1a9c2b8144f7.js +0 -1
  659. package/.next-prod/static/chunks/app/api/terminal/aliases/route-891e1a9c2b8144f7.js +0 -1
  660. package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-891e1a9c2b8144f7.js +0 -1
  661. package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-891e1a9c2b8144f7.js +0 -1
  662. package/.next-prod/static/chunks/app/api/terminal/env/route-891e1a9c2b8144f7.js +0 -1
  663. package/.next-prod/static/chunks/app/api/terminal/history/route-891e1a9c2b8144f7.js +0 -1
  664. package/.next-prod/static/chunks/app/api/update/route-891e1a9c2b8144f7.js +0 -1
  665. package/.next-prod/static/chunks/app/api/update-state/route-891e1a9c2b8144f7.js +0 -1
  666. package/.next-prod/static/chunks/app/api/version/route-891e1a9c2b8144f7.js +0 -1
  667. package/.next-prod/static/chunks/app/apps/[...path]/route-891e1a9c2b8144f7.js +0 -1
  668. package/.next-prod/static/chunks/app/manifest.webmanifest/route-891e1a9c2b8144f7.js +0 -1
  669. package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-891e1a9c2b8144f7.js +0 -1
  670. package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-891e1a9c2b8144f7.js +0 -1
  671. package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-891e1a9c2b8144f7.js +0 -1
  672. package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-891e1a9c2b8144f7.js +0 -1
  673. package/.next-prod/static/css/ea27ccfe01ce807c.css +0 -1
  674. /package/.next-prod/static/{ZqxwSTxy2HJcALhnBemS7 → qoIca6xp2OKAJtDEvMaXC}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ "use strict";exports.id=1237,exports.ids=[1237],exports.modules={15218:(a,b,c)=>{function d(a){let b=new Map,c=[];for(let d of a.nodes.keys()){let e=a.out.get(d);if(!e||0===e.length){b.set(d,0),c.push(d);continue}let f=0;for(let a of e)f+=a.weight;b.set(d,f)}return{outSum:b,dangling:c}}function e(a,b,c,d,e,f){if(0===a.nodes.size)return new Map;let g=new Map;for(let c of a.nodes.keys())g.set(c,b.get(c)??0);for(let h=0;h<d;h++){let d=new Map;for(let e of a.nodes.keys())d.set(e,(1-c)*(b.get(e)??0));let h=0;for(let a of f.dangling)h+=g.get(a)??0;if(h>0){let a=c*h;for(let[c,e]of b)d.set(c,(d.get(c)??0)+a*e)}for(let[b,e]of a.out){let a=f.outSum.get(b)??0;if(0===a)continue;let h=c*(g.get(b)??0)/a;if(0!==h)for(let a of e)d.set(a.target,(d.get(a.target)??0)+h*a.weight)}let i=0;for(let b of a.nodes.keys())i+=Math.abs((d.get(b)??0)-(g.get(b)??0));if(g=d,i<e)break}return g}function f(a,b){let c=new Map;if(!b||0===b.size){let b=1/Math.max(1,a.nodes.size);for(let d of a.nodes.keys())c.set(d,b);return c}let d=0;for(let[e,f]of b)a.nodes.has(e)&&f>0&&(c.set(e,f),d+=f);if(0===d){let b=1/Math.max(1,a.nodes.size);for(let d of a.nodes.keys())c.set(d,b);return c}for(let[a,b]of c)c.set(a,b/d);return c}function g(a,b={}){let c=b.damping??.85,h=b.maxIter??50,i=b.tol??1e-6,j=d(a);return e(a,f(a),c,h,i,j)}function h(a,b,c={}){let g=c.damping??.85,i=c.maxIter??30,j=c.tol??1e-6,k=c.topK??0,l=new Map(Array.isArray(b)?b.map(a=>[a,1]):b),m=f(a,l),n=d(a),o=e(a,m,g,i,j,n),p=new Set(l.keys()),q=[];for(let[a,b]of o)!p.has(a)&&(b<=0||q.push({node:a,score:b}));return q.sort((a,b)=>b.score-a.score),k>0?q.slice(0,k):q}c.d(b,{M:()=>h,Q:()=>g})},21237:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{MAX_ANALYTICS_SYMBOLS:()=>v,analyticsDegradedReason:()=>m,cachedPPR:()=>k,getAnalytics:()=>n,getOrTriggerAnalytics:()=>q,invalidateAnalytics:()=>o,isAnalyticsOversized:()=>l,precomputeAnalytics:()=>p});var e=c(33265),f=c(96971),g=c(15218),h=c(86712),i=c(25757),j=a([e]);e=(j.then?(await j)():j)[0];class r{constructor(a){this.map=new Map,this.cap=a}get(a){let b=this.map.get(a);if(b)return this.map.delete(a),this.map.set(a,b),b}set(a,b){if(this.map.has(a)&&this.map.delete(a),this.map.set(a,b),this.map.size>this.cap){let a=this.map.keys().next().value;void 0!==a&&this.map.delete(a)}}clear(){this.map.clear()}get size(){return this.map.size}}function k(a,b,c={}){let d=function(a,b={}){let c=Array.isArray(a)?a.map(a=>[a,1]):[...a.entries()];c.sort((a,b)=>a[0].localeCompare(b[0]));let d=b.damping??.85,e=b.topK??0;return`d${d}|k${e}|`+c.map(a=>`${a[0]}=${a[1]}`).join(",")}(b,c),e=a.pprCache.get(d);if(e)return e;let f=(0,g.M)(a.graph,b,c);return a.pprCache.set(d,f),f}let s=new Map,t=new Map,u=0,v=2e5,w=new Set;function l(a){let b=(0,e.FW)(a);return!(b<=v)&&(w.has(a.cwd)||(w.add(a.cwd),console.warn(`[analytics] skipping precompute for ${a.cwd}: ${b} symbols exceeds MAX_ANALYTICS_SYMBOLS=${v}. context / related / risk will report degraded results; search / file / callers / callees / impact / coedit are unaffected.`)),!0)}function m(a){return l(a)?"analytics-skipped-oversized":"analytics-warming"}function n(a){return s.get(a)??null}function o(a){if(!a){s.clear(),t.clear(),w.clear();return}s.delete(a),t.delete(a),w.delete(a)}function p(a,b){let c=t.get(a);if(c)return c;if(l(b))return Promise.reject(Error("analytics-skipped-oversized"));let d=(async()=>{let c=Date.now(),d=u+=1,e=(0,f.TA)(b,d),j=(0,g.Q)(e),k=new h.Q(e),l=(0,i.h)(e),m={cwd:a,version:d,graph:e,pagerank:j,tfidf:k,communities:l,pprCache:new r(200),builtAt:Date.now(),buildMs:Date.now()-c};return s.set(a,m),t.delete(a),m})();return t.set(a,d),d}function q(a,b){let c=s.get(a);return c||(l(b)||p(a,b).catch(a=>{console.error("[analytics] precompute failed:",a)}),null)}d()}catch(a){d(a)}})},25757:(a,b,c)=>{c.d(b,{h:()=>i});var d=c(65856),e=c(65497),f=c.n(e);let g=d.Ay.default??d.Ay,h=f().default??f();function i(a){if(0===a.nodes.size)return new Map;let b=new g({type:"undirected",multi:!1});for(let c of a.nodes.keys())b.addNode(c);let c=new Map;for(let[b,d]of a.out)for(let a of d){if(b===a.target)continue;let[d,e]=b<a.target?[b,a.target]:[a.target,b],f=d+"\0|\0"+e;c.set(f,(c.get(f)??0)+a.weight)}for(let[a,d]of c){let c=a.indexOf("\0|\0");if(c<0)continue;let e=a.slice(0,c),f=a.slice(c+3);b.addEdgeWithKey(a,e,f,{weight:d})}let d=h(b),e=new Map;for(let[a,b]of Object.entries(d))e.set(a,b);return e}},37730:(a,b,c)=>{function d(a,b){return`${a}::${b}`}function e(a){let b=a.indexOf("::");return b<0?null:{filePath:a.slice(0,b),qualifiedName:a.slice(b+2)}}c.d(b,{I:()=>d,r:()=>e})},86712:(a,b,c)=>{c.d(b,{Q:()=>h});let d=/[\s_./>:\\-]+|(?<=[a-z0-9])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])/g,e=[3,4];function f(a){if(!a)return[];let b=a.split(d),c=[];for(let a of b){if(!a)continue;let b=a.toLowerCase();b.length<2||c.push(b)}return c}function*g(a,b){if(!(a.length<b))for(let c=0;c<=a.length-b;c++)yield a.slice(c,c+b)}class h{constructor(a){for(const[b,c]of(this.df=new Map,this.tfByNode=new Map,this.normByNode=new Map,this.nDocs=a.nodes.size,a.nodes)){const a=function(a){a.tokens||(a.tokens=[...f(a.name),...f(a.qualifiedName),...f(a.filePath.replace(/\.[^./]+$/,""))]);let b=[];for(let c of a.tokens)if(b.push({term:c,weight:1}),c.length>=4)for(let a of e)for(let d of g(c,a))b.push({term:d,weight:.5});return b}(c),d=new Map;for(const{term:b,weight:c}of a)d.set(b,(d.get(b)??0)+c);for(const a of(this.tfByNode.set(b,d),d.keys()))this.df.set(a,(this.df.get(a)??0)+1)}for(const[a,b]of this.tfByNode){let c=0;for(const[a,d]of b){const b=d*this.idf(a);c+=b*b}this.normByNode.set(a,Math.sqrt(c)||1)}}idf(a){let b=this.df.get(a)??0;return 0===b?0:Math.log((this.nDocs+1)/(b+1))+1}search(a,b=10){let c=function(a){let b=[];for(let c of f(a))if(b.push({term:c,weight:1}),c.length>=4)for(let a of e)for(let d of g(c,a))b.push({term:d,weight:.5});return b}(a);if(0===c.length)return[];let d=new Map;for(let{term:a,weight:b}of c)d.set(a,(d.get(a)??0)+b);let h=new Map,i=0;for(let[a,b]of d){let c=b*this.idf(a);0!==c&&(h.set(a,c),i+=c*c)}let j=Math.sqrt(i);if(0===j)return[];let k=new Map;for(let[a,b]of this.tfByNode){let c=0;for(let[a,d]of h){let e=b.get(a);e&&(c+=d*(e*this.idf(a)))}c>0&&k.set(a,c/(j*(this.normByNode.get(a)??1)))}let l=[];for(let[a,b]of k)l.push({node:a,score:b});return l.sort((a,b)=>b.score-a.score),b>0?l.slice(0,b):l}}},96971:(a,b,c)=>{c.d(b,{TA:()=>g});var d=c(37730);let e="__file__";function f(a){return(0,d.I)(a,e)}function g(a,b){let c=new Map,g=new Map,h=new Map,i=(a,b,c)=>{let d=a.get(b);d||(d=[],a.set(b,d)),d.push(c)};for(let[b,g]of a.files){for(let a of g.flatSymbols){let e=(0,d.I)(b,a.qualifiedName);c.has(e)||c.set(e,{filePath:b,qualifiedName:a.qualifiedName,name:a.name,kind:a.kind,startLine:a.startLine,endLine:a.endLine})}let a=f(b);c.has(a)||c.set(a,{filePath:b,qualifiedName:e,name:function(a){let b=a.lastIndexOf("/");return b<0?a:a.slice(b+1)}(b),kind:"unknown",startLine:0,endLine:0})}for(let[b,e]of a.files)for(let a of e.intraCalls){let e=(0,d.I)(b,a.from),f=(0,d.I)(b,a.to);if(!c.has(e)||!c.has(f))continue;let j=Math.max(1,a.lines.length);i(g,e,{target:f,edgeType:"intraCall",weight:j}),i(h,f,{target:e,edgeType:"intraCall",weight:j})}for(let[b,e]of a.files)for(let a of e.outgoingCalls){let e=(0,d.I)(b,a.from),f=(0,d.I)(a.to.filePath,a.to.qualifiedName);if(!c.has(e)||!c.has(f))continue;let j=Math.max(1,a.lines.length);i(g,e,{target:f,edgeType:"crossCall",weight:j}),i(h,f,{target:e,edgeType:"crossCall",weight:j})}for(let[b,d]of a.files){let a=f(b);for(let b of d.importedFiles){let d=f(b);c.has(d)&&(i(g,a,{target:d,edgeType:"import",weight:1}),i(h,d,{target:a,edgeType:"import",weight:1}))}}for(let[b,e]of a.files){let a=f(b),j=e.flatSymbols;if(0===j.length)continue;let k=1/j.length;for(let e of j){let f=(0,d.I)(b,e.qualifiedName);c.has(f)&&(i(g,f,{target:a,edgeType:"import",weight:1}),i(h,a,{target:f,edgeType:"import",weight:1}),i(g,a,{target:f,edgeType:"import",weight:k}),i(h,f,{target:a,edgeType:"import",weight:k}))}}return{cwd:a.cwd,version:b,nodes:c,out:g,in:h}}}};
@@ -1 +1 @@
1
- "use strict";exports.id=4949,exports.ids=[4949],exports.modules={25157:(a,b,c)=>{c.d(b,{d:()=>i});let d=globalThis,e=d.__cockpitGraphProgressListeners??(d.__cockpitGraphProgressListeners=new Map),f=d.__cockpitGraphProgressLastFrame??(d.__cockpitGraphProgressLastFrame=new Map),g=d.__cockpitGraphProgressLastEmitAt??(d.__cockpitGraphProgressLastEmitAt=new Map),h={listing:[0,3],contexts:[3,6],parsing:[6,85],resolving:[85,92],edges:[92,99],done:[100,100]};function i(a,b,c=0,d=0,j,k=!1){let l=e.get(a),m=Date.now();if(!k&&m-(g.get(a)??0)<100)return;g.set(a,m);let n={cwd:a,phase:b,filesDone:c,filesTotal:d,...j?{currentFile:j}:{},percent:function(a,b,c){let[d,e]=h[a];return"parsing"!==a||c<=0?d:Math.min(e,d+(e-d)*b/c)}(b,c,d)};if("done"===b?(f.delete(a),g.delete(a)):f.set(a,n),l&&0!==l.size)for(let a of l)try{a(n)}catch{}}},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=15e3;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:()=>I,J:()=>O,Mv:()=>N,Xn:()=>M,bQ:()=>K,cl:()=>y,ih:()=>v,s7:()=>H,u$:()=>x,xl:()=>D});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(25157),n=c(27485),o=c(97669),p=c(83624),q=a([j]);async function r(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=(q.then?(await q)():q)[0];let P=/(['"`])([A-Za-z][A-Za-z0-9_.-]{2,63})\1/g;async function s(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,o.Bu)(g),h=e.extractSymbols(f.rootNode,c);(0,p.YN)(h);let 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(P.lastIndex=0;null!==(c=P.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}\u0000${g}`;if(e.has(h))continue;e.add(h);let i=t(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 t(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 u(a){let b=Date.now();(0,m.d)(a,"listing",0,0,void 0,!0);let 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);(0,m.d)(a,"contexts",0,c.length,void 0,!0);let 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,o.Bu)(b);i.set(b,await c.buildProjectContext(a,e))}let j=c.length,n=0;(0,m.d)(a,"parsing",0,j,void 0,!0);let p=(await r(c,50,async b=>{let c=await s(g().join(a,b),b);return n+=1,(0,m.d)(a,"parsing",n,j,b),c})).filter(a=>null!==a);(0,m.d)(a,"resolving",j,j,void 0,!0);let q=new Map;for(let a of p){let b=(0,o.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);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:j,reexportsByLocalName:k})}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 b of((0,m.d)(a,"edges",j,j,void 0,!0),p)){let a=q.get(b.path),c=(0,o.Bu)(b.language),d=i.get(b.language),e=new Map,f=new Map,g=new Map,h=new Map;for(let i of b.rawCalls){let b=t(a.flatSymbols,i.line);if(b){for(let j of c.resolveCall(i,b,a,q,d))if("symbol"===j.kind)if(j.addr.filePath===a.path){let c=`${b.qualifiedName}${j.addr.qualifiedName}`,d=e.get(c);if(d)d.lines.push(i.line);else{let d={from:b.qualifiedName,to:j.addr.qualifiedName,lines:[i.line]};e.set(c,d),a.intraCalls.push(d)}}else{let c=`${b.qualifiedName}${j.addr.filePath}${j.addr.qualifiedName}`,d=f.get(c);if(d)d.lines.push(i.line);else{let d={from:b.qualifiedName,to:{filePath:j.addr.filePath,qualifiedName:j.addr.qualifiedName},lines:[i.line]};f.set(c,d),a.outgoingCalls.push(d)}}else if("external"===j.kind){let c=`${b.qualifiedName}${j.packageSpec}${j.name}`,d=g.get(c);if(d)d.lines.push(i.line);else{let d={from:b.qualifiedName,packageSpec:j.packageSpec,importedName:j.name,lines:[i.line]};g.set(c,d),a.externalCalls.push(d)}}else if("method-unresolved"===j.kind){let c=a.bindingsByLocalName.get(j.receiverName),d=c?a.resolvedImports.get(c.specifier)??"":"",e=`${b.qualifiedName}${j.receiverName}${j.methodName}`,f=h.get(e);if(f)f.lines.push(i.line);else{let c={from:b.qualifiedName,receiverName:j.receiverName,methodName:j.methodName,receiverFilePath:d,lines:[i.line]};h.set(e,c),a.methodCalls.push(c)}}}}for(let b of a.intraCalls)b.lines.sort((a,b)=>a-b);for(let b of a.outgoingCalls)b.lines.sort((a,b)=>a-b);for(let b of a.externalCalls)b.lines.sort((a,b)=>a-b);for(let b of a.methodCalls)b.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(0,m.d)(a,"done",j,j,void 0,!0),{cwd:a,files:q,truncated:d,fileCountCap:d?l.BE:void 0,tsconfigs:f,workspaces:h,projectContexts:i,fileSet:e,generatedAt:Date.now(),buildMs:Date.now()-b}}let Q=new Map,R=new Map,S=new Set,T=new Set,U=null;function v(a){if(U=a,a)for(let b of T)a(b,()=>S.add(b))}async function w(a,b){let c=Array.from(b.files.keys()),d=0,e=async()=>{for(;d<c.length;){let e=d++;try{await D(a,c[e],b)}catch{}}};await Promise.all(Array.from({length:Math.min(8,c.length)},e))}async function x(a,b={}){!T.has(a)&&(T.add(a),U&&U(a,()=>S.add(a))),b.forceRefresh&&(Q.delete(a),S.delete(a));let d=Q.get(a);if(d){if(S.has(a)){S.delete(a);try{await w(a,d)}catch{}}return d}let e=R.get(a);if(e)return e;let f=u(a).then(b=>(Q.set(a,b),R.delete(a),S.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)).catch(b=>{throw(0,m.d)(a,"done",0,0,void 0,!0),R.delete(a),b});return R.set(a,f),f}function y(a){if(Promise.all([c.e(4008),c.e(2540)]).then(c.bind(c,92540)).then(b=>b.invalidateAnalytics(a)).catch(()=>{}),!a){Q.clear(),R.clear(),S.clear();return}Q.delete(a),R.delete(a),S.delete(a)}let V=(0,i.promisify)(h.exec);async function z(a,b){let c=!0;try{await V("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 V(`git -c core.quotePath=false ls-files --cached --others --exclude-standard --error-unmatch -- '${b.replace(/'/g,"'\\''")}'`,{cwd:a}),!0}catch{return!1}}function A(a){Promise.all([c.e(4008),c.e(2540)]).then(c.bind(c,92540)).then(b=>b.invalidateAnalytics(a)).catch(()=>{})}async function B(a,b,c){if(!(0,j.M)(b)||c.files.size>=l.BE||!await z(a,b))return!1;let d=await s(g().join(a,b),b);return!!d&&(c.fileSet.add(d.path),await C(d,null,c),A(a),!0)}async function C(a,b,c){let d=(0,o.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,n=new Map,p=new Map,q=new Map;for(let b of(c.files.set(a.path,l),a.rawCalls)){let a=t(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=n.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]};n.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 D(a,b,c){let d,f=c.files.get(b);if(!f)return B(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 s(g().join(a,b),b);return!!h&&(await C(h,f,c),A(a),!0)}function E(a){return{filePath:a.filePath,qualifiedName:a.qualifiedName,name:a.name,kind:a.kind,startLine:a.startLine,endLine:a.endLine,params:a.params}}function F(a){let b=a.indexOf(">");return b>=0?a.slice(0,b):a}function G(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 H(a,b){let c=a.files.get(b);if(!c)return null;let d=c.flatSymbols.filter(a=>!a.qualifiedName.includes(">")).map(E).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=F(a.from),c=F(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=G(a.lines);let h=[],i=new Map;for(let b of c.outgoingCalls){let d=F(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,n._)(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:E(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=F(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,n._)(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:E(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=G(a.lines);for(let a of j)a.lines.sort((a,b)=>a-b),a.lines=G(a.lines);let l=[],m=new Map;for(let a of c.externalCalls){let b=F(a.from);if(!e.has(b))continue;let c=`${b}|${a.packageSpec}|${a.importedName}`,d=m.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()};m.set(c,d),l.push(d)}}for(let a of l)a.lines.sort((a,b)=>a-b),a.lines=G(a.lines);let o=[],p=new Map;for(let a of c.methodCalls){let b=F(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=G(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 I(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 J(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 K(a,b,c,d={}){let e=b.trim();if(!e)return d.includeLiterals?{files:[],symbols:[],literals:[]}:{files:[],symbols:[]};let f=J(e),g=[];for(let b of a.files.values()){if(g.length>=c)break;J(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&&(J(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;J(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 L(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 M(a,b,c){let d=L(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:E(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:E(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=G(a.callLines);e.sort((a,b)=>a.caller.filePath.localeCompare(b.caller.filePath)||a.caller.qualifiedName.localeCompare(b.caller.qualifiedName));let g=E(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 N(a,b,c){let d=L(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:E(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:E(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=G(a.callLines);e.sort((a,b)=>a.callee.filePath.localeCompare(b.callee.filePath)||a.callee.qualifiedName.localeCompare(b.callee.qualifiedName));let g=E(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 O(a,b,c,d){let e=L(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=E(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:E(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:E(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:E(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)}})},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)}})},83624:(a,b,c)=>{function d(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 e(a){return a.replace(/\s+/g," ").trim()}function f(a,b){return a?`${a}>${b}`:b}function g(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 h(a,b,c,g,i=[],j){return{qualifiedName:f(g,b),name:b,kind:c,startLine:a.startPosition.row+1,endLine:a.endPosition.row+1,contentHash:d(e(a.text)),children:i,params:j}}function i(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 j(a,b){let c=new Map;for(let b=0;b<a.namedChildCount;b++){let d=a.namedChild(b);d&&d.type.endsWith("comment")&&c.set(d.endPosition.row+1,d)}if(0===c.size)return;let d=new Set;for(let a of b)for(let b=a.startLine;b<=a.endLine;b++)d.add(b);for(let a of b){if("unknown"===a.kind)continue;let b=a.startLine;for(;;){let a=c.get(b-1);if(!a)break;let e=a.startPosition.row+1,f=!1;for(let a=e;a<=b-1;a++)if(d.has(a)){f=!0;break}if(f)break;b=e}if(b!==a.startLine){for(let c=b;c<a.startLine;c++)d.add(c);a.startLine=b}}}function k(a,b){let c=a.text.split("\n"),f=c.length;if(0===f)return[];let g=new Uint8Array(f+2);for(let a of b){let b=Math.max(1,a.startLine),c=Math.min(f,a.endLine);for(let a=b;a<=c;a++)g[a]=1}let h=[],i=(a,b)=>{let f=!1;for(let d=a;d<=b;d++){let a=c[d-1];if(a&&a.trim().length>0){f=!0;break}}if(!f)return;let g=c.slice(a-1,b).join("\n");h.push({qualifiedName:`__code_${a}_${b}__`,name:"code",kind:"unknown",startLine:a,endLine:b,contentHash:d(e(g)),children:[]})},j=-1;for(let a=1;a<=f;a++)g[a]?j>=0&&(i(j,a-1),j=-1):j<0&&(j=a);return j>=0&&i(j,f),h}function l(a){let b=[],c=function(a){let b=[],c=-1,f=-1;for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(e){if("import_statement"===e.type||"export_statement"===e.type&&null!==e.childForFieldName("source")||"import_from_statement"===e.type||"future_import_statement"===e.type)b.push(e),c<0&&(c=e.startPosition.row+1),f=e.endPosition.row+1;else if(c>=0)break}}return c<0?null:{qualifiedName:"__imports__",name:"imports",kind:"unknown",startLine:c,endLine:f,contentHash:d(e(b.map(a=>a.text).join("\n"))),children:[]}}(a);c&&b.push(c);for(let c=0;c<a.namedChildCount;c++){let j=a.namedChild(c);j&&b.push(...function a(b,c,j=!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[h(b,g(b),"function",c,[],i(b))];case"class_declaration":case"abstract_class_declaration":{let a=g(b),d=f(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(h(e,g(e),"method",b,[],i(e)));else if("public_field_definition"===e.type){let a=e.childForFieldName("value");a&&("arrow_function"===a.type||"function_expression"===a.type)&&c.push(h(e,g(e),"method",b,[],i(a)))}}}return c}(b.childForFieldName("body"),d);return[h(b,a,"class",c,e)]}case"interface_declaration":return[h(b,g(b),"interface",c)];case"type_alias_declaration":return[h(b,g(b),"type",c)];case"enum_declaration":return[h(b,g(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"),j=e.childForFieldName("value");if(!f)continue;let k=f.text,l=j&&("arrow_function"===j.type||"function_expression"===j.type),m=l&&j?i(j):void 0;if(c.push(h(a,k,l?"function":"const",b,[],m)),j&&"object"===j.type&&!l){let a=b?`${b}>${k}`:k;for(let b=0;b<j.namedChildCount;b++){let d=j.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(h(d,b.text,"method",a,[],i(e)))}else if("method_definition"===d.type){let b=g(d);b&&c.push(h(d,b,"method",a,[],i(d)))}}}}}return c}(b,c);case"class_definition":{let a=g(b),j=f(c,a),k=function a(b,c){if(!b)return[];let j=[];for(let k=0;k<b.namedChildCount;k++){let l=b.namedChild(k);if(l){if("function_definition"===l.type)j.push(h(l,g(l),"method",c,[],i(l)));else if("decorated_definition"===l.type){let b=l.childForFieldName("definition");if(b?.type==="function_definition")j.push({...h(b,g(b),"method",c,[],i(b)),startLine:l.startPosition.row+1,contentHash:d(e(l.text))});else if(b?.type==="class_definition"){let i=g(b),k=f(c,i),m=a(b.childForFieldName("body"),k);j.push({...h(b,i,"class",c,m),startLine:l.startPosition.row+1,contentHash:d(e(l.text))})}}else if("class_definition"===l.type){let b=g(l),d=f(c,b),e=a(l.childForFieldName("body"),d);j.push(h(l,b,"class",c,e))}}}return j}(b.childForFieldName("body"),j);return[h(b,a,"class",c,k)]}case"decorated_definition":{let f=b.childForFieldName("definition");if(!f)return[];return a(f,c,!1).map(a=>({...a,startLine:b.startPosition.row+1,contentHash:d(e(b.text))}))}case"expression_statement":{let a=[];for(let g=0;g<b.namedChildCount;g++){let h=b.namedChild(g);if(h?.type==="assignment"){let g=function(a,b,c){let g=b.childForFieldName("left");if(!g||"identifier"!==g.type)return null;let h=g.text;return{qualifiedName:f(c,h),name:h,kind:"const",startLine:a.startPosition.row+1,endLine:a.endPosition.row+1,contentHash:d(e(a.text)),children:[]}}(b,h,c);g&&a.push(g)}}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 j=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),k=j?`${j} ${f}`:f;return g.map((a,c)=>h(a,g.length>1?`${k} #${c+1}`:k,"function",b,[],i(a)))}(b,c)),a}default:return[]}}(j,void 0,!1))}return j(a,b),b.push(...k(a,b)),m(b),b}function m(a){let b=new Map,c=a=>{for(let d of a){let a=(b.get(d.qualifiedName)??0)+1;b.set(d.qualifiedName,a),a>1&&(d.qualifiedName=`${d.qualifiedName}#${a}`),c(d.children)}};c(a)}c.d(b,{Hs:()=>l,NZ:()=>e,YN:()=>m,_B:()=>k,mG:()=>j,qj:()=>d})},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)},97669:(a,b,c)=>{c.d(b,{Bu:()=>d.Bu});var d=c(28677),e=c(76760),f=c.n(e),g=c(83624);function h(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 i(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=j(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 j(a){return a.length>=2&&('"'===a[0]||"'"===a[0])&&a[a.length-1]===a[0]?a.slice(1,-1):a}function k(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 l={typescript:k,tsx:k,javascript:k,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 m(a,b){let c=l[b];return c?c(a):[]}var n=c(25344);function o(a){return"function"===a||"class"===a||"method"===a}function p(a,b){return{grammarId:a,extensions:b,extractSymbols:(a,b)=>(0,g.Hs)(a),extractImports:b=>({specs:m(b,a),bindings:[...i(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=j(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)=>h(a),async buildProjectContext(a,b){let c=new Set(b),d=await (0,n.ZT)(a),e=await (0,n.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,n._0)(b,a.scope)),c.owningScopesCache.set(b,e)),a.startsWith("./")||a.startsWith("../"))return(0,n.KP)(f().resolve(c.cwd,f().dirname(b),a),c.cwd,d);if(a.startsWith("/"))return(0,n.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,n.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,n.IS)(f().posix.join(e.dir,g),d)??(0,n.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&&o(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(">")&&o(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&&o(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)o(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 q=p("typescript",[".ts"]),r=p("tsx",[".tsx",".jsx"]),s=p("javascript",[".js",".mjs",".cjs"]);function t(a){return"function"===a||"class"===a||"method"===a}function u(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 v=c(73024);function w(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:(0,g.qj)((0,g.NZ)(a.text)),children:e,params:f}}function x(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 y(a){try{let b=await v.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 z(a){return"function"===a||"class"===a||"method"===a}function A(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:(0,g.qj)((0,g.NZ)(a.text)),children:e,params:f}}function B(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 C(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 v.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 D(a){return"function"===a||"class"===a||"method"===a}(0,d.ik)(q),(0,d.ik)(r),(0,d.ik)(s),(0,d.ik)({grammarId:"python",extensions:[".py",".pyi"],extractSymbols:(a,b)=>(0,g.Hs)(a),extractImports:a=>({specs:m(a,"python"),bindings:i(a)}),extractCallSites:(a,b)=>h(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 u(h||".",g,d)}for(let b of c.pythonRoots){let e=u(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&&t(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(">")&&t(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&&t(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)t(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}}if(c<0)return null;let e=b.map(a=>a.text).join("\n");return{qualifiedName:"__imports__",name:"imports",kind:"unknown",startLine:c,endLine:d,contentHash:(0,g.qj)((0,g.NZ)(e)),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(w(e,a.text,"function",void 0,[],x(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=w(e,a.text,"method",d??void 0,[],x(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(w(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(w(e,f.text,"const",b))}else"identifier"===a.type&&c.push(w(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)),(0,g.mG)(a,c),c.push(...(0,g._B)(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 y(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(">")&&z(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&&z(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(">"))&&z(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}}if(c<0)return null;let e=b.map(a=>a.text).join("\n");return{qualifiedName:"__imports__",name:"imports",kind:"unknown",startLine:c,endLine:d,contentHash:(0,g.qj)((0,g.NZ)(e)),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(A(e,a.text,"function",void 0,[],B(e)));break}case"struct_item":case"union_item":{let a=e.childForFieldName("name");if(!a)break;b.push(A(e,a.text,"class",void 0));break}case"enum_item":{let a=e.childForFieldName("name");if(!a)break;b.push(A(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(A(e,a.text,"method",b,[],B(e)))}}return d}(e,a.text);b.push(A(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(A(e,a.text,"method",b,[],B(e)))}else if("function_signature_item"===e.type){let a=e.childForFieldName("name");if(!a)continue;d.push(A(e,a.text,"method",b,[],B(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(A(e,a.text,"const",void 0));break}case"type_item":{let a=e.childForFieldName("name");if(!a)break;b.push(A(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(A(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)),(0,g.mG)(a,c),c.push(...(0,g._B)(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 C(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(">")&&D(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&&D(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(">"))&&D(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(">")&&D(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)})}};
1
+ "use strict";exports.id=4949,exports.ids=[4949],exports.modules={25157:(a,b,c)=>{c.d(b,{d:()=>i});let d=globalThis,e=d.__cockpitGraphProgressListeners??(d.__cockpitGraphProgressListeners=new Map),f=d.__cockpitGraphProgressLastFrame??(d.__cockpitGraphProgressLastFrame=new Map),g=d.__cockpitGraphProgressLastEmitAt??(d.__cockpitGraphProgressLastEmitAt=new Map),h={listing:[0,3],contexts:[3,6],parsing:[6,85],resolving:[85,92],edges:[92,99],done:[100,100]};function i(a,b,c=0,d=0,j,k=!1){let l=e.get(a),m=Date.now();if(!k&&m-(g.get(a)??0)<100)return;g.set(a,m);let n={cwd:a,phase:b,filesDone:c,filesTotal:d,...j?{currentFile:j}:{},percent:function(a,b,c){let[d,e]=h[a];return"parsing"!==a||c<=0?d:Math.min(e,d+(e-d)*b/c)}(b,c,d)};if("done"===b?(f.delete(a),g.delete(a)):f.set(a,n),l&&0!==l.size)for(let a of l)try{a(n)}catch{}}},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=1e5;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:()=>h,ik:()=>e,iv:()=>g});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(a){return d.get(a)}function h(){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:()=>J,FW:()=>v,J:()=>P,Mv:()=>O,Xn:()=>N,bQ:()=>L,cl:()=>z,ih:()=>w,s7:()=>I,u$:()=>y,xl:()=>E});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(25157),n=c(27485),o=c(91939),p=c(83624),q=a([j]);async function r(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=(q.then?(await q)():q)[0];let Q=/(['"`])([A-Za-z][A-Za-z0-9_.-]{2,63})\1/g;async function s(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,o.Bu)(g),h=e.extractSymbols(f.rootNode,c);(0,p.YN)(h);let 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(Q.lastIndex=0;null!==(c=Q.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}\u0000${g}`;if(e.has(h))continue;e.add(h);let i=t(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 t(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 u(a){let b=Date.now();(0,m.d)(a,"listing",0,0,void 0,!0);let 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);(0,m.d)(a,"contexts",0,c.length,void 0,!0);let 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,o.iv)(b);c&&i.set(b,await c.buildProjectContext(a,e))}let j=c.length,n=0;(0,m.d)(a,"parsing",0,j,void 0,!0);let p=(await r(c,50,async b=>{let c=await s(g().join(a,b),b);return n+=1,(0,m.d)(a,"parsing",n,j,b),c})).filter(a=>null!==a);(0,m.d)(a,"resolving",j,j,void 0,!0);let q=new Map;for(let a of p){let b=(0,o.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);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:j,reexportsByLocalName:k})}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 b of((0,m.d)(a,"edges",j,j,void 0,!0),p)){let a=q.get(b.path),c=(0,o.Bu)(b.language),d=i.get(b.language),e=new Map,f=new Map,g=new Map,h=new Map;for(let i of b.rawCalls){let b=t(a.flatSymbols,i.line);if(b){for(let j of c.resolveCall(i,b,a,q,d))if("symbol"===j.kind)if(j.addr.filePath===a.path){let c=`${b.qualifiedName}${j.addr.qualifiedName}`,d=e.get(c);if(d)d.lines.push(i.line);else{let d={from:b.qualifiedName,to:j.addr.qualifiedName,lines:[i.line]};e.set(c,d),a.intraCalls.push(d)}}else{let c=`${b.qualifiedName}${j.addr.filePath}${j.addr.qualifiedName}`,d=f.get(c);if(d)d.lines.push(i.line);else{let d={from:b.qualifiedName,to:{filePath:j.addr.filePath,qualifiedName:j.addr.qualifiedName},lines:[i.line]};f.set(c,d),a.outgoingCalls.push(d)}}else if("external"===j.kind){let c=`${b.qualifiedName}${j.packageSpec}${j.name}`,d=g.get(c);if(d)d.lines.push(i.line);else{let d={from:b.qualifiedName,packageSpec:j.packageSpec,importedName:j.name,lines:[i.line]};g.set(c,d),a.externalCalls.push(d)}}else if("method-unresolved"===j.kind){let c=a.bindingsByLocalName.get(j.receiverName),d=c?a.resolvedImports.get(c.specifier)??"":"",e=`${b.qualifiedName}${j.receiverName}${j.methodName}`,f=h.get(e);if(f)f.lines.push(i.line);else{let c={from:b.qualifiedName,receiverName:j.receiverName,methodName:j.methodName,receiverFilePath:d,lines:[i.line]};h.set(e,c),a.methodCalls.push(c)}}}}for(let b of a.intraCalls)b.lines.sort((a,b)=>a-b);for(let b of a.outgoingCalls)b.lines.sort((a,b)=>a-b);for(let b of a.externalCalls)b.lines.sort((a,b)=>a-b);for(let b of a.methodCalls)b.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(0,m.d)(a,"done",j,j,void 0,!0),{cwd:a,files:q,truncated:d,fileCountCap:d?l.BE:void 0,tsconfigs:f,workspaces:h,projectContexts:i,fileSet:e,generatedAt:Date.now(),buildMs:Date.now()-b}}let R=new Map,S=new Map;function v(a){let b=0;for(let c of a.files.values())b+=c.flatSymbols.length;return b}let T=new Set,U=new Set,V=null;function w(a){if(V=a,a)for(let b of U)a(b,()=>T.add(b))}async function x(a,b){let c=Array.from(b.files.keys()),d=0,e=async()=>{for(;d<c.length;){let e=d++;try{await E(a,c[e],b)}catch{}}};await Promise.all(Array.from({length:Math.min(8,c.length)},e))}async function y(a,b={}){!U.has(a)&&(U.add(a),V&&V(a,()=>T.add(a))),b.forceRefresh&&(R.delete(a),T.delete(a));let d=R.get(a);if(d){if(R.delete(a),R.set(a,d),T.has(a)){T.delete(a);try{await x(a,d)}catch{}}return d}let e=S.get(a);if(e)return e;let f=u(a).then(b=>{R.set(a,b);let d=0,e=new Map;for(let[a,b]of R){let c=v(b);e.set(a,c),d+=c}if(!(d<=1e6))for(let b of[...R.keys()]){if(d<=1e6)break;if(b===a)continue;let c=e.get(b)??0;R.delete(b),T.delete(b),B(b),d-=c,console.log(`[codeIndex] evicted ${b} (${c} symbols) — cache over MAX_CACHED_SYMBOLS=1000000`)}return S.delete(a),T.delete(a),Promise.all([c.e(4008),c.e(1237)]).then(c.bind(c,21237)).then(c=>c.precomputeAnalytics(a,b)).catch(a=>{console.error("[codeIndex] analytics precompute failed:",a)}),b}).catch(b=>{throw(0,m.d)(a,"done",0,0,void 0,!0),S.delete(a),b});return S.set(a,f),f}function z(a){if(Promise.all([c.e(4008),c.e(1237)]).then(c.bind(c,21237)).then(b=>b.invalidateAnalytics(a)).catch(()=>{}),!a){R.clear(),S.clear(),T.clear();return}R.delete(a),S.delete(a),T.delete(a)}let W=(0,i.promisify)(h.exec);async function A(a,b){let c=!0;try{await W("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 W(`git -c core.quotePath=false ls-files --cached --others --exclude-standard --error-unmatch -- '${b.replace(/'/g,"'\\''")}'`,{cwd:a}),!0}catch{return!1}}function B(a){Promise.all([c.e(4008),c.e(1237)]).then(c.bind(c,21237)).then(b=>b.invalidateAnalytics(a)).catch(()=>{})}async function C(a,b,c){if(!(0,j.M)(b)||c.files.size>=l.BE||!await A(a,b))return!1;let d=await s(g().join(a,b),b);return!!d&&(c.fileSet.add(d.path),await D(d,null,c),B(a),!0)}async function D(a,b,c){let d=(0,o.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,n=new Map,p=new Map,q=new Map;for(let b of(c.files.set(a.path,l),a.rawCalls)){let a=t(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=n.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]};n.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 E(a,b,c){let d,f=c.files.get(b);if(!f)return C(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 s(g().join(a,b),b);return!!h&&(await D(h,f,c),B(a),!0)}function F(a){return{filePath:a.filePath,qualifiedName:a.qualifiedName,name:a.name,kind:a.kind,startLine:a.startLine,endLine:a.endLine,params:a.params}}function G(a){let b=a.indexOf(">");return b>=0?a.slice(0,b):a}function H(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 I(a,b){let c=a.files.get(b);if(!c)return null;let d=c.flatSymbols.filter(a=>!a.qualifiedName.includes(">")).map(F).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=G(a.from),c=G(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=H(a.lines);let h=[],i=new Map;for(let b of c.outgoingCalls){let d=G(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,n._)(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:F(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=G(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,n._)(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:F(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=H(a.lines);for(let a of j)a.lines.sort((a,b)=>a-b),a.lines=H(a.lines);let l=[],m=new Map;for(let a of c.externalCalls){let b=G(a.from);if(!e.has(b))continue;let c=`${b}|${a.packageSpec}|${a.importedName}`,d=m.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()};m.set(c,d),l.push(d)}}for(let a of l)a.lines.sort((a,b)=>a-b),a.lines=H(a.lines);let o=[],p=new Map;for(let a of c.methodCalls){let b=G(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=H(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 J(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 K(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 L(a,b,c,d={}){let e=b.trim();if(!e)return d.includeLiterals?{files:[],symbols:[],literals:[]}:{files:[],symbols:[]};let f=K(e),g=[];for(let b of a.files.values()){if(g.length>=c)break;K(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:{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&&(K(d.name).includes(f)&&h.push({type:"symbol",label:d.name,hint:`${d.kind} \xb7 ${b.path}`,target:{filePath:b.path,qualifiedName:d.qualifiedName,name:d.name,kind:d.kind,startLine:d.startLine,endLine:d.endLine,...d.params?{params:d.params}:{}}}),!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;K(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 M(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 N(a,b,c){let d=M(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:F(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:F(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=H(a.callLines);e.sort((a,b)=>a.caller.filePath.localeCompare(b.caller.filePath)||a.caller.qualifiedName.localeCompare(b.caller.qualifiedName));let g=F(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 O(a,b,c){let d=M(a,b,c);if(0===d.length)return{qname:b,target: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:F(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:F(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=H(a.callLines);e.sort((a,b)=>a.callee.filePath.localeCompare(b.callee.filePath)||a.callee.qualifiedName.localeCompare(b.callee.qualifiedName));let g=F(d[0].symbolsByQname.get(b)),h=d.length>1?d.map(a=>a.path):void 0;return{qname:b,target:g,callees:e,ambiguousIn:h}}function P(a,b,c,d){let e=M(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=F(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:F(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:F(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:F(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)}})},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)}})},83624:(a,b,c)=>{function d(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 e(a){return a.replace(/\s+/g," ").trim()}function f(a,b){return a?`${a}>${b}`:b}function g(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 h(a,b,c,g,i=[],j){return{qualifiedName:f(g,b),name:b,kind:c,startLine:a.startPosition.row+1,endLine:a.endPosition.row+1,contentHash:d(e(a.text)),children:i,params:j}}function i(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}c.d(b,{Hs:()=>m,NZ:()=>e,YN:()=>n,_B:()=>l,mG:()=>k,qj:()=>d});let j={theorem:"function",def:"function",abbrev:"function",example:"function",instance:"const",structure:"class",inductive:"type",axiom:"const",opaque:"const",constant:"const"};function k(a,b){let c=new Map;for(let b=0;b<a.namedChildCount;b++){let d=a.namedChild(b);d&&d.type.endsWith("comment")&&c.set(d.endPosition.row+1,d)}if(0===c.size)return;let d=new Set;for(let a of b)for(let b=a.startLine;b<=a.endLine;b++)d.add(b);for(let a of b){if("unknown"===a.kind)continue;let b=a.startLine;for(;;){let a=c.get(b-1);if(!a)break;let e=a.startPosition.row+1,f=!1;for(let a=e;a<=b-1;a++)if(d.has(a)){f=!0;break}if(f)break;b=e}if(b!==a.startLine){for(let c=b;c<a.startLine;c++)d.add(c);a.startLine=b}}}function l(a,b){let c=a.text.split("\n"),f=c.length;if(0===f)return[];let g=new Uint8Array(f+2);for(let a of b){let b=Math.max(1,a.startLine),c=Math.min(f,a.endLine);for(let a=b;a<=c;a++)g[a]=1}let h=[],i=(a,b)=>{let f=!1;for(let d=a;d<=b;d++){let a=c[d-1];if(a&&a.trim().length>0){f=!0;break}}if(!f)return;let g=c.slice(a-1,b).join("\n");h.push({qualifiedName:`__code_${a}_${b}__`,name:"code",kind:"unknown",startLine:a,endLine:b,contentHash:d(e(g)),children:[]})},j=-1;for(let a=1;a<=f;a++)g[a]?j>=0&&(i(j,a-1),j=-1):j<0&&(j=a);return j>=0&&i(j,f),h}function m(a,b){let c=[],m=function(a){let b=[],c=-1,f=-1;for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(e){if("import_statement"===e.type||"export_statement"===e.type&&null!==e.childForFieldName("source")||"import_from_statement"===e.type||"future_import_statement"===e.type||"import"===e.type)b.push(e),c<0&&(c=e.startPosition.row+1),f=e.endPosition.row+1;else if(c>=0)break}}return c<0?null:{qualifiedName:"__imports__",name:"imports",kind:"unknown",startLine:c,endLine:f,contentHash:d(e(b.map(a=>a.text).join("\n"))),children:[]}}(a);if(m&&c.push(m),"lean"===b)c.push(...function(a){let b=[],c=[];for(let f=0;f<a.namedChildCount;f++){let g=a.namedChild(f);if(!g)continue;switch(g.type){case"namespace":c.push(g.childForFieldName("name")?.text??null);continue;case"section":c.push(null);continue;case"end":c.pop();continue}let h=null;if("declaration"===g.type)for(let a=0;a<g.namedChildCount;a++){let b=g.namedChild(a);if(b&&b.type in j){h=b;break}}else g.type in j&&(h=g);if(!h)continue;let i=h.childForFieldName("name")?.text??h.type,k=c.filter(a=>null!==a);b.push({qualifiedName:[...k,i].join("."),name:i,kind:j[h.type],startLine:g.startPosition.row+1,endLine:function(a){let b=a.endPosition.row+1,c=a.text.replace(/\s+$/,""),d=a.text.slice(c.length);if(!d)return b;let e=d.split("\n").length-1;return Math.max(a.startPosition.row+1,b-e)}(g),contentHash:d(e(g.text)),children:[]})}return b}(a));else for(let b=0;b<a.namedChildCount;b++){let j=a.namedChild(b);j&&c.push(...function a(b,c,j=!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[h(b,g(b),"function",c,[],i(b))];case"class_declaration":case"abstract_class_declaration":{let a=g(b),d=f(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(h(e,g(e),"method",b,[],i(e)));else if("public_field_definition"===e.type){let a=e.childForFieldName("value");a&&("arrow_function"===a.type||"function_expression"===a.type)&&c.push(h(e,g(e),"method",b,[],i(a)))}}}return c}(b.childForFieldName("body"),d);return[h(b,a,"class",c,e)]}case"interface_declaration":return[h(b,g(b),"interface",c)];case"type_alias_declaration":return[h(b,g(b),"type",c)];case"enum_declaration":return[h(b,g(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"),j=e.childForFieldName("value");if(!f)continue;let k=f.text,l=j&&("arrow_function"===j.type||"function_expression"===j.type),m=l&&j?i(j):void 0;if(c.push(h(a,k,l?"function":"const",b,[],m)),j&&"object"===j.type&&!l){let a=b?`${b}>${k}`:k;for(let b=0;b<j.namedChildCount;b++){let d=j.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(h(d,b.text,"method",a,[],i(e)))}else if("method_definition"===d.type){let b=g(d);b&&c.push(h(d,b,"method",a,[],i(d)))}}}}}return c}(b,c);case"class_definition":{let a=g(b),j=f(c,a),k=function a(b,c){if(!b)return[];let j=[];for(let k=0;k<b.namedChildCount;k++){let l=b.namedChild(k);if(l){if("function_definition"===l.type)j.push(h(l,g(l),"method",c,[],i(l)));else if("decorated_definition"===l.type){let b=l.childForFieldName("definition");if(b?.type==="function_definition")j.push({...h(b,g(b),"method",c,[],i(b)),startLine:l.startPosition.row+1,contentHash:d(e(l.text))});else if(b?.type==="class_definition"){let i=g(b),k=f(c,i),m=a(b.childForFieldName("body"),k);j.push({...h(b,i,"class",c,m),startLine:l.startPosition.row+1,contentHash:d(e(l.text))})}}else if("class_definition"===l.type){let b=g(l),d=f(c,b),e=a(l.childForFieldName("body"),d);j.push(h(l,b,"class",c,e))}}}return j}(b.childForFieldName("body"),j);return[h(b,a,"class",c,k)]}case"decorated_definition":{let f=b.childForFieldName("definition");if(!f)return[];return a(f,c,!1).map(a=>({...a,startLine:b.startPosition.row+1,contentHash:d(e(b.text))}))}case"expression_statement":{let a=[];for(let g=0;g<b.namedChildCount;g++){let h=b.namedChild(g);if(h?.type==="assignment"){let g=function(a,b,c){let g=b.childForFieldName("left");if(!g||"identifier"!==g.type)return null;let h=g.text;return{qualifiedName:f(c,h),name:h,kind:"const",startLine:a.startPosition.row+1,endLine:a.endPosition.row+1,contentHash:d(e(a.text)),children:[]}}(b,h,c);g&&a.push(g)}}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 j=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),k=j?`${j} ${f}`:f;return g.map((a,c)=>h(a,g.length>1?`${k} #${c+1}`:k,"function",b,[],i(a)))}(b,c)),a}default:return[]}}(j,void 0,!1))}return k(a,c),c.push(...l(a,c)),n(c),c}function n(a){let b=new Map,c=a=>{for(let d of a){let a=(b.get(d.qualifiedName)??0)+1;b.set(d.qualifiedName,a),a>1&&(d.qualifiedName=`${d.qualifiedName}#${a}`),c(d.children)}};c(a)}},86236:(a,b,c)=>{c.d(b,{I:()=>d});let d=new Set(["typescript","tsx","javascript","python","go","rust","lean"])},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";case".lean":return"lean";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)},91939:(a,b,c)=>{c.d(b,{Bu:()=>d.Bu,iv:()=>d.iv});var d=c(28677),e=c(76760),f=c.n(e),g=c(83624);function h(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 i(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=j(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 j(a){return a.length>=2&&('"'===a[0]||"'"===a[0])&&a[a.length-1]===a[0]?a.slice(1,-1):a}function k(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 l={typescript:k,tsx:k,javascript:k,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 m(a,b){let c=l[b];return c?c(a):[]}var n=c(25344);function o(a){return"function"===a||"class"===a||"method"===a}function p(a,b){return{grammarId:a,extensions:b,extractSymbols:(a,b)=>(0,g.Hs)(a),extractImports:b=>({specs:m(b,a),bindings:[...i(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=j(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)=>h(a),async buildProjectContext(a,b){let c=new Set(b),d=await (0,n.ZT)(a),e=await (0,n.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,n._0)(b,a.scope)),c.owningScopesCache.set(b,e)),a.startsWith("./")||a.startsWith("../"))return(0,n.KP)(f().resolve(c.cwd,f().dirname(b),a),c.cwd,d);if(a.startsWith("/"))return(0,n.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,n.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,n.IS)(f().posix.join(e.dir,g),d)??(0,n.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&&o(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(">")&&o(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&&o(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)o(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 q=p("typescript",[".ts"]),r=p("tsx",[".tsx",".jsx"]),s=p("javascript",[".js",".mjs",".cjs"]);function t(a){return"function"===a||"class"===a||"method"===a}function u(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 v=c(73024);function w(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:(0,g.qj)((0,g.NZ)(a.text)),children:e,params:f}}function x(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 y(a){try{let b=await v.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 z(a){return"function"===a||"class"===a||"method"===a}function A(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:(0,g.qj)((0,g.NZ)(a.text)),children:e,params:f}}function B(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 C(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 v.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 D(a){return"function"===a||"class"===a||"method"===a}(0,d.ik)(q),(0,d.ik)(r),(0,d.ik)(s),(0,d.ik)({grammarId:"python",extensions:[".py",".pyi"],extractSymbols:(a,b)=>(0,g.Hs)(a),extractImports:a=>({specs:m(a,"python"),bindings:i(a)}),extractCallSites:(a,b)=>h(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 u(h||".",g,d)}for(let b of c.pythonRoots){let e=u(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&&t(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(">")&&t(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&&t(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)t(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}}if(c<0)return null;let e=b.map(a=>a.text).join("\n");return{qualifiedName:"__imports__",name:"imports",kind:"unknown",startLine:c,endLine:d,contentHash:(0,g.qj)((0,g.NZ)(e)),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(w(e,a.text,"function",void 0,[],x(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=w(e,a.text,"method",d??void 0,[],x(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(w(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(w(e,f.text,"const",b))}else"identifier"===a.type&&c.push(w(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)),(0,g.mG)(a,c),c.push(...(0,g._B)(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 y(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(">")&&z(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&&z(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(">"))&&z(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}}if(c<0)return null;let e=b.map(a=>a.text).join("\n");return{qualifiedName:"__imports__",name:"imports",kind:"unknown",startLine:c,endLine:d,contentHash:(0,g.qj)((0,g.NZ)(e)),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(A(e,a.text,"function",void 0,[],B(e)));break}case"struct_item":case"union_item":{let a=e.childForFieldName("name");if(!a)break;b.push(A(e,a.text,"class",void 0));break}case"enum_item":{let a=e.childForFieldName("name");if(!a)break;b.push(A(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(A(e,a.text,"method",b,[],B(e)))}}return d}(e,a.text);b.push(A(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(A(e,a.text,"method",b,[],B(e)))}else if("function_signature_item"===e.type){let a=e.childForFieldName("name");if(!a)continue;d.push(A(e,a.text,"method",b,[],B(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(A(e,a.text,"const",void 0));break}case"type_item":{let a=e.childForFieldName("name");if(!a)break;b.push(A(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(A(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)),(0,g.mG)(a,c),c.push(...(0,g._B)(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 C(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(">")&&D(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&&D(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(">"))&&D(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(">")&&D(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)}),(0,d.ik)({grammarId:"lean",extensions:[".lean"],extractSymbols:(a,b)=>(0,g.Hs)(a,"lean"),extractImports:a=>({specs:[],bindings:[]}),extractCallSites:(a,b)=>[],buildProjectContext(){},resolveSpecifier:()=>null,resolveCall:()=>[],moduleForFile:a=>a.replace(/\.lean$/i,"").replace(/[/\\]/g,".")})}};