@surething/cockpit 1.1.10 → 1.1.11
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.
- package/.next-prod/BUILD_ID +1 -1
- package/.next-prod/app-path-routes-manifest.json +4 -2
- package/.next-prod/build-manifest.json +2 -2
- package/.next-prod/cockpit-build.json +1 -1
- package/.next-prod/prerender-manifest.json +3 -3
- package/.next-prod/routes-manifest.json +12 -0
- package/.next-prod/server/app/_global-error/page.js +2 -2
- package/.next-prod/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/_global-error.html +1 -1
- package/.next-prod/server/app/_global-error.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found/page.js +1 -1
- package/.next-prod/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/agent/test/route.js +1 -1
- package/.next-prod/server/app/api/bash/route.js +1 -1
- package/.next-prod/server/app/api/bots/[id]/route.js +1 -1
- package/.next-prod/server/app/api/bots/files/route.js +1 -1
- package/.next-prod/server/app/api/bots/route.js +1 -1
- package/.next-prod/server/app/api/chat/codex/route.js +1 -1
- package/.next-prod/server/app/api/chat/deepseek/route.js +1 -1
- package/.next-prod/server/app/api/chat/glm/route.js +1 -1
- package/.next-prod/server/app/api/chat/grok/route.js +1 -1
- package/.next-prod/server/app/api/chat/kimi/route.js +1 -1
- package/.next-prod/server/app/api/chat/ollama/route.js +1 -1
- package/.next-prod/server/app/api/chat/route.js +1 -1
- package/.next-prod/server/app/api/chat/stop/route.js +1 -1
- package/.next-prod/server/app/api/claude-stats/route.js +1 -1
- package/.next-prod/server/app/api/commands/route.js +1 -1
- package/.next-prod/server/app/api/comments/route.js +1 -1
- package/.next-prod/server/app/api/db/columns/route.js +1 -1
- package/.next-prod/server/app/api/db/connect/route.js +1 -1
- package/.next-prod/server/app/api/db/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/db/export/route.js +1 -1
- package/.next-prod/server/app/api/db/query/route.js +1 -1
- package/.next-prod/server/app/api/db/schemas/route.js +2 -2
- package/.next-prod/server/app/api/deepseek/balance/route.js +1 -1
- package/.next-prod/server/app/api/deepseek/credentials/route.js +1 -1
- package/.next-prod/server/app/api/deepseek/models/route.js +1 -1
- package/.next-prod/server/app/api/dev/spans/route.js +1 -1
- package/.next-prod/server/app/api/extension/version/route.js +1 -1
- package/.next-prod/server/app/api/file/route.js +1 -1
- package/.next-prod/server/app/api/files/blame/route.js +1 -1
- package/.next-prod/server/app/api/files/clipboard/route.js +1 -1
- package/.next-prod/server/app/api/files/copy/route.js +1 -1
- package/.next-prod/server/app/api/files/delete/route.js +1 -1
- package/.next-prod/server/app/api/files/expanded/route.js +1 -1
- package/.next-prod/server/app/api/files/index/route.js +1 -1
- package/.next-prod/server/app/api/files/init/route.js +1 -1
- package/.next-prod/server/app/api/files/paste/route.js +1 -1
- package/.next-prod/server/app/api/files/read/route.js +1 -1
- package/.next-prod/server/app/api/files/readdir/route.js +1 -1
- package/.next-prod/server/app/api/files/recent/route.js +1 -1
- package/.next-prod/server/app/api/files/save/route.js +1 -1
- package/.next-prod/server/app/api/files/search/route.js +1 -1
- package/.next-prod/server/app/api/files/stat/route.js +1 -1
- package/.next-prod/server/app/api/files/text/route.js +1 -1
- package/.next-prod/server/app/api/fs/dirs/route.js +1 -1
- package/.next-prod/server/app/api/git/blob/route.js +1 -1
- package/.next-prod/server/app/api/git/branch-diff/route.js +1 -1
- package/.next-prod/server/app/api/git/branches/route.js +1 -1
- package/.next-prod/server/app/api/git/commit-diff/route.js +1 -1
- package/.next-prod/server/app/api/git/commits/route.js +1 -1
- package/.next-prod/server/app/api/git/current-branch/route.js +1 -1
- package/.next-prod/server/app/api/git/diff/route.js +1 -1
- package/.next-prod/server/app/api/git/discard/route.js +1 -1
- package/.next-prod/server/app/api/git/stage/route.js +1 -1
- package/.next-prod/server/app/api/git/status/route.js +1 -1
- package/.next-prod/server/app/api/git/unstage/route.js +1 -1
- package/.next-prod/server/app/api/git/worktree/route.js +1 -1
- package/.next-prod/server/app/api/glm/credentials/route.js +1 -1
- package/.next-prod/server/app/api/glm/models/route.js +1 -1
- package/.next-prod/server/app/api/glm/usage/route.js +1 -1
- package/.next-prod/server/app/api/global-state/route.js +2 -2
- package/.next-prod/server/app/api/grok/models/route.js +1 -1
- package/.next-prod/server/app/api/health/route.js +1 -1
- package/.next-prod/server/app/api/html-apps/[id]/route.js +1 -1
- package/.next-prod/server/app/api/html-apps/files/route.js +1 -1
- package/.next-prod/server/app/api/html-apps/route.js +1 -1
- package/.next-prod/server/app/api/instructions/config/route.js +1 -1
- package/.next-prod/server/app/api/kimi/credentials/route.js +1 -1
- package/.next-prod/server/app/api/kimi/models/route.js +1 -1
- package/.next-prod/server/app/api/kimi/usage/route.js +1 -1
- package/.next-prod/server/app/api/lsp/definition/route.js +1 -1
- package/.next-prod/server/app/api/lsp/hover/route.js +1 -1
- package/.next-prod/server/app/api/lsp/references/route.js +1 -1
- package/.next-prod/server/app/api/lsp/status/route.js +1 -1
- package/.next-prod/server/app/api/lsp/warmup/route.js +1 -1
- package/.next-prod/server/app/api/mobile-link/route.js +1 -1
- package/.next-prod/server/app/api/mysql/columns/route.js +2 -2
- package/.next-prod/server/app/api/mysql/connect/route.js +1 -1
- package/.next-prod/server/app/api/mysql/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/mysql/export/route.js +1 -1
- package/.next-prod/server/app/api/mysql/query/route.js +1 -1
- package/.next-prod/server/app/api/mysql/schemas/route.js +2 -2
- package/.next-prod/server/app/api/neo4j/connect/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/query/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/schema/route.js +1 -1
- package/.next-prod/server/app/api/note/list/route.js +1 -1
- package/.next-prod/server/app/api/note/route.js +1 -1
- package/.next-prod/server/app/api/ollama/config/route.js +1 -1
- package/.next-prod/server/app/api/ollama/default-model/route.js +1 -1
- package/.next-prod/server/app/api/ollama/models/route.js +1 -1
- package/.next-prod/server/app/api/ollama/start/route.js +1 -1
- package/.next-prod/server/app/api/open-cursor/route.js +1 -1
- package/.next-prod/server/app/api/open-vscode/route.js +1 -1
- package/.next-prod/server/app/api/pi/thinking/route.js +1 -1
- package/.next-prod/server/app/api/pinned-sessions/route.js +1 -1
- package/.next-prod/server/app/api/project-settings/route.js +1 -1
- package/.next-prod/server/app/api/project-state/route.js +2 -2
- package/.next-prod/server/app/api/projectGraph/affected/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/callees/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/callers/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/clones/route.js +1 -0
- package/.next-prod/server/app/api/projectGraph/clones/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/projectGraph/clones/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/projectGraph/coedit/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/crap/route.js +1 -0
- package/.next-prod/server/app/api/projectGraph/crap/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/projectGraph/crap/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/projectGraph/edges/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/file/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/file-functions/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/impact/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/maps/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/related/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/search/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/symbols/route.js +1 -1
- package/.next-prod/server/app/api/projects/route.js +1 -1
- package/.next-prod/server/app/api/push/public-key/route.js +1 -1
- package/.next-prod/server/app/api/push/subscribe/route.js +1 -1
- package/.next-prod/server/app/api/push/unsubscribe/route.js +1 -1
- package/.next-prod/server/app/api/redis/command/route.js +1 -1
- package/.next-prod/server/app/api/redis/connect/route.js +1 -1
- package/.next-prod/server/app/api/redis/delete/route.js +1 -1
- package/.next-prod/server/app/api/redis/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/redis/get/route.js +1 -1
- package/.next-prod/server/app/api/redis/keys/route.js +1 -1
- package/.next-prod/server/app/api/redis/set/route.js +1 -1
- package/.next-prod/server/app/api/restart/route.js +1 -1
- package/.next-prod/server/app/api/scheduled-tasks/route.js +2 -2
- package/.next-prod/server/app/api/services/config/route.js +1 -1
- package/.next-prod/server/app/api/services/scripts/route.js +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/fork/route.js +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/history/route.js +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/turn/route.js +2 -2
- package/.next-prod/server/app/api/session/image/route.js +1 -1
- package/.next-prod/server/app/api/session/user-messages/route.js +1 -1
- package/.next-prod/server/app/api/session-bots/route.js +1 -1
- package/.next-prod/server/app/api/session-by-path/route.js +1 -1
- package/.next-prod/server/app/api/session-context/route.js +2 -2
- package/.next-prod/server/app/api/session-title/route.js +1 -1
- package/.next-prod/server/app/api/session-title/suggest/route.js +1 -1
- package/.next-prod/server/app/api/sessions/delegate/route.js +1 -1
- package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js +1 -1
- package/.next-prod/server/app/api/sessions/projects/route.js +1 -1
- package/.next-prod/server/app/api/sessions/search/route.js +1 -1
- package/.next-prod/server/app/api/sessions/status/route.js +1 -1
- package/.next-prod/server/app/api/settings/route.js +1 -1
- package/.next-prod/server/app/api/shutdown/route.js +1 -1
- package/.next-prod/server/app/api/skills/[id]/route.js +1 -1
- package/.next-prod/server/app/api/skills/builtin/route.js +1 -1
- package/.next-prod/server/app/api/skills/content/route.js +1 -1
- package/.next-prod/server/app/api/skills/files/route.js +1 -1
- package/.next-prod/server/app/api/skills/route.js +1 -1
- package/.next-prod/server/app/api/snapshots/blob/route.js +1 -1
- package/.next-prod/server/app/api/snapshots/diff/route.js +1 -1
- package/.next-prod/server/app/api/snapshots/mark/route.js +1 -1
- package/.next-prod/server/app/api/snapshots/range-diff/route.js +1 -1
- package/.next-prod/server/app/api/snapshots/restore/route.js +1 -1
- package/.next-prod/server/app/api/snapshots/route.js +1 -1
- package/.next-prod/server/app/api/terminal/aliases/route.js +1 -1
- package/.next-prod/server/app/api/terminal/autocomplete/route.js +1 -1
- package/.next-prod/server/app/api/terminal/bubble-order/route.js +1 -1
- package/.next-prod/server/app/api/terminal/env/route.js +1 -1
- package/.next-prod/server/app/api/terminal/history/route.js +1 -1
- package/.next-prod/server/app/api/terminal/running/route.js +1 -1
- package/.next-prod/server/app/api/update/route.js +1 -1
- package/.next-prod/server/app/api/update-state/route.js +1 -1
- package/.next-prod/server/app/api/version/route.js +1 -1
- package/.next-prod/server/app/apps/[...path]/route.js +1 -1
- package/.next-prod/server/app/favicon.ico/route.js +1 -1
- package/.next-prod/server/app/m/page.js +1 -1
- package/.next-prod/server/app/m/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/manifest.webmanifest/route.js +1 -1
- package/.next-prod/server/app/page.js +1 -1
- package/.next-prod/server/app/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/project/page.js +1 -1
- package/.next-prod/server/app/project/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app-paths-manifest.json +4 -2
- package/.next-prod/server/chunks/4949.js +1 -1
- package/.next-prod/server/chunks/6610.js +11 -11
- package/.next-prod/server/middleware-build-manifest.js +1 -1
- package/.next-prod/server/pages/500.html +1 -1
- package/.next-prod/server/server-reference-manifest.json +1 -1
- package/.next-prod/static/Dj5ykXLzxdIQZcSyjppsm/_buildManifest.js +1 -0
- package/.next-prod/static/chunks/{92000-31efb4d63c10446f.js → 60169-2e401ccea5e39a00.js} +21 -21
- package/.next-prod/static/chunks/{98596-ffbe0304646a9336.js → 98596-43e9fe35436097c6.js} +6 -6
- package/.next-prod/static/chunks/app/_global-error/{page-6af5bc188af96106.js → page-b40b02f6a2592427.js} +1 -1
- package/.next-prod/static/chunks/app/api/agent/test/{route-6af5bc188af96106.js → route-b40b02f6a2592427.js} +1 -1
- package/.next-prod/static/chunks/app/api/bash/{route-6af5bc188af96106.js → route-b40b02f6a2592427.js} +1 -1
- package/.next-prod/static/chunks/app/api/bots/[id]/{route-6af5bc188af96106.js → route-b40b02f6a2592427.js} +1 -1
- package/.next-prod/static/chunks/app/api/bots/files/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/bots/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/codex/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/deepseek/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/glm/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/grok/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/kimi/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/ollama/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/stop/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/claude-stats/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/commands/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/comments/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/db/columns/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/db/connect/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/db/disconnect/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/db/export/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/db/query/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/db/schemas/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/deepseek/balance/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/deepseek/credentials/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/deepseek/models/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/dev/spans/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/extension/version/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/file/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/files/blame/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/files/clipboard/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/files/copy/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/files/delete/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/files/expanded/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/files/index/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/files/init/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/files/paste/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/files/read/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/files/readdir/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/files/recent/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/files/save/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/files/search/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/files/stat/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/files/text/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/fs/dirs/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/git/blob/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/git/branch-diff/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/git/branches/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/git/commit-diff/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/git/commits/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/git/current-branch/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/git/diff/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/git/discard/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/git/stage/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/git/status/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/git/unstage/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/git/worktree/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/glm/credentials/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/glm/models/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/glm/usage/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/global-state/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/grok/models/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/health/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/html-apps/[id]/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/html-apps/files/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/html-apps/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/instructions/config/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/kimi/credentials/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/kimi/models/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/kimi/usage/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/definition/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/hover/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/references/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/status/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/warmup/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/mobile-link/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/columns/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/connect/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/disconnect/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/export/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/query/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/schemas/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/connect/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/query/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/schema/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/note/list/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/note/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/ollama/config/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/ollama/default-model/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/ollama/models/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/ollama/start/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/open-cursor/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/open-vscode/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/pi/thinking/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/pinned-sessions/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/project-settings/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/project-state/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/affected/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/callees/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/callers/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/clones/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/coedit/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/crap/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/edges/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/file/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/file-functions/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/impact/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/maps/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/related/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/search/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/symbols/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/projects/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/push/public-key/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/push/subscribe/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/push/unsubscribe/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/command/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/connect/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/delete/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/disconnect/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/get/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/keys/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/set/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/restart/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/scheduled-tasks/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/services/config/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/services/scripts/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/session/[sessionId]/turn/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/session/image/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/session/user-messages/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/session-bots/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/session-by-path/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/session-context/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/session-title/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/session-title/suggest/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/delegate/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/projects/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/search/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/status/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/settings/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/shutdown/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/skills/[id]/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/skills/builtin/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/skills/content/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/skills/files/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/skills/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/snapshots/blob/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/snapshots/diff/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/snapshots/mark/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/snapshots/range-diff/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/snapshots/restore/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/snapshots/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/aliases/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/env/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/history/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/running/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/update/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/update-state/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/api/version/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/apps/[...path]/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/{layout-7107ed4eeac1f693.js → layout-a568d04e8d2707c3.js} +1 -1
- package/.next-prod/static/chunks/app/manifest.webmanifest/route-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/app/{page-338a2c84319778b1.js → page-6675d44ff6c5ebc6.js} +1 -1
- package/.next-prod/static/chunks/app/project/{page-338a2c84319778b1.js → page-6675d44ff6c5ebc6.js} +1 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-b40b02f6a2592427.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-b40b02f6a2592427.js +1 -0
- package/.next-prod/trace +86 -86
- package/.next-prod/trace-build +1 -1
- package/.next-prod/types/app/api/projectGraph/clones/route.ts +353 -0
- package/.next-prod/types/app/api/projectGraph/crap/route.ts +353 -0
- package/.next-prod/types/routes.d.ts +3 -1
- package/.next-prod/types/validator.ts +18 -0
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/bin/cock-codegraph.mjs +111 -27
- package/bin/cockpit.mjs +1 -1
- package/bin/managed-npm-updater.mjs +0 -1
- package/desktop-checksums.json +4 -4
- package/dist/scheduledTasks.mjs +22 -10
- package/dist/wsServer.mjs +899 -160
- package/package.json +1 -1
- package/scripts/copy-tree-sitter-wasms.mjs +2 -2
- package/skills/ar/SKILL.md +293 -0
- package/skills/ar/boundary.md +48 -0
- package/skills/ar/evolution.md +38 -0
- package/skills/ar/legibility.md +52 -0
- package/skills/ar/reviewer.md +261 -0
- package/skills/ar/structure.md +38 -0
- package/skills/cg/SKILL.md +85 -14
- package/skills/cr/SKILL.md +62 -293
- package/skills/cr/reviewer.md +303 -0
- package/skills/rf/SKILL.md +6 -5
- package/skills/rf/axes.md +24 -2
- package/skills/rf/fix.md +58 -10
- package/skills/rf/lenses.md +27 -6
- package/skills/rf/sources.md +86 -24
- package/.next-prod/static/IlC_BH61CJ0hFaOu_akE9/_buildManifest.js +0 -1
- package/.next-prod/static/chunks/app/api/bots/files/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/bots/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/codex/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/deepseek/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/glm/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/grok/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/kimi/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/ollama/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/stop/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/claude-stats/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/commands/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/comments/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/db/columns/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/db/connect/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/db/disconnect/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/db/export/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/db/query/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/db/schemas/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/deepseek/balance/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/deepseek/credentials/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/deepseek/models/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/dev/spans/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/extension/version/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/file/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/files/blame/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/files/clipboard/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/files/copy/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/files/delete/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/files/expanded/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/files/index/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/files/init/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/files/paste/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/files/read/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/files/readdir/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/files/recent/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/files/save/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/files/search/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/files/stat/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/files/text/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/fs/dirs/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/git/blob/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/git/branch-diff/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/git/branches/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/git/commit-diff/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/git/commits/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/git/current-branch/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/git/diff/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/git/discard/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/git/stage/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/git/status/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/git/unstage/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/git/worktree/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/glm/credentials/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/glm/models/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/glm/usage/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/global-state/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/grok/models/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/health/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/html-apps/[id]/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/html-apps/files/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/html-apps/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/instructions/config/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/kimi/credentials/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/kimi/models/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/kimi/usage/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/definition/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/hover/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/references/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/status/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/warmup/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/mobile-link/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/columns/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/connect/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/disconnect/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/export/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/query/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/schemas/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/connect/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/query/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/schema/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/note/list/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/note/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/ollama/config/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/ollama/default-model/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/ollama/models/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/ollama/start/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/open-cursor/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/open-vscode/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/pi/thinking/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/pinned-sessions/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/project-settings/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/project-state/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/affected/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/callees/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/callers/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/coedit/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/edges/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/file/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/file-functions/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/impact/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/maps/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/related/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/search/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/symbols/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/projects/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/push/public-key/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/push/subscribe/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/push/unsubscribe/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/command/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/connect/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/delete/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/disconnect/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/get/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/keys/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/set/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/restart/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/scheduled-tasks/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/services/config/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/services/scripts/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/session/[sessionId]/turn/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/session/image/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/session/user-messages/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/session-bots/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/session-by-path/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/session-context/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/session-title/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/session-title/suggest/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/delegate/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/projects/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/search/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/status/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/settings/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/shutdown/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/skills/[id]/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/skills/builtin/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/skills/content/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/skills/files/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/skills/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/snapshots/blob/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/snapshots/diff/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/snapshots/mark/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/snapshots/range-diff/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/snapshots/restore/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/snapshots/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/aliases/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/env/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/history/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/running/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/update/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/update-state/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/api/version/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/apps/[...path]/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/app/manifest.webmanifest/route-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-6af5bc188af96106.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-6af5bc188af96106.js +0 -1
- /package/.next-prod/static/{IlC_BH61CJ0hFaOu_akE9 → Dj5ykXLzxdIQZcSyjppsm}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=4949,exports.ids=[4949],exports.modules={4410:(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),h=c(56476);function i(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}function j(a,b){return/^\.+$/.test(a)?a+b:`${a}.${b}`}let k={typescript:i,tsx:i,javascript:i,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);if(!a)return;b.push(a);for(let d=0;d<c.childCount;d++){let e=c.child(d);if(!e||"name"!==c.fieldNameForChild(d))continue;let f="aliased_import"===e.type?e.childForFieldName("name"):e;f?.type==="dotted_name"&&b.push(j(a,f.text))}return}}for(let b=0;b<c.namedChildCount;b++){let d=c.namedChild(b);d&&a(d)}}(a),b}};function l(a,b){let c=k[b];return c?c(a):[]}var m=c(25344);function n(a){return"function"===a||"class"===a||"method"===a}function o(a,b,c,d,e){let f=JSON.stringify([a.path,b]);if(c>5||d.has(f))return null;let g=new Set(d).add(f),h=(b,d)=>{let f=a.resolvedImports.get(b.specifier),h=f&&e.get(f);return h?o(h,d,c+1,g,e):null},i=a.reexportsByLocalName.get(b);if(i&&"*"!==b){if(i.specifier)return h(i,i.importedName);let b=a.symbolsByName.get(i.importedName),c=null;for(let a of b??[])!a.qualifiedName.includes(">")&&(!c||n(a.kind)&&!n(c.kind)||a.kind===c.kind&&a.endLine-a.startLine>c.endLine-c.startLine)&&(c=a);if(c)return c;let d=a.bindingsByLocalName.get(i.importedName);return d?h(d,d.importedName):null}if("default"===b)return null;let j=null;for(let c of a.importBindings){if(!c.isReexport||"*"!==c.localName||"*"!==c.importedName)continue;let a=h(c,b);if("ambiguous"===a)return a;if(a){if(j&&(j.filePath!==a.filePath||j.qualifiedName!==a.qualifiedName))return"ambiguous";j=a}}return j}function p(a,b){return{grammarId:a,extensions:b,extractSymbols:(a,b)=>(0,g.Hs)(a),extractImports:b=>({specs:l(b,a),bindings:[...(0,h.jv)(b),...(0,h.il)(b)]}),extractCallSites:(a,b)=>(0,h.Lv)(a),async buildProjectContext(a,b,c){let d=new Set(b),e=await (0,m.ZT)(a,c),f=await (0,m.zC)(a,d,c),g=[...f.keys()].sort((a,b)=>b.length-a.length);return{cwd:a,tsconfigs:e,workspaces:f,sortedWsNames:g,owningScopesCache:new Map}},resolveSpecifier(a,b,c,d){let e=c.owningScopesCache.get(b);if(e||(e=c.tsconfigs.filter(a=>(0,m._0)(b,a.scope)),c.owningScopesCache.set(b,e)),a.startsWith("./")||a.startsWith("../"))return(0,m.KP)(f().resolve(c.cwd,f().dirname(b),a),c.cwd,d);if(a.startsWith("/"))return(0,m.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,m.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,m.IS)(f().posix.join(e.dir,g),d)??(0,m.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)return null;if("*"===c){let a=o(b,d,e,f,g);return a&&"ambiguous"!==a&&n(a.kind)?a:null}let h=JSON.stringify([b.path,c,d]);if(f.has(h))return null;let i=new Set(f).add(h),j=b.reexportsByLocalName.get(c);if(j?.specifier&&"*"===j.importedName){let c=b.resolvedImports.get(j.specifier),f=c&&g.get(c);return f?a(f,"*",d,e+1,i,g):null}let k=o(b,c,e,i,g);if(!k||"ambiguous"===k)return null;let l=g.get(k.filePath),m=l?.symbolsByQname.get(`${k.qualifiedName}>${d}`);return m&&n(m.kind)?m: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&&n(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=o(i,g.importedName,0,new Set,d);return j&&"ambiguous"!==j&&n(j.kind)?[{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){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}function v(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 w=c(73024);function x(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,declLine:a.startPosition.row+1,contentHash:(0,g.qj)((0,g.NZ)(a.text)),children:e,params:f}}function y(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 z(a,b){try{let c=b?await b.readFile("go.mod"):await w.promises.readFile(f().join(a,"go.mod"),"utf8"),d=/^\s*module\s+(\S+)/m.exec(c);return d?d[1].trim():null}catch{return null}}function A(a){return"function"===a||"class"===a||"method"===a}function B(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,declLine:a.startPosition.row+1,contentHash:(0,g.qj)((0,g.NZ)(a.text)),children:e,params:f}}function C(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 D(a,b,c){let d=new Map,e=new Map,g=new Set;async function h(i,j){let k;if(g.has(j))return;g.add(j),d.set(i,j),e.set(j,i);try{k=c?await c.readFile(j):await w.promises.readFile(f().join(a,j),"utf8")}catch{return}let l=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}(k);if(0===l.length)return;let m=f().posix.dirname(j),n=f().posix.basename(j,".rs"),o="mod"===n||"lib"===n||"main"===n?[m]:[m,f().posix.join(m,n)];for(let a of l){let c=`${i}::${a}`,d=null;for(let c of o){for(let e of[f().posix.join(c,`${a}.rs`),f().posix.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 h(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 h("crate",a);else if(a.startsWith("src/bin/"))await h("crate",a);else{let b=a.split("/"),c=b.indexOf("src");if(c>0){let d=b[c-1];await h(d,a)}}return{modTree:d,fileToMod:e}}function E(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:l(a,"python"),bindings:(0,h.JM)(a)}),extractCallSites:(a,b)=>(0,h.Lv)(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 v(h||".",g,d)}for(let b of c.pythonRoots){let e=v(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),f=e?d.get(e):void 0,g="*"!==b.importedName?c.resolvedImports.get(j(b.specifier,b.importedName)):void 0,h=g?d.get(g):void 0;if(!f&&!h)return[];let i=(f?u(f,b.importedName,a.calleeName):null)??(h?u(h,"*",a.calleeName):null);return i?[{kind:"symbol",addr:{filePath:i.filePath,qualifiedName:i.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 k=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 k?[{kind:"symbol",addr:{filePath:k.filePath,qualifiedName:k.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,declLine:c,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(x(e,a.text,"function",void 0,[],y(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=x(e,a.text,"method",d??void 0,[],y(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(x(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(x(e,f.text,"const",b))}else"identifier"===a.type&&c.push(x(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,c){let d=await z(a,c);return{cwd:a,modulePath:d,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(">")&&A(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&&A(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(">"))&&A(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,declLine:c,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(B(e,a.text,"function",void 0,[],C(e)));break}case"struct_item":case"union_item":{let a=e.childForFieldName("name");if(!a)break;b.push(B(e,a.text,"class",void 0));break}case"enum_item":{let a=e.childForFieldName("name");if(!a)break;b.push(B(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(B(e,a.text,"method",b,[],C(e)))}}return d}(e,a.text);b.push(B(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(B(e,a.text,"method",b,[],C(e)))}else if("function_signature_item"===e.type){let a=e.childForFieldName("name");if(!a)continue;d.push(B(e,a.text,"method",b,[],C(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(B(e,a.text,"const",void 0));break}case"type_item":{let a=e.childForFieldName("name");if(!a)break;b.push(B(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(B(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,c){let{modTree:d,fileToMod:e}=await D(a,b,c);return{cwd:a,modTree:d,fileToMod:e}},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(">")&&E(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&&E(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(">"))&&E(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(">")&&E(a.kind)){f=a;break}}return f?[{kind:"symbol",addr:{filePath:f.filePath,qualifiedName:f.qualifiedName}}]:[]},moduleForFile:(a,b)=>b?.fileToMod.get(a)??f().posix.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,".")})},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:()=>i,IS:()=>p,KP:()=>l,ZT:()=>r,_0:()=>m,zC:()=>n});var d=c(73024),e=c(76760),f=c.n(e),g=c(75775);function h(a,b,c){return c?c.readFile(b):d.promises.readFile(f().join(a,b),"utf8")}let i=g.yj,j=[".ts",".tsx",".js",".jsx",".mjs",".cjs"],k=[".js",".jsx",".mjs",".cjs"];function l(a,b,c){let d=f().relative(b,a).split(f().sep).join("/");if(d.startsWith(".."))return null;for(let a of k)if(d.endsWith(a)){d=d.slice(0,-a.length);break}if(c.has(d))return d;for(let a of j){let b=d+a;if(c.has(b))return b}for(let a of j){let b=f().posix.join(d,"index"+a);if(c.has(b))return b}return null}function m(a,b){return""===b||a===b||a.startsWith(b+"/")}async function n(a,b,c){let d=await o(a,c);if(0===d.length)return new Map;let e=(c?.paths??await (0,g.jR)(a)).filter(a=>a.endsWith("/package.json")).filter(a=>{let b=a.slice(0,-13);return d.some(a=>{var c;return c=b,RegExp("^"+a.replace(/\\/g,"/").replace(/[.+^${}()|[\]]/g,"\\$&").replace(/\*\*/g,"___DOUBLESTAR___").replace(/\*/g,"[^/]*").replace(/___DOUBLESTAR___/g,".*")+"$").test(c)})}),i=new Map;for(let d of e){let e;try{e=JSON.parse(await h(a,d,c))}catch{continue}if("string"!=typeof e.name)continue;let g=f().dirname(d),j=function(a,b,c){let d,e=b=>{let d=b.replace(/^\.\//,"");return p(f().posix.join(a,d),c)},g=b.exports;if("string"==typeof g)d=g;else if(g&&"object"==typeof g&&g["."]){let a=g["."];"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(f().posix.join(a,b)))return f().posix.join(a,b);return null}(g,e,b);i.set(e.name,{name:e.name,dir:g,entryFile:j})}return i}async function o(a,b){try{var c=await h(a,"pnpm-workspace.yaml",b);let d=[],e=!1;for(let a of c.split("\n")){let b=a.replace(/#.*$/,"");if(/^packages\s*:/.test(b)){e=!0;continue}if(!e)continue;let c=b.match(/^\s*-\s*['"]?([^'"#\s]+)['"]?\s*$/);c?d.push(c[1]):/^\S/.test(b)&&(e=!1)}return d}catch{}try{let c=JSON.parse(await h(a,"package.json",b)),d=c?.workspaces;if(Array.isArray(d))return d.filter(a=>"string"==typeof a);if(d&&Array.isArray(d.packages))return d.packages.filter(a=>"string"==typeof a)}catch{}return[]}function p(a,b){if(a.startsWith("..")||a.startsWith("/"))return null;for(let b of k)if(a.endsWith(b)){a=a.slice(0,-b.length);break}if(b.has(a))return a;for(let c of j){let d=a+c;if(b.has(d))return d}for(let c of j){let d=f().posix.join(a,"index"+c);if(b.has(d))return d}return null}async function q(a,b,c){let d,e=new Map;try{let e=(await h(b,f().relative(b,a).split(f().sep).join("/"),c)).replace(/^\s*\/\/.*$/gm,"");d=JSON.parse(e)}catch{return e}let g=d?.compilerOptions?.baseUrl??".",i=d?.compilerOptions?.paths??{},j=f().resolve(f().dirname(a),g),k=f().relative(b,j)||".";for(let[a,b]of Object.entries(i)){if(!Array.isArray(b)||0===b.length)continue;let c=a.replace(/\/\*$/,""),d=b[0].replace(/\/\*$/,"");e.set(c,f().join(k,d))}return e}async function r(a,b){let c=[];for(let d of(b?.paths??await (0,g.jR)(a)).filter(a=>/(^|\/)tsconfig[^/]*\.json$/.test(a))){let e=await q(f().join(a,d),a,b);if(0===e.size)continue;let g=f().dirname(d);c.push({scope:"."===g?"":g,aliases:e,sortedAliases:s(e)})}let d=c.find(a=>""===a.scope);return d||(d={scope:"",aliases:new Map,sortedAliases:[]},c.push(d)),d.aliases.has("@")||(d.aliases.set("@","./src"),d.sortedAliases=s(d.aliases)),c.sort((a,b)=>b.scope.length-a.scope.length)}function s(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:()=>T,J:()=>$,KE:()=>K,Mv:()=>Z,NV:()=>C,Xn:()=>Y,_7:()=>X,bQ:()=>W,ih:()=>D,lG:()=>I,tI:()=>L,u$:()=>H,uV:()=>J});var e,f=c(78877),g=c(58500),h=c(89705),i=c(15825),j=c(770),k=c(75775),l=c(87956),m=c(86236),n=c(25344),o=c(25157),p=c(27485),q=c(4410),r=c(83624),s=c(45356),t=c(53809),u=c(85836),v=c(52166),w=a([l]);async function x(a,b,c){let d,e=Array(a.length),f=0,i=!1,j=performance.now();async function k(){for(;!i&&f<a.length&&(!d&&performance.now()-j>=8&&(d=h.pR5(h.ivC(()=>(0,g.setImmediate)())).then(()=>{j=performance.now(),d=void 0})),d&&await d,!i&&!(f>=a.length));){let b=f++;e[b]=await c(a[b]).catch(a=>{throw i=!0,a})}}let l=(await Promise.allSettled(Array.from({length:Math.min(b,a.length)},k))).find(a=>"rejected"===a.status);if(l?.status==="rejected")throw l.reason;return e}l=(w.then?(await w)():w)[0];let _=/(['"`])([A-Za-z][A-Za-z0-9_.-]{2,63})\1/g;async function y(a,b){let c=(0,l.M)(a);if(!c)return null;let{source:d}=b;if(b.sizeBytes>k.FI)return null;let e=(await (0,l.b)(c)).parse(d);if(!e)throw new j.uV({message:`Unable to parse ${a}`});try{let b,f=(0,q.Bu)(c),g=f.extractSymbols(e.rootNode,d);(0,r.YN)(g);let h=(b=[],!function c(d){for(let e of d)b.push({filePath:a,qualifiedName:e.qualifiedName,name:e.name,kind:e.kind,startLine:e.startLine,endLine:e.endLine,declLine:e.declLine,params:e.params}),c(e.children)}(g),b),i=(0,v.s)(e.rootNode,c,h);for(let a of h){let b=i.get(a.qualifiedName);void 0!==b&&(a.complexity=b)}let{specs:j,bindings:k}=f.extractImports(e.rootNode),l=f.extractCallSites(e.rootNode,h),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(_.lastIndex=0;null!==(c=_.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=z(b,g);d.push({value:a,line:g,...i?{enclosingQname:i.qualifiedName}:{}})}return d}(d,h);return{path:a,language:c,symbolsTree:g,flatSymbols:h,importBindings:k,importSpecifiers:j,rawCalls:l,literals:m}}finally{e.delete()}}function z(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}let aa=new WeakMap;async function A(a,b,c,d=!1){let e=Date.now(),f=c&&aa.get(c),g=(0,k.po)(f?.hashes??new Map,b.hashes),h=d||g.rebuild||f?.configHash!==b.configHash||f?.git.head!==b.git.head||f?.git.busy!==b.git.busy||f?.git.commonDir!==b.git.commonDir,i=[...b.sources.keys()].sort(),j=b.truncated,p=new Set(i);(0,o.d)(a,"contexts",0,i.length,void 0,!0);let r=await (0,n.ZT)(a,b.contextFiles),s=await (0,n.zC)(a,p,b.contextFiles),t=new Map;for(let c of m.I){let d=(0,q.iv)(c);d&&t.set(c,await d.buildProjectContext(a,p,b.contextFiles))}let u=i.length,v=0,w=0;(0,o.d)(a,"parsing",0,u,void 0,!0);let B=new Map,C=new Map,D=(await x(i,50,async c=>{let e=!d&&f?.git.commonDir===b.git.commonDir&&f?.hashes.get(c)===b.hashes.get(c)&&f?.facts.has(c),g=(0,l.M)(c),h=d||e||!g?void 0:ac.findParse(b.git.commonDir,c,g,b.hashes.get(c));h&&C.set(c,h);let i=e?f.facts.get(c):h?.facts??await y(c,b.sources.get(c));return!e&&!h&&w++,B.set(c,i),v++,(0,o.d)(a,"parsing",v,u,c),i})).filter(a=>null!==a);(0,o.d)(a,"resolving",u,u,void 0,!0);let E=new Map;for(let a of D){let d=(0,q.Bu)(a.language),e=t.get(a.language),g=new Map,h=new Set;for(let b of a.importSpecifiers){if(g.has(b))continue;let c=d.resolveSpecifier(b,a.path,e,p);c&&c!==a.path&&(g.set(b,c),h.add(c))}let i=(f?.facts.get(a.path)===a?c?.files.get(a.path):void 0)??C.get(a.path)?.lookups,j=i?.symbolsByName??new Map,k=i?.symbolsByQname??new Map;for(let b of i?[]:a.flatSymbols){k.set(b.qualifiedName,b);let a=j.get(b.name);a?a.push(b):j.set(b.name,[b])}let l=i?.bindingsByLocalName??new Map,m=i?.reexportsByLocalName??new Map;for(let b of i?[]:a.importBindings)b.isReexport?m.set(b.localName,b):l.set(b.localName,b);E.set(a.path,{path:a.path,language:a.language,mtime:b.sources.get(a.path).mtime,symbolsTree:a.symbolsTree,flatSymbols:a.flatSymbols,literals:a.literals,importedFiles:h,importedBy:new Set,importBindings:a.importBindings,resolvedImports:g,intraCalls:[],outgoingCalls:[],incomingCalls:[],externalCalls:[],methodCalls:[],symbolsByName:j,symbolsByQname:k,bindingsByLocalName:l,reexportsByLocalName:m})}for(let a of E.values())for(let b of a.importedFiles){let c=E.get(b);c&&c.importedBy.add(a.path)}for(let b of((0,o.d)(a,"edges",u,u,void 0,!0),D)){let a=E.get(b.path),c=(0,q.Bu)(b.language),d=t.get(b.language),e=new Map,f=new Map,g=new Map,h=new Map;for(let i of b.rawCalls){let b=z(a.flatSymbols,i.line);if(b){for(let j of c.resolveCall(i,b,a,E,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 E.values())for(let b of a.outgoingCalls){let c=E.get(b.to.filePath);c&&c.incomingCalls.push({from:{filePath:a.path,qualifiedName:b.from},to:b.to.qualifiedName,lines:b.lines})}let F={cwd:a,files:E,truncated:j,fileCountCap:j?n.BE:void 0,excludedFiles:i.flatMap(a=>{let c=b.sources.get(a);return c.sizeBytes>k.FI?[{filePath:a,reason:"source-too-large",sizeBytes:c.sizeBytes,limitBytes:k.FI}]:[]}),tsconfigs:r,workspaces:s,projectContexts:t,fileSet:p,generatedAt:Date.now(),buildMs:Date.now()-e,revision:(c?.revision??0)+1,update:{mode:c?h?"rebuild":"incremental":"initial",changedFiles:g.count,parsedFiles:w}};return F.truncated||=D.length<i.length,aa.set(F,{hashes:b.hashes,configHash:b.configHash,scanTruncated:b.truncated,git:b.git,facts:B}),F}let ab=new Map,ac=new s.l,ad=new Map,ae=new Map;function B(a){let b=0;for(let c of a.files.values())b+=c.flatSymbols.length;return b}let af=(e=(0,f.getHeapStatistics)().heap_size_limit,Math.max(1e9,Math.min(e-0x40000000,0x80000000))),ag="5 minutes",ah=!1;function C(){ah||(ah=!0,h.MY7(h.OH5(()=>{!function(a=Date.now()){let b=a-9e5,c=[];for(let[d,e]of[...ab]){if(ae.has(d))continue;let f=ad.get(d)??0;f>=b||(G(d),c.push(d),console.log(`[codeIndex] released idle ${d} (${B(e)} symbols, unread for ${Math.round((a-f)/6e4)} min)`))}for(let a of ad.keys())ab.has(a)||ad.delete(a)}()}).pipe(h.cbG(ag),h.uxO(i.ji(ag)))))}let ai=new Map,aj=new Map,ak=null;function D(a){for(let[b,c]of(ak=a,ai))c.unsubscribe?.(),c.unsubscribe=a?.(b,()=>E(b))}function E(a){let b=ai.get(a);b&&b.version++}function F(a,b){ab.delete(a),ab.set(a,b),ad.set(a,Date.now())}function G(a){ac.release(a),ab.delete(a),ad.delete(a),aj.delete(a);let b=ai.get(a);b&&(b.generation++,b.retired=!0,b.unsubscribe?.(),b.unsubscribe=void 0,ae.has(a)||ai.delete(a))}async function H(a,b={}){let c,d=((c=ai.get(a))?c.retired&&(c.retired=!1,c.unsubscribe=ak?.(a,()=>E(a))):(c={version:0,publishedVersion:-1,generation:0,force:!1},ai.set(a,c),c.unsubscribe=ak?.(a,()=>E(a))),c);b.forceRefresh&&(d.generation++,d.version++,d.force=!0,aj.delete(a));let e=d.version;for(let c=0;c<3;c++){let c=ae.get(a);if(c){let f=d.runningGeneration,g=await c.then(a=>({index:a,error:void 0}),a=>({index:void 0,error:a}));if(d.force||f!==d.generation)continue;if(g.error)throw g.error;if(!b.forceRefresh&&g.index&&aa.get(g.index)?.git.busy)throw new j.uV({message:"Workspace is changing: finish the Git operation or explicitly rebuild the index"});if(d.publishedVersion>=e&&g.index&&ab.get(a)===g.index)return F(a,g.index),g.index;continue}let f=d.generation,g=d.version,h=d.force;d.force=!1,d.runningGeneration=f;let i=(async()=>{let b=await (0,k.XC)(a,h),c=ab.get(a),e=c&&aa.get(c),i=(0,k.po)(e?.hashes??new Map,b.hashes),l=!h&&c&&e&&!i.count&&e.configHash===b.configHash&&e.git.busy===b.git.busy&&e.git.commonDir===b.git.commonDir&&e.scanTruncated===b.truncated,m=l?c:await A(a,b,c,h),n=await (0,k.U0)(a);if(n.commonDir!==b.git.commonDir||!h&&(n.busy||n.head!==b.git.head))throw new j.uV({message:"Workspace changed during indexing; retry after the Git operation finishes"});if(d.generation!==f||ai.get(a)!==d)throw new j.uV({message:"Index update was superseded; retry the query"});if(l&&e&&aa.set(m,{...e,git:b.git}),!l){let a=aa.get(m);ac.publish(m,b.git.commonDir,a.hashes,a.facts)}return d.publishedVersion=g,F(a,m),aj.delete(a),!function(a,b=0){for(let c of ab.keys()){if(function(){let a=ac.estimatedBytes();for(let[b,c]of ab)ac.has(b)||(a+=4e3*B(c));return a}()+b<=af)break;c!==a&&(G(c),console.log(`[codeIndex] evicted ${c} — cache over estimated byte budget`))}}(a),m})().catch(b=>{throw ai.get(a)!==d||d.generation!==f||d.force||aj.set(a,b),b}).finally(()=>{ae.get(a)===i&&ae.delete(a),d.retired&&!d.force&&ai.get(a)===d&&(d.unsubscribe?.(),ai.delete(a)),(0,o.d)(a,"done",0,0,void 0,!0)});ae.set(a,i);let l=await i;if(!b.forceRefresh&&aa.get(l)?.git.busy)throw new j.uV({message:"Workspace is changing: finish the Git operation or explicitly rebuild the index"});return l}throw new j.uV({message:"Workspace is changing; retry the index query"})}function I(a){let b=ab.get(a);return b&&F(a,b),b??null}function J(a,b={}){!b.forceRefresh&&aj.has(a)||H(a,b).catch(()=>{})}function K(a){return ae.has(a)}async function L(a,b){await (0,k.P3)(a);let c=await (0,k.ax)(a,b);if(!c)return null;let d=I(a),e=d&&aa.get(d),f=ai.get(a),g=aj.get(a),h=g?.cause instanceof Error?g.cause.message:g?.message,i=K(a);if(d&&e?.hashes.get(b)===c.hash&&(!f||f.version===f.publishedVersion)){let a=S(d,b);if(a)return{...a,mtimeMs:c.mtime,crossFileRevision:d.revision,crossFilePending:i,crossFileStale:i||!!g,indexUpdateError:h}}let j=await M(a,b,c);return j?{...j,fileCount:d?.files.size??0,crossFileStale:!!d,crossFileRevision:d?.revision,crossFilePending:K(a),indexUpdateError:h}:null}async function M(a,b,c){await (0,k.P3)(a);let d=c??await (0,k.ax)(a,b);if(!d)return null;let e=await y(b,d);if(!e)return null;let f={cwd:a,files:new Map,truncated:!1,tsconfigs:[],workspaces:new Map,projectContexts:new Map([[e.language,"go"===e.language?await (0,q.Bu)("go").buildProjectContext(a,new Set([e.path])):void 0]]),fileSet:new Set([e.path]),generatedAt:Date.now(),buildMs:0};return await N({...e,importBindings:[],importSpecifiers:[]},f,d.mtime),S(f,e.path)}async function N(a,b,c){let d=(0,q.Bu)(a.language),e=b.projectContexts.get(a.language),f=new Map,g=new Set;for(let c of a.importSpecifiers){if(f.has(c))continue;let h=d.resolveSpecifier(c,a.path,e,b.fileSet);h&&h!==a.path&&(f.set(c,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:c,symbolsTree:a.symbolsTree,flatSymbols:a.flatSymbols,literals:a.literals,importedFiles:g,importedBy:new Set,importBindings:a.importBindings,resolvedImports:f,intraCalls:[],outgoingCalls:[],incomingCalls:[],externalCalls:[],methodCalls:[],symbolsByName:h,symbolsByQname:i,bindingsByLocalName:j,reexportsByLocalName:k},m=new Map,n=new Map,o=new Map,p=new Map;for(let c of(b.files.set(a.path,l),a.rawCalls)){let a=z(l.flatSymbols,c.line);if(a){for(let f of d.resolveCall(c,a,l,b.files,e))if("symbol"===f.kind)if(f.addr.filePath===l.path){let b=`${a.qualifiedName}${f.addr.qualifiedName}`,d=m.get(b);if(d)d.lines.push(c.line);else{let d={from:a.qualifiedName,to:f.addr.qualifiedName,lines:[c.line]};m.set(b,d),l.intraCalls.push(d)}}else{let b=`${a.qualifiedName}${f.addr.filePath}${f.addr.qualifiedName}`,d=n.get(b);if(d)d.lines.push(c.line);else{let d={from:a.qualifiedName,to:{filePath:f.addr.filePath,qualifiedName:f.addr.qualifiedName},lines:[c.line]};n.set(b,d),l.outgoingCalls.push(d)}}else if("external"===f.kind){let b=`${a.qualifiedName}${f.packageSpec}${f.name}`,d=o.get(b);if(d)d.lines.push(c.line);else{let d={from:a.qualifiedName,packageSpec:f.packageSpec,importedName:f.name,lines:[c.line]};o.set(b,d),l.externalCalls.push(d)}}else if("method-unresolved"===f.kind){let b=l.bindingsByLocalName.get(f.receiverName),d=b?l.resolvedImports.get(b.specifier)??"":"",e=`${a.qualifiedName}${f.receiverName}${f.methodName}`,g=p.get(e);if(g)g.lines.push(c.line);else{let b={from:a.qualifiedName,receiverName:f.receiverName,methodName:f.methodName,receiverFilePath:d,lines:[c.line]};p.set(e,b),l.methodCalls.push(b)}}}}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}function O(a){let b=a.lastIndexOf("/");return b>=0?a.slice(b+1):a}function P(a){return{filePath:a.filePath,qualifiedName:a.qualifiedName,name:a.name,kind:a.kind,startLine:a.startLine,endLine:a.endLine,declLine:a.declLine,params:a.params}}function Q(a){let b=a.indexOf(">");return b>=0?a.slice(0,b):a}function R(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 S(a,b){let c=a.files.get(b);if(!c)return null;let d=c.flatSymbols.filter(a=>!a.qualifiedName.includes(">")).map(P).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=Q(a.from),c=Q(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=R(a.lines);let h=[],i=new Map;for(let b of c.outgoingCalls){let d=Q(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,p._)(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:P(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=Q(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,p._)(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:P(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=R(a.lines);for(let a of j)a.lines.sort((a,b)=>a-b),a.lines=R(a.lines);let l=[],m=new Map;for(let a of c.externalCalls){let b=Q(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=R(a.lines);let n=[],o=new Map;for(let a of c.methodCalls){let b=Q(a.from);if(!e.has(b))continue;let c=`${b}|${a.receiverName}|${a.methodName}`,d=o.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()};o.set(c,d),n.push(d)}}for(let a of n)a.lines.sort((a,b)=>a-b),a.lines=R(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)),n.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:n,upstreamCalls:j,downstreamCalls:h}}function T(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 U(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}let al=(a,b)=>a.rank-b.rank||a.filePath.localeCompare(b.filePath)||a.qname.localeCompare(b.qname)||a.line-b.line;function V(a,b,c){if(a===b)return 0;let d=U(a);return d===c?1:d.startsWith(c)?2:d.includes(c)?3:-1}function W(a,b,c,d={}){let e=b.trim();if(!e)return d.includeLiterals?{files:[],symbols:[],literals:[]}:{files:[],symbols:[]};let f=U(e);if(!f)return d.includeLiterals?{files:[],symbols:[],literals:[]}:{files:[],symbols:[]};let g=Math.min(500,Math.max(0,Math.floor(c)||0)),h=new u.V(g,al),i=new u.V(g,al),j=new u.V(g,al);for(let b of a.files.values()){if(d.directory&&!b.path.startsWith(`${d.directory}/`)||d.excludeTests&&(0,t.h)(b.path))continue;let a=V(b.path,e,f);if(a>=0){let c=V(O(b.path),e,f);h.add({rank:c>=0?Math.min(c,a):a,filePath:b.path,qname:"",line:0,value:b})}for(let a of b.flatSymbols){if("unknown"===a.kind)continue;let c=V(a.name,e,f);c>=0&&i.add({rank:c,filePath:b.path,qname:a.qualifiedName,line:a.declLine,value:a})}if(d.includeLiterals)for(let a of b.literals){let c=V(a.value,e,f);c>=0&&j.add({rank:c,filePath:b.path,qname:a.value,line:a.line,value:a})}}let k=h.sorted().map(({value:a})=>({type:"file",label:O(a.path),hint:a.path,target:{filePath:a.path}})),l=i.sorted().map(({value:a})=>({type:"symbol",label:a.name,hint:`${a.kind} \xb7 ${a.filePath}`,target:P(a)}));if(!d.includeLiterals)return{files:k,symbols:l};let m=j.sorted().map(({filePath:a,value:b})=>({type:"literal",value:b.value,filePath:a,line:b.line,...b.enclosingQname?{enclosingSymbol:b.enclosingQname}:{}}));return{files:k,symbols:l,literals:m}}function X(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 Y(a,b,c){let d=X(a,b,c);if(d.length>1)return{qname:b,target:null,callers:[],ambiguousIn:d.map(a=>a.path).sort()};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:P(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:P(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=R(a.callLines);e.sort((a,b)=>a.caller.filePath.localeCompare(b.caller.filePath)||a.caller.qualifiedName.localeCompare(b.caller.qualifiedName));let g=P(d[0].symbolsByQname.get(b));return{qname:b,target:g,callers:e}}function Z(a,b,c){let d=X(a,b,c);if(d.length>1)return{qname:b,target:null,callees:[],ambiguousIn:d.map(a=>a.path).sort()};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:P(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:P(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=R(a.callLines);e.sort((a,b)=>a.callee.filePath.localeCompare(b.callee.filePath)||a.callee.qualifiedName.localeCompare(b.callee.qualifiedName));let g=P(d[0].symbolsByQname.get(b));return{qname:b,target:g,callees:e}}function $(a,b,c,d){let e=X(a,b,d);if(e.length>1)return{qname:b,target:null,nodes:[],truncated:!1,ambiguousIn:e.map(a=>a.path).sort()};if(0===e.length)return{qname:b,target:null,nodes:[],truncated:!1};let f=Math.min(Math.max(c,1),5),g=P(e[0].symbolsByQname.get(b)),h=e.map(a=>({filePath:a.path,qname:b})),i=new Set(h.map(a=>`${a.filePath}|${a.qname}`)),j=h.map(b=>{let c=a.files.get(b.filePath).symbolsByQname.get(b.qname);return{symbol:P(c),depth:0}}),k=h.slice(),l=!1;for(let b=1;b<=f;b++){let c=[];for(let d of k){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(!i.has(g)&&(i.add(g),j.push({symbol:P(f),depth:b}),c.push({filePath:e.path,qname:a.from}),j.length>=500)){l=!0;break}}if(l)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(!i.has(h)&&(i.add(h),j.push({symbol:P(g),depth:b}),c.push({filePath:f.from.filePath,qname:f.from.qualifiedName}),j.length>=500)){l=!0;break}}if(l)break}}if(l||0===c.length)break;k=c}return j.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:j,truncated:l}}d()}catch(a){d(a)}})},45356:(a,b,c)=>{c.d(b,{l:()=>h});var d=c(77598);let e=["resolvedImports","importedFiles","importedBy","intraCalls","outgoingCalls","incomingCalls","externalCalls","methodCalls"];function f(a,b,c){return JSON.stringify([2,a,b,c])}function g(a){return JSON.stringify(e.map(b=>{let c=a[b];return c instanceof Map||c instanceof Set?[...c]:c}))}class h{findParse(a,b,c,d){return this.repositories.get(a)?.parses.get(f(b,c,d))?.value}publish(a,b,c,e){let h=this.repositories.get(b);h||(h={roots:0,parses:new Map,relations:new Map},this.repositories.set(b,h)),h.roots++;let i={repository:b,parses:[],relations:[],bytes:1024+512*c.size};for(let[b,j]of a.files){let a=e.get(b),k=f(b,j.language,c.get(b)),l=h.parses.get(k);!l&&(l={key:k,value:{facts:a,lookups:{symbolsByName:j.symbolsByName,symbolsByQname:j.symbolsByQname,bindingsByLocalName:j.bindingsByLocalName,reexportsByLocalName:j.reexportsByLocalName}},references:0,bytes:Math.max(768+1024*a.flatSymbols.length+96*a.rawCalls.length+192*a.importBindings.length+64*a.importSpecifiers.length+128*a.literals.length,4e3*a.flatSymbols.length/1.25)},h.parses.set(k,l),this.bytes+=l.bytes);e.set(b,l.value.facts);let m=l.value.facts;j.symbolsTree=m.symbolsTree,j.flatSymbols=m.flatSymbols,j.literals=m.literals,j.importBindings=m.importBindings,Object.assign(j,l.value.lookups),l.references++,i.parses.push(l);let n=g(j),o=JSON.stringify([b,(0,d.createHash)("sha256").update(n).digest("hex")]),p=h.relations.get(o)??[],q=p.find(a=>g(a.value)===n);q||(q={key:o,value:{resolvedImports:j.resolvedImports,importedFiles:j.importedFiles,importedBy:j.importedBy,intraCalls:j.intraCalls,outgoingCalls:j.outgoingCalls,incomingCalls:j.incomingCalls,externalCalls:j.externalCalls,methodCalls:j.methodCalls},references:0,bytes:768+2*Buffer.byteLength(n)},p.push(q),h.relations.set(o,p),this.bytes+=q.bytes),Object.assign(j,q.value),q.references++,i.relations.push(q)}this.release(a.cwd),this.leases.set(a.cwd,i),this.bytes+=i.bytes}release(a){let b=this.leases.get(a);if(!b)return;this.leases.delete(a),this.bytes-=b.bytes;let c=this.repositories.get(b.repository);for(let a of(c.roots--,b.parses))0==--a.references&&(c.parses.delete(a.key),this.bytes-=a.bytes);for(let a of b.relations)if(0==--a.references){let b=c.relations.get(a.key);b.splice(b.indexOf(a),1),b.length||c.relations.delete(a.key),this.bytes-=a.bytes}c.roots||this.repositories.delete(b.repository)}has(a){return this.leases.has(a)}estimatedBytes(){return Math.ceil(1.25*this.bytes)}stats(){let a=0,b=0;for(let c of this.repositories.values())for(let d of(a+=c.parses.size,c.relations.values()))b+=d.length;return{roots:this.leases.size,repositories:this.repositories.size,parses:a,relations:b,estimatedBytes:this.estimatedBytes()}}constructor(){this.repositories=new Map,this.leases=new Map,this.bytes=0}}},52166:(a,b,c)=>{c.d(b,{s:()=>f});let d={nodes:new Set(["if_statement","for_statement","for_in_statement","while_statement","do_statement","switch_case","catch_clause","ternary_expression"]),binary:{type:"binary_expression",operators:new Set(["&&","||","??"])}},e={typescript:d,tsx:d,javascript:d,python:{nodes:new Set(["if_statement","elif_clause","for_statement","while_statement","except_clause","conditional_expression","case_clause","if_clause","for_in_clause","boolean_operator"])},go:{nodes:new Set(["if_statement","for_statement","expression_case","type_case","communication_case"]),binary:{type:"binary_expression",operators:new Set(["&&","||"])}},rust:{nodes:new Set(["if_expression","while_expression","for_expression","loop_expression","match_arm"]),binary:{type:"binary_expression",operators:new Set(["&&","||"])}}};function f(a,b,c){let d=e[b],f=new Map;if(!d)return f;let g=c.filter(a=>"function"===a.kind||"method"===a.kind);for(let a of g)f.set(a.qualifiedName,1);if(!g.length)return f;let h=new Map,i=a=>{let b=h.get(a);if(void 0===b){let c=null;for(let b of g)b.startLine<=a&&a<=b.endLine&&(!c||b.endLine-b.startLine<c.endLine-c.startLine)&&(c=b);b=c?.qualifiedName??null,h.set(a,b)}return b},j=[a];for(;j.length;){let a=j.pop(),b=d.nodes.has(a.type);if(!b&&d.binary&&a.type===d.binary.type){let c=a.childForFieldName("operator")?.text??a.child(1)?.text;b=!!c&&d.binary.operators.has(c)}if(b){let b=i(a.startPosition.row+1);b&&f.set(b,(f.get(b)??1)+1)}for(let b=a.childCount-1;b>=0;b--){let c=a.child(b);c&&j.push(c)}}return f}},53809:(a,b,c)=>{c.d(b,{h:()=>d});function d(a){return/(^|\/)(__tests__|tests?)\//i.test(a)||/\.(test|spec|e2e)\.[^/]+$/i.test(a)||/(^|\/)test_[^/]+\.pyi?$/i.test(a)||/[^/]+_test\.go$/i.test(a)}},56476:(a,b,c)=>{function d(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 e(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):g(d,b)}else"import_from_statement"===d.type&&h(d,b)}return b}function f(a){let b=e(a),c=new Set(b.map(a=>a.localName)),d=[];for(let b=0;b<a.namedChildCount;b++){let c=a.namedChild(b);c&&"import_statement"!==c.type&&"import_from_statement"!==c.type&&d.push(c)}for(;d.length;){let a=d.pop();if("import_statement"===a.type||"import_from_statement"===a.type){let d=[];for(let e of("import_statement"===a.type?g(a,d):h(a,d),d))c.has(e.localName)||(c.add(e.localName),b.push(e));continue}for(let b=0;b<a.namedChildCount;b++){let c=a.namedChild(b);c&&d.push(c)}}return b}function g(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})}}}}function h(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:"*"})}function i(a){let b=[];for(let c=0;c<a.namedChildCount;c++){let d=a.namedChild(c);if(!d||"export_statement"!==d.type||d.children.some(a=>"type"===a.type))continue;let e=d.childForFieldName("source"),f=e?j(e.text):"",g=(a,c=a)=>{b.push({localName:a,importedName:c,specifier:f,isReexport:!0})},h=null;for(let a=0;a<d.namedChildCount;a++){let b=d.namedChild(a);if(b?.type==="export_clause"){h=b;break}}if(!h){let a=d.namedChildren.find(a=>"namespace_export"===a.type);if(a){let b=a.namedChild(0);b&&g(b.text,"*")}else if(e&&d.children.some(a=>"*"===a.type))g("*");else{let a=d.childForFieldName("declaration");if(a?.type==="interface_declaration"||a?.type==="type_alias_declaration")continue;let b=d.children.some(a=>"default"===a.type);if(a?.type==="lexical_declaration"||a?.type==="variable_declaration")for(let b of a.namedChildren){let a=b.childForFieldName("name");a?.type==="identifier"&&g(a.text)}else{let c=a?.childForFieldName("name")??d.childForFieldName("value");(c?.type==="identifier"||c?.type==="type_identifier")&&g(b?"default":c.text,c.text)}}continue}for(let a=0;a<h.namedChildCount;a++){let b=h.namedChild(a);if(!b||"export_specifier"!==b.type||b.children.some(a=>"type"===a.type))continue;let c=b.childForFieldName("name"),d=b.childForFieldName("alias");if(!c)continue;let e=c.text;g(d?.text??e,e)}}return b}function j(a){return a.length>=2&&('"'===a[0]||"'"===a[0])&&a[a.length-1]===a[0]?a.slice(1,-1):a}c.d(b,{JM:()=>f,Lv:()=>d,il:()=>i,jv:()=>e})},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.NV)(),(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)}})},75775:(a,b,c)=>{c.d(b,{FI:()=>p,P3:()=>u,SD:()=>t,U0:()=>x,XC:()=>B,ax:()=>z,jR:()=>v,po:()=>C,xq:()=>D,yj:()=>o});var d=c(31421),e=c(77598),f=c(73024),g=c(76760),h=c.n(g),i=c(57975),j=c(89705),k=c(69181),l=c(770),m=c(28677);let n=(0,i.promisify)(d.execFile),o=1e5,p=2097152;async function q(a){let b=await j.pR5(j.gPK(a));if(k.OC(b))throw b.left;return b.right}async function r(a,b){return q(j.$mh({try:()=>n("git",b,{cwd:a,maxBuffer:0x3200000}).then(a=>a.stdout),catch:a=>new l.uV({message:"Code index Git command failed",cause:a})}))}function s(a){return!a.split("/").some(a=>"node_modules"===a||".git"===a)}function t(a){return s(a)&&(0,m.cn)().includes(h().posix.extname(a).toLowerCase())}async function u(a){return q(j.$mh({try:async()=>{let[b,...c]=(await n("git",["rev-parse","--is-inside-work-tree","--absolute-git-dir"],{cwd:a})).stdout.trimEnd().split("\n");if("true"!==b)throw Error("Not a Git working tree");return c.join("\n")},catch:a=>/not a git repository/i.test(a.stderr??"")||"Not a Git working tree"===a.message?new l.yI({field:"cwd",reason:"Non-Git projects are not supported"}):new l.uV({message:"Unable to inspect Git project",cause:a})}))}async function v(a){return await u(a),[...new Set((await r(a,["ls-files","--cached","--others","--exclude-standard","-z"])).split("\0").filter(a=>a&&s(a)))].sort()}async function w(a){return q(j.$mh({try:a,catch:a=>a}).pipe(j.h9N(a=>"ENOENT"===a.code?j.PyW(null):j.fJG(new l.uU({path:"code-index scan",op:"read",cause:a})))))}async function x(a){let b=await u(a),c=(await r(a,["rev-parse","--path-format=absolute","--git-common-dir"])).trimEnd(),d=await q(j.$mh({try:()=>f.promises.realpath(c),catch:a=>new l.uU({path:c,op:"read",cause:a})})),e=await Promise.all(["index.lock","rebase-merge","rebase-apply","MERGE_HEAD","CHERRY_PICK_HEAD","REVERT_HEAD"].map(a=>w(()=>f.promises.stat(h().join(b,a))))),g=await q(j.$mh({try:()=>n("git",["rev-parse","--verify","--quiet","HEAD"],{cwd:a}).then(a=>a.stdout.trim()),catch:a=>a}).pipe(j.h9N(a=>1===a.code?j.PyW("unborn"):j.fJG(new l.uV({message:"Unable to read Git HEAD",cause:a}))))),i=await r(a,["ls-files","--unmerged","-z"]);return{head:g,busy:e.some(Boolean)||i.length>0,commonDir:d}}let y=a=>(0,e.createHash)("sha256").update(a).digest("hex");async function z(a,b){let c=h().join(a,b);return w(async()=>{let[a,b]=await Promise.all([f.promises.readFile(c),f.promises.stat(c)]);return{source:a.toString("utf8"),hash:y(a),mtime:b.mtimeMs,sizeBytes:a.length}})}function A(a){return/(^|\/)(tsconfig[^/]*\.json|package\.json|pnpm-workspace\.yaml|go\.mod|\.gitignore)$/.test(a)}async function B(a,b=!1){let c=await x(a);if(c.busy&&!b)throw new l.uV({message:"Workspace is changing: finish the Git operation or explicitly rebuild the index"});let d=await v(a),e=d.filter(t),f=e.slice(0,o),g=new Map,h=new Map,i=0,j=!1,k=(await Promise.allSettled(Array.from({length:Math.min(8,f.length)},async()=>{for(;!j&&i<f.length;){let b=f[i++],c=await z(a,b).catch(a=>{throw j=!0,a});c&&(g.set(b,c),h.set(b,c.hash))}}))).find(a=>"rejected"===a.status);if(k?.status==="rejected")throw k.reason;for(let a of e.slice(o))h.set(a,"not-scanned");let m=new Map,n=new Map;for(let b of[...new Set([...d.filter(A),"tsconfig.json","package.json","pnpm-workspace.yaml","go.mod"])].sort())await z(a,b).then(a=>{a&&(m.set(b,a.hash),n.set(b,a.source))});let p=y(JSON.stringify([...m])),q={paths:[...new Set([...d,...n.keys()])],readFile:async a=>{let b=g.get(a)?.source??n.get(a);if(void 0!==b)return b;throw new l.uU({path:a,op:"read",cause:Object.assign(Error(`File not captured: ${a}`),{code:"ENOENT"})})}};return{sources:g,hashes:h,configHash:p,truncated:e.length>o,git:c,contextFiles:q}}function C(a,b){let c=[],d=[],e=[];for(let[e,f]of b)a.has(e)?a.get(e)!==f&&d.push(e):c.push(e);for(let c of a.keys())b.has(c)||e.push(c);let f=c.length+d.length+e.length,g=Math.max(a.size,b.size);return{added:c,changed:d,deleted:e,count:f,rebuild:f>=500||f>=20&&f/g>=.2}}function D(a,b){return a instanceof l.uV||a instanceof l.uU||a instanceof l.yI?a:new l.uV({message:b,cause:a})}},83624:(a,b,c)=>{c.d(b,{Hs:()=>n,NZ:()=>f,YN:()=>o,_B:()=>m,mG:()=>l,qj:()=>e});var d=c(56476);function e(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 f(a){return a.replace(/\s+/g," ").trim()}function g(a,b){return a?`${a}>${b}`:b}function h(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 i(a,b,c,d,h=[],j){return{qualifiedName:g(d,b),name:b,kind:c,startLine:a.startPosition.row+1,endLine:a.endPosition.row+1,declLine:function(a){for(let b=0;b<a.childCount;b++){let c=a.child(b);if(c&&"decorator"!==c.type&&"comment"!==c.type)return c.startPosition.row}return a.startPosition.row}(a)+1,contentHash:e(f(a.text)),children:h,params:j}}function j(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}let k={theorem:"function",def:"function",abbrev:"function",example:"function",instance:"const",structure:"class",inductive:"type",axiom:"const",opaque:"const",constant:"const"};function l(a,b){for(let c=0;c<a.namedChildCount;c++){let d=a.namedChild(c);if(d?.type!=="export_statement")continue;let e=d.childForFieldName("declaration");if(!e||e.startPosition.row===d.startPosition.row)continue;let f=e.startPosition.row+1;for(let a of b)"unknown"!==a.kind&&a.startLine===f&&(a.startLine=d.startPosition.row+1)}let c=new Map;for(let b=0;b<a.namedChildCount;b++){let d=a.namedChild(b);if(!d||!function(a){if("attribute_item"===a.type)return!0;if(!a.type.endsWith("comment"))return!1;for(let b=0;b<a.namedChildCount;b++)if(a.namedChild(b)?.type==="inner_doc_comment_marker")return!1;return!0}(d))continue;let e=0===d.endPosition.column&&d.endPosition.row>d.startPosition.row?d.endPosition.row-1:d.endPosition.row;c.set(e+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 m(a,b){let c=a.text.split("\n"),d=c.length;if(0===d)return[];let g=new Uint8Array(d+2);for(let a of b){let b=Math.max(1,a.startLine),c=Math.min(d,a.endLine);for(let a=b;a<=c;a++)g[a]=1}let h=[],i=(a,b)=>{let d=!1;for(let e=a;e<=b;e++){let a=c[e-1];if(a&&a.trim().length>0){d=!0;break}}if(!d)return;let g=c.slice(a-1,b).join("\n");h.push({qualifiedName:`__code_${a}_${b}__`,name:"code",kind:"unknown",startLine:a,endLine:b,declLine:a,contentHash:e(f(g)),children:[]})},j=-1;for(let a=1;a<=d;a++)g[a]?j>=0&&(i(j,a-1),j=-1):j<0&&(j=a);return j>=0&&i(j,d),h}function n(a,b){let c=[],n=function(a){let b=[],c=-1,d=-1;for(let e=0;e<a.namedChildCount;e++){let f=a.namedChild(e);if(f){if("import_statement"===f.type||"export_statement"===f.type&&null!==f.childForFieldName("source")||"import_from_statement"===f.type||"future_import_statement"===f.type||"import"===f.type)b.push(f),c<0&&(c=f.startPosition.row+1),d=f.endPosition.row+1;else if(c>=0)break}}return c<0?null:{qualifiedName:"__imports__",name:"imports",kind:"unknown",startLine:c,endLine:d,declLine:c,contentHash:e(f(b.map(a=>a.text).join("\n"))),children:[]}}(a);if(n&&c.push(n),"lean"===b)c.push(...function(a){let b=[],c=[];for(let d=0;d<a.namedChildCount;d++){let g=a.namedChild(d);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 k){h=b;break}}else g.type in k&&(h=g);if(!h)continue;let i=h.childForFieldName("name")?.text??h.type,j=c.filter(a=>null!==a);b.push({qualifiedName:[...j,i].join("."),name:i,kind:k[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),declLine:h.startPosition.row+1,contentHash:e(f(g.text)),children:[]})}return b}(a));else for(let b=0;b<a.namedChildCount;b++){let k=a.namedChild(b);k&&c.push(...function a(b,c,k=!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[i(b,h(b),"function",c,[],j(b))];case"class_declaration":case"abstract_class_declaration":{let a=h(b),d=g(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(i(e,h(e),"method",b,[],j(e)));else if("public_field_definition"===e.type){let a=e.childForFieldName("value");a&&("arrow_function"===a.type||"function_expression"===a.type)&&c.push(i(e,h(e),"method",b,[],j(a)))}}}return c}(b.childForFieldName("body"),d);return[i(b,a,"class",c,e)]}case"interface_declaration":return[i(b,h(b),"interface",c)];case"type_alias_declaration":return[i(b,h(b),"type",c)];case"enum_declaration":return[i(b,h(b),"enum",c)];case"lexical_declaration":case"variable_declaration":return function(a,b){let c=[];for(let e=0;e<a.namedChildCount;e++){let f=a.namedChild(e);if(!f||"variable_declarator"!==f.type)continue;let g=f.childForFieldName("name"),k=f.childForFieldName("value");if(!g)continue;let l=g.text,m=function a(b,c=0){if(!b||c>8)return null;if("arrow_function"===b.type||"function_expression"===b.type)return b;if(["parenthesized_expression","as_expression","satisfies_expression","non_null_expression"].includes(b.type))return a(b.namedChild(0),c+1);if("call_expression"!==b.type)return null;let e=b.childForFieldName("function");if(!e)return null;let f="member_expression"===e.type?e.childForFieldName("object"):null,g=f?.type==="identifier"?f.text:"identifier"===e.type?e.text:null;if(!g)return null;let h=b;for(;h.parent;)h=h.parent;let i=(0,d.jv)(h).find(a=>a.localName===g);if(!i)return null;let j=f?e.childForFieldName("property")?.text:i.importedName,k="*"===i.importedName||"default"===i.importedName;return(!f||k)&&("@cockpit/effect-runtime/server"===i.specifier?"handler"===j||"dynamicHandler"===j:"react"===i.specifier&&["memo","forwardRef","useCallback"].includes(j??""))?a(b.childForFieldName("arguments")?.namedChild(0)??null,c+1):null}(k),n=null!==m,o=m?j(m):void 0;if(c.push(i(a,l,n?"function":"const",b,[],o)),k&&"object"===k.type&&!n){let a=b?`${b}>${l}`:l;for(let b=0;b<k.namedChildCount;b++){let d=k.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(i(d,b.text,"method",a,[],j(e)))}else if("method_definition"===d.type){let b=h(d);b&&c.push(i(d,b,"method",a,[],j(d)))}}}}}return c}(b,c);case"class_definition":{let a=h(b),d=g(c,a),k=function a(b,c){if(!b)return[];let d=[];for(let k=0;k<b.namedChildCount;k++){let l=b.namedChild(k);if(l){if("function_definition"===l.type)d.push(i(l,h(l),"method",c,[],j(l)));else if("decorated_definition"===l.type){let b=l.childForFieldName("definition");if(b?.type==="function_definition")d.push({...i(b,h(b),"method",c,[],j(b)),startLine:l.startPosition.row+1,contentHash:e(f(l.text))});else if(b?.type==="class_definition"){let j=h(b),k=g(c,j),m=a(b.childForFieldName("body"),k);d.push({...i(b,j,"class",c,m),startLine:l.startPosition.row+1,contentHash:e(f(l.text))})}}else if("class_definition"===l.type){let b=h(l),e=g(c,b),f=a(l.childForFieldName("body"),e);d.push(i(l,b,"class",c,f))}}}return d}(b.childForFieldName("body"),d);return[i(b,a,"class",c,k)]}case"decorated_definition":{let d=b.childForFieldName("definition");if(!d)return[];return a(d,c,!1).map(a=>({...a,startLine:b.startPosition.row+1,contentHash:e(f(b.text))}))}case"expression_statement":{let a=[];for(let d=0;d<b.namedChildCount;d++){let h=b.namedChild(d);if(h?.type==="assignment"){let d=function(a,b,c){let d=b.childForFieldName("left");if(!d||"identifier"!==d.type)return null;let h=d.text;return{qualifiedName:g(c,h),name:h,kind:"const",startLine:a.startPosition.row+1,endLine:a.endPosition.row+1,declLine:a.startPosition.row+1,contentHash:e(f(a.text)),children:[]}}(b,h,c);d&&a.push(d)}}return a.push(...function(a,b){let c=null;for(let b=0;b<a.namedChildCount;b++){let d=a.namedChild(b);if(d){if("call_expression"===d.type){c=d;break}if("await_expression"===d.type){for(let a=0;a<d.namedChildCount;a++){let b=d.namedChild(a);if(b?.type==="call_expression"){c=b;break}}break}}}if(!c)return[];let d=c.childForFieldName("function"),e=c.childForFieldName("arguments");if(!d||!e)return[];let f=null,g=[];for(let a=0;a<e.namedChildCount;a++){let b=e.namedChild(a);if(b){if(null===f&&("string"===b.type||"template_string"===b.type)){let a=b.text;f=a.length>=2&&/^["'`]/.test(a)?a.slice(1,-1):a}("arrow_function"===b.type||"function_expression"===b.type)&&g.push(b)}}if(0===g.length||!f)return[];let h=function a(b){if("identifier"===b.type)return b.text;if("member_expression"===b.type){let a=b.childForFieldName("property");return a?.text??""}if("call_expression"===b.type){let c=b.childForFieldName("function");return c?a(c):""}return""}(d),k=h?`${h} ${f}`:f;return g.map((a,c)=>i(a,g.length>1?`${k} #${c+1}`:k,"function",b,[],j(a)))}(b,c)),a}default:return[]}}(k,void 0,!1))}return l(a,c),c.push(...m(a,c)),o(c),c}function o(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)}},85836:(a,b,c)=>{c.d(b,{V:()=>d});class d{constructor(a,b){this.limit=a,this.compare=b,this.heap=[]}add(a){if(this.limit<=0)return;if(this.heap.length<this.limit){this.heap.push(a);let b=this.heap.length-1;for(;b>0;){let a=b-1>>>1;if(0>=this.compare(this.heap[b],this.heap[a]))break;[this.heap[b],this.heap[a]]=[this.heap[a],this.heap[b]],b=a}return}if(this.compare(a,this.heap[0])>=0)return;this.heap[0]=a;let b=0;for(;;){let a=2*b+1;if(a>=this.heap.length)break;let c=a+1,d=c<this.heap.length&&this.compare(this.heap[c],this.heap[a])>0?c:a;if(0>=this.compare(this.heap[d],this.heap[b]))break;[this.heap[b],this.heap[d]]=[this.heap[d],this.heap[b]],b=d}}sorted(){return this.heap.slice().sort(this.compare)}}},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:()=>j});var d=c(29021),e=c(33873);let f=[".git/HEAD",".git/MERGE_HEAD",".git/REBASE_HEAD"],g=[".git/refs"];class h{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))},h=()=>{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&&h()},2e3))}),b.watchers.push(e)}catch(b){console.error(`Failed to watch ${a}:`,b)}};h();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 f){let b=a.replace(".git/","");j((0,e.join)(i,b))}let k=function(a){try{let b=(0,d.readFileSync)((0,e.join)(a,"commondir"),"utf-8").trim();if(b)return(0,e.resolve)(a,b)}catch{}return a}(i);for(let a of g){let f=a.replace(".git/","");try{let a=(0,d.watch)((0,e.join)(k,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}}let i=globalThis,j=i.__cockpitFileWatcher??(i.__cockpitFileWatcher=new h)}};
|
|
1
|
+
"use strict";exports.id=4949,exports.ids=[4949],exports.modules={9450:(a,b,c)=>{c.d(b,{I:()=>d});let d=new Set(["typescript","tsx","javascript","python","go","rust","lean"])},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={contexts:[0,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:()=>i,IS:()=>p,KP:()=>l,ZT:()=>r,_0:()=>m,zC:()=>n});var d=c(73024),e=c(76760),f=c.n(e),g=c(75775);function h(a,b,c){return c?c.readFile(b):d.promises.readFile(f().join(a,b),"utf8")}let i=g.yj,j=[".ts",".tsx",".js",".jsx",".mjs",".cjs"],k=[".js",".jsx",".mjs",".cjs"];function l(a,b,c){let d=f().relative(b,a).split(f().sep).join("/");if(d.startsWith(".."))return null;for(let a of k)if(d.endsWith(a)){d=d.slice(0,-a.length);break}if(c.has(d))return d;for(let a of j){let b=d+a;if(c.has(b))return b}for(let a of j){let b=f().posix.join(d,"index"+a);if(c.has(b))return b}return null}function m(a,b){return""===b||a===b||a.startsWith(b+"/")}async function n(a,b,c){let d=await o(a,c);if(0===d.length)return new Map;let e=(c?.paths??await (0,g.jR)(a)).filter(a=>a.endsWith("/package.json")).filter(a=>{let b=a.slice(0,-13);return d.some(a=>{var c;return c=b,RegExp("^"+a.replace(/\\/g,"/").replace(/[.+^${}()|[\]]/g,"\\$&").replace(/\*\*/g,"___DOUBLESTAR___").replace(/\*/g,"[^/]*").replace(/___DOUBLESTAR___/g,".*")+"$").test(c)})}),i=new Map;for(let d of e){let e;try{e=JSON.parse(await h(a,d,c))}catch{continue}if("string"!=typeof e.name)continue;let g=f().dirname(d),j=function(a,b,c){let d,e=b=>{let d=b.replace(/^\.\//,"");return p(f().posix.join(a,d),c)},g=b.exports;if("string"==typeof g)d=g;else if(g&&"object"==typeof g&&g["."]){let a=g["."];"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(f().posix.join(a,b)))return f().posix.join(a,b);return null}(g,e,b);i.set(e.name,{name:e.name,dir:g,entryFile:j})}return i}async function o(a,b){try{var c=await h(a,"pnpm-workspace.yaml",b);let d=[],e=!1;for(let a of c.split("\n")){let b=a.replace(/#.*$/,"");if(/^packages\s*:/.test(b)){e=!0;continue}if(!e)continue;let c=b.match(/^\s*-\s*['"]?([^'"#\s]+)['"]?\s*$/);c?d.push(c[1]):/^\S/.test(b)&&(e=!1)}return d}catch{}try{let c=JSON.parse(await h(a,"package.json",b)),d=c?.workspaces;if(Array.isArray(d))return d.filter(a=>"string"==typeof a);if(d&&Array.isArray(d.packages))return d.packages.filter(a=>"string"==typeof a)}catch{}return[]}function p(a,b){if(a.startsWith("..")||a.startsWith("/"))return null;for(let b of k)if(a.endsWith(b)){a=a.slice(0,-b.length);break}if(b.has(a))return a;for(let c of j){let d=a+c;if(b.has(d))return d}for(let c of j){let d=f().posix.join(a,"index"+c);if(b.has(d))return d}return null}async function q(a,b,c){let d,e=new Map;try{let e=(await h(b,f().relative(b,a).split(f().sep).join("/"),c)).replace(/^\s*\/\/.*$/gm,"");d=JSON.parse(e)}catch{return e}let g=d?.compilerOptions?.baseUrl??".",i=d?.compilerOptions?.paths??{},j=f().resolve(f().dirname(a),g),k=f().relative(b,j)||".";for(let[a,b]of Object.entries(i)){if(!Array.isArray(b)||0===b.length)continue;let c=a.replace(/\/\*$/,""),d=b[0].replace(/\/\*$/,"");e.set(c,f().join(k,d))}return e}async function r(a,b){let c=[];for(let d of(b?.paths??await (0,g.jR)(a)).filter(a=>/(^|\/)tsconfig[^/]*\.json$/.test(a))){let e=await q(f().join(a,d),a,b);if(0===e.size)continue;let g=f().dirname(d);c.push({scope:"."===g?"":g,aliases:e,sortedAliases:s(e)})}let d=c.find(a=>""===a.scope);return d||(d={scope:"",aliases:new Map,sortedAliases:[]},c.push(d)),d.aliases.has("@")||(d.aliases.set("@","./src"),d.sortedAliases=s(d.aliases)),c.sort((a,b)=>b.scope.length-a.scope.length)}function s(a){return[...a.entries()].sort(([a],[b])=>b.length-a.length)}},28677:(a,b,c)=>{c.d(b,{Bu:()=>f,XS:()=>i,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]}function i(a){let b=a.slice(a.lastIndexOf(".")).toLowerCase();for(let a of d.values())if(a.extensions.includes(b))return a.grammarId;return null}},30733:(a,b,c)=>{c.d(b,{W:()=>d});function d(...a){return JSON.stringify(a)}},31181:(a,b,c)=>{function d(a,b){let c=a[b],d=b+1;for(;d<a.length;){let b=a[d];if("\\"===b){d+=2;continue}if(b===c)return d+1;if("\n"===b&&"`"!==c)break;d++}return d}function e(a,b){let c=function(a){let b=[0];for(let c=a.indexOf("\n");-1!==c;c=a.indexOf("\n",c+1))b.push(c+1);return a=>{let c=0,d=b.length-1;for(;c<d;){let e=c+d+1>>>1;b[e]<=a?c=e:d=e-1}return c+1}}(a);return(a,d)=>b.get(a)===c(d)}function f(a,b){let c=new Map,d=e(a,b),f=new Map;for(let b of a.matchAll(/^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)\s*(?::\s*[\w.[\]| ]+)?=\s*(["'])((?:\\.|(?!\2)[^\\\n])*)\2\s*;?\s*$/gm))d(b[1],b.index)&&(f.set(b[1],(f.get(b[1])??0)+1),c.set(b[1],b[3]));for(let[a,b]of f)b>1&&c.delete(a);return c}function g(a,b){let c=new Map;if(/^[ \t]*from\s+\S+\s+import\s+\*/m.test(a))return c;let f=e(a,b),g=function(a){let b=[...a].sort((a,b)=>a[0]-b[0]),c=[];for(let[,a]of b)c.push(Math.max(a,c[c.length-1]??-1));return a=>{let d=0,e=b.length-1,f=-1;for(;d<=e;){let c=d+e>>>1;b[c][0]<=a?(f=c,d=c+1):e=c-1}return f>=0&&a<c[f]}}(function(a){let b=[...a.matchAll(/^[ \t]*@[\w.]+\(/gm)].map(a=>a.index+a[0].length),c=[],e=new Map,f=0,g=0;for(let i=0;i<a.length;i++){for(;f<b.length&&b[f]-1<i;){let d=h(a,b[f++]);d&&c.push(d)}let j=a[i];if('"'===j||"'"===j||"`"===j){i=d(a,i)-1;continue}if("("===j||"["===j||"{"===j)f<b.length&&b[f]-1===i&&e.set(g,b[f++]),g++;else if(")"===j||"]"===j||"}"===j){g--;let a=e.get(g);void 0!==a&&(c.push([a,i]),e.delete(g))}}for(;f<b.length;){let d=h(a,b[f++]);d&&c.push(d)}return c.sort((a,b)=>a[0]-b[0])}(a)),i=[...a.matchAll(/^([A-Za-z_]\w*)\s*(?::\s*[\w.[\]| ]+)?=\s*(["'])((?:\\.|(?!\2)[^\\\n])*)\2\s*$/gm)].filter(a=>f(a[1],a.index));if(!i.length)return c;let j=new Set(i.map(a=>a[1])),k=new Map;for(let b of a.matchAll(/(?<![\w.])[A-Za-z_]\w*/g)){if(!j.has(b[0]))continue;let a=k.get(b[0]);a||k.set(b[0],a=[]),a.push(b.index)}let l=/\s*:=/y,m=b=>(l.lastIndex=b,l.test(a));for(let a of i){let b=a[1],d=a.index;(k.get(b)??[]).every(a=>a===d||g(a)&&!m(a+b.length))&&c.set(b,a[3])}return c}function h(a,b){let c=0;for(let e=b;e<a.length;e++){let f=a[e];if('"'===f||"'"===f||"`"===f){e=d(a,e)-1;continue}if("("===f||"["===f||"{"===f)c++;else if(")"===f||"]"===f||"}"===f){if(0===c)return[b,e];c--}}return null}function i(a){let b=0;for(let c=0;c<a.length;c++){let e=a[c];if('"'===e||"'"===e||"`"===e){c=d(a,c)-1;continue}if("("===e||"["===e||"{"===e)b++;else if(")"===e||"]"===e||"}"===e){if(0===b)return a.slice(0,c).trim();b--}else if(","===e&&0===b)return a.slice(0,c).trim()}return null}function j(a,b){let c=[],d=a.trim();if(!d)return null;for(;;){let a=/^(?:[rRuU]|[bB])?(["'])((?:\\.|(?!\1)[^\\\n])*)\1/.exec(d),e=a?null:/^[A-Za-z_]\w*/.exec(d);if(a)c.push(a[2]);else{if(!(e&&b.has(e[0])))return null;c.push(b.get(e[0]))}if(!(d=d.slice((a??e)[0].length).trimStart()))return c.join("");if("+"!==d[0])return null;d=d.slice(1).trimStart()}}c.d(b,{PW:()=>g,Sx:()=>i,gT:()=>f,wU:()=>j})},33265:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{KE:()=>Q,NV:()=>H,hM:()=>A,ih:()=>J,lG:()=>O,tI:()=>R,u$:()=>N,uV:()=>P});var e,f=c(78877),g=c(89705),h=c(15825),i=c(770),j=c(77259),k=c(75775),l=c(87956),m=c(9450),n=c(25344),o=c(25157),p=c(58994),q=c(82038),r=c(28677),s=c(36262),t=c(45356),u=c(52166),v=c(53628),w=c(92287),x=c(38260),y=c(30733),z=a([l]);l=(z.then?(await z)():z)[0];let T=/(['"`])([A-Za-z][A-Za-z0-9_.-]{2,63})\1/g;async function A(a,b,c){let d=(0,r.XS)(a);if(!d)return null;let{source:e}=b;if((0,k.dE)(a,b))return null;let f=await (0,l.b)(d),g=await (0,j.Ki)(()=>f.parse(e));if(!g)throw new i.uV({message:`Unable to parse ${a}`});try{let b=(0,q.B)(d),{symbolsTree:f,flatSymbols:h}=await (0,j.Ki)(()=>{let c,d=b.extractSymbols(g.rootNode,e);return(0,s.YN)(d),{symbolsTree:d,flatSymbols:(c=[],!function b(d){for(let e of d)c.push({filePath:a,qualifiedName:e.qualifiedName,name:e.name,kind:e.kind,startLine:e.startLine,endLine:e.endLine,declLine:e.declLine,params:e.params,...e.boundNames?{boundNames:e.boundNames}:{},...e.static?{static:!0}:{}}),b(e.children)}(d),c)}});return await (0,j.Ki)(()=>{let a=(0,u.s)(g.rootNode,b.decisions,h),c=(0,v.j)(g.rootNode,h);for(let b of h){let d=a.get(b.qualifiedName);void 0!==d&&(b.complexity=d);let e=c.get(b.qualifiedName);void 0!==e&&(b.bodyLine=e)}}),await (0,j.Ki)(()=>c({grammar:d,root:g.rootNode,handler:b,symbolsTree:f,flatSymbols:h}))}finally{g.delete()}}function B(a,b){return A(a,b,async({grammar:c,root:d,handler:e,symbolsTree:f,flatSymbols:g})=>{let{specs:h,bindings:i}=e.extractImports(d),k=await (0,j.Ki)(()=>e.extractCallSites(d,g)),l=await (0,j.Ki)(()=>(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(T.lastIndex=0;null!==(c=T.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=(0,y.W)(a,g);if(e.has(h))continue;e.add(h);let i=C(b,g);d.push({value:a,line:g,...i?{enclosingQname:i.qualifiedName}:{}})}return d})(b.source,g)),m=await (0,j.Ki)(()=>(0,p.Q)(d));return{path:a,language:c,symbolsTree:f,flatSymbols:g,importBindings:i,importSpecifiers:h,rawCalls:k,literals:l,comments:m,sourceHash:b.hash}})}function C(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}function D(a,b,c,d,e){let f=(0,q.B)(a.language),g=c.get(a.language),h=new Map,i=new Set;for(let b of a.importSpecifiers){if(h.has(b))continue;let c=f.resolveSpecifier(b,a.path,g,d);c&&c!==a.path&&(h.set(b,c),i.add(c))}let j=e?.symbolsByName??new Map,k=e?.symbolsByQname??new Map;for(let b of e?[]:a.flatSymbols)k.set(b.qualifiedName,b),function(a,b){for(let c of b.boundNames?[b.name,...b.boundNames]:[b.name]){let d=a.get(c);d?d.push(b):a.set(c,[b])}}(j,b);let l=e?.bindingsByLocalName??new Map,m=e?.reexportsByLocalName??new Map;for(let b of e?[]:a.importBindings)b.isReexport?m.set(b.localName,b):l.set(b.localName,b);return{path:a.path,language:a.language,mtime:b,symbolsTree:a.symbolsTree,flatSymbols:a.flatSymbols,literals:a.literals,comments:a.comments,sourceHash:a.sourceHash,importedFiles:i,importedBy:new Set,importBindings:a.importBindings,resolvedImports:h,intraCalls:[],outgoingCalls:[],incomingCalls:[],externalCalls:[],methodCalls:[],symbolsByName:j,symbolsByQname:k,bindingsByLocalName:l,reexportsByLocalName:m}}function E(a,b,c,d){let e=(0,q.B)(a.language),f=d.get(a.language),g=new Map,h=new Map,i=new Map,j=new Map;for(let d of a.rawCalls){let a=C(b.flatSymbols,d.line);if(a){for(let k of e.resolveCall(d,a,b,c,f))if("symbol"===k.kind)!function(a,b,c,d,e,f){let g=c.addr.filePath===a.path,h=g?(0,y.W)(b,c.addr.qualifiedName):(0,y.W)(b,c.addr.filePath,c.addr.qualifiedName),i=g?e.get(h):f.get(h);if(i){i.lines.push(d),c.byName||delete i.byName;return}let j=c.byName?{byName:!0}:{};if(g){let f={from:b,to:c.addr.qualifiedName,lines:[d],...j};e.set(h,f),a.intraCalls.push(f)}else{let e={from:b,to:{filePath:c.addr.filePath,qualifiedName:c.addr.qualifiedName},lines:[d],...j};f.set(h,e),a.outgoingCalls.push(e)}}(b,a.qualifiedName,k,d.line,g,h);else if("external"===k.kind){let c=(0,y.W)(a.qualifiedName,k.packageSpec,k.name),e=i.get(c);if(e)e.lines.push(d.line);else{let e={from:a.qualifiedName,packageSpec:k.packageSpec,importedName:k.name,lines:[d.line]};i.set(c,e),b.externalCalls.push(e)}}else if("method-unresolved"===k.kind){let c=b.bindingsByLocalName.get(k.receiverName),e=c?b.resolvedImports.get(c.specifier)??"":"",f=(0,y.W)(a.qualifiedName,k.receiverName,k.methodName),g=j.get(f);if(g)g.lines.push(d.line);else{let c={from:a.qualifiedName,receiverName:k.receiverName,methodName:k.methodName,receiverFilePath:e,lines:[d.line]};j.set(f,c),b.methodCalls.push(c)}}}}for(let a of b.intraCalls)a.lines.sort((a,b)=>a-b);for(let a of b.outgoingCalls)a.lines.sort((a,b)=>a-b);for(let a of b.externalCalls)a.lines.sort((a,b)=>a-b);for(let a of b.methodCalls)a.lines.sort((a,b)=>a-b)}let U=new WeakMap;async function F(a,b,c,d=!1){let e=Date.now(),f=c&&U.get(c),g=(0,k.po)(f?.hashes??new Map,b.hashes),h=d||g.rebuild||f?.configHash!==b.configHash||f?.git.head!==b.git.head||f?.git.busy!==b.git.busy||f?.git.commonDir!==b.git.commonDir,i=[...b.sources.keys()].sort(),l=b.truncated,p=new Set(i);(0,o.d)(a,"contexts",0,i.length,void 0,!0);let s=await (0,n.ZT)(a,b.contextFiles),t=await (0,n.zC)(a,p,b.contextFiles),u=new Map;for(let c of m.I){let d=(0,q.i)(c);d&&u.set(c,await d.buildProjectContext(a,p,b.contextFiles))}let v=i.length,w=0,x=0;(0,o.d)(a,"parsing",0,v,void 0,!0);let y=new Map,z=new Map,A=[];for(let c of i){await (0,j.Ki)(()=>void 0);let e=!d&&f?.git.commonDir===b.git.commonDir&&f?.hashes.get(c)===b.hashes.get(c)&&f?.facts.has(c),g=(0,r.XS)(c),h=d||e||!g?void 0:W.findParse(b.git.commonDir,c,g,b.hashes.get(c));h&&z.set(c,h);let i=e?f.facts.get(c):h?.facts??await B(c,b.sources.get(c));!e&&!h&&x++,y.set(c,i),i&&A.push(i),w++,(0,o.d)(a,"parsing",w,v,c)}(0,o.d)(a,"resolving",v,v,void 0,!0);let C=new Map;for(let a of A)await (0,j.Ki)(()=>{let d=(f?.facts.get(a.path)===a?c?.files.get(a.path):void 0)??z.get(a.path)?.lookups;C.set(a.path,D(a,b.sources.get(a.path).mtime,u,p,d))});for(let a of C.values())await (0,j.Ki)(()=>{for(let b of a.importedFiles){let c=C.get(b);c&&c.importedBy.add(a.path)}});for(let b of((0,o.d)(a,"edges",v,v,void 0,!0),A))await (0,j.Ki)(()=>E(b,C.get(b.path),C,u));for(let a of C.values())await (0,j.Ki)(()=>{for(let b of a.outgoingCalls){let c=C.get(b.to.filePath);c&&c.incomingCalls.push({from:{filePath:a.path,qualifiedName:b.from},to:b.to.qualifiedName,lines:b.lines,...b.byName?{byName:!0}:{}})}});let G=[];for(let a of i)await (0,j.Ki)(()=>{let c=(0,k.dE)(a,b.sources.get(a));c&&G.push(c)});let H={cwd:a,files:C,truncated:l,fileCountCap:l?n.BE:void 0,excludedFiles:G,tsconfigs:s,workspaces:t,projectContexts:u,fileSet:p,generatedAt:Date.now(),buildMs:Date.now()-e,revision:(c?.revision??0)+1,update:{mode:c?h?"rebuild":"incremental":"initial",changedFiles:g.count,parsedFiles:x}},I=G.filter(a=>"minified"===a.reason).length;return H.truncated||=A.length+I<i.length,U.set(H,{hashes:b.hashes,configHash:b.configHash,scanTruncated:b.truncated,git:b.git,facts:y}),H}let V=new Map,W=new t.l,X=new Map,Y=new Map;function G(a){let b=0;for(let c of a.files.values())b+=c.flatSymbols.length;return b}let Z=(e=(0,f.getHeapStatistics)().heap_size_limit,Math.max(1e9,Math.min(e-0x40000000,0x80000000))),$="5 minutes",_=!1;function H(){_||(_=!0,g.MY7(g.OH5(()=>{!function(a=Date.now()){let b=a-9e5,c=[];for(let[d,e]of[...V]){if(Y.has(d))continue;let f=X.get(d)??0;f>=b||(M(d),c.push(d),console.log(`[codeIndex] released idle ${d} (${G(e)} symbols, unread for ${Math.round((a-f)/6e4)} min)`))}for(let a of X.keys())V.has(a)||X.delete(a)}()}).pipe(g.cbG($),g.uxO(h.ji($)))))}let aa=new Map,ab=new Map,ac=null;function I(a,b){a.state=(0,x.US)(a.state,b)}function J(a){for(let[b,c]of(ac=a,aa))c.unsubscribe?.(),c.unsubscribe=a?.(b,()=>K(b))}function K(a){let b=aa.get(a);b&&I(b,{type:"dirty"})}function L(a,b){V.delete(a),V.set(a,b),X.set(a,Date.now())}function M(a){W.release(a),V.delete(a),X.delete(a),ab.delete(a);let b=aa.get(a);b&&(I(b,{type:"released"}),b.unsubscribe?.(),b.unsubscribe=void 0,Y.has(a)||aa.delete(a))}let ad=()=>new i.uV({message:"Workspace is changing: finish the Git operation or explicitly rebuild the index"});async function N(a,b={}){let c,d=((c=aa.get(a))?c.state.retired&&(I(c,{type:"revived"}),c.unsubscribe=ac?.(a,()=>K(a))):(c={state:x.AK},aa.set(a,c),c.unsubscribe=ac?.(a,()=>K(a))),c),e=!!b.forceRefresh;e&&(I(d,{type:"rebuildRequested"}),ab.delete(a));let f=d.state.version;for(let b=0;b<x.aM;b++){let b=Y.get(a);if(b){let c=d.state.runningGeneration,g=await b.then(a=>({index:a,error:void 0}),a=>({index:void 0,error:a})),h=(0,x.sv)(d.state,{seenGeneration:c,requiredVersion:f,failed:!!g.error,busy:!!g.index&&!!U.get(g.index)?.git.busy,explicit:e,isCachedRevision:!!g.index&&V.get(a)===g.index});if("fail"===h)throw g.error;if("busy"===h)throw ad();if("serve"===h)return L(a,g.index),g.index;continue}let c=(0,x._I)(d.state);I(d,{type:"claimed"});let g=(async()=>{let b,e=await (0,k.XC)(a,c.force),f=V.get(a),g=f&&U.get(f),h=(0,k.po)(g?.hashes??new Map,e.hashes),j=!c.force&&f&&g&&!h.count&&g.configHash===e.configHash&&g.git.busy===e.git.busy&&g.git.commonDir===e.git.commonDir&&g.scanTruncated===e.truncated,l=j?f:await F(a,e,f,c.force);for(;;){b=j?void 0:await W.prepareRelations(l,e.git.commonDir);let f=await (0,k.U0)(a);if(f.commonDir!==e.git.commonDir||!c.force&&(f.busy||f.head!==e.git.head))throw new i.uV({message:"Workspace changed during indexing; retry after the Git operation finishes"});if((0,x.zQ)(d.state,c,aa.get(a)===d))throw new i.uV({message:"Index update was superseded; retry the query"});if(!b||W.isCurrent(b))break}if(j&&g&&U.set(l,{...g,git:e.git}),b){let a=U.get(l);W.publish(l,e.git.commonDir,a.hashes,a.facts,b)}return I(d,{type:"published",ticket:c}),L(a,l),ab.delete(a),!function(a,b=0){for(let c of V.keys()){if(function(){let a=W.estimatedBytes();for(let[b,c]of V)W.has(b)||(a+=4e3*G(c));return a}()+b<=Z)break;c!==a&&(M(c),console.log(`[codeIndex] evicted ${c} — cache over estimated byte budget`))}}(a),l})().catch(b=>{throw(0,x.nE)(d.state,c,aa.get(a)===d)&&ab.set(a,b),b}).finally(()=>{Y.get(a)===g&&Y.delete(a),(0,x.Dn)(d.state,aa.get(a)===d)&&(d.unsubscribe?.(),aa.delete(a)),(0,o.d)(a,"done",0,0,void 0,!0)});Y.set(a,g);let h=await g;if((0,x.mk)(e,!!U.get(h)?.git.busy))throw ad();return h}throw new i.uV({message:"Workspace is changing; retry the index query"})}function O(a){let b=V.get(a);return b&&L(a,b),b??null}function P(a,b={}){!b.forceRefresh&&ab.has(a)||N(a,b).catch(()=>{})}function Q(a){return Y.has(a)}async function R(a,b){await (0,k.P3)(a);let c=await (0,k.ax)(a,b);if(!c)return null;let d=O(a),e=d&&U.get(d),f=aa.get(a),g=ab.get(a),h=g?.cause instanceof Error?g.cause.message:g?.message,i=Q(a);if(d&&e?.hashes.get(b)===c.hash&&(!f||(0,x.qB)(f.state))){let a=(0,w.s7)(d,b);if(a)return{...a,mtimeMs:c.mtime,crossFileRevision:d.revision,crossFilePending:i,crossFileStale:i||!!g,indexUpdateError:h}}let j=await S(a,b,c);return j?{...j,fileCount:d?.files.size??0,crossFileStale:!!d,crossFileRevision:d?.revision,crossFilePending:Q(a),indexUpdateError:h}:null}async function S(a,b,c){await (0,k.P3)(a);let d=c??await (0,k.ax)(a,b);if(!d)return null;let e=await B(b,d);if(!e)return null;let f={cwd:a,files:new Map,truncated:!1,tsconfigs:[],workspaces:new Map,projectContexts:new Map([[e.language,await (0,q.B)(e.language).fileLocalContext(a,e.path)]]),fileSet:new Set([e.path]),generatedAt:Date.now(),buildMs:0},g={...e,importBindings:[],importSpecifiers:[]},h=D(g,d.mtime,f.projectContexts,f.fileSet);return f.files.set(e.path,h),E(g,h,f.files,f.projectContexts),(0,w.s7)(f,e.path)}d()}catch(a){d(a)}})},36262:(a,b,c)=>{c.d(b,{Hs:()=>o,NZ:()=>f,Ss:()=>g,YN:()=>p,_B:()=>n,mG:()=>m,qj:()=>e});var d=c(81610);function e(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 f(a){return a.replace(/\s+/g," ").trim()}function g(a,b){return a?`${a}>${b}`:b}function h(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 i(a,b,c,d,h=[],j){return{qualifiedName:g(d,b),name:b,kind:c,startLine:a.startPosition.row+1,endLine:a.endPosition.row+1,declLine:function(a){for(let b=0;b<a.childCount;b++){let c=a.child(b);if(c&&"decorator"!==c.type&&"comment"!==c.type)return c.startPosition.row}return a.startPosition.row}(a)+1,contentHash:e(f(a.text)),children:h,params:j}}function j(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 k(a,b){return a.children.some(a=>a?.type==="static")?{...b,static:!0}:b}let l={theorem:"function",def:"function",abbrev:"function",example:"function",instance:"const",structure:"class",inductive:"type",axiom:"const",opaque:"const",constant:"const"};function m(a,b){for(let c=0;c<a.namedChildCount;c++){let d=a.namedChild(c);if(d?.type!=="export_statement")continue;let e=d.childForFieldName("declaration");if(!e||e.startPosition.row===d.startPosition.row)continue;let f=e.startPosition.row+1;for(let a of b)"unknown"!==a.kind&&a.startLine===f&&(a.startLine=d.startPosition.row+1)}let c=new Map;for(let b=0;b<a.namedChildCount;b++){let d=a.namedChild(b);if(!d||!function(a){if("attribute_item"===a.type)return!0;if(!a.type.endsWith("comment"))return!1;for(let b=0;b<a.namedChildCount;b++)if(a.namedChild(b)?.type==="inner_doc_comment_marker")return!1;return!0}(d))continue;let e=0===d.endPosition.column&&d.endPosition.row>d.startPosition.row?d.endPosition.row-1:d.endPosition.row;c.set(e+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 n(a,b){let c=a.text.split("\n"),d=c.length;if(0===d)return[];let g=new Uint8Array(d+2);for(let a of b){let b=Math.max(1,a.startLine),c=Math.min(d,a.endLine);for(let a=b;a<=c;a++)g[a]=1}let h=[],i=(a,b)=>{let d=!1;for(let e=a;e<=b;e++){let a=c[e-1];if(a&&a.trim().length>0){d=!0;break}}if(!d)return;let g=c.slice(a-1,b).join("\n");h.push({qualifiedName:`__code_${a}_${b}__`,name:"code",kind:"unknown",startLine:a,endLine:b,declLine:a,contentHash:e(f(g)),children:[]})},j=-1;for(let a=1;a<=d;a++)g[a]?j>=0&&(i(j,a-1),j=-1):j<0&&(j=a);return j>=0&&i(j,d),h}function o(a,b){let c=[],o=function(a){let b=[],c=-1,d=-1;for(let e=0;e<a.namedChildCount;e++){let f=a.namedChild(e);if(f){if("import_statement"===f.type||"export_statement"===f.type&&null!==f.childForFieldName("source")||"import_from_statement"===f.type||"future_import_statement"===f.type||"import"===f.type)b.push(f),c<0&&(c=f.startPosition.row+1),d=f.endPosition.row+1;else if(c>=0)break}}return c<0?null:{qualifiedName:"__imports__",name:"imports",kind:"unknown",startLine:c,endLine:d,declLine:c,contentHash:e(f(b.map(a=>a.text).join("\n"))),children:[]}}(a);if(o&&c.push(o),"lean"===b)c.push(...function(a){let b=[],c=[];for(let d=0;d<a.namedChildCount;d++){let g=a.namedChild(d);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 l){h=b;break}}else g.type in l&&(h=g);if(!h)continue;let i=h.childForFieldName("name")?.text??h.type,j=c.filter(a=>null!==a);b.push({qualifiedName:[...j,i].join("."),name:i,kind:l[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),declLine:h.startPosition.row+1,contentHash:e(f(g.text)),children:[]})}return b}(a));else for(let b=0;b<a.namedChildCount;b++){let l=a.namedChild(b);l&&c.push(...function a(b,c,l=!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[i(b,h(b),"function",c,[],j(b))];case"class_declaration":case"abstract_class_declaration":{let a=h(b),d=g(c,a),e=function(a,b){if(!a)return[];let c=[];for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(e){if("method_definition"===e.type)c.push(k(e,i(e,h(e),"method",b,[],j(e))));else if("public_field_definition"===e.type){let a=e.childForFieldName("value");a&&("arrow_function"===a.type||"function_expression"===a.type)&&c.push(k(e,i(e,h(e),"method",b,[],j(a))))}}}return c}(b.childForFieldName("body"),d);return[i(b,a,"class",c,e)]}case"interface_declaration":return[i(b,h(b),"interface",c)];case"type_alias_declaration":return[i(b,h(b),"type",c)];case"enum_declaration":return[i(b,h(b),"enum",c)];case"lexical_declaration":case"variable_declaration":return function(a,b){let c=[],e=a.namedChildren.filter(a=>a?.type==="variable_declarator"),f=b=>e.length>1?b:a;for(let e=0;e<a.namedChildCount;e++){let g=a.namedChild(e);if(!g||"variable_declarator"!==g.type)continue;let k=g.childForFieldName("name"),l=g.childForFieldName("value");if(!k)continue;let m=k.text,n=function a(b,c=0){if(!b||c>8)return null;if("arrow_function"===b.type||"function_expression"===b.type)return b;if(["parenthesized_expression","as_expression","satisfies_expression","non_null_expression"].includes(b.type))return a(b.namedChild(0),c+1);if("call_expression"!==b.type)return null;let e=b.childForFieldName("function");if(!e)return null;let f="member_expression"===e.type?e.childForFieldName("object"):null,g=f?.type==="identifier"?f.text:"identifier"===e.type?e.text:null;if(!g)return null;let h=b;for(;h.parent;)h=h.parent;let i=(0,d.jv)(h).find(a=>a.localName===g);if(!i)return null;let j=f?e.childForFieldName("property")?.text:i.importedName,k="*"===i.importedName||"default"===i.importedName;return(!f||k)&&("@cockpit/effect-runtime/server"===i.specifier?"handler"===j||"dynamicHandler"===j:"react"===i.specifier&&["memo","forwardRef","useCallback"].includes(j??""))?a(b.childForFieldName("arguments")?.namedChild(0)??null,c+1):null}(l),o=null!==n,p=n?j(n):void 0,q=i(f(g),m,o?"function":"const",b,[],p);if(("object_pattern"===k.type||"array_pattern"===k.type)&&(q.boundNames=(0,d.cc)(k)),c.push(q),l&&"object"===l.type&&!o){let a=b?`${b}>${m}`:m;for(let b=0;b<l.namedChildCount;b++){let d=l.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(i(d,b.text,"method",a,[],j(e)))}else if("method_definition"===d.type){let b=h(d);b&&c.push(i(d,b,"method",a,[],j(d)))}}}}}return c}(b,c);case"class_definition":{let a=h(b),d=g(c,a),k=function a(b,c){if(!b)return[];let d=[];for(let k=0;k<b.namedChildCount;k++){let l=b.namedChild(k);if(l){if("function_definition"===l.type)d.push(i(l,h(l),"method",c,[],j(l)));else if("decorated_definition"===l.type){let b=l.childForFieldName("definition");if(b?.type==="function_definition")d.push({...i(b,h(b),"method",c,[],j(b)),startLine:l.startPosition.row+1,contentHash:e(f(l.text))});else if(b?.type==="class_definition"){let j=h(b),k=g(c,j),m=a(b.childForFieldName("body"),k);d.push({...i(b,j,"class",c,m),startLine:l.startPosition.row+1,contentHash:e(f(l.text))})}}else if("class_definition"===l.type){let b=h(l),e=g(c,b),f=a(l.childForFieldName("body"),e);d.push(i(l,b,"class",c,f))}}}return d}(b.childForFieldName("body"),d);return[i(b,a,"class",c,k)]}case"decorated_definition":{let d=b.childForFieldName("definition");if(!d)return[];return a(d,c,!1).map(a=>({...a,startLine:b.startPosition.row+1,contentHash:e(f(b.text))}))}case"expression_statement":{let a=[];for(let d=0;d<b.namedChildCount;d++){let h=b.namedChild(d);if(h?.type==="assignment"){let d=function(a,b,c){let d=b.childForFieldName("left");if(!d||"identifier"!==d.type)return null;let h=d.text;return{qualifiedName:g(c,h),name:h,kind:"const",startLine:a.startPosition.row+1,endLine:a.endPosition.row+1,declLine:a.startPosition.row+1,contentHash:e(f(a.text)),children:[]}}(b,h,c);d&&a.push(d)}}return a.push(...function(a,b){let c=null;for(let b=0;b<a.namedChildCount;b++){let d=a.namedChild(b);if(d){if("call_expression"===d.type){c=d;break}if("await_expression"===d.type){for(let a=0;a<d.namedChildCount;a++){let b=d.namedChild(a);if(b?.type==="call_expression"){c=b;break}}break}}}if(!c)return[];let d=c.childForFieldName("function"),e=c.childForFieldName("arguments");if(!d||!e)return[];let f=null,g=[];for(let a=0;a<e.namedChildCount;a++){let b=e.namedChild(a);if(b){if(null===f&&("string"===b.type||"template_string"===b.type)){let a=b.text;f=a.length>=2&&/^["'`]/.test(a)?a.slice(1,-1):a}("arrow_function"===b.type||"function_expression"===b.type)&&g.push(b)}}if(0===g.length||!f)return[];let h=function a(b){if("identifier"===b.type)return b.text;if("member_expression"===b.type){let a=b.childForFieldName("property");return a?.text??""}if("call_expression"===b.type){let c=b.childForFieldName("function");return c?a(c):""}return""}(d),k=h?`${h} ${f}`:f;return g.map((a,c)=>i(a,g.length>1?`${k} #${c+1}`:k,"function",b,[],j(a)))}(b,c)),a}default:return[]}}(l,void 0,!1))}return m(a,c),c.push(...n(a,c)),p(c),c}function p(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)}},38260:(a,b,c)=>{c.d(b,{AK:()=>e,Dn:()=>j,US:()=>f,_I:()=>g,aM:()=>d,mk:()=>l,nE:()=>i,qB:()=>k,sv:()=>m,zQ:()=>h});let d=3,e={version:0,publishedVersion:-1,generation:0,force:!1,retired:!1};function f(a,b){switch(b.type){case"dirty":return{...a,version:a.version+1};case"rebuildRequested":return{...a,generation:a.generation+1,version:a.version+1,force:!0};case"claimed":return{...a,force:!1,runningGeneration:a.generation};case"published":return{...a,publishedVersion:b.ticket.version};case"released":return{...a,generation:a.generation+1,retired:!0};case"revived":return{...a,retired:!1}}}function g(a){return{generation:a.generation,version:a.version,force:a.force}}function h(a,b,c){return!c||a.generation!==b.generation}function i(a,b,c){return c&&a.generation===b.generation}function j(a,b){return a.retired&&!a.force&&b}function k(a){return a.version===a.publishedVersion}function l(a,b){return!a&&b}function m(a,b){var c,d;return b.seenGeneration!==a.generation?"retry":b.failed?"fail":(c=b.explicit,d=b.busy,!c&&d)?"busy":a.publishedVersion>=b.requiredVersion&&b.isCachedRevision?"serve":"retry"}},45356:(a,b,c)=>{c.d(b,{l:()=>j});var d=c(77598),e=c(770),f=c(77259);let g=["resolvedImports","importedFiles","importedBy","intraCalls","outgoingCalls","incomingCalls","externalCalls","methodCalls"];function h(a,b,c){return JSON.stringify([2,a,b,c])}function i(a){return JSON.stringify(g.map(b=>{let c=a[b];return c instanceof Map||c instanceof Set?[...c]:c}))}class j{findParse(a,b,c,d){return this.repositories.get(a)?.parses.get(h(b,c,d))?.value}async prepareRelations(a,b){let c={generation:this.generation,files:new Map};for(let[e,g]of a.files)await (0,f.Ki)(()=>{let a=i(g),f=JSON.stringify([e,(0,d.createHash)("sha256").update(a).digest("hex")]),h=this.repositories.get(b)?.relations.get(f)?.find(b=>i(b.value)===a);c.files.set(e,{key:f,text:a,match:h})});return c}isCurrent(a){return a.generation===this.generation}publish(a,b,c,d,f){if(!this.isCurrent(f))throw new e.uV({message:"Index relations were prepared against an older shared pool"});let g=this.repositories.get(b);g||(g={roots:0,parses:new Map,relations:new Map},this.repositories.set(b,g)),g.roots++,this.generation++;let i={repository:b,parses:[],relations:[],bytes:1024+512*c.size};for(let[b,e]of a.files){let a=d.get(b),j=h(b,e.language,c.get(b)),k=g.parses.get(j);!k&&(k={key:j,value:{facts:a,lookups:{symbolsByName:e.symbolsByName,symbolsByQname:e.symbolsByQname,bindingsByLocalName:e.bindingsByLocalName,reexportsByLocalName:e.reexportsByLocalName}},references:0,bytes:Math.max(768+1024*a.flatSymbols.length+96*a.rawCalls.length+192*a.importBindings.length+64*a.importSpecifiers.length+128*a.literals.length+48*a.comments.length,4e3*a.flatSymbols.length/1.25)},g.parses.set(j,k),this.bytes+=k.bytes);d.set(b,k.value.facts);let l=k.value.facts;e.symbolsTree=l.symbolsTree,e.flatSymbols=l.flatSymbols,e.literals=l.literals,e.comments=l.comments,e.sourceHash=l.sourceHash,e.importBindings=l.importBindings,Object.assign(e,k.value.lookups),k.references++,i.parses.push(k);let{key:m,text:n,match:o}=f.files.get(b),p=g.relations.get(m)??[],q=o&&p.includes(o)?o:void 0;q||(q={key:m,value:{resolvedImports:e.resolvedImports,importedFiles:e.importedFiles,importedBy:e.importedBy,intraCalls:e.intraCalls,outgoingCalls:e.outgoingCalls,incomingCalls:e.incomingCalls,externalCalls:e.externalCalls,methodCalls:e.methodCalls},references:0,bytes:768+2*Buffer.byteLength(n)},p.push(q),g.relations.set(m,p),this.bytes+=q.bytes),Object.assign(e,q.value),q.references++,i.relations.push(q)}this.release(a.cwd),this.leases.set(a.cwd,i),this.bytes+=i.bytes}release(a){let b=this.leases.get(a);if(!b)return;this.leases.delete(a),this.bytes-=b.bytes;let c=this.repositories.get(b.repository);for(let a of(c.roots--,b.parses))0==--a.references&&(c.parses.delete(a.key),this.bytes-=a.bytes);for(let a of b.relations)if(0==--a.references){let b=c.relations.get(a.key);b.splice(b.indexOf(a),1),b.length||c.relations.delete(a.key),this.bytes-=a.bytes}c.roots||this.repositories.delete(b.repository)}has(a){return this.leases.has(a)}estimatedBytes(){return Math.ceil(1.25*this.bytes)}stats(){let a=0,b=0;for(let c of this.repositories.values())for(let d of(a+=c.parses.size,c.relations.values()))b+=d.length;return{roots:this.leases.size,repositories:this.repositories.size,parses:a,relations:b,estimatedBytes:this.estimatedBytes()}}constructor(){this.repositories=new Map,this.leases=new Map,this.bytes=0,this.generation=0}}},52166:(a,b,c)=>{c.d(b,{s:()=>d});function d(a,b,c){let d=new Map;if(!b)return d;let e=c.filter(a=>"function"===a.kind||"method"===a.kind);for(let a of e)d.set(a.qualifiedName,1);if(!e.length)return d;let f=new Map,g=a=>{let b=f.get(a);if(void 0===b){let c=null;for(let b of e)b.startLine<=a&&a<=b.endLine&&(!c||b.endLine-b.startLine<c.endLine-c.startLine)&&(c=b);b=c?.qualifiedName??null,f.set(a,b)}return b},h=[a];for(;h.length;){let a=h.pop(),c=b.nodes.has(a.type);if(!c&&b.binary&&a.type===b.binary.type){let d=a.childForFieldName("operator")?.text??a.child(1)?.text;c=!!d&&b.binary.operators.has(d)}if(c){let b=g(a.startPosition.row+1);b&&d.set(b,(d.get(b)??1)+1)}for(let b=a.childCount-1;b>=0;b--){let c=a.child(b);c&&h.push(c)}}return d}},53628:(a,b,c)=>{c.d(b,{j:()=>e});let d=/^(statement_block|block|compound_statement)$/;function e(a,b){let c=b.filter(a=>{let b;return"function"===(b=a.kind)||"method"===b}),e=new Map;if(!c.length)return e;let f=new Set(c.map(a=>a.declLine-1)),g=new Map,h=[a];for(;h.length;){let a=h.pop();if(f.has(a.startPosition.row)){let b=a.childForFieldName("body");if(b){let c=d.test(b.type)?b.namedChildren.find(a=>a&&!a.type.endsWith("comment"))??null:b;if(c){let d=g.get(b.endPosition.row)??[];d.push({start:a.startPosition,first:c.startPosition.row+1}),g.set(b.endPosition.row,d)}}}for(let b=a.namedChildCount-1;b>=0;b--){let c=a.namedChild(b);c&&h.push(c)}}for(let a of c){let b=(g.get(a.endLine-1)??[]).filter(b=>b.start.row===a.declLine-1);if(!b.length)continue;let c=b.reduce((a,b)=>b.start.column>a.start.column?b:a);e.set(a.qualifiedName,c.first)}return e}},58994:(a,b,c)=>{function d(a){let b=[],c=a.walk();try{for(;;){if(c.nodeType.includes("comment"))b.push([c.startIndex,c.endIndex]);else if(c.gotoFirstChild())continue;for(;!c.gotoNextSibling();)if(!c.gotoParent())return b}}finally{c.delete()}}function e(a,b){if(!b.length)return a;let c="",d=0;for(let[e,f]of b)e<d||f>a.length||(c+=a.slice(d,e)+a.slice(e,f).replace(/[^\n]/g," "),d=f);return c+a.slice(d)}c.d(b,{Q:()=>d,f:()=>e})},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.NV)(),(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)}})},75775:(a,b,c)=>{c.d(b,{P3:()=>v,SD:()=>u,U0:()=>y,XC:()=>C,ax:()=>A,dE:()=>q,jR:()=>w,po:()=>D,xq:()=>E,yj:()=>o});var d=c(31421),e=c(77598),f=c(73024),g=c(76760),h=c.n(g),i=c(57975),j=c(89705),k=c(69181),l=c(770),m=c(28677);let n=(0,i.promisify)(d.execFile),o=1e5,p=/\.min\.[cm]?[jt]sx?$/i;function q(a,b){return!function(a,b){if(p.test(a))return!0;if(b.length<4096)return!1;let c=1;for(let a=b.indexOf("\n");-1!==a;a=b.indexOf("\n",a+1))c++;return b.length/c>250}(a,b.source)?b.sizeBytes>524288?{filePath:a,reason:"source-too-large",sizeBytes:b.sizeBytes,limitBytes:524288}:null:{filePath:a,reason:"minified",sizeBytes:b.sizeBytes}}async function r(a){let b=await j.pR5(j.gPK(a));if(k.OC(b))throw b.left;return b.right}async function s(a,b){return r(j.$mh({try:()=>n("git",b,{cwd:a,maxBuffer:0x3200000}).then(a=>a.stdout),catch:a=>new l.uV({message:"Code index Git command failed",cause:a})}))}function t(a){return!a.split("/").some(a=>"node_modules"===a||".git"===a)}function u(a){return t(a)&&(0,m.cn)().includes(h().posix.extname(a).toLowerCase())}async function v(a){return r(j.$mh({try:async()=>{let[b,...c]=(await n("git",["rev-parse","--is-inside-work-tree","--absolute-git-dir"],{cwd:a})).stdout.trimEnd().split("\n");if("true"!==b)throw Error("Not a Git working tree");return c.join("\n")},catch:a=>/not a git repository/i.test(a.stderr??"")||"Not a Git working tree"===a.message?new l.yI({field:"cwd",reason:"Non-Git projects are not supported"}):new l.uV({message:"Unable to inspect Git project",cause:a})}))}async function w(a){return await v(a),[...new Set((await s(a,["ls-files","--cached","--others","--exclude-standard","-z"])).split("\0").filter(a=>a&&t(a)))].sort()}async function x(a){return r(j.$mh({try:a,catch:a=>a}).pipe(j.h9N(a=>"ENOENT"===a.code?j.PyW(null):j.fJG(new l.uU({path:"code-index scan",op:"read",cause:a})))))}async function y(a){let b=await v(a),c=(await s(a,["rev-parse","--path-format=absolute","--git-common-dir"])).trimEnd(),d=await r(j.$mh({try:()=>f.promises.realpath(c),catch:a=>new l.uU({path:c,op:"read",cause:a})})),e=await Promise.all(["index.lock","rebase-merge","rebase-apply","MERGE_HEAD","CHERRY_PICK_HEAD","REVERT_HEAD"].map(a=>x(()=>f.promises.stat(h().join(b,a))))),g=await r(j.$mh({try:()=>n("git",["rev-parse","--verify","--quiet","HEAD"],{cwd:a}).then(a=>a.stdout.trim()),catch:a=>a}).pipe(j.h9N(a=>1===a.code?j.PyW("unborn"):j.fJG(new l.uV({message:"Unable to read Git HEAD",cause:a}))))),i=await s(a,["ls-files","--unmerged","-z"]);return{head:g,busy:e.some(Boolean)||i.length>0,commonDir:d}}let z=a=>(0,e.createHash)("sha256").update(a).digest("hex");async function A(a,b){let c=h().join(a,b);return x(async()=>{let[a,b]=await Promise.all([f.promises.readFile(c),f.promises.stat(c)]);return{source:a.toString("utf8"),hash:z(a),mtime:b.mtimeMs,sizeBytes:a.length}})}function B(a){return/(^|\/)(tsconfig[^/]*\.json|package\.json|pnpm-workspace\.yaml|go\.mod|\.gitignore)$/.test(a)}async function C(a,b=!1){let c=await y(a);if(c.busy&&!b)throw new l.uV({message:"Workspace is changing: finish the Git operation or explicitly rebuild the index"});let d=await w(a),e=d.filter(u),f=e.slice(0,o),g=new Map,h=new Map,i=0,j=!1,k=(await Promise.allSettled(Array.from({length:Math.min(8,f.length)},async()=>{for(;!j&&i<f.length;){let b=f[i++],c=await A(a,b).catch(a=>{throw j=!0,a});c&&(g.set(b,c),h.set(b,c.hash))}}))).find(a=>"rejected"===a.status);if(k?.status==="rejected")throw k.reason;for(let a of e.slice(o))h.set(a,"not-scanned");let m=new Map,n=new Map;for(let b of[...new Set([...d.filter(B),"tsconfig.json","package.json","pnpm-workspace.yaml","go.mod"])].sort())await A(a,b).then(a=>{a&&(m.set(b,a.hash),n.set(b,a.source))});let p=z(JSON.stringify([...m])),q={paths:[...new Set([...d,...n.keys()])],readFile:async a=>{let b=g.get(a)?.source??n.get(a);if(void 0!==b)return b;throw new l.uU({path:a,op:"read",cause:Object.assign(Error(`File not captured: ${a}`),{code:"ENOENT"})})}};return{sources:g,hashes:h,configHash:p,truncated:e.length>o,git:c,contextFiles:q}}function D(a,b){let c=[],d=[],e=[];for(let[e,f]of b)a.has(e)?a.get(e)!==f&&d.push(e):c.push(e);for(let c of a.keys())b.has(c)||e.push(c);let f=c.length+d.length+e.length,g=Math.max(a.size,b.size);return{added:c,changed:d,deleted:e,count:f,rebuild:f>=500||f>=20&&f/g>=.2}}function E(a,b){return a instanceof l.uV||a instanceof l.uU||a instanceof l.yI?a:new l.uV({message:b,cause:a})}},77259:(a,b,c)=>{let d;c.d(b,{Ki:()=>h,VE:()=>i});var e=c(58500),f=c(89705);let g=performance.now();async function h(a){for(;d||performance.now()-g>=8;)await (d??=f.pR5(f.ivC(()=>(0,e.setImmediate)())).then(()=>{g=performance.now(),d=void 0}));return a()}async function i(a,b){let c=[];for(let d=0;d<a.length;d+=2048)c.push(await h(()=>a.slice(d,d+2048).sort(b)));for(;c.length>1;){let a=[];for(let d=0;d<c.length;d+=2){let[e,f]=[c[d],c[d+1]];a.push(f?await h(()=>(function(a,b,c){let d=Array(a.length+b.length),e=0,f=0,g=0;for(;e<a.length&&f<b.length;)d[g++]=0>=c(a[e],b[f])?a[e++]:b[f++];for(;e<a.length;)d[g++]=a[e++];for(;f<b.length;)d[g++]=b[f++];return d})(e,f,b)):e)}c=a}return c[0]??[]}},81610:(a,b,c)=>{c.d(b,{JM:()=>C,Lv:()=>e,cc:()=>G,il:()=>H,jv:()=>B});var d=c(30733);function e(a){var b;let c,e,f,g,h=[],j=new Map,k=new Map,l=(b=a,c=new Set,e=new Set,f=a=>{let b=v(a);if(b)switch(b.type){case"identifier":case"shorthand_property_identifier_pattern":c.add(b.text);return;case"member_expression":case"subscript_expression":{let a=v(b.childForFieldName("object"));if(a?.type!=="identifier"&&a?.type!=="this")return;let c="member_expression"===b.type?b.childForFieldName("property")?.text:s(b.childForFieldName("index"));e.add(void 0===c?(0,d.W)(a.text):(0,d.W)(a.text,c));return}case"array_pattern":for(let a of b.namedChildren)f(a);return;case"object_pattern":for(let a of b.namedChildren)a&&("pair_pattern"===a.type?f(a.childForFieldName("value")):"object_assignment_pattern"===a.type?f(a.childForFieldName("left")):f(a));return;case"assignment_pattern":f(b.childForFieldName("left"));return;case"rest_pattern":f(b.namedChild(0));return}},(g=a=>{for(let b of("assignment_expression"===a.type||"augmented_assignment_expression"===a.type?f(a.childForFieldName("left")):"update_expression"===a.type?f(a.childForFieldName("argument")):"for_in_statement"!==a.type||a.childForFieldName("kind")||f(a.childForFieldName("left")),a.namedChildren))b&&g(b)})(b),{names:c,members:e}),m={names:l.names,member:(a,b)=>l.members.has((0,d.W)(a,b))||l.members.has((0,d.W)(a))};return!function a(b){if("call_expression"===b.type||"call"===b.type){let a=b.childForFieldName("function"),c=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"===b.type?a(b.childForFieldName("function")):null}(a);if(c){let d=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),e=d?void 0:function(a){if(!a||"member_expression"!==a.type&&"attribute"!==a.type)return;let b=a.childForFieldName("object");return b?.type==="this"?"this":b?.type==="super"?"super":"expression"}(a),f=a?.type==="identifier",g="this"===e?function(a){let b=a=>a.children.some(a=>a?.type==="static");for(let[c,d]of o(a))if("arrow_function"!==d.type){if(x.has(d.type)){if("outside"===p(d,c))continue;let a=d.parent;if(a?.type==="pair"&&i(a.childForFieldName("value"),d)&&a.parent?.type==="object")return{owner:z(a.parent),isStatic:!1};return}if("method_definition"===d.type){if("outside"===p(d,c))continue;let a=d.parent;return a?.type==="object"?{owner:z(a),isStatic:!1}:{owner:A(a),isStatic:b(d)}}if("public_field_definition"===d.type||"field_definition"===d.type){if(i(d.childForFieldName("value"),c))return{owner:A(d.parent),isStatic:b(d)};continue}if("class_static_block"===d.type)return{owner:A(d.parent),isStatic:!0}}}(b):void 0,l=g?.owner,n=d?function(a){let b=0;for(let c=a;c&&("member_expression"===c.type||"attribute"===c.type);c=c.childForFieldName("object"))b++;return b}(a):void 0,s=f?m.names.has(c):d?1===n&&m.member(d,c)||m.names.has(d):"this"===e&&(m.member("this",c)||!!l&&m.member(l,c));h.push({calleeName:c,line:b.startPosition.row+1,...d?{receiverName:d,receiverDepth:n}:{},...e?{receiverKind:e}:{},...f&&q(b,c,j)?{shadowed:!0}:{},...d&&q(b,d,j)?{receiverShadowed:!0}:{},...l?{thisOwner:l}:{},...g?.isStatic?{thisStatic:!0}:{},...r(b,k)?{dynamicScope:!0}:{},...s?{written:!0}:{}})}}else if("jsx_opening_element"===b.type||"jsx_self_closing_element"===b.type){let a=b.childForFieldName("name"),c=function(a){if(a?.type!=="member_expression"&&a?.type!=="jsx_member_expression")return null;let b=a.childForFieldName("property")??a.namedChild(a.namedChildCount-1),c=0,d=a;for(;d&&("member_expression"===d.type||"jsx_member_expression"===d.type);)c++,d=d.childForFieldName("object")??d.namedChild(0);return b&&d?.type==="identifier"?{root:d.text,leaf:b.text,depth:c}:null}(a),d=c?c.leaf: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}(a);d&&h.push({calleeName:d,line:b.startPosition.row+1,...c?{receiverName:c.root,receiverDepth:c.depth,...q(b,c.root,j)?{receiverShadowed:!0}:{}}:q(b,d,j)?{shadowed:!0}:{},...r(b,k)?{dynamicScope:!0}:{},...(c?m.names.has(c.root)||1===c.depth&&m.member(c.root,d):m.names.has(d))?{written:!0}:{}})}for(let c=0;c<b.childCount;c++){let d=b.child(c);d&&a(d)}}(a),h}let f=new Set(["function_declaration","function_expression","function","arrow_function","method_definition","generator_function_declaration","generator_function"]),g=new Set([...f,"class_static_block"]),h={lexical_declaration:"binds",variable_declaration:"binds",using_declaration:"binds",function_declaration:"binds",generator_function_declaration:"binds",function_signature:"binds",class_declaration:"binds",abstract_class_declaration:"binds",enum_declaration:"binds",internal_module:"binds",module:"binds",import_alias:"binds",ambient_declaration:"binds",interface_declaration:"type-only",type_alias_declaration:"type-only"},i=(a,b)=>!!a&&a.startIndex===b.startIndex&&a.endIndex===b.endIndex&&a.type===b.type;function j(a){return a.namedChildren.flatMap(a=>{let b=a?.type==="variable_declarator"?a.childForFieldName("name"):null;return b?G(b):[]})}function k(a){let b=a.childForFieldName("kind")?.text,c=a.childForFieldName("left");return b&&c?{kind:b,names:G(c)}:null}function l(a){if(!a)return[];let b=[],c=a=>{if("variable_declaration"===a.type&&b.push(...j(a)),"for_in_statement"===a.type){let c=k(a);c?.kind==="var"&&b.push(...c.names)}for(let b of a.namedChildren)b&&!g.has(b.type)&&c(b)};return c(a),b}function m(a){return a.namedChildren.flatMap(a=>a?function a(b){if("binds"!==h[b.type])return[];switch(b.type){case"lexical_declaration":case"variable_declaration":case"using_declaration":return j(b);case"import_alias":{let a=b.namedChild(0);return a?.type==="identifier"?[a.text]:[]}case"ambient_declaration":{let c=b.namedChild(0);return c?a(c):[]}default:{let a=b.childForFieldName("name");return a&&("identifier"===a.type||"type_identifier"===a.type)?[a.text]:[]}}}(function(a){let b=a;for(;;)if("export_statement"===b.type){let a=b.childForFieldName("declaration")??b.namedChildren.find(a=>!!a&&(a.type in h||"expression_statement"===a.type))??null;if(!a)return b;b=a}else{if("expression_statement"!==b.type||b.namedChild(0)?.type!=="internal_module")return b;b=b.namedChild(0)}}(a)):[])}function n(a){if("decorator"!==a.type)return null;let b=a.parent;if(b?.type!=="required_parameter"&&b?.type!=="optional_parameter")return null;let c=b.parent?.parent;return c&&f.has(c.type)?c:null}function*o(a){let b=a,c=a.parent;for(;c&&"program"!==c.type;){let a=n(c);if(a){b=a,c=a.parent;continue}yield[b,c],b=c,c=c.parent}}function p(a,b){return i(a.childForFieldName("body"),b)?"body":i(a.childForFieldName("parameters")??a.childForFieldName("parameter"),b)?"params":"outside"}function q(a,b,c){for(let[e,g]of o(a)){let a=i(g.childForFieldName("body"),e)?"body":i(g.childForFieldName("parameters")??g.childForFieldName("parameter"),e)?"params":"class_heritage"===e.type?"heritage":"other",h=(0,d.W)(g.startIndex,g.endIndex,g.type,a),n=c.get(h);if(n||(n=new Set(function(a,b){if(f.has(a.type)){var c;let d="body"===b||"params"===b?b:"outside";if("outside"===d)return[];let e="function_expression"===a.type||"function"===a.type||"generator_function"===a.type?a.childForFieldName("name"):null;return[...(c=a.childForFieldName("parameters")??a.childForFieldName("parameter"))?"identifier"===c.type?[c.text]:c.namedChildren.flatMap(a=>{if(!a)return[];let b="required_parameter"===a.type||"optional_parameter"===a.type?a.childForFieldName("pattern"):a;return b?G(b):[]}):[],...e?[e.text]:[],..."arrow_function"===a.type?[]:["arguments"],..."body"===d?l(a.childForFieldName("body")):[]]}switch(a.type){case"class_static_block":return l(a.childForFieldName("body")??a);case"statement_block":return m(a);case"switch_body":return a.namedChildren.flatMap(a=>a&&("switch_case"===a.type||"switch_default"===a.type)?m(a):[]);case"for_statement":{let b=a.childForFieldName("initializer");return b&&("lexical_declaration"===b.type||"variable_declaration"===b.type)?j(b):[]}case"for_in_statement":return k(a)?.names??[];case"enum_body":return a.namedChildren.flatMap(a=>{let b=a?.type==="enum_assignment"?a.namedChild(0):a;if(!b)return[];if("property_identifier"===b.type||"identifier"===b.type)return[b.text];let c=s(b);return void 0!==c?[c]:[]});case"catch_clause":{let b=a.childForFieldName("parameter");return b?G(b):[]}case"class":case"class_declaration":case"abstract_class_declaration":{let c=a.childForFieldName("name");return c&&("body"===b||"heritage"===b)?[c.text]:[]}default:return[]}}(g,a)),c.set(h,n)),n.has(b))return!0}return!1}function r(a,b){for(let[c,e]of o(a)){if("with_statement"===e.type)return!0;if(!g.has(e.type))continue;let a=f.has(e.type)?p(e,c):"body";if("outside"===a)continue;let h="params"===a?"params":"all",i=(0,d.W)(e.startIndex,e.endIndex,e.type,h),j=b.get(i);if(void 0===j&&(j=function(a,b){let c=a=>!!("call_expression"===a.type&&function(a){let b=a;for(;b?.type==="parenthesized_expression"&&1===b.namedChildCount;)b=b.namedChild(0);return b?.type==="identifier"&&"eval"===b.text}(a.childForFieldName("function")))||a.namedChildren.some(a=>{if(!a||"class_static_block"===a.type||n(a))return!1;if(f.has(a.type)){let b;return a.namedChildren.some(b=>!!b&&"outside"===p(a,b)&&c(b))||(b=a.childForFieldName("parameters"),(b?.namedChildren??[]).flatMap(a=>(a?.namedChildren??[]).filter(a=>a?.type==="decorator"))).some(c)}return c(a)});return f.has(a.type)?a.namedChildren.some(d=>{if(!d)return!1;let e=p(a,d);return"outside"!==e&&("all"===b||"params"===e)&&c(d)}):a.namedChildren.some(a=>!!a&&c(a))}(e,h),b.set(i,j)),j)return!0}return!1}function s(a){if(!a)return;if("computed_property_name"===a.type)return s(a.namedChild(0));if("string"!==a.type&&"template_string"!==a.type)return;let b="template_string"===a.type,c="";for(let d of a.namedChildren){if(!d)continue;if("string_fragment"===d.type){c+=d.text;continue}if("escape_sequence"!==d.type)return;let a=function(a,b){let c=a.slice(1),d=c[0];if(void 0!==d){if("\n"===c||"\r"===c||"\r\n"===c||"\u2028"===c||"\u2029"===c)return"";if("u"===d){let a=/^u(?:\{([0-9a-fA-F]+)\}|([0-9a-fA-F]{4}))$/.exec(c);if(!a)return;let b=parseInt(a[1]??a[2],16);return b<=1114111?String.fromCodePoint(b):void 0}if("x"===d){let a=/^x([0-9a-fA-F]{2})$/.exec(c);return a?String.fromCharCode(parseInt(a[1],16)):void 0}if(d>="0"&&d<="9"){if("0"===c)return"\0";if(b)return;if("8"===d||"9"===d)return c;let a=/^([0-3][0-7]{0,2}|[4-7][0-7]?)([\s\S]*)$/.exec(c);return a?String.fromCharCode(parseInt(a[1],8))+a[2]:void 0}if(1===c.length)return t[d]??d}}(d.text,b);if(void 0===a)return;c+=a}return c}let t={n:"\n",t:" ",r:"\r",b:"\b",f:"\f",v:"\v"},u=new Set(["parenthesized_expression","as_expression","satisfies_expression","non_null_expression","type_assertion"]);function v(a){let b=a;for(;b&&u.has(b.type);)b="type_assertion"===b.type?b.namedChild(b.namedChildCount-1):b.namedChild(0);return b}let w=new Set(["class_declaration","class","abstract_class_declaration"]),x=new Set(["function_declaration","function_expression","function","generator_function_declaration","generator_function"]);function y(a){let b=a.parent;return b?.type==="program"||b?.type==="export_statement"&&b.parent?.type==="program"}function z(a){let b=a.parent;if(b?.type!=="variable_declarator")return;let c=b.parent,d=b.childForFieldName("name");return c&&d?.type==="identifier"&&y(c)?d.text:void 0}function A(a){var b;let c=a?.type==="class_body"?a.parent:null;return c&&w.has(c.type)&&"class"!==(b=c).type&&y(b)?b.childForFieldName("name")?.text:void 0}function B(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){if(D(a))return;let d=I(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||D(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||D(e))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):E(d,b)}else"import_from_statement"===d.type&&F(d,b)}return b}function C(a){let b=B(a),c=new Set(b.map(a=>a.localName)),d=[];for(let b=0;b<a.namedChildCount;b++){let c=a.namedChild(b);c&&"import_statement"!==c.type&&"import_from_statement"!==c.type&&d.push(c)}for(;d.length;){let a=d.pop();if("import_statement"===a.type||"import_from_statement"===a.type){let d=[];for(let e of("import_statement"===a.type?E(a,d):F(a,d),d))c.has(e.localName)||(c.add(e.localName),b.push(e));continue}for(let b=0;b<a.namedChildCount;b++){let c=a.namedChild(b);c&&d.push(c)}}return b}function D(a){return a.children.some(a=>a?.type==="type")}function E(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})}}}}function F(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:"*"})}function G(a){switch(a.type){case"identifier":case"shorthand_property_identifier_pattern":return[a.text];case"pair_pattern":{let b=a.childForFieldName("value");return b?G(b):[]}case"object_assignment_pattern":case"assignment_pattern":{let b=a.childForFieldName("left");return b?G(b):[]}case"object_pattern":case"array_pattern":case"rest_pattern":return a.namedChildren.flatMap(a=>a?G(a):[]);default:return[]}}function H(a){let b=[];for(let c=0;c<a.namedChildCount;c++){let d=a.namedChild(c);if(!d||"export_statement"!==d.type||D(d))continue;let e=d.childForFieldName("source"),f=e?I(e.text):"",g=(a,c=a)=>{b.push({localName:a,importedName:c,specifier:f,isReexport:!0})},h=null;for(let a=0;a<d.namedChildCount;a++){let b=d.namedChild(a);if(b?.type==="export_clause"){h=b;break}}if(!h){let a=d.namedChildren.find(a=>"namespace_export"===a.type);if(a){let b=a.namedChild(0);b&&g(b.text,"*")}else if(e&&d.children.some(a=>"*"===a.type))g("*");else{let a=d.childForFieldName("declaration");if(a?.type==="interface_declaration"||a?.type==="type_alias_declaration")continue;let b=d.children.some(a=>"default"===a.type);if(a?.type==="lexical_declaration"||a?.type==="variable_declaration")for(let b of a.namedChildren){let a=b?.childForFieldName("name");if(a)for(let b of G(a))g(b)}else{let c=a?.childForFieldName("name")??d.childForFieldName("value");(c?.type==="identifier"||c?.type==="type_identifier")&&g(b?"default":c.text,c.text)}}continue}for(let a=0;a<h.namedChildCount;a++){let b=h.namedChild(a);if(!b||"export_specifier"!==b.type||D(b))continue;let c=b.childForFieldName("name"),d=b.childForFieldName("alias");if(!c)continue;let e=c.text;g(d?.text??e,e)}}return b}function I(a){return a.length>=2&&('"'===a[0]||"'"===a[0])&&a[a.length-1]===a[0]?a.slice(1,-1):a}},82038:(a,b,c)=>{c.d(b,{B:()=>d.Bu,i:()=>d.iv});var d=c(28677),e=c(76760),f=c.n(e),g=c(36262),h=c(81610);function i(a,b){return/^\.+$/.test(a)?a+b:`${a}.${b}`}var j=c(25344);function k(a,b){let c=a.symbolsByQname.get(b);return c&&!c.qualifiedName.includes(">")?c:null}function l(){return null}function m(){return new Map}async function n(){}var o=c(31181);function p(a){return"function"===a||"class"===a||"method"===a}function q(a,b,c,d,e){let f=JSON.stringify([a.path,b]);if(c>5||d.has(f))return null;let g=new Set(d).add(f),h=(b,d)=>{let f=a.resolvedImports.get(b.specifier),h=f&&e.get(f);return h?q(h,d,c+1,g,e):null},i=a.reexportsByLocalName.get(b);if(i&&"*"!==b){if(i.specifier)return h(i,i.importedName);let b=a.symbolsByName.get(i.importedName),c=null;for(let a of b??[])!a.qualifiedName.includes(">")&&(!c||p(a.kind)&&!p(c.kind)||a.kind===c.kind&&a.endLine-a.startLine>c.endLine-c.startLine)&&(c=a);if(c)return c;let d=a.bindingsByLocalName.get(i.importedName);return d?h(d,d.importedName):null}if("default"===b)return null;let j=null;for(let c of a.importBindings){if(!c.isReexport||"*"!==c.localName||"*"!==c.importedName)continue;let a=h(c,b);if("ambiguous"===a)return a;if(a){if(j&&(j.filePath!==a.filePath||j.qualifiedName!==a.qualifiedName))return"ambiguous";j=a}}return j}let r={nodes:new Set(["if_statement","for_statement","for_in_statement","while_statement","do_statement","switch_case","catch_clause","ternary_expression"]),binary:{type:"binary_expression",operators:new Set(["&&","||","??"])}};function s(a,b){return{grammarId:a,extensions:b,decisions:r,fileLocalContext:n,exportedDefinition(a,b,c){let d=q(a,b,0,new Set,c);return d&&"ambiguous"!==d?d:null},submoduleSpecifier:l,moduleStringConstants:o.gT,extractSymbols:(a,b)=>(0,g.Hs)(a),extractImports:a=>({specs:function(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}(a),bindings:[...(0,h.jv)(a),...(0,h.il)(a)]}),extractCallSites:(a,b)=>(0,h.Lv)(a),async buildProjectContext(a,b,c){let d=new Set(b),e=await (0,j.ZT)(a,c),f=await (0,j.zC)(a,d,c),g=[...f.keys()].sort((a,b)=>b.length-a.length);return{cwd:a,tsconfigs:e,workspaces:f,sortedWsNames:g,owningScopesCache:new Map}},resolveSpecifier(a,b,c,d){let e=c.owningScopesCache.get(b);if(e||(e=c.tsconfigs.filter(a=>(0,j._0)(b,a.scope)),c.owningScopesCache.set(b,e)),a.startsWith("./")||a.startsWith("../"))return(0,j.KP)(f().resolve(c.cwd,f().dirname(b),a),c.cwd,d);if(a.startsWith("/"))return(0,j.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),k=(0,j.KP)(f().resolve(c.cwd,h,i),c.cwd,d);if(k)return k}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,j.IS)(f().posix.join(e.dir,g),d)??(0,j.IS)(f().posix.join(e.dir,"src",g),d)}return null},resolveCall:(a,b,c,d,e)=>(function a(b,c,d,e,f){if(b.dynamicScope||b.written){let{dynamicScope:g,written:h,...i}=b;return a(i,c,d,e,f).map(a=>"symbol"===a.kind?{...a,byName:!0}:a)}let h=(d.symbolsByName.get(b.calleeName)??[]).filter(a=>p(a.kind)),i=(a,b=!1)=>({kind:"symbol",addr:{filePath:a.filePath,qualifiedName:a.qualifiedName},...b?{byName:!0}:{}}),j=()=>h.filter(a=>"method"===a.kind);if(b.receiverName){let a=b.receiverShadowed?void 0:d.bindingsByLocalName.get(b.receiverName),c=(d.symbolsByName.get(b.receiverName)??[]).some(a=>!a.qualifiedName.includes(">"));if(!b.receiverShadowed&&!a&&!c)return[];if(!a||(b.receiverDepth??1)!==1)return j().map(a=>i(a,!0));let f=d.resolvedImports.get(a.specifier);if(!f)return[];let h=e.get(f);if(!h)return[];let k=function a(b,c,d,e,f,h){if(e>5)return null;if("*"===c){let a=q(b,d,e,f,h);return a&&"ambiguous"!==a&&p(a.kind)?a:null}let i=JSON.stringify([b.path,c,d]);if(f.has(i))return null;let j=new Set(f).add(i),k=b.reexportsByLocalName.get(c);if(k?.specifier&&"*"===k.importedName){let c=b.resolvedImports.get(k.specifier),f=c&&h.get(c);return f?a(f,"*",d,e+1,j,h):null}let l=q(b,c,e,j,h);if(!l||"ambiguous"===l)return null;let m=h.get(l.filePath),n=m?.symbolsByQname.get((0,g.Ss)(l.qualifiedName,d));return n&&p(n.kind)?n:null}(h,a.importedName,b.calleeName,0,new Set,e);if(k){let a=k.qualifiedName.slice(0,Math.max(0,k.qualifiedName.lastIndexOf(">"))),b=a?e.get(k.filePath)?.symbolsByQname.get(a):void 0;return[i(k,b?.kind==="class"&&!k.static)]}return[{kind:"method-unresolved",receiverName:b.receiverName,methodName:b.calleeName}]}if("this"===b.receiverKind){let a=b.thisOwner?h.find(a=>a.qualifiedName===`${b.thisOwner}>${b.calleeName}`&&"method"===a.kind&&!!a.static==!!b.thisStatic):void 0;return a?[i(a)]:j().map(a=>i(a,!0))}if(b.receiverKind){let a=c.qualifiedName.split(">")[0];return j().filter(c=>!("super"===b.receiverKind&&c.qualifiedName.startsWith(`${a}>`))).map(a=>i(a,!0))}if(b.shadowed)return[];let k=h.filter(a=>"method"!==a.kind);if(k.length>0)return k.map(a=>i(a));let l=d.bindingsByLocalName.get(b.calleeName);if(!l)return[];let m=d.resolvedImports.get(l.specifier);if(!m)return[{kind:"external",name:l.importedName,packageSpec:l.specifier}];let n=e.get(m);if(!n)return[];let o=q(n,l.importedName,0,new Set,e);return o&&"ambiguous"!==o&&p(o.kind)?[{kind:"symbol",addr:{filePath:o.filePath,qualifiedName:o.qualifiedName}}]:[]})(a,b,c,d,e).filter(a=>"symbol"!==a.kind||a.addr.filePath!==b.filePath||a.addr.qualifiedName!==b.qualifiedName)}}let t=s("typescript",[".ts"]),u=s("tsx",[".tsx",".jsx"]),v=s("javascript",[".js",".mjs",".cjs"]);function w(a){return"function"===a||"class"===a||"method"===a}function x(a,b,c){if("*"!==b){let d=`${b}>${c}`,e=a.symbolsByQname.get(d);if(e&&w(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(">")&&w(c.kind)&&(!a||c.endLine-c.startLine>a.endLine-a.startLine)&&(a=c);if(a)return a}}return null}function y(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}let z={grammarId:"python",extensions:[".py",".pyi"],decisions:{nodes:new Set(["if_statement","elif_clause","for_statement","while_statement","except_clause","conditional_expression","case_clause","if_clause","for_in_clause","boolean_operator"])},fileLocalContext:n,exportedDefinition:k,submoduleSpecifier:i,moduleStringConstants:o.PW,extractSymbols:(a,b)=>(0,g.Hs)(a),extractImports(a){let b;return{specs:(b=[],!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);if(!a)return;b.push(a);for(let d=0;d<c.childCount;d++){let e=c.child(d);if(!e||"name"!==c.fieldNameForChild(d))continue;let f="aliased_import"===e.type?e.childForFieldName("name"):e;f?.type==="dotted_name"&&b.push(i(a,f.text))}return}}for(let b=0;b<c.namedChildCount;b++){let d=c.namedChild(b);d&&a(d)}}(a),b),bindings:(0,h.JM)(a)}},extractCallSites:(a,b)=>(0,h.Lv)(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 y(h||".",g,d)}for(let b of c.pythonRoots){let e=y(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),f=e?d.get(e):void 0,g="*"!==b.importedName?c.resolvedImports.get(i(b.specifier,b.importedName)):void 0,h=g?d.get(g):void 0;if(!f&&!h)return[];let j=(f?x(f,b.importedName,a.calleeName):null)??(h?x(h,"*",a.calleeName):null);return j?[{kind:"symbol",addr:{filePath:j.filePath,qualifiedName:j.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&&w(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 j=d.get(h);if(!j)return[];let k=function(a,b){let c=a.symbolsByName.get(b);if(!c)return null;let d=null;for(let a of c)w(a.kind)&&(!d||a.endLine-a.startLine>d.endLine-d.startLine)&&(d=a);return d}(j,g.importedName);return k?[{kind:"symbol",addr:{filePath:k.filePath,qualifiedName:k.qualifiedName}}]:[]}};var A=c(73024);function B(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,declLine:a.startPosition.row+1,contentHash:(0,g.qj)((0,g.NZ)(a.text)),children:e,params:f}}function C(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 D(a,b){try{let c=b?await b.readFile("go.mod"):await A.promises.readFile(f().join(a,"go.mod"),"utf8"),d=/^\s*module\s+(\S+)/m.exec(c);return d?d[1].trim():null}catch{return null}}let E={grammarId:"go",extensions:[".go"],decisions:{nodes:new Set(["if_statement","for_statement","expression_case","type_case","communication_case"]),binary:{type:"binary_expression",operators:new Set(["&&","||"])}},fileLocalContext:async(a,b)=>E.buildProjectContext(a,new Set([b])),exportedDefinition:k,submoduleSpecifier:l,moduleStringConstants:m,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,declLine:c,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(B(e,a.text,"function",void 0,[],C(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=B(e,a.text,"method",d??void 0,[],C(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(B(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(B(e,f.text,"const",b))}else"identifier"===a.type&&c.push(B(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,c){let d=await D(a,c);return{cwd:a,modulePath:d,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(">")&&F(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&&F(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(">"))&&F(a.kind)&&i.push({kind:"symbol",addr:{filePath:a.filePath,qualifiedName:a.qualifiedName}})}return i}};function F(a){return"function"===a||"class"===a||"method"===a}function G(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,declLine:a.startPosition.row+1,contentHash:(0,g.qj)((0,g.NZ)(a.text)),children:e,params:f}}function H(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 I(a,b,c){let d=new Map,e=new Map,g=new Set;async function h(i,j){let k;if(g.has(j))return;g.add(j),d.set(i,j),e.set(j,i);try{k=c?await c.readFile(j):await A.promises.readFile(f().join(a,j),"utf8")}catch{return}let l=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}(k);if(0===l.length)return;let m=f().posix.dirname(j),n=f().posix.basename(j,".rs"),o="mod"===n||"lib"===n||"main"===n?[m]:[m,f().posix.join(m,n)];for(let a of l){let c=`${i}::${a}`,d=null;for(let c of o){for(let e of[f().posix.join(c,`${a}.rs`),f().posix.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 h(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 h("crate",a);else if(a.startsWith("src/bin/"))await h("crate",a);else{let b=a.split("/"),c=b.indexOf("src");if(c>0){let d=b[c-1];await h(d,a)}}return{modTree:d,fileToMod:e}}let J={grammarId:"rust",extensions:[".rs"],decisions:{nodes:new Set(["if_expression","while_expression","for_expression","loop_expression","match_arm"]),binary:{type:"binary_expression",operators:new Set(["&&","||"])}},fileLocalContext:n,exportedDefinition:k,submoduleSpecifier:l,moduleStringConstants:m,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,declLine:c,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(G(e,a.text,"function",void 0,[],H(e)));break}case"struct_item":case"union_item":{let a=e.childForFieldName("name");if(!a)break;b.push(G(e,a.text,"class",void 0));break}case"enum_item":{let a=e.childForFieldName("name");if(!a)break;b.push(G(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(G(e,a.text,"method",b,[],H(e)))}}return d}(e,a.text);b.push(G(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(G(e,a.text,"method",b,[],H(e)))}else if("function_signature_item"===e.type){let a=e.childForFieldName("name");if(!a)continue;d.push(G(e,a.text,"method",b,[],H(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(G(e,a.text,"const",void 0));break}case"type_item":{let a=e.childForFieldName("name");if(!a)break;b.push(G(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(G(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,c){let{modTree:d,fileToMod:e}=await I(a,b,c);return{cwd:a,modTree:d,fileToMod:e}},resolveSpecifier(a,b,c,d){let e=c.fileToMod.get(b);if(!e)return null;let f=function(a,b){if(a.startsWith("crate::"))return a;if("crate"===a)return"crate";if(a.startsWith("self::"))return`${b}::${a.slice(6)}`;if("self"===a)return b;if(a.startsWith("super::")){let c=b,d=a;for(;d.startsWith("super::");){let a=c.lastIndexOf("::");if(a<0)return null;c=c.slice(0,a),d=d.slice(7)}if("super"===d){let a=c.lastIndexOf("::");return a<0?null:c.slice(0,a)}return d?`${c}::${d}`:c}return null}(a,e);if(!f)return null;if(c.modTree.has(f))return c.modTree.get(f);let g=f.split("::");for(;g.length>1;){g.pop();let a=g.join("::"),b=c.modTree.get(a);if(b)return b}return null},resolveCall(a,b,c,d,e){let f;if(a.receiverName){let b=c.bindingsByLocalName.get(a.receiverName);if(b){let e=c.resolvedImports.get(b.specifier);if(!e)return[{kind:"external",name:a.calleeName,packageSpec:b.specifier}];let f=d.get(e);if(!f)return[];let g=f.symbolsByName.get(a.calleeName);if(g){for(let a of g)if(!a.qualifiedName.includes(">")&&K(a.kind))return[{kind:"symbol",addr:{filePath:a.filePath,qualifiedName:a.qualifiedName}}]}let h=`${b.importedName}>${a.calleeName}`,i=f.symbolsByQname.get(h);return i&&K(i.kind)?[{kind:"symbol",addr:{filePath:i.filePath,qualifiedName:i.qualifiedName}}]:[{kind:"method-unresolved",receiverName:a.receiverName,methodName:a.calleeName}]}let e=`${a.receiverName}>${a.calleeName}`,f=c.symbolsByQname.get(e);if(f)return[{kind:"symbol",addr:{filePath:f.filePath,qualifiedName:f.qualifiedName}}];let g=[],h=c.symbolsByName.get(a.calleeName);if(h)for(let a of h)"method"===a.kind&&g.push({kind:"symbol",addr:{filePath:a.filePath,qualifiedName:a.qualifiedName}});return g.length>0?g:[{kind:"method-unresolved",receiverName:a.receiverName,methodName:a.calleeName}]}let g=[],h=c.symbolsByName.get(a.calleeName);if(h)for(let a of h)!(a.qualifiedName===b.qualifiedName||a.qualifiedName.includes(">"))&&K(a.kind)&&g.push({kind:"symbol",addr:{filePath:a.filePath,qualifiedName:a.qualifiedName}});if(g.length>0)return g;let i=c.bindingsByLocalName.get(a.calleeName);if(!i)return[];let j=c.resolvedImports.get(i.specifier);if(!j)return[{kind:"external",name:i.importedName,packageSpec:i.specifier}];let k=d.get(j);if(!k)return[];let l=k.symbolsByName.get(i.importedName);if(l){for(let a of l)if(!a.qualifiedName.includes(">")&&K(a.kind)){f=a;break}}return f?[{kind:"symbol",addr:{filePath:f.filePath,qualifiedName:f.qualifiedName}}]:[]}};function K(a){return"function"===a||"class"===a||"method"===a}(0,d.ik)(t),(0,d.ik)(u),(0,d.ik)(v),(0,d.ik)(z),(0,d.ik)(E),(0,d.ik)(J),(0,d.ik)({grammarId:"lean",extensions:[".lean"],decisions:null,fileLocalContext:n,exportedDefinition:k,submoduleSpecifier:l,moduleStringConstants:m,extractSymbols:(a,b)=>(0,g.Hs)(a,"lean"),extractImports:a=>({specs:[],bindings:[]}),extractCallSites:(a,b)=>[],buildProjectContext(){},resolveSpecifier:()=>null,resolveCall:()=>[]})},87956:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{b:()=>i});var e=c(12629),f=c(76760),g=c.n(f),h=a([e]);e=(h.then?(await h)():h)[0];let j=g().join(process.cwd(),"public","tree-sitter"),k=null,l=new Map,m=new Map;async function i(a){let b,c=m.get(a);if(c)return c;let d=await (!(b=l.get(a))&&(b=(async()=>(await (!k&&(k=e.Parser.init({locateFile:a=>g().join(j,a)})),k),e.Language.load(g().join(j,`tree-sitter-${a}.wasm`))))(),l.set(a,b)),b);return(c=new e.Parser).setLanguage(d),m.set(a,c),c}d()}catch(a){d(a)}})},88395:(a,b,c)=>{c.d(b,{t:()=>j});var d=c(29021),e=c(33873);let f=[".git/HEAD",".git/MERGE_HEAD",".git/REBASE_HEAD"],g=[".git/refs"];class h{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))},h=()=>{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&&h()},2e3))}),b.watchers.push(e)}catch(b){console.error(`Failed to watch ${a}:`,b)}};h();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 f){let b=a.replace(".git/","");j((0,e.join)(i,b))}let k=function(a){try{let b=(0,d.readFileSync)((0,e.join)(a,"commondir"),"utf-8").trim();if(b)return(0,e.resolve)(a,b)}catch{}return a}(i);for(let a of g){let f=a.replace(".git/","");try{let a=(0,d.watch)((0,e.join)(k,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}}let i=globalThis,j=i.__cockpitFileWatcher??(i.__cockpitFileWatcher=new h)},92287:(a,b,c)=>{c.d(b,{Mv:()=>t,Xn:()=>s,E:()=>m,s7:()=>l,_7:()=>r,J:()=>u,bQ:()=>q});let d=new Set(["function","class","method"]);function e(a){return d.has(a.kind)}class f{constructor(a,b){this.limit=a,this.compare=b,this.heap=[]}add(a){if(this.limit<=0)return;if(this.heap.length<this.limit){this.heap.push(a);let b=this.heap.length-1;for(;b>0;){let a=b-1>>>1;if(0>=this.compare(this.heap[b],this.heap[a]))break;[this.heap[b],this.heap[a]]=[this.heap[a],this.heap[b]],b=a}return}if(this.compare(a,this.heap[0])>=0)return;this.heap[0]=a;let b=0;for(;;){let a=2*b+1;if(a>=this.heap.length)break;let c=a+1,d=c<this.heap.length&&this.compare(this.heap[c],this.heap[a])>0?c:a;if(0>=this.compare(this.heap[d],this.heap[b]))break;[this.heap[b],this.heap[d]]=[this.heap[d],this.heap[b]],b=d}}sorted(){return this.heap.slice().sort(this.compare)}}var g=c(30733);function h(a){let b=a.lastIndexOf("/");return b>=0?a.slice(b+1):a}function i(a){return{filePath:a.filePath,qualifiedName:a.qualifiedName,name:a.name,kind:a.kind,startLine:a.startLine,endLine:a.endLine,declLine:a.declLine,params:a.params}}function j(a){let b=a.indexOf(">");return b>=0?a.slice(0,b):a}function k(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 l(a,b){let c=a.files.get(b);if(!c)return null;let d=c.flatSymbols.filter(a=>!a.qualifiedName.includes(">")).map(i).sort((a,b)=>a.startLine-b.startLine),f=new Set(d.map(a=>a.qualifiedName)),h=new Map,l=[];for(let a of c.intraCalls){let b=j(a.from),c=j(a.to);if(b===c||!f.has(b)||!f.has(c))continue;let d=(0,g.W)(b,c),e=h.get(d);if(e)for(let b of a.lines)e.lines.push(b);else{let e={from:b,to:c,lines:a.lines.slice()};h.set(d,e),l.push(e)}}for(let a of l)a.lines.sort((a,b)=>a-b),a.lines=k(a.lines);let m=[],n=new Map;for(let b of c.outgoingCalls){let d=j(b.from);if(!f.has(d)||b.to.filePath===c.path)continue;let h=a.files.get(b.to.filePath);if(!h)continue;let k=h.symbolsByQname.get(b.to.qualifiedName);if(!k||!e(k))continue;let l=(0,g.W)(k.filePath,k.qualifiedName,d),o=n.get(l);if(o)for(let a of b.lines)o.lines.push(a);else{let a={external:i(k),focalQname:d,lines:b.lines.slice()};n.set(l,a),m.push(a)}}let o=[],p=new Map;for(let b of c.incomingCalls){let d=j(b.to);if(!f.has(d)||b.from.filePath===c.path)continue;let h=a.files.get(b.from.filePath);if(!h)continue;let k=h.symbolsByQname.get(b.from.qualifiedName);if(!k||!e(k))continue;let l=(0,g.W)(k.filePath,k.qualifiedName,d),m=p.get(l);if(m)for(let a of b.lines)m.lines.push(a);else{let a={external:i(k),focalQname:d,lines:b.lines.slice()};p.set(l,a),o.push(a)}}for(let a of m)a.lines.sort((a,b)=>a-b),a.lines=k(a.lines);for(let a of o)a.lines.sort((a,b)=>a-b),a.lines=k(a.lines);let q=[],r=new Map;for(let a of c.externalCalls){let b=j(a.from);if(!f.has(b))continue;let c=(0,g.W)(b,a.packageSpec,a.importedName),d=r.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()};r.set(c,d),q.push(d)}}for(let a of q)a.lines.sort((a,b)=>a-b),a.lines=k(a.lines);let s=[],t=new Map;for(let a of c.methodCalls){let b=j(a.from);if(!f.has(b))continue;let c=(0,g.W)(b,a.receiverName,a.methodName),d=t.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()};t.set(c,d),s.push(d)}}for(let a of s)a.lines.sort((a,b)=>a-b),a.lines=k(a.lines);let u=(a,b)=>a.external.filePath.localeCompare(b.external.filePath)||a.external.qualifiedName.localeCompare(b.external.qualifiedName);return o.sort(u),m.sort(u),q.sort((a,b)=>a.external.packageSpec.localeCompare(b.external.packageSpec)||a.external.name.localeCompare(b.external.name)),s.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:l,externalCalls:q,methodCalls:s,upstreamCalls:o,downstreamCalls:m}}function m(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 n(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}let o=(a,b)=>a.rank-b.rank||a.filePath.localeCompare(b.filePath)||a.qname.localeCompare(b.qname)||a.line-b.line;function p(a,b,c){if(a===b)return 0;let d=n(a);return d===c?1:d.startsWith(c)?2:d.includes(c)?3:-1}function q(a,b,c,d={}){let e=b.trim();if(!e)return d.includeLiterals?{files:[],symbols:[],literals:[]}:{files:[],symbols:[]};let g=n(e);if(!g)return d.includeLiterals?{files:[],symbols:[],literals:[]}:{files:[],symbols:[]};let j=Math.min(500,Math.max(0,Math.floor(c)||0)),k=new f(j,o),l=new f(j,o),m=new f(j,o);for(let b of a.files.values()){if(d.directory&&!b.path.startsWith(`${d.directory}/`))continue;let a=[],c=p(b.path,e,g);if(c>=0){let d=p(h(b.path),e,g);a.push(()=>k.add({rank:d>=0?Math.min(d,c):c,filePath:b.path,qname:"",line:0,value:b}))}for(let c of b.flatSymbols){if("unknown"===c.kind)continue;let d=p(c.name,e,g);d>=0&&a.push(()=>l.add({rank:d,filePath:b.path,qname:c.qualifiedName,line:c.declLine,value:c}))}if(d.includeLiterals)for(let c of b.literals){let d=p(c.value,e,g);d>=0&&a.push(()=>m.add({rank:d,filePath:b.path,qname:c.value,line:c.line,value:c}))}if(!(!a.length||d.tests?.skip(b.path)))for(let b of a)b()}let r=k.sorted().map(({value:a})=>({type:"file",label:h(a.path),hint:a.path,target:{filePath:a.path}})),s=l.sorted().map(({value:a})=>({type:"symbol",label:a.name,hint:`${a.kind} \xb7 ${a.filePath}`,target:i(a)}));return d.includeLiterals?{files:r,symbols:s,literals:m.sorted().map(({filePath:a,value:b})=>({type:"literal",value:b.value,filePath:a,line:b.line,...b.enclosingQname?{enclosingSymbol:b.enclosingQname}:{}}))}:{files:r,symbols:s}}function r(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 s(a,b,c){let d=r(a,b,c);if(d.length>1)return{qname:b,target:null,callers:[],ambiguousIn:d.map(a=>a.path).sort()};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 h=(0,g.W)(c.path,a.from),j=f.get(h);if(j)for(let b of a.lines)j.callLines.push(b);else{let b={caller:i(d),callLines:a.lines.slice()};f.set(h,b),e.push(b)}}for(let d of c.incomingCalls){if(d.to!==b)continue;let c=a.files.get(d.from.filePath),h=c?.symbolsByQname.get(d.from.qualifiedName);if(!h)continue;let j=(0,g.W)(d.from.filePath,d.from.qualifiedName),k=f.get(j);if(k)for(let a of d.lines)k.callLines.push(a);else{let a={caller:i(h),callLines:d.lines.slice()};f.set(j,a),e.push(a)}}}for(let a of e)a.callLines.sort((a,b)=>a-b),a.callLines=k(a.callLines);e.sort((a,b)=>a.caller.filePath.localeCompare(b.caller.filePath)||a.caller.qualifiedName.localeCompare(b.caller.qualifiedName));let h=i(d[0].symbolsByQname.get(b));return{qname:b,target:h,callers:e}}function t(a,b,c){let d=r(a,b,c);if(d.length>1)return{qname:b,target:null,callees:[],ambiguousIn:d.map(a=>a.path).sort()};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 h=(0,g.W)(c.path,a.to),j=f.get(h);if(j)for(let b of a.lines)j.callLines.push(b);else{let b={callee:i(d),callLines:a.lines.slice()};f.set(h,b),e.push(b)}}for(let d of c.outgoingCalls){if(d.from!==b)continue;let c=a.files.get(d.to.filePath),h=c?.symbolsByQname.get(d.to.qualifiedName);if(!h)continue;let j=(0,g.W)(d.to.filePath,d.to.qualifiedName),k=f.get(j);if(k)for(let a of d.lines)k.callLines.push(a);else{let a={callee:i(h),callLines:d.lines.slice()};f.set(j,a),e.push(a)}}}for(let a of e)a.callLines.sort((a,b)=>a-b),a.callLines=k(a.callLines);e.sort((a,b)=>a.callee.filePath.localeCompare(b.callee.filePath)||a.callee.qualifiedName.localeCompare(b.callee.qualifiedName));let h=i(d[0].symbolsByQname.get(b));return{qname:b,target:h,callees:e}}function u(a,b,c,d){let e=r(a,b,d);if(e.length>1)return{qname:b,target:null,nodes:[],truncated:!1,ambiguousIn:e.map(a=>a.path).sort()};if(0===e.length)return{qname:b,target:null,nodes:[],truncated:!1};let f=Math.min(Math.max(c,1),5),h=i(e[0].symbolsByQname.get(b)),j=e.map(a=>({filePath:a.path,qname:b})),k=new Set(j.map(a=>(0,g.W)(a.filePath,a.qname))),l=j.map(b=>({symbol:i(a.files.get(b.filePath).symbolsByQname.get(b.qname)),depth:0})),m=j.slice(),n=!1;for(let b=1;b<=f;b++){let c=[];for(let d of m){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 h=(0,g.W)(e.path,a.from);if(!k.has(h)&&(k.add(h),l.push({symbol:i(f),depth:b}),c.push({filePath:e.path,qname:a.from}),l.length>=500)){n=!0;break}}if(n)break;for(let f of e.incomingCalls){if(f.to!==d.qname)continue;let e=a.files.get(f.from.filePath),h=e?.symbolsByQname.get(f.from.qualifiedName);if(!h)continue;let j=(0,g.W)(f.from.filePath,f.from.qualifiedName);if(!k.has(j)&&(k.add(j),l.push({symbol:i(h),depth:b}),c.push({filePath:f.from.filePath,qname:f.from.qualifiedName}),l.length>=500)){n=!0;break}}if(n)break}}if(n||0===c.length)break;m=c}return l.sort((a,b)=>a.depth-b.depth||a.symbol.filePath.localeCompare(b.symbol.filePath)||a.symbol.qualifiedName.localeCompare(b.symbol.qualifiedName)),{qname:b,target:h,nodes:l,truncated:n}}}};
|