@surething/cockpit 1.0.213 → 1.0.214
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 +7 -3
- package/.next-prod/build-manifest.json +2 -2
- package/.next-prod/prerender-manifest.json +3 -3
- package/.next-prod/routes-manifest.json +24 -0
- package/.next-prod/server/app/_global-error/page.js +3 -3
- package/.next-prod/server/app/_global-error/page.js.nft.json +1 -1
- 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/_global-error.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_index.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 +2 -2
- package/.next-prod/server/app/_not-found/page.js.nft.json +1 -1
- package/.next-prod/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/_not-found.html +1 -1
- package/.next-prod/server/app/_not-found.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next-prod/server/app/api/agent/test/route.js +1 -1
- package/.next-prod/server/app/api/agent/test/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/bash/route.js +1 -1
- package/.next-prod/server/app/api/bash/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/codex/route.js +2 -2
- package/.next-prod/server/app/api/chat/codex/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/deepseek/route.js +1 -1
- package/.next-prod/server/app/api/chat/deepseek/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/kimi/route.js +2 -2
- package/.next-prod/server/app/api/chat/kimi/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/ollama/route.js +3 -3
- package/.next-prod/server/app/api/chat/ollama/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/route.js +2 -2
- package/.next-prod/server/app/api/chat/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/claude-stats/route.js +1 -1
- package/.next-prod/server/app/api/claude-stats/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/commands/route.js +1 -1
- package/.next-prod/server/app/api/commands/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/comments/route.js +1 -1
- package/.next-prod/server/app/api/comments/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/columns/route.js +2 -2
- package/.next-prod/server/app/api/db/columns/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/connect/route.js +1 -1
- package/.next-prod/server/app/api/db/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/db/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/export/route.js +1 -1
- package/.next-prod/server/app/api/db/export/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/query/route.js +1 -1
- package/.next-prod/server/app/api/db/query/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/schemas/route.js +1 -1
- package/.next-prod/server/app/api/db/schemas/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/dev/spans/route.js +1 -1
- package/.next-prod/server/app/api/dev/spans/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/extension/version/route.js +1 -1
- package/.next-prod/server/app/api/extension/version/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/file/route.js +1 -1
- package/.next-prod/server/app/api/file/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/blame/route.js +1 -1
- package/.next-prod/server/app/api/files/blame/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/clipboard/route.js +1 -1
- package/.next-prod/server/app/api/files/clipboard/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/copy/route.js +1 -1
- package/.next-prod/server/app/api/files/copy/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/delete/route.js +1 -1
- package/.next-prod/server/app/api/files/delete/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/expanded/route.js +1 -1
- package/.next-prod/server/app/api/files/expanded/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/index/route.js +1 -1
- package/.next-prod/server/app/api/files/index/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/init/route.js +1 -1
- package/.next-prod/server/app/api/files/init/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/paste/route.js +1 -1
- package/.next-prod/server/app/api/files/paste/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/read/route.js +1 -1
- package/.next-prod/server/app/api/files/read/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/readdir/route.js +1 -1
- package/.next-prod/server/app/api/files/readdir/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/recent/route.js +1 -1
- package/.next-prod/server/app/api/files/recent/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/save/route.js +1 -1
- package/.next-prod/server/app/api/files/save/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/search/route.js +1 -1
- package/.next-prod/server/app/api/files/search/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/stat/route.js +1 -1
- package/.next-prod/server/app/api/files/stat/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/text/route.js +1 -1
- package/.next-prod/server/app/api/files/text/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/branch-diff/route.js +1 -1
- package/.next-prod/server/app/api/git/branch-diff/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/branches/route.js +1 -1
- package/.next-prod/server/app/api/git/branches/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/commit-diff/route.js +1 -1
- package/.next-prod/server/app/api/git/commit-diff/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/commits/route.js +1 -1
- package/.next-prod/server/app/api/git/commits/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/diff/route.js +1 -1
- package/.next-prod/server/app/api/git/diff/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/discard/route.js +1 -1
- package/.next-prod/server/app/api/git/discard/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/stage/route.js +1 -1
- package/.next-prod/server/app/api/git/stage/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/status/route.js +1 -1
- package/.next-prod/server/app/api/git/status/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/unstage/route.js +1 -1
- package/.next-prod/server/app/api/git/unstage/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/worktree/route.js +1 -1
- package/.next-prod/server/app/api/git/worktree/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/global-state/route.js +1 -1
- package/.next-prod/server/app/api/global-state/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/jupyter/load/route.js +1 -1
- package/.next-prod/server/app/api/jupyter/load/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/jupyter/save/route.js +1 -1
- package/.next-prod/server/app/api/jupyter/save/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/jupyter/shutdown/route.js +1 -1
- package/.next-prod/server/app/api/jupyter/shutdown/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/definition/route.js +1 -1
- package/.next-prod/server/app/api/lsp/definition/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/hover/route.js +1 -1
- package/.next-prod/server/app/api/lsp/hover/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/references/route.js +1 -1
- package/.next-prod/server/app/api/lsp/references/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/status/route.js +1 -1
- package/.next-prod/server/app/api/lsp/status/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/warmup/route.js +1 -1
- package/.next-prod/server/app/api/lsp/warmup/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/columns/route.js +1 -1
- package/.next-prod/server/app/api/mysql/columns/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/connect/route.js +1 -1
- package/.next-prod/server/app/api/mysql/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/mysql/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/export/route.js +1 -1
- package/.next-prod/server/app/api/mysql/export/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/query/route.js +1 -1
- package/.next-prod/server/app/api/mysql/query/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/schemas/route.js +1 -1
- package/.next-prod/server/app/api/mysql/schemas/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/connect/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/query/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/query/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/schema/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/schema/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/note/route.js +1 -1
- package/.next-prod/server/app/api/note/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/ollama/models/route.js +1 -1
- package/.next-prod/server/app/api/ollama/models/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/ollama/start/route.js +1 -1
- package/.next-prod/server/app/api/ollama/start/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/open-cursor/route.js +1 -1
- package/.next-prod/server/app/api/open-cursor/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/open-vscode/route.js +1 -1
- package/.next-prod/server/app/api/open-vscode/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/pick-folder/route.js +1 -1
- package/.next-prod/server/app/api/pick-folder/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/pinned-sessions/route.js +1 -1
- package/.next-prod/server/app/api/pinned-sessions/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/project-settings/route.js +1 -1
- package/.next-prod/server/app/api/project-settings/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/project-state/route.js +1 -1
- package/.next-prod/server/app/api/project-state/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/affected/route.js +1 -0
- package/.next-prod/server/app/api/projectGraph/affected/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/projectGraph/affected/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/projectGraph/callees/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/callees/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/callers/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/callers/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/coedit/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/coedit/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/context/route.js +1 -0
- package/.next-prod/server/app/api/projectGraph/context/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/projectGraph/context/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/projectGraph/file/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/file/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/file-functions/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/file-functions/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/impact/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/impact/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/related/route.js +1 -0
- package/.next-prod/server/app/api/projectGraph/related/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/projectGraph/related/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/projectGraph/risk/route.js +1 -0
- package/.next-prod/server/app/api/projectGraph/risk/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/projectGraph/risk/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/projectGraph/search/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/search/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projects/route.js +1 -1
- package/.next-prod/server/app/api/projects/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/command/route.js +1 -1
- package/.next-prod/server/app/api/redis/command/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/connect/route.js +1 -1
- package/.next-prod/server/app/api/redis/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/delete/route.js +1 -1
- package/.next-prod/server/app/api/redis/delete/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/redis/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/get/route.js +1 -1
- package/.next-prod/server/app/api/redis/get/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/keys/route.js +1 -1
- package/.next-prod/server/app/api/redis/keys/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/set/route.js +1 -1
- package/.next-prod/server/app/api/redis/set/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/[id]/comments/route.js +1 -1
- package/.next-prod/server/app/api/review/[id]/comments/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/[id]/replies/route.js +1 -1
- package/.next-prod/server/app/api/review/[id]/replies/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/[id]/route.js +1 -1
- package/.next-prod/server/app/api/review/[id]/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/identify/route.js +1 -1
- package/.next-prod/server/app/api/review/identify/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/order/route.js +1 -1
- package/.next-prod/server/app/api/review/order/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/route.js +1 -1
- package/.next-prod/server/app/api/review/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/share-info/route.js +1 -1
- package/.next-prod/server/app/api/review/share-info/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/users/route.js +1 -1
- package/.next-prod/server/app/api/review/users/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/scheduled-tasks/route.js +1 -1
- package/.next-prod/server/app/api/scheduled-tasks/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/services/config/route.js +1 -1
- package/.next-prod/server/app/api/services/config/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/services/scripts/route.js +1 -1
- package/.next-prod/server/app/api/services/scripts/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/fork/route.js +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/fork/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/history/route.js +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/history/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/session-by-path/route.js +1 -1
- package/.next-prod/server/app/api/session-by-path/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js +1 -1
- package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/sessions/projects/route.js +1 -1
- package/.next-prod/server/app/api/sessions/projects/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/sessions/route.js +1 -1
- package/.next-prod/server/app/api/sessions/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/settings/route.js +1 -1
- package/.next-prod/server/app/api/settings/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/skills/[id]/route.js +1 -1
- package/.next-prod/server/app/api/skills/[id]/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/skills/content/route.js +1 -1
- package/.next-prod/server/app/api/skills/content/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/skills/route.js +1 -1
- package/.next-prod/server/app/api/skills/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/aliases/route.js +1 -1
- package/.next-prod/server/app/api/terminal/aliases/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/autocomplete/route.js +1 -1
- package/.next-prod/server/app/api/terminal/autocomplete/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/bubble-order/route.js +1 -1
- package/.next-prod/server/app/api/terminal/bubble-order/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/env/route.js +1 -1
- package/.next-prod/server/app/api/terminal/env/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/history/route.js +1 -1
- package/.next-prod/server/app/api/terminal/history/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/version/route.js +1 -1
- package/.next-prod/server/app/api/version/route.js.nft.json +1 -1
- package/.next-prod/server/app/favicon.ico/route.js +1 -1
- package/.next-prod/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next-prod/server/app/manifest.webmanifest/route.js +2 -2
- package/.next-prod/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/.next-prod/server/app/page.js +2 -2
- package/.next-prod/server/app/page.js.nft.json +1 -1
- package/.next-prod/server/app/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/project/page.js +2 -2
- package/.next-prod/server/app/project/page.js.nft.json +1 -1
- package/.next-prod/server/app/project/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/review/[id]/page.js +2 -2
- package/.next-prod/server/app/review/[id]/page.js.nft.json +1 -1
- package/.next-prod/server/app/review/[id]/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app-paths-manifest.json +7 -3
- package/.next-prod/server/chunks/2540.js +1 -0
- package/.next-prod/server/chunks/2939.js +1 -1
- package/.next-prod/server/chunks/4008.js +1 -0
- package/.next-prod/server/chunks/7828.js +79 -2
- package/.next-prod/server/chunks/9658.js +3 -3
- package/.next-prod/server/middleware-build-manifest.js +1 -1
- package/.next-prod/server/pages/404.html +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/chunks/2171-1d5aa2a301006dfb.js +1 -0
- package/.next-prod/static/chunks/{5188-3337a5d88efc5fc1.js → 5188-38f55b21ae1eeb28.js} +1 -1
- package/.next-prod/static/chunks/6345-fc2d45a72316c5f8.js +14 -0
- package/.next-prod/static/chunks/{aaea2bcf-be8b39a8f32280f3.js → aaea2bcf-56770c8875ee56c9.js} +1 -1
- package/.next-prod/static/chunks/app/_global-error/page-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/agent/test/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/bash/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/codex/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/deepseek/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/kimi/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/ollama/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/claude-stats/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/commands/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/comments/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/db/columns/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/db/connect/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/db/disconnect/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/db/export/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/db/query/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/db/schemas/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/dev/spans/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/extension/version/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/file/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/blame/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/clipboard/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/copy/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/delete/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/expanded/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/index/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/init/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/paste/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/read/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/readdir/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/recent/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/save/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/search/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/stat/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/text/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/git/branch-diff/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/git/branches/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/git/commit-diff/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/git/commits/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/git/diff/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/git/discard/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/git/stage/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/git/status/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/git/unstage/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/git/worktree/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/global-state/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/load/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/save/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/definition/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/hover/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/references/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/status/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/warmup/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/columns/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/connect/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/disconnect/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/export/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/query/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/schemas/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/connect/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/query/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/schema/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/note/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/ollama/models/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/ollama/start/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/open-cursor/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/open-vscode/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/pick-folder/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/pinned-sessions/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/project-settings/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/project-state/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/affected/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/callees/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/callers/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/coedit/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/context/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/file/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/file-functions/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/impact/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/related/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/risk/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/search/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/projects/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/command/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/connect/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/delete/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/disconnect/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/get/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/keys/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/set/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/comments/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/replies/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/review/identify/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/review/order/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/review/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/review/share-info/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/review/users/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/scheduled-tasks/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/services/config/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/services/scripts/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/session-by-path/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/projects/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/settings/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/skills/[id]/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/skills/content/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/skills/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/aliases/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/env/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/history/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/version/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/manifest.webmanifest/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/ekMRRxcvpy2AIjMrVn4lK/_buildManifest.js +1 -0
- package/.next-prod/trace +13 -12
- package/.next-prod/trace-build +1 -1
- package/.next-prod/types/app/api/projectGraph/affected/route.ts +351 -0
- package/.next-prod/types/app/api/projectGraph/context/route.ts +351 -0
- package/.next-prod/types/app/api/projectGraph/related/route.ts +351 -0
- package/.next-prod/types/app/api/projectGraph/risk/route.ts +351 -0
- package/.next-prod/types/routes.d.ts +5 -1
- package/.next-prod/types/validator.ts +36 -0
- package/README.md +0 -1
- package/README.zh.md +0 -1
- package/bin/cock-affected.mjs +190 -0
- package/bin/cock-terminal.mjs +471 -159
- package/bin/cock.mjs +9 -1
- package/dist/cache-GIQJA4HL.mjs +502 -0
- package/dist/chunk-7P6ASYW6.mjs +9 -0
- package/dist/{chunk-OWUW2O3D.mjs → chunk-CZWJPTRO.mjs} +4 -2
- package/dist/{chunk-FBR4KJI5.mjs → chunk-KRTISG5I.mjs} +213 -2
- package/dist/{chunk-TXBVUZVH.mjs → chunk-ZJ6CC3MH.mjs} +0 -7
- package/dist/httpApi.mjs +203 -17
- package/dist/scheduledTasks.mjs +3 -2
- package/dist/{server-E7G55DY7.mjs → server-OSOMFNXR.mjs} +27 -4
- package/dist/wsServer.mjs +8 -34
- package/package.json +3 -1
- package/.next-prod/static/-BWPF5YtAsgnego1UPtt9/_buildManifest.js +0 -1
- package/.next-prod/static/chunks/2171-5163d946ec03ce80.js +0 -1
- package/.next-prod/static/chunks/6345-4299a3385983e28c.js +0 -14
- package/.next-prod/static/chunks/app/_global-error/page-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/agent/test/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/bash/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/codex/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/deepseek/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/kimi/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/ollama/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/claude-stats/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/commands/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/comments/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/db/columns/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/db/connect/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/db/disconnect/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/db/export/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/db/query/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/db/schemas/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/dev/spans/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/extension/version/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/file/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/blame/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/clipboard/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/copy/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/delete/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/expanded/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/index/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/init/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/paste/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/read/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/readdir/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/recent/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/save/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/search/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/stat/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/text/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/git/branch-diff/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/git/branches/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/git/commit-diff/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/git/commits/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/git/diff/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/git/discard/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/git/stage/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/git/status/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/git/unstage/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/git/worktree/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/global-state/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/jupyter/load/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/jupyter/save/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/definition/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/hover/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/references/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/status/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/warmup/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/columns/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/connect/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/disconnect/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/export/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/query/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/schemas/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/connect/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/query/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/schema/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/note/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/ollama/models/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/ollama/start/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/open-cursor/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/open-vscode/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/pick-folder/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/pinned-sessions/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/project-settings/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/project-state/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/callees/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/callers/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/coedit/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/file/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/file-functions/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/impact/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/search/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/projects/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/command/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/connect/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/delete/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/disconnect/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/get/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/keys/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/set/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/review/[id]/comments/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/review/[id]/replies/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/review/[id]/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/review/identify/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/review/order/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/review/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/review/share-info/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/review/users/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/scheduled-tasks/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/services/config/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/services/scripts/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/session-by-path/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/projects/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/settings/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/skills/[id]/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/skills/content/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/skills/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/aliases/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/env/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/history/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/version/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/manifest.webmanifest/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-994734ef0d317687.js +0 -1
- /package/.next-prod/static/{-BWPF5YtAsgnego1UPtt9 → ekMRRxcvpy2AIjMrVn4lK}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=2939,exports.ids=[2939],exports.modules={4253:(a,b,c)=>{c.d(b,{L8:()=>p,No:()=>h,Pe:()=>o,VA:()=>q,hC:()=>m,hH:()=>l,hn:()=>s,iF:()=>r,lU:()=>t,nw:()=>n,pZ:()=>g});var d=c(79748),e=c(33873),f=c.n(e);let g=0xa00000,h=0x3200000,i=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".ico",".bmp",".avif"]),j=new Set([".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".zip",".tar",".gz",".rar",".7z",".exe",".dll",".so",".dylib",".mp3",".mp4",".avi",".mov",".mkv",".wav",".flac",".ttf",".otf",".woff",".woff2",".eot",".db",".sqlite",".sqlite3",".pyc",".class",".o",".a"]),k={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".svg":"image/svg+xml",".ico":"image/x-icon",".bmp":"image/bmp",".avif":"image/avif"};function l(a){return k[a.toLowerCase()]||"application/octet-stream"}function m(a,b){if("string"!=typeof b||0===b.length)return null;let c=f().resolve(a),d=f().resolve(c,b);return d===c||d.startsWith(c+f().sep)?d:null}async function n(a){let b;if("string"!=typeof a||0===a.length)return{ok:!1,reason:"Missing cwd parameter"};if(!f().isAbsolute(a))return{ok:!1,reason:"cwd must be an absolute path"};let c=f().resolve(a);try{b=await (0,d.stat)(c)}catch{return{ok:!1,reason:"cwd does not exist"}}return b.isDirectory()?{ok:!0,abs:c}:{ok:!1,reason:"cwd is not a directory"}}function o(a,b){return`"${a.toString(36)}-${Math.floor(b).toString(36)}"`}function p(a,b){let c=a.startsWith(".")?a.toLowerCase():f().extname(a).toLowerCase();return i.has(c)?b>h?"too-large":"image":j.has(c)?"binary":b>g?"too-large":"text"}function q(a){let b=0,c=Math.min(a.length,1e3);for(let d=0;d<c;d++){let c=a.charCodeAt(d);if(0===c)return!0;c<32&&9!==c&&10!==c&&13!==c&&b++}return c>0&&b/c>.1}async function r(a){let b,c=!1;try{(await (0,d.lstat)(a)).isSymbolicLink()&&(c=!0,b=await (0,d.readlink)(a))}catch{}let e=await (0,d.stat)(a);return{size:e.size,mtimeMs:e.mtimeMs,isDirectory:e.isDirectory(),isSymlink:c,symlinkTarget:b}}function s(a,b){return{ETag:a,"Last-Modified":new Date(b).toUTCString(),"Cache-Control":"no-cache, must-revalidate"}}function t(a,b){return!!a&&a.split(",").map(a=>a.trim().replace(/^W\//,"")).includes(b)}},7939:(a,b,c)=>{c.d(b,{$A:()=>L,A0:()=>W,An:()=>Z,BF:()=>H,Ct:()=>P,Eu:()=>G,Ex:()=>t,GB:()=>q,JE:()=>Y,JY:()=>K,Ki:()=>B,Kk:()=>Q,Kv:()=>j,LN:()=>k,Mx:()=>C,O0:()=>A,Sr:()=>I,Tb:()=>r,Ux:()=>aa,Wd:()=>X,aO:()=>m,at:()=>x,ec:()=>n,eg:()=>U,h9:()=>w,i4:()=>F,iK:()=>o,im:()=>S,iy:()=>O,jp:()=>s,lT:()=>y,lq:()=>E,ls:()=>J,mT:()=>v,oK:()=>N,oZ:()=>R,of:()=>D,po:()=>M,tP:()=>p,th:()=>u,v4:()=>l,vI:()=>V,yw:()=>T});var d=c(21820),e=c(33873),f=c(79748),g=c(29021),h=c(79646);let i=(0,d.homedir)(),j=(0,e.join)(i,".cockpit"),k=(0,e.join)(j,"projects"),l=(0,e.join)(j,"state.json"),m=(0,e.join)(j,"pinned-sessions.json"),n=(0,e.join)(j,"note.md"),o=(0,e.join)(j,"scheduled-tasks.json"),p=(0,e.join)(j,"settings.json"),q=(0,e.join)(j,"skills.json"),r=(0,e.join)(j,"review"),s=(0,e.join)(r,"_signal");function t(){try{(0,g.existsSync)(r)||(0,g.mkdirSync)(r,{recursive:!0}),(0,g.writeFileSync)(s,Date.now().toString())}catch{}}let u=(0,e.join)(i,".claude"),v=(0,e.join)(u,"projects"),w=(0,e.join)(i,".claude2"),x=(0,e.join)(w,"projects"),y=(0,e.join)(j,"deepseek"),z=(0,e.join)(y,"projects");function A(a){return a.replace(/[/.]/g,"-")}function B(a){return(0,e.join)(k,A(a))}function C(a){return(0,e.join)(B(a),"session.json")}function D(a){return(0,e.join)(B(a),"recent-files.json")}function E(a){return(0,e.join)(B(a),"expanded-paths.json")}function F(a){return(0,e.join)(B(a),"comments.json")}function G(a){return(0,e.join)(B(a),"services.json")}function H(a){return(0,e.join)(B(a),"note.md")}function I(a,b){return(0,e.join)(B(a),`terminal-history-${b}.jsonl`)}function J(a,b){return(0,e.join)(B(a),`terminal-output-${b}.txt`)}function K(a,b){let c=b?`terminal-env-${b}.json`:"terminal-env-global.json";return(0,e.join)(B(a),c)}function L(){return(0,e.join)(j,"terminal-aliases.json")}function M(){return(0,e.join)(j,"services.json")}function N(a){return(0,e.join)(B(a),"project-settings.json")}function O(a,b){return(0,e.join)(B(a),`terminal-bubble-order-${b}.json`)}function P(a){return(0,e.join)(r,`${a}.json`)}function Q(a,b){return(0,e.join)((0,e.join)(v,A(a)),`${b}.jsonl`)}function R(a,b){return(0,e.join)((0,e.join)(x,A(a)),`${b}.jsonl`)}function S(a,b){return(0,e.join)((0,e.join)(z,A(a)),`${b}.jsonl`)}function T(a,b){return(0,e.join)((0,e.join)(j,"ollama-sessions",A(a)),`${b}.jsonl`)}function U(a){let b=(0,e.join)(i,".codex","sessions");if(!(0,g.existsSync)(b))return null;try{let c=(0,h.execSync)(`find ${JSON.stringify(b)} -name "*${a}.jsonl" -type f 2>/dev/null`,{encoding:"utf8",timeout:3e3}).trim();if(c)return c.split("\n")[0]}catch{}return null}function V(a){let b=(0,e.join)(i,".kimi","sessions");if(!(0,g.existsSync)(b))return null;try{for(let c of(0,g.readdirSync)(b)){let d=(0,e.join)(b,c,a,"context.jsonl");if((0,g.existsSync)(d))return d}}catch{}return null}async function W(a){(0,g.existsSync)(a)||await (0,f.mkdir)(a,{recursive:!0})}async function X(a){let b=(0,e.join)(a,"..");await W(b)}async function Y(a,b){try{let b=await (0,f.readFile)(a,"utf-8");return JSON.parse(b)}catch{return b}}async function Z(a,b){await X(a),await (0,f.writeFile)(a,JSON.stringify(b,null,2),"utf-8")}let $=globalThis,_=$.__cockpitFileLocks??($.__cockpitFileLocks=new Map);function aa(a,b){let c=(_.get(a)??Promise.resolve()).then(b),d=c.then(()=>{},()=>{});return _.set(a,d),d.then(()=>{_.get(a)===d&&_.delete(a)}),c}},25344:(a,b,c)=>{c.d(b,{BE:()=>l,IS:()=>v,KP:()=>r,ZT:()=>x,_0:()=>s,iU:()=>n,jH:()=>o,zC:()=>t});var d=c(31421),e=c(73024),f=c(76760),g=c.n(f),h=c(57975),i=c(28677);let j=(0,h.promisify)(d.exec),k=new Set([".git","node_modules"]),l=8e3;function m(a){let b=a.toLowerCase(),c=b.lastIndexOf(".");if(c<0)return!1;let d=b.slice(c);for(let a of(0,i.cn)())if(a.toLowerCase()===d)return!0;return!1}async function n(a){try{await j("git rev-parse --git-dir",{cwd:a})}catch{return null}let{stdout:b}=await j("git -c core.quotePath=false ls-files --cached --others --exclude-standard",{cwd:a,maxBuffer:0x3200000}),c=[];for(let a of b.split("\n")){let b=a.trim();if(b&&m(b.slice(b.lastIndexOf("/")+1))&&(c.push(b),c.length>=l))break}return c}async function o(a,b,c){let d;if(!(c.length>=l)){try{d=await e.promises.readdir(a,{withFileTypes:!0})}catch{return}for(let e of d){if(c.length>=l)return;if(k.has(e.name)||e.name.startsWith(".git"))continue;let d=g().join(a,e.name);e.isDirectory()?await o(d,b,c):e.isFile()&&m(e.name)&&c.push(g().relative(b,d))}}}let p=[".ts",".tsx",".js",".jsx",".mjs",".cjs"],q=[".js",".jsx",".mjs",".cjs"];function r(a,b,c){let d=g().relative(b,a);if(d.startsWith(".."))return null;for(let a of q)if(d.endsWith(a)){d=d.slice(0,-a.length);break}if(c.has(d))return d;for(let a of p){let b=d+a;if(c.has(b))return b}for(let a of p){let b=g().join(d,"index"+a);if(c.has(b))return b}return null}function s(a,b){return""===b||a===b||a.startsWith(b+"/")}async function t(a,b){let c=await u(a);if(0===c.length)return new Map;let d=[];try{let{stdout:b}=await j("git -c core.quotePath=false ls-files --cached --others --exclude-standard",{cwd:a,maxBuffer:0x3200000});d=b.split("\n").map(a=>a.trim()).filter(a=>a.endsWith("/package.json")&&!a.includes("node_modules/"))}catch{return new Map}let f=d.filter(a=>{let b=a.slice(0,-13);return c.some(a=>{var c;return c=b,RegExp("^"+a.replace(/\\/g,"/").replace(/[.+^${}()|[\]]/g,"\\$&").replace(/\*\*/g,"___DOUBLESTAR___").replace(/\*/g,"[^/]*").replace(/___DOUBLESTAR___/g,".*")+"$").test(c)})}),h=new Map;for(let c of f){let d;try{d=JSON.parse(await e.promises.readFile(g().join(a,c),"utf8"))}catch{continue}if("string"!=typeof d.name)continue;let f=g().dirname(c),i=function(a,b,c){let d,e=b=>{let d=b.replace(/^\.\//,"");return v(g().posix.join(a,d),c)},f=b.exports;if("string"==typeof f)d=f;else if(f&&"object"==typeof f&&f["."]){let a=f["."];"string"==typeof a?d=a:a&&"object"==typeof a&&(d=a.types??a.import??a.default??a.require)}if("string"==typeof d){let a=e(d);if(a)return a}if("string"==typeof b.main){let a=e(b.main);if(a)return a}for(let b of["src/index.ts","src/index.tsx","index.ts","index.tsx","src/index.js","index.js"])if(c.has(g().posix.join(a,b)))return g().posix.join(a,b);return null}(f,d,b);h.set(d.name,{name:d.name,dir:f,entryFile:i})}return h}async function u(a){try{var b=await e.promises.readFile(g().join(a,"pnpm-workspace.yaml"),"utf8");let c=[],d=!1;for(let a of b.split("\n")){let b=a.replace(/#.*$/,"");if(/^packages\s*:/.test(b)){d=!0;continue}if(!d)continue;let e=b.match(/^\s*-\s*['"]?([^'"#\s]+)['"]?\s*$/);e?c.push(e[1]):/^\S/.test(b)&&(d=!1)}return c}catch{}try{let b=JSON.parse(await e.promises.readFile(g().join(a,"package.json"),"utf8")),c=b?.workspaces;if(Array.isArray(c))return c.filter(a=>"string"==typeof a);if(c&&Array.isArray(c.packages))return c.packages.filter(a=>"string"==typeof a)}catch{}return[]}function v(a,b){if(a.startsWith("..")||a.startsWith("/"))return null;for(let b of q)if(a.endsWith(b)){a=a.slice(0,-b.length);break}if(b.has(a))return a;for(let c of p){let d=a+c;if(b.has(d))return d}for(let c of p){let d=g().posix.join(a,"index"+c);if(b.has(d))return d}return null}async function w(a,b){let c,d=new Map;try{let b=(await e.promises.readFile(a,"utf8")).replace(/^\s*\/\/.*$/gm,"");c=JSON.parse(b)}catch{return d}let f=c?.compilerOptions?.baseUrl??".",h=c?.compilerOptions?.paths??{},i=g().resolve(g().dirname(a),f),j=g().relative(b,i)||".";for(let[a,b]of Object.entries(h)){if(!Array.isArray(b)||0===b.length)continue;let c=a.replace(/\/\*$/,""),e=b[0].replace(/\/\*$/,"");d.set(c,g().join(j,e))}return d}async function x(a){let b=[],c=[];try{let{stdout:b}=await j("git -c core.quotePath=false ls-files --cached --others --exclude-standard",{cwd:a,maxBuffer:0x3200000});c=b.split("\n").map(a=>a.trim()).filter(a=>/(^|\/)tsconfig[^/]*\.json$/.test(a)&&!a.includes("node_modules/"))}catch{try{await e.promises.access(g().join(a,"tsconfig.json")),c=["tsconfig.json"]}catch{}}for(let d of c){let c=await w(g().join(a,d),a);if(0===c.size)continue;let e=g().dirname(d);b.push({scope:"."===e?"":e,aliases:c,sortedAliases:y(c)})}let d=b.find(a=>""===a.scope);return d||(d={scope:"",aliases:new Map,sortedAliases:[]},b.push(d)),d.aliases.has("@")||(d.aliases.set("@","./src"),d.sortedAliases=y(d.aliases)),b.sort((a,b)=>b.scope.length-a.scope.length)}function y(a){return[...a.entries()].sort(([a],[b])=>b.length-a.length)}},27485:(a,b,c)=>{c.d(b,{_:()=>e});let d=new Set(["function","class","method"]);function e(a){return d.has(a.kind)}},28677:(a,b,c)=>{c.d(b,{Bu:()=>f,cn:()=>g,ik:()=>e});let d=new Map;function e(a){d.set(a.grammarId,a)}function f(a){let b=d.get(a);if(!b)throw Error(`[codeMap] no handler registered for grammar '${a}' — did the handler module get imported (handlers/index.ts barrel)?`);return b}function g(){let a=new Set;for(let b of d.values())for(let c of b.extensions)a.add(c.toLowerCase());return[...a]}},33265:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{E:()=>A,J:()=>F,Mv:()=>E,Xn:()=>D,bQ:()=>B,cl:()=>u,ih:()=>r,s7:()=>z,u$:()=>t,xl:()=>v});var e=c(73024),f=c(76760),g=c.n(f),h=c(87956),i=c(86236),j=c(25344),k=c(27485),l=c(37765),m=a([h]);async function n(a,b,c){let d=Array(a.length),e=0;async function f(){for(;e<a.length;){let b=e++;d[b]=await c(a[b])}}return await Promise.all(Array.from({length:Math.min(b,a.length)},f)),d}async function o(a,b){let c,d,f,g=(0,h.M)(b);if(!g)return null;try{[c,d]=await Promise.all([e.promises.readFile(a,"utf8"),e.promises.stat(a).then(a=>a.mtimeMs)])}catch{return null}if(c.length>1e6)return null;let i=await (0,h.b)(g);try{f=i.parse(c)}catch(a){return console.error("[codeIndex] parse failed for",b,a),null}if(!f)return null;try{let a,e=(0,l.Bu)(g),h=e.extractSymbols(f.rootNode,c),i=(a=[],!function c(d){for(let e of d)a.push({filePath:b,qualifiedName:e.qualifiedName,name:e.name,kind:e.kind,startLine:e.startLine,endLine:e.endLine,params:e.params}),c(e.children)}(h),a),{specs:j,bindings:k}=e.extractImports(f.rootNode),m=e.extractCallSites(f.rootNode,i);return{path:b,language:g,mtime:d,symbolsTree:h,flatSymbols:i,importBindings:k,importSpecifiers:j,rawCalls:m}}finally{f.delete()}}function p(a,b){let c=null;for(let d of a)d.startLine<=b&&b<=d.endLine&&(!c||d.endLine-d.startLine<c.endLine-c.startLine)&&(c=d);return c}async function q(a){let b=Date.now(),c=await (0,j.iU)(a);c||(c=[],await (0,j.jH)(a,a,c));let d=c.length>j.BE;d&&(c=c.slice(0,j.BE));let e=new Set(c),f=await (0,j.ZT)(a),h=await (0,j.zC)(a,e),k=new Map;for(let b of i.I){let c=(0,l.Bu)(b);k.set(b,await c.buildProjectContext(a,e))}let m=(await n(c,50,b=>o(g().join(a,b),b))).filter(a=>null!==a),q=new Map;for(let a of m){let b=(0,l.Bu)(a.language),c=k.get(a.language),d=new Map,f=new Set;for(let g of a.importSpecifiers){if(d.has(g))continue;let h=b.resolveSpecifier(g,a.path,c,e);h&&h!==a.path&&(d.set(g,h),f.add(h))}let g=new Map,h=new Map;for(let b of a.flatSymbols){h.set(b.qualifiedName,b);let a=g.get(b.name);a?a.push(b):g.set(b.name,[b])}let i=new Map,j=new Map;for(let b of a.importBindings)b.isReexport?j.set(b.localName,b):i.set(b.localName,b);q.set(a.path,{path:a.path,language:a.language,mtime:a.mtime,symbolsTree:a.symbolsTree,flatSymbols:a.flatSymbols,importedFiles:f,importedBy:new Set,importBindings:a.importBindings,resolvedImports:d,intraCalls:[],outgoingCalls:[],incomingCalls:[],externalCalls:[],methodCalls:[],symbolsByName:g,symbolsByQname:h,bindingsByLocalName:i,reexportsByLocalName:j})}for(let a of q.values())for(let b of a.importedFiles){let c=q.get(b);c&&c.importedBy.add(a.path)}for(let a of m){let b=q.get(a.path),c=(0,l.Bu)(a.language),d=k.get(a.language),e=new Map,f=new Map,g=new Map,h=new Map;for(let i of a.rawCalls){let a=p(b.flatSymbols,i.line);if(a){for(let j of c.resolveCall(i,a,b,q,d))if("symbol"===j.kind)if(j.addr.filePath===b.path){let c=`${a.qualifiedName}${j.addr.qualifiedName}`,d=e.get(c);if(d)d.lines.push(i.line);else{let d={from:a.qualifiedName,to:j.addr.qualifiedName,lines:[i.line]};e.set(c,d),b.intraCalls.push(d)}}else{let c=`${a.qualifiedName}${j.addr.filePath}${j.addr.qualifiedName}`,d=f.get(c);if(d)d.lines.push(i.line);else{let d={from:a.qualifiedName,to:{filePath:j.addr.filePath,qualifiedName:j.addr.qualifiedName},lines:[i.line]};f.set(c,d),b.outgoingCalls.push(d)}}else if("external"===j.kind){let c=`${a.qualifiedName}${j.packageSpec}${j.name}`,d=g.get(c);if(d)d.lines.push(i.line);else{let d={from:a.qualifiedName,packageSpec:j.packageSpec,importedName:j.name,lines:[i.line]};g.set(c,d),b.externalCalls.push(d)}}else if("method-unresolved"===j.kind){let c=b.bindingsByLocalName.get(j.receiverName),d=c?b.resolvedImports.get(c.specifier)??"":"",e=`${a.qualifiedName}${j.receiverName}${j.methodName}`,f=h.get(e);if(f)f.lines.push(i.line);else{let c={from:a.qualifiedName,receiverName:j.receiverName,methodName:j.methodName,receiverFilePath:d,lines:[i.line]};h.set(e,c),b.methodCalls.push(c)}}}}for(let a of b.intraCalls)a.lines.sort((a,b)=>a-b);for(let a of b.outgoingCalls)a.lines.sort((a,b)=>a-b);for(let a of b.externalCalls)a.lines.sort((a,b)=>a-b);for(let a of b.methodCalls)a.lines.sort((a,b)=>a-b)}for(let a of q.values())for(let b of a.outgoingCalls){let c=q.get(b.to.filePath);c&&c.incomingCalls.push({from:{filePath:a.path,qualifiedName:b.from},to:b.to.qualifiedName,lines:b.lines})}return{cwd:a,files:q,truncated:d,fileCountCap:d?j.BE:void 0,tsconfigs:f,workspaces:h,projectContexts:k,fileSet:e,generatedAt:Date.now(),buildMs:Date.now()-b}}h=(m.then?(await m)():m)[0];let G=new Map,H=new Map,I=new Set,J=new Set,K=null;function r(a){if(K=a,a)for(let b of J)a(b,()=>I.add(b))}async function s(a,b){let c=Array.from(b.files.keys()),d=0,e=async()=>{for(;d<c.length;){let e=d++;try{await v(a,c[e],b)}catch{}}};await Promise.all(Array.from({length:Math.min(8,c.length)},e))}async function t(a,b={}){!J.has(a)&&(J.add(a),K&&K(a,()=>I.add(a))),b.forceRefresh&&(G.delete(a),I.delete(a));let c=G.get(a);if(c){if(I.has(a)){I.delete(a);try{await s(a,c)}catch{}}return c}let d=H.get(a);if(d)return d;let e=q(a).then(b=>(G.set(a,b),H.delete(a),I.delete(a),b));return H.set(a,e),e}function u(a){if(!a){G.clear(),H.clear(),I.clear();return}G.delete(a),H.delete(a),I.delete(a)}async function v(a,b,c){let d,f=c.files.get(b);if(!f)return!1;try{d=(await e.promises.stat(g().join(a,b))).mtimeMs}catch{return!1}if(d===f.mtime)return!1;let h=await o(g().join(a,b),b);if(!h)return!1;let i=(0,l.Bu)(h.language),j=c.projectContexts.get(h.language),k=new Map,m=new Set;for(let a of h.importSpecifiers){if(k.has(a))continue;let b=i.resolveSpecifier(a,h.path,j,c.fileSet);b&&b!==h.path&&(k.set(a,b),m.add(b))}let n=new Map,q=new Map;for(let a of h.flatSymbols){q.set(a.qualifiedName,a);let b=n.get(a.name);b?b.push(a):n.set(a.name,[a])}let r=new Map,s=new Map;for(let a of h.importBindings)a.isReexport?s.set(a.localName,a):r.set(a.localName,a);let t={path:h.path,language:h.language,mtime:h.mtime,symbolsTree:h.symbolsTree,flatSymbols:h.flatSymbols,importedFiles:m,importedBy:f.importedBy,importBindings:h.importBindings,resolvedImports:k,intraCalls:[],outgoingCalls:[],incomingCalls:f.incomingCalls,externalCalls:[],methodCalls:[],symbolsByName:n,symbolsByQname:q,bindingsByLocalName:r,reexportsByLocalName:s},u=new Map,v=new Map,w=new Map,x=new Map;for(let a of(c.files.set(h.path,t),h.rawCalls)){let b=p(t.flatSymbols,a.line);if(b){for(let d of i.resolveCall(a,b,t,c.files,j))if("symbol"===d.kind)if(d.addr.filePath===t.path){let c=`${b.qualifiedName}${d.addr.qualifiedName}`,e=u.get(c);if(e)e.lines.push(a.line);else{let e={from:b.qualifiedName,to:d.addr.qualifiedName,lines:[a.line]};u.set(c,e),t.intraCalls.push(e)}}else{let c=`${b.qualifiedName}${d.addr.filePath}${d.addr.qualifiedName}`,e=v.get(c);if(e)e.lines.push(a.line);else{let e={from:b.qualifiedName,to:{filePath:d.addr.filePath,qualifiedName:d.addr.qualifiedName},lines:[a.line]};v.set(c,e),t.outgoingCalls.push(e)}}else if("external"===d.kind){let c=`${b.qualifiedName}${d.packageSpec}${d.name}`,e=w.get(c);if(e)e.lines.push(a.line);else{let e={from:b.qualifiedName,packageSpec:d.packageSpec,importedName:d.name,lines:[a.line]};w.set(c,e),t.externalCalls.push(e)}}else if("method-unresolved"===d.kind){let c=t.bindingsByLocalName.get(d.receiverName),e=c?t.resolvedImports.get(c.specifier)??"":"",f=`${b.qualifiedName}${d.receiverName}${d.methodName}`,g=x.get(f);if(g)g.lines.push(a.line);else{let c={from:b.qualifiedName,receiverName:d.receiverName,methodName:d.methodName,receiverFilePath:e,lines:[a.line]};x.set(f,c),t.methodCalls.push(c)}}}}for(let a of t.intraCalls)a.lines.sort((a,b)=>a-b);for(let a of t.outgoingCalls)a.lines.sort((a,b)=>a-b);for(let a of t.externalCalls)a.lines.sort((a,b)=>a-b);for(let a of t.methodCalls)a.lines.sort((a,b)=>a-b);return!0}function w(a){return{filePath:a.filePath,qualifiedName:a.qualifiedName,name:a.name,kind:a.kind,startLine:a.startLine,endLine:a.endLine,params:a.params}}function x(a){let b=a.indexOf(">");return b>=0?a.slice(0,b):a}function y(a){if(a.length<2)return a;let b=[a[0]];for(let c=1;c<a.length;c++)a[c]!==a[c-1]&&b.push(a[c]);return b}function z(a,b){let c=a.files.get(b);if(!c)return null;let d=c.flatSymbols.filter(a=>!a.qualifiedName.includes(">")).map(w).sort((a,b)=>a.startLine-b.startLine),e=new Set(d.map(a=>a.qualifiedName)),f=new Map,g=[];for(let a of c.intraCalls){let b=x(a.from),c=x(a.to);if(b===c||!e.has(b)||!e.has(c))continue;let d=`${b}|${c}`,h=f.get(d);if(h)for(let b of a.lines)h.lines.push(b);else{let e={from:b,to:c,lines:a.lines.slice()};f.set(d,e),g.push(e)}}for(let a of g)a.lines.sort((a,b)=>a-b),a.lines=y(a.lines);let h=[],i=new Map;for(let b of c.outgoingCalls){let d=x(b.from);if(!e.has(d)||b.to.filePath===c.path)continue;let f=a.files.get(b.to.filePath);if(!f)continue;let g=f.symbolsByQname.get(b.to.qualifiedName);if(!g||!(0,k._)(g))continue;let j=`${g.filePath}|${g.qualifiedName}|${d}`,l=i.get(j);if(l)for(let a of b.lines)l.lines.push(a);else{let a={external:w(g),focalQname:d,lines:b.lines.slice()};i.set(j,a),h.push(a)}}let j=[],l=new Map;for(let b of c.incomingCalls){let d=x(b.to);if(!e.has(d)||b.from.filePath===c.path)continue;let f=a.files.get(b.from.filePath);if(!f)continue;let g=f.symbolsByQname.get(b.from.qualifiedName);if(!g||!(0,k._)(g))continue;let h=`${g.filePath}|${g.qualifiedName}|${d}`,i=l.get(h);if(i)for(let a of b.lines)i.lines.push(a);else{let a={external:w(g),focalQname:d,lines:b.lines.slice()};l.set(h,a),j.push(a)}}for(let a of h)a.lines.sort((a,b)=>a-b),a.lines=y(a.lines);for(let a of j)a.lines.sort((a,b)=>a-b),a.lines=y(a.lines);let m=[],n=new Map;for(let a of c.externalCalls){let b=x(a.from);if(!e.has(b))continue;let c=`${b}|${a.packageSpec}|${a.importedName}`,d=n.get(c);if(d)for(let b of a.lines)d.lines.push(b);else{let d={external:{name:a.importedName,packageSpec:a.packageSpec},focalQname:b,lines:a.lines.slice()};n.set(c,d),m.push(d)}}for(let a of m)a.lines.sort((a,b)=>a-b),a.lines=y(a.lines);let o=[],p=new Map;for(let a of c.methodCalls){let b=x(a.from);if(!e.has(b))continue;let c=`${b}|${a.receiverName}|${a.methodName}`,d=p.get(c);if(d)for(let b of a.lines)d.lines.push(b);else{let d={focalQname:b,receiverName:a.receiverName,methodName:a.methodName,receiverFilePath:a.receiverFilePath,lines:a.lines.slice()};p.set(c,d),o.push(d)}}for(let a of o)a.lines.sort((a,b)=>a-b),a.lines=y(a.lines);let q=(a,b)=>a.external.filePath.localeCompare(b.external.filePath)||a.external.qualifiedName.localeCompare(b.external.qualifiedName);return j.sort(q),h.sort(q),m.sort((a,b)=>a.external.packageSpec.localeCompare(b.external.packageSpec)||a.external.name.localeCompare(b.external.name)),o.sort((a,b)=>a.receiverName.localeCompare(b.receiverName)||a.methodName.localeCompare(b.methodName)),{filePath:c.path,language:c.language,fileCount:a.files.size,mtimeMs:c.mtime,functions:d,intraCalls:g,externalCalls:m,methodCalls:o,upstreamCalls:j,downstreamCalls:h}}function A(a,b){let c=a.files.get(b);return c?{filePath:c.path,language:c.language,symbols:function a(b){let c=[];for(let d of b)"unknown"!==d.kind&&c.push({...d,children:a(d.children)});return c}(c.symbolsTree)}:null}function B(a,b,c){let d=b.trim().toLowerCase();if(!d)return{files:[],symbols:[]};let e=[];for(let b of a.files.values()){if(e.length>=c)break;b.path.toLowerCase().includes(d)&&e.push({type:"file",label:function(a){let b=a.lastIndexOf("/");return b>=0?a.slice(b+1):a}(b.path),hint:b.path,target:{kind:"file",filePath:b.path}})}let f=[];for(let b of a.files.values()){let a=!1;if(!function a(b,c){for(let d of b)if(c(d)||a(d.children,c))return!0;return!1}(b.symbolsTree,e=>f.length>=c?(a=!0,!0):"unknown"!==e.kind&&(e.name.toLowerCase().includes(d)&&f.push({type:"symbol",label:e.name,hint:`${e.kind} \xb7 ${b.path}`,target:{kind:"symbol",filePath:b.path,line:e.startLine,symbolName:e.name,symbolKind:e.kind,qualifiedName:e.qualifiedName}}),!1)),a)break}return{files:e,symbols:f}}function C(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 D(a,b,c){let d=C(a,b,c);if(0===d.length)return{qname:b,target:null,callers:[]};let e=[],f=new Map;for(let c of d){for(let a of c.intraCalls){if(a.to!==b)continue;let d=c.symbolsByQname.get(a.from);if(!d)continue;let g=`${c.path}|${a.from}`,h=f.get(g);if(h)for(let b of a.lines)h.callLines.push(b);else{let b={caller:w(d),callLines:a.lines.slice()};f.set(g,b),e.push(b)}}for(let d of c.incomingCalls){if(d.to!==b)continue;let c=a.files.get(d.from.filePath),g=c?.symbolsByQname.get(d.from.qualifiedName);if(!g)continue;let h=`${d.from.filePath}|${d.from.qualifiedName}`,i=f.get(h);if(i)for(let a of d.lines)i.callLines.push(a);else{let a={caller:w(g),callLines:d.lines.slice()};f.set(h,a),e.push(a)}}}for(let a of e)a.callLines.sort((a,b)=>a-b),a.callLines=y(a.callLines);e.sort((a,b)=>a.caller.filePath.localeCompare(b.caller.filePath)||a.caller.qualifiedName.localeCompare(b.caller.qualifiedName));let g=w(d[0].symbolsByQname.get(b)),h=d.length>1?d.map(a=>a.path):void 0;return{qname:b,target:g,callers:e,ambiguousIn:h}}function E(a,b,c){let d=C(a,b,c);if(0===d.length)return{qname:b,source:null,callees:[]};let e=[],f=new Map;for(let c of d){for(let a of c.intraCalls){if(a.from!==b)continue;let d=c.symbolsByQname.get(a.to);if(!d)continue;let g=`${c.path}|${a.to}`,h=f.get(g);if(h)for(let b of a.lines)h.callLines.push(b);else{let b={callee:w(d),callLines:a.lines.slice()};f.set(g,b),e.push(b)}}for(let d of c.outgoingCalls){if(d.from!==b)continue;let c=a.files.get(d.to.filePath),g=c?.symbolsByQname.get(d.to.qualifiedName);if(!g)continue;let h=`${d.to.filePath}|${d.to.qualifiedName}`,i=f.get(h);if(i)for(let a of d.lines)i.callLines.push(a);else{let a={callee:w(g),callLines:d.lines.slice()};f.set(h,a),e.push(a)}}}for(let a of e)a.callLines.sort((a,b)=>a-b),a.callLines=y(a.callLines);e.sort((a,b)=>a.callee.filePath.localeCompare(b.callee.filePath)||a.callee.qualifiedName.localeCompare(b.callee.qualifiedName));let g=w(d[0].symbolsByQname.get(b)),h=d.length>1?d.map(a=>a.path):void 0;return{qname:b,source:g,callees:e,ambiguousIn:h}}function F(a,b,c,d){let e=C(a,b,d);if(0===e.length)return{qname:b,target:null,nodes:[],truncated:!1};let f=Math.min(Math.max(c,1),5),g=w(e[0].symbolsByQname.get(b)),h=e.length>1?e.map(a=>a.path):void 0,i=e.map(a=>({filePath:a.path,qname:b})),j=new Set(i.map(a=>`${a.filePath}|${a.qname}`)),k=i.map(b=>{let c=a.files.get(b.filePath).symbolsByQname.get(b.qname);return{symbol:w(c),depth:0}}),l=i.slice(),m=!1;for(let b=1;b<=f;b++){let c=[];for(let d of l){let e=a.files.get(d.filePath);if(e){for(let a of e.intraCalls){if(a.to!==d.qname)continue;let f=e.symbolsByQname.get(a.from);if(!f)continue;let g=`${e.path}|${a.from}`;if(!j.has(g)&&(j.add(g),k.push({symbol:w(f),depth:b}),c.push({filePath:e.path,qname:a.from}),k.length>=500)){m=!0;break}}if(m)break;for(let f of e.incomingCalls){if(f.to!==d.qname)continue;let e=a.files.get(f.from.filePath),g=e?.symbolsByQname.get(f.from.qualifiedName);if(!g)continue;let h=`${f.from.filePath}|${f.from.qualifiedName}`;if(!j.has(h)&&(j.add(h),k.push({symbol:w(g),depth:b}),c.push({filePath:f.from.filePath,qname:f.from.qualifiedName}),k.length>=500)){m=!0;break}}if(m)break}}if(m||0===c.length)break;l=c}return k.sort((a,b)=>a.depth-b.depth||a.symbol.filePath.localeCompare(b.symbol.filePath)||a.symbol.qualifiedName.localeCompare(b.symbol.qualifiedName)),{qname:b,target:g,nodes:k,truncated:m,ambiguousIn:h}}d()}catch(a){d(a)}})},37765:(a,b,c)=>{c.d(b,{Bu:()=>d.Bu});var d=c(28677),e=c(76760),f=c.n(e);function g(a){let b=0xdeadbeef,c=0x41c6ce57;for(let d=0;d<a.length;d++){let e=a.charCodeAt(d);b=Math.imul(b^e,0x9e3779b1),c=Math.imul(c^e,0x5f356495)}return b=Math.imul(b^b>>>16,0x85ebca6b)^Math.imul(c^c>>>13,0xc2b2ae35),(0x100000000*(2097151&(c=Math.imul(c^c>>>16,0x85ebca6b)^Math.imul(b^b>>>13,0xc2b2ae35)))+(b>>>0)>>>0).toString(16)}function h(a){return a.replace(/\s+/g," ").trim()}function i(a,b){return a?`${a}>${b}`:b}function j(a){let b=a.childForFieldName("name");if(b)return b.text;for(let b=0;b<a.namedChildCount;b++){let c=a.namedChild(b);if(c&&("identifier"===c.type||"type_identifier"===c.type||"property_identifier"===c.type))return c.text}return"<anonymous>"}function k(a,b,c,d,e=[],f){return{qualifiedName:i(d,b),name:b,kind:c,startLine:a.startPosition.row+1,endLine:a.endPosition.row+1,contentHash:g(h(a.text)),children:e,params:f}}function l(a){let b=a.childForFieldName("parameter");if(b)return[b.text];let c=a.childForFieldName("parameters");if(!c)return;let d=[];for(let a=0;a<c.namedChildCount;a++){let b=c.namedChild(a);b&&d.push(function a(b){switch(b.type){case"required_parameter":case"optional_parameter":{let c=b.childForFieldName("pattern");return c?a(c):b.text}case"assignment_pattern":{let c=b.childForFieldName("left");return c?a(c):b.text}case"default_parameter":case"typed_default_parameter":{let a=b.childForFieldName("name");return a?a.text:b.text}case"typed_parameter":for(let a=0;a<b.namedChildCount;a++){let c=b.namedChild(a);if(c?.type==="identifier")return c.text}return b.text;default:return b.text}}(b))}return d}function m(a,b){let c=a.text.split("\n"),d=c.length;if(0===d)return[];let e=new Uint8Array(d+2);for(let a of b){let b=Math.max(1,a.startLine),c=Math.min(d,a.endLine);for(let a=b;a<=c;a++)e[a]=1}let f=[],i=(a,b)=>{let d=!1;for(let e=a;e<=b;e++){let a=c[e-1];if(a&&a.trim().length>0){d=!0;break}}if(!d)return;let e=c.slice(a-1,b).join("\n");f.push({qualifiedName:`__code_${a}_${b}__`,name:"code",kind:"unknown",startLine:a,endLine:b,contentHash:g(h(e)),children:[]})},j=-1;for(let a=1;a<=d;a++)e[a]?j>=0&&(i(j,a-1),j=-1):j<0&&(j=a);return j>=0&&i(j,d),f}function n(a){let b=[],c=function(a){let b=[],c=-1,d=-1;for(let e=0;e<a.namedChildCount;e++){let f=a.namedChild(e);if(f){if("import_statement"===f.type||"export_statement"===f.type&&null!==f.childForFieldName("source")||"import_from_statement"===f.type||"future_import_statement"===f.type)b.push(f),c<0&&(c=f.startPosition.row+1),d=f.endPosition.row+1;else if(c>=0)break}}return c<0?null:{qualifiedName:"__imports__",name:"imports",kind:"unknown",startLine:c,endLine:d,contentHash:g(h(b.map(a=>a.text).join("\n"))),children:[]}}(a);c&&b.push(c);for(let c=0;c<a.namedChildCount;c++){let d=a.namedChild(c);d&&b.push(...function a(b,c,d=!1){switch(b.type){case"export_statement":case"export_default_declaration":{let d=[];for(let e=0;e<b.namedChildCount;e++){let f=b.namedChild(e);f&&d.push(...a(f,c,!0))}return d}case"function_declaration":case"generator_function_declaration":case"function_definition":return[k(b,j(b),"function",c,[],l(b))];case"class_declaration":case"abstract_class_declaration":{let a=j(b),d=i(c,a),e=function(a,b){if(!a)return[];let c=[];for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(e){if("method_definition"===e.type)c.push(k(e,j(e),"method",b,[],l(e)));else if("public_field_definition"===e.type){let a=e.childForFieldName("value");a&&("arrow_function"===a.type||"function_expression"===a.type)&&c.push(k(e,j(e),"method",b,[],l(a)))}}}return c}(b.childForFieldName("body"),d);return[k(b,a,"class",c,e)]}case"interface_declaration":return[k(b,j(b),"interface",c)];case"type_alias_declaration":return[k(b,j(b),"type",c)];case"enum_declaration":return[k(b,j(b),"enum",c)];case"lexical_declaration":case"variable_declaration":return function(a,b){let c=[];for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(!e||"variable_declarator"!==e.type)continue;let f=e.childForFieldName("name"),g=e.childForFieldName("value");if(!f)continue;let h=f.text,i=g&&("arrow_function"===g.type||"function_expression"===g.type),m=i&&g?l(g):void 0;if(c.push(k(a,h,i?"function":"const",b,[],m)),g&&"object"===g.type&&!i){let a=b?`${b}>${h}`:h;for(let b=0;b<g.namedChildCount;b++){let d=g.namedChild(b);if(d){if("pair"===d.type){let b=d.childForFieldName("key"),e=d.childForFieldName("value");if(!b||!e||"property_identifier"!==b.type&&"identifier"!==b.type||"arrow_function"!==e.type&&"function_expression"!==e.type)continue;c.push(k(d,b.text,"method",a,[],l(e)))}else if("method_definition"===d.type){let b=j(d);b&&c.push(k(d,b,"method",a,[],l(d)))}}}}}return c}(b,c);case"class_definition":{let a=j(b),d=i(c,a),e=function a(b,c){if(!b)return[];let d=[];for(let e=0;e<b.namedChildCount;e++){let f=b.namedChild(e);if(f){if("function_definition"===f.type)d.push(k(f,j(f),"method",c,[],l(f)));else if("decorated_definition"===f.type){let b=f.childForFieldName("definition");if(b?.type==="function_definition")d.push({...k(b,j(b),"method",c,[],l(b)),startLine:f.startPosition.row+1,contentHash:g(h(f.text))});else if(b?.type==="class_definition"){let e=j(b),l=i(c,e),m=a(b.childForFieldName("body"),l);d.push({...k(b,e,"class",c,m),startLine:f.startPosition.row+1,contentHash:g(h(f.text))})}}else if("class_definition"===f.type){let b=j(f),e=i(c,b),g=a(f.childForFieldName("body"),e);d.push(k(f,b,"class",c,g))}}}return d}(b.childForFieldName("body"),d);return[k(b,a,"class",c,e)]}case"decorated_definition":{let d=b.childForFieldName("definition");if(!d)return[];return a(d,c,!1).map(a=>({...a,startLine:b.startPosition.row+1,contentHash:g(h(b.text))}))}case"expression_statement":{let a=[];for(let d=0;d<b.namedChildCount;d++){let e=b.namedChild(d);if(e?.type==="assignment"){let d=function(a,b,c){let d=b.childForFieldName("left");if(!d||"identifier"!==d.type)return null;let e=d.text;return{qualifiedName:i(c,e),name:e,kind:"const",startLine:a.startPosition.row+1,endLine:a.endPosition.row+1,contentHash:g(h(a.text)),children:[]}}(b,e,c);d&&a.push(d)}}return a.push(...function(a,b){let c=null;for(let b=0;b<a.namedChildCount;b++){let d=a.namedChild(b);if(d){if("call_expression"===d.type){c=d;break}if("await_expression"===d.type){for(let a=0;a<d.namedChildCount;a++){let b=d.namedChild(a);if(b?.type==="call_expression"){c=b;break}}break}}}if(!c)return[];let d=c.childForFieldName("function"),e=c.childForFieldName("arguments");if(!d||!e)return[];let f=null,g=[];for(let a=0;a<e.namedChildCount;a++){let b=e.namedChild(a);if(b){if(null===f&&("string"===b.type||"template_string"===b.type)){let a=b.text;f=a.length>=2&&/^["'`]/.test(a)?a.slice(1,-1):a}("arrow_function"===b.type||"function_expression"===b.type)&&g.push(b)}}if(0===g.length||!f)return[];let h=function a(b){if("identifier"===b.type)return b.text;if("member_expression"===b.type){let a=b.childForFieldName("property");return a?.text??""}if("call_expression"===b.type){let c=b.childForFieldName("function");return c?a(c):""}return""}(d),i=h?`${h} ${f}`:f;return g.map((a,c)=>k(a,g.length>1?`${i} #${c+1}`:i,"function",b,[],l(a)))}(b,c)),a}default:return[]}}(d,void 0,!1))}return b.push(...m(a,b)),b}function o(a){let b=[];return!function a(c){if("call_expression"===c.type||"call"===c.type){let a=c.childForFieldName("function"),d=function a(b){if(!b)return null;if("identifier"===b.type||"shorthand_property_identifier"===b.type)return b.text;if("member_expression"===b.type){let a=b.childForFieldName("property");return a?.text??null}if("attribute"===b.type){let a=b.childForFieldName("attribute");return a?.text??null}return"call_expression"===b.type||"call"===b.type?a(b.childForFieldName("function")):null}(a);if(d){let e=function(a){if(!a||"member_expression"!==a.type&&"attribute"!==a.type)return;let b=a;for(;b;){if("identifier"===b.type)return b.text;if("this"===b.type||"super"===b.type)break;if("member_expression"===b.type||"attribute"===b.type){b=b.childForFieldName("object");continue}break}}(a);b.push({calleeName:d,line:c.startPosition.row+1,...e?{receiverName:e}:{}})}}else if("jsx_opening_element"===c.type||"jsx_self_closing_element"===c.type){let a=function a(b){return b?"identifier"===b.type?/^[A-Z]/.test(b.text)?b.text:null:"member_expression"===b.type||"jsx_member_expression"===b.type?a(b.childForFieldName("object")??b.namedChild(0)):null:null}(c.childForFieldName("name"));a&&b.push({calleeName:a,line:c.startPosition.row+1})}for(let b=0;b<c.childCount;b++){let d=c.child(b);d&&a(d)}}(a),b}function p(a){let b=[];for(let c=0;c<a.namedChildCount;c++){let d=a.namedChild(c);if(d)if("import_statement"===d.type){let a=d.childForFieldName("source");a?function(a,b,c){let d=q(b.text),e=null;for(let b=0;b<a.namedChildCount;b++){let c=a.namedChild(b);if(c?.type==="import_clause"){e=c;break}}if(e)for(let a=0;a<e.namedChildCount;a++){let b=e.namedChild(a);if(b){if("identifier"===b.type)c.push({specifier:d,importedName:"default",localName:b.text});else if("namespace_import"===b.type){let a=function(a,b){for(let c=0;c<a.namedChildCount;c++){let d=a.namedChild(c);if(d?.type===b)return d}return null}(b,"identifier");a&&c.push({specifier:d,importedName:"*",localName:a.text})}else if("named_imports"===b.type)for(let a=0;a<b.namedChildCount;a++){let e=b.namedChild(a);if(!e||"import_specifier"!==e.type)continue;let f=e.childForFieldName("name"),g=e.childForFieldName("alias");f&&c.push({specifier:d,importedName:f.text,localName:g?.text??f.text})}}}}(d,a,b):function(a,b){for(let c=0;c<a.childCount;c++){let d=a.child(c);if(d&&"name"===a.fieldNameForChild(c)){if("dotted_name"===d.type){let a=d.text,c=a.split(".")[0];b.push({specifier:a,importedName:"*",localName:c})}else if("aliased_import"===d.type){let a=d.childForFieldName("name"),c=d.childForFieldName("alias");a?.type==="dotted_name"&&c&&b.push({specifier:a.text,importedName:"*",localName:c.text})}}}}(d,b)}else"import_from_statement"===d.type&&function(a,b){let c=a.childForFieldName("module_name"),d="";if(c){if("dotted_name"===c.type)d=c.text;else if("relative_import"===c.type){let a="",b="";for(let d=0;d<c.namedChildCount;d++){let e=c.namedChild(d);e&&("import_prefix"===e.type?a=e.text:"dotted_name"===e.type&&(b=e.text))}d=a+b}}if(!d)return;let e=!1;for(let c=0;c<a.childCount;c++){let f=a.child(c);if(!f)continue;let g=a.fieldNameForChild(c);if("wildcard_import"===f.type){e=!0;continue}if("name"===g){if("dotted_name"===f.type){let a=f.text;b.push({specifier:d,importedName:a,localName:a})}else if("aliased_import"===f.type){let a=f.childForFieldName("name"),c=f.childForFieldName("alias");a?.type==="dotted_name"&&c&&b.push({specifier:d,importedName:a.text,localName:c.text})}}}e&&b.push({specifier:d,importedName:"*",localName:"*"})}(d,b)}return b}function q(a){return a.length>=2&&('"'===a[0]||"'"===a[0])&&a[a.length-1]===a[0]?a.slice(1,-1):a}function r(a){let b=[];function c(a){if(!a||"string"!==a.type)return null;for(let b=0;b<a.namedChildCount;b++){let c=a.namedChild(b);if(c&&"string_fragment"===c.type)return c.text}return""}return!function a(d){switch(d.type){case"import_statement":case"export_statement":{let a=c(d.childForFieldName("source"));a&&b.push(a);return}case"call_expression":{let a=d.childForFieldName("function");if(a){let e="import"===a.type,f="identifier"===a.type&&"require"===a.text;if(e||f){let a=d.childForFieldName("arguments");if(a&&a.namedChildCount>0){let d=c(a.namedChild(0));d&&b.push(d)}}}}}for(let b=0;b<d.namedChildCount;b++){let c=d.namedChild(b);c&&a(c)}}(a),b}let s={typescript:r,tsx:r,javascript:r,python:function(a){let b=[];return!function a(c){switch(c.type){case"import_statement":for(let a=0;a<c.childCount;a++){let d=c.child(a);if(d&&"name"===c.fieldNameForChild(a)){if("dotted_name"===d.type)b.push(d.text);else if("aliased_import"===d.type){let a=d.childForFieldName("name");a?.type==="dotted_name"&&b.push(a.text)}}}return;case"import_from_statement":{let a=function(a){let b=a.childForFieldName("module_name");if(!b)return"";if("dotted_name"===b.type)return b.text;if("relative_import"===b.type){let a="",c="";for(let d=0;d<b.namedChildCount;d++){let e=b.namedChild(d);e&&("import_prefix"===e.type?a=e.text:"dotted_name"===e.type&&(c=e.text))}return a+c}return""}(c);a&&b.push(a);return}}for(let b=0;b<c.namedChildCount;b++){let d=c.namedChild(b);d&&a(d)}}(a),b}};function t(a,b){let c=s[b];return c?c(a):[]}var u=c(25344);function v(a){return"function"===a||"class"===a||"method"===a}function w(a,b){return{grammarId:a,extensions:b,extractSymbols:(a,b)=>n(a),extractImports:b=>({specs:t(b,a),bindings:[...p(b),...function(a){let b=[];for(let c=0;c<a.namedChildCount;c++){let d=a.namedChild(c);if(!d||"export_statement"!==d.type)continue;let e=d.childForFieldName("source");if(!e)continue;let f=q(e.text),g=null;for(let a=0;a<d.namedChildCount;a++){let b=d.namedChild(a);if(b?.type==="export_clause"){g=b;break}}if(g)for(let a=0;a<g.namedChildCount;a++){let c=g.namedChild(a);if(!c||"export_specifier"!==c.type)continue;let d=c.childForFieldName("name"),e=c.childForFieldName("alias");if(!d)continue;let h=d.text,i=e?.text??h;b.push({localName:i,specifier:f,importedName:h,isReexport:!0})}}return b}(b)]}),extractCallSites:(a,b)=>o(a),async buildProjectContext(a,b){let c=new Set(b),d=await (0,u.ZT)(a),e=await (0,u.zC)(a,c),f=[...e.keys()].sort((a,b)=>b.length-a.length);return{cwd:a,tsconfigs:d,workspaces:e,sortedWsNames:f,owningScopesCache:new Map}},resolveSpecifier(a,b,c,d){let e=c.owningScopesCache.get(b);if(e||(e=c.tsconfigs.filter(a=>(0,u._0)(b,a.scope)),c.owningScopesCache.set(b,e)),a.startsWith("./")||a.startsWith("../"))return(0,u.KP)(f().resolve(c.cwd,f().dirname(b),a),c.cwd,d);if(a.startsWith("/"))return(0,u.KP)(f().resolve(c.cwd,a.slice(1)),c.cwd,d);for(let b of e){let e=b.sortedAliases.find(([b])=>a===b||a.startsWith(b+"/"));if(!e)continue;let[g,h]=e,i=a===g?"":a.slice(g.length+1),j=(0,u.KP)(f().resolve(c.cwd,h,i),c.cwd,d);if(j)return j}for(let b of c.sortedWsNames){if(a!==b&&!a.startsWith(b+"/"))continue;let e=c.workspaces.get(b);if(a===b)return e.entryFile;let g=a.slice(b.length+1);return(0,u.IS)(f().posix.join(e.dir,g),d)??(0,u.IS)(f().posix.join(e.dir,"src",g),d)}return null},resolveCall(a,b,c,d,e){if(a.receiverName){let b=c.bindingsByLocalName.get(a.receiverName);if(!b)return[];let e=c.resolvedImports.get(b.specifier);if(!e)return[];let f=d.get(e);if(!f)return[];let g=function a(b,c,d,e,f,g){if(e>5||f.has(b.path))return null;if(f.add(b.path),"*"!==c){let a=`${c}>${d}`,e=b.symbolsByQname.get(a);if(e&&v(e.kind))return e}if("*"===c){let a=b.symbolsByName.get(d);if(a){let b=null;for(let c of a)!c.qualifiedName.includes(">")&&v(c.kind)&&(!b||c.endLine-c.startLine>b.endLine-b.startLine)&&(b=c);if(b)return b}}let h=b.reexportsByLocalName.get(c);if(h){let c=b.resolvedImports.get(h.specifier);if(c){let b=g.get(c);if(b){let c=a(b,h.importedName,d,e+1,f,g);if(c)return c}}}return null}(f,b.importedName,a.calleeName,0,new Set,d);return g?[{kind:"symbol",addr:{filePath:g.filePath,qualifiedName:g.qualifiedName}}]:[{kind:"method-unresolved",receiverName:a.receiverName,methodName:a.calleeName}]}let f=c.symbolsByName.get(a.calleeName);if(f&&f.length>0){let a=[];for(let c of f)c.qualifiedName!==b.qualifiedName&&v(c.kind)&&a.push({kind:"symbol",addr:{filePath:c.filePath,qualifiedName:c.qualifiedName}});return a}let g=c.bindingsByLocalName.get(a.calleeName);if(!g)return[];let h=c.resolvedImports.get(g.specifier);if(!h)return[{kind:"external",name:g.importedName,packageSpec:g.specifier}];let i=d.get(h);if(!i)return[];let j=function a(b,c,d,e,f){if(d>5||e.has(b.path))return null;e.add(b.path);let g=b.symbolsByName.get(c);if(g){let a=null;for(let b of g)v(b.kind)&&(!a||b.endLine-b.startLine>a.endLine-a.startLine)&&(a=b);if(a)return a}let h=b.reexportsByLocalName.get(c);if(h){let c=b.resolvedImports.get(h.specifier);if(c){let b=f.get(c);if(b){let c=a(b,h.importedName,d+1,e,f);if(c)return c}}}return null}(i,g.importedName,0,new Set,d);return j?[{kind:"symbol",addr:{filePath:j.filePath,qualifiedName:j.qualifiedName}}]:[]},moduleForFile:(a,b)=>a}}let x=w("typescript",[".ts"]),y=w("tsx",[".tsx",".jsx"]),z=w("javascript",[".js",".mjs",".cjs"]);function A(a){return"function"===a||"class"===a||"method"===a}function B(a,b,c){let d=b.replace(/\./g,"/"),e=(...a)=>a.filter(a=>""!==a&&"."!==a).join("/");if(!d){let b=e(a,"__init__.py");return c.has(b)?b:null}let f=e(a,d+".py");if(c.has(f))return f;let g=e(a,d,"__init__.py");return c.has(g)?g:null}var C=c(73024);function D(a,b,c,d,e=[],f){return{qualifiedName:d?`${d}>${b}`:b,name:b,kind:c,startLine:a.startPosition.row+1,endLine:a.endPosition.row+1,contentHash:g(h(a.text)),children:e,params:f}}function E(a){let b=a.childForFieldName("parameters");if(!b)return;let c=[];for(let a=0;a<b.namedChildCount;a++){let d=b.namedChild(a);if(d){if("parameter_declaration"===d.type){let a=d.childForFieldName("name");if(!a){c.push("_");continue}if("identifier"===a.type)c.push(a.text);else if("identifier_list"===a.type)for(let b=0;b<a.namedChildCount;b++){let d=a.namedChild(b);d?.type==="identifier"&&c.push(d.text)}else c.push(a.text)}else if("variadic_parameter_declaration"===d.type){let a=d.childForFieldName("name");a?.type==="identifier"?c.push(`...${a.text}`):c.push("...")}}}return c}async function F(a){try{let b=await C.promises.readFile(f().join(a,"go.mod"),"utf8"),c=/^\s*module\s+(\S+)/m.exec(b);return c?c[1].trim():null}catch{return null}}function G(a){return"function"===a||"class"===a||"method"===a}function H(a,b,c,d,e=[],f){return{qualifiedName:d?`${d}>${b}`:b,name:b,kind:c,startLine:a.startPosition.row+1,endLine:a.endPosition.row+1,contentHash:g(h(a.text)),children:e,params:f}}function I(a){let b=a.childForFieldName("parameters");if(!b)return;let c=[];for(let a=0;a<b.namedChildCount;a++){let d=b.namedChild(a);if(d)if("self_parameter"===d.type)c.push(d.text);else if("parameter"===d.type){let a=d.childForFieldName("pattern");a?c.push(a.text):c.push("_")}else"variadic_parameter"===d.type&&c.push("...")}return c}async function J(a,b){let c=new Map,d=new Map,e=new Set;async function g(h,i){let j;if(e.has(i))return;e.add(i),c.set(h,i),d.set(i,h);try{j=await C.promises.readFile(f().join(a,i),"utf8")}catch{return}let k=function(a){let b,c=a.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/.*$/gm,"").replace(/"(?:\\.|[^"\\\n])*"/g,'""'),d=[],e=/\b(?:pub(?:\s*\([^)]*\))?\s+)?mod\s+(\w+)\s*;/g;for(;null!==(b=e.exec(c));)d.push(b[1]);return d}(j);if(0===k.length)return;let l=f().dirname(i),m=f().basename(i,".rs"),n="mod"===m||"lib"===m||"main"===m?[l]:[l,f().join(l,m)];for(let a of k){let c=`${h}::${a}`,d=null;for(let c of n){for(let e of[f().join(c,`${a}.rs`),f().join(c,a,"mod.rs")]){let a=e.startsWith("./")?e.slice(2):e;if(b.has(a)){d=a;break}}if(d)break}d&&await g(c,d)}}for(let a of function(a){let b=[];for(let c of a)("src/lib.rs"===c||"src/main.rs"===c||c.endsWith("/src/lib.rs")||c.endsWith("/src/main.rs")||/^src\/bin\/[^/]+\.rs$/.test(c)||/\/src\/bin\/[^/]+\.rs$/.test(c))&&b.push(c);return b}(b))if("src/lib.rs"===a||"src/main.rs"===a)await g("crate",a);else if(a.startsWith("src/bin/"))await g("crate",a);else{let b=a.split("/"),c=b.indexOf("src");if(c>0){let d=b[c-1];await g(d,a)}}return{modTree:c,fileToMod:d}}function K(a){return"function"===a||"class"===a||"method"===a}(0,d.ik)(x),(0,d.ik)(y),(0,d.ik)(z),(0,d.ik)({grammarId:"python",extensions:[".py",".pyi"],extractSymbols:(a,b)=>n(a),extractImports:a=>({specs:t(a,"python"),bindings:p(a)}),extractCallSites:(a,b)=>o(a),buildProjectContext(a,b){let c=[a],d=!1;if(b.has("src/__init__.py"))d=!0;else for(let a of b)if(a.startsWith("src/")&&a.endsWith(".py")){d=!0;break}return d&&c.push(f().join(a,"src")),{cwd:a,pythonRoots:c}},resolveSpecifier(a,b,c,d){let e=/^(\.+)/.exec(a);if(e){let c=e[1].length,g=a.slice(c),h=f().dirname(b);for(let a=1;a<c;a++)h=f().dirname(h);return B(h||".",g,d)}for(let b of c.pythonRoots){let e=B(f().relative(c.cwd,b)||".",a,d);if(e)return e}return null},resolveCall(a,b,c,d,e){if(a.receiverName){let b=c.bindingsByLocalName.get(a.receiverName);if(!b)return[];let e=c.resolvedImports.get(b.specifier);if(!e)return[];let f=d.get(e);if(!f)return[];let g=function(a,b,c){if("*"!==b){let d=`${b}>${c}`,e=a.symbolsByQname.get(d);if(e&&A(e.kind))return e}if("*"===b){let b=a.symbolsByName.get(c);if(b){let a=null;for(let c of b)!c.qualifiedName.includes(">")&&A(c.kind)&&(!a||c.endLine-c.startLine>a.endLine-a.startLine)&&(a=c);if(a)return a}}return null}(f,b.importedName,a.calleeName);return g?[{kind:"symbol",addr:{filePath:g.filePath,qualifiedName:g.qualifiedName}}]:[{kind:"method-unresolved",receiverName:a.receiverName,methodName:a.calleeName}]}let f=c.symbolsByName.get(a.calleeName);if(f&&f.length>0){let a=[];for(let c of f)c.qualifiedName!==b.qualifiedName&&A(c.kind)&&a.push({kind:"symbol",addr:{filePath:c.filePath,qualifiedName:c.qualifiedName}});return a}let g=c.bindingsByLocalName.get(a.calleeName);if(!g)return[];let h=c.resolvedImports.get(g.specifier);if(!h)return[{kind:"external",name:g.importedName,packageSpec:g.specifier}];let i=d.get(h);if(!i)return[];let j=function(a,b){let c=a.symbolsByName.get(b);if(!c)return null;let d=null;for(let a of c)A(a.kind)&&(!d||a.endLine-a.startLine>d.endLine-d.startLine)&&(d=a);return d}(i,g.importedName);return j?[{kind:"symbol",addr:{filePath:j.filePath,qualifiedName:j.qualifiedName}}]:[]},moduleForFile:(a,b)=>a}),(0,d.ik)({grammarId:"go",extensions:[".go"],extractSymbols(a,b){let c=[],d=function(a){let b=[],c=-1,d=-1;for(let e=0;e<a.namedChildCount;e++){let f=a.namedChild(e);if(f){if("import_declaration"===f.type)b.push(f),c<0&&(c=f.startPosition.row+1),d=f.endPosition.row+1;else if("package_clause"===f.type)continue;else if(c>=0)break}}return c<0?null:{qualifiedName:"__imports__",name:"imports",kind:"unknown",startLine:c,endLine:d,contentHash:g(h(b.map(a=>a.text).join("\n"))),children:[]}}(a);d&&c.push(d);let{symbols:e,pendingMethods:f}=function(a){let b=[],c=[];for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(e)switch(e.type){case"function_declaration":{let a=e.childForFieldName("name");if(!a)break;b.push(D(e,a.text,"function",void 0,[],E(e)));break}case"method_declaration":{let a=e.childForFieldName("name");if(!a)break;let d=function(a){let b=a.childForFieldName("receiver");if(!b)return null;for(let a=0;a<b.namedChildCount;a++){let c=b.namedChild(a);if(c?.type!=="parameter_declaration")continue;let d=c.childForFieldName("type");if(!d)break;return function a(b){if("type_identifier"===b.type)return b.text;if("pointer_type"===b.type){for(let c=0;c<b.namedChildCount;c++){let d=b.namedChild(c);if(d){let b=a(d);if(b)return b}}return null}if("generic_type"===b.type){let c=b.childForFieldName("type");if(c)return a(c)}return null}(d)}return null}(e),f=D(e,a.text,"method",d??void 0,[],E(e));d?c.push({receiverType:d,symbol:f}):b.push(f);break}case"type_declaration":b.push(...function(a,b){let c=[];for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(e&&("type_spec"===e.type||"type_alias"===e.type)){let a=e.childForFieldName("name"),d=e.childForFieldName("type");if(!a)continue;let f=a.text,g=d?.type==="interface_type"?"interface":"class";c.push(D(e,f,g,b))}}return c}(e,void 0));break;case"var_declaration":case"const_declaration":b.push(...function(a,b){let c=[];for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(e&&("var_spec"===e.type||"const_spec"===e.type)){let a=e.childForFieldName("name");if(!a)continue;if("identifier_list"===a.type)for(let d=0;d<a.namedChildCount;d++){let f=a.namedChild(d);f?.type==="identifier"&&c.push(D(e,f.text,"const",b))}else"identifier"===a.type&&c.push(D(e,a.text,"const",b))}}return c}(e,void 0))}}return{symbols:b,pendingMethods:c}}(a);return c.push(...function(a,b){if(0===b.length)return a;let c=new Map;for(let b of a)("class"===b.kind||"interface"===b.kind)&&c.set(b.name,b);let d=[];for(let a of b){let b=c.get(a.receiverType);b?b.children=[...b.children,a.symbol]:d.push(a.symbol)}return[...a,...d]}(e,f)),c.push(...m(a,c)),c},extractImports:a=>(function(a){let b=[],c=[];function d(a){var d;let e,f=a.childForFieldName("path");if(!f)return;let g=(d=f.text).length>=2&&('"'===d[0]||"'"===d[0]||"`"===d[0])&&d[d.length-1]===d[0]?d.slice(1,-1):d;if(!g)return;b.push(g);let h=a.childForFieldName("name");if(h)e=h.text;else{let a=g.split("/");e=a[a.length-1]||g}c.push({specifier:g,importedName:"*",localName:e})}return!function a(b){if("import_declaration"===b.type){for(let a=0;a<b.namedChildCount;a++){let c=b.namedChild(a);if(c){if("import_spec"===c.type)d(c);else if("import_spec_list"===c.type)for(let a=0;a<c.namedChildCount;a++){let b=c.namedChild(a);b?.type==="import_spec"&&d(b)}}}return}for(let c=0;c<b.namedChildCount;c++){let d=b.namedChild(c);d&&a(d)}}(a),{specs:b,bindings:c}})(a),extractCallSites:(a,b)=>{let c;return c=[],!function a(b){if("call_expression"===b.type){let a=b.childForFieldName("function"),d=function a(b){if(!b)return null;if("identifier"===b.type)return b.text;if("selector_expression"===b.type){let a=b.childForFieldName("field");return a?.text??null}return"call_expression"===b.type?a(b.childForFieldName("function")):null}(a);if(d){let e=function(a){if(!a||"selector_expression"!==a.type)return;let b=a;for(;b;){if("identifier"===b.type)return b.text;if("selector_expression"===b.type){b=b.childForFieldName("operand");continue}break}}(a);c.push({calleeName:d,line:b.startPosition.row+1,...e?{receiverName:e}:{}})}}for(let c=0;c<b.childCount;c++){let d=b.child(c);d&&a(d)}}(a),c},async buildProjectContext(a,b){let c=await F(a);return{cwd:a,modulePath:c,dirToGoFiles:function(a){let b=new Map;for(let c of a){if(!c.endsWith(".go"))continue;let a=f().dirname(c),d=b.get(a);d?d.push(c):b.set(a,[c])}return b}(b)}},resolveSpecifier(a,b,c,d){if(!c.modulePath)return null;if(a===c.modulePath){let a=c.dirToGoFiles.get(".");return a?.[0]??null}if(a.startsWith(c.modulePath+"/")){let b=a.slice(c.modulePath.length+1),d=c.dirToGoFiles.get(b);return d?.[0]??null}return null},resolveCall(a,b,c,d,e){let g=f().dirname(c.path),h=e.dirToGoFiles.get(g)??[c.path];if(a.receiverName){let b=c.bindingsByLocalName.get(a.receiverName);if(b){let g=c.resolvedImports.get(b.specifier);if(!g)return[{kind:"external",name:a.calleeName,packageSpec:b.specifier}];let h=f().dirname(g);for(let b of e.dirToGoFiles.get(h)??[]){let c,e=d.get(b);if(!e)continue;let f=e.symbolsByName.get(a.calleeName);if(f){for(let a of f)if(!a.qualifiedName.includes(">")&&G(a.kind)){c=a;break}if(c)return[{kind:"symbol",addr:{filePath:c.filePath,qualifiedName:c.qualifiedName}}]}}return[{kind:"external",name:a.calleeName,packageSpec:b.specifier}]}let g=`${a.receiverName}>${a.calleeName}`;for(let a of h){let b=d.get(a);if(!b)continue;let c=b.symbolsByQname.get(g);if(c&&G(c.kind))return[{kind:"symbol",addr:{filePath:c.filePath,qualifiedName:c.qualifiedName}}]}return[{kind:"method-unresolved",receiverName:a.receiverName,methodName:a.calleeName}]}let i=[];for(let c of h){let e=d.get(c);if(!e)continue;let f=e.symbolsByName.get(a.calleeName);if(f)for(let a of f)!(a.qualifiedName===b.qualifiedName||a.qualifiedName.includes(">"))&&G(a.kind)&&i.push({kind:"symbol",addr:{filePath:a.filePath,qualifiedName:a.qualifiedName}})}return i},moduleForFile(a,b){let c=f().dirname(a);return b?.modulePath?"."===c?b.modulePath:`${b.modulePath}/${c}`:c}}),(0,d.ik)({grammarId:"rust",extensions:[".rs"],extractSymbols(a,b){let c=[],d=function(a){let b=[],c=-1,d=-1;for(let e=0;e<a.namedChildCount;e++){let f=a.namedChild(e);if(f){if("use_declaration"===f.type||"extern_crate_declaration"===f.type)b.push(f),c<0&&(c=f.startPosition.row+1),d=f.endPosition.row+1;else if(c>=0)break}}return c<0?null:{qualifiedName:"__imports__",name:"imports",kind:"unknown",startLine:c,endLine:d,contentHash:g(h(b.map(a=>a.text).join("\n"))),children:[]}}(a);d&&c.push(d);let{symbols:e,pendingImpls:f}=function(a){let b=[],c=[];for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(e)switch(e.type){case"function_item":{let a=e.childForFieldName("name");if(!a)break;b.push(H(e,a.text,"function",void 0,[],I(e)));break}case"struct_item":case"union_item":{let a=e.childForFieldName("name");if(!a)break;b.push(H(e,a.text,"class",void 0));break}case"enum_item":{let a=e.childForFieldName("name");if(!a)break;b.push(H(e,a.text,"enum",void 0));break}case"trait_item":{let a=e.childForFieldName("name");if(!a)break;let c=function(a,b){let c=a.childForFieldName("body");if(!c)return[];let d=[];for(let a=0;a<c.namedChildCount;a++){let e=c.namedChild(a);if(e&&("function_item"===e.type||"function_signature_item"===e.type)){let a=e.childForFieldName("name");if(!a)continue;d.push(H(e,a.text,"method",b,[],I(e)))}}return d}(e,a.text);b.push(H(e,a.text,"interface",void 0,c));break}case"impl_item":{let a=function(a){let b=a.childForFieldName("type");return b?function a(b){if("type_identifier"===b.type)return b.text;if("generic_type"===b.type){let c=b.childForFieldName("type");if(c)return a(c)}if("reference_type"===b.type)for(let c=0;c<b.namedChildCount;c++){let d=b.namedChild(c);if(d){let b=a(d);if(b)return b}}if("scoped_type_identifier"===b.type){let a=b.childForFieldName("name");if(a?.type==="type_identifier")return a.text}return null}(b):null}(e);if(!a)break;let b=function(a,b){let c=a.childForFieldName("body");if(!c)return[];let d=[];for(let a=0;a<c.namedChildCount;a++){let e=c.namedChild(a);if(e){if("function_item"===e.type){let a=e.childForFieldName("name");if(!a)continue;d.push(H(e,a.text,"method",b,[],I(e)))}else if("function_signature_item"===e.type){let a=e.childForFieldName("name");if(!a)continue;d.push(H(e,a.text,"method",b,[],I(e)))}}}return d}(e,a);b.length>0&&c.push({targetType:a,methods:b});break}case"const_item":case"static_item":{let a=e.childForFieldName("name");if(!a)break;b.push(H(e,a.text,"const",void 0));break}case"type_item":{let a=e.childForFieldName("name");if(!a)break;b.push(H(e,a.text,"type",void 0));break}case"mod_item":{let a=e.childForFieldName("name"),c=e.childForFieldName("body");if(!a||!c)break;b.push(H(e,a.text,"class",void 0))}}}return{symbols:b,pendingImpls:c}}(a);return c.push(...function(a,b){if(0===b.length)return a;let c=new Map;for(let b of a)("class"===b.kind||"enum"===b.kind||"interface"===b.kind)&&c.set(b.name,b);let d=[];for(let a of b){let b=c.get(a.targetType);b?b.children=[...b.children,...a.methods]:d.push(...a.methods)}return[...a,...d]}(e,f)),c.push(...m(a,c)),c},extractImports:a=>(function(a){let b=[],c=[];function d(a){if("identifier"===a.type||"crate"===a.type||"self"===a.type||"super"===a.type)return a.text;if("scoped_identifier"===a.type){let b=a.childForFieldName("path"),c=a.childForFieldName("name"),e=b?d(b):"",f=c?.text??"";return e?`${e}::${f}`:f}return a.text}function e(a,b){return a?b?`${a}::${b}`:a:b}function f(a){let b=a.split("::");return b[b.length-1]??a}return!function a(g){if("use_declaration"===g.type)return void function(a){for(let g=0;g<a.namedChildCount;g++){let h=a.namedChild(g);h&&function a(g,h){switch(g.type){case"use_as_clause":{let a=g.childForFieldName("path"),i=g.childForFieldName("alias");if(a&&i){let g=e(h,d(a));b.push(g),c.push({specifier:g,importedName:f(g),localName:i.text})}break}case"use_list":for(let b=0;b<g.namedChildCount;b++){let c=g.namedChild(b);c&&a(c,h)}break;case"scoped_use_list":{let b=g.childForFieldName("path"),c=g.childForFieldName("list"),f=b?e(h,d(b)):h;if(c)for(let b=0;b<c.namedChildCount;b++){let d=c.namedChild(b);d&&a(d,f)}break}case"use_wildcard":{let a=g.childForFieldName("path"),f=a?e(h,d(a)):h;f&&(b.push(f),c.push({specifier:f,importedName:"*",localName:"*"}));break}case"identifier":case"self":case"super":case"crate":case"scoped_identifier":{let a=e(h,d(g));a&&(b.push(a),c.push({specifier:a,importedName:f(a),localName:f(a)}))}}}(h,"")}}(g);if("extern_crate_declaration"===g.type){let a=g.childForFieldName("name");a&&(b.push(a.text),c.push({specifier:a.text,importedName:"*",localName:a.text}));return}if("mod_item"===g.type){let a=g.childForFieldName("body"),c=g.childForFieldName("name");!a&&c&&b.push(c.text);return}for(let b=0;b<g.namedChildCount;b++){let c=g.namedChild(b);c&&a(c)}}(a),{specs:b,bindings:c}})(a),extractCallSites:(a,b)=>{let c;return c=[],!function a(b){if("call_expression"===b.type){let a=b.childForFieldName("function"),d=function(a){if(!a)return null;if("identifier"===a.type)return a.text;if("scoped_identifier"===a.type){let b=a.childForFieldName("name");return b?.text??null}if("field_expression"===a.type){let b=a.childForFieldName("field");return b?.text??null}return null}(a);if(d){let e=function(a){if(a){if("scoped_identifier"===a.type){let b=a;for(;b;){if("identifier"===b.type)return b.text;if("scoped_identifier"===b.type){b=b.childForFieldName("path");continue}break}}if("field_expression"===a.type){let b=a.childForFieldName("value");if(b?.type==="identifier")return b.text}}}(a);c.push({calleeName:d,line:b.startPosition.row+1,...e?{receiverName:e}:{}})}}else if("method_call_expression"===b.type){let a=b.childForFieldName("method"),d=b.childForFieldName("value");if(a){let e=d?.type==="identifier"?d.text:void 0;c.push({calleeName:a.text,line:b.startPosition.row+1,...e?{receiverName:e}:{}})}}for(let c=0;c<b.childCount;c++){let d=b.child(c);d&&a(d)}}(a),c},async buildProjectContext(a,b){let{modTree:c,fileToMod:d}=await J(a,b);return{cwd:a,modTree:c,fileToMod:d}},resolveSpecifier(a,b,c,d){let e=c.fileToMod.get(b);if(!e)return null;let f=function(a,b){if(a.startsWith("crate::"))return a;if("crate"===a)return"crate";if(a.startsWith("self::"))return`${b}::${a.slice(6)}`;if("self"===a)return b;if(a.startsWith("super::")){let c=b,d=a;for(;d.startsWith("super::");){let a=c.lastIndexOf("::");if(a<0)return null;c=c.slice(0,a),d=d.slice(7)}if("super"===d){let a=c.lastIndexOf("::");return a<0?null:c.slice(0,a)}return d?`${c}::${d}`:c}return null}(a,e);if(!f)return null;if(c.modTree.has(f))return c.modTree.get(f);let g=f.split("::");for(;g.length>1;){g.pop();let a=g.join("::"),b=c.modTree.get(a);if(b)return b}return null},resolveCall(a,b,c,d,e){let f;if(a.receiverName){let b=c.bindingsByLocalName.get(a.receiverName);if(b){let e=c.resolvedImports.get(b.specifier);if(!e)return[{kind:"external",name:a.calleeName,packageSpec:b.specifier}];let f=d.get(e);if(!f)return[];let g=f.symbolsByName.get(a.calleeName);if(g){for(let a of g)if(!a.qualifiedName.includes(">")&&K(a.kind))return[{kind:"symbol",addr:{filePath:a.filePath,qualifiedName:a.qualifiedName}}]}let h=`${b.importedName}>${a.calleeName}`,i=f.symbolsByQname.get(h);return i&&K(i.kind)?[{kind:"symbol",addr:{filePath:i.filePath,qualifiedName:i.qualifiedName}}]:[{kind:"method-unresolved",receiverName:a.receiverName,methodName:a.calleeName}]}let e=`${a.receiverName}>${a.calleeName}`,f=c.symbolsByQname.get(e);if(f)return[{kind:"symbol",addr:{filePath:f.filePath,qualifiedName:f.qualifiedName}}];let g=[],h=c.symbolsByName.get(a.calleeName);if(h)for(let a of h)"method"===a.kind&&g.push({kind:"symbol",addr:{filePath:a.filePath,qualifiedName:a.qualifiedName}});return g.length>0?g:[{kind:"method-unresolved",receiverName:a.receiverName,methodName:a.calleeName}]}let g=[],h=c.symbolsByName.get(a.calleeName);if(h)for(let a of h)!(a.qualifiedName===b.qualifiedName||a.qualifiedName.includes(">"))&&K(a.kind)&&g.push({kind:"symbol",addr:{filePath:a.filePath,qualifiedName:a.qualifiedName}});if(g.length>0)return g;let i=c.bindingsByLocalName.get(a.calleeName);if(!i)return[];let j=c.resolvedImports.get(i.specifier);if(!j)return[{kind:"external",name:i.importedName,packageSpec:i.specifier}];let k=d.get(j);if(!k)return[];let l=k.symbolsByName.get(i.importedName);if(l){for(let a of l)if(!a.qualifiedName.includes(">")&&K(a.kind)){f=a;break}}return f?[{kind:"symbol",addr:{filePath:f.filePath,qualifiedName:f.qualifiedName}}]:[]},moduleForFile:(a,b)=>b?.fileToMod.get(a)??f().dirname(a)})},64949:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{g:()=>h});var e=c(33265),f=c(88395),g=a([e]);e=(g.then?(await g)():g)[0];let i=!1;function h(){i||(i=!0,(0,e.ih)((a,b)=>{f.t.subscribe(a,a=>{a.some(a=>"file"===a.type||"git"===a.type)&&b()})}))}d()}catch(a){d(a)}})},72891:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{OZ:()=>o,RL:()=>n,k9:()=>p,ok:()=>l});var e=c(37625),f=c(52693),g=c(18412),h=c(89705),i=c(94506),j=c(770),k=a([i]);i=(k.then?(await k)():k)[0];let l=(a,b=200)=>new Response(JSON.stringify(a),{status:b,headers:{"content-type":"application/json"}}),m=a=>{let b=e.od(a);if(f.Ru(b)){let a=b.value,c=(0,j.Sh)(a);return new Response(JSON.stringify({error:(a=>{let b=a.message;if("string"==typeof b&&b.length>0)return b;let c=a.cause;if(c instanceof Error&&c.message.length>0)return c.message;switch(a._tag){case"ValidationError":return`Invalid ${a.field}: ${a.reason}`;case"NotFoundError":return`${a.resource} not found: ${a.id}`;case"PermissionError":return`Permission denied: ${a.action} on ${a.resource}`;case"DBError":return`${a.db} ${a.op} failed`;case"FSError":return`${a.op} ${a.path} failed`;case"WSError":return`${a.proto} ${a.kind} failed`;case"AgentError":return`${a.provider} ${a.kind} failed`;default:return a._tag}})(a),tag:a._tag}),{status:c,headers:{"content-type":"application/json"}})}return console.error("[handler] uncaught defect:\n"+e.j9(a)),new Response(JSON.stringify({error:"Internal Server Error",tag:"InternalError"}),{status:500,headers:{"content-type":"application/json"}})},n=a=>async b=>{let c=await i.s9.runPromiseExit(a(b));return g.YW(c,{onFailure:a=>m(a),onSuccess:a=>a})},o=a=>async(b,c)=>{let d=await c.params,e=await i.s9.runPromiseExit(a(b,d));return g.YW(e,{onFailure:a=>m(a),onSuccess:a=>a})},p=a=>h.$mh({try:()=>a.json(),catch:()=>new j.yI({field:"body",reason:"invalid JSON"})});d()}catch(a){d(a)}})},86236:(a,b,c)=>{c.d(b,{I:()=>d});let d=new Set(["typescript","tsx","javascript","python","go","rust"])},87956:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{M:()=>j,b:()=>i});var e=c(12629),f=c(76760),g=c.n(f),h=a([e]);e=(h.then?(await h)():h)[0];let k=g().join(process.cwd(),"public","tree-sitter"),l=null,m=new Map,n=new Map;async function i(a){let b,c=n.get(a);if(c)return c;let d=await (!(b=m.get(a))&&(b=(async()=>(await (!l&&(l=e.Parser.init({locateFile:a=>g().join(k,a)})),l),e.Language.load(g().join(k,`tree-sitter-${a}.wasm`))))(),m.set(a,b)),b);return(c=new e.Parser).setLanguage(d),n.set(a,c),c}function j(a){switch(a.slice(a.lastIndexOf(".")).toLowerCase()){case".ts":return"typescript";case".tsx":case".jsx":return"tsx";case".js":case".mjs":case".cjs":return"javascript";case".py":case".pyi":return"python";case".go":return"go";case".rs":return"rust";default:return null}}d()}catch(a){d(a)}})},88395:(a,b,c)=>{c.d(b,{t:()=>l});var d=c(29021),e=c(33873),f=c(7939);let g=[".git/HEAD",".git/MERGE_HEAD",".git/REBASE_HEAD"],h=[".git/refs"];class i{subscribe(a,b){let c=this.watchers.get(a);return c||(c=this.createWatcher(a),this.watchers.set(a,c)),c.listeners.add(b),()=>{this.unsubscribe(a,b)}}unsubscribe(a,b){let c=this.watchers.get(a);if(c&&(c.listeners.delete(b),0===c.listeners.size)){for(let a of(c.debounceTimer&&clearTimeout(c.debounceTimer),c.throttleTimer&&clearTimeout(c.throttleTimer),c.cwdRestartTimer&&clearTimeout(c.cwdRestartTimer),c.watchers))try{a.close()}catch{}this.watchers.delete(a)}}createWatcher(a){let b={watchers:[],listeners:new Set,pendingEvents:[],debounceTimer:null,throttleTimer:null,cwdRestartTimer:null},c=a=>{b.pendingEvents.some(b=>b.type===a.type)||b.pendingEvents.push(a),b.debounceTimer&&clearTimeout(b.debounceTimer),b.debounceTimer=setTimeout(()=>{this.flush(b)},500),b.throttleTimer||(b.throttleTimer=setTimeout(()=>{this.flush(b)},3e3))},f=()=>{try{let e=(0,d.watch)(a,{recursive:!0},(a,b)=>{if(b&&!(b.startsWith(".next/")||b.startsWith("node_modules/"))){if(b.startsWith(".git/")){(".git/HEAD"===b||b.startsWith(".git/refs/"))&&c({type:"git"});return}c({type:"file"})}});e.on("error",c=>{console.error(`File watcher error for ${a}:`,c);let d=b.watchers.indexOf(e);-1!==d&&b.watchers.splice(d,1);try{e.close()}catch{}b.listeners.size>0&&!b.cwdRestartTimer&&(b.cwdRestartTimer=setTimeout(()=>{b.cwdRestartTimer=null,b.listeners.size>0&&f()},2e3))}),b.watchers.push(e)}catch(b){console.error(`Failed to watch ${a}:`,b)}};f();let i=function(a){let b=(0,e.join)(a,".git");try{if((0,d.statSync)(b).isDirectory())return b;let c=(0,d.readFileSync)(b,"utf-8").trim().match(/^gitdir:\s*(.+)$/);if(c)return(0,e.resolve)(a,c[1])}catch{}return b}(a),j=a=>{try{let e=(0,d.watch)(a,()=>{c({type:"git"});try{e.close()}catch{}let d=b.watchers.indexOf(e);-1!==d&&b.watchers.splice(d,1),b.listeners.size>0&&setTimeout(()=>j(a),50)});e.on("error",()=>{let c=b.watchers.indexOf(e);-1!==c&&b.watchers.splice(c,1),b.listeners.size>0&&(0,d.existsSync)(a)&&setTimeout(()=>j(a),500)}),b.watchers.push(e)}catch{}};for(let a of g){let b=a.replace(".git/","");j((0,e.join)(i,b))}for(let a of h){let f=a.replace(".git/","");try{let a=(0,d.watch)((0,e.join)(i,f),{recursive:!0},()=>{c({type:"git"})});a.on("error",()=>{}),b.watchers.push(a)}catch{}}return b}flush(a){if(a.debounceTimer&&(clearTimeout(a.debounceTimer),a.debounceTimer=null),a.throttleTimer&&(clearTimeout(a.throttleTimer),a.throttleTimer=null),0===a.pendingEvents.length)return;let b=[...a.pendingEvents];for(let c of(a.pendingEvents=[],a.listeners))try{c(b)}catch(a){console.error("File watcher callback error:",a)}}constructor(){this.watchers=new Map}}class j{subscribe(a){return this.listeners.add(a),this.watcher||this.start(),()=>{this.listeners.delete(a),0===this.listeners.size&&this.stop()}}start(){try{(0,d.existsSync)(f.Tb)||(0,d.mkdirSync)(f.Tb,{recursive:!0}),(0,d.existsSync)(f.jp)||(0,d.writeFileSync)(f.jp,"0"),this.watcher=(0,d.watch)(f.jp,()=>{this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.notify(),300)}),this.watcher.on("error",()=>{this.stop(),setTimeout(()=>{this.listeners.size>0&&this.start()},2e3)})}catch{}}stop(){if(this.watcher){try{this.watcher.close()}catch{}this.watcher=null}this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}notify(){for(let a of this.listeners)try{a()}catch(a){console.error("ReviewWatcher callback error:",a)}}constructor(){this.listeners=new Set,this.watcher=null,this.debounceTimer=null}}let k=globalThis,l=k.__cockpitFileWatcher??(k.__cockpitFileWatcher=new i);k.__cockpitReviewWatcher??(k.__cockpitReviewWatcher=new j)}};
|
|
1
|
+
"use strict";exports.id=2939,exports.ids=[2939],exports.modules={4253:(a,b,c)=>{c.d(b,{L8:()=>p,No:()=>h,Pe:()=>o,VA:()=>q,hC:()=>m,hH:()=>l,hn:()=>s,iF:()=>r,lU:()=>t,nw:()=>n,pZ:()=>g});var d=c(79748),e=c(33873),f=c.n(e);let g=0xa00000,h=0x3200000,i=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".ico",".bmp",".avif"]),j=new Set([".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".zip",".tar",".gz",".rar",".7z",".exe",".dll",".so",".dylib",".mp3",".mp4",".avi",".mov",".mkv",".wav",".flac",".ttf",".otf",".woff",".woff2",".eot",".db",".sqlite",".sqlite3",".pyc",".class",".o",".a"]),k={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".svg":"image/svg+xml",".ico":"image/x-icon",".bmp":"image/bmp",".avif":"image/avif"};function l(a){return k[a.toLowerCase()]||"application/octet-stream"}function m(a,b){if("string"!=typeof b||0===b.length)return null;let c=f().resolve(a),d=f().resolve(c,b);return d===c||d.startsWith(c+f().sep)?d:null}async function n(a){let b;if("string"!=typeof a||0===a.length)return{ok:!1,reason:"Missing cwd parameter"};if(!f().isAbsolute(a))return{ok:!1,reason:"cwd must be an absolute path"};let c=f().resolve(a);try{b=await (0,d.stat)(c)}catch{return{ok:!1,reason:"cwd does not exist"}}return b.isDirectory()?{ok:!0,abs:c}:{ok:!1,reason:"cwd is not a directory"}}function o(a,b){return`"${a.toString(36)}-${Math.floor(b).toString(36)}"`}function p(a,b){let c=a.startsWith(".")?a.toLowerCase():f().extname(a).toLowerCase();return i.has(c)?b>h?"too-large":"image":j.has(c)?"binary":b>g?"too-large":"text"}function q(a){let b=0,c=Math.min(a.length,1e3);for(let d=0;d<c;d++){let c=a.charCodeAt(d);if(0===c)return!0;c<32&&9!==c&&10!==c&&13!==c&&b++}return c>0&&b/c>.1}async function r(a){let b,c=!1;try{(await (0,d.lstat)(a)).isSymbolicLink()&&(c=!0,b=await (0,d.readlink)(a))}catch{}let e=await (0,d.stat)(a);return{size:e.size,mtimeMs:e.mtimeMs,isDirectory:e.isDirectory(),isSymlink:c,symlinkTarget:b}}function s(a,b){return{ETag:a,"Last-Modified":new Date(b).toUTCString(),"Cache-Control":"no-cache, must-revalidate"}}function t(a,b){return!!a&&a.split(",").map(a=>a.trim().replace(/^W\//,"")).includes(b)}},7939:(a,b,c)=>{c.d(b,{$A:()=>L,A0:()=>W,An:()=>Z,BF:()=>H,Ct:()=>P,Eu:()=>G,Ex:()=>t,GB:()=>q,JE:()=>Y,JY:()=>K,Ki:()=>B,Kk:()=>Q,Kv:()=>j,LN:()=>k,Mx:()=>C,O0:()=>A,Sr:()=>I,Tb:()=>r,Ux:()=>aa,Wd:()=>X,aO:()=>m,at:()=>x,ec:()=>n,eg:()=>U,h9:()=>w,i4:()=>F,iK:()=>o,im:()=>S,iy:()=>O,jp:()=>s,lT:()=>y,lq:()=>E,ls:()=>J,mT:()=>v,oK:()=>N,oZ:()=>R,of:()=>D,po:()=>M,tP:()=>p,th:()=>u,v4:()=>l,vI:()=>V,yw:()=>T});var d=c(21820),e=c(33873),f=c(79748),g=c(29021),h=c(79646);let i=(0,d.homedir)(),j=(0,e.join)(i,".cockpit"),k=(0,e.join)(j,"projects"),l=(0,e.join)(j,"state.json"),m=(0,e.join)(j,"pinned-sessions.json"),n=(0,e.join)(j,"note.md"),o=(0,e.join)(j,"scheduled-tasks.json"),p=(0,e.join)(j,"settings.json"),q=(0,e.join)(j,"skills.json"),r=(0,e.join)(j,"review"),s=(0,e.join)(r,"_signal");function t(){try{(0,g.existsSync)(r)||(0,g.mkdirSync)(r,{recursive:!0}),(0,g.writeFileSync)(s,Date.now().toString())}catch{}}let u=(0,e.join)(i,".claude"),v=(0,e.join)(u,"projects"),w=(0,e.join)(i,".claude2"),x=(0,e.join)(w,"projects"),y=(0,e.join)(j,"deepseek"),z=(0,e.join)(y,"projects");function A(a){return a.replace(/[/.]/g,"-")}function B(a){return(0,e.join)(k,A(a))}function C(a){return(0,e.join)(B(a),"session.json")}function D(a){return(0,e.join)(B(a),"recent-files.json")}function E(a){return(0,e.join)(B(a),"expanded-paths.json")}function F(a){return(0,e.join)(B(a),"comments.json")}function G(a){return(0,e.join)(B(a),"services.json")}function H(a){return(0,e.join)(B(a),"note.md")}function I(a,b){return(0,e.join)(B(a),`terminal-history-${b}.jsonl`)}function J(a,b){return(0,e.join)(B(a),`terminal-output-${b}.txt`)}function K(a,b){let c=b?`terminal-env-${b}.json`:"terminal-env-global.json";return(0,e.join)(B(a),c)}function L(){return(0,e.join)(j,"terminal-aliases.json")}function M(){return(0,e.join)(j,"services.json")}function N(a){return(0,e.join)(B(a),"project-settings.json")}function O(a,b){return(0,e.join)(B(a),`terminal-bubble-order-${b}.json`)}function P(a){return(0,e.join)(r,`${a}.json`)}function Q(a,b){return(0,e.join)((0,e.join)(v,A(a)),`${b}.jsonl`)}function R(a,b){return(0,e.join)((0,e.join)(x,A(a)),`${b}.jsonl`)}function S(a,b){return(0,e.join)((0,e.join)(z,A(a)),`${b}.jsonl`)}function T(a,b){return(0,e.join)((0,e.join)(j,"ollama-sessions",A(a)),`${b}.jsonl`)}function U(a){let b=(0,e.join)(i,".codex","sessions");if(!(0,g.existsSync)(b))return null;try{let c=(0,h.execSync)(`find ${JSON.stringify(b)} -name "*${a}.jsonl" -type f 2>/dev/null`,{encoding:"utf8",timeout:3e3}).trim();if(c)return c.split("\n")[0]}catch{}return null}function V(a){let b=(0,e.join)(i,".kimi","sessions");if(!(0,g.existsSync)(b))return null;try{for(let c of(0,g.readdirSync)(b)){let d=(0,e.join)(b,c,a,"context.jsonl");if((0,g.existsSync)(d))return d}}catch{}return null}async function W(a){(0,g.existsSync)(a)||await (0,f.mkdir)(a,{recursive:!0})}async function X(a){let b=(0,e.join)(a,"..");await W(b)}async function Y(a,b){try{let b=await (0,f.readFile)(a,"utf-8");return JSON.parse(b)}catch{return b}}async function Z(a,b){await X(a),await (0,f.writeFile)(a,JSON.stringify(b,null,2),"utf-8")}let $=globalThis,_=$.__cockpitFileLocks??($.__cockpitFileLocks=new Map);function aa(a,b){let c=(_.get(a)??Promise.resolve()).then(b),d=c.then(()=>{},()=>{});return _.set(a,d),d.then(()=>{_.get(a)===d&&_.delete(a)}),c}},25344:(a,b,c)=>{c.d(b,{BE:()=>l,IS:()=>v,KP:()=>r,ZT:()=>x,_0:()=>s,iU:()=>n,jH:()=>o,zC:()=>t});var d=c(31421),e=c(73024),f=c(76760),g=c.n(f),h=c(57975),i=c(28677);let j=(0,h.promisify)(d.exec),k=new Set([".git","node_modules"]),l=8e3;function m(a){let b=a.toLowerCase(),c=b.lastIndexOf(".");if(c<0)return!1;let d=b.slice(c);for(let a of(0,i.cn)())if(a.toLowerCase()===d)return!0;return!1}async function n(a){try{await j("git rev-parse --git-dir",{cwd:a})}catch{return null}let{stdout:b}=await j("git -c core.quotePath=false ls-files --cached --others --exclude-standard",{cwd:a,maxBuffer:0x3200000}),c=[];for(let a of b.split("\n")){let b=a.trim();if(b&&m(b.slice(b.lastIndexOf("/")+1))&&(c.push(b),c.length>=l))break}return c}async function o(a,b,c){let d;if(!(c.length>=l)){try{d=await e.promises.readdir(a,{withFileTypes:!0})}catch{return}for(let e of d){if(c.length>=l)return;if(k.has(e.name)||e.name.startsWith(".git"))continue;let d=g().join(a,e.name);e.isDirectory()?await o(d,b,c):e.isFile()&&m(e.name)&&c.push(g().relative(b,d))}}}let p=[".ts",".tsx",".js",".jsx",".mjs",".cjs"],q=[".js",".jsx",".mjs",".cjs"];function r(a,b,c){let d=g().relative(b,a);if(d.startsWith(".."))return null;for(let a of q)if(d.endsWith(a)){d=d.slice(0,-a.length);break}if(c.has(d))return d;for(let a of p){let b=d+a;if(c.has(b))return b}for(let a of p){let b=g().join(d,"index"+a);if(c.has(b))return b}return null}function s(a,b){return""===b||a===b||a.startsWith(b+"/")}async function t(a,b){let c=await u(a);if(0===c.length)return new Map;let d=[];try{let{stdout:b}=await j("git -c core.quotePath=false ls-files --cached --others --exclude-standard",{cwd:a,maxBuffer:0x3200000});d=b.split("\n").map(a=>a.trim()).filter(a=>a.endsWith("/package.json")&&!a.includes("node_modules/"))}catch{return new Map}let f=d.filter(a=>{let b=a.slice(0,-13);return c.some(a=>{var c;return c=b,RegExp("^"+a.replace(/\\/g,"/").replace(/[.+^${}()|[\]]/g,"\\$&").replace(/\*\*/g,"___DOUBLESTAR___").replace(/\*/g,"[^/]*").replace(/___DOUBLESTAR___/g,".*")+"$").test(c)})}),h=new Map;for(let c of f){let d;try{d=JSON.parse(await e.promises.readFile(g().join(a,c),"utf8"))}catch{continue}if("string"!=typeof d.name)continue;let f=g().dirname(c),i=function(a,b,c){let d,e=b=>{let d=b.replace(/^\.\//,"");return v(g().posix.join(a,d),c)},f=b.exports;if("string"==typeof f)d=f;else if(f&&"object"==typeof f&&f["."]){let a=f["."];"string"==typeof a?d=a:a&&"object"==typeof a&&(d=a.types??a.import??a.default??a.require)}if("string"==typeof d){let a=e(d);if(a)return a}if("string"==typeof b.main){let a=e(b.main);if(a)return a}for(let b of["src/index.ts","src/index.tsx","index.ts","index.tsx","src/index.js","index.js"])if(c.has(g().posix.join(a,b)))return g().posix.join(a,b);return null}(f,d,b);h.set(d.name,{name:d.name,dir:f,entryFile:i})}return h}async function u(a){try{var b=await e.promises.readFile(g().join(a,"pnpm-workspace.yaml"),"utf8");let c=[],d=!1;for(let a of b.split("\n")){let b=a.replace(/#.*$/,"");if(/^packages\s*:/.test(b)){d=!0;continue}if(!d)continue;let e=b.match(/^\s*-\s*['"]?([^'"#\s]+)['"]?\s*$/);e?c.push(e[1]):/^\S/.test(b)&&(d=!1)}return c}catch{}try{let b=JSON.parse(await e.promises.readFile(g().join(a,"package.json"),"utf8")),c=b?.workspaces;if(Array.isArray(c))return c.filter(a=>"string"==typeof a);if(c&&Array.isArray(c.packages))return c.packages.filter(a=>"string"==typeof a)}catch{}return[]}function v(a,b){if(a.startsWith("..")||a.startsWith("/"))return null;for(let b of q)if(a.endsWith(b)){a=a.slice(0,-b.length);break}if(b.has(a))return a;for(let c of p){let d=a+c;if(b.has(d))return d}for(let c of p){let d=g().posix.join(a,"index"+c);if(b.has(d))return d}return null}async function w(a,b){let c,d=new Map;try{let b=(await e.promises.readFile(a,"utf8")).replace(/^\s*\/\/.*$/gm,"");c=JSON.parse(b)}catch{return d}let f=c?.compilerOptions?.baseUrl??".",h=c?.compilerOptions?.paths??{},i=g().resolve(g().dirname(a),f),j=g().relative(b,i)||".";for(let[a,b]of Object.entries(h)){if(!Array.isArray(b)||0===b.length)continue;let c=a.replace(/\/\*$/,""),e=b[0].replace(/\/\*$/,"");d.set(c,g().join(j,e))}return d}async function x(a){let b=[],c=[];try{let{stdout:b}=await j("git -c core.quotePath=false ls-files --cached --others --exclude-standard",{cwd:a,maxBuffer:0x3200000});c=b.split("\n").map(a=>a.trim()).filter(a=>/(^|\/)tsconfig[^/]*\.json$/.test(a)&&!a.includes("node_modules/"))}catch{try{await e.promises.access(g().join(a,"tsconfig.json")),c=["tsconfig.json"]}catch{}}for(let d of c){let c=await w(g().join(a,d),a);if(0===c.size)continue;let e=g().dirname(d);b.push({scope:"."===e?"":e,aliases:c,sortedAliases:y(c)})}let d=b.find(a=>""===a.scope);return d||(d={scope:"",aliases:new Map,sortedAliases:[]},b.push(d)),d.aliases.has("@")||(d.aliases.set("@","./src"),d.sortedAliases=y(d.aliases)),b.sort((a,b)=>b.scope.length-a.scope.length)}function y(a){return[...a.entries()].sort(([a],[b])=>b.length-a.length)}},27485:(a,b,c)=>{c.d(b,{_:()=>e});let d=new Set(["function","class","method"]);function e(a){return d.has(a.kind)}},28677:(a,b,c)=>{c.d(b,{Bu:()=>f,cn:()=>g,ik:()=>e});let d=new Map;function e(a){d.set(a.grammarId,a)}function f(a){let b=d.get(a);if(!b)throw Error(`[codeMap] no handler registered for grammar '${a}' — did the handler module get imported (handlers/index.ts barrel)?`);return b}function g(){let a=new Set;for(let b of d.values())for(let c of b.extensions)a.add(c.toLowerCase());return[...a]}},33265:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{E:()=>A,J:()=>F,Mv:()=>E,Xn:()=>D,bQ:()=>B,cl:()=>u,ih:()=>r,s7:()=>z,u$:()=>t,xl:()=>v});var e=c(73024),f=c(76760),g=c.n(f),h=c(87956),i=c(86236),j=c(25344),k=c(27485),l=c(37765),m=a([h]);async function n(a,b,c){let d=Array(a.length),e=0;async function f(){for(;e<a.length;){let b=e++;d[b]=await c(a[b])}}return await Promise.all(Array.from({length:Math.min(b,a.length)},f)),d}async function o(a,b){let c,d,f,g=(0,h.M)(b);if(!g)return null;try{[c,d]=await Promise.all([e.promises.readFile(a,"utf8"),e.promises.stat(a).then(a=>a.mtimeMs)])}catch{return null}if(c.length>1e6)return null;let i=await (0,h.b)(g);try{f=i.parse(c)}catch(a){return console.error("[codeIndex] parse failed for",b,a),null}if(!f)return null;try{let a,e=(0,l.Bu)(g),h=e.extractSymbols(f.rootNode,c),i=(a=[],!function c(d){for(let e of d)a.push({filePath:b,qualifiedName:e.qualifiedName,name:e.name,kind:e.kind,startLine:e.startLine,endLine:e.endLine,params:e.params}),c(e.children)}(h),a),{specs:j,bindings:k}=e.extractImports(f.rootNode),m=e.extractCallSites(f.rootNode,i);return{path:b,language:g,mtime:d,symbolsTree:h,flatSymbols:i,importBindings:k,importSpecifiers:j,rawCalls:m}}finally{f.delete()}}function p(a,b){let c=null;for(let d of a)d.startLine<=b&&b<=d.endLine&&(!c||d.endLine-d.startLine<c.endLine-c.startLine)&&(c=d);return c}async function q(a){let b=Date.now(),c=await (0,j.iU)(a);c||(c=[],await (0,j.jH)(a,a,c));let d=c.length>j.BE;d&&(c=c.slice(0,j.BE));let e=new Set(c),f=await (0,j.ZT)(a),h=await (0,j.zC)(a,e),k=new Map;for(let b of i.I){let c=(0,l.Bu)(b);k.set(b,await c.buildProjectContext(a,e))}let m=(await n(c,50,b=>o(g().join(a,b),b))).filter(a=>null!==a),q=new Map;for(let a of m){let b=(0,l.Bu)(a.language),c=k.get(a.language),d=new Map,f=new Set;for(let g of a.importSpecifiers){if(d.has(g))continue;let h=b.resolveSpecifier(g,a.path,c,e);h&&h!==a.path&&(d.set(g,h),f.add(h))}let g=new Map,h=new Map;for(let b of a.flatSymbols){h.set(b.qualifiedName,b);let a=g.get(b.name);a?a.push(b):g.set(b.name,[b])}let i=new Map,j=new Map;for(let b of a.importBindings)b.isReexport?j.set(b.localName,b):i.set(b.localName,b);q.set(a.path,{path:a.path,language:a.language,mtime:a.mtime,symbolsTree:a.symbolsTree,flatSymbols:a.flatSymbols,importedFiles:f,importedBy:new Set,importBindings:a.importBindings,resolvedImports:d,intraCalls:[],outgoingCalls:[],incomingCalls:[],externalCalls:[],methodCalls:[],symbolsByName:g,symbolsByQname:h,bindingsByLocalName:i,reexportsByLocalName:j})}for(let a of q.values())for(let b of a.importedFiles){let c=q.get(b);c&&c.importedBy.add(a.path)}for(let a of m){let b=q.get(a.path),c=(0,l.Bu)(a.language),d=k.get(a.language),e=new Map,f=new Map,g=new Map,h=new Map;for(let i of a.rawCalls){let a=p(b.flatSymbols,i.line);if(a){for(let j of c.resolveCall(i,a,b,q,d))if("symbol"===j.kind)if(j.addr.filePath===b.path){let c=`${a.qualifiedName}${j.addr.qualifiedName}`,d=e.get(c);if(d)d.lines.push(i.line);else{let d={from:a.qualifiedName,to:j.addr.qualifiedName,lines:[i.line]};e.set(c,d),b.intraCalls.push(d)}}else{let c=`${a.qualifiedName}${j.addr.filePath}${j.addr.qualifiedName}`,d=f.get(c);if(d)d.lines.push(i.line);else{let d={from:a.qualifiedName,to:{filePath:j.addr.filePath,qualifiedName:j.addr.qualifiedName},lines:[i.line]};f.set(c,d),b.outgoingCalls.push(d)}}else if("external"===j.kind){let c=`${a.qualifiedName}${j.packageSpec}${j.name}`,d=g.get(c);if(d)d.lines.push(i.line);else{let d={from:a.qualifiedName,packageSpec:j.packageSpec,importedName:j.name,lines:[i.line]};g.set(c,d),b.externalCalls.push(d)}}else if("method-unresolved"===j.kind){let c=b.bindingsByLocalName.get(j.receiverName),d=c?b.resolvedImports.get(c.specifier)??"":"",e=`${a.qualifiedName}${j.receiverName}${j.methodName}`,f=h.get(e);if(f)f.lines.push(i.line);else{let c={from:a.qualifiedName,receiverName:j.receiverName,methodName:j.methodName,receiverFilePath:d,lines:[i.line]};h.set(e,c),b.methodCalls.push(c)}}}}for(let a of b.intraCalls)a.lines.sort((a,b)=>a-b);for(let a of b.outgoingCalls)a.lines.sort((a,b)=>a-b);for(let a of b.externalCalls)a.lines.sort((a,b)=>a-b);for(let a of b.methodCalls)a.lines.sort((a,b)=>a-b)}for(let a of q.values())for(let b of a.outgoingCalls){let c=q.get(b.to.filePath);c&&c.incomingCalls.push({from:{filePath:a.path,qualifiedName:b.from},to:b.to.qualifiedName,lines:b.lines})}return{cwd:a,files:q,truncated:d,fileCountCap:d?j.BE:void 0,tsconfigs:f,workspaces:h,projectContexts:k,fileSet:e,generatedAt:Date.now(),buildMs:Date.now()-b}}h=(m.then?(await m)():m)[0];let G=new Map,H=new Map,I=new Set,J=new Set,K=null;function r(a){if(K=a,a)for(let b of J)a(b,()=>I.add(b))}async function s(a,b){let c=Array.from(b.files.keys()),d=0,e=async()=>{for(;d<c.length;){let e=d++;try{await v(a,c[e],b)}catch{}}};await Promise.all(Array.from({length:Math.min(8,c.length)},e))}async function t(a,b={}){!J.has(a)&&(J.add(a),K&&K(a,()=>I.add(a))),b.forceRefresh&&(G.delete(a),I.delete(a));let d=G.get(a);if(d){if(I.has(a)){I.delete(a);try{await s(a,d)}catch{}}return d}let e=H.get(a);if(e)return e;let f=q(a).then(b=>(G.set(a,b),H.delete(a),I.delete(a),Promise.all([c.e(4008),c.e(2540)]).then(c.bind(c,92540)).then(c=>c.precomputeAnalytics(a,b)).catch(a=>{console.error("[codeIndex] analytics precompute failed:",a)}),b));return H.set(a,f),f}function u(a){if(Promise.all([c.e(4008),c.e(2540)]).then(c.bind(c,92540)).then(b=>b.invalidateAnalytics(a)).catch(()=>{}),!a){G.clear(),H.clear(),I.clear();return}G.delete(a),H.delete(a),I.delete(a)}async function v(a,b,c){let d,f=c.files.get(b);if(!f)return!1;try{d=(await e.promises.stat(g().join(a,b))).mtimeMs}catch{return!1}if(d===f.mtime)return!1;let h=await o(g().join(a,b),b);if(!h)return!1;let i=(0,l.Bu)(h.language),j=c.projectContexts.get(h.language),k=new Map,m=new Set;for(let a of h.importSpecifiers){if(k.has(a))continue;let b=i.resolveSpecifier(a,h.path,j,c.fileSet);b&&b!==h.path&&(k.set(a,b),m.add(b))}let n=new Map,q=new Map;for(let a of h.flatSymbols){q.set(a.qualifiedName,a);let b=n.get(a.name);b?b.push(a):n.set(a.name,[a])}let r=new Map,s=new Map;for(let a of h.importBindings)a.isReexport?s.set(a.localName,a):r.set(a.localName,a);let t={path:h.path,language:h.language,mtime:h.mtime,symbolsTree:h.symbolsTree,flatSymbols:h.flatSymbols,importedFiles:m,importedBy:f.importedBy,importBindings:h.importBindings,resolvedImports:k,intraCalls:[],outgoingCalls:[],incomingCalls:f.incomingCalls,externalCalls:[],methodCalls:[],symbolsByName:n,symbolsByQname:q,bindingsByLocalName:r,reexportsByLocalName:s},u=new Map,v=new Map,w=new Map,x=new Map;for(let a of(c.files.set(h.path,t),h.rawCalls)){let b=p(t.flatSymbols,a.line);if(b){for(let d of i.resolveCall(a,b,t,c.files,j))if("symbol"===d.kind)if(d.addr.filePath===t.path){let c=`${b.qualifiedName}${d.addr.qualifiedName}`,e=u.get(c);if(e)e.lines.push(a.line);else{let e={from:b.qualifiedName,to:d.addr.qualifiedName,lines:[a.line]};u.set(c,e),t.intraCalls.push(e)}}else{let c=`${b.qualifiedName}${d.addr.filePath}${d.addr.qualifiedName}`,e=v.get(c);if(e)e.lines.push(a.line);else{let e={from:b.qualifiedName,to:{filePath:d.addr.filePath,qualifiedName:d.addr.qualifiedName},lines:[a.line]};v.set(c,e),t.outgoingCalls.push(e)}}else if("external"===d.kind){let c=`${b.qualifiedName}${d.packageSpec}${d.name}`,e=w.get(c);if(e)e.lines.push(a.line);else{let e={from:b.qualifiedName,packageSpec:d.packageSpec,importedName:d.name,lines:[a.line]};w.set(c,e),t.externalCalls.push(e)}}else if("method-unresolved"===d.kind){let c=t.bindingsByLocalName.get(d.receiverName),e=c?t.resolvedImports.get(c.specifier)??"":"",f=`${b.qualifiedName}${d.receiverName}${d.methodName}`,g=x.get(f);if(g)g.lines.push(a.line);else{let c={from:b.qualifiedName,receiverName:d.receiverName,methodName:d.methodName,receiverFilePath:e,lines:[a.line]};x.set(f,c),t.methodCalls.push(c)}}}}for(let a of t.intraCalls)a.lines.sort((a,b)=>a-b);for(let a of t.outgoingCalls)a.lines.sort((a,b)=>a-b);for(let a of t.externalCalls)a.lines.sort((a,b)=>a-b);for(let a of t.methodCalls)a.lines.sort((a,b)=>a-b);return!0}function w(a){return{filePath:a.filePath,qualifiedName:a.qualifiedName,name:a.name,kind:a.kind,startLine:a.startLine,endLine:a.endLine,params:a.params}}function x(a){let b=a.indexOf(">");return b>=0?a.slice(0,b):a}function y(a){if(a.length<2)return a;let b=[a[0]];for(let c=1;c<a.length;c++)a[c]!==a[c-1]&&b.push(a[c]);return b}function z(a,b){let c=a.files.get(b);if(!c)return null;let d=c.flatSymbols.filter(a=>!a.qualifiedName.includes(">")).map(w).sort((a,b)=>a.startLine-b.startLine),e=new Set(d.map(a=>a.qualifiedName)),f=new Map,g=[];for(let a of c.intraCalls){let b=x(a.from),c=x(a.to);if(b===c||!e.has(b)||!e.has(c))continue;let d=`${b}|${c}`,h=f.get(d);if(h)for(let b of a.lines)h.lines.push(b);else{let e={from:b,to:c,lines:a.lines.slice()};f.set(d,e),g.push(e)}}for(let a of g)a.lines.sort((a,b)=>a-b),a.lines=y(a.lines);let h=[],i=new Map;for(let b of c.outgoingCalls){let d=x(b.from);if(!e.has(d)||b.to.filePath===c.path)continue;let f=a.files.get(b.to.filePath);if(!f)continue;let g=f.symbolsByQname.get(b.to.qualifiedName);if(!g||!(0,k._)(g))continue;let j=`${g.filePath}|${g.qualifiedName}|${d}`,l=i.get(j);if(l)for(let a of b.lines)l.lines.push(a);else{let a={external:w(g),focalQname:d,lines:b.lines.slice()};i.set(j,a),h.push(a)}}let j=[],l=new Map;for(let b of c.incomingCalls){let d=x(b.to);if(!e.has(d)||b.from.filePath===c.path)continue;let f=a.files.get(b.from.filePath);if(!f)continue;let g=f.symbolsByQname.get(b.from.qualifiedName);if(!g||!(0,k._)(g))continue;let h=`${g.filePath}|${g.qualifiedName}|${d}`,i=l.get(h);if(i)for(let a of b.lines)i.lines.push(a);else{let a={external:w(g),focalQname:d,lines:b.lines.slice()};l.set(h,a),j.push(a)}}for(let a of h)a.lines.sort((a,b)=>a-b),a.lines=y(a.lines);for(let a of j)a.lines.sort((a,b)=>a-b),a.lines=y(a.lines);let m=[],n=new Map;for(let a of c.externalCalls){let b=x(a.from);if(!e.has(b))continue;let c=`${b}|${a.packageSpec}|${a.importedName}`,d=n.get(c);if(d)for(let b of a.lines)d.lines.push(b);else{let d={external:{name:a.importedName,packageSpec:a.packageSpec},focalQname:b,lines:a.lines.slice()};n.set(c,d),m.push(d)}}for(let a of m)a.lines.sort((a,b)=>a-b),a.lines=y(a.lines);let o=[],p=new Map;for(let a of c.methodCalls){let b=x(a.from);if(!e.has(b))continue;let c=`${b}|${a.receiverName}|${a.methodName}`,d=p.get(c);if(d)for(let b of a.lines)d.lines.push(b);else{let d={focalQname:b,receiverName:a.receiverName,methodName:a.methodName,receiverFilePath:a.receiverFilePath,lines:a.lines.slice()};p.set(c,d),o.push(d)}}for(let a of o)a.lines.sort((a,b)=>a-b),a.lines=y(a.lines);let q=(a,b)=>a.external.filePath.localeCompare(b.external.filePath)||a.external.qualifiedName.localeCompare(b.external.qualifiedName);return j.sort(q),h.sort(q),m.sort((a,b)=>a.external.packageSpec.localeCompare(b.external.packageSpec)||a.external.name.localeCompare(b.external.name)),o.sort((a,b)=>a.receiverName.localeCompare(b.receiverName)||a.methodName.localeCompare(b.methodName)),{filePath:c.path,language:c.language,fileCount:a.files.size,mtimeMs:c.mtime,functions:d,intraCalls:g,externalCalls:m,methodCalls:o,upstreamCalls:j,downstreamCalls:h}}function A(a,b){let c=a.files.get(b);return c?{filePath:c.path,language:c.language,symbols:function a(b){let c=[];for(let d of b)"unknown"!==d.kind&&c.push({...d,children:a(d.children)});return c}(c.symbolsTree)}:null}function B(a,b,c){let d=b.trim().toLowerCase();if(!d)return{files:[],symbols:[]};let e=[];for(let b of a.files.values()){if(e.length>=c)break;b.path.toLowerCase().includes(d)&&e.push({type:"file",label:function(a){let b=a.lastIndexOf("/");return b>=0?a.slice(b+1):a}(b.path),hint:b.path,target:{kind:"file",filePath:b.path}})}let f=[];for(let b of a.files.values()){let a=!1;if(!function a(b,c){for(let d of b)if(c(d)||a(d.children,c))return!0;return!1}(b.symbolsTree,e=>f.length>=c?(a=!0,!0):"unknown"!==e.kind&&(e.name.toLowerCase().includes(d)&&f.push({type:"symbol",label:e.name,hint:`${e.kind} \xb7 ${b.path}`,target:{kind:"symbol",filePath:b.path,line:e.startLine,symbolName:e.name,symbolKind:e.kind,qualifiedName:e.qualifiedName}}),!1)),a)break}return{files:e,symbols:f}}function C(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 D(a,b,c){let d=C(a,b,c);if(0===d.length)return{qname:b,target:null,callers:[]};let e=[],f=new Map;for(let c of d){for(let a of c.intraCalls){if(a.to!==b)continue;let d=c.symbolsByQname.get(a.from);if(!d)continue;let g=`${c.path}|${a.from}`,h=f.get(g);if(h)for(let b of a.lines)h.callLines.push(b);else{let b={caller:w(d),callLines:a.lines.slice()};f.set(g,b),e.push(b)}}for(let d of c.incomingCalls){if(d.to!==b)continue;let c=a.files.get(d.from.filePath),g=c?.symbolsByQname.get(d.from.qualifiedName);if(!g)continue;let h=`${d.from.filePath}|${d.from.qualifiedName}`,i=f.get(h);if(i)for(let a of d.lines)i.callLines.push(a);else{let a={caller:w(g),callLines:d.lines.slice()};f.set(h,a),e.push(a)}}}for(let a of e)a.callLines.sort((a,b)=>a-b),a.callLines=y(a.callLines);e.sort((a,b)=>a.caller.filePath.localeCompare(b.caller.filePath)||a.caller.qualifiedName.localeCompare(b.caller.qualifiedName));let g=w(d[0].symbolsByQname.get(b)),h=d.length>1?d.map(a=>a.path):void 0;return{qname:b,target:g,callers:e,ambiguousIn:h}}function E(a,b,c){let d=C(a,b,c);if(0===d.length)return{qname:b,source:null,callees:[]};let e=[],f=new Map;for(let c of d){for(let a of c.intraCalls){if(a.from!==b)continue;let d=c.symbolsByQname.get(a.to);if(!d)continue;let g=`${c.path}|${a.to}`,h=f.get(g);if(h)for(let b of a.lines)h.callLines.push(b);else{let b={callee:w(d),callLines:a.lines.slice()};f.set(g,b),e.push(b)}}for(let d of c.outgoingCalls){if(d.from!==b)continue;let c=a.files.get(d.to.filePath),g=c?.symbolsByQname.get(d.to.qualifiedName);if(!g)continue;let h=`${d.to.filePath}|${d.to.qualifiedName}`,i=f.get(h);if(i)for(let a of d.lines)i.callLines.push(a);else{let a={callee:w(g),callLines:d.lines.slice()};f.set(h,a),e.push(a)}}}for(let a of e)a.callLines.sort((a,b)=>a-b),a.callLines=y(a.callLines);e.sort((a,b)=>a.callee.filePath.localeCompare(b.callee.filePath)||a.callee.qualifiedName.localeCompare(b.callee.qualifiedName));let g=w(d[0].symbolsByQname.get(b)),h=d.length>1?d.map(a=>a.path):void 0;return{qname:b,source:g,callees:e,ambiguousIn:h}}function F(a,b,c,d){let e=C(a,b,d);if(0===e.length)return{qname:b,target:null,nodes:[],truncated:!1};let f=Math.min(Math.max(c,1),5),g=w(e[0].symbolsByQname.get(b)),h=e.length>1?e.map(a=>a.path):void 0,i=e.map(a=>({filePath:a.path,qname:b})),j=new Set(i.map(a=>`${a.filePath}|${a.qname}`)),k=i.map(b=>{let c=a.files.get(b.filePath).symbolsByQname.get(b.qname);return{symbol:w(c),depth:0}}),l=i.slice(),m=!1;for(let b=1;b<=f;b++){let c=[];for(let d of l){let e=a.files.get(d.filePath);if(e){for(let a of e.intraCalls){if(a.to!==d.qname)continue;let f=e.symbolsByQname.get(a.from);if(!f)continue;let g=`${e.path}|${a.from}`;if(!j.has(g)&&(j.add(g),k.push({symbol:w(f),depth:b}),c.push({filePath:e.path,qname:a.from}),k.length>=500)){m=!0;break}}if(m)break;for(let f of e.incomingCalls){if(f.to!==d.qname)continue;let e=a.files.get(f.from.filePath),g=e?.symbolsByQname.get(f.from.qualifiedName);if(!g)continue;let h=`${f.from.filePath}|${f.from.qualifiedName}`;if(!j.has(h)&&(j.add(h),k.push({symbol:w(g),depth:b}),c.push({filePath:f.from.filePath,qname:f.from.qualifiedName}),k.length>=500)){m=!0;break}}if(m)break}}if(m||0===c.length)break;l=c}return k.sort((a,b)=>a.depth-b.depth||a.symbol.filePath.localeCompare(b.symbol.filePath)||a.symbol.qualifiedName.localeCompare(b.symbol.qualifiedName)),{qname:b,target:g,nodes:k,truncated:m,ambiguousIn:h}}d()}catch(a){d(a)}})},37765:(a,b,c)=>{c.d(b,{Bu:()=>d.Bu});var d=c(28677),e=c(76760),f=c.n(e);function g(a){let b=0xdeadbeef,c=0x41c6ce57;for(let d=0;d<a.length;d++){let e=a.charCodeAt(d);b=Math.imul(b^e,0x9e3779b1),c=Math.imul(c^e,0x5f356495)}return b=Math.imul(b^b>>>16,0x85ebca6b)^Math.imul(c^c>>>13,0xc2b2ae35),(0x100000000*(2097151&(c=Math.imul(c^c>>>16,0x85ebca6b)^Math.imul(b^b>>>13,0xc2b2ae35)))+(b>>>0)>>>0).toString(16)}function h(a){return a.replace(/\s+/g," ").trim()}function i(a,b){return a?`${a}>${b}`:b}function j(a){let b=a.childForFieldName("name");if(b)return b.text;for(let b=0;b<a.namedChildCount;b++){let c=a.namedChild(b);if(c&&("identifier"===c.type||"type_identifier"===c.type||"property_identifier"===c.type))return c.text}return"<anonymous>"}function k(a,b,c,d,e=[],f){return{qualifiedName:i(d,b),name:b,kind:c,startLine:a.startPosition.row+1,endLine:a.endPosition.row+1,contentHash:g(h(a.text)),children:e,params:f}}function l(a){let b=a.childForFieldName("parameter");if(b)return[b.text];let c=a.childForFieldName("parameters");if(!c)return;let d=[];for(let a=0;a<c.namedChildCount;a++){let b=c.namedChild(a);b&&d.push(function a(b){switch(b.type){case"required_parameter":case"optional_parameter":{let c=b.childForFieldName("pattern");return c?a(c):b.text}case"assignment_pattern":{let c=b.childForFieldName("left");return c?a(c):b.text}case"default_parameter":case"typed_default_parameter":{let a=b.childForFieldName("name");return a?a.text:b.text}case"typed_parameter":for(let a=0;a<b.namedChildCount;a++){let c=b.namedChild(a);if(c?.type==="identifier")return c.text}return b.text;default:return b.text}}(b))}return d}function m(a,b){let c=a.text.split("\n"),d=c.length;if(0===d)return[];let e=new Uint8Array(d+2);for(let a of b){let b=Math.max(1,a.startLine),c=Math.min(d,a.endLine);for(let a=b;a<=c;a++)e[a]=1}let f=[],i=(a,b)=>{let d=!1;for(let e=a;e<=b;e++){let a=c[e-1];if(a&&a.trim().length>0){d=!0;break}}if(!d)return;let e=c.slice(a-1,b).join("\n");f.push({qualifiedName:`__code_${a}_${b}__`,name:"code",kind:"unknown",startLine:a,endLine:b,contentHash:g(h(e)),children:[]})},j=-1;for(let a=1;a<=d;a++)e[a]?j>=0&&(i(j,a-1),j=-1):j<0&&(j=a);return j>=0&&i(j,d),f}function n(a){let b=[],c=function(a){let b=[],c=-1,d=-1;for(let e=0;e<a.namedChildCount;e++){let f=a.namedChild(e);if(f){if("import_statement"===f.type||"export_statement"===f.type&&null!==f.childForFieldName("source")||"import_from_statement"===f.type||"future_import_statement"===f.type)b.push(f),c<0&&(c=f.startPosition.row+1),d=f.endPosition.row+1;else if(c>=0)break}}return c<0?null:{qualifiedName:"__imports__",name:"imports",kind:"unknown",startLine:c,endLine:d,contentHash:g(h(b.map(a=>a.text).join("\n"))),children:[]}}(a);c&&b.push(c);for(let c=0;c<a.namedChildCount;c++){let d=a.namedChild(c);d&&b.push(...function a(b,c,d=!1){switch(b.type){case"export_statement":case"export_default_declaration":{let d=[];for(let e=0;e<b.namedChildCount;e++){let f=b.namedChild(e);f&&d.push(...a(f,c,!0))}return d}case"function_declaration":case"generator_function_declaration":case"function_definition":return[k(b,j(b),"function",c,[],l(b))];case"class_declaration":case"abstract_class_declaration":{let a=j(b),d=i(c,a),e=function(a,b){if(!a)return[];let c=[];for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(e){if("method_definition"===e.type)c.push(k(e,j(e),"method",b,[],l(e)));else if("public_field_definition"===e.type){let a=e.childForFieldName("value");a&&("arrow_function"===a.type||"function_expression"===a.type)&&c.push(k(e,j(e),"method",b,[],l(a)))}}}return c}(b.childForFieldName("body"),d);return[k(b,a,"class",c,e)]}case"interface_declaration":return[k(b,j(b),"interface",c)];case"type_alias_declaration":return[k(b,j(b),"type",c)];case"enum_declaration":return[k(b,j(b),"enum",c)];case"lexical_declaration":case"variable_declaration":return function(a,b){let c=[];for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(!e||"variable_declarator"!==e.type)continue;let f=e.childForFieldName("name"),g=e.childForFieldName("value");if(!f)continue;let h=f.text,i=g&&("arrow_function"===g.type||"function_expression"===g.type),m=i&&g?l(g):void 0;if(c.push(k(a,h,i?"function":"const",b,[],m)),g&&"object"===g.type&&!i){let a=b?`${b}>${h}`:h;for(let b=0;b<g.namedChildCount;b++){let d=g.namedChild(b);if(d){if("pair"===d.type){let b=d.childForFieldName("key"),e=d.childForFieldName("value");if(!b||!e||"property_identifier"!==b.type&&"identifier"!==b.type||"arrow_function"!==e.type&&"function_expression"!==e.type)continue;c.push(k(d,b.text,"method",a,[],l(e)))}else if("method_definition"===d.type){let b=j(d);b&&c.push(k(d,b,"method",a,[],l(d)))}}}}}return c}(b,c);case"class_definition":{let a=j(b),d=i(c,a),e=function a(b,c){if(!b)return[];let d=[];for(let e=0;e<b.namedChildCount;e++){let f=b.namedChild(e);if(f){if("function_definition"===f.type)d.push(k(f,j(f),"method",c,[],l(f)));else if("decorated_definition"===f.type){let b=f.childForFieldName("definition");if(b?.type==="function_definition")d.push({...k(b,j(b),"method",c,[],l(b)),startLine:f.startPosition.row+1,contentHash:g(h(f.text))});else if(b?.type==="class_definition"){let e=j(b),l=i(c,e),m=a(b.childForFieldName("body"),l);d.push({...k(b,e,"class",c,m),startLine:f.startPosition.row+1,contentHash:g(h(f.text))})}}else if("class_definition"===f.type){let b=j(f),e=i(c,b),g=a(f.childForFieldName("body"),e);d.push(k(f,b,"class",c,g))}}}return d}(b.childForFieldName("body"),d);return[k(b,a,"class",c,e)]}case"decorated_definition":{let d=b.childForFieldName("definition");if(!d)return[];return a(d,c,!1).map(a=>({...a,startLine:b.startPosition.row+1,contentHash:g(h(b.text))}))}case"expression_statement":{let a=[];for(let d=0;d<b.namedChildCount;d++){let e=b.namedChild(d);if(e?.type==="assignment"){let d=function(a,b,c){let d=b.childForFieldName("left");if(!d||"identifier"!==d.type)return null;let e=d.text;return{qualifiedName:i(c,e),name:e,kind:"const",startLine:a.startPosition.row+1,endLine:a.endPosition.row+1,contentHash:g(h(a.text)),children:[]}}(b,e,c);d&&a.push(d)}}return a.push(...function(a,b){let c=null;for(let b=0;b<a.namedChildCount;b++){let d=a.namedChild(b);if(d){if("call_expression"===d.type){c=d;break}if("await_expression"===d.type){for(let a=0;a<d.namedChildCount;a++){let b=d.namedChild(a);if(b?.type==="call_expression"){c=b;break}}break}}}if(!c)return[];let d=c.childForFieldName("function"),e=c.childForFieldName("arguments");if(!d||!e)return[];let f=null,g=[];for(let a=0;a<e.namedChildCount;a++){let b=e.namedChild(a);if(b){if(null===f&&("string"===b.type||"template_string"===b.type)){let a=b.text;f=a.length>=2&&/^["'`]/.test(a)?a.slice(1,-1):a}("arrow_function"===b.type||"function_expression"===b.type)&&g.push(b)}}if(0===g.length||!f)return[];let h=function a(b){if("identifier"===b.type)return b.text;if("member_expression"===b.type){let a=b.childForFieldName("property");return a?.text??""}if("call_expression"===b.type){let c=b.childForFieldName("function");return c?a(c):""}return""}(d),i=h?`${h} ${f}`:f;return g.map((a,c)=>k(a,g.length>1?`${i} #${c+1}`:i,"function",b,[],l(a)))}(b,c)),a}default:return[]}}(d,void 0,!1))}return b.push(...m(a,b)),b}function o(a){let b=[];return!function a(c){if("call_expression"===c.type||"call"===c.type){let a=c.childForFieldName("function"),d=function a(b){if(!b)return null;if("identifier"===b.type||"shorthand_property_identifier"===b.type)return b.text;if("member_expression"===b.type){let a=b.childForFieldName("property");return a?.text??null}if("attribute"===b.type){let a=b.childForFieldName("attribute");return a?.text??null}return"call_expression"===b.type||"call"===b.type?a(b.childForFieldName("function")):null}(a);if(d){let e=function(a){if(!a||"member_expression"!==a.type&&"attribute"!==a.type)return;let b=a;for(;b;){if("identifier"===b.type)return b.text;if("this"===b.type||"super"===b.type)break;if("member_expression"===b.type||"attribute"===b.type){b=b.childForFieldName("object");continue}break}}(a);b.push({calleeName:d,line:c.startPosition.row+1,...e?{receiverName:e}:{}})}}else if("jsx_opening_element"===c.type||"jsx_self_closing_element"===c.type){let a=function a(b){return b?"identifier"===b.type?/^[A-Z]/.test(b.text)?b.text:null:"member_expression"===b.type||"jsx_member_expression"===b.type?a(b.childForFieldName("object")??b.namedChild(0)):null:null}(c.childForFieldName("name"));a&&b.push({calleeName:a,line:c.startPosition.row+1})}for(let b=0;b<c.childCount;b++){let d=c.child(b);d&&a(d)}}(a),b}function p(a){let b=[];for(let c=0;c<a.namedChildCount;c++){let d=a.namedChild(c);if(d)if("import_statement"===d.type){let a=d.childForFieldName("source");a?function(a,b,c){let d=q(b.text),e=null;for(let b=0;b<a.namedChildCount;b++){let c=a.namedChild(b);if(c?.type==="import_clause"){e=c;break}}if(e)for(let a=0;a<e.namedChildCount;a++){let b=e.namedChild(a);if(b){if("identifier"===b.type)c.push({specifier:d,importedName:"default",localName:b.text});else if("namespace_import"===b.type){let a=function(a,b){for(let c=0;c<a.namedChildCount;c++){let d=a.namedChild(c);if(d?.type===b)return d}return null}(b,"identifier");a&&c.push({specifier:d,importedName:"*",localName:a.text})}else if("named_imports"===b.type)for(let a=0;a<b.namedChildCount;a++){let e=b.namedChild(a);if(!e||"import_specifier"!==e.type)continue;let f=e.childForFieldName("name"),g=e.childForFieldName("alias");f&&c.push({specifier:d,importedName:f.text,localName:g?.text??f.text})}}}}(d,a,b):function(a,b){for(let c=0;c<a.childCount;c++){let d=a.child(c);if(d&&"name"===a.fieldNameForChild(c)){if("dotted_name"===d.type){let a=d.text,c=a.split(".")[0];b.push({specifier:a,importedName:"*",localName:c})}else if("aliased_import"===d.type){let a=d.childForFieldName("name"),c=d.childForFieldName("alias");a?.type==="dotted_name"&&c&&b.push({specifier:a.text,importedName:"*",localName:c.text})}}}}(d,b)}else"import_from_statement"===d.type&&function(a,b){let c=a.childForFieldName("module_name"),d="";if(c){if("dotted_name"===c.type)d=c.text;else if("relative_import"===c.type){let a="",b="";for(let d=0;d<c.namedChildCount;d++){let e=c.namedChild(d);e&&("import_prefix"===e.type?a=e.text:"dotted_name"===e.type&&(b=e.text))}d=a+b}}if(!d)return;let e=!1;for(let c=0;c<a.childCount;c++){let f=a.child(c);if(!f)continue;let g=a.fieldNameForChild(c);if("wildcard_import"===f.type){e=!0;continue}if("name"===g){if("dotted_name"===f.type){let a=f.text;b.push({specifier:d,importedName:a,localName:a})}else if("aliased_import"===f.type){let a=f.childForFieldName("name"),c=f.childForFieldName("alias");a?.type==="dotted_name"&&c&&b.push({specifier:d,importedName:a.text,localName:c.text})}}}e&&b.push({specifier:d,importedName:"*",localName:"*"})}(d,b)}return b}function q(a){return a.length>=2&&('"'===a[0]||"'"===a[0])&&a[a.length-1]===a[0]?a.slice(1,-1):a}function r(a){let b=[];function c(a){if(!a||"string"!==a.type)return null;for(let b=0;b<a.namedChildCount;b++){let c=a.namedChild(b);if(c&&"string_fragment"===c.type)return c.text}return""}return!function a(d){switch(d.type){case"import_statement":case"export_statement":{let a=c(d.childForFieldName("source"));a&&b.push(a);return}case"call_expression":{let a=d.childForFieldName("function");if(a){let e="import"===a.type,f="identifier"===a.type&&"require"===a.text;if(e||f){let a=d.childForFieldName("arguments");if(a&&a.namedChildCount>0){let d=c(a.namedChild(0));d&&b.push(d)}}}}}for(let b=0;b<d.namedChildCount;b++){let c=d.namedChild(b);c&&a(c)}}(a),b}let s={typescript:r,tsx:r,javascript:r,python:function(a){let b=[];return!function a(c){switch(c.type){case"import_statement":for(let a=0;a<c.childCount;a++){let d=c.child(a);if(d&&"name"===c.fieldNameForChild(a)){if("dotted_name"===d.type)b.push(d.text);else if("aliased_import"===d.type){let a=d.childForFieldName("name");a?.type==="dotted_name"&&b.push(a.text)}}}return;case"import_from_statement":{let a=function(a){let b=a.childForFieldName("module_name");if(!b)return"";if("dotted_name"===b.type)return b.text;if("relative_import"===b.type){let a="",c="";for(let d=0;d<b.namedChildCount;d++){let e=b.namedChild(d);e&&("import_prefix"===e.type?a=e.text:"dotted_name"===e.type&&(c=e.text))}return a+c}return""}(c);a&&b.push(a);return}}for(let b=0;b<c.namedChildCount;b++){let d=c.namedChild(b);d&&a(d)}}(a),b}};function t(a,b){let c=s[b];return c?c(a):[]}var u=c(25344);function v(a){return"function"===a||"class"===a||"method"===a}function w(a,b){return{grammarId:a,extensions:b,extractSymbols:(a,b)=>n(a),extractImports:b=>({specs:t(b,a),bindings:[...p(b),...function(a){let b=[];for(let c=0;c<a.namedChildCount;c++){let d=a.namedChild(c);if(!d||"export_statement"!==d.type)continue;let e=d.childForFieldName("source");if(!e)continue;let f=q(e.text),g=null;for(let a=0;a<d.namedChildCount;a++){let b=d.namedChild(a);if(b?.type==="export_clause"){g=b;break}}if(g)for(let a=0;a<g.namedChildCount;a++){let c=g.namedChild(a);if(!c||"export_specifier"!==c.type)continue;let d=c.childForFieldName("name"),e=c.childForFieldName("alias");if(!d)continue;let h=d.text,i=e?.text??h;b.push({localName:i,specifier:f,importedName:h,isReexport:!0})}}return b}(b)]}),extractCallSites:(a,b)=>o(a),async buildProjectContext(a,b){let c=new Set(b),d=await (0,u.ZT)(a),e=await (0,u.zC)(a,c),f=[...e.keys()].sort((a,b)=>b.length-a.length);return{cwd:a,tsconfigs:d,workspaces:e,sortedWsNames:f,owningScopesCache:new Map}},resolveSpecifier(a,b,c,d){let e=c.owningScopesCache.get(b);if(e||(e=c.tsconfigs.filter(a=>(0,u._0)(b,a.scope)),c.owningScopesCache.set(b,e)),a.startsWith("./")||a.startsWith("../"))return(0,u.KP)(f().resolve(c.cwd,f().dirname(b),a),c.cwd,d);if(a.startsWith("/"))return(0,u.KP)(f().resolve(c.cwd,a.slice(1)),c.cwd,d);for(let b of e){let e=b.sortedAliases.find(([b])=>a===b||a.startsWith(b+"/"));if(!e)continue;let[g,h]=e,i=a===g?"":a.slice(g.length+1),j=(0,u.KP)(f().resolve(c.cwd,h,i),c.cwd,d);if(j)return j}for(let b of c.sortedWsNames){if(a!==b&&!a.startsWith(b+"/"))continue;let e=c.workspaces.get(b);if(a===b)return e.entryFile;let g=a.slice(b.length+1);return(0,u.IS)(f().posix.join(e.dir,g),d)??(0,u.IS)(f().posix.join(e.dir,"src",g),d)}return null},resolveCall(a,b,c,d,e){if(a.receiverName){let b=c.bindingsByLocalName.get(a.receiverName);if(!b)return[];let e=c.resolvedImports.get(b.specifier);if(!e)return[];let f=d.get(e);if(!f)return[];let g=function a(b,c,d,e,f,g){if(e>5||f.has(b.path))return null;if(f.add(b.path),"*"!==c){let a=`${c}>${d}`,e=b.symbolsByQname.get(a);if(e&&v(e.kind))return e}if("*"===c){let a=b.symbolsByName.get(d);if(a){let b=null;for(let c of a)!c.qualifiedName.includes(">")&&v(c.kind)&&(!b||c.endLine-c.startLine>b.endLine-b.startLine)&&(b=c);if(b)return b}}let h=b.reexportsByLocalName.get(c);if(h){let c=b.resolvedImports.get(h.specifier);if(c){let b=g.get(c);if(b){let c=a(b,h.importedName,d,e+1,f,g);if(c)return c}}}return null}(f,b.importedName,a.calleeName,0,new Set,d);return g?[{kind:"symbol",addr:{filePath:g.filePath,qualifiedName:g.qualifiedName}}]:[{kind:"method-unresolved",receiverName:a.receiverName,methodName:a.calleeName}]}let f=c.symbolsByName.get(a.calleeName);if(f&&f.length>0){let a=[];for(let c of f)c.qualifiedName!==b.qualifiedName&&v(c.kind)&&a.push({kind:"symbol",addr:{filePath:c.filePath,qualifiedName:c.qualifiedName}});return a}let g=c.bindingsByLocalName.get(a.calleeName);if(!g)return[];let h=c.resolvedImports.get(g.specifier);if(!h)return[{kind:"external",name:g.importedName,packageSpec:g.specifier}];let i=d.get(h);if(!i)return[];let j=function a(b,c,d,e,f){if(d>5||e.has(b.path))return null;e.add(b.path);let g=b.symbolsByName.get(c);if(g){let a=null;for(let b of g)v(b.kind)&&(!a||b.endLine-b.startLine>a.endLine-a.startLine)&&(a=b);if(a)return a}let h=b.reexportsByLocalName.get(c);if(h){let c=b.resolvedImports.get(h.specifier);if(c){let b=f.get(c);if(b){let c=a(b,h.importedName,d+1,e,f);if(c)return c}}}return null}(i,g.importedName,0,new Set,d);return j?[{kind:"symbol",addr:{filePath:j.filePath,qualifiedName:j.qualifiedName}}]:[]},moduleForFile:(a,b)=>a}}let x=w("typescript",[".ts"]),y=w("tsx",[".tsx",".jsx"]),z=w("javascript",[".js",".mjs",".cjs"]);function A(a){return"function"===a||"class"===a||"method"===a}function B(a,b,c){let d=b.replace(/\./g,"/"),e=(...a)=>a.filter(a=>""!==a&&"."!==a).join("/");if(!d){let b=e(a,"__init__.py");return c.has(b)?b:null}let f=e(a,d+".py");if(c.has(f))return f;let g=e(a,d,"__init__.py");return c.has(g)?g:null}var C=c(73024);function D(a,b,c,d,e=[],f){return{qualifiedName:d?`${d}>${b}`:b,name:b,kind:c,startLine:a.startPosition.row+1,endLine:a.endPosition.row+1,contentHash:g(h(a.text)),children:e,params:f}}function E(a){let b=a.childForFieldName("parameters");if(!b)return;let c=[];for(let a=0;a<b.namedChildCount;a++){let d=b.namedChild(a);if(d){if("parameter_declaration"===d.type){let a=d.childForFieldName("name");if(!a){c.push("_");continue}if("identifier"===a.type)c.push(a.text);else if("identifier_list"===a.type)for(let b=0;b<a.namedChildCount;b++){let d=a.namedChild(b);d?.type==="identifier"&&c.push(d.text)}else c.push(a.text)}else if("variadic_parameter_declaration"===d.type){let a=d.childForFieldName("name");a?.type==="identifier"?c.push(`...${a.text}`):c.push("...")}}}return c}async function F(a){try{let b=await C.promises.readFile(f().join(a,"go.mod"),"utf8"),c=/^\s*module\s+(\S+)/m.exec(b);return c?c[1].trim():null}catch{return null}}function G(a){return"function"===a||"class"===a||"method"===a}function H(a,b,c,d,e=[],f){return{qualifiedName:d?`${d}>${b}`:b,name:b,kind:c,startLine:a.startPosition.row+1,endLine:a.endPosition.row+1,contentHash:g(h(a.text)),children:e,params:f}}function I(a){let b=a.childForFieldName("parameters");if(!b)return;let c=[];for(let a=0;a<b.namedChildCount;a++){let d=b.namedChild(a);if(d)if("self_parameter"===d.type)c.push(d.text);else if("parameter"===d.type){let a=d.childForFieldName("pattern");a?c.push(a.text):c.push("_")}else"variadic_parameter"===d.type&&c.push("...")}return c}async function J(a,b){let c=new Map,d=new Map,e=new Set;async function g(h,i){let j;if(e.has(i))return;e.add(i),c.set(h,i),d.set(i,h);try{j=await C.promises.readFile(f().join(a,i),"utf8")}catch{return}let k=function(a){let b,c=a.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/.*$/gm,"").replace(/"(?:\\.|[^"\\\n])*"/g,'""'),d=[],e=/\b(?:pub(?:\s*\([^)]*\))?\s+)?mod\s+(\w+)\s*;/g;for(;null!==(b=e.exec(c));)d.push(b[1]);return d}(j);if(0===k.length)return;let l=f().dirname(i),m=f().basename(i,".rs"),n="mod"===m||"lib"===m||"main"===m?[l]:[l,f().join(l,m)];for(let a of k){let c=`${h}::${a}`,d=null;for(let c of n){for(let e of[f().join(c,`${a}.rs`),f().join(c,a,"mod.rs")]){let a=e.startsWith("./")?e.slice(2):e;if(b.has(a)){d=a;break}}if(d)break}d&&await g(c,d)}}for(let a of function(a){let b=[];for(let c of a)("src/lib.rs"===c||"src/main.rs"===c||c.endsWith("/src/lib.rs")||c.endsWith("/src/main.rs")||/^src\/bin\/[^/]+\.rs$/.test(c)||/\/src\/bin\/[^/]+\.rs$/.test(c))&&b.push(c);return b}(b))if("src/lib.rs"===a||"src/main.rs"===a)await g("crate",a);else if(a.startsWith("src/bin/"))await g("crate",a);else{let b=a.split("/"),c=b.indexOf("src");if(c>0){let d=b[c-1];await g(d,a)}}return{modTree:c,fileToMod:d}}function K(a){return"function"===a||"class"===a||"method"===a}(0,d.ik)(x),(0,d.ik)(y),(0,d.ik)(z),(0,d.ik)({grammarId:"python",extensions:[".py",".pyi"],extractSymbols:(a,b)=>n(a),extractImports:a=>({specs:t(a,"python"),bindings:p(a)}),extractCallSites:(a,b)=>o(a),buildProjectContext(a,b){let c=[a],d=!1;if(b.has("src/__init__.py"))d=!0;else for(let a of b)if(a.startsWith("src/")&&a.endsWith(".py")){d=!0;break}return d&&c.push(f().join(a,"src")),{cwd:a,pythonRoots:c}},resolveSpecifier(a,b,c,d){let e=/^(\.+)/.exec(a);if(e){let c=e[1].length,g=a.slice(c),h=f().dirname(b);for(let a=1;a<c;a++)h=f().dirname(h);return B(h||".",g,d)}for(let b of c.pythonRoots){let e=B(f().relative(c.cwd,b)||".",a,d);if(e)return e}return null},resolveCall(a,b,c,d,e){if(a.receiverName){let b=c.bindingsByLocalName.get(a.receiverName);if(!b)return[];let e=c.resolvedImports.get(b.specifier);if(!e)return[];let f=d.get(e);if(!f)return[];let g=function(a,b,c){if("*"!==b){let d=`${b}>${c}`,e=a.symbolsByQname.get(d);if(e&&A(e.kind))return e}if("*"===b){let b=a.symbolsByName.get(c);if(b){let a=null;for(let c of b)!c.qualifiedName.includes(">")&&A(c.kind)&&(!a||c.endLine-c.startLine>a.endLine-a.startLine)&&(a=c);if(a)return a}}return null}(f,b.importedName,a.calleeName);return g?[{kind:"symbol",addr:{filePath:g.filePath,qualifiedName:g.qualifiedName}}]:[{kind:"method-unresolved",receiverName:a.receiverName,methodName:a.calleeName}]}let f=c.symbolsByName.get(a.calleeName);if(f&&f.length>0){let a=[];for(let c of f)c.qualifiedName!==b.qualifiedName&&A(c.kind)&&a.push({kind:"symbol",addr:{filePath:c.filePath,qualifiedName:c.qualifiedName}});return a}let g=c.bindingsByLocalName.get(a.calleeName);if(!g)return[];let h=c.resolvedImports.get(g.specifier);if(!h)return[{kind:"external",name:g.importedName,packageSpec:g.specifier}];let i=d.get(h);if(!i)return[];let j=function(a,b){let c=a.symbolsByName.get(b);if(!c)return null;let d=null;for(let a of c)A(a.kind)&&(!d||a.endLine-a.startLine>d.endLine-d.startLine)&&(d=a);return d}(i,g.importedName);return j?[{kind:"symbol",addr:{filePath:j.filePath,qualifiedName:j.qualifiedName}}]:[]},moduleForFile:(a,b)=>a}),(0,d.ik)({grammarId:"go",extensions:[".go"],extractSymbols(a,b){let c=[],d=function(a){let b=[],c=-1,d=-1;for(let e=0;e<a.namedChildCount;e++){let f=a.namedChild(e);if(f){if("import_declaration"===f.type)b.push(f),c<0&&(c=f.startPosition.row+1),d=f.endPosition.row+1;else if("package_clause"===f.type)continue;else if(c>=0)break}}return c<0?null:{qualifiedName:"__imports__",name:"imports",kind:"unknown",startLine:c,endLine:d,contentHash:g(h(b.map(a=>a.text).join("\n"))),children:[]}}(a);d&&c.push(d);let{symbols:e,pendingMethods:f}=function(a){let b=[],c=[];for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(e)switch(e.type){case"function_declaration":{let a=e.childForFieldName("name");if(!a)break;b.push(D(e,a.text,"function",void 0,[],E(e)));break}case"method_declaration":{let a=e.childForFieldName("name");if(!a)break;let d=function(a){let b=a.childForFieldName("receiver");if(!b)return null;for(let a=0;a<b.namedChildCount;a++){let c=b.namedChild(a);if(c?.type!=="parameter_declaration")continue;let d=c.childForFieldName("type");if(!d)break;return function a(b){if("type_identifier"===b.type)return b.text;if("pointer_type"===b.type){for(let c=0;c<b.namedChildCount;c++){let d=b.namedChild(c);if(d){let b=a(d);if(b)return b}}return null}if("generic_type"===b.type){let c=b.childForFieldName("type");if(c)return a(c)}return null}(d)}return null}(e),f=D(e,a.text,"method",d??void 0,[],E(e));d?c.push({receiverType:d,symbol:f}):b.push(f);break}case"type_declaration":b.push(...function(a,b){let c=[];for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(e&&("type_spec"===e.type||"type_alias"===e.type)){let a=e.childForFieldName("name"),d=e.childForFieldName("type");if(!a)continue;let f=a.text,g=d?.type==="interface_type"?"interface":"class";c.push(D(e,f,g,b))}}return c}(e,void 0));break;case"var_declaration":case"const_declaration":b.push(...function(a,b){let c=[];for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(e&&("var_spec"===e.type||"const_spec"===e.type)){let a=e.childForFieldName("name");if(!a)continue;if("identifier_list"===a.type)for(let d=0;d<a.namedChildCount;d++){let f=a.namedChild(d);f?.type==="identifier"&&c.push(D(e,f.text,"const",b))}else"identifier"===a.type&&c.push(D(e,a.text,"const",b))}}return c}(e,void 0))}}return{symbols:b,pendingMethods:c}}(a);return c.push(...function(a,b){if(0===b.length)return a;let c=new Map;for(let b of a)("class"===b.kind||"interface"===b.kind)&&c.set(b.name,b);let d=[];for(let a of b){let b=c.get(a.receiverType);b?b.children=[...b.children,a.symbol]:d.push(a.symbol)}return[...a,...d]}(e,f)),c.push(...m(a,c)),c},extractImports:a=>(function(a){let b=[],c=[];function d(a){var d;let e,f=a.childForFieldName("path");if(!f)return;let g=(d=f.text).length>=2&&('"'===d[0]||"'"===d[0]||"`"===d[0])&&d[d.length-1]===d[0]?d.slice(1,-1):d;if(!g)return;b.push(g);let h=a.childForFieldName("name");if(h)e=h.text;else{let a=g.split("/");e=a[a.length-1]||g}c.push({specifier:g,importedName:"*",localName:e})}return!function a(b){if("import_declaration"===b.type){for(let a=0;a<b.namedChildCount;a++){let c=b.namedChild(a);if(c){if("import_spec"===c.type)d(c);else if("import_spec_list"===c.type)for(let a=0;a<c.namedChildCount;a++){let b=c.namedChild(a);b?.type==="import_spec"&&d(b)}}}return}for(let c=0;c<b.namedChildCount;c++){let d=b.namedChild(c);d&&a(d)}}(a),{specs:b,bindings:c}})(a),extractCallSites:(a,b)=>{let c;return c=[],!function a(b){if("call_expression"===b.type){let a=b.childForFieldName("function"),d=function a(b){if(!b)return null;if("identifier"===b.type)return b.text;if("selector_expression"===b.type){let a=b.childForFieldName("field");return a?.text??null}return"call_expression"===b.type?a(b.childForFieldName("function")):null}(a);if(d){let e=function(a){if(!a||"selector_expression"!==a.type)return;let b=a;for(;b;){if("identifier"===b.type)return b.text;if("selector_expression"===b.type){b=b.childForFieldName("operand");continue}break}}(a);c.push({calleeName:d,line:b.startPosition.row+1,...e?{receiverName:e}:{}})}}for(let c=0;c<b.childCount;c++){let d=b.child(c);d&&a(d)}}(a),c},async buildProjectContext(a,b){let c=await F(a);return{cwd:a,modulePath:c,dirToGoFiles:function(a){let b=new Map;for(let c of a){if(!c.endsWith(".go"))continue;let a=f().dirname(c),d=b.get(a);d?d.push(c):b.set(a,[c])}return b}(b)}},resolveSpecifier(a,b,c,d){if(!c.modulePath)return null;if(a===c.modulePath){let a=c.dirToGoFiles.get(".");return a?.[0]??null}if(a.startsWith(c.modulePath+"/")){let b=a.slice(c.modulePath.length+1),d=c.dirToGoFiles.get(b);return d?.[0]??null}return null},resolveCall(a,b,c,d,e){let g=f().dirname(c.path),h=e.dirToGoFiles.get(g)??[c.path];if(a.receiverName){let b=c.bindingsByLocalName.get(a.receiverName);if(b){let g=c.resolvedImports.get(b.specifier);if(!g)return[{kind:"external",name:a.calleeName,packageSpec:b.specifier}];let h=f().dirname(g);for(let b of e.dirToGoFiles.get(h)??[]){let c,e=d.get(b);if(!e)continue;let f=e.symbolsByName.get(a.calleeName);if(f){for(let a of f)if(!a.qualifiedName.includes(">")&&G(a.kind)){c=a;break}if(c)return[{kind:"symbol",addr:{filePath:c.filePath,qualifiedName:c.qualifiedName}}]}}return[{kind:"external",name:a.calleeName,packageSpec:b.specifier}]}let g=`${a.receiverName}>${a.calleeName}`;for(let a of h){let b=d.get(a);if(!b)continue;let c=b.symbolsByQname.get(g);if(c&&G(c.kind))return[{kind:"symbol",addr:{filePath:c.filePath,qualifiedName:c.qualifiedName}}]}return[{kind:"method-unresolved",receiverName:a.receiverName,methodName:a.calleeName}]}let i=[];for(let c of h){let e=d.get(c);if(!e)continue;let f=e.symbolsByName.get(a.calleeName);if(f)for(let a of f)!(a.qualifiedName===b.qualifiedName||a.qualifiedName.includes(">"))&&G(a.kind)&&i.push({kind:"symbol",addr:{filePath:a.filePath,qualifiedName:a.qualifiedName}})}return i},moduleForFile(a,b){let c=f().dirname(a);return b?.modulePath?"."===c?b.modulePath:`${b.modulePath}/${c}`:c}}),(0,d.ik)({grammarId:"rust",extensions:[".rs"],extractSymbols(a,b){let c=[],d=function(a){let b=[],c=-1,d=-1;for(let e=0;e<a.namedChildCount;e++){let f=a.namedChild(e);if(f){if("use_declaration"===f.type||"extern_crate_declaration"===f.type)b.push(f),c<0&&(c=f.startPosition.row+1),d=f.endPosition.row+1;else if(c>=0)break}}return c<0?null:{qualifiedName:"__imports__",name:"imports",kind:"unknown",startLine:c,endLine:d,contentHash:g(h(b.map(a=>a.text).join("\n"))),children:[]}}(a);d&&c.push(d);let{symbols:e,pendingImpls:f}=function(a){let b=[],c=[];for(let d=0;d<a.namedChildCount;d++){let e=a.namedChild(d);if(e)switch(e.type){case"function_item":{let a=e.childForFieldName("name");if(!a)break;b.push(H(e,a.text,"function",void 0,[],I(e)));break}case"struct_item":case"union_item":{let a=e.childForFieldName("name");if(!a)break;b.push(H(e,a.text,"class",void 0));break}case"enum_item":{let a=e.childForFieldName("name");if(!a)break;b.push(H(e,a.text,"enum",void 0));break}case"trait_item":{let a=e.childForFieldName("name");if(!a)break;let c=function(a,b){let c=a.childForFieldName("body");if(!c)return[];let d=[];for(let a=0;a<c.namedChildCount;a++){let e=c.namedChild(a);if(e&&("function_item"===e.type||"function_signature_item"===e.type)){let a=e.childForFieldName("name");if(!a)continue;d.push(H(e,a.text,"method",b,[],I(e)))}}return d}(e,a.text);b.push(H(e,a.text,"interface",void 0,c));break}case"impl_item":{let a=function(a){let b=a.childForFieldName("type");return b?function a(b){if("type_identifier"===b.type)return b.text;if("generic_type"===b.type){let c=b.childForFieldName("type");if(c)return a(c)}if("reference_type"===b.type)for(let c=0;c<b.namedChildCount;c++){let d=b.namedChild(c);if(d){let b=a(d);if(b)return b}}if("scoped_type_identifier"===b.type){let a=b.childForFieldName("name");if(a?.type==="type_identifier")return a.text}return null}(b):null}(e);if(!a)break;let b=function(a,b){let c=a.childForFieldName("body");if(!c)return[];let d=[];for(let a=0;a<c.namedChildCount;a++){let e=c.namedChild(a);if(e){if("function_item"===e.type){let a=e.childForFieldName("name");if(!a)continue;d.push(H(e,a.text,"method",b,[],I(e)))}else if("function_signature_item"===e.type){let a=e.childForFieldName("name");if(!a)continue;d.push(H(e,a.text,"method",b,[],I(e)))}}}return d}(e,a);b.length>0&&c.push({targetType:a,methods:b});break}case"const_item":case"static_item":{let a=e.childForFieldName("name");if(!a)break;b.push(H(e,a.text,"const",void 0));break}case"type_item":{let a=e.childForFieldName("name");if(!a)break;b.push(H(e,a.text,"type",void 0));break}case"mod_item":{let a=e.childForFieldName("name"),c=e.childForFieldName("body");if(!a||!c)break;b.push(H(e,a.text,"class",void 0))}}}return{symbols:b,pendingImpls:c}}(a);return c.push(...function(a,b){if(0===b.length)return a;let c=new Map;for(let b of a)("class"===b.kind||"enum"===b.kind||"interface"===b.kind)&&c.set(b.name,b);let d=[];for(let a of b){let b=c.get(a.targetType);b?b.children=[...b.children,...a.methods]:d.push(...a.methods)}return[...a,...d]}(e,f)),c.push(...m(a,c)),c},extractImports:a=>(function(a){let b=[],c=[];function d(a){if("identifier"===a.type||"crate"===a.type||"self"===a.type||"super"===a.type)return a.text;if("scoped_identifier"===a.type){let b=a.childForFieldName("path"),c=a.childForFieldName("name"),e=b?d(b):"",f=c?.text??"";return e?`${e}::${f}`:f}return a.text}function e(a,b){return a?b?`${a}::${b}`:a:b}function f(a){let b=a.split("::");return b[b.length-1]??a}return!function a(g){if("use_declaration"===g.type)return void function(a){for(let g=0;g<a.namedChildCount;g++){let h=a.namedChild(g);h&&function a(g,h){switch(g.type){case"use_as_clause":{let a=g.childForFieldName("path"),i=g.childForFieldName("alias");if(a&&i){let g=e(h,d(a));b.push(g),c.push({specifier:g,importedName:f(g),localName:i.text})}break}case"use_list":for(let b=0;b<g.namedChildCount;b++){let c=g.namedChild(b);c&&a(c,h)}break;case"scoped_use_list":{let b=g.childForFieldName("path"),c=g.childForFieldName("list"),f=b?e(h,d(b)):h;if(c)for(let b=0;b<c.namedChildCount;b++){let d=c.namedChild(b);d&&a(d,f)}break}case"use_wildcard":{let a=g.childForFieldName("path"),f=a?e(h,d(a)):h;f&&(b.push(f),c.push({specifier:f,importedName:"*",localName:"*"}));break}case"identifier":case"self":case"super":case"crate":case"scoped_identifier":{let a=e(h,d(g));a&&(b.push(a),c.push({specifier:a,importedName:f(a),localName:f(a)}))}}}(h,"")}}(g);if("extern_crate_declaration"===g.type){let a=g.childForFieldName("name");a&&(b.push(a.text),c.push({specifier:a.text,importedName:"*",localName:a.text}));return}if("mod_item"===g.type){let a=g.childForFieldName("body"),c=g.childForFieldName("name");!a&&c&&b.push(c.text);return}for(let b=0;b<g.namedChildCount;b++){let c=g.namedChild(b);c&&a(c)}}(a),{specs:b,bindings:c}})(a),extractCallSites:(a,b)=>{let c;return c=[],!function a(b){if("call_expression"===b.type){let a=b.childForFieldName("function"),d=function(a){if(!a)return null;if("identifier"===a.type)return a.text;if("scoped_identifier"===a.type){let b=a.childForFieldName("name");return b?.text??null}if("field_expression"===a.type){let b=a.childForFieldName("field");return b?.text??null}return null}(a);if(d){let e=function(a){if(a){if("scoped_identifier"===a.type){let b=a;for(;b;){if("identifier"===b.type)return b.text;if("scoped_identifier"===b.type){b=b.childForFieldName("path");continue}break}}if("field_expression"===a.type){let b=a.childForFieldName("value");if(b?.type==="identifier")return b.text}}}(a);c.push({calleeName:d,line:b.startPosition.row+1,...e?{receiverName:e}:{}})}}else if("method_call_expression"===b.type){let a=b.childForFieldName("method"),d=b.childForFieldName("value");if(a){let e=d?.type==="identifier"?d.text:void 0;c.push({calleeName:a.text,line:b.startPosition.row+1,...e?{receiverName:e}:{}})}}for(let c=0;c<b.childCount;c++){let d=b.child(c);d&&a(d)}}(a),c},async buildProjectContext(a,b){let{modTree:c,fileToMod:d}=await J(a,b);return{cwd:a,modTree:c,fileToMod:d}},resolveSpecifier(a,b,c,d){let e=c.fileToMod.get(b);if(!e)return null;let f=function(a,b){if(a.startsWith("crate::"))return a;if("crate"===a)return"crate";if(a.startsWith("self::"))return`${b}::${a.slice(6)}`;if("self"===a)return b;if(a.startsWith("super::")){let c=b,d=a;for(;d.startsWith("super::");){let a=c.lastIndexOf("::");if(a<0)return null;c=c.slice(0,a),d=d.slice(7)}if("super"===d){let a=c.lastIndexOf("::");return a<0?null:c.slice(0,a)}return d?`${c}::${d}`:c}return null}(a,e);if(!f)return null;if(c.modTree.has(f))return c.modTree.get(f);let g=f.split("::");for(;g.length>1;){g.pop();let a=g.join("::"),b=c.modTree.get(a);if(b)return b}return null},resolveCall(a,b,c,d,e){let f;if(a.receiverName){let b=c.bindingsByLocalName.get(a.receiverName);if(b){let e=c.resolvedImports.get(b.specifier);if(!e)return[{kind:"external",name:a.calleeName,packageSpec:b.specifier}];let f=d.get(e);if(!f)return[];let g=f.symbolsByName.get(a.calleeName);if(g){for(let a of g)if(!a.qualifiedName.includes(">")&&K(a.kind))return[{kind:"symbol",addr:{filePath:a.filePath,qualifiedName:a.qualifiedName}}]}let h=`${b.importedName}>${a.calleeName}`,i=f.symbolsByQname.get(h);return i&&K(i.kind)?[{kind:"symbol",addr:{filePath:i.filePath,qualifiedName:i.qualifiedName}}]:[{kind:"method-unresolved",receiverName:a.receiverName,methodName:a.calleeName}]}let e=`${a.receiverName}>${a.calleeName}`,f=c.symbolsByQname.get(e);if(f)return[{kind:"symbol",addr:{filePath:f.filePath,qualifiedName:f.qualifiedName}}];let g=[],h=c.symbolsByName.get(a.calleeName);if(h)for(let a of h)"method"===a.kind&&g.push({kind:"symbol",addr:{filePath:a.filePath,qualifiedName:a.qualifiedName}});return g.length>0?g:[{kind:"method-unresolved",receiverName:a.receiverName,methodName:a.calleeName}]}let g=[],h=c.symbolsByName.get(a.calleeName);if(h)for(let a of h)!(a.qualifiedName===b.qualifiedName||a.qualifiedName.includes(">"))&&K(a.kind)&&g.push({kind:"symbol",addr:{filePath:a.filePath,qualifiedName:a.qualifiedName}});if(g.length>0)return g;let i=c.bindingsByLocalName.get(a.calleeName);if(!i)return[];let j=c.resolvedImports.get(i.specifier);if(!j)return[{kind:"external",name:i.importedName,packageSpec:i.specifier}];let k=d.get(j);if(!k)return[];let l=k.symbolsByName.get(i.importedName);if(l){for(let a of l)if(!a.qualifiedName.includes(">")&&K(a.kind)){f=a;break}}return f?[{kind:"symbol",addr:{filePath:f.filePath,qualifiedName:f.qualifiedName}}]:[]},moduleForFile:(a,b)=>b?.fileToMod.get(a)??f().dirname(a)})},64949:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{g:()=>h});var e=c(33265),f=c(88395),g=a([e]);e=(g.then?(await g)():g)[0];let i=!1;function h(){i||(i=!0,(0,e.ih)((a,b)=>{f.t.subscribe(a,a=>{a.some(a=>"file"===a.type||"git"===a.type)&&b()})}))}d()}catch(a){d(a)}})},72891:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{OZ:()=>o,RL:()=>n,k9:()=>p,ok:()=>l});var e=c(37625),f=c(52693),g=c(18412),h=c(89705),i=c(94506),j=c(770),k=a([i]);i=(k.then?(await k)():k)[0];let l=(a,b=200)=>new Response(JSON.stringify(a),{status:b,headers:{"content-type":"application/json"}}),m=a=>{let b=e.od(a);if(f.Ru(b)){let a=b.value,c=(0,j.Sh)(a);return new Response(JSON.stringify({error:(a=>{let b=a.message;if("string"==typeof b&&b.length>0)return b;let c=a.cause;if(c instanceof Error&&c.message.length>0)return c.message;switch(a._tag){case"ValidationError":return`Invalid ${a.field}: ${a.reason}`;case"NotFoundError":return`${a.resource} not found: ${a.id}`;case"PermissionError":return`Permission denied: ${a.action} on ${a.resource}`;case"DBError":return`${a.db} ${a.op} failed`;case"FSError":return`${a.op} ${a.path} failed`;case"WSError":return`${a.proto} ${a.kind} failed`;case"AgentError":return`${a.provider} ${a.kind} failed`;default:return a._tag}})(a),tag:a._tag}),{status:c,headers:{"content-type":"application/json"}})}return console.error("[handler] uncaught defect:\n"+e.j9(a)),new Response(JSON.stringify({error:"Internal Server Error",tag:"InternalError"}),{status:500,headers:{"content-type":"application/json"}})},n=a=>async b=>{let c=await i.s9.runPromiseExit(a(b));return g.YW(c,{onFailure:a=>m(a),onSuccess:a=>a})},o=a=>async(b,c)=>{let d=await c.params,e=await i.s9.runPromiseExit(a(b,d));return g.YW(e,{onFailure:a=>m(a),onSuccess:a=>a})},p=a=>h.$mh({try:()=>a.json(),catch:()=>new j.yI({field:"body",reason:"invalid JSON"})});d()}catch(a){d(a)}})},86236:(a,b,c)=>{c.d(b,{I:()=>d});let d=new Set(["typescript","tsx","javascript","python","go","rust"])},87956:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{M:()=>j,b:()=>i});var e=c(12629),f=c(76760),g=c.n(f),h=a([e]);e=(h.then?(await h)():h)[0];let k=g().join(process.cwd(),"public","tree-sitter"),l=null,m=new Map,n=new Map;async function i(a){let b,c=n.get(a);if(c)return c;let d=await (!(b=m.get(a))&&(b=(async()=>(await (!l&&(l=e.Parser.init({locateFile:a=>g().join(k,a)})),l),e.Language.load(g().join(k,`tree-sitter-${a}.wasm`))))(),m.set(a,b)),b);return(c=new e.Parser).setLanguage(d),n.set(a,c),c}function j(a){switch(a.slice(a.lastIndexOf(".")).toLowerCase()){case".ts":return"typescript";case".tsx":case".jsx":return"tsx";case".js":case".mjs":case".cjs":return"javascript";case".py":case".pyi":return"python";case".go":return"go";case".rs":return"rust";default:return null}}d()}catch(a){d(a)}})},88395:(a,b,c)=>{c.d(b,{t:()=>l});var d=c(29021),e=c(33873),f=c(7939);let g=[".git/HEAD",".git/MERGE_HEAD",".git/REBASE_HEAD"],h=[".git/refs"];class i{subscribe(a,b){let c=this.watchers.get(a);return c||(c=this.createWatcher(a),this.watchers.set(a,c)),c.listeners.add(b),()=>{this.unsubscribe(a,b)}}unsubscribe(a,b){let c=this.watchers.get(a);if(c&&(c.listeners.delete(b),0===c.listeners.size)){for(let a of(c.debounceTimer&&clearTimeout(c.debounceTimer),c.throttleTimer&&clearTimeout(c.throttleTimer),c.cwdRestartTimer&&clearTimeout(c.cwdRestartTimer),c.watchers))try{a.close()}catch{}this.watchers.delete(a)}}createWatcher(a){let b={watchers:[],listeners:new Set,pendingEvents:[],debounceTimer:null,throttleTimer:null,cwdRestartTimer:null},c=a=>{b.pendingEvents.some(b=>b.type===a.type)||b.pendingEvents.push(a),b.debounceTimer&&clearTimeout(b.debounceTimer),b.debounceTimer=setTimeout(()=>{this.flush(b)},500),b.throttleTimer||(b.throttleTimer=setTimeout(()=>{this.flush(b)},3e3))},f=()=>{try{let e=(0,d.watch)(a,{recursive:!0},(a,b)=>{if(b&&!(b.startsWith(".next/")||b.startsWith("node_modules/"))){if(b.startsWith(".git/")){(".git/HEAD"===b||b.startsWith(".git/refs/"))&&c({type:"git"});return}c({type:"file"})}});e.on("error",c=>{console.error(`File watcher error for ${a}:`,c);let d=b.watchers.indexOf(e);-1!==d&&b.watchers.splice(d,1);try{e.close()}catch{}b.listeners.size>0&&!b.cwdRestartTimer&&(b.cwdRestartTimer=setTimeout(()=>{b.cwdRestartTimer=null,b.listeners.size>0&&f()},2e3))}),b.watchers.push(e)}catch(b){console.error(`Failed to watch ${a}:`,b)}};f();let i=function(a){let b=(0,e.join)(a,".git");try{if((0,d.statSync)(b).isDirectory())return b;let c=(0,d.readFileSync)(b,"utf-8").trim().match(/^gitdir:\s*(.+)$/);if(c)return(0,e.resolve)(a,c[1])}catch{}return b}(a),j=a=>{try{let e=(0,d.watch)(a,()=>{c({type:"git"});try{e.close()}catch{}let d=b.watchers.indexOf(e);-1!==d&&b.watchers.splice(d,1),b.listeners.size>0&&setTimeout(()=>j(a),50)});e.on("error",()=>{let c=b.watchers.indexOf(e);-1!==c&&b.watchers.splice(c,1),b.listeners.size>0&&(0,d.existsSync)(a)&&setTimeout(()=>j(a),500)}),b.watchers.push(e)}catch{}};for(let a of g){let b=a.replace(".git/","");j((0,e.join)(i,b))}for(let a of h){let f=a.replace(".git/","");try{let a=(0,d.watch)((0,e.join)(i,f),{recursive:!0},()=>{c({type:"git"})});a.on("error",()=>{}),b.watchers.push(a)}catch{}}return b}flush(a){if(a.debounceTimer&&(clearTimeout(a.debounceTimer),a.debounceTimer=null),a.throttleTimer&&(clearTimeout(a.throttleTimer),a.throttleTimer=null),0===a.pendingEvents.length)return;let b=[...a.pendingEvents];for(let c of(a.pendingEvents=[],a.listeners))try{c(b)}catch(a){console.error("File watcher callback error:",a)}}constructor(){this.watchers=new Map}}class j{subscribe(a){return this.listeners.add(a),this.watcher||this.start(),()=>{this.listeners.delete(a),0===this.listeners.size&&this.stop()}}start(){try{(0,d.existsSync)(f.Tb)||(0,d.mkdirSync)(f.Tb,{recursive:!0}),(0,d.existsSync)(f.jp)||(0,d.writeFileSync)(f.jp,"0"),this.watcher=(0,d.watch)(f.jp,()=>{this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.notify(),300)}),this.watcher.on("error",()=>{this.stop(),setTimeout(()=>{this.listeners.size>0&&this.start()},2e3)})}catch{}}stop(){if(this.watcher){try{this.watcher.close()}catch{}this.watcher=null}this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}notify(){for(let a of this.listeners)try{a()}catch(a){console.error("ReviewWatcher callback error:",a)}}constructor(){this.listeners=new Set,this.watcher=null,this.debounceTimer=null}}let k=globalThis,l=k.__cockpitFileWatcher??(k.__cockpitFileWatcher=new i);k.__cockpitReviewWatcher??(k.__cockpitReviewWatcher=new j)}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
exports.id=4008,exports.ids=[4008],exports.modules={16373:(a,b,c)=>{var d=c(87961),e=c(16451).getPointerArray;function f(a,b){arguments.length<2&&(b=a,a=Array);var c=e(b);this.size=0,this.length=b,this.dense=new c(b),this.sparse=new c(b),this.vals=new a(b)}f.prototype.clear=function(){this.size=0},f.prototype.has=function(a){var b=this.sparse[a];return b<this.size&&this.dense[b]===a},f.prototype.get=function(a){var b=this.sparse[a];if(b<this.size&&this.dense[b]===a)return this.vals[b]},f.prototype.set=function(a,b){var c=this.sparse[a];return c<this.size&&this.dense[c]===a?this.vals[c]=b:(this.dense[this.size]=a,this.sparse[a]=this.size,this.vals[this.size]=b,this.size++),this},f.prototype.delete=function(a){var b=this.sparse[a];return!(b>=this.size)&&this.dense[b]===a&&(b=this.dense[this.size-1],this.dense[this.sparse[a]]=b,this.sparse[b]=this.sparse[a],this.size--,!0)},f.prototype.forEach=function(a,b){b=arguments.length>1?b:this;for(var c=0;c<this.size;c++)a.call(b,this.vals[c],this.dense[c])},f.prototype.keys=function(){var a=this.size,b=this.dense,c=0;return new d(function(){if(c<a){var d=b[c];return c++,{value:d}}return{done:!0}})},f.prototype.values=function(){var a=this.size,b=this.vals,c=0;return new d(function(){if(c<a){var d=b[c];return c++,{value:d}}return{done:!0}})},f.prototype.entries=function(){var a=this.size,b=this.dense,c=this.vals,e=0;return new d(function(){if(e<a){var d=[b[e],c[e]];return e++,{value:d}}return{done:!0}})},"u">typeof Symbol&&(f.prototype[Symbol.iterator]=f.prototype.entries),f.prototype.inspect=function(){for(var a=new Map,b=0;b<this.size;b++)a.set(this.dense[b],this.vals[b]);return Object.defineProperty(a,"constructor",{value:f,enumerable:!1}),a.length=this.length,this.vals.constructor!==Array&&(a.type=this.vals.constructor.name),a},"u">typeof Symbol&&(f.prototype[Symbol.for("nodejs.util.inspect.custom")]=f.prototype.inspect),a.exports=f},16451:(a,b)=>{b.getPointerArray=function(a){var b=a-1;if(b<=255)return Uint8Array;if(b<=65535)return Uint16Array;if(b<=0xffffffff)return Uint32Array;throw Error("mnemonist: Pointer Array of size > 4294967295 is not supported.")},b.getSignedPointerArray=function(a){var b=a-1;return b<=127?Int8Array:b<=32767?Int16Array:b<=0x7fffffff?Int32Array:Float64Array},b.getNumberType=function(a){if(a===(0|a))if(-1===Math.sign(a))return a<=127&&a>=-128?Int8Array:a<=32767&&a>=-32768?Int16Array:Int32Array;else return a<=255?Uint8Array:a<=65535?Uint16Array:Uint32Array;return Float64Array};var c={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};b.getMinimalRepresentation=function(a,d){var e,f,g,h,i,j=null,k=0;for(h=0,i=a.length;h<i;h++)g=d?d(a[h]):a[h],(e=c[(f=b.getNumberType(g)).name])>k&&(k=e,j=f);return j},b.isTypedArray=function(a){return"u">typeof ArrayBuffer&&ArrayBuffer.isView(a)},b.concat=function(){var a,b,c,d=0;for(a=0,c=arguments.length;a<c;a++)d+=arguments[a].length;var e=new arguments[0].constructor(d);for(a=0,b=0;a<c;a++)e.set(arguments[a],b),b+=arguments[a].length;return e},b.indices=function(a){for(var c=new(b.getPointerArray(a))(a),d=0;d<a;d++)c[d]=d;return c}},28116:(a,b,c)=>{var d=c(16451),e=c(37714),f=c(38334).Fd,g=Symbol.for("nodejs.util.inspect.custom"),h={getEdgeWeight:"weight",keepDendrogram:!1,resolution:1};function i(a,b){var c,g=(b=e(b,h)).resolution,i=f(b.getEdgeWeight).fromEntry,j=(a.size-a.selfLoopCount)*2,k=d.getPointerArray(j),l=d.getPointerArray(a.order+1),m=b.getEdgeWeight?Float64Array:d.getPointerArray(2*a.size);this.C=a.order,this.M=0,this.E=j,this.U=0,this.resolution=g,this.level=0,this.graph=a,this.nodes=Array(a.order),this.keepDendrogram=b.keepDendrogram,this.neighborhood=new l(j),this.weights=new m(j),this.loops=new m(a.order),this.starts=new k(a.order+1),this.belongings=new l(a.order),this.dendrogram=[],this.mapping=null,this.counts=new l(a.order),this.unused=new l(a.order),this.totalWeights=new m(a.order);var n={},o=0,p=0,q=this;a.forEachNode(function(b){q.nodes[o]=b,n[b]=o,p+=a.undirectedDegreeWithoutSelfLoops(b),q.starts[o]=p,q.belongings[o]=o,q.counts[o]=1,o++}),a.forEachEdge(function(a,b,d,e,f,g,h){if(c=i(a,b,d,e,f,g,h),d=n[d],e=n[e],q.M+=c,d===e)q.totalWeights[d]+=2*c,q.loops[d]=2*c;else{q.totalWeights[d]+=c,q.totalWeights[e]+=c;var j=--q.starts[d],k=--q.starts[e];q.neighborhood[j]=e,q.neighborhood[k]=d,q.weights[j]=c,q.weights[k]=c}}),this.starts[o]=this.E,this.keepDendrogram?this.dendrogram.push(this.belongings.slice()):this.mapping=this.belongings.slice()}function j(a,b){var c,g=(b=e(b,h)).resolution,i=f(b.getEdgeWeight).fromEntry,j=(a.size-a.selfLoopCount)*2,k=d.getPointerArray(j),l=d.getPointerArray(a.order+1),m=b.getEdgeWeight?Float64Array:d.getPointerArray(2*a.size);this.C=a.order,this.M=0,this.E=j,this.U=0,this.resolution=g,this.level=0,this.graph=a,this.nodes=Array(a.order),this.keepDendrogram=b.keepDendrogram,this.neighborhood=new l(j),this.weights=new m(j),this.loops=new m(a.order),this.starts=new k(a.order+1),this.offsets=new k(a.order),this.belongings=new l(a.order),this.dendrogram=[],this.counts=new l(a.order),this.unused=new l(a.order),this.totalInWeights=new m(a.order),this.totalOutWeights=new m(a.order);var n={},o=0,p=0,q=this;a.forEachNode(function(b){q.nodes[o]=b,n[b]=o,p+=a.outDegreeWithoutSelfLoops(b),q.starts[o]=p,p+=a.inDegreeWithoutSelfLoops(b),q.offsets[o]=p,q.belongings[o]=o,q.counts[o]=1,o++}),a.forEachEdge(function(a,b,d,e,f,g,h){if(c=i(a,b,d,e,f,g,h),d=n[d],e=n[e],q.M+=c,d===e)q.loops[d]+=c,q.totalInWeights[d]+=c,q.totalOutWeights[d]+=c;else{q.totalOutWeights[d]+=c,q.totalInWeights[e]+=c;var j=--q.starts[d],k=--q.offsets[e];q.neighborhood[j]=e,q.neighborhood[k]=d,q.weights[j]=c,q.weights[k]=c}}),this.starts[o]=this.E,this.keepDendrogram?this.dendrogram.push(this.belongings.slice()):this.mapping=this.belongings.slice()}i.prototype.isolate=function(a,b){var c=this.belongings[a];if(1===this.counts[c])return c;var d=this.unused[--this.U],e=this.loops[a];return this.totalWeights[c]-=b+e,this.totalWeights[d]+=b+e,this.belongings[a]=d,this.counts[c]--,this.counts[d]++,d},i.prototype.move=function(a,b,c){var d=this.belongings[a],e=this.loops[a];this.totalWeights[d]-=b+e,this.totalWeights[c]+=b+e,this.belongings[a]=c;var f=1==this.counts[d]--;this.counts[c]++,f&&(this.unused[this.U++]=d)},i.prototype.computeNodeDegree=function(a){var b,c,d=0;for(b=this.starts[a],c=this.starts[a+1];b<c;b++)d+=this.weights[b];return d},i.prototype.expensiveIsolate=function(a){var b=this.computeNodeDegree(a);return this.isolate(a,b)},i.prototype.expensiveMove=function(a,b){var c=this.computeNodeDegree(a);this.move(a,c,b)},i.prototype.zoomOut=function(){var a,b,c,e,f,g,h,i,j,k,l,m=Array(this.C-this.U),n={},o=this.nodes.length,p=0,q=0;for(a=0,c=this.C;a<c;a++)!((g=this.belongings[a])in n)&&(n[g]=p,m[p]={adj:{},totalWeights:this.totalWeights[g],internalWeights:0},p++),this.belongings[a]=n[g];if(this.keepDendrogram){for(a=0,k=this.dendrogram[this.level],l=new(d.getPointerArray(p))(o);a<o;a++)l[a]=this.belongings[k[a]];this.dendrogram.push(l)}else for(a=0;a<o;a++)this.mapping[a]=this.belongings[this.mapping[a]];for(a=0,c=this.C;a<c;a++)for(j=(i=m[g=this.belongings[a]]).adj,i.internalWeights+=this.loops[a],b=this.starts[a],e=this.starts[a+1];b<e;b++){if(f=this.neighborhood[b],g===(h=this.belongings[f])){i.internalWeights+=this.weights[b];continue}h in j||(j[h]=0),j[h]+=this.weights[b]}for(g=0,this.C=p,f=0;g<p;g++)for(h in j=(i=m[g]).adj,g*=1,this.totalWeights[g]=i.totalWeights,this.loops[g]=i.internalWeights,this.counts[g]=1,this.starts[g]=f,this.belongings[g]=g,j)this.neighborhood[f]=+h,this.weights[f]=j[h],q++,f++;return this.starts[p]=q,this.E=q,this.U=0,this.level++,n},i.prototype.modularity=function(){var a,b,c,d,e=0,f=2*this.M,g=new Float64Array(this.C);for(b=0;b<this.C;b++)for(a=this.belongings[b],g[a]+=this.loops[b],c=this.starts[b],d=this.starts[b+1];c<d;c++)a===this.belongings[this.neighborhood[c]]&&(g[a]+=this.weights[c]);for(b=0;b<this.C;b++)e+=g[b]/f-Math.pow(this.totalWeights[b]/f,2)*this.resolution;return e},i.prototype.delta=function(a,b,c,d){var e=this.M;return c/e-this.totalWeights[d]*(b+=this.loops[a])*this.resolution/(2*e*e)},i.prototype.deltaWithOwnCommunity=function(a,b,c,d){var e=this.M;return c/e-(this.totalWeights[d]-(b+=this.loops[a]))*b*this.resolution/(2*e*e)},i.prototype.fastDelta=function(a,b,c,d){var e=this.M,f=this.totalWeights[d];return c-(b+=this.loops[a])*f*this.resolution/(2*e)},i.prototype.fastDeltaWithOwnCommunity=function(a,b,c,d){var e=this.M,f=this.totalWeights[d];return c-(b+=this.loops[a])*(f-b)*this.resolution/(2*e)},i.prototype.bounds=function(a){return[this.starts[a],this.starts[a+1]]},i.prototype.project=function(){var a=this,b={};return a.nodes.slice(0,this.C).forEach(function(c,d){b[c]=Array.from(a.neighborhood.slice(a.starts[d],a.starts[d+1])).map(function(b){return a.nodes[b]})}),b},i.prototype.collect=function(a){arguments.length<1&&(a=this.level);var b,c,d={},e=this.keepDendrogram?this.dendrogram[a]:this.mapping;for(b=0,c=e.length;b<c;b++)d[this.nodes[b]]=e[b];return d},i.prototype.assign=function(a,b){arguments.length<2&&(b=this.level);var c,d,e=this.keepDendrogram?this.dendrogram[b]:this.mapping;for(c=0,d=e.length;c<d;c++)this.graph.setNodeAttribute(this.nodes[c],a,e[c])},i.prototype[g]=function(){var a={};Object.defineProperty(a,"constructor",{value:i,enumerable:!1}),a.C=this.C,a.M=this.M,a.E=this.E,a.U=this.U,a.resolution=this.resolution,a.level=this.level,a.nodes=this.nodes,a.starts=this.starts.slice(0,a.C+1);var b=this;return["neighborhood","weights"].forEach(function(c){a[c]=b[c].slice(0,a.E)}),["counts","loops","belongings","totalWeights"].forEach(function(c){a[c]=b[c].slice(0,a.C)}),a.unused=this.unused.slice(0,this.U),this.keepDendrogram?a.dendrogram=this.dendrogram:a.mapping=this.mapping,a},j.prototype.bounds=i.prototype.bounds,j.prototype.inBounds=function(a){return[this.offsets[a],this.starts[a+1]]},j.prototype.outBounds=function(a){return[this.starts[a],this.offsets[a]]},j.prototype.project=i.prototype.project,j.prototype.projectIn=function(){var a=this,b={};return a.nodes.slice(0,this.C).forEach(function(c,d){b[c]=Array.from(a.neighborhood.slice(a.offsets[d],a.starts[d+1])).map(function(b){return a.nodes[b]})}),b},j.prototype.projectOut=function(){var a=this,b={};return a.nodes.slice(0,this.C).forEach(function(c,d){b[c]=Array.from(a.neighborhood.slice(a.starts[d],a.offsets[d])).map(function(b){return a.nodes[b]})}),b},j.prototype.isolate=function(a,b,c){var d=this.belongings[a];if(1===this.counts[d])return d;var e=this.unused[--this.U],f=this.loops[a];return this.totalInWeights[d]-=b+f,this.totalInWeights[e]+=b+f,this.totalOutWeights[d]-=c+f,this.totalOutWeights[e]+=c+f,this.belongings[a]=e,this.counts[d]--,this.counts[e]++,e},j.prototype.move=function(a,b,c,d){var e=this.belongings[a],f=this.loops[a];this.totalInWeights[e]-=b+f,this.totalInWeights[d]+=b+f,this.totalOutWeights[e]-=c+f,this.totalOutWeights[d]+=c+f,this.belongings[a]=d;var g=1==this.counts[e]--;this.counts[d]++,g&&(this.unused[this.U++]=e)},j.prototype.computeNodeInDegree=function(a){var b,c,d=0;for(b=this.offsets[a],c=this.starts[a+1];b<c;b++)d+=this.weights[b];return d},j.prototype.computeNodeOutDegree=function(a){var b,c,d=0;for(b=this.starts[a],c=this.offsets[a];b<c;b++)d+=this.weights[b];return d},j.prototype.expensiveMove=function(a,b){var c=this.computeNodeInDegree(a),d=this.computeNodeOutDegree(a);this.move(a,c,d,b)},j.prototype.zoomOut=function(){var a,b,c,e,f,g,h,i,j,k,l,m,n,o,p,q=Array(this.C-this.U),r={},s=this.nodes.length,t=0,u=0;for(a=0,c=this.C;a<c;a++)!((g=this.belongings[a])in r)&&(r[g]=t,q[t]={inAdj:{},outAdj:{},totalInWeights:this.totalInWeights[g],totalOutWeights:this.totalOutWeights[g],internalWeights:0},t++),this.belongings[a]=r[g];if(this.keepDendrogram){for(a=0,o=this.dendrogram[this.level],p=new(d.getPointerArray(t))(s);a<s;a++)p[a]=this.belongings[o[a]];this.dendrogram.push(p)}else for(a=0;a<s;a++)this.mapping[a]=this.belongings[this.mapping[a]];for(a=0,c=this.C;a<c;a++)for(g=this.belongings[a],j=this.offsets[a],m=(i=q[g]).inAdj,n=i.outAdj,i.internalWeights+=this.loops[a],b=this.starts[a],e=this.starts[a+1];b<e;b++){if(f=this.neighborhood[b],h=this.belongings[f],l=(k=b<j)?n:m,g===h){k&&(i.internalWeights+=this.weights[b]);continue}h in l||(l[h]=0),l[h]+=this.weights[b]}for(g=0,this.C=t,f=0;g<t;g++){for(h in m=(i=q[g]).inAdj,n=i.outAdj,g*=1,this.totalInWeights[g]=i.totalInWeights,this.totalOutWeights[g]=i.totalOutWeights,this.loops[g]=i.internalWeights,this.counts[g]=1,this.starts[g]=f,this.belongings[g]=g,n)this.neighborhood[f]=+h,this.weights[f]=n[h],u++,f++;for(h in this.offsets[g]=f,m)this.neighborhood[f]=+h,this.weights[f]=m[h],u++,f++}return this.starts[t]=u,this.E=u,this.U=0,this.level++,r},j.prototype.modularity=function(){var a,b,c,d,e=0,f=this.M,g=new Float64Array(this.C);for(b=0;b<this.C;b++)for(a=this.belongings[b],g[a]+=this.loops[b],c=this.starts[b],d=this.offsets[b];c<d;c++)a===this.belongings[this.neighborhood[c]]&&(g[a]+=this.weights[c]);for(b=0;b<this.C;b++)e+=g[b]/f-this.totalInWeights[b]*this.totalOutWeights[b]/Math.pow(f,2)*this.resolution;return e},j.prototype.delta=function(a,b,c,d,e){var f=this.M,g=this.totalInWeights[e],h=this.totalOutWeights[e],i=this.loops[a];return b+=i,d/f-((c+=i)*g+b*h)*this.resolution/(f*f)},j.prototype.deltaWithOwnCommunity=function(a,b,c,d,e){var f=this.M,g=this.totalInWeights[e],h=this.totalOutWeights[e],i=this.loops[a];return b+=i,d/f-((c+=i)*(g-b)+b*(h-c))*this.resolution/(f*f)},j.prototype.collect=i.prototype.collect,j.prototype.assign=i.prototype.assign,j.prototype[g]=function(){var a={};Object.defineProperty(a,"constructor",{value:j,enumerable:!1}),a.C=this.C,a.M=this.M,a.E=this.E,a.U=this.U,a.resolution=this.resolution,a.level=this.level,a.nodes=this.nodes,a.starts=this.starts.slice(0,a.C+1);var b=this;return["neighborhood","weights"].forEach(function(c){a[c]=b[c].slice(0,a.E)}),["counts","offsets","loops","belongings","totalInWeights","totalOutWeights"].forEach(function(c){a[c]=b[c].slice(0,a.C)}),a.unused=this.unused.slice(0,this.U),this.keepDendrogram?a.dendrogram=this.dendrogram:a.mapping=this.mapping,a},b.UndirectedLouvainIndex=i,b.DirectedLouvainIndex=j},36889:a=>{a.exports=function(a){return null!==a&&"object"==typeof a&&"function"==typeof a.addUndirectedEdgeWithKey&&"function"==typeof a.dropNode&&"boolean"==typeof a.multi}},37714:a=>{a.exports=function a(b,c){b=b||{};var d={};for(var e in c){var f=b[e],g=c[e];if(!(!g||"object"!=typeof g||"function"==typeof g||Array.isArray(g)||g instanceof Set||g instanceof Map||g instanceof RegExp||g instanceof Date)){d[e]=a(f,g);continue}void 0===f?d[e]=g:d[e]=f}return d}},38334:(a,b)=>{function c(a){return"number"!=typeof a||isNaN(a)?1:a}b.Fd=function(a){var b,d,e,f,g,h;return b=a,d=c,e={},f=function(a){return void 0===a?d:a},"function"==typeof d&&(f=d),g=function(a){return f(a[b])},h=function(){return f(void 0)},"string"==typeof b?(e.fromAttributes=g,e.fromGraph=function(a,b){return g(a.getEdgeAttributes(b))},e.fromEntry=function(a,b){return g(b)},e.fromPartialEntry=e.fromEntry,e.fromMinimalEntry=e.fromEntry):"function"==typeof b?(e.fromAttributes=function(){throw Error("graphology-utils/getters/createEdgeValueGetter: irrelevant usage.")},e.fromGraph=function(a,c){var d=a.extremities(c);return f(b(c,a.getEdgeAttributes(c),d[0],d[1],a.getNodeAttributes(d[0]),a.getNodeAttributes(d[1]),a.isUndirected(c)))},e.fromEntry=function(a,c,d,e,g,h,i){return f(b(a,c,d,e,g,h,i))},e.fromPartialEntry=function(a,c,d,e){return f(b(a,c,d,e))},e.fromMinimalEntry=function(a,c){return f(b(a,c))}):(e.fromAttributes=h,e.fromGraph=h,e.fromEntry=h,e.fromMinimalEntry=h),e}},50699:(a,b,c)=>{var d=c(87961),e=c(16451).getPointerArray;function f(a){var b=e(a);this.start=0,this.size=0,this.capacity=a,this.dense=new b(a),this.sparse=new b(a)}f.prototype.clear=function(){this.start=0,this.size=0},f.prototype.has=function(a){if(0===this.size)return!1;var b=this.sparse[a];return(b<this.capacity&&b>=this.start&&b<this.start+this.size||b<(this.start+this.size)%this.capacity)&&this.dense[b]===a},f.prototype.enqueue=function(a){var b=this.sparse[a];return 0!==this.size&&(b<this.capacity&&b>=this.start&&b<this.start+this.size||b<(this.start+this.size)%this.capacity)&&this.dense[b]===a?this:(b=(this.start+this.size)%this.capacity,this.dense[b]=a,this.sparse[a]=b,this.size++,this)},f.prototype.dequeue=function(){if(0!==this.size){var a=this.start;this.size--,this.start++,this.start===this.capacity&&(this.start=0);var b=this.dense[a];return this.sparse[b]=this.capacity,b}},f.prototype.forEach=function(a,b){b=arguments.length>1?b:this;for(var c=this.capacity,d=this.size,e=this.start,f=0;f<d;)a.call(b,this.dense[e],f,this),e++,f++,e===c&&(e=0)},f.prototype.values=function(){var a=this.dense,b=this.capacity,c=this.size,e=this.start,f=0;return new d(function(){if(f>=c)return{done:!0};var d=a[e];return e++,f++,e===b&&(e=0),{value:d,done:!1}})},"u">typeof Symbol&&(f.prototype[Symbol.iterator]=f.prototype.values),f.prototype.inspect=function(){var a=[];return this.forEach(function(b){a.push(b)}),Object.defineProperty(a,"constructor",{value:f,enumerable:!1}),a.capacity=this.capacity,a},"u">typeof Symbol&&(f.prototype[Symbol.for("nodejs.util.inspect.custom")]=f.prototype.inspect),a.exports=f},65497:(a,b,c)=>{var d=c(37714),e=c(36889),f=c(71363),g=c(16373),h=c(50699),i=c(84575).createRandomIndex,j=c(28116),k=j.UndirectedLouvainIndex,l=j.DirectedLouvainIndex,m={nodeCommunityAttribute:"community",getEdgeWeight:"weight",fastLocalMoves:!0,randomWalk:!0,resolution:1,rng:Math.random};function n(a,b,c){var d=a.get(b);void 0===d&&(d=0),d+=c,a.set(b,d)}function o(a,b,c,d,e){if(1e-10>Math.abs(d-e)){if(a!==b)return c>a}else if(d>e)return!0;return!1}function p(a,b,c,j){if(!e(c))throw Error("graphology-communities-louvain: the given graph is not a valid graphology instance.");var p=f(c);if("mixed"===p)throw Error("graphology-communities-louvain: cannot run the algorithm on a true mixed graph.");j=d(j,m);var q=0;if(0===c.size){if(a)return void c.forEachNode(function(a){c.setNodeAttribute(a,j.nodeCommunityAttribute,q++)});var r={};return(c.forEachNode(function(a){r[a]=q++}),b)?{communities:r,count:c.order,deltaComputations:0,dendrogram:null,level:0,modularity:NaN,moves:null,nodesVisited:0,resolution:j.resolution}:r}var s=("undirected"===p?function(a,b,c){var d,e,f,j,l,m,p,q,r,s,t,u,v,w,x,y,z,A,B,C=new k(b,{getEdgeWeight:c.getEdgeWeight,keepDendrogram:a,resolution:c.resolution}),D=i(c.rng),E=!0,F=!0,G=new g(Float64Array,C.C),H=0,I=0,J=[];for(c.fastLocalMoves&&(f=new h(C.C));E;){if(u=C.C,E=!1,F=!0,c.fastLocalMoves){for(r=0,B=0,q=c.randomWalk?D(u):0;r<u;r++,q++)s=q%u,f.enqueue(s);for(;0!==f.size;){for(s=f.dequeue(),I++,v=0,G.clear(),d=C.belongings[s],j=C.starts[s],l=C.starts[s+1];j<l;j++)t=C.neighborhood[j],m=C.weights[j],e=C.belongings[t],v+=m,n(G,e,m);for(p=0,y=C.fastDeltaWithOwnCommunity(s,v,G.get(d)||0,d),x=d;p<G.size;p++)(e=G.dense[p])!==d&&(w=G.vals[p],H++,z=C.fastDelta(s,v,w,e),o(x,d,e,z,y)&&(y=z,x=e));if(y<0){if((x=C.isolate(s,v))===d)continue}else{if(x===d)continue;C.move(s,v,x)}for(E=!0,B++,j=C.starts[s],l=C.starts[s+1];j<l;j++)t=C.neighborhood[j],(e=C.belongings[t])!==x&&f.enqueue(t)}J.push(B)}else for(A=[],J.push(A);F;){for(r=0,F=!1,B=0,q=c.randomWalk?D(u):0;r<u;r++,q++){for(s=q%u,I++,v=0,G.clear(),d=C.belongings[s],j=C.starts[s],l=C.starts[s+1];j<l;j++)t=C.neighborhood[j],m=C.weights[j],e=C.belongings[t],v+=m,n(G,e,m);for(p=0,y=C.fastDeltaWithOwnCommunity(s,v,G.get(d)||0,d),x=d;p<G.size;p++)(e=G.dense[p])!==d&&(w=G.vals[p],H++,z=C.fastDelta(s,v,w,e),o(x,d,e,z,y)&&(y=z,x=e));if(y<0){if((x=C.isolate(s,v))===d)continue}else{if(x===d)continue;C.move(s,v,x)}F=!0,B++}A.push(B),E=F||E}E&&C.zoomOut()}return{index:C,deltaComputations:H,nodesVisited:I,moves:J}}:function(a,b,c){var d,e,f,j,k,m,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F=new l(b,{getEdgeWeight:c.getEdgeWeight,keepDendrogram:a,resolution:c.resolution}),G=i(c.rng),H=!0,I=!0,J=new g(Float64Array,F.C),K=0,L=0,M=[];for(c.fastLocalMoves&&(f=new h(F.C));H;){if(w=F.C,H=!1,I=!0,c.fastLocalMoves){for(t=0,E=0,s=c.randomWalk?G(w):0;t<w;t++,s++)u=s%w,f.enqueue(u);for(;0!==f.size;){for(u=f.dequeue(),L++,x=0,y=0,J.clear(),d=F.belongings[u],j=F.starts[u],k=F.starts[u+1],m=F.offsets[u];j<k;j++)p=j<m,v=F.neighborhood[j],q=F.weights[j],e=F.belongings[v],p?y+=q:x+=q,n(J,e,q);for(r=0,B=F.deltaWithOwnCommunity(u,x,y,J.get(d)||0,d),A=d;r<J.size;r++)(e=J.dense[r])!==d&&(z=J.vals[r],K++,C=F.delta(u,x,y,z,e),o(A,d,e,C,B)&&(B=C,A=e));if(B<0){if((A=F.isolate(u,x,y))===d)continue}else{if(A===d)continue;F.move(u,x,y,A)}for(H=!0,E++,j=F.starts[u],k=F.starts[u+1];j<k;j++)v=F.neighborhood[j],(e=F.belongings[v])!==A&&f.enqueue(v)}M.push(E)}else for(D=[],M.push(D);I;){for(t=0,I=!1,E=0,s=c.randomWalk?G(w):0;t<w;t++,s++){for(u=s%w,L++,x=0,y=0,J.clear(),d=F.belongings[u],j=F.starts[u],k=F.starts[u+1],m=F.offsets[u];j<k;j++)p=j<m,v=F.neighborhood[j],q=F.weights[j],e=F.belongings[v],p?y+=q:x+=q,n(J,e,q);for(r=0,B=F.deltaWithOwnCommunity(u,x,y,J.get(d)||0,d),A=d;r<J.size;r++)(e=J.dense[r])!==d&&(z=J.vals[r],K++,C=F.delta(u,x,y,z,e),o(A,d,e,C,B)&&(B=C,A=e));if(B<0){if((A=F.isolate(u,x,y))===d)continue}else{if(A===d)continue;F.move(u,x,y,A)}I=!0,E++}D.push(E),H=I||H}H&&F.zoomOut()}return{index:F,deltaComputations:K,nodesVisited:L,moves:M}})(b,c,j),t=s.index;if(!b)return a?void t.assign(j.nodeCommunityAttribute):t.collect();var u={count:t.C,deltaComputations:s.deltaComputations,dendrogram:t.dendrogram,level:t.level,modularity:t.modularity(),moves:s.moves,nodesVisited:s.nodesVisited,resolution:j.resolution};return a?t.assign(j.nodeCommunityAttribute):u.communities=t.collect(),u}var q=p.bind(null,!1,!1);q.assign=p.bind(null,!0,!1),q.detailed=p.bind(null,!1,!0),q.defaults=m,a.exports=q},65856:(a,b,c)=>{"use strict";let d;c.d(b,{Ay:()=>V});var e=c(94735);let f=function(){let a=arguments[0];for(let b=1,c=arguments.length;b<c;b++)if(arguments[b])for(let c in arguments[b])a[c]=arguments[b][c];return a};function g(a,b,c,d){let e=a._nodes.get(b),f=null;return e?f="mixed"===d?e.out&&e.out[c]||e.undirected&&e.undirected[c]:"directed"===d?e.out&&e.out[c]:e.undirected&&e.undirected[c]:f}function h(a){return"object"==typeof a&&null!==a}function i(a){let b;for(b in a)return!1;return!0}function j(a,b,c){Object.defineProperty(a,b,{enumerable:!1,configurable:!1,writable:!0,value:c})}function k(a,b,c){let d={enumerable:!0,configurable:!0};"function"==typeof c?d.get=c:(d.value=c,d.writable=!1),Object.defineProperty(a,b,d)}function l(a){return!!h(a)&&(!a.attributes||!!Array.isArray(a.attributes))}function m(){let a=arguments,b=null,c=-1;return{[Symbol.iterator](){return this},next(){let d=null;for(;;){if(null===b){if(++c>=a.length)return{done:!0};b=a[c][Symbol.iterator]()}if((d=b.next()).done){b=null;continue}break}return d}}}function n(){return{[Symbol.iterator](){return this},next:()=>({done:!0})}}"function"==typeof Object.assign&&(f=Object.assign);class o extends Error{constructor(a){super(),this.name="GraphError",this.message=a}}class p extends o{constructor(a){super(a),this.name="InvalidArgumentsGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,p.prototype.constructor)}}class q extends o{constructor(a){super(a),this.name="NotFoundGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,q.prototype.constructor)}}class r extends o{constructor(a){super(a),this.name="UsageGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,r.prototype.constructor)}}function s(a,b){this.key=a,this.attributes=b,this.clear()}function t(a,b){this.key=a,this.attributes=b,this.clear()}function u(a,b){this.key=a,this.attributes=b,this.clear()}function v(a,b,c,d,e){this.key=b,this.attributes=e,this.undirected=a,this.source=c,this.target=d}function w(a,b,c,d,e,f,g){let h,i,j,k;if(d=""+d,0===c){if(!(h=a._nodes.get(d)))throw new q(`Graph.${b}: could not find the "${d}" node in the graph.`);j=e,k=f}else if(3===c){if(e=""+e,!(i=a._edges.get(e)))throw new q(`Graph.${b}: could not find the "${e}" edge in the graph.`);let c=i.source.key,l=i.target.key;if(d===c)h=i.target;else if(d===l)h=i.source;else throw new q(`Graph.${b}: the "${d}" node is not attached to the "${e}" edge (${c}, ${l}).`);j=f,k=g}else{if(!(i=a._edges.get(d)))throw new q(`Graph.${b}: could not find the "${d}" edge in the graph.`);h=1===c?i.source:i.target,j=e,k=f}return[h,j,k]}s.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}},t.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}},u.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}},v.prototype.attach=function(){let a="out",b="in";this.undirected&&(a=b="undirected");let c=this.source.key,d=this.target.key;this.source[a][d]=this,this.undirected&&c===d||(this.target[b][c]=this)},v.prototype.attachMulti=function(){let a="out",b="in",c=this.source.key,d=this.target.key;this.undirected&&(a=b="undirected");let e=this.source[a],f=e[d];if(void 0===f){e[d]=this,this.undirected&&c===d||(this.target[b][c]=this);return}f.previous=this,this.next=f,e[d]=this,this.target[b][c]=this},v.prototype.detach=function(){let a=this.source.key,b=this.target.key,c="out",d="in";this.undirected&&(c=d="undirected"),delete this.source[c][b],delete this.target[d][a]},v.prototype.detachMulti=function(){let a=this.source.key,b=this.target.key,c="out",d="in";this.undirected&&(c=d="undirected"),void 0===this.previous?void 0===this.next?(delete this.source[c][b],delete this.target[d][a]):(this.next.previous=void 0,this.source[c][b]=this.next,this.target[d][a]=this.next):(this.previous.next=this.next,void 0!==this.next&&(this.next.previous=this.previous))};let x=[{name:a=>`get${a}Attribute`,attacher:function(a,b,c){a.prototype[b]=function(a,d,e){let[f,g]=w(this,b,c,a,d,e);return f.attributes[g]}}},{name:a=>`get${a}Attributes`,attacher:function(a,b,c){a.prototype[b]=function(a,d){let[e]=w(this,b,c,a,d);return e.attributes}}},{name:a=>`has${a}Attribute`,attacher:function(a,b,c){a.prototype[b]=function(a,d,e){let[f,g]=w(this,b,c,a,d,e);return f.attributes.hasOwnProperty(g)}}},{name:a=>`set${a}Attribute`,attacher:function(a,b,c){a.prototype[b]=function(a,d,e,f){let[g,h,i]=w(this,b,c,a,d,e,f);return g.attributes[h]=i,this.emit("nodeAttributesUpdated",{key:g.key,type:"set",attributes:g.attributes,name:h}),this}}},{name:a=>`update${a}Attribute`,attacher:function(a,b,c){a.prototype[b]=function(a,d,e,f){let[g,h,i]=w(this,b,c,a,d,e,f);if("function"!=typeof i)throw new p(`Graph.${b}: updater should be a function.`);let j=g.attributes,k=i(j[h]);return j[h]=k,this.emit("nodeAttributesUpdated",{key:g.key,type:"set",attributes:g.attributes,name:h}),this}}},{name:a=>`remove${a}Attribute`,attacher:function(a,b,c){a.prototype[b]=function(a,d,e){let[f,g]=w(this,b,c,a,d,e);return delete f.attributes[g],this.emit("nodeAttributesUpdated",{key:f.key,type:"remove",attributes:f.attributes,name:g}),this}}},{name:a=>`replace${a}Attributes`,attacher:function(a,b,c){a.prototype[b]=function(a,d,e){let[f,g]=w(this,b,c,a,d,e);if(!h(g))throw new p(`Graph.${b}: provided attributes are not a plain object.`);return f.attributes=g,this.emit("nodeAttributesUpdated",{key:f.key,type:"replace",attributes:f.attributes}),this}}},{name:a=>`merge${a}Attributes`,attacher:function(a,b,c){a.prototype[b]=function(a,d,e){let[g,i]=w(this,b,c,a,d,e);if(!h(i))throw new p(`Graph.${b}: provided attributes are not a plain object.`);return f(g.attributes,i),this.emit("nodeAttributesUpdated",{key:g.key,type:"merge",attributes:g.attributes,data:i}),this}}},{name:a=>`update${a}Attributes`,attacher:function(a,b,c){a.prototype[b]=function(a,d,e){let[f,g]=w(this,b,c,a,d,e);if("function"!=typeof g)throw new p(`Graph.${b}: provided updater is not a function.`);return f.attributes=g(f.attributes),this.emit("nodeAttributesUpdated",{key:f.key,type:"update",attributes:f.attributes}),this}}}],y=[{name:a=>`get${a}Attribute`,attacher:function(a,b,c){a.prototype[b]=function(a,d){let e;if("mixed"!==this.type&&"mixed"!==c&&c!==this.type)throw new r(`Graph.${b}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new r(`Graph.${b}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let f=""+a,h=""+d;if(d=arguments[2],!(e=g(this,f,h,c)))throw new q(`Graph.${b}: could not find an edge for the given path ("${f}" - "${h}").`)}else{if("mixed"!==c)throw new r(`Graph.${b}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(a=""+a,!(e=this._edges.get(a)))throw new q(`Graph.${b}: could not find the "${a}" edge in the graph.`)}return e.attributes[d]}}},{name:a=>`get${a}Attributes`,attacher:function(a,b,c){a.prototype[b]=function(a){let d;if("mixed"!==this.type&&"mixed"!==c&&c!==this.type)throw new r(`Graph.${b}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>1){if(this.multi)throw new r(`Graph.${b}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let e=""+a,f=""+arguments[1];if(!(d=g(this,e,f,c)))throw new q(`Graph.${b}: could not find an edge for the given path ("${e}" - "${f}").`)}else{if("mixed"!==c)throw new r(`Graph.${b}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(a=""+a,!(d=this._edges.get(a)))throw new q(`Graph.${b}: could not find the "${a}" edge in the graph.`)}return d.attributes}}},{name:a=>`has${a}Attribute`,attacher:function(a,b,c){a.prototype[b]=function(a,d){let e;if("mixed"!==this.type&&"mixed"!==c&&c!==this.type)throw new r(`Graph.${b}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new r(`Graph.${b}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let f=""+a,h=""+d;if(d=arguments[2],!(e=g(this,f,h,c)))throw new q(`Graph.${b}: could not find an edge for the given path ("${f}" - "${h}").`)}else{if("mixed"!==c)throw new r(`Graph.${b}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(a=""+a,!(e=this._edges.get(a)))throw new q(`Graph.${b}: could not find the "${a}" edge in the graph.`)}return e.attributes.hasOwnProperty(d)}}},{name:a=>`set${a}Attribute`,attacher:function(a,b,c){a.prototype[b]=function(a,d,e){let f;if("mixed"!==this.type&&"mixed"!==c&&c!==this.type)throw new r(`Graph.${b}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new r(`Graph.${b}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let h=""+a,i=""+d;if(d=arguments[2],e=arguments[3],!(f=g(this,h,i,c)))throw new q(`Graph.${b}: could not find an edge for the given path ("${h}" - "${i}").`)}else{if("mixed"!==c)throw new r(`Graph.${b}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(a=""+a,!(f=this._edges.get(a)))throw new q(`Graph.${b}: could not find the "${a}" edge in the graph.`)}return f.attributes[d]=e,this.emit("edgeAttributesUpdated",{key:f.key,type:"set",attributes:f.attributes,name:d}),this}}},{name:a=>`update${a}Attribute`,attacher:function(a,b,c){a.prototype[b]=function(a,d,e){let f;if("mixed"!==this.type&&"mixed"!==c&&c!==this.type)throw new r(`Graph.${b}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new r(`Graph.${b}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let h=""+a,i=""+d;if(d=arguments[2],e=arguments[3],!(f=g(this,h,i,c)))throw new q(`Graph.${b}: could not find an edge for the given path ("${h}" - "${i}").`)}else{if("mixed"!==c)throw new r(`Graph.${b}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(a=""+a,!(f=this._edges.get(a)))throw new q(`Graph.${b}: could not find the "${a}" edge in the graph.`)}if("function"!=typeof e)throw new p(`Graph.${b}: updater should be a function.`);return f.attributes[d]=e(f.attributes[d]),this.emit("edgeAttributesUpdated",{key:f.key,type:"set",attributes:f.attributes,name:d}),this}}},{name:a=>`remove${a}Attribute`,attacher:function(a,b,c){a.prototype[b]=function(a,d){let e;if("mixed"!==this.type&&"mixed"!==c&&c!==this.type)throw new r(`Graph.${b}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new r(`Graph.${b}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let f=""+a,h=""+d;if(d=arguments[2],!(e=g(this,f,h,c)))throw new q(`Graph.${b}: could not find an edge for the given path ("${f}" - "${h}").`)}else{if("mixed"!==c)throw new r(`Graph.${b}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(a=""+a,!(e=this._edges.get(a)))throw new q(`Graph.${b}: could not find the "${a}" edge in the graph.`)}return delete e.attributes[d],this.emit("edgeAttributesUpdated",{key:e.key,type:"remove",attributes:e.attributes,name:d}),this}}},{name:a=>`replace${a}Attributes`,attacher:function(a,b,c){a.prototype[b]=function(a,d){let e;if("mixed"!==this.type&&"mixed"!==c&&c!==this.type)throw new r(`Graph.${b}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new r(`Graph.${b}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let f=""+a,h=""+d;if(d=arguments[2],!(e=g(this,f,h,c)))throw new q(`Graph.${b}: could not find an edge for the given path ("${f}" - "${h}").`)}else{if("mixed"!==c)throw new r(`Graph.${b}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(a=""+a,!(e=this._edges.get(a)))throw new q(`Graph.${b}: could not find the "${a}" edge in the graph.`)}if(!h(d))throw new p(`Graph.${b}: provided attributes are not a plain object.`);return e.attributes=d,this.emit("edgeAttributesUpdated",{key:e.key,type:"replace",attributes:e.attributes}),this}}},{name:a=>`merge${a}Attributes`,attacher:function(a,b,c){a.prototype[b]=function(a,d){let e;if("mixed"!==this.type&&"mixed"!==c&&c!==this.type)throw new r(`Graph.${b}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new r(`Graph.${b}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let f=""+a,h=""+d;if(d=arguments[2],!(e=g(this,f,h,c)))throw new q(`Graph.${b}: could not find an edge for the given path ("${f}" - "${h}").`)}else{if("mixed"!==c)throw new r(`Graph.${b}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(a=""+a,!(e=this._edges.get(a)))throw new q(`Graph.${b}: could not find the "${a}" edge in the graph.`)}if(!h(d))throw new p(`Graph.${b}: provided attributes are not a plain object.`);return f(e.attributes,d),this.emit("edgeAttributesUpdated",{key:e.key,type:"merge",attributes:e.attributes,data:d}),this}}},{name:a=>`update${a}Attributes`,attacher:function(a,b,c){a.prototype[b]=function(a,d){let e;if("mixed"!==this.type&&"mixed"!==c&&c!==this.type)throw new r(`Graph.${b}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new r(`Graph.${b}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let f=""+a,h=""+d;if(d=arguments[2],!(e=g(this,f,h,c)))throw new q(`Graph.${b}: could not find an edge for the given path ("${f}" - "${h}").`)}else{if("mixed"!==c)throw new r(`Graph.${b}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(a=""+a,!(e=this._edges.get(a)))throw new q(`Graph.${b}: could not find the "${a}" edge in the graph.`)}if("function"!=typeof d)throw new p(`Graph.${b}: provided updater is not a function.`);return e.attributes=d(e.attributes),this.emit("edgeAttributesUpdated",{key:e.key,type:"update",attributes:e.attributes}),this}}}];function z(a,b,c,d){let e=!1;for(let f in b){if(f===d)continue;let g=b[f];if(e=c(g.key,g.attributes,g.source.key,g.target.key,g.source.attributes,g.target.attributes,g.undirected),a&&e)return g.key}}function A(a,b,c,d){let e,f,g,h=!1;for(let i in b)if(i!==d){e=b[i];do{if(f=e.source,g=e.target,h=c(e.key,e.attributes,f.key,g.key,f.attributes,g.attributes,e.undirected),a&&h)return e.key;e=e.next}while(void 0!==e)}}function B(a,b){let c,d=Object.keys(a),e=d.length,f=0;return{[Symbol.iterator](){return this},next(){do if(c)c=c.next;else{if(f>=e)return{done:!0};let g=d[f++];if(g===b){c=void 0;continue}c=a[g]}while(!c);return{done:!1,value:{edge:c.key,attributes:c.attributes,source:c.source.key,target:c.target.key,sourceAttributes:c.source.attributes,targetAttributes:c.target.attributes,undirected:c.undirected}}}}}function C(a,b,c,d){let e=b[c];if(!e)return;let f=e.source,g=e.target;if(d(e.key,e.attributes,f.key,g.key,f.attributes,g.attributes,e.undirected)&&a)return e.key}function D(a,b,c,d){let e=b[c];if(!e)return;let f=!1;do{if(f=d(e.key,e.attributes,e.source.key,e.target.key,e.source.attributes,e.target.attributes,e.undirected),a&&f)return e.key;e=e.next}while(void 0!==e)}function E(a,b){let c=a[b];if(void 0!==c.next)return{[Symbol.iterator](){return this},next(){if(!c)return{done:!0};let a={edge:c.key,attributes:c.attributes,source:c.source.key,target:c.target.key,sourceAttributes:c.source.attributes,targetAttributes:c.target.attributes,undirected:c.undirected};return c=c.next,{done:!1,value:a}}};let d=!1;return{[Symbol.iterator](){return this},next:()=>!0===d?{done:!0}:(d=!0,{done:!1,value:{edge:c.key,attributes:c.attributes,source:c.source.key,target:c.target.key,sourceAttributes:c.source.attributes,targetAttributes:c.target.attributes,undirected:c.undirected}})}}function F(a,b,c,d){let e,f;if(0===b.size)return;let g="mixed"!==c&&c!==b.type,h="undirected"===c,i=!1,j=b._edges.values();for(;!0!==(e=j.next()).done;){if(f=e.value,g&&f.undirected!==h)continue;let{key:b,attributes:c,source:j,target:k}=f;if(i=d(b,c,j.key,k.key,j.attributes,k.attributes,f.undirected),a&&i)return b}}function G(a,b,c,d,e,f){let g,h=b?A:z;if("undirected"!==c&&("out"!==d&&(g=h(a,e.in,f),a&&g)||"in"!==d&&(g=h(a,e.out,f,d?void 0:e.key),a&&g)))return g;if("directed"!==c&&(g=h(a,e.undirected,f),a&&g))return g}function H(a,b,c,d,e,f,g){let h,i=c?D:C;if("undirected"!==b&&(void 0!==e.in&&"out"!==d&&(h=i(a,e.in,f,g),a&&h)||void 0!==e.out&&"in"!==d&&(d||e.key!==f)&&(h=i(a,e.out,f,g),a&&h)))return h;if("directed"!==b&&void 0!==e.undirected&&(h=i(a,e.undirected,f,g),a&&h))return h}function I(){this.A=null,this.B=null}function J(a,b,c,d,e){for(let f in d){let g=d[f],h=g.source,i=g.target,j=h===c?i:h;if(b&&b.has(j.key))continue;let k=e(j.key,j.attributes);if(a&&k)return j.key}}function K(a,b,c,d,e){let f;if("mixed"!==b){if("undirected"===b)return J(a,null,d,d.undirected,e);if("string"==typeof c)return J(a,null,d,d[c],e)}let g=new I;if("undirected"!==b){if("out"!==c){if(f=J(a,null,d,d.in,e),a&&f)return f;g.wrap(d.in)}if("in"!==c){if(f=J(a,g,d,d.out,e),a&&f)return f;g.wrap(d.out)}}if("directed"!==b&&(f=J(a,g,d,d.undirected,e),a&&f))return f}function L(a,b,c){let d=Object.keys(c),e=d.length,f=0;return{[Symbol.iterator](){return this},next(){let g=null;do{if(f>=e)return a&&a.wrap(c),{done:!0};let h=c[d[f++]],i=h.source,j=h.target;if(g=i===b?j:i,a&&a.has(g.key)){g=null;continue}}while(null===g);return{done:!1,value:{neighbor:g.key,attributes:g.attributes}}}}}function M(a,b,c,d,e){let f,g,h,i,j,k,l,m=d._nodes.values(),n=d.type;for(;!0!==(f=m.next()).done;){let d=!1;if(g=f.value,"undirected"!==n)for(h in i=g.out){j=i[h];do{if(k=j.target,d=!0,l=e(g.key,k.key,g.attributes,k.attributes,j.key,j.attributes,j.undirected),a&&l)return j;j=j.next}while(j)}if("directed"!==n){for(h in i=g.undirected)if(!b||!(g.key>h)){j=i[h];do{if((k=j.target).key!==h&&(k=j.source),d=!0,l=e(g.key,k.key,g.attributes,k.attributes,j.key,j.attributes,j.undirected),a&&l)return j;j=j.next}while(j)}}if(c&&!d&&(l=e(g.key,null,g.attributes,null,null,null,null),a&&l))return null}}I.prototype.wrap=function(a){null===this.A?this.A=a:null===this.B&&(this.B=a)},I.prototype.has=function(a){return null!==this.A&&a in this.A||null!==this.B&&a in this.B};let N=(d=255&Math.floor(256*Math.random()),()=>d++),O=new Set(["directed","undirected","mixed"]),P=new Set(["domain","_events","_eventsCount","_maxListeners"]),Q={allowSelfLoops:!0,multi:!1,type:"mixed"};function R(a,b,c){let d=new a.NodeDataClass(b,c);return a._nodes.set(b,d),a.emit("nodeAdded",{key:b,attributes:c}),d}function S(a,b,c,d,e,f,g,i){if(!d&&"undirected"===a.type)throw new r(`Graph.${b}: you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead.`);if(d&&"directed"===a.type)throw new r(`Graph.${b}: you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead.`);if(i&&!h(i))throw new p(`Graph.${b}: invalid attributes. Expecting an object but got "${i}"`);if(f=""+f,g=""+g,i=i||{},!a.allowSelfLoops&&f===g)throw new r(`Graph.${b}: source & target are the same ("${f}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let j=a._nodes.get(f),k=a._nodes.get(g);if(!j)throw new q(`Graph.${b}: source node "${f}" not found.`);if(!k)throw new q(`Graph.${b}: target node "${g}" not found.`);let l={key:null,undirected:d,source:f,target:g,attributes:i};if(c)e=a._edgeKeyGenerator();else if(e=""+e,a._edges.has(e))throw new r(`Graph.${b}: the "${e}" edge already exists in the graph.`);if(!a.multi&&(d?void 0!==j.undirected[g]:void 0!==j.out[g]))throw new r(`Graph.${b}: an edge linking "${f}" to "${g}" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`);let m=new v(d,e,j,k,i);a._edges.set(e,m);let n=f===g;return d?(j.undirectedDegree++,k.undirectedDegree++,n&&(j.undirectedLoops++,a._undirectedSelfLoopCount++)):(j.outDegree++,k.inDegree++,n&&(j.directedLoops++,a._directedSelfLoopCount++)),a.multi?m.attachMulti():m.attach(),d?a._undirectedSize++:a._directedSize++,l.key=e,a.emit("edgeAdded",l),e}function T(a,b,c,d,e,g,i,j,k){let l,m,n;if(!d&&"undirected"===a.type)throw new r(`Graph.${b}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`);if(d&&"directed"===a.type)throw new r(`Graph.${b}: you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead.`);if(j){if(k){if("function"!=typeof j)throw new p(`Graph.${b}: invalid updater function. Expecting a function but got "${j}"`)}else if(!h(j))throw new p(`Graph.${b}: invalid attributes. Expecting an object but got "${j}"`)}if(g=""+g,i=""+i,k&&(l=j,j=void 0),!a.allowSelfLoops&&g===i)throw new r(`Graph.${b}: source & target are the same ("${g}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let o=a._nodes.get(g),q=a._nodes.get(i);if(!c&&(m=a._edges.get(e))){if((m.source.key!==g||m.target.key!==i)&&(!d||m.source.key!==i||m.target.key!==g))throw new r(`Graph.${b}: inconsistency detected when attempting to merge the "${e}" edge with "${g}" source & "${i}" target vs. ("${m.source.key}", "${m.target.key}").`);n=m}if(n||a.multi||!o||(n=d?o.undirected[i]:o.out[i]),n){let b=[n.key,!1,!1,!1];if(k?!l:!j)return b;if(k){let b=n.attributes;n.attributes=l(b),a.emit("edgeAttributesUpdated",{type:"replace",key:n.key,attributes:n.attributes})}else f(n.attributes,j),a.emit("edgeAttributesUpdated",{type:"merge",key:n.key,attributes:n.attributes,data:j});return b}j=j||{},k&&l&&(j=l(j));let s={key:null,undirected:d,source:g,target:i,attributes:j};if(c)e=a._edgeKeyGenerator();else if(e=""+e,a._edges.has(e))throw new r(`Graph.${b}: the "${e}" edge already exists in the graph.`);let t=!1,u=!1;o||(o=R(a,g,{}),t=!0,g===i&&(q=o,u=!0)),q||(q=R(a,i,{}),u=!0),m=new v(d,e,o,q,j),a._edges.set(e,m);let w=g===i;return d?(o.undirectedDegree++,q.undirectedDegree++,w&&(o.undirectedLoops++,a._undirectedSelfLoopCount++)):(o.outDegree++,q.inDegree++,w&&(o.directedLoops++,a._directedSelfLoopCount++)),a.multi?m.attachMulti():m.attach(),d?a._undirectedSize++:a._directedSize++,s.key=e,a.emit("edgeAdded",s),[e,!0,t,u]}function U(a,b){a._edges.delete(b.key);let{source:c,target:d,attributes:e}=b,f=b.undirected,g=c===d;f?(c.undirectedDegree--,d.undirectedDegree--,g&&(c.undirectedLoops--,a._undirectedSelfLoopCount--)):(c.outDegree--,d.inDegree--,g&&(c.directedLoops--,a._directedSelfLoopCount--)),a.multi?b.detachMulti():b.detach(),f?a._undirectedSize--:a._directedSize--,a.emit("edgeDropped",{key:b.key,attributes:e,source:c.key,target:d.key,undirected:f})}class V extends e.EventEmitter{constructor(a){if(super(),"boolean"!=typeof(a=f({},Q,a)).multi)throw new p(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${a.multi}".`);if(!O.has(a.type))throw new p(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${a.type}".`);if("boolean"!=typeof a.allowSelfLoops)throw new p(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "${a.allowSelfLoops}".`);j(this,"NodeDataClass","mixed"===a.type?s:"directed"===a.type?t:u);const b="geid_"+N()+"_";let c=0;const d=()=>{let a;do a=b+c++;while(this._edges.has(a));return a};j(this,"_attributes",{}),j(this,"_nodes",new Map),j(this,"_edges",new Map),j(this,"_directedSize",0),j(this,"_undirectedSize",0),j(this,"_directedSelfLoopCount",0),j(this,"_undirectedSelfLoopCount",0),j(this,"_edgeKeyGenerator",d),j(this,"_options",a),P.forEach(a=>j(this,a,this[a])),k(this,"order",()=>this._nodes.size),k(this,"size",()=>this._edges.size),k(this,"directedSize",()=>this._directedSize),k(this,"undirectedSize",()=>this._undirectedSize),k(this,"selfLoopCount",()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),k(this,"directedSelfLoopCount",()=>this._directedSelfLoopCount),k(this,"undirectedSelfLoopCount",()=>this._undirectedSelfLoopCount),k(this,"multi",this._options.multi),k(this,"type",this._options.type),k(this,"allowSelfLoops",this._options.allowSelfLoops),k(this,"implementation",()=>"graphology")}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(a){return this._nodes.has(""+a)}hasDirectedEdge(a,b){if("undirected"===this.type)return!1;if(1==arguments.length){let b=""+a,c=this._edges.get(b);return!!c&&!c.undirected}if(2==arguments.length){a=""+a,b=""+b;let c=this._nodes.get(a);return!!c&&c.out.hasOwnProperty(b)}throw new p(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasUndirectedEdge(a,b){if("directed"===this.type)return!1;if(1==arguments.length){let b=""+a,c=this._edges.get(b);return!!c&&c.undirected}if(2==arguments.length){a=""+a,b=""+b;let c=this._nodes.get(a);return!!c&&c.undirected.hasOwnProperty(b)}throw new p(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasEdge(a,b){if(1==arguments.length){let b=""+a;return this._edges.has(b)}if(2==arguments.length){a=""+a,b=""+b;let c=this._nodes.get(a);return!!c&&(void 0!==c.out&&c.out.hasOwnProperty(b)||void 0!==c.undirected&&c.undirected.hasOwnProperty(b))}throw new p(`Graph.hasEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}directedEdge(a,b){if("undirected"===this.type)return;if(a=""+a,b=""+b,this.multi)throw new r("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");let c=this._nodes.get(a);if(!c)throw new q(`Graph.directedEdge: could not find the "${a}" source node in the graph.`);if(!this._nodes.has(b))throw new q(`Graph.directedEdge: could not find the "${b}" target node in the graph.`);let d=c.out&&c.out[b]||void 0;if(d)return d.key}undirectedEdge(a,b){if("directed"===this.type)return;if(a=""+a,b=""+b,this.multi)throw new r("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");let c=this._nodes.get(a);if(!c)throw new q(`Graph.undirectedEdge: could not find the "${a}" source node in the graph.`);if(!this._nodes.has(b))throw new q(`Graph.undirectedEdge: could not find the "${b}" target node in the graph.`);let d=c.undirected&&c.undirected[b]||void 0;if(d)return d.key}edge(a,b){if(this.multi)throw new r("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");a=""+a,b=""+b;let c=this._nodes.get(a);if(!c)throw new q(`Graph.edge: could not find the "${a}" source node in the graph.`);if(!this._nodes.has(b))throw new q(`Graph.edge: could not find the "${b}" target node in the graph.`);let d=c.out&&c.out[b]||c.undirected&&c.undirected[b]||void 0;if(d)return d.key}areDirectedNeighbors(a,b){a=""+a,b=""+b;let c=this._nodes.get(a);if(!c)throw new q(`Graph.areDirectedNeighbors: could not find the "${a}" node in the graph.`);return"undirected"!==this.type&&(b in c.in||b in c.out)}areOutNeighbors(a,b){a=""+a,b=""+b;let c=this._nodes.get(a);if(!c)throw new q(`Graph.areOutNeighbors: could not find the "${a}" node in the graph.`);return"undirected"!==this.type&&b in c.out}areInNeighbors(a,b){a=""+a,b=""+b;let c=this._nodes.get(a);if(!c)throw new q(`Graph.areInNeighbors: could not find the "${a}" node in the graph.`);return"undirected"!==this.type&&b in c.in}areUndirectedNeighbors(a,b){a=""+a,b=""+b;let c=this._nodes.get(a);if(!c)throw new q(`Graph.areUndirectedNeighbors: could not find the "${a}" node in the graph.`);return"directed"!==this.type&&b in c.undirected}areNeighbors(a,b){a=""+a,b=""+b;let c=this._nodes.get(a);if(!c)throw new q(`Graph.areNeighbors: could not find the "${a}" node in the graph.`);return"undirected"!==this.type&&(b in c.in||b in c.out)||"directed"!==this.type&&b in c.undirected}areInboundNeighbors(a,b){a=""+a,b=""+b;let c=this._nodes.get(a);if(!c)throw new q(`Graph.areInboundNeighbors: could not find the "${a}" node in the graph.`);return"undirected"!==this.type&&b in c.in||"directed"!==this.type&&b in c.undirected}areOutboundNeighbors(a,b){a=""+a,b=""+b;let c=this._nodes.get(a);if(!c)throw new q(`Graph.areOutboundNeighbors: could not find the "${a}" node in the graph.`);return"undirected"!==this.type&&b in c.out||"directed"!==this.type&&b in c.undirected}inDegree(a){a=""+a;let b=this._nodes.get(a);if(!b)throw new q(`Graph.inDegree: could not find the "${a}" node in the graph.`);return"undirected"===this.type?0:b.inDegree}outDegree(a){a=""+a;let b=this._nodes.get(a);if(!b)throw new q(`Graph.outDegree: could not find the "${a}" node in the graph.`);return"undirected"===this.type?0:b.outDegree}directedDegree(a){a=""+a;let b=this._nodes.get(a);if(!b)throw new q(`Graph.directedDegree: could not find the "${a}" node in the graph.`);return"undirected"===this.type?0:b.inDegree+b.outDegree}undirectedDegree(a){a=""+a;let b=this._nodes.get(a);if(!b)throw new q(`Graph.undirectedDegree: could not find the "${a}" node in the graph.`);return"directed"===this.type?0:b.undirectedDegree}inboundDegree(a){a=""+a;let b=this._nodes.get(a);if(!b)throw new q(`Graph.inboundDegree: could not find the "${a}" node in the graph.`);let c=0;return"directed"!==this.type&&(c+=b.undirectedDegree),"undirected"!==this.type&&(c+=b.inDegree),c}outboundDegree(a){a=""+a;let b=this._nodes.get(a);if(!b)throw new q(`Graph.outboundDegree: could not find the "${a}" node in the graph.`);let c=0;return"directed"!==this.type&&(c+=b.undirectedDegree),"undirected"!==this.type&&(c+=b.outDegree),c}degree(a){a=""+a;let b=this._nodes.get(a);if(!b)throw new q(`Graph.degree: could not find the "${a}" node in the graph.`);let c=0;return"directed"!==this.type&&(c+=b.undirectedDegree),"undirected"!==this.type&&(c+=b.inDegree+b.outDegree),c}inDegreeWithoutSelfLoops(a){a=""+a;let b=this._nodes.get(a);if(!b)throw new q(`Graph.inDegreeWithoutSelfLoops: could not find the "${a}" node in the graph.`);return"undirected"===this.type?0:b.inDegree-b.directedLoops}outDegreeWithoutSelfLoops(a){a=""+a;let b=this._nodes.get(a);if(!b)throw new q(`Graph.outDegreeWithoutSelfLoops: could not find the "${a}" node in the graph.`);return"undirected"===this.type?0:b.outDegree-b.directedLoops}directedDegreeWithoutSelfLoops(a){a=""+a;let b=this._nodes.get(a);if(!b)throw new q(`Graph.directedDegreeWithoutSelfLoops: could not find the "${a}" node in the graph.`);return"undirected"===this.type?0:b.inDegree+b.outDegree-2*b.directedLoops}undirectedDegreeWithoutSelfLoops(a){a=""+a;let b=this._nodes.get(a);if(!b)throw new q(`Graph.undirectedDegreeWithoutSelfLoops: could not find the "${a}" node in the graph.`);return"directed"===this.type?0:b.undirectedDegree-2*b.undirectedLoops}inboundDegreeWithoutSelfLoops(a){a=""+a;let b=this._nodes.get(a);if(!b)throw new q(`Graph.inboundDegreeWithoutSelfLoops: could not find the "${a}" node in the graph.`);let c=0,d=0;return"directed"!==this.type&&(c+=b.undirectedDegree,d+=2*b.undirectedLoops),"undirected"!==this.type&&(c+=b.inDegree,d+=b.directedLoops),c-d}outboundDegreeWithoutSelfLoops(a){a=""+a;let b=this._nodes.get(a);if(!b)throw new q(`Graph.outboundDegreeWithoutSelfLoops: could not find the "${a}" node in the graph.`);let c=0,d=0;return"directed"!==this.type&&(c+=b.undirectedDegree,d+=2*b.undirectedLoops),"undirected"!==this.type&&(c+=b.outDegree,d+=b.directedLoops),c-d}degreeWithoutSelfLoops(a){a=""+a;let b=this._nodes.get(a);if(!b)throw new q(`Graph.degreeWithoutSelfLoops: could not find the "${a}" node in the graph.`);let c=0,d=0;return"directed"!==this.type&&(c+=b.undirectedDegree,d+=2*b.undirectedLoops),"undirected"!==this.type&&(c+=b.inDegree+b.outDegree,d+=2*b.directedLoops),c-d}source(a){a=""+a;let b=this._edges.get(a);if(!b)throw new q(`Graph.source: could not find the "${a}" edge in the graph.`);return b.source.key}target(a){a=""+a;let b=this._edges.get(a);if(!b)throw new q(`Graph.target: could not find the "${a}" edge in the graph.`);return b.target.key}extremities(a){a=""+a;let b=this._edges.get(a);if(!b)throw new q(`Graph.extremities: could not find the "${a}" edge in the graph.`);return[b.source.key,b.target.key]}opposite(a,b){a=""+a,b=""+b;let c=this._edges.get(b);if(!c)throw new q(`Graph.opposite: could not find the "${b}" edge in the graph.`);let d=c.source.key,e=c.target.key;if(a===d)return e;if(a===e)return d;throw new q(`Graph.opposite: the "${a}" node is not attached to the "${b}" edge (${d}, ${e}).`)}hasExtremity(a,b){a=""+a,b=""+b;let c=this._edges.get(a);if(!c)throw new q(`Graph.hasExtremity: could not find the "${a}" edge in the graph.`);return c.source.key===b||c.target.key===b}isUndirected(a){a=""+a;let b=this._edges.get(a);if(!b)throw new q(`Graph.isUndirected: could not find the "${a}" edge in the graph.`);return b.undirected}isDirected(a){a=""+a;let b=this._edges.get(a);if(!b)throw new q(`Graph.isDirected: could not find the "${a}" edge in the graph.`);return!b.undirected}isSelfLoop(a){a=""+a;let b=this._edges.get(a);if(!b)throw new q(`Graph.isSelfLoop: could not find the "${a}" edge in the graph.`);return b.source===b.target}addNode(a,b){return function(a,b,c){if(c&&!h(c))throw new p(`Graph.addNode: invalid attributes. Expecting an object but got "${c}"`);if(b=""+b,c=c||{},a._nodes.has(b))throw new r(`Graph.addNode: the "${b}" node already exist in the graph.`);let d=new a.NodeDataClass(b,c);return a._nodes.set(b,d),a.emit("nodeAdded",{key:b,attributes:c}),d}(this,a,b).key}mergeNode(a,b){if(b&&!h(b))throw new p(`Graph.mergeNode: invalid attributes. Expecting an object but got "${b}"`);a=""+a,b=b||{};let c=this._nodes.get(a);return c?(b&&(f(c.attributes,b),this.emit("nodeAttributesUpdated",{type:"merge",key:a,attributes:c.attributes,data:b})),[a,!1]):(c=new this.NodeDataClass(a,b),this._nodes.set(a,c),this.emit("nodeAdded",{key:a,attributes:b}),[a,!0])}updateNode(a,b){if(b&&"function"!=typeof b)throw new p(`Graph.updateNode: invalid updater function. Expecting a function but got "${b}"`);a=""+a;let c=this._nodes.get(a);if(c){if(b){let d=c.attributes;c.attributes=b(d),this.emit("nodeAttributesUpdated",{type:"replace",key:a,attributes:c.attributes})}return[a,!1]}let d=b?b({}):{};return c=new this.NodeDataClass(a,d),this._nodes.set(a,c),this.emit("nodeAdded",{key:a,attributes:d}),[a,!0]}dropNode(a){let b;a=""+a;let c=this._nodes.get(a);if(!c)throw new q(`Graph.dropNode: could not find the "${a}" node in the graph.`);if("undirected"!==this.type){for(let a in c.out){b=c.out[a];do U(this,b),b=b.next;while(b)}for(let a in c.in){b=c.in[a];do U(this,b),b=b.next;while(b)}}if("directed"!==this.type)for(let a in c.undirected){b=c.undirected[a];do U(this,b),b=b.next;while(b)}this._nodes.delete(a),this.emit("nodeDropped",{key:a,attributes:c.attributes})}dropEdge(a){let b;if(arguments.length>1){let a=""+arguments[0],c=""+arguments[1];if(!(b=g(this,a,c,this.type)))throw new q(`Graph.dropEdge: could not find the "${a}" -> "${c}" edge in the graph.`)}else if(a=""+a,!(b=this._edges.get(a)))throw new q(`Graph.dropEdge: could not find the "${a}" edge in the graph.`);return U(this,b),this}dropDirectedEdge(a,b){if(arguments.length<2)throw new r("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new r("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");let c=g(this,a=""+a,b=""+b,"directed");if(!c)throw new q(`Graph.dropDirectedEdge: could not find a "${a}" -> "${b}" edge in the graph.`);return U(this,c),this}dropUndirectedEdge(a,b){if(arguments.length<2)throw new r("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new r("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");let c=g(this,a,b,"undirected");if(!c)throw new q(`Graph.dropUndirectedEdge: could not find a "${a}" -> "${b}" edge in the graph.`);return U(this,c),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")}clearEdges(){let a,b=this._nodes.values();for(;!0!==(a=b.next()).done;)a.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")}getAttribute(a){return this._attributes[a]}getAttributes(){return this._attributes}hasAttribute(a){return this._attributes.hasOwnProperty(a)}setAttribute(a,b){return this._attributes[a]=b,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:a}),this}updateAttribute(a,b){if("function"!=typeof b)throw new p("Graph.updateAttribute: updater should be a function.");let c=this._attributes[a];return this._attributes[a]=b(c),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:a}),this}removeAttribute(a){return delete this._attributes[a],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:a}),this}replaceAttributes(a){if(!h(a))throw new p("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=a,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this}mergeAttributes(a){if(!h(a))throw new p("Graph.mergeAttributes: provided attributes are not a plain object.");return f(this._attributes,a),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:a}),this}updateAttributes(a){if("function"!=typeof a)throw new p("Graph.updateAttributes: provided updater is not a function.");return this._attributes=a(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this}updateEachNodeAttributes(a,b){let c,d;if("function"!=typeof a)throw new p("Graph.updateEachNodeAttributes: expecting an updater function.");if(b&&!l(b))throw new p("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");let e=this._nodes.values();for(;!0!==(c=e.next()).done;)(d=c.value).attributes=a(d.key,d.attributes);this.emit("eachNodeAttributesUpdated",{hints:b||null})}updateEachEdgeAttributes(a,b){let c,d,e,f;if("function"!=typeof a)throw new p("Graph.updateEachEdgeAttributes: expecting an updater function.");if(b&&!l(b))throw new p("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");let g=this._edges.values();for(;!0!==(c=g.next()).done;)e=(d=c.value).source,f=d.target,d.attributes=a(d.key,d.attributes,e.key,f.key,e.attributes,f.attributes,d.undirected);this.emit("eachEdgeAttributesUpdated",{hints:b||null})}forEachAdjacencyEntry(a){if("function"!=typeof a)throw new p("Graph.forEachAdjacencyEntry: expecting a callback.");M(!1,!1,!1,this,a)}forEachAdjacencyEntryWithOrphans(a){if("function"!=typeof a)throw new p("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");M(!1,!1,!0,this,a)}forEachAssymetricAdjacencyEntry(a){if("function"!=typeof a)throw new p("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");M(!1,!0,!1,this,a)}forEachAssymetricAdjacencyEntryWithOrphans(a){if("function"!=typeof a)throw new p("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");M(!1,!0,!0,this,a)}nodes(){return Array.from(this._nodes.keys())}forEachNode(a){let b,c;if("function"!=typeof a)throw new p("Graph.forEachNode: expecting a callback.");let d=this._nodes.values();for(;!0!==(b=d.next()).done;)a((c=b.value).key,c.attributes)}findNode(a){let b,c;if("function"!=typeof a)throw new p("Graph.findNode: expecting a callback.");let d=this._nodes.values();for(;!0!==(b=d.next()).done;)if(a((c=b.value).key,c.attributes))return c.key}mapNodes(a){let b,c;if("function"!=typeof a)throw new p("Graph.mapNode: expecting a callback.");let d=this._nodes.values(),e=Array(this.order),f=0;for(;!0!==(b=d.next()).done;)c=b.value,e[f++]=a(c.key,c.attributes);return e}someNode(a){let b,c;if("function"!=typeof a)throw new p("Graph.someNode: expecting a callback.");let d=this._nodes.values();for(;!0!==(b=d.next()).done;)if(a((c=b.value).key,c.attributes))return!0;return!1}everyNode(a){let b,c;if("function"!=typeof a)throw new p("Graph.everyNode: expecting a callback.");let d=this._nodes.values();for(;!0!==(b=d.next()).done;)if(!a((c=b.value).key,c.attributes))return!1;return!0}filterNodes(a){let b,c;if("function"!=typeof a)throw new p("Graph.filterNodes: expecting a callback.");let d=this._nodes.values(),e=[];for(;!0!==(b=d.next()).done;)a((c=b.value).key,c.attributes)&&e.push(c.key);return e}reduceNodes(a,b){let c,d;if("function"!=typeof a)throw new p("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new p("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");let e=b,f=this._nodes.values();for(;!0!==(c=f.next()).done;)e=a(e,(d=c.value).key,d.attributes);return e}nodeEntries(){let a=this._nodes.values();return{[Symbol.iterator](){return this},next(){let b=a.next();if(b.done)return b;let c=b.value;return{value:{node:c.key,attributes:c.attributes},done:!1}}}}export(){let a=Array(this._nodes.size),b=0;this._nodes.forEach((c,d)=>{let e;a[b++]=(e={key:d},i(c.attributes)||(e.attributes=f({},c.attributes)),e)});let c=Array(this._edges.size);return b=0,this._edges.forEach((a,d)=>{var e;let g;c[b++]=(e=this.type,g={key:d,source:a.source.key,target:a.target.key},i(a.attributes)||(g.attributes=f({},a.attributes)),"mixed"===e&&a.undirected&&(g.undirected=!0),g)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:a,edges:c}}import(a,b=!1){let c,d,e,f,g;if(a instanceof V)return a.forEachNode((a,c)=>{b?this.mergeNode(a,c):this.addNode(a,c)}),a.forEachEdge((a,c,d,e,f,g,h)=>{b?h?this.mergeUndirectedEdgeWithKey(a,d,e,c):this.mergeDirectedEdgeWithKey(a,d,e,c):h?this.addUndirectedEdgeWithKey(a,d,e,c):this.addDirectedEdgeWithKey(a,d,e,c)}),this;if(!h(a))throw new p("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(a.attributes){if(!h(a.attributes))throw new p("Graph.import: invalid attributes. Expecting a plain object.");b?this.mergeAttributes(a.attributes):this.replaceAttributes(a.attributes)}if(a.nodes){if(!Array.isArray(e=a.nodes))throw new p("Graph.import: invalid nodes. Expecting an array.");for(c=0,d=e.length;c<d;c++){var i=f=e[c];if(!h(i))throw new p('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in i))throw new p("Graph.import: serialized node is missing its key.");if("attributes"in i&&(!h(i.attributes)||null===i.attributes))throw new p("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");let{key:a,attributes:d}=f;b?this.mergeNode(a,d):this.addNode(a,d)}}if(a.edges){let f=!1;if("undirected"===this.type&&(f=!0),!Array.isArray(e=a.edges))throw new p("Graph.import: invalid edges. Expecting an array.");for(c=0,d=e.length;c<d;c++){var j=g=e[c];if(!h(j))throw new p('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in j))throw new p("Graph.import: serialized edge is missing its source.");if(!("target"in j))throw new p("Graph.import: serialized edge is missing its target.");if("attributes"in j&&(!h(j.attributes)||null===j.attributes))throw new p("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in j&&"boolean"!=typeof j.undirected)throw new p("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.");let{source:a,target:d,attributes:i,undirected:k=f}=g;"key"in g?(b?k?this.mergeUndirectedEdgeWithKey:this.mergeDirectedEdgeWithKey:k?this.addUndirectedEdgeWithKey:this.addDirectedEdgeWithKey).call(this,g.key,a,d,i):(b?k?this.mergeUndirectedEdge:this.mergeDirectedEdge:k?this.addUndirectedEdge:this.addDirectedEdge).call(this,a,d,i)}}return this}nullCopy(a){let b=new V(f({},this._options,a));return b.replaceAttributes(f({},this.getAttributes())),b}emptyCopy(a){let b=this.nullCopy(a);return this._nodes.forEach((a,c)=>{let d=f({},a.attributes);a=new b.NodeDataClass(c,d),b._nodes.set(c,a)}),b}copy(a){let b,c;if("string"==typeof(a=a||{}).type&&a.type!==this.type&&"mixed"!==a.type)throw new r(`Graph.copy: cannot create an incompatible copy from "${this.type}" type to "${a.type}" because this would mean losing information about the current graph.`);if("boolean"==typeof a.multi&&a.multi!==this.multi&&!0!==a.multi)throw new r("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if("boolean"==typeof a.allowSelfLoops&&a.allowSelfLoops!==this.allowSelfLoops&&!0!==a.allowSelfLoops)throw new r("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");let d=this.emptyCopy(a),e=this._edges.values();for(;!0!==(b=e.next()).done;)S(d,"copy",!1,(c=b.value).undirected,c.key,c.source.key,c.target.key,f({},c.attributes));return d}toJSON(){return this.export()}toString(){return"[object Graph]"}inspect(){let a={};this._nodes.forEach((b,c)=>{a[c]=b.attributes});let b={},c={};this._edges.forEach((a,d)=>{let e,f=a.undirected?"--":"->",g="",h=a.source.key,i=a.target.key;a.undirected&&h>i&&(e=h,h=i,i=e);let j=`(${h})${f}(${i})`;d.startsWith("geid_")?this.multi&&(void 0===c[j]?c[j]=0:c[j]++,g+=`${c[j]}. `):g+=`[${d}]: `,b[g+=j]=a.attributes});let d={};for(let a in this)this.hasOwnProperty(a)&&!P.has(a)&&"function"!=typeof this[a]&&"symbol"!=typeof a&&(d[a]=this[a]);return d.attributes=this._attributes,d.nodes=a,d.edges=b,j(d,"constructor",this.constructor),d}}"u">typeof Symbol&&(V.prototype[Symbol.for("nodejs.util.inspect.custom")]=V.prototype.inspect),[{name:a=>`${a}Edge`,generateKey:!0},{name:a=>`${a}DirectedEdge`,generateKey:!0,type:"directed"},{name:a=>`${a}UndirectedEdge`,generateKey:!0,type:"undirected"},{name:a=>`${a}EdgeWithKey`},{name:a=>`${a}DirectedEdgeWithKey`,type:"directed"},{name:a=>`${a}UndirectedEdgeWithKey`,type:"undirected"}].forEach(a=>{["add","merge","update"].forEach(b=>{let c=a.name(b),d="add"===b?S:T;a.generateKey?V.prototype[c]=function(e,f,g){return d(this,c,!0,"undirected"===(a.type||this.type),null,e,f,g,"update"===b)}:V.prototype[c]=function(e,f,g,h){return d(this,c,!1,"undirected"===(a.type||this.type),e,f,g,h,"update"===b)}})}),x.forEach(function({name:a,attacher:b}){b(V,a("Node"),0),b(V,a("Source"),1),b(V,a("Target"),2),b(V,a("Opposite"),3)}),y.forEach(function({name:a,attacher:b}){b(V,a("Edge"),"mixed"),b(V,a("DirectedEdge"),"directed"),b(V,a("UndirectedEdge"),"undirected")}),[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}].forEach(a=>{!function(a,b){let{name:c,type:d,direction:e}=b;a.prototype[c]=function(a,b){var f,g,h;if("mixed"!==d&&"mixed"!==this.type&&d!==this.type)return[];if(!arguments.length)return function(a,b){let c,d;if(0===a.size)return[];if("mixed"===b||b===a.type)return Array.from(a._edges.keys());let e=Array("undirected"===b?a.undirectedSize:a.directedSize),f="undirected"===b,g=a._edges.values(),h=0;for(;!0!==(c=g.next()).done;)(d=c.value).undirected===f&&(e[h++]=d.key);return e}(this,d);if(1==arguments.length){let b;a=""+a;let h=this._nodes.get(a);if(void 0===h)throw new q(`Graph.${c}: could not find the "${a}" node in the graph.`);return f=this.multi,g="mixed"===d?this.type:d,b=[],G(!1,f,g,e,h,function(a){b.push(a)}),b}if(2==arguments.length){let f;a=""+a,b=""+b;let g=this._nodes.get(a);if(!g)throw new q(`Graph.${c}: could not find the "${a}" source node in the graph.`);if(!this._nodes.has(b))throw new q(`Graph.${c}: could not find the "${b}" target node in the graph.`);return h=this.multi,f=[],H(!1,d,h,e,g,b,function(a){f.push(a)}),f}throw new p(`Graph.${c}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}(V,a),function(a,b){let{name:c,type:d,direction:e}=b,f="forEach"+c[0].toUpperCase()+c.slice(1,-1);a.prototype[f]=function(a,b,c){if("mixed"===d||"mixed"===this.type||d===this.type){if(1==arguments.length)return F(!1,this,d,c=a);if(2==arguments.length){a=""+a,c=b;let g=this._nodes.get(a);if(void 0===g)throw new q(`Graph.${f}: could not find the "${a}" node in the graph.`);return G(!1,this.multi,"mixed"===d?this.type:d,e,g,c)}if(3==arguments.length){a=""+a,b=""+b;let g=this._nodes.get(a);if(!g)throw new q(`Graph.${f}: could not find the "${a}" source node in the graph.`);if(!this._nodes.has(b))throw new q(`Graph.${f}: could not find the "${b}" target node in the graph.`);return H(!1,d,this.multi,e,g,b,c)}throw new p(`Graph.${f}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)}};let g="map"+c[0].toUpperCase()+c.slice(1);a.prototype[g]=function(){let a,b=Array.prototype.slice.call(arguments),c=b.pop();if(0===b.length){let e=0;"directed"!==d&&(e+=this.undirectedSize),"undirected"!==d&&(e+=this.directedSize),a=Array(e);let f=0;b.push((b,d,e,g,h,i,j)=>{a[f++]=c(b,d,e,g,h,i,j)})}else a=[],b.push((b,d,e,f,g,h,i)=>{a.push(c(b,d,e,f,g,h,i))});return this[f].apply(this,b),a};let h="filter"+c[0].toUpperCase()+c.slice(1);a.prototype[h]=function(){let a=Array.prototype.slice.call(arguments),b=a.pop(),c=[];return a.push((a,d,e,f,g,h,i)=>{b(a,d,e,f,g,h,i)&&c.push(a)}),this[f].apply(this,a),c};let i="reduce"+c[0].toUpperCase()+c.slice(1);a.prototype[i]=function(){let a,b,c=Array.prototype.slice.call(arguments);if(c.length<2||c.length>4)throw new p(`Graph.${i}: invalid number of arguments (expecting 2, 3 or 4 and got ${c.length}).`);if("function"==typeof c[c.length-1]&&"function"!=typeof c[c.length-2])throw new p(`Graph.${i}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);2===c.length?(a=c[0],b=c[1],c=[]):3===c.length?(a=c[1],b=c[2],c=[c[0]]):4===c.length&&(a=c[2],b=c[3],c=[c[0],c[1]]);let d=b;return c.push((b,c,e,f,g,h,i)=>{d=a(d,b,c,e,f,g,h,i)}),this[f].apply(this,c),d}}(V,a),function(a,b){let{name:c,type:d,direction:e}=b,f="find"+c[0].toUpperCase()+c.slice(1,-1);a.prototype[f]=function(a,b,c){if("mixed"!==d&&"mixed"!==this.type&&d!==this.type)return!1;if(1==arguments.length)return F(!0,this,d,c=a);if(2==arguments.length){a=""+a,c=b;let g=this._nodes.get(a);if(void 0===g)throw new q(`Graph.${f}: could not find the "${a}" node in the graph.`);return G(!0,this.multi,"mixed"===d?this.type:d,e,g,c)}if(3==arguments.length){a=""+a,b=""+b;let g=this._nodes.get(a);if(!g)throw new q(`Graph.${f}: could not find the "${a}" source node in the graph.`);if(!this._nodes.has(b))throw new q(`Graph.${f}: could not find the "${b}" target node in the graph.`);return H(!0,d,this.multi,e,g,b,c)}throw new p(`Graph.${f}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)};let g="some"+c[0].toUpperCase()+c.slice(1,-1);a.prototype[g]=function(){let a=Array.prototype.slice.call(arguments),b=a.pop();return a.push((a,c,d,e,f,g,h)=>b(a,c,d,e,f,g,h)),!!this[f].apply(this,a)};let h="every"+c[0].toUpperCase()+c.slice(1,-1);a.prototype[h]=function(){let a=Array.prototype.slice.call(arguments),b=a.pop();return a.push((a,c,d,e,f,g,h)=>!b(a,c,d,e,f,g,h)),!this[f].apply(this,a)}}(V,a),function(a,b){let{name:c,type:d,direction:e}=b,f=c.slice(0,-1)+"Entries";a.prototype[f]=function(a,b){var c;if("mixed"!==d&&"mixed"!==this.type&&d!==this.type)return n();if(!arguments.length)return function(a,b){if(0===a.size)return n();let c="mixed"!==b&&b!==a.type,d="undirected"===b,e=a._edges.values();return{[Symbol.iterator](){return this},next(){let a,b;for(;;){if((a=e.next()).done)return a;if(b=a.value,!c||b.undirected===d)break}return{value:{edge:b.key,attributes:b.attributes,source:b.source.key,target:b.target.key,sourceAttributes:b.source.attributes,targetAttributes:b.target.attributes,undirected:b.undirected},done:!1}}}}(this,d);if(1==arguments.length){let b;a=""+a;let c=this._nodes.get(a);if(!c)throw new q(`Graph.${f}: could not find the "${a}" node in the graph.`);return b=n(),"undirected"!==d&&("out"!==e&&void 0!==c.in&&(b=m(b,B(c.in))),"in"!==e&&void 0!==c.out&&(b=m(b,B(c.out,e?void 0:c.key)))),"directed"!==d&&void 0!==c.undirected&&(b=m(b,B(c.undirected))),b}if(2==arguments.length){let g;a=""+a,b=""+b;let h=this._nodes.get(a);if(!h)throw new q(`Graph.${f}: could not find the "${a}" source node in the graph.`);if(!this._nodes.has(b))throw new q(`Graph.${f}: could not find the "${b}" target node in the graph.`);return c=b,g=n(),"undirected"!==d&&(void 0!==h.in&&"out"!==e&&c in h.in&&(g=m(g,E(h.in,c))),void 0!==h.out&&"in"!==e&&c in h.out&&(e||h.key!==c)&&(g=m(g,E(h.out,c)))),"directed"!==d&&void 0!==h.undirected&&c in h.undirected&&(g=m(g,E(h.undirected,c))),g}throw new p(`Graph.${f}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}(V,a)}),[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}].forEach(a=>{!function(a,b){let{name:c,type:d,direction:e}=b;a.prototype[c]=function(a){if("mixed"!==d&&"mixed"!==this.type&&d!==this.type)return[];a=""+a;let b=this._nodes.get(a);if(void 0===b)throw new q(`Graph.${c}: could not find the "${a}" node in the graph.`);var f="mixed"===d?this.type:d;if("mixed"!==f){if("undirected"===f)return Object.keys(b.undirected);if("string"==typeof e)return Object.keys(b[e])}let g=[];return K(!1,f,e,b,function(a){g.push(a)}),g}}(V,a),function(a,b){let{name:c,type:d,direction:e}=b,f="forEach"+c[0].toUpperCase()+c.slice(1,-1);a.prototype[f]=function(a,b){if("mixed"!==d&&"mixed"!==this.type&&d!==this.type)return;a=""+a;let c=this._nodes.get(a);if(void 0===c)throw new q(`Graph.${f}: could not find the "${a}" node in the graph.`);K(!1,"mixed"===d?this.type:d,e,c,b)};let g="map"+c[0].toUpperCase()+c.slice(1);a.prototype[g]=function(a,b){let c=[];return this[f](a,(a,d)=>{c.push(b(a,d))}),c};let h="filter"+c[0].toUpperCase()+c.slice(1);a.prototype[h]=function(a,b){let c=[];return this[f](a,(a,d)=>{b(a,d)&&c.push(a)}),c};let i="reduce"+c[0].toUpperCase()+c.slice(1);a.prototype[i]=function(a,b,c){if(arguments.length<3)throw new p(`Graph.${i}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let d=c;return this[f](a,(a,c)=>{d=b(d,a,c)}),d}}(V,a),function(a,b){let{name:c,type:d,direction:e}=b,f=c[0].toUpperCase()+c.slice(1,-1),g="find"+f;a.prototype[g]=function(a,b){if("mixed"!==d&&"mixed"!==this.type&&d!==this.type)return;a=""+a;let c=this._nodes.get(a);if(void 0===c)throw new q(`Graph.${g}: could not find the "${a}" node in the graph.`);return K(!0,"mixed"===d?this.type:d,e,c,b)},a.prototype["some"+f]=function(a,b){return!!this[g](a,b)},a.prototype["every"+f]=function(a,b){return!this[g](a,(a,c)=>!b(a,c))}}(V,a),function(a,b){let{name:c,type:d,direction:e}=b,f=c.slice(0,-1)+"Entries";a.prototype[f]=function(a){if("mixed"!==d&&"mixed"!==this.type&&d!==this.type)return n();a=""+a;let b=this._nodes.get(a);if(void 0===b)throw new q(`Graph.${f}: could not find the "${a}" node in the graph.`);var c="mixed"===d?this.type:d;if("mixed"!==c){if("undirected"===c)return L(null,b,b.undirected);if("string"==typeof e)return L(null,b,b[e])}let g=n(),h=new I;return"undirected"!==c&&("out"!==e&&(g=m(g,L(h,b,b.in))),"in"!==e&&(g=m(g,L(h,b,b.out)))),"directed"!==c&&(g=m(g,L(h,b,b.undirected))),g}}(V,a)});class W extends V{constructor(a){const b=f({type:"directed"},a);if("multi"in b&&!1!==b.multi)throw new p("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if("directed"!==b.type)throw new p('DirectedGraph.from: inconsistent "'+b.type+'" type in given options!');super(b)}}class X extends V{constructor(a){const b=f({type:"undirected"},a);if("multi"in b&&!1!==b.multi)throw new p("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if("undirected"!==b.type)throw new p('UndirectedGraph.from: inconsistent "'+b.type+'" type in given options!');super(b)}}class Y extends V{constructor(a){const b=f({multi:!0},a);if("multi"in b&&!0!==b.multi)throw new p("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");super(b)}}class Z extends V{constructor(a){const b=f({type:"directed",multi:!0},a);if("multi"in b&&!0!==b.multi)throw new p("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if("directed"!==b.type)throw new p('MultiDirectedGraph.from: inconsistent "'+b.type+'" type in given options!');super(b)}}class $ extends V{constructor(a){const b=f({type:"undirected",multi:!0},a);if("multi"in b&&!0!==b.multi)throw new p("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if("undirected"!==b.type)throw new p('MultiUndirectedGraph.from: inconsistent "'+b.type+'" type in given options!');super(b)}}function _(a){a.from=function(b,c){let d=new a(f({},b.options,c));return d.import(b),d}}_(V),_(W),_(X),_(Y),_(Z),_($),V.Graph=V,V.DirectedGraph=W,V.UndirectedGraph=X,V.MultiGraph=Y,V.MultiDirectedGraph=Z,V.MultiUndirectedGraph=$,V.InvalidArgumentsGraphError=p,V.NotFoundGraphError=q,V.UsageGraphError=r},71363:(a,b,c)=>{var d=c(36889);a.exports=function(a){if(!d(a))throw Error("graphology-utils/infer-type: expecting a valid graphology instance.");var b=a.type;return"mixed"!==b?b:0===a.directedSize&&0===a.undirectedSize||a.directedSize>0&&a.undirectedSize>0?"mixed":a.directedSize>0?"directed":"undirected"}},84575:a=>{function b(a){return function(b){return"number"!=typeof b&&(b=b.length),Math.floor(a()*b)}}var c=b(Math.random);c.createRandomIndex=b,a.exports=c},87961:a=>{function b(a){if("function"!=typeof a)throw Error("obliterator/iterator: expecting a function!");this.next=a}"u">typeof Symbol&&(b.prototype[Symbol.iterator]=function(){return this}),b.of=function(){var a=arguments,c=a.length,d=0;return new b(function(){return d>=c?{done:!0}:{done:!1,value:a[d++]}})},b.empty=function(){return new b(function(){return{done:!0}})},b.fromSequence=function(a){var c=0,d=a.length;return new b(function(){return c>=d?{done:!0}:{done:!1,value:a[c++]}})},b.is=function(a){return a instanceof b||"object"==typeof a&&null!==a&&"function"==typeof a.next},a.exports=b}};
|